:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --border: #e3e0d8;
  --text: #1d1b18;
  --muted: #6f6a61;
  --accent: #6c47ff;
  --accent-ink: #ffffff;
  --accent-soft: #fde9e1;
  --ok: #1f8a4c;
  --ok-soft: #dff3e7;
  --warn: #b7791f;
  --warn-soft: #fbf0d9;
  --danger: #c53030;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  --radius: 14px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-body);
  color-scheme: light;
}
/* Dark palette: follows the phone unless a venue forces light/dark (html[data-theme]). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141311;
    --surface: #1e1c19;
    --surface-2: #282622;
    --border: #36332e;
    --text: #f2efe9;
    --muted: #a39d92;
    --accent: #ff7a4d;
    --accent-ink: #1a0d07;
    --accent-soft: #3a2219;
    --ok: #4cc77e;
    --ok-soft: #173223;
    --warn: #e8b04f;
    --warn-soft: #3a2e17;
    --danger: #ff6b6b;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141311;
  --surface: #1e1c19;
  --surface-2: #282622;
  --border: #36332e;
  --text: #f2efe9;
  --muted: #a39d92;
  --accent: #ff7a4d;
  --accent-ink: #1a0d07;
  --accent-soft: #3a2219;
  --ok: #4cc77e;
  --ok-soft: #173223;
  --warn: #e8b04f;
  --warn-soft: #3a2e17;
  --danger: #ff6b6b;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.empty { color: var(--muted); text-align: center; padding: 24px 12px; }

/* buttons & inputs */
.btn {
  appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .06s, background .15s, opacity .15s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.danger-text { color: var(--danger); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 4px; color: var(--text); font-weight: 400; }

#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(92vw, 420px); }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; animation: pop .2s ease-out; }
.toast.error { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* =============================================================== customer */
.cust { padding-bottom: 110px; max-width: 640px; margin: 0 auto; }
.cust-head { padding: 22px 16px 12px; }
.cust-head .cover { height: 190px; margin: -22px -16px 0; background: var(--surface-2) center / cover no-repeat; border-radius: 0 0 22px 22px; }
.brandrow { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.cust-head.has-cover .brandrow { margin-top: 14px; }
.cust-head .logo { width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: var(--shadow); }
.cust-head.has-cover .logo { margin-top: -50px; border: 4px solid var(--bg); width: 88px; height: 88px; align-self: flex-start; }
.brandtext { min-width: 0; }
.cust h1, .cust h2, .sheet h2, .status-wrap h1 { font-family: var(--font-heading); }
.cust-head h1 { font-size: 28px; margin-bottom: 2px; overflow-wrap: anywhere; }
.tagline { margin: 0; color: var(--muted); }
.table-pill { display: inline-flex; gap: 6px; align-items: center; background: var(--accent-soft); color: var(--text); font-weight: 700; padding: 4px 12px; border-radius: 999px; font-size: 13px; }
.chips { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--border); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 7px 14px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, color .15s; }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.menu-sec { padding: 18px 16px 4px; }
.menu-sec h2 { font-size: 21px; }

/* menu item — "list" layout (default) */
.mi { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.mi:last-child { border-bottom: 0; }
.mi .ph { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.mi img.ph { cursor: zoom-in; }
.mi .ph-empty { display: none; }
.mi .info { flex: 1; min-width: 0; }
.mi .name { font-weight: 650; }
.mi .desc { color: var(--muted); font-size: 13px; }
.mi .price { font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mi .st { flex: none; }

/* "cards" layout — big photo on top */
[data-layout="cards"] .mi-list { display: grid; gap: 14px; }
[data-layout="cards"] .mi { flex-wrap: wrap; padding: 0 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
[data-layout="cards"] .mi .ph { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 0; }
[data-layout="cards"] .mi .info { padding-left: 14px; }
[data-layout="cards"] .mi .st { margin-right: 14px; }
[data-layout="cards"] .mi .name { font-size: 17px; }

/* "grid" layout — 2 columns */
[data-layout="grid"] .mi-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
[data-layout="grid"] .mi { flex-direction: column; align-items: stretch; gap: 8px; padding: 0 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; position: relative; }
[data-layout="grid"] .mi .ph { width: 100%; height: auto; aspect-ratio: 1; border-radius: 0; }
[data-layout="grid"] .mi .ph-empty { display: grid; place-items: center; font-size: 38px; font-weight: 800; color: var(--accent); background: var(--accent-soft); font-family: var(--font-heading); }
[data-layout="grid"] .mi .info { padding: 0 10px; }
[data-layout="grid"] .mi .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
[data-layout="grid"] .mi .st { padding: 0 10px; display: flex; justify-content: flex-end; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 16px; animation: fade .15s; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; flex: none; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper button.add { background: var(--accent); color: var(--accent-ink); }
.stepper span { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); z-index: 10; }
.cartbar .btn { width: 100%; max-width: 608px; margin: 0 auto; display: flex; justify-content: space-between; font-size: 16px; padding: 15px 18px; border-radius: 14px; box-shadow: var(--shadow); }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: .6; } }
.sheet header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.line .info { flex: 1; }
.total-row { display: flex; justify-content: space-between; font-size: 18px; font-weight: 750; padding: 14px 0; }
.demo-note { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 10px 0 14px; }
.status-wrap { padding: 28px 16px; text-align: center; }
.status-wrap .big { font-size: 52px; margin-bottom: 6px; }
.steps { display: flex; justify-content: space-between; margin: 26px 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 12%; right: 12%; top: 14px; height: 3px; background: var(--border); }
.step { position: relative; flex: 1; font-size: 12px; color: var(--muted); font-weight: 600; }
.step i { display: block; width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; background: var(--surface); border: 3px solid var(--border); position: relative; }
.step.done i { background: var(--ok); border-color: var(--ok); }
.step.done { color: var(--text); }
.step.current i { box-shadow: 0 0 0 6px var(--ok-soft); }
.receipt { text-align: left; margin-top: 18px; }
.receipt li { display: flex; justify-content: space-between; padding: 4px 0; }
.receipt ul { list-style: none; padding: 0; margin: 0; }

/* ================================================================== admin */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(360px, 100%); display: grid; gap: 12px; }
.login-venue { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.login-venue img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.err { color: var(--danger); min-height: 1.2em; margin: 0; font-size: 14px; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 17px; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tabs button { position: relative; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; padding: 8px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { background: var(--surface-2); color: var(--text); }
.tabs button.active { background: var(--accent-soft); color: var(--accent); }
.badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; margin-left: 4px; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.live-dot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
main { padding: 20px; max-width: 1400px; margin: 0 auto; }
.toolbar { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar h2 { margin: 0 auto 0 0; font-size: 22px; }

/* orders kanban */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 12px; min-height: 300px; }
.col h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; gap: 8px; align-items: center; margin: 4px 4px 12px; }
.col .count { background: var(--surface); color: var(--text); border-radius: 999px; padding: 0 8px; font-size: 13px; }
.col .list { display: grid; gap: 10px; }
.order { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.order.fresh { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: flash 1s ease-in-out 3; }
@keyframes flash { 50% { box-shadow: 0 0 0 7px var(--accent-soft); } }
.order header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.table-tag { font-size: 20px; font-weight: 800; }
.order ul { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 3px; }
.order .note { background: var(--warn-soft); color: var(--warn); padding: 6px 10px; border-radius: 8px; margin: 0 0 10px; font-size: 14px; }
.order footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 10px; }
.paid-tag { color: var(--ok); font-weight: 700; font-size: 13px; white-space: nowrap; }
.order footer > span:last-child { display: flex; gap: 4px; margin-left: auto; }
.age.late { color: var(--danger); font-weight: 700; }

/* floor plan */
.floor-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.floor {
  position: relative; height: 620px; border-radius: var(--radius); border: 1px solid var(--border);
  background-color: var(--surface);
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 22px 22px; overflow: hidden; user-select: none;
}
.floor-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.tbl {
  position: absolute; transform: translate(-50%, -50%); width: 92px; height: 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface-2); border: 2px solid var(--border); border-radius: 14px;
  cursor: grab; touch-action: none; font-weight: 700; text-align: center; padding: 4px; transition: box-shadow .15s, border-color .15s;
}
.tbl.round { border-radius: 50%; }
.tbl.long { width: 160px; height: 70px; }
.tbl small { font-weight: 500; color: var(--muted); font-size: 12px; }
.tbl:hover { border-color: var(--muted); }
.tbl.sel { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tbl:active { cursor: grabbing; }
.tbl .dot { position: absolute; top: -8px; right: -8px; background: var(--accent); color: var(--accent-ink); font-style: normal; font-size: 12px; min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; }
.panel { display: grid; gap: 12px; position: sticky; top: 80px; }
.panel .qr { background: #fff; border-radius: 12px; padding: 10px; width: 220px; margin: 0 auto; }
.panel .qr svg { display: block; width: 100%; height: auto; }
.panel .url { font-size: 12px; word-break: break-all; text-align: center; }
.panel .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.panel hr { border: 0; border-top: 1px solid var(--border); width: 100%; margin: 4px 0; }
.hint { font-size: 12px; color: var(--muted); margin: -6px 0 0; }
.add-table { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.add-table label { width: auto; display: grid; }
.add-table input[name=name] { width: 140px; }
.add-table input[name=seats] { width: 80px; }

/* menu */
.cat { margin-bottom: 16px; }
.cat > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cat h3 { margin: 0; font-size: 18px; }
table.items { width: 100%; border-collapse: collapse; }
table.items td { padding: 10px 8px; border-top: 1px solid var(--border); vertical-align: middle; }
table.items td:first-child { width: 56px; }
table.items img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; display: block; }
table.items tr.off td:not(:nth-last-child(-n+2)) { opacity: .45; }
table.items .actions { text-align: right; white-space: nowrap; width: 1%; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 999px; cursor: pointer; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }
dialog { border: 0; border-radius: var(--radius); padding: 0; background: var(--surface); color: var(--text); width: min(480px, 94vw); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog form { padding: 22px; display: grid; gap: 12px; }
dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); font-weight: 500; font-size: 14px; }
.check input { width: auto; margin: 0; }

/* analytics */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi .value { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.charts .wide { grid-column: 1 / -1; }
.charts h3 { font-size: 15px; margin-bottom: 2px; }
.charts .card > p.muted { margin: 0 0 14px; font-size: 13px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 6px; }
.bar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.bar { background: var(--accent); opacity: .55; border-radius: 4px 4px 0 0; min-height: 2px; transition: opacity .15s; }
.bar.hot { opacity: 1; }
.bar-col:hover .bar { opacity: 1; }
.bar-col span { font-size: 10px; color: var(--muted); text-align: center; height: 16px; margin-top: 4px; white-space: nowrap; overflow: visible; }
.heat { display: grid; grid-template-columns: 38px repeat(24, minmax(0, 1fr)); gap: 3px; font-size: 10px; color: var(--muted); }
.heat .c { aspect-ratio: 1; border-radius: 3px; background: var(--accent); }
.heat .lbl { display: flex; align-items: center; }
.heat .hl { text-align: center; }
.rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rank li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rank .pos { color: var(--muted); font-weight: 700; font-size: 13px; }
.rank .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .track { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 5px; overflow: hidden; }
.rank .fill { height: 100%; background: var(--accent); border-radius: 3px; }
.rush { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rush span { background: var(--accent-soft); color: var(--accent); font-weight: 700; border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.settings-grid form { display: grid; gap: 12px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.warn-box { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; }

/* image picker (logo, cover, item photos) */
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.img-field { display: grid; gap: 0; }
.img-row { display: flex; gap: 12px; align-items: center; }
.img-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.img-actions label.btn { display: inline-block; color: var(--text); }
.thumb { flex: none; width: 72px; height: 72px; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; border: 1px solid var(--border); position: relative; }
.thumb.round { border-radius: 50%; }
.thumb.wide { width: 128px; height: 72px; }
.thumb.empty::after { content: attr(data-empty); position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.img-field.busy .thumb::after { content: attr(data-busy); position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: #fff; background: rgba(0,0,0,.55); border-radius: inherit; }
.img-field .hint { margin: 6px 0 0; }

/* branding */
.brand-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.brand-form { display: grid; gap: 16px; }
.brand-form h3 { margin: 6px 0 -4px; font-size: 16px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; position: relative; }
.sw.active { box-shadow: 0 0 0 2px var(--text); }
.sw.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; display: inline-block; }
.sw.custom input { position: absolute; inset: -8px; width: 50px; height: 50px; opacity: 0; cursor: pointer; margin: 0; padding: 0; }
#accentCode { margin-left: 4px; }
.layouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lay { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 12px 8px; border: 2px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.lay.active { border-color: var(--accent); background: var(--accent-soft); }
.lay-ic { display: grid; gap: 3px; width: 54px; height: 54px; }
.lay-ic i { background: var(--muted); opacity: .45; border-radius: 3px; }
.lay-ic.list { grid-template-rows: repeat(4, 1fr); }
.lay-ic.list i { background: linear-gradient(90deg, var(--muted) 0 26%, transparent 26% 34%, var(--muted) 34%); }
.lay-ic.cards { grid-template-rows: 2fr 1fr; }
.lay-ic.cards i:nth-child(n+3) { display: none; }
.lay-ic.grid { grid-template-columns: 1fr 1fr; }
.phone-wrap { position: sticky; top: 80px; }
.phone { width: 375px; max-width: 100%; height: 740px; margin: 0 auto 10px; border: 10px solid #111; border-radius: 42px; overflow: hidden; background: #111; box-shadow: var(--shadow); }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }

/* language switcher (FR / NL / EN) */
.lang-switch { display: inline-flex; gap: 2px; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.lang-switch button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 4px 9px; border-radius: 999px; cursor: pointer; }
.lang-switch button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.cust-head .lang-switch { position: absolute; top: 14px; right: 16px; z-index: 2; }
.cust-head:not(.has-cover) { padding-top: 56px; }
.cust-head { position: relative; }
.cust-head.has-cover .lang-switch { background: rgba(0,0,0,.45); }
.cust-head.has-cover .lang-switch button { color: rgba(255,255,255,.8); }
.cust-head.has-cover .lang-switch button.active { background: #fff; color: #111; }
.login .lang-switch { justify-self: end; }

/* platform console */
fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px 14px; display: grid; gap: 10px; margin: 0; }
legend { font-size: 13px; font-weight: 700; padding: 0 6px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pw-row { display: flex; gap: 6px; margin-top: 4px; }
.pw-row input { margin: 0; font-family: ui-monospace, Menlo, monospace; }
.handover { background: var(--surface-2); border-radius: 10px; padding: 14px; white-space: pre-wrap; font-size: 13px; line-height: 1.5; margin: 0; user-select: all; }
#venueDialog { width: min(560px, 94vw); }
.vtable td:last-child .btn { padding: 5px 8px; }

/* staff accounts */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.roles > div { display: grid; gap: 2px; }
table.users { width: 100%; border-collapse: collapse; }
table.users th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 16px; }
table.users td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
table.users tr.off td:not(:last-child) { opacity: .5; }
table.users td:last-child { text-align: right; white-space: nowrap; }
.role-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); }
.role-tag.owner { background: var(--accent-soft); color: var(--accent); }
.role-tag.manager { background: var(--ok-soft); color: var(--ok); }
.by { color: var(--muted); font-size: 12px; }

@media (max-width: 1000px) {
  .roles { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
  .floor-wrap, .charts, .settings-grid, .brand-wrap { grid-template-columns: 1fr; }
  .phone-wrap { position: static; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { position: static; }
}
@media (max-width: 600px) {
  main { padding: 14px; }
  .topbar { padding: 10px 14px; }
  .floor { height: 480px; }
  .tbl { width: 72px; height: 72px; font-size: 13px; }
  .tbl.long { width: 120px; height: 56px; }
  .kpi .value { font-size: 22px; }
}

/* guest menu translation */
.tr-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; vertical-align: middle; }
.tr-btn:disabled { opacity: .6; cursor: progress; }
.tr-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }

/* guest header actions: call a waiter, my orders, translate */
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.head-actions .tr-btn { margin-left: 0; }
.tr-btn.on { background: var(--accent); color: var(--accent-ink, #fff); border-color: transparent; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-actions .btn { padding: 14px; }
/* tips */
.tip-box { margin-top: 14px; }
.tip-label { font-weight: 700; margin-bottom: 8px; }
.tip-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.tip-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; font: inherit; cursor: pointer; padding: 6px 4px; }
.tip-opt small { color: var(--muted); font-size: 12px; }
.tip-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.sub-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; padding: 2px 0; }
/* my orders */
.mine-row { display: grid; gap: 4px; width: 100%; text-align: left; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; font: inherit; cursor: pointer; }
.mine-top { display: flex; justify-content: space-between; gap: 8px; }
.mine-st { font-size: 13px; font-weight: 600; }
.mine-row .num { font-weight: 700; }
/* staff board: table calls */
.calls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.calls:empty { display: none; }
.call-card { display: flex; align-items: center; gap: 12px; background: var(--warn-soft); color: var(--text); border: 1.5px solid var(--warn); border-radius: 12px; padding: 10px 12px 10px 14px; animation: callpulse 1.6s ease-in-out 3; }
.call-card b { font-size: 15px; }
@keyframes callpulse { 50% { box-shadow: 0 0 0 6px var(--warn-soft); } }
@media (prefers-reduced-motion: reduce) { .call-card { animation: none; } }
.tip-tag { color: var(--muted); font-size: 12px; margin-left: 4px; }

/* floors */
.floor-tabs { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.floor-tablist { display: flex; flex-wrap: wrap; gap: 6px; }
.ftab { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 14px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.ftab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.ftab.active .muted { color: inherit; opacity: .75; }
.ftab.add { border-style: dashed; color: var(--muted); }
.floor-tools { display: flex; gap: 6px; }
.danger-text { color: var(--danger, #c0392b); }
.muted-btn { opacity: .7; }

/* Checkout: "Pay now" or "Pay the waiter at the end" (venues that offer the choice). */
.pay-how { margin-top: 14px; }
.pay-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-opt { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; min-height: 64px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; font: inherit; cursor: pointer; padding: 10px 12px; }
.pay-opt .pay-ic { grid-row: span 2; font-size: 20px; }
.pay-opt small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.pay-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.demo-note.later-note { background: var(--accent-soft); color: var(--text); }
/* "Which bill?" (friends at one table paying separately) */
.bill-opts { display: grid; gap: 8px; }
.bill-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; min-height: 56px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 12px; font: inherit; cursor: pointer; padding: 10px 12px; }
.bill-opt > span { display: grid; gap: 2px; }
.bill-opt small { color: var(--muted); font-size: 12px; }
.bill-opt i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); }
.bill-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.bill-opt.on i { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.bill-opt .you { justify-self: start; }
.you { font-size: 11px; white-space: nowrap; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; }
.bill-name { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.bill-name input { font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 11px 12px; }
.bill-name input:focus { outline: none; border-color: var(--accent); }
.bill-tab { border: 1px solid var(--border); border-radius: 12px; padding: 4px 12px; margin-bottom: 10px; }
.bill-tab.mine { border-color: var(--accent); }
.bill-tab-h { display: flex; align-items: center; gap: 8px; padding: 8px 0 4px; }
.bill-tab-h .num { margin-left: auto; font-weight: 700; }

/* ---------------------------------------------- receipt: checkout box and receipt page */
.rc-toggle { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; text-align: left; border: 1.5px dashed var(--border); background: var(--surface); color: var(--text); border-radius: 12px; font: inherit; cursor: pointer; padding: 10px 12px; }
.rc-toggle > span:nth-child(2) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.rc-toggle small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-toggle i { font-style: normal; color: var(--muted); font-size: 20px; }
.rc-box { margin-top: 14px; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px; }
.rc-box .bill-name:first-of-type { margin-top: 6px; }
.rc-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.rc-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.mine-rc { display: block; margin: -4px 0 10px 12px; color: var(--accent); }

.rc-page { max-width: 560px; margin: 0 auto; padding: 16px 16px 40px; }
.rc-top { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.rc-doc { padding: 20px; }
.rc-doc header { margin-bottom: 14px; }
.rc-doc h1 { font-size: 22px; margin: 0 0 4px; }
.rc-meta { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.rc-lines, .rc-vat { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.rc-lines th, .rc-vat th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 0; }
.rc-lines td { padding: 7px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.rc-lines .num, .rc-vat .num { text-align: right; padding-left: 10px; white-space: nowrap; }
.rc-vat { font-size: 13px; color: var(--muted); }
.rc-vat td { padding: 3px 0; }
.rc-paid { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.rc-customer { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); display: grid; gap: 2px; }
.rc-actions { display: grid; gap: 10px; margin-top: 14px; }
.rc-mail { display: flex; gap: 8px; }
.rc-mail input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.rc-company { display: grid; gap: 8px; padding: 14px; }
.rc-review { margin-top: 16px; padding: 18px; display: grid; gap: 12px; text-align: center; }
.rc-review h2 { margin: 0; font-size: 20px; }
.rc-review textarea { font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 12px; resize: vertical; }
.stars { display: flex; justify-content: center; gap: 4px; }
.stars button, .stars span { font-size: 38px; line-height: 1; background: none; border: 0; padding: 2px; cursor: pointer; color: var(--border); }
.stars .on { color: #f5b301; }
.stars.done span { cursor: default; font-size: 30px; }
.rc-google { text-decoration: none; }
@media print {
  .no-print, .rc-top, #toasts { display: none !important; }
  body { background: #fff !important; }
  .rc-doc { box-shadow: none !important; border: 0 !important; }
}

/* platform console: two-step sign-in */
.mfa-qr { display: grid; place-items: center; }
.mfa-qr svg { width: 190px; height: 190px; background: #fff; border-radius: 12px; padding: 6px; }
.mfa-codes { columns: 2; margin: 0; padding-left: 22px; line-height: 1.9; }
