/* =====================================================================
   TableBill POS — restaurant point-of-sale (front-end demo)
   Palette: charred-wood darks, saffron primary, chilli & mint status
   Type: Sora (interface) + JetBrains Mono (prices, bills, clock)
   ===================================================================== */
:root {
  --bg: #120F0C;
  --rail: #0B0907;
  --panel: #1C1814;
  --panel-2: #25201A;
  --panel-3: #2F2821;
  --line: #3A3129;
  --line-2: #2C251F;
  --text: #F6EEE4;
  --dim: #C4B6A5;
  --mute: #A09180;
  --saffron: #F5A524;
  --saffron-2: #FFC15C;
  --saffron-ink: #1A1206;
  --saffron-soft: rgba(245, 165, 36, .14);
  --chilli: #F26A55;
  --chilli-soft: rgba(242, 106, 85, .16);
  --mint: #43C98E;
  --mint-soft: rgba(67, 201, 142, .13);
  --plum: #B993F2;
  --plum-soft: rgba(185, 147, 242, .16);
  --veg: #3FC58A;
  --nonveg: #E5553F;
  --paper: #FFF8EC;
  --paper-ink: #1F1B16;
  --f-ui: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;
  --r: 18px;
  --rail-w: 96px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body {
  margin: 0; color: var(--text); font: 400 14.5px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(245, 165, 36, .10), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(242, 106, 85, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2.5px solid var(--saffron-2); outline-offset: 2px; border-radius: 8px; }
h1[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic--sm { width: 16px; height: 16px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--saffron); color: var(--saffron-ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.num, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
main { flex: 1; padding: 6px 28px 40px; outline: none; }
.view { scroll-margin-top: 600px; }

/* ---------- rail ---------- */
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 18px 10px; background: var(--rail); border-right: 1px solid var(--line-2); }
.rail__logo svg { display: block; }
.rail__nav { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.rail__nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 4px 9px; border-radius: 14px; color: var(--mute); text-decoration: none; font-size: 11.5px; font-weight: 600; transition: background .2s, color .2s; }
.rail__nav a .ic { width: 24px; height: 24px; }
.rail__nav a:hover { color: var(--text); background: var(--panel); }
.rail__nav a[aria-current="page"] { color: var(--saffron-2); background: var(--saffron-soft); }
.rail__count { position: absolute; top: 5px; right: 12px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--chilli); color: #1A0A07; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.rail__count:empty { display: none; }
.rail__foot { margin-top: auto; display: grid; gap: 12px; justify-items: center; text-align: center; }
.btn-reset { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; border: 1px dashed var(--line); background: none; color: var(--dim); border-radius: 12px; padding: 9px 6px; font-size: 10.5px; font-weight: 600; line-height: 1.25; width: 76px; }
.btn-reset:hover { color: var(--saffron-2); border-color: var(--saffron); }
.btn-reset[data-armed] { border-style: solid; border-color: var(--chilli); color: var(--chilli); background: var(--chilli-soft); }
.credit { font-size: 10.5px; color: var(--mute); line-height: 1.35; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 14px 28px; background: rgba(18, 15, 12, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); }
.outlet__name { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.outlet__meta { color: var(--dim); font-size: 12.5px; }
.top__end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.badge-demo { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; border: 1px solid rgba(245, 165, 36, .45); color: var(--saffron-2); background: var(--saffron-soft); font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-demo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--saffron); box-shadow: 0 0 0 3px rgba(245, 165, 36, .25); }
.clock { display: inline-flex; align-items: center; gap: 7px; font: 600 15px var(--f-mono); color: var(--text); padding: 7px 12px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line-2); }
.clock .ic { width: 16px; height: 16px; color: var(--saffron); }
.cashier { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--panel-3); font-weight: 700; font-size: 13px; color: var(--saffron-2); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 13px; border: 1px solid transparent; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s, transform .12s, opacity .2s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--saffron); color: var(--saffron-ink); }
.btn--primary:hover { background: var(--saffron-2); }
.btn--line { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.btn--line:hover { border-color: var(--saffron); color: var(--saffron-2); }
.btn--ghost { background: none; border-color: var(--line-2); color: var(--dim); }
.btn--ghost:hover { color: var(--chilli); border-color: var(--chilli); }
.btn--ghost[data-armed] { color: var(--chilli); border-color: var(--chilli); background: var(--chilli-soft); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel-2); display: grid; place-items: center; }
.link { color: var(--saffron-2); font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; }
.link:hover { text-decoration: underline; }

