/* KitFlo. Tablet-first, one stylesheet. System fonts only (the server's CSP blocks external fonts).
   Colour roles: accent = money and primary actions; channel colours = identity (validated palette, always paired with a text label);
   good/warn/bad = state, always paired with words. */
:root {
  --bg: #edf1ef; --surface: #fff; --sunk: #e3e9e6; --ink: #14201c; --ink-2: #44554e; --ink-3: #7a8a84; --muted: #586862; --line: #d2dbd7;
  --accent: #0e6b58; --accent-ink: #fff; --accent-soft: #d5ede6; --good: #1b7f4b; --warn: #94580a; --bad: #b3261e;
  --good-soft: #dcf0e5; --warn-soft: #faeacb; --bad-soft: #f7d9d6; --cost: #a89d8b; --slate: #4a5a78;
  --c-website: #2a78d6; --c-swiggy: #eb6834; --c-whatsapp: #1baf7a; --c-walkin: #eda100; --c-zomato: #e87ba4; --c-ownly: #8a2d5e;
  --r: 12px; --r-s: 10px; --gap: 16px; --rail: 224px; --top: 56px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1512; --surface: #15201c; --sunk: #0a100e; --ink: #e5ede9; --ink-2: #b3c2bb; --ink-3: #7f918a; --muted: #92a29b; --line: #27362f;
    --accent: #4fd1b0; --accent-ink: #06241c; --accent-soft: #143a31; --good: #5bd38e; --warn: #e8b25a; --bad: #f08a82;
    --good-soft: #14382a; --warn-soft: #3b2d12; --bad-soft: #40201d; --cost: #8a8070; --slate: #9fb0d0;
    --c-website: #3987e5; --c-swiggy: #d95926; --c-whatsapp: #199e70; --c-walkin: #c98500; --c-zomato: #d55181; --c-ownly: #c0568f; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1512; --surface: #15201c; --sunk: #0a100e; --ink: #e5ede9; --ink-2: #b3c2bb; --ink-3: #7f918a; --muted: #92a29b; --line: #27362f;
  --accent: #4fd1b0; --accent-ink: #06241c; --accent-soft: #143a31; --good: #5bd38e; --warn: #e8b25a; --bad: #f08a82;
  --good-soft: #14382a; --warn-soft: #3b2d12; --bad-soft: #40201d; --cost: #8a8070; --slate: #9fb0d0;
  --c-website: #3987e5; --c-swiggy: #d95926; --c-whatsapp: #199e70; --c-walkin: #c98500; --c-zomato: #d55181; --c-ownly: #c0568f; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; } h1 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.01em; } h2 { font-size: 1.1rem; font-weight: 650; } h3 { font-size: .98rem; font-weight: 650; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .num { text-align: right; font-variant-numeric: tabular-nums; } .grow { flex: 1; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .stack { display: grid; gap: var(--gap); } .between { justify-content: space-between; }
[hidden] { display: none !important; }

/* ───────── shell ───────── */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; }
.nav { position: sticky; top: 0; height: 100dvh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 10px; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; font-weight: 700; letter-spacing: -.01em; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.brand span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a.item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-s); color: var(--ink-2); text-decoration: none; font-weight: 550; position: relative; }
.nav a.item:hover { background: var(--sunk); }
.nav a.item[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.nav a.item[aria-current="page"] svg { color: var(--accent); }
.nav .dotc { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--top); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.top h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--sunk); font-size: .85rem; font-weight: 600; white-space: nowrap; border: 0; color: var(--ink); }
.pill.profit.up { background: var(--good-soft); color: var(--good); } .pill.profit.down { background: var(--bad-soft); color: var(--bad); }
.pill .live { width: 8px; height: 8px; border-radius: 50%; background: var(--good); } .pill.off .live { background: var(--bad); }
.page { padding: 20px; max-width: 1480px; width: 100%; margin: 0 auto; display: grid; gap: var(--gap); align-content: start; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--gap); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; }
.tile .k { color: var(--muted); font-size: .85rem; } .tile .v { font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; } .tile .d { font-size: .82rem; color: var(--muted); }
.tile .d.up { color: var(--good); } .tile .d.down { color: var(--bad); } .tile .spark-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.up { color: var(--good); } .down { color: var(--bad); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--gap); align-items: start; }

