/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #f9f8f5;
  --surface-3: #efede8;
  --border: rgba(11, 11, 11, 0.1);
  --border-strong: rgba(11, 11, 11, 0.18);
  --text: #1b1a18;
  --text-2: #52514e;
  --muted: #7d7a73;
  --accent: #7a4a2b;
  --accent-hover: #653b20;
  --accent-ink: #ffffff;
  --accent-soft: #f4ebe3;
  --good: #006300;
  --good-soft: #e5f4e5;
  --warn: #8a5a00;
  --warn-soft: #fdf1d6;
  --bad: #b8302f;
  --bad-soft: #fbe9e8;
  --info-soft: #e8f0fb;
  --series-1: #2a78d6;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.18);
  --radius: 10px;
  --radius-sm: 7px;
  --nav-w: 232px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0f0e;
    --surface: #1a1a19;
    --surface-2: #20201e;
    --surface-3: #2a2a27;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #f4f3ef;
    --text-2: #c3c2b7;
    --muted: #8f8c84;
    --accent: #d29a6c;
    --accent-hover: #e0ad83;
    --accent-ink: #1a1a19;
    --accent-soft: #3a2a1f;
    --good: #2fbf2f;
    --good-soft: #15301a;
    --warn: #f0b33a;
    --warn-soft: #362a10;
    --bad: #f06b6a;
    --bad-soft: #3a1b1b;
    --info-soft: #182638;
    --series-1: #3987e5;
    --grid: #2c2c2a;
    --axis: #383835;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0e;
  --surface: #1a1a19;
  --surface-2: #20201e;
  --surface-3: #2a2a27;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f3ef;
  --text-2: #c3c2b7;
  --muted: #8f8c84;
  --accent: #d29a6c;
  --accent-hover: #e0ad83;
  --accent-ink: #1a1a19;
  --accent-soft: #3a2a1f;
  --good: #2fbf2f;
  --good-soft: #15301a;
  --warn: #f0b33a;
  --warn-soft: #362a10;
  --bad: #f06b6a;
  --bad-soft: #3a1b1b;
  --info-soft: #182638;
  --series-1: #3987e5;
  --grid: #2c2c2a;
  --axis: #383835;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button.link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; }
button.link:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 17px; font-weight: 620; }
h3 { font-size: 15px; font-weight: 620; }
p { margin: 0 0 8px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.nav {
  width: var(--nav-w);
  flex: none;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 700; flex: none;
}
.brand-name { font-weight: 650; font-size: 15px; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--muted); }
.nav-group { padding: 6px 10px; }
.nav-group-title { font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2);
  font-weight: 500; text-decoration: none;
}
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav a svg { flex: none; }
.nav-foot { margin-top: auto; padding: 12px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-weight: 600; font-size: 16px; }
.menu-btn { display: none; }
.content { padding: 20px; max-width: 1400px; width: 100%; }
.content.full { max-width: none; padding: 0; flex: 1; display: flex; min-height: 0; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 2px; font-size: 14px; }
.scrim { display: none; }

