/* ==========================================================================
   StayDine — UI for the front desk and the restaurant counter.
   Built for phones and tablets first, in bright reception lighting,
   used one-handed and in a hurry. No external fonts or CDNs: it must load
   on a weak 3G connection in a small town.

   The one memorable thing: rooms are shown as hotel key tags.
   Colour is festive (violet, marigold, pink, teal) but every colour on a
   room, ticket or bill status still means one thing only.
   ========================================================================== */

:root {
  --ink: #1f1a3d;
  --ink-2: #3d3762;
  --muted: #6b6890;
  --paper: #f4f3fb;
  --card: #ffffff;
  --line: #e1def0;
  --line-2: #eeecf7;

  --brand: #5b34e0;          /* primary actions: festive violet */
  --brand-ink: #4322c2;
  --brand-wash: #efeaff;
  --brand-grad: linear-gradient(135deg, #6d3bf5 0%, #5b34e0 45%, #b4237d 100%);

  /* Room status colours: meaning first, bright enough to read across the desk */
  --ready: #0f9d6e;
  --held: #e08a00;
  --busy: #e0244e;
  --dirty: #7c3aed;
  --off: #8b93a7;

  --ready-wash: #e2f8ef;
  --held-wash: #fff3d6;
  --busy-wash: #ffe5ea;
  --dirty-wash: #f0e8ff;
  --off-wash: #eef0f5;

  /* Accent family for sections, categories and figures */
  --c-indigo: #4f46e5; --c-indigo-w: #eceafe;
  --c-teal: #0d9488;   --c-teal-w: #dcf7f3;
  --c-orange: #f2650f; --c-orange-w: #ffeddf;
  --c-pink: #db2777;   --c-pink-w: #fde7f1;
  --c-sky: #0284c7;    --c-sky-w: #dff2fd;
  --c-amber: #d48806;  --c-amber-w: #fff3d6;
  --c-green: #16a34a;  --c-green-w: #dff7e7;
  --c-violet: #7c3aed; --c-violet-w: #f0e8ff;
  --c-rose: #e11d48;   --c-rose-w: #ffe4ea;

  --rainbow: linear-gradient(90deg, #f2650f 0%, #db2777 28%, #7c3aed 55%, #0284c7 80%, #0d9488 100%);

  --danger: #e0244e;
  --veg: #16a34a;
  --nonveg: #c2410c;

  --radius-s: 8px;
  --radius: 12px;
  --radius-l: 18px;
  --shadow: 0 1px 2px rgba(45, 30, 110, .06), 0 4px 14px rgba(45, 30, 110, .06);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --tap: 44px;
  --rail: 236px;
  --tabbar: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ecebf8; --ink-2: #cfcce6; --muted: #9b98ba;
    --paper: #14112a; --card: #1e1a38; --line: #322d55; --line-2: #28244a;
    --brand: #8b6bff; --brand-ink: #b6a3ff; --brand-wash: #2b2357;
    --ready: #2fd09a; --held: #ffb84d; --busy: #ff5d7d; --dirty: #a98bff; --off: #8f97ad;
    --ready-wash: #123a30; --held-wash: #3d2f12; --busy-wash: #42182a; --dirty-wash: #2e2357; --off-wash: #2a2742;
    --c-indigo-w: #26245a; --c-teal-w: #123a38; --c-orange-w: #43260f; --c-pink-w: #45173a; --c-sky-w: #12324a;
    --c-amber-w: #3d2f12; --c-green-w: #153a24; --c-violet-w: #2e2357; --c-rose-w: #42182a;
    --danger: #ff5d7d; --veg: #3fd06a; --nonveg: #ff8a4d;
    --shadow: 0 1px 2px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .98rem; }
p { margin: 0 0 .75rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --------------------------------------------------------------- App shell */
.shell { min-height: 100vh; }
.rail { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem; min-height: 56px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.topbar .hotel-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.main { padding: 1rem 1rem calc(var(--tabbar) + 1.5rem); max-width: 1280px; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--line);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: inherit; font-size: .72rem; color: var(--muted); background: none; border: 0; cursor: pointer;
}
.tabbar svg { width: 24px; height: 24px; }
.tabbar .active { color: var(--brand-ink); font-weight: 600; }
.tabbar a:hover { text-decoration: none; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--rail) 1fr; }
  .rail {
    display: flex; flex-direction: column; gap: .25rem;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 1rem .75rem; background: var(--ink); color: #dfe5ec;
  }
  .rail .brand { display: flex; align-items: center; gap: .5rem; padding: .25rem .5rem 1rem; color: #fff; font-weight: 700; }
  .rail .group { margin: .9rem .5rem .25rem; font-size: .78rem; color: #93a0b2; }
  .rail a {
    display: flex; align-items: center; gap: .7rem;
    padding: .55rem .6rem; border-radius: var(--radius-s); color: #dfe5ec; font-size: .94rem;
  }
  .rail a svg { width: 20px; height: 20px; opacity: .85; flex: none; }
  .rail a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
  .rail a.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
  .rail .foot { margin-top: auto; padding: .75rem .5rem 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: #93a0b2; }
  .rail .foot button { color: #dfe5ec; }
  .tabbar { display: none; }
  .topbar .menu-btn { display: none; }
  .main { padding: 1.25rem 1.75rem 2.5rem; }
}

/* --------------------------------------------------------------- Page header */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1rem; }
.page-head .titles { flex: 1 1 260px; min-width: 0; }
.page-head .sub { color: var(--muted); margin-top: .2rem; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: var(--tap); padding: .55rem 1rem;
  font: inherit; font-weight: 600; line-height: 1.1;
  color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn-danger:hover { background: var(--busy-wash); border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--line-2); border-color: transparent; }
.btn-whatsapp { background: #1f9e53; border-color: #1f9e53; color: #fff; }
.btn-whatsapp:hover { background: #17823f; border-color: #17823f; }
.btn-sm { min-height: 34px; padding: .35rem .7rem; font-size: .88rem; }
.btn-lg { min-height: 54px; padding: .75rem 1.25rem; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.icon-btn { width: var(--tap); padding: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-ink); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* --------------------------------------------------------------- Cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 1rem; }
.card-head { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { flex: 1; }
.card + .card, .card + .stack, .stack + .card { margin-top: 1rem; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.split { display: grid; gap: 1rem; }
.split > *, .stack > * { min-width: 0; }   /* a wide table scrolls inside its card instead of pushing the page sideways */
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; } }

/* Figures on the dashboard: number large, label small and plain. */
.figure { padding: .9rem 1rem; }
.figure .value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.figure .label { color: var(--muted); font-size: .88rem; }
.figure .meter { height: 6px; background: var(--line-2); border-radius: 3px; margin-top: .55rem; overflow: hidden; }
.figure .meter span { display: block; height: 100%; background: var(--busy); border-radius: 3px; }

/* --------------------------------------------------------------- Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-top: 1px solid var(--line-2); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.list .meta { color: var(--muted); font-size: .88rem; }
.list a.row-link { color: inherit; display: contents; }
.empty { padding: 1.5rem 1rem; color: var(--muted); text-align: center; }
.empty .btn { margin-top: .75rem; }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--line-2); color: var(--ink-2); font-weight: 700; font-size: .85rem;
}

/* --------------------------------------------------------------- Tables (stack on phones) */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .65rem .8rem; text-align: left; border-top: 1px solid var(--line-2); vertical-align: top; }
.table th { font-size: .82rem; color: var(--muted); font-weight: 600; border-top: 0; background: var(--paper); }
.table td.right, .table th.right { text-align: right; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.table tr.voided td { color: var(--muted); text-decoration: line-through; }
@media (max-width: 699px) {
  table.stack-sm thead { display: none; }
  table.stack-sm tr { display: block; padding: .6rem .8rem; border-top: 1px solid var(--line-2); }
  table.stack-sm td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .2rem 0; text-align: right; }
  table.stack-sm td::before { content: attr(data-label); color: var(--muted); text-align: left; font-size: .85rem; }
  table.stack-sm td.full { display: block; text-align: left; }
  table.stack-sm td.full::before { content: none; }
}

/* --------------------------------------------------------------- Badges & chips */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .12rem .5rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; line-height: 1.5;
  background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.badge.ready, .badge.paid, .badge.checked_in { background: var(--ready-wash); color: var(--ready); }
.badge.held, .badge.reserved, .badge.partial, .badge.billed { background: var(--held-wash); color: var(--held); }
.badge.busy, .badge.unpaid, .badge.cancelled, .badge.overdue { background: var(--busy-wash); color: var(--busy); }
.badge.dirty, .badge.moved_to_room { background: var(--dirty-wash); color: var(--dirty); }
.badge.off, .badge.checked_out, .badge.no_show { background: var(--off-wash); color: var(--muted); }
.badge.vip { background: var(--held-wash); color: var(--held); }

.tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; margin-bottom: 1rem; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  flex: none; padding: .45rem .9rem; border-radius: 999px; min-height: 38px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink-2);
  font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
}
.tabs a:hover { text-decoration: none; border-color: var(--muted); }
.tabs .active { background: var(--ink); border-color: var(--ink); color: var(--card); }
.tabs .count { font-size: .78rem; opacity: .8; }

/* Veg / non-veg mark, as printed on Indian menus */
.veg-mark { display: inline-grid; place-items: center; width: 14px; height: 14px; border: 1.5px solid var(--veg); border-radius: 2px; flex: none; }
.veg-mark::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--veg); }
.veg-mark.non { border-color: var(--nonveg); }
.veg-mark.non::after { background: var(--nonveg); border-radius: 0; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid var(--nonveg); background: none; }

/* --------------------------------------------------------------- Forms */
.form-grid { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .span-2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field > label, .label { font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .error { font-size: .82rem; color: var(--danger); }
.input, select.input, textarea.input {
  width: 100%; min-height: var(--tap); padding: .55rem .75rem;
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  appearance: none;
}
textarea.input { min-height: 80px; resize: vertical; }
select.input {
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23647184' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.input.is-invalid { border-color: var(--danger); }
.input-group { display: flex; }
.input-group .input { border-radius: 0; }
.input-group > :first-child { border-radius: var(--radius-s) 0 0 var(--radius-s); }
.input-group > :last-child { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.input-group .addon { display: grid; place-items: center; padding: 0 .7rem; background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.input-group .addon:first-child { border-right: 0; }
.check { display: flex; align-items: center; gap: .55rem; min-height: var(--tap); cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 650; margin-bottom: .6rem; }
.section-title { font-size: .95rem; font-weight: 650; margin: 1.25rem 0 .7rem; }

/* Segmented control for payment mode, booking source, etc. */
.segmented { display: flex; flex-wrap: wrap; gap: .4rem; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .85rem;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card);
  font-weight: 500; cursor: pointer;
}
.segmented input:checked + label { border-color: var(--brand); background: var(--brand-wash); color: var(--brand-ink); font-weight: 650; }
.segmented input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }

/* --------------------------------------------------------------- Flash & banners */
.flash { display: flex; gap: .65rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-s); margin-bottom: 1rem; border: 1px solid; }
.flash.success { background: var(--ready-wash); border-color: color-mix(in srgb, var(--ready) 30%, transparent); color: var(--ink); }
.flash.error { background: var(--busy-wash); border-color: color-mix(in srgb, var(--busy) 30%, transparent); color: var(--ink); }
.flash.info { background: var(--held-wash); border-color: color-mix(in srgb, var(--held) 30%, transparent); color: var(--ink); }
.flash .grow { flex: 1; }
.flash ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.plan-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .55rem 1rem; background: var(--held-wash); color: var(--ink); font-size: .9rem; border-bottom: 1px solid var(--line); }
.plan-banner.ended { background: var(--busy-wash); }

/* --------------------------------------------------------------- Dialogs (bottom sheet on phones) */
dialog.sheet {
  width: min(560px, 100vw); max-height: 92vh; padding: 0; border: 0;
  border-radius: var(--radius-l); background: var(--card); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
dialog.sheet::backdrop { background: rgba(18, 24, 32, .5); }
dialog.sheet .sheet-head { display: flex; align-items: center; gap: .5rem; padding: 1rem 1rem .5rem; }
dialog.sheet .sheet-head h2 { flex: 1; }
dialog.sheet .sheet-body { padding: .5rem 1rem 1.25rem; overflow-y: auto; }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: var(--radius-l) var(--radius-l) 0 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.sheet[open] { animation: sheet-up .2s ease-out; }
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }

/* "More" menu on phones */
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.more-grid a, .more-grid button {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .9rem .4rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink);
  font: inherit; font-size: .85rem; text-align: center; cursor: pointer;
}
.more-grid svg { width: 24px; height: 24px; color: var(--brand-ink); }
.more-grid a:hover { text-decoration: none; border-color: var(--muted); }

/* ==========================================================================
   Room key tags
   Each room is a key fob: a punched hole, the room number large, status as
   the tag's colour. Readable from arm's length on a counter tablet.
   ========================================================================== */
.floor-label { display: flex; align-items: center; gap: .6rem; margin: 1.25rem 0 .6rem; color: var(--muted); font-size: .88rem; font-weight: 600; }
.floor-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.keyboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .7rem; }
@media (max-width: 420px) { .keyboard { grid-template-columns: repeat(3, 1fr); gap: .5rem; } }