@media (max-width: 1099px) { :root { --rail: 84px; } .nav a.item { flex-direction: column; gap: 3px; padding: 9px 4px; font-size: .72rem; text-align: center; } .brand span.name { display: none; } .brand { justify-content: center; padding: 6px 0 12px; } .nav .dotc { position: absolute; top: 3px; right: 8px; margin: 0; } }
@media (max-width: 1000px) { .split, .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 759px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 66px; }
  .nav { position: fixed; z-index: 30; inset: auto 0 0 0; height: 62px; flex-direction: row; padding: 4px 6px; border-right: 0; border-top: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; gap: 2px; }
  .nav .brand { display: none; } .nav a.item { flex: 1 0 62px; min-width: 62px; padding: 6px 2px; font-size: .68rem; }
  .top { padding: 0 12px; } .page { padding: 12px; } .tile .v { font-size: 1.3rem; }
  .hide-m { display: none !important; }
}
body.fs .nav, body.fs .top { display: none; } body.fs .shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }

/* ───────── controls ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--sunk); } .btn:disabled { opacity: .55; cursor: not-allowed; } .btn.busy { position: relative; color: transparent !important; } .btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-3); border-top-color: transparent; animation: spin .7s linear infinite; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); } .btn.primary:hover { filter: brightness(1.08); } .btn.primary.busy::after { border-color: var(--accent-ink); border-top-color: transparent; }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); } .btn.soft { background: var(--accent-soft); border-color: transparent; } .btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--sunk); }
.btn.sm { min-height: 32px; padding: 0 11px; font-size: .88rem; } .btn.lg { min-height: 52px; padding: 0 22px; font-size: 1.05rem; } .btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; } .icon-btn:hover { background: var(--sunk); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (pointer: coarse) { .btn { min-height: 44px; } .btn.sm { min-height: 38px; } .icon-btn { width: 44px; height: 44px; } }
input, select, textarea { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); }
textarea { resize: vertical; min-height: 84px; } input[type="checkbox"] { width: auto; min-height: 0; } input[type="file"] { padding: 6px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
@media (pointer: coarse) { input, select { min-height: 44px; } }
.field { display: grid; gap: 5px; min-width: 0; } .field .lbl { font-size: .85rem; font-weight: 600; color: var(--ink-2); } .field .hint { font-size: .8rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.seg { display: inline-flex; background: var(--sunk); border-radius: var(--r-s); padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 8px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; min-height: 32px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; } .switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 40px; height: 24px; border-radius: 12px; background: var(--ink-3); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); } .switch input:checked + .track::after { transform: translateX(16px); } .switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: .78rem; font-weight: 650; background: color-mix(in srgb, var(--chc, var(--ink-3)) 17%, var(--surface)); border: 1px solid color-mix(in srgb, var(--chc, var(--ink-3)) 45%, transparent); color: var(--ink); white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--chc, var(--ink-3)); }
.ch-swiggy { --chc: var(--c-swiggy); } .ch-zomato { --chc: var(--c-zomato); } .ch-ownly { --chc: var(--c-ownly); } .ch-website { --chc: var(--c-website); } .ch-whatsapp { --chc: var(--c-whatsapp); } .ch-walkin { --chc: var(--c-walkin); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: .76rem; font-weight: 650; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: var(--good); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.accent { background: var(--accent-soft); color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .filters .field { min-width: 140px; }
.empty { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 34px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); } .empty strong { color: var(--ink); }
.skeleton { display: grid; gap: 10px; } .skeleton i { height: 64px; border-radius: var(--r); background: linear-gradient(90deg, var(--sunk), var(--surface), var(--sunk)); background-size: 200% 100%; animation: shim 1.3s linear infinite; } @keyframes shim { to { background-position: -200% 0; } }
.notice { padding: 10px 14px; border-radius: var(--r-s); background: var(--warn-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); font-size: .9rem; }
.notice.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); } .notice.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }

/* ───────── tables ───────── */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.tbl { width: 100%; border-collapse: collapse; } .tbl th { text-align: left; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; } .tbl th.num { text-align: right; }
.tbl td { padding: 10px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: middle; } .tbl tr:last-child td { border-bottom: 0; } .tbl tbody tr.click { cursor: pointer; } .tbl tbody tr.click:hover { background: var(--sunk); }
.tbl.compact td, .tbl.compact th { padding: 6px 8px; } .tbl .acts { text-align: right; white-space: nowrap; }
.meter { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; min-width: 70px; } .meter i { display: block; height: 100%; border-radius: 3px; background: var(--accent); } .meter i.warn { background: var(--warn); } .meter i.bad { background: var(--bad); }