/* ---------- heads & panels ---------- */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 18px 0 18px; }
.eyebrow { color: var(--saffron-2); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
h1 { font-size: clamp(26px, 2.8vw, 34px); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.head__note { color: var(--dim); font-size: 13.5px; max-width: 46ch; text-align: right; }
.hint { color: var(--dim); margin: -6px 0 18px; font-size: 13.5px; }
.panel { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 20px; min-width: 0; }
.panel--flush { padding: 0; overflow: hidden; }
.panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel__head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.panel__sub { color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.panel__big { font: 700 15px var(--f-mono); color: var(--saffron-2); text-align: right; }
.panel__big small { display: block; font: 500 11.5px var(--f-ui); color: var(--mute); }
.panel__h3 { font-size: 13px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; margin: 22px 0 12px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 18px; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--saffron-soft), transparent 70%); }
.kpi--lead { background: linear-gradient(150deg, #3A2A12, var(--panel) 70%); border-color: rgba(245, 165, 36, .35); }
.kpi__lab { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12.5px; font-weight: 600; }
.kpi__lab .ic { width: 16px; height: 16px; color: var(--saffron); }
.kpi__num { font: 700 clamp(24px, 2.4vw, 31px)/1.1 var(--f-mono); margin-top: 12px; letter-spacing: -.02em; }
.kpi__note { color: var(--mute); font-size: 12px; margin-top: 6px; }

/* dashboard grid */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; }

/* chart */
.chart { position: relative; min-height: 230px; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--line-2); }
.chart .base { stroke: var(--line); }
.chart .tick, .chart .xl { fill: var(--mute); font: 500 11px var(--f-mono); }
.chart .xl.is-hi { fill: var(--saffron-2); font-weight: 700; }
.chart .bar path { fill: #6B4B1A; transition: fill .2s; }
.chart .bar.is-hi path { fill: var(--saffron); }
.chart .bar:hover path, .chart .bar:focus path { fill: var(--saffron-2); }
.chart .bar:focus { outline: none; }
.chart .bar .hit { fill: transparent; }
.chart .val { fill: var(--text); font: 700 12px var(--f-mono); }
.tip { position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); background: var(--paper); color: var(--paper-ink); padding: 7px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; white-space: nowrap; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .7); }
.chart-table { margin-top: 10px; font-size: 13px; color: var(--dim); }
.chart-table summary { cursor: pointer; color: var(--saffron-2); font-weight: 600; }
.chart-table table { margin-top: 8px; }
.chart-table th, .chart-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line-2); }

/* payment split */
.split__bar { display: flex; gap: 2px; height: 16px; border-radius: 6px; overflow: hidden; margin-bottom: 16px; }
.split__bar i { display: block; height: 100%; }
.split__legend { display: grid; gap: 10px; }
.split__legend li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-size: 13.5px; }
.split__legend i { width: 12px; height: 12px; border-radius: 4px; }
.split__legend .mono { color: var(--text); font-weight: 600; }
.split__legend small { color: var(--mute); font-size: 12px; min-width: 38px; text-align: right; }
.c-upi { background: var(--saffron); } .c-card { background: var(--plum); } .c-cash { background: var(--mint); }

/* top sellers */
.sellers { display: grid; gap: 10px; counter-reset: s; }
.sellers li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; counter-increment: s; }
.sellers li::before { content: counter(s); font: 700 12px var(--f-mono); color: var(--mute); }
.sellers .s-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sellers .s-bar { grid-column: 2 / -1; height: 4px; border-radius: 99px; background: var(--line-2); margin-top: -4px; }
.sellers .s-bar i { display: block; height: 100%; border-radius: 99px; background: var(--saffron); }

