/* DukanPOS v2 — design system (mobile-first, desktop-dense) */
:root {
  --brand: #4568dc; --brand-600: #2f52c8; --brand-700: #244cbc; --brand-50: #eef2fd; --brand-100: #dfe6fb; --brand-ink: #fff;
  --nav: #0f1b3d; --nav-2: #18275a; --nav-text: #b8c3e6;
  --btn-sm-h: 34px;
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f8fafc; --surface-3: #eef1f6;
  --border: #e5e8ef; --border-strong: #cfd5e1;
  --text: #0f172a; --text-2: #334155; --muted: #64748b;
  --ok: #0f9d58; --ok-bg: #e7f6ee; --warn: #b45309; --warn-bg: #fef3c7; --danger: #dc2626; --danger-bg: #fdecec; --info: #2563eb; --info-bg: #e8f0fe;
  --wa-wall: #efe7de; --wa-bubble: #ffffff; --wa-ink: #111b21; --wa-meta: #667781; --wa: #25d366; --wa-dark: #128c4b; --wa-out: #d9fdd3; --wa-head: #008069; --wa-frame: #1f2937; --wa-send: #008069; --wa-tick: #53bdeb; --wa-ink-on: #ffffff;
  --veg: #0f9d58; --nonveg: #c0392b; --egg: #d4a106;
  --m-ink: #1b2a5e; --m-limb: #1b2a5e; --m-paper: #ffffff; --m-rule: #cfd5e1; --m-cheek: #ff8fa3; /* mascot (the smiling receipt) */
  --r: 7px; --r-sm: 5px; /* one corner size everywhere: 7px (cards, dialogs, inputs, buttons), 5px (small tags) */
  --radius: var(--r); --radius-sm: var(--r); --radius-xs: var(--r-sm);
  --shadow-1: 0 1px 2px rgba(15,23,42,.05);
  --shadow-2: 0 10px 30px rgba(15,23,42,.12);
  --shadow-3: 0 -10px 40px rgba(15,23,42,.18);
  --header-h: 58px; --nav-h: 64px; --rail-w: 88px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #7b95ef; --brand-600: #93a9f3; --brand-700: #a9bbf6; --brand-50: #1b2442; --brand-100: #243056; --brand-ink: #0b1230;
    --nav: #161a23; --nav-2: #222838; --nav-text: #9aa3b5;
    --bg: #0d1017; --surface: #161a23; --surface-2: #1b202b; --surface-3: #242a37;
    --border: #2a3040; --border-strong: #3a4256; --text: #eef1f6; --text-2: #c7cdd9; --muted: #8b94a7;
    --wa-wall: #0b141a; --wa-bubble: #202c33; --wa-ink: #e9edef; --wa-meta: #8696a0; --wa: #25d366; --wa-dark: #3fcf7a; --wa-out: #005c4b; --wa-head: #202c33; --wa-frame: #3b4352; --wa-send: #00a884; --wa-tick: #53bdeb; --wa-ink-on: #111b21;
    --ok: #3ecf7f; --ok-bg: #11291c; --warn: #f5b041; --warn-bg: #2e2410; --danger: #ff6b6b; --danger-bg: #331616; --info: #6aa1ff; --info-bg: #142039;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 10px 30px rgba(0,0,0,.5); --shadow-3: 0 -10px 40px rgba(0,0,0,.6);
    --m-ink: #1b2a5e; --m-limb: #c3cdee; --m-paper: #eef2fd; --m-rule: #b8c2d8; --m-cheek: #ff8fa3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #7b95ef; --brand-600: #93a9f3; --brand-700: #a9bbf6; --brand-50: #1b2442; --brand-100: #243056; --brand-ink: #0b1230;
  --nav: #161a23; --nav-2: #222838; --nav-text: #9aa3b5;
  --bg: #0d1017; --surface: #161a23; --surface-2: #1b202b; --surface-3: #242a37;
  --border: #2a3040; --border-strong: #3a4256; --text: #eef1f6; --text-2: #c7cdd9; --muted: #8b94a7;
  --wa-wall: #0b141a; --wa-bubble: #202c33; --wa-ink: #e9edef; --wa-meta: #8696a0; --wa: #25d366; --wa-dark: #3fcf7a; --wa-out: #005c4b; --wa-head: #202c33; --wa-frame: #3b4352; --wa-send: #00a884; --wa-tick: #53bdeb; --wa-ink-on: #111b21;
  --ok: #3ecf7f; --ok-bg: #11291c; --warn: #f5b041; --warn-bg: #2e2410; --danger: #ff6b6b; --danger-bg: #331616; --info: #6aa1ff; --info-bg: #142039;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 10px 30px rgba(0,0,0,.5); --shadow-3: 0 -10px 40px rgba(0,0,0,.6);
  --m-ink: #1b2a5e; --m-limb: #c3cdee; --m-paper: #eef2fd; --m-rule: #b8c2d8; --m-cheek: #ff8fa3;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overscroll-behavior-y: none; }
@media (min-width: 900px) { body { font-size: 14px; } }
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
img { max-width: 100%; }
.ic { flex: none; display: block; }
.ic.inline { display: inline-block; vertical-align: -3px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 11.5px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; } .center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; } [data-panel].stack:empty, [data-receipts].stack:empty { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .grid-2 { grid-template-columns: 1fr; } }
.hide { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-100); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; user-select: none; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(69,104,220,.3); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-dark { background: var(--text); border-color: var(--text); color: var(--surface); }
.btn-dark:hover { opacity: .9; border-color: var(--text); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { filter: brightness(.95); border-color: var(--ok); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn-soft { background: var(--surface-3); border-color: transparent; color: var(--text-2); }
.btn-soft:hover { background: var(--border); border-color: transparent; }
.btn-outline-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: var(--surface); }
.btn-outline-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-sm { min-height: var(--btn-sm-h); padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); gap: 6px; }
.btn-lg { min-height: 50px; font-size: 16px; border-radius: var(--r); }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid; border-color: currentColor transparent currentColor transparent; border-radius: 50%; animation: spin .7s linear infinite; color: var(--muted); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); border: 0; background: transparent; color: var(--text-2); flex: none; position: relative; }
.icon-btn:hover { background: var(--surface-3); }
.link-btn { border: 0; background: none; color: var(--brand); font-weight: 700; padding: 0; font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
@media (min-width: 900px) { .input, select.input { min-height: 40px; padding: 8px 12px; } }
textarea.input { min-height: 80px; resize: vertical; }
.input:hover { border-color: var(--muted); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.input.invalid { border-color: var(--danger); }
.input[readonly] { background: var(--surface-2); }
.field-error { color: var(--danger); font-size: 12.5px; }
.hint { color: var(--muted); font-size: 12.5px; }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 40px; background: var(--surface); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.switch { appearance: none; width: 42px; height: 24px; border-radius: var(--r); background: var(--border-strong); position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(18px); }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }
.pw { position: relative; } .pw .input { padding-right: 46px; } .pw .icon-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
.phone { display: flex; align-items: stretch; }
.phone span { display: grid; place-items: center; padding: 0 12px; background: var(--surface-3); border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--r) 0 0 var(--r); font-weight: 700; color: var(--text-2); min-width: 58px; }
.phone .input { border-radius: 0 var(--r) var(--r) 0; }

/* ---------- Chips, badges, segmented ---------- */
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 13.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--border-strong); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip .count { font-size: 11.5px; opacity: .7; font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 1.5; }
.badge-ok { background: var(--ok-bg); color: var(--ok); } .badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); } .badge-info { background: var(--info-bg); color: var(--info); }
.badge-brand { background: var(--brand-50); color: var(--brand); }
.food { display: inline-block; width: 13px; height: 13px; border: 1.5px solid; border-radius: 3px; position: relative; flex: none; background: var(--surface); }
.food::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: currentColor; }
.food-veg { color: var(--veg); } .food-nonveg { color: var(--nonveg); } .food-egg { color: var(--egg); }
.type-tabs, .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; background: var(--surface-3); border-radius: var(--r); padding: 3px; }
.type-tabs button, .seg button { border: 0; background: transparent; min-height: 36px; border-radius: var(--r); font-weight: 700; font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; white-space: nowrap; }
.type-tabs button.active, .seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.type-tabs button:disabled { opacity: .4; }

/* ---------- Cards, lists, tables ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-1); }
.card-pad { padding: 16px; }
@media (min-width: 900px) { .card-pad { padding: 20px; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); min-height: 52px; }
.card-head h3 { font-size: 15px; font-weight: 700; }
.card > .sheet-foot { border-radius: 0 0 var(--r) var(--r); }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: transparent; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; min-height: 60px; color: var(--text); text-decoration: none; font: inherit; }
.list-item:last-child { border-bottom: 0; }
button.list-item, a.list-item { cursor: pointer; transition: background .12s; }
button.list-item:hover, a.list-item:hover { background: var(--surface-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item.unread { background: color-mix(in srgb, var(--brand-50) 60%, transparent); }
.list-item.unread .title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 6px; vertical-align: 1px; }
.avatar { width: 38px; height: 38px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: 14px; flex: none; }
.thumb { width: 44px; height: 44px; border-radius: var(--r); object-fit: cover; background: var(--surface-3); flex: none; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .ic { color: var(--border-strong); }
.empty h3 { color: var(--text); font-size: 16px; }
.empty p { margin: 0; max-width: 340px; }
/* Notices: a calm card, not a coloured slab. Tone shows in the icon chip and a thin border; the words stay readable. */
.notice { --tone: var(--info); --tone-bg: var(--info-bg); display: flex; gap: 12px; align-items: center; min-height: 52px; padding: 10px 12px;
  border-radius: var(--r); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--tone) 28%, var(--border)); }
.notice::before { content: ""; flex: none; align-self: flex-start; box-sizing: border-box; width: 28px; height: 28px; border-radius: var(--r); background-color: var(--tone-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 18%, transparent);
  background-image: var(--tone-ic); background-repeat: no-repeat; background-position: center; background-size: 16px; }
.notice:has(> svg:first-child, > .ic:first-child)::before { display: none; }
.notice > svg:first-child, .notice > .ic:first-child { flex: none; align-self: flex-start; color: var(--tone); box-sizing: border-box; width: 28px; height: 28px; padding: 6px; border-radius: var(--r); background: var(--tone-bg); margin: 0; }
.notice > span, .notice > div, .notice > p { min-width: 0; } .notice > div.grow, .notice > span.grow { flex: 1; }
.notice b, .notice strong { color: var(--text); } .notice a:not(.btn) { color: var(--tone); font-weight: 600; }
.notice .btn { flex: none; margin-left: auto; } .notice .btn ~ .btn { margin-left: 0; }
.notice.small { font-size: 13px; min-height: 46px; padding: 8px 10px; gap: 10px; }
.notice.row.wrap { flex-wrap: wrap; } .notice > ul, .notice > ol { margin: 0; padding-left: 18px; }
.notice-warn { --tone: var(--warn); --tone-bg: var(--warn-bg); --tone-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b45309' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.notice-info { --tone: var(--info); --tone-bg: var(--info-bg); --tone-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E"); }
.notice-danger { --tone: var(--danger); --tone-bg: var(--danger-bg); --tone-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6M12 16.5h.01'/%3E%3C/svg%3E"); }
.notice-ok { --tone: var(--ok); --tone-bg: var(--ok-bg); --tone-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f9d58' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
table.data td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr.click { cursor: pointer; } table.data tbody tr.click:hover td { background: var(--surface-2); }
table.data .r { text-align: right; font-variant-numeric: tabular-nums; }
.section-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 -2px; }

/* ---------- App shell ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
#app > * { flex: 1; }
.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: calc(var(--header-h) + var(--safe-t)); padding: var(--safe-t) 8px 0 12px; display: flex; align-items: center; gap: 6px; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar .title { font-size: 17px; font-weight: 800; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.topbar .title small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.brand-mark { width: 32px; height: 32px; border-radius: var(--r); background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; flex: none; }
.brand-mark.logo-img { background: none; width: 34px; height: 30px; border-radius: 0; }
.brand-mark.logo-img img { width: 100%; height: 100%; display: block; }
main#view { flex: 1; padding-bottom: calc(var(--nav-h) + var(--safe-b)); min-width: 0; }
.page { padding: 16px; max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 800; flex: 1; }
.page-head h1 small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.bottomnav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: flex; background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(15,23,42,.04); }
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); background: none; border: 0; position: relative; min-width: 0; text-decoration: none; }
.nav-btn.active { color: var(--brand); }
.nav-btn .dot { position: absolute; top: 7px; left: 50%; margin-left: 7px; min-width: 18px; height: 18px; border-radius: var(--r); background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }
.nav-btn.primary .ic { background: var(--brand); color: #fff; border-radius: var(--r); padding: 7px; width: 42px; height: 34px; box-shadow: 0 4px 10px rgba(69,104,220,.35); }
.nav-btn.primary { color: var(--text); }
.nav-brand { display: none; }

@media (min-width: 900px) {
  .app { padding-left: var(--rail-w); }
  .bottomnav { top: 0; right: auto; width: var(--rail-w); height: auto; flex-direction: column; justify-content: flex-start; gap: 2px; padding: calc(var(--safe-t) + 12px) 10px 12px; border-top: 0; background: var(--nav); box-shadow: none; overflow-y: auto; scrollbar-width: none; }
  .bottomnav .nav-brand { display: grid; margin: 2px auto 14px; width: 40px; height: 36px; }
  .nav-btn { flex: none; height: 60px; border-radius: var(--r); color: var(--nav-text); font-size: 11px; }
  .nav-btn:hover { background: var(--nav-2); color: #fff; }
  .nav-btn.active { background: var(--brand); color: #fff; }
  .nav-btn.primary .ic { width: 22px; height: 22px; padding: 0; background: none; color: inherit; border-radius: 0; box-shadow: none; }
  .nav-btn.primary { color: var(--nav-text); } .nav-btn.primary.active { color: #fff; }
  .nav-btn .dot { top: 5px; margin-left: 6px; }
  .nav-bottom { margin-top: auto; }
  main#view { padding-bottom: 0; }
  .topbar { padding: var(--safe-t) 16px 0 24px; gap: 8px; }
  .topbar > .brand-mark { display: none; }
  .page { padding: 24px 32px 32px; gap: 20px; }
  .page-head h1 { font-size: 24px; }
}

/* top bar extras */
.top-outlet { display: none; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); font-weight: 600; font-size: 13px; color: var(--text-2); max-width: 260px; }
.top-outlet span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-clock { display: none; font-size: 13px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 6px; }
@media (min-width: 1100px) { .top-outlet { display: inline-flex; } .top-clock { display: block; } }
.bell .dot { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; border-radius: var(--r); background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--surface); }
.top-user { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px 6px 4px 4px; border-radius: var(--r); }
.top-user:hover { background: var(--surface-3); }
.top-user .avatar { width: 34px; height: 34px; border-radius: var(--r); font-size: 13px; }
.top-user .who { display: none; text-align: left; line-height: 1.2; }
.top-user .who b { display: block; font-size: 13px; } .top-user .who small { color: var(--muted); font-size: 11.5px; }
@media (min-width: 1100px) { .top-user .who { display: block; } }

/* ---------- Sync pill + offline bar ---------- */
.sync-pill { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; min-width: 112px; padding: 0 12px 0 10px; white-space: nowrap; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; font-weight: 700; color: var(--text-2); flex: none; }
.sync-pill .led { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.sync-pill[data-state="syncing"] .led { background: var(--info); animation: pulse 1s ease-in-out infinite; }
.sync-pill[data-state="pending"] .led { background: var(--warn); }
.sync-pill[data-state="offline"] { background: var(--surface-3); }
.sync-pill[data-state="offline"] .led { background: var(--muted); box-shadow: none; }
.sync-pill[data-state="error"], .sync-pill[data-state="auth"] { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }
.sync-pill[data-state="error"] .led, .sync-pill[data-state="auth"] .led { background: var(--danger); }
@media (max-width: 420px) { .sync-pill { padding: 0 10px; } .sync-pill span:last-child { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
@keyframes pulse { 50% { opacity: .35; } }
.offline-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 12px; font-size: 13px; font-weight: 600; background: #1e293b; color: #fff; }
.sync-big { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.sync-big .ring { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.sync-big[data-tone="ok"] .ring { background: var(--ok-bg); color: var(--ok); }
.sync-big[data-tone="warn"] .ring { background: var(--warn-bg); color: var(--warn); }
.sync-big[data-tone="danger"] .ring { background: var(--danger-bg); color: var(--danger); }
.sync-big[data-tone="info"] .ring { background: var(--info-bg); color: var(--info); }
.sync-big[data-tone="muted"] .ring { background: var(--surface-3); color: var(--muted); }
.sync-big h3 { font-size: 17px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-row > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; }
.stat-row b { display: block; font-size: 18px; font-weight: 800; }
.stat-row span { font-size: 12px; color: var(--muted); }
.sync-ic { color: var(--muted); display: inline-flex; }
.sync-ic.pending { color: var(--warn); } .sync-ic.failed { color: var(--danger); } .sync-ic.synced { color: var(--ok); }
.plan-banner { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 13px; font-weight: 600; background: var(--warn-bg); color: var(--warn); }
.plan-banner a { font-weight: 800; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; z-index: 1000; left: 50%; transform: translateX(-50%); top: calc(var(--header-h) + var(--safe-t) + 8px); display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 24px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: #1e293b; color: #fff; box-shadow: var(--shadow-2); font-weight: 600; font-size: 14px; opacity: 0; transform: translateY(-10px); transition: all .25s; }
.toast.in { opacity: 1; transform: none; }
.toast-success .ic { color: #4ade80; } .toast-error { background: var(--danger); } .toast-warn .ic { color: #fbbf24; }
@media (min-width: 900px) { #toasts { top: auto; bottom: 20px; left: auto; right: 20px; transform: none; } #toasts .toast { transform: translateY(10px); } #toasts .toast.in { transform: none; } }

/* ---------- Sheets: bottom sheet (phone) · dialog / drawer (desktop) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.5); opacity: 0; transition: opacity .2s; }
.sheet { position: relative; width: 100%; max-height: calc(100% - 24px - var(--safe-t)); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r) var(--r) 0 0; box-shadow: var(--shadow-3); transform: translateY(100%); transition: transform .24s cubic-bezier(.2,.8,.2,1); padding-bottom: var(--safe-b); }
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 20px; flex: none; min-height: 56px; }
.sheet-head h2 { font-size: 18px; font-weight: 800; flex: 1; }
.sheet-body { padding: 4px 20px 20px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); flex: none; background: var(--surface); }
.sheet-foot .btn { flex: 1; }
.sheet-full .sheet { height: calc(100% - 12px - var(--safe-t)); }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { border-radius: var(--r); max-width: 560px; max-height: 88vh; transform: translateY(12px) scale(.98); opacity: 0; transition: transform .18s, opacity .18s; padding-bottom: 0; }
  .sheet-wrap.open .sheet { opacity: 1; }
  .sheet-sm .sheet { max-width: 420px; } .sheet-lg .sheet { max-width: 860px; } .sheet-full .sheet { max-width: 1100px; height: 88vh; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 10px; border-bottom: 1px solid var(--border); }
  .sheet-body { padding-top: 16px; }
  .sheet-foot { border-radius: 0 0 var(--r) var(--r); justify-content: flex-end; }
  .sheet-foot .btn { flex: 0 0 auto; min-width: 120px; }
  .sheet-foot .btn-outline-danger:first-child { margin-right: auto; }
  /* right-hand drawer for long forms */
  .sheet-drawer { justify-content: flex-end; align-items: stretch; padding: 0; }
  .sheet-drawer .sheet { max-width: 520px; max-height: none; height: 100%; border-radius: 0; transform: translateX(40px); }
  .sheet-drawer .sheet-foot { border-radius: 0; }
}
.confirm-msg { margin: 4px 0 8px; color: var(--text-2); }

/* ---------- Auth ---------- */
.auth2 { min-height: 100%; display: grid; grid-template-columns: 1fr; background: var(--bg); }
.auth-brand { display: none; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px calc(24px + var(--safe-b)); gap: 14px; }
.auth-box { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 6px; }
.auth-box h1 { font-size: 26px; font-weight: 800; margin-top: 6px; } .auth-box > p { margin: 0 0 10px; }
.auth-mobile-logo img { height: 34px; display: block; }
.auth-box .seg { margin-bottom: 12px; }
.auth-legal { max-width: 440px; margin: 0; } .auth-legal a { font-weight: 600; }
@media (min-width: 960px) {
  .auth2 { grid-template-columns: minmax(400px, 44%) 1fr; }
  .auth-brand { display: flex; flex-direction: column; gap: 28px; padding: 48px 56px; color: #fff; background: radial-gradient(900px 500px at 0% 0%, #6d8bf0 0%, transparent 60%), linear-gradient(160deg, #4568dc 0%, #1d3a9e 100%); position: relative; overflow: hidden; }
  .auth-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.07); }
  .auth-logo { height: 40px; align-self: flex-start; }
  .auth-brand h2 { font-size: 36px; line-height: 1.12; letter-spacing: -.02em; max-width: 460px; margin-top: auto; font-weight: 800; }
  .auth-brand ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; max-width: 460px; }
  .auth-brand li { display: flex; gap: 14px; align-items: flex-start; } .auth-brand li .ic { padding: 9px; width: 40px; height: 40px; border-radius: var(--r); background: rgba(255,255,255,.15); }
  .auth-brand li b { display: block; font-size: 15.5px; } .auth-brand li span { opacity: .85; font-size: 14px; }
  .auth-foot { margin: auto 0 0; opacity: .85; font-weight: 600; font-size: 14px; }
  .auth-mobile-logo { display: none; }
  .auth-box { border: 0; box-shadow: none; background: transparent; padding: 0; }
  .auth2 .auth-main { background: var(--surface); }
  .auth-box .input { min-height: 46px; }
}
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.pinpad button { height: 62px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 22px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.pinpad button:hover:not(:disabled) { border-color: var(--border-strong); }
.pinpad button.del { background: var(--surface-3); border-color: transparent; color: var(--text-2); }
.pinpad button.ok { background: var(--brand); border-color: var(--brand); color: #fff; }
.pinpad button.ok:disabled { opacity: .35; cursor: default; }
.pinpad button:active { background: var(--surface-3); }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0 6px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); }
.pin-dots i.on { background: var(--brand); border-color: var(--brand); }
.boot { min-height: 100%; display: grid; place-items: center; }
.boot-logo { animation: pulse 1.2s infinite; display: block; }
.boot-in { display: flex; flex-direction: column; align-items: center; gap: 16px; }
/* Thin loading line under the logo: a short brand-coloured segment sliding across a soft track */
.boot-bar { position: relative; display: block; width: 80px; height: 3px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--brand) 26%, transparent); }
.boot-bar::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border-radius: 3px; background: var(--brand); animation: bootSlide 1.1s ease-in-out infinite; }
@keyframes bootSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .boot-bar::after { animation-duration: 2.4s; } }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: 1fr; height: calc(100dvh - var(--header-h) - var(--safe-t) - var(--nav-h) - var(--safe-b) - var(--banner-h, 0px)); background: var(--bg); }
.pos-menu { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.pos-tools { padding: 12px 12px 8px; display: flex; gap: 8px; align-items: center; }
.pos-tools .search { flex: 1; }
.pos-tools .veg-toggle { flex: none; }
.pos-cats { padding: 0 12px 8px; }
.pos-cats .chip i.sw { width: 8px; height: 8px; border-radius: 50%; }
.pos-items { flex: 1; overflow-y: auto; padding: 2px 12px 100px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; align-content: start; -webkit-overflow-scrolling: touch; }
.item-card { position: relative; display: flex; flex-direction: column; min-height: 96px; padding: 0; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); text-align: left; overflow: hidden; transition: transform .06s, border-color .15s, box-shadow .15s; }
.item-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat, var(--border-strong)); }
.item-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(69,104,220,.12); }
.item-card:active { transform: scale(.97); }
.item-card .pic { position: absolute; top: 8px; right: 8px; width: 46px; height: 46px; border-radius: var(--r); object-fit: cover; background: var(--surface-3); box-shadow: 0 0 0 1px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.15); }
.item-card.has-pic .nm { padding-right: 52px; min-height: 36px; }
.item-card.has-pic .qty-badge { top: 46px; right: 4px; }
.item-card .body { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 10px 10px 10px 14px; flex: 1; }
.item-card .nm { font-weight: 600; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.item-card .pr { font-weight: 800; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.item-card .code { font-size: 11px; color: var(--muted); font-weight: 600; }
.item-card .qty-badge { position: absolute; top: 6px; right: 6px; min-width: 24px; height: 24px; border-radius: var(--r); background: var(--brand); color: #fff; font-weight: 800; font-size: 12.5px; display: grid; place-items: center; padding: 0 7px; box-shadow: 0 2px 6px rgba(69,104,220,.4); z-index: 1; }
.item-card.na { opacity: .6; } .item-card .na-txt { display: block; color: var(--danger); font-weight: 700; font-size: 12px; line-height: 1.3; margin-top: 2px; }
.item-card .has-opt { color: var(--muted); display: inline-flex; }
.pos-cart { display: none; }
.cart-bar { position: fixed; z-index: 35; left: 10px; right: 10px; bottom: calc(var(--nav-h) + var(--safe-b) + 10px); display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 8px 8px 16px; border-radius: var(--r); background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(69,104,220,.35); border: 0; text-align: left; }
.cart-bar .cnt { font-size: 12.5px; opacity: .85; } .cart-bar .tot { font-size: 17px; font-weight: 800; }
.cart-bar .go { margin-left: auto; background: #fff; color: var(--brand); border-radius: var(--r); padding: 10px 14px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.cart-bar.empty-bar { background: var(--surface); color: var(--muted); border: 1px dashed var(--border-strong); box-shadow: none; justify-content: center; }

.cart { display: flex; flex-direction: column; min-height: 0; height: 100%; background: var(--surface); }
.cart-head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.cart-head .ttl { display: flex; align-items: center; gap: 8px; }
.cart-head .ttl b { font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-meta { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.cart-meta .chip { min-height: 36px; font-size: 13px; border-radius: var(--r); justify-content: flex-start; overflow: hidden; }
.cart-meta .chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-meta .chip.active { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
.cart-lines { flex: 1; overflow-y: auto; min-height: 120px; }
.cart-cols { display: grid; grid-template-columns: 1fr 108px 74px; gap: 8px; padding: 8px 14px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cart-cols span:nth-child(2) { text-align: center; } .cart-cols span:last-child { text-align: right; }
.line { display: grid; grid-template-columns: 1fr 108px 74px; gap: 2px 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); align-items: center; }
.line .nm { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; min-width: 0; background: none; border: 0; padding: 0; text-align: left; color: var(--text); }
.line .nm span { overflow: hidden; text-overflow: ellipsis; }
.line .sub { grid-column: 1; font-size: 12px; color: var(--muted); }
.line .amt { grid-row: 1; grid-column: 3; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.line .ctrl { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center; }
.line.sent { background: color-mix(in srgb, var(--ok-bg) 45%, transparent); }
.line.cancelled .nm, .line.cancelled .amt { text-decoration: line-through; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r); overflow: hidden; height: 34px; background: var(--surface); }
.stepper button { width: 32px; height: 100%; border: 0; background: transparent; display: grid; place-items: center; color: var(--brand); }
.stepper button:hover { background: var(--brand-50); }
.stepper b { min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; }
.kot-tag { font-size: 11px; font-weight: 700; color: var(--ok); display: inline-flex; align-items: center; gap: 3px; }
.cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); padding: 24px; text-align: center; }
.cart-empty .ic { color: var(--border-strong); }
.cart-totals { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13.5px; display: flex; flex-direction: column; gap: 3px; background: var(--surface-2); }
.cart-totals .r { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.cart-totals .r.grand { font-size: 20px; font-weight: 800; padding-top: 6px; margin-top: 3px; border-top: 1px dashed var(--border-strong); color: var(--text); }
.cart-totals .r.muted { font-size: 13px; }
.cart-totals .r.disc { color: var(--ok); }
.cart-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 14px; border-top: 1px solid var(--border); }
.cart-actions .btn { min-height: 44px; padding: 0 6px; font-size: 13px; flex-direction: column; gap: 1px; line-height: 1.1; }
.cart-actions .btn .ic { width: 17px; height: 17px; }
.cart-actions .btn small { font-size: 10.5px; font-weight: 600; opacity: .8; }
.cart-pay { display: grid; grid-template-columns: repeat(3, 1fr) 1.6fr; gap: 6px; padding: 0 14px calc(12px + var(--safe-b)); }
.cart-pay .btn { min-height: 48px; padding: 0 6px; font-size: 13px; }
.cart-pay .btn-primary { font-size: 15px; font-weight: 800; }
.cart-sheet .sheet-body { padding: 0; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.cart-sheet .cart { flex: 1; min-height: 0; height: auto; }
.cart-sheet .cart-lines { min-height: 0; }
.cart-sheet .sheet { padding-bottom: 0; }
.cart-close { display: none; }
.cart-sheet .cart-close { display: inline-grid; }
@media (min-width: 640px) { .pos-items { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
@media (min-width: 900px) {
  .pos { height: calc(100dvh - var(--header-h) - var(--safe-t) - var(--banner-h, 0px)); grid-template-columns: minmax(0, 1fr) 400px; }
  .pos-cart { display: flex; flex-direction: column; border-left: 1px solid var(--border); min-height: 0; background: var(--surface); }
  .cart-bar { display: none; }
  .pos-items { padding: 2px 16px 16px; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
  .pos-tools { padding: 14px 16px 8px; } .pos-cats { padding: 0 16px 10px; }
}
.pos-side-cats { display: none; }
@media (min-width: 1200px) {
  .pos { grid-template-columns: 210px minmax(0, 1fr) 420px; }
  .pos-side-cats { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-right: 1px solid var(--border); overflow-y: auto; background: var(--surface); }
  .pos-side-cats .cap { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px 8px; }
  .pos-side-cats button { text-align: left; border: 0; background: transparent; padding: 10px 10px; border-radius: var(--r); font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 10px; }
  .pos-side-cats button:hover { background: var(--surface-3); }
  .pos-side-cats button.active { background: var(--brand-50); color: var(--brand); }
  .pos-side-cats button i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
  .pos-side-cats button .count { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 700; background: var(--surface-3); padding: 1px 7px; border-radius: 99px; }
  .pos-side-cats button.active .count { background: var(--brand-100); color: var(--brand); }
  .pos-cats { display: none; }
}
@media (min-width: 1500px) { .pos { grid-template-columns: 230px minmax(0, 1fr) 460px; } }

/* option picker */
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.opt { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface); text-align: left; min-height: 58px; }
.opt:hover { border-color: var(--border-strong); }
.opt b { font-size: 14px; } .opt span { font-size: 13px; color: var(--muted); }
.opt.on { border-color: var(--brand); background: var(--brand-50); }
.opt-group h4 { font-size: 14px; margin: 14px 0 8px; display: flex; justify-content: space-between; }

/* payment */
.pay-total { text-align: center; padding: 8px 0 14px; }
.pay-total .big { font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pay-methods button { min-height: 64px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface); font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13.5px; }
.pay-methods button.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.quick-cash { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-change { display: flex; align-items: center; gap: 8px; }
.pay-change b { margin-left: auto; font-size: 22px; }
.pay-rest { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pay-rest > span { flex: 1 1 100%; }
.pay-split { display: flex; flex-direction: column; gap: 6px; }
.pay-split .row { padding: 8px 12px; background: var(--surface-2); border-radius: var(--r); }

/* ---------- Tables floor ---------- */
.floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
@media (min-width: 900px) { .floor { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; } }
.tbl { color: var(--text); position: relative; aspect-ratio: 1 / .86; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px; text-decoration: none; transition: transform .06s, box-shadow .15s, border-color .15s; }
.tbl:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(15,23,42,.08); }
.tbl:active { transform: scale(.97); }
.tbl .nm { font-size: 20px; font-weight: 800; }
.tbl .st { font-size: 12px; color: var(--muted); font-weight: 600; }
.tbl .am { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tbl.running { background: var(--brand-50); border-color: var(--brand); }
.tbl.running .st { color: var(--brand); }
.tbl.billed { background: var(--ok-bg); border-color: var(--ok); }
.tbl.billed .st { color: var(--ok); }
.tbl .tm { position: absolute; top: 7px; right: 9px; font-size: 11px; font-weight: 700; color: var(--muted); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; border: 1.5px solid var(--border-strong); vertical-align: -1px; }
.legend .lr { background: var(--brand-50); border-color: var(--brand); } .legend .lb { background: var(--ok-bg); border-color: var(--ok); }
.quick-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-tiles .btn { min-height: 54px; justify-content: flex-start; padding: 0 16px; font-size: 15px; }
@media (min-width: 900px) { .quick-tiles { grid-template-columns: repeat(4, minmax(0, 220px)); } }
.floor-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.floor-stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; }
.floor-stats b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; } .floor-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
@media (min-width: 900px) { .floor-stats { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Kitchen ---------- */
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; align-items: start; }
.kot-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-1); border-top: 5px solid var(--info); }
.kot-card.preparing { border-top-color: var(--warn); } .kot-card.ready { border-top-color: var(--ok); } .kot-card.late { box-shadow: 0 0 0 2px var(--danger); }
.kot-card header { display: flex; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.kot-card header b { font-size: 17px; }
.kot-card ul { list-style: none; margin: 0; padding: 8px 14px; }
.kot-card li { padding: 7px 0; font-size: 16px; font-weight: 600; border-bottom: 1px dashed var(--border); }
.kot-card li:last-child { border-bottom: 0; }
.kot-card li small { display: block; font-size: 13px; color: var(--warn); font-weight: 600; }
.kot-card footer { padding: 10px 14px; display: flex; gap: 8px; }
.kot-card footer .btn { flex: 1; }

/* ---------- KPIs, charts ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { padding: 14px 16px; }
.kpi span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi b { display: block; font-size: 22px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi small { color: var(--muted); font-size: 12px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, 1fr); gap: 14px; } .kpi { padding: 18px 20px; } .kpi b { font-size: 26px; } }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 150px) 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.bar-row .track { height: 10px; background: var(--surface-3); border-radius: var(--r); overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--brand); border-radius: var(--r); }
.hourly { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 10px; }
.hourly div { flex: 1; background: var(--brand); border-radius: var(--r-sm) var(--r-sm) 0 0; min-height: 2px; opacity: .85; }
.hourly div:hover { opacity: 1; }
.hourly-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.cols-2 { display: grid; gap: 16px; }
@media (min-width: 900px) { .cols-2 { grid-template-columns: 1fr 1fr; gap: 20px; } }

/* ---------- Settings ---------- */
.settings-layout { display: grid; gap: 16px; align-items: start; }
.settings-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.settings-nav::-webkit-scrollbar { display: none; }
@media (min-width: 1000px) {
  .settings-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 28px; }
  .settings-nav { flex-direction: column; gap: 2px; position: sticky; top: calc(var(--header-h) + 24px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 8px; }
  .settings-nav .chip { border: 0; border-radius: var(--r); justify-content: flex-start; min-height: 38px; background: transparent; width: 100%; }
  .settings-nav .chip:hover { background: var(--surface-3); }
  .settings-nav .chip.active { background: var(--brand-50); color: var(--brand); }
  #sec { max-width: 860px; }
}
.perm-group { border: 1px solid var(--border); border-radius: var(--r); padding: 4px 14px; }
.perm-group h4 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 0 4px; }
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.more-grid .tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 110px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); text-align: left; color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.more-grid .tile:hover { border-color: var(--brand); box-shadow: 0 6px 16px rgba(15,23,42,.06); }
.more-grid .tile .ic { color: var(--brand); padding: 8px; width: 40px; height: 40px; background: var(--brand-50); border-radius: var(--r); }
.more-grid .tile b { font-size: 15px; } .more-grid .tile small { color: var(--muted); }
@media (min-width: 700px) { .more-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .more-grid { grid-template-columns: repeat(4, 1fr); } }
.skeleton { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }

/* image picker */
.img-pick { display: flex; gap: 14px; align-items: center; }
.img-pick .prev { width: 96px; height: 96px; border-radius: var(--r); background: var(--surface-3) center / cover no-repeat; border: 1px dashed var(--border-strong); display: grid; place-items: center; color: var(--muted); flex: none; overflow: hidden; }
.img-pick .prev.has { border-style: solid; }
.img-pick.wide .prev { width: 180px; height: 96px; }

/* misc */
.online-alert { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: calc(var(--header-h) + var(--safe-t) + 8px); width: min(460px, calc(100% - 20px)); display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border: 0; border-radius: var(--r); background: #e23744; color: #fff; box-shadow: var(--shadow-2); text-align: left; animation: shake 1.6s ease-in-out infinite; }
.online-alert .oa-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; color: inherit; font: inherit; text-align: start; padding: 0; cursor: pointer; }
.online-alert .oa-mute { flex: none; border: 1px solid rgba(255,255,255,.6); background: transparent; color: #fff; border-radius: var(--r); padding: 8px 10px; font-weight: 700; cursor: pointer; }
.online-alert.quiet { animation: none; }
.online-alert span { flex: 1; display: flex; flex-direction: column; } .online-alert small { opacity: .9; font-size: 12.5px; }
.online-alert .go { flex: none; background: #fff; color: #e23744; border-radius: var(--r); padding: 8px 12px; font-weight: 800; }
@keyframes shake { 0%, 90%, 100% { transform: translateX(-50%); } 93% { transform: translateX(calc(-50% - 4px)); } 96% { transform: translateX(calc(-50% + 4px)); } }
@media (min-width: 900px) { .online-alert { left: auto; right: 20px; top: calc(var(--header-h) + 12px); transform: none; animation: none; } }
.install-card { display: flex; align-items: center; gap: 12px; margin: 12px 16px 0; padding: 12px 12px 12px 14px; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--r); }
.install-card div { flex: 1; display: flex; flex-direction: column; } .install-card span { font-size: 13px; color: var(--muted); }
@media (min-width: 900px) { .install-card { margin: 16px 32px 0; } }
.ios-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
@media print { body > *:not(iframe) { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* responsive helpers */
@media (max-width: 899px) { .only-desk { display: none !important; } }
@media (min-width: 900px) { .only-mob { display: none !important; } }

/* cash counting */
.den-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 560px) { .den-grid { grid-template-columns: 1fr 1fr; column-gap: 16px; } }
.den { display: grid; grid-template-columns: 70px 10px minmax(64px, 1fr) 74px; align-items: center; gap: 8px; }
.den span { font-weight: 700; font-variant-numeric: tabular-nums; } .den b { color: var(--muted); text-align: center; }
.den .input { min-height: 38px; padding: 6px 10px; text-align: center; font-weight: 700; }
.den em { font-style: normal; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.den-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.den-sum > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; }
.den-sum span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; } .den-sum b { font-size: 17px; font-variant-numeric: tabular-nums; }
.den-sum .ok { background: var(--ok-bg); border-color: transparent; } .den-sum .ok b { color: var(--ok); }
.den-sum .bad { background: var(--danger-bg); border-color: transparent; } .den-sum .bad b { color: var(--danger); }
.den-sum .warn { background: var(--warn-bg); border-color: transparent; } .den-sum .warn b { color: var(--warn); }

/* Customer card in the pay sheet / customer dues */
.cust-pay { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2, #f4f6fb); margin-bottom: 12px; }
.cust-pay .kv { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.cust-pay .kv span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.text-danger { color: var(--danger); }
.ledger-row .amt-plus { color: var(--danger); } .ledger-row .amt-minus { color: var(--ok); }

/* Language picker */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.lang-opt { border: 1.5px solid var(--border); background: var(--surface); border-radius: var(--r); padding: 12px; text-align: left; display: flex; flex-direction: column; gap: 2px; cursor: pointer; color: var(--text); }
.lang-opt b { font-size: 17px; } .lang-opt small { color: var(--muted); font-size: 12px; }
.lang-opt.on { border-color: var(--brand); background: var(--brand-50); }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--r); padding: 6px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }

/* Menu import / bulk prices */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; border: 2px dashed var(--border-strong); border-radius: var(--r); cursor: pointer; color: var(--text-2); text-align: center; background: var(--surface-2); }
.drop:hover, .drop.on { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.bp-row { display: flex; align-items: flex-end; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bp-row:last-child { border-bottom: 0; } .bp-row.on { background: var(--brand-50); }
.bp-in { display: flex; flex-direction: column; gap: 2px; width: 96px; } .bp-in small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-in .input { min-height: 38px; padding: 6px 8px; text-align: right; font-weight: 600; }
@media (max-width: 600px) { .bp-row > .grow { flex-basis: 100%; } }

/* Offers / combos */
.item-card { position: relative; }
.promo-tag { position: absolute; top: 6px; left: 6px; z-index: 1; background: var(--ok); color: #fff; font-size: 11px; font-weight: 800; border-radius: var(--r); padding: 1px 6px; }
.promo-tag.combo { background: var(--brand); }
.item-card.has-pic .promo-tag { top: 8px; left: 8px; }
.promo-chip { display: inline-block; background: var(--ok-bg); color: var(--ok); font-size: 11px; font-weight: 700; border-radius: var(--r); padding: 0 6px; }
.kds small.parts, small.parts { display: block; color: var(--text-2); }
.hh-days { display: flex; flex-wrap: wrap; gap: 6px; } .hh-days label { display: inline-flex; }
.hh-days input { display: none; } .hh-days span { border: 1.5px solid var(--border); border-radius: var(--r); padding: 4px 10px; font-weight: 700; font-size: 13px; cursor: pointer; }
.hh-days input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.combo-row { display: grid; grid-template-columns: 1fr 76px 36px; gap: 8px; align-items: center; }

/* Reserved tables */
.tbl.reserved { border-color: #a855f7; background: color-mix(in srgb, #a855f7 8%, var(--surface)); }
.tbl .st.rsv { color: #7e22ce; font-weight: 700; line-height: 1.25; }
.legend i.lv { background: color-mix(in srgb, #a855f7 25%, var(--surface)); border-color: #a855f7; }

/* Reservations */
.rsv-row .rsv-time { width: 78px; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-start; flex-shrink: 0; }
.rsv-row .rsv-time b { font-size: 15px; } .rsv-row .rsv-time small { font-size: 11px; color: var(--muted); }
.rsv-row.done { opacity: .55; }

/* Deliveries board */
.dl-riders { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.dl-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.dl-board section { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dl-board h3 { margin: 4px 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.dl-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.dl-empty { padding: 14px; border: 1.5px dashed var(--border); border-radius: var(--r); text-align: center; }
@media (max-width: 899px) { .dl-board { grid-template-columns: 1fr; } }

.tbl .tbk { position: absolute; left: 6px; top: 6px; font-size: 10.5px; font-weight: 800; color: #7e22ce; display: inline-flex; gap: 3px; align-items: center; }
.tbl { position: relative; }

/* Feedback */
.fb-stars { color: #f59e0b; letter-spacing: 1px; } .fb-stars i { color: var(--border-strong); font-style: normal; }
.fb-row.alert { background: var(--danger-bg); }
.fb-comment { margin: 4px 0; font-size: 14px; color: var(--text); }
.fb-bar { flex: 1; height: 10px; border-radius: var(--r); background: var(--surface-3); overflow: hidden; } .fb-bar i { display: block; height: 100%; border-radius: var(--r); min-width: 0; }

/* =====================================================================
   Desktop design v2 — sidebar, density, billing screen (phones unchanged)
   ===================================================================== */
.cart-totals .tot-detail { display: flex; flex-direction: column; gap: 3px; }
.cart-totals:not(.open) .tot-detail { display: none; }
.cart-totals .r.grand { width: 100%; border: 0; background: none; padding: 0; margin: 0; cursor: pointer; color: var(--text); font: inherit; font-size: 20px; font-weight: 800; align-items: center; }
.cart-totals.open .r.grand { border-top: 1px dashed var(--border-strong); padding-top: 8px; margin-top: 4px; }
.cart-totals .r.grand > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.cart-totals .tot-hint { font-size: 12px; font-weight: 600; color: var(--muted); }
.cart-totals .r.grand .ic { color: var(--muted); transition: transform .2s; }
.cart-totals.open .r.grand .ic { transform: rotate(180deg); }
kbd { display: none; }
.nav-cap, .nav-foot, .nav-brand .nb-word { display: none; }
.nav-scroll { display: contents; }

@media (min-width: 900px) {
  :root { --side-w: 76px; --header-h: 56px; }
  body { font-size: 14px; }
  .app { padding-left: var(--side-w); }

  /* ----- Sidebar ----- */
  .bottomnav { width: var(--side-w); padding: 12px 10px; gap: 0; display: flex; flex-direction: column; overflow: hidden; }
  .bottomnav .nav-brand { display: flex; align-items: center; justify-content: center; height: 40px; margin: 0 0 10px; width: auto; }
  .nav-brand .nb-icon { width: 34px; height: 30px; }
  .nav-scroll { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
  .nav-scroll::-webkit-scrollbar { display: none; }
  .nav-cap { display: block; flex: none; height: 1px; background: color-mix(in srgb, var(--nav-text) 22%, transparent); margin: 6px 14px; font-size: 0; overflow: hidden; }
  .nav-cap:first-child { display: none; }
  .nav-btn { flex: none; height: 48px; border-radius: var(--r); color: var(--nav-text); font-size: 10.5px; gap: 2px; padding: 0 4px; }
  .nav-btn > span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-btn:hover { background: var(--nav-2); color: #fff; }
  .nav-btn.active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(69,104,220,.35); }
  .nav-foot { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 1px solid var(--nav-2); margin-top: 8px; }
  .nav-foot .nav-btn { height: 40px; }
  #rail-collapse .ic { transition: transform .2s; }
  .nav-collapsed #rail-collapse .ic { transform: rotate(180deg); }
  html[data-route="pos"]:not(.pos-nav-open) #rail-collapse .ic { transform: rotate(180deg); }

  /* ----- Top bar ----- */
  .topbar { height: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 16px 0 20px; }
  .topbar .title { font-size: 16px; }
  .topbar .title small { font-size: 12px; }

  /* ----- Density ----- */
  .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
  :root { --btn-sm-h: 30px; }
  .btn-sm { min-height: var(--btn-sm-h); padding: 0 10px; font-size: 12.5px; }
  .btn-lg { min-height: 46px; font-size: 15px; }
  .input, select.input { min-height: 38px; padding: 8px 12px; font-size: 14px; }
  textarea.input { min-height: 72px; }
  .chip { min-height: 32px; padding: 0 12px; font-size: 13px; }
  .icon-btn { width: 36px; height: 36px; }
  .card { border-radius: var(--r); }
  .card-pad { padding: 14px 16px; }
  .page { padding: 20px 28px 28px; gap: 16px; max-width: 1480px; }
  .page-head h1 { font-size: 20px; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
  .kpi { padding: 12px 16px; }
  .kpi b { font-size: 21px; }
  .list-item { padding: 10px 16px; gap: 12px; }
  .list-item .title { font-size: 14px; }
  .list-item .sub { font-size: 12.5px; }
  .list-item .avatar, .list-item > .thumb { width: 32px; height: 32px; border-radius: var(--r); font-size: 13px; }
  .list-item:hover { background: var(--surface-2); }
  table.data th { padding: 9px 14px; } table.data td { padding: 9px 14px; }
  kbd { display: inline-block; font: 700 9.5px/1 var(--font); padding: 2px 4px; border-radius: var(--r-sm); background: color-mix(in srgb, currentColor 12%, transparent); opacity: .75; margin-left: 2px; }

  /* ----- Billing screen ----- */
  .pos { height: calc(100dvh - var(--header-h) - var(--safe-t) - var(--banner-h, 0px)); grid-template-columns: minmax(0, 1fr) 380px; background: var(--surface-2); }
  .pos-tools { padding: 12px 14px 8px; }
  .pos-tools .search .input { min-height: 40px; border-radius: var(--r); background: var(--surface); }
  .pos-items { padding: 2px 14px 14px; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; }
  .item-card { min-height: 78px; border-radius: var(--r); background: color-mix(in srgb, var(--cat, var(--border)) 6%, var(--surface)); border-color: color-mix(in srgb, var(--cat, var(--border)) 22%, var(--border)); box-shadow: none; }
  .item-card::before { width: 3px; }
  .item-card .body { padding: 9px 10px 8px 12px; gap: 4px; }
  .item-card .nm { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
  .item-card .meta { gap: 4px; }
  .item-card .meta > .row { min-width: 0; }
  .item-card .pr { font-size: 14px; }
  .item-card .code { font-size: 10.5px; }
  .item-card:hover { border-color: var(--brand); box-shadow: 0 3px 10px rgba(69,104,220,.14); background: var(--surface); }
  .item-card .qty-badge { top: -6px; right: -6px; min-width: 22px; height: 22px; font-size: 12px; box-shadow: 0 2px 6px rgba(69,104,220,.4); z-index: 2; }
  .item-card:has(.qty-badge) { border-color: var(--brand); background: var(--brand-50); }
  .promo-tag { position: static; display: inline-block; font-size: 10.5px; padding: 1px 5px; border-radius: var(--r-sm); margin-left: auto; flex: none; }
  .item-card.has-pic { min-height: 78px; }
  .item-card .pic { width: 40px; height: 40px; top: 8px; right: 8px; }
  .item-card.has-pic .nm { padding-right: 46px; }

  .pos-cart { box-shadow: -1px 0 0 var(--border); border-left: 0; }
  .cart-head { padding: 10px 14px; gap: 8px; }
  .cart-head .ttl b { font-size: 14.5px; }
  .type-tabs button, .seg button { min-height: 32px; font-size: 12.5px; }
  .cart-meta .chip { min-height: 34px; }
  .cart-cols { padding: 6px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
  .line { grid-template-columns: 1fr 100px 72px; padding: 8px 14px; }
  .line:nth-child(even) { background: var(--surface-2); }
  .line.sent { background: color-mix(in srgb, var(--ok-bg) 55%, var(--surface)); }
  .line .nm { font-size: 13.5px; }
  .line .sub { font-size: 11.5px; }
  .stepper { height: 30px; } .stepper button { width: 28px; } .stepper b { min-width: 26px; font-size: 13.5px; }
  .cart-totals { padding: 10px 14px; background: var(--surface); }
  .cart-totals .r { font-size: 13px; }
  .cart-totals .r.grand { font-size: 19px; }
  .cart-actions { gap: 6px; padding: 8px 14px; background: var(--surface); }
  .cart-actions .btn { min-height: 48px; font-size: 12.5px; position: relative; }
  .cart-actions .btn kbd { position: absolute; top: 4px; right: 5px; }
  .cart-pay { gap: 6px; padding: 0 14px 12px; background: var(--surface); }
  .cart-pay .btn { min-height: 46px; font-size: 13px; }
  .cart-pay .btn-primary { font-size: 15.5px; }
  .cart-pay .btn-primary kbd { color: #fff; }
}

@media (min-width: 1200px) {
  .pos { grid-template-columns: 184px minmax(0, 1fr) 390px; }
  .pos-side-cats { padding: 10px 8px; gap: 1px; background: var(--surface); box-shadow: 1px 0 0 var(--border); border-right: 0; }
  .pos-side-cats .cap { padding: 4px 10px 6px; }
  .pos-side-cats button { padding: 8px 10px; border-radius: var(--r); font-size: 13.5px; gap: 9px; }
  .pos-side-cats button .cn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pos-side-cats button.active { background: var(--brand); color: #fff; }
  .pos-side-cats button.active .count { background: rgba(255,255,255,.22); color: #fff; }
  .pos-side-cats button.active i { box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
  .pos-side-cats .pop-ic { color: #f59e0b; display: inline-flex; width: 12px; }
  .pos-side-cats button.active .pop-ic { color: #fff; }
}

/* Expanded sidebar with labels on wide screens (not on the billing screen, not when collapsed) */
@media (min-width: 1280px) {
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) { --side-w: 220px; }
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .bottomnav { padding: 14px 12px; }
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .bottomnav .nav-brand { justify-content: flex-start; padding: 0 8px; margin-bottom: 14px; }
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .nav-brand .nb-icon { display: none; }
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .nav-brand .nb-word { display: block; height: 30px; width: auto; }
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .nav-cap { display: block; height: auto; background: none; margin: 14px 10px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--nav-text) 60%, transparent); }
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .nav-cap:first-child { margin-top: 0; }
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .nav-btn { flex-direction: row; justify-content: flex-start; height: 38px; gap: 12px; padding: 0 12px; font-size: 13.5px; font-weight: 600; }
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .nav-btn .dot { position: static; margin: 0 0 0 auto; }
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .nav-foot .nav-btn { height: 36px; }
}
@media (min-width: 1500px) { .pos { grid-template-columns: 200px minmax(0, 1fr) 430px; } }

.item-card .ds { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: 11.5px; line-height: 1.3; color: var(--muted); margin-top: -2px; }
@media (min-width: 900px) { .item-card .ds { -webkit-line-clamp: 2; } }

.nav-btn .lbl-s { display: none; }
@media (min-width: 900px) {
  .nav-btn .lbl { display: none; } .nav-btn .lbl-s { display: block; }
  .pos-items { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
}
@media (min-width: 1280px) {
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .nav-btn .lbl { display: block; }
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .nav-btn .lbl-s { display: none; }
}
@media (min-width: 900px) {
  .item-card .qty-badge { top: 5px; right: 5px; }
  .item-card:has(.qty-badge) .nm { padding-right: 22px; }
  .item-card .meta:has(.promo-tag) .code { display: none; }
  .item-card .meta .row { flex-wrap: nowrap; }
  .nav-btn { font-size: 10px; padding: 0 2px; letter-spacing: -.01em; }
}

/* ===== Kitchen display v2 ===== */
.kds-page { display: flex; flex-direction: column; gap: 12px; padding: 12px; min-height: 100%; }
.kds-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.kds-tabs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kds-tabs button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r); padding: 6px 12px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.kds-tabs button b { font-size: 18px; font-variant-numeric: tabular-nums; }
.kds-tabs button span { font-size: 13px; }
.kds-tabs button.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.kds-late { display: inline-flex; align-items: center; gap: 6px; color: #fff; background: var(--danger); border-radius: var(--r); padding: 8px 12px; font-weight: 800; font-size: 13px; animation: kdsPulse 1.6s infinite; }
@keyframes kdsPulse { 50% { opacity: .75; } }
.kds-wrap { display: flex; gap: 12px; align-items: flex-start; }
.kds-wrap > .kds, .kds-wrap > .kds-empty { flex: 1; min-width: 0; }
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; align-items: start; }
.kot-card { --kc: var(--brand); background: var(--surface); border: 1px solid var(--border); border-top: 0; border-radius: var(--r); overflow: hidden; box-shadow: 0 1px 3px rgba(15,23,42,.08); }
.kot-card.preparing { --kc: #d97706; } .kot-card.ready { --kc: var(--ok); } .kot-card.served { --kc: #64748b; }
.kot-card.late { --kc: var(--danger); box-shadow: 0 0 0 2px var(--danger), 0 6px 18px rgba(220,38,38,.18); }
.kot-card header { display: block; padding: 0; border: 0; background: var(--kc); color: #fff; }
.kot-card .kh-main { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px 2px; }
.kot-card .kh-main b { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kot-card .kh-timer { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; background: rgba(0,0,0,.18); border-radius: var(--r); padding: 2px 8px; flex: none; }
.kot-card .kh-sub { display: flex; align-items: center; gap: 8px; padding: 0 6px 7px 12px; font-size: 12px; opacity: .95; }
.kot-card .kh-sub > span:first-child { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kot-card .kh-st { background: rgba(255,255,255,.25); border-radius: var(--r); padding: 1px 7px; font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.kot-card .kh-print { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 28px; height: 26px; border-radius: var(--r); display: grid; place-items: center; cursor: pointer; }
.kot-card .kh-print:hover { background: rgba(255,255,255,.32); }
.kot-card ul { list-style: none; margin: 0; padding: 4px 0; }
.kot-card li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; font-size: 15px; font-weight: 650; border-bottom: 1px dashed var(--border); cursor: pointer; user-select: none; }
.kot-card li:last-child { border-bottom: 0; }
.kot-card li:hover { background: var(--surface-2); }
.kot-card li .kq { min-width: 30px; height: 26px; border-radius: var(--r); background: var(--surface-3); display: grid; place-items: center; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; flex: none; }
.kot-card li .kn { flex: 1; min-width: 0; line-height: 1.3; padding-top: 2px; }
.kot-card li .kn em { font-style: normal; color: var(--text-2); font-weight: 600; }
.kot-card li small { display: block; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
.kot-card li .ka { color: var(--brand); } .kot-card li .knote, .kot-card .knote { color: #b45309; }
.kot-card li small.parts { color: var(--text-2); }
.kot-card li.done { opacity: .45; } .kot-card li.done .kn > span { text-decoration: line-through; }
.kot-card li.done .kq { background: var(--ok); color: #fff; }
.kot-card .kfoot-note { padding: 6px 12px 8px; font-size: 13px; font-weight: 600; background: var(--warn-bg); }
.kot-card footer { padding: 8px 10px 10px; display: block; }
.kot-card footer .btn { min-height: 42px; font-weight: 800; }
.kds-sum { display: none; width: 240px; flex: none; position: sticky; top: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.kds-sum h3 { margin: 0; padding: 10px 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.kds-sum ul { list-style: none; margin: 0; padding: 4px 0; max-height: calc(100dvh - 200px - var(--banner-h, 0px)); overflow-y: auto; }
.kds-sum li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 14px; font-weight: 600; font-size: 14px; border-bottom: 1px solid var(--border); }
.kds-sum li:last-child { border-bottom: 0; }
.kds-sum li b { font-size: 15px; font-variant-numeric: tabular-nums; background: var(--brand-50); color: var(--brand); border-radius: var(--r); padding: 0 8px; }
@media (min-width: 900px) { .kds-page { padding: 14px 18px; } }
@media (min-width: 1200px) { .kds-sum { display: block; } }

/* Image drop zone + cropper */
.img-drop { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1.5px dashed var(--border-strong); border-radius: var(--r); background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; outline: none; }
.img-drop:hover, .img-drop:focus-visible { border-color: var(--brand); background: var(--brand-50); }
.img-drop.drag { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.img-drop.has { border-style: solid; background: var(--surface); }
.img-drop .prev { width: 88px; flex: none; border-radius: var(--r); background: var(--surface-3) center / cover no-repeat; display: grid; place-items: center; color: var(--muted); position: relative; overflow: hidden; }
.img-drop.wide { flex-direction: column; align-items: stretch; }
.img-drop.wide .prev { width: 100%; max-width: 480px; }
.img-drop .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.img-drop .txt b { font-size: 14px; } .img-drop .txt span { font-size: 13px; color: var(--text-2); } .img-drop .txt u { color: var(--brand); text-decoration: none; font-weight: 700; }
.img-drop .txt small { font-size: 12px; color: var(--muted); }
.img-drop.busy { pointer-events: none; opacity: .7; }
.img-drop .spin { position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; border: 3px solid var(--brand-100); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.crop { display: flex; flex-direction: column; gap: 12px; }
.crop-frame { position: relative; width: 100%; max-height: 60vh; margin: 0 auto; border-radius: var(--r); overflow: hidden; background: #111 repeating-conic-gradient(#222 0 25%, #1a1a1a 0 50%) 0 0 / 20px 20px; cursor: grab; touch-action: none; }
.crop-frame:active { cursor: grabbing; }
.crop-frame canvas { display: block; width: 100%; height: 100%; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px); background-size: 33.33% 33.33%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.crop-zoom { accent-color: var(--brand); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatches button { width: 32px; height: 32px; border-radius: var(--r); border: 2px solid transparent; cursor: pointer; }
.swatches button.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.swatches input[type=color] { width: 40px; height: 34px; padding: 0; border: 1px solid var(--border-strong); border-radius: var(--r); background: none; cursor: pointer; }

/* Calendar pickers */
.date-btn { gap: 8px; font-weight: 600; white-space: nowrap; }
.cal-pop { position: fixed; z-index: 200; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-2); padding: 10px; }
.cal-pop.mob { left: 8px !important; right: 8px; bottom: 8px; top: auto !important; }
.cal-wrap { display: flex; gap: 10px; }
.cal-presets { display: flex; flex-direction: column; gap: 2px; padding-right: 10px; border-right: 1px solid var(--border); min-width: 128px; }
.cal-presets button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--r); font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.cal-presets button:hover { background: var(--surface-3); } .cal-presets button.on { background: var(--brand-50); color: var(--brand); }
.cal-body { display: flex; flex-direction: column; gap: 6px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cal-sel { font-weight: 700; font-size: 13px; color: var(--text-2); text-align: center; }
.cal-months { display: flex; gap: 18px; }
.cal-month { width: 238px; }
.cal-title { text-align: center; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 34px); gap: 0; }
.cal-grid i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-grid button { height: 34px; border: 0; background: none; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; border-radius: var(--r); font-variant-numeric: tabular-nums; }
.cal-grid button:hover:not(:disabled) { background: var(--surface-3); }
.cal-grid button:disabled { color: var(--border-strong); cursor: default; }
.cal-grid button.in { background: var(--brand-50); border-radius: 0; color: var(--brand); }
.cal-grid button.edge { background: var(--brand); color: #fff; }
.cal-grid button.lo:not(.hi) { border-radius: var(--r) 0 0 var(--r); } .cal-grid button.hi:not(.lo) { border-radius: 0 var(--r) var(--r) 0; }
.cal-foot { display: flex; justify-content: flex-end; gap: 6px; border-top: 1px solid var(--border); padding-top: 8px; }
@media (max-width: 639px) {
  .cal-wrap { flex-direction: column; } .cal-presets { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 8px; }
  .cal-month { width: 100%; } .cal-grid { grid-template-columns: repeat(7, 1fr); }
}
.date-host { display: inline-block; } .date-host .date-btn { width: 100%; justify-content: flex-start; } .field .date-host { display: block; }

/* Help tips */
.help-tip { position: relative; display: inline-flex; vertical-align: middle; color: var(--muted); cursor: help; margin-left: 3px; opacity: .7; text-transform: none; letter-spacing: 0; font-weight: 500; }
.help-tip:hover, .help-tip:focus, .help-tip.show { opacity: 1; color: var(--brand); outline: none; }
.tip-pop { position: fixed; z-index: 1000; left: 0; top: 0; max-width: min(280px, calc(100vw - 16px)); padding: 8px 10px; border-radius: var(--r); background: #0f172a; color: #fff; font-size: 12.5px; line-height: 1.4; font-weight: 500; text-align: left; box-shadow: var(--shadow-2); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .12s; }
.tip-pop.on { opacity: 1; visibility: visible; }

/* Phone field with country code */
.tel-wrap { position: relative; display: flex; align-items: stretch; width: 100%; }
.tel-wrap .tel-badge { position: absolute; left: 1px; top: 1px; bottom: 1px; width: 84px; display: flex; align-items: center; gap: 4px; padding: 0 18px 0 10px; font-weight: 700; font-size: 14px; color: var(--text-2); background: var(--surface-2); border-right: 1px solid var(--border); border-radius: var(--r) 0 0 var(--r); pointer-events: none; z-index: 1; white-space: nowrap; }
.tel-wrap .tel-badge::after { content: ""; position: absolute; right: 9px; top: 50%; width: 5px; height: 5px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.tel-wrap .tel-cc { position: absolute; left: 0; top: 0; bottom: 0; width: 86px; opacity: 0; cursor: pointer; z-index: 2; font-size: 16px; }
.tel-wrap > .input { padding-left: 94px !important; }
.tel-wrap:focus-within .tel-badge { border-right-color: var(--brand); color: var(--brand); }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dash-wide { grid-column: span 2; }
@media (max-width: 1199px) { .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 699px) { .dash-grid { grid-template-columns: 1fr; } .dash-wide { grid-column: auto; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 14.5px; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart .grid { stroke: var(--border); stroke-width: 1; }
svg.chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--font); }
svg.chart .area { fill: color-mix(in srgb, var(--brand) 14%, transparent); }
svg.chart .ln { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
svg.chart .ln-prev { fill: none; stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
svg.chart .pt circle { fill: var(--brand); opacity: 0; } svg.chart .pt:hover circle { opacity: 1; }
svg.chart .bar { fill: color-mix(in srgb, var(--brand) 55%, var(--surface)); } svg.chart .bar.hi { fill: var(--brand); } svg.chart .bar:hover { fill: var(--brand-600); }
.legend-s { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend-s i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; margin-left: 8px; } .legend-s .k-cur { background: var(--brand); } .legend-s .k-prev { background: var(--border-strong); }
.gr { font-size: 12px; font-weight: 800; padding: 1px 6px; border-radius: var(--r); }
.gr.up { color: var(--ok); background: var(--ok-bg); } .gr.down { color: var(--danger); background: var(--danger-bg); } .gr.na { color: var(--muted); background: var(--surface-3); }
.ol-bar { height: 6px; border-radius: var(--r); background: var(--surface-3); overflow: hidden; margin: 5px 0 3px; flex: 1; } .ol-bar i { display: block; height: 100%; background: var(--brand); border-radius: var(--r); }
.ol-row.on { background: var(--brand-50); }
.donut { display: flex; align-items: center; gap: 16px; } .donut svg { flex: none; } .donut .dc { font-size: 13px; font-weight: 800; fill: var(--text); font-family: var(--font); }
.donut ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.donut li { display: flex; align-items: center; gap: 8px; font-size: 13px; } .donut li i { width: 10px; height: 10px; border-radius: 3px; flex: none; } .donut li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .donut li b { font-variant-numeric: tabular-nums; }
.hb { display: grid; grid-template-columns: 110px 1fr 54px; gap: 8px; align-items: center; font-size: 13px; } .hb > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hb b { text-align: right; }
.dash-scope { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.dash-scope::-webkit-scrollbar { display: none; }
.dash-scope button { white-space: nowrap; flex: 0 0 auto; }
.dash .card-head { flex-wrap: wrap; row-gap: 4px; min-width: 0; }
.dash-grid > *, .dash .row.wrap > * { min-width: 0; }
.dash .chart { max-width: 100%; }
@media (min-width: 1200px) { .dash .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 700px) and (max-width: 1199px) { .dash .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Item tile layout (no clipping): name (2 lines) · description (1 line) · price row pinned to the bottom */
.item-card { overflow: visible; height: auto; }
.item-card .body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-height: 0; }
.item-card .nm { flex: none; }
.item-card .ds, .item-card .ds { display: block; -webkit-line-clamp: unset; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; flex: none; }
.item-card .meta { margin-top: auto; flex-wrap: wrap; row-gap: 3px; padding-top: 2px; }
.item-card .meta > .row { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.item-card .meta .promo-tag { margin-left: 0; }
.item-card .pr { white-space: nowrap; }
.item-card .code, .item-card .has-opt { flex: none; margin-left: auto; }
@media (min-width: 900px) { .item-card .ds { -webkit-line-clamp: unset; } .pos-items { grid-auto-rows: minmax(84px, auto); } }

.item-card .body { min-height: auto; }
.item-card .ds-tag { font-size: 10px; font-weight: 800; color: #fff; background: var(--brand); border-radius: var(--r-sm); padding: 0 4px; margin-right: 2px; }
.item-card .meta > .row { flex-wrap: nowrap; }

/* Alerts (toasts) v2: top of the screen, colour per type, never over the bill buttons */
#toasts { position: fixed; z-index: 400; top: calc(var(--safe-t) + 10px); left: 50%; transform: translateX(-50%); bottom: auto; right: auto; width: min(440px, calc(100vw - 20px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
#toasts .toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 10px; padding: 12px 10px 12px 12px; border-radius: var(--r); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--info); box-shadow: 0 12px 32px rgba(15,23,42,.18); font-weight: 600; font-size: 14px; line-height: 1.4; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; }
#toasts .toast.in { opacity: 1; transform: none; }
#toasts .t-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
#toasts .t-msg { flex: 1; min-width: 0; padding-top: 4px; }
#toasts .t-x { flex: none; border: 0; background: none; color: var(--muted); width: 28px; height: 28px; border-radius: var(--r); display: grid; place-items: center; cursor: pointer; }
#toasts .t-x:hover { background: var(--surface-3); color: var(--text); }
#toasts .t-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: currentColor; opacity: .18; transform-origin: left; animation: tbar var(--life, 3000ms) linear forwards; }
#toasts .toast.hold .t-bar { animation-play-state: paused; }
@keyframes tbar { to { transform: scaleX(0); } }
#toasts .toast-success { border-left-color: var(--ok); } #toasts .toast-success .t-ic { background: var(--ok-bg); color: var(--ok); }
#toasts .toast-warn { border-left-color: #d97706; background: color-mix(in srgb, var(--warn-bg) 55%, var(--surface)); } #toasts .toast-warn .t-ic { background: var(--warn-bg); color: #b45309; }
#toasts .toast-error { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger-bg) 60%, var(--surface)); color: var(--text); } #toasts .toast-error .t-ic { background: var(--danger-bg); color: var(--danger); }
#toasts .toast-offline { border-left-color: var(--muted); } #toasts .toast-offline .t-ic { background: var(--surface-3); color: var(--text-2); }
@media (min-width: 900px) { #toasts { left: auto; right: 18px; transform: none; top: calc(var(--header-h) + 10px); width: 400px; } #toasts .toast { transform: translateX(12px); } #toasts .toast.in { transform: none; } }

/* Tables v2 */
.tables-tabs { align-self: flex-start; }
.tables-tabs button { padding: 0 14px; }
.tcount { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 800; margin-left: 4px; }
.tables-tabs button.active .tcount { background: var(--brand-50); color: var(--brand); }
.tcount.alert { background: var(--danger); color: #fff !important; }
.st-chip i { width: 10px; height: 10px; border-radius: 3px; border: 1.5px solid var(--border-strong); background: var(--surface); }
.st-chip.running i { background: var(--brand-50); border-color: var(--brand); } .st-chip.billed i { background: var(--ok-bg); border-color: var(--ok); } .st-chip.reserved i { background: #f3e8ff; border-color: #a855f7; }
.st-chip.all i { display: none; }
.floor2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.tbl2 { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 10px 12px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: transform .08s, box-shadow .15s, border-color .15s; }
.tbl2:hover { border-color: var(--brand); box-shadow: 0 6px 16px rgba(69,104,220,.14); }
.tbl2:active { transform: scale(.98); }
.tbl2 .t-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.tbl2 .t-nm { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.tbl2 .t-tm, .tbl2 .t-seats { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.tbl2 .t-tm.late { color: var(--danger); }
.tbl2 .t-amt { margin-top: auto; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tbl2 .t-sub, .tbl2 .t-free { font-size: 12px; color: var(--muted); font-weight: 600; }
.tbl2 .t-free { margin-top: auto; }
.tbl2 .t-rsv { margin-top: auto; font-size: 12px; color: #7e22ce; line-height: 1.3; }
.tbl2 .t-bk { position: absolute; right: 8px; bottom: 8px; font-size: 10.5px; font-weight: 800; color: #7e22ce; display: inline-flex; gap: 3px; align-items: center; }
.tbl2.running { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.tbl2.running .t-amt { color: var(--brand-700); }
.tbl2.billed { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 50%, var(--border)); }
.tbl2.billed .t-amt, .tbl2.billed .t-sub { color: var(--ok); }
.tbl2.reserved { background: color-mix(in srgb, #a855f7 7%, var(--surface)); border-color: #c4b5fd; border-style: dashed; }
.ord-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ord-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.ord-card:hover { border-color: var(--brand); }
.ord-card.stale { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.ord-card .avatar { width: 30px; height: 30px; }
@media (min-width: 1200px) { .floor2 { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); } }

/* ===== Active states, one language everywhere ===== */
/* Focus ring for keyboard users only (no box after a tap / click) */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 70%, transparent); outline-offset: 2px; }
.input:focus-visible { outline: none; }

/* Phone bottom menu */
@media (max-width: 899px) {
  .bottomnav { padding: 6px 4px calc(6px + var(--safe-b)); height: calc(var(--nav-h) + var(--safe-b) + 6px); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(15,23,42,.06); }
  .nav-btn { gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 0; }
  .nav-btn .ic { width: 56px; height: 30px; padding: 5px 0; border-radius: var(--r); transition: background .15s, color .15s; box-sizing: border-box; }
  .nav-btn.active { color: var(--brand); font-weight: 800; }
  .nav-btn.active .ic { background: var(--brand-50); color: var(--brand); }
  .nav-btn:active .ic { transform: scale(.94); }
  .nav-btn.primary .ic { width: 52px; height: 38px; padding: 8px 0; border-radius: var(--r); background: var(--brand); color: #fff; box-shadow: 0 6px 14px rgba(69,104,220,.35); margin-top: -10px; }
  .nav-btn.primary.active .ic { background: var(--brand-700); box-shadow: 0 0 0 3px var(--brand-100), 0 6px 14px rgba(69,104,220,.35); }
  .nav-btn.primary { color: var(--text-2); } .nav-btn.primary.active { color: var(--brand); }
  .nav-btn .dot { top: 2px; margin-left: 10px; border: 2px solid var(--surface); }
}

/* Segment switches / tab bars: raised white pill, brand text */
.type-tabs, .seg { background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r); padding: 3px; }
.type-tabs button, .seg button { color: var(--text-2); transition: background .15s, color .15s, box-shadow .15s; }
.type-tabs button:hover:not(.active):not(:disabled), .seg button:hover:not(.active) { color: var(--text); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.type-tabs button.active, .seg button.active { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(15,23,42,.10), 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent); font-weight: 800; }

/* Filter chips: solid brand when on */
.chip { transition: background .15s, color .15s, border-color .15s; }
.chip:hover:not(.active) { border-color: var(--border-strong); background: var(--surface-2); }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 2px 8px rgba(69,104,220,.28); }
/* Every chip's count is the same small 7px tag, selected or not, so a row of chips reads as one set. */
.chip .count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: var(--r); background: var(--surface-3); color: var(--text-2); opacity: 1; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chip.active .count { background: rgba(255,255,255,.22); color: #fff; }
.st-chip.active i { border-color: #fff; }

/* Side menus (Settings) */
@media (min-width: 900px) {
  .settings-nav .chip.active { background: var(--brand-50); color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); font-weight: 800; }
}
/* Kitchen status tabs follow the same brand highlight */
.kds-tabs button.on { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 2px 8px rgba(69,104,220,.28); }
/* Dashboard: never wider than the screen */
.dash .page-head { flex-wrap: wrap; min-width: 0; }
.dash .page-head > .row { min-width: 0; max-width: 100%; }
.dash .table-wrap { overflow-x: auto; max-width: 100%; }
@media (max-width: 699px) { .dash .page-head > .row { width: 100%; } .dash table.data th, .dash table.data td { padding-left: 6px; padding-right: 6px; } }
.chip-row { max-width: 100%; min-width: 0; }
@media (max-width: 699px) { .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .chip-row::-webkit-scrollbar { display: none; } .chip-row > .chip { flex: 0 0 auto; } }
@media (max-width: 699px) { .tables-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .tables-tabs::-webkit-scrollbar { display: none; } .tables-tabs button { flex: 0 0 auto; white-space: nowrap; padding-left: 10px; padding-right: 10px; } }
/* Upload delayed (server slow for a long time) */
.offline-bar[data-tone="warn"] { background: #fff7ed; color: #9a3412; border-bottom: 1px solid #fed7aa; flex-wrap: wrap; text-align: center; }
.offline-bar[data-tone="warn"] .btn { background: #9a3412; color: #fff; border-color: transparent; }
.sync-pill[data-state="stuck"] { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.sync-pill[data-state="stuck"] .led { background: #ea580c; }
.bk-card.drag { outline: 2px dashed var(--brand); outline-offset: 2px; background: var(--brand-50); }
:root[data-theme="dark"] .offline-bar[data-tone="warn"], :root[data-theme="dark"] .sync-pill[data-state="stuck"] { background: #431407; color: #fed7aa; border-color: #7c2d12; }
/* ---------- Visual guides ---------- */
.g-art { width: 120px; height: 80px; color: var(--brand); flex: 0 0 auto; }
.g-art .ga-b { fill: var(--brand-50); } .g-art .ga-l { fill: var(--surface); }
.guide { display: flex; flex-direction: column; gap: 16px; }
.g-intro { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.g-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.g-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px 12px; border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); cursor: pointer; text-align: center; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.g-opt .g-art { width: 96px; height: 64px; }
.g-opt b { font-size: 14px; } .g-opt small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.g-opt:hover { border-color: var(--brand); transform: translateY(-1px); }
.g-opt.active { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.g-opt.active .ga-l { fill: var(--surface); }
.g-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.g-step { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.g-step:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--border); }
.g-num { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: 0 0 auto; box-shadow: 0 0 0 4px var(--brand-50); }
.g-body { flex: 1; min-width: 0; display: flex; gap: 14px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; }
.g-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.g-text h4 { margin: 0; font-size: 15px; }
.g-text p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2, var(--text)); }
.g-step-art { width: 110px; height: 74px; }
.g-code { display: flex; align-items: center; gap: 6px; background: #0f172a; color: #e2e8f0; border-radius: var(--r); padding: 6px 6px 6px 10px; font-size: 12.5px; overflow-x: auto; }
.g-code code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; }
.g-code .icon-btn { color: #e2e8f0; flex: 0 0 auto; }
.g-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; padding: 8px 10px; border-radius: var(--r); }
.g-note svg { flex: 0 0 auto; margin-top: 1px; }
.g-note.tip { background: var(--info-bg, #eff6ff); color: var(--info, #1d4ed8); }
.g-note.warn { background: var(--warn-bg, #fffbeb); color: #92400e; }
.g-top { margin-bottom: 12px; }
.g-link { align-self: flex-start; }
.g-outro { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--surface-3); font-size: 13px; color: var(--muted); }
.g-how { display: flex; align-items: center; gap: 6px; padding: 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.g-how-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 120px; flex: 1; }
.g-how-step .g-art { width: 84px; height: 56px; }
.g-how-step b { font-size: 13px; } .g-how-step small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.g-how-arrow { color: var(--muted); flex: 0 0 auto; }
@media (max-width: 699px) {
  .g-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-step-art { display: none; }
  .g-body { padding: 10px 12px; }
  .g-how-arrow { display: none; }
}
/* ---------- QR card designer ---------- */
.qrd { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; min-height: 0; }
.qrd-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.qrd-sec { display: flex; flex-direction: column; gap: 8px; }
.qrd-h { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.qrd-h .btn { margin-left: auto; } .qrd-h .btn + .btn { margin-left: 0; }
.qrd-designs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qrd-design, .qrd-size { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 6px; border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); cursor: pointer; text-align: center; }
.qrd-design b, .qrd-size b { font-size: 12.5px; } .qrd-design small, .qrd-size small { font-size: 11px; color: var(--muted); line-height: 1.25; }
.qrd-design:hover, .qrd-size:hover { border-color: var(--brand); }
.qrd-design.active, .qrd-size.active { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.qrd-thumb { width: 46px; height: 60px; border-radius: var(--r); position: relative; overflow: hidden; background: #fff; border: 1px solid #e2e8f0; display: block; }
.qrd-thumb i { position: absolute; left: 50%; top: 52%; width: 22px; height: 22px; transform: translate(-50%, -50%); background: repeating-conic-gradient(#0f172a 0 25%, #fff 0 50%) 0 0 / 7px 7px; border-radius: 2px; }
.qrd-thumb.t-bold::before { content: ''; position: absolute; inset: 0 0 auto; height: 14px; background: var(--brand); }
.qrd-thumb.t-classic { border: 2px solid var(--brand); }
.qrd-thumb.t-steps { background: linear-gradient(180deg, var(--brand-50), #fff 60%); }
.qrd-thumb.t-steps::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 6px; height: 6px; background: radial-gradient(circle, var(--brand) 2.5px, transparent 3px) 0 0 / 10px 6px; }
.qrd-thumb.t-minimal::before { content: '7'; position: absolute; left: 5px; top: 1px; font-size: 15px; font-weight: 300; color: var(--brand); }
.qrd-thumb.t-dark { background: #0f172a; border-color: #0f172a; }
.qrd-thumb.t-dark i { background: repeating-conic-gradient(#0f172a 0 25%, #fff 0 50%) 0 0 / 7px 7px; outline: 3px solid #fff; }
.qrd-thumb.t-tent::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed #94a3b8; }
.qrd-thumb.t-tent i { width: 14px; height: 14px; top: 76%; left: 30%; } .qrd-thumb.t-tent::after { content: ''; position: absolute; width: 14px; height: 14px; top: 14%; left: 54%; background: repeating-conic-gradient(#0f172a 0 25%, #fff 0 50%) 0 0 / 5px 5px; }
.qrd-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.qrd-grid { display: grid; gap: 2px; width: 30px; height: 40px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 3px; background: #fff; }
.qrd-grid i { background: var(--brand); opacity: .55; border-radius: 1px; }
.qrd-tables .chip { min-height: 32px; }
.qrd-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.qrd-paper { position: relative; background: var(--surface-3); border-radius: var(--r); padding: 12px; overflow: hidden; }
.qrd-paper iframe { width: 794px; height: 1123px; border: 0; background: #fff; box-shadow: 0 6px 24px rgba(15, 23, 42, .18); transform-origin: 0 0; display: block; }
@media (max-width: 899px) { .qrd { grid-template-columns: 1fr; } .qrd-main { order: -1; } }
/* ---------- Dialogs v2 ---------- */
.sheet-backdrop { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-head { gap: 12px; }
.sheet-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sheet-titles h2 { flex: none; } .sheet-titles small { color: var(--muted); font-size: 13px; }
.sheet-ic { width: 36px; height: 36px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: 0 0 auto; }
.sheet-ic.tone-danger { background: var(--danger-bg); color: var(--danger); }
.sheet-ic.tone-warn { background: var(--warn-bg, #fffbeb); color: #b45309; }
.sheet-ic.tone-ok { background: var(--ok-bg); color: var(--ok); }
.sheet-foot { background: var(--surface-2); }
@media (min-width: 700px) {
  .sheet { box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .35), 0 0 0 1px rgba(15, 23, 42, .04); border-radius: var(--r); }
  .sheet-foot { border-radius: 0 0 var(--r) var(--r); }
  .sheet-head { padding: 14px 14px 12px 20px; }
}
.confirm-box { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 4px 4px; gap: 6px; }
.confirm-box h3 { margin: 6px 0 0; font-size: 18px; font-weight: 800; }
.confirm-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand-50) 50%, transparent); }
.confirm-box.tone-danger .confirm-ic { background: var(--danger-bg); color: var(--danger); box-shadow: 0 0 0 8px color-mix(in srgb, var(--danger-bg) 55%, transparent); }
.confirm-box.tone-warn .confirm-ic { background: var(--warn-bg, #fffbeb); color: #b45309; box-shadow: 0 0 0 8px color-mix(in srgb, #fde68a 35%, transparent); }
.confirm-box .confirm-msg { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--text-2, var(--text)); max-width: 340px; }
.confirm-detail { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.sheet-confirm .sheet-foot { border-top: 0; background: var(--surface); padding-top: 4px; padding-bottom: 18px; }
.sheet-confirm .sheet-foot .btn { flex: 1; min-width: 0; }
.sheet-confirm .sheet-body { padding-bottom: 12px; }
.g-os { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.g-os-tabs { align-self: flex-start; }
.g-os-tabs button { display: inline-flex; align-items: center; gap: 6px; } .g-os-tabs small { font-weight: 500; opacity: .7; font-size: 11px; }
.g-sub { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: gs; }
.g-sub > li { counter-increment: gs; display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 8px 10px; }
.g-sub > li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.g-sub > li > div > b::before { content: counter(gs, lower-alpha) ') '; color: var(--brand); }
.g-sub > li b { font-size: 13.5px; } .g-sub > li span { font-size: 13px; line-height: 1.45; color: var(--text-2, var(--text)); }
.g-sub-art { width: 64px; height: 44px; }
.g-dl { align-self: flex-start; margin-top: 4px; }
.g-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.g-act-out { font-size: 13px; font-weight: 600; } .g-act-out.ok { color: var(--ok); } .g-act-out.bad { color: var(--danger); } .g-act-out.busy { color: var(--muted); }
@media (max-width: 699px) { .g-sub-art { display: none; } }
.g-sub[hidden] { display: none; }
/* ---------- Dropdowns (select.js) ---------- */
select.input { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.dsel-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden; border: 0 !important; }
.field, label:has(> .dsel-native) { position: relative; }
.dsel { display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.dsel-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsel.placeholder .dsel-v { color: var(--muted); }
.dsel-ar { display: grid; place-items: center; width: 24px; height: 24px; margin-right: -6px; border-radius: var(--r); color: var(--muted); transition: transform .15s, background .15s, color .15s; flex: 0 0 auto; }
.dsel:hover .dsel-ar { background: var(--surface-3); color: var(--text); }
.dsel.open { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.dsel.open .dsel-ar { transform: rotate(180deg); color: var(--brand); background: var(--brand-50); }
.dsel:disabled { opacity: .6; cursor: not-allowed; background: var(--surface-2); }
.dsel-pop { position: fixed; z-index: 1200; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: 0 16px 40px -8px rgba(15, 23, 42, .28); overflow: hidden; animation: dselIn .12s ease-out; outline: none; }
.dsel-pop.up { animation-name: dselUp; }
@keyframes dselIn { from { opacity: 0; transform: translateY(-4px); } } @keyframes dselUp { from { opacity: 0; transform: translateY(4px); } }
.dsel-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--muted); flex: none; }
.dsel-search input { flex: 1; border: 0; outline: none; background: var(--surface-2); border-radius: var(--r); padding: 8px 10px; font: inherit; color: var(--text); min-width: 0; }
.dsel-search input::-webkit-search-cancel-button { cursor: pointer; }
.dsel-list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.dsel-opt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: var(--r); text-align: left; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; min-height: 38px; }
.dsel-opt span { flex: 1; min-width: 0; }
.dsel-opt.act { background: var(--surface-3); }
.dsel-opt.sel { color: var(--brand); font-weight: 600; background: var(--brand-50); }
.dsel-opt.sel svg { color: var(--brand); flex: 0 0 auto; }
.dsel-opt:disabled { opacity: .45; cursor: not-allowed; }
.dsel-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dsel-none { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 699px) { .dsel-opt { min-height: 44px; font-size: 15px; } }
/* ---------- KDS v3: equal cards per row, calmer late state ---------- */
.kds { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: stretch; grid-auto-rows: auto; }
.kot-card { display: flex; flex-direction: column; min-height: 210px; border-radius: var(--r); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 4px 14px -6px rgba(15,23,42,.12); }
.kot-card.late { --kc: var(--brand); box-shadow: 0 0 0 2px var(--danger), 0 8px 20px -8px rgba(220,38,38,.35); }
.kot-card.late.preparing { --kc: #d97706; }
.kot-card header { padding: 0; }
.kot-card .kh-main { padding: 10px 12px 2px; justify-content: flex-start; }
.kot-card .kh-main b { flex: 1; min-width: 0; font-size: 17px; }
.kot-card .kh-type { width: 26px; height: 26px; border-radius: var(--r); background: rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }
.kot-card .kh-timer { margin-left: auto; }
.kot-card .kh-timer.late { background: #fff; color: var(--danger); animation: kdsPulse 1.6s ease-in-out infinite; }
@keyframes kdsPulse { 50% { box-shadow: 0 0 0 4px rgba(255,255,255,.35); } }
.kot-card .kh-sub { padding: 2px 8px 9px 12px; min-height: 34px; }
.kot-card ul { flex: 1; padding: 6px 0; }
.kot-card li { padding: 9px 12px; }
.kot-card li .kn { flex: 1; min-width: 0; line-height: 1.3; }
.kot-card .kfoot-note { margin: 0 12px 8px; border-radius: var(--r); }
.kot-card footer { margin-top: auto; padding: 10px 12px 12px; border-top: 1px solid var(--border); background: var(--surface-2); }
.kot-card footer .btn { min-height: 44px; border-radius: var(--r); font-weight: 700; }
@media (min-width: 1500px) { .kds { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .kot-card .kh-timer.late { animation: none; } }
/* ---------- Delivery addresses ---------- */
.addr-form { display: flex; flex-direction: column; gap: 10px; }
.addr-labels { display: flex; gap: 6px; flex-wrap: wrap; }
.addr-labels .chip { display: inline-flex; align-items: center; gap: 5px; }
.req { color: var(--danger); font-weight: 700; }
.addr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.addr-card { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); text-align: left; cursor: pointer; color: var(--text); font: inherit; min-height: 64px; }
.addr-card:hover { border-color: var(--brand); }
.addr-card.on { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.addr-ic { width: 30px; height: 30px; border-radius: var(--r); display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.addr-card.on .addr-ic { background: var(--brand); color: #fff; }
.addr-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.addr-tx b { font-size: 13.5px; } .addr-tx small { font-size: 12.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.addr-ck { color: var(--brand); opacity: 0; flex: none; } .addr-card.on .addr-ck { opacity: 1; }
.addr-new { align-items: center; justify-content: center; border-style: dashed; color: var(--brand); }
.addr-new .addr-tx { flex: none; }
.addr-back { align-self: flex-start; margin-bottom: 6px; }
/* ---------- Dialogs v3: tinted header, soft body, clear footer ---------- */
.sheet-head { background: linear-gradient(180deg, color-mix(in srgb, var(--brand-50) 70%, var(--surface)) 0%, var(--surface) 100%); border-bottom: 1px solid var(--border); }
.sheet-titles h2 { font-size: 18px; line-height: 1.2; letter-spacing: -.01em; }
.sheet-titles small { margin-top: 2px; line-height: 1.35; }
.sheet-ic { width: 40px; height: 40px; border-radius: var(--r); background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(15,23,42,.08), inset 0 0 0 1px color-mix(in srgb, var(--brand) 18%, transparent); }
.sheet-head .icon-btn[data-close] { border-radius: var(--r); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.sheet-head .icon-btn[data-close]:hover { background: var(--surface-3); }
.sheet-body { background: var(--surface-2); }
.sheet-body .input, .sheet-body textarea.input { background: var(--surface); }
.sheet-foot { background: var(--surface); box-shadow: 0 -6px 16px -12px rgba(15,23,42,.25); }
.sheet-confirm .sheet-body { background: var(--surface); }
.guide .g-body { background: var(--surface); }
/* Collapsible section card inside dialogs */
.fold-card { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.fold-card > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card > summary b { display: block; font-size: 14px; } .fold-card > summary small { display: block; font-size: 12px; color: var(--muted); }
.fold-card > summary > svg:last-child { color: var(--muted); transition: transform .15s; }
.fold-card[open] > summary > svg:last-child { transform: rotate(180deg); }
.fold-ic { width: 32px; height: 32px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.fold-body { padding: 4px 12px 12px; border-top: 1px dashed var(--border); padding-top: 12px; }
/* Table picker */
.tp-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.tp-legend span { display: inline-flex; align-items: center; gap: 6px; } .tp-legend .grow { flex: 1; }
.tp-legend i { width: 10px; height: 10px; border-radius: 50%; } .tp-legend i.f { background: var(--ok); } .tp-legend i.r { background: var(--brand); } .tp-legend i.b { background: #d97706; }
.tp-area { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 8px; }
.tp-area h4 { margin: 0; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.tp-area span { font-size: 12px; color: var(--muted); }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.tp-t { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; min-height: 76px; padding: 10px 12px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; font: inherit; transition: border-color .12s, transform .08s, box-shadow .12s; }
.tp-t .tp-nm { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.tp-t .tp-st { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tp-t .tp-dot { position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.tp-t.free:hover { border-color: var(--ok); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--ok) 55%, transparent); transform: translateY(-1px); }
.tp-t.running, .tp-t.billed { cursor: not-allowed; background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, var(--surface-3) 8px 9px); }
.tp-t.running .tp-dot { background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.tp-t.billed .tp-dot { background: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.18); }
.tp-t.running .tp-nm, .tp-t.billed .tp-nm { color: var(--text-2); }
/* ---------- POS tiles v3: small corner mark instead of a side bar ---------- */
.item-card::before { left: 0; top: 0; bottom: auto; width: 14px !important; height: 14px; border-radius: 0 0 14px 0; background: var(--cat, var(--border-strong)); opacity: .9; }
@media (min-width: 700px) {
  .item-card { background: var(--surface); border-color: var(--border); }
  .item-card:hover { border-color: color-mix(in srgb, var(--cat, var(--brand)) 60%, var(--border)); box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--cat, var(--brand)) 35%, transparent); }
  .item-card .body { padding-left: 12px; }
}
.item-card .nm { padding-left: 4px; }
/* Dish details card */
.dish-peek { position: fixed; z-index: 900; width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: 0 20px 44px -12px rgba(15,23,42,.35); overflow: hidden; pointer-events: none; opacity: 0; transform: translateY(4px) scale(.98); transition: opacity .12s, transform .12s; }
.dish-peek.on { opacity: 1; transform: none; }
.dp-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 40%; background: var(--surface-3); } /* photos are square: 4:3 keeps the whole dish in view */
.dp-img.dp-ph { aspect-ratio: auto; }
.dp-ph { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--cat) 30%, var(--surface)), color-mix(in srgb, var(--cat) 8%, var(--surface))); height: 84px; }
.dp-ph span { font-size: 34px; font-weight: 800; color: color-mix(in srgb, var(--cat) 75%, #000); opacity: .6; }
.dp-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.dp-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.dp-code { margin-left: auto; background: var(--surface-3); border-radius: var(--r-sm); padding: 1px 6px; text-transform: none; letter-spacing: 0; color: var(--text-2); }
.dp-body h4 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.25; }
.dp-body p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.dp-sec small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.dp-combo { margin: 0; padding-left: 16px; font-size: 13px; line-height: 1.5; }
.dp-prices { list-style: none; margin: 0; padding: 8px 10px; background: var(--surface-2); border-radius: var(--r); display: flex; flex-direction: column; gap: 4px; }
.dp-prices li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; } .dp-prices b { font-variant-numeric: tabular-nums; } .dp-prices s { color: var(--muted); font-weight: 500; }
.dp-chips { display: flex; flex-wrap: wrap; gap: 4px; } .dp-chips span { font-size: 11.5px; padding: 2px 7px; border-radius: var(--r); background: var(--surface-3); color: var(--text-2); }
.dp-foot { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; } .dp-foot span { padding: 2px 8px; border-radius: var(--r); background: var(--surface-3); color: var(--text-2); font-weight: 600; }
.dp-foot .dp-na { background: var(--danger-bg); color: var(--danger); } .dp-foot .dp-promo { background: var(--ok-bg); color: var(--ok); }
/* ---------- Hours & delivery ---------- */
.ot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.ot-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1.5px solid var(--border); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.ot-card input { position: absolute; opacity: 0; pointer-events: none; }
.ot-card b { display: block; font-size: 14px; } .ot-card small { display: block; font-size: 12px; color: var(--muted); }
.ot-ic { width: 38px; height: 38px; border-radius: var(--r); display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.ot-ck { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; flex: none; }
.ot-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.ot-card:has(input:checked) .ot-ic { background: var(--brand); color: #fff; }
.ot-card:has(input:checked) .ot-ck { background: var(--brand); border-color: var(--brand); color: #fff; }
.ot-card:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.loc-map { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--border-strong); }
.loc-paste { flex: 1; min-width: 220px; }
.hr-list { display: flex; flex-direction: column; gap: 6px; }
.hr-day { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.hr-day.off { background: var(--surface-2); }
.hr-name { display: flex; align-items: center; gap: 10px; width: 150px; cursor: pointer; }
.hr-slots { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.hr-slot { display: inline-flex; align-items: center; gap: 6px; } .hr-slot .input { width: 120px; min-height: 36px; padding: 6px 8px; } .hr-slot > span { color: var(--muted); font-size: 12.5px; }
.hr-closed { color: var(--muted); font-size: 13px; font-weight: 600; }
.hr-copy { opacity: 0; transition: opacity .12s; } .hr-day:hover .hr-copy, .hr-copy:focus-visible { opacity: 1; }
.hol-list { display: flex; flex-direction: column; gap: 6px; }
.hol-row { display: flex; gap: 8px; align-items: center; } .hol-row > .input { flex: 1; } .hol-date { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
@media (max-width: 699px) { .hr-name { width: 100%; } .hr-copy { opacity: 1; } .hr-slot .input { width: 104px; } .hol-row { flex-wrap: wrap; } }
/* corner mark follows the card's own rounded corner (inner radius = card radius − 1px border) */
.item-card::before { border-radius: 6px 0 14px 0; }
@media (min-width: 700px) { .item-card::before { border-radius: 6px 0 14px 0; } }
/* ---------- One control height everywhere: inputs, search bars, dropdowns, buttons, segmented tabs ---------- */
:root { --ctl: 44px; }
@media (min-width: 900px) { :root { --ctl: 40px; } }
.input:not(textarea), select.input, .dsel, .search .input, .btn:where(:not(.btn-sm):not(.btn-lg):not(.icon-btn)) { height: var(--ctl); min-height: var(--ctl); box-sizing: border-box; }
.input:not(textarea), .dsel { padding-top: 0; padding-bottom: 0; }
.seg { min-height: var(--ctl); box-sizing: border-box; align-items: stretch; }
.toolbar .chip, .page-head .chip, .row > .chip.toolbar-chip { min-height: var(--ctl); }
.hr-slot .input { height: var(--ctl); min-height: var(--ctl); }
.date-host .input, .date-host button.input { height: var(--ctl); min-height: var(--ctl); }
.tel-wrap { min-height: var(--ctl); }
.page-head .btn-sm, .page-head .chip { height: var(--ctl); min-height: var(--ctl); }
/* One row, one height: every button in a sheet footer is the same size (no big Settle next to a small Bill only). */
:root { --foot-btn: 50px; }
@media (min-width: 900px) { :root { --foot-btn: 46px; } }
.sheet-foot .btn { height: var(--foot-btn); min-height: var(--foot-btn); font-size: 15px; border-radius: var(--r); padding: 0 18px; }
/* Anywhere else: if a row mixes sizes, the others follow the biggest button in it. */
:where(:not(.sheet-foot)):has(> .btn-lg) > .btn:not(.btn-lg) { height: 50px; min-height: 50px; }
:where(:not(.sheet-foot)):has(> .btn-lg) > .icon-btn { width: 50px; height: 50px; }
:where(:not(.sheet-foot)):has(> .btn:not(.btn-sm):not(.btn-lg):not(.icon-btn)) > .btn-sm,
:where(:not(.sheet-foot)):has(> .input:not(textarea), > select.input, > .search) > .btn-sm { height: var(--ctl); min-height: var(--ctl); }
/* Food-type filter (All / Veg / Non-veg / Egg) */
.food-seg { flex: none; }
.food-seg[hidden] { display: none; }
.food-seg button { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; white-space: nowrap; }
.pos-tools { align-items: center; }
.pos-tools .search { flex: 1; min-width: 0; }
@media (max-width: 699px) { .food-seg button { padding: 0 9px; } .food-seg button[data-food]:not([data-food="all"]) span { display: none; } }
@media (max-width: 1279px) { .pos-tools .food-seg button[data-food]:not([data-food="all"]) span { display: none; } .pos-tools .food-seg button { padding: 0 10px; } }
.pos-tools .search { min-width: 180px; }
/* POS tile badges */
.item-card .best-badge { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #f59e0b; color: #fff; box-shadow: 0 2px 6px rgba(245,158,11,.45); z-index: 1; }
.item-card .best-badge svg { fill: currentColor; }
.item-card .stk-tag { position: absolute; top: 6px; right: 6px; z-index: 1; font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: var(--r-sm); letter-spacing: .01em; }
.item-card.is-best .stk-tag, .item-card:has(.qty-badge) .stk-tag { right: 34px; }
.item-card .stk-tag.low { background: #fef3c7; color: #92400e; }
.item-card .stk-tag.out { background: var(--danger-bg); color: var(--danger); }
.item-card.has-pic .best-badge, .item-card.has-pic .stk-tag { top: 4px; }
.dp-foot .dp-best { background: #fef3c7; color: #92400e; display: inline-flex; align-items: center; gap: 3px; } .dp-foot .dp-best svg { fill: currentColor; }
.dp-foot .dp-low { background: #fef3c7; color: #92400e; }
.btn, .btn-sm, .btn-lg, .icon-btn { border-radius: var(--r); }
/* ---------- KDS v4: same look as the rest of the app ---------- */
.kds-tabs { gap: 10px; }
.kds-tabs .seg button { display: inline-flex; align-items: center; gap: 6px; }
.kds-tabs .tcount { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.kds-tabs .seg button.active .tcount { background: var(--brand-50); color: var(--brand); }
.kds-late { animation: none; padding: 0 10px; height: var(--ctl); font-size: 13px; font-weight: 700; background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); }
.kds { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.kot-card { min-height: 0; border-radius: var(--r); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.kot-card.late { box-shadow: 0 0 0 1.5px var(--danger); }
.kot-card header { background: var(--surface); color: var(--text); border-bottom: 1px solid var(--border); }
.kot-card .kh-main { padding: 10px 12px 2px; }
.kot-card .kh-main b { font-size: 15px; font-weight: 700; }
.kot-card .kh-type { width: 26px; height: 26px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); }
.kot-card[data-type="delivery"] .kh-type { background: #fff7ed; color: #c2410c; } .kot-card[data-type="takeaway"] .kh-type { background: #f0fdf4; color: #15803d; }
.kot-card .kh-timer { background: var(--surface-3); color: var(--text-2); font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: var(--r-sm); }
.kot-card .kh-timer.late { background: var(--danger-bg); color: var(--danger); animation: none; }
.kot-card .kh-sub { color: var(--muted); font-size: 12px; opacity: 1; padding: 2px 8px 8px 12px; min-height: 0; gap: 6px; }
.kot-card .kh-sub > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kot-card .kh-sub > span:first-child { flex: none; }
.kot-card .kh-status { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: var(--r-sm); }
.kh-status.s-new { background: var(--brand-50); color: var(--brand); } .kh-status.s-preparing { background: #fef3c7; color: #92400e; } .kh-status.s-ready { background: var(--ok-bg); color: var(--ok); } .kh-status.s-served { background: var(--surface-3); color: var(--muted); }
.kot-card .kh-st { background: var(--surface-3); color: var(--text-2); font-size: 10.5px; }
.kot-card .kh-print { background: transparent; color: var(--muted); border: 1px solid var(--border); width: 28px; height: 26px; }
.kot-card .kh-print:hover { background: var(--surface-3); color: var(--text); }
.kot-card li { font-size: 14px; font-weight: 600; padding: 7px 12px; }
.kot-card li .kq { min-width: 26px; height: 24px; font-size: 13px; border-radius: var(--r-sm); }
.kot-card footer { background: var(--surface); padding: 8px 12px 10px; }
.kot-card footer .btn { min-height: 0; font-size: 13.5px; font-weight: 600; }
.kot-card footer .btn-soft { background: var(--brand-50); color: var(--brand); border-color: transparent; }
.kot-card footer .btn-soft:hover { background: var(--brand); color: #fff; }
.entry-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); font-weight: 600; }
.entry-total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); } .entry-total b { font-size: 18px; }
.cart-totals .entry-paid { color: var(--ok); } .cart-totals .entry-paid span:first-child { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 1279px) { .cart-meta .hide-sm { display: none; } }
/* Dialog corners: header and footer follow the dialog's own 7px corners */
.sheet { overflow: hidden; }
.sheet-head { border-radius: var(--r) var(--r) 0 0; }
.sheet-foot { border-radius: 0 0 var(--r) var(--r); }
@media (max-width: 699px) { .sheet-foot { border-radius: 0; } }
.sheet-drawer .sheet-head, .sheet-drawer .sheet-foot { border-radius: 0; }
/* ---------- Kitchen big-screen display (#/kitchen/screen) ---------- */
html.kds-screen .topbar, html.kds-screen .bottomnav, html.kds-screen .plan-banner, html.kds-screen #offline-bar, html.kds-screen .install-card { display: none !important; }
html.kds-screen .app { padding: 0 !important; grid-template-columns: 1fr !important; }
html.kds-screen main#view { margin: 0 !important; padding: 0 !important; max-width: none !important; height: 100dvh; overflow: auto; }
html.kds-screen { --kbg: #0b1220; --kcard: #121c31; --kline: #1f2b45; --ktext: #f1f5f9; --kmute: #94a3b8; background: var(--kbg); }
html.kds-screen.kds-light { --kbg: #eef2f7; --kcard: #fff; --kline: #dbe2ea; --ktext: #0f172a; --kmute: #64748b; }
html.kds-screen body { background: var(--kbg); color: var(--ktext); }
html.kds-screen .kds-page { padding: 0 16px 16px; }
.kds-sbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; margin: 0 -16px 12px; background: var(--kbg); border-bottom: 1px solid var(--kline); }
.kds-sbar-l { display: flex; align-items: baseline; gap: 14px; } .kds-sbar-l b { font-size: 26px; font-weight: 800; } .kds-clock { font-size: 22px; color: var(--kmute); font-variant-numeric: tabular-nums; font-weight: 700; }
.kds-sbar-c { display: flex; gap: 22px; font-size: 18px; color: var(--kmute); } .kds-sbar-c b { font-size: 26px; color: var(--ktext); margin-right: 4px; } .kds-sbar-c .late b, .kds-sbar-c .late { color: #f87171; }
.kds-sbar-r { display: flex; gap: 8px; }
.kds-sbtn { width: 52px; height: 52px; border-radius: var(--r); border: 1px solid var(--kline); background: var(--kcard); color: var(--ktext); display: grid; place-items: center; cursor: pointer; }
html.kds-screen .kds-bar { display: none; }
html.kds-screen .kds-sum { background: var(--kcard); color: var(--ktext); border-color: var(--kline); font-size: 18px; }
html.kds-screen .kds { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
html.kds-screen .kot-card { background: var(--kcard); border-color: var(--kline); color: var(--ktext); box-shadow: none; }
html.kds-screen .kot-card.late { box-shadow: 0 0 0 3px #ef4444; }
html.kds-screen .kot-card header { background: var(--kcard); color: var(--ktext); border-color: var(--kline); }
html.kds-screen .kot-card .kh-main { padding: 14px 16px 4px; } html.kds-screen .kot-card .kh-main b { font-size: 26px; font-weight: 800; }
html.kds-screen .kot-card .kh-type { width: 40px; height: 40px; } html.kds-screen .kot-card .kh-type svg { width: 22px; height: 22px; }
html.kds-screen .kot-card .kh-timer { font-size: 20px; padding: 4px 10px; background: var(--kline); color: var(--ktext); } html.kds-screen .kot-card .kh-timer.late { background: #ef4444; color: #fff; }
html.kds-screen .kot-card .kh-sub { font-size: 16px; color: var(--kmute); padding: 4px 12px 12px 16px; } html.kds-screen .kot-card .kh-status { font-size: 14px; padding: 2px 8px; }
html.kds-screen .kot-card .kh-st { font-size: 13px; background: var(--kline); color: var(--ktext); }
html.kds-screen .kot-card .kh-print { width: 44px; height: 40px; color: var(--kmute); border-color: var(--kline); }
html.kds-screen .kot-card li { font-size: 22px; padding: 12px 16px; border-color: var(--kline); min-height: 56px; align-items: center; }
html.kds-screen .kot-card li:hover { background: transparent; }
html.kds-screen .kot-card li .kq { min-width: 42px; height: 38px; font-size: 22px; background: var(--kline); color: var(--ktext); }
html.kds-screen .kot-card li small { font-size: 16px; }
html.kds-screen .kot-card li.done { opacity: .4; text-decoration: line-through; }
html.kds-screen .kot-card footer { background: var(--kcard); border-color: var(--kline); padding: 12px 16px 16px; }
html.kds-screen .kot-card footer .btn { min-height: 64px !important; height: 64px; font-size: 22px; font-weight: 800; }
html.kds-screen .kot-card footer .btn-soft { background: #3b5bdb; color: #fff; } html.kds-screen .kot-card footer .btn-ok { background: #16a34a; color: #fff; }
html.kds-screen .kot-card .kfoot-note { font-size: 18px; }
html.kds-screen .kds-empty { color: var(--kmute); } html.kds-screen .kds-empty h3 { color: var(--ktext); font-size: 28px; }
@media (max-width: 699px) { .kds-sbar { flex-wrap: wrap; } .kds-sbar-c { font-size: 15px; gap: 12px; } }
html.kds-screen .kds-page { padding: 0 16px 16px !important; }
.kds-sbar { margin: 0 -16px 14px; padding: 12px 16px; }
html.kds-screen .kot-card li small, html.kds-screen .kot-card li small.parts { color: #cbd5e1; } html.kds-screen.kds-light .kot-card li small { color: #475569; }
/* ---------- Inventory: same layout as the other pages ---------- */
.inv-tabs-wrap { max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; } .inv-tabs-wrap::-webkit-scrollbar { display: none; }
.inv-tabs { display: inline-flex; } .inv-tabs button { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tcount { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.tcount.warn { background: #fef3c7; color: #92400e; }
.inv-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 899px) { .inv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi.warn b { color: #b45309; } .kpi.bad b { color: var(--danger); }
.inv-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px; }
.inv-tools .search { flex: 1; min-width: 200px; }
.page > .stack, #inv-body { gap: 14px; }
/* ---------- Timed tables (gaming / pool) ---------- */
.play-panel { display: flex; align-items: center; gap: 10px; margin: 8px 12px 4px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); }
.play-panel .grow { min-width: 0; } .play-panel b { display: block; font-size: 15px; } .play-panel small { display: block; font-size: 12px; color: var(--muted); }
.play-panel .pp-ic { width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.play-panel.run { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 30%, transparent); } .play-panel.run .pp-ic { background: var(--ok); color: #fff; }
.play-panel .pp-time { font-size: 20px; font-variant-numeric: tabular-nums; }
.play-panel.soon { background: #fef3c7; border-color: #fcd34d; } .play-panel.soon .pp-ic { background: #d97706; }
.play-panel.over { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 35%, transparent); } .play-panel.over .pp-ic { background: var(--danger); } .play-panel.over small { color: var(--danger); font-weight: 700; }
.play-panel .btn { flex: none; }
.pp-ic.pulse { animation: ppPulse 2s ease-in-out infinite; } @keyframes ppPulse { 50% { opacity: .65; } }
.tl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tl-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); cursor: pointer; color: var(--text); font: inherit; }
.tl-opt:hover { border-color: var(--brand); background: var(--brand-50); } .tl-opt b { font-size: 14px; } .tl-opt small { font-size: 12px; color: var(--muted); }
.tbl2 .t-play { font-size: 11.5px; font-weight: 700; color: var(--ok); display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; }
.tbl2 .t-play.soon { color: #b45309; } .tbl2 .t-play.over { color: var(--danger); }
.tbl2 .t-rate { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tbl2.time-up { box-shadow: 0 0 0 2px var(--danger); animation: ppPulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .tbl2.time-up, .pp-ic.pulse { animation: none; } }
/* ---------- WhatsApp ---------- */
.wa-logo .g-art { width: 72px; height: 48px; color: #16a34a; } .wa-logo .ga-b { fill: #dcfce7; }
.wa-stats { display: flex; gap: 18px; } .wa-stats div { display: flex; flex-direction: column; align-items: center; } .wa-stats b { font-size: 18px; } .wa-stats span { font-size: 11.5px; color: var(--muted); }
.copy-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); min-height: var(--ctl); }
.copy-row code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 13px; font-family: ui-monospace, Menlo, monospace; }
.wa-inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - 190px - var(--banner-h, 0px)); min-height: 480px; overflow: hidden; padding: 0; }
.wa-threads { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.wa-th-head { display: flex; gap: 8px; padding: 10px; border-bottom: 1px solid var(--border); } .wa-th-head .search { flex: 1; }
.wa-th-list { overflow-y: auto; flex: 1; }
.wa-th { display: flex; gap: 12px; align-items: center; width: 100%; min-height: 68px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.wa-th:hover { background: var(--surface-2); } .wa-th.on { background: var(--brand-50); }
.wa-av { width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--wa) 18%, var(--surface)); color: var(--wa-dark); font-size: 16px; }
.wa-th .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wa-th-top, .wa-th-bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.wa-th-top b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wa-th-top small { color: var(--muted); font-size: 11.5px; flex: none; } .wa-th-top small.new { color: var(--wa-dark); font-weight: 700; }
.wa-th-last { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wa-unread { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--wa); color: var(--wa-ink-on); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.wa-chat { position: relative; display: flex; flex-direction: column; min-height: 0; background-color: var(--wa-wall);
  background-image: radial-gradient(color-mix(in srgb, var(--wa-meta) 16%, transparent) 1px, transparent 1.4px); background-size: 18px 18px; }
.wa-chat.drop::after { content: 'Drop files to send'; position: absolute; inset: 8px; display: grid; place-items: center; border: 2px dashed var(--wa-dark); border-radius: var(--r); background: color-mix(in srgb, var(--wa-wall) 85%, transparent); color: var(--wa-dark); font-weight: 700; z-index: 2; }
.wa-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 20px; max-width: 340px; } .wa-empty .g-art { color: var(--wa-dark); }
.wa-chat-head { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--border); } .wa-chat-head small { display: block; font-size: 12px; }
.wa-chat-head .grow { min-width: 0; } .wa-chat-head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-wait { flex: none; margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
.wa-back { display: none; width: var(--ctl); padding: 0; justify-content: center; }
.wa-msgs { flex: 1; overflow-y: auto; padding: 12px 6% 16px; display: flex; flex-direction: column; gap: 2px; }
.wa-day { display: flex; justify-content: center; margin: 10px 0 6px; } /* not sticky: a floating date covered the message under it */
.wa-day span { padding: 5px 12px; border-radius: var(--r); background: var(--wa-bubble); color: var(--wa-meta); font-size: 12px; font-weight: 600; box-shadow: 0 1px 1px rgb(0 0 0 / .08); }
.wa-msg { display: flex; } .wa-msg.out { justify-content: flex-end; } .wa-msg.first { margin-top: 8px; }
.wa-bub { position: relative; max-width: min(72%, 560px); min-width: 90px; padding: 6px 8px 5px 9px; border-radius: var(--r); background: var(--wa-bubble); color: var(--wa-ink); font-size: 14.2px; line-height: 1.4; display: flex; flex-direction: column; gap: 3px; box-shadow: 0 1px 1px rgb(0 0 0 / .1); }
.wa-msg.out .wa-bub { background: var(--wa-out); }
.wa-msg.first.in .wa-bub { border-top-left-radius: 0; } .wa-msg.first.out .wa-bub { border-top-right-radius: 0; }
.wa-msg.first .wa-bub::before { content: ''; position: absolute; top: 0; width: 8px; height: 13px; background: inherit; }
.wa-msg.first.in .wa-bub::before { left: -8px; clip-path: polygon(0 0, 100% 0, 100% 100%); } .wa-msg.first.out .wa-bub::before { right: -8px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.wa-btns { display: grid; margin: 4px -8px -5px -9px; border-top: 1px solid rgb(0 0 0 / .08); }
.wa-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 10px; color: var(--wa-tick); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.wa-btn + .wa-btn { border-top: 1px solid rgb(0 0 0 / .08); }
a.wa-btn:hover { background: rgb(0 0 0 / .04); }
.wa-list summary { display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; list-style: none; }
.wa-list summary::-webkit-details-marker { display: none; }
.wa-list summary em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--wa-meta); }
.wa-list { display: block; } .wa-list ol { margin: 6px 0 2px; padding: 0 4px 0 22px; color: var(--wa-ink); font-weight: 400; text-align: start; display: grid; gap: 4px; }
.wa-list li b { display: block; font-size: 13px; } .wa-list li small { color: var(--wa-meta); font-size: 12px; }
.wa-tapped { display: inline-flex; align-items: center; gap: 4px; color: var(--wa-meta); font-size: 11.5px; }
.wa-bub.bare { background: none; box-shadow: none; padding: 0; } .wa-bub.bare::before { display: none; }
.wa-bub.media-only { padding: 3px; } .wa-bub.media-only .wa-meta { position: absolute; right: 8px; bottom: 6px; padding: 1px 6px; border-radius: var(--r-sm); background: rgb(0 0 0 / .45); color: #fff; }
.wa-bub.media-only .wa-meta .wa-tick { color: inherit; } .wa-bub.media-only:has(.wa-doc, .wa-audio) .wa-meta { position: static; background: none; color: var(--wa-meta); padding: 0 4px 2px; }
.wa-text { white-space: pre-wrap; word-break: break-word; } .wa-text a { color: var(--info); overflow-wrap: anywhere; }
.wa-meta { align-self: flex-end; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--wa-meta); margin-top: -2px; white-space: nowrap; }
.wa-tpl-tag { font-size: 11px; color: var(--wa-meta); display: inline-flex; gap: 3px; align-items: center; font-weight: 600; }
.wa-tick { color: var(--wa-meta); display: inline-flex; align-items: center; padding-right: 2px; } .wa-tick svg { display: block; }
.wa-unsent { opacity: .85; } .wa-unsent .wa-doc-ic { background: var(--danger); } .wa-unsent small { color: var(--danger); white-space: normal; } .wa-loc .wa-doc-ic { background: var(--info); } .wa-tick.read { color: var(--wa-tick); } .wa-tick.bad { color: var(--danger); font-weight: 800; letter-spacing: 0; }
.wa-err { color: var(--danger); font-size: 11.5px; }
.wa-media { display: flex; flex-direction: column; gap: 3px; } .wa-media.grid { display: grid; grid-template-columns: 1fr 1fr; }
.wa-img { display: block; border-radius: var(--r-sm); overflow: hidden; } .wa-img img { display: block; width: 100%; max-width: 330px; max-height: 360px; object-fit: cover; }
.wa-media.grid .wa-img img { aspect-ratio: 1; height: auto; max-width: 165px; }
.wa-sticker { width: 140px; height: 140px; object-fit: contain; }
.wa-video { display: block; width: 100%; max-width: 330px; max-height: 360px; border-radius: var(--r-sm); background: #000; }
.wa-audio { display: flex; align-items: center; gap: 8px; color: var(--wa-dark); padding: 4px 4px 0; } .wa-audio audio { height: 36px; width: 240px; max-width: 100%; }
.wa-doc { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 10px; min-width: 240px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--wa-ink) 6%, transparent); color: var(--wa-ink); text-decoration: none; }
.wa-doc .grow { min-width: 0; } .wa-doc b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .wa-doc small { color: var(--wa-meta); font-size: 11.5px; }
.wa-doc-ic { width: 34px; height: 40px; border-radius: var(--r-sm); background: var(--danger); color: #fff; font-size: 9.5px; font-weight: 800; display: grid; place-items: center; flex: none; }
.wa-files { display: flex; gap: 8px; padding: 10px 12px 0; background: var(--surface-2); overflow-x: auto; border-top: 1px solid var(--border); }
.wa-file { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; flex: none; padding-bottom: 8px; }
.wa-file img, .wa-file .wa-doc-ic { width: 72px; height: 72px; border-radius: var(--r); object-fit: cover; } .wa-file .wa-doc-ic { font-size: 13px; background: var(--wa-send); }
.wa-file small { width: 100%; font-size: 11px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.wa-file button { position: absolute; top: -4px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--text); color: var(--surface); display: grid; place-items: center; cursor: pointer; }
.wa-spin { position: absolute; top: 24px; width: 24px; height: 24px; border-radius: 50%; border: 3px solid rgb(255 255 255 / .6); border-top-color: var(--wa-dark); animation: spin .8s linear infinite; }
.wa-reply { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px; background: var(--surface-2); border-top: 1px solid var(--border); }
.wa-files:not([hidden]) + .wa-reply { border-top: 0; }
.wa-reply textarea.input { flex: 1; resize: none; min-height: var(--ctl); max-height: 140px; padding-top: 9px; padding-bottom: 9px; line-height: 1.4; overflow-y: auto; background: var(--surface); }
.wa-ic { width: var(--ctl); padding: 0; justify-content: center; flex: none; } .wa-reply .wa-send { background: var(--wa-send); border-color: var(--wa-send); color: #fff; }
.aud-seg { flex-wrap: wrap; height: auto; }
@media (max-width: 899px) {
  .wa-inbox { grid-template-columns: 1fr; min-height: 420px; }
  .wa-threads { border-right: 0; } .wa-chat { display: none; } .wa-back { display: inline-flex; }
  .wa-inbox.chatting .wa-threads { display: none; } .wa-inbox.chatting .wa-chat { display: flex; }
  .wa-msgs { padding: 10px 10px 14px; } .wa-bub { max-width: 85%; } .wa-chat-head .hide-sm { display: none; } .wa-chat-head [data-menu] { width: var(--ctl); padding: 0; justify-content: center; }
}
@media (min-width: 700px) { .bottomnav .nav-scroll { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); padding-bottom: 20px; } }
/* Online payment link */
.pl-wrap { display: flex; flex-direction: column; gap: 12px; }
.pl-amt { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); } .pl-amt b { font-size: 22px; }
.pl-qr { align-self: center; width: 220px; height: 220px; padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); } .pl-qr svg { width: 100%; height: 100%; display: block; }
.pl-state { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; color: var(--text-2); }
.pl-dot { width: 10px; height: 10px; border-radius: 50%; background: #f59e0b; animation: ppPulse 1.4s ease-in-out infinite; }
.pl-state.paid { color: var(--ok); } .pl-state.paid .pl-dot { background: var(--ok); animation: none; }
.pg-status { display: flex; gap: 10px; align-items: center; } .pg-prov { align-self: flex-start; }
/* ---------- Sidebar active item v2: calm tint + left bar (desktop rail) ---------- */
@media (min-width: 700px) {
  .bottomnav .nav-btn .ic, .bottomnav .nav-btn.active .ic { background: transparent; }
  .bottomnav .nav-btn { position: relative; color: rgba(226, 232, 240, .62); transition: color .15s, background .15s; }
  .bottomnav .nav-btn:hover { color: #fff; background: rgba(255, 255, 255, .05); }
  .bottomnav .nav-btn.active, .bottomnav .nav-btn.primary.active { background: rgba(255, 255, 255, .09); color: #fff; box-shadow: none; font-weight: 700; }
  .bottomnav .nav-btn.active::before { content: ''; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #8ba4ff; }
  .bottomnav .nav-btn.active svg { color: #b4c4ff; }
}
/* Expenses */
.exp-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } @media (max-width: 899px) { .exp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi .kpi-text { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.exp-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.exp-tools { padding: 10px 12px; } .exp-tools .chip-row { flex: 1; min-width: 0; }
.exp-cats .chip { min-height: 32px; }
table.data tfoot td { border-top: 1px solid var(--border); padding-top: 10px; }
@media (min-width: 1200px) { .dash .kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); } } @media (min-width: 700px) and (max-width: 1199px) { .dash .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kot-card .kh-prep { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-left: auto; padding: 2px 6px; border: 1px dashed var(--border-strong); border-radius: var(--r-sm); } .kot-card .kh-prep + .kh-timer { margin-left: 6px; } .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } @media (max-width: 599px) { .grid-3 { grid-template-columns: 1fr; } } .r-cost { font-size: 13px; color: var(--text-2); padding: 8px 10px; background: var(--surface-2); border-radius: var(--r); } .r-cost:empty { display: none; }
/* ---------- Insights ---------- */
.ins-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); background: linear-gradient(90deg, var(--brand-50), var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--border)); color: var(--text); text-decoration: none; font-size: 13.5px; margin-bottom: 12px; }
.ins-banner > svg:first-child { color: var(--brand); flex: none; } .ins-banner span { flex: 1; } .ins-banner:hover { border-color: var(--brand); }
.ins-tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; padding: 12px; }
.ins-tip { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.ins-tip b { font-size: 14px; display: block; } .ins-tip p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.ins-ic { width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; flex: none; background: var(--brand-50); color: var(--brand); }
.ins-tip.k-star .ins-ic { background: #fef3c7; color: #b45309; } .ins-tip.k-cost .ins-ic, .ins-tip.k-down .ins-ic { background: var(--danger-bg); color: var(--danger); }
.ins-tip.k-combo .ins-ic, .ins-tip.k-promote .ins-ic { background: var(--ok-bg); color: var(--ok); } .ins-tip.k-dead .ins-ic { background: var(--surface-3); color: var(--muted); }
.ins-matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.ins-q { border: 1px solid var(--border); border-radius: var(--r); padding: 12px; background: var(--surface); }
.ins-qh { display: flex; align-items: center; gap: 8px; } .ins-qh b { font-size: 15px; } .ins-q > small { display: block; color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.ins-qi { width: 28px; height: 28px; border-radius: var(--r); display: grid; place-items: center; }
.q-star .ins-qi { background: #fef3c7; color: #b45309; } .q-workhorse .ins-qi { background: var(--brand-50); color: var(--brand); } .q-puzzle .ins-qi { background: var(--ok-bg); color: var(--ok); } .q-weak .ins-qi { background: var(--danger-bg); color: var(--danger); }
.ins-q ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; } .ins-q li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; } .ins-q li span:last-child { font-size: 12px; white-space: nowrap; }
.ins-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
@media (max-width: 699px) { .ins-matrix { grid-template-columns: 1fr; } }
.card-head h3 { display: flex; align-items: center; gap: 6px; }
/* Sidebar active item v3: no box — only a bold bar on the left edge, brighter icon and label */
@media (min-width: 700px) {
  .bottomnav .nav-btn.active, .bottomnav .nav-btn.primary.active, .bottomnav .nav-btn.active:hover { background: transparent !important; box-shadow: none !important; }
  .bottomnav .nav-btn.active::before { left: -4px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: #9db2ff; box-shadow: 0 0 10px rgba(157, 178, 255, .55); }
  .bottomnav .nav-btn.active { color: #fff; font-weight: 800; }
  .bottomnav .nav-btn.active svg { color: #c7d3ff; }
  .bottomnav .nav-btn:hover { background: transparent; }
  /* Short labels fit in the rail without "…" */
  .bottomnav .nav-btn .lbl-s { max-width: 100%; white-space: nowrap; overflow: visible; text-overflow: clip; font-size: 10px; letter-spacing: -.01em; }
}
/* Active bar: logo blue, touching the sidebar's left edge */
@media (min-width: 700px) {
  .bottomnav .nav-scroll { margin-left: -10px; padding-left: 10px; }
  .bottomnav .nav-foot { position: relative; }
  .bottomnav .nav-btn.active::before { left: -10px; top: 6px; bottom: 6px; width: 4px; border-radius: 0 4px 4px 0; background: #4f74ff; box-shadow: 0 0 12px rgba(79, 116, 255, .7); }
  .bottomnav .nav-btn.active svg { color: #8fa8ff; }
}
/* Notification bell: small badge on the corner, never covering the bell */
.bell { position: relative; overflow: visible; }
.bell .dot { top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 10px; line-height: 18px; border: 2px solid var(--surface); box-sizing: content-box; transform: none; }
.bell svg { position: relative; z-index: 0; }
/* Picture strips never widen the page (phones: 2 per row) */
#sec, .settings-layout > * { min-width: 0; }
.g-how { min-width: 0; max-width: 100%; }
@media (max-width: 699px) { .g-how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; overflow: visible; } .g-how-step { min-width: 0; } }
.bell .dot { left: 23px; right: auto; top: 1px; min-width: 14px; height: 16px; line-height: 16px; padding: 0 4px; font-size: 9.5px; border-width: 2px; }
.item-card .promo-tag, .item-card.has-pic .promo-tag { position: static; display: inline-block; font-size: 10.5px; padding: 1px 5px; border-radius: var(--r-sm); flex: none; } .item-card .meta:has(.promo-tag) .code { display: none; }
/* Phone bottom bar: same idea as the desktop sidebar — no boxes, a bold line on the selected tab */
@media (max-width: 699px) {
  .bottomnav .nav-btn .ic, .bottomnav .nav-btn.active .ic, .bottomnav .nav-btn.primary .ic, .bottomnav .nav-btn.primary.active .ic { background: transparent !important; box-shadow: none !important; color: inherit; }
  .bottomnav .nav-btn.primary, .bottomnav .nav-btn.primary:not(.active) { background: transparent !important; color: var(--muted); box-shadow: none !important; transform: none !important; }
  .bottomnav .nav-btn { position: relative; }
  .bottomnav .nav-btn.active { color: var(--brand) !important; font-weight: 800; }
  .bottomnav .nav-btn.active::before { content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 34px; height: 4px; border-radius: 0 0 4px 4px; background: #4f74ff; box-shadow: 0 2px 10px rgba(79, 116, 255, .55); }
}
@media (max-width: 699px) { .bottomnav .nav-btn.primary .ic { margin-top: 0 !important; width: 56px; height: 30px; padding: 5px 0; } }
/* ---------- Smart insights v2 ---------- */
.ins-sums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1099px) { .ins-sums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ins-sum { display: flex; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.ins-sum > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ins-sum small { font-size: 12px; color: var(--muted); font-weight: 600; } .ins-sum b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ins-sum span:last-child { font-size: 12px; color: var(--text-2); }
.ins-sum-ic { width: 36px; height: 36px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.ins-sum.gold .ins-sum-ic { background: #fef3c7; color: #b45309; } .ins-sum.green .ins-sum-ic, .ins-sum.ok .ins-sum-ic { background: var(--ok-bg); color: var(--ok); } .ins-sum.warn .ins-sum-ic { background: var(--danger-bg); color: var(--danger); }
.ins-sum.ok b { color: var(--ok); } .ins-sum.warn b { color: var(--danger); }
.ins-tabs-wrap { overflow-x: auto; scrollbar-width: none; } .ins-tabs { display: inline-flex; } .ins-tabs button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ins-group h3 { margin: 4px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ins-tips { padding: 0; }
.ins-tip { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--r); background: var(--surface); }
.ins-tip b { font-size: 14.5px; } .ins-tip p { margin: 0; }
.ins-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: var(--r-sm); }
.ins-go { align-self: flex-start; margin-top: 2px; }
.ins-tip.c-gold { border-left-color: #f59e0b; } .ins-tip.c-gold .ins-tag { background: #fef3c7; color: #92400e; }
.ins-tip.c-green { border-left-color: var(--ok); } .ins-tip.c-green .ins-tag { background: var(--ok-bg); color: var(--ok); }
.ins-tip.c-blue { border-left-color: var(--brand); } .ins-tip.c-blue .ins-tag { background: var(--brand-50); color: var(--brand); }
.ins-tip.c-red { border-left-color: var(--danger); } .ins-tip.c-red .ins-tag { background: var(--danger-bg); color: var(--danger); }
.ins-tip.c-grey { border-left-color: var(--border-strong); } .ins-tip.c-grey .ins-tag { background: var(--surface-3); color: var(--text-2); }
.ins-axis { display: flex; justify-content: space-between; padding: 10px 12px 0; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ins-qh { display: flex; align-items: flex-start; gap: 8px; } .ins-qh > div { flex: 1; min-width: 0; } .ins-qh small { display: block; color: var(--muted); font-size: 12px; }
.ins-do { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 6px 0 8px; display: flex; align-items: center; gap: 4px; }
.ins-q { border-top: 3px solid var(--border); }
.q-star.ins-q { border-top-color: #f59e0b; } .q-workhorse.ins-q { border-top-color: var(--brand); } .q-puzzle.ins-q { border-top-color: var(--ok); } .q-weak.ins-q { border-top-color: var(--danger); }
.ins-combos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding: 12px; }
.ins-combo { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); }
.ins-combo-p s { color: var(--muted); } .ins-combo-p b { color: var(--ok); font-size: 16px; }
.ins-prep { padding: 8px 14px; display: flex; flex-direction: column; gap: 8px; }
.ins-prep-row { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr 36px; gap: 10px; align-items: center; font-size: 13.5px; }
.ins-prep-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ins-prep-row b { text-align: right; }
.ins-bar { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; } .ins-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.ins-today { flex: none; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-sm); } .ins-today:empty { display: none; }
.ins-today.up { background: var(--ok-bg); color: var(--ok); } .ins-today.down { background: #fef3c7; color: #92400e; }
/* "Guests often add…" hint in Billing */
.pair-hint { display: flex; align-items: center; gap: 8px; margin: 6px 12px; padding: 8px 10px; border-radius: var(--r); background: var(--brand-50); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); font-size: 13px; animation: dselIn .15s ease-out; }
.pair-hint > svg { color: var(--brand); flex: none; } .pair-hint span { flex: 1; min-width: 0; } .pair-hint small { color: var(--muted); margin-left: 4px; }
.pair-hint .btn { flex: none; }
/* Dashboard: smart insights card */
.ins-banner { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); }
.ins-banner .ib-ic { width: 38px; height: 38px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.ins-banner .ib-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ins-banner .ib-tx b { font-size: 14px; } .ins-banner .ib-tx small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-banner .ins-today { flex: none; display: flex; flex-direction: column; align-items: flex-end; padding: 4px 10px; border-radius: var(--r); line-height: 1.2; }
.ins-banner .ins-today small { font-size: 11px; font-weight: 600; opacity: .85; } .ins-banner .ins-today b { font-size: 14px; }
.ins-banner .ib-go { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--brand); padding: 6px 10px; border-radius: var(--r); background: var(--brand-50); }
.ins-banner:hover .ib-go { background: var(--brand); color: #fff; }
@media (max-width: 599px) { .ins-banner .ib-tx small { display: none; } .ins-banner .ib-go { padding: 6px; font-size: 0; } }
/* Figure cards: the number always fits inside its card */
.kpi { min-width: 0; overflow: hidden; }
.kpi > b, .kpi b.kpi-text { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; letter-spacing: -.01em; }
@media (min-width: 1200px) { .dash .kpis .kpi > b { font-size: clamp(17px, 1.45vw, 26px); } }
@media (min-width: 700px) and (max-width: 1199px) { .kpis .kpi > b { font-size: clamp(17px, 2.3vw, 24px); } }
.kpi > span, .kpi > small { max-width: 100%; }
.ins-sum b, .stat-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (min-width: 1200px) and (max-width: 1399px) { .dash .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .dash .kpis .kpi > b { font-size: 22px; } }
@media (min-width: 1400px) { .dash .kpis .kpi > b { font-size: clamp(18px, 1.4vw, 26px); } }
.ins-sum b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }

/* POS: visible "New order" button + "Not sent yet" notice for a restored draft */
.cart-head .ttl .cart-new{margin-left:auto;height:32px;padding:0 10px;gap:4px;font-weight:600;color:var(--brand);flex:none}
.cart-head .ttl .cart-new + .cart-close{margin-left:0}
.cart-head .ttl .cart-unsent{flex:none;white-space:nowrap;gap:4px;font-weight:600}

/* Sign-up: what kind of business */
.biz-pick{display:grid;gap:8px}
.biz-groups{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.biz-g{display:grid;justify-items:center;gap:4px;padding:10px 4px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--text-2);font-size:12px;font-weight:600;line-height:1.2;text-align:center;cursor:pointer}
.biz-g.on{border-color:var(--brand);color:var(--brand);background:color-mix(in srgb,var(--brand) 8%,var(--surface));box-shadow:inset 0 0 0 1px var(--brand)}
.biz-types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.biz-t{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--border);border-radius:7px;background:var(--surface);text-align:left;cursor:pointer;min-width:0;color:var(--text-2)}
.biz-t span{display:grid;min-width:0}
.biz-t b{font-size:13px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.biz-t small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.biz-t.on{border-color:var(--brand);box-shadow:inset 0 0 0 1px var(--brand);color:var(--brand)}
@media (max-width:420px){.biz-g span{font-size:11px}.biz-types{grid-template-columns:1fr}}
.biz-current{display:flex;align-items:center;gap:8px;text-align:left;cursor:pointer;color:var(--brand)}
.biz-current span{flex:1;color:var(--text);font-weight:600}

/* Shops: MRP on tiles; loose items by weight. Salons: who did the service. */
.item-card .mrp{font-size:11.5px;color:var(--muted);margin-left:2px;font-weight:500}
.item-card .pr small{font-weight:500;margin-left:1px}
.wt-quick{display:flex;flex-wrap:wrap;gap:6px}
.staff-chip{display:inline-flex;align-items:center;gap:3px;height:20px;padding:0 7px;border-radius:7px;border:1px solid var(--border);background:var(--surface);font-size:11.5px;font-weight:600;color:var(--text-2);cursor:pointer;vertical-align:middle}
.staff-chip.none{color:var(--warn);border-style:dashed}
.staff-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
.staff-opt{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--border);border-radius:7px;background:var(--surface);cursor:pointer;min-width:0;text-align:left}
.staff-opt b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.staff-opt .avatar{width:30px;height:30px;flex:none}
.staff-opt.on{border-color:var(--brand);box-shadow:inset 0 0 0 1px var(--brand)}

/* Salon appointments: day calendar, one column per stylist */
.apt-cal{overflow:auto;max-height:calc(100vh - 290px - var(--banner-h, 0px));min-height:320px}
.apt-grid{display:grid;position:relative;min-width:max-content}
.apt-corner,.apt-head{position:sticky;top:0;z-index:3;background:var(--surface);border-bottom:1px solid var(--border);height:40px}
.apt-head{display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13.5px;border-left:1px solid var(--border);padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.apt-corner{left:0;z-index:4}
.apt-times{position:sticky;left:0;z-index:2;background:var(--surface);grid-row:2;height:calc(var(--rows) * var(--row))}
.apt-times span{position:absolute;right:8px;transform:translateY(-50%);font-size:11px;color:var(--muted);white-space:nowrap}
.apt-times span:first-child{transform:none}
.apt-col{position:relative;grid-row:2;border-left:1px solid var(--border);cursor:copy;
  background-image:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--row) * 4 - 1px),var(--border) calc(var(--row) * 4 - 1px),var(--border) calc(var(--row) * 4)),
  repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--row) * 2 - 1px),color-mix(in srgb,var(--border) 45%,transparent) calc(var(--row) * 2 - 1px),color-mix(in srgb,var(--border) 45%,transparent) calc(var(--row) * 2))}
.apt-col:hover{background-color:color-mix(in srgb,var(--brand) 3%,transparent)}
.apt-now{position:absolute;left:0;right:0;height:2px;background:var(--danger);z-index:2;pointer-events:none}
.apt-now::before{content:"";position:absolute;left:-4px;top:-3px;width:8px;height:8px;border-radius:50%;background:var(--danger)}
.apt-block{position:absolute;left:4px;right:4px;z-index:1;display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:5px 8px;border-radius:7px;border:0;border-left:3px solid var(--brand);
  background:color-mix(in srgb,var(--brand) 12%,var(--surface));color:var(--text);text-align:left;overflow:hidden;cursor:pointer;font-size:12px;line-height:1.25}
.apt-block b{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.apt-block small{color:var(--text-2);white-space:nowrap}
.apt-block .svc{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.apt-block.short{flex-direction:row;align-items:center;gap:6px;padding-top:0;padding-bottom:0;overflow:hidden} .apt-block.short b{flex:0 1 auto;min-width:0} .apt-block.short small{flex:none} .apt-block.short .svc{display:none} /* half-hour bookings: name and time on one line */
.apt-block.st-arrived{border-left-color:var(--info);background:color-mix(in srgb,#0ea5e9 12%,var(--surface))}
.apt-block.st-seated{border-left-color:var(--ok);background:color-mix(in srgb,var(--ok) 12%,var(--surface))}
.apt-day{min-width:96px;text-align:center}
.apt-svc{display:flex;flex-wrap:wrap;gap:6px;max-height:190px;overflow:auto;margin-top:8px}
.apt-svc .chip small{margin-left:6px;color:var(--muted);font-weight:500}
.apt-svc .chip.active small{color:inherit;opacity:.8}
.apt-sum{display:flex;align-items:center;gap:6px;margin-top:8px;font-size:13px}

/* ---------- RULE: controls side by side in one row share one height (see docs/UI-RULES.md) ----------
   A small button, chip or icon button that sits next to a normal control (date picker, search, select,
   segmented tabs, normal button) grows to the same height, so a row never mixes big and small. */
:is(.row, .page-head, .toolbar, .pos-tools, .card-head):has(> :is(.date-host, .seg, .search, .input, select, .dsel, .btn:not(.btn-sm):not(.icon-btn))) > :is(.btn-sm, .chip, .icon-btn) { height: var(--ctl); min-height: var(--ctl); }
:is(.row, .page-head, .toolbar, .pos-tools, .card-head):has(> :is(.date-host, .seg, .search, .input, select, .dsel, .btn:not(.btn-sm):not(.icon-btn))) > .icon-btn { width: var(--ctl); }
.date-host > .date-btn { height: var(--ctl); min-height: var(--ctl); }

/* Hotel rooms board, check-in and folio */
.room-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:10px}
.room-tile{display:flex;flex-direction:column;align-items:stretch;gap:4px;min-height:112px;padding:12px;border-radius:var(--r);border:1px solid var(--border);background:var(--surface);text-align:left;cursor:pointer;position:relative;overflow:hidden;color:var(--text)}
.room-tile::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--ok)}
.room-tile:hover{border-color:var(--border-strong)}
.room-tile .rt-top{display:flex;align-items:center;justify-content:space-between;gap:6px}
.room-tile .rt-no{font-size:20px;font-weight:800;letter-spacing:-.01em}
.room-tile .rt-st{font-size:11px;font-weight:700;padding:2px 7px;border-radius:var(--r);background:var(--ok-bg);color:var(--ok);white-space:nowrap}
.room-tile .rt-type{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.room-tile .rt-guest{display:flex;align-items:center;gap:5px;font-weight:700;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.room-tile .rt-guest.arriving{color:var(--info);font-weight:600}
.room-tile .rt-foot{margin-top:auto;display:flex;justify-content:space-between;gap:6px;font-size:12px;color:var(--muted);white-space:nowrap}
.room-tile .rt-foot b{color:var(--danger)} .room-tile .rt-foot b.ok{color:var(--ok)}
.room-tile.st-occupied::before{background:var(--brand)} .room-tile.st-occupied .rt-st{background:var(--brand-50);color:var(--brand)}
.room-tile.st-departing::before{background:var(--warn)} .room-tile.st-departing .rt-st{background:var(--warn-bg);color:var(--warn)}
.room-tile.st-dirty::before{background:var(--warn)} .room-tile.st-dirty .rt-st{background:var(--warn-bg);color:var(--warn)}
.room-tile.st-ooo{opacity:.7} .room-tile.st-ooo::before{background:var(--muted)} .room-tile.st-ooo .rt-st{background:var(--surface-3);color:var(--muted)}
.chip small{font-weight:600;opacity:.7}
.room-head{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:var(--r);background:var(--surface-2);border:1px solid var(--border)}
.room-head > div{display:grid;gap:2px;min-width:0}
.room-head small{color:var(--muted);font-size:12.5px}
.folio{border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.folio .fl{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 12px;border-bottom:1px solid var(--border);font-size:13.5px}
.folio .fl span{display:inline-flex;align-items:center;gap:6px;min-width:0}
.folio .fl:last-child{border-bottom:0}
.folio .fl.total{font-weight:700}
.folio .fl.ok{color:var(--ok)}
.folio .fl.due{background:var(--surface-2);font-weight:700;font-size:15px}
@media (max-width:699px){.room-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 1279px) { #rail-collapse { display: none !important; } } /* sidebar is always slim there */

/* Outlet picker for chains (search + regions) */
.scope-btn{gap:8px;max-width:320px}
.scope-btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.op-list{display:flex;flex-direction:column;gap:2px;max-height:min(60vh,520px);overflow:auto;margin:0 -4px;padding:0 4px}
.op-group{display:flex;flex-direction:column;gap:2px;padding-bottom:8px;margin-bottom:4px;border-bottom:1px solid var(--border)}
.op-cap{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding:10px 10px 4px}
.op-row{display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 10px;border-radius:var(--r);border:0;background:transparent;text-align:left;cursor:pointer;color:var(--text-2)}
.op-row:hover{background:var(--surface-2)}
.op-row.on{background:var(--brand-50);color:var(--brand)}
.op-tx{flex:1;min-width:0;display:grid}
.op-tx b{color:var(--text);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.op-tx small{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.seg-sm button{min-height:28px!important;font-size:12px;padding:0 10px}
.seg.seg-sm{min-height:0!important;padding:2px}
/* Prices at outlets (dish form) */
.op-prices{display:flex;flex-direction:column;gap:6px;max-height:360px;overflow:auto}
.op-price-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;padding:8px 10px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface)}
.op-price-row .op-nm{flex:1 1 160px;min-width:0;display:grid;align-self:center}
.op-price-row .op-nm b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13.5px}
.op-price-row .op-nm small{color:var(--muted);font-size:12px}
.op-price-row .bp-in{width:110px}
.op-price-row .bp-in select{min-width:0}
.op-price-row .op-sold{align-self:center;white-space:nowrap}
.check-card{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--r);cursor:pointer;background:var(--surface)}
.check-card:has(input:checked){border-color:var(--brand);background:var(--brand-50)}
.check-card input{margin-top:3px}
.check-card span{display:grid;gap:1px} .check-card small{color:var(--muted);font-size:12px}
.op-price-row .op-nm{flex:1 1 100%}
.op-price-row .op-sold{align-self:flex-end;height:var(--ctl);display:inline-flex;align-items:center;margin-left:auto}

/* Credit book (udhar khata) */
.kh-list{display:flex;flex-direction:column}
.kh-row{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border);cursor:pointer}
.kh-row:last-child{border-bottom:0}
.kh-row:hover{background:var(--surface-2)}
.kh-row .avatar,.kh-head .avatar{width:38px;height:38px;flex:none}
.kh-who{display:grid;gap:2px;min-width:0}
.kh-who b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kh-who small{color:var(--muted);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kh-tags{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:12px}
.kh-age{display:inline-flex;align-items:center;gap:3px;padding:1px 7px;border-radius:var(--r);font-weight:700;font-size:11.5px}
.kh-age.new{background:var(--ok-bg);color:var(--ok)} .kh-age.mid{background:var(--warn-bg);color:var(--warn)} .kh-age.old{background:var(--danger-bg);color:var(--danger)}
.kh-amt{display:grid;justify-items:end;gap:1px;flex:none}
.kh-amt b{font-size:17px;font-variant-numeric:tabular-nums;white-space:nowrap}
.kh-amt small{color:var(--muted);font-size:11.5px;white-space:nowrap}
.kh-act{display:flex;gap:6px;flex:none}
.kh-head{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface-2)}
.kh-head > .grow{display:grid;min-width:0} .kh-head small{color:var(--muted);font-size:12.5px}
.kh-quick{display:flex;flex-wrap:wrap;gap:6px}
.kh-ledger{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:var(--r);overflow:hidden;max-height:340px;overflow-y:auto}
.kh-l{display:flex;align-items:center;gap:10px;padding:9px 12px;border-bottom:1px solid var(--border)}
.kh-l:last-child{border-bottom:0}
.kh-l > .grow{display:grid;min-width:0} .kh-l small{color:var(--muted);font-size:12px}
.kh-li{width:26px;height:26px;border-radius:var(--r);display:grid;place-items:center;flex:none}
.kh-l.udhar .kh-li{background:var(--danger-bg);color:var(--danger)} .kh-l.paid .kh-li{background:var(--ok-bg);color:var(--ok)}
.kh-l.paid .num{color:var(--ok)}
@media (max-width:699px){.kh-row{flex-wrap:wrap;padding:12px}.kh-act{width:100%;justify-content:flex-end}.kh-act .btn{flex:1}}
.kh-row .kh-who{flex:1 1 auto}
.kh-row .kh-amt{min-width:96px}
.kh-row .kh-act{min-width:196px;justify-content:flex-end}
@media (max-width:699px){.kh-row .kh-act{min-width:0}}

/* Offline licence banner + paused billing */
.lic-banner{display:flex;align-items:center;gap:10px;padding:8px 16px;font-size:13px;border-bottom:1px solid var(--border)}
.lic-banner > span{flex:1;min-width:0}
.lic-banner.warn{background:var(--warn-bg);color:var(--warn)}
.lic-banner.locked{background:var(--danger-bg);color:var(--danger)}
.lic-banner .btn{flex:none}
html.lic-locked .pos-items{position:relative}
html.lic-locked .pos-items::after{content:"";position:absolute;inset:0;background:color-mix(in srgb,var(--bg) 55%,transparent);pointer-events:none}

/* Customer full history */
.hx-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.hx-stats > div{display:grid;gap:2px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);min-width:0}
.hx-stats b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.hx-stats span{font-size:12px;color:var(--muted)}
.hx-list{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.hx-o{border-bottom:1px solid var(--border)} .hx-o:last-child{border-bottom:0}
.hx-o > summary{display:grid;grid-template-columns:minmax(0,1fr) auto 16px;align-items:center;gap:12px;min-height:60px;padding:10px 12px;cursor:pointer;list-style:none;transition:background .15s}
.hx-o > summary:hover{background:var(--surface-2)}
.hx-o > summary .grow b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hx-end{display:grid;justify-items:end;gap:4px}
.hx-end .num{font-size:15px;font-variant-numeric:tabular-nums;white-space:nowrap}
.hx-end .badge{font-size:11px;padding:1px 7px}
.hx-chev{display:grid;place-items:center;color:var(--muted);transition:transform .2s}
.hx-o[open] .hx-chev{transform:rotate(180deg)}
.hx-o > summary::-webkit-details-marker{display:none}
.hx-o > summary .grow{display:grid;min-width:0} .hx-o > summary small{color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hx-o[open] > summary{background:var(--surface-2)}
.hx-body{padding:8px 12px 12px;display:grid;gap:4px;background:var(--surface-2)}
.hx-i{display:grid;grid-template-columns:1fr auto 90px;gap:10px;font-size:13.5px}
.hx-i .num{text-align:right} .hx-i.void{text-decoration:line-through;color:var(--muted)}
.hx-pay{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
@media (max-width:699px){.hx-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Pay row: up to 3 quick methods + Pay in one row; with 4 (e.g. Credit) the methods get their own row and Pay goes full width below */
.cart-pay{grid-template-columns:repeat(var(--n,3),minmax(0,1fr)) 1.6fr}
.cart-pay .btn{min-width:0;overflow:hidden}
.cart-pay.two-row{grid-template-columns:repeat(var(--n,4),minmax(0,1fr))}
.cart-pay.two-row .cart-paybtn{grid-column:1 / -1}

/* Loading: thin line at the top while a screen opens or data loads, and a spinner in an empty screen */
#app-progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:9999;pointer-events:none;opacity:0;transition:opacity .2s;overflow:hidden}
#app-progress::before{content:"";position:absolute;top:0;bottom:0;left:-40%;width:40%;background:var(--brand);border-radius:0 3px 3px 0;animation:dp-progress 1.1s ease-in-out infinite}
html.is-busy #app-progress{opacity:1}
@keyframes dp-progress{0%{left:-40%}60%{left:70%}100%{left:110%}}
.view-loading{display:grid;place-items:center;min-height:50vh}
.spinner{width:32px;height:32px;border-radius:50%;border:3px solid var(--border);border-top-color:var(--brand);animation:dp-spin .8s linear infinite}
@keyframes dp-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){#app-progress::before{animation-duration:2.4s}.spinner{animation-duration:1.6s}}

/* Help & support */
.hp-chat{display:flex;flex-direction:column;min-height:420px;max-height:calc(100vh - 230px - var(--banner-h, 0px));overflow:hidden}
.hp-log{flex:1;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:10px}
.hp-msg{display:flex} .hp-msg > div{max-width:min(620px,88%);padding:10px 12px;border-radius:var(--r);background:var(--surface-2);border:1px solid var(--border);font-size:14px;line-height:1.5}
.hp-msg.me{justify-content:flex-end} .hp-msg.me > div{background:var(--brand);color:#fff;border-color:var(--brand)}
.hp-msg.team > div{background:var(--brand-50);border-color:var(--brand-100)}
.hp-who{display:flex;align-items:center;gap:4px;font-weight:700;font-size:11.5px;color:var(--brand);margin-bottom:2px}
.hp-at{display:block;margin-top:4px;font-size:11px;opacity:.65}
.hp-ans b{display:block;margin-bottom:4px}
.hp-ans p{margin:4px 0}
.hp-steps{margin:6px 0;padding-left:20px;display:grid;gap:4px}
.hp-link{display:inline-flex;align-items:center;gap:2px;font-size:12px;font-weight:700;color:var(--brand);text-decoration:none;white-space:nowrap}
.hp-vote{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px;font-size:13px}
.hp-more{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}
.hp-topics{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 10px}
.hp-ask{display:flex;gap:8px;padding:12px 16px;border-top:1px solid var(--border)}
.hp-ask .input{flex:1}
.hp-form{display:grid;gap:8px;padding:12px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface)}
.hp-arts{display:flex;flex-direction:column}
.hp-art{border-bottom:1px solid var(--border)} .hp-art:last-child{border-bottom:0}
.hp-art > summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;cursor:pointer;list-style:none}
.hp-art > summary::-webkit-details-marker{display:none}
.hp-art .hp-ans{padding:0 16px 14px;font-size:14px}
.hp-chat .card-head{gap:8px} .hp-chat .card-head h3{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Feedback survey card + questions */
.sv-card{position:fixed;right:16px;bottom:16px;z-index:900;display:flex;align-items:center;gap:10px;max-width:420px;padding:12px 12px 12px 14px;border-radius:var(--r);background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-2,0 8px 24px rgba(0,0,0,.12))}
.sv-card > .grow{display:grid;min-width:0} .sv-card small{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sv-ic{width:34px;height:34px;display:grid;place-items:center;border-radius:var(--r);background:var(--brand-50);color:var(--brand);flex:none}
@media (max-width:899px){.sv-card{left:12px;right:12px;bottom:calc(72px + var(--safe-b,0px))}}
.sv-stars{display:flex;gap:4px} .sv-stars button{border:0;background:none;color:var(--border-strong);cursor:pointer;padding:2px}
.sv-stars button.active{color:#f59e0b} .sv-stars button.active svg{fill:currentColor}
.sv-nps{display:grid;grid-template-columns:repeat(11,minmax(0,1fr));gap:4px}
.sv-nps button{height:var(--ctl);border:1px solid var(--border);border-radius:var(--r);background:var(--surface);font-weight:700;cursor:pointer;color:var(--text-2);padding:0}
.sv-nps button.active{background:var(--brand);border-color:var(--brand);color:#fff}
.sv-ends{display:flex;justify-content:space-between;color:var(--muted)}
/* Admin: support conversation, unread dot */
.adm-msgs{display:flex;flex-direction:column;gap:8px;max-height:360px;overflow:auto}
.adm-msg{padding:8px 12px;border-radius:var(--r);border:1px solid var(--border);background:var(--surface-2);font-size:14px;white-space:pre-wrap}
.adm-msg small{display:block;color:var(--muted);font-size:11.5px;margin-bottom:2px}
.adm-msg.admin{background:var(--brand-50);border-color:var(--brand-100)} .adm-msg.bot{opacity:.8}
.nav-dot{position:absolute;top:6px;right:10px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--danger);color:#fff;font-size:11px;font-weight:800;display:grid;place-items:center}
.dot-new{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--brand);margin-right:6px;vertical-align:middle}
@media (max-width:899px){.hp-chat{min-height:360px;max-height:calc(100vh - 300px - var(--safe-b,0px) - var(--banner-h, 0px))}}

/* RULE: option card — a choice that leads somewhere (icon tile · title · description · arrow).
   Use instead of a .btn whenever there is a second line of text; buttons are one line only. */
.opt-card{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);color:var(--text);text-align:left;cursor:pointer;transition:border-color .15s,background .15s}
.opt-card:hover{border-color:var(--brand);background:color-mix(in srgb,var(--brand) 4%,var(--surface))}
.opt-card:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.opt-card > .ic:last-child{color:var(--muted);flex:none}
.oc-ic{width:36px;height:36px;flex:none;display:grid;place-items:center;border-radius:var(--r);background:var(--brand-50);color:var(--brand)}
.oc-tx{flex:1;min-width:0;display:grid;gap:2px}
.oc-tx b{font-size:14px;font-weight:700}
.oc-tx small{font-size:12.5px;line-height:1.4;color:var(--muted)}
.opt-card.warn .oc-ic{background:var(--warn-bg);color:var(--warn)}
.opt-card.danger .oc-ic{background:var(--danger-bg);color:var(--danger)}
/* "or" divider between two ways of doing something */
.sep-or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em}
.sep-or::before,.sep-or::after{content:"";flex:1;height:1px;background:var(--border)}
/* RULE: a sheet footer never overflows — at most 3 buttons; destructive action on the left; wraps if space runs out */
.sheet-foot{flex-wrap:wrap}
.sheet-foot .foot-left{margin-right:auto}
@media (max-width:699px){.sheet-foot .foot-left{flex-basis:100%;order:2}}

/* Dashboard: a long outlet / region list scrolls inside its card, the page stays short */
.list.ol-scroll { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; }

/* Machines: card machine / payment QR flow and Settings → Machines */
.pl-state.failed { color: var(--danger); } .pl-state.failed .pl-dot { background: var(--danger); animation: none; }
.mc-wait { display: grid; place-items: center; width: 88px; height: 88px; margin: 8px auto; border-radius: 50%; background: var(--brand-50); color: var(--brand); }
.mc-steps { display: flex; flex-direction: column; gap: 8px; }
.mc-steps > div { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.mc-steps b:first-child { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--brand-ink, #fff); font-size: 13px; }
.mc-how { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--text-2); font-size: 13px; line-height: 1.45; }
.mc-how svg { flex: none; margin-top: 2px; color: var(--info); }

/* ---------- Menu manager: category rail + grouped item list ---------- */
.mn-tabs { align-self: flex-start; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.mn-tabs::-webkit-scrollbar, .mn-cats::-webkit-scrollbar { display: none; }
.mn-tabs button { gap: 8px; }
.mn-n { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.mn-tabs .active .mn-n { color: inherit; opacity: .75; }
.mn-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.mn-cats { position: sticky; top: calc(var(--header-h, 56px) + 16px); display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-height: calc(100vh - var(--header-h, 56px) - 32px); overflow-y: auto; }
.mn-cat { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 0; background: none; border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.mn-cat .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-cat:hover { background: var(--surface-2); }
.mn-cat.on { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.mn-cat.on .mn-n { color: var(--brand-700); }
.mn-addcat { color: var(--brand); margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.mn-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.mn-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mn-tools { display: flex; flex-direction: column; gap: 8px; }
.mn-filters { gap: 8px; }
.mn-group { overflow: hidden; }
.mn-gh { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mn-gh h3 { margin: 0; font-size: 15px; }
.mn-gh .btn { margin-left: auto; }
.mn-row { display: flex; align-items: center; gap: 12px; padding: 0 16px 0 0; border-bottom: 1px solid var(--border); }
.mn-row:last-child { border-bottom: 0; }
.mn-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0 12px 16px; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.mn-row:hover { background: var(--surface-2); }
.mn-main:disabled { cursor: default; }
.mn-img { flex: none; width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-3); }
.mn-ph { display: grid; place-items: center; font-size: 15px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.mn-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mn-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mn-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-name .badge { flex: none; }
.mn-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.mn-sub i { font-style: normal; opacity: .6; }
.mn-sub svg { vertical-align: -2px; }
.mn-code { padding: 0 6px; border-radius: var(--radius-xs); background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.mn-price { flex: none; font-size: 16px; font-weight: 700; white-space: nowrap; }
.mn-price small { font-size: 12px; font-weight: 500; color: var(--muted); }
.mn-stock { flex: none; display: flex; align-items: center; }
.mn-row.is-sold .mn-name b, .mn-row.is-sold .mn-price { color: var(--muted); }
.mn-row.is-sold .mn-img { opacity: .5; }
.mn-row.is-hidden .mn-name b { text-decoration: line-through; text-decoration-color: var(--border-strong); }
@media (max-width: 899px) {
  .mn-layout { grid-template-columns: 1fr; }
  .mn-cats { position: static; flex-direction: row; overflow-x: auto; max-height: none; padding: 0; border: 0; background: none; gap: 8px; scrollbar-width: none; }
  .mn-cat { flex: none; height: var(--ctl, 40px); border: 1px solid var(--border); background: var(--surface); border-radius: 999px; }
  .mn-cat.on { border-color: var(--brand); }
  .mn-addcat { margin: 0; border-top: 1px solid var(--border); border-radius: 999px; }
  .mn-gh { height: 44px; }
  .mn-img { width: 40px; height: 40px; }
  .mn-main { padding: 12px 0 12px 12px; gap: 12px; }
  .mn-row { padding-right: 12px; }
  .mn-price { font-size: 15px; }
}
.mn-main > svg:last-child { flex: none; color: var(--muted); }
.mn-opts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.mn-opt { padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.mn-opt b { font-weight: 600; color: var(--text); }

/* Tables: share a table (another party) and join tables */
.tbl2-wrap { position: relative; display: flex; }
.tbl2-wrap > .tbl2 { flex: 1; min-width: 0; }
.t-share { position: absolute; z-index: 2; right: 8px; bottom: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--brand); cursor: pointer; box-shadow: var(--shadow-1); }
.t-share:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.tbl2.joined { border-style: dashed; }
.t-join { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); }
.jn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.jn-t { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; height: 64px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.jn-t small { display: flex; align-items: center; gap: 4px; color: var(--muted); }
.jn-t.on { border-color: var(--brand); background: var(--brand-50); }
.jn-t i { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; }
.jn-sum { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }

/* Packages / set menus */
.pkg-g { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.pkg-gh { display: flex; gap: 8px; align-items: center; }
.pkg-gh > .input { flex: 1; min-width: 0; }
.pkg-pick { display: flex; align-items: center; gap: 6px; flex: none; font-size: 13px; color: var(--muted); }
.pkg-pick .input { width: 64px; }
.pkg-items { display: flex; flex-wrap: wrap; gap: 6px; }
.mn-pkg { padding: 0 6px; border-radius: var(--radius-xs); background: var(--brand-50); color: var(--brand-700); font-size: 12px; }
.pk-g { display: flex; flex-direction: column; gap: 8px; }
.pk-gh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pk-gh b { font-size: 15px; }
.pk-gh small { color: var(--muted); }
.pk-gh small.ok { color: var(--ok); font-weight: 600; }
.pk-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pk-it { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.pk-it.on { border-color: var(--brand); background: var(--brand-50); font-weight: 600; }
.pk-it:disabled { opacity: .45; cursor: not-allowed; }
.pk-it .food { flex: none; }

/* ---------- Events (parties, halls, catering) ---------- */
.ev-kpis{margin:4px 0 14px}
@media (min-width:900px){.ev-kpis{grid-template-columns:repeat(4,1fr)}}
.ev-list{display:flex;flex-direction:column;gap:8px}
.ev-card{display:flex;gap:14px;align-items:center;width:100%;padding:12px 14px;border:1px solid var(--border);border-left:3px solid var(--border-strong);border-radius:var(--r);background:var(--surface);color:var(--text);text-align:left;cursor:pointer}
.ev-card:hover{border-color:var(--brand)}
.ev-card.confirmed{border-left-color:var(--ok)}.ev-card.enquiry{border-left-color:var(--warn)}.ev-card.cancelled{opacity:.6}
.ev-date{display:flex;flex-direction:column;align-items:center;min-width:48px;padding:4px 6px;border-radius:var(--r);background:var(--surface-2)}
.ev-date b{font-size:20px;line-height:1.1}.ev-date small{font-size:11px;color:var(--muted);text-transform:uppercase;font-weight:600}
.ev-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.ev-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ev-title b{font-size:15px}
.ev-title .oc-ic{width:26px;height:26px}
.ev-sub{display:flex;align-items:center;gap:5px;flex-wrap:wrap;font-size:12.5px;color:var(--muted);min-width:0}
.ev-sub i{font-style:normal;opacity:.6}
.ev-money{display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap}
.ev-money b{font-size:15px}.ev-money small{font-size:12px;color:var(--muted)}.ev-money small.ok{color:var(--ok)}
@media (max-width:640px){.ev-card{flex-wrap:wrap}.ev-money{flex-direction:row;gap:10px;width:100%;justify-content:flex-start;padding-left:62px}}
.ev-form .ev-sec{display:flex;flex-direction:column;gap:10px;padding-bottom:14px;border-bottom:1px solid var(--border)}
.ev-sec h4{display:flex;align-items:center;gap:8px;margin:0;font-size:14px}
.ev-types{display:flex;flex-wrap:wrap;gap:6px}
.ev-when{display:grid;grid-template-columns:minmax(0,1.4fr) repeat(2,minmax(0,1fr)) minmax(0,.8fr);gap:10px;align-items:end}
@media (max-width:640px){.ev-when{grid-template-columns:1fr 1fr}}
.ev-venue{align-self:flex-start}
.ev-lines{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:var(--r)}
.ev-line{display:grid;grid-template-columns:minmax(0,1fr) 150px 96px 76px;align-items:center;gap:10px;min-height:56px;padding:6px 10px;border-bottom:1px solid var(--border)}
.ev-ln{min-width:0}.ev-ln b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ev-calc{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}
.ev-amt{text-align:right;white-space:nowrap}.ev-act{display:flex;justify-content:flex-end;gap:2px}
@media (max-width:560px){.ev-line{grid-template-columns:minmax(0,1fr) auto auto;row-gap:4px}.ev-ln{grid-column:1/-1}}
.ev-line:last-child{border-bottom:0}
.ev-q{width:72px;display:inline-block;text-align:right}
.ev-additem{max-width:260px}
.ev-acts{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}
.ev-total{display:flex;flex-direction:column;gap:4px;padding:12px 14px;border-radius:var(--r);background:var(--surface-2)}
.ev-total>div{display:flex;justify-content:space-between;gap:12px;font-variant-numeric:tabular-nums}
.ev-total .big{font-size:17px;font-weight:700}.ev-total b.ok{color:var(--ok)}

/* ---------- Orders: online board ---------- */
.on-alert{display:flex;align-items:center;gap:12px;width:100%;padding:12px 14px;border:0;border-radius:var(--r);background:var(--danger);color:#fff;text-align:left;cursor:pointer}
.on-alert span{flex:1;display:flex;flex-direction:column}.on-alert small{opacity:.9;font-size:12.5px}
.on-alert .go{flex:none;background:#fff;color:var(--danger);border-radius:var(--r);padding:8px 12px;font-weight:800}
.mn-n.hot{background:var(--danger);color:#fff}
.on-sw{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:2px}
.or-src{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;color:var(--muted);font-weight:600}
.or-kpis{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
.on-chans{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px}
.on-chan{display:flex;flex-direction:column;gap:8px;padding:12px 14px;border:1px solid var(--border);border-top:3px solid var(--pc);border-radius:var(--r);background:var(--surface);color:var(--text);text-decoration:none}
.on-chan.off{opacity:.75;border-top-color:var(--border-strong)}
.on-chan-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.on-chan-h .muted{margin-left:auto}
.on-dot{width:9px;height:9px;border-radius:50%;background:var(--ok);flex:none}.on-chan.off .on-dot{background:var(--muted)}
.on-chan-sw{display:flex;gap:16px;flex-wrap:wrap}
.sw-line{display:inline-flex;align-items:center;gap:8px;font-size:13px;cursor:pointer}
.on-add{flex-direction:row;align-items:center;justify-content:center;gap:10px;border-style:dashed;border-top-width:1px;border-top-style:dashed;border-top-color:var(--border-strong)}
.on-add span{display:flex;flex-direction:column}.on-add small{color:var(--muted);font-size:12px}
.on-help{display:flex;align-items:center;gap:6px;margin:0}
.on-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:start}
@media (max-width:1100px){.on-board{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.on-board{grid-template-columns:1fr}}
.on-col{display:flex;flex-direction:column;gap:8px;padding:10px;border-radius:var(--r);background:var(--surface-2);border:1px solid var(--border);min-height:120px}
.on-col header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.on-col header small{width:100%;color:var(--muted);font-size:12px}
.on-col.new header b{color:var(--danger)}
.on-empty{padding:18px 8px;text-align:center;color:var(--muted);font-size:13px}
.on-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid var(--border);border-left:3px solid var(--pc);border-radius:var(--r);background:var(--surface);cursor:pointer}
.on-card:hover{border-color:var(--brand);border-left-color:var(--pc)}
.on-card.new{box-shadow:0 0 0 2px color-mix(in srgb,var(--danger) 30%,transparent)}
.on-top{display:flex;align-items:center;gap:6px}
.on-who{font-weight:600;font-size:13.5px;display:flex;align-items:center;gap:4px}
.on-items{display:flex;flex-direction:column;font-size:13px;color:var(--text-2)}
.on-note{font-size:12.5px;color:var(--warn);display:flex;gap:4px;align-items:flex-start}
.on-foot{display:flex;justify-content:space-between;align-items:center}
.on-acts{display:flex;gap:6px}.on-acts .btn{flex:1;padding:0 10px}
body.on-board-open #online-alert{display:none}
.mn-sz{color:var(--ok);font-weight:700}.mn-sz.off{color:var(--muted)}
.sz-mode{align-self:flex-start}

/* ---------- Settings: grouped, searchable ---------- */
.st-nav{display:flex;flex-direction:column;gap:8px}
.st-search{margin:0}
.st-list{display:flex;flex-direction:column;gap:10px}
.st-group{display:flex;flex-direction:column;gap:2px}
.st-cap{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);padding:6px 10px 2px}
.st-link{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--r);color:var(--text);text-decoration:none}
.st-link:hover{background:var(--surface-3)}
.st-link.active{background:var(--brand-50);color:var(--brand);box-shadow:inset 3px 0 0 var(--brand)}
.st-ic{display:grid;place-items:center;width:30px;height:30px;border-radius:var(--r);background:var(--surface-3);color:var(--text-2);flex:none}
.st-link.active .st-ic{background:var(--surface);color:var(--brand)}
.st-ic.big{width:40px;height:40px;background:var(--brand-50);color:var(--brand)}
.st-tx{display:flex;flex-direction:column;min-width:0;flex:1}
.st-tx b{font-size:14px;font-weight:600}.st-link.active .st-tx b{font-weight:800}
.st-tx small{display:none;font-size:12px;color:var(--muted);line-height:1.35}
.st-head{display:flex;flex-direction:column;gap:10px;margin-bottom:14px}
.st-head h2{margin:0;font-size:19px}.st-back{align-self:flex-start;padding-left:4px}
.st-actions{justify-content:flex-end;margin:0}
@media (min-width:900px){
  .settings-nav.st-nav{padding:10px;max-height:calc(100vh - var(--header-h) - 48px - var(--banner-h, 0px));overflow-y:auto}
  .settings-layout.home{grid-template-columns:1fr}
}
@media (max-width:899px){
  .settings-layout.has-sec .st-nav{display:none}
  .settings-nav.st-nav{flex-direction:column;overflow:visible}
  .st-group{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:4px}
  .st-link{padding:10px}
  .st-tx small{display:block}
  .st-link>.ic:last-child{color:var(--muted)}
}

/* Sign-up steps, code entry, profile */
.auth-steps { display: flex; gap: 6px; margin: 0 0 4px; }
.auth-steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); }
.auth-steps i.on { background: var(--brand); }
.phone-cc { display: grid; grid-template-columns: 132px 1fr; gap: 8px; }
.phone-cc select { padding-right: 24px; }
.otp-box { display: flex; flex-direction: column; gap: 12px; }
.otp-to { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; }
.otp-to > svg { color: var(--ok); flex: none; } .otp-to span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.otp-in { font-size: 26px !important; letter-spacing: .45em; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; padding-left: .45em; }
.otp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }
.pf-head { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--ok-bg); font-size: 14px; }
.pf-head > svg { color: var(--ok); flex: none; margin-top: 2px; }
.pf-mail { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.pf-mail .btn[hidden] { display: none; }
.ok-text { color: var(--ok); font-weight: 700; }
.auth-box [hidden], .sheet-body [hidden] { display: none !important; }

/* WhatsApp: ways to connect, QR scan */
.opt-card.on { border-color: var(--brand); background: var(--brand-50); }
.wa-ways .badge { vertical-align: 1px; margin-left: 4px; }
.wa-scan { display: grid; grid-template-columns: auto 1fr; gap: 18px 24px; align-items: start; }
.wa-qr { width: 240px; height: 240px; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); display: grid; place-items: center; }
.wa-qr svg { width: 100%; height: 100%; }
.wa-wait { display: grid; place-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.wa-how { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; line-height: 1.45; }
.wa-code { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border-radius: var(--r); background: var(--ok-bg); }
.wa-code b { font-size: 28px; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.wa-alt { grid-column: 1 / -1; }
.wa-linked { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--ok); }
.wa-linked b { color: var(--text); font-size: 17px; }
@media (max-width: 640px) { .wa-scan { grid-template-columns: 1fr; justify-items: center; } .wa-how { justify-self: stretch; } }
.wa-code[hidden] { display: none; }
#install-card[hidden] { display: none; }

/* Recipes: recipe book (list + dish card) */
.rc-meter { height: 6px; border-radius: 6px; background: var(--surface-3); margin: 8px 0 6px; overflow: hidden; }
.rc-meter i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.kpi b small { font-size: .6em; font-weight: 700; }
.rc-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rc-tools .search { flex: 1 1 240px; min-width: 200px; }
.rc-sort { flex: 0 0 auto; width: auto; min-width: 190px; }
.rc-layout { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 900px) { .rc-layout { grid-template-columns: minmax(320px, 400px) 1fr; } .rc-side { position: sticky; top: 76px; } }
.rc-list { overflow: hidden; }
.rc-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; cursor: pointer; min-height: 60px; }
.rc-row:last-child { border-bottom: 0; }
.rc-row:hover { background: var(--surface-2); }
.rc-row.on { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand); }
.rc-thumb { width: 40px; height: 40px; flex: none; border-radius: var(--r); object-fit: cover; background: var(--surface-3); }
.rc-ph { display: grid; place-items: center; color: var(--brand); background: var(--brand-50); font-weight: 800; }
.rc-tx { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rc-tx b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-tx small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-num { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.rc-num b { font-size: 13px; }
.rc-pill { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: var(--r); white-space: nowrap; }
.rc-pill.ok { background: var(--ok-bg); color: var(--ok); }
.rc-pill.warn { background: var(--warn-bg); color: var(--warn); }
.rc-pill.danger { background: var(--danger-bg); color: var(--danger); }
.rc-pill.none { background: var(--surface-3); color: var(--muted); flex: none; }
.rc-ok { color: var(--ok); } .rc-warn { color: var(--warn); } .rc-danger { color: var(--danger); }
.rc-card { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.rc-card.in-sheet { padding: 0; }
.rc-head { display: flex; align-items: center; gap: 14px; }
.rc-photo { width: 72px; height: 72px; flex: none; border-radius: var(--r); object-fit: cover; }
.rc-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rc-title h2 { margin: 0; font-size: 20px; font-weight: 800; }
.rc-sizes .seg { display: inline-grid; }
.rc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rc-stats > div { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); display: grid; gap: 2px; background: var(--surface-2); }
.rc-stats span { font-size: 12px; color: var(--muted); font-weight: 600; }
.rc-stats b { font-size: 19px; font-weight: 800; }
.rc-stats b.neg { color: var(--danger); }
.rc-stats small { font-size: 11.5px; font-weight: 700; }
.rc-gauge { position: relative; height: 8px; border-radius: 8px; background: var(--surface-3); margin-top: -6px; }
.rc-gauge i { display: block; height: 100%; border-radius: 8px; }
.rc-gauge i.ok { background: var(--ok); } .rc-gauge i.warn { background: var(--warn); } .rc-gauge i.danger { background: var(--danger); }
.rc-gauge span { position: absolute; top: -2px; width: 2px; height: 12px; background: var(--surface); }
.rc-gauge-l { position: relative; height: 14px; font-size: 10.5px; color: var(--muted); margin-top: -10px; }
.rc-gauge-l span { position: absolute; transform: translateX(-50%); } .rc-gauge-l span:first-child { transform: none; } .rc-gauge-l span:last-child { transform: none; }
.rc-sub { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.rc-line { display: grid; grid-template-columns: 1fr auto 84px; gap: 4px 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.rc-line:last-child { border-bottom: 0; }
.rc-amt { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-lc { text-align: right; font-weight: 700; }
.rc-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.rc-bar i { display: block; height: 100%; background: var(--brand); opacity: .55; border-radius: 4px; }
.rc-method ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.rc-note { margin: 0; }
@media (max-width: 520px) { .rc-stats { grid-template-columns: 1fr 1fr; } .rc-stats > div:last-child { grid-column: 1 / -1; } .rc-head .btn { padding: 0 12px; } .rc-sort { flex: 1 1 100%; } }

/* Cash register — open screen */
.sh-open { align-items: start; }
.sh-last { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sh-last > div { border: 1px solid var(--border); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-last span { font-size: 12px; color: var(--muted); }
.sh-last b { font-size: 14px; }
.sh-last small { font-size: 12px; color: var(--muted); }
.sh-how { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
@media (max-width: 560px) { .sh-last { grid-template-columns: 1fr 1fr; } }

/* Getting started — checklist, home card, spotlight tour */
.gs-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.gs-top small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.gs-meter { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 60px; }
.gs-meter i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.gs-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.gs-task { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 12px; border: 0; border-top: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.gs-task:first-child { border-top: 0; }
.gs-task:hover { background: var(--surface-2); }
.gs-ic { flex: none; width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.gs-task.done .gs-ic { background: var(--ok-bg); color: var(--ok); }
.gs-task.done b { color: var(--muted); }
.gs-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gs-tx b { font-size: 14px; } .gs-tx small { font-size: 12.5px; color: var(--muted); }
.setup-card { margin: 12px 16px 0; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); display: flex; flex-direction: column; gap: 12px; }
.sc-head { display: flex; align-items: center; gap: 12px; }
.sc-ring { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--surface-3) 0); }
.sc-ring b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 12px; font-weight: 700; }
.sc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; } .sc-title b { font-size: 15px; } .sc-title small { font-size: 12.5px; color: var(--muted); }
.sc-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sc-task { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px 8px 8px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.sc-task > svg { flex: none; color: var(--muted); }
.sc-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sc-tx b { font-size: 13.5px; font-weight: 600; } .sc-tx small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-task:hover { border-color: var(--brand); background: var(--brand-50); } .sc-task:hover > svg { color: var(--brand); }
@media (min-width: 900px) { .setup-card { margin: 16px 32px 0; } }
@media (max-width: 760px) { .sc-next { grid-template-columns: 1fr; } }
html.kds-screen .setup-card { display: none !important; }
.tour { position: fixed; inset: 0; z-index: 9000; }
.tour-dim { position: absolute; inset: 0; background: rgb(15 23 42 / .55); }
.tour-dim[hidden], .tour-hole[hidden] { display: none; }
.tour-hole { position: fixed; border-radius: var(--r); box-shadow: 0 0 0 9999px rgb(15 23 42 / .55); outline: 2px solid var(--brand); transition: all .2s ease; pointer-events: none; }
.tour-tip { position: fixed; background: var(--surface); color: var(--text); border-radius: var(--r); box-shadow: var(--shadow-3); padding: 16px; display: flex; flex-direction: column; gap: 6px; transition: left .2s ease, top .2s ease; }
.tour-tip b { font-size: 16px; }
.tour-tip p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.tour-n { font-size: 12px; color: var(--brand); font-weight: 700; }
.tour-logo { border-radius: var(--r); margin-bottom: 4px; }
.tour-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.tour-btns [data-skip] { margin-right: auto; }
.hp-start { display: grid; gap: 16px; }
@media (min-width: 900px) { .hp-start { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.hp-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hp-q { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
.hp-q:hover { border-color: var(--brand); }
@media (max-width: 480px) { .hp-quick { grid-template-columns: 1fr; } }

/* WhatsApp — bill message, message list, editor */
.wa-rc, .wa-edit { display: grid; gap: 20px; }
@media (min-width: 1180px) { .wa-rc { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
@media (min-width: 900px) { .wa-edit { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.wa-prev { display: flex; flex-direction: column; gap: 6px; }
.wa-phone { background: var(--wa-wall); border-radius: var(--r); padding: 16px 14px; min-height: 120px; }
.wa-bubble { position: relative; max-width: 290px; background: var(--wa-bubble); color: var(--wa-ink); border-radius: var(--r); border-top-left-radius: 0; padding: 8px 10px 20px; font-size: 14px; line-height: 1.45; box-shadow: 0 1px 1px rgb(0 0 0 / .12); overflow-wrap: anywhere; }
.wa-bubble small { position: absolute; right: 8px; bottom: 4px; font-size: 11px; color: var(--wa-meta); }
.wa-tpl { align-items: flex-start; text-align: left; gap: 14px; padding: 16px 20px; }
.wa-tpl > .gs-ic { width: 40px; height: 40px; }
.wa-tpl .sub { margin-top: 2px; }
.wa-tpl .title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-tpl-tx { margin-top: 8px; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); font-size: 12.5px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-tpl > .btn { flex: none; align-self: center; pointer-events: none; }
.wa-vals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wa-edit textarea { font-size: 14px; line-height: 1.5; resize: vertical; }
.wa-code-box { border: 1px solid var(--border); border-radius: var(--r); padding: 12px; font-size: 14px; line-height: 1.5; background: var(--surface-2); }

/* One row, one height: steppers next to buttons or fields take the same height. */
.sheet-foot .stepper { height: var(--foot-btn); flex: none; }
.sheet-foot .stepper button { width: 44px; }
.sheet-foot .stepper b { min-width: 36px; font-size: 16px; }
:is(.row, .toolbar, .card-head, .page-head):has(> :is(.btn:not(.btn-sm):not(.icon-btn), .input, select, .dsel)) > .stepper { height: var(--ctl); }
/* A close / icon button next to small buttons takes their size. */
:is(.row, .card-head, .sc-head, .install-card, .wa-tpl):has(> .btn-sm):not(:has(> .btn:not(.btn-sm):not(.icon-btn), > .input, > select, > .dsel)) > :is(.icon-btn, .btn-sm) { height: 34px; min-height: 34px; }
:is(.row, .card-head, .sc-head, .install-card):has(> .btn-sm):not(:has(> .btn:not(.btn-sm):not(.icon-btn), > .input, > select, > .dsel)) > .icon-btn { width: 34px; }

/* Subscription — current plan, plan cards, quote */
.danger-text { color: var(--danger); }
.sb-now { display: flex; flex-direction: column; gap: 12px; }
.sb-use { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sb-limits { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-2); }
.sb-limits span { display: inline-flex; align-items: center; gap: 6px; }
.sub-page { padding-bottom: 72px; } /* Settings → Subscription (not .sb-page: that is a site builder tile) */
.sb-plans { display: grid; gap: 16px; padding-top: 10px; }
@media (min-width: 640px) { .sb-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .sb-plans { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
.sb-plan { position: relative; padding: 20px 18px 18px; display: flex; flex-direction: column; gap: 14px; overflow: visible; transition: box-shadow .2s, transform .2s; }
.sb-plan:hover { box-shadow: var(--shadow-2); }
.sb-plan.pop { border: 2px solid var(--brand); }
.sb-plan.mine { border-color: var(--ok); background: var(--surface); }
.sb-tag { position: absolute; top: -11px; left: 16px; background: var(--brand); color: var(--brand-ink); font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.sb-tag.mine { background: var(--ok); color: #fff; }
.sb-head { display: grid; gap: 4px; }
.sb-name { font-size: 17px; }
.sb-tagline { color: var(--muted); font-size: 13px; line-height: 1.4; min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-pricebox { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sb-was-row { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 20px; }
.sb-was-row s { color: var(--muted); }
.sb-off { background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 11.5px; padding: 1px 7px; border-radius: 99px; }
.sb-price { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.sb-price b { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sb-price span { color: var(--muted); font-size: 13px; }
.sb-bill { font-size: 12.5px; color: var(--text-2); }
.sb-stats { display: grid; grid-template-columns: 1fr; gap: 7px; font-size: 13px; }
.sb-stats span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sb-stats svg { color: var(--brand); flex: none; }
.sb-stats em { font-style: normal; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-feat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13px; flex: 1; color: var(--text-2); }
.sb-feat li { display: flex; gap: 8px; align-items: flex-start; } .sb-feat li svg { color: var(--ok); flex: none; margin-top: 2px; }
.sb-plan > .btn { width: 100%; }
.sb-note { font-size: 12px; color: var(--muted); text-align: center; padding: 8px 6px; border: 1px dashed var(--border); border-radius: var(--r); line-height: 1.4; }
.sb-q-head { display: flex; flex-direction: column; gap: 2px; } .sb-q-head b { font-size: 18px; }
.sb-lines { border: 1px solid var(--border); border-radius: var(--r); padding: 4px 14px; }
.sb-apc { display: flex; align-items: center; gap: 12px; }
.sb-apc-on { gap: 8px; }
.sb-ap { display: flex; flex-direction: column; gap: 4px; padding: 4px 12px 12px; border: 1px solid var(--border); border-radius: var(--r); }
.sb-ap .switch-row { border: 0; padding-left: 0; padding-right: 0; }
.sb-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.sb-line:first-child { border-top: 0; }
.sb-line.ok b { color: var(--ok); }
.sb-line.total { font-size: 16px; } .sb-line.total b { font-size: 18px; }
/* Super admin: plan prices grid (currency × monthly/yearly, offer + "was") */
.ap-prices { display: grid; grid-template-columns: 76px repeat(4, minmax(0, 1fr)); gap: 8px; align-items: center; }
.ap-prices > b { font-size: 12px; color: var(--muted); font-weight: 600; }
.ap-prices > b:nth-child(5n+1) { color: var(--text); font-size: 13px; }
@media (max-width: 560px) { .ap-prices { grid-template-columns: 1fr 1fr; } .ap-prices > span, .ap-prices > b:nth-child(-n+5) { display: none; } .ap-prices > b:nth-child(5n+1) { grid-column: 1 / -1; display: block; margin-top: 4px; } .ap-prices input::placeholder { opacity: .6; } }
/* One row, one height: an icon button beside inputs takes the input height; beside small buttons it takes their height. */
:is(.row, .hr-slot, .hol-row, .toolbar, .list-item):has(> .input, > select.input, > .dsel) > .icon-btn { height: var(--ctl); width: var(--ctl); min-height: var(--ctl); }
.list-item:has(> .btn-sm):not(:has(> .input, > .btn:not(.btn-sm):not(.icon-btn))) > .icon-btn { height: var(--btn-sm-h); width: var(--btn-sm-h); min-height: var(--btn-sm-h); }

/* ---------- Dashboard charts & colour (palette tokens) ---------- */
:root { --c1: #4568dc; --c2: #0ea5e9; --c3: #f59e0b; --c4: #10b981; --c5: #a855f7; --c6: #ef4444; --c7: #64748b; --c8: #ec4899; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c1: #7b95ef; --c2: #38bdf8; --c3: #fbbf24; --c4: #34d399; --c5: #c084fc; --c6: #f87171; --c7: #94a3b8; --c8: #f472b6; } }
:root[data-theme="dark"] { --c1: #7b95ef; --c2: #38bdf8; --c3: #fbbf24; --c4: #34d399; --c5: #c084fc; --c6: #f87171; --c7: #94a3b8; --c8: #f472b6; }

/* Trend chart: SVG lines, HTML text (never stretched), fills its card */
.tc { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; min-height: var(--h); flex: 1; column-gap: 10px; row-gap: 8px; }
.tc-y { position: relative; grid-row: 1; min-width: 34px; }
.tc-y span { position: absolute; right: 0; transform: translateY(50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tc-plot { position: relative; grid-row: 1; grid-column: 2; }
.tc-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tc-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--border); }
.tc-grid:first-child { border-top-style: solid; }
.tc .tc-g0 { stop-color: var(--c1); stop-opacity: .32; } .tc .tc-g1 { stop-color: var(--c1); stop-opacity: 0; }
.tc .ln { fill: none; stroke: var(--c1); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tc .ln-prev { fill: none; stroke: var(--c3); stroke-width: 2; stroke-dasharray: 6 5; opacity: .8; vector-effect: non-scaling-stroke; }
.tc-hit { position: absolute; top: 0; bottom: 0; cursor: default; }
.tc-hit i { position: absolute; width: 10px; height: 10px; margin: 0 0 -5px -5px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--c1); opacity: 0; transition: opacity .12s; }
.tc-hit:hover { background: linear-gradient(to right, transparent calc(50% - .5px), var(--border) 0, var(--border) calc(50% + .5px), transparent 0); }
.tc-hit:hover i { opacity: 1; }
.tc-x { position: relative; grid-column: 2; height: 16px; }
.tc-x span { position: absolute; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tc-x span:first-child { transform: none; } .tc-x span:last-child { transform: translateX(-100%); }
.legend-s .k-cur { background: var(--c1); } .legend-s .k-prev { background: var(--c3); }

/* Bar chart: HTML columns with a soft gradient; the best one is solid */
.bc { display: flex; flex-direction: column; gap: 6px; min-height: var(--h); flex: 1; }
.bc-cols { flex: 1; display: flex; align-items: flex-end; gap: 4px; min-height: 0; border-bottom: 1px solid var(--border); }
.bc-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.bc-col i { display: block; width: 100%; border-radius: 5px 5px 2px 2px; background: linear-gradient(to top, color-mix(in srgb, var(--c2) 35%, transparent), color-mix(in srgb, var(--c2) 75%, transparent)); transition: filter .12s; }
.bc-col.hi i { background: linear-gradient(to top, var(--c1), var(--c5)); }
.bc-col:hover i { filter: brightness(1.12) saturate(1.2); }
.bc-x { display: flex; gap: 4px; } .bc-x span { flex: 1; min-width: 0; text-align: center; font-size: 11px; color: var(--muted); overflow: visible; white-space: nowrap; }

/* Dashboard cards: charts fill the card; the outlet list matches the trend card height and scrolls */
.dash-fill { display: flex; flex-direction: column; } .dash-fill > .card-pad { flex: 1; display: flex; flex-direction: column; }
.dash-side { display: flex; flex-direction: column; } .dash-side .ol-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; max-height: 460px; }
@media (min-width: 1200px) { .dash-grid > .dash-side { height: 0; min-height: 100%; } .dash-side .ol-list { max-height: none; min-height: 0; } }
.dash .ol-bar i { background: linear-gradient(90deg, var(--c1), var(--c5)); }

/* KPI cards: a coloured icon and accent per figure */
.kpi.kpi-c { position: relative; border-top: 3px solid var(--k); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.kpi-top > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-ic { flex: none; width: 30px; height: 30px; border-radius: var(--r); display: grid; place-items: center; color: var(--k); background: color-mix(in srgb, var(--k) 14%, transparent); }

/* Smart insights: "today vs usual" as one line, same height as Open */
.ins-banner .ins-today { flex-direction: row; align-items: center; gap: 6px; height: 34px; padding: 0 12px; line-height: 1; white-space: nowrap; font-size: 13px; }
.ins-banner .ins-today b { font-size: 14px; font-weight: 800; }
.ins-banner .ins-today .it-long { font-weight: 600; opacity: .85; }
.ins-banner .ib-go { height: 34px; padding: 0 12px; }
.ins-today.down { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 599px) { .ins-banner .ins-today .it-long { display: none; } .ins-banner .ib-go { width: 34px; padding: 0; justify-content: center; } }
.kpi.kpi-c { container-type: inline-size; }
.kpi-g { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
@container (max-width: 200px) { .kv-vs { display: none; } .kpi-ic { width: 26px; height: 26px; } }
.dash-grid { grid-auto-flow: row dense; }
@media (min-width: 1200px) { .dash-tall { grid-row: span 2; } }
.dash-mid > .card-pad { justify-content: center; }

/* ---------- Dark mode sidebar: same surface as the top bar, a hairline edge, calm active tint ---------- */
@media (min-width: 700px) {
  :root[data-theme="dark"] .bottomnav { border-right: 1px solid var(--border); padding-top: calc(var(--safe-t) + 14px) !important; }
  :root[data-theme="dark"] .bottomnav .nav-brand { box-sizing: border-box; height: calc(var(--header-h) + var(--safe-t)); margin: calc(-14px - var(--safe-t)) -10px 10px !important; padding: var(--safe-t) 18px 0; border-bottom: 1px solid var(--border); }
  :root[data-theme="dark"] .bottomnav .nav-btn { color: var(--nav-text); }
  :root[data-theme="dark"] .bottomnav .nav-btn:hover { color: var(--text); background: var(--nav-2) !important; }
  :root[data-theme="dark"] .bottomnav .nav-btn.active, :root[data-theme="dark"] .bottomnav .nav-btn.active:hover { background: color-mix(in srgb, var(--brand) 16%, transparent) !important; color: var(--text); }
  :root[data-theme="dark"] .bottomnav .nav-btn.active svg { color: var(--brand); }
  :root[data-theme="dark"] .bottomnav .nav-btn.active::before { background: var(--brand); box-shadow: none; }
  :root[data-theme="dark"] .bottomnav .nav-foot { border-top-color: var(--border); }
  :root[data-theme="dark"] .bottomnav .nav-cap { background: var(--border); }
}
@media (min-width: 700px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bottomnav { border-right: 1px solid var(--border); padding-top: calc(var(--safe-t) + 14px) !important; }
  :root:not([data-theme="light"]) .bottomnav .nav-brand { box-sizing: border-box; height: calc(var(--header-h) + var(--safe-t)); margin: calc(-14px - var(--safe-t)) -10px 10px !important; padding: var(--safe-t) 18px 0; border-bottom: 1px solid var(--border); }
  :root:not([data-theme="light"]) .bottomnav .nav-btn { color: var(--nav-text); }
  :root:not([data-theme="light"]) .bottomnav .nav-btn:hover { color: var(--text); background: var(--nav-2) !important; }
  :root:not([data-theme="light"]) .bottomnav .nav-btn.active, :root:not([data-theme="light"]) .bottomnav .nav-btn.active:hover { background: color-mix(in srgb, var(--brand) 16%, transparent) !important; color: var(--text); }
  :root:not([data-theme="light"]) .bottomnav .nav-btn.active svg { color: var(--brand); }
  :root:not([data-theme="light"]) .bottomnav .nav-btn.active::before { background: var(--brand); box-shadow: none; }
  :root:not([data-theme="light"]) .bottomnav .nav-foot { border-top-color: var(--border); }
  :root:not([data-theme="light"]) .bottomnav .nav-cap { background: var(--border); }
}
/* Stock in: a medicine line has a second row for batch, expiry and MRP */
.m-line { display: grid; gap: 6px; }
.m-line.med { padding: 8px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.inv-kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 599px) { .inv-kpis.k3 { grid-template-columns: 1fr; } }
.input.up { text-transform: uppercase; } .input.up::placeholder { text-transform: none; }

/* ---------- Kitchen big screen v2: calm dark (or light) board, state stripes, waiting bar, cards only as tall as their dishes ---------- */
html.kds-screen { --kbg: #0b1120; --kcard: #131c2e; --kcard-2: #1a2438; --kline: #243049; --ktext: #f1f5f9; --kmute: #94a3b8;
  --k-new: #6c8cff; --k-cook: #f59e0b; --k-ready: #22c55e; --k-late: #f43f5e; --k-late-bg: rgba(244, 63, 94, .16); --k-go: #4f6ef7; --k-ok: #16a34a; }
html.kds-screen.kds-light { --kbg: #eef2f7; --kcard: #ffffff; --kcard-2: #f6f8fb; --kline: #dde3ec; --ktext: #0f172a; --kmute: #64748b;
  --k-new: #4568dc; --k-cook: #d97706; --k-ready: #16a34a; --k-late: #e11d48; --k-late-bg: #ffe4e9; --k-go: #4568dc; --k-ok: #15803d; }
html.kds-screen .kds-page { padding: 16px 20px 24px !important; gap: 0; }

/* Header bar */
html.kds-screen .kds-sbar { margin: 0; padding: 12px 20px; gap: 20px; background: var(--kcard); border-bottom: 1px solid var(--kline); }
html.kds-screen .kds-sbar-l { align-items: baseline; min-width: 0; } html.kds-screen .kds-sbar-l b { font-size: 24px; white-space: nowrap; }
html.kds-screen .kds-clock { font-size: 20px; }
html.kds-screen .kds-sbar-c { gap: 8px; font-size: 15px; }
.kds-cnt { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--kline); background: var(--kbg); color: var(--kmute); font: 700 15px/1 var(--font); cursor: pointer; white-space: nowrap; }
.kds-cnt b { font-size: 24px; color: var(--ktext); font-variant-numeric: tabular-nums; margin: 0 !important; }
.kds-cnt.on { border-color: var(--k-new); background: color-mix(in srgb, var(--k-new) 16%, transparent); color: var(--ktext); }
.kds-cnt.c-ready b { color: var(--k-ready); }
.kds-cnt.c-late { cursor: default; border-color: transparent; background: var(--k-late-bg); color: var(--k-late); } .kds-cnt.c-late b { color: var(--k-late); }
html.kds-screen .kds-sbar-r { align-items: center; gap: 8px; }
.kds-stseg { display: flex; padding: 4px; gap: 4px; border-radius: var(--r); background: var(--kbg); border: 1px solid var(--kline); height: 48px; box-sizing: border-box; }
.kds-stseg button { border: 0; background: none; color: var(--kmute); font: 700 15px/1 var(--font); padding: 0 14px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.kds-stseg button.on { background: var(--kcard-2); color: var(--ktext); box-shadow: 0 0 0 1px var(--kline); }
html.kds-screen .kds-sbtn { width: 48px; height: 48px; background: var(--kbg); border-color: var(--kline); color: var(--kmute); }
html.kds-screen .kds-sbtn:hover { color: var(--ktext); }

/* Board: tickets left to right (oldest first), each only as tall as its dishes */
html.kds-screen .kds-wrap { gap: 16px; padding-top: 16px; }
html.kds-screen .kds { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
html.kds-screen .kot-card { --kc: var(--k-new); min-height: 0; border: 1px solid var(--kline); border-top: 6px solid var(--kc); border-radius: var(--r); background: var(--kcard); box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .5); }
html.kds-screen .kot-card.preparing { --kc: var(--k-cook); } html.kds-screen .kot-card.ready { --kc: var(--k-ready); } html.kds-screen .kot-card.served { --kc: var(--kmute); }
html.kds-screen .kot-card.late { --kc: var(--k-late); border-color: color-mix(in srgb, var(--k-late) 55%, var(--kline)); border-top-color: var(--k-late); box-shadow: none; }
html.kds-screen .kot-card header { border-bottom: 0; }
html.kds-screen .kot-card .kh-main { padding: 14px 16px 6px; gap: 10px; }
html.kds-screen .kot-card .kh-main b { font-size: 24px; }
html.kds-screen .kot-card .kh-type { width: 40px; height: 40px; background: var(--kcard-2); color: var(--kc); }
html.kds-screen .kot-card .kh-timer { font-size: 18px; padding: 6px 10px; border-radius: var(--r); background: var(--kcard-2); color: var(--ktext); }
html.kds-screen .kot-card .kh-timer.late { background: var(--k-late); color: #fff; }
html.kds-screen .kot-card .kh-sub { padding: 0 12px 12px 16px; font-size: 15px; gap: 8px; }
html.kds-screen .kot-card .kh-status { font-size: 13px; padding: 3px 8px; }
html.kds-screen .kh-status.s-new { background: color-mix(in srgb, var(--k-new) 18%, transparent); color: var(--k-new); }
html.kds-screen .kh-status.s-preparing { background: color-mix(in srgb, var(--k-cook) 18%, transparent); color: var(--k-cook); }
html.kds-screen .kh-status.s-ready { background: color-mix(in srgb, var(--k-ready) 18%, transparent); color: var(--k-ready); }
html.kds-screen .kot-card .kh-st { font-size: 12px; padding: 3px 8px; background: var(--kcard-2); color: var(--kmute); }
html.kds-screen .kot-card .kh-print { width: 40px; height: 34px; border-color: var(--kline); color: var(--kmute); }

/* Waiting bar: fills toward "late" (green → amber → red) */
.kot-age { height: 4px; margin: 10px 12px 2px; border-radius: 4px; background: var(--kline, var(--surface-3)); overflow: hidden; flex: none; }
html.kds-screen .kot-age { height: 6px; margin: 14px 16px 4px; }
.kot-age i { display: block; height: 100%; border-radius: 4px; background: var(--k-ready, var(--ok)); }
.kot-age.warn i { background: var(--k-cook, var(--warn)); } .kot-age.late i { background: var(--k-late, var(--danger)); }

/* Dishes */
html.kds-screen .kot-card ul { padding: 8px 0 4px; }
html.kds-screen .kot-card li { font-size: 21px; padding: 10px 16px; min-height: 0; border-bottom: 1px dashed var(--kline); align-items: center; }
html.kds-screen .kot-card li .kq { min-width: 40px; height: 40px; font-size: 20px; background: var(--kcard-2); color: var(--ktext); border: 1px solid var(--kline); }
html.kds-screen .kot-card li .ka { color: var(--k-new); }
html.kds-screen .kot-card li.done .kq { background: var(--k-ready); border-color: var(--k-ready); color: #fff; }

/* Action button: Start cooking (blue) → Mark ready (green) → Mark served (quiet) */
html.kds-screen .kot-card footer { border-top: 0; padding: 8px 16px 16px; background: transparent; }
html.kds-screen .kot-card footer .btn { height: 60px; min-height: 60px !important; font-size: 20px; border: 0; }
html.kds-screen .kot-card footer .kot-go.go-preparing { background: var(--k-go); color: #fff; }
html.kds-screen .kot-card footer .kot-go.go-ready { background: var(--k-ok); color: #fff; }
html.kds-screen .kot-card footer .kot-go.go-served { background: var(--kcard-2); color: var(--ktext); box-shadow: inset 0 0 0 1px var(--kline); }
html.kds-screen .kot-card footer .kot-go:hover { filter: brightness(1.08); }

/* "To cook" totals panel */
html.kds-screen .kds-sum { width: 280px; position: sticky; top: 92px; background: var(--kcard); border: 1px solid var(--kline); }
html.kds-screen .kds-sum h3 { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: var(--kcard-2); color: var(--ktext); border-bottom: 1px solid var(--kline); font-size: 14px; }
html.kds-screen .kds-sum h3 span { margin-left: auto; font-size: 12px; color: var(--kmute); text-transform: none; letter-spacing: 0; }
html.kds-screen .kds-sum li { padding: 12px 16px; font-size: 17px; border-color: var(--kline); align-items: center; }
html.kds-screen .kds-sum li b { min-width: 34px; height: 30px; display: inline-grid; place-items: center; font-size: 17px; background: color-mix(in srgb, var(--k-new) 18%, transparent); color: var(--k-new); }
@media (max-width: 1199px) { html.kds-screen .kds-sbar { flex-wrap: wrap; } html.kds-screen .kds-sbar-c { order: 3; width: 100%; } }
@media (max-width: 699px) { html.kds-screen .kds-page { padding: 12px !important; } html.kds-screen .kds { grid-template-columns: 1fr; } html.kds-screen .kds-sbar { padding: 10px 12px; gap: 10px; } .kds-cnt { height: 42px; padding: 0 10px; } .kds-cnt b { font-size: 20px; } html.kds-screen .kds-sbar-c { overflow-x: auto; } }

/* ---------- Deliveries v2: summary, rider chips, coloured lanes, structured cards ---------- */
.dl-page { --dl-send: var(--c1); --dl-out: var(--c3); --dl-done: var(--c4); --dl-cash: var(--c5); }
.dl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dl-kpi { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-width: 0; --k: var(--dl-send); border-top: 3px solid var(--k); }
.dl-kpi.k-out { --k: var(--dl-out); } .dl-kpi.k-done { --k: var(--dl-done); } .dl-kpi.k-cash { --k: var(--dl-cash); }
.dl-kic { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; flex: none; color: var(--k); background: color-mix(in srgb, var(--k) 14%, transparent); }
.dl-kpi > div { display: grid; min-width: 0; } .dl-kpi small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.dl-kpi b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-kpi em { font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dl-riders { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.dl-riders::-webkit-scrollbar { display: none; }
.dl-rchip { flex: none; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px 0 8px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.dl-rchip:hover { border-color: var(--border-strong); } .dl-rchip.on { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand); }
.dl-rchip .avatar { position: relative; width: 36px; height: 36px; font-size: 13px; }
.dl-rchip .avatar i { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--surface); }
.dl-rchip .avatar i.free { background: var(--ok); } .dl-rchip .avatar i.busy { background: var(--dl-out); }
.dl-rtx { display: grid; } .dl-rtx b { font-size: 14px; } .dl-rtx small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dl-rchip.add, .dl-rchip.all { padding: 0 14px; gap: 6px; color: var(--muted); font-weight: 600; font-size: 13.5px; border-style: dashed; }
.dl-rchip.all { border-style: solid; color: var(--text); }

.dl-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.dl-lane { --l: var(--dl-send); display: flex; flex-direction: column; min-width: 0; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.dl-lane.l-out { --l: var(--dl-out); } .dl-lane.l-done { --l: var(--dl-done); }
.dl-lane h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 14px; font-size: 14px; font-weight: 700; border-top: 3px solid var(--l); background: var(--surface); border-bottom: 1px solid var(--border); }
.dl-lane h3 > svg { color: var(--l); }
.dl-dot { display: none; }
.dl-count { margin-left: auto; min-width: 26px; height: 24px; padding: 0 8px; border-radius: var(--r); display: inline-grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--l); background: color-mix(in srgb, var(--l) 14%, transparent); }
.dl-lane-body { display: flex; flex-direction: column; gap: 10px; padding: 10px; max-height: calc(100dvh - 330px - var(--banner-h, 0px)); min-height: 120px; overflow-y: auto; }
.dl-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 120px; color: var(--muted); font-size: 13px; border: 1.5px dashed var(--border); border-radius: var(--r); }
.dl-empty svg { opacity: .5; }

.dl-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--l); border-radius: var(--r); box-shadow: var(--shadow-1); }
.dl-card.late { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); border-left-color: var(--danger); }
.dl-card header { display: flex; align-items: center; gap: 8px; }
.dl-no { font-size: 15px; font-weight: 800; }
.dl-time { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--text-2); background: var(--surface-3); padding: 3px 8px; border-radius: var(--r-sm); font-variant-numeric: tabular-nums; }
.dl-time.late { background: var(--danger-bg); color: var(--danger); }
.dl-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dl-who .avatar { width: 34px; height: 34px; font-size: 12px; flex: none; }
.dl-who .grow { display: grid; min-width: 0; } .dl-who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dl-who small { color: var(--muted); font-size: 12px; }
.dl-call { color: var(--ok); background: var(--ok-bg); border-radius: var(--r); }
.dl-addr { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--text-2); text-decoration: none; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); line-height: 1.35; }
.dl-addr svg { flex: none; margin-top: 1px; color: var(--danger); } .dl-addr:hover { color: var(--text); background: var(--surface-3); }
.dl-addr span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.dl-meta > span:first-child { margin-right: auto; }
.dl-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-sm); font-size: 11.5px; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.dl-tag.ok { background: var(--ok-bg); color: var(--ok); } .dl-tag.warn { background: var(--warn-bg); color: var(--warn); } .dl-tag.danger { background: var(--danger-bg); color: var(--danger); } .dl-tag.info { background: var(--info-bg); color: var(--info); }
.dl-rider { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); } .dl-rider svg { color: var(--dl-out); }
.dl-card footer { display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--border); }
.dl-card footer .grow { flex: 1; min-width: 0; }
.dl-card footer .btn-ghost { width: var(--btn-sm-h); padding: 0; justify-content: center; }
.dl-card.s-delivered { box-shadow: none; } .dl-card.s-delivered .dl-who, .dl-card.s-delivered .dl-meta { opacity: .8; }
@media (max-width: 1199px) { .dl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) { .dl-board { grid-template-columns: 1fr; } .dl-lane-body { max-height: none; } }
@media (max-width: 1399px) and (min-width: 900px) { .dl-card footer .dl-lbl { display: none; } }
@media (max-width: 699px) { .dl-kpis { gap: 8px; } .dl-kpi { padding: 10px 12px; gap: 10px; } .dl-kic { width: 32px; height: 32px; } .dl-kpi small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; } .dl-kpi b { font-size: 19px; } }

/* WhatsApp: ways to connect + start screen */
.opt-card.wy{align-items:flex-start}
.opt-card.wy > .ic:last-child{align-self:center}
.opt-card.on{border-color:var(--brand);box-shadow:0 0 0 1px var(--brand);background:color-mix(in srgb,var(--brand) 5%,var(--surface))}
.wy-ic.t-ok{background:var(--ok-bg);color:var(--ok)}
.wy-facts{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:6px}
.wy-facts span{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:var(--muted)}
.wy-facts .ic{color:var(--brand)}
.wa-start{display:grid;gap:16px}
.wst-hero{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:32px;align-items:center;padding:28px 32px;overflow:hidden;background:linear-gradient(135deg,color-mix(in srgb,var(--wa) 7%,var(--surface)),var(--surface) 60%)}
.wst-kicker{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:99px;background:color-mix(in srgb,var(--wa) 14%,transparent);color:var(--wa-dark);font-size:12px;font-weight:700}
.wst-copy h2{margin:12px 0 6px;font-size:26px;line-height:1.2;letter-spacing:-.01em}
.wst-copy > p{margin:0 0 18px;max-width:520px;font-size:15px;line-height:1.5}
.wst-perks{list-style:none;margin:0 0 4px;padding:0;display:grid;gap:14px}
.wst-perks li{display:flex;gap:12px;align-items:flex-start}
.wst-perks b{display:block;font-size:14.5px}.wst-perks small{display:block;color:var(--muted);font-size:13px;line-height:1.45}
.wst-pic{flex:none;width:36px;height:36px;border-radius:var(--r);display:grid;place-items:center;background:color-mix(in srgb,var(--wa) 14%,transparent);color:var(--wa-dark)}
.wst-copy .notice{margin-top:16px}
.wst-art{display:flex;justify-content:center}
.wst-phone{width:270px;border:8px solid var(--wa-frame);border-radius:30px;overflow:hidden;background:var(--wa-wall);box-shadow:0 24px 40px -24px rgba(0,0,0,.45);transform:rotate(2deg)}
.wst-top{display:flex;align-items:center;gap:8px;padding:12px 12px 10px;background:var(--wa-head);color:#fff}
.wst-top .avatar{width:30px;height:30px;font-size:13px;background:rgba(255,255,255,.2);color:#fff}
.wst-top b{display:block;font-size:13px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wst-top small{font-size:10.5px;opacity:.8}
.wst-chat{display:flex;flex-direction:column;gap:8px;padding:12px 10px 16px;min-height:300px}
.wst-b{position:relative;max-width:86%;padding:7px 9px 18px;border-radius:8px;font-size:12px;line-height:1.4;background:var(--wa-bubble);color:var(--wa-ink);box-shadow:0 1px 1px rgb(0 0 0 / .1);opacity:0;animation:wstIn .4s ease forwards}
.wst-b b{display:block;font-size:12px}.wst-b u{color:#027eb5;text-decoration:none}
.wst-b small{position:absolute;right:7px;bottom:3px;font-size:9.5px;color:var(--wa-meta)}
.wst-b.in{align-self:flex-start;border-top-left-radius:0}
.wst-b.out{align-self:flex-end;border-top-right-radius:0;background:var(--wa-out)}
.wst-b:nth-child(2){animation-delay:.5s}.wst-b:nth-child(3){animation-delay:1s}.wst-b:nth-child(4){animation-delay:1.5s}
.wst-tag{display:inline-flex;align-items:center;gap:4px;margin-bottom:3px;padding:1px 6px;border-radius:4px;background:color-mix(in srgb,var(--wa) 18%,transparent);color:var(--wa-dark);font-size:10px;font-weight:800}
@keyframes wstIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.wst-ways{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.wst-ways .opt-card{flex-direction:column;align-items:flex-start;gap:10px;padding:16px;text-decoration:none;height:100%}
.wst-ways .opt-card > .ic:last-child{display:none}
.wst-ways .oc-tx b{font-size:15px}
.wst-ways .wy-facts{flex-direction:column;gap:6px;margin-top:10px;padding-top:10px;border-top:1px dashed var(--border)}
.wst-foot{display:flex;gap:8px;align-items:flex-start;border-top:1px solid var(--border)}
.wst-foot .ic{flex:none;margin-top:2px}
@media (max-width:1100px){.wst-hero{grid-template-columns:1fr 280px;gap:20px;padding:22px}.wst-ways{grid-template-columns:1fr}.wst-ways .opt-card{flex-direction:row}.wst-ways .opt-card > .ic:last-child{display:block;align-self:center}.wst-ways .wy-facts{flex-direction:row;border-top:0;padding-top:0;margin-top:6px}}
@media (max-width:760px){.wst-hero{grid-template-columns:1fr;padding:18px}.wst-phone{width:250px;transform:none}.wst-chat{min-height:0}.wst-copy h2{font-size:21px}}
@media (prefers-reduced-motion:reduce){.wst-b{animation:none;opacity:1}}
.opt-card.locked{cursor:default;opacity:.75;background:var(--surface-2);border-style:dashed}
.opt-card.locked:hover{border-color:var(--border);background:var(--surface-2)}
.opt-card.locked .oc-ic{background:var(--surface);color:var(--muted)}
/* Billing → Customer: find a regular by name or phone */
.cfind { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.cfind-list:empty { display: none; } .cfind-list { display: flex; flex-direction: column; gap: 8px; }
.cfind-list .card.list { overflow: hidden; } .cfind-row:last-child { border-bottom: 0; } .cfind-row .badge { margin-left: 4px; vertical-align: 1px; }
.cfind-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); } .cfind-head svg { color: var(--warn); }
.cfind-empty { padding: 4px 2px; } .cfind-new { justify-content: center; }
.cfind-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 600; } .cfind-or::before, .cfind-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Schools & clinics: students, fees, attendance, exams, OPD ---------- */
.fee-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr) var(--ctl); gap: 8px; align-items: center; }
.af-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto var(--ctl); }
.af-row [data-o]:not([hidden]) { grid-column: 1 / -1; grid-row: 2; }
@media (max-width: 599px) { .fee-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--ctl); } .fee-row [data-n], .fee-row [data-l] { grid-column: 1 / -1; } }
.att-dots { display: flex; flex-wrap: wrap; gap: 4px; }
.att-d, .att-c { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: var(--r); font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.att-d.ok, .att-c.ok { background: var(--ok-bg); color: var(--ok); } .att-d.warn, .att-c.warn { background: var(--warn-bg); color: var(--warn); }
.att-d.danger, .att-c.danger { background: var(--danger-bg); color: var(--danger); } .att-d.info, .att-c.info { background: var(--info-bg); color: var(--info); }
.att-row { flex-wrap: wrap; }
.att-marks { display: flex; gap: 4px; margin-left: auto; }
.att-m { width: 40px; height: 40px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: 13px; cursor: pointer; }
.att-m:disabled { cursor: default; opacity: .7; }
.att-m.on.ok { background: var(--ok); border-color: var(--ok); color: #fff; } .att-m.on.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.att-m.on.warn { background: var(--warn); border-color: var(--warn); color: #fff; } .att-m.on.info { background: var(--info); border-color: var(--info); color: #fff; } .att-m.on.muted { background: var(--muted); border-color: var(--muted); color: #fff; }
@media (max-width: 599px) { .att-marks { width: 100%; justify-content: space-between; } .att-m { flex: 1; } }
.att-bar { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 12px 0; background: var(--bg); }
@media (max-width: 767px) { .att-bar { bottom: calc(var(--nav-h, 64px) + env(safe-area-inset-bottom)); } }
.att-reg table { font-size: 12px; } .att-reg th.c, .att-reg td.c { text-align: center; padding: 4px 2px; min-width: 28px; } .att-reg th.c small { display: block; color: var(--muted); font-weight: 500; }
.att-reg .off { background: var(--surface-2); } .att-reg .sticky { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 140px; }
.opt-radio input { position: absolute; opacity: 0; pointer-events: none; } .opt-radio { position: relative; }
.opt-radio:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
ol.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.code-box { margin: 0; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; color: var(--text); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.q-text { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.q-pick { max-height: 320px; overflow: auto; }
.mark-in { width: 88px; text-align: right; flex: none; }
.opt-row { display: grid; grid-template-columns: 24px 24px minmax(0, 1fr) var(--ctl); gap: 8px; align-items: center; }
.opt-row > input[type=radio], .opt-row > input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ok); }
.opt-l { font-weight: 700; color: var(--muted); text-align: center; }
.seg-block { display: flex; width: 100%; } .seg-block > button { flex: 1; }
.tt th, .tt td { text-align: center; vertical-align: top; padding: 4px; } .tt tbody th { text-align: left; white-space: nowrap; padding: 8px; }
.tt-cell { width: 100%; min-width: 92px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 8px; border: 1px dashed var(--border); border-radius: var(--r); background: transparent; color: var(--text); cursor: pointer; }
.tt-cell.on { border-style: solid; background: color-mix(in srgb, var(--brand) 6%, var(--surface)); } .tt-cell b { font-size: 13px; } .tt-cell small { font-size: 11px; color: var(--muted); }
.tt-cell:disabled { cursor: default; }
.opd-tok { flex: none; display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: var(--r); background: var(--brand); color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.opd-tok.big { min-width: 56px; height: 56px; font-size: 22px; }
.opd-row.st-seen .opd-tok { background: var(--ok); } .opd-row.st-cancelled { opacity: .6; } .opd-row.st-cancelled .opd-tok { background: var(--muted); }
.vitals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 599px) { .vitals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vital { display: flex; flex-direction: column; gap: 4px; } .vital > span { font-size: 12px; font-weight: 600; color: var(--text-2); } .vital > span small { margin-left: 4px; color: var(--muted); font-weight: 500; }
.rx-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, .6fr) var(--ctl); gap: 8px; align-items: center; }
@media (max-width: 599px) { .rx-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--ctl); } .rx-row [data-m] { grid-column: 1 / -1; } .rx-row [data-w] { grid-column: span 2; } }
.rv-check { border-color: var(--warn); }
/* Exams: four inputs in a row (two on phones) */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 599px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Ads (assets/js/core/ads.js): label + ⓘ "Why this ad?" at the top right, like other ad networks */
.dpad { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); color: var(--text); font-size: 13px; }
.dpad-top { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.dpad-tag { font-size: 11px; font-weight: 700; line-height: 18px; padding: 0 6px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn); }
.dpad-by { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dpad-acts { margin-left: auto; display: flex; gap: 4px; }
.dpad-ic { width: 24px; height: 24px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.dpad-ic:hover { background: var(--surface-3); color: var(--text); }
.dpad-main { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.dpad-img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-sm); flex: none; background: var(--surface-3); }
.dpad-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.dpad-title { font-size: 14px; }
.dpad-body { color: var(--text-2); }
.dpad-cta { flex: none; height: var(--btn-sm-h); line-height: var(--btn-sm-h); padding: 0 12px; border-radius: var(--r); background: var(--brand); color: var(--brand-ink); font-weight: 600; white-space: nowrap; }
.dpad-slim { flex-direction: row; align-items: center; padding: 4px 8px 4px 12px; min-height: 44px; }
.dpad-slim .dpad-top { order: 2; }
.dpad-slim .dpad-by { display: none; }
.dpad-slim .dpad-main { order: 1; flex: 1; }
.dpad-slim .dpad-img { width: 32px; height: 32px; }
.dpad-slim .dpad-txt { flex-direction: row; gap: 8px; white-space: nowrap; overflow: hidden; }
.dpad-slim .dpad-body { overflow: hidden; text-overflow: ellipsis; }
.dpad-slim .dpad-cta { height: 28px; line-height: 28px; }
.dpad-slim.dpad-open { flex-direction: column; align-items: stretch; padding: 8px 12px 12px; }
.dpad-slim.dpad-open .dpad-top { order: 0; }
.dpad-h { font-size: 14px; }
.dpad-why { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--text-2); }
.dpad-note { margin: 0; color: var(--muted); font-size: 12px; }
.dpad-btns, .dpad-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.dpad-btn { height: var(--btn-sm-h); padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; }
.dpad-btn-p { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.dpad-done { color: var(--text-2); padding: 8px 0; }
.ad-slot:empty { display: none; }
.ad-slot { margin: 0 0 12px; }
.top-new { flex: none; gap: 4px; }
.top-new kbd { color: inherit; }
@media (max-width: 599px) { .top-new span, .top-new kbd { display: none; } .top-new { width: var(--btn-sm-h); padding: 0; justify-content: center; } }
.ad-top { margin: 8px 16px 0; }
.ad-top:empty { display: none; }
.ad-dash { margin: 16px 0 0; }
.r-ad { max-width: 1200px; margin: 12px auto 0; padding: 0 16px; }
.r-ad:empty { display: none; }
.r-ad-menu { margin: 12px 0 16px; }
@media print { .dpad, .ad-slot { display: none !important; } }
.ad-dash.page { padding-top: 0; margin-top: 0; }
/* WhatsApp: automatic messages + offer attachments */
.wa-evs{display:flex;flex-direction:column}
.wa-ev{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}
.wa-ev:first-child{padding-top:0}.wa-ev:last-child{border-bottom:0;padding-bottom:0}
.wa-ev .grow{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.wa-ev .switch{margin-left:auto}
.wa-ev b{font-size:14px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.wa-ev small{color:var(--muted);font-size:12.5px;line-height:1.4}
.wa-ev .switch{margin-top:6px}
.wa-ev:not(.on) .gs-ic{background:var(--surface-2);color:var(--muted)}
.wa-ev-note{font-size:12px;font-weight:600;color:var(--ok)}.wa-ev-note.warn{color:var(--warn)}.wa-ev-note.info{color:var(--muted);font-weight:500}
.wa-ev-delay{display:flex;align-items:center;gap:8px;margin-top:6px;font-size:12.5px;color:var(--muted)}
.wa-ev-delay .input{width:auto;min-width:140px}
/* Automatic message options: labels in one column, every dropdown the same width, notes lined up under the dropdown */
.wa-ev-delay>span{flex:none;width:80px}
.wa-ev-delay .input{flex:0 1 220px;width:220px;min-width:0;max-width:100%}
.wa-ev-delay+.wa-ev-note,.wa-ev .wa-ev-note[data-fbnote]{margin-inline-start:88px;margin-top:4px}
@media (max-width:480px){.wa-ev-delay>span{width:64px}.wa-ev-delay .input{flex:1 1 auto;width:auto}.wa-ev-delay+.wa-ev-note,.wa-ev .wa-ev-note[data-fbnote]{margin-inline-start:72px}}
.wa-evphone{display:flex;flex-direction:column;gap:8px;max-height:460px;overflow-y:auto}
.wa-ev-foot{display:flex;gap:8px;align-items:flex-start;border-top:1px solid var(--border)}.wa-ev-foot .ic{flex:none;margin-top:2px}
/* WhatsApp auto-reply bot (Settings → WhatsApp) */
.wa-bot-opts{display:flex;flex-direction:column;gap:8px}
.wa-bot-opts .wa-ev{cursor:pointer}
.wa-bot-chat{height:360px;overflow-y:auto;display:flex;flex-direction:column;gap:2px;padding:10px 12px}
.wa-bot-chat .wa-bub{max-width:88%;min-width:0;overflow-wrap:anywhere}
.wa-bot-try{display:flex;gap:8px}.wa-bot-try .input{flex:1;min-width:0}.wa-bot-try .btn{flex:none}
.wa-bot-chips{gap:6px;flex-wrap:wrap}.wa-bot-chips .chip{min-height:32px;padding:0 12px}
.wa-media{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px}
.wa-mtile,.wa-madd{position:relative;aspect-ratio:1;border-radius:var(--r);overflow:hidden;border:1px solid var(--border);background:var(--surface-2)}
.wa-mtile img,.wa-mtile video{width:100%;height:100%;object-fit:cover;display:block}
.wa-mtile.busy{display:grid;place-items:center}
.wa-mbadge{position:absolute;left:6px;bottom:6px;display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border-radius:5px;background:rgba(0,0,0,.6);color:#fff;font-size:10.5px;font-weight:700}
.wa-mrm{position:absolute;top:5px;right:5px;width:26px;height:26px;border:0;border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.6);color:#fff;cursor:pointer}
.wa-madd{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;border-style:dashed;color:var(--brand);font:inherit;font-size:12px;font-weight:600;cursor:pointer;text-align:center;padding:6px}
.wa-madd:hover{border-color:var(--brand);background:color-mix(in srgb,var(--brand) 5%,var(--surface))}

/* ---------- Sign-in / sign-up (matches the website look) ---------- */
.biz-now { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.biz-now:hover { border-color: var(--brand); }
.biz-now-ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r); background: var(--brand-50); color: var(--brand); }
.biz-now-tx { display: grid; min-width: 0; flex: 1; }
.biz-now-tx b { font-size: 15px; }
.biz-now-tx small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.biz-now-go { flex: none; font-size: 14px; font-weight: 700; color: var(--brand); }
@media (min-width: 960px) {
  .auth2 { height: 100vh; height: 100dvh; }
  .auth2 .auth-main { overflow-y: auto; justify-content: safe center; }
  .auth-brand { --ab-ink: #0a1330; --ab-line: rgba(255,255,255,.06); gap: 24px; padding: 40px 48px; justify-content: center;
    background: radial-gradient(600px 420px at 100% 0%, rgba(69,104,220,.55), transparent 70%), radial-gradient(520px 380px at 0% 100%, rgba(124,77,255,.32), transparent 70%), var(--ab-ink); }
  .auth-brand::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--ab-line) 1px, transparent 1px), linear-gradient(90deg, var(--ab-line) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; }
  .auth-brand::after { display: none; }
  .auth-brand > * { position: relative; }
  .auth-logo { position: absolute; top: 40px; left: 48px; height: 34px; }
  .auth-brand h2 { margin-top: 0; font-size: 34px; }
  .auth-brand h2 em { font-style: normal; background: linear-gradient(90deg, #8ea6ff, #c49bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .auth-shot { margin: 0; max-width: 520px; border-radius: var(--r); overflow: hidden; background: #fff; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 24px 60px rgba(0,0,0,.45); padding-top: 22px; position: relative; }
  .auth-shot i { position: absolute; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: #c9cfdd; }
  .auth-shot i:nth-child(1) { left: 10px; } .auth-shot i:nth-child(2) { left: 22px; } .auth-shot i:nth-child(3) { left: 34px; }
  .auth-shot img { display: block; width: 100%; height: auto; }
  .auth-brand ul { gap: 12px; display: grid; grid-template-columns: 1fr 1fr; max-width: 520px; }
  .auth-brand li .ic { width: 36px; height: 36px; padding: 8px; background: rgba(255,255,255,.1); }
  .auth-brand li b { font-size: 14px; } .auth-brand li span { font-size: 13px; opacity: .7; }
  .auth-foot { position: absolute; bottom: 32px; left: 48px; margin: 0; opacity: .7; }
}
@media (min-width: 960px) and (max-height: 760px) { .auth-brand ul { display: none; } }
.sc-head [data-all] { color: var(--brand); }
.sc-task { min-width: 0; width: 100%; }
.sc-title b, .sc-title small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .setup-card { padding: 12px; } .sc-next { grid-template-columns: minmax(0, 1fr); } .sc-eta { display: none; } .sc-head { gap: 8px; } .sc-head [data-all] { padding: 0 8px; } }

/* Billing: slim category rail. Hover opens it over the items at the same width as pinned; the
   labels are always laid out and just clipped, so nothing jumps while it opens. */
@media (min-width: 1200px) {
  .pos { --cats-w: 208px; grid-template-columns: 64px minmax(0, 1fr) 390px; }
  .pos.cats-pinned { grid-template-columns: var(--cats-w) minmax(0, 1fr) 390px; }
  .pos-side-cats { position: relative; z-index: 30; padding: 0; overflow: visible; box-shadow: none; background: transparent; }
  .psc-in { position: absolute; inset: 0 auto 0 0; width: 64px; display: flex; flex-direction: column; gap: 2px; padding: 8px; overflow: hidden; overflow-y: auto; scrollbar-width: none; background: var(--surface); box-shadow: 1px 0 0 var(--border);
    transition: width .2s cubic-bezier(.2, .8, .2, 1) .15s, box-shadow .2s ease .15s; }
  .psc-in::-webkit-scrollbar { display: none; }
  .pos-side-cats:not(.shut):is(:hover, :focus-within) .psc-in { width: var(--cats-w); box-shadow: 1px 0 0 var(--border), 10px 0 20px -10px rgba(15, 23, 42, .22); clip-path: inset(0 -32px 0 0); transition-delay: .1s; }
  .pos.cats-pinned .psc-in { width: 100%; box-shadow: 1px 0 0 var(--border); transition: none; }
  .pos-side-cats .cap { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 2px 0 10px !important; white-space: nowrap; }
  .pos-side-cats .cap span { flex: 1; }
  .pos-side-cats .cap, .pos-side-cats .cn, .pos-side-cats .count { transition: opacity .15s ease .1s; }
  .psc-pin { flex: none; width: 30px; min-height: 30px; height: 30px; padding: 0 !important; justify-content: center; border-radius: var(--r) !important; color: var(--muted) !important; }
  .psc-pin:hover, .psc-pin.on { color: var(--brand) !important; background: var(--brand-50) !important; }
  .pos-side-cats button[data-cat] { min-height: 44px; padding: 0 8px 0 6px !important; gap: 10px; white-space: nowrap; flex: none; }
  .pos-side-cats .ct { flex: none; width: 36px; height: 36px; border-radius: var(--r); display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--c, var(--text-2)); background: color-mix(in srgb, var(--c, var(--text-2)) 14%, var(--surface)); }
  .pos-side-cats .ct.pop-ic { color: #f59e0b; background: color-mix(in srgb, #f59e0b 14%, var(--surface)); }
  .pos-side-cats button.active .ct, .pos-side-cats button.active .ct.pop-ic { color: #fff; background: rgba(255,255,255,.2); }
  /* Slim: same layout, labels faded out and clipped */
  .pos:not(.cats-pinned) :is(.pos-side-cats:not(:hover):not(:focus-within), .pos-side-cats.shut) :is(.cap, .cn, .count) { opacity: 0; transition-delay: 0s; }
  .pos:not(.cats-pinned) :is(.pos-side-cats:not(:hover):not(:focus-within), .pos-side-cats.shut) button[data-cat] { background: transparent; }
  .pos:not(.cats-pinned) :is(.pos-side-cats:not(:hover):not(:focus-within), .pos-side-cats.shut) button.active .ct { background: var(--brand); color: #fff; }
}
@media (min-width: 1500px) { .pos { --cats-w: 220px; grid-template-columns: 64px minmax(0, 1fr) 440px; } .pos.cats-pinned { grid-template-columns: var(--cats-w) minmax(0, 1fr) 440px; } }
@media (min-width: 1200px) { .pos-side-cats.shut .psc-in { transition-delay: 0s; } }

/* Move from another POS (views/pos-import.js) */
.pi-step{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pi-step b{font-size:15px}
.pi-how{margin:4px 0 0;padding-left:16px;display:grid;gap:4px}
.pi-kinds{flex-wrap:wrap;height:auto}
.pi-map .pi-sample{display:block;min-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
.pi-prev{overflow:auto;max-height:260px}
.pi-errs{max-height:220px;overflow:auto}
.pi-row{min-width:64px;flex:none}
.pi-bar{height:8px;border-radius:var(--r);background:var(--surface-3);overflow:hidden}
.pi-bar>i{display:block;height:100%;background:var(--brand);transition:width .2s}
.pi-done{display:flex;align-items:center;gap:12px;padding:12px 16px;border-radius:var(--r);background:var(--ok-bg);color:var(--ok)}
.pi-done b{color:var(--text)}
/* Customers: tags and bulk selection */
.cu-tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.cu-sel{width:18px;height:18px;accent-color:var(--brand);margin:0;flex:none}
.cu-bulk{position:sticky;bottom:12px;z-index:5;display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 16px;border-radius:var(--r);background:var(--surface);border:1px solid var(--border);box-shadow:0 8px 24px rgba(0,0,0,.12)}
.cu-bulk .grow{min-width:0}
@media (max-width: 767px){.cu-bulk{bottom:calc(var(--nav-h) + var(--safe-b) + 8px);flex-wrap:nowrap;padding:8px 12px}.cu-bulk .cu-bl{display:none}.cu-bulk .btn{padding-left:12px;padding-right:12px}}
.dup-group{padding:12px 16px;border-bottom:1px solid var(--border)}
.dup-group:last-child{border-bottom:0}
.sb-was { opacity: .6; font-weight: 500; margin-right: 4px; }
.pi-more summary{list-style:none;display:inline-flex;width:auto}
.pi-more summary::-webkit-details-marker{display:none}
.pi-more[open] summary{margin-bottom:12px}

/* Settings → Website → Your own domain (views/domains.js) */
.dom-list { overflow: hidden; }
.dom-list .list-item { gap: 12px; }
.dom-list .title, .dom-list .sub { display: block; }
.dom-ic { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: var(--r); background: var(--brand-50); color: var(--brand); }
.dom-recs { display: flex; flex-direction: column; gap: 12px; }
.dom-rec { display: grid; grid-template-columns: 72px 120px 1fr; gap: 8px 12px; align-items: end; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.dom-rec > small { grid-column: 1 / -1; }
.dom-kv { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dom-kv > span { font-size: 12px; color: var(--muted); }
.dom-kv > b { min-height: var(--ctl); display: flex; align-items: center; overflow-wrap: anywhere; }
.dom-steps { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: 14px; }
.dom-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dom-kind { display: flex; gap: 8px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); color: var(--brand); }
.dom-kind b { display: block; color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.dom-kind small { color: var(--muted); font-size: 12px; }
@media (max-width: 600px) {
  .dom-rec { grid-template-columns: 1fr 1fr; }
  .dom-rec .dom-val { grid-column: 1 / -1; }
  .dom-kinds { grid-template-columns: 1fr; }
}

/* Delivery partners (couriers.js): partner line on a delivery card, quote cards */
.dl-partner { flex-wrap: wrap; gap: 6px; min-width: 0; }
.dl-partner b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.dl-track { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 12px; font-weight: 700; color: var(--brand); text-decoration: none; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-track:hover { text-decoration: underline; }
.cq-fee { flex: none; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 8px; }
.opt-card.is-soon { opacity: .7; }
.opt-card.is-soon .oc-ic { background: var(--surface-3); color: var(--muted); }
.opt-card[disabled] { cursor: not-allowed; }

/* Integrations & plan upgrade state */
.up-note { align-items: center; }
.up-note .btn { flex: none; }
.in-kv { display: flex; flex-direction: column; gap: 8px; }
.in-kv .row { gap: 12px; min-height: 24px; }
.in-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hook-for { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.hook-for b { color: var(--text); }
/* Super admin: login chip and page width */
.admin-chip { display: inline-flex; align-items: center; gap: 4px; }
.admin-auth .auth-box > .admin-chip { align-self: flex-start; margin-bottom: 4px; }
.admin-auth .auth-brand ul { margin-top: 32px; }
.adm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 899px) { .adm-grid { grid-template-columns: minmax(0, 1fr); } }
.adm-ic { width: 32px; height: 32px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex-shrink: 0; }
.adm-big { font-size: 20px; }

/* Order source (app orders typed in by hand) */
.src-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.src-opt { display: flex; align-items: center; gap: 8px; min-height: var(--ctl); padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.src-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-opt.active { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.src-row { display: grid; grid-template-columns: 34px 1fr 150px 90px auto; gap: 8px; align-items: center; }
.src-row input[type=color] { width: 34px; height: var(--ctl); padding: 2px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
@media (max-width: 640px) { .src-row { grid-template-columns: 34px 1fr auto; } .src-row .src-paid, .src-row .src-fee { grid-column: 2 / span 1; } }

/* Dental chart (FDI numbers) */
.th-chart { display: flex; flex-direction: column; gap: 10px; }
.th-jaw { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.th-row { display: grid; gap: 3px; }
.th-line { display: flex; justify-content: space-between; border-top: 1px dashed var(--border-strong); padding-top: 2px; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tooth { --tc: var(--border-strong); position: relative; height: 34px; min-width: 0; padding: 0; border: 1px solid var(--tc); border-radius: var(--r-sm); background: var(--surface); color: var(--text-2); font: 600 11px/1 var(--font); cursor: pointer; }
.tooth.mid { margin-left: 4px; }
.th-row .tooth:nth-child(1).mid { margin-left: 0; }
.tooth[class*="c-"] { background: color-mix(in srgb, var(--tc) 16%, var(--surface)); color: var(--text); border-width: 2px; }
.tooth.past { opacity: .5; border-style: dashed; }
.tooth.done::after { content: ''; position: absolute; top: 2px; right: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.tooth.sel { outline: 2px solid var(--brand); outline-offset: 1px; }
.tooth.c-missing { text-decoration: line-through; }
.c-caries, .c-extract, .c-broken { --tc: var(--danger); }
.c-filled, .c-bridge { --tc: var(--info); }
.c-rct, .c-loose, .c-sensitive { --tc: var(--warn); }
.c-crown, .c-implant { --tc: var(--brand); }
.c-missing, .c-stain { --tc: var(--muted); }
.th-c i, .th-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tc, var(--border-strong)); }
.th-c.active { border-color: var(--tc); box-shadow: inset 0 0 0 1px var(--tc); }
.th-list { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 480px) { .tooth { height: 30px; font-size: 9px; } .th-jaw { padding: 6px; } .tooth.mid { margin-left: 2px; } }
/* Quick picks under a field (tests, doses) */
.pick-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pick-row .chip { min-height: 28px; font-size: 12px; padding: 0 10px; }
/* Appointments: hours the doctor is not in */
.apt-off { position: absolute; left: 0; right: 0; z-index: 0; pointer-events: none; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--muted) 14%, transparent) 0 6px, transparent 6px 12px); }
.apt-head small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.apt-head:has(small) { flex-direction: column; line-height: 1.2; }
/* DukanPOS support signed in to this business */
.support-bar { position: sticky; top: 0; z-index: 200; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 16px; background: var(--info-bg); color: var(--info); border-bottom: 1px solid color-mix(in srgb, var(--info) 30%, transparent); font-size: 13.5px; }
.support-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-bar.edit { background: var(--warn-bg); color: var(--warn); border-bottom-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.support-bar .btn { flex: none; }
/* Activity log */
.act-filters { display: flex; flex-direction: column; gap: 10px; }
.act-row { display: grid; grid-template-columns: 150px 150px 180px 1fr; gap: 8px; }
@media (max-width: 760px) { .act-row { grid-template-columns: 1fr 1fr; } }
.act-list { display: flex; flex-direction: column; }
.act-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.act-item:last-child { border-bottom: 0; }
.act-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r); background: var(--surface-2); color: var(--text-2); }
.act-ic.tone-ok { background: var(--ok-bg); color: var(--ok); } .act-ic.tone-warn { background: var(--warn-bg); color: var(--warn); }
.act-ic.tone-danger { background: var(--danger-bg); color: var(--danger); } .act-ic.tone-info { background: var(--info-bg); color: var(--info); }
.act-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.act-who { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--text-2); }
.avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.act-changes { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.act-changes li { margin: 2px 0; }
/* Dental chart v2: drawn teeth */
.th-jaw { gap: 2px; padding: 8px 10px; background: linear-gradient(180deg, color-mix(in srgb, var(--danger) 5%, var(--surface-2)) 0%, var(--surface-2) 40%, var(--surface-2) 60%, color-mix(in srgb, var(--danger) 5%, var(--surface-2)) 100%); }
.th-lbl { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.th-row { gap: 1px; align-items: end; }
.th-row.lo { align-items: start; }
.tooth { --tc: var(--border-strong); height: auto; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px 0; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent !important; color: var(--muted); font: 600 10px/1 var(--font); text-decoration: none !important; }
.tooth[class*="c-"] { border-width: 1px; color: var(--text); }
.tooth small { font-size: 10px; line-height: 1; }
.tooth svg { width: 100%; max-width: 40px; height: 54px; overflow: visible; }
.tooth .root { fill: var(--surface-3); stroke: var(--border-strong); stroke-width: 1.2; }
.tooth .crown { fill: var(--surface); stroke: color-mix(in srgb, var(--text) 35%, transparent); stroke-width: 1.3; }
.tooth[class*="c-"] .crown { fill: color-mix(in srgb, var(--tc) 30%, var(--surface)); stroke: var(--tc); stroke-width: 1.8; }
.tooth.c-missing .crown, .tooth.c-missing .root { fill: none; stroke-dasharray: 3 2; stroke: var(--muted); }
.tooth .tx { stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.tooth .tx.red { stroke: var(--danger); }
.tooth .rct { stroke: var(--warn); stroke-width: 3; stroke-linecap: round; }
.tooth .screw { stroke: var(--brand); stroke-width: 2; stroke-linecap: round; }
.tooth.c-implant .root { fill: color-mix(in srgb, var(--brand) 18%, var(--surface)); stroke: var(--brand); }
.tooth .cap { stroke: var(--brand); stroke-width: 2.5; }
.tooth .fill { fill: var(--info); opacity: .8; }
.tooth .spot { fill: var(--danger); }
.tooth:hover .crown { stroke: var(--brand); }
.tooth.sel { outline: 2px solid var(--brand); outline-offset: 0; background: var(--brand-50) !important; }
.tooth.past { opacity: .55; border-style: solid; }
.tooth.done::after { top: 4px; right: 4px; }
.tooth.mid { margin-left: 6px; }
.th-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.th-key span { display: inline-flex; align-items: center; gap: 6px; }
.th-dot.past { background: var(--surface-3); border: 1px dashed var(--muted); }
@media (max-width: 480px) { .tooth svg { height: 40px; } .tooth small { font-size: 8.5px; } .tooth.mid { margin-left: 3px; } }
/* Waiting-room token screen (TV): full screen over the app */
body.kiosk { overflow: hidden; }
.tk-screen { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; gap: 2vh; padding: 2.5vh 2.5vw; background: radial-gradient(120% 80% at 50% 0%, var(--nav-2) 0%, var(--nav) 70%); color: #fff; overflow: auto; }
.tk-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tk-head b { display: block; font-size: clamp(20px, 3vh, 34px); }
.tk-head span { color: var(--nav-text); font-size: clamp(13px, 1.8vh, 20px); }
.tk-tools { display: flex; align-items: center; gap: 8px; }
.tk-tools time { font-size: clamp(18px, 3vh, 34px); font-weight: 700; margin-right: 8px; font-variant-numeric: tabular-nums; }
.tk-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; opacity: .55; transition: opacity .2s; }
.tk-btn:hover { opacity: 1; }
.tk-grid { flex: 1; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2vw; align-content: stretch; }
@media (max-width: 900px) { .tk-grid { grid-template-columns: repeat(min(var(--n), 2), minmax(0, 1fr)); } }
@media (max-width: 560px) { .tk-grid { grid-template-columns: 1fr; } }
.tk-card { display: flex; flex-direction: column; gap: 2vh; padding: 3vh 2vw; border-radius: calc(var(--r) * 2); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 20px 50px rgba(0,0,0,.25); min-height: 0; }
.tk-card.hot { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 55%, transparent), 0 20px 60px rgba(0,0,0,.3); animation: tk-pulse 1.2s ease-in-out 6; }
@keyframes tk-pulse { 50% { background: color-mix(in srgb, var(--ok) 22%, transparent); } }
.tk-doc b { display: block; font-size: clamp(18px, 3.2vh, 40px); }
.tk-doc span { color: var(--nav-text); font-size: clamp(12px, 1.8vh, 22px); }
.tk-now { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: calc(var(--r) * 1.5); background: rgba(255,255,255,.95); color: var(--nav); padding: 2vh 0; }
.tk-now small, .tk-next small { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: clamp(11px, 1.6vh, 18px); opacity: .7; }
.tk-now strong { font-size: clamp(64px, 18vh, 260px); line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; }
.tk-screen.one .tk-now strong { font-size: clamp(90px, 34vh, 420px); }
.tk-next div { display: flex; flex-wrap: wrap; gap: 1vw; margin-top: 1vh; }
.tk-next span { min-width: 2.4em; padding: .3em .5em; text-align: center; border-radius: var(--r); background: rgba(255,255,255,.12); font-size: clamp(20px, 4vh, 54px); font-weight: 800; font-variant-numeric: tabular-nums; }
.tk-next em { color: var(--nav-text); font-style: normal; font-size: clamp(14px, 2vh, 24px); }
.tk-foot { color: var(--nav-text); font-size: clamp(12px, 1.7vh, 20px); }
.tk-empty { flex: 1; display: grid; place-items: center; }
.tk-pick { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); color: var(--text); padding: 16px; }
.tk-pick .card { width: min(520px, 100%); }

/* Settings → Online orders: delivery app IDs (one row per app: name · status · ID · Ask) */
.oi-row { flex-wrap: wrap; gap: 8px; }
.oi-row .oi-app { min-width: 84px; justify-content: center; }
.oi-row .grow { min-width: 160px; }
@media (max-width: 640px) { .oi-row .input { max-width: none !important; flex: 1 1 140px; } }
.tooth svg { max-width: 48px; height: 66px; }
.tooth .root { stroke-width: 1; }
@media (max-width: 480px) { .tooth svg { height: 46px; } }
.tooth[class*="c-"] .crown { fill: color-mix(in srgb, var(--tc) 42%, var(--surface)); }

/* ---------- Panel colour by type of business (accent only; buttons and alert colours never change) ---------- */
:root { --accent: #4568dc; }
:root[data-biz="food"] { --accent: #ea580c; }
:root[data-biz="retail"] { --accent: #2563eb; }
:root[data-biz="service"] { --accent: #db2777; }
:root[data-biz="stay"] { --accent: #0d9488; }
:root[data-biz="edu"] { --accent: #4f46e5; }
:root[data-biz="health"] { --accent: #16a34a; }
:root { --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--surface)); --accent-light: color-mix(in srgb, var(--accent) 55%, #fff); }
/* Header: thin stripe in the business colour */
.topbar { box-shadow: inset 0 3px 0 var(--accent), 0 1px 0 var(--border); }
/* Side menu: the marker and icon of the open screen */
@media (min-width: 0px) {
  .bottomnav .nav-btn.active::before { background: var(--accent-light) !important; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent) !important; }
  .bottomnav .nav-btn.active svg { color: var(--accent-light) !important; }
}
@media (max-width: 899px) {
  .bottomnav .nav-btn.active { color: var(--accent) !important; }
  .bottomnav .nav-btn.active svg { color: var(--accent) !important; }
  .bottomnav .nav-btn.active::before { background: var(--accent) !important; }
}
:root[data-theme="dark"] .bottomnav .nav-btn.active svg { color: var(--accent-light) !important; }
/* Page titles: a short bar in the business colour */
.page-head h1 { position: relative; padding-left: 14px; }
.page-head h1::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 4px; background: var(--accent); }
/* Small icon chips (settings sections, list icons) pick up the colour */
.fold-ic { background: var(--accent-soft); color: var(--accent); }
/* Picker in Settings → Business */
.accent-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-sw { width: 40px; height: 40px; border-radius: var(--r); border: 2px solid var(--border); background: var(--sw, var(--surface-2)); cursor: pointer; font: 600 11px var(--font); color: var(--text-2); display: grid; place-items: center; padding: 0; }
.acc-sw.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sw, var(--accent)); }
.acc-own { position: relative; overflow: hidden; background: conic-gradient(#ef4444, #f59e0b, #22c55e, #06b6d4, #6366f1, #ec4899, #ef4444); }
.acc-own input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
@media (max-width: 560px) { .opd-actions { width: 100%; } .opd-actions > * { flex: 1 1 auto; } }
/* Super admin colour rules: off / subtle / strong */
:root[data-accent="off"] { --accent: var(--brand); }
:root[data-accent="off"] .topbar { box-shadow: 0 1px 0 var(--border); }
:root[data-accent="off"] .page-head h1::before { display: none; }
:root[data-accent="off"] .page-head h1 { padding-left: 0; }
/* Strong: the side menu itself is in a deep shade of the colour, the open screen in the colour */
:root[data-accent="strong"] { --nav: color-mix(in srgb, var(--accent) 34%, #0b1022); --nav-2: color-mix(in srgb, var(--accent) 48%, #0b1022); }
:root[data-accent="strong"] .topbar { box-shadow: inset 0 4px 0 var(--accent), 0 1px 0 var(--border); }
@media (min-width: 900px) {
  :root[data-accent="strong"] .bottomnav { background: linear-gradient(180deg, var(--nav-2) 0%, var(--nav) 55%) !important; }
  :root[data-accent="strong"] .bottomnav .nav-btn.active { background: color-mix(in srgb, var(--accent) 55%, transparent) !important; color: #fff !important; }
  :root[data-accent="strong"] .bottomnav .nav-btn.active svg { color: #fff !important; }
  :root[data-accent="strong"] .bottomnav .nav-btn.active::before { background: #fff !important; box-shadow: none !important; }
}
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.theme-sw { display: flex; align-items: center; gap: 10px; min-height: var(--ctl); padding: 4px 10px 4px 4px; border: 1px solid var(--border); border-radius: var(--r); }
.theme-sw input { width: 36px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }

/* Cost per bill on plan cards */
.sb-perbill { font-size: 12.5px; color: var(--muted); }
.sb-perbill.best { color: var(--ok); font-weight: 600; }
/* Strong panel colour: buttons, links, chips and highlights follow the business colour too. */
:root[data-accent="strong"] {
  --brand: var(--accent); --brand-600: color-mix(in srgb, var(--accent) 86%, #000); --brand-700: color-mix(in srgb, var(--accent) 74%, #000);
  --brand-50: color-mix(in srgb, var(--accent) 9%, #fff); --brand-100: color-mix(in srgb, var(--accent) 17%, #fff); --brand-ink: #fff;
}
@media (prefers-color-scheme: dark) {
  :root[data-accent="strong"]:not([data-theme="light"]) {
    --brand: color-mix(in srgb, var(--accent) 78%, #fff); --brand-600: color-mix(in srgb, var(--accent) 68%, #fff); --brand-700: color-mix(in srgb, var(--accent) 58%, #fff);
    --brand-50: color-mix(in srgb, var(--accent) 16%, #161a23); --brand-100: color-mix(in srgb, var(--accent) 24%, #161a23); --brand-ink: #0b1022;
  }
}
:root[data-accent="strong"][data-theme="dark"] {
  --brand: color-mix(in srgb, var(--accent) 78%, #fff); --brand-600: color-mix(in srgb, var(--accent) 68%, #fff); --brand-700: color-mix(in srgb, var(--accent) 58%, #fff);
  --brand-50: color-mix(in srgb, var(--accent) 16%, #161a23); --brand-100: color-mix(in srgb, var(--accent) 24%, #161a23); --brand-ink: #0b1022;
}
/* Table cards: kitchen / bill status and a small footer (guests · waiter · source). */
.tbl2 { min-height: 118px; }
.tbl2 .t-amt { margin-top: auto; }
.t-kot { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-kot > span { overflow: hidden; text-overflow: ellipsis; }
.t-kot i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.t-kot.k-none { color: var(--danger); } .t-kot.k-none i { background: var(--danger); }
.t-kot.k-cook { color: #b45309; } .t-kot.k-cook i { background: #d97706; animation: ppPulse 1.6s ease-in-out infinite; }
.t-kot.k-ready { color: var(--ok); } .t-kot.k-ready i { background: var(--ok); }
.t-kot.k-served i { background: var(--brand); }
.t-kot.k-billed { color: var(--ok); } .t-kot.k-billed i { background: var(--ok); }
.t-foot { display: flex; align-items: center; gap: 4px; min-width: 0; padding-right: 30px; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; }
.t-foot b { font-weight: 400; opacity: .6; } .t-foot svg { flex: none; } .t-foot .src-dot { flex: none; }
/* Customer on a busy table: name (and phone) under the table name */
.tbl2 .t-cust { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 4px 0 0; border-top: 1px dashed color-mix(in srgb, currentColor 18%, transparent); }
.tbl2 .t-cn { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 12.5px; font-weight: 700; color: var(--text); }
.tbl2 .t-cn svg { flex: none; color: var(--muted); }
.tbl2 .t-cn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl2 .t-cn b { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); }
.tbl2 .t-cp { padding-left: 16px; font-size: 11.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl2.billed .t-sub { color: var(--ok); }
/* Billing screen: quick table view without leaving the bill. */
.cart-head .ttl .cart-tables { flex: none; height: 32px; padding: 0 10px; gap: 5px; font-weight: 700; }
.cart-tables .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-size: 11px; line-height: 18px; text-align: center; }
.cart-head .ttl .cart-tables + .cart-new { margin-left: 0; }
.tj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tj-t { position: relative; display: flex; flex-direction: column; gap: 3px; height: 84px; padding: 8px 10px; border-radius: var(--r); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.tj-t:hover { border-color: var(--brand); }
.tj-t .tj-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.tj-t .tj-nm { font-size: 16px; font-weight: 800; }
.tj-t .tj-tm { font-size: 11px; font-weight: 700; color: var(--muted); }
.tj-t .tj-amt { margin-top: auto; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tj-t .t-kot { font-size: 11px; }
.tj-t.free .tj-free { margin-top: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.tj-t.running { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.tj-t.billed { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 50%, var(--border)); }
.tj-t.current { box-shadow: 0 0 0 2px var(--brand); }
.tj-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
@media (max-width: 760px) { .cart-tables .lbl { display: none; } .tj-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); } }
.tbl2-wrap .tbl2 .t-kot { padding-right: 30px; }
.tbl2-wrap .tbl2 .t-kot:has(+ .t-foot) { padding-right: 0; }
.tj-t .tj-tm { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
/* Dark mode: the open side menu's group headings are text, not divider lines. */
@media (min-width: 1280px) {
  html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .bottomnav .nav-cap { background: none !important; }
}
.tbl2 .t-tm { white-space: nowrap; flex: none; }
/* Plan locks: a small lock on menu items and a full "Upgrade" page for screens not in the plan. */
.nav-lock { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: auto; border-radius: 50%; background: color-mix(in srgb, #d97706 18%, transparent); color: #d97706; font-style: normal; flex: none; vertical-align: middle; }
.bottomnav .nav-lock { position: absolute; top: 4px; right: 6px; width: 15px; height: 15px; }
@media (min-width: 1280px) { html:not(.nav-collapsed):is(:not([data-route="pos"]), .pos-nav-open) .bottomnav .nav-lock { position: static; margin-left: auto; } }
.st-link .nav-lock, .tile .nav-lock { margin-left: 4px; width: 16px; height: 16px; }
.tile.locked { opacity: .78; }
.lock-screen { max-width: 520px; margin: 24px auto; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.lock-screen h2 { margin: 0; font-size: 20px; }
.lock-screen p { margin: 0; max-width: 420px; line-height: 1.5; }
.lock-ic { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--brand-50); color: var(--brand); }
.lock-ic i { position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #d97706; color: #fff; border: 2px solid var(--surface); }
.lock-plan { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 6px 12px; border-radius: var(--r); background: color-mix(in srgb, #d97706 12%, var(--surface)); color: var(--text-2); font-size: 13px; }
.more-grid .tile .nav-lock .ic { width: 11px; height: 11px; padding: 0; background: none; color: inherit; border-radius: 0; }
.lock-plan { display: block; line-height: 1.5; }
.lock-plan .ic, .lock-plan svg { display: inline-block; vertical-align: -2px; margin-right: 4px; }

/* Login & security (two-step login) */
.tf-state { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--surface-2); }
.tf-state b { display: block; }
.tf-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); background: var(--surface); color: var(--text-2); flex: none; }
.tf-state.on .tf-ic { color: var(--ok); }
.tf-steps { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; display: grid; gap: 4px; }
.tf-qr { align-self: center; width: 200px; max-width: 70vw; background: #fff; border-radius: var(--r); padding: 6px; }
.tf-qr svg { display: block; width: 100%; height: auto; }
.tf-key { display: block; padding: 8px 10px; border-radius: var(--r); background: var(--surface-2); font-size: 15px; letter-spacing: .04em; word-break: break-all; user-select: all; }
.tf-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tf-codes code { padding: 8px; border-radius: var(--r); background: var(--surface-2); text-align: center; font-size: 15px; letter-spacing: .05em; }

/* Kitchen style chooser (Settings → Printing) */
.kmode { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.kmode-opt { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.kmode-opt.on { border-color: var(--brand); background: var(--brand-50); }
.kmode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kmode-opt:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.kmode-top { display: flex; flex-direction: column; gap: 2px; }
.kmode-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.kmode-step { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: var(--r); background: var(--surface-3); color: var(--text-2); }
.kmode-opt.on .kmode-step { background: var(--surface); color: var(--brand); }
.kmode-arrow { color: var(--muted); display: inline-flex; }
.kmode-note { color: var(--text-2); line-height: 1.4; }

/* Selling at a stall / camp / event (Billing) */
.ev-bar { display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; padding: 6px 6px 6px 10px; min-height: 44px; border: 1px dashed var(--border); border-radius: var(--r); background: var(--surface); }
.ev-bar.on { border: 1.5px solid var(--brand); background: var(--brand-50); color: var(--brand); }
.ev-bar.on .grow { color: var(--text); }
@media (min-width: 900px) { .ev-bar { margin: 0 16px 10px; } }
/* Event menu editor */
.ev-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.ev-step { display: flex; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--surface-3); }
.ev-step b.n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 13px; }
.ev-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 36px; gap: 8px; align-items: center; min-height: 44px; }
.ev-row .vrs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 12px; }
.ev-row .vrs label { display: flex; align-items: center; gap: 6px; }
.ev-row .vrs input { width: 84px; }

/* A calendar field inside a form looks like the inputs next to it */
.field .date-host .date-btn { min-height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 500; overflow: hidden; }
.field .date-host .date-btn:hover { border-color: var(--muted); background: var(--surface); }
.field .date-host .date-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) { .field .date-host .date-btn { min-height: 40px; } }
.ev-when input[type=time].input { padding-left: 10px; padding-right: 8px; min-width: 0; }
.ev-bar .grow { flex: 1; min-width: 0; }

/* Tax & accounts */
.gst-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.gst-kind { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; text-align: left; border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); cursor: pointer; }
.gst-kind:hover { border-color: var(--brand); }
.gst-kind.on { border-color: var(--brand); background: var(--brand-50); }
.gst-kind .gst-ic { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 6px; border-radius: var(--r); background: var(--surface-3); color: var(--brand); }
.gst-kind.on .gst-ic { background: var(--brand); color: #fff; }
.gst-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.gst-month { width: auto; min-width: 180px; }
.gst-warn { margin: 4px 0 0; padding-left: 18px; }
.gst-warn li + li { margin-top: 4px; }
.gst-t th, .gst-t td { white-space: nowrap; }
.gst-back { display: inline-flex; align-items: center; gap: 4px; }

/* Paper size picker (Settings → Printing) */
.paper-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.paper-opt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.paper-opt.on { border-color: var(--brand); background: var(--brand-50); }
.paper-opt input { position: absolute; opacity: 0; pointer-events: none; }
.paper-opt:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.paper-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.paper-pic { flex: none; width: 34px; height: 44px; display: flex; align-items: flex-end; justify-content: center; }
.paper-pic i { display: block; background: var(--surface); border: 1.5px solid var(--muted); border-radius: 2px; box-shadow: inset 0 6px 0 -4px var(--border), inset 0 12px 0 -10px var(--border); }
.paper-pic.p-58 i { width: 12px; height: 40px; } .paper-pic.p-80 i { width: 17px; height: 40px; }
.paper-pic.p-a5 i { width: 22px; height: 31px; } .paper-pic.p-a4 i { width: 30px; height: 42px; }
.paper-opt.on .paper-pic i { border-color: var(--brand); }

/* Switch staff: pick a person, then the PIN */
.pin-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 360px; overflow: auto; }
.pin-person { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px; text-align: left; border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); cursor: pointer; }
.pin-person:hover { border-color: var(--brand); }
.pin-person.me { background: var(--surface-3); }
.pp-tx { display: flex; flex-direction: column; min-width: 0; } .pp-tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pp-tx small { color: var(--muted); font-size: 12px; }
.pin-who { display: grid; grid-template-columns: 1fr auto auto 1fr; align-items: center; gap: 8px; } .pin-who > :first-child { justify-self: start; }
.pin-err { min-height: 18px; text-align: center; color: var(--danger); font-size: 13px; font-weight: 600; }
.pin-dots.shake { animation: pin-shake .35s; }
@keyframes pin-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .pin-dots.shake { animation: none; } }
.vac-due > summary { cursor: pointer; list-style: none; } .vac-due > summary::-webkit-details-marker { display: none; }
.vac-due > summary h3 { display: flex; align-items: center; gap: 6px; }
.vac-due .list-item { gap: 8px; }

/* Lab: samples, result entry, test editor */
.lab-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lab-step { display: flex; align-items: center; gap: 10px; padding: 12px; text-align: left; cursor: pointer; border: 1px solid var(--border); font: inherit; color: inherit; }
.lab-step b { display: block; font-size: 20px; line-height: 1.1; } .lab-step small { color: var(--muted); }
.lab-step.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.lab-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); }
.lab-no { flex: none; display: grid; place-items: center; min-width: 44px; height: 40px; padding: 0 8px; border-radius: var(--r); background: var(--brand); color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.lab-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 200px; overflow: auto; }
.lab-flow { display: flex; flex-wrap: wrap; gap: 6px; } .lab-flow span { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: var(--r); background: var(--surface-2); color: var(--muted); font-size: 12px; }
.lab-flow span.on { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.lab-res { display: grid; padding: 4px 16px 12px; }
.lab-line { display: grid; grid-template-columns: minmax(0, 1.4fr) 110px 70px 56px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 44px; border-bottom: 1px solid var(--border); }
.lab-line:last-child { border-bottom: 0; } .lab-line .input { height: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.lab-line .input.lab-out { color: var(--danger); font-weight: 700; border-color: var(--danger); }
.lab-u { color: var(--muted); font-size: 12px; } .lab-rng { text-align: right; }
.lab-foot { gap: 8px; width: 100%; } .lab-foot .grow { flex: 1; }
.lab-ph, .lab-prow { display: grid; grid-template-columns: minmax(0, 2fr) 90px 70px 70px minmax(0, 1.4fr) 36px; gap: 6px; align-items: center; }
.lab-ph { padding: 8px 16px 0; }
.lab-ph, .lab-prow { grid-template-columns: minmax(0, 2fr) 90px 70px 70px minmax(0, 1.4fr) 36px 36px; }
.lab-rsb { position: relative; color: var(--muted); } .lab-rsb.on { color: var(--brand); }
.lab-rsb i { position: absolute; top: 2px; right: 2px; min-width: 14px; height: 14px; border-radius: var(--r); background: var(--brand); color: var(--brand-ink); font: 600 9.5px/14px system-ui, sans-serif; font-style: normal; }
.lab-rh, .lab-rrow { display: grid; grid-template-columns: 110px 72px 72px 72px 72px minmax(0, 1fr) 36px; gap: 6px; align-items: center; }
@media (max-width: 640px) {
  .lab-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab-line { grid-template-columns: minmax(0, 1fr) 96px 48px; row-gap: 2px; padding: 6px 0; }
  .lab-line .lab-u { grid-column: 3; } .lab-line .lab-flag { grid-column: 1; grid-row: 2; } .lab-line .lab-rng { grid-column: 2 / 4; grid-row: 2; }
  .lab-ph { display: none; } .lab-prow { grid-template-columns: 1fr 1fr 36px; } .lab-prow [data-k=n] { grid-column: 1 / 3; } .lab-prow [data-k=ref] { grid-column: 1 / 3; }
  .lab-rh { display: none; } .lab-rrow { grid-template-columns: repeat(3, minmax(0, 1fr)) 36px; padding-bottom: 8px; border-bottom: 1px solid var(--border); } .lab-rrow [data-k=ref] { grid-column: 1 / 4; } .lab-rrow [data-k=lo] { grid-column: 2; } .lab-rrow [data-k=g] { grid-column: 1 / 4; }
}
/* Page titles never squeeze to one word per line: the buttons wrap below instead */
.page-head h1 { min-width: min(100%, 240px); }
/* Homework diary */
.hw-sub { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: 13px; }
.hw-body { white-space: pre-wrap; }
/* School transport */
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tr-card { display: grid; gap: 10px; padding: 14px; text-align: left; cursor: pointer; border: 1px solid var(--border); font: inherit; color: inherit; }
.tr-card.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.tr-ic, .lib-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); }
.lib-ic.late { background: var(--danger-bg); color: var(--danger); }
.tr-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12.5px; } .tr-meta b { color: var(--text); }
.tr-stop { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 16px; border-top: 1px solid var(--border); }
.tr-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; }
.tr-kids { padding-left: 36px; }
.tr-sh, .tr-srow { display: grid; grid-template-columns: minmax(0, 2fr) 110px 110px 90px 36px; gap: 6px; align-items: center; }
.tr-sh { padding: 8px 16px 0; }
@media (max-width: 640px) { .tr-sh { display: none; } .tr-srow { grid-template-columns: 1fr 1fr 36px; } .tr-srow [data-k=name] { grid-column: 1 / 3; } .tr-srow [data-k=fee] { grid-column: 1 / 3; } }

/* Gift cards: how-it-works guide with a card picture */
.gc-guide { display: grid; grid-template-columns: 260px 1fr; gap: 18px; padding: 16px; align-items: center; }
.gc-art { display: grid; place-items: center; }
.gc-card { width: 100%; max-width: 260px; aspect-ratio: 1.6; border-radius: 14px; padding: 14px 16px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 55%, #000) 100%); box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 30%, transparent); position: relative; overflow: hidden; }
.gc-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.12); }
.gc-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14px; gap: 8px; }
.gc-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-val { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.gc-bot { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 1.5px; opacity: .9; }
.gc-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; position: relative; }
.gc-step { display: flex; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--surface-2); }
.gc-step b.n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 13px; }
.gc-step small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.gc-hide { grid-column: 1 / -1; justify-self: end; }
@media (max-width: 760px) { .gc-guide { grid-template-columns: 1fr; } .gc-steps { grid-template-columns: 1fr; } }

/* Photo gallery picker (cover first) */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gal-th { position: relative; border-radius: var(--r); background: var(--surface-3) center / cover no-repeat; border: 1px solid var(--border); overflow: hidden; }
.gal-th.cover { outline: 2px solid var(--brand); outline-offset: 1px; }
.gal-cv { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: var(--r); background: var(--brand); color: #fff; }
.gal-act { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
.gal-act button { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: var(--r); background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }
.gal-act button:hover { background: rgba(0,0,0,.75); }
.gal-busy { display: grid; place-items: center; }
.gal-add { flex-direction: column; justify-content: center; gap: 4px; padding: 6px; color: var(--muted); }

/* Item editor: tabs + flat section cards (no fold-outs) */
.ie-tabs { position: sticky; top: -16px; z-index: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: -4px 0 2px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); }
.ie-tabs button { position: relative; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: var(--r); background: none; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; min-width: 0; }
.ie-tabs button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ie-tabs button.active { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ie-tabs em { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.ie-tabs em:empty { display: none; }
.ie-sec { display: flex; flex-direction: column; gap: 12px; }
.ie-h { display: flex; gap: 10px; align-items: flex-start; }
.ie-h b { display: block; }
.ie-h small { display: block; color: var(--muted); line-height: 1.4; }
.ie-ic { flex: none; width: 32px; height: 32px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.ie-chk { padding: 0 12px; height: 40px; border: 1px solid var(--border); border-radius: var(--r); }
@media (max-width: 560px) { .ie-tabs button { font-size: 11.5px; } .ie-tabs button span { max-width: 100%; } }

/* Settings → letterhead: options + live A4 preview */
.lh-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; align-items: start; }
.lh-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.lh-modes { display: grid; gap: 8px; }
.lh-mode { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.lh-mode input { display: none; }
.lh-mode.on { border-color: var(--brand); background: var(--brand-50); }
.lh-mode small { display: block; color: var(--muted); line-height: 1.4; }
.lh-mic { flex: none; width: 32px; height: 32px; border-radius: var(--r); display: grid; place-items: center; background: var(--surface-2); color: var(--brand); }
.lh-mm { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lh-mm .bp-in { min-width: 0; width: auto; display: flex; flex-direction: column; } .lh-mm .input { width: 100%; min-width: 0; text-align: left; }
.lh-sig { display: flex; flex-direction: column; gap: 10px; }
.lh-prev { position: relative; width: 210px; aspect-ratio: 210 / 297; background: #fff; border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,.08); overflow: hidden; }
.lh-band { position: absolute; left: 0; right: 0; top: 0; display: grid; place-items: center; font-style: normal; font-size: 10px; color: #8a6d00;
  background: repeating-linear-gradient(45deg, #fff6d6, #fff6d6 6px, #fdecb0 6px, #fdecb0 12px); }
.lh-band.b { top: auto; bottom: 0; }
.lh-area { position: absolute; outline: 1px dashed #9aa4b2; display: flex; flex-direction: column; gap: 5px; padding: 0; }
.lh-name { font-size: 10px; color: #111; }
.lh-hi { width: 100%; max-height: 30%; object-fit: contain; object-position: left top; }
.lh-fi { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; object-fit: contain; object-position: center bottom; }
.lh-ph { font-style: normal; font-size: 9px; color: #888; height: 22px; display: grid; place-items: center; background: #f1f3f6; }
.lh-ln { display: block; height: 4px; border-radius: 2px; background: #e3e7ed; }
.lh-ln.s { width: 60%; height: 3px; } .lh-ln.m { width: 70%; }
.lh-tb { display: block; height: 40px; border-radius: 2px; background: repeating-linear-gradient(#f4f6f9, #f4f6f9 7px, #e3e7ed 7px, #e3e7ed 8px); }
.lh-doc { display: flex; flex-direction: column; gap: 5px; }
.lh-sg { margin-top: auto; align-self: flex-end; width: 60px; display: flex; flex-direction: column; align-items: center; margin-bottom: 4px; }
.lh-sg img { max-width: 60px; max-height: 22px; object-fit: contain; }
.lh-sg i { display: block; width: 100%; border-top: 1px solid #555; }
.lh-sg small { font-size: 7px; color: #444; }
@media (max-width: 760px) { .lh-wrap { grid-template-columns: 1fr; } .lh-side { position: static; order: -1; } .lh-mm { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Enquiries */
.enq-cols { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; align-items: start; }
.enq-cols > .card:only-child { grid-column: 1 / -1; }
.enq-row { cursor: pointer; }
.enq-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 2px var(--p); }
.enq-av.lg { width: 48px; height: 48px; font-size: 18px; }
.enq-head { display: flex; gap: 12px; align-items: center; }
.enq-src { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 12px; }
.enq-bar { display: grid; grid-template-columns: 92px 1fr; gap: 2px 8px; align-items: center; font-size: 13px; }
.enq-bar i { display: block; height: 10px; border-radius: 5px; background: var(--surface-2); position: relative; overflow: hidden; }
.enq-bar i::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--brand-50); border-radius: 5px; }
.enq-bar em { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--brand); border-radius: 5px; }
.enq-bar small { grid-column: 2; color: var(--muted); }
.enq-tl { display: flex; flex-direction: column; gap: 12px; }
.enq-ev { display: flex; gap: 10px; }
.enq-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
@media (max-width: 900px) { .enq-cols { grid-template-columns: 1fr; } .enq-src { position: static; } }

/* Study material */
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.nt-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; cursor: pointer; border: 1px solid var(--border); font: inherit; color: inherit; transition: border-color .15s; }
.nt-card:hover, .nt-card:focus-visible { border-color: var(--brand); outline: none; }
.nt-card b { font-weight: 600; }
.nt-body { color: var(--muted); font-size: .9em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nt-ic { flex: none; width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.nt-ic.pdf { background: var(--danger-50, var(--surface-2)); color: var(--danger); }
.nt-ic.img { background: var(--success-50, var(--surface-2)); color: var(--success); }
.nt-drop .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nt-drop .txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-drop .txt span { color: var(--muted); font-size: .85em; }

/* Rich text: maths, blanks, photos, tables (questions, solutions, notes) */
math { font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", math; font-size: 1.08em; }
math[display="block"] { margin: 6px 0; overflow-x: auto; overflow-y: hidden; max-width: 100%; }
.rt-blank { display: inline-block; min-width: 72px; border-bottom: 1.5px solid currentColor; margin: 0 4px; vertical-align: -2px; }
.rt-img { display: block; max-width: min(100%, 520px); max-height: 360px; object-fit: contain; border-radius: var(--r); margin: 6px 0; background: var(--surface); }
.rt-table { border-collapse: collapse; margin: 6px 0; font-size: .95em; max-width: 100%; display: block; overflow-x: auto; }
.rt-table th, .rt-table td { border: 1px solid var(--border-strong); padding: 4px 10px; text-align: left; }
.rt-table th { background: var(--surface-2); font-weight: 600; }
.rt-ed { display: flex; flex-direction: column; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); position: relative; }
.rt-ed:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.rt-ed > textarea.input { border: 0; box-shadow: none; border-radius: 0 0 var(--r) var(--r); min-height: 72px; font-family: inherit; }
.rt-ed > textarea.input:focus { box-shadow: none; }
.rt-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--r) var(--r) 0 0; }
.rt-ed.compact .rt-bar { padding: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.rt-tb { min-width: 32px; height: 30px; padding: 0 7px; white-space: nowrap; border: 0; border-radius: var(--r); background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.rt-tb:hover, .rt-tb:focus-visible { background: var(--surface); color: var(--text); outline: none; box-shadow: 0 0 0 1px var(--border); }
.rt-sp { flex: 1; }
.rt-ic-frac { display: inline-flex; flex-direction: column; font-size: 9px; line-height: 1; } .rt-ic-frac span:first-child { border-bottom: 1px solid currentColor; padding: 0 2px; }
.rt-pop { position: absolute; z-index: 6; top: 40px; left: 4px; right: 4px; max-height: 260px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.15)); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.rt-g small { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.rt-g > div { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 3px; }
.rt-g button { min-width: 36px; height: 32px; padding: 0 6px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); cursor: pointer; font: inherit; font-size: 15px; }
.rt-g button:hover { border-color: var(--brand); color: var(--brand); }
.rt-help-b { font-size: 13px; line-height: 1.9; color: var(--text-2); } .rt-help-b code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.rt-pv { border-top: 1px dashed var(--border); padding: 8px 10px; font-size: 14px; color: var(--text); background: color-mix(in srgb, var(--brand-50) 40%, var(--surface)); border-radius: 0 0 var(--r) var(--r); overflow-x: auto; }
.rt-pv::before { content: 'Preview'; display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.rt-ed:has(.rt-pv:not([hidden])) > textarea.input { border-radius: 0; }

/* Question bank: match pairs, passages, library */
.pair-head, .pair-row { display: grid; grid-template-columns: 28px 1fr 1fr 36px; gap: 8px; align-items: center; }
.pair-head b { font-size: 12px; color: var(--muted); font-weight: 600; }
.rv-passage { border-left: 3px solid var(--brand); background: var(--surface-2); padding: 8px 12px; border-radius: 0 var(--r) var(--r) 0; margin-bottom: 6px; color: var(--text-2); }
.lib-q { align-items: flex-start; } .lib-q > input { margin-top: 4px; }
.lib-q .grow > div:first-child { line-height: 1.5; }
@media (max-width: 560px) { .pair-head { display: none; } .pair-row { grid-template-columns: 24px 1fr 32px; } .pair-row [data-r] { grid-column: 2; } .pair-row [data-rmp] { grid-row: 1; grid-column: 3; } }
.lib-foot { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; }
.lib-foot select, .lib-foot .dsel { width: auto; flex: 0 1 180px; min-width: 120px; }
/* OT schedule */
.ot-row .ot-time { display: flex; flex-direction: column; min-width: 64px; line-height: 1.25; } .ot-row .ot-time small { color: var(--muted); font-size: 12px; }
.ot-row.is-off { opacity: .55; } .ot-row.is-off .title { text-decoration: line-through; }
.ot-kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; } .ot-kv b { text-align: right; }
/* Hospital: nursing notes */
.ipd-vitals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ipd-vrow { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 2px 0; font-variant-numeric: tabular-nums; } .ipd-vrow small { color: var(--muted); }
.ipd-note { align-items: flex-start; }
/* Hotels: booking sites */
.ota-room { align-items: flex-start; } .ota-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ota-chips .chip { min-height: 30px; padding: 0 10px; font-size: 12.5px; } .ota-chips .chip.is-ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); color: var(--ok); }
.ota-chips .chip.is-bad { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); color: var(--danger); }
.ota-src { font-size: 11px; }
.cd-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px 12px; margin-top: 6px; }
.rp-rule { gap: 8px; display: flex; flex-direction: column; }
.rp-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) 150px 150px 110px 36px; gap: 8px; align-items: end; }
@media (max-width: 760px) { .rp-row { grid-template-columns: 1fr 1fr; } .rp-row .icon-btn { justify-self: end; } }
/* Vets: pet boarding */
.bd-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.bd-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.bd-day small { color: var(--muted); font-size: 11.5px; white-space: nowrap; } .bd-day b { font-size: 17px; font-variant-numeric: tabular-nums; } .bd-day b i { font-style: normal; color: var(--muted); font-size: 12px; font-weight: 500; }
.bd-day.today { border-color: var(--brand); } .bd-day.full { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); } .bd-day.full b { color: var(--danger); }
/* Exams: photos of written answers (teacher check) */
.ex-pics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; } .ex-pics img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--border); display: block; }
/* Person-first billing panel (clinics, schools, salons) */
.pf { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.pf-h { display: flex; gap: 10px; align-items: flex-start; }
.pf-h small { display: block; color: var(--muted); margin-top: 2px; }
.pf-ic { flex: 0 0 40px; height: 40px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.pf-r:empty { display: none; }
.pf .btn-ghost { align-self: flex-start; }
/* Item editor: Sell as membership / session pack */
.ip-covers { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow-y: auto; padding: 2px; }
.ip-cov { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); font-size: 13px; cursor: pointer; }
.ip-cov:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.ip-box [hidden] { display: none !important; }
.text-warn { color: var(--warn); }

/* ---------- Login / sign-up brand panel: logo links home, live bill instead of a screenshot ---------- */
.auth-logo { display: block; }
.auth-logo img { display: block; height: 100%; width: auto; }
.auth-logo:hover, .auth-mobile-logo:hover { opacity: .85; }
.auth-live { display: none; }
@media (min-width: 960px) {
  .auth-live { display: block; position: relative; width: 100%; max-width: 520px; padding: 28px 0 8px 0; }
  .al-card { position: relative; width: 300px; margin-left: 56px; padding: 16px; border-radius: var(--r); background: #fff; color: #0a1330; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
  .al-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 8px;
    background: linear-gradient(-45deg, transparent 4px, #fff 0) 0 0 / 8px 8px repeat-x, linear-gradient(45deg, transparent 4px, #fff 0) 0 0 / 8px 8px repeat-x; }
  .al-slot { display: grid; }
  .al-b { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 8px; opacity: 0; animation: al-show 12s infinite; animation-delay: calc(var(--i) * 4s); }
  .al-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px dashed #d5dae6; }
  .al-head .ic { color: var(--brand); }
  .al-head b { font-size: 14px; flex: 1; }
  .al-head small { color: #8d96ab; font-size: 12px; }
  .al-row { display: flex; justify-content: space-between; font-size: 13.5px; color: #3b4660; animation: al-row 12s infinite both; animation-delay: calc(var(--i) * 4s + var(--j) * .35s); }
  .al-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px dashed #d5dae6; font-size: 13px; color: #6b7590; }
  .al-total b { font-size: 20px; color: #0a1330; letter-spacing: -.02em; }
  .al-st { display: grid; height: 32px; }
  .al-st span { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--r); font-size: 13px; font-weight: 700; }
  .al-st1 { background: #eef1f7; color: #3b4660; animation: al-st1 4s infinite; }
  .al-st2 { background: #e6f6ea; color: #2f9e44; opacity: 0; animation: al-st2 4s infinite; }
  .al-chip { position: absolute; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); font-size: 13px; font-weight: 700; white-space: nowrap; animation: al-float 5s ease-in-out infinite; }
  .al-chip i { width: 8px; height: 8px; border-radius: 50%; }
  .al-chip i.ok { background: #4ade80; } .al-chip i.warn { background: #fbbf24; }
  .al-c1 { left: 0; top: 0; }
  .al-c2 { left: 300px; top: 150px; animation-delay: -2.5s; }
  .auth-billu { position: absolute; left: 340px; bottom: 0; width: 96px; height: auto; }
  .auth-billu .m-line, .auth-billu .m-stick { stroke: #c3cdee; }
  .auth-billu .m-hand, .auth-billu .m-foot { fill: #c3cdee; }
  .auth-billu .m-shadow { fill: rgba(0,0,0,.45); }
  @keyframes al-show { 0% { opacity: 0; } 3%, 31% { opacity: 1; } 34%, 100% { opacity: 0; } }
  @keyframes al-row { 0%, 2% { opacity: 0; transform: translateX(-8px); } 6%, 100% { opacity: 1; transform: none; } }
  @keyframes al-st1 { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }
  @keyframes al-st2 { 0%, 45% { opacity: 0; } 50%, 100% { opacity: 1; } }
  @keyframes al-float { 50% { transform: translateY(-6px); } }
}
@media (min-width: 960px) and (max-height: 760px) { .auth-billu { width: 72px; } .al-c2 { top: 120px; } }
@media (prefers-reduced-motion: reduce) {
  .al-b, .al-row, .al-st1, .al-st2, .al-chip, .auth-billu * { animation: none !important; }
  .al-b:first-child, .al-st2 { opacity: 1; } .al-st1 { opacity: 0; }
}

/* Billu drawing (copied from www.css, scoped to the login panel) */
.auth-billu { display: block; overflow: visible; }
.auth-billu .m-paper { fill: #fff; stroke: #1b2a5e; stroke-width: 3; stroke-linejoin: round; }
.auth-billu .m-top { fill: var(--brand); }
.auth-billu .m-line, .auth-billu .m-stick { fill: none; stroke: #1b2a5e; stroke-width: 4; stroke-linecap: round; }
.auth-billu .m-hand, .auth-billu .m-foot { fill: #1b2a5e; }
.auth-billu .m-eye { fill: #1b2a5e; }
.auth-billu .m-glint { fill: #fff; }
.auth-billu .m-cheek { fill: #ff8fa3; opacity: .55; }
.auth-billu .m-smile { fill: none; stroke: #1b2a5e; stroke-width: 3; stroke-linecap: round; }
.auth-billu .m-rule { stroke: #cfd5e1; stroke-width: 3; stroke-linecap: round; }
.auth-billu .m-rule.dash { stroke-dasharray: 3 4; }
.auth-billu .m-total { stroke: var(--brand); stroke-width: 4; stroke-linecap: round; }
.auth-billu .m-shadow { fill: rgba(0,0,0,.22); }
.auth-billu .m-canopy { fill: #ff9933; stroke: #1b2a5e; stroke-width: 3; stroke-linejoin: round; }
.auth-billu .m-eyes { transform-box: fill-box; transform-origin: center; animation: am-blink 4.5s infinite; }
.auth-billu .m-bob { animation: am-bob 3s ease-in-out infinite; }
.auth-billu .m-wave { transform-box: view-box; transform-origin: 96px 66px; animation: am-wave 1.6s ease-in-out infinite; }
.auth-billu.m-cheer .m-wave, .auth-billu.m-cheer .m-arm-l { animation: am-wave 1.2s ease-in-out infinite; }
.auth-billu.m-cheer .m-arm-l { transform-box: view-box; transform-origin: 24px 66px; animation-name: am-wave-l; }
@keyframes am-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes am-bob { 50% { transform: translateY(-4px); } }
@keyframes am-wave { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(18deg); } }
@keyframes am-wave-l { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(-18deg); } }
.auth-brand .auth-billu .m-line, .auth-brand .auth-billu .m-stick { stroke: #c3cdee; }
.auth-brand .auth-billu .m-hand, .auth-brand .auth-billu .m-foot { fill: #c3cdee; }
.auth-brand .auth-billu .m-shadow { fill: rgba(0,0,0,.45); }
@media (prefers-reduced-motion: reduce) { .auth-billu * { animation: none !important; } }
/* Live bill layout v2: chips in a row, bill and Billu side by side; logo in the flow */
@media (min-width: 960px) {
  .auth-brand { justify-content: flex-start; }
  .auth-logo { position: static; height: 34px; margin-bottom: auto; }
  .auth-foot { position: static; margin-top: auto; }
  .auth-live { padding: 0; display: flex; flex-direction: column; gap: 16px; }
  .al-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .al-chip { position: static; }
  .al-chip + .al-chip { animation-delay: -2.5s; }
  .al-stage { display: flex; align-items: flex-end; gap: 16px; }
  .al-card { flex: 0 1 300px; min-width: 0; width: auto; margin: 0; }
  .auth-billu { position: static; flex: none; width: 88px; }
}
@media (min-width: 960px) and (max-height: 760px) { .auth-billu { width: 72px; } }
/* Live bill v3: the bill prints out of a small printer; chips and Billu pinned to it */
@media (min-width: 960px) {
  .auth-live { display: block; max-width: none; padding: 8px 0 0; }
  .al-stage { position: relative; display: block; width: 264px; margin: 0 72px 0 32px; }
  .al-printer { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; height: 44px; margin: 0 -16px; padding: 0 16px; border-radius: 12px; background: linear-gradient(#26345f, #18234a); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 12px 30px rgba(0,0,0,.4); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8d9ac4; }
  .al-led { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: al-led 4s infinite; }
  .al-mouth { position: absolute; left: 12px; right: 12px; bottom: -3px; height: 6px; border-radius: 3px; background: #050a1c; }
  .al-feed { position: relative; z-index: 1; margin-top: -3px; overflow: hidden; padding: 0 0 24px; filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); }
  .al-card { width: 100%; padding: 20px 16px 24px; border-radius: 0; animation: al-print 4s cubic-bezier(.2,.7,.2,1) infinite; box-shadow: none;
    -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
            mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%; }
  .al-card::after { display: none; }
  .al-chips { display: none; }
  .al-chip { position: absolute; z-index: 3; height: 34px; background: rgba(17,29,69,.82); border-color: rgba(255,255,255,.18); box-shadow: 0 10px 24px rgba(0,0,0,.35); animation: al-float 5s ease-in-out infinite; }
  .al-c1 { left: -44px; top: 96px; }
  .al-c2 { right: -60px; top: 176px; animation-delay: -2.5s; }
  .auth-billu { position: absolute; z-index: 4; right: -78px; bottom: 4px; width: 104px; }
  @keyframes al-print { 0% { transform: translateY(-100%); } 14%, 100% { transform: none; } }
  @keyframes al-led { 0%, 14% { opacity: 1; } 7% { opacity: .3; } }
}
@media (min-width: 960px) and (max-height: 760px) { .auth-billu { width: 84px; right: -64px; } .al-c2 { top: 150px; } }
@media (min-width: 960px) and (max-width: 1100px) { .al-stage { margin-left: 40px; width: 240px; } .al-c2 { right: -40px; } }
@media (prefers-reduced-motion: reduce) { .al-card, .al-led { animation: none !important; } }
@media (min-width: 960px) {
  .al-c1 { left: -40px; top: -16px; right: auto; }
  .al-c2 { left: auto; right: -64px; top: 168px; }
  .auth-billu { left: auto; }
}
@media (min-width: 960px) and (max-width: 1100px) { .al-c2 { right: -48px; } .auth-billu { right: -60px; width: 80px; } }
@media (min-width: 960px) { .al-c2 { top: 52px; } }

/* ---------- Menu: category side list ---------- */
.mn-layout { grid-template-columns: 248px minmax(0, 1fr); }
.mn-cats { gap: 2px; padding: 8px; }
.mn-cats-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mn-cats-head b { font-weight: 700; }
.mn-cats-list { display: flex; flex-direction: column; gap: 2px; }
.mn-cat { position: relative; height: 36px; padding: 0 8px 0 12px; font-size: 14px; color: var(--text-2); transition: background .15s, color .15s; }
.mn-cat .mn-dot { width: 8px; height: 8px; background: var(--c); }
.mn-cat .mn-n { min-width: 24px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.mn-cat:hover { background: var(--surface-2); color: var(--text); }
.mn-cat.on { background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--text); font-weight: 600; }
.mn-cat.on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.mn-cat.on .mn-n { background: var(--surface); color: var(--text); }
.mn-all { margin-bottom: 4px; }
.mn-all .mn-dot { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c); }
.mn-all .mn-dot .ic { width: 12px; height: 12px; }
.mn-far-t { display: flex; align-items: center; gap: 8px; height: 36px; margin-top: 8px; padding: 0 8px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); cursor: pointer; text-align: left; }
.mn-far-t .ic { transition: transform .15s; }
.mn-far-t.open .ic { transform: rotate(90deg); }
.mn-far-t .mn-n { font-size: 12px; }
.mn-far .mn-cat { color: var(--muted); }
.mn-addcat { margin-top: 8px; color: var(--brand); font-weight: 600; }
.mn-addcat:hover { color: var(--brand); background: var(--brand-50); }
@media (max-width: 899px) {
  .mn-layout { grid-template-columns: 1fr; }
  .mn-cats-head, .mn-far-t, .mn-far { display: none; }
  .mn-cats-list { flex-direction: row; gap: 8px; }
  .mn-cat { padding: 0 12px; }
  .mn-cat.on::before { display: none; }
  .mn-cat.on { border-color: var(--c); }
  .mn-all { margin-bottom: 0; }
}
.mn-cat.on::before { left: 2px; }
.mn-all.on::before { display: none; }
.mn-cat.on .mn-n { background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
/* Menu categories: rows never squeeze when the list is long (the panel scrolls instead), full-height tap rows, a clear "New category" button */
.mn-cats > *, .mn-cats-list > * { flex-shrink: 0; }
.mn-cats { padding: 8px 8px 10px; }
.mn-cat { height: var(--ctl, 40px); }
.mn-cats-list { gap: 2px; }
.mn-addcat { margin-top: 8px; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.mn-addcat:hover { border-color: var(--brand); }
@media (max-width: 899px) { .mn-cats { padding: 0 0 4px; } .mn-addcat { border-radius: 999px; } }
/* Short screens: keep the 4 points, compact (title only, 2x2) instead of hiding them */
@media (min-width: 960px) and (max-height: 760px) {
  .auth-brand { gap: 16px; padding-top: 32px; padding-bottom: 24px; }
  .auth-brand h2 { font-size: 28px; }
  .auth-brand ul { display: grid; gap: 8px 16px; }
  .auth-brand li { align-items: center; gap: 8px; }
  .auth-brand li .ic { width: 32px; height: 32px; padding: 7px; }
  .auth-brand li span { display: none; }
}
@media (min-width: 960px) and (max-height: 640px) {
  .al-feed { max-height: 190px; }
}
@media (min-width: 960px) and (max-height: 640px) {
  .auth-brand { gap: 12px; padding-top: 24px; padding-bottom: 16px; }
  .auth-brand h2 { font-size: 24px; }
  .al-feed { max-height: 150px; }
  .auth-foot { display: none; }
}
/* When the form is taller than the screen, keep the left panel on screen */
@media (min-width: 960px) { .auth-brand { position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; } }
/* Phone login / sign-up: brand header on top, form card overlapping it, points below */
.auth-mhero { position: relative; width: calc(100% + 32px); margin: -24px -16px -56px; padding: calc(16px + var(--safe-t, 0px)) 16px 72px; color: #fff; overflow: hidden;
  background: radial-gradient(420px 260px at 100% 0%, rgba(69,104,220,.6), transparent 70%), radial-gradient(360px 240px at 0% 100%, rgba(124,77,255,.35), transparent 70%), #0a1330; }
.auth-mhero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 32px 32px; pointer-events: none; }
.auth-mhero > * { position: relative; }
.amh-logo { display: inline-block; } .amh-logo img { height: 30px; display: block; }
.auth-mhero h2 { margin: 16px 0 12px; font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.auth-mhero h2 em { font-style: normal; background: linear-gradient(90deg, #8ea6ff, #c49bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.amh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.amh-chips span { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: var(--r); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); font-size: 12px; font-weight: 700; }
.amh-dot { width: 8px; height: 8px; border-radius: 50%; } .amh-dot.off { background: #fcc419; } .amh-dot.on { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
@media (max-width: 959px) {
  .auth-mhero ~ .auth-box { position: relative; z-index: 1; box-shadow: 0 16px 40px rgba(10,19,48,.18); }
  .auth-mhero ~ .auth-box .auth-mobile-logo { display: none; }
}
.auth-mpoints { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; max-width: 440px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-mpoints li { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.auth-mpoints li .ic { width: 32px; height: 32px; padding: 7px; border-radius: var(--r); background: var(--brand-50, #eef2fd); color: var(--brand); }
.auth-mpoints b { display: block; font-size: 13px; line-height: 1.3; } .auth-mpoints span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.auth-mtrial { margin: 0; max-width: 440px; text-align: center; font-size: 13px; font-weight: 700; color: var(--text-2); }
@media (min-width: 960px) { .auth-mhero, .auth-mpoints, .auth-mtrial { display: none; } }

/* ---------- Super admin: WhatsApp, Reports, Team (admin-more.js) ---------- */
.adm-tabs { display: flex; overflow-x: auto; scrollbar-width: none; max-width: 100%; align-self: flex-start; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs button { flex: none; }
.adm-seg-sm { display: flex; overflow-x: auto; scrollbar-width: none; }
.adm-seg-sm button { flex: 1 0 auto; }
.adm-sep { flex: none; width: 1px; background: var(--border); margin: 4px 4px; }
.adm-grid2 { display: grid; gap: 16px; grid-template-columns: 1fr; min-width: 0; }
.adm-grid2 > * { min-width: 0; }
@media (min-width: 1100px) { .adm-grid2 { grid-template-columns: 1fr 1fr; } }
.kpis-5 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .kpis-5 { grid-template-columns: repeat(5, 1fr); } }
.kpi small a { color: var(--brand); font-weight: 700; }
.grid-3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.adm-step { flex: none; width: 28px; height: 28px; border-radius: var(--r); display: grid; place-items: center; background: var(--warn-bg); color: var(--warn); }
.adm-step.ok { background: var(--ok-bg); color: var(--ok); }
.adm-clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.adm-fsel { width: auto; min-width: 130px; flex: 1 1 130px; }
.adm-off { opacity: .6; }
button.list-item { width: 100%; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.sheet-foot .grow { flex: 1; }
.sheet-foot .btn.btn-ghost.danger, .sheet-foot .icon-btn { flex: none; }
.btn-ghost.danger, .danger { color: var(--danger); }

/* template editor: form + phone preview (preview below on phones) */
.adm-ted { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .adm-ted { grid-template-columns: minmax(0, 1fr) 280px; } .adm-prev { position: sticky; top: 0; align-self: start; } }
.adm-prev { display: grid; gap: 8px; }
.adm-vars { display: grid; gap: 8px; }
.adm-var { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center; }
.adm-var > :nth-child(3) { grid-column: 1 / -1; }
@media (min-width: 560px) { .adm-var { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); } .adm-var > :nth-child(3) { grid-column: auto; } }
.adm-btnrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.adm-btnrow > .input { grid-column: 1; }
.adm-btnrow > .icon-btn { grid-column: 2; grid-row: 1; }
@media (min-width: 560px) { .adm-btnrow { grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) auto; } .adm-btnrow > .input { grid-column: auto; } .adm-btnrow > .icon-btn { grid-column: auto; grid-row: auto; } }

/* WhatsApp-like preview and chat */
.pwa-phone { background: var(--surface-3); border-radius: var(--r); padding: 16px 12px; display: grid; gap: 4px; }
.pwa-bubble { background: var(--surface); border-radius: var(--r); padding: 6px; box-shadow: 0 1px 1px rgba(15,23,42,.08); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.pwa-bubble img { width: 100%; border-radius: var(--r); display: block; margin-bottom: 4px; }
.pwa-media { height: 120px; border-radius: var(--r); background: var(--surface-3); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; margin-bottom: 4px; }
.pwa-doc { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--r); background: var(--surface-2); font-size: 13px; margin-bottom: 4px; overflow: hidden; }
.pwa-doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwa-h { font-weight: 800; padding: 2px 4px; }
.pwa-t { padding: 2px 4px; }
.pwa-f { padding: 2px 4px; color: var(--muted); font-size: 12px; }
.pwa-time { text-align: right; color: var(--muted); font-size: 11px; padding: 0 4px; }
.pwa-btns { display: grid; gap: 4px; }
.pwa-btn { background: var(--surface); border-radius: var(--r); min-height: 36px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--info); font-weight: 600; font-size: 13.5px; box-shadow: 0 1px 1px rgba(15,23,42,.08); }
.pwa-chat { background: var(--surface-3); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 280px; max-height: 60vh; overflow-y: auto; }
.pwa-chat-lg { min-height: 50vh; margin: -16px -20px; }
.pwa-msg { max-width: 85%; padding: 8px 12px; border-radius: var(--r); font-size: 14px; line-height: 1.4; background: var(--surface); align-self: flex-start; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(15,23,42,.08); }
.pwa-msg.me { align-self: flex-end; background: var(--brand-50); }
.pwa-msg small { display: block; font-size: 11px; margin-top: 4px; }
.pwa-opts { display: grid; gap: 4px; margin-top: 8px; }
.pwa-opt { min-height: 36px; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--r); color: var(--info); font-weight: 600; font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; cursor: pointer; }
.pwa-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.sheet-foot .pwa-input { padding: 0; border: 0; }
.pwa-input .input { flex: 1; min-width: 0; }
.pwa-input .btn { flex: none; }
.adm-sim { display: flex; flex-direction: column; overflow: hidden; }
.adm-sim .pwa-chat { flex: 1; }

/* journeys */
.adm-jrow { flex-wrap: wrap; }
.adm-jrow .grow { min-width: 0; flex: 1 1 200px; }
.adm-jsel { flex: 1 1 100%; }
@media (min-width: 760px) { .adm-jsel { flex: 0 0 260px; } }
.adm-jon { flex: none; display: flex; align-items: center; }

/* campaigns */
.adm-camp { align-items: flex-start; flex-wrap: wrap; }
.adm-camp .grow { flex: 1 1 240px; min-width: 0; }
.adm-cstats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.adm-cstats b { color: var(--text); }

/* reports */
.adm-range { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.adm-range .chip-row { flex: 1 1 100%; }
@media (min-width: 900px) { .adm-range .chip-row { flex: 0 1 auto; } }
.adm-range input[type=date] { width: auto; flex: 1 1 140px; min-width: 0; }
.adm-range > .row { flex: 1 1 100%; }
@media (min-width: 900px) { .adm-range > .row { flex: 0 1 auto; } }
.adm-co { display: flex; align-items: center; gap: 12px; }
.adm-wide { display: none; }
@media (min-width: 760px) { .adm-wide { display: block; } .adm-narrow { display: none; } }
.bars .bar-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .bars .bar-row { grid-template-columns: 1fr auto; } .bars .bar-row .track { grid-column: 1 / -1; grid-row: 2; } }

/* team */
.adm-roles { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (min-width: 560px) { .adm-roles { grid-template-columns: repeat(3, 1fr); } }
.adm-role { display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.adm-role input { position: absolute; opacity: 0; pointer-events: none; }
.adm-role small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.adm-role.on { border-color: var(--brand); background: var(--brand-50); }
.adm-role.dis { cursor: default; opacity: .7; }
.adm-areas { display: grid; gap: 8px 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .adm-areas { grid-template-columns: 1fr 1fr; } }
.adm-area { align-items: flex-start; }
.adm-area span { display: grid; gap: 0; }
.adm-area small { font-size: 12px; }
.adm-area input:disabled + span { opacity: .8; }
.adm-matrix td, .adm-matrix th { vertical-align: middle; }
.adm-mg td { background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.adm-yes { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r); background: var(--ok-bg); color: var(--ok); }
@media (max-width: 759px) { .kpis-5 { grid-template-columns: repeat(3, 1fr); gap: 8px; } .kpis-5 .kpi { padding: 8px 12px; } .kpis-5 .kpi b { font-size: 18px; } .kpis-5 .kpi span { font-size: 12px; } }
.adm-wrap .title, .adm-wrap .sub { white-space: normal; overflow: visible; text-overflow: clip; }
.adm-wrap .list-item { align-items: flex-start; }
.adm-vars .adm-var { padding: 8px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.sheet-foot .pwa-input { flex: 1; } .sheet-foot .pwa-input .btn { flex: none; }
.adm-step.bad { background: var(--danger-bg); color: var(--danger); }
.adm-spark { display: flex; align-items: flex-end; gap: 2px; height: 80px; margin: 12px 0 4px; }
.adm-spark i { flex: 1; min-width: 2px; background: var(--c); border-radius: 2px 2px 0 0; opacity: .85; }
.adm-log { font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, monospace; }
.adm-ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.adm-gitem { border-top: 1px solid var(--border); }
.adm-gitem summary { padding: 12px 16px; font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.adm-gitem ul { margin: 0; padding: 0 16px 12px 36px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.adm-gitem code, .adm-ol code { font-size: 12.5px; background: var(--surface-2); padding: 1px 4px; border-radius: 4px; overflow-wrap: anywhere; }

/* Question library (admin): class / subject chips with counts, filters, paged list. Phone first. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.qlib { min-width: 0; max-width: 100%; } .qlib > * { min-width: 0; max-width: 100%; }
.qlib .chip-row:empty { display: none; }
.qlib-health { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qlib-health > :first-child { grid-column: 1 / -1; }
.qlib-tile { text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); display: flex; flex-direction: column; gap: 4px; min-height: 40px; }
.qlib-tile b { margin: 0; font-size: 20px; }
.qlib-tile small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qlib-tile:hover { border-color: var(--brand); }
.qlib-tile.active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.qlib-tile.tone-warn b { color: var(--warn); } .qlib-tile.tone-danger b { color: var(--danger); } .qlib-tile.tone-ok b { color: var(--ok); } .qlib-tile.tone-muted b { color: var(--text-2); }
@media (min-width: 900px) { .qlib-health { grid-template-columns: repeat(5, minmax(0, 1fr)); } .qlib-health > :first-child { grid-column: auto; } .qlib-tile { padding: 12px 16px; } .qlib-tile b { font-size: 22px; } }
.qlib-find { display: flex; gap: 8px; align-items: stretch; }
.qlib-find .search { flex: 1; min-width: 0; }
.qlib-find .search .input { width: 100%; }
.qlib-ftoggle { flex: none; }
.qlib-ftoggle .count:empty { display: none; }
.qlib-filters { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qlib-filters.open { display: grid; }
.qlib-filters .input { width: 100%; min-width: 0; }
@media (min-width: 900px) { .qlib-ftoggle { display: none; } .qlib-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.qlib-break { padding: 0; }
.qlib-break > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; }
.qlib-break > summary::-webkit-details-marker { display: none; }
.qlib-break > summary::after { content: '▾'; margin-left: auto; color: var(--muted); }
.qlib-break[open] > summary::after { content: '▴'; }
.qlib-break-grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 4px 12px 16px; border-top: 1px solid var(--border); }
@media (min-width: 900px) { .qlib-break-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 12px 16px 16px; } }
.qlib-bars { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qlib-bars h3 { margin: 8px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.qlib-bars .bar-row { grid-template-columns: minmax(72px, 140px) minmax(0, 1fr) auto; gap: 8px; font-size: 13px; }
.qlib-bars .bar-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qlib-bar { gap: 12px; min-height: 40px; }
.qlib-all { padding: 0; gap: 8px; font-size: 14px; }
.qlib-q { align-items: flex-start; gap: 12px; }
.qlib-q.is-hidden .qlib-text, .qlib-q.is-hidden .qlib-ops { opacity: .6; }
.qlib-q.is-picked { background: var(--info-bg); }
.qlib-pick { display: flex; align-items: center; justify-content: center; width: 24px; min-height: 24px; flex: none; cursor: pointer; }
.qlib-pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.qlib-q .grow { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.qlib-top { display: flex; flex-wrap: wrap; gap: 4px; }
.qlib-top .badge { border-radius: var(--r); display: inline-flex; align-items: center; gap: 4px; }
.qlib-text { line-height: 1.5; overflow-wrap: anywhere; }
.qlib-ops { margin: 0; padding-left: 24px; display: grid; gap: 4px; list-style: lower-alpha; color: var(--text-2); }
.qlib-ops li { overflow-wrap: anywhere; }
.qlib-ops li.ok { color: var(--ok); font-weight: 600; }
.qlib-ops li svg { display: inline-block; vertical-align: -2px; margin-left: 4px; }
.qlib-match { margin: 0; }
.qlib-ans b { color: var(--ok); overflow-wrap: anywhere; }
.qlib-sol summary { cursor: pointer; color: var(--brand); font-weight: 600; min-height: 24px; }
.qlib-sol > div { margin-top: 4px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--r); line-height: 1.5; overflow-wrap: anywhere; }
.qlib-meta { display: flex; flex-wrap: wrap; gap: 4px 0; }
.qlib-meta span:not(:last-child)::after { content: '·'; margin: 0 6px; }
.qlib-q .rv-passage { margin: 0; }
.qlib-acts { flex: none; display: flex; flex-direction: column; gap: 4px; }
.qlib-pager { justify-content: space-between; gap: 8px; }
.qlib-jump { gap: 8px; }
.qlib-jump .input { width: 72px; text-align: center; }
.qlib-bulk { position: sticky; bottom: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--brand); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.qlib-bulk[hidden] { display: none; }
@media (max-width: 899px) { .qlib-bulk { bottom: calc(var(--nav-h) + var(--safe-b) + 8px); } }
.qlib-bulk-n { font-size: 14px; }
.qlib-bulk .icon-btn { margin-left: auto; }
.qlib-bulk-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; order: 3; width: 100%; }
@media (min-width: 900px) { .qlib-bulk { flex-wrap: nowrap; padding: 8px 16px; } .qlib-bulk-acts { display: flex; order: 0; width: auto; } .qlib-bulk .icon-btn { margin-left: 0; } .qlib-bulk-n { margin-right: auto; } }
/* Edit, re-tag and add sheets */
.qlib-h { margin: 0; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.qlib-step { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--r); background: var(--brand); color: #fff; font-size: 12px; }
.qlib-edit > section + section, .qlib-import > section + section { padding-top: 16px; border-top: 1px solid var(--border); }
.qlib-oped { display: flex; flex-direction: column; gap: 8px; }
.qlib-oprow { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.qlib-oprow > input[type=radio], .qlib-oprow > input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ok); }
.qlib-oprow .input { flex: 1; min-width: 0; }
.qlib-addop { align-self: flex-start; margin-top: 8px; }
.qlib-howto summary { cursor: pointer; color: var(--brand); font-weight: 600; display: flex; align-items: center; gap: 6px; min-height: 32px; }
.qlib-howto ul { margin: 8px 0 0; padding: 8px 12px 8px 28px; background: var(--surface-2); border-radius: var(--r); display: grid; gap: 4px; }
.qlib-prev { padding: 12px; background: var(--surface-2); border-radius: var(--r); overflow-wrap: anywhere; }
.qlib-prev ol { margin: 8px 0 0; padding-left: 24px; display: grid; gap: 4px; color: var(--text); }
.qlib-prev-sum { display: flex; flex-wrap: wrap; gap: 4px; }

/* Divider inside cards and forms */
hr.hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; width: 100%; align-self: stretch; }

/* School bus: live trip on the Transport screen */
.tr-live { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--ok-bg, #e8f7ee); }
.tr-live b { display: block; color: var(--ok); }
.tr-live.stale { background: var(--warn-bg, #fff4e0); } .tr-live.stale b { color: var(--warn); }
.tr-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); flex: none; }
.tr-live.stale .tr-dot { background: var(--warn); }
.tr-n.done { background: var(--ok); }
.tr-card .badge { align-self: flex-start; justify-self: start; width: auto; }
.tr-head { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 600px) { .tr-head h3 { flex: 1 1 100%; } }

/* ---------- Language picker on public pages (core/sitelang.js) ---------- */
.lang-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; height: var(--ctl); box-sizing: border-box; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; flex: none; max-width: 100%; }
.lang-pick svg { flex: none; color: var(--muted); }
.lang-pick select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: inherit; font: inherit; padding: 0 16px 0 0; margin: 0; height: 100%; cursor: pointer; outline: none; max-width: 160px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0 center; }
.lang-pick:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.lang-pick.sm { height: 34px; padding: 0 8px; }
.lang-pick.ghost { border-color: transparent; background: transparent; }
.lang-bar { display: flex; justify-content: flex-end; padding: 8px 16px 0; max-width: 640px; margin: 0 auto; box-sizing: border-box; width: 100%; }

/* ---------- Right-to-left (Arabic): flex and grid flip by themselves; these fix the few one-sided rules ---------- */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .lang-pick select { padding: 0 0 0 16px; background-position: left 0 center; }
[dir="rtl"] select.input { padding-right: 12px; padding-left: 38px; background-position: left 12px center; }
[dir="rtl"] .search .ic { left: auto; right: 12px; }
[dir="rtl"] .search .input { padding-left: 12px; padding-right: 40px; }
[dir="rtl"] .lang-opt, [dir="rtl"] .list-item, [dir="rtl"] .opt-card { text-align: right; }
[dir="rtl"] svg[data-flip] { transform: scaleX(-1); }
/* Direction icons point the other way in right-to-left. `scale` stacks with any rotate() a component already sets. */
[dir="rtl"] svg[data-i="chevronRight"], [dir="rtl"] svg[data-i="chevronLeft"], [dir="rtl"] svg[data-i="arrowLeft"], [dir="rtl"] svg[data-i="arrowRight"] { scale: -1 1; }
[dir="rtl"] .num, [dir="rtl"] .money, [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="email"], [dir="rtl"] input[type="number"], [dir="rtl"] .phone-box { direction: ltr; }
[dir="rtl"] .num, [dir="rtl"] .money { unicode-bidi: isolate; }
@media print { .lang-bar, .lang-pick { display: none !important; } }
[dir="rtl"] a[href^="tel:"], [dir="rtl"] a[href^="mailto:"], [dir="rtl"] .ltr { direction: ltr; unicode-bidi: isolate; }
/* Settings → Language on this device */
.st-lang { width: 100%; border: 1px solid var(--border); background: var(--surface); font: inherit; text-align: start; cursor: pointer; }
.st-lang > .ic:last-child, .st-lang > svg:last-child { color: var(--muted); flex: none; }

/* ---------- Billu chat assistant (core/billu.js) ---------- */
.nav-btn[hidden], .billu-fab[hidden] { display: none !important; }
.billu-fab { position: fixed; z-index: 45; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); height: 44px; min-width: 44px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r); background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 14px; box-shadow: var(--shadow-2); cursor: pointer;
  will-change: transform; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, filter .25s ease; }
/* Hover: the whole button lifts a little and the shadow grows. Only transform / shadow change, so it stays smooth (no width animation, no tilt). */
.billu-fab span { display: none; white-space: nowrap; }
.billu-fab .m-face { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.billu-fab:hover, .billu-fab:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(15,23,42,.35), var(--shadow-2); filter: brightness(1.06); }
.billu-fab:hover .m-face, .billu-fab:focus-visible .m-face { transform: scale(1.06); }
.billu-fab:active { transform: translateY(0) scale(.98); transition-duration: .08s; }
@media (min-width: 900px) {
  .billu-fab { bottom: 16px; right: 16px; padding: 0 14px 0 8px; }
  .billu-fab span { display: inline-block; }
}
@media (prefers-reduced-motion: reduce) { .billu-fab, .billu-fab .m-face { transition: none; } .billu-fab:hover, .billu-fab:hover .m-face { transform: none; } }
/* Leave room under the last row so the button never sits on top of it */
.app:has(> .billu-fab:not([hidden])) main#view { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 64px); }
@media (min-width: 900px) { .app:has(> .billu-fab:not([hidden])) main#view { padding-bottom: 72px; } }
@media print { .billu-fab { display: none !important; } }
/* Chat screens have their own message box at the bottom right: the floating button would cover Send. Billu stays in the side menu. */
.app:has(.wa-inbox, .hp-chat) > .billu-fab { display: none !important; }
/* The chat is tall on a phone (not a small bottom sheet) and a right-hand drawer on desktop. */
.billu-wrap .sheet { height: calc(100% - 24px - var(--safe-t)); }
@media (min-width: 700px) { .billu-wrap.sheet-drawer .sheet { max-width: 440px; height: 100%; } }
.billu-wrap .sheet-body { padding: 0; display: flex; flex-direction: column; }
.billu { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.billu-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.billu-hello { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 8px; }
.billu-hello b { font-size: 17px; }
.billu-hello p { max-width: 320px; margin: 0; }
.billu-hello .billu-chips { justify-content: center; margin-top: 8px; }
.billu-chips[hidden] { display: none; }
.billu-ava { flex: none; width: 32px; height: 32px; border-radius: var(--r); display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.billu-ava.lg { width: 56px; height: 56px; }
.billu-msg { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
.billu-msg .grow { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.billu-msg .bub { padding: 8px 12px; border-radius: var(--r); background: var(--surface-2); color: var(--text); line-height: 1.5; overflow-wrap: anywhere; font-size: 14.5px; }
.billu-msg.me { justify-content: flex-end; }
.billu-msg.me .bub { background: var(--brand); color: var(--brand-ink); max-width: 85%; }
.billu-msg.bot .grow { max-width: calc(100% - 40px); }
/* Answers are plain text beside the face: answer, actions and the meta line share one left edge (errors keep their box) */
.billu-msg.bot:not(.err) .bub { background: none; padding: 5px 0 0; }
.billu-msg.err .bub { background: var(--danger-bg); color: var(--danger); }
.billu-msg .bub .bl { display: block; padding-left: 12px; position: relative; }
.billu-msg .bub .bl:not(.num)::before { content: ''; position: absolute; left: 0; top: .7em; width: 4px; height: 4px; border-radius: 2px; background: currentColor; opacity: .6; }
.billu-msg .bub .bl.num { padding-left: 0; }
.billu-note { color: var(--muted); font-size: 12px; }
.billu-act { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); flex-wrap: wrap; }
.billu-act .ic-tile { flex: none; width: 36px; height: 36px; border-radius: var(--r); display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.billu-act .grow { flex: 1 1 140px; min-width: 0; gap: 4px; }
.billu-act b { font-size: 14px; overflow-wrap: anywhere; }
.billu-act small { color: var(--text-2); font-size: 12.5px; overflow-wrap: anywhere; }
.billu-act .row { gap: 8px; margin-left: auto; }
.billu-act.done, .billu-act.no { background: var(--surface-2); }
.billu-act.no { opacity: .7; }
.bub.typing { display: inline-flex; gap: 4px; align-items: center; height: 36px; }
.bub.typing i { width: 6px; height: 6px; border-radius: 3px; background: var(--muted); animation: billuDot 1s infinite ease-in-out; }
.bub.typing i:nth-child(2) { animation-delay: .15s; } .bub.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes billuDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.billu-wrap .sheet-foot { padding: 12px 16px; display: block; }
.billu-compose { display: flex; flex-direction: column; gap: 8px; }
.billu-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.billu-chips.compact { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.billu-chips.compact::-webkit-scrollbar { display: none; }
.billu-chips .chip { min-height: 32px; font-size: 13px; }
.billu-row { display: flex; gap: 8px; align-items: center; }
.billu-row .input { flex: 1; min-width: 0; }
.billu-compose .billu-row .btn, .billu-compose .billu-row .icon-btn { flex: none; width: var(--ctl); min-width: var(--ctl); height: var(--ctl); min-height: var(--ctl); padding: 0; display: inline-grid; place-items: center; }
.billu-compose .billu-row .input { height: var(--ctl); min-height: var(--ctl); }
.billu-mic { border: 1px solid var(--border); background: var(--surface); }
.billu-mic.on { background: var(--danger); border-color: var(--danger); color: #fff; animation: billuPulse 1.2s infinite; }
@keyframes billuPulse { 0%, 100% { box-shadow: 0 0 0 0 var(--danger-bg); } 50% { box-shadow: 0 0 0 6px var(--danger-bg); } }
@media (prefers-reduced-motion: reduce) { .bub.typing i, .billu-mic.on { animation: none; } }
/* Assistant skills ("<name> for you"), feedback link, emoji avatar */
.billu-emo { line-height: 1; }
.billu-skills { display: grid; grid-template-columns: 1fr; gap: 8px; width: 100%; text-align: left; }
.billu-hello .billu-skills { margin-top: 8px; }
@media (min-width: 420px) { .billu-hello .billu-skills { grid-template-columns: 1fr 1fr; } }
.billu-skill { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.billu-skill:hover { border-color: var(--brand); }
.billu-skill:active { transform: translateY(1px); }
.billu-skill .ic-tile { flex: none; width: 36px; height: 36px; border-radius: var(--r); display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.billu-skill .grow { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.billu-skill b { font-size: 14px; }
.billu-skill small { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.billu-skill.locked { background: var(--surface-2); }
.billu-skill.locked .ic-tile { background: var(--surface-3); color: var(--muted); }
.billu-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: -4px; }
.billu-fb { border: 0; background: none; padding: 0; min-height: 24px; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.billu-fb:hover { color: var(--text-2); }
.billu-page { display: flex; flex-direction: column; gap: 16px; }
.billu-load { display: grid; place-items: center; padding: 24px; }
.billu-intro { display: flex; gap: 12px; align-items: center; padding: 16px; }
.billu-intro h1 { font-size: 18px; margin: 0 0 4px; }
.billu-intro p { margin: 0; }
.billu-ask { display: flex; gap: 8px; }
.billu-ask .input { flex: 1; min-width: 0; }
.billu-ask .btn { flex: none; width: var(--ctl); min-width: var(--ctl); height: var(--ctl); padding: 0; display: inline-grid; place-items: center; }
@media (min-width: 700px) { .billu-skills.grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .billu-skills.grid { grid-template-columns: repeat(3, 1fr); } }
.billu-chips.wrap { flex-wrap: wrap; }

/* Super admin → Assistant */
.ab-page .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .ab-page .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ab-bar { gap: 8px; align-items: center; }
.ab-bar .search { min-width: 200px; flex: 1 1 220px; }
.ab-bar > select.input { flex: 1 1 140px; width: auto; }
@media (max-width: 600px) { .ab-bar > * { flex: 1 1 calc(50% - 4px); justify-content: center; } .ab-bar .search { flex-basis: 100%; } .ab-bar > .grow:empty { display: none; } }
.ab-k, .ab-u, .ab-skill { gap: 12px; align-items: flex-start; text-align: start; }
.ab-ic { flex: none; width: 32px; height: 32px; border-radius: var(--r); display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.ab-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.ab-meta span + span::before { content: '·'; margin-inline-end: 8px; opacity: .6; }
.ab-acts { gap: 8px; flex: none; }
.ab-u { flex-wrap: wrap; }
@media (max-width: 600px) { .ab-u .ab-acts { width: 100%; justify-content: flex-end; } }
.ab-pager { gap: 8px; justify-content: space-between; align-items: center; }
.ab-save { justify-content: flex-end; }
.ab-plans { gap: 4px 12px; margin-top: 8px; }
.ab-avas { gap: 8px; }
.ab-ava { width: var(--ctl); height: var(--ctl); border-radius: var(--r); display: inline-grid; place-items: center; border: 1px solid var(--border); cursor: pointer; color: var(--text-2); }
.ab-ava.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.ab-ava:has(.ab-emoji) { width: auto; padding: 0 4px; }
.ab-emoji { width: 64px; text-align: center; border: 0; background: transparent; }
.ab-name { gap: 8px; }
.ab-nl { width: 72px; flex: none; }
.ab-pv { gap: 12px; align-items: center; cursor: pointer; }
.ab-pv:hover { background: var(--surface-2); }
.ab-pv.off .title, .ab-pv.off .sub { opacity: .6; }
.ab-pn { flex: none; width: 28px; height: 28px; border-radius: var(--r); display: inline-grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: 13px; }
.ab-pv.off .ab-pn { background: var(--surface-2); color: var(--muted); }
.ab-pbits { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; color: var(--text-2); }
.ab-pbits > span { display: inline-flex; align-items: center; gap: 4px; }
.ab-mv { display: flex; flex: none; }
.ab-chev { flex: none; color: var(--muted); }
.ab-pl-head { gap: 8px; align-items: center; }
.ab-route-row { gap: 8px 12px; align-items: center; }
.ab-route-row > .grow, .ab-pl-head > .grow { flex: 1 1 240px; min-width: 0; }
.ab-how summary, .ab-more summary { cursor: pointer; text-align: start; width: fit-content; color: var(--brand); font-weight: 600; }
.ab-how { align-self: flex-start; }
.ab-keyat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ab-how > div { margin-top: 8px; }
.ab-more > .stack { margin-top: 12px; }
.ab-kinds .list-item { cursor: pointer; }
.ab-sk { cursor: pointer; }
.ab-sk:hover { background: var(--surface-2); }
.ab-sk.off .title, .ab-sk.off .sub, .ab-sk.off .ab-ic { opacity: .55; }
.ab-sk-fil { padding: 12px 16px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
@media (min-width: 900px) {
  .ab-sk-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border); }
  .ab-sk-list > .list-item { border-bottom: 1px solid var(--border); }
  .ab-sk-list > .list-item:nth-child(odd) { border-inline-end: 1px solid var(--border); }
  .ab-sk-list > .list-item:last-child:nth-child(odd), .ab-sk-list > .list-item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .ab-sk-list > .list-item:last-child { border-bottom: 0; }
}
.ab-sk-hero { display: flex; gap: 12px; align-items: center; }
.ab-sk-pl { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 12px; }
.ab-sk-plans { gap: 6px; }
.ab-sk-info { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--r); background: var(--surface-2); }
.ab-sk-info .muted { display: inline-block; min-width: 64px; }
@media (max-width: 600px) { .ab-route-row > .seg { width: 100%; } .ab-route-row > .seg > button { flex: 1; } .ab-pv { gap: 10px; padding-inline: 12px; } .ab-mv { flex-direction: column; } .ab-mv .icon-btn { width: 32px; height: 28px; min-height: 28px; } }
.ab-ph { gap: 8px; align-items: center; }
.ab-up { transform: rotate(180deg); }
.ab-prices { gap: 8px; }
.ab-prices .input { min-width: 0; }
.ab-file { align-self: flex-start; cursor: pointer; }

/* Dashboard: assistant strip — phone: ask box, then one scrolling chip row; desktop (900px+): everything on one row */
.bh { padding: 8px; display: grid; gap: 8px; background: linear-gradient(90deg, var(--brand-50), var(--surface) 60%); border-color: var(--brand-100); }
.bh-who { display: none; align-items: center; gap: 8px; min-width: 0; }
.bh-face { flex: none; width: 28px; height: 28px; }
.billu-ava.bh-face { width: 28px; height: 28px; }
.bh-ask { align-items: center; }
.bh-txt { display: grid; min-width: 0; line-height: 1.3; }
.bh-txt b, .bh-txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bh-txt b { font-size: 14px; }
.bh-txt span { font-size: 12.5px; color: var(--muted); }
.bh-txt span b { font-size: inherit; color: var(--text); }
.bh-txt span b.up { color: var(--ok); }
.bh-sugg { display: flex; gap: 8px; min-width: 0; }
.bh-chips { flex: 1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.bh-chips::-webkit-scrollbar { display: none; }
.bh-sugg .chip { min-height: 32px; padding: 0 12px; white-space: nowrap; }
.bh-all { color: var(--brand); }
@media (min-width: 900px) {
  .bh { grid-template-columns: minmax(180px, 260px) minmax(240px, 1fr) minmax(0, 1.3fr); align-items: center; gap: 12px; padding: 8px 12px; }
  .bh-who { display: flex; }
  .bh-face { width: 32px; height: 32px; }
  .billu-ava.bh-face { width: 32px; height: 32px; }
  .bh .bh-face-sm { display: none; }
  .bh-sugg .chip { min-height: var(--ctl); }
}

/* Mascot (core/mascot.js) — colours from the --m-* tokens */
.dp-mascot { display: block; overflow: visible; flex: none; }
.dp-mascot .m-paper { fill: var(--m-paper); stroke: var(--m-ink); stroke-width: 3; stroke-linejoin: round; }
.dp-mascot .m-top { fill: var(--brand); }
.dp-mascot .m-line { fill: none; stroke: var(--m-limb); stroke-width: 4; stroke-linecap: round; }
.dp-mascot .m-hand, .dp-mascot .m-foot, .dp-mascot .m-dots { fill: var(--m-limb); }
.dp-mascot .m-eye, .dp-mascot .m-mouth { fill: var(--m-ink); }
.dp-mascot .m-glint { fill: var(--m-paper); }
.dp-mascot .m-cheek { fill: var(--m-cheek); opacity: .55; }
.dp-mascot .m-smile { fill: none; stroke: var(--m-ink); stroke-width: 3; stroke-linecap: round; }
.dp-mascot .m-rule { stroke: var(--m-rule); stroke-width: 3; stroke-linecap: round; }
.dp-mascot .m-rule.dash { stroke-dasharray: 3 4; }
.dp-mascot .m-total { stroke: var(--brand); stroke-width: 4; stroke-linecap: round; }
.dp-mascot .m-shadow { fill: var(--text); opacity: .14; }
.dp-mascot .m-eyes { transform-box: fill-box; transform-origin: center; animation: dpm-blink 4.5s infinite; }
.dp-mascot .m-bob { animation: dpm-bob 3s ease-in-out infinite; }
.dp-mascot .m-wave { transform-box: view-box; transform-origin: 96px 66px; animation: dpm-wave 1.6s ease-in-out infinite; }
.dp-mascot.m-cheer .m-wave { animation-duration: 1.2s; }
.dp-mascot.m-cheer .m-arm-l { transform-box: view-box; transform-origin: 24px 66px; animation: dpm-wave-l 1.2s ease-in-out infinite; }
.dp-mascot .m-dots circle { animation: dpm-dot 1.8s ease-in-out infinite; }
.dp-mascot .m-dots circle:nth-child(2) { animation-delay: .3s; }
.dp-mascot .m-dots circle:nth-child(3) { animation-delay: .6s; }
.dp-mascot.m-face .m-eyes { animation-duration: 5.5s; }
@keyframes dpm-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes dpm-bob { 50% { transform: translateY(-4px); } }
@keyframes dpm-wave { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(18deg); } }
@keyframes dpm-wave-l { 0%, 100% { transform: rotate(8deg); } 50% { transform: rotate(-18deg); } }
@keyframes dpm-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dp-mascot * { animation: none !important; } }
/* As the assistant's picture: only the head, cropped, never the full body */
.dp-mascot.m-face { overflow: hidden; }
.billu-ava:has(.m-face) { background: var(--brand-50); padding: 4px; overflow: hidden; }
.billu-ava .m-face { width: 100%; height: 100%; }
.billu-fab .m-face { width: 28px; height: 28px; }
.dp-mascot.billu-hero { width: 72px; height: auto; }
.billu-intro .dp-mascot.billu-hero { width: 64px; }
.nav-btn .m-face { width: 20px; height: 20px; }
.sheet-ic .m-face { width: 26px; height: 26px; }

/* ===== Settings → Website: website builder (views/sitebuilder.js) ===== */
.sb { display: flex; flex-direction: column; gap: 16px; padding-bottom: 72px; }
.sb-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.sb-tabs { overflow-x: auto; max-width: 100%; flex-wrap: nowrap; scrollbar-width: none; }
.sb-tabs::-webkit-scrollbar { display: none; }
.sb-tabs button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sb-links { display: flex; gap: 8px; }
.sb-grid { display: grid; gap: 16px; align-items: start; }
.sb-main { min-width: 0; }
.sb-pad { margin: 0; padding: 0 16px 12px; }
@media (min-width: 1100px) { .sb-grid { grid-template-columns: minmax(0, 1fr) 400px; } .sb-grid.no-prev { grid-template-columns: minmax(0, 1fr); } .sb-grid.no-prev .sb-prev { display: none; } }
.sb-prev { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 8px; }
.sb-prev-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-frame-wrap { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--surface-3); height: min(72vh, 760px); position: relative; }
.sb-frame-wrap .sb-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.sb-frame-wrap[data-dev-wrap="desk"] .sb-frame { width: 1280px; height: 250%; transform: scale(.3125); transform-origin: 0 0; }
.sb-frame-sheet { height: 72vh; }
.sb-bar { position: fixed; z-index: 60; inset-inline: 12px; bottom: calc(12px + var(--nav-h, 0px) + var(--safe-b)); max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-2); }
.sb-bar > span { flex: 1; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; }
@media (min-width: 900px) { .sb-bar { bottom: 16px; } }
.sb-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.sb-tpl { display: flex; flex-direction: column; gap: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); text-align: start; cursor: pointer; overflow: hidden; }
.sb-tpl:hover { border-color: var(--brand); }
.sb-tpl.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.sb-tpl.locked { opacity: .7; }
.sb-tpl-tx { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.sb-tpl-tx b { font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sb-tpl-tx small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.sb-tpl-for { font-size: 12px !important; }
/* little drawings of each template: header, hero, rows, cards */
.sb-thumb { display: grid; grid-template-rows: 10px 64px 8px 8px 28px; gap: 6px; padding: 10px; height: 152px; box-sizing: border-box; background: var(--t-bg, #fff); border-bottom: 1px solid var(--border); }
.sb-thumb i { display: block; border-radius: 3px; background: var(--t-line, #e5e7eb); }
.sb-thumb .t-nav { width: 50%; }
.sb-thumb .t-hero { display: flex; align-items: flex-end; padding: 6px 8px; background: var(--t-hero, #cbd5e1); color: var(--t-hero-ink, #fff); }
.sb-thumb .t-hero b { font: var(--t-font, 700 20px/1 system-ui); }
.sb-thumb .t-row { width: 80%; } .sb-thumb .t-row.s { width: 55%; }
.sb-thumb .t-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: none; }
.sb-thumb .t-cards u { background: var(--t-card, #e2e8f0); border-radius: 3px; }
.sbt-classic { --t-bg: #f4f6fa; --t-hero: linear-gradient(#cbd5e1 55%, #fff 55%); --t-hero-ink: #0f172a; --t-font: 700 18px/1 system-ui; }
.sbt-bistro { --t-bg: #fbf7f0; --t-line: #e7dccb; --t-hero: linear-gradient(180deg, #8c6b52, #2a211b); --t-font: italic 600 22px/1 Fraunces, Georgia, serif; --t-card: #ede3d4; }
.sbt-noir { --t-bg: #0e0d0c; --t-line: #2c2925; --t-hero: linear-gradient(180deg, #3b342d, #0e0d0c); --t-hero-ink: #f2ede5; --t-font: 500 24px/1 "Cormorant Garamond", Didot, Georgia, serif; --t-card: #221f1c; }
.sbt-market { --t-bg: #fff; --t-line: #e6ebe8; --t-hero: linear-gradient(90deg, #eef4f0 55%, #b9d3c3 55%); --t-hero-ink: #111a15; --t-font: 700 18px/1 "DM Sans", system-ui; --t-card: #eef2f0; }
.sbt-studio { --t-bg: #fafafa; --t-line: #e2e2e2; --t-hero: var(--brand); --t-font: 800 20px/1 Archivo, "Arial Black", system-ui; --t-card: #0b0b0b; }
.sbt-care { --t-bg: #f6f8fb; --t-line: #dfe5ee; --t-hero: linear-gradient(180deg, #e5ecfa, #f6f8fb); --t-hero-ink: #13233a; --t-font: 600 18px/1 "Source Serif 4", Georgia, serif; --t-card: #fff; }
.sbt-haven { --t-bg: #fdfcfa; --t-line: #e9e3da; --t-hero: linear-gradient(180deg, #a7b8bf, #4a5a60); --t-font: 500 22px/1 "Playfair Display", Georgia, serif; --t-card: #ece7df; }
.sbt-care .t-hero { justify-content: center; } .sbt-studio .t-hero b { text-transform: uppercase; }
.sb-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 16px; }
.sb-meter > div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-2); }
.sb-meter b { font-variant-numeric: tabular-nums; color: var(--text); }
.sb-meter i { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--brand) var(--p), var(--surface-3) var(--p)); }
.sb-meter.near i { background: linear-gradient(90deg, var(--warn) var(--p), var(--surface-3) var(--p)); }
.sb-meter.over i { background: var(--danger); } .sb-meter.over b { color: var(--danger); }
.sb-list { display: flex; flex-direction: column; }
.sb-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.sb-row.off .sb-row-tx, .sb-row.off .oc-ic { opacity: .55; }
.sb-row-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border: 0; background: none; color: var(--text); text-align: start; cursor: pointer; font: inherit; }
.sb-row-tx b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-row-tx small { font-size: 13px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-row-tx .badge { margin-top: 4px; }
.sb-row-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.sb-row-acts [data-up] svg { transform: rotate(180deg); }
.sb-edit .grid-2 { gap: 12px; }
.sb-img { display: flex; gap: 12px; align-items: center; }
.sb-img > img, .sb-img-ph { width: 96px; height: 72px; border-radius: var(--r); object-fit: cover; flex: none; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.sb-img-acts { display: flex; flex-wrap: wrap; gap: 4px; }
.sb-vid { width: 100%; max-height: 240px; border-radius: var(--r); background: #000; }
.sb-items { display: flex; flex-direction: column; gap: 12px; }
.sb-item { border: 1px solid var(--border); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.sb-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-item-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.sb-item-head span { display: flex; gap: 4px; flex: none; }
.sb-item-head [data-iup] svg { transform: rotate(180deg); }
.sb-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
.sb-gal-it { display: flex; flex-direction: column; gap: 6px; }
.sb-gal-it img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); }
.sb-gal-it .input { height: 36px; font-size: 13px; }
.sb-gal-acts { display: flex; justify-content: space-between; }
.sb-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 320px; overflow-y: auto; padding: 4px; }
.sb-pick-it { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--r); font-size: 13px; cursor: pointer; min-height: 44px; }
.sb-pick-it:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.sb-pick-it img, .sb-pick-it > span:first-of-type:empty { width: 32px; height: 32px; border-radius: var(--r-sm); object-fit: cover; flex: none; background: var(--surface-3); }
.sb-pick-it > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-pick-img { max-height: 60vh; }
.sb-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sb-page { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); color: var(--text); text-decoration: none; }
.sb-page small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.sb-page.off { opacity: .6; pointer-events: none; border-style: dashed; }
.sb-legal-ta { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.55; min-height: 50vh; }
.sb-serp { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); font-family: Arial, sans-serif; }
.sb-serp small { color: var(--text-2); font-size: 12px; }
.sb-serp b { color: #1a0dab; font-size: 18px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-serp span { color: var(--text-2); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
:root[data-theme="dark"] .sb-serp b { color: #8ab4f8; }
.sb-done { display: grid; gap: 8px; }
.sb-done div { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.sb-done svg { color: var(--ok); flex: none; margin-top: 2px; }
.sb-bar[hidden] { display: none; }
@media (max-width: 599px) {
  .sb-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sb-thumb { height: 104px; grid-template-rows: 6px 40px 6px 6px 18px; gap: 4px; padding: 8px; }
  .sb-thumb .t-hero b { font-size: 15px !important; }
  .sb-tpl-tx { padding: 8px 10px 10px; }
  .sb-tpl-tx b { font-size: 14px; }
  .sb-tpl-tx small { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .sb-tpl-for { display: none !important; }
  .sb-bar > span svg { display: none; }
}
/* Super admin → Websites */
.sa-page { padding-bottom: 88px; }
.sa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.sa-plans { display: grid; gap: 12px; }
.sa-legal { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.55; min-height: 50vh; }
.radio-row { display: flex; gap: 10px; align-items: flex-start; min-height: var(--ctl); cursor: pointer; }
.radio-row input { margin-top: 3px; accent-color: var(--brand); }
.radio-row span { display: flex; flex-direction: column; }
.radio-row small { color: var(--muted); }
@media (min-width: 900px) { .sa-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sa-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .sa-plans .sa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Support session ended (app.js endSupport): shown instead of the business login when the tab can't close itself */
.support-ended { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.support-ended .card { width: 100%; max-width: 420px; }
.support-ended h1 { font-size: 20px; margin: 0; } .support-ended p { margin: 0; }
.support-ended .se-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r); background: var(--brand-50, #eef2fd); color: var(--brand); }

/* Maintenance banner (app.js maintenanceBar) */
.maint-bar { position: sticky; top: 0; z-index: 95; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 16px; background: var(--warn-bg, #fff4e5); color: var(--warn, #92400e); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); }
.maint-bar.on { background: #fde8e8; color: var(--danger); }
.maint-bar svg { flex: none; }

/* Settings → Website → Messages (contact form) */
.sb-msg { align-items: flex-start; }
.sb-msg.unread .title { font-weight: 700; }
.sb-msg-tx { margin: 8px 0; white-space: normal; overflow-wrap: anywhere; color: var(--text); font-size: 14px; line-height: 1.5; }
/* Super admin → Websites → Your own templates */
.sa-swatch { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1px solid; border-radius: var(--r); font-weight: 700; font-size: 15px; }
.sa-cols { display: grid; grid-template-columns: 1fr; gap: 8px; }
.sa-col { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; }
.sa-col input[type=color] { width: 40px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
@media (min-width: 600px) { .sa-cols { grid-template-columns: 1fr 1fr; } }
.sb-links [data-pv][hidden] { display: none; }

/* Super admin · business sheet: summary header, stats and tabs */
.bz { display: flex; flex-direction: column; gap: 14px; }
.bz-top { display: flex; align-items: center; gap: 12px; }
.bz-av { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--r); background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: 19px; }
.bz-top .grow { min-width: 0; display: grid; gap: 4px; }
.bz-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.bz-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bz-stats > div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); min-width: 0; }
.bz-stats b { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.bz-stats span { font-size: 12px; color: var(--muted); }
.bz-tabs { position: sticky; top: -1px; z-index: 2; display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); overflow-x: auto; scrollbar-width: none; }
.bz-tabs::-webkit-scrollbar { display: none; }
.bz-tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: calc(var(--r) - 2px); background: transparent; color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.bz-tabs button:hover { color: var(--text); }
.bz-tabs button[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-1); }
.bz-panel[hidden] { display: none !important; }
.bz-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); color: var(--text-2); font-size: 13px; line-height: 1.45; }
.bz-note svg { flex: none; margin-top: 1px; color: var(--muted); }
.bz-note.warn { background: var(--warn-bg, var(--surface-2)); }
.bz-sup { display: flex; flex-wrap: wrap; gap: 8px; }
.bz-sup select { flex: 1 1 200px; width: auto; }
.bz-uav { width: 32px; height: 32px; flex: none; font-size: 13px; }
.bz-use { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); font-size: 13.5px; }
.bz-use .gs-meter { grid-column: 1 / -1; }
.bz-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.bz-more { border: 1px solid var(--border); border-radius: var(--r); padding: 0 12px; }
.bz-more > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; flex-wrap: wrap; }
.bz-more > summary::-webkit-details-marker { display: none; }
.bz-more > summary svg { transition: transform .2s; color: var(--muted); }
.bz-more[open] > summary svg { transform: rotate(180deg); }
.bz-more[open] { padding-bottom: 12px; }
.bz-inline { display: flex; gap: 8px; align-items: stretch; max-width: 420px; }
.bz-inline > :first-child { flex: 1; min-width: 0; }
.bz-inline > .btn { flex: none; }
.bz-apps-bar { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--border); }
.bz-apps-bar select { flex: 1 1 200px; width: auto; }
.bz-addon { border-top: 1px solid var(--border); }
.bz-inv-end { display: grid; justify-items: end; gap: 3px; }
.bz-inv-end .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 599px) {
  .bz-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bz-tabs button { flex: 0 0 auto; }
  .bz-inline { max-width: none; }
}

/* Super admin · Businesses list: type chips, filters, rows, numbered pages */
.bl { display: flex; flex-direction: column; gap: 12px; }
.bl-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.bl-chips::-webkit-scrollbar { display: none; }
.bl-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.bl-chip small { color: var(--muted); font-weight: 600; }
.bl-chip:hover { border-color: var(--brand); color: var(--text); }
.bl-chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.bl-chip.on small { color: inherit; opacity: .8; }
.bl-bar { display: flex; gap: 8px; }
.bl-bar .search { flex: 1; min-width: 0; }
.bl-fbtn { display: none; flex: none; }
.bl-n { font-style: normal; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: var(--brand-ink); font-size: 11px; line-height: 18px; text-align: center; }
.bl-n:empty { display: none; }
.bl-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.bl-sel { display: grid; gap: 3px; min-width: 0; }
.bl-sel > span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.bl-sel select { width: 100%; }
.bl-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.bl-card { overflow: hidden; }
.bl-head, .bl-row { display: grid; grid-template-columns: 40px minmax(0, 2.2fr) minmax(0, 1.5fr) 64px minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr) 20px; gap: 12px; align-items: center; padding: 10px 16px; }
.bl-head { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); border-bottom: 1px solid var(--border); padding-top: 8px; padding-bottom: 8px; }
.bl-row { width: 100%; min-height: 68px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background .15s; }
.bl-row:last-child { border-bottom: 0; }
.bl-row:hover { background: var(--surface-2); }
.bl-row:hover .bl-go { color: var(--brand); transform: translateX(2px); }
.bl-av { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r); background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: 16px; }
.bl-row > span:not(.bl-av):not(.bl-go) { display: grid; gap: 2px; min-width: 0; }
.bl-row b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-row small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-row small em { font-style: normal; font-weight: 600; }
.bl-types { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.bl-type { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 11px; color: var(--text-2); white-space: nowrap; }
.bl-type svg { color: var(--muted); }
.bl-type.more { font-weight: 600; }
.bl-out b { font-variant-numeric: tabular-nums; }
.bl-plan .badge { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-seen small { display: none; }
.bl-go { color: var(--muted); display: grid; place-items: center; transition: transform .15s, color .15s; }
.bl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bl-pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bl-pg { min-width: 36px; height: 36px; padding: 0 8px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.bl-pg:hover:not(:disabled):not(.on) { border-color: var(--brand); color: var(--brand); }
.bl-pg.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.bl-pg:disabled { opacity: .4; cursor: default; }
.bl-gap { min-width: 20px; text-align: center; color: var(--muted); }
.bl-per { display: flex; align-items: center; gap: 8px; }
.bl-per select { width: auto; }
/* Activity figures over the list: tap one to filter */
.bl-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.bl-kpis:empty { display: none; }
.bl-kpi { display: grid; gap: 2px; align-content: start; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: inherit; font: inherit; text-align: start; cursor: pointer; transition: border-color .15s, background .15s; }
.bl-kpi:hover { border-color: var(--brand); }
.bl-kpi.on { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.bl-kpi > span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-kpi > span svg { flex: none; color: var(--brand); }
.bl-kpi b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.bl-kpi b i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); margin-inline-start: 4px; }
.bl-kpi small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-act b { font-variant-numeric: tabular-nums; }
.bl-on { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bl-onchip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 8px 0 12px; border: 1px solid var(--brand); border-radius: 99px; background: var(--brand-50); color: var(--brand); font: inherit; font-size: 12.5px; cursor: pointer; }
.bl-onchip b { font-weight: 700; }
.bl-onchip:hover { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 1199px) { .bl-kpis { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; scrollbar-width: none; } .bl-kpis::-webkit-scrollbar { display: none; } }
@media (max-width: 899px) {
  .bl-head { display: none; }
  .bl-row { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "av biz plan" "av owner seen" "av act act"; gap: 6px 12px; padding: 12px 14px; }
  .bl-act { grid-area: act; display: flex !important; align-items: baseline; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--border); }
  .bl-act b { font-size: 13px; } .bl-act small::before { content: '· '; }
  .bl-av { grid-area: av; align-self: start; }
  .bl-biz { grid-area: biz; } .bl-owner { grid-area: owner; } .bl-plan { grid-area: plan; justify-items: end; text-align: right; } .bl-seen { grid-area: seen; justify-items: end; text-align: right; }
  .bl-plan .badge { justify-self: end; }
  .bl-out, .bl-go { display: none !important; }
  .bl-seen small { display: block; font-size: 11px; }
  .bl-seen b { font-size: 12.5px; font-weight: 600; }
  .bl-owner b { font-size: 13px; font-weight: 600; }
}
@media (max-width: 699px) {
  .bl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .bl-kpi { padding: 8px 10px; } .bl-kpi b { font-size: 18px; } .bl-kpi small { display: none; }
  .bl-fbtn { display: inline-flex; }
  .bl-filters { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
  .bl-filters.open { display: grid; }
  .bl-foot { justify-content: center; }
  .bl-per { display: none; }
}

/* App Settings home: setup checklist + every section as cards */
@media (min-width: 1000px) { .settings-layout.home.wide { grid-template-columns: 230px minmax(0, 1fr); } }
@media (min-width: 900px) and (max-width: 999px) { .settings-layout.home.wide .st-nav { display: none; } }
.st-home { display: flex; flex-direction: column; gap: 18px; }
.st-todo .card-head h3 { display: flex; align-items: center; gap: 8px; }
.st-todo .card-head h3 svg { color: var(--warn); }
.st-todo-i { color: inherit; text-decoration: none; min-height: 60px; transition: background .15s; }
.st-todo-i:hover { background: var(--surface-2); }
.st-todo-i > svg { color: var(--muted); flex: none; }
.st-sec { display: flex; flex-direction: column; gap: 8px; }
.st-sec .st-cap { padding: 0 2px; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.st-card { display: flex; align-items: flex-start; gap: 12px; min-height: 76px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.st-card:hover { border-color: var(--brand); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.st-card:hover .st-ic { background: var(--brand-50); color: var(--brand); }
.st-card .st-tx small { display: block; margin-top: 2px; }
.settings-layout.home:not(.wide) .st-main { order: -1; }
.settings-layout.home:not(.wide) .st-main:empty { display: none; }

/* Super admin · dashboard: Needs action, growth, sign-ups by week */
.na-card .card-head h3 { display: flex; align-items: center; gap: 8px; }
.na-card .card-head h3 svg { color: var(--warn); }
.na-i { color: inherit; text-decoration: none; min-height: 52px; transition: background .15s; }
.na-i:hover { background: var(--surface-2); }
.na-i.zero { opacity: .55; }
.na-i > svg { color: var(--muted); flex: none; }
.na-n { min-width: 28px; text-align: right; font-size: 16px; font-variant-numeric: tabular-nums; }
.na-i:not(.zero) .na-n { color: var(--text); }
.na-danger { background: var(--danger-bg, var(--surface-2)) !important; color: var(--danger) !important; }
.na-warn { background: var(--warn-bg) !important; color: var(--warn) !important; }
.na-info { background: var(--brand-50) !important; color: var(--brand) !important; }
.gr-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.gr-card { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); min-width: 0; }
.gr-l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.gr-v { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gr-v b { font-size: 24px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.gr-d { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 1px 7px; border-radius: 99px; background: var(--surface-2); }
.gr-d.up { color: var(--ok); background: var(--ok-bg); }
.gr-d.down { color: var(--danger); background: var(--danger-bg, var(--surface-2)); }
.gr-weeks { display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.gr-w { flex: 1; min-width: 0; height: 100%; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; gap: 2px; }
.gr-w i { align-self: end; width: 100%; max-width: 44px; background: var(--brand); border-radius: 4px 4px 2px 2px; opacity: .85; }
.gr-w b { font-size: 12px; font-variant-numeric: tabular-nums; }
.gr-w small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.bl-state { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r); background: var(--brand-50); color: var(--brand); font-size: 13px; font-weight: 600; }
.bl-state span { flex: 1; }
@media (max-width: 899px) { .gr-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Jump box (Ctrl / ⌘ K) and shortcuts */
.top-jump { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 12px; margin-left: auto; min-width: 240px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .15s; }
.top-jump:hover { border-color: var(--brand); color: var(--text); }
.top-jump span { flex: 1; text-align: left; }
:is(.top-jump, .jb, .kb-list) kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--text-2); font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; white-space: nowrap; }
.jb { position: fixed; inset: 0; z-index: 9000; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(15, 23, 42, .45); animation: jb-in .12s ease-out; }
@keyframes jb-in { from { opacity: 0; } }
.jb-box { width: min(620px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--r) + 4px); box-shadow: var(--shadow-3); overflow: hidden; }
.jb-in { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); color: var(--muted); }
.jb-in input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; }
.jb-list { overflow-y: auto; padding: 6px; }
.jb-cap { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.jb-i { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 0; border-radius: var(--r); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.jb-i.on, .jb-i:hover { background: var(--brand-50); }
.jb-i.on .jb-ic { color: var(--brand); }
.jb-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: var(--r); background: var(--surface-2); color: var(--text-2); }
.jb-t { flex: 1; min-width: 0; display: grid; }
.jb-t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-t small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-empty { padding: 24px; text-align: center; color: var(--muted); }
.jb-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; color: var(--muted); }
.jb-foot span { display: inline-flex; align-items: center; gap: 4px; }
.kb-list { display: grid; }
.kb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; border-bottom: 1px solid var(--border); font-size: 14px; }
.kb-row:last-child { border-bottom: 0; }
@media (max-width: 899px) {
  .top-jump { min-width: 0; width: 36px; padding: 0; justify-content: center; margin-left: auto; }
  .top-jump span, .top-jump kbd { display: none; }
  .jb { padding-top: 8px; }
  .jb-foot { display: none; }
}
.na-zero { border-top: 1px solid var(--border); }
.na-zero > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; cursor: pointer; list-style: none; font-size: 13px; color: var(--muted); font-weight: 600; }
.na-zero > summary::-webkit-details-marker { display: none; }
.na-zero > summary > svg:first-child { color: var(--ok); }
.na-zero > summary > svg:last-child { margin-left: auto; transition: transform .2s; }
.na-zero[open] > summary > svg:last-child { transform: rotate(180deg); }

/* Super admin: business types */
.bt-intro { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.bt-sum { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.bt-sum b { font-size: 22px; line-height: 1; }
.bt-group { padding: 0; overflow: hidden; }
.bt-ghead { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.bt-ic { width: 36px; height: 36px; border-radius: var(--r); display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.bt-ghead .bt-name { font-weight: 600; }
.bt-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.bt-row { display: grid; grid-template-columns: 1fr 34px auto auto; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.bt-name { height: 36px; min-width: 0; }
.bt-used { text-align: right; white-space: nowrap; }
.bt-def { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.bt-def input { margin: 0; accent-color: var(--brand); }
.bt-def:has(input:checked) { color: var(--brand); font-weight: 600; }
.is-off > .bt-name, .bt-group.is-off .bt-rows { opacity: .45; }
.bt-group.is-off .bt-ic { filter: grayscale(1); opacity: .6; }
.bt-bar { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b) + 8px); display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-1); }
@media (min-width: 900px) { .bt-bar { bottom: 12px; } }
@media (max-width: 560px) {
  .bt-intro { align-items: flex-start; }
  .bt-rows { grid-template-columns: 1fr; }
  .bt-row { grid-template-columns: 1fr 26px auto auto; gap: 8px; padding: 8px 12px; }
  .bt-ghead { grid-template-columns: 32px 1fr auto; padding: 10px 12px; }
  .bt-ghead .bt-used { display: none; }
  .bt-ic { width: 32px; height: 32px; }
  .bt-def span { display: none; }
  .bt-def:has(input:checked) span { display: inline; }
  .bt-bar .muted { display: none; }
  .bt-bar .btn { width: 100%; }
}

/* Super admin: sign-up and app screens */
.bt-su-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.md-list { padding: 0; overflow: hidden; }
.md-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.md-row:last-child { border-bottom: 0; }
.md-row > .switch { margin-top: 6px; }
.md-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.md-main .bt-name { max-width: 320px; font-weight: 600; }
.md-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.md-cat { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; text-decoration: line-through; }
.md-cat:not(.on) { border-style: dashed; opacity: .55; background: transparent; }
.md-cat.on { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); text-decoration: none; }
.md-row.is-off .md-cats, .md-row.is-off .bt-name { opacity: .45; }
.md-row.is-off .bt-ic { filter: grayscale(1); opacity: .6; }
.bm-row { gap: 10px; }
.bm-seg { flex: none; }
.bm-seg label { position: relative; }
.bm-seg input { position: absolute; opacity: 0; pointer-events: none; }
.bm-seg span { display: inline-flex; align-items: center; height: 30px; padding: 0 10px; border-radius: var(--r); font-size: 12.5px; cursor: pointer; color: var(--muted); }
.bm-seg input:checked + span { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-1); }
.bm-seg input[value="off"]:checked + span { color: var(--danger); }
.bm-seg input[value="on"]:checked + span { color: var(--ok); }
.bm-seg input:focus-visible + span { outline: 2px solid var(--brand); }
.bm-foot { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; border-top: 1px solid var(--border); }
.bm-foot > div { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 560px) {
  .md-row { grid-template-columns: 32px 1fr auto; gap: 10px; padding: 12px; }
  .md-cat span { display: none; }
  .md-cats { gap: 4px; flex-wrap: nowrap; }
  .md-cat { width: 30px; justify-content: center; padding: 0; flex: none; }
  .md-main > small { display: none; }
  .md-main { gap: 6px; }
  .bm-foot { flex-direction: column; align-items: stretch; }
  .bm-seg span { padding: 0 8px; }
}

/* Super admin: logo / signature picker and signature pad */
.ip { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ip-prev { width: 160px; height: 72px; flex: none; display: grid; place-items: center; padding: 6px; border: 1px dashed var(--border-strong); border-radius: var(--r); background: var(--surface-2); overflow: hidden; }
.ip-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ip-sig .ip-prev { background: #fff; height: 90px; }
.ip-act { display: flex; gap: 6px; flex-wrap: wrap; }
.sg-sec { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.sp { position: relative; }
.sp-c { display: block; width: 100%; height: 200px; background: #fff; border: 1px solid var(--border-strong); border-radius: var(--r); touch-action: none; cursor: crosshair;
  background-image: linear-gradient(transparent calc(100% - 46px), #e5e7eb calc(100% - 46px), #e5e7eb calc(100% - 45px), transparent calc(100% - 45px)); }
.sp-hint { position: absolute; left: 0; right: 0; bottom: 56px; text-align: center; pointer-events: none; }
@media (max-width: 560px) { .ip-prev { width: 100%; } .ip-act { width: 100%; } .ip-act .btn { flex: 1; } }
.ip [hidden] { display: none !important; }

/* ---------- Super admin UX: Settings home, side menu, section header (admin-ux.js) ---------- */
.as-home { display: flex; flex-direction: column; gap: 16px; }
.as-hero { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: linear-gradient(135deg, var(--brand-50), var(--surface) 70%); }
.as-hero-tx { display: flex; flex-direction: column; gap: 4px; }
.as-hero-tx b { font-size: 15px; }
.as-search { margin: 0; }
.as-search .input { height: 44px; }
@media (min-width: 900px) { .as-hero { flex-direction: row; align-items: center; gap: 24px; } .as-hero-tx { flex: 1; } .as-search { flex: 0 1 420px; } }
.as-attn .card-head h3 { display: flex; align-items: center; gap: 8px; }
.as-attn .card-head h3 svg { color: var(--warn); }
.as-attn-i { cursor: pointer; transition: background .15s; }
.as-attn-i:hover { background: var(--surface-2); }
.as-attn-i > svg:last-child { color: var(--muted); flex: none; }
.as-sec .st-cap { display: flex; align-items: center; gap: 6px; }
.as-card { width: 100%; font: inherit; text-align: start; cursor: pointer; align-items: center; }
.as-card .st-tx { gap: 4px; }
.as-card .st-tx small { margin-top: 0; }
.as-card > svg:last-child { color: var(--muted); flex: none; }
.as-st { display: flex; min-height: 22px; align-items: center; }
.as-st .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-card[hidden], .as-sec[hidden] { display: none; }

.as-layout { display: grid; gap: 16px; align-items: start; }
.as-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.as-body > .stack, .as-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.as-nav { display: none; }
@media (min-width: 1000px) {
  .as-layout { grid-template-columns: 248px minmax(0, 1fr); gap: 24px; }
  .as-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
  .as-back { display: none; }
}
.as-nav .st-cap { padding: 12px 8px 4px; }
.as-nav-i { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 4px 8px; border: 0; border-radius: var(--r); background: transparent; color: var(--text); font: inherit; font-size: 13.5px; text-align: start; cursor: pointer; }
.as-nav-i .st-ic { width: 28px; height: 28px; }
.as-nav-i:hover { background: var(--surface-3); }
.as-nav-i.active { background: var(--brand-50); color: var(--brand); font-weight: 800; box-shadow: inset 3px 0 0 var(--brand); }
.as-nav-i.active .st-ic { background: var(--surface); color: var(--brand); }
.as-nav-home { font-weight: 700; border-bottom: 1px solid var(--border); border-radius: var(--r) var(--r) 0 0; margin-bottom: 4px; }
.as-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.as-dot.danger { background: var(--danger); }
.as-head { display: flex; flex-direction: column; gap: 8px; }
.as-back { align-self: flex-start; padding-left: 4px; }
.as-head-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.as-head-row h2 { margin: 0; font-size: 20px; font-weight: 800; }
.as-head-row .grow { flex: 1 1 200px; min-width: 0; }
@media (max-width: 699px) { .as-head-row > .badge { margin-inline-start: 52px; } }

/* ---------- "How it works" cards with drawings and numbered steps ---------- */
.hw { overflow: hidden; border-color: var(--brand-100); }
.hw > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; cursor: pointer; list-style: none; background: linear-gradient(90deg, var(--brand-50), var(--surface)); }
.hw > summary::-webkit-details-marker { display: none; }
.hw-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r); background: var(--brand); color: var(--brand-ink); flex: none; }
.hw-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hw-tt b { font-size: 14px; } .hw-tt small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-more { font-size: 12.5px; font-weight: 700; color: var(--brand); }
.hw > summary > svg:last-child { color: var(--brand); transition: transform .2s; flex: none; }
.hw[open] > summary > svg:last-child { transform: rotate(180deg); }
.hw[open] > summary { border-bottom: 1px solid var(--border); }
.hw-body { display: flex; flex-direction: column; gap: 16px; padding: 16px; }
.hw-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: none; }
.hw-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); min-width: 0; }
.hw-steps li > div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hw-steps b { font-size: 13.5px; }
.hw-steps p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere; }
.hw-steps code, .hw-pic code { font-size: 12px; background: var(--surface-3); padding: 0 4px; border-radius: var(--r-sm); }
.hw-num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; box-shadow: 0 0 0 4px var(--brand-50); }
.hw-foot { display: flex; justify-content: flex-end; }
@media (max-width: 699px) { .hw > summary { padding: 8px 12px; } .hw-body { padding: 12px; gap: 12px; } .hw-steps { grid-template-columns: 1fr; } .hw-more { display: none; } .hw-foot .btn { width: 100%; } }

/* Pictures: lanes of tinted boxes with arrows, decision fork, DNS record, mode table, phone mock */
.hw-pic { display: flex; flex-direction: column; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); min-width: 0; }
.hw-lane { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.hw-lanes .hw-lane { padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.hw-lanes .hw-lane:last-child { padding-bottom: 0; border-bottom: 0; }
.hw-tag { flex: 0 0 140px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hw-n { --k: var(--c1); display: flex; align-items: center; gap: 8px; flex: 1 1 150px; min-width: 0; min-height: 52px; padding: 8px 12px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--k) 35%, var(--border)); background: color-mix(in srgb, var(--k) 10%, var(--surface)); }
.hw-ni { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r); background: var(--k); color: var(--surface); flex: none; }
.hw-nt { display: flex; flex-direction: column; min-width: 0; }
.hw-nt b { font-size: 13px; } .hw-nt small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.hw-a { display: flex; flex-direction: column; align-items: center; color: var(--muted); flex: none; }
.hw-a small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.hw-fork { display: flex; flex-direction: column; gap: 8px; flex: 1 1 200px; min-width: 0; }
.hw-cap { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.hw-dns { display: flex; flex-direction: column; gap: 4px; }
.hw-dns-h, .hw-dns-r { display: grid; grid-template-columns: 70px 80px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 12px; }
.hw-dns-h { font-size: 11.5px; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.hw-dns-r { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.hw-dns-r code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-mx { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.hw-mx-r { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 64px); align-items: center; min-height: 40px; padding: 0 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.hw-mx-r:last-child { border-bottom: 0; }
.hw-mx-r > *:not(:first-child) { justify-self: center; }
.hw-mx-h { background: var(--surface-3); font-size: 12px; min-height: 36px; }
.hw-y, .hw-x { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.hw-y { background: var(--ok-bg); color: var(--ok); } .hw-x { background: var(--danger-bg); color: var(--danger); }
.hw-split { flex-direction: row; align-items: center; gap: 16px; }
.hw-phone { flex: 0 0 200px; display: flex; flex-direction: column; gap: 4px; padding: 12px 8px; border: 2px solid var(--border-strong); border-radius: var(--r); background: var(--surface); }
.hw-ph-top { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--brand); text-align: center; padding-bottom: 4px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.hw-ph-q { font-size: 12px; padding: 0 4px 4px; }
.hw-ph-opt { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--r); font-size: 12px; color: var(--text); }
.hw-ph-opt svg { color: var(--brand); }
.hw-ph-opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-ph-opt small { font-size: 10px; color: var(--muted); }
.hw-ph-opt.off, .hw-ph-tile.off { opacity: .45; border-style: dashed; }
.hw-ph-opt.off span, .hw-ph-tile.off span { text-decoration: line-through; }
.hw-ph-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.hw-ph-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--border); border-radius: var(--r); font-size: 10px; text-align: center; color: var(--text); background: var(--surface-2); }
.hw-ph-tile svg { color: var(--brand); }
.hw-ph-tile span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-side { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 0; }
@media (max-width: 699px) {
  .hw-pic { padding: 8px; }
  .hw-lane { flex-wrap: nowrap; align-items: stretch; gap: 4px; }
  .hw-lanes .hw-lane { flex-wrap: wrap; }
  .hw-tag { flex: 0 0 100%; }
  .hw-lanes .hw-lane > .hw-n { flex: 1 1 0; }
  .hw-n { flex: 1 1 0; flex-direction: column; text-align: center; gap: 4px; padding: 8px 4px; min-height: 0; }
  .hw-nt b { font-size: 12px; } .hw-nt small { font-size: 10.5px; }
  .hw-a { align-self: center; width: 12px; } .hw-a small { display: none; } .hw-a svg { width: 12px; height: 12px; }
  .hw-fork { flex: 1.2 1 0; gap: 4px; }
  .hw-fork .hw-n { flex: 1 1 auto; }
  .hw-split { flex-direction: column; align-items: stretch; }
  .hw-phone { flex: none; width: 100%; max-width: 260px; align-self: center; }
  .hw-mx-r { grid-template-columns: minmax(0, 1fr) repeat(3, 48px); padding: 0 8px; font-size: 12.5px; }
  .hw-dns-h, .hw-dns-r { grid-template-columns: 56px 56px minmax(0, 1fr); padding: 8px; }
}
.sk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
@media (max-width: 699px) { .sk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Super admin page kit: number tiles, section tabs, status flow, bulk bar, app cards, tables as cards on phones */
.ax-kpis { margin: 0; }
.ax-kpi-link { color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.ax-kpi-link:hover { box-shadow: var(--shadow-2, var(--shadow-1)); transform: translateY(-1px); }
.ax-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); margin: 0 -2px; padding: 0 2px; max-width: 100%; }
.ax-tabs::-webkit-scrollbar { display: none; }
.ax-tabs button { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ax-tabs button:hover { color: var(--text); }
.ax-tabs button.active { color: var(--brand-700, var(--brand)); border-bottom-color: var(--brand); }
.ax-tabs button em { font-style: normal; font-size: 11.5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.ax-tabs button.active em { background: var(--brand-50); color: var(--brand-700, var(--brand)); }
.ax-tabs button:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ax-flow { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.ax-flow::-webkit-scrollbar { display: none; }
.ax-step { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 92px; padding: 8px 12px; border: 1px solid var(--border); border-left: 3px solid var(--k); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.ax-step b { font-size: 18px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ax-step span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ax-step:hover { border-color: var(--k); }
.ax-step.active { background: color-mix(in srgb, var(--k) 12%, var(--surface)); border-color: var(--k); box-shadow: 0 0 0 1px var(--k) inset; }
.ax-step.active span { color: var(--text); font-weight: 600; }
.ax-arrow { flex: none; color: var(--muted); display: grid; }
.ax-flow-sep { flex: none; width: 1px; align-self: stretch; background: var(--border); margin: 4px 6px; }
.ax-av { flex: none; display: inline-grid; place-items: center; border-radius: var(--r); background: color-mix(in srgb, var(--k) 16%, transparent); color: var(--k); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.ax-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ax-cell > div { min-width: 0; }
.ax-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ax-filters .search { flex: 1; min-width: 200px; }
.ax-filters select.input { width: auto; }
.ax-bulk { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r); background: var(--text); color: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.ax-bulk b { margin-right: auto; }
.ax-bulk-a { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.ax-bulk .btn-soft, .ax-bulk .btn-ghost { background: color-mix(in srgb, var(--surface) 16%, transparent); color: var(--surface); border-color: transparent; }
.ax-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.ax-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ax-app { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ax-app.is-off { opacity: .72; }
.ax-app-h { display: flex; align-items: center; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); }
.ax-app-h > div { flex: 1; min-width: 0; }
.ax-app-h b { display: block; }
.ax-app-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.ax-app-row:last-child { border-bottom: 0; }
.ax-app-row small { display: block; color: var(--muted); font-size: 12px; }
.ax-app-row select.input { width: auto; }
.ax-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; counter-reset: none; }
.ax-steps li { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.ax-steps .ax-sn { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 13px; font-weight: 800; }
.ax-steps li > div > b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.ax-steps p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ax-card-h { display: flex; align-items: center; gap: 10px; }
.ax-ok-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
@media (max-width: 640px) {
  .admin-view table.ax-rt, .admin-view table.ax-rt tbody, .admin-view table.ax-rt tr, .admin-view table.ax-rt td { display: block; width: 100%; box-sizing: border-box; }
  .admin-view table.ax-rt thead { display: none; }
  .admin-view table.ax-rt tr { position: relative; padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .admin-view table.ax-rt tr:last-child { border-bottom: 0; }
  .admin-view table.ax-rt td { display: block; padding: 4px 0; border: 0; text-align: right; min-height: 0; overflow-wrap: anywhere; }
  .admin-view table.ax-rt td::after { content: ''; display: block; clear: both; }
  .admin-view table.ax-rt td.r, .admin-view table.ax-rt td.num { text-align: right; }
  .admin-view table.ax-rt td::before { content: attr(data-l); float: left; max-width: 45%; margin-right: 12px; text-align: left; font-size: 12px; line-height: 20px; color: var(--muted); font-weight: 600; }
  .admin-view table.ax-rt td:first-child:not(.ax-nl) { display: block; text-align: left; font-size: 15px; padding-bottom: 6px; }
  .admin-view table.ax-rt td:first-child:not(.ax-nl)::before { display: none; }
  .admin-view table.ax-rt td.ax-nl:first-child { position: absolute; top: 12px; right: 14px; width: auto; padding: 0; }
  .admin-view table.ax-rt td.ax-nl:first-child + td { display: block; text-align: left; padding-right: 36px; font-size: 15px; }
  .admin-view table.ax-rt td.ax-nl:first-child + td::before { display: none; }
  .admin-view table.ax-rt td:empty { display: none; }
  .admin-view table.ax-rt td > .row { justify-content: flex-end; }
  .admin-view table.ax-rt td .ax-cell { text-align: left; }
  .admin-view table.ax-rt td:last-child.ax-nl { padding-top: 8px; }
  .admin-view table.ax-rt td:last-child.ax-nl > .btn, .admin-view table.ax-rt td:last-child.ax-nl > .row { width: 100%; }
  .admin-view table.ax-rt td:last-child.ax-nl > .row .btn { flex: 1; }
  .ax-step { min-width: 80px; padding: 7px 10px; }
  .ax-bulk { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .ax-bulk { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; }
  .ax-bulk-a { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .ax-bulk-a .btn { flex: none; }
  .ax-kpis { display: flex; overflow-x: auto; scrollbar-width: none; gap: 8px; margin: 0 -16px; padding: 0 16px 2px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
  .ax-kpis::-webkit-scrollbar { display: none; }
  .ax-kpis > .kpi { flex: 0 0 150px; padding: 12px; scroll-snap-align: start; }
  .ax-kpis > .kpi > b { font-size: 22px; }
  .ax-kpis .kpi-ic { width: 26px; height: 26px; }
  .ax-filters select.input { flex: 1; }
}

/* Super admin: plan cards, survey cards */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pl-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-top: 3px solid var(--k); }
.pl-card.is-hi { box-shadow: 0 0 0 2px var(--brand), var(--shadow-1); }
.pl-card.is-off { opacity: .6; }
.pl-top { display: flex; gap: 8px; align-items: flex-start; }
.pl-top h3 { margin: 0; font-size: 17px; }
.pl-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.pl-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-price { display: flex; flex-direction: column; padding: 10px; border-radius: var(--r); background: var(--surface-2); min-width: 0; }
.pl-price b { font-size: 19px; line-height: 1.2; }
.pl-price s { font-size: 12px; }
.pl-price small { color: var(--muted); font-size: 11.5px; }
.pl-price em { font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pl-lims { display: flex; flex-direction: column; }
.pl-lim { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; color: var(--muted); }
.pl-lim:last-child { border-bottom: 0; }
.pl-lim span { flex: 1; }
.pl-lim b { color: var(--text); font-variant-numeric: tabular-nums; }
.pl-use { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.pl-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.pl-bar i { display: block; height: 100%; border-radius: 3px; background: var(--k, var(--brand)); }
.pl-table > summary { cursor: pointer; list-style: none; display: flex; }
.pl-table > summary::-webkit-details-marker { display: none; }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.fb-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.fb-top { display: flex; gap: 10px; align-items: flex-start; }
.fb-rate { display: flex; flex-direction: column; gap: 6px; --k: var(--c4); }
.fb-act { display: flex; gap: 8px; } .fb-act .btn { flex: 1; }
@media (max-width: 640px) { .pl-grid, .fb-grid { grid-template-columns: 1fr; } }
.ap6 { display: grid; grid-template-columns: 96px repeat(5, minmax(0, 1fr)); gap: 8px; align-items: center; }
.ap6 > b { font-size: 12px; color: var(--muted); font-weight: 600; }
.ap6 > b.ap6-c { color: var(--text); font-size: 13px; }
.ap6 label small { display: none; }
@media (max-width: 640px) {
  .ap6 { grid-template-columns: 1fr 1fr; }
  .ap6 > span, .ap6 > b:not(.ap6-c) { display: none; }
  .ap6 > b.ap6-c { grid-column: 1 / -1; margin-top: 6px; }
  .ap6 label { display: flex; flex-direction: column; gap: 3px; }
  .ap6 label small { display: block; font-size: 11.5px; color: var(--muted); }
}
.admin-view p code, .admin-view .small code, .admin-view .muted code { overflow-wrap: anywhere; word-break: break-word; }
/* Every page-level tab bar in the super admin looks like .ax-tabs */
.seg.adm-tabs { display: flex; gap: 4px; align-self: stretch; padding: 0 2px; margin: 0 -2px; min-height: 0; background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.seg.adm-tabs button { height: 42px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 0; background: none !important; box-shadow: none !important; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.seg.adm-tabs button:hover { color: var(--text); }
.seg.adm-tabs button.active { color: var(--brand-700, var(--brand)); border-bottom-color: var(--brand); }
.seg.adm-tabs button .count { margin-left: 4px; }
/* Super admin: starter data card */
.st-shop { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.st-pane { display: flex; flex-direction: column; gap: 10px; }
.st-pane[hidden] { display: none; }
.sa-own-head { flex-wrap: wrap; gap: 8px; } .sa-own-head h3 { flex: 1 1 140px; }
.st-grps.md-cats { flex-wrap: wrap; gap: 6px; } .st-grps .md-cat span { display: inline; white-space: nowrap; }
.st-grps .md-cat { width: auto; padding: 0 10px; height: 32px; }
.st-built { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r); background: var(--surface-2); max-height: 260px; overflow: auto; }
.st-built.is-off { opacity: .5; }
.st-cat { display: flex; flex-direction: column; gap: 4px; }
.st-cat b { font-size: 12.5px; }
.st-cat > div { display: flex; flex-wrap: wrap; gap: 4px; }
.st-cat .chip { font-size: 12px; height: auto; padding: 3px 8px; }

/* ---------- Team page (staff cards, role cards, permission groups) ---------- */
.tm-tabs { align-self: flex-start; }
.tm-bar { gap: 8px; align-items: center; }
.tm-bar .search { flex: 1 1 auto; min-width: 0; max-width: 480px; } .tm-bar .search .input { width: 100%; }
@media (max-width: 479px) { .tm-bar .btn-primary span { display: none; } .tm-bar .btn-primary { width: var(--ctl, 44px); padding: 0; justify-content: center; } }
.tm-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .tm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .tm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tm-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; text-align: start; font: inherit; color: inherit; cursor: pointer; min-width: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tm-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.tm-card:active { transform: scale(.99); }
.tm-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tm-off { opacity: .72; }
.tm-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tm-who { min-width: 0; display: flex; flex-direction: column; }
.tm-who b, .tm-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-av { position: relative; width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
.tm-dot { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.tm-brand { background: var(--brand-50); color: var(--brand); } .tm-ok { background: var(--ok-bg); color: var(--ok); } .tm-info { background: var(--info-bg); color: var(--info); }
.tm-warn { color: var(--warn); } .tm-av.tm-warn, .tm-role.tm-warn, .tm-stack .tm-warn { background: var(--warn-bg); } .tm-danger { background: var(--danger-bg); color: var(--danger); }
.tm-role { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.tm-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.tm-meta .tm-warn { color: var(--danger); font-weight: 600; }
.tm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--r); background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; }
.tm-tag.muted { color: var(--muted); background: transparent; border: 1px dashed var(--border-strong); }
.tm-meter { height: 6px; background: var(--surface-3); border-radius: var(--r); overflow: hidden; }
.tm-meter i { display: block; height: 100%; border-radius: var(--r); background: currentColor; }
.tm-meter i.tm-brand { color: var(--brand); } .tm-meter i.tm-ok { color: var(--ok); } .tm-meter i.tm-info { color: var(--info); } .tm-meter i.tm-warn { color: var(--warn); } .tm-meter i.tm-danger { color: var(--danger); }
.tm-people { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.tm-stack { display: inline-flex; }
.tm-stack i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 800; border: 2px solid var(--surface); margin-inline-start: -7px; }
.tm-stack i:first-child { margin-inline-start: 0; }
.tm-empty { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--brand); }
.tm-empty .grow { color: var(--text); min-width: 200px; }
.tm-empty p { margin: 2px 0 0; }
.tm-h { display: block; margin-bottom: 10px; }
.tm-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 700px) { .tm-how { grid-template-columns: repeat(3, 1fr); } }
.tm-how li { display: flex; gap: 10px; align-items: flex-start; }
.tm-how li > span { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: 13px; }
.tm-how small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tm-pg { padding: 0 14px; }
.tm-pg summary { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none; }
.tm-pg summary::-webkit-details-marker { display: none; }
.tm-pg summary::before { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.tm-pg[open] summary::before { transform: rotate(45deg); }
.tm-pg summary b { flex: 1; font-size: 14px; }
.tm-pc { font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.tm-pg[open] summary { border-bottom: 1px solid var(--border); }
.tm-pg .switch-row { padding: 10px 0; }
.kpi span { display: inline-flex; align-items: center; gap: 5px; }
.tm-at { flex: 0 1 220px; min-width: 0; } .tm-at > .input, .tm-at > .dsel { width: 100%; }
@media (max-width: 479px) { .tm-bar { flex-wrap: wrap; } .tm-bar .search { flex: 1 1 calc(100% - 64px); max-width: none; } .tm-bar .btn-primary { flex: none; } .tm-at { order: 3; flex: 1 1 100%; } }
.ab-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.ab-stats > span { display: inline-flex; align-items: center; gap: 5px; }
.ab-route { gap: 8px; align-items: stretch; }
.ab-route .seg { flex: none; }
@media (max-width: 599px) { .ab-route .seg { width: 100%; } .ab-route .seg button { flex: 1; } }
/* Super admin WhatsApp inbox (admin-more.js wInbox): same look as the outlet inbox, plus filters, sender labels and the reply-window line */
.adm-inbox { height: calc(100dvh - 230px); }
.wa-chips { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.wa-chip { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.wa-chip b { font-size: 11px; color: var(--wa-dark); } .wa-chip.on { background: color-mix(in srgb, var(--wa) 16%, var(--surface)); border-color: var(--wa-dark); color: var(--wa-dark); font-weight: 600; }
.wa-th-tags { display: flex; gap: 5px; min-width: 0; align-items: center; }
.wa-biz { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wa-pill { flex: none; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 9px; background: var(--surface-3); color: var(--muted); } .wa-pill.warn { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--warn); }
.wa-th-last .wa-tick { vertical-align: -1px; } .wa-who-s { font-weight: 600; }
.wa-from { font-size: 11px; font-weight: 700; color: var(--wa-dark); display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; } .wa-from.me { color: var(--info); }
.wa-msg.skipped .wa-bub { opacity: .65; }
.wa-info { display: flex; align-items: center; gap: 6px; padding: 6px 14px; font-size: 12px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); flex: none; } .wa-info b { color: var(--text); font-weight: 600; }
.wa-closed { align-items: center; gap: 10px; } .wa-closed .grow { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.wa-mode { flex: none; }
.wa-empty-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--wa) 16%, var(--surface)); color: var(--wa-dark); }
.wa-legend { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 12.5px; align-items: flex-start; } .wa-legend span { display: inline-flex; align-items: center; gap: 8px; }
.wa-sw { width: 22px; height: 14px; border-radius: 4px; display: inline-block; box-shadow: 0 1px 1px rgb(0 0 0 / .15); } .wa-sw.in { background: var(--wa-bubble); } .wa-sw.out { background: var(--wa-out); }
.wa-pv { border-radius: var(--r); padding: 12px; min-height: 0; } .wa-pv .wa-bub { max-width: 100%; }
@media (max-width: 899px) {
  .adm-inbox { grid-template-columns: minmax(0, 1fr); } .adm-inbox .wa-chat, .adm-inbox .wa-threads { min-width: 0; }
  /* An open chat fills the phone screen (over the top bar and the bottom bar), like WhatsApp; the back arrow returns to the list */
  .adm-inbox.chatting { position: fixed; inset: 0; z-index: 80; height: auto !important; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  .adm-inbox .wa-chat-head { padding: 0 6px 0 2px; gap: 6px; } .adm-inbox .wa-chat-head .wa-av { width: 38px; height: 38px; }
  .adm-inbox .wa-reply { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .wa-closed { flex-wrap: wrap; } .wa-closed .btn { width: 100%; justify-content: center; } .wa-info { padding: 6px 10px; }
}

/* Extra charges: Settings list and the POS picker */
.chg-set { gap: 12px; }
.chg-set .chg-open { all: unset; cursor: pointer; flex: 1; min-width: 0; display: block; }
.chg-set .chg-open .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chg-set .chg-open .sub { white-space: normal; }
.chg-set.is-off .chg-open { opacity: .6; }
.chg-row { gap: 12px; cursor: pointer; }
.chg-row .chg-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg-row .chg-open { all: unset; cursor: pointer; flex: 1; min-width: 0; display: block; }
.chg-row .chg-open .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chg-row .chg-open:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r); }
.pay-chg { width: 100%; gap: 12px; margin-bottom: 12px; border: 1px dashed var(--border); border-radius: var(--r); background: var(--surface); text-align: start; color: var(--text); cursor: pointer; }
.pay-chg > svg { color: var(--muted); flex: none; }
.pay-chg .num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.chg-row .chg-open .sub { white-space: normal; }