/* ───────── login ───────── */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login .box { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: grid; gap: 18px; }
.login .users { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; } .login .users button { text-align: left; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; gap: 2px; min-height: 64px; } .login .users button:hover { border-color: var(--accent); } .login .users small { color: var(--muted); text-transform: capitalize; }
.pin-dots { display: flex; gap: 12px; justify-content: center; height: 18px; } .pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink-3); } .pin-dots i.on { background: var(--ink); border-color: var(--ink); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .keypad button { min-height: 60px; font-size: 1.4rem; font-weight: 600; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; } .keypad button:active { background: var(--sunk); }
.err { color: var(--bad); font-weight: 600; min-height: 1.4em; text-align: center; }

/* ───────── orders board ───────── */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.col { display: grid; gap: 10px; align-content: start; min-width: 0; } .col > h3 { display: flex; align-items: center; gap: 8px; padding: 2px 2px 0; } .col .count { background: var(--sunk); border-radius: 10px; padding: 0 8px; font-size: .8rem; font-weight: 700; }
.col.new > h3 .count { background: var(--bad); color: #fff; }
.order { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--chc, var(--ink-3)); border-radius: var(--r); padding: 12px 14px 12px; display: grid; gap: 8px; cursor: pointer; position: relative; overflow: hidden; }
.order:hover { border-color: color-mix(in srgb, var(--chc) 60%, var(--line)); } .order.flash { animation: flash 1.6s ease-out 1; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.order .oh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .order .oh b { font-size: 1.05rem; } .order .oh .time { margin-left: auto; font-size: .85rem; color: var(--muted); }
.order ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; } .order li { display: flex; gap: 8px; } .order li .q { font-weight: 700; min-width: 26px; }
.order .note { background: var(--warn-soft); border-radius: 8px; padding: 5px 9px; font-size: .88rem; } .order .of { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.promise { height: 5px; border-radius: 3px; background: var(--sunk); overflow: hidden; } .promise i { display: block; height: 100%; background: var(--good); border-radius: 3px; } .promise.warn i { background: var(--warn); } .promise.bad i { background: var(--bad); }
.order .acts { display: flex; gap: 8px; } .order .acts .btn { flex: 1; }
.done-list { display: grid; gap: 6px; } .done-row { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; flex-wrap: wrap; } .done-row:hover { background: var(--sunk); }
.pos-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; }
.side { display: grid; gap: var(--gap); } .side .card { padding: 14px; } .side h3 { margin-bottom: 8px; }
.prep-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; } .prep-list li { display: flex; gap: 10px; align-items: baseline; } .prep-list b { min-width: 30px; font-size: 1.15rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.avail { display: grid; gap: 4px; max-height: 280px; overflow: auto; } .avail .sw { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 2px; }
@media (max-width: 1250px) { .pos-grid { grid-template-columns: minmax(0, 1fr); } .side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.mcols { display: none; }
@media (max-width: 759px) { .mcols { display: flex; } .board { grid-template-columns: minmax(0, 1fr); } .board .col { display: none; } .board[data-col="new"] .col.new, .board[data-col="kitchen"] .col.kitchen, .board[data-col="ready"] .col.ready { display: grid; } }

/* ───────── new-order modal + bill ───────── */
.neworder { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; } @media (max-width: 820px) { .neworder { grid-template-columns: minmax(0, 1fr); } }
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 46vh; overflow: auto; padding: 2px; }
.dish { text-align: left; padding: 10px 12px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: grid; gap: 2px; min-height: 66px; } .dish:hover { border-color: var(--accent); } .dish.out { opacity: .5; } .dish b { font-size: .95rem; line-height: 1.2; } .dish span { color: var(--muted); font-size: .85rem; }
.cart { display: grid; gap: 8px; align-content: start; } .cart .line { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; } .step { display: inline-flex; align-items: center; gap: 2px; background: var(--sunk); border-radius: 9px; } .step button { width: 32px; height: 32px; border: 0; background: transparent; font-weight: 700; cursor: pointer; border-radius: 9px; } .step span { min-width: 22px; text-align: center; font-weight: 700; }
.totals { display: grid; gap: 4px; padding-top: 8px; border-top: 1px dashed var(--line); } .totals div { display: flex; justify-content: space-between; } .totals .grand { font-size: 1.15rem; font-weight: 700; }
.bill { font-variant-numeric: tabular-nums; display: grid; gap: 6px; } .bill .ln { display: grid; grid-template-columns: 1fr auto; gap: 8px; } .bill hr { border: 0; border-top: 1px dashed var(--line); width: 100%; margin: 4px 0; } .bill .t { display: flex; justify-content: space-between; } .bill .gt { font-size: 1.15rem; font-weight: 700; }
#print-area { display: none; }
@media print { html, body { background: #fff !important; } html.rc-printing body > *:not(#print-area) { display: none !important; } #print-area { display: block; margin: 0; padding: 0; color: #000; background: #fff; } #print-area .receipt { box-shadow: none; border: 0; padding: 2mm 1mm 4mm; margin: 0 auto; } }

/* ───────── kitchen display ───────── */
.kds { display: grid; gap: 14px; } .kds-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .kds-top .prep { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.prep-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font-weight: 600; } .prep-chip b { font-size: 1.2rem; margin-right: 4px; }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; align-items: start; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-top: 8px solid var(--chc); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 10px; } .kcard.cooking { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.kcard .kh { display: flex; align-items: center; gap: 10px; } .kcard .kh b { font-size: 1.6rem; } .kcard .kh .timer { margin-left: auto; font-size: 1.3rem; font-weight: 700; } .timer.warn { color: var(--warn); } .timer.bad { color: var(--bad); }
.kcard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 1.2rem; font-weight: 550; } .kcard li { display: flex; gap: 10px; } .kcard li .q { font-weight: 800; min-width: 34px; } .kcard .mod { font-size: .95rem; color: var(--muted); font-weight: 400; }
.kcard .note { background: var(--warn-soft); border-radius: 8px; padding: 8px 12px; font-size: 1.05rem; font-weight: 600; }
.newstrip { display: grid; gap: 8px; } .newrow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border: 2px solid var(--bad); border-radius: var(--r); flex-wrap: wrap; }

/* ───────── stock ───────── */
.stock-row .name { font-weight: 600; } .stock-row .sub { color: var(--muted); font-size: .82rem; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.recipe-edit .rl { display: grid; grid-template-columns: minmax(0, 1fr) 96px 80px 36px; gap: 8px; align-items: end; margin-bottom: 8px; } @media (max-width: 520px) { .recipe-edit .rl { grid-template-columns: minmax(0, 1fr) 80px 64px 36px; } }

/* ───────── social ───────── */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; } @media (max-width: 900px) { .cal { grid-template-columns: minmax(0, 1fr); } }
.day { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 150px; } .day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); } .day.over { background: var(--accent-soft); }
.day .dh { display: flex; justify-content: space-between; align-items: center; } .day .dh b { font-size: .95rem; } .day .dh button { opacity: .7; }
.post { border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px; display: grid; gap: 4px; cursor: pointer; background: var(--surface); } .post[draggable="true"] { cursor: grab; } .post:hover { border-color: var(--accent); } .post .pt { font-weight: 650; font-size: .9rem; line-height: 1.25; } .post .pm { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .78rem; }
.post img.th { width: 100%; height: 70px; object-fit: cover; border-radius: 7px; }
.post.published { background: color-mix(in srgb, var(--good-soft) 40%, var(--surface)); } .post.failed { border-color: var(--bad); } .post.pending_approval { border-style: dashed; border-color: var(--warn); }
.hours { display: flex; gap: 4px; align-items: end; height: 44px; } .hours i { flex: 1; background: var(--accent); opacity: .85; border-radius: 3px 3px 0 0; min-height: 2px; } .hours-l { display: flex; gap: 4px; } .hours-l span { flex: 1; font-size: .7rem; color: var(--muted); text-align: center; }
.preview { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); } .preview .ph { display: flex; gap: 8px; align-items: center; padding: 8px 10px; font-weight: 650; font-size: .88rem; } .preview img { width: 100%; max-height: 220px; object-fit: cover; display: block; } .preview p { padding: 8px 10px 10px; font-size: .88rem; white-space: pre-wrap; word-break: break-word; }
.thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.q-item { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); } .q-item.auto { border-left: 4px solid var(--accent); }

