/* ═══════════════════════════════════════════════════════════
   Sweet & Spice POS — "The counter, reimagined"
   Warm charcoal base · saffron accent · chili-red total hero.
   Numbers in Space Grotesk, everything else in Inter.
   ═══════════════════════════════════════════════════════════ */

/* Safety net: an inline SVG must never balloon to its natural size just
   because a more specific rule failed to load. Icons stay icon-sized. */
svg { width: 1.15em; height: 1.15em; flex: none; }

:root {
  /* Warm dark surfaces */
  --char:      #1A1614;   /* app background */
  --char-2:    #232019;   /* raised surface / topbar */
  --ash:       #2E2A22;   /* cards, tiles */
  --ash-2:     #38332A;   /* hover / insets */

  /* Warm paper text on dark */
  --cream:      #F5EFE3;
  --cream-dim:  #B9B1A2;
  --cream-faint:#7C766B;

  /* Accents */
  --saffron:    #FFB020;  /* the one accent — buttons, active, + */
  --saffron-dp: #E8971A;
  --chili:      #FF5436;  /* the running total + charge only */
  --chili-dp:   #E8422A;
  --sage:       #8F9779;  /* ready / paid / good */
  --sage-bg:    rgba(143,151,121,.14);

  --line:       rgba(245,239,227,.09);
  --line-2:     rgba(245,239,227,.15);

  /* Legacy names mapped onto the new palette — using real hex values, not
     nested var() chains (some mobile/entry-level browsers fail to resolve
     var() pointing at another var(), which flattens every colour). */
  --flame:      #FFB020;
  --flame-dk:   #E8971A;
  --flame-lt:   rgba(255,176,32,.22);
  --flame-soft: rgba(255,176,32,.12);
  --on-flame:   #1A1614;
  --ember:      #FFB020;
  --ember-dk:   #E8971A;
  --ember-lt:   rgba(255,176,32,.14);
  --bun:        #38332A;
  --line-soft:  rgba(245,239,227,.09);
  --sidebar-top:  #161311;
  --sidebar-btm:  #161311;
  --sidebar-text: #F5EFE3;
  --sidebar-mute: #7C766B;
  --sidebar-hover: #2E2A22;
  --ring:         rgba(255,176,32,.25);
  --ring-strong:  rgba(255,176,32,.45);
  --tint:         rgba(255,176,32,.10);

  --ink:      #F5EFE3;
  --ink-2:    #B9B1A2;
  --ink-3:    #7C766B;
  --white:    #2E2A22;          /* "white" surfaces are now warm ash on dark */
  --surface:  #2E2A22;
  --mint:     #8F9779;
  --mint-bg:  rgba(143,151,121,.14);
  --warn:     #FFB020;
  --warn-bg:  rgba(255,176,32,.14);
  --danger:   #FF5436;
  --danger-bg:rgba(255,84,54,.14);

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;

  --shadow-1: 0 1px 3px rgba(0,0,0,.28);
  --shadow-2: 0 8px 26px rgba(0,0,0,.36);
  --shadow-3: 0 24px 60px rgba(0,0,0,.5);

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --disp: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --sidebar-w: 244px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  background: var(--char);
  color: var(--cream);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--saffron); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
  border-radius: 6px;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--disp); font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }

/* ── Money: numbers in Space Grotesk, fils lighter. The house style. ── */
.money {
  font-family: var(--disp);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.money .fils { font-weight: 500; color: var(--cream-faint); }
.money.neg { color: var(--chili); }

/* ═══ LAYOUT ═══════════════════════════════════════════════ */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, var(--sidebar-top) 0%, var(--sidebar-btm) 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: #fff; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: linear-gradient(140deg, var(--ember), var(--flame));
  display: grid; place-items: center;
  font-weight: 800; color: #fff; font-size: 16px; letter-spacing: -.04em;
}
.brand-text b { display: block; font-size: 15px; color: #fff; letter-spacing: -.01em; }
.brand-text span { font-size: 11px; color: var(--sidebar-mute); letter-spacing: .08em; text-transform: uppercase; }

.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-label {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sidebar-mute); padding: 14px 10px 6px;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--sidebar-text); font-size: 14px; font-weight: 500;
  text-decoration: none; position: relative;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a.on { background: var(--sidebar-hover); color: #fff; }
.nav a.on::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--ember);
}
.nav svg { width: 17px; height: 17px; flex: none; opacity: .85; }