/* mini floor */
.mini-floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.mini { border-radius: 12px; padding: 9px 6px; text-align: center; border: 1px solid var(--line); background: var(--panel-2); font-weight: 700; font-size: 13px; text-decoration: none; display: grid; gap: 2px; }
.mini small { font: 500 10.5px var(--f-mono); color: var(--mute); }
.mini.is-occ { border-color: rgba(242, 106, 85, .6); background: var(--chilli-soft); }
.mini.is-occ small { color: #FFB4A6; }
.mini.is-bill { border-color: rgba(185, 147, 242, .6); background: var(--plum-soft); }
.mini.is-bill small { color: #DCC8FF; }
.mini:hover { border-color: var(--saffron); }

/* recent bills */
.recent { display: grid; }
.recent li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.recent li:last-child { border-bottom: 0; }
.recent b { font-weight: 600; font-size: 13.5px; }
.recent .mono { text-align: right; font-weight: 700; }
.recent small { color: var(--mute); font-size: 12px; }

/* ---------- floor plan ---------- */
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--dim); font-size: 13px; }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 11px; height: 11px; border-radius: 4px; display: inline-block; }
.dot--free { background: var(--mint); } .dot--occ { background: var(--chilli); } .dot--bill { background: var(--plum); }
.floor { display: grid; gap: 18px; }
.zone { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); padding: 18px 20px 22px; background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 18px 18px; }
.zone__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.zone__head h2 { font-size: 15px; font-weight: 700; }
.zone__head p { color: var(--mute); font-size: 12.5px; }
.zone__tables { display: flex; flex-wrap: wrap; gap: 18px 22px; align-items: center; }
.tb { display: grid; justify-items: center; gap: 5px; background: none; border: 0; padding: 4px; border-radius: 16px; }
.tb__chairs { display: flex; gap: 6px; min-height: 7px; }
.tb__chairs i { width: 20px; height: 7px; border-radius: 4px; background: var(--panel-3); }
.tb__top { position: relative; display: grid; place-content: center; gap: 2px; text-align: center; min-width: 96px; height: 76px; padding: 6px 12px; border-radius: 14px; background: var(--panel-2); border: 1.5px solid rgba(67, 201, 142, .55); transition: transform .15s, box-shadow .2s; }
.tb--2 .tb__top { min-width: 80px; border-radius: 40px; }
.tb--6 .tb__top { min-width: 150px; }
.tb--8 .tb__top, .tb--10 .tb__top { min-width: 196px; }
.tb__id { font-weight: 800; font-size: 15px; }
.tb__st { font: 500 11.5px var(--f-mono); color: var(--mint); }
.tb.is-occ .tb__top { background: var(--chilli-soft); border-color: var(--chilli); }
.tb.is-occ .tb__st { color: #FFB4A6; }
.tb.is-occ .tb__chairs i { background: #7A3A2F; }
.tb.is-bill .tb__top { background: var(--plum-soft); border-color: var(--plum); }
.tb.is-bill .tb__st { color: #DCC8FF; }
.tb.is-bill .tb__chairs i { background: #4F3F6E; }
.tb.is-sel .tb__top { box-shadow: 0 0 0 3px var(--saffron); }
.tb:hover .tb__top { transform: translateY(-2px); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; margin-top: 18px; }
.menu { min-width: 0; }
.menu__top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 260px; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mute); width: 18px; height: 18px; }
.search input { width: 100%; height: 46px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); padding: 0 14px 0 42px; }
.search input:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 3px var(--saffron-soft); }
.veg-only { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.veg-only input { accent-color: var(--veg); width: 16px; height: 16px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.cat { flex: none; border: 1px solid var(--line); background: var(--panel); color: var(--dim); padding: 9px 15px; border-radius: 99px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.cat b { font: 600 11px var(--f-mono); color: var(--mute); margin-left: 4px; }
.cat[aria-pressed="true"] { background: var(--saffron); border-color: var(--saffron); color: var(--saffron-ink); }
.cat[aria-pressed="true"] b { color: rgba(26, 18, 6, .7); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.item { position: relative; width: 100%; height: 100%; min-height: 112px; text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--panel-2), var(--panel)); transition: border-color .2s, transform .12s; }
.item:hover { border-color: var(--saffron); }
.item:active { transform: scale(.98); }
.item__name { font-weight: 600; font-size: 14px; line-height: 1.3; padding-right: 26px; }
.item__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item__price { font: 700 14px var(--f-mono); color: var(--saffron-2); }
.item__tag { font-size: 10.5px; font-weight: 700; color: var(--chilli); text-transform: uppercase; letter-spacing: .06em; }
.item__qty { position: absolute; top: 10px; right: 10px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: var(--saffron); color: var(--saffron-ink); font: 700 12px var(--f-mono); display: grid; place-items: center; }
.veg-mark { width: 15px; height: 15px; border: 1.6px solid currentColor; border-radius: 3px; display: inline-grid; place-items: center; flex: none; }
.veg-mark::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.veg-mark.veg { color: var(--veg); }
.veg-mark.nonveg { color: var(--nonveg); }
.empty { color: var(--mute); padding: 30px 10px; text-align: center; grid-column: 1 / -1; }

.cart { position: sticky; top: 86px; display: flex; flex-direction: column; max-height: calc(100vh - 104px); background: var(--panel); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9); }
.cart__head { padding: 16px 18px 12px; border-bottom: 1px dashed var(--line); display: grid; gap: 8px; }
.field-row { display: flex; gap: 10px; align-items: center; }
.svc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 4px; }
.svc div { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; }
.svc dt { color: var(--mute); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.svc dd { margin: 4px 0 0; font-weight: 700; font-size: 17px; }
.svc dd.svc__n { margin: 2px 0 0; font-size: 12px; font-weight: 500; color: var(--mute); }
@media (max-width: 640px) { .svc { grid-template-columns: 1fr 1fr; } }
.field-row select { flex: 1 1 0; width: 0; min-width: 0; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); padding: 0 12px; font-weight: 600; }
.covers { display: inline-flex; align-items: center; gap: 6px; padding: 3px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); font: 700 14px var(--f-mono); }
.covers .ic--sm { color: var(--mute); }
.step { width: 34px; height: 34px; border-radius: 9px; border: 0; background: var(--panel-3); display: grid; place-items: center; }
.step .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.step:hover { background: var(--saffron); color: var(--saffron-ink); }
.cart__title { font-size: 18px; font-weight: 800; }
.cart__meta { color: var(--mute); font-size: 12.5px; }
.lines { flex: 1; overflow-y: auto; padding: 6px 18px; min-height: 120px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.line:last-child { border-bottom: 0; }
.line__name { font-weight: 600; font-size: 13.5px; display: flex; gap: 7px; align-items: flex-start; }
.line__name .veg-mark { margin-top: 2px; width: 13px; height: 13px; }
.line__name .veg-mark::after { width: 5px; height: 5px; }
.line__sub { display: block; color: var(--mute); font: 500 11.5px var(--f-mono); margin-top: 2px; }
.line__sub .new { color: var(--saffron-2); }
.line__sub .sent { color: var(--mint); }
.qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 11px; padding: 2px; }
.qty button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: var(--panel-3); display: grid; place-items: center; }
.qty button .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.qty button:hover { background: var(--saffron); color: var(--saffron-ink); }
.qty span { min-width: 22px; text-align: center; font: 700 13px var(--f-mono); }
.line__amt { font: 700 13.5px var(--f-mono); min-width: 64px; text-align: right; }
.cart-empty { color: var(--mute); text-align: center; padding: 26px 8px; font-size: 13.5px; display: grid; gap: 6px; justify-items: center; }
.cart-empty .ic { width: 34px; height: 34px; color: var(--line); }
.totals { padding: 12px 18px 6px; border-top: 1px dashed var(--line); display: grid; gap: 5px; font-size: 13px; color: var(--dim); }
.totals div { display: flex; justify-content: space-between; gap: 10px; }
.totals .mono { color: var(--text); }
.totals .grand { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: 15px; align-items: baseline; }
.totals .grand .mono { font-size: 24px; color: var(--saffron-2); }
.sc-toggle { display: flex; gap: 9px; align-items: center; padding: 6px 18px 12px; color: var(--dim); font-size: 12.5px; cursor: pointer; }
.sc-toggle input { accent-color: var(--saffron); width: 16px; height: 16px; flex: none; }
.cart__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 18px 18px; }
.btn--wide { grid-column: 1 / -1; height: 38px; font-size: 13px; }
.cart-jump { position: fixed; left: 16px; right: 16px; bottom: 84px; z-index: 30; height: 52px; border-radius: 16px; border: 0; background: var(--saffron); color: var(--saffron-ink); font-weight: 800; font-size: 15px; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .8); display: none; }