/* ───────── automations ───────── */
.rule { display: grid; gap: 10px; } .rule .flow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .rule .flow .arrow { color: var(--ink-3); } .rule .step-box { background: var(--sunk); padding: 6px 11px; border-radius: 9px; font-weight: 600; font-size: .9rem; }
.act-edit { border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px; display: grid; gap: 8px; margin-bottom: 8px; }
.feed { display: grid; gap: 4px; max-height: 420px; overflow: auto; font-size: .88rem; } .feed div { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); } .feed code { background: var(--sunk); padding: 1px 7px; border-radius: 6px; }

/* ───────── charts ───────── */
.chart-body { min-height: 60px; } .chart-wrap { position: relative; } svg text { font-family: inherit; } .axis { fill: var(--ink-2); font-size: 11px; } .axis.dim { fill: var(--ink-3); } .axis.ink { fill: var(--ink); font-weight: 600; } .val { fill: var(--ink); font-size: 12px; font-weight: 650; }
.grid { stroke: var(--line); stroke-width: 1; } .axisline { stroke: var(--ink-3); stroke-width: 1; } .link { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; } .cross { stroke: var(--ink-3); stroke-dasharray: 3 3; } .ref { stroke: var(--ink-3); stroke-dasharray: 5 4; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); padding: 7px 10px; border-radius: 8px; font-size: .82rem; line-height: 1.4; z-index: 5; white-space: nowrap; } .chart-tip .sw, .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
#tip { position: fixed; z-index: 120; pointer-events: none; display: none; background: var(--ink); color: var(--bg); padding: 7px 10px; border-radius: 8px; font-size: .82rem; line-height: 1.4; max-width: 280px; }
.legend { list-style: none; padding: 0; margin: 0 0 10px; display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-2); } .legend li { display: flex; align-items: center; } .legend.wrap { margin: 10px 0 0; }
.srows { display: grid; gap: 12px; } .srow { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; align-items: center; } .srow-l { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .9rem; } .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.srow-bar { height: 22px; } .srow-fill { display: flex; gap: 2px; height: 100%; } .srow-fill b { display: block; border-radius: 3px; min-width: 2px; } .srow-v { font-size: .85rem; color: var(--ink-2); min-width: 96px; text-align: right; }
@media (max-width: 520px) { .srow { grid-template-columns: 70px minmax(0, 1fr); } .srow-v { grid-column: 2; text-align: left; } }
.segbar { display: flex; gap: 2px; height: 22px; } .segbar b { border-radius: 4px; min-width: 3px; }
.budgets { display: grid; gap: 14px; } .bud-h { display: flex; justify-content: space-between; align-items: baseline; } .bud-bar { height: 8px; background: var(--sunk); border-radius: 4px; margin: 5px 0; overflow: hidden; } .bud-bar i { display: block; height: 100%; border-radius: 4px; } .bud-bar i.good { background: var(--accent); } .bud-bar i.warn { background: var(--warn); } .bud-bar i.bad { background: var(--bad); }
.st.good { color: var(--good); } .st.warn { color: var(--warn); } .st.bad { color: var(--bad); } .st { font-size: .8rem; font-weight: 650; }
.insights { display: grid; gap: 8px; } .insight { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r-s); }