.side-foot {
  padding: 12px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: rgba(255,255,255,.12); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 650;
}
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 11px; color: var(--sidebar-mute); }
.icon-btn {
  background: none; border: 0; color: var(--sidebar-mute); cursor: pointer;
  padding: 6px; border-radius: var(--r-sm); display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.topbar-grow { flex: 1; }
.menu-toggle { display: none; }

.page { padding: 24px; max-width: 1180px; width: 100%; }

/* ═══ COMPONENTS ═══════════════════════════════════════════ */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
}
.card-head {
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.card-head .grow { flex: 1; }
.card-head p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); }
.card-body { padding: 18px; }
.card + .card { margin-top: 18px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.stat { padding: 18px; }
.stat .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.stat .v { font-family: var(--disp); font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -.03em; }
.stat .sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 550; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.btn:hover { background: var(--bun); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--flame); border-color: var(--flame); color: var(--on-flame);
}
.btn-primary:hover { background: var(--flame-dk); border-color: var(--flame-dk); }
.btn-danger { color: #fff; border-color: var(--chili); background: var(--chili); }
.btn-danger:hover { background: var(--chili-dp); border-color: var(--chili-dp); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--ash-2); }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }

/* Forms */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
label.lbl {
  display: block; font-size: 13px; font-weight: 550;
  margin-bottom: 6px; color: var(--ink);
}
.hint { font-size: 12px; color: var(--ink-2); margin-top: 5px; }

input[type=text], input[type=password], input[type=number], input[type=date],
input[type=email], select, textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: var(--ink);
  font: inherit; font-size: 14px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--ember);
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}
input[readonly] { background: var(--line-soft); color: var(--ink-2); }
textarea { min-height: 78px; resize: vertical; }

.input-money { font-variant-numeric: tabular-nums; text-align: right; }
.input-affix { position: relative; }
.input-affix .affix {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--ink-3); pointer-events: none;
}
.input-affix input { padding-right: 44px; }

.row { display: flex; gap: 14px; }
.row > * { flex: 1; min-width: 0; }

/* Toggle switch — used everywhere instead of checkboxes */
.toggle {
  display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .track {
  width: 40px; height: 23px; border-radius: 999px;
  background: var(--line); position: relative; flex: none;
  transition: background .18s ease;
}
.toggle .track::after {
  content: ""; position: absolute; top: 2.5px; left: 2.5px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--cream); box-shadow: 0 1px 3px rgba(0,0,0,.4);
  transition: transform .18s cubic-bezier(.3,1.4,.5,1);
}
.toggle input:checked + .track { background: var(--mint); }
.toggle input:checked + .track::after { transform: translateX(17px); }
.toggle input:focus-visible + .track { box-shadow: 0 0 0 3px var(--ring-strong); }
.toggle input:disabled + .track { opacity: .45; }
.toggle .tt { font-size: 14px; }
.toggle .tt small { display: block; font-size: 12px; color: var(--ink-2); }

.toggle-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row .grow { flex: 1; }
.toggle-row .grow b { display: block; font-size: 14px; font-weight: 550; }
.toggle-row .grow span { font-size: 12.5px; color: var(--ink-2); }

