/* =========================================================
   KEBABIYA — admin panel
   Light work surface, dark brand sidebar, gold accents.
   ========================================================= */
:root{
  --bg:#f2f0e8; --panel:#fff; --panel-2:#f8f7f3; --line:#e5e2d8; --line-2:#d6d2c5;
  --ink:#161616; --ink-2:#3a433e; --muted:#6c726d; --faint:#9aa09b;
  --brand:#111111; --brand-2:#1c1c1c; --gold:#e3c27a; --gold-2:#f3dca2; --gold-ink:#7d6230;
  --ok:#1f8a6e; --ok-bg:#e3f3ed; --warn:#b77a00; --warn-bg:#fdf1d6; --late:#c93b3b; --late-bg:#fbe4e2; --info:#2f6fb5; --info-bg:#e3eefa;
  --bar:#b8860b; --card:#1f8a6e; --cash:#b8860b;
  --f:"Poppins",system-ui,-apple-system,"Segoe UI",sans-serif; --fd:"Montserrat","Poppins",system-ui,sans-serif;
  --r:16px; --shadow:0 1px 2px rgba(20,20,20,.05), 0 8px 24px -16px rgba(20,20,20,.18);
  --ease:cubic-bezier(.22,1,.36,1);
}
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{ margin:0; background:var(--bg); color:var(--ink); font:400 14px/1.5 var(--f); -webkit-font-smoothing:antialiased; }
[hidden]{ display:none !important; }
h1,h2,h3,p{ margin:0; }
a{ color:inherit; }
button,input,select{ font:inherit; color:inherit; }
button{ cursor:pointer; }
:focus-visible{ outline:2px solid var(--gold-ink); outline-offset:2px; border-radius:8px; }
.alogo{ display:block; height:auto; }
.sr{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.mono{ font-variant-numeric:tabular-nums; font-family:ui-monospace,"SF Mono",Consolas,monospace; font-size:12.5px; }
.ad-muted{ color:var(--muted); font-size:13px; }

/* ---------- buttons ---------- */
.ad-btn{ display:inline-flex; align-items:center; justify-content:center; gap:6px; height:40px; padding:0 16px; border:0; border-radius:10px;
  font:600 13.5px/1 var(--f); text-decoration:none; white-space:nowrap; transition:background .15s, box-shadow .15s, transform .1s; }
.ad-btn:active{ transform:scale(.98); }
.ad-btn:disabled{ opacity:.5; cursor:progress; }
.ad-btn--sm{ height:32px; padding:0 12px; font-size:12.5px; border-radius:8px; }
.ad-btn--block{ display:flex; width:100%; }
.ad-btn--primary{ background:var(--ink); color:#fff; }
.ad-btn--primary:hover{ background:#26322c; }
.ad-btn--dark{ background:var(--brand); color:var(--gold); }
.ad-btn--dark:hover{ background:#232c27; }
.ad-btn--ghost{ background:var(--panel); color:var(--ink-2); box-shadow:inset 0 0 0 1px var(--line-2); }
.ad-btn--ghost:hover{ background:var(--panel-2); }
.ad-btn--ok{ background:var(--ok); color:#fff; }
.ad-btn--ok:hover{ background:#197560; }
.ad-btn--danger{ background:var(--late-bg); color:var(--late); }
.ad-btn.is-confirm,.ad-link.is-confirm{ background:var(--late); color:#fff; box-shadow:none; }
.ad-btn.is-nudge{ background:var(--warn-bg); color:var(--warn); box-shadow:inset 0 0 0 1px var(--warn); }
.ad-btnrow{ display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.ad-link{ border:0; background:none; padding:4px 6px; border-radius:6px; color:var(--ink-2); font-size:12.5px; font-weight:500; text-decoration:underline; text-underline-offset:3px; text-decoration-color:var(--line-2); }
.ad-link:hover{ text-decoration-color:currentColor; }
.ad-link--danger{ color:var(--late); }

/* ---------- chips ---------- */
.ad-chip{ display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:100px; font:600 11.5px/1.4 var(--f); background:var(--panel-2); color:var(--ink-2); white-space:nowrap; }
.ad-chip::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.ad-chip.lv-ok,.ad-chip.st-served,.ad-chip.st-ready{ background:var(--ok-bg); color:var(--ok); }
.ad-chip.lv-warn,.ad-chip.st-new,.ad-chip.st-cooking{ background:var(--warn-bg); color:var(--warn); }
.ad-chip.lv-late,.ad-chip.st-cancelled{ background:var(--late-bg); color:var(--late); }
.ad-chip.lv-free{ background:#eeede8; color:var(--muted); }
.ad-chip.role-admin{ background:#161616; color:var(--gold); }
.ad-chip.role-kitchen{ background:var(--warn-bg); color:var(--warn); }
.ad-chip.role-waiter{ background:var(--info-bg); color:var(--info); }
.ad-chip.role-admin::before,.ad-chip.role-kitchen::before,.ad-chip.role-waiter::before{ display:none; }

/* =========================================================
   SIGN IN
   ========================================================= */
.ad-login{ min-height:100vh; background:var(--brand); }
.lg{ display:grid; grid-template-columns:1.1fr 1fr; min-height:100vh; }
.lg__brand{ display:flex; flex-direction:column; justify-content:center; padding:8vw; color:#f4ead7;
  background:radial-gradient(80% 60% at 20% 20%, rgba(227,194,122,.14), transparent 60%), var(--brand); }
.lg__logo{ width:220px; }
.lg__tag{ margin:22px 0 26px; font:800 13px/1 var(--fd); letter-spacing:.28em; text-transform:uppercase; color:var(--gold); }
.lg__list{ list-style:none; margin:0; padding:0; display:grid; gap:12px; font-size:15px; color:#cfc9b8; }
.lg__list li{ display:flex; gap:12px; align-items:center; }
.lg__list li::before{ content:""; width:22px; height:22px; flex:none; border-radius:50%; background:rgba(227,194,122,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f9dd8b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center/13px no-repeat; }
.lg__card{ align-self:center; justify-self:center; width:min(420px, 90%); padding:40px; border-radius:24px; background:var(--panel); box-shadow:0 30px 80px -30px rgba(0,0,0,.6); }
.lg__card h1{ font:800 28px/1.1 var(--fd); }
.lg__sub{ margin:6px 0 24px; color:var(--muted); }
.lg__err{ margin:0 0 16px; padding:11px 14px; border-radius:10px; background:var(--late-bg); color:var(--late); font-weight:500; }
.lg__form{ display:grid; gap:14px; }
.lg__form label span,.ad-form label > span,.ad-inline label span{ display:block; margin-bottom:6px; font-size:12.5px; font-weight:600; color:var(--ink-2); }
.lg__form input,.ad-form input,.ad-inline input,.ad-inline select,.ad-date input,.ad-late input{
  width:100%; height:44px; padding:0 14px; border:0; border-radius:10px; background:var(--panel-2); box-shadow:inset 0 0 0 1px var(--line-2); transition:box-shadow .15s; }
.lg__form input:focus,.ad-form input:focus,.ad-inline input:focus,.ad-inline select:focus,.ad-date input:focus,.ad-late input:focus{ outline:none; box-shadow:inset 0 0 0 2px var(--ink); background:#fff; }
.lg__form .ad-btn{ height:48px; margin-top:6px; font-size:14.5px; }
.lg__foot{ margin-top:18px; font-size:12.5px; color:var(--muted); text-align:center; }
@media (max-width:860px){ .lg{ grid-template-columns:1fr; } .lg__brand{ padding:40px 24px 10px; align-items:center; text-align:center; } .lg__list{ display:none; } .lg__logo{ width:160px; } .lg__card{ margin:20px auto 40px; padding:28px; } }

/* =========================================================
   SHELL
   ========================================================= */
.ad-shell{ display:grid; grid-template-columns:240px 1fr; min-height:100vh; }
.ad-side{ position:sticky; top:0; height:100vh; display:flex; flex-direction:column; padding:18px 14px; background:var(--brand); color:#d9d3c2; }
.ad-side__brand{ display:flex; align-items:center; gap:10px; padding:4px 8px 20px; text-decoration:none; border-bottom:1px solid rgba(227,194,122,.12); }
.ad-side__logo{ width:54px; }
.ad-side__brand span{ display:flex; flex-direction:column; line-height:1.15; }
.ad-side__word{ width:118px; }
.ad-side__brand small{ font:700 10.5px/1 var(--f); letter-spacing:.2em; text-transform:uppercase; color:var(--gold); margin-top:4px; }
.ad-nav{ display:grid; gap:4px; margin-top:16px; }
.ad-nav__a{ position:relative; display:flex; align-items:center; gap:12px; height:44px; padding:0 12px; border-radius:12px; text-decoration:none; font-weight:500; color:#bfb9a8; transition:background .15s, color .15s; }
.ad-nav__a svg{ width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ad-nav__a:hover{ background:rgba(227,194,122,.07); color:#f4ead7; }
.ad-nav__a.is-on{ background:var(--gold); color:var(--brand); font-weight:600; }
.ad-nav__n{ margin-left:auto; min-width:22px; height:22px; padding:0 7px; display:grid; place-items:center; border-radius:100px; background:var(--late); color:#fff; font:700 11.5px/1 var(--f); }
.ad-side__me{ margin-top:auto; display:flex; align-items:center; gap:10px; padding:14px 8px 4px; border-top:1px solid rgba(227,194,122,.12); }
.ad-avatar{ width:36px; height:36px; flex:none; display:grid; place-items:center; border-radius:50%; background:var(--gold); color:var(--brand); font:800 15px/1 var(--fd); }
.ad-side__who{ display:flex; flex-direction:column; min-width:0; line-height:1.25; }
.ad-side__who b{ color:#f4ead7; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ad-side__who small{ color:#9d9786; font-size:12px; }
.ad-side__me form{ margin-left:auto; }
.ad-side__out{ display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:10px; background:rgba(227,194,122,.08); color:#d9d3c2; }
.ad-side__out:hover{ background:rgba(227,194,122,.16); color:var(--gold); }
.ad-side__out svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.ad-main{ min-width:0; }
.ad-top{ position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 28px; background:rgba(243,242,238,.9); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.ad-top h1{ font:800 24px/1.1 var(--fd); letter-spacing:-.01em; }
.ad-top p{ margin-top:3px; color:var(--muted); font-size:13px; }
.ad-top__tools{ display:flex; align-items:center; gap:12px; }
.ad-conn{ display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:500; color:var(--muted); }
.ad-conn i{ width:8px; height:8px; border-radius:50%; background:var(--faint); }
.ad-conn.is-ok i{ background:var(--ok); box-shadow:0 0 0 4px var(--ok-bg); animation:pulse 2s infinite; }
.ad-conn.is-bad i{ background:var(--late); }
.ad-clock{ font:700 14px/1 var(--fd); color:var(--ink-2); white-space:nowrap; }
@keyframes pulse{ 50%{ opacity:.35; } }
.ad-body{ padding:24px 28px 60px; display:grid; gap:20px; transition:opacity .2s; }
.ad-body.is-loading{ opacity:.55; }

@media (max-width:1000px){
  .ad-shell{ grid-template-columns:1fr; }
  .ad-side{ position:sticky; z-index:30; height:auto; flex-direction:row; align-items:center; gap:10px; padding:10px 12px; overflow-x:auto; scrollbar-width:none; }
  .ad-side::-webkit-scrollbar{ display:none; }
  .ad-side__brand{ padding:0 4px 0 0; border:0; flex:none; }
  .ad-side__brand span{ display:none; }
  .ad-side__logo{ width:44px; }
  .ad-nav{ display:flex; margin:0; gap:4px; }
  .ad-nav__a{ height:38px; padding:0 12px; flex:none; font-size:13px; }
  .ad-side__me{ margin:0 0 0 auto; padding:0; border:0; flex:none; }
  .ad-side__who,.ad-avatar{ display:none; }
  .ad-top{ position:static; padding:16px; flex-wrap:wrap; }
  .ad-body{ padding:16px 16px 40px; }
}
@media (max-width:640px){ .ad-nav__a span{ display:none; } .ad-nav__a.is-on span{ display:inline; } .ad-clock{ display:none; } }

/* ---------- panels ---------- */
.ad-panel{ padding:20px; border-radius:var(--r); background:var(--panel); box-shadow:var(--shadow); min-width:0; }
.ad-panel__h{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; margin-bottom:16px; }
.ad-panel__h h2{ font:700 16px/1.2 var(--fd); }
.ad-panel__h--gap{ margin-top:28px; padding-top:20px; border-top:1px solid var(--line); margin-bottom:6px; }
.ad-two{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:20px; }
.ad-two--top{ align-items:start; }
@media (max-width:1100px){ .ad-two{ grid-template-columns:1fr; } }
.ad-empty{ margin:0; padding:22px 14px; border-radius:12px; border:1.5px dashed var(--line-2); text-align:center; color:var(--faint); font-size:13.5px; }
.ad-note{ font-size:13px; color:var(--muted); margin:-6px 2px 0; }
.ad-note.is-warn,.ad-note--demo{ padding:10px 14px; margin:0; border-radius:10px; background:var(--warn-bg); color:#7a5200; }

/* segmented control */
.ad-seg{ display:inline-flex; padding:3px; border-radius:11px; background:#ebe9e2; gap:2px; }
.ad-seg button{ height:32px; padding:0 13px; border:0; border-radius:8px; background:transparent; font-size:13px; font-weight:500; color:var(--ink-2); }
.ad-seg button[aria-checked="true"]{ background:#fff; color:var(--ink); font-weight:600; box-shadow:0 1px 3px rgba(20,20,20,.12); }
.ad-seg--sm button{ height:28px; font-size:12.5px; }

/* KPI tiles */
.ad-kpis{ display:grid; grid-template-columns:repeat(6, minmax(0, 1fr)); gap:14px; }
.ad-kpis--5{ grid-template-columns:repeat(5, minmax(0, 1fr)); }
.ad-kpi{ padding:16px 18px; border-radius:var(--r); background:var(--panel); box-shadow:var(--shadow); min-width:0; }
.ad-kpi span{ display:block; font-size:12.5px; font-weight:500; color:var(--muted); }
.ad-kpi b{ display:block; margin:6px 0 2px; font:800 26px/1.1 var(--fd); letter-spacing:-.01em; font-variant-numeric:tabular-nums; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ad-kpi small{ color:var(--faint); font-size:12px; }
.ad-kpi--alert.is-on{ background:var(--late-bg); box-shadow:inset 0 0 0 1.5px var(--late); }
.ad-kpi--alert.is-on b{ color:var(--late); }
@media (max-width:1300px){ .ad-kpis{ grid-template-columns:repeat(3, minmax(0, 1fr)); } .ad-kpis--5{ grid-template-columns:repeat(3, minmax(0, 1fr)); } }
@media (max-width:600px){ .ad-kpis,.ad-kpis--5{ grid-template-columns:repeat(2, minmax(0, 1fr)); } .ad-kpi b{ font-size:21px; } }

/* =========================================================
   SUMMARY
   ========================================================= */
.ad-attn__list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.ad-attn__ok{ padding:14px 16px; border-radius:12px; background:var(--ok-bg); color:var(--ok); font-weight:600; }
.ad-attn__i{ display:grid; grid-template-columns:64px 1fr auto auto; align-items:center; gap:14px; padding:10px 14px; border-radius:12px; background:var(--panel-2); box-shadow:inset 3px 0 0 var(--warn); }
.ad-attn__i.lv-late{ box-shadow:inset 3px 0 0 var(--late); background:#fdf3f2; }
.ad-attn__t{ font:800 18px/1 var(--fd); }
.ad-attn__what{ font-weight:500; }
.ad-attn__min{ font:800 17px/1 var(--fd); font-variant-numeric:tabular-nums; }
@media (max-width:600px){ .ad-attn__i{ grid-template-columns:48px 1fr auto; } .ad-attn__i .ad-chip{ display:none; } }

.ad-legend{ display:flex; flex-wrap:wrap; gap:16px; margin:-4px 0 14px; font-size:12.5px; color:var(--muted); }
.ad-legend span{ display:inline-flex; align-items:center; gap:6px; }
.ad-legend i{ width:10px; height:10px; border-radius:3px; }
.ad-legend .is-free{ background:#d8d5cc; } .ad-legend .is-ok{ background:var(--ok); } .ad-legend .is-warn{ background:var(--warn); } .ad-legend .is-late{ background:var(--late); }
.ad-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:12px; }
.tcard{ display:flex; flex-direction:column; gap:4px; min-height:150px; padding:14px 16px; border-radius:14px; background:var(--panel-2); box-shadow:inset 0 0 0 1px var(--line), inset 0 4px 0 #d8d5cc; }
.tcard.lv-ok{ box-shadow:inset 0 0 0 1px var(--line), inset 0 4px 0 var(--ok); background:#fff; }
.tcard.lv-warn{ box-shadow:inset 0 0 0 1px #f0d9a4, inset 0 4px 0 var(--warn); background:#fffaf0; }
.tcard.lv-late{ box-shadow:inset 0 0 0 1.5px var(--late), inset 0 4px 0 var(--late); background:#fff6f5; }
.tcard__h{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin:4px 0 6px; }
.tcard__h b{ font:900 24px/1 var(--fd); }
.tcard__seats{ display:block; margin-top:4px; font:600 11.5px/1 var(--f); color:var(--muted); letter-spacing:.02em; }
.tcard__what{ font-weight:500; color:var(--ink-2); font-size:13px; }
.tcard.lv-free .tcard__what{ color:var(--faint); }
.tcard__min{ font-size:13px; color:var(--muted); }
.tcard__min b{ font:800 28px/1 var(--fd); color:var(--ink); font-variant-numeric:tabular-nums; }
.tcard.lv-late .tcard__min b{ color:var(--late); }
.tcard.lv-warn .tcard__min b{ color:var(--warn); }
.tcard__more{ list-style:none; margin:4px 0 0; padding:0; font-size:12px; color:var(--muted); }
.tcard__more li.lv-late{ color:var(--late); font-weight:600; }
.tcard__more li.lv-warn{ color:var(--warn); font-weight:600; }
.tcard__foot{ margin-top:auto; padding-top:8px; font-size:12px; color:var(--muted); border-top:1px dashed var(--line); }

/* =========================================================
   KITCHEN & WAITER BOARDS
   ========================================================= */
.ad-cols{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; align-items:start; }
@media (max-width:1000px){ .ad-cols{ grid-template-columns:1fr; } }
.ad-col h2{ display:flex; align-items:center; gap:8px; margin:0 2px 12px; font:700 14.5px/1 var(--fd); }
.ad-col h2 b{ margin-left:auto; min-width:26px; height:26px; padding:0 8px; display:grid; place-items:center; border-radius:100px; background:var(--panel); box-shadow:inset 0 0 0 1px var(--line-2); font:700 13px/1 var(--f); }
.dot{ width:10px; height:10px; border-radius:50%; }
.dot--new{ background:var(--warn); } .dot--cook{ background:#e0683f; } .dot--ready{ background:var(--ok); } .dot--call{ background:var(--info); } .dot--bill{ background:var(--ink); }
.ad-list{ display:grid; gap:12px; }
.ad-list--done{ grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); margin-top:12px; }
.ad-done summary{ cursor:pointer; font:700 14px/1 var(--fd); color:var(--muted); padding:8px 2px; }
.ad-done summary b{ margin-left:6px; color:var(--ink); }

.tk{ padding:14px 16px; border-radius:14px; background:var(--panel); box-shadow:var(--shadow), inset 4px 0 0 var(--line-2); }
.tk.is-new.tk--order{ box-shadow:var(--shadow), inset 4px 0 0 var(--warn); }
.tk.is-cooking{ box-shadow:var(--shadow), inset 4px 0 0 #e0683f; }
.tk.is-ready{ box-shadow:var(--shadow), inset 4px 0 0 var(--ok); }
.tk--waiter.is-new{ box-shadow:var(--shadow), inset 4px 0 0 var(--info); }
.tk--bill.is-new{ box-shadow:var(--shadow), inset 4px 0 0 var(--ink); }
.tk.lv-late{ background:#fff6f5; box-shadow:var(--shadow), inset 0 0 0 1.5px var(--late), inset 4px 0 0 var(--late); }
.tk.is-fresh{ animation:tkIn .6s var(--ease), tkGlow 1.2s 3; }
@keyframes tkIn{ from{ transform:translateY(-10px); opacity:0; } }
@keyframes tkGlow{ 50%{ box-shadow:var(--shadow), 0 0 0 6px rgba(227,194,122,.7); } }
.ad-list--done .tk{ opacity:.75; box-shadow:inset 0 0 0 1px var(--line); }
.tk__h{ display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.tk__table{ font:900 22px/1 var(--fd); }
.tk__kind{ font-size:12.5px; color:var(--muted); font-weight:500; }
.tk__age{ margin-left:auto; padding:4px 10px; border-radius:100px; background:var(--panel-2); font:700 12px/1.3 var(--f); font-variant-numeric:tabular-nums; box-shadow:inset 0 0 0 1px var(--line); }
.tk.lv-warn .tk__age{ background:var(--warn-bg); color:var(--warn); box-shadow:none; }
.tk.lv-late .tk__age{ background:var(--late); color:#fff; box-shadow:none; }
.tk__items{ list-style:none; margin:0; padding:0; display:grid; gap:5px; }
.tk__items li{ display:flex; gap:10px; font-size:15px; line-height:1.35; }
.tk__items b{ min-width:28px; font:800 15px/1.35 var(--fd); color:var(--gold-ink); }
.tk__note{ margin-top:10px; padding:8px 12px; border-radius:10px; background:var(--warn-bg); color:#6b4a00; font-size:13.5px; }
.tk__big{ font:700 17px/1.3 var(--fd); }
.tk__meta{ margin-top:8px; font-size:12.5px; color:var(--muted); }
.tk__act{ display:flex; gap:8px; margin-top:12px; }
.tk__act .ad-btn:not(.ad-btn--sm){ flex:1; height:44px; font-size:14px; }

/* =========================================================
   TABLES & QR
   ========================================================= */
.ad-tbar{ display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:16px; }
.ad-tbar__right{ display:flex; align-items:center; gap:14px; }
.ad-inline{ display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; }
.ad-inline label{ min-width:140px; }
.ad-inline--wrap{ margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.ad-inline--wrap label{ flex:1 1 160px; }
.ad-inline--tight{ margin-top:8px; flex-wrap:nowrap; }
.ad-inline--tight input{ height:32px; min-width:150px; }
.ad-qrgrid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:14px; }
.qcard{ display:flex; flex-direction:column; align-items:center; gap:10px; padding:16px; border-radius:var(--r); background:var(--panel); box-shadow:var(--shadow); }
.qcard__qr{ width:150px; height:150px; padding:8px; border-radius:12px; background:#fff; box-shadow:inset 0 0 0 1px var(--line); }
.qcard__qr img,.qcard__qr canvas{ display:block; width:100% !important; height:100% !important; image-rendering:pixelated; }
.qcard__name{ display:flex; align-items:baseline; gap:6px; }
.qcard__name span{ font-size:12px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.12em; }
.qcard__name b{ font:900 24px/1 var(--fd); }
.qcard__seats{ display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600; color:var(--ink-2); }
.qcard__seats select{ height:32px; padding:0 10px; border:0; border-radius:8px; background:var(--bg, #f3f1ec); font:600 13px var(--f); color:var(--ink); cursor:pointer; }
.qcard__seats select:focus{ outline:none; box-shadow:inset 0 0 0 2px var(--ink); }
.ad-seats{ min-width:120px !important; }
.qcard__act{ display:flex; gap:6px; flex-wrap:wrap; justify-content:center; }
.qcard__more{ display:flex; gap:2px; flex-wrap:wrap; justify-content:center; padding-top:8px; border-top:1px solid var(--line); width:100%; }
.qcard__edit{ display:flex; gap:6px; width:100%; }
.qcard__edit input{ flex:1; min-width:0; height:32px; padding:0 10px; border:0; border-radius:8px; background:var(--panel-2); box-shadow:inset 0 0 0 1.5px var(--ink); text-transform:uppercase; }

/* print sheet */
.pr{ background:#e9e6dd; }
.pr-bar{ display:flex; align-items:center; justify-content:space-between; gap:20px; max-width:1000px; margin:0 auto; padding:20px; }
.pr-bar b{ display:block; font:800 18px/1.2 var(--fd); }
.pr-bar span{ color:var(--muted); font-size:13px; }
.pr-sheet{ display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:20px; max-width:1000px; margin:0 auto; padding:0 20px 40px; }
.pr-card{ display:flex; flex-direction:column; align-items:center; padding:26px 22px 22px; border-radius:24px; background:var(--brand); color:#f4ead7; text-align:center; break-inside:avoid; page-break-inside:avoid; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.pr-card__logo{ width:150px; }
.pr-card__table{ margin:16px 0 14px; font:700 12px/1 var(--f); letter-spacing:.3em; text-transform:uppercase; color:var(--gold); }
.pr-card__seats{ margin:-6px 0 10px; font:600 13px/1 var(--f); letter-spacing:.18em; text-transform:uppercase; color:#cfc4ad; }
.pr-card__table b{ display:block; margin-top:6px; font:900 54px/.9 var(--fd); letter-spacing:-.01em; color:#f4ead7; }
.pr-card__qr{ width:200px; height:200px; padding:12px; border-radius:18px; background:#fff; }
.pr-card__qr img,.pr-card__qr canvas{ display:block; width:100% !important; height:100% !important; image-rendering:pixelated; }
.pr-card__scan{ margin:16px 0 8px; font:900 18px/1 var(--fd); text-transform:uppercase; }
.pr-card__do{ list-style:none; display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin:0; padding:0; }
.pr-card__do li{ padding:6px 10px; border-radius:100px; background:var(--gold); color:var(--brand); font:600 11.5px/1 var(--f); }
.pr-card__wifi{ margin-top:14px; font-size:12.5px; color:#b9b5a6; }
.pr-card__wifi b{ color:#f4ead7; font-weight:600; }
@media print{
  @page{ size:A4; margin:8mm; }
  .pr{ background:#fff; }
  .pr-bar{ display:none; }
  .pr-sheet{ grid-template-columns:repeat(2, 1fr); grid-auto-rows:136mm; gap:6mm; padding:0; max-width:none; }
  .pr-card{ border-radius:5mm; outline:1px dashed #999; outline-offset:2mm; justify-content:center; }
  .pr-card:nth-child(4n){ break-after:page; page-break-after:always; }
}

/* =========================================================
   ANALYTICS
   ========================================================= */
.ad-filters{ display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; }
.ad-date{ display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600; color:var(--ink-2); }
.ad-date input{ height:38px; width:auto; padding:0 10px; }
.ad-chart{ position:relative; min-height:280px; }
.ad-chart--sm{ min-height:220px; }
.ad-svg{ display:block; width:100%; height:auto; overflow:visible; }
.ad-svg .grid{ stroke:#ecebe5; stroke-width:1; }
.ad-svg .base{ stroke:#c9c5b9; stroke-width:1; }
.ad-svg .ylab,.ad-svg .xlab{ fill:var(--muted); font:500 11px var(--f); font-variant-numeric:tabular-nums; }
.ad-svg .bar{ fill:var(--bar); transition:opacity .15s; }
.ad-svg.is-hover .bar{ opacity:.45; }
.ad-svg.is-hover .bar.is-on{ opacity:1; }
.ad-svg .hit{ fill:transparent; cursor:default; }
.ad-tip{ position:absolute; z-index:50; pointer-events:none; display:flex; flex-direction:column; gap:2px; padding:8px 12px; border-radius:10px; background:var(--ink); color:#fff; font-size:12px; box-shadow:0 10px 30px -10px rgba(0,0,0,.5); white-space:nowrap; }
.ad-tip b{ font:700 14px/1.2 var(--fd); font-variant-numeric:tabular-nums; }
.ad-tip span{ color:#c8cbc8; }
.ad-rank{ list-style:none; margin:0; padding:0; display:grid; gap:12px; counter-reset:r; }
.ad-rank li{ counter-increment:r; }
.ad-rank__t{ display:flex; justify-content:space-between; gap:12px; font-size:13.5px; margin-bottom:5px; }
.ad-rank__t span{ font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ad-rank__t span::before{ content:counter(r) ". "; color:var(--faint); font-variant-numeric:tabular-nums; }
.ad-rank__t b{ flex:none; font-weight:600; color:var(--ink-2); font-variant-numeric:tabular-nums; }
.ad-rank__bar{ height:8px; border-radius:4px; background:#f0eee8; overflow:hidden; }
.ad-rank__bar i{ display:block; height:100%; border-radius:0 4px 4px 0; background:var(--bar); }
.ad-split{ display:flex; gap:2px; height:22px; border-radius:6px; overflow:hidden; background:#fff; }
.ad-split i{ display:block; flex-basis:0; }
.ad-split__cash{ background:var(--cash); }
.ad-split__card{ background:var(--card); }
.ad-split__legend{ list-style:none; margin:18px 0 0; padding:0; display:grid; gap:10px; }
.ad-split__legend li{ display:grid; grid-template-columns:14px 1fr auto 48px; align-items:center; gap:10px; font-size:14px; }
.ad-split__legend i{ width:12px; height:12px; border-radius:3px; }
.ad-split__legend b{ font-weight:600; font-variant-numeric:tabular-nums; }
.ad-split__legend small{ text-align:right; color:var(--muted); font-variant-numeric:tabular-nums; }
.ad-tablewrap{ overflow-x:auto; margin:0 -4px; }
.ad-table{ width:100%; border-collapse:collapse; font-size:13.5px; }
.ad-table th{ text-align:left; font-size:12px; font-weight:600; color:var(--muted); padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
.ad-table td{ padding:10px; border-bottom:1px solid #efede6; vertical-align:middle; }
.ad-table tr:last-child td{ border-bottom:0; }
.ad-table .num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ad-table__items{ max-width:420px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink-2); }
.ad-table__act{ text-align:right; white-space:nowrap; }
.ad-table td.ad-empty{ border:0; }

/* =========================================================
   SETTINGS
   ========================================================= */
.ad-form{ display:grid; gap:16px; }
.ad-form small{ display:block; margin-top:6px; font-size:12px; color:var(--muted); }
.ad-form .ad-btn{ justify-self:start; }
.ad-late{ margin:0; padding:14px 16px; border:1px solid var(--line); border-radius:12px; display:grid; gap:8px; }
.ad-late legend{ padding:0 6px; font-size:12.5px; font-weight:600; color:var(--ink-2); }
.ad-late__row{ display:grid; grid-template-columns:1fr 80px 80px; gap:8px; align-items:center; font-size:13.5px; }
.ad-late__row input{ height:36px; text-align:center; }
.ad-late__row input:first-of-type{ box-shadow:inset 0 0 0 1px #ecd39a; background:#fffaf0; }
.ad-late__row input:last-of-type{ box-shadow:inset 0 0 0 1px #f0bdb8; background:#fff6f5; }

/* toast */
.ad-toast{ position:fixed; z-index:100; left:50%; bottom:24px; transform:translate(-50%, 16px); opacity:0; max-width:calc(100% - 32px); padding:12px 18px; border-radius:12px; background:var(--ink); color:#fff; font-weight:500; box-shadow:0 16px 40px -12px rgba(0,0,0,.45); transition:transform .25s var(--ease), opacity .25s; }
.ad-toast.is-on{ transform:translate(-50%, 0); opacity:1; }
.ad-toast.is-bad{ background:var(--late); }
@media (prefers-reduced-motion:reduce){ *,*::before,*::after{ animation-duration:.01ms !important; transition-duration:.01ms !important; } }

/* ---------- live clocks & cooking countdown ---------- */
.tick{ font-variant-numeric:tabular-nums; }
.cd{ margin-top:10px; padding:9px 11px 10px; border-radius:10px; background:var(--ok-bg); color:var(--ok); }
.cd__top{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; font-size:12px; }
.cd__lab{ font-weight:500; opacity:.85; }
.cd__left{ font:800 14px/1 var(--f); font-variant-numeric:tabular-nums; white-space:nowrap; }
.cd__bar{ margin-top:7px; height:6px; border-radius:6px; background:rgba(0,0,0,.08); overflow:hidden; }
.cd__bar i{ display:block; height:100%; width:0; border-radius:6px; background:currentColor; transition:width 1s linear; }
.cd.is-close{ background:var(--warn-bg); color:var(--warn); }
.cd.is-due{ background:var(--warn-bg); color:var(--warn); box-shadow:inset 0 0 0 1.5px var(--warn); }
.cd.is-over{ background:var(--late-bg); color:var(--late); box-shadow:inset 0 0 0 1.5px var(--late); animation:cdPulse 1.6s ease-in-out infinite; }
@keyframes cdPulse{ 50%{ box-shadow:inset 0 0 0 3px var(--late); } }
.tcard .cd{ margin-top:8px; }
@media (prefers-reduced-motion: reduce){ .cd.is-over{ animation:none; } .cd__bar i{ transition:none; } }
