:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --ink: #1f1b16;
  --muted: #736b60;
  --line: #e7e1d7;
  --accent: #c2410c;
  --accent-soft: #fdeee6;
  --on-accent: #ffffff;
  --ok: #15803d;
  --ok-soft: #e5f5ea;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --bad: #b91c1c;
  --bad-soft: #fde8e8;
  --info: #1d4ed8;
  --info-soft: #e6edfd;
  --gold: #a16207;
  --gold-soft: #fbf3dc;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 4px 16px rgb(0 0 0 / 0.05);
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210; --surface: #1e1b18; --surface-2: #25221e; --ink: #f3eee7; --muted: #a69e93; --line: #36312b;
    --accent: #f97316; --accent-soft: #3a2316; --on-accent: #1a0e05;
    --ok: #4ade80; --ok-soft: #173222; --warn: #fbbf24; --warn-soft: #3a2d12; --bad: #f87171; --bad-soft: #3d1a1a;
    --info: #93b4ff; --info-soft: #1b2643; --gold: #facc15; --gold-soft: #39300f;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: .95rem; margin-top: 1rem; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 0 .3em; border-radius: 4px; }
input, select { font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .65rem; min-width: 0; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=checkbox] { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
form.inline { display: inline; }

.muted { color: var(--muted); }
.small, small { font-size: .82rem; }
.grow { flex: 1; min-width: 0; }
.r { text-align: right; }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.stack { display: grid; gap: .6rem; }
.empty { color: var(--muted); font-style: italic; margin: .5rem 0; }
.error { color: var(--bad); font-weight: 700; }
.warnbox { background: var(--warn-soft); color: var(--warn); padding: .6rem .8rem; border-radius: 10px; }
.center-box { text-align: center; padding: 4rem 16px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 1rem 16px; }
.narrow-card { max-width: 560px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: .55rem .9rem; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: .3rem .6rem; font-size: .85rem; }
.btn.block { width: 100%; padding: .85rem; font-size: 1rem; }
.btn.disabled { pointer-events: none; opacity: .5; }
.link { background: none; border: 0; color: var(--accent); padding: .5rem 0; font-weight: 600; text-decoration: none; }
.link.center { display: block; margin: 1rem auto; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.chip, .pill { display: inline-block; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .35rem .85rem; text-decoration: none; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill.gold { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.badge { font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; }
.badge.off { background: var(--bad-soft); color: var(--bad); }
.s-unsent { background: var(--accent-soft); color: var(--accent); }
.s-new { background: var(--info-soft); color: var(--info); }
.s-preparing { background: var(--warn-soft); color: var(--warn); }
.s-ready { background: var(--ok-soft); color: var(--ok); }
.s-served { background: var(--surface-2); color: var(--muted); }
.tag { font-size: .72rem; color: var(--ok); font-weight: 600; }
.count { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: .78rem; padding: 0 .5rem; color: var(--muted); }
.field { display: grid; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: .7rem; }
.field input { color: var(--ink); font-weight: 400; }
.check { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; }
.reward { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.reward:last-child { border-bottom: 0; }
a.reward.on { color: var(--accent); }
.plus { color: var(--ok); }
.neg { color: var(--bad); }
.earn { background: var(--gold-soft); color: var(--gold); border-radius: 10px; padding: .5rem .7rem; font-size: .88rem; }
.applied { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: .5rem .7rem; }
.pending { background: var(--info-soft); color: var(--info); border-radius: 10px; padding: .5rem .7rem; }
.reward-request { background: var(--gold-soft); border: 2px solid var(--gold); border-radius: 12px; padding: .7rem .8rem; margin: .6rem 0; }
.reward-request p { margin: .3rem 0 .6rem; }
.reward-request form { margin: 0; }
.plain { list-style: none; padding: 0; margin: .5rem 0 0; }
.plain li { padding: .15rem 0; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem; padding: .55rem 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.logo { font-weight: 800; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: .25rem; align-items: center; overflow-x: auto; flex: 1; }
.nav a, .nav button { padding: .45rem .75rem; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; border: 0; background: none; white-space: nowrap; }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav button { color: var(--accent); }
.me { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.me small { color: var(--muted); font-weight: 500; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 340px; text-align: center; }
.hero-logo { display: block; width: 84px; height: 84px; margin: 0 auto .4rem; }
.pin-input { width: 100%; text-align: center; font-size: 2rem; letter-spacing: .5em; padding: .5rem; margin: .5rem 0 1rem; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.key { padding: 1.1rem 0; font-size: 1.4rem; font-weight: 700; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.key:active { transform: scale(.97); }
.key.ok { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.demo { margin-top: 1.5rem; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem; }
.demo summary { cursor: pointer; font-weight: 600; }

/* Floor */
.floor-page { display: grid; gap: 1rem; padding: 1rem 16px; max-width: 1400px; margin: 0 auto; }
@media (min-width: 1000px) { .floor-page { grid-template-columns: 360px 1fr; align-items: start; } }
.floor-page > section, .pos > section, .pay-grid > *, .grid2 > *, .reports > * { min-width: 0; }
.sec { display: flex; align-items: center; gap: .5rem; }
.alerts { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.alert { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: 12px; border: 1px solid; flex-wrap: wrap; }
.alert small { display: block; color: var(--muted); }
.alert.call { background: var(--bad-soft); border-color: var(--bad); }
.alert.billreq { background: var(--info-soft); border-color: var(--info); }
.alert.ready { background: var(--ok-soft); border-color: var(--ok); }
.alert.rewardreq { background: var(--gold-soft); border-color: var(--gold); }
.floor-scroll { overflow-x: auto; padding-bottom: .5rem; }
.floor { display: grid; gap: .8rem; background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r); padding: .8rem; min-width: min-content; }
.tslot form { margin: 0; }
.tcard { position: relative; width: 100%; display: grid; gap: .1rem; justify-items: start; text-align: left; padding: .7rem .8rem; min-height: 104px; border: 2px solid var(--line); background: var(--surface); border-radius: var(--r); }
.tnum { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.tcard small { font-weight: 700; color: var(--muted); }
.tamt { font-weight: 700; }
.tmeta { font-size: .75rem; color: var(--muted); }
.tcard em { position: absolute; top: .5rem; right: .6rem; font-style: normal; }
.tcard.busy { border-color: var(--warn); background: var(--warn-soft); }
.tcard.ready { border-color: var(--ok); background: var(--ok-soft); }
.tcard.call { border-color: var(--bad); background: var(--bad-soft); animation: pulse 1.2s infinite; }
.tcard.billreq { border-color: var(--info); background: var(--info-soft); animation: pulse 1.2s infinite; }
.tcard.rewardreq { border-color: var(--gold); background: var(--gold-soft); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgb(185 28 28 / .12); } }
.tsplit { display: flex; gap: .3rem; margin-top: .25rem; font-size: .8rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; }
.lg { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; border: 2px solid var(--line); margin-right: -.5rem; }
.lg.busy { border-color: var(--warn); } .lg.ready { border-color: var(--ok); } .lg.call { border-color: var(--bad); } .lg.billreq { border-color: var(--info); }

/* POS till */
.pos { display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 1rem 16px; max-width: 1500px; margin: 0 auto; }
@media (min-width: 900px) { .pos { grid-template-columns: 1fr 420px; align-items: start; } .pos-ticket { position: sticky; top: 4rem; max-height: calc(100vh - 5rem); display: flex; flex-direction: column; } }
.cats { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: .5rem; scrollbar-width: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.tiles form { margin: 0; }
.tile { width: 100%; min-height: 110px; display: grid; align-content: center; justify-items: center; gap: .2rem; padding: .6rem; text-align: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.tile:hover:not(:disabled) { border-color: var(--accent); }
.tile:active:not(:disabled) { transform: scale(.97); }
.tile .e { font-size: 1.8rem; }
.tile b { font-size: .9rem; line-height: 1.2; }
.tile span:last-child { color: var(--muted); font-weight: 600; font-size: .85rem; }
.tile.off { opacity: .45; }
.pos-ticket { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; box-shadow: var(--shadow); }
.pt-head { display: flex; justify-content: space-between; align-items: start; border-bottom: 1px solid var(--line); padding-bottom: .6rem; }
.pt-head h2 { margin: 0; }
.plines { overflow-y: auto; min-height: 80px; flex: 1; }
.pline { display: flex; gap: .6rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.pline form { margin: 0; }
.pline .amt { min-width: 4.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.note-in { width: 100%; margin-top: .3rem; font-size: .82rem; padding: .3rem .5rem; }
.note { color: var(--bad); font-weight: 600; font-size: .85rem; }
.qty { display: flex; align-items: center; gap: .4rem; }
.qty form { margin: 0; }
.qty button { width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; }
.bill { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.bill td { padding: .25rem .2rem; vertical-align: top; }
.bill .sub td { color: var(--muted); }
.bill .disc td { color: var(--gold); font-weight: 600; }
.bill .tot td { border-top: 1px solid var(--line); font-weight: 800; font-size: 1.15rem; padding-top: .5rem; }
.pt-actions { display: flex; gap: .5rem; margin: .8rem 0; }
.pt-actions form { margin: 0; display: flex; }
.more { border-top: 1px solid var(--line); padding: .6rem 0; }
.more summary { cursor: pointer; font-weight: 700; }
.more > *:not(summary) { margin-top: .6rem; }
.tools { display: grid; gap: .5rem; }
.tools form { margin: 0; }

/* Pay */
.pay-page { max-width: 1000px; margin: 0 auto; padding: 1rem 16px; }
.pay-grid { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 800px) { .pay-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.due { display: grid; gap: .2rem; text-align: center; padding: 1rem; background: var(--surface-2); border-radius: 12px; }
.due b { font-size: 2.6rem; font-variant-numeric: tabular-nums; }
.change { font-size: 1.1rem; margin: 0; }
.change b { color: var(--ok); font-size: 1.4rem; }

/* Receipt & reports */
.receipt-page { padding: 1rem 16px; }
.receipt-actions { justify-content: center; margin-bottom: 1rem; }
.receipt { max-width: 340px; margin: 0 auto; background: #fff; color: #111; padding: 1.2rem 1rem; font: 13px/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace; box-shadow: var(--shadow); border-radius: 4px; text-align: center; }
.receipt h2 { font-size: 1.1rem; }
.receipt p { margin: .2rem 0; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: .6rem 0; }
.rrow { display: flex; justify-content: space-between; gap: .5rem; text-align: left; }
.rrow span:last-child { white-space: nowrap; }
.rtotal { font-weight: 800; font-size: 1.1em; }
.big-label { font-weight: 800; border: 2px solid #111; padding: .2rem; }
.vat { width: 100%; border-collapse: collapse; font-size: .95em; }
.vat th, .vat td { text-align: right; padding: .1rem .2rem; }
.vat th:first-child, .vat td:first-child { text-align: left; }
.reports { display: grid; gap: 1rem; padding: 1rem 16px; max-width: 1100px; margin: 0 auto; }
@media (min-width: 900px) { .reports { grid-template-columns: 1fr 300px; align-items: start; } }
.report-main .row-between { margin-bottom: 1rem; }
.report { max-width: 420px; }

/* Kitchen */
.kitchen-bar { display: flex; justify-content: space-between; align-items: start; padding: 1rem 16px 0; gap: 1rem; }
.stock { position: relative; }
.stock summary { list-style: none; }
.stock summary::-webkit-details-marker { display: none; }
.stock-list { position: absolute; right: 0; z-index: 5; width: min(340px, 90vw); max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem; box-shadow: 0 10px 30px rgb(0 0 0 / .15); }
.stock-list form { margin: 0; }
.kitchen { display: grid; grid-template-columns: 1fr; gap: 1rem; padding: 1rem 16px; }
@media (min-width: 900px) { .kitchen { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem; min-height: 200px; }
.kcol h2 { display: flex; align-items: center; gap: .5rem; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--info); border-radius: 12px; padding: .8rem; margin-bottom: .7rem; box-shadow: var(--shadow); }
.k-preparing .ticket { border-left-color: var(--warn); }
.k-ready .ticket { border-left-color: var(--ok); }
.ticket.warn .time { color: var(--warn); }
.ticket.late { border-color: var(--bad); }
.ticket.late .time { color: var(--bad); }
.t-head { display: flex; gap: .7rem; align-items: baseline; font-size: 1.05rem; }
.t-head .time { margin-left: auto; font-weight: 700; font-size: .9rem; }
.ticket ul { list-style: none; padding: 0; margin: .6rem 0; font-size: 1.05rem; }
.ticket li { padding: .25rem 0; border-bottom: 1px dashed var(--line); }
.ticket li:last-child { border: 0; }
.t-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.t-foot form { margin: 0; }
.switch { width: 2.8rem; height: 1.6rem; border-radius: 99px; border: 0; background: var(--line); position: relative; padding: 0; flex: none; }
.switch i { position: absolute; top: .2rem; left: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.switch.on { background: var(--ok); }
.switch.on i { left: 1.4rem; }

/* Manager */
.manager { max-width: 1200px; margin: 0 auto; padding: 1rem 16px 3rem; }
.mtabs { display: flex; gap: .4rem; overflow-x: auto; margin-bottom: 1rem; }
.mtabs a { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: .5rem .9rem; font-weight: 600; white-space: nowrap; color: var(--ink); text-decoration: none; }
.mtabs a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; display: grid; gap: .15rem; box-shadow: var(--shadow); }
.kpi span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.kpi b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); }
.grid2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; align-items: start; } }
.hours { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: .5rem; }
.hbar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.hbar i { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; }
.hbar small { font-size: .65rem; color: var(--muted); }
.live { display: flex; gap: 1rem; flex-wrap: wrap; }
.live b { font-size: 1.2rem; margin-left: .2rem; }
.barrow { display: grid; grid-template-columns: minmax(0, 10rem) 1fr 2rem; gap: .6rem; align-items: center; padding: .25rem 0; font-size: .9rem; }
.barrow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.barrow b { text-align: right; }
.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
.list th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; padding: .4rem; border-bottom: 1px solid var(--line); }
.list td { padding: .45rem .4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr.dim td { opacity: .55; }
.scroll-x { overflow-x: auto; }
.menu-edit input:not([type=checkbox]), .menu-edit select { width: 100%; padding: .35rem .5rem; }
.menu-edit td:nth-child(2), .menu-edit td:nth-child(3) { min-width: 200px; }
.small-in { margin-top: .25rem; font-size: .8rem; color: var(--muted); }
.w-emoji { width: 3.2rem !important; text-align: center; }
.w-price { width: 7rem !important; }
.w-qty { width: 4.5rem !important; }
.addform { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .5rem 0; }
.addform input:not([type=checkbox]) { flex: 1 1 140px; }
.addform .w-emoji, .addform .w-price, .addform .w-qty { flex: none; }
.qrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.qrcard { background: #fff; color: #1f1b16; border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; display: grid; justify-items: center; gap: .3rem; text-align: center; }
.qrcard small { color: #736b60; }
.qr { min-height: 140px; word-break: break-all; font-size: .7rem; }

/* Guest (QR) */
body.guest { padding-bottom: 0; }
.phone { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: 10rem; }
.c-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 16px .6rem; }
.c-head b { font-size: 1.3rem; }
.brand-sm { font-size: .8rem; color: var(--muted); font-weight: 600; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch a { padding: .3rem .6rem; font-size: .78rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.lang-switch a.on { background: var(--ink); color: var(--bg); }
.tabs { display: flex; gap: .25rem; margin: 0 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .25rem; position: sticky; top: .5rem; z-index: 4; }
.tabs a { flex: 1; text-align: center; padding: .55rem; border-radius: 9px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.dot { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: .7rem; padding: 0 .4rem; }
.c-main { padding: 1rem 16px; }
.items { display: grid; gap: .7rem; }
.item { display: flex; gap: .8rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem; }
.item form { margin: 0; }
.item.off { opacity: .55; }
.item p { margin: .15rem 0 .3rem; font-size: .85rem; }
.emoji { font-size: 2rem; width: 3rem; height: 3rem; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; flex: none; }
.price { font-weight: 700; }
.add { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--accent); background: var(--surface); color: var(--accent); font-size: 1.2rem; font-weight: 700; }
.add.has { background: var(--accent); color: var(--on-accent); font-size: 1rem; }
.c-actions { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 6; display: flex; gap: .5rem; padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.c-actions form { flex: 1; margin: 0; }
.c-actions .btn { width: 100%; height: 100%; white-space: normal; line-height: 1.2; font-size: .9rem; padding: .55rem .5rem; }
.cart { position: fixed; bottom: 4.2rem; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 488px; z-index: 7; }
.cartbar { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-weight: 700; box-shadow: 0 6px 20px rgb(0 0 0 / .2); cursor: pointer; }
.cartbar::-webkit-details-marker { display: none; }
.cart-body { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .5rem 1rem 1rem; margin-bottom: .5rem; max-height: 60vh; overflow-y: auto; box-shadow: 0 10px 30px rgb(0 0 0 / .2); }
.cart[open] { display: flex; flex-direction: column-reverse; }
.cline { display: flex; gap: .7rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.cline form { margin: 0; }
.cart-body > form { margin-top: .8rem; }
.progress { display: flex; margin: .8rem 0 .4rem; }
.step { flex: 1; display: grid; justify-items: center; gap: .25rem; position: relative; color: var(--muted); }
.step i { width: .8rem; height: .8rem; border-radius: 50%; background: var(--line); z-index: 1; }
.step::before { content: ''; position: absolute; top: .35rem; left: -50%; right: 50%; height: 2px; background: var(--line); }
.step:first-child::before { display: none; }
.step.done { color: var(--ink); }
.step.done i, .step.done::before { background: var(--accent); }
.step small { font-size: .7rem; }
.empty-state { text-align: center; padding: 3rem 0; }
.big { font-size: 3rem; }
.loyal-hero { text-align: center; }
.loyal-hero form { max-width: 320px; margin: 1rem auto 0; }
.loyal-card { background: linear-gradient(135deg, #2b2118, #6b3a1a 60%, #c2410c); color: #fff8ef; border-radius: 18px; padding: 1.2rem; margin-bottom: 1rem; box-shadow: 0 8px 24px rgb(0 0 0 / .18); }
.lc-top { display: flex; justify-content: space-between; font-size: .8rem; opacity: .85; font-weight: 600; }
.lc-pts { font-size: 2.6rem; font-weight: 800; margin-top: .5rem; }
.lc-pts small { font-size: 1rem; font-weight: 600; }
.lc-name { opacity: .9; margin-bottom: .7rem; }
.lc-bar { height: 6px; background: rgb(255 255 255 / .25); border-radius: 99px; overflow: hidden; margin-bottom: .3rem; }
.lc-bar i { display: block; height: 100%; background: #fde68a; }

/* Toast */
#toast { position: fixed; top: 1rem; left: 50%; transform: translate(-50%, -160%); z-index: 50; max-width: calc(100% - 32px); background: var(--ink); color: var(--bg); padding: .7rem 1.1rem; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 24px rgb(0 0 0 / .25); transition: transform .25s; }
#toast.show { transform: translate(-50%, 0); }

@media print {
  .top, .no-print, #toast, .mtabs { display: none !important; }
  body { background: #fff; color: #000; }
  .receipt { box-shadow: none; }
  .qrgrid { grid-template-columns: repeat(3, 1fr); }
  .qrcard { break-inside: avoid; border: 1px dashed #999; }
}

/* ───────── Guest menu design (themes, brand colour, photos) ───────── */
body.g-light {
  --bg: #faf7f2; --surface: #ffffff; --surface-2: #f3eee6; --ink: #1f1b16; --muted: #6f685e; --line: #ebe4d8;
  --ok: #15803d; --ok-soft: #e5f5ea; --warn: #b45309; --warn-soft: #fdf3e2; --bad: #b91c1c; --bad-soft: #fde8e8;
  --info: #1d4ed8; --info-soft: #e6edfd; --gold: #a16207; --gold-soft: #fbf3dc;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 6px 20px rgb(0 0 0 / .06);
  color-scheme: light;
}
body.g-dark {
  --bg: #121110; --surface: #1c1a17; --surface-2: #25221e; --ink: #f4efe8; --muted: #a39b90; --line: #332f2a;
  --ok: #4ade80; --ok-soft: #173222; --warn: #fbbf24; --warn-soft: #3a2d12; --bad: #f87171; --bad-soft: #3d1a1a;
  --info: #93b4ff; --info-soft: #1b2643; --gold: #facc15; --gold-soft: #39300f;
  --shadow: 0 1px 2px rgb(0 0 0 / .4);
  color-scheme: dark;
}
body.guest { background: var(--bg); }
.g { --accent: var(--brand); --on-accent: var(--on-brand); --accent-soft: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.g .chip.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.g .tabs a.on { color: var(--brand); }

/* header */
.g-hero { position: relative; padding: 12px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.g-hero.has-cover { min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; border: 0; overflow: hidden; }
.g-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.g-hero.has-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .35) 0%, rgb(0 0 0 / .05) 40%, rgb(0 0 0 / .7) 100%); z-index: 0; }
.g-hero > *:not(.g-cover) { position: relative; z-index: 1; }
.g-hero-bar { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; }
.g-hero.has-cover .lang-switch { background: rgb(0 0 0 / .35); border-color: rgb(255 255 255 / .35); }
.g-hero.has-cover .lang-switch a { color: #fff; }
.g-hero.has-cover .lang-switch a.on { background: #fff; color: #111; }
.g-hero.has-cover .pill:not(.gold) { background: rgb(0 0 0 / .35); color: #fff; border-color: rgb(255 255 255 / .35); }
.g-brand { display: flex; align-items: center; gap: .8rem; margin-top: 14px; }
.g-brand h1 { font-size: 1.45rem; margin: 0; letter-spacing: -.01em; }
.g-brand p { margin: .15rem 0 0; font-size: .9rem; opacity: .85; }
.g-logo { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: #fff; box-shadow: 0 4px 14px rgb(0 0 0 / .25); flex: none; }
.g-table { flex: none; align-self: flex-start; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: .8rem; padding: .3rem .65rem; border-radius: 999px; }
.g .tabs { margin-top: 12px; }

/* dish cards */
.g-items { display: grid; gap: .75rem; }
.g-item { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.g-item.off { opacity: .55; }
.g-item-link { display: flex; gap: .9rem; padding: .85rem; color: inherit; text-decoration: none; min-height: 136px; }
.g-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.g-item-text h3 { font-size: 1rem; margin: 0 0 .25rem; }
.g-item-text p { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-meta { display: flex; align-items: center; gap: .45rem; margin-top: auto; padding-top: .5rem; flex-wrap: wrap; }
.g-price { font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
body.g-dark .g-price { color: color-mix(in srgb, var(--brand) 60%, #fff); }
.g .tag { font-size: .8rem; }
.g .tag.hot { color: var(--bad); }
.g-photo { flex: none; width: 112px; height: 112px; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.g-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-emoji { font-size: 2.8rem; }
.g-add { position: absolute; right: 1.1rem; bottom: 1.1rem; margin: 0; }
.g-add .add { width: 2.6rem; height: 2.6rem; box-shadow: 0 3px 10px rgb(0 0 0 / .2); background: var(--surface); }
.g-add .add.has { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* dish detail sheet */
body:has(.g-sheet-wrap) { overflow: hidden; }
.g-sheet-wrap { position: fixed; inset: 0; z-index: 30; display: grid; place-items: end center; }
.g-sheet-bg { position: absolute; inset: 0; background: rgb(0 0 0 / .5); }
.g-sheet { position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 22px 22px 0 0; animation: up .22s ease-out; }
@media (min-width: 700px) { .g-sheet-wrap { place-items: center; } .g-sheet { border-radius: 22px; } }
.g-sheet-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.g-sheet-emoji { font-size: 5rem; text-align: center; padding: 2rem 0 1rem; background: var(--surface-2); }
.g-sheet-x { position: absolute; top: .8rem; right: .8rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: rgb(0 0 0 / .55); color: #fff; text-decoration: none; font-weight: 700; }
.g-sheet-body { padding: 1.1rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom)); }
.g-sheet-body h2 { font-size: 1.35rem; margin: 0 0 .35rem; }
.g-sheet-body .g-meta { margin: 0 0 .7rem; padding: 0; }
.g-sheet-desc { margin: 0 0 1rem; color: var(--muted); line-height: 1.5; }
.g-allergens { background: var(--surface-2); border-radius: 12px; padding: .7rem .8rem; margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.g-allergens p { width: 100%; margin: .2rem 0 0; }
.g-allergen { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .6rem; font-size: .85rem; }
.center-text { text-align: center; }
/* ───────── Manager: photos & look ───────── */
.thumb { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 10px; overflow: hidden; background: var(--surface-2); text-decoration: none; font-size: 1.6rem; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.dish-photo { display: grid; place-items: center; gap: .4rem; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-2); margin-bottom: .8rem; text-align: center; }
.dish-photo img { width: 100%; height: 100%; object-fit: cover; }
.img-setting { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: .5rem; }
.img-setting form { margin: 0; }
.img-preview { flex: none; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; overflow: hidden; text-align: center; }
.img-preview.logo { width: 96px; height: 96px; }
.img-preview.cover { width: 200px; height: 100px; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.color-in { width: 3.5rem; height: 2.4rem; padding: .15rem; }
label.chip.check { cursor: pointer; }
.tile-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.receipt-logo { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; margin: 0 auto .4rem; display: block; }
/* ───────── Demo mode ───────── */
.demo-pill { position: fixed; right: 0; top: 45%; z-index: 45; writing-mode: vertical-rl; background: var(--ink); color: var(--bg); padding: .7rem .35rem; border-radius: 12px 0 0 12px; font-weight: 700; font-size: .8rem; text-decoration: none; box-shadow: 0 4px 14px rgb(0 0 0 / .3); }
.demo-page { max-width: 760px; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.demo-head { text-align: center; margin-bottom: 1.2rem; }
.demo-logo { display: block; width: 92px; height: 92px; margin: 0 auto .4rem; }
.demo-head h1 { font-size: 1.8rem; margin: .2rem 0; }
.demo-guest { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: 18px; background: var(--accent); color: var(--on-accent); text-decoration: none; box-shadow: var(--shadow); margin-bottom: .5rem; }
.demo-guest small { display: block; opacity: .9; font-weight: 400; }
.demo-guest b { font-size: 1.1rem; }
.demo-arrow { margin-left: auto; font-size: 1.4rem; }
.demo-ico { font-size: 2rem; }
.demo-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.demo-roles form { margin: 0; }
.demo-role { width: 100%; height: 100%; display: grid; gap: .25rem; justify-items: start; text-align: left; padding: 1rem; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.demo-role:hover { border-color: var(--accent); }
.demo-role b { font-size: 1.05rem; }
.demo-role small { color: var(--muted); }
.demo-role em { font-style: normal; font-size: .78rem; color: var(--accent); font-weight: 600; }
.demo-reset { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.demo-reset p { margin: .2rem 0 0; }
/* ───────── Public sales page ───────── */
body.sales { background: var(--bg); --accent: #c2410c; --on-accent: #fff; --accent-soft: #fdeee6; }
.s-page { max-width: 1080px; margin: 0 auto; padding: 0 16px 2rem; }
.s-page section { margin: 2.6rem 0; }
.s-page h2 { font-size: 1.5rem; text-align: center; margin-bottom: 1.2rem; }
.s-top { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }
.s-brand { font-weight: 800; font-size: 1.25rem; }
.s-hero { display: grid; gap: 2rem; align-items: center; margin-top: 1rem !important; }
@media (min-width: 860px) { .s-hero { grid-template-columns: 1fr 260px; } }
.s-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.02em; margin-bottom: .8rem; }
.s-lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.s-cta { gap: .7rem; margin: 1.2rem 0 .6rem; }
.s-big { padding: .9rem 1.3rem; font-size: 1.05rem; border-radius: 14px; }
.s-wa { background: #25d366; border-color: #25d366; color: #073b1c; }
.s-qr-card { justify-self: center; background: #fff; color: #1f1b16; border-radius: 20px; padding: 1.1rem; display: grid; justify-items: center; gap: .6rem; text-align: center; box-shadow: var(--shadow); border: 1px solid var(--line); max-width: 220px; }
.s-qr-card .qr { min-height: 168px; }
.s-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.s-gallery figure { margin: 0; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.s-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.s-gallery figcaption { padding: .45rem .6rem; font-size: .8rem; font-weight: 600; }
.s-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.s-feature { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.2rem; box-shadow: var(--shadow); }
.s-feature h3 { margin: .4rem 0; font-size: 1.05rem; }
.s-feature p { margin: 0; color: var(--muted); line-height: 1.5; }
.s-ico { font-size: 1.8rem; }
.s-steps { list-style: none; padding: 0; display: grid; gap: .8rem; max-width: 640px; margin: 0 auto; counter-reset: none; }
.s-steps li { display: flex; gap: .9rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1rem; }
.s-steps li span { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.s-two { display: grid; gap: 1rem; }
@media (min-width: 760px) { .s-two { grid-template-columns: 1fr 1fr; } }
.s-two h2 { text-align: left; font-size: 1.2rem; }
.s-two p { color: var(--muted); line-height: 1.55; margin: 0; }
.s-contact { max-width: 640px; margin-left: auto !important; margin-right: auto !important; text-align: center; }
.s-contact .row { justify-content: center; }
.s-form { display: grid; gap: .6rem; text-align: left; margin-top: .6rem; }
.s-form textarea { font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; resize: vertical; }
.s-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.s-footer { text-align: center; padding: 1rem 0 2rem; }
.lead { border-top: 1px solid var(--line); padding: .7rem 0; }
.lead p { margin: .4rem 0 0; white-space: pre-wrap; }@media (max-width: 859px) { .s-qr-card { display: none; } }

/* Sales page line icons */
.s-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 0; }
.s-ico.sm { width: 38px; height: 38px; border-radius: 11px; vertical-align: middle; margin-right: .35rem; }
.s-feature h3 { margin-top: .8rem; }
.s-two h2 { display: flex; align-items: center; }
.btn .ico { flex: none; }
.s-wa .ico { color: #073b1c; }
/* Brand mark (DodoTab dodo) next to the product name */
.logo, .s-brand { display: inline-flex; align-items: center; gap: .45rem; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.s-brand .brand-mark { width: 38px; height: 38px; }

/* No-internet warning (live.js) */
#offline { position: fixed; top: 0; left: 0; right: 0; z-index: 60; background: #b91c1c; color: #fff; padding: .75rem 16px; font-weight: 700; text-align: center; box-shadow: 0 4px 16px rgb(0 0 0 / .3); }
body.is-offline { padding-top: var(--offline-h, 4.5rem); }
body.is-offline .top { top: var(--offline-h, 4.5rem); }