/* ───────── dialogs + toasts ───────── */
dialog.modal { border: 1px solid var(--line); border-radius: 16px; padding: 0; background: var(--surface); color: var(--ink); width: min(640px, calc(100vw - 24px)); max-height: min(88dvh, 900px); flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); } dialog.modal[open] { display: flex; }
dialog.modal.sm { width: min(420px, calc(100vw - 24px)); } dialog.modal.lg { width: min(940px, calc(100vw - 24px)); } dialog.modal::backdrop { background: rgba(8, 16, 12, .55); }
dialog.modal > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--line); } dialog.modal > .modal-body { padding: 16px 20px; overflow: auto; display: grid; gap: 14px; align-content: start; } dialog.modal > footer { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
dialog.modal.side { margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(500px, 100vw); border-radius: 0; border-width: 0 0 0 1px; }
@media (max-width: 640px) { dialog.modal:not(.side) { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: 18px 18px 0 0; max-height: 92dvh; } }
#toasts { position: fixed; z-index: 200; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; } @media (max-width: 759px) { #toasts { bottom: 78px; } }
.toast { pointer-events: auto; background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-weight: 550; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: tin .18s ease-out; border-left: 5px solid var(--accent); } .toast.warn { border-left-color: var(--warn); } .toast.bad { border-left-color: var(--bad); } .toast.out { opacity: 0; transition: opacity .25s; } @keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.menu { position: absolute; right: 12px; top: calc(var(--top) - 6px); z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; min-width: 240px; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); display: grid; gap: 2px; } .menu .who { padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; } .menu button { display: flex; gap: 10px; align-items: center; justify-content: space-between; border: 0; background: transparent; padding: 10px; border-radius: 9px; text-align: left; cursor: pointer; font-weight: 550; min-height: 42px; } .menu button:hover { background: var(--sunk); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

/* ───────── public ordering page ───────── */
.shop { max-width: 980px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; } .shop header { display: flex; justify-content: space-between; align-items: center; gap: 12px; } .shop-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; } @media (max-width: 800px) { .shop-grid { grid-template-columns: minmax(0, 1fr); } }
.menu-list { display: grid; gap: 8px; } .menu-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); } .menu-item b { display: block; }
.tracker { display: grid; gap: 10px; } .steps { display: flex; gap: 6px; } .steps i { flex: 1; height: 6px; border-radius: 3px; background: var(--sunk); } .steps i.on { background: var(--accent); }