.keytag {
  --c: var(--ready); --w: var(--ready-wash);
  position: relative; display: flex; flex-direction: column;
  min-height: 132px; padding: 1.55rem .6rem .6rem;
  background: var(--card); color: var(--ink);
  border: 1.5px solid color-mix(in srgb, var(--c) 45%, var(--line));
  border-top: 7px solid var(--c);
  border-radius: 10px 10px 22px 22px;
  text-align: center; cursor: pointer; font: inherit;
  transition: transform .12s, box-shadow .12s;
}
.keytag::before {          /* the punched hole */
  content: ""; position: absolute; top: .45rem; left: 50%; translate: -50% 0;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 1px 2px rgba(0,0,0,.18);
  border: 1.5px solid color-mix(in srgb, var(--c) 45%, var(--line));
}
.keytag:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(30,42,59,.1); text-decoration: none; }
.keytag .no { font-size: 1.7rem; font-weight: 750; letter-spacing: -.02em; line-height: 1; margin-top: .15rem; }
.keytag .type { font-size: .76rem; color: var(--muted); margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keytag .state {
  margin-top: auto; padding: .22rem .3rem; border-radius: 6px 6px 14px 14px;
  background: var(--w); color: var(--c); font-size: .78rem; font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.keytag .who { font-size: .8rem; color: var(--ink-2); margin: .35rem 0 .35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.keytag.reserved { --c: var(--held); --w: var(--held-wash); }
.keytag.occupied { --c: var(--busy); --w: var(--busy-wash); }
.keytag.dirty { --c: var(--dirty); --w: var(--dirty-wash); }
.keytag.maintenance { --c: var(--off); --w: var(--off-wash); }
.keytag.maintenance .no { color: var(--muted); }
.keytag .flag { position: absolute; top: .35rem; right: .45rem; font-size: .7rem; font-weight: 700; color: var(--busy); }

.legend { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.legend a { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-size: .88rem; }
.legend a:hover { text-decoration: none; border-color: var(--muted); }
.legend a.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ==========================================================================
   POS
   ========================================================================== */
.table-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; }
.table-tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: .3rem;
  min-height: 96px; padding: .7rem; border-radius: var(--radius);
  background: var(--card); border: 1.5px dashed var(--line); color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
}
.table-tile:hover { border-color: var(--muted); text-decoration: none; }
.table-tile .name { font-size: 1.15rem; font-weight: 700; }
.table-tile .info { font-size: .8rem; color: var(--muted); }
.table-tile.busy { border-style: solid; border-color: color-mix(in srgb, var(--busy) 50%, var(--line)); background: var(--busy-wash); }
.table-tile.busy .amt { font-weight: 700; color: var(--busy); }
.table-tile.billed { border-style: solid; border-color: color-mix(in srgb, var(--held) 50%, var(--line)); background: var(--held-wash); }

.pos { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.pos > * { min-width: 0; }
@media (min-width: 900px) { .pos { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } }
.pos-menu .menu-tools { display: flex; gap: .5rem; margin-bottom: .75rem; position: sticky; top: 56px; z-index: 5; background: var(--paper); padding: .25rem 0 .5rem; }
.pos-menu .menu-tools .input { flex: 1; }
.cat-tabs { position: sticky; top: 112px; z-index: 5; background: var(--paper); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; }
.menu-item {
  position: relative; display: flex; flex-direction: column; gap: .25rem; min-height: 84px;
  padding: .65rem .7rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; user-select: none;
}
.menu-item:hover { border-color: var(--brand); }
.menu-item:active { background: var(--brand-wash); }
.menu-item .nm { display: flex; gap: .4rem; align-items: flex-start; font-weight: 600; line-height: 1.25; padding-right: 2.2rem; }
.menu-item .nm .veg-mark { margin-top: 3px; }
.menu-item .pr { margin-top: auto; color: var(--ink-2); font-size: .9rem; }
.menu-item .code { position: absolute; top: .35rem; right: .5rem; font-size: .7rem; color: var(--muted); }
.menu-item .in-cart { position: absolute; bottom: .45rem; right: .5rem; min-width: 24px; height: 24px; padding: 0 .4rem; border-radius: 12px; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
.menu-item.sold-out { opacity: .45; cursor: not-allowed; }
.menu-item.sold-out .pr::after { content: " · Sold out"; color: var(--danger); font-weight: 600; }

.ticket { position: sticky; top: 72px; }
.ticket .lines { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.ticket .line { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; padding: .6rem 1rem; border-top: 1px solid var(--line-2); }
.ticket .line .nm { font-weight: 600; }
.ticket .line .sub { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); }
.ticket .line.new { background: var(--brand-wash); }
.ticket .kot-sep { padding: .35rem 1rem; font-size: .78rem; color: var(--muted); background: var(--paper); border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: var(--card); font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--line-2); }
.stepper span { min-width: 28px; text-align: center; font-weight: 700; }
.totals { padding: .75rem 1rem; border-top: 1px solid var(--line); }
.totals .row { display: flex; justify-content: space-between; padding: .12rem 0; color: var(--ink-2); }
.totals .row.grand { font-size: 1.25rem; font-weight: 750; color: var(--ink); padding-top: .35rem; }
.ticket-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .75rem 1rem 1rem; }
.ticket-actions .wide { grid-column: 1 / -1; }
.ticket-actions .btn { white-space: normal; min-width: 0; text-align: center; }
.bill-due { display: flex; gap: .6rem; align-items: center; margin: .5rem 1rem 0; padding: .65rem .8rem; border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 9%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 25%, var(--line)); }
.bill-due strong { font-size: 1.05rem; }
.take-pay { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
[data-needs-empty-cart].disabled { opacity: .45; pointer-events: none; }
.content { min-width: 0; }

/* Phone: the ticket becomes a bar at the bottom that opens into a sheet */
.cart-bar { display: none; }
@media (max-width: 899px) {
  .ticket { position: static; }
  .pos .ticket-panel { display: none; }
  .pos .ticket-panel.open { display: block; position: fixed; inset: 56px 0 0 0; z-index: 45; overflow-y: auto; background: var(--paper); padding: .75rem; }
  .cart-bar {
    display: flex; align-items: center; gap: .75rem;
    position: fixed; left: .6rem; right: .6rem; bottom: calc(var(--tabbar) + .6rem + env(safe-area-inset-bottom)); z-index: 41;
    padding: .7rem .9rem; border-radius: var(--radius); background: var(--ink); color: var(--card);
    box-shadow: 0 8px 24px rgba(0,0,0,.25); border: 0; font: inherit; cursor: pointer; text-align: left;
  }
  .cart-bar .grow { flex: 1; }
  .cart-bar b { font-size: 1.05rem; }
}

/* ==========================================================================
   Kitchen display: dark, huge, glanceable from the stove
   ========================================================================== */
body.kitchen { background: #10151c; color: #eef2f6; }
.kds-head { display: flex; align-items: center; gap: 1rem; padding: .75rem 1rem; background: #0b0f14; position: sticky; top: 0; z-index: 5; }
.kds-head h1 { font-size: 1.15rem; flex: 1; }
.kds-head .clock { font-size: 1.4rem; font-weight: 700; }
.kds-head a, .kds-head button { color: #b9c4d1; }
.kds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; padding: 1rem; }
.kot {
  display: flex; flex-direction: column; border-radius: 12px; background: #1b232e; border-top: 8px solid #e3a33b;
  overflow: hidden; color: #eef2f6;
}
.kot.preparing { border-top-color: #4aa3df; }
.kot.ready { border-top-color: #2fb38c; opacity: .8; }
.kot.late { box-shadow: 0 0 0 3px #e06a5c inset; }
.kot .kot-top { display: flex; align-items: baseline; gap: .5rem; padding: .7rem .9rem .4rem; }
.kot .kot-no { font-size: 1.6rem; font-weight: 800; }
.kot .kot-where { flex: 1; font-size: 1.05rem; font-weight: 600; }
.kot .kot-running { margin: 0 .9rem .3rem; padding: .25rem .55rem; border-radius: 6px; background: #7c3aed; color: #fff; font-size: .8rem; font-weight: 800; letter-spacing: .03em; }
.kot.running { box-shadow: 0 0 0 2px #7c3aed inset; }
.kot .kot-age { font-size: 1rem; font-weight: 700; color: #b9c4d1; }
.kot.late .kot-age { color: #ff8a7a; }
.kot ul { list-style: none; margin: 0; padding: .2rem .9rem .8rem; flex: 1; }
.kot li { display: flex; gap: .6rem; padding: .3rem 0; font-size: 1.15rem; border-top: 1px dashed #2f3a48; }
.kot li:first-child { border-top: 0; }
.kot li b { min-width: 2.2rem; color: #ffd27a; }
.kot li .note { display: block; font-size: .9rem; color: #ffb38a; }
.kot li.void { text-decoration: line-through; color: #6b7686; }
.kot button.advance {
  border: 0; padding: 1rem; font: inherit; font-size: 1.1rem; font-weight: 750; cursor: pointer;
  background: #263140; color: #fff;
}
.kot.new button.advance { background: #e3a33b; color: #1b1b1b; }
.kot.preparing button.advance { background: #2fb38c; color: #0b1a14; }
.kds-empty { padding: 4rem 1rem; text-align: center; color: #7d8898; font-size: 1.2rem; }

/* ==========================================================================
   Guest pages (login, register, landing)
   ========================================================================== */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.auth .box { width: min(440px, 100%); }
.auth .logo { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.25rem; font-weight: 750; font-size: 1.25rem; }
.auth .card-body { padding: 1.5rem; }
.logo-mark { width: 34px; height: 34px; flex: none; }

/* ==========================================================================
   Print: A4 invoice, 80 mm thermal bill, KOT
   ========================================================================== */
.print-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; padding: .75rem; background: var(--ink); position: sticky; top: 0; }
.print-toolbar .btn { background: var(--card); }
.print-toolbar .btn-primary { background: var(--brand); }
.paper { background: #fff; color: #111; margin: 1rem auto; box-shadow: var(--shadow); }
.a4 { width: min(210mm, 100%); min-height: 297mm; padding: 14mm 14mm; font-size: 12.5px; }
.a4 h1 { font-size: 20px; }
.a4 .inv-head { display: flex; justify-content: space-between; gap: 1.5rem; padding-bottom: 10px; border-bottom: 2px solid #111; }
.a4 .inv-head img { max-height: 56px; }
.a4 .inv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 14px 0; }
.a4 .inv-meta .box { border: 1px solid #ccc; padding: 8px 10px; border-radius: 4px; }
.a4 .inv-meta .lbl { font-size: 11px; color: #555; }
.a4 table { width: 100%; border-collapse: collapse; }
.a4 th, .a4 td { border: 1px solid #ccc; padding: 6px 7px; text-align: left; vertical-align: top; }
.a4 th { background: #f1f1f1; font-size: 11.5px; }
.a4 td.r, .a4 th.r { text-align: right; }
.a4 .grand td { font-size: 14px; font-weight: 700; }
.a4 .words { margin-top: 8px; font-style: italic; }
.a4 .foot { display: flex; justify-content: space-between; gap: 2rem; margin-top: 28px; }
.a4 .sign { text-align: center; border-top: 1px solid #111; padding-top: 4px; min-width: 180px; margin-top: 40px; }
.a4 .stamp { display: inline-block; padding: 3px 10px; border: 2px solid; border-radius: 4px; font-weight: 800; font-size: 13px; transform: rotate(-4deg); }
.a4 .stamp.paid { color: #0e7a5f; }
.a4 .stamp.due { color: #b5392d; }

.thermal { width: 80mm; max-width: 100%; padding: 4mm 3mm; font: 12px/1.35 "Courier New", ui-monospace, monospace; }
.thermal .c { text-align: center; }
.thermal .r { text-align: right; }
.thermal .b { font-weight: 700; }
.thermal .big { font-size: 15px; }
.thermal .huge { font-size: 22px; font-weight: 800; }
.thermal hr { border: 0; border-top: 1px dashed #111; margin: 5px 0; }
.thermal table { width: 100%; border-collapse: collapse; }
.thermal td { padding: 1px 0; vertical-align: top; }
.thermal .qr { display: block; margin: 6px auto; width: 38mm; height: 38mm; }

@media print {
  @page { margin: 0; }
  body { background: #fff !important; }
  .print-toolbar, .no-print { display: none !important; }
  .paper { margin: 0; box-shadow: none; }
  .a4 { width: 210mm; }
  .thermal { width: 80mm; }
}

/* ==========================================================================
   Landing page
   ========================================================================== */
.landing { background: var(--card); }
.landing .nav { display: flex; align-items: center; gap: 1rem; max-width: 1120px; margin: 0 auto; padding: 1rem 1.25rem; }
.landing .nav .logo { display: flex; align-items: center; gap: .55rem; font-weight: 750; font-size: 1.15rem; color: var(--ink); flex: 1; }
.landing .hero { max-width: 1120px; margin: 0 auto; padding: 2rem 1.25rem 3rem; display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .landing .hero { grid-template-columns: 1.05fr 1fr; padding-top: 3.5rem; } }
.landing .hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 780; max-width: 15ch; }
.landing .hero p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 46ch; margin: 1rem 0 1.5rem; }
.landing .hero .cta { display: flex; flex-wrap: wrap; gap: .6rem; }
.landing .demo-board { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 1.1rem; }
.landing .demo-board .keyboard { grid-template-columns: repeat(4, 1fr); gap: .55rem; }
.landing .demo-board .keytag { min-height: 112px; cursor: default; }
.landing .demo-board .keytag:hover { transform: none; box-shadow: none; }
.landing section.band { max-width: 1120px; margin: 0 auto; padding: 2.5rem 1.25rem; }
.landing section.band h2 { font-size: 1.6rem; letter-spacing: -.02em; margin-bottom: 1.25rem; max-width: 30ch; }
.landing .feature-list { display: grid; gap: 1.25rem 2rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .landing .feature-list { grid-template-columns: repeat(3, 1fr); } }
.landing .feature-list h3 { margin-bottom: .35rem; }
.landing .feature-list p { color: var(--ink-2); }
.landing .day { display: grid; gap: 0; border-left: 3px solid var(--line); margin-left: .4rem; }
.landing .day > div { position: relative; padding: 0 0 1.25rem 1.25rem; }
.landing .day > div::before { content: ""; position: absolute; left: -8.5px; top: .3rem; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--brand); }
.landing .day time { font-weight: 700; color: var(--brand-ink); }
.landing .plans { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .landing .plans { grid-template-columns: repeat(3, 1fr); } }
.landing .plan { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--card); }
.landing .plan.pick { border: 2px solid var(--brand); }
.landing .plan .price { font-size: 2rem; font-weight: 780; letter-spacing: -.02em; margin: .4rem 0; }
.landing .plan ul { padding-left: 1.1rem; color: var(--ink-2); margin: .75rem 0 1rem; }
.landing footer { border-top: 1px solid var(--line); padding: 1.5rem 1.25rem; text-align: center; color: var(--muted); font-size: .9rem; }

/* ==========================================================================
   Colour layer
   Festive and bright, but structured: every section, category and figure
   gets one accent from the family above, and status colours keep one meaning.
   ========================================================================== */

/* Tone helpers: put tone-* on a card, figure or chip */
.tone-indigo { --tc: var(--c-indigo); --tw: var(--c-indigo-w); }
.tone-teal   { --tc: var(--c-teal);   --tw: var(--c-teal-w); }
.tone-orange { --tc: var(--c-orange); --tw: var(--c-orange-w); }
.tone-pink   { --tc: var(--c-pink);   --tw: var(--c-pink-w); }
.tone-sky    { --tc: var(--c-sky);    --tw: var(--c-sky-w); }
.tone-amber  { --tc: var(--c-amber);  --tw: var(--c-amber-w); }
.tone-green  { --tc: var(--c-green);  --tw: var(--c-green-w); }
.tone-violet { --tc: var(--c-violet); --tw: var(--c-violet-w); }
.tone-rose   { --tc: var(--c-rose);   --tw: var(--c-rose-w); }

.chip-icon {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--tw, var(--brand-wash)); color: var(--tc, var(--brand));
}
.chip-icon svg { width: 20px; height: 20px; }
.card[class*="tone-"] { border-top: 4px solid var(--tc); }

/* Body gets a soft wash of colour behind the cards */
body:not(.kitchen):not(.landing) {
  background:
    radial-gradient(1200px 500px at 100% -10%, color-mix(in srgb, var(--c-pink) 9%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--c-sky) 8%, transparent), transparent 60%),
    var(--paper);
  background-attachment: fixed;
}

/* Rail: deep indigo to plum, each item with its own coloured icon chip */
@media (min-width: 900px) {
  .rail { background: linear-gradient(185deg, #241a63 0%, #34208a 50%, #63206f 100%); }
  .rail .brand { font-size: 1.1rem; }
  .rail .group { color: #b9b1e6; }
  .rail a { color: #e8e4ff; padding: .45rem .55rem; border-radius: 12px; }
  .rail a .nav-ico {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex: none;
    background: color-mix(in srgb, var(--c) 30%, transparent); color: #fff;
  }
  .rail a .nav-ico svg { width: 18px; height: 18px; opacity: 1; }
  .rail a:hover { background: rgba(255, 255, 255, .09); }
  .rail a.active { background: #fff; color: #241a63; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
  .rail a.active .nav-ico { background: var(--c); }
  .rail .foot { border-top-color: rgba(255, 255, 255, .14); color: #c9c2f0; }
}

/* Top bar: a thin festive strip along the bottom edge */
.topbar { border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--rainbow); }

/* Buttons */
.btn-primary { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-primary:hover { background: var(--brand-grad); border-color: transparent; filter: brightness(1.08); }
.btn:not(.btn-primary):not(.btn-whatsapp):not(.btn-ghost):not(.btn-danger):hover { border-color: var(--brand); color: var(--brand-ink); }

/* Tabs and legends */
.tabs .active { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 30%, transparent); }
.legend a { font-weight: 550; }
.legend a i { width: 12px; height: 12px; border-radius: 50%; }
.legend a.active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand-ink); }

/* Figures: tinted, with the number in the tone colour */
.figure[class*="tone-"] {
  position: relative; overflow: hidden; border-top: 0;
  background: linear-gradient(150deg, var(--tw) 0%, var(--card) 75%);
  border-color: color-mix(in srgb, var(--tc) 22%, var(--line));
}
.figure[class*="tone-"] .value { color: var(--tc); }
.figure .fig-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; }
.figure[class*="tone-"] .meter span { background: var(--tc); }

/* Lists: colourful initials */
.avatar { background: var(--brand-wash); color: var(--brand-ink); }
.list > li:nth-child(6n+2) .avatar { background: var(--c-orange-w); color: var(--c-orange); }
.list > li:nth-child(6n+3) .avatar { background: var(--c-teal-w); color: var(--c-teal); }
.list > li:nth-child(6n+4) .avatar { background: var(--c-pink-w); color: var(--c-pink); }
.list > li:nth-child(6n+5) .avatar { background: var(--c-sky-w); color: var(--c-sky); }
.list > li:nth-child(6n) .avatar { background: var(--c-amber-w); color: var(--c-amber); }

/* Key tags: tinted tag, solid status pill */
.keytag { background: linear-gradient(180deg, var(--w) 0%, var(--card) 62%); border-top-width: 8px; }
.keytag .state { background: var(--c); color: #fff; box-shadow: 0 3px 8px color-mix(in srgb, var(--c) 35%, transparent); }
.keytag .no { color: var(--ink); }
.keytag::before { background: var(--card); }

/* Restaurant floor */
.table-tile { background: var(--c-green-w); border-color: color-mix(in srgb, var(--c-green) 45%, var(--line)); }
.table-tile .name { color: var(--c-green); }
.table-tile.busy { background: linear-gradient(150deg, var(--c-orange-w), var(--card)); border-color: var(--c-orange); }
.table-tile.busy .name, .table-tile.busy .amt { color: var(--c-orange); }
.table-tile.billed { background: linear-gradient(150deg, var(--c-amber-w), var(--card)); border-color: var(--c-amber); }
.floor-label { color: var(--brand-ink); }

/* Menu: each category has its own colour stripe (set by pos.js as --cat) */
.menu-item { border-left: 5px solid var(--cat, var(--brand)); }
.menu-item:hover { border-color: var(--cat, var(--brand)); background: color-mix(in srgb, var(--cat, var(--brand)) 6%, var(--card)); }
.menu-item .in-cart { background: var(--cat, var(--brand)); }
.cat-tabs button { border-color: color-mix(in srgb, var(--cat, var(--line)) 45%, var(--line)); }
.cat-tabs button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--cat, var(--brand)); }
.cat-tabs button.active { background: var(--cat, var(--brand)); border-color: transparent; color: #fff; box-shadow: none; }
.cat-tabs button.active::before { background: #fff; }

/* Order ticket: coloured head */
.ticket .card-head { background: var(--brand-grad); color: #fff; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; border-bottom: 0; }
.ticket .card-head .btn-ghost { color: #fff; }
.ticket .line.new { background: var(--brand-wash); }
.totals .row.grand { color: var(--brand-ink); }
.cart-bar { background: var(--brand-grad); }

/* Sheets: festive strip on top */
dialog.sheet { overflow: hidden; }
dialog.sheet::before { content: ""; display: block; height: 5px; background: var(--rainbow); }

/* Phone tab bar: active item gets a coloured pill */
.tabbar a.active svg, .tabbar button.active svg { background: var(--brand-wash); border-radius: 10px; padding: 3px; width: 34px; height: 30px; }

/* Flash messages */
.flash { border-left-width: 5px; }
.flash.success { border-left-color: var(--ready); }
.flash.error { border-left-color: var(--busy); }
.flash.info { border-left-color: var(--held); }

/* Login and sign-up */
.auth {
  background:
    radial-gradient(600px 400px at 0% 0%, color-mix(in srgb, var(--c-orange) 28%, transparent), transparent 70%),
    radial-gradient(600px 400px at 100% 10%, color-mix(in srgb, var(--c-pink) 26%, transparent), transparent 70%),
    radial-gradient(700px 500px at 50% 110%, color-mix(in srgb, var(--c-violet) 30%, transparent), transparent 70%),
    var(--paper);
}
.auth .card { border: 0; box-shadow: 0 20px 50px rgba(45, 30, 110, .18); overflow: hidden; }
.auth .card::before { content: ""; display: block; height: 6px; background: var(--rainbow); }

/* Landing */
.landing .hero h1 { background: linear-gradient(100deg, #2a1b6e 10%, #7c3aed 55%, #db2777 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing .demo-board { background: linear-gradient(160deg, var(--c-violet-w), var(--c-orange-w)); border: 0; box-shadow: 0 20px 50px rgba(45, 30, 110, .15); }
.landing .plan.pick { border: 2px solid var(--brand); box-shadow: 0 16px 40px color-mix(in srgb, var(--brand) 20%, transparent); }
.landing .feature-list > div { padding: 1rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--fc, var(--brand)); }
.landing .feature-list > div:nth-child(6n+1) { --fc: var(--c-violet); }
.landing .feature-list > div:nth-child(6n+2) { --fc: var(--c-orange); }
.landing .feature-list > div:nth-child(6n+3) { --fc: var(--c-teal); }
.landing .feature-list > div:nth-child(6n+4) { --fc: var(--c-pink); }
.landing .feature-list > div:nth-child(6n+5) { --fc: var(--c-sky); }
.landing .feature-list > div:nth-child(6n) { --fc: var(--c-amber); }
.landing section.band:nth-of-type(2) { background: transparent; }

/* ==========================================================================
   Print settings page
   ========================================================================== */
.print-layout { display: grid; gap: 1.25rem; }
@media (min-width: 1000px) { .print-layout { grid-template-columns: minmax(0, 1fr) 260px; align-items: start; } }

.paper-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.paper-pick input { position: absolute; opacity: 0; pointer-events: none; }
.paper-pick label {
  display: flex; flex-direction: column; align-items: center; gap: .4rem; min-width: 96px;
  padding: .65rem .6rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--card);
  font-size: .85rem; font-weight: 550; cursor: pointer; text-align: center;
}
.paper-pick input:checked + label { border-color: var(--tc, var(--brand)); background: var(--tw, var(--brand-wash)); color: var(--tc, var(--brand-ink)); }
.paper-pick input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.paper-shape { display: block; background: var(--card); border: 1.5px solid currentColor; border-radius: 3px; opacity: .8; }
.paper-a4 { width: 28px; height: 38px; }
.paper-a5 { width: 24px; height: 32px; }
.paper-a4half { width: 28px; height: 38px; background: linear-gradient(transparent 48%, currentColor 48%, currentColor 52%, transparent 52%); }
.paper-80mm { width: 18px; height: 40px; border-bottom-style: dashed; }
.paper-58mm { width: 13px; height: 40px; border-bottom-style: dashed; }

.switch-list { display: grid; gap: .2rem .9rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .switch-list { grid-template-columns: repeat(2, 1fr); } }
.switch { display: flex; align-items: center; gap: .65rem; min-height: 40px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 42px; height: 24px; flex: none; border-radius: 12px; background: var(--line); transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .track { background: var(--tc, var(--brand)); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

.more-opts { border: 1px dashed var(--line); border-radius: var(--radius); padding: .7rem .9rem; }
.more-opts summary { cursor: pointer; font-weight: 600; color: var(--tc, var(--brand-ink)); }

.bill-sketch-wrap { position: sticky; top: 80px; display: grid; place-items: center; padding: 1rem; border-radius: var(--radius); background: repeating-linear-gradient(45deg, var(--tw, var(--brand-wash)) 0 10px, var(--card) 10px 20px); }
.bill-sketch {
  width: 210px; min-height: 290px; padding: 14px 12px; background: #fff; color: #222; border-radius: 4px;
  box-shadow: 0 10px 24px rgba(0,0,0,.14); font: 9.5px/1.35 var(--font); transition: width .2s;
}
.bill-sketch[data-paper="a5"] { width: 180px; min-height: 250px; }
.bill-sketch[data-paper="80mm"], .bill-sketch[data-paper="58mm"] { font-family: "Courier New", ui-monospace, monospace; text-align: center; border-radius: 0; }
.bill-sketch[data-paper="80mm"] { width: 150px; }
.bill-sketch[data-paper="58mm"] { width: 112px; font-size: 8.5px; }
.bill-sketch .off { display: none !important; }
.bill-sketch .sk-logo { width: 26px; height: 26px; border-radius: 6px; background: var(--brand-grad); margin: 0 0 6px; }
.bill-sketch[data-paper$="mm"] .sk-logo { margin: 0 auto 6px; }
.bill-sketch .sk-name { font-weight: 800; font-size: 11px; }
.bill-sketch .sk-title { font-weight: 700; margin: 6px 0 4px; padding: 3px 0; border-top: 1px solid #222; border-bottom: 1px solid #222; text-transform: uppercase; letter-spacing: .04em; }
.bill-sketch .sk-note { font-style: italic; color: #555; margin: 4px 0; }
.bill-sketch .sk-line { color: #444; }
.bill-sketch .sk-line.short { opacity: .85; }
.bill-sketch .sk-items { margin: 6px 0; border-top: 1px dashed #999; border-bottom: 1px dashed #999; padding: 4px 0; text-align: left; }
.bill-sketch .sk-items div { display: flex; justify-content: space-between; gap: 6px; }
.bill-sketch .sk-sac { color: #777; font-size: 8px; }
.bill-sketch .sk-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 11px; margin: 4px 0; }
.bill-sketch .sk-qr { width: 44px; height: 44px; margin: 6px auto; background:
  conic-gradient(#222 25%, #fff 0 50%, #222 0 75%, #fff 0) 0 0 / 11px 11px; border: 3px solid #222; }
.bill-sketch .sk-sign { margin-top: 14px; padding-top: 3px; border-top: 1px solid #222; width: 60%; margin-left: auto; text-align: center; }
.bill-sketch[data-paper$="mm"] .sk-sign { margin-left: auto; margin-right: auto; }

.save-bar {
  position: sticky; bottom: calc(var(--tabbar) + .5rem); z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .75rem 1rem; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(45,30,110,.12);
}
@media (min-width: 900px) { .save-bar { bottom: 1rem; } }

/* Print sizes */
.a4.a5 { width: min(148mm, 100%); min-height: 210mm; padding: 9mm; font-size: 10.5px; }
.a4.a5 h1 { font-size: 16px; }
.thermal.w58 { width: 58mm; font-size: 10.5px; padding: 3mm 2mm; }
.thermal.w58 .huge { font-size: 18px; }
.thermal.kot-large .kot-line td { font-size: 16px; }
.thermal.kot-large .huge { font-size: 26px; }
.copy-name { text-align: right; font-size: 11px; font-weight: 700; color: #555; margin-bottom: 4px; }
.sheet-note { text-align: center; font-style: italic; margin-bottom: 8px; }
.sheet-totals { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 12px; }
.a5 .sheet-totals { grid-template-columns: 1fr; }
.paper + .paper { break-before: page; page-break-before: always; }
@media print {
  .a4.a5 { width: 148mm; }
  .thermal.w58 { width: 58mm; }
}

/* Cards placed in a grid or split are spaced by the grid gap, not by margins */
.grid > .card + .card, .split > .card + .card, .grid > .card, .split > .card { margin-top: 0; }
.menu-item .pr { padding-right: 1.9rem; }

/* GST invoice details */
.readonly-field { display: flex; align-items: center; background: var(--paper); color: var(--ink-2); font-weight: 600; }
.next-number { font-size: .9rem; color: var(--muted); }
.next-number strong { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: var(--tc, var(--brand-ink)); font-size: 1rem; padding: .15rem .45rem; border-radius: 6px; background: var(--tw, var(--brand-wash)); }
.a4 .meta-table { width: auto; margin-left: auto; margin-top: 4px; }
.a4 .meta-table td { border: 0; padding: 1px 0 1px 10px; text-align: right; }
.a4 .meta-table td:first-child { color: #555; }
.a4 { position: relative; }
.void-mark {
  position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg);
  font-size: 72px; font-weight: 900; letter-spacing: .1em; color: rgba(181, 57, 45, .16); pointer-events: none; white-space: nowrap;
}
.copy-name { text-transform: uppercase; letter-spacing: .04em; }
/* Other bill lines: description on its own row, numbers below */
.line-row { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; padding-bottom: .75rem; border-bottom: 1px dashed var(--line); }
.line-row > :first-child { grid-column: 1 / -1; }
@media (max-width: 699px) {
  .line-row { grid-template-columns: 1fr 1fr; }
  .line-row .remove-line { grid-column: 1 / -1; justify-self: end; }
}

/* Reports */
.report-hub { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .report-hub { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .report-hub { grid-template-columns: repeat(3, 1fr); } }
.report-hub .card { margin-top: 0; }
.report-list > li { padding: 0; }
.report-list a.row-link { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; width: 100%; color: inherit; }
.report-list a.row-link:hover { background: var(--tw, var(--brand-wash)); text-decoration: none; }
.report-list a.row-link::after { content: "›"; font-size: 1.3rem; color: var(--tc, var(--muted)); }
.report-list .title { color: var(--ink); }
.report-table thead th { cursor: pointer; user-select: none; white-space: nowrap; }
.report-table thead th[aria-sort="ascending"]::after { content: " ▲"; font-size: .7em; }
.report-table thead th[aria-sort="descending"]::after { content: " ▼"; font-size: .7em; }
.report-table tbody tr:hover td { background: var(--paper); }
.print-only { display: none; }

/* Printing any app page: just the content, on white */
@media print {
  .rail, .topbar, .tabbar, .plan-banner, .no-print, .save-bar, .flash, dialog { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  body:not(.kitchen):not(.landing) { background: #fff !important; }
  .card { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  .figure[class*="tone-"] { background: #fff; }
  .print-only { display: block; }
  .report-print-head { font-size: 13px; margin-bottom: 8px; }
  .table th, .table td { padding: 4px 6px; font-size: 11px; }
  table.stack-sm thead { display: table-header-group !important; }
  table.stack-sm tr { display: table-row !important; }
  table.stack-sm td { display: table-cell !important; text-align: inherit; }
  table.stack-sm td::before { content: none !important; }
  @page { margin: 10mm; }
}

/* Error pages */
.error-page { text-align: center; padding: 2rem 1.5rem; }
.error-page .error-code { font-size: 3.4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: .6rem; }
.error-page .form-actions { justify-content: center; }

/* Top bar search: a field on tablets and desktops, an icon on phones */
.top-search { display: none; align-items: center; gap: .4rem; padding: 0 .75rem; height: 40px; width: min(380px, 40vw);
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); }
.top-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.top-search svg { width: 18px; height: 18px; flex: none; }
.top-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--ink); outline: none; }
@media (min-width: 760px) { .top-search { display: flex; } .top-search-btn { display: none; } }

/* Setup checklist */
.meter-line { height: 6px; background: var(--line-2); }
.meter-line span { display: block; height: 100%; background: var(--brand-grad); }
.setup-steps { list-style: none; margin: 0; padding: .5rem; display: grid; gap: .25rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .setup-steps { grid-template-columns: repeat(3, 1fr); } }
.setup-steps a { display: flex; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 10px; color: var(--ink); font-weight: 550; }
.setup-steps a:hover { background: var(--brand-wash); text-decoration: none; }
.setup-steps .tick { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px solid var(--line); color: #fff; font-size: .8rem; }
.setup-steps li.done .tick { background: var(--ready); border-color: var(--ready); }
.setup-steps li.done a { color: var(--muted); text-decoration: line-through; }

/* Checkout: amounts flash when the departure date changes them */
@keyframes sd-pulse { 0% { background: #fde68a; } 100% { background: transparent; } }
.pulse { animation: sd-pulse 1.2s ease-out; border-radius: 4px; }

/* PIN / GSTIN live hints */
.geo-hint.good { color: var(--c-green, #047857); font-weight: 600; }
.geo-hint.bad, .hint.bad { color: var(--danger, #b91c1c); font-weight: 600; }

/* Settings: room types as a short list, edited in a sheet */
.type-list li { display: flex; align-items: center; gap: .75rem; }

/* Halls: month calendar */
.cal-head { display: flex; align-items: center; gap: .6rem; margin: .25rem 0 .6rem; }
.cal-head h2 { margin: 0; min-width: 9rem; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: .75rem; font-weight: 700; color: var(--muted); text-align: center; padding: .2rem 0; }
.cal-day { display: flex; flex-direction: column; gap: 2px; min-height: 84px; padding: .35rem; border-radius: 10px; background: var(--card, #fff); border: 1px solid var(--line-2); color: inherit; text-decoration: none; overflow: hidden; }
.cal-day:hover { border-color: var(--brand); }
.cal-day.out { opacity: .45; }
.cal-day.today { box-shadow: 0 0 0 2px var(--brand) inset; }
.cal-day .n { font-weight: 700; font-size: .85rem; }
.cal-day .ev { display: block; font-size: .68rem; font-weight: 600; padding: 1px 4px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--tone-bg, #ede9fe); }
.ev.tone-amber, .badge.tone-amber { background: #fef3c7; color: #92400e; }
.ev.tone-violet, .badge.tone-violet { background: #ede9fe; color: #5b21b6; }
.ev.tone-green, .badge.tone-green { background: #dcfce7; color: #166534; }
.ev.tone-muted, .badge.tone-muted { background: #f1f5f9; color: #64748b; text-decoration: line-through; }
@media (max-width: 640px) {
  .cal-day { min-height: 54px; padding: .25rem; }
  .cal-day .ev { font-size: 0; height: 6px; padding: 0; }      /* phone: a coloured bar per event */
  .cal-day .ev.tone-violet { background: #7c3aed; }
  .cal-day .ev.tone-amber { background: #f59e0b; }
  .cal-day .ev.tone-green { background: #16a34a; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cal-day { background: var(--card); }
}

/* Hall form: slot buttons show their time under the name; charge rows give room to the rate */
.slot-label { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.slot-label small { font-size: .72rem; font-weight: 500; opacity: .75; }
.hall-line { grid-template-columns: minmax(60px, .8fr) minmax(90px, 1.3fr) minmax(70px, .9fr) minmax(70px, 1fr) auto; }
@media (max-width: 640px) { .hall-line { grid-template-columns: 1fr 1fr; } }

.kds-older { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem .8rem; border-radius: 10px; background: #3a2f12; color: #fde68a; font-size: .9rem; }

/* ---------- Reports charts (palette validated for light #fff and dark #1e1a38 cards) ---------- */
.viz-root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --viz-grid: #ecebf3; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .viz-root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --viz-grid: #2c2850; }
}
:root[data-theme="dark"] .viz-root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --viz-grid: #2c2850; }
.kpi .value { margin: .15rem 0 .1rem; }
.kpi-delta .up { color: var(--c-green, #16a34a); font-weight: 700; }
.kpi-delta .down { color: var(--danger); font-weight: 700; }
.viz { margin: 0; }
.viz-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .82rem; color: var(--ink-2, #444); margin-bottom: .5rem; }
.viz-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.viz-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.viz-plot { position: relative; height: 220px; margin-left: 3.2rem; }
.viz-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.viz-grid > div { position: relative; border-top: 1px solid var(--viz-grid); height: 0; }
.viz-grid > div:last-child { border-top-color: var(--line); }
.viz-grid span { position: absolute; right: calc(100% + .45rem); top: -.55em; font-size: .7rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.viz-cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.viz-col { position: relative; display: flex; align-items: flex-end; justify-content: center; outline: none; border-radius: 4px; cursor: default; }
.viz-col:hover, .viz-col:focus-visible { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.viz-stack { width: min(70%, 22px); height: 100%; display: flex; flex-direction: column-reverse; gap: 2px; }
.viz-stack span { display: block; min-height: 2px; }
.viz-stack span:last-child { border-radius: 4px 4px 0 0; }
.viz-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.viz-cols-line .viz-dot { position: absolute; left: 50%; width: 8px; height: 8px; margin: 0 0 -4px -4px; border-radius: 50%; background: var(--series-1); box-shadow: 0 0 0 2px var(--card); opacity: 0; }
.viz-cols-line .viz-col:hover .viz-dot, .viz-cols-line .viz-col:focus-visible .viz-dot { opacity: 1; }
.viz-cols-line .viz-col:hover::before, .viz-cols-line .viz-col:focus-visible::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed var(--muted); }
.viz-x { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin-left: 3.2rem; font-size: .7rem; color: var(--muted); margin-top: .3rem; }
.viz-x span { white-space: nowrap; overflow: visible; text-align: left; }
.viz-table-link { display: inline-block; margin-top: .5rem; }
.viz-hbars { list-style: none; margin: 0; padding: .6rem 1rem; display: grid; gap: .45rem; }
.viz-hbars li { display: grid; grid-template-columns: minmax(6rem, 38%) 1fr auto; align-items: center; gap: .6rem; font-size: .88rem; border-radius: 6px; outline: none; }
.viz-hbars li:hover, .viz-hbars li:focus-visible { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.viz-hbars .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viz-hbars .bar { height: 12px; }
.viz-hbars .bar span { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }
.viz-hbars .val { font-variant-numeric: tabular-nums; color: var(--ink-2, #444); min-width: 4.5rem; text-align: right; }
.viz-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink, #1f1b3a); color: var(--card, #fff); border-radius: 8px; padding: .45rem .6rem; font-size: .78rem; line-height: 1.45; box-shadow: 0 6px 20px rgba(0,0,0,.18); max-width: 240px; }
.viz-tip b { display: block; margin-bottom: .1rem; }
@media (max-width: 640px) {
  .viz-plot { height: 170px; margin-left: 2.6rem; }
  .viz-x { margin-left: 2.6rem; font-size: .62rem; }
  .viz-hbars li { grid-template-columns: minmax(5rem, 40%) 1fr auto; font-size: .82rem; }
}

/* ==========================================================================
   Calm theme (Oct 2026): one top bar across the app, a dark collapsible menu,
   white cards with plain headings. Colour is kept for meaning only (room and
   bill status, veg/non-veg, chart series). The one memorable element is the
   "Tonight" strip of room key tags on the Today screen.
   ========================================================================== */
:root {
  --ink: #172033; --ink-2: #3a4457; --muted: #5d6779;
  --paper: #f2f3f6; --card: #ffffff; --line: #dfe3ea; --line-2: #eceff4;
  --brand: #2f4fd8; --brand-ink: #2440b8; --brand-wash: #e9edfd;
  --brand-grad: var(--brand);
  --rainbow: var(--line);
  --night: #121a2b; --night-2: #1b2438; --night-ink: #c7cfdd;
  --appbar: 56px; --rail: 232px; --rail-mini: 64px;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e7eaf1; --ink-2: #c4cad6; --muted: #949db0;
    --paper: #0f1420; --card: #171e2d; --line: #283246; --line-2: #1f283a;
    --brand: #6b85ff; --brand-ink: #9fb0ff; --brand-wash: #1c2648;
    --night: #0b1019; --night-2: #151c2b;
  }
}
body:not(.kitchen):not(.landing) { background: var(--paper); }

/* Top bar */
.appbar {
  position: sticky; top: 0; z-index: 45; height: var(--appbar);
  display: flex; align-items: center; gap: .5rem; padding: 0 .75rem;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.appbar-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; flex: none;
  color: var(--ink-2); background: none; border: 0; cursor: pointer;
}
.appbar-btn:hover, .appbar-btn.active { background: var(--line-2); color: var(--ink); text-decoration: none; }
.appbar-btn svg { width: 20px; height: 20px; }
.appbar-brand { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink); font-weight: 700; font-size: 1.02rem; flex: none; }
.appbar-brand:hover { text-decoration: none; }
.appbar-brand .logo-mark { width: 26px; height: 26px; }
.appbar-hotel { color: var(--muted); font-size: .9rem; padding-left: .7rem; margin-left: .2rem; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.appbar-gap { flex: 1; }
.appbar-search {
  display: none; align-items: center; gap: .5rem; flex: 0 1 460px; margin-left: 1rem; height: 38px; padding: 0 .7rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
}
.appbar-search:focus-within { background: var(--card); border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
.appbar-search svg { width: 17px; height: 17px; flex: none; }
.appbar-search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--ink); outline: none; height: 100%; }
.appbar-search kbd { font: 600 .72rem var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 .35rem; background: var(--card); }
.avatar-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; list-style: none;
  background: var(--brand); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .02em; margin-left: .25rem;
}
.avatar-btn::-webkit-details-marker, .menu summary::-webkit-details-marker { display: none; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 220px; padding: .35rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}
.menu-right { left: auto; right: 0; }
.new-menu .menu-pop { left: auto; right: 0; }
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .6rem; border-radius: 7px;
  color: var(--ink); font: inherit; font-size: .92rem; background: none; border: 0; cursor: pointer; text-align: left;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--line-2); text-decoration: none; }
.menu-pop svg { width: 18px; height: 18px; color: var(--muted); }
.menu-pop form { margin: 0; border-top: 1px solid var(--line-2); margin-top: .3rem; padding-top: .3rem; }
.menu-who { display: grid; gap: .1rem; padding: .5rem .6rem .6rem; margin-bottom: .3rem; border-bottom: 1px solid var(--line-2); font-size: .82rem; color: var(--muted); }
.menu-who strong { color: var(--ink); font-size: .95rem; }
.rail-toggle, .search-mobile { display: inline-grid; }
.rail-toggle { display: none; }

/* Shell and menu */
.shell { min-height: calc(100vh - var(--appbar)); }
.rail, .topbar { display: none; }
@media (min-width: 900px) {
  .appbar { padding: 0 1rem 0 .6rem; }
  .rail-toggle { display: inline-grid; }
  .appbar-search { display: flex; }
  .search-mobile { display: none; }
  .shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); transition: grid-template-columns .18s ease; }
  .rail {
    display: flex; flex-direction: column; gap: 2px; position: sticky; top: var(--appbar); height: calc(100vh - var(--appbar));
    overflow-y: auto; overflow-x: hidden; padding: .75rem .6rem; background: var(--night); color: var(--night-ink);
  }
  .rail a, .rail-collapse {
    position: relative; display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: 8px;
    color: var(--night-ink); font: inherit; font-size: .93rem; white-space: nowrap; background: none; border: 0; cursor: pointer; text-align: left;
    box-shadow: none;
  }
  .rail a svg, .rail-collapse svg { width: 20px; height: 20px; flex: none; opacity: .9; }
  .rail a:hover, .rail-collapse:hover { background: var(--night-2); color: #fff; text-decoration: none; }
  .rail a.active { background: var(--night-2); color: #fff; font-weight: 600; }
  .rail a.active::before { content: ""; position: absolute; left: -.6rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
  .rail .group { margin: 1rem .7rem .3rem; font-size: .75rem; font-weight: 600; color: #7f8aa0; white-space: nowrap; }
  .rail-collapse { margin-top: auto; color: #8d97ab; font-size: .85rem; }
  .main { padding: 1.25rem 1.75rem 2.5rem; max-width: 1320px; }

  /* Mini menu: icons only, name shown on hover */
  [data-rail="mini"] .shell { grid-template-columns: var(--rail-mini) minmax(0, 1fr); }
  [data-rail="mini"] .rail { padding: .75rem .55rem; overflow: visible; }
  [data-rail="mini"] .rail a, [data-rail="mini"] .rail-collapse { justify-content: center; padding: .6rem 0; }
  [data-rail="mini"] .rail a span, [data-rail="mini"] .rail-collapse span { display: none; }
  [data-rail="mini"] .rail .group { height: 1px; margin: .7rem .4rem; background: var(--night-2); font-size: 0; }
  [data-rail="mini"] .rail-collapse svg { transform: rotate(180deg); }
  [data-rail="mini"] .rail a:hover::after, [data-rail="mini"] .rail a:focus-visible::after {
    content: attr(data-tip-nav); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); z-index: 70;
    padding: .3rem .55rem; border-radius: 6px; background: var(--ink); color: var(--card); font-size: .8rem; font-weight: 500; white-space: nowrap; pointer-events: none;
  }
}
@media (max-width: 899px) {
  .appbar-brand .product { display: none; }
  .appbar-hotel { border-left: 0; padding-left: 0; margin-left: 0; color: var(--ink); font-weight: 600; max-width: 40vw; }
  .new-menu summary span { display: none; }
}

/* Plain cards: no colour stripes or tinted headers; icons only in the menu */
.card[class*="tone-"] { border-top: 1px solid var(--line); }
.card { box-shadow: none; border-radius: var(--radius); }
.card-head { gap: .6rem; }
.card-head .chip-icon, .chip-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--tw, var(--brand-wash)); color: var(--tc, var(--brand)); }
.card-head .chip-icon svg, .chip-icon svg { width: 16px; height: 16px; }
.figure[class*="tone-"] { background: var(--card); border-color: var(--line); box-shadow: inset 0 3px 0 var(--tc); }
.figure[class*="tone-"] .value { color: var(--tc); }
.figure[class*="tone-"] .meter span { background: var(--tc); }
.btn-primary, .btn-primary:hover { background: var(--brand); box-shadow: none; }
.btn-primary:hover { filter: none; background: var(--brand-ink); }
.tabs .active { background: var(--brand); box-shadow: none; }
dialog.sheet::before, .auth .card::before { display: none; }
.error-page .error-code { background: none; color: var(--ink); -webkit-text-fill-color: currentColor; }
.meter-line span { background: var(--brand); }
.ticket .card-head, .cart-bar { background: var(--brand); }

/* Today screen */
.today-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin-bottom: 1rem; }
.today-head .titles { flex: 1 1 280px; }
.today-head h1 { font-size: 1.5rem; font-weight: 650; }
.today-head .sub { color: var(--muted); margin-top: .25rem; }
.tonight { padding: 1rem 1.1rem 1.1rem; }
.tonight-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.2rem; margin-bottom: .8rem; }
.tonight-top h2 { font-size: 1rem; margin-right: auto; }
.tonight-legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .82rem; color: var(--muted); }
.tonight-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.tonight-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.tag {
  position: relative; display: grid; place-items: center; height: 54px; padding-top: 8px; border-radius: 6px 6px 12px 12px;
  background: var(--w); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  font-weight: 700; font-size: .95rem; text-decoration: none;
}
.tag::before { content: ""; position: absolute; top: 6px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); }
.tag small { display: block; font-size: .62rem; font-weight: 600; opacity: .85; margin-top: -4px; }
.tag:hover { text-decoration: none; outline: 2px solid var(--c); outline-offset: 1px; }
.tag.available { --c: var(--ready); --w: var(--ready-wash); }
.tag.reserved { --c: var(--held); --w: var(--held-wash); }
.tag.occupied { --c: var(--busy); --w: var(--busy-wash); }
.tag.dirty { --c: var(--dirty); --w: var(--dirty-wash); }
.tag.maintenance { --c: var(--off); --w: var(--off-wash); }
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1rem; }
.stat-row > div { padding: .9rem 1.1rem; border-top: 1px solid var(--line-2); }
.stat-row > div:nth-child(odd) { border-right: 1px solid var(--line-2); }
.stat-row .n { font-size: 1.45rem; font-weight: 650; letter-spacing: -.01em; }
.stat-row .l { color: var(--muted); font-size: .85rem; }
@media (min-width: 900px) {
  .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-row > div { border-right: 1px solid var(--line-2); }
  .stat-row > div:last-child { border-right: 0; }
}
.plain-head { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line-2); }
.plain-head h2 { font-size: 1rem; margin-right: auto; }
.plain-head .count { color: var(--muted); font-weight: 500; font-size: .9rem; }

/* A little colour, used with meaning: each area has its own hue (menu icons, card icons, figures) */
.rail a svg { color: var(--c, currentColor); }
.rail a.active svg, .rail a:hover svg { color: var(--c, #fff); opacity: 1; }
.rail a.active::before { background: var(--c, var(--brand)); }
.plain-head .chip-icon { width: 30px; height: 30px; }
.stat-row > div { position: relative; padding-left: 1.1rem; }
.stat-row .n { color: var(--tc, var(--ink)); }
.stat-row > div::before { content: ""; position: absolute; left: 0; top: .9rem; bottom: .9rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--tc, transparent); }
.tonight-top h2 { display: flex; align-items: center; gap: .55rem; }
.appbar-brand .product { color: var(--brand-ink); }

/* Today: stats card sits alone now (no Tonight strip above it) */
.card > .stat-row:first-child { margin-top: 0; }
.card > .stat-row:first-child > div { border-top: 0; }

/* ---------- Today screen in full colour ---------- */
.dash-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 900px) { .dash-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dash-tile {
  position: relative; display: grid; gap: .15rem; padding: 1rem 1.1rem 1.05rem; border-radius: 12px; overflow: hidden;
  color: #fff; background: var(--a); text-decoration: none; min-height: 118px; align-content: end;
}
.dash-tile:hover { text-decoration: none; filter: brightness(1.05); }
.dash-tile::after { content: ""; position: absolute; right: -28px; top: -28px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.12); }
.dash-tile .ic { position: absolute; top: .85rem; right: .9rem; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.2); }
.dash-tile .ic svg { width: 20px; height: 20px; }
.dash-tile .n { font-size: 1.65rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.dash-tile .l { font-size: .86rem; opacity: .92; }
.dash-tile .bar { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.28); margin-top: .45rem; }
.dash-tile .bar i { display: block; height: 100%; border-radius: 3px; background: #fff; }
.t-rose { --a: #e0245e; } .t-green { --a: #12935b; } .t-indigo { --a: #3f46d6; } .t-orange { --a: #e8650f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-rose { --a: #b81d4d; } :root:not([data-theme="light"]) .t-green { --a: #0f7a4c; }
  :root:not([data-theme="light"]) .t-indigo { --a: #3a40b8; } :root:not([data-theme="light"]) .t-orange { --a: #c2550c; }
}
.dash .dc { border-top: 0; border-left: 4px solid var(--tc); }
.dash .dc .plain-head { background: var(--tw); border-bottom-color: color-mix(in srgb, var(--tc) 18%, var(--line)); border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.dash .dc .plain-head .chip-icon { background: var(--tc); color: #fff; }
.dash .dc .plain-head h2 { color: color-mix(in srgb, var(--tc) 70%, var(--ink)); }
.dash .dc .btn-ghost { color: var(--tc); }
.dash .btn-tone { background: var(--tc); border-color: var(--tc); color: #fff; }
.dash .btn-tone:hover { filter: brightness(1.08); color: #fff; }
.dash .dc .list > li .avatar { background: var(--tw); color: var(--tc); font-weight: 700; }
.dash .dc .list .title a { color: color-mix(in srgb, var(--tc) 75%, var(--ink)); }
.dash .setup-card .meter-line span { background: var(--tc); }
.dash-tiles + .split { margin-top: 1rem; }

/* ---------- Settings → Offline PC, sync badge ---------- */
.pc-grid { display: grid; gap: 1rem; max-width: 820px; }
.pc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem 1rem; margin: 0 0 1rem; }
.pc-facts div { background: var(--wash, #f6f7fb); border-radius: 10px; padding: .6rem .75rem; }
.pc-facts dt { font-size: .78rem; color: var(--muted); }
.pc-facts dd { margin: .15rem 0 0; font-weight: 600; word-break: break-all; }
.pc-note { background: var(--held-wash); border-radius: 10px; padding: .7rem .85rem; font-size: .9rem; margin: 0 0 1rem; }
.pc-note.bad { background: var(--busy-wash); }
.pc-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pc-key { border: 2px dashed var(--c-teal, #0d9488); border-radius: 12px; padding: .85rem; margin-bottom: 1rem; display: grid; gap: .5rem; }
.pc-key code { font-size: 1rem; font-weight: 700; word-break: break-all; background: var(--wash, #f6f7fb); padding: .5rem .6rem; border-radius: 8px; }
.pc-key .btn { justify-self: start; }
.pc-key ol, .pc-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .2rem; }
.sync-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; background: var(--ready-wash); color: var(--ready); white-space: nowrap; border: 0; cursor: pointer; font-family: inherit; }
.sync-chip svg { width: 15px; height: 15px; }
.sync-chip.off { background: var(--busy-wash); color: var(--busy); }
.sync-chip.wait { background: var(--held-wash); color: var(--held); }
.sync-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .45rem 1rem; background: var(--c-sky-w, #e0f2fe); font-size: .86rem; border-bottom: 1px solid var(--line); }
.sync-bar.warn { background: var(--held-wash); }
@media (max-width: 600px) { .sync-chip span { display: none; } .sync-chip { padding: .35rem; } }
.sync-bar.update { background: var(--ready-wash); }
.sync-bar form { margin-left: auto; }
.pc-version { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }

/* ---------- Bookings: Past / All register ---------- */
.tab-count { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; margin-left: .25rem; border-radius: 999px; background: var(--line-2); font-size: .75rem; text-align: center; }
.tabs a.active .tab-count { background: rgba(255,255,255,.25); }
.bk-search { margin: 0 0 1rem; max-width: 520px; }
.bk-search .input-group { width: 100%; }
.reg-filters { padding: .85rem 1rem; margin-bottom: 1rem; display: grid; gap: .75rem; }
.reg-ranges { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-link { padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; color: var(--ink); background: var(--card); }
.chip-link:hover { text-decoration: none; border-color: var(--muted); }
.chip-link.active { background: var(--ink); color: var(--card); border-color: var(--ink); }
.reg-fields { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.reg-fields .field { margin: 0; min-width: 140px; flex: 0 1 160px; }
.reg-fields .field.grow { flex: 1 1 220px; }
.reg-buttons { display: flex; gap: .4rem; }
.reg-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin: 0 0 .7rem; color: var(--muted); }
.reg-head strong { color: var(--ink); }
.reg-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: .8rem; }
.reg-status { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .8rem; }
.reg-status a.badge:hover { text-decoration: none; filter: brightness(.95); }
.reg-table td.due, .reg-cards .due { color: var(--busy); font-weight: 700; }
.reg-table td.nowrap { white-space: nowrap; }
.reg-table td.money { white-space: nowrap; }
.reg-cards { display: none; }
@media (max-width: 760px) {
    .reg-table { display: none; }
    .reg-cards { display: block; }
    .reg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reg-tiles .figure:first-child { grid-column: span 2; }
    .reg-fields .field { flex: 1 1 calc(50% - .6rem); min-width: 0; }
}
.reg-searchrow { display: flex; gap: .5rem; }
.reg-searchrow .input { flex: 1 1 auto; min-width: 0; }
.reg-more > summary { cursor: pointer; font-weight: 600; font-size: .92rem; padding: .2rem 0; list-style: none; display: flex; gap: .5rem; align-items: baseline; }
.reg-more > summary::before { content: '▸'; color: var(--muted); }
.reg-more[open] > summary::before { content: '▾'; }
.reg-more[open] > summary { margin-bottom: .6rem; }
@media (max-width: 760px) {
    .reg-tiles .reg-count { display: none; }
    .reg-tiles .figure:first-child { grid-column: auto; }
    .reg-ranges { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .reg-ranges .chip-link { flex: none; }
}

/* ---------- Group bookings ---------- */
.grp-dates { margin-bottom: 1rem; }
.grp-dates-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.grp-dates-row .field { margin: 0; }
.grp-type { padding: .8rem 1rem; border-top: 1px solid var(--line-2); }
.grp-type:first-of-type { border-top: 0; }
.grp-type-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.grp-type-head .btn { margin-left: auto; }
.grp-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.grp-room { display: flex; align-items: center; gap: .45rem; padding: .45rem .55rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); }
.grp-room.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.grp-room input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.grp-room-no { font-weight: 700; min-width: 2.4rem; }
.grp-room-rate { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.grp-room-rate .addon { color: var(--muted); font-size: .85rem; }
.grp-room-rate .input { width: 74px; padding: .3rem .4rem; min-height: 32px; text-align: right; }
.grp-modes { display: grid; gap: .6rem; }
.grp-mode { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem .85rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.grp-mode:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.grp-mode input { margin-top: .25rem; accent-color: var(--brand); }
.text-busy { color: var(--busy); }
.group-tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: .05rem .4rem; border-radius: 6px; background: var(--c-violet-w, #ede9fe); color: var(--c-violet, #6d28d9); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.group-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: var(--c-violet-w, #ede9fe); color: var(--c-violet, #6d28d9); white-space: nowrap; }
.group-badge svg { width: 13px; height: 13px; }
a.group-badge:hover { text-decoration: none; filter: brightness(.96); }
.grp-row { background: color-mix(in srgb, var(--c-violet-w, #ede9fe) 35%, var(--card)); }
.grp-avatar { background: var(--c-violet-w, #ede9fe) !important; color: var(--c-violet, #6d28d9) !important; }
.grp-avatar svg { width: 18px; height: 18px; }
.grp-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.grp-chip { font-size: .78rem; font-weight: 700; padding: .12rem .45rem; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.grp-chip:hover { text-decoration: none; border-color: var(--c-violet, #6d28d9); }

/* ---------- Arrivals ---------- */
.arr-date { margin-left: auto; }
.arr-date .input { min-height: 34px; padding: .25rem .5rem; }
.chip-warn { border-color: var(--busy); color: var(--busy); }
.chip-warn.active { background: var(--busy); border-color: var(--busy); color: #fff; }
.arr-actions { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; align-items: center; }
.danger-text { color: var(--busy) !important; }
.btn-danger-outline { border-color: color-mix(in srgb, var(--busy) 45%, var(--line)); color: var(--busy); background: var(--card); }
.btn-danger-outline:hover { background: var(--busy-wash); }
.badge.room-ready { background: var(--ready-wash); color: var(--ready); }
.badge.room-dirty { background: var(--dirty-wash); color: var(--dirty); }
.badge.room-busy { background: var(--busy-wash); color: var(--busy); }
.badge.room-off { background: var(--off-wash); color: var(--muted); }
.grp-chip.room-dirty { border-color: var(--dirty); }
.grp-chip.room-busy { border-color: var(--busy); color: var(--busy); }
.grp-chip.room-off { opacity: .6; }
.cancel-rooms .grp-chip { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
@media (max-width: 760px) {
    .arr-list li { flex-wrap: wrap; }
    .arr-actions { width: 100%; justify-content: flex-start; padding-left: 3.1rem; }
    .arr-date { margin-left: 0; }
}

/* ---------- Big screens (1920×1080 and up): use the full width ---------- */
@media (min-width: 1440px) {
  .main { max-width: none; padding-left: 2rem; padding-right: 2rem; }
}
@media (min-width: 2300px) {
  .main { max-width: 2200px; margin-left: auto; margin-right: auto; }
}
@media print { .main { max-width: none !important; } }

/* ---------- SaaS admin ---------- */
.admin-chip { background: var(--c-violet-w, #ede9fe); color: var(--c-violet, #6d28d9); padding: .15rem .55rem; border-radius: 999px; font-weight: 700; font-size: .78rem; }
.adm-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important; }
a.figure { color: inherit; text-decoration: none; display: block; }
a.figure:hover { filter: brightness(.98); }
.adm-split { align-items: start; }
.adm-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: .4rem; height: 190px; align-items: end; }
.adm-bar { display: grid; grid-template-rows: auto 1fr auto auto; height: 100%; text-align: center; font-size: .72rem; }
.adm-bar-val { color: var(--muted); min-height: 1em; }
.adm-bar-fill { align-self: end; background: linear-gradient(180deg, var(--c-teal, #0d9488), color-mix(in srgb, var(--c-teal, #0d9488) 55%, #fff)); border-radius: 6px 6px 2px 2px; width: 100%; min-height: 3px; }
.adm-bar-lbl { margin-top: .25rem; color: var(--muted); }
.adm-bar-new { color: var(--c-violet, #6d28d9); font-weight: 700; min-height: 1em; }
.adm-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.adm-plan.off { opacity: .6; }
.adm-plan-head { display: flex; align-items: center; gap: .5rem; }
.adm-price { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; margin-top: .4rem; }
.adm-price span { font-size: .9rem; font-weight: 500; color: var(--muted); }
.adm-feat { list-style: none; padding: 0; margin: .9rem 0; display: grid; gap: .3rem; font-size: .9rem; }
.adm-feat li::before { content: '✓'; color: var(--ready); font-weight: 800; margin-right: .45rem; }
.adm-feat li.no { color: var(--muted); text-decoration: line-through; }
.adm-feat li.no::before { content: '✕'; color: var(--muted); }
.adm-plan-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line-2); padding-top: .7rem; }
.adm-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.adm-check { display: flex; gap: .6rem; align-items: flex-start; padding: .6rem .7rem; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.adm-check:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.adm-check input { margin-top: .2rem; accent-color: var(--brand); }
.adm-hr { border: 0; border-top: 1px solid var(--line-2); margin: 1rem 0; }
.adm-inline { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.text-warn { color: var(--held); }
.impersonate-bar { position: sticky; top: 0; z-index: 70; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1rem; padding: .45rem 1rem; background: #6d28d9; color: #fff; font-size: .9rem; }
.impersonate-bar .btn { background: #fff; color: #6d28d9; border-color: #fff; }
.adm-plans > .card { margin: 0; }

/* Business type checkboxes */
.biz-checks { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.biz-checks .adm-check strong { display: inline-flex; align-items: center; gap: .35rem; }
.biz-checks .adm-check strong svg { width: 18px; height: 18px; color: var(--brand); }
.biz-stack .biz-checks { grid-template-columns: 1fr; }
[data-needs-module][hidden] { display: none !important; }
.work-modes { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.biz-stack .work-modes { grid-template-columns: 1fr; }
.adm-check.is-off { opacity: .6; }

/* Financial year chooser */
.fy-menu .menu-pop { left: auto; right: 0; min-width: 260px; }
.fy-menu .menu-pop form { border-top: 0; margin-top: 0; padding-top: 0; }
.fy-menu .menu-pop button { justify-content: flex-start; }
.fy-menu .menu-pop button .small { margin-left: auto; }
.fy-menu .menu-pop button.active { font-weight: 700; color: var(--brand); }
.fy-menu .menu-pop button.active svg { color: var(--brand); }
.fy-menu .menu-pop > a { border-top: 1px solid var(--line-2); margin-top: .3rem; }
.fy-menu summary { list-style: none; white-space: nowrap; }
.fy-menu summary::-webkit-details-marker { display: none; }
.fy-menu summary.fy-past { background: var(--held-wash); color: var(--ink); border: 1px solid var(--held); }
.menu-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .35rem .7rem .2rem; }
.fy-tabs { margin-bottom: 1rem; }
@media (max-width: 760px) { .fy-menu summary .fy-word, .fy-menu summary svg { display: none; } }
.fy-menu .menu-pop button { white-space: nowrap; }
@media (max-width: 760px) { .fy-menu summary { padding-inline: .55rem; } }

/* Bill edit log */
.edit-changes { margin: .45rem 0 0; padding-left: 1.1rem; font-size: .9rem; display: grid; gap: .25rem; }
.edit-changes del { color: var(--busy); text-decoration: line-through; }
.edit-changes ins { color: var(--ready); text-decoration: none; font-weight: 600; }
.edit-changes .badge { font-size: .7rem; padding: .05rem .4rem; margin-right: .2rem; }

/* Notifications bell */
.bell-menu summary { list-style: none; position: relative; }
.bell-menu summary::-webkit-details-marker { display: none; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--busy); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.bell-pop { left: auto; right: 0; width: min(380px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: .7rem .9rem; border-bottom: 1px solid var(--line-2); }
.bell-head form { margin: 0; border: 0; padding: 0; }
.bell-pop .bell-head button.link-btn, .link-btn { width: auto; padding: 0; color: var(--brand); font-size: .85rem; background: none; border: 0; cursor: pointer; }
.bell-pop > a.bell-item, .bell-list .bell-item { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .9rem; border-radius: 0; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.bell-pop { max-height: min(560px, 80vh); overflow-y: auto; }
.bell-item:hover { background: var(--line-2); }
.bell-item .dot { flex: none; width: 9px; height: 9px; margin-top: .4rem; border-radius: 50%; background: var(--brand); }
.bell-item.lvl-warn .dot { background: var(--held); }
.bell-item.lvl-danger .dot { background: var(--busy); }
.bell-item.is-read .dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.bell-item.is-read .t { font-weight: 500; color: var(--ink-2); }
.bell-item .grow { display: grid; gap: .15rem; min-width: 0; }
.bell-item .t { font-weight: 650; font-size: .92rem; }
.bell-item .b { font-size: .84rem; color: var(--muted); }
.bell-item .w { font-size: .75rem; color: var(--muted); }
.bell-empty { padding: 1.2rem .9rem; color: var(--muted); font-size: .9rem; }
.bell-foot { display: flex; justify-content: space-between; padding: .6rem .9rem; }
.bell-pop .bell-foot a { width: auto; padding: 0; color: var(--brand); font-size: .88rem; }
.notif-table td { vertical-align: top; }
.notif-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); }
.notif-th { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; font-size: .85rem; color: var(--ink-2); flex-wrap: wrap; }
.input-sm { width: auto; min-width: 70px; max-width: 120px; padding: .3rem .5rem; min-height: 34px; }
.notif-table { table-layout: fixed; }
.notif-table th:not(:first-child), .notif-table td:not(:first-child) { width: 92px; text-align: center; }
@media (max-width: 760px) {
  .bell-pop { position: fixed; top: 58px; left: 12px; right: 12px; width: auto; }
  .notif-table th:not(:first-child), .notif-table td:not(:first-child) { width: 64px; }
  .notif-table th { font-size: .72rem; }
}

/* Settings: side menu + body */
.settings-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.settings-nav { position: sticky; top: 72px; display: grid; gap: 2px; padding: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.settings-nav .sn-group { padding: .7rem .65rem .3rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.settings-nav .sn-group:first-child { padding-top: .35rem; }
.settings-nav a { display: flex; gap: .65rem; align-items: flex-start; padding: .55rem .65rem; border-radius: 9px; color: var(--ink); text-decoration: none; }
.settings-nav a svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--muted); }
.settings-nav a .l { display: block; font-weight: 600; font-size: .92rem; }
.settings-nav a .h { display: block; font-size: .76rem; color: var(--muted); line-height: 1.3; }
.settings-nav a:hover { background: var(--line-2); }
.settings-nav a.active { background: var(--brand-wash); }
.settings-nav a.active svg, .settings-nav a.active .l { color: var(--brand); }
.settings-body { min-width: 0; display: grid; gap: 1rem; align-content: start; }
.settings-body > form.card, .settings-body > .card { max-width: none !important; }
@media (max-width: 980px) {
  .settings-shell { grid-template-columns: 1fr; gap: .75rem; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: .35rem; padding: .35rem; scrollbar-width: none; }
  .settings-nav .sn-group, .settings-nav a .h { display: none; }
  .settings-nav a { flex: none; align-items: center; padding: .45rem .7rem; white-space: nowrap; }
  .settings-nav a svg { margin-top: 0; }
}

/* Settings sections: heading on the left, fields on the right */
.set-section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.5rem; padding: 1.25rem 1.35rem; }
.set-head h2 { font-size: 1.02rem; margin: 0 0 .35rem; }
.set-head p { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.45; }
.set-body { min-width: 0; }
.logo-row { display: flex; gap: 1rem; align-items: flex-start; }
.logo-box { flex: none; width: 96px; height: 72px; display: grid; place-items: center; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff; overflow: hidden; color: var(--muted); }
.logo-box img { max-width: 92%; max-height: 92%; object-fit: contain; }
.sign-box { width: 160px; height: 72px; }
@media (max-width: 1100px) { .set-section { grid-template-columns: 1fr; gap: .9rem; } }

/* ==========================================================================
   Professional A4 / A5 invoice (.invx) – templates: modern, classic, minimal
   ========================================================================== */
.invx { --ac: #1e3a8a; --ink-i: #111827; --mut-i: #5b6474; --ln-i: #d9dee7; --soft: color-mix(in srgb, var(--ac) 7%, #fff);
  display: flex; flex-direction: column; font: 11.5px/1.45 Inter, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink-i); padding: 12mm 13mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.invx b { font-weight: 650; }
.invx table { width: 100%; border-collapse: collapse; }
.invx th, .invx td { border: 0; padding: 0; text-align: left; vertical-align: top; background: none; font-size: inherit; }
.invx .r { text-align: right; }
.invx .c { text-align: center; }
.invx .b { font-weight: 650; }
.ix-note { text-align: center; font-style: italic; color: var(--mut-i); margin-bottom: 6px; }
.ix-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.ix-brand { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.ix-logo { max-height: 62px; max-width: 150px; object-fit: contain; }
.ix-name { font-size: 20px; font-weight: 750; letter-spacing: -.01em; line-height: 1.15; color: var(--ac); }
.ix-legal { font-size: 11px; font-weight: 600; color: var(--ink-i); margin-top: 1px; }
.ix-addr { color: var(--mut-i); margin-top: 2px; }
.ix-doc { text-align: right; flex: none; }
.ix-copy { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mut-i); }
.ix-title { font-size: 22px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; margin-top: 2px; }
.ix-no { font-size: 13px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ix-stamp { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.ix-stamp.paid { background: #dcfce7; color: #166534; }
.ix-stamp.due { background: #fee2e2; color: #991b1b; }
.ix-ids { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; padding: 6px 10px; border-radius: 6px; background: var(--soft); }
.ix-ids b { color: var(--mut-i); font-weight: 600; margin-right: 3px; }
.ix-meta { display: flex; margin-top: 10px; border: 1px solid var(--ln-i); border-radius: 8px; overflow: hidden; }
.ix-meta > div { flex: 1 1 0; padding: 7px 10px; border-left: 1px solid var(--ln-i); display: grid; align-content: start; }
.ix-meta > div:first-child { border-left: 0; }
.ix-meta span, .ix-lbl { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut-i); }
.ix-meta b { font-size: 12px; margin-top: 1px; }
.ix-meta i { font-style: normal; color: var(--mut-i); font-size: 10.5px; }
.ix-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.ix-box { border: 1px solid var(--ln-i); border-radius: 8px; padding: 8px 11px; }
.ix-party { font-size: 13px; font-weight: 700; margin: 2px 0 1px; }
.ix-gst { margin-top: 3px; }
.ix-kv { display: flex; gap: 6px; }
.ix-kv span { color: var(--mut-i); min-width: 62px; }
.ix-items { margin-top: 12px; font-variant-numeric: tabular-nums; }
.ix-items th { padding: 7px 7px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--ac); white-space: nowrap; }
.ix-items th:first-child { border-radius: 6px 0 0 6px; }
.ix-items th:last-child { border-radius: 0 6px 6px 0; }
.ix-items td { padding: 7px; border-bottom: 1px solid var(--ln-i); }
.ix-items tbody tr:nth-child(even) td { background: #f8fafc; }
.ix-desc { font-weight: 550; }
.ix-bottom { display: grid; grid-template-columns: 1fr 250px; gap: 16px; margin-top: 12px; align-items: start; }
.ix-left { display: grid; gap: 9px; min-width: 0; }
.ix-words { padding: 7px 10px; border-left: 3px solid var(--ac); background: var(--soft); border-radius: 0 6px 6px 0; font-weight: 600; }
.ix-words span { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut-i); }
.ix-hsn { font-size: 10.5px; font-variant-numeric: tabular-nums; }
.ix-hsn th { padding: 4px 6px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--mut-i); border-bottom: 1px solid var(--ln-i); }
.ix-hsn td { padding: 4px 6px; border-bottom: 1px dashed var(--ln-i); }
.ix-hsn tfoot td { font-weight: 700; border-bottom: 0; border-top: 1px solid var(--ln-i); }
.ix-decl { margin: 0; font-weight: 600; }
.ix-pays { color: var(--ink-i); }
.ix-pays span { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut-i); }
.ix-pay { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; }
.ix-bank { flex: 1 1 200px; border: 1px solid var(--ln-i); border-radius: 8px; padding: 7px 10px; }
.ix-upi { display: flex; gap: 10px; align-items: center; border: 1px solid var(--ln-i); border-radius: 8px; padding: 7px 10px; }
.ix-qr { width: 26mm; height: 26mm; flex: none; }
.ix-qr svg { width: 100%; height: 100%; }
.ix-terms { font-size: 10px; color: var(--mut-i); }
.ix-totals { border: 1px solid var(--ln-i); border-radius: 8px; overflow: hidden; font-variant-numeric: tabular-nums; }
.ix-totals td { padding: 6px 11px; border-bottom: 1px solid var(--ln-i); }
.ix-totals tr:last-child td { border-bottom: 0; }
.ix-grand td { background: var(--ac); color: #fff; font-size: 15px; font-weight: 800; padding: 9px 11px; }
.ix-bal td { font-weight: 750; }
.ix-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: auto; padding-top: 22px; }
.ix-thanks { color: var(--mut-i); font-size: 10.5px; display: grid; gap: 2px; }
.ix-footer-line { color: var(--ink-i); font-size: 12px; font-weight: 600; }
.ix-gen { font-size: 9.5px; }
.ix-sign { text-align: center; min-width: 190px; font-size: 11px; }
.ix-sign-space { height: 46px; display: flex; align-items: flex-end; justify-content: center; }
.ix-sign-space img { max-height: 44px; max-width: 170px; object-fit: contain; }
.ix-sign-line { border-top: 1px solid var(--ink-i); padding-top: 3px; font-weight: 600; }
.invx .void-mark { z-index: 2; }

/* Classic: black and white, ruled, traditional Indian tax invoice */
.tpl-classic { --soft: #f3f4f6; }
.tpl-classic .ix-name { color: var(--ink-i); }
.tpl-classic .ix-head { border: 1px solid #111; border-bottom: 0; padding: 9px 11px; }
.tpl-classic .ix-ids { margin-top: 0; border-radius: 0; border: 1px solid #111; background: #fff; }
.tpl-classic .ix-meta, .tpl-classic .ix-box, .tpl-classic .ix-totals, .tpl-classic .ix-bank, .tpl-classic .ix-upi { border-color: #111; border-radius: 0; }
.tpl-classic .ix-meta { margin-top: 0; border-top: 0; }
.tpl-classic .ix-meta > div { border-color: #111; }
.tpl-classic .ix-parties { gap: 0; margin-top: 0; }
.tpl-classic .ix-parties .ix-box { border-top: 0; }
.tpl-classic .ix-parties .ix-box + .ix-box { border-left: 0; }
.tpl-classic .ix-items { margin-top: 0; }
.tpl-classic .ix-items th { background: #eee; color: #111; border: 1px solid #111; border-radius: 0 !important; border-top: 0; }
.tpl-classic .ix-items td { border: 1px solid #111; border-top: 0; }
.tpl-classic .ix-items tbody tr:nth-child(even) td { background: none; }
.tpl-classic .ix-grand td { background: #111; }
.tpl-classic .ix-words { border-left-color: #111; background: #fff; border: 1px solid #111; border-radius: 0; }
.tpl-classic .ix-stamp { border: 1.5px solid currentColor; background: none; border-radius: 3px; }

/* Minimal: light lines, white space, accent only on the name and total */
.tpl-minimal .ix-ids { background: none; padding: 6px 0; border-top: 1px solid var(--ln-i); border-bottom: 1px solid var(--ln-i); border-radius: 0; }
.tpl-minimal .ix-meta { border: 0; border-radius: 0; }
.tpl-minimal .ix-meta > div { border-left: 0; padding: 7px 0; }
.tpl-minimal .ix-box { border: 0; border-radius: 0; padding: 4px 0; }
.tpl-minimal .ix-items th { background: none; color: var(--mut-i); border-bottom: 1.5px solid var(--ink-i); border-radius: 0 !important; padding-left: 4px; padding-right: 4px; }
.tpl-minimal .ix-items td { padding-left: 4px; padding-right: 4px; }
.tpl-minimal .ix-items tbody tr:nth-child(even) td { background: none; }
.tpl-minimal .ix-totals { border: 0; border-radius: 0; }
.tpl-minimal .ix-grand td { background: none; color: var(--ac); border-top: 1.5px solid var(--ink-i); border-bottom: 1.5px solid var(--ink-i); }
.tpl-minimal .ix-words { background: none; }

/* A5: tighter */
.invx.a5 { padding: 8mm 8mm; font-size: 10.5px; min-height: 210mm; }
.invx.a5 .ix-meta { display: grid; grid-template-columns: repeat(2, 1fr); }
.invx.a5 .ix-meta > div:nth-child(3) { border-left: 0; }
.invx.a5 .ix-meta > div:nth-child(n+3) { border-top: 1px solid var(--ln-i); }
.invx.a5 .ix-bottom { grid-template-columns: 1fr; }
.invx.a5 .ix-name { font-size: 16px; }
.invx.a5 .ix-title { font-size: 17px; }
@media print { .invx { min-height: 296mm; } .invx.a5 { min-height: 209mm; } }

/* Bill design pickers + live preview */
.tpl-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.tpl-pick input, .accent-pick input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-pick label { display: grid; gap: .2rem; padding: .55rem; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card); }
.tpl-pick label b { font-size: .9rem; }
.tpl-pick label small { font-size: .74rem; color: var(--muted); line-height: 1.3; }
.tpl-pick input:checked + label { border-color: var(--tc, var(--brand)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc, var(--brand)) 18%, transparent); }
.tpl-pick input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.tpl-thumb { display: grid; gap: 4px; height: 54px; padding: 6px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.tpl-thumb i { display: block; height: 7px; border-radius: 2px; background: #e5e7eb; }
.tpl-thumb i:first-child { width: 55%; background: var(--tc, #1e3a8a); }
.tpl-thumb-modern i:nth-child(3) { background: var(--tc, #1e3a8a); opacity: .85; }
.tpl-thumb-classic { border-color: #111; }
.tpl-thumb-classic i { border: 1px solid #111; background: #fff; border-radius: 0; }
.tpl-thumb-classic i:first-child { background: #111; }
.tpl-thumb-minimal i { height: 2px; background: #cbd5e1; margin-top: 4px; }
.tpl-thumb-minimal i:first-child { height: 7px; margin-top: 0; }
.accent-pick { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .65rem; }
.accent-pick label { width: 26px; height: 26px; border-radius: 50%; background: var(--sw); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.accent-pick input:checked + label { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--sw); }
.accent-pick input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 3px; }
.bill-preview-wrap { position: sticky; top: 76px; display: grid; gap: .4rem; }
.bill-preview-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.bill-preview { position: relative; height: 560px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f1f3f6; }
.bill-preview iframe { position: absolute; top: 0; left: 0; border: 0; background: #fff; transform-origin: 0 0; }
.print-layout { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px) !important; }
@media (max-width: 1100px) { .print-layout { grid-template-columns: 1fr !important; } .bill-preview-wrap { position: static; } .bill-preview { height: 520px; } .tpl-pick { grid-template-columns: 1fr 1fr 1fr; } }
.logo-box svg { width: 28px; height: 28px; }
.print-count { align-self: center; color: #fff; font-weight: 600; padding: 0 .5rem; }

/* Bills page */
.bill-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bill-tiles a.figure { color: inherit; text-decoration: none; }
.bill-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.bill-tabs a { white-space: nowrap; }
.btag { display: inline-block; padding: .05rem .4rem; margin: .2rem .25rem 0 0; border-radius: 5px; font-size: .7rem; font-weight: 650; background: var(--line-2); color: var(--ink-2); }
.btag.tone-indigo { background: color-mix(in srgb, #4f46e5 12%, var(--card)); color: #4338ca; }
.btag.tone-orange { background: color-mix(in srgb, #ea580c 12%, var(--card)); color: #c2410c; }
.btag.tone-violet { background: color-mix(in srgb, #7c3aed 12%, var(--card)); color: #6d28d9; }
.btag.tone-rose { background: color-mix(in srgb, #e11d48 12%, var(--card)); color: #be123c; }
.bill-tags { line-height: 1.2; }
.bill-table th.sel, .bill-table td.sel { width: 34px; padding-right: 0; }
.bill-table input[type=checkbox], .reg-cards input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.bill-table tr.is-cancelled td:not(.sel):not(:last-child), .reg-cards li.is-cancelled .grow { opacity: .55; }
.bill-table .row-actions .btn { padding-inline: .45rem; }
.bill-table tbody tr:hover td { background: var(--paper); }
.reg-cards li { display: flex; gap: .7rem; align-items: center; }
.bulk-bar { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem .55rem 1rem; border-radius: 14px; background: var(--ink); color: var(--card); box-shadow: 0 12px 32px rgba(15, 23, 42, .3); }
.bulk-bar[hidden] { display: none; }
.bulk-bar .btn-ghost { color: var(--card); }
@media (max-width: 1100px) { .bill-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .bill-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bulk-bar { bottom: 76px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btag[class*="tone-"] { color: var(--ink); } }

/* Dark mode chosen in My profile (not just the phone's setting) */
:root[data-theme="dark"] {
    --ink: #ecebf8; --ink-2: #cfcce6; --muted: #9b98ba;
    --paper: #14112a; --card: #1e1a38; --line: #322d55; --line-2: #28244a;
    --brand: #8b6bff; --brand-ink: #b6a3ff; --brand-wash: #2b2357;
    --ready: #2fd09a; --held: #ffb84d; --busy: #ff5d7d; --dirty: #a98bff; --off: #8f97ad;
    --ready-wash: #123a30; --held-wash: #3d2f12; --busy-wash: #42182a; --dirty-wash: #2e2357; --off-wash: #2a2742;
    --c-indigo-w: #26245a; --c-teal-w: #123a38; --c-orange-w: #43260f; --c-pink-w: #45173a; --c-sky-w: #12324a;
    --c-amber-w: #3d2f12; --c-green-w: #153a24; --c-violet-w: #2e2357; --c-rose-w: #42182a;
    --danger: #ff5d7d; --veg: #3fd06a; --nonveg: #ff8a4d;
    --shadow: 0 1px 2px rgba(0,0,0,.35);
    color-scheme: dark;
  }
:root[data-theme="dark"] .cal-day { background: var(--card); }
:root[data-theme="dark"] .viz-root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --viz-grid: #2c2850; }
:root[data-theme="dark"] {
    --ink: #e7eaf1; --ink-2: #c4cad6; --muted: #949db0;
    --paper: #0f1420; --card: #171e2d; --line: #283246; --line-2: #1f283a;
    --brand: #6b85ff; --brand-ink: #9fb0ff; --brand-wash: #1c2648;
    --night: #0b1019; --night-2: #151c2b;
  }
:root[data-theme="dark"] .t-rose { --a: #b81d4d; }
:root[data-theme="dark"] .t-green { --a: #0f7a4c; }
:root[data-theme="dark"] .t-indigo { --a: #3a40b8; }
:root[data-theme="dark"] .t-orange { --a: #c2550c; }
:root[data-theme="dark"] .btag[class*="tone-"] { color: var(--ink); }
:root[data-theme="dark"] { color-scheme: dark; }

/* My profile: text size, density and side menu style (per person) */
:root[data-size="large"] { font-size: 17.5px; }
:root[data-size="large"] body { font-size: 16.5px; }
:root[data-size="xlarge"] { font-size: 19px; }
:root[data-size="xlarge"] body { font-size: 18px; }
:root[data-density="compact"] { --tap: 38px; }
:root[data-density="compact"] .card-body { padding: .75rem .9rem; }
:root[data-density="compact"] .table th, :root[data-density="compact"] .table td { padding-top: .35rem; padding-bottom: .35rem; }
:root[data-density="compact"] .list > li { padding-top: .45rem; padding-bottom: .45rem; }
:root[data-density="compact"] .main { padding-top: .9rem; }
:root[data-sidebar="light"] { --night: var(--card); --night-2: var(--brand-wash); --night-ink: var(--ink-2); }
:root[data-sidebar="light"] .rail { border-right: 1px solid var(--line); }
:root[data-sidebar="light"] .rail a:hover, :root[data-sidebar="light"] .rail a.active, :root[data-sidebar="light"] .rail-collapse:hover { color: var(--brand-ink); }
:root[data-sidebar="light"] .rail .group { color: var(--muted); }
:root[data-sidebar="colour"] { --night: color-mix(in srgb, var(--brand) 72%, #05070d); --night-2: color-mix(in srgb, var(--brand) 52%, #05070d); --night-ink: #eef1fb; }
:root[data-sidebar="colour"] .rail a.active::before { background: #fff; }
:root[data-sidebar="colour"] .rail .group, :root[data-sidebar="colour"] .rail-collapse { color: color-mix(in srgb, #fff 65%, transparent); }
.avatar-btn.has-photo, .avatar-img { padding: 0; overflow: hidden; }
.avatar-btn.has-photo img, .avatar-img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* My profile */
.profile-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; padding: 1.25rem 1.35rem; margin-bottom: 1rem;
  background: linear-gradient(120deg, var(--brand-wash), var(--card) 60%); }
.ph-photo { display: grid; justify-items: center; gap: .5rem; }
.ph-avatar { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.9rem; font-weight: 700; box-shadow: 0 0 0 4px var(--card), 0 0 0 6px color-mix(in srgb, var(--brand) 35%, transparent); }
.ph-photo-form { display: flex; gap: .3rem; margin: 0; }
.ph-photo-form label.btn { cursor: pointer; }
.ph-name { font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; }
.ph-meta { margin-top: .25rem; }
.ph-stats { display: grid; grid-template-columns: repeat(3, auto); gap: .5rem; }
.ph-stats > div { display: grid; padding: .55rem .85rem; border-radius: 10px; background: var(--card); border: 1px solid var(--line); min-width: 110px; }
.ph-stats span { font-size: .74rem; color: var(--muted); }
.ph-stats b { font-size: 1.2rem; color: var(--brand-ink); }
.profile-jump { margin-bottom: 1rem; }
.mode-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.mode-pick input, .accent-pick.big input { position: absolute; opacity: 0; pointer-events: none; }
.mode-pick label { display: grid; gap: .2rem; padding: .55rem; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--card); }
.mode-pick label small { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.mode-pick input:checked + label { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.mode-pick input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.mode-thumb { display: grid; grid-template-columns: 22px 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 56px; padding: 5px; border-radius: 7px; border: 1px solid var(--line); }
.mode-thumb i:first-child { grid-row: span 2; border-radius: 4px; }
.mode-thumb i { border-radius: 3px; }
.mode-light { background: #f2f3f6; } .mode-light i { background: #fff; } .mode-light i:first-child { background: #121a2b; }
.mode-dark { background: #0f1420; } .mode-dark i { background: #171e2d; } .mode-dark i:first-child { background: #0b1019; }
.mode-system { background: linear-gradient(110deg, #f2f3f6 50%, #0f1420 50%); } .mode-system i { background: color-mix(in srgb, #fff 50%, #171e2d); } .mode-system i:first-child { background: #121a2b; }
.accent-pick.big label { width: auto; height: auto; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem .3rem .3rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: none; font-size: .85rem; }
.accent-pick.big label::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--sw); }
.accent-pick.big input:checked + label { border-color: var(--sw); box-shadow: 0 0 0 2px var(--sw); font-weight: 650; }
.size-pick .sz-normal { font-size: .85rem; } .size-pick .sz-large { font-size: 1rem; } .size-pick .sz-xlarge { font-size: 1.15rem; }
.device-list li { display: flex; align-items: center; gap: .75rem; }
.device-list form { margin: 0; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0; }
.inline-form .input { flex: 1 1 200px; max-width: 280px; }
@media (max-width: 980px) { .profile-hero { grid-template-columns: auto minmax(0, 1fr); } .ph-stats { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .profile-hero { grid-template-columns: 1fr; text-align: center; } .ph-stats > div { min-width: 0; } .mode-pick { grid-template-columns: 1fr; } }
.size-pick b { margin-right: .3rem; }

/* Help & support */
.help-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1rem; }
.help-card { display:flex; gap:.9rem; align-items:center; padding:1.1rem 1.2rem; color:inherit; text-decoration:none; transition:border-color .15s, transform .15s; }
.help-card:hover { border-color:var(--brand); transform:translateY(-1px); }
.help-card > span:last-child { display:flex; flex-direction:column; gap:.1rem; min-width:0; }
.help-card strong { font-size:1.1rem; overflow-wrap:anywhere; }
.help-label { font-size:.8rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); }
.help-ico { flex:none; width:44px; height:44px; border-radius:12px; display:grid; place-items:center; background:color-mix(in srgb, var(--brand) 12%, transparent); color:var(--brand); }
.help-ico.wa { background:color-mix(in srgb, #25d366 15%, transparent); color:#128c4a; }
.help-ico svg { width:22px; height:22px; }
.login-support { text-align:center; font-size:.85rem; margin-top:.5rem; }

/* Windows app download box */
.win-dl { display:flex; align-items:center; gap:1rem; padding:1rem 1.2rem; margin-bottom:1rem; border-left:4px solid var(--brand); }
.win-dl-ico { flex:none; width:48px; height:48px; border-radius:12px; display:grid; place-items:center; background:var(--brand-wash); color:var(--brand); }
.win-dl-ico svg { width:24px; height:24px; }
.win-dl-text { flex:1; display:flex; flex-direction:column; gap:.2rem; min-width:0; }
.win-dl .btn { flex:none; }
@media (max-width: 640px) { .win-dl { flex-wrap:wrap; } .win-dl .btn { width:100%; justify-content:center; } }
.win-dl { flex-wrap: wrap; }
.win-dl-7 { flex: 1 1 100%; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding-top: .7rem; border-top: 1px dashed var(--line, #dfe3ea); }
.win-dl-7 > span { flex: 1 1 260px; }

/* ---------- Sign-in: hotel at dusk + form ---------- */
.signin-body { background: var(--card); }
.signin { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 1fr); }
.signin-scene { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; background: #15142e; color: #fff; isolation: isolate; }
.scene-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.signin-scene::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; z-index: -1;
  background: linear-gradient(rgba(13, 11, 32, .55), transparent); }
.signin-brand { position: absolute; top: clamp(1.2rem, 3vw, 2rem); left: clamp(1.2rem, 3vw, 2.4rem); display: flex; align-items: center; gap: .55rem;
  color: #fff; font-weight: 750; font-size: 1.15rem; letter-spacing: -.01em; text-decoration: none; }
.signin-brand svg { color: #ffd58a; }
.signin-brand > span { display: flex; flex-direction: column; line-height: 1.15; }
.signin-brand small { font-size: .78rem; font-weight: 500; color: rgba(255, 255, 255, .72); letter-spacing: 0; }
.signin-pitch { position: absolute; left: clamp(1.2rem, 3vw, 2.4rem); bottom: clamp(1.2rem, 3vw, 2.2rem); max-width: min(27rem, calc(100% - 2.4rem));
  padding: 1.25rem 1.4rem; border-radius: 18px; background: rgba(14, 12, 34, .5); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
.signin-pitch h2 { font-size: clamp(1.4rem, 2vw, 1.95rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; margin: 0 0 .7rem; max-width: 17ch; text-wrap: balance; }
.signin-pitch p { margin: 0; color: rgba(255, 255, 255, .8); line-height: 1.55; max-width: 40ch; }

.signin-main { display: flex; flex-direction: column; padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 5vw, 4.5rem) 1.25rem; background: var(--card); }
.signin-form { width: min(400px, 100%); margin: auto; padding: 1rem 0 2rem; }
.signin-form.wide { width: min(520px, 100%); }
.signin-form h1 { font-size: 1.85rem; letter-spacing: -.02em; margin: 0 0 .35rem; }
.signin-form > .muted { margin: 0 0 1.5rem; line-height: 1.5; }
.signin-form .form-grid { gap: 1.05rem; }
.signin-form .input { min-height: 48px; font-size: 1rem; }
.signin-form .btn-lg { min-height: 50px; margin-top: .25rem; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.label-row label { margin: 0; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 4.5rem; width: 100%; }
.pw-toggle { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--brand);
  font: inherit; font-size: .85rem; font-weight: 600; padding: .45rem .6rem; border-radius: 8px; cursor: pointer; }
.pw-toggle:hover { background: var(--brand-wash); }
.pw-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.signin-alt { margin: 1.6rem 0 0; color: var(--muted); }
.signin-foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.signin-foot a { color: inherit; }

/* The one moment: the restaurant lamps come on as the page opens. */
.scene-art .lamp-glow, .scene-art .lamp-bulb { opacity: 0; animation: lamp-on .9s ease-out forwards; animation-delay: calc(300ms + var(--d)); }
@keyframes lamp-on { 0% { opacity: 0; } 40% { opacity: .7; } 55% { opacity: .3; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .scene-art .lamp-glow, .scene-art .lamp-bulb { animation: none; opacity: 1; } }

@media (max-width: 900px) {
  .signin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .signin-scene { position: relative; height: 210px; }
  .signin-brand { top: 1rem; left: 1.1rem; }
  .signin-main { padding-top: 1.75rem; }
  .signin-form { margin: 0 auto; padding-top: 0; }
}

/* Admin: sign-in page photos */
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; }
.lp-item { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.lp-item img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.lp-item figcaption { padding: .6rem; display: grid; gap: .5rem; }
.lp-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.lp-row label { display: flex; align-items: center; gap: .4rem; }
.lp-order { width: 4rem; min-height: 34px; padding: .25rem .5rem; }
.lp-upload { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.lp-upload .input { flex: 1 1 240px; }
.lp-upload .hint { flex-basis: 100%; }

/* Sign-in: real photos, changing slowly */
.signin-photos { position: absolute; inset: 0; z-index: -1; }
.signin-photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04);
  transition: opacity 1.4s ease, transform 7s ease-out; }
.signin-photos img.on { opacity: 1; transform: scale(1); }
.signin-scene.has-photos::after { inset: 0; height: auto; background: linear-gradient(rgba(10, 9, 26, .55), transparent 28%, transparent 62%, rgba(10, 9, 26, .7)); }
.signin-caption { position: absolute; left: clamp(1.2rem, 3vw, 2.4rem); bottom: clamp(1.2rem, 3vw, 2rem); right: 1.2rem; display: flex; align-items: center; gap: .9rem; color: #fff; }
.signin-caption span { font-size: .95rem; font-weight: 600; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.signin-dots { display: flex; gap: .4rem; margin-left: auto; }
.signin-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .45); transition: width .3s, background .3s; }
.signin-dots i.on { width: 20px; border-radius: 4px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .signin-photos img { transition: opacity .01s; transform: none; } }

/* Email this bill */
.email-bill { margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.email-bill summary { cursor: pointer; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: .4rem; }
.email-bill summary svg { width: 18px; height: 18px; }

/* Admin: emails */
.mail-status { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: 14px; margin-bottom: 1rem; border: 1px solid; }
.mail-status svg { width: 24px; height: 24px; flex: none; margin-top: .1rem; }
.mail-status div { display: flex; flex-direction: column; gap: .15rem; }
.mail-status span { font-size: .92rem; opacity: .9; }
.mail-status.ok { background: #e6f6ee; border-color: #b7e3cb; color: #11603f; }
.mail-status.warn { background: #fff4dc; border-color: #f3d48c; color: #7a4d00; }
.mail-group { padding: .8rem 1.25rem .3rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.mail-types li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mail-types .check > span { display: flex; flex-direction: column; }
.mail-checklist { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
.mail-checklist code { font-size: .8rem; word-break: break-all; }
.seg { display: flex; gap: .25rem; flex-wrap: wrap; }
.seg a { padding: .3rem .65rem; border-radius: 8px; font-size: .85rem; color: var(--ink-2); text-decoration: none; }
.seg a.on { background: var(--brand-wash); color: var(--brand); font-weight: 600; }

/* ---------- Keyboard billing ---------- */
kbd { display: inline-block; min-width: 1.6em; padding: .05rem .4rem; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--card); color: var(--ink-2);
  font: 600 .78rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: center; white-space: nowrap; }
.btn kbd { margin-left: .35rem; font-size: .7rem; opacity: .75; }
.kb-hint { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .9rem; font-size: .82rem; color: var(--muted); }
.kb-hint span { display: inline-flex; align-items: center; gap: .25rem; }
.kb-status { min-height: 1.4em; margin: .35rem 0 .2rem; font-size: .88rem; font-weight: 600; color: var(--ok, #15803d); }
.kb-status.bad { color: var(--danger, #c0262d); }
.kb-jump { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; z-index: 60;
  background: #17133a; color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-size: 1rem; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); transition: opacity .15s, transform .15s; white-space: pre; }
.kb-jump.on { opacity: 1; transform: translate(-50%, 0); }
.kb-jump b { font-size: 1.2rem; letter-spacing: .05em; color: #ffd58a; }
.table-tile.kb-hit { outline: 3px solid var(--brand); outline-offset: 2px; }
.kot .advance .kot-key { margin-right: .5rem; background: rgba(255, 255, 255, .9); color: #111; border-color: rgba(0, 0, 0, .2); }
.kb-help { max-width: 760px; }
.kb-help-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.2rem 2rem; }
.kb-help h3 { font-size: .95rem; margin: 0 0 .5rem; color: var(--brand); }
.kb-help dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem .8rem; margin: 0; align-items: baseline; }
.kb-help dt { margin: 0; text-align: right; }
.kb-help dd { margin: 0; font-size: .92rem; color: var(--ink-2); }
/* Keyboard hints only where there is a keyboard (not on phones and tablets). */
@media (hover: none), (pointer: coarse) { .kb-hint, .kb-only, .kb-jump { display: none !important; } }
@media (hover: hover) and (pointer: fine) { .touch-tip { display: none; } }
.dns-checks li { align-items: flex-start; }
.dns-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: .85rem; }
.dns-dot.ok { background: #16a34a; } .dns-dot.bad { background: #dc2626; } .dns-dot.warn { background: #d97706; }
.dns-fix { margin-top: .35rem; font-size: .88rem; background: var(--brand-wash); padding: .45rem .6rem; border-radius: 8px; }
.sell-as { border: 0; padding: 0; margin: 0; }
.sell-as legend { font-size: .86rem; font-weight: 600; color: var(--ink-2); margin-bottom: .35rem; }
.sell-as .chips { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
/* Group booking: each room tile with adults and "sell as" */
.grp-rooms { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grp-room { flex-direction: column; align-items: stretch; gap: .35rem; cursor: default; }
.grp-room-top { display: flex; align-items: center; gap: .45rem; cursor: pointer; }
.grp-room-more { display: none; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; font-size: .82rem; color: var(--muted); }
.grp-room.on .grp-room-more { display: flex; }
.grp-adults { display: inline-flex; align-items: center; gap: .3rem; }
.grp-adults .input { width: 52px; min-height: 30px; padding: .2rem .35rem; }
.grp-room-more select.input { min-height: 30px; padding: .15rem .4rem; font-size: .82rem; width: auto; }
.grp-extra { color: var(--ink-2); font-weight: 600; }

/* Half A4: an A4 sheet turned sideways holds two standing A5 bills (each 148.5 × 210 mm), left and right. */
.half-page { display: flex; width: min(297mm, 100%); margin: 0 auto 16px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.half-slot { flex: 0 0 50%; min-height: 210mm; display: flex; min-width: 0; }
.half-slot.empty { background: repeating-linear-gradient(45deg, #fafafa, #fafafa 10px, #f2f2f2 10px, #f2f2f2 20px); }
.half-slot > .invx { flex: 1; min-width: 0; }
.invx.half { width: 100%; margin: 0; box-shadow: none; min-height: 210mm; padding: 7mm 7mm 6mm; }
.invx.half .ix-hsn, .invx.half .ix-bank { display: none; }
.invx.half .ix-terms { max-height: 3.2em; overflow: hidden; }
@media print {
  .half-page { width: 297mm; height: 210mm; margin: 0; box-shadow: none; page-break-after: always; break-after: page; overflow: hidden; }
  .half-page:last-child { page-break-after: auto; break-after: auto; }
  .half-slot { width: 148.5mm; flex: 0 0 148.5mm; height: 210mm; min-height: 0; overflow: hidden; }
  .half-slot.empty { background: none; }
  .invx.half { min-height: 0 !important; height: 210mm; }
}
/* A5 (half A4, standing): one bill on one A5 page. */
/* Same size on screen as on paper, so the page can measure a bill before it is printed. */
.invx.a5:not(.half) { box-sizing: border-box; width: min(148mm, 100%); padding: 5mm 6.5mm 4mm; font-size: 10px; }
@media print {
  .invx.a5:not(.half) { min-height: 0 !important; width: 148mm; }
  .invx.a5:not(.half) + .invx.a5 { break-before: page; page-break-before: always; }
}
.invx.a5:not(.half) .ix-parties, .invx.a5:not(.half) .ix-meta, .invx.a5:not(.half) .ix-ids { margin-top: 6px; }
.invx.a5:not(.half) .ix-bottom { margin-top: 6px; gap: 8px; }
.invx.a5:not(.half) .ix-foot { margin-top: 6px; }
.invx.a5:not(.half) .ix-head { gap: 8px; }
.invx.a5:not(.half) .ix-meta > div, .invx.a5:not(.half) .ix-box { padding-top: 5px; padding-bottom: 5px; }
.invx.a5:not(.half) td, .invx.a5:not(.half) th { padding-top: 3px !important; padding-bottom: 3px !important; }

/* A5 hotel bills: keep everything, signature included, on one page. Totals sit beside the
   left column again; the HSN summary repeats the item table, so A5 leaves it out; bank details on two lines. */
.invx.a5:not(.half) .ix-bottom { grid-template-columns: minmax(0, 1fr) 42%; }
.invx.a5:not(.half) .ix-hsn { display: none; }
.invx.a5:not(.half) .ix-left { display: flex; flex-direction: column; gap: 5px; }
.invx.a5:not(.half) .ix-bank { padding: 4px 7px; }
.invx.a5:not(.half) .ix-bank .ix-kv { display: inline-block; margin-right: 8px; }
.invx.a5:not(.half) .ix-bank .ix-kv span { margin-right: 3px; min-width: 0; }
.invx.a5:not(.half) .ix-pay { gap: 6px; }
.invx.a5:not(.half) .ix-totals td { padding-top: 2px !important; padding-bottom: 2px !important; }
.invx.a5:not(.half) .ix-sign-space { height: 34px; }
.invx.a5:not(.half) .ix-sign-space img { max-height: 32px; }
.invx.a5:not(.half) .ix-sign { min-width: 150px; }
.invx.a5:not(.half) .ix-foot { padding-top: 8px; }

/* GST returns */
.gst-bar { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; margin-bottom: 1rem; }
.gst-fy { display: flex; align-items: center; gap: .5rem; }
.gst-fy .input { width: auto; }
.gst-next-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; padding: 0 1rem 1rem; }
.gst-next-item { display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); color: var(--ink); }
.gst-next-item:hover { text-decoration: none; border-color: var(--brand); }
.gst-next-item.overdue { border-color: color-mix(in srgb, var(--busy) 45%, transparent); background: var(--busy-wash); }
.gst-period .card-head { padding-bottom: .4rem; }
.gst-sub { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: .55rem 1rem .25rem; }
.gst-ret { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(0, 2fr) auto auto; gap: .4rem .9rem; align-items: center; padding: .6rem 1rem; border-top: 1px solid var(--line-2, var(--line)); }
.gst-ret-name { display: flex; flex-direction: column; }
.gst-ret.overdue .gst-ret-name strong { color: var(--busy); }
@media (max-width: 700px) { .gst-ret { grid-template-columns: 1fr auto; } .gst-ret-fig { grid-column: 1 / -1; order: 3; } }
.gst-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 0 1rem; }
.gst-checks .card-body { display: grid; gap: .6rem; }
.gst-check { padding: .6rem .8rem; border-radius: var(--radius-s); border-left: 4px solid var(--held); background: var(--held-wash); }
.gst-check.bad { border-left-color: var(--busy); background: var(--busy-wash); }
.gst-check .small { margin-top: .15rem; }
.gst-site-fix { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .45rem 0; border-top: 1px dashed var(--line); }
.gst-site-fix .input { width: auto; min-width: 180px; }
.gst-total td { border-top: 2px solid var(--ink); font-weight: 650; }
.gst-sites { display: grid; gap: .45rem; }
.gst-sites-head, .gst-site-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: .5rem; }
.gst-help { padding: .9rem 1.1rem; }
.gst-help summary { cursor: pointer; }
.gst-help ol { margin: .6rem 0 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
@media print { .gst-ret .btn { display: none; } }

/* Bill edit: line total, and the "Add line" picker */
.line-row .line-amt { order: 1; grid-column: 1 / -1; text-align: right; margin-top: -.35rem; font-variant-numeric: tabular-nums; }
.pick-sheet { width: min(640px, 100%); }
.pick-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: .7rem 0 .5rem; }
.pick-tabs button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .88rem; cursor: pointer; color: var(--ink); }
.pick-tabs button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pick-list { display: grid; gap: .3rem; max-height: min(55vh, 460px); overflow-y: auto; padding-right: .2rem; }
.pick-cat { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: .5rem .2rem .1rem; }
.pick-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; text-align: left; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.pick-item:hover, .pick-item:focus-visible { border-color: var(--brand); background: var(--brand-wash); }
.pick-item small { display: block; color: var(--muted); font-size: .78rem; }
.pick-price { white-space: nowrap; font-weight: 650; font-variant-numeric: tabular-nums; }
.line-row.just-added { animation: line-flash 2.2s ease-out; border-radius: var(--radius-s); }
@keyframes line-flash { 0%, 35% { background: color-mix(in srgb, var(--ready, #16a34a) 18%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ready, #16a34a) 18%, transparent); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }
.line-toast { position: fixed; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateY(20px); opacity: 0; pointer-events: none; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .65rem .8rem .65rem 1rem; border-radius: 16px; background: #14532d; color: #fff; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; }
.line-toast.show { opacity: 1; transform: none; pointer-events: auto; }
.line-toast button { border: 0; border-radius: 999px; padding: .35rem .8rem; background: #fff; color: #14532d; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
@media (min-width: 900px) { .line-toast { left: 50%; right: auto; bottom: 28px; transform: translate(-50%, 20px); border-radius: 999px; max-width: 640px; } .line-toast.show { transform: translate(-50%, 0); } }
/* Phones: with a back button in the top bar, drop the logo so the bar fits (no sideways scroll). */
@media (max-width: 480px) { .back-btn ~ .appbar-brand, .back-btn ~ .appbar-hotel, .back-btn ~ .settings-btn, .back-btn ~ .help-btn { display: none; } }


/* Settings → Menu: search */
.menu-find { position: sticky; top: 64px; z-index: 5; padding: .7rem .8rem; display: grid; gap: .5rem; box-shadow: 0 6px 14px -10px rgba(0,0,0,.25); }
.menu-find-row { display: flex; align-items: center; gap: .5rem; }
.menu-find-row > svg { flex: none; width: 18px; height: 18px; color: var(--muted); }
.menu-find-row #menu-q { flex: 1; min-width: 0; }
.menu-find-row #menu-show { width: auto; flex: none; max-width: 40%; }
.menu-find .input { min-height: 40px; }
.menu-find-cats { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.menu-find-cats .chip-link { white-space: nowrap; }
.menu-find-cats [hidden], [data-menu-item][hidden], [data-menu-cat][hidden] { display: none !important; }
li.menu-editing { background: color-mix(in srgb, var(--brand) 9%, transparent); }
@media (max-width: 640px) { .menu-find { top: 56px; } .menu-find-row #menu-show { max-width: 34%; } }

.ticket .line .rate-changed, .line .rate-changed { color: var(--held); font-weight: 600; }
.audit-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* Settings → early / late rule */
.stay-half { margin-top: .6rem; }
.stay-half[hidden] { display: none; }
.sr-row { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .95rem; line-height: 2.2; }
.sr-row .input-sm { width: 64px; min-height: 34px; padding: .25rem .45rem; }
.stay-fees .card-body { padding-top: .7rem; padding-bottom: .7rem; }
.stay-fees .fee-block + .fee-block { margin-top: .7rem; }
.stay-fees .fee-title { margin-bottom: .35rem; }
.fee-pick { display: flex; gap: .45rem; flex-wrap: wrap; }
.fee-pick input { position: absolute; opacity: 0; pointer-events: none; }
.fee-pick label { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; background: var(--card); }
.fee-pick label .money { color: var(--muted); font-weight: 600; }
.fee-pick input:checked + label { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--card)); color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.fee-pick input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.fee-tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--held); background: var(--held-wash); padding: .1rem .35rem; border-radius: 6px; }
.fee-tag[hidden] { display: none; }

/* Discount inside the payment sheet */
.pay-discount { margin-top: .7rem; border: 1px dashed var(--line); border-radius: 10px; padding: .45rem .7rem; }
.pay-discount summary { cursor: pointer; font-weight: 650; }
.pay-disc-row { display: grid; grid-template-columns: auto 110px 1fr; gap: .5rem; margin-top: .5rem; align-items: center; }
@media (max-width: 560px) { .pay-disc-row { grid-template-columns: 1fr 1fr; } .pay-disc-row [name=discount_reason] { grid-column: 1 / -1; } }

.billto-chip { display: inline-block; margin-left: .4rem; padding: .05rem .45rem; border-radius: 6px; background: var(--held-wash); color: var(--held); font-size: .8rem; font-weight: 600; }

/* Order screen: bill date (back-dated bill) at the top */
.bill-date-top { display: inline-flex; align-items: center; gap: .45rem; padding: .2rem .25rem .2rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: .85rem; font-weight: 600; }
.bill-date-top .input { height: 34px; padding: .2rem .5rem; width: auto; font-size: .85rem; }
.bill-date-top b { color: #b45309; font-size: .75rem; }
.bill-date-top.is-back { border-color: #f59e0b; background: #fffbeb; }
@media (max-width: 520px) { .appbar .help-btn { display: none; } }
/* A bill longer than one sheet (set by the print page): plain block layout, so every page prints whole. */
@media print {
  .invx.ix-multi { display: block; }
  .invx.ix-multi .ix-foot { margin-top: 0; }
  .invx.ix-multi .ix-items tr, .invx.ix-multi .ix-bottom, .invx.ix-multi .ix-foot, .invx.ix-multi .ix-terms { break-inside: avoid; page-break-inside: avoid; }
  .invx.ix-multi .ix-items thead { display: table-header-group; }
  .invx.ix-multi .ix-items tfoot { display: table-row-group; }
}

/* Payment sheet: bill summary, mode buttons, reference */
.pay-bill { border: 1px solid var(--line); border-radius: 12px; padding: .55rem .8rem; margin-bottom: .8rem; background: var(--surface-2, color-mix(in srgb, var(--line) 18%, transparent)); }
.pay-bill .row { display: flex; justify-content: space-between; gap: .75rem; padding: .18rem 0; font-size: .92rem; }
.pay-bill .row.grand { border-top: 1px dashed var(--line); margin-top: .3rem; padding-top: .45rem; font-weight: 750; font-size: 1.08rem; }
.pay-row-main { display: grid; gap: .65rem; }
.pay-modes label { padding: .45rem .7rem; }

/* Quick payment under "Due" on a billed table */
.quick-pay { display: grid; gap: .5rem; margin: .6rem 1rem 0; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.quick-pay .qp-amt label { display: block; font-size: .84rem; font-weight: 650; color: var(--ink-2); margin-bottom: .25rem; }
.quick-pay .qp-amt .input { font-size: 1.1rem; font-weight: 650; }
.quick-pay .segmented { gap: .3rem; }
.quick-pay .segmented label { min-height: 32px; padding: .25rem .6rem; font-size: .88rem; }
.quick-pay .qp-in { min-height: 34px; padding: .3rem .55rem; font-size: .9rem; }
.quick-pay .qp-disc { display: grid; grid-template-columns: auto auto 76px 1fr; gap: .35rem; align-items: center; }
.quick-pay .qp-disc-label { font-size: .84rem; font-weight: 650; color: var(--ink-2); }
.quick-pay .qp-note { margin: 0; min-height: 0; }
.quick-pay .qp-note:empty { display: none; }
.quick-pay .btn-ghost.btn-sm { justify-self: center; }
@media (max-width: 480px) { .quick-pay .qp-disc { grid-template-columns: auto auto 1fr; } .quick-pay .qp-disc [name=discount_reason] { grid-column: 1 / -1; } }

/* Add-ons: chips under a new dish, a quiet line under a sent one */
.ticket .line .addon-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .3rem; }
.addon-chip { border: 1px dashed var(--line); background: var(--card); color: var(--ink-2); border-radius: 999px; padding: .2rem .6rem; font: inherit; font-size: .8rem; cursor: pointer; min-height: 30px; }
.addon-chip:hover { border-color: var(--brand); color: var(--brand); }
.addon-chip.on { border-style: solid; border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 600; }
.ticket .line .addon-line, .addon-line { display: block; font-weight: 500; font-size: .82rem; color: var(--ink-2); }

/* Sizes: one must be picked (Pizza S / M / L) */
.ticket .line .size-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .3rem; }
.size-chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: .25rem .65rem; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; min-height: 32px; }
.size-chip:hover { border-color: var(--brand); color: var(--brand); }
.size-chip.on { border-color: var(--brand); background: var(--brand); color: #fff; }
.ticket .line.needs-size .money { color: var(--busy); font-size: .85rem; }
.ticket .line.needs-size .size-chip { border-color: var(--busy); }
.ticket .line .note-input { grid-column: 1 / -1; min-height: 34px; padding: .3rem .55rem; font-size: .9rem; }
.waiter-pick { display: inline-flex; align-items: center; gap: .35rem; margin-left: .2rem; }
.waiter-pick select { min-height: 30px; padding: .15rem .5rem; font-size: .88rem; width: auto; }
.rs-empty-rooms { margin-top: .9rem; }
.rs-empty-rooms > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }

/* ==========================================================================
   Tables screen: colour by state, more on each tile, quick actions
   ========================================================================== */
.tile-wrap { position: relative; display: grid; }
.tile-wrap .table-tile { padding-right: 1.6rem; }
.table-tile.busy { background: linear-gradient(150deg, var(--c-sky-w), var(--card)); border-color: var(--c-sky); }
.table-tile.busy .name, .table-tile.busy .amt { color: var(--c-sky); }
.table-tile.billed { background: linear-gradient(150deg, var(--c-amber-w), var(--card)); border-color: var(--c-amber); }
.table-tile.billed .name, .table-tile.billed .amt { color: color-mix(in srgb, var(--c-amber) 80%, #000); }
.table-tile.late, .table-tile.stale { background: linear-gradient(150deg, var(--c-rose-w), var(--card)); border-color: var(--c-rose); box-shadow: inset 4px 0 0 var(--c-rose); }
.table-tile.late .name, .table-tile.late .amt, .table-tile.stale .name, .table-tile.stale .amt { color: var(--c-rose); }
.table-tile .tile-warn { color: var(--c-rose); font-weight: 650; }
.table-tile .tile-waiter { font-weight: 600; color: var(--ink-2); }
.tile-more { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.tile-more:hover, .tile-more:focus-visible { background: color-mix(in srgb, var(--ink) 8%, transparent); }

.pos-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .82rem; color: var(--ink-2); margin: -.25rem 0 .75rem; }
.pos-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: .35rem; vertical-align: -1px; border: 1.5px solid; }
.pos-legend .lg-free { border-style: dashed; border-color: var(--c-green); background: var(--c-green-w); }
.pos-legend .lg-busy { border-color: var(--c-sky); background: var(--c-sky-w); }
.pos-legend .lg-billed { border-color: var(--c-amber); background: var(--c-amber-w); }
.pos-legend .lg-late { border-color: var(--c-rose); background: var(--c-rose-w); }
.pos-live-at { margin-left: auto; color: var(--muted); }

.tile-menu { position: fixed; z-index: 60; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .35); padding: .35rem; display: grid; }
.tile-menu[hidden] { display: none; }
.tile-menu-head { font-size: .78rem; font-weight: 700; color: var(--muted); padding: .35rem .6rem .25rem; }
.tile-menu-item { display: block; text-align: left; border: 0; background: none; font: inherit; color: var(--ink); padding: .55rem .65rem; border-radius: 8px; cursor: pointer; text-decoration: none; }
.tile-menu-item:hover, .tile-menu-item:focus-visible { background: color-mix(in srgb, var(--brand) 10%, transparent); text-decoration: none; outline: none; }
.tile-menu-item.danger { color: var(--danger); }
@media print { .pos-legend, .tile-more { display: none; } }
.table-tile.busy, .table-tile.billed, .table-tile.late, .table-tile.stale { border-style: solid; }
.lan-addrs { display: flex; flex-wrap: wrap; gap: .5rem; }
.lan-addrs code { font-size: 1.25rem; font-weight: 700; padding: .35rem .7rem; border-radius: 8px; background: var(--tint, #f3f4f8); letter-spacing: .02em; }

/* Counter PC setup: network search */
.lan-find { border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; background: var(--card); }
.lan-find-head { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; }
.lan-radar { position: relative; width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 12%, transparent); }
.lan-radar::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--brand); }
.lan-radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; }
.lan-find.searching .lan-radar i { animation: lan-ping 1.6s ease-out infinite; }
.lan-find.searching .lan-radar i + i { animation-delay: .8s; }
@keyframes lan-ping { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.35); opacity: 0; } }
.lan-bar { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--brand) 12%, transparent); overflow: hidden; margin-top: .8rem; }
.lan-bar span { display: block; width: 35%; height: 100%; background: var(--brand); border-radius: 4px; animation: lan-slide 1.2s ease-in-out infinite; }
@keyframes lan-slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .lan-find.searching .lan-radar i, .lan-bar span { animation: none; } }
.lan-results { display: grid; gap: .5rem; margin-top: .8rem; }
.lan-results:empty { display: none; }
.lan-card { display: flex; align-items: center; justify-content: space-between; gap: .8rem; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .85rem; }
.lan-card.best { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.lan-tag { display: inline-block; margin-left: .5rem; font-size: .72rem; font-weight: 700; color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); padding: .1rem .45rem; border-radius: 999px; vertical-align: 1px; }
.lan-empty { margin-top: .8rem; padding: .7rem .85rem; border-radius: 10px; background: color-mix(in srgb, var(--warn, #b45309) 9%, transparent); }
.pay-fix { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.pay-fix .small { margin-right: auto; }
tr.is-cancelled td { color: var(--muted); }
tr.is-cancelled .money { text-decoration: line-through; }
li.is-cancelled .money { text-decoration: line-through; color: var(--muted); }
li.is-cancelled .title a { color: var(--muted); }

/* Set up this PC: log in, free trial, confirm */
.pcs-or { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .9rem; margin: 1.3rem 0 1rem; }
.pcs-or::before, .pcs-or::after { content: ""; flex: 1; height: 1px; background: var(--line, #e5e7eb); }
.pcs-new { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border: 1.5px dashed color-mix(in srgb, var(--brand) 35%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--brand) 4%, #fff); }
.pcs-new b { display: block; }
.pcs-new .btn { flex: none; }
.pcs-h2 { font-size: 1.35rem; margin: 0 0 .4rem; }
.pcs-ask { margin: 0 0 1.1rem; padding: 0; list-style: none; display: grid; gap: .6rem; }
.pcs-ask li { padding: .8rem 1rem; border-radius: 12px; background: #fff7e6; border: 1px solid #f5d9a8; color: #6b4a12; font-size: .95rem; }
.pcs-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 520px) { .pcs-new { flex-direction: column; align-items: stretch; } }

/* Settings → Logged-in devices */
.sess-person { display: block !important; }
.sess-who { display: flex; align-items: center; gap: .75rem; }
.sess-who form { margin: 0; }
.sess-who .avatar-sm { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem; background: color-mix(in srgb, var(--brand) 12%, #fff); color: var(--brand); }
.sess-devices { margin: .6rem 0 0 calc(38px + .75rem); border-left: 2px solid var(--line-2, #eef); padding-left: .4rem; }
.sess-devices li { padding: .5rem .4rem; }
@media (max-width: 600px) { .sess-devices { margin-left: 0; } .sess-who { flex-wrap: wrap; } }

/* Stock & recipes */
.stock-level { font-weight: 650; }
.stock-level.low { color: #b45309; }
.stock-level.neg { color: var(--busy); }
.stock-table .row-actions { white-space: nowrap; text-align: right; }
.stock-table tr.is-off td { opacity: .6; }
.stock-empty h2 { margin: 0 0 .6rem; }
.stock-steps { margin: 0 0 1.2rem; padding-left: 1.2rem; display: grid; gap: .45rem; color: var(--ink-2, #444); }
.stock-steps em { font-style: normal; font-weight: 650; }
.qty-unit { display: flex; gap: .5rem; }
.qty-unit .input:first-child { flex: 1; min-width: 0; }
.qty-unit select { width: auto; flex: none; }
.recipe-size { margin-bottom: 1rem; }
.recipe-row { display: grid; grid-template-columns: minmax(0, 1fr) 9rem 2.4rem; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.recipe-row .unit-in { position: relative; }
.recipe-row .unit-in span { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; pointer-events: none; }
.recipe-row .unit-in .input { padding-right: 3rem; }
.recipe-sum { color: var(--muted); font-size: .92rem; }
.recipe-sum b { color: var(--ink); font-weight: 600; }
@media (max-width: 560px) { .recipe-row { grid-template-columns: minmax(0, 1fr) 6.5rem 2.4rem; } .stock-table .row-actions { text-align: left; white-space: normal; } }
.cost-ok { color: #15803d; }
.cost-mid { color: #b45309; }
.cost-high { color: var(--busy); }
.cost-chips { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; margin-right: .6rem; }
.cost-chip { font-size: .85rem; padding: .2rem .55rem; border-radius: 99px; background: var(--tint, #f4f5fb); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cost-chip b { font-weight: 600; color: var(--ink); }
.cost-chip em { font-style: normal; font-weight: 700; margin-left: .25rem; }
.recipe-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.recipe-cost { font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; }
.stock-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stock-kpis .kpi { background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: var(--radius, 14px); padding: .9rem 1rem; display: grid; gap: .15rem; }
.stock-kpis .kpi-l { font-size: .85rem; color: var(--muted); }
.stock-kpis strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stock-kpis .kpi-s { font-size: .8rem; color: var(--muted); }
.pu-table td { vertical-align: middle; }
.pu-table select[data-item] { min-width: 12rem; }
.pu-num { width: 7.5rem; text-align: right; }
.pu-unit { width: auto; min-width: 4.5rem; }
.pu-bill { margin-bottom: .6rem; }
.pu-bill > summary { list-style: none; cursor: pointer; }
.pu-bill > summary::-webkit-details-marker { display: none; }
.pu-sum { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; }
.pu-date { font-weight: 700; min-width: 3.6rem; color: var(--muted); }
.ck-in { display: inline-block; width: 9rem; }
.ck-foot { border-top: 1px solid var(--line-2); font-weight: 600; }
@media (max-width: 760px) { .stock-kpis { grid-template-columns: 1fr 1fr; } .cost-chips { justify-content: flex-start; margin: .4rem 0 0; } .pu-num { width: 100%; } }
.pu-grand td { border-top: 2px solid var(--line, #e5e7eb); font-size: 1.05rem; }
.stock-kpis:has(> .kpi:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Purchases */
.menu-more { position: relative; }
.menu-more > summary { list-style: none; }
.menu-more > summary::-webkit-details-marker { display: none; }
.menu-more .menu-pop { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 30; min-width: 14rem; background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .14); padding: .35rem; display: grid; }
.menu-more .menu-pop a { padding: .6rem .75rem; border-radius: 8px; color: var(--ink); font-weight: 500; }
.menu-more .menu-pop a:hover { background: var(--bg, #f3f4f6); text-decoration: none; }
.pu-nav { margin-top: -.25rem; }
.cat-bars { display: grid; gap: .55rem; padding: 1rem 1.1rem; }
.cat-bar { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr auto; align-items: center; gap: .75rem; color: var(--ink); }
.cat-bar:hover { text-decoration: none; }
.cat-bar:hover .cat-name { text-decoration: underline; }
.cat-bar .cat-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-bar .cat-track { height: .6rem; border-radius: 99px; background: var(--line-2, #f1f5f9); overflow: hidden; }
.cat-bar .cat-fill { display: block; height: 100%; border-radius: 99px; background: var(--c, #f87171); }
.cat-bar .cat-amt { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 6rem; text-align: right; }
.cat-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--c, #94a3b8); margin-right: .45rem; vertical-align: middle; }
.kpi-trend { font-size: .8rem; font-weight: 600; }
.kpi-trend.up { color: var(--danger, #dc2626); }
.kpi-trend.down { color: var(--c-green, #16a34a); }
.cat-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.cat-chips button { border: 1px solid var(--line, #e5e7eb); background: var(--card, #fff); border-radius: 99px; padding: .3rem .7rem; font-size: .85rem; cursor: pointer; color: var(--ink); }
.cat-chips button:hover, .cat-chips button.on { border-color: var(--brand); color: var(--brand); }
.doc-status { display: inline-flex; align-items: center; gap: .35rem; }
.rec-next { font-variant-numeric: tabular-nums; }
.rec-row.is-off td { opacity: .6; }
.po-sheet { background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; padding: 1.5rem; }
.po-sheet .po-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.po-sheet .po-to { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.po-sheet .po-to strong { color: var(--ink); font-size: 1rem; }
.po-sheet .po-meta { text-align: right; font-size: .9rem; line-height: 1.6; }
.po-sheet .po-meta .po-no { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.steps-line { display: flex; gap: 0; margin: 0 0 1rem; padding: 0; list-style: none; flex-wrap: wrap; }
.steps-line li { flex: 1 1 0; min-width: 7rem; padding: .55rem .8rem; border-top: 3px solid var(--line, #e5e7eb); color: var(--muted); font-size: .88rem; }
.steps-line li.done { border-color: var(--c-green, #16a34a); color: var(--ink); }
.steps-line li.now { border-color: var(--brand); color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .cat-bar { grid-template-columns: 1fr auto; } .cat-bar .cat-track { grid-column: 1 / -1; grid-row: 2; } .po-sheet .po-meta { text-align: left; } }
.menu-more .menu-pop form { display: contents; }
.menu-more .menu-pop .menu-btn { text-align: left; background: none; border: 0; padding: .6rem .75rem; border-radius: 8px; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; }
.menu-more .menu-pop .menu-btn:hover { background: var(--bg, #f3f4f6); }
.stock-kpis a.kpi:hover { border-color: var(--brand); }
.stock-kpis .kpi-on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.seg-opt { position: relative; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-block; padding: .5rem .85rem; border: 1px solid var(--line, #e5e7eb); border-radius: 99px; font-size: .9rem; background: var(--card, #fff); }
.seg-opt input:checked + span { border-color: var(--brand); background: var(--brand-wash, #eef2ff); color: var(--brand); font-weight: 600; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.field .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
/* Hidden helper text inside a scrolling table must not widen the page. */
.table-wrap { position: relative; }
@media (max-width: 640px) {
    .pu-table, .pu-table tbody, .pu-table tfoot { display: block; width: 100%; }
    .pu-table thead { display: none; }
    .pu-table tbody tr { display: grid; grid-template-columns: 1fr .8fr 1fr auto; gap: .45rem .5rem; align-items: end; padding: .75rem .85rem; border-bottom: 1px solid var(--line-2, #eef0f4); }
    .pu-table tbody td { display: block; padding: 0; border: 0; text-align: left; }
    .pu-table tbody td.right { text-align: left; }
    .pu-table tbody td:nth-child(1) { grid-column: 1 / -1; }
    .pu-table tbody td:nth-child(2) { grid-column: 1; }
    .pu-table tbody td:nth-child(3) { grid-column: 2; }
    .pu-table tbody td:nth-child(4) { grid-column: 3; }
    .pu-table tbody td:nth-child(5) { grid-column: 1 / 4; grid-row: 3; text-align: right; font-weight: 600; }
    .pu-table tbody td:nth-child(5):empty { display: none; }
    .pu-table tbody td:nth-child(6) { grid-column: 4; grid-row: 2; }
    .pu-table tbody td:nth-child(n+2):nth-child(-n+4)::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--muted); margin-bottom: .2rem; }
    .pu-table select[data-item], .pu-table .pu-unit, .pu-table .pu-num { min-width: 0; width: 100%; }
    .pu-table tfoot tr { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; padding: .55rem .85rem; }
    .pu-table tfoot td, .pu-table tfoot th { display: block; padding: 0; border: 0; }
    .pu-table tfoot td:empty { display: none; }
    .pu-table tfoot .pu-num { width: 8rem; }
    .menu-more .menu-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); min-width: 0; z-index: 60; }
}
/* Bill photos */
.att-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.att-drop { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; padding: .9rem 1rem; border: 1.5px dashed var(--line, #d7dbe3); border-radius: 12px; cursor: pointer; color: var(--ink); background: var(--bg, #f8fafc); }
.att-drop:hover, .att-file:focus-visible + .att-picked, .att-input:focus-within .att-drop { border-color: var(--brand); }
.att-drop svg { width: 1.4rem; height: 1.4rem; color: var(--brand); }
.att-drop .small { width: 100%; margin-left: 2.05rem; margin-top: -.35rem; }
.att-picked { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .25rem; font-size: .9rem; }
.att-ok { color: var(--c-green, #16a34a); font-weight: 700; }
.att-grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .85rem; }
.att-tile { border: 1px solid var(--line, #e5e7eb); border-radius: 12px; overflow: hidden; background: var(--card, #fff); display: flex; flex-direction: column; }
.att-thumb { display: block; aspect-ratio: 4 / 3; background: var(--bg, #f3f4f6); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-pdf { display: flex; height: 100%; align-items: center; justify-content: center; gap: .4rem; font-weight: 700; color: var(--muted); }
.att-meta { padding: .45rem .6rem 0; display: grid; }
.att-name { font-size: .85rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-actions { display: flex; justify-content: space-between; padding: .2rem .25rem .3rem; margin-top: auto; }
.att-actions form { display: inline; }
.att-add { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.att-add .att-input { flex: 1 1 18rem; margin: 0; }
.clip-mark { color: var(--muted); display: inline-flex; vertical-align: middle; margin-left: .3rem; }
.clip-mark svg { width: .95rem; height: .95rem; }
.att-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.att-actions .btn { padding: .3rem .5rem; font-size: .82rem; }
.att-pdf svg { width: 2rem; height: 2rem; }
/* Inventory: stock board */
.inv-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-btn { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.kpi-btn:hover { border-color: var(--brand); }
.inv-alert { display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem; margin: 0 0 1rem; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; }
.inv-alert svg { width: 1.3rem; height: 1.3rem; flex: none; color: #ea580c; }
.inv-board { overflow: hidden; }
.inv-toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .85rem 1rem; border-bottom: 1px solid var(--line-2, #eef0f4); }
.inv-search { position: relative; flex: 1 1 14rem; max-width: 22rem; }
.inv-search svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--muted); }
.inv-search input { width: 100%; height: 2.4rem; padding: 0 .75rem 0 2.1rem; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; font: inherit; background: var(--card, #fff); color: var(--ink); }
.inv-search input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.inv-seg { display: inline-flex; background: var(--bg, #f3f4f6); border-radius: 10px; padding: 3px; }
.inv-seg button { border: 0; background: none; font: inherit; font-size: .88rem; font-weight: 500; padding: .38rem .75rem; border-radius: 8px; cursor: pointer; color: var(--muted); }
.inv-seg button span { font-size: .78rem; opacity: .75; margin-left: .15rem; }
.inv-seg button.on { background: var(--card, #fff); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.inv-cat, .inv-sort { width: auto; height: 2.4rem; min-width: 10rem; }
.inv-table td { vertical-align: top; }
.inv-sub { display: block; font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.inv-level { display: flex; align-items: center; gap: .45rem; }
.inv-qty { font-weight: 700; font-variant-numeric: tabular-nums; }
.inv-qty.neg { color: var(--danger, #dc2626); }
.inv-pill { font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 99px; }
.inv-pill.low { background: #fef3c7; color: #92400e; }
.inv-pill.out { background: #fee2e2; color: #991b1b; }
.inv-bar { position: relative; height: 6px; border-radius: 99px; background: var(--line-2, #eef0f4); margin-top: .4rem; max-width: 11rem; overflow: visible; }
.inv-bar > span { display: block; height: 100%; border-radius: 99px; background: #22c55e; }
.inv-bar.low > span { background: #f59e0b; }
.inv-bar.out > span { background: #ef4444; }
.inv-bar > i { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--muted); opacity: .45; border-radius: 2px; }
.inv-days { font-weight: 600; font-variant-numeric: tabular-nums; }
.inv-days.warn { color: #b45309; }
.inv-days.bad { color: var(--danger, #dc2626); }
.inv-acts { display: inline-flex; gap: .25rem; justify-content: flex-end; flex-wrap: nowrap; }
.inv-none { padding: 1.25rem 1rem; margin: 0; text-align: center; }
.inv-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .7rem 1rem; border-top: 1px solid var(--line-2, #eef0f4); }
@media (max-width: 1100px) { .inv-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
    .inv-kpis { grid-template-columns: 1fr 1fr; }
    .inv-search { max-width: none; flex-basis: 100%; }
    .inv-seg { flex: 1 1 100%; } .inv-seg button { flex: 1; padding: .4rem .3rem; }
    .inv-cat, .inv-sort { flex: 1 1 40%; min-width: 0; }
    .inv-alert { flex-wrap: wrap; }
    .inv-bar { max-width: none; }
    .inv-acts { width: 100%; } .inv-acts .btn { flex: 1; }
}
.inv-toolbar .input.inv-cat, .inv-toolbar .input.inv-sort { width: auto; flex: 0 0 auto; }
.stock-kpis.inv-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .stock-kpis.inv-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .stock-kpis.inv-kpis { grid-template-columns: 1fr 1fr; } .inv-toolbar .input.inv-cat, .inv-toolbar .input.inv-sort { flex: 1 1 40%; } }
/* Inventory: item page */
.inv-chart-card .card-body { position: relative; }
.inv-chart { width: 100%; height: 240px; display: block; overflow: visible; }
.inv-chart .g { stroke: var(--line-2, #eef0f4); stroke-width: 1; }
.inv-chart .ax { font-size: 11px; fill: var(--muted, #64748b); }
.inv-chart .low { stroke: #f59e0b; stroke-width: 1.5; stroke-dasharray: 5 4; }
.inv-chart .bar { fill: #bfdbfe; }
.inv-chart .area { fill: rgba(37, 99, 235, .08); }
.inv-chart .line { fill: none; stroke: #2563eb; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.inv-chart .in { fill: #16a34a; stroke: #fff; stroke-width: 2; }
.inv-chart .hit { fill: transparent; cursor: crosshair; }
.inv-chart .hit.on { fill: rgba(15, 23, 42, .05); }
.inv-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--muted); }
.inv-legend i { display: inline-block; width: .8rem; height: .55rem; margin-right: .35rem; vertical-align: middle; border-radius: 2px; }
.lg-line { background: #2563eb; height: 3px !important; } .lg-bar { background: #bfdbfe; } .lg-in { background: #16a34a; border-radius: 50% !important; width: .55rem !important; } .lg-low { border-top: 2px dashed #f59e0b; height: 0 !important; }
.inv-tip { position: absolute; z-index: 5; display: grid; gap: .1rem; min-width: 9rem; padding: .5rem .65rem; border-radius: 10px; background: #0f172a; color: #e2e8f0; font-size: .8rem; pointer-events: none; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); }
.inv-tip strong { color: #fff; } .inv-tip .in { color: #86efac; } .inv-tip .w { color: #fcd34d; }
.inv-chart-sum { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: .6rem; font-size: .9rem; color: var(--muted); }
.inv-chart-sum strong { color: var(--ink); }
.inv-side { display: grid; gap: 1rem; }
.inv-prices { display: flex; align-items: flex-end; gap: .5rem; overflow-x: auto; padding-bottom: .15rem; }
.inv-price { display: grid; justify-items: center; gap: .25rem; min-width: 2.8rem; }
.inv-price .v { font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.inv-price .b { width: 1.4rem; border-radius: 6px 6px 2px 2px; background: #c7d2fe; }
.inv-price .b[data-low="1"] { background: #86efac; }
.inv-price:last-child .b { background: #6366f1; }
.inv-price .d { font-size: .72rem; color: var(--muted); }
dl.facts { display: grid; grid-template-columns: minmax(7rem, 38%) 1fr; gap: .55rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .9rem; }
dl.facts dd { margin: 0; font-weight: 500; }
@media (max-width: 760px) { .inv-chart { height: 200px; } }
.inv-tip[hidden] { display: none; }
.inv-two { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-bottom: 1rem; }
.inv-two > .card, .inv-side > .card { margin: 0; }
.inv-two .cat-bar { grid-template-columns: minmax(8rem, 16rem) 1fr auto; }
@media (max-width: 1000px) { .inv-two { grid-template-columns: 1fr; } }
.inv-chart-card { margin-bottom: 1rem; }
/* Inventory: stock check */
.ck-toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--muted); cursor: pointer; }
.ck-progress { margin-left: auto; display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--muted); min-width: 14rem; }
.ck-track { flex: 1; height: 8px; border-radius: 99px; background: var(--line-2, #eef0f4); overflow: hidden; }
.ck-track span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .25s; }
.ck-table td { vertical-align: middle; }
.ck-group th { background: var(--bg, #f8fafc); font-size: .8rem; font-weight: 700; color: var(--ink); padding-top: .5rem; padding-bottom: .5rem; }
.ck-cell { display: flex; align-items: center; gap: .4rem; }
.ck-input { display: flex; align-items: stretch; max-width: 11rem; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; overflow: hidden; background: var(--card, #fff); }
.ck-input:focus-within { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.ck-input .input { border: 0; border-radius: 0; min-width: 0; text-align: right; outline: none; box-shadow: none; }
.ck-input span { display: flex; align-items: center; padding: 0 .65rem; background: var(--bg, #f3f4f6); color: var(--muted); font-size: .85rem; border-left: 1px solid var(--line, #e5e7eb); }
tr.is-counted { background: rgba(34, 197, 94, .04); }
.ck-ok { color: #15803d; font-weight: 600; font-size: .9rem; }
.ck-d { font-weight: 700; font-variant-numeric: tabular-nums; }
.ck-d.neg { color: var(--danger, #dc2626); } .ck-d.pos { color: #15803d; }
.ck-bar { position: sticky; bottom: 0; z-index: 20; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; padding: .75rem 1rem; background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 14px; box-shadow: 0 -6px 24px rgba(15, 23, 42, .08); }
.ck-bar .ck-sum { display: grid; flex: 1 1 16rem; }
.ck-bar .input { flex: 0 1 20rem; }
@media (max-width: 760px) {
    .ck-progress { margin-left: 0; flex: 1 1 100%; }
    .ck-table thead { display: none; }
    .ck-table tbody tr[data-row] { display: grid; grid-template-columns: 1fr auto; gap: .35rem .75rem; padding: .7rem .85rem; border-bottom: 1px solid var(--line-2, #eef0f4); }
    .ck-table tbody tr[data-row] td { display: block; padding: 0; border: 0; text-align: left; }
    .ck-table tbody tr[data-row] td[data-label="Books say"] { text-align: right; color: var(--muted); }
    .ck-table tbody tr[data-row] td[data-label="Books say"]::before { content: 'Books '; }
    .ck-table tbody tr[data-row] td[data-label="Difference"] { text-align: right; align-self: center; }
    .ck-table .ck-group, .ck-table tbody { display: block; } .ck-group th { display: block; }
    .ck-bar { bottom: calc(64px + env(safe-area-inset-bottom)); }
    .ck-bar .input { flex: 1 1 100%; }
}
.ck-input span { min-width: 2.9rem; justify-content: center; }
.ck-input { width: 11rem; }
.ck-dw { display: grid; justify-items: end; }
@media (max-width: 760px) { .ck-dw { justify-items: end; } .ck-input { width: 9.5rem; } }
@media (max-width: 760px) {
    .ck-table { display: block; width: 100%; }
    .ck-bar { padding: .6rem .75rem; gap: .5rem; }
    .ck-bar .input, .ck-bar [data-summary-2] { display: none; }
    .ck-bar .ck-sum { flex: 1 1 auto; font-size: .9rem; }
}
@media (max-width: 760px) { .ck-bar { flex-wrap: nowrap; } }
.rp-bar { grid-template-columns: minmax(7rem, 10rem) 1fr auto; }
.rp-stack { background: transparent; }
.rp-stack .rp-in { display: flex; width: var(--w); height: 100%; border-radius: 99px; overflow: hidden; background: var(--line-2); }
.rp-stack .rp-in > span { display: block; height: 100%; min-width: 0; }
.reg-fields select.input { min-width: 10rem; }
.inv-two .cat-bar, .inv-two .rp-bar { grid-template-columns: minmax(5.5rem, 34%) minmax(4rem, 1fr) auto; }
@media (max-width: 1000px) { .inv-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
    .inv-two .cat-bar, .inv-two .rp-bar { grid-template-columns: minmax(0, 1fr) auto; }
    .inv-two .cat-bar .cat-track { grid-column: 1 / -1; grid-row: 2; }
    .inv-two .cat-bar .cat-name { white-space: normal; }
}
.inv-side, .inv-side > .card, .inv-two > * { min-width: 0; } .inv-side { grid-template-columns: minmax(0, 1fr); }
/* Items: change order */
.ord-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .75rem 1rem; margin-bottom: .75rem; border-radius: 12px; background: var(--brand-wash, #eef2ff); border: 1px solid var(--brand); }
.ord-bar[hidden] { display: none; }
.ord-bar .grow { display: grid; flex: 1 1 18rem; }
.ord-col { width: 6.5rem; white-space: nowrap; }
.ord-handle { cursor: grab; font-size: 1.1rem; color: var(--muted); padding: 0 .35rem; user-select: none; }
.ord-btn { padding: .2rem .45rem; }
.ord-on tbody tr.dragging { opacity: .45; }
.ord-on tbody tr { transition: background .15s; }
.ord-on tbody tr:hover { background: var(--bg, #f8fafc); }
@media (max-width: 760px) { .ord-on .ord-col { display: flex; align-items: center; gap: .25rem; } .ord-handle { display: none; } }
.stock-kpis.inv-kpis.inv-kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inv-simple td { vertical-align: middle; }
.inv-simple .inv-bar { max-width: 14rem; }
.inv-order-link { margin-left: auto; }
@media (max-width: 760px) {
    .stock-kpis.inv-kpis.inv-kpis-3 { grid-template-columns: 1fr 1fr; }
    .stock-kpis.inv-kpis.inv-kpis-3 > :first-child { grid-column: 1 / -1; }
    .inv-order-link { margin-left: 0; }
}
.ck-input .input { height: 2.75rem; font-size: 1.05rem; font-weight: 600; }
.ck-input { width: 12rem; }
@media (max-width: 760px) {
    .kpi-row.stock-kpis.inv-kpis.inv-kpis-3 { grid-template-columns: 1fr 1fr; }
    .inv-simple, .inv-simple tbody { display: block; width: 100%; }
    .inv-simple thead { display: none; }
    .inv-simple tbody tr.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .75rem; padding: .8rem .95rem; border-bottom: 1px solid var(--line-2, #eef0f4); }
    .inv-simple tbody tr.inv-row[hidden] { display: none; }
    .inv-simple tbody tr.inv-row > td { display: block; padding: 0; border: 0; text-align: left; }
    .inv-simple tbody tr.inv-row > td::before { display: none !important; content: none !important; }
    .inv-simple td[data-label="Item"] { grid-column: 1; grid-row: 1; }
    .inv-simple td[data-label="Lasts"] { grid-column: 2; grid-row: 1; text-align: right; align-self: start; }
    .inv-simple td[data-label="Left"] { grid-column: 1 / -1; grid-row: 2; }
    .inv-simple td.row-actions { grid-column: 1 / -1; grid-row: 3; }
    .inv-simple .inv-bar { max-width: none; }
    .inv-simple .inv-acts { display: flex; gap: .5rem; } .inv-simple .inv-acts .btn { flex: 1; }
}
/* Item picker you can type in */
.cb-hidden { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.cb-input { min-width: 12rem; }
.cb-pop { position: fixed; z-index: 90; list-style: none; margin: 0; padding: .3rem; max-height: 17rem; overflow-y: auto; background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 12px; box-shadow: 0 14px 36px rgba(15, 23, 42, .18); }
.cb-pop[hidden] { display: none; }
.cb-pop li { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; padding: .5rem .65rem; border-radius: 8px; cursor: pointer; }
.cb-pop li span { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.cb-pop li.on, .cb-pop li:hover { background: var(--brand-wash, #eef2ff); }
.cb-pop li.cb-new { color: var(--brand); border-top: 1px solid var(--line-2, #eef0f4); margin-top: .2rem; }
.cb-pop li.cb-none { color: var(--muted); cursor: default; }
@media (max-width: 640px) { .cb-input { min-width: 0; width: 100%; } }
.ii-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; font-size: .92rem; color: var(--ink); }
.row-menu .menu-pop { min-width: 12rem; }
.row-menu summary { min-width: 2rem; font-weight: 700; letter-spacing: .05em; }
.mg-preview { display: flex; align-items: stretch; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.mg-box { display: grid; gap: .15rem; padding: .8rem 1rem; border: 1px dashed var(--line, #d7dbe3); border-radius: 12px; min-width: 12rem; text-decoration: line-through; text-decoration-color: rgba(220, 38, 38, .5); }
.mg-box.keep { border-style: solid; border-color: #86efac; background: #f0fdf4; text-decoration: none; }
.mg-box strong { font-size: 1.1rem; }
.mg-arrow { align-self: center; font-size: 1.5rem; color: var(--muted); }
.mg-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .2rem; }
.item-danger { display: grid; grid-template-columns: 1fr auto; gap: .9rem 1rem; align-items: center; }
.item-danger > div { display: grid; gap: .1rem; }
@media (max-width: 640px) { .item-danger { grid-template-columns: 1fr; } }
/* Remove-item sheet: how many plates, and whether the kitchen already made it */
.void-qty { display: grid; gap: .35rem; }
.void-qty[hidden] { display: none; }
.qty-step { display: flex; align-items: center; gap: .4rem; }
.qty-step .input { width: 90px; }
.qty-step .btn { min-width: var(--tap); font-size: 1.2rem; padding: 0; }
.qty-step .input { text-align: center; font-variant-numeric: tabular-nums; }
.void-made { align-items: flex-start; line-height: 1.4; }
.void-made input { margin-top: .1rem; flex: none; }
/* Order screen: More menu (bill date, move, bill to, cancel) */
.pos-head-actions { align-items: center; }
.pos-more .menu-pop { left: auto; right: 0; min-width: 270px; }
.pos-more summary { list-style: none; }
.pos-more summary::-webkit-details-marker { display: none; }
.pos-more .bill-date-top { display: flex; flex-wrap: wrap; margin: .1rem .1rem .35rem; }
.pos-more .menu-pop .danger-text { color: var(--danger); }
.cart-hint-quiet { display: none; }
@media (min-width: 900px) { .phone-only { display: none !important; } }
[data-bill-date-chip][hidden] { display: none; }

/* ---------- 1.25.3 colour pass ---------- */
/* Page title: the section's icon and colour (same as the left menu) */
.ph-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: .55rem; vertical-align: -6px; border-radius: 10px;
  background: color-mix(in srgb, var(--c) 16%, var(--card)); color: color-mix(in srgb, var(--c) 82%, #000); }
.ph-ico svg { width: 19px; height: 19px; }

/* KPI cards on Inventory and Purchases pages: coloured top line and number, like Bills */
.stock-kpis .kpi { --tc: var(--c-indigo); box-shadow: inset 0 3px 0 var(--tc); }
.stock-kpis .kpi:nth-child(2) { --tc: var(--c-teal); }
.stock-kpis .kpi:nth-child(3) { --tc: var(--c-violet); }
.stock-kpis .kpi:nth-child(4) { --tc: var(--c-orange); }
.stock-kpis .kpi:nth-child(5) { --tc: var(--c-green); }
.stock-kpis .kpi:nth-child(6) { --tc: var(--c-rose); }
.stock-kpis .kpi > strong:not([class*="cost-"]) { color: var(--tc); }
.stock-kpis .kpi:has(.cost-high) { --tc: var(--c-rose); }
.stock-kpis .kpi:has(.cost-mid) { --tc: var(--c-amber); }

/* Inventory and Purchases tabs: each with its own coloured icon */
.inv-tabs a svg { width: 16px; height: 16px; margin-right: .35rem; vertical-align: -3px; color: var(--c, currentColor); }
.inv-tabs a.active svg { color: #fff; }

/* Stock bar: green, yellow when getting low (under half), orange at reorder level, red when finished */
.inv-bar.soon > span { background: #eab308; }

/* Vendors: a coloured letter badge for each */
.vd-who { display: flex; align-items: center; gap: .6rem; }
.vd-ava { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; font-size: .9rem;
  background: color-mix(in srgb, var(--c) 20%, var(--card)); color: color-mix(in srgb, var(--c) 70%, #000); }

/* Bookings: today's tiles */
.bk-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: .2rem 0 1rem; }
.bk-tiles a.figure { color: inherit; text-decoration: none; }
.bk-tiles a.figure:hover { border-color: var(--tc); }
@media (max-width: 760px) { .bk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bk-tiles .figure:first-child { grid-column: auto; } }

/* Table headings: a light brand tint so long lists read easier */
.table th { background: color-mix(in srgb, var(--brand) 6%, var(--card)); color: color-mix(in srgb, var(--brand) 55%, var(--ink-2)); }
@media (min-width: 900px) { .pu-nav { flex-wrap: wrap; overflow: visible; } }

/* Profit & loss report */
.pl-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .pl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pl-tiles .figure:first-child { grid-column: auto; } }
.pl-wrap { overflow-x: auto; }
.pl-table { min-width: 560px; }
.pl-table td:first-child, .pl-table th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 210px; }
.pl-table thead th:first-child { background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.pl-table td, .pl-table th { white-space: nowrap; }
.pl-head th { font-size: .82rem; font-weight: 700; padding-top: .9rem; color: var(--pl, var(--ink)); background: color-mix(in srgb, var(--pl, var(--brand)) 7%, var(--card)) !important; }
.pl-in { --pl: var(--c-indigo); } .pl-mat { --pl: var(--c-orange); } .pl-exp { --pl: var(--c-violet); }
.pl-sub { padding-left: 1.6rem !important; color: var(--ink-2); }
.pl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: .45rem; vertical-align: 1px; }
.pl-sum td { font-weight: 650; border-top: 1px solid var(--line); }
.pl-gross td { font-weight: 700; color: var(--c-teal); background: color-mix(in srgb, var(--c-teal) 7%, var(--card)) !important; }
.pl-net td { font-weight: 800; font-size: 1.05rem; color: var(--c-green); background: color-mix(in srgb, var(--c-green) 10%, var(--card)) !important; border-top: 2px solid var(--c-green); }
.pl-net.is-loss td { color: var(--c-rose); background: color-mix(in srgb, var(--c-rose) 9%, var(--card)) !important; border-top-color: var(--c-rose); }
.pl-table td.pl-neg { color: var(--c-rose); }
.pl-pct td { color: var(--muted); font-size: .85rem; }
.pl-total { font-weight: 650; border-left: 1px solid var(--line-2); }
.pl-notes ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; line-height: 1.5; }
.pl-card { margin-bottom: 1rem; }
.pl-table td.pl-total, .pl-table th.pl-total { position: sticky; right: 0; z-index: 1; background: var(--card); box-shadow: -6px 0 8px -6px rgba(0,0,0,.12); }
.pl-table thead th.pl-total { background: color-mix(in srgb, var(--brand) 6%, var(--card)); }

/* Notice band from Omni StayDine (Admin -> Notices) */
.pf-notice { --nc: var(--c-indigo); display: flex; align-items: flex-start; gap: .7rem; margin: 0 0 1rem; padding: .75rem .9rem; border-radius: 12px;
  background: color-mix(in srgb, var(--nc) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--nc) 35%, var(--line)); border-left: 4px solid var(--nc); }
.pf-notice.pf-warn { --nc: var(--c-orange); }
.pf-notice.pf-good { --nc: var(--c-green); }
.pf-notice > svg { flex: none; width: 20px; height: 20px; color: var(--nc); margin-top: .1rem; }
.pf-text { flex: 1; line-height: 1.5; }
.pf-text a { font-weight: 600; margin-left: .3rem; }
.pf-from { display: block; font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.pf-close { flex: none; border: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 .2rem; }
.pf-close:hover { color: var(--ink); }

/* Admin: Call today, notices, client PCs, team */
.fu-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1rem; }
.fu-tiles a.figure { color: inherit; text-decoration: none; }
.fu-card { margin-bottom: 1rem; }
.fu-card .card-head .small { margin-left: auto; text-align: right; }
.fu-row { display: grid !important; grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1.6fr); gap: .6rem 1rem; align-items: center; }
.fu-who .meta { margin-top: .15rem; }
.fu-last { margin-top: .35rem; font-size: .85rem; padding: .3rem .5rem; border-radius: 8px; background: color-mix(in srgb, var(--c-amber) 10%, var(--card)); }
.fu-call { display: flex; gap: .4rem; flex-wrap: wrap; }
.fu-form { display: grid; grid-template-columns: minmax(150px, 1.2fr) 1.2fr minmax(120px, 1fr) auto; gap: .4rem; }
.fu-form .input { min-height: 36px; padding: .35rem .5rem; font-size: .88rem; }
@media (max-width: 1100px) { .fu-row { grid-template-columns: 1fr auto; } .fu-form { grid-column: 1 / -1; } }
@media (max-width: 640px) { .fu-row { grid-template-columns: 1fr; } .fu-form { grid-template-columns: 1fr 1fr; } }
.btn-wa { color: #128c4a; border-color: color-mix(in srgb, #25d366 50%, var(--line)); }
.btn-wa:hover { background: #25d366; color: #fff; }
.nt-row { display: flex; gap: .8rem; align-items: flex-start; }
.nt-preview { margin: 0 0 .4rem; }
.nt-actions { display: flex; flex-direction: column; gap: .35rem; align-items: stretch; }
.nt-actions form { margin: 0; }
.nt-actions .btn { width: 100%; }
.tm-edit { width: 100%; }
.tm-edit > summary { display: flex; gap: .8rem; align-items: center; list-style: none; cursor: pointer; }
.tm-edit > summary::-webkit-details-marker { display: none; }
.tm-perms { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.tm-form { margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--line); }
.tm-checks { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; }
.tm-checks legend { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.tm-checks .check { align-items: flex-start; }
.tm-checks .check span { display: grid; }
.tm-checks .check small { color: var(--muted); font-size: .8rem; }
.tm-danger { margin-top: .6rem; gap: .4rem; }
.adm-pc { display: flex; justify-content: space-between; gap: .6rem; }
.reg-table td.small svg { width: 14px; height: 14px; vertical-align: -2px; }