/* The sidebar becomes a drawer on tablets and phones so the till gets the full width. */
@media (max-width: 1100px) {
  .nav { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: var(--shadow-lg); }
  .nav.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 55; }
  .menu-btn { display: inline-flex; }
  .content { padding: 14px 16px; }
  .topbar { padding: 0 12px; }
}

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 0; }
.card-head + .card-body { padding-top: 10px; }
.card-body { padding: 16px; }
.grid { display: grid; gap: 14px; }
.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)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* two-column editor that stacks on narrow screens */
.editor-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; }
@media (max-width: 1000px) { .editor-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- stat tiles ---------- */
.stat { padding: 14px 16px; }
.stat-label { font-size: 13px; color: var(--text-2); }
.stat-value { font-size: 26px; font-weight: 650; margin-top: 4px; letter-spacing: -0.01em; }
.stat-value.hero { font-size: 34px; }
.stat-sub { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  border-radius: var(--radius-sm); padding: 0 14px; height: 38px; font: inherit; font-weight: 550; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; user-select: none;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 50px; font-size: 17px; padding: 0 20px; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.block { width: 100%; }
.btn-group { display: inline-flex; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button {
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 550; padding: 6px 12px;
  border-radius: 7px; cursor: pointer; white-space: nowrap; flex: none;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span.label { font-size: 13px; font-weight: 550; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  height: 38px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: var(--radius-sm);
  padding: 0 10px; font: inherit; width: 100%; min-width: 0;
}
textarea.input { height: auto; min-height: 70px; padding: 8px 10px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input.sm { height: 32px; font-size: 14px; }
.input.num { text-align: right; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.input-wrap > .input { padding-left: 34px; }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .form-grid .span-2 { grid-column: auto; } }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .input { width: auto; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
  padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface);
}
.table th.num { text-align: right; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: var(--surface-2); }
.table tfoot td { font-weight: 650; border-top: 1px solid var(--border-strong); border-bottom: 0; }
.table .sortable { cursor: pointer; user-select: none; }
.table .sortable:hover { color: var(--text); }
.table td.actions { text-align: right; white-space: nowrap; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--series-1); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  border: 0; background: none; font: inherit; font-weight: 550; color: var(--text-2); padding: 10px 12px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center;
}
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(15, 12, 10, 0.45); z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fade 0.12s ease;
}
.modal {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; animation: pop 0.14s ease;
}
.modal:focus { outline: none; }
.modal.wide { max-width: 820px; }
.modal.xwide { max-width: 1060px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@media (max-width: 600px) {
  .modal-back { padding: 0; align-items: flex-end; }
  .modal, .modal.wide, .modal.xwide { max-width: none; border-radius: 14px 14px 0 0; max-height: 94vh; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  background: #1f1d1b; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
  display: flex; gap: 8px; align-items: center; animation: pop 0.16s ease; pointer-events: auto;
}
.toast.bad { background: #9b2423; }
.toast.good { background: #1d5e22; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty h3 { color: var(--text-2); margin-bottom: 4px; }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
.loading { display: flex; justify-content: center; padding: 40px; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--info-soft); color: var(--text); }
.alert.good { background: var(--good-soft); color: var(--good); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.secret {
  font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--surface-3); padding: 10px 12px; border-radius: 8px;
  word-break: break-all; user-select: all;
}
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 50;
}
.dropdown-menu button, .dropdown-menu .mi {
  display: flex; width: 100%; text-align: left; border: 0; background: none; font: inherit; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--text); gap: 8px; align-items: center;
}
.dropdown-menu button:hover { background: var(--surface-3); }
.chip {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 6px 14px;
  font: inherit; font-size: 14px; font-weight: 550; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.perm-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.perm-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 8px; }
.method { font-family: ui-monospace, Menlo, monospace; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--surface-3); }
.method.GET { color: var(--series-1); }
.method.POST { color: var(--good); }
.method.PUT { color: var(--warn); }
.method.DELETE { color: var(--bad); }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .base-line { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--series-1); transition: opacity 0.1s; }
.chart .bar.dim { opacity: 0.45; }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.tip {
  position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  border-radius: 8px; padding: 7px 10px; font-size: 13px; white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 10px));
}
.tip strong { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.tip span { color: var(--text-2); }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar-row { display: flex; flex-direction: column; gap: 3px; font-size: 14px; min-width: 0; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hbar-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar { height: 10px; background: var(--series-1); border-radius: 0 4px 4px 0; min-width: 2px; flex: none; }
.hbar-val { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }

/* ---------- POS ---------- */
.pos { display: flex; flex: 1; min-height: 0; min-width: 0; height: calc(100vh - 56px); }
.pos-left { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pos-toolbar { display: flex; gap: 8px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); align-items: center; }
.pos-toolbar .input-wrap { flex: 1; }
.pos-toolbar .input { height: 44px; font-size: 16px; }
.pos-toolbar .btn { height: 44px; }
.cats { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--surface); scrollbar-width: none; }
.products { flex: 1; overflow-y: auto; padding: 14px 16px 90px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-content: start; }
.tile {
  position: relative; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 10px 12px 12px; min-height: 112px; height: auto;
  cursor: pointer; display: flex; flex-direction: column; gap: 3px; font: inherit; color: var(--text); transition: transform 0.06s, box-shadow 0.12s;
  border-top: 4px solid var(--cat, var(--border-strong));
}
.tile:hover { box-shadow: var(--shadow); }
.tile:active { transform: scale(0.98); }
.tile-name { font-weight: 600; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-meta { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; }
.tile-price { font-weight: 650; font-size: 15px; }
.tile-sku { font-size: 11px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.tile.out { opacity: 0.6; }
.tile .qty-badge { position: absolute; top: 8px; right: 8px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; min-width: 22px; height: 22px; font-size: 12px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.cart { width: 400px; flex: none; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.cart-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.cart-lines { flex: 1; overflow-y: auto; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.cart-line-name { font-weight: 600; font-size: 14px; }
.cart-line-sub { font-size: 12px; color: var(--muted); }
.cart-line-total { font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.stepper button { width: 34px; height: 32px; border: 0; background: var(--surface-2); font-size: 18px; cursor: pointer; color: var(--text); }
.stepper button:hover { background: var(--surface-3); }
.stepper input { width: 44px; height: 32px; border: 0; text-align: center; font: inherit; font-weight: 650; background: var(--surface); color: var(--text); }
.cart-totals { padding: 12px 14px; border-top: 1px solid var(--border); font-size: 14px; display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); }
.cart-totals .t-row { display: flex; justify-content: space-between; gap: 8px; }
.cart-totals .t-total { font-size: 22px; font-weight: 700; margin-top: 4px; }
.cart-actions { padding: 12px 14px; display: flex; gap: 8px; border-top: 1px solid var(--border); }
.cart-actions .grow { flex: 1; }
.cart-line-name.link { font-weight: 600; font-size: 14px; color: var(--text); text-decoration: underline dotted; text-underline-offset: 3px; }
.cart-line-opts { font-size: 13px; color: var(--accent); font-weight: 550; }
.tile-opt { color: var(--accent); font-family: var(--font); font-weight: 600; }
.adv-summary { text-align: left; border: 1.5px dashed var(--accent); background: var(--accent-soft); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.suggest { position: relative; }
.suggest-list { position: absolute; top: calc(100% + 4px); left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 40; padding: 4px; }
.suggest-list button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: none; padding: 7px 9px; border-radius: 7px; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.suggest-list button:hover { background: var(--surface-3); }
.cart-bar { display: none; }
.cart-close { display: none; }
@media (max-width: 1100px) { .cart { width: 340px; } }
@media (max-width: 900px) {
  .pos { height: calc(100vh - 56px); }
  .cart { position: fixed; inset: 0; width: auto; z-index: 70; transform: translateY(100%); transition: transform 0.2s ease; border-left: 0; }
  .cart.open { transform: none; }
  .cart-close { display: inline-flex; }
  .cart-bar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; background: var(--accent); color: var(--accent-ink); border: 0;
    border-radius: 14px; padding: 14px 18px; font: inherit; font-weight: 650; font-size: 16px; justify-content: space-between; box-shadow: var(--shadow-lg); cursor: pointer;
  }
  .products { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
}
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.pay-method { height: 56px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); font: inherit; font-weight: 650; cursor: pointer; color: var(--text); text-transform: uppercase; letter-spacing: 0.03em; }
.pay-method.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.quick-cash { display: flex; gap: 6px; flex-wrap: wrap; }
.due { font-size: 34px; font-weight: 700; text-align: center; letter-spacing: -0.01em; }
.scanner-view { width: 100%; min-height: 240px; background: #000; border-radius: 10px; overflow: hidden; }
.scanner-view video { width: 100% !important; height: auto !important; display: block; }

@media (max-width: 600px) { .hide-sm { display: none; } }

/* ---------- sale options ---------- */
.opt-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-choice { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 104px; padding: 10px 14px; border: 1.5px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.opt-choice.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.opt-price { font-size: 12px; font-weight: 600; color: var(--text-2); }
.opt-choice.on .opt-price { color: var(--accent); }
.opt-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.opt-rows { display: flex; flex-direction: column; gap: 6px; }
.opt-row { display: flex; flex-direction: column; }
.opt-recipe { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px 12px; padding: 8px; border-left: 2px solid var(--accent); background: var(--surface); border-radius: 0 8px 8px 0; }
.input-prefix { position: absolute; left: 8px; font-size: 12px; color: var(--muted); pointer-events: none; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tables (floor) ---------- */
.floor { display: grid; gap: 12px; }
.floor-gap { min-height: 112px; border: 1px dashed var(--border); border-radius: 12px; opacity: 0.45; }
.table-card { min-height: 112px; border: 1.5px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; padding: 10px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; min-width: 0; transition: transform 0.06s; }
.table-card:active { transform: scale(0.98); }
.table-card .table-name { font-size: 20px; font-weight: 700; }
.table-card .table-total { font-size: 17px; font-weight: 700; }
.table-card.busy { background: var(--accent-soft); border-color: var(--accent); }
.table-card.ready { box-shadow: inset 0 0 0 2px var(--good); }
.legend-free { border: 1.5px solid var(--border-strong); background: var(--surface); }
.legend-busy { background: var(--accent-soft); border: 1.5px solid var(--accent); }
.legend-ready { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--good); }
.table-grid-edit { display: grid; gap: 6px; }
.table-grid-edit .input { text-align: center; padding: 0 4px; }
.table-grid-edit .input.filled { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
@media (max-width: 700px) { .floor { gap: 8px; } .table-card, .floor-gap { min-height: 92px; } .table-card .table-name { font-size: 17px; } }

/* ---------- advance orders ---------- */
.day-title { font-size: 16px; margin: 6px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.adv-card { display: flex; gap: 14px; padding: 12px 14px; align-items: flex-start; }
.adv-card.overdue { border-color: var(--bad); }
.adv-time { width: 92px; flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.adv-clock { font-size: 18px; font-weight: 700; }
.adv-money { text-align: right; flex: none; }
@media (max-width: 640px) { .adv-card { flex-wrap: wrap; } .adv-money { width: 100%; text-align: left; } .adv-money .row.end { justify-content: flex-start; } }

/* ---------- kitchen display ---------- */
.kds { display: flex; flex-direction: column; gap: 12px; min-height: calc(100vh - 100px); }
.kds-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kds-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; flex: 1; align-items: start; }
/* Each column scrolls on its own so a busy one doesn't push the others down. */
.kds-col { background: var(--surface-3); border-radius: 12px; padding: 10px; min-height: 300px; max-height: calc(100vh - 150px);
  display: flex; flex-direction: column; }
.kds-col .kds-list { overflow-y: auto; min-height: 0; padding-bottom: 2px; }
.kds-list > * { flex-shrink: 0; }
.kiosk .kds-col { max-height: calc(100vh - 90px); }
.kds-tabs { display: none; }
.kds-tabs .tabs { margin-bottom: 0; overflow-y: hidden; }
.kds-live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.kds-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.kds-live.off { color: var(--bad); font-weight: 600; }
.kds-live.off .dot { background: var(--bad); }
.ticket.pending { opacity: 0.6; }
.ticket-addon { display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--surface); }
.ticket-flag { display: flex; align-items: center; gap: 5px; padding: 0 12px 6px; font-size: 13px; font-weight: 700; color: var(--warn); }
.ticket-others { padding: 0 12px 6px; font-size: 13px; color: var(--text-2); }
.kds-col h2 { display: flex; align-items: center; gap: 8px; margin: 2px 4px 10px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); }
.kds-count { background: var(--surface); border-radius: 999px; padding: 1px 9px; font-size: 13px; color: var(--text); }
.kds-list { display: flex; flex-direction: column; gap: 10px; }
.kds-empty { color: var(--muted); text-align: center; padding: 30px 0; font-size: 14px; }
.kds-empty .small { margin-top: 4px; }
.kds-done { padding-top: 4px; }
.ticket { background: var(--surface); border-radius: 12px; border: 1px solid var(--border); border-top: 6px solid var(--series-1); box-shadow: var(--shadow); overflow: hidden; }
.ticket.t-warn { border-top-color: #e0a100; }
.ticket.t-warn .ticket-clock { color: var(--warn); }
.ticket.t-late { border-top-color: var(--bad); }
.ticket.t-late .ticket-clock { color: var(--bad); }
.ticket.t-scheduled { border-top-color: var(--accent); }
.ticket.t-cancelled { opacity: 0.6; border-top-color: var(--muted); }
.ticket.t-cancelled .ticket-items { text-decoration: line-through; }
.ticket header { display: flex; justify-content: space-between; align-items: flex-start; padding: 10px 12px 6px; }
.ticket-token { font-size: 24px; font-weight: 800; line-height: 1; }
.ticket-sub { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.ticket-clock { font-weight: 700; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ticket-who { padding: 0 12px 6px; font-size: 13px; color: var(--accent); font-weight: 600; }
.ticket-items { list-style: none; margin: 0; padding: 4px 12px 10px; display: flex; flex-direction: column; gap: 7px; border-top: 1px dashed var(--border); padding-top: 8px; }
.ticket-items li { display: flex; gap: 10px; align-items: flex-start; }
.ticket-qty { font-size: 18px; font-weight: 800; min-width: 28px; text-align: right; }
.ticket-name { font-size: 16px; font-weight: 650; line-height: 1.25; }
.ticket-opts { font-size: 14px; color: var(--accent); font-weight: 600; }
.ticket-note { font-size: 14px; color: var(--warn); font-weight: 700; }
.ticket-items li.cancel { color: var(--bad); }
.ticket-items li.cancel .ticket-name { text-decoration: line-through; }
.ticket footer { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); background: var(--surface-2); }
.ticket footer .grow { flex: 1; height: 44px; font-size: 16px; }
/* Phones and portrait tablets: one column at a time, picked with tabs. */
@media (max-width: 900px) {
  .kds-cols { grid-template-columns: minmax(0, 1fr); }
  .kds-tabs { display: block; }
  .kds-col:not(.on) { display: none; }
  .kds-col { max-height: none; }
  .kds-col h2 { display: none; }
}

/* ---------- order status board ---------- */
.board { display: flex; flex-direction: column; gap: 16px; min-height: calc(100vh - 100px); }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.board-title { font-size: 26px; font-weight: 800; }
.board-sub { color: var(--muted); }
.board-clock { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.board-cols { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 16px; flex: 1; }
.board-received .board-token { background: transparent; border: 2px dashed var(--border-strong); color: var(--text-2); }
.board-col { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.board-col h2 { font-size: 22px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin-bottom: 14px; }
.board-ready { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.board-ready h2 { color: var(--good); }
.board-tokens { display: flex; flex-wrap: wrap; gap: 14px; }
.board-token { font-size: clamp(34px, 6vw, 72px); font-weight: 800; min-width: 2.2em; text-align: center; padding: 6px 14px; border-radius: 14px; background: var(--surface-3); font-variant-numeric: tabular-nums; }
.board-ready .board-token { background: var(--surface); color: var(--good); }
.board-token.fresh { animation: pulse 1.2s ease-in-out 3; }
.board-empty { color: var(--muted); font-size: 40px; }
@keyframes pulse { 50% { transform: scale(1.08); } }
@media (max-width: 900px) { .board-cols { grid-template-columns: 1fr; } }

/* ---------- kiosk (full screen kitchen / board) ---------- */
.kiosk { min-height: 100vh; padding: 14px; background: var(--bg); }
.kiosk .kds, .kiosk .board { min-height: calc(100vh - 28px); }
.kiosk-exit { position: fixed; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; opacity: 0.35; display: grid; place-items: center; z-index: 90; }
.kiosk-exit:hover { opacity: 1; }
.kiosk .kds-bar, .kiosk .board-head { padding-right: 44px; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; padding: 28px; }
.login-card .brand-mark { width: 48px; height: 48px; font-size: 20px; border-radius: 12px; margin-bottom: 14px; }

/* ---------- receipt (print) ---------- */
#print-area { display: none; }
.receipt { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: #000; width: 72mm; padding: 2mm; line-height: 1.35; }
.receipt .c { text-align: center; }
.receipt .b { font-weight: 700; }
.receipt .big { font-size: 15px; }
.receipt .hr { border-top: 1px dashed #000; margin: 4px 0; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 1px 0; vertical-align: top; }
.receipt td.r { text-align: right; white-space: nowrap; padding-left: 6px; }
.receipt .row-b { display: flex; justify-content: space-between; }
.receipt.kot .big { font-size: 17px; }
.receipt .kot-line { margin: 4px 0; }
.receipt .kot-line.cancel { text-decoration: line-through; }
.receipt-preview { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px; display: flex; justify-content: center; }
@media print {
  @page { margin: 0; size: 80mm auto; }
  body { background: #fff; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; }
}

/* ---------- report downloads (export.js) ---------- */
.dl-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-option { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.dl-option:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.dl-option:disabled { opacity: 0.6; cursor: progress; }
.dl-option svg { color: var(--accent); flex: none; margin-top: 2px; }
.dl-option > span { display: flex; flex-direction: column; gap: 2px; }
.dl-head { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 6px; }
.dl-list { border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 300px; overflow: auto; }
.dl-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 14px; }
.dl-row:first-child { border-top: 0; }
@media (max-width: 560px) { .dl-options { grid-template-columns: 1fr; } }

/* A4 report printout: always black on white, whatever the theme. */
.print-report { font: 10px/1.35 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #000; background: #fff; }
.print-report header { border-bottom: 1.5px solid #000; padding-bottom: 6px; }
.print-report .pr-biz { font-weight: 700; font-size: 12px; }
.print-report h1 { font-size: 17px; margin: 2px 0; }
.print-report .pr-sub, .print-report .pr-note { color: #444; }
.print-report section { margin-top: 12px; }
.print-report h2 { font-size: 12px; margin: 0 0 1px; break-after: avoid; }
.print-report .pr-note { font-size: 9px; margin-bottom: 3px; break-after: avoid; }
.print-report table { width: 100%; border-collapse: collapse; }
.print-report .pr-kv table { width: auto; min-width: 55%; }
.print-report .pr-kv .num { text-align: left; }
.print-report th, .print-report td { text-align: left; padding: 2px 5px; border-bottom: 0.5px solid #ccc; vertical-align: top; }
.print-report th { border-bottom: 1px solid #000; font-weight: 600; }
.print-report .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.print-report thead { display: table-header-group; }
.print-report tr { break-inside: avoid; }
.print-report tfoot td { font-weight: 700; border-top: 1px solid #000; border-bottom: 0; }

/* ---------- round 3: cart adjustments, PINs, attachments, offers, void ---------- */
.suggest-list button.hi { background: var(--accent-soft); }
.cart-adjust { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.cart-adjust .chip { padding: 4px 11px; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.cart-adjust .chip:disabled { opacity: 0.45; cursor: default; }
.chip-select { appearance: none; -webkit-appearance: none; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; }
.cart-totals .t-row.good { color: var(--good); }
.cart-totals .t-row.warn { color: var(--warn); }
/* Totals row label that opens an editor (discount, charge amount). */
.t-link { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left;
  text-decoration: underline dotted; text-underline-offset: 3px; }
.t-link:hover { color: var(--accent); }
.x-btn { border: 0; background: none; color: var(--muted); font: inherit; font-size: 16px; line-height: 1; padding: 0 4px; cursor: pointer; border-radius: 4px; }
.x-btn:hover { color: var(--bad); background: var(--bad-soft); }
.chip .x-btn { color: inherit; opacity: 0.7; }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; }
.pin-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pin-user { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 6px; font: inherit; color: var(--text); cursor: pointer; text-align: center; }
.pin-user:hover { border-color: var(--accent); background: var(--accent-soft); }
.pinpad { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pin-dots { display: flex; gap: 10px; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); }
.pin-dots span.on { background: var(--text); border-color: var(--text); }
.pin-dots span.opt { border-style: dashed; opacity: 0.5; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 64px); gap: 10px; }
.pin-key { height: 56px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); font: inherit; font-size: 22px; font-weight: 600; color: var(--text); cursor: pointer; }
.pin-key:hover:not(:disabled) { background: var(--surface-3); }
.pin-key:active:not(:disabled) { transform: scale(0.96); }
.pin-key.ok { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pin-key:disabled { opacity: 0.4; cursor: default; }

.att-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.att-chip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; background: var(--surface); max-width: 260px; }
.att-chip .link { display: inline-flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13px; }
.att-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 5px; border-radius: 50%; }
.att-x:hover { color: var(--bad); background: var(--bad-soft); }
.att-view { display: block; max-width: 100%; max-height: 75vh; margin: 0 auto; border-radius: 8px; }
.ticket .att-chip { font-size: 14px; }

/* Floats over the page: it disappears on the first tap, and if it took up space
   the page would jump mid-tap and the tapped button would miss the click. */
.sound-banner { position: fixed; z-index: 80; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 8px; justify-content: center; border: 1.5px dashed var(--warn); background: var(--warn-soft);
  color: var(--text); border-radius: 10px; padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); }
.board-token { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.board-token small { font-size: clamp(12px, 1.4vw, 18px); font-weight: 600; color: var(--muted); margin-top: 2px; }
.board-token.name { font-size: clamp(26px, 3.6vw, 46px); }

.charge-row { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.table tr.voided td { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 70%, transparent); }
.table tr.voided td:last-child, .table tr.voided td:nth-last-child(2) { text-decoration: none; }

/* Void: a "cancelled cheque" look — diagonal stamp and struck-through lines. */
.receipt { position: relative; }
.receipt.void .items td, .receipt.void .items + .hr + table td { text-decoration: line-through; }
.receipt .void-stamp {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); z-index: 2; pointer-events: none;
  border: 4px double #c62828; color: #c62828; font: 800 30px/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0.12em;
  padding: 6px 14px; border-radius: 6px; background: rgba(255, 255, 255, 0.55); white-space: nowrap;
}
.receipt.void::before, .receipt.void::after {
  content: ''; position: absolute; left: 4%; right: 4%; top: 18%; bottom: 18%; pointer-events: none; z-index: 1;
  background: linear-gradient(to top right, transparent calc(50% - 1px), rgba(198, 40, 40, 0.55) 50%, transparent calc(50% + 1px));
}
.receipt.void::after { background: linear-gradient(to top left, transparent calc(50% - 1px), rgba(198, 40, 40, 0.55) 50%, transparent calc(50% + 1px)); }
.receipt .small { font-size: 11px; }
@media print {
  .receipt .void-stamp { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .receipt.void::before, .receipt.void::after { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- members, wallets and app orders ---------- */
.input-suffix { position: absolute; right: 8px; font-size: 12px; color: var(--muted); pointer-events: none; }
.member-strip { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.member-strip .btn.sm { height: 26px; padding: 0 8px; flex: none; }
.pay-method small { display: block; font-size: 12px; font-weight: 550; letter-spacing: 0; text-transform: none; color: var(--text-2); }
.pay-method.on small { color: inherit; }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.topbar .nav-count { margin-left: 4px; }
.ticket-app { display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 999px; background: var(--series-1); color: #fff; }
.app-orders { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; align-items: start; }
.app-order { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-top: 5px solid var(--warn); }
.app-order.preparing { border-top-color: var(--series-1); }
.app-order.ready { border-top-color: var(--good); }
.app-order.completed, .app-order.cancelled { border-top-color: var(--border-strong); opacity: 0.85; }
.app-order header { display: flex; justify-content: space-between; gap: 8px; }
.app-order-token { font-size: 26px; font-weight: 800; line-height: 1; }
.app-order-who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.app-order-items { list-style: none; margin: 0; padding: 8px 0 0; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 5px; }
.app-order-items li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.app-order-items .ticket-qty { font-size: 15px; min-width: 22px; }
.app-order footer { padding-top: 8px; border-top: 1px solid var(--border); }
svg.qr { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.table-qr-preview { max-height: 60vh; overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.table-qr-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6mm; }
.table-qr { border: 1px dashed #999; border-radius: 4mm; padding: 4mm; display: flex; flex-direction: column; align-items: center; gap: 2mm; break-inside: avoid; color: #000; }
.table-qr-biz { font-size: 12px; font-weight: 700; text-align: center; }
.table-qr-name { font-size: 20px; font-weight: 800; }
.table-qr-hint { font-size: 10px; text-align: center; }
@media (max-width: 700px) { .table-qr-sheet { grid-template-columns: repeat(2, 1fr); } }