/* ───────── menu page ───────── */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: grid; grid-template-rows: auto 1fr; cursor: pointer; min-width: 0; }
.dcard:hover { border-color: var(--accent); } .dcard.off { opacity: .65; }
.dimg { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--sunk); } .dimg.big { height: 190px; border-radius: var(--r-s); border: 1px solid var(--line); }
.fimg-ph { display: grid; place-items: center; color: var(--ink-3); background: var(--sunk); }
.dbody { padding: 12px; display: grid; gap: 8px; align-content: start; } .dbody h4 { margin: 0; font-size: .98rem; line-height: 1.25; }
.ddesc { font-size: .85rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; } .ddesc.muted { color: var(--muted); font-style: italic; }
.vchips { display: flex; gap: 6px; flex-wrap: wrap; } .vchip { display: inline-flex; align-items: baseline; gap: 6px; background: var(--sunk); border-radius: 8px; padding: 3px 9px; font-size: .85rem; } .vchip small { color: var(--muted); } .vchip.off { text-decoration: line-through; opacity: .6; }
.editgrid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; } @media (max-width: 700px) { .editgrid { grid-template-columns: minmax(0, 1fr); } }
.vrow { display: grid; gap: 10px; padding: 12px; } .pv { min-height: 100px; }

/* ───────── sizes in order entry and public page ───────── */
.menu-item { align-items: stretch; } .menu-item .mi-img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; flex: none; background: var(--sunk); }
.menu-item .mi-body { flex: 1; min-width: 0; display: grid; gap: 4px; align-content: start; } .menu-item .mi-desc { font-size: .85rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sizes { display: grid; gap: 6px; margin-top: 4px; } .size-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.size-row .sn { font-size: .88rem; } .size-row .sn small { color: var(--muted); }
.dish.has-sizes b::after { content: " ▾"; color: var(--muted); }
.menu-tag { display: inline-block; font-size: .72rem; font-weight: 650; padding: 1px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.neworder > .stack { align-content: start; }
.dish { min-height: 84px; align-content: start; } .dish-grid { grid-auto-rows: min-content; }


/* ───────── thermal bill (58 / 80 mm) ───────── */
.receipt { width: var(--pw, 48mm); font: 600 var(--pf, 16px)/1.3 Arial, Helvetica, sans-serif; color: #000; background: #fff; padding: 2mm 1mm; word-break: break-word; font-variant-numeric: tabular-nums; }
.receipt .rc-center { text-align: center; } .receipt .rc-name { font-size: 1.35em; font-weight: 800; margin-bottom: 2px; } .receipt .rc-small { font-size: .82em; font-weight: 500; } .receipt .rc-b { font-weight: 800; }
.receipt .rc-rule { border-top: 2px dashed #000; margin: .45em 0; } .receipt .rc-solid { border-top-style: solid; }
.receipt .rc-row { display: flex; justify-content: space-between; gap: .6em; align-items: baseline; } .receipt .rc-row span:last-child { text-align: right; white-space: nowrap; }
.receipt .rc-item { margin-bottom: .45em; } .receipt .rc-iname { font-weight: 800; } .receipt .rc-total { font-size: 1.1em; font-weight: 800; white-space: nowrap; } .receipt .rc-total span { white-space: nowrap; } .receipt .rc-wrap { white-space: pre-wrap; }
.rc-preview { background: #ddd; padding: 12px; border-radius: var(--r); overflow: auto; max-height: 60vh; display: flex; justify-content: center; } .rc-preview .receipt { box-shadow: 0 2px 10px rgba(0,0,0,.25); }.row > .seg { flex: none; }

.receipt .rc-qr { margin-top: .5em; } .receipt .rc-qrbox { margin: .3em auto; background: #fff; } .receipt .rc-qrbox svg { width: 100%; height: auto; }
.receipt .rc-big { font-size: 2.4em; font-weight: 900; line-height: 1.1; } .receipt .rc-kline { display: flex; gap: .5em; align-items: flex-start; margin-bottom: .4em; font-size: 1.15em; } .receipt .rc-kq { font-weight: 900; font-size: 1.3em; min-width: 2.2em; } .receipt .rc-bignote { font-size: 1.15em; font-weight: 800; }
@media print { #print-area .receipt { break-after: page; } #print-area .receipt:last-child { break-after: auto; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; } .stat .big { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin: 2px 0; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; } .tbl td.num, .tbl th.num { text-align: right; }

/* Add-ons */
.addon-group { display: grid; gap: 6px; }
.addon-group h4 { margin: 0; font-size: 15px; }
.addon-group .req, .addon-pick .req { color: var(--bad); font-weight: 600; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; text-align: left; }
button.opt { cursor: pointer; }
.opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.addon-edit .arow { display: grid; grid-template-columns: minmax(120px, 2fr) 90px 90px minmax(120px, 2fr) 90px auto auto; gap: 8px; align-items: end; padding: 8px 0; border-top: 1px solid var(--line); }
.addon-edit .dishpick { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; display: grid; gap: 2px; }
.addon-edit .dishpick label { display: flex; gap: 8px; align-items: center; min-height: 30px; }
.addon-line { display: block; font-size: 12px; color: var(--muted); }
@media (max-width: 760px) { .addon-edit .arow { grid-template-columns: 1fr 1fr; } }

/* KitFlo logo: dark ink on light themes, light ink on dark. */
.logo img { display: block; width: min(260px, 70%); height: auto; margin: 0 auto 8px; } .logo .lg-l { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo .lg-d { display: none; } :root:not([data-theme="light"]) .logo .lg-l { display: block; } }
:root[data-theme="dark"] .logo .lg-d { display: none; } :root[data-theme="dark"] .logo .lg-l { display: block; }

/* Hosted accounts, plans, printers */
.login .box.wide { max-width: 560px; } .center { text-align: center; } .right { text-align: right; }
.plan-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.plan { display: grid; gap: 2px; text-align: left; padding: 12px; border: 1.5px solid var(--line, #d8dcd9); border-radius: 12px; background: var(--surface); color: inherit; cursor: pointer; font: inherit; }
.plan.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); } .plan span { font-weight: 650; } .plan small { color: var(--muted, #6b726e); }
pre.code { margin: 0; padding: 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); overflow-x: auto; white-space: pre-wrap; word-break: break-all; font-size: .8rem; }
.invoice hr { width: 100%; border: 0; border-top: 1px solid var(--line, #d8dcd9); margin: 4px 0; }
.printer { padding: 14px; }
/* Printing a pop-up (plan invoice). Bills and kitchen tickets set html.rc-printing and use #print-area instead, so this must not apply to them. */
@media print { html:not(.rc-printing) body > *:not(dialog) { display: none !important; } html:not(.rc-printing) dialog.modal { position: static; box-shadow: none; } html:not(.rc-printing) dialog.modal header, html:not(.rc-printing) dialog.modal footer { display: none; } }
.pill.warn { background: color-mix(in srgb, #c98500 18%, var(--surface)); color: var(--ink); cursor: pointer; border: 0; font: inherit; }
.main, .page { min-width: 0; } .page-h .seg { overflow-x: auto; max-width: 100%; flex-wrap: nowrap; scrollbar-width: thin; } .page-h .seg button { flex: none; }
/* Keep wide tab bars and cards inside the page instead of pushing it sideways. */
.page > *, .page-h, .stack, .card, .row { min-width: 0; } .page-h { max-width: 100%; } .page-h > .seg { flex: 0 1 auto; }

.receipt .rc-logo { display: block; width: 70%; max-width: 46mm; height: auto; margin: 0 auto 4px; filter: grayscale(1) contrast(1.4); }
@media print { #print-area .receipt { padding-bottom: 14mm; } }

.ring-bar { position: fixed; right: 16px; bottom: 16px; z-index: 9999; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: #b3261e; color: #fff; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: ringpulse 1s ease-in-out infinite; }
.ring-bar button { border: 0; border-radius: 8px; padding: 6px 12px; font-weight: 700; background: #fff; color: #b3261e; cursor: pointer; }
@keyframes ringpulse { 50% { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .ring-bar { animation: none; } }

.sync-bar { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 9998; max-width: min(92vw, 760px); padding: 10px 16px; border-radius: 12px; background: #8a1c14; color: #fff; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* the platform's order id is what the rider and the partner app ask for: print it heavy and a little larger */
.receipt .rc-pid, .receipt .rc-pid span { font-weight: 900; font-size: 1.15em; }
@media print { .receipt .rc-pid, .receipt .rc-pid span { font-weight: 900 !important; } }

#print-area .slip-page { break-after: page; padding: 8mm; font-size: 12px; color: #000; }
#print-area .slip-page:last-child { break-after: auto; }
#print-area .slip .muted { color: #444; }

.cust-pair{position:relative}.suggest{position:absolute;left:0;right:0;top:100%;z-index:30;background:var(--card,#fff);border:1px solid var(--line,#ddd);border-radius:12px;box-shadow:0 10px 28px #0003;max-height:260px;overflow:auto;margin-top:2px}
.suggest .sg{display:block;width:100%;text-align:left;padding:10px 14px;background:none;border:0;border-bottom:1px solid var(--line,#eee);font:inherit;color:inherit;cursor:pointer}.suggest .sg:last-child{border-bottom:0}.suggest .sg:hover,.suggest .sg:focus{background:rgba(127,127,127,.15)}

/* Menu headings */
.nav .grp { margin: 10px 0 2px; padding: 0 12px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3, #8a8a8a); }
.nav .brand + .grp { margin-top: 0; }
@media (max-width: 1099px) { .nav .grp { margin: 8px 6px 2px; padding: 6px 0 0; border-top: 1px solid var(--line); font-size: 0; } .nav .grp span { display: none; } .nav .brand + .grp { border-top: 0; } }
@media (max-width: 760px) { .nav .grp { flex: 0 0 1px; margin: 8px 4px; padding: 0; border-top: 0; border-left: 1px solid var(--line); align-self: stretch; } .nav .brand + .grp { display: none; } }
.payopt{display:flex;align-items:center;gap:10px;border:1.5px solid var(--line,#e3dccf);border-radius:12px;padding:12px 14px;cursor:pointer;background:#fff}.payopt.on{border-color:#c2371f;background:#fff6f2}.payopt .pt{flex:1;display:flex;flex-direction:column;gap:2px}.payopt input{accent-color:#c2371f}