/* Segmented control */
.seg { display: inline-flex; background: var(--bun); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg button {
  border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 550;
  padding: 6px 13px; border-radius: 5px; cursor: pointer; color: var(--ink-2);
}
.seg button.on { background: var(--white); color: var(--ink); box-shadow: var(--shadow-1); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 650; padding: 10px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--line-soft); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .act { text-align: right; white-space: nowrap; }
.tbl .muted-row td { opacity: .55; }
.table-wrap { overflow-x: auto; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  background: var(--bun); color: var(--ink-2);
}
.badge.ok    { background: rgba(143,151,121,.16); color: #A8B090; }
.badge.warn  { background: rgba(255,176,32,.16); color: #FFC24D; }
.badge.stop  { background: rgba(255,84,54,.16); color: #FF7A63; }
.badge.combo { background: rgba(255,84,54,.16); color: #FF7A63; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Notices */
.notice {
  padding: 12px 14px; border-radius: var(--r-sm); font-size: 13.5px;
  border: 1px solid; display: flex; gap: 10px; align-items: flex-start;
}
.notice.info   { background: rgba(255,176,32,.10); border-color: rgba(255,176,32,.28); color: #F5EFE3; }
.notice.warn   { background: rgba(255,176,32,.12); border-color: rgba(255,176,32,.32); color: #FFC24D; }
.notice.stop   { background: rgba(255,84,54,.12); border-color: rgba(255,84,54,.32); color: #FF7A63; }
.notice.ok     { background: rgba(143,151,121,.14); border-color: rgba(143,151,121,.32); color: #A8B090; }
.notice + * { margin-top: 14px; }

/* Empty state */
.empty { padding: 46px 20px; text-align: center; color: var(--ink-2); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty p { margin: 0 0 16px; font-size: 14px; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(36,23,19,.45);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; z-index: 100; overflow-y: auto;
  backdrop-filter: blur(2px);
}
.modal-bg.open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--r-lg);
  width: 100%; max-width: 540px; box-shadow: var(--shadow-3);
  animation: pop .16s ease-out;
}
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head h2 { flex: 1; }
.modal-body { padding: 20px; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--char-2); border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* Toast */
.toasts {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  background: var(--ink); color: #fff; padding: 11px 18px;
  border-radius: 999px; font-size: 14px; box-shadow: var(--shadow-3);
  animation: rise .2s ease-out;
}
.toast.bad { background: var(--danger); }
.toast.good { background: var(--mint); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

/* ═══ AUTH (enterprise split sign-in) ══════════════════════ */

body.auth { background: #12100E; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* Left — brand panel */
.auth-brand {
  position: relative;
  padding: 48px 52px;
  display: flex; flex-direction: column;
  background:
    radial-gradient(1100px 600px at 8% 0%, rgba(255,176,32,.16), transparent 55%),
    radial-gradient(900px 700px at 100% 100%, rgba(255,84,54,.14), transparent 55%),
    #161311;
  color: #F5EFE3;
  overflow: hidden;
}
.auth-brand::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(245,239,227,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,239,227,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(600px 400px at 30% 40%, #000, transparent 75%);
  pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-brand-top { display: flex; align-items: center; gap: 14px; }
.auth-mark {
  width: 52px; height: 52px; border-radius: 15px;
  background: linear-gradient(140deg, #FFB020, #FF5436);
  display: grid; place-items: center;
  font-family: var(--disp); font-weight: 700; color: #1A1614; font-size: 17px;
}
.auth-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 12px; }
.auth-wordmark { font-family: var(--disp); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }

.auth-brand-mid { margin-top: auto; margin-bottom: auto; padding: 40px 0; }
.auth-brand-mid h1 {
  font-family: var(--disp); font-size: 46px; font-weight: 600;
  line-height: 1.04; letter-spacing: -.03em; color: #F5EFE3;
}
.auth-brand-mid p {
  margin-top: 20px; max-width: 30ch;
  font-size: 16px; line-height: 1.6; color: #B9B1A2;
}

.auth-brand-foot { display: flex; gap: 36px; }
.auth-stat b {
  font-family: var(--disp); font-size: 26px; font-weight: 600;
  color: #FFB020; letter-spacing: -.02em; display: block;
}
.auth-stat span { font-size: 12.5px; color: #7C766B; margin-top: 2px; display: block; }

/* Right — sign-in form */
.auth-form-wrap {
  display: grid; place-items: center;
  padding: 40px 32px;
  background: #1A1614;
}
.auth-form { width: 100%; max-width: 380px; }

.auth-head h2 { font-family: var(--disp); font-size: 27px; font-weight: 600; letter-spacing: -.02em; }
.auth-head p { margin: 8px 0 26px; font-size: 14.5px; color: #B9B1A2; }

.auth-alert {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(255,84,54,.12); border: 1px solid rgba(255,84,54,.32);
  color: #FF7A63; border-radius: 12px; padding: 12px 14px; margin-bottom: 20px;
  font-size: 13.5px; line-height: 1.45;
}
.auth-alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.auth .field { margin-bottom: 18px; }
.auth .lbl { color: #F5EFE3; font-size: 13.5px; font-weight: 500; margin-bottom: 8px; }
.auth input[type=text], .auth input[type=password] {
  background: #232019; border: 1px solid rgba(245,239,227,.14);
  color: #F5EFE3; border-radius: 12px; padding: 13px 14px; font-size: 15px;
}
.auth input::placeholder { color: #6B655B; }
.auth input:focus {
  border-color: #FFB020; box-shadow: 0 0 0 3px rgba(255,176,32,.18); outline: none;
}

.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 14px; }
.pinpad button {
  padding: 15px 0; font-family: var(--disp); font-size: 20px; font-weight: 600;
  border: 1px solid rgba(245,239,227,.12); background: #232019;
  border-radius: 12px; cursor: pointer; color: #F5EFE3;
  font-variant-numeric: tabular-nums; transition: background .12s, transform .06s;
}
.pinpad button:hover { background: #2E2A22; }
.pinpad button:active { transform: translateY(1px); }
.pinpad button.util { color: #B9B1A2; font-family: var(--sans); font-size: 14px; font-weight: 500; }

.pin-display { display: flex; gap: 9px; justify-content: center; margin: 8px 0 2px; min-height: 14px; }
.pin-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(245,239,227,.18); }
.pin-dot.on { background: #FFB020; }

.auth-submit {
  width: 100%; margin-top: 18px; padding: 15px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #FFB020; color: #1A1614; border: 0; border-radius: 13px;
  font-family: var(--disp); font-size: 16px; font-weight: 600; cursor: pointer;
  box-shadow: 0 8px 22px rgba(255,176,32,.28); transition: background .14s, transform .06s;
}
.auth-submit:hover { background: #FFBE3E; }
.auth-submit:active { transform: translateY(1px); }
.auth-submit svg { width: 18px; height: 18px; }

.auth-foot {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 26px; font-size: 12.5px; color: #7C766B;
}
.auth-foot svg { width: 15px; height: 15px; }

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-wrap { padding: 48px 22px; min-height: 100vh; }
  .auth-form { max-width: 400px; }
}

/* ═══ UTILITIES ════════════════════════════════════════════ */
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-grow { flex: 1; }
.wrap-gap { display: flex; flex-wrap: wrap; gap: 8px; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }

/* ═══ RESPONSIVE ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed; z-index: 60; left: 0; top: 0;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow-3); }
  .menu-toggle { display: grid; }
  .page { padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .row { flex-direction: column; gap: 0; }
  .row > * { margin-bottom: 16px; }
  .scrim {
    position: fixed; inset: 0; background: rgba(36,23,19,.4); z-index: 50;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .sidebar, .topbar, .btn { display: none !important; }
  body { background: #fff; }
}

/* ═══════════════════════════════════════════════════════════
   POS SCREENS (order taking + counter billing)
   ═══════════════════════════════════════════════════════════ */

.pos { display: flex; gap: 18px; align-items: flex-start; }
.pos-left  { flex: 1; min-width: 0; }
.pos-right { width: 356px; flex: none; position: sticky; top: 88px; }

.cat-tabs {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: thin;
}
.cat-tabs button {
  border: 1px solid var(--line); background: var(--white);
  padding: 8px 15px; border-radius: 999px; font: inherit; font-size: 14px;
  font-weight: 550; cursor: pointer; white-space: nowrap; color: var(--ink-2);
}
.cat-tabs button.on { background: var(--cream); border-color: var(--cream); color: var(--char); }
.cat-tabs button.star { color: var(--saffron); border-color: rgba(255,176,32,.35); }
.cat-tabs button.star.on { background: var(--saffron); border-color: var(--saffron); color: var(--char); }

.item-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px; margin-top: 4px;
}
.tile {
  background: var(--ash); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 15px; text-align: left; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: 6px; min-height: 96px;
  transition: border-color .14s, transform .08s, box-shadow .14s;
  position: relative;
}
.tile:hover { border-color: rgba(255,176,32,.4); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tile:active { transform: scale(.985); }
.tile .nm { font-size: 14px; font-weight: 600; line-height: 1.3; flex: 1; color: #F5EFE3; }
.tile .cat { display: block; font-size: 11px; color: #9A9284; text-transform: uppercase; letter-spacing: .03em; margin-top: -2px; }
.tile .pr { font-family: var(--disp); font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin-top: 4px; color: #FFB020; }
.tile .pr .fils { color: rgba(255,176,32,.6); }
.tile .tile-add {
  display: none; position: absolute; bottom: 13px; right: 13px;
  width: 32px; height: 32px; border-radius: 9px; background: var(--saffron);
  color: var(--char); place-items: center; font-size: 20px; line-height: 1;
  opacity: 0; transition: opacity .14s;
}
.tile:hover .tile-add { display: grid; opacity: 1; }
.tile.out { opacity: .4; cursor: not-allowed; }
.tile.out:hover { border-color: var(--line); transform: none; box-shadow: none; }
.tile .tag {
  align-self: flex-start; font-size: 9px; letter-spacing: .05em;
  text-transform: uppercase; color: #fff; background: var(--chili);
  padding: 3px 8px; border-radius: 5px; font-weight: 700;
  position: absolute; top: 13px; right: 13px;
}

/* Cart drawer chrome — only visible on phones (see the phone block) */
.drawer-handle { display: none; }
.cart-scrim { display: none; }
.cart-bar { display: none; }

/* Cart / bill panel — a real thermal slip: cream paper, torn top edge, total as hero */
.bill {
  background: var(--cream); color: var(--char);
  border-radius: 0 0 var(--r) var(--r); overflow: hidden;
  position: relative;
}
.bill::before {
  content: ""; display: block; height: 12px;
  background: radial-gradient(circle at 8px -2px, transparent 7px, var(--cream) 7px) 0 0/16px 12px repeat-x;
}
.bill-head { padding: 8px 18px 16px; border-bottom: 1.5px dashed rgba(26,22,20,.18); }
.bill-head b, .bill-head h2, .bill-head h3 { color: var(--char); }
.bill-lines { max-height: 46vh; overflow-y: auto; padding: 6px 0; }
.bill-line {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 18px; border-bottom: 1px solid rgba(26,22,20,.07);
}
.bill-line:last-child { border-bottom: 0; }
.bill-line .nm { flex: 1; min-width: 0; font-size: 14px; color: var(--char); }
.bill-line .nm small { display: block; color: var(--cream-faint); font-size: 12px; }
.bill-line .money { color: var(--char); }
.bill-line .money .fils { color: rgba(26,22,20,.45); }
.bill-line.void { opacity: .5; }
.bill-line.void .nm { text-decoration: line-through; }

.qty { display: flex; align-items: center; gap: 2px; }
.qty button {
  width: 28px; height: 28px; border: 1px solid rgba(26,22,20,.15); background: transparent;
  border-radius: 8px; cursor: pointer; font: inherit; font-size: 15px; line-height: 1;
  color: var(--char);
}
.qty button:hover { background: rgba(26,22,20,.06); }
.qty span { min-width: 28px; text-align: center; font-family: var(--disp); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; color: var(--char); }

.bill-totals { padding: 14px 18px; border-top: 1.5px dashed rgba(26,22,20,.18); background: transparent; }
.bill-totals .row-t {
  display: flex; justify-content: space-between; font-size: 13px;
  padding: 4px 0; color: var(--cream-faint);
}
.bill-totals .row-t .money { color: var(--cream-faint); }
.bill-totals .row-t.grand {
  border-top: 0; margin-top: 8px; padding-top: 12px;
  align-items: baseline;
}
.bill-totals .row-t.grand > span:first-child {
  font-size: 13px; font-weight: 600; color: var(--cream-faint); text-transform: none;
}
.bill-totals .row-t.grand .money,
.bill-totals .row-t.grand > span:last-child {
  font-family: var(--disp); font-size: 34px; font-weight: 700;
  color: var(--chili); letter-spacing: -.03em; line-height: 1;
}
.bill-totals .row-t.grand .money .fils { color: rgba(26,22,20,.4); font-size: .5em; }
.bill-actions { padding: 4px 18px 18px; display: grid; gap: 8px; }
.bill-actions .btn { border-color: rgba(26,22,20,.15); background: transparent; color: var(--char); }
.bill-actions .btn:hover { background: rgba(26,22,20,.06); }
.bill-actions .btn-primary {
  background: var(--chili); border-color: var(--chili); color: #fff;
  box-shadow: 0 6px 16px rgba(255,84,54,.3);
}
.bill-actions .btn-primary:hover { background: var(--chili-dp); border-color: var(--chili-dp); }

/* Order cards on the counter screen */
.order-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 15px; cursor: pointer; text-align: left; font: inherit; width: 100%;
  display: flex; gap: 12px; align-items: center;
}
.order-card:hover { border-color: var(--ember); }
.order-card.on { border-color: var(--flame); box-shadow: 0 0 0 2px var(--tint); }
.order-card .grow { flex: 1; min-width: 0; }
.order-card b { font-size: 14.5px; }
.order-card .meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.order-list { display: grid; gap: 9px; }

/* Connection banner */
.offline-bar {
  background: var(--warn-bg); border-bottom: 1px solid #F0DDB8; color: #7A4B02;
  padding: 9px 24px; font-size: 13.5px; font-weight: 550;
  display: flex; align-items: center; gap: 9px;
}
.offline-bar .dot { background: var(--warn); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }

.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay-grid button {
  padding: 14px 8px; border: 1px solid var(--line); background: var(--ash-2);
  border-radius: var(--r-sm); font: inherit; font-weight: 600; cursor: pointer; font-size: 14px;
  color: var(--cream);
}
.pay-grid button:hover { background: #423C31; }
.pay-grid button.on { border-color: var(--saffron); background: rgba(255,176,32,.16); color: #FFC24D; }

.cash-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cash-quick button {
  padding: 7px 12px; border: 1px solid var(--line); background: var(--ash-2);
  border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer;
  font-variant-numeric: tabular-nums; color: var(--cream);
}
.cash-quick button:hover { background: #423C31; }

@media (max-width: 980px) {
  .pos { flex-direction: column; }
  .pos-right { width: 100%; position: static; }
  .bill-lines { max-height: none; }
}

/* ═══════════════════════════════════════════════════════════
   REFINEMENTS — scrollbars, file upload, and small details
   that stop the interface looking like a raw browser default
   ═══════════════════════════════════════════════════════════ */

/* ── Scrollbars ─────────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }

.sidebar { scrollbar-color: var(--sidebar-mute) transparent; }
.sidebar ::-webkit-scrollbar-thumb { background: var(--sidebar-mute); background-clip: content-box; }

/* Scrollable regions get a soft fade so cut-off content reads as scrollable */
.bill-lines, .cat-tabs, .table-wrap { scroll-behavior: smooth; }
.cat-tabs { scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { height: 0; }

/* ── File upload ────────────────────────────────────────── */
.uploader {
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  background: var(--line-soft);
  padding: 18px;
  display: flex; align-items: center; gap: 15px;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}
.uploader:hover, .uploader:focus-within { border-color: var(--ember); background: var(--ember-lt); }
.uploader.dragging { border-color: var(--ember); background: var(--ember-lt); border-style: solid; }
.uploader input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.uploader .thumb {
  width: 58px; height: 58px; border-radius: 12px; flex: none;
  background: var(--white); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.uploader .thumb img { width: 100%; height: 100%; object-fit: contain; }
.uploader .thumb svg { width: 22px; height: 22px; color: var(--ink-3); }
.uploader .up-text { flex: 1; min-width: 0; }
.uploader .up-text b { display: block; font-size: 14px; }
.uploader .up-text span { font-size: 12.5px; color: var(--ink-2); }
.uploader .up-text .fname {
  display: block; font-size: 12.5px; color: var(--flame); font-weight: 550;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}

/* ── Colour picker ──────────────────────────────────────── */
.swatch { display: flex; align-items: center; gap: 10px; }
.swatch input[type=color] {
  -webkit-appearance: none; appearance: none;
  width: 46px; height: 42px; padding: 0; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: none; cursor: pointer; flex: none;
}
.swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 4px; }
.swatch input[type=color]::-webkit-color-swatch { border: none; border-radius: 5px; }
.swatch input[type=color]::-moz-color-swatch { border: none; border-radius: 5px; }
.swatch .hexbox { flex: 1; font-family: var(--mono); text-transform: uppercase; }

.theme-preview {
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 14px;
}
.theme-preview .tp-bar {
  padding: 11px 14px; display: flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, var(--sidebar-top), var(--sidebar-btm));
  color: #fff; font-size: 13px; font-weight: 600;
}
.theme-preview .tp-body { padding: 14px; background: var(--cream); display: flex; gap: 9px; align-items: center; }

/* ── Select: replace the browser arrow ──────────────────── */
select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C7A72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 34px;
}
select::-ms-expand { display: none; }

/* ── Number inputs: hide the spinner, we use big touch targets ── */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

/* ── Date inputs ────────────────────────────────────────── */
input[type=date] {
  -webkit-appearance: none; appearance: none;
  font-variant-numeric: tabular-nums;
}
input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .5; }
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* ── Skeleton loading, instead of the word "Loading" ────── */
.skel { display: grid; gap: 10px; padding: 18px; }
.skel i {
  display: block; height: 13px; border-radius: 5px;
  background: linear-gradient(90deg, var(--line-soft) 25%, var(--bun) 50%, var(--line-soft) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
.skel i:nth-child(2) { width: 82%; }
.skel i:nth-child(3) { width: 65%; }
.skel i:nth-child(4) { width: 90%; }
.skel i:nth-child(5) { width: 55%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ── Section heading used between cards ─────────────────── */
.section-h {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 12px; font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 650;
}
.section-h::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ── Error banner shown if a script fails ───────────────── */
.js-fault {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 400;
  max-width: 560px; width: calc(100% - 32px);
  background: var(--danger); color: #fff; padding: 13px 16px; border-radius: var(--r);
  box-shadow: var(--shadow-3); font-size: 13.5px;
}
.js-fault b { display: block; margin-bottom: 3px; }
.js-fault code { font-family: var(--mono); font-size: 12px; opacity: .85; word-break: break-word; }

/* ── Nicer empty and stat states ────────────────────────── */
.empty svg { width: 34px; height: 34px; color: var(--ink-3); margin-bottom: 10px; opacity: .55; }
.stat .v { font-variant-numeric: tabular-nums; }

/* ── Tiles get a subtle press feel on touch ─────────────── */
.tile, .btn, .order-card, .pay-grid button, .pinpad button { -webkit-tap-highlight-color: transparent; }

/* ── Sticky table headers inside scroll areas ───────────── */
.table-wrap { max-height: none; }
.table-wrap.tall { max-height: 62vh; overflow-y: auto; }
.table-wrap.tall thead th { position: sticky; top: 0; background: var(--white); z-index: 2; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — real app feel on phones and tablets
   Breakpoints:
     > 1024   full desktop (sidebar + side-by-side bill)
     641-1024 tablet: sidebar stays, bill stacks under items
     <= 640   phone: sidebar becomes a drawer, bottom nav appears,
              order screen gets a sticky checkout bar
   ═══════════════════════════════════════════════════════════ */
/* Touch devices: bigger tap targets, no iOS zoom on focus */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  select, input[type=text], input[type=password],
  input[type=number], input[type=date], textarea {
    min-height: 44px; font-size: 16px;
  }
  .nav a { padding: 12px; }
  .toggle .track { width: 46px; height: 27px; }
}

/* ═══ TABLET & DESKTOP (>= 640px): standard POS view ═══
   Items grid on the left, fixed cart panel on the right. This is the
   default layout above, so here we only widen the item grid on tablets. */
@media (min-width: 640px) and (max-width: 1024px) {
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .pos-right { width: 320px; }
}

/* ═══ MOBILE (< 640px): single-column compact list + cart drawer ═══ */
@media (max-width: 639px) {

  /* Sidebar becomes a slide-in drawer */
  .sidebar {
    position: fixed; z-index: 60; left: 0; top: 0;
    width: 82vw; max-width: 320px; height: 100vh;
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow-3); }
  .scrim { position: fixed; inset: 0; background: rgba(36,23,19,.45); z-index: 55; }

  .topbar { padding: 11px 15px; gap: 12px; }
  .topbar h1 { font-size: 17px !important; }
  .menu-toggle { display: grid; }
  .page { padding: 14px 14px calc(70px + env(safe-area-inset-bottom)); }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .row { flex-direction: column; gap: 0; }
  .row > * { margin-bottom: 14px; }
  .row > *:last-child { margin-bottom: 0; }

  /* ── Category pills: horizontal scroll strip ── */
  .cat-tabs {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 0 -14px 12px; padding: 0 14px 10px; gap: 8px;
    scrollbar-width: none;
  }
  .cat-tabs::-webkit-scrollbar { height: 0; }
  .cat-tabs button { flex: 0 0 auto; padding: 9px 16px; font-size: 14px; }

  /* ── SINGLE-COLUMN item list ── */
  .item-grid { display: flex; flex-direction: column; gap: 8px; }
  .tile {
    flex-direction: row; align-items: center; gap: 12px;
    width: 100%; min-height: 0; padding: 12px 14px;
    position: relative;
  }
  .tile .tag {
    position: absolute; top: 8px; left: 14px;
    font-size: 9px; padding: 1px 6px;
  }
  .tile-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
  .tile .nm { font-size: 14.5px; font-weight: 600; line-height: 1.25; }
  .tile .cat {
    display: block; font-size: 11.5px; color: var(--ink-3);
    text-transform: uppercase; letter-spacing: .03em;
  }
  .tile .pr { font-size: 15px; font-weight: 700; flex: none; white-space: nowrap; }
  /* Big touch-friendly + button on the right */
  .tile .tile-add {
    display: grid; place-items: center; flex: none;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--flame); color: var(--on-flame);
    font-size: 26px; font-weight: 400; line-height: 1;
  }
  .tile:active .tile-add { transform: scale(.92); }
  /* Combos need room for the tag above the name */
  .tile:has(.tag) { padding-top: 22px; }

  /* ── Floating cart bar: [ N items | total | View cart ] ── */
  .cart-bar { display: none; }
  .cart-bar.has-items {
    display: flex; align-items: center; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 46;
    background: var(--flame); color: var(--on-flame);
    padding: 13px 16px calc(13px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 22px rgba(36,23,19,.18);
    cursor: pointer; border: 0; font: inherit;
  }
  .cart-bar-count { font-size: 14px; }
  .cart-bar-count b { font-size: 16px; }
  .cart-bar-total { flex: 1; text-align: center; font-size: 17px; font-weight: 700; }
  .cart-bar-cta {
    font-size: 14px; font-weight: 600; background: rgba(255,255,255,.2);
    padding: 8px 14px; border-radius: 10px; white-space: nowrap;
  }

  /* ── Cart as a slide-up drawer ── */
  .pos { display: block; }
  .pos-left { width: 100%; }
  .pos-right {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    width: 100%; max-height: 88vh;
    transform: translateY(100%);
    transition: transform .24s cubic-bezier(.4,0,.2,1);
  }
  body.cart-drawer-open .pos-right { transform: none; }
  .pos-right .bill {
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-height: 88vh; display: flex; flex-direction: column;
    box-shadow: 0 -8px 30px rgba(36,23,19,.22);
  }
  .drawer-handle {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px 12px; position: relative;
    border-bottom: 1px solid var(--line);
  }
  .drawer-handle .grabber {
    position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
    width: 38px; height: 4px; border-radius: 2px; background: var(--line);
  }
  .drawer-handle b { flex: 1; font-size: 15px; }
  .drawer-close {
    border: 0; background: none; font-size: 20px; color: var(--ink-3);
    cursor: pointer; width: 32px; height: 32px; line-height: 1;
  }
  .bill-lines { max-height: none; flex: 1; overflow-y: auto; }
  .bill-actions .btn { min-height: 46px; }

  .cart-scrim {
    display: none; position: fixed; inset: 0;
    background: rgba(36,23,19,.45); z-index: 65;
  }
  body.cart-drawer-open .cart-scrim { display: block; }
  /* When the cart drawer or its bar is up, hide the bottom nav */
  body.checkout-open .bottom-nav,
  body.cart-drawer-open .bottom-nav { display: none; }

  /* Modals become full-width bottom sheets */
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal {
    max-width: none !important; width: 100%; margin: 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-height: 92vh; display: flex; flex-direction: column;
    animation: sheet-up .22s cubic-bezier(.4,0,.2,1);
  }
  .modal-head { padding: 20px 18px 16px; position: relative; }
  .modal-head::before {
    content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
    width: 38px; height: 4px; border-radius: 2px; background: var(--line);
  }
  .modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
  .modal-foot {
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    position: sticky; bottom: 0;
  }
  .modal-foot .btn { flex: 1; min-height: 46px; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tbl { min-width: 480px; }
  .pay-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 18px; }
}

/* ── Bottom navigation (phones only) ── */
.bottom-nav { display: none; }
@media (max-width: 639px) {
  .bottom-nav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 44;
    background: var(--white);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 18px rgba(36,23,19,.08);
  }
  .bottom-nav a, .bottom-nav button {
    flex: 1; border: 0; background: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 9px 4px 8px; text-decoration: none;
    color: var(--ink-3); font-size: 11px; font-weight: 550;
    font-family: inherit;
  }
  .bottom-nav a svg, .bottom-nav button svg { width: 21px; height: 21px; }
  .bottom-nav a.on { color: var(--flame); }
  .bottom-nav a.on svg { stroke: var(--flame); }
  .bottom-nav a:active, .bottom-nav button:active { background: var(--line-soft); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .sidebar, .topbar, .bottom-nav, .checkout-bar, .btn { display: none !important; }
  body { background: #fff; }
}

/* ═══════════════════════════════════════════════════════════
   LOW-POWER MODE — for entry-level POS terminals (Celeron N97
   and similar). Turned on by <html class="lite">, set very
   early by a tiny script so the first paint is already light.
   Keeps the look, drops the effects a weak GPU struggles with.
   ═══════════════════════════════════════════════════════════ */
html.lite * {
  /* No blur — the single biggest GPU cost on weak chips */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.lite .modal-bg { backdrop-filter: none !important; }

/* Flatten heavy shadows to cheap 1px borders */
html.lite .card,
html.lite .modal,
html.lite .tile,
html.lite .checkout-bar,
html.lite .bottom-nav,
html.lite .topbar {
  box-shadow: none !important;
}
html.lite .card { border: 1px solid var(--line); }

/* Stop always-running animations that keep the CPU awake */
html.lite .offline-bar .dot { animation: none !important; }
html.lite .skel i { animation: none !important; background: var(--line-soft) !important; }

/* Shorten one-off transitions so taps feel instant, not laggy */
html.lite * {
  transition-duration: .08s !important;
  animation-duration: .12s !important;
}

/* Simpler login background — the layered radial gradients are costly */
html.lite .auth-brand { background: #161311 !important; }
html.lite .auth-brand::after { display: none; }
html.lite .auth-brand,
html.lite .auth-form-wrap { background-image: none !important; }