/* ---------- bills list ---------- */
.seg { display: inline-flex; padding: 4px; border-radius: 13px; background: var(--panel); border: 1px solid var(--line-2); }
.seg__btn { border: 0; background: none; color: var(--dim); padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; }
.seg__btn[aria-pressed="true"] { background: var(--panel-3); color: var(--saffron-2); }
.table-wrap { position: relative; overflow-x: auto; }
.tbl-list { min-width: 760px; }
.tbl-list th { text-align: left; padding: 13px 16px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); font-weight: 600; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl-list td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.tbl-list .num { text-align: right; }
.tbl-list tbody tr:hover td { background: rgba(255, 255, 255, .02); }
.tbl-list tfoot td { font-weight: 700; background: var(--panel-2); border-bottom: 0; }
.mode { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.mode i { width: 9px; height: 9px; border-radius: 3px; }
.row-btn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; height: 32px; padding: 0 12px; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.row-btn:hover { border-color: var(--saffron); color: var(--saffron-2); }
.row-btn .ic { width: 15px; height: 15px; }

/* ---------- dialog & receipt ---------- */
.dlg { border: 0; padding: 0; border-radius: 22px; width: min(460px, calc(100vw - 20px)); max-height: calc(100vh - 24px); background: var(--panel); color: var(--text); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9); border: 1px solid var(--line); }
.dlg::backdrop { background: rgba(5, 4, 3, .7); backdrop-filter: blur(4px); }
.dlg[open] { animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dlg__body { padding: 20px; display: grid; gap: 16px; }
.dlg__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dlg__head h2 { font-size: 19px; font-weight: 800; }
.dlg__foot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.paper-wrap { background: var(--panel-2); border-radius: 16px; padding: 18px 14px 22px; display: grid; place-items: center; max-height: 46vh; overflow-y: auto; }
.paper { width: 100%; max-width: 310px; background: var(--paper); color: var(--paper-ink); font: 400 12px/1.5 var(--f-mono); padding: 18px 16px 22px; box-shadow: 0 12px 30px -16px rgba(0, 0, 0, .8);
  -webkit-mask: radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100% repeat-x;
          mask: radial-gradient(circle 5px at 50% 100%, transparent 98%, #000) 0 0 / 14px 100% repeat-x; }
.rc-c { text-align: center; }
.rc-brand { font-weight: 700; font-size: 15px; letter-spacing: .08em; }
.rc-kot { font-weight: 700; font-size: 18px; letter-spacing: .14em; }
.rc-hr { border: 0; border-top: 1px dashed #8C7F70; margin: 8px 0; }
.rc-row { display: flex; justify-content: space-between; gap: 8px; }
.paper table td { padding: 2px 0; vertical-align: top; }
.paper table td.r { text-align: right; white-space: nowrap; padding-left: 8px; }
.paper table th { font-weight: 700; text-align: left; padding: 2px 0; }
.paper table th.r { text-align: right; }
.rc-total { font-weight: 700; font-size: 15px; }
.rc-big td { font-size: 14px; font-weight: 700; padding: 4px 0; }
.rc-note { font-size: 11px; color: #5A5046; }
.settle fieldset { border: 0; padding: 0; margin: 0; }
.settle legend { font-size: 12.5px; font-weight: 700; color: var(--dim); margin-bottom: 8px; padding: 0; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.modes label { position: relative; }
.modes input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.modes span { display: block; text-align: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 700; font-size: 13.5px; }
.modes input:checked + span { border-color: var(--saffron); background: var(--saffron-soft); color: var(--saffron-2); }
.modes input:focus-visible + span { outline: 2.5px solid var(--saffron-2); outline-offset: 2px; }
.tender { display: grid; gap: 6px; margin-top: 12px; }
.tender label { font-size: 12.5px; font-weight: 700; color: var(--dim); }
.tender input { height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); padding: 0 12px; font: 600 15px var(--f-mono); }
.tender input:focus { outline: none; border-color: var(--saffron); }
.tender input[aria-invalid="true"] { border-color: var(--chilli); }
.tender__msg { font-size: 12.5px; font-weight: 600; color: var(--mint); }
.tender__msg.is-err { color: var(--chilli); }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 70; background: var(--paper); color: var(--paper-ink); padding: 12px 18px; border-radius: 13px; font-weight: 600; font-size: 14px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8); max-width: calc(100vw - 32px); animation: pop .2s ease; }
.m-foot { display: none; }
#printArea { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .pos { grid-template-columns: minmax(0, 1fr) 350px; }
  .items { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
}
@media (max-width: 1120px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .clock { display: none; }
}
@media (max-width: 960px) {
  .pos { grid-template-columns: 1fr; }
  .cart { position: static; max-height: none; }
  .lines { max-height: none; }
  .cart-jump { display: block; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: fixed; z-index: 40; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line-2); }
  .rail__logo, .rail__foot { display: none; }
  .rail__nav { flex-direction: row; justify-content: space-around; gap: 4px; }
  .rail__nav a { flex: 1; padding: 7px 4px; }
  .rail__nav a .ic { width: 22px; height: 22px; }
  .rail__count { right: calc(50% - 24px); }
  .top { padding: 12px 16px; flex-wrap: wrap; }
  .top .btn--primary span { display: none; }
  .top .btn--primary { width: 44px; padding: 0; }
  main { padding: 4px 16px 24px; }
  .m-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 16px 150px; }
  .m-foot .btn-reset { flex-direction: row; width: auto; padding: 9px 14px; font-size: 12.5px; }
  .head__note { text-align: left; }
}
@media (max-width: 640px) {
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .panel { padding: 16px; }
  .panel--flush { padding: 0; }
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item { min-height: 104px; padding: 12px; }
  .zone { padding: 14px; }
  .zone__tables { gap: 12px 14px; }
  .tb__top { min-width: 84px; height: 70px; }
  .tb--6 .tb__top { min-width: 120px; }
  .tb--8 .tb__top, .tb--10 .tb__top { min-width: 150px; }
  .cashier { display: none; }
  .seg { width: 100%; }
  .seg__btn { flex: 1; padding: 7px 8px; }
}
@media (max-width: 400px) {
  .outlet__name { font-size: 16px; }
  .badge-demo { font-size: 11px; padding: 4px 9px; }
  .kpi__num { font-size: 21px; }
  .tb--8 .tb__top, .tb--10 .tb__top { min-width: 128px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- print: only the receipt (80 mm roll) ---------- */
@media print {
  @page { size: 80mm auto; margin: 4mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; }
  #printArea .paper { box-shadow: none; max-width: none; padding: 0; -webkit-mask: none; mask: none; background: #fff; color: #000; font-size: 11px; }
  #printArea .rc-note { color: #000; }
}
