/* ================================================================
   Cheqkr UI — single source of truth
   Every page element (cards, buttons, badges, chips, inputs,
   dropdowns, modals, tables, tiles) derives from this file.
   Two surfaces, one brand:
     <body data-surface="ops">    deep-navy dark — staff pages
     <body data-surface="guest">  light — customer-facing pages
   Ops palette sampled from "Cheqkr Restaurant Dashboard UI.png".
   ================================================================ */

/* ── 1. Brand tokens ───────────────────────────────────────────── */
:root {
  /* Ops accent family (from reference) */
  --cyan: #17D5F6;
  --cyan-bright: #01FEFF;
  --emerald: #05E095;
  --amber: #F9BB2F;
  --blue: #42AAFA;
  --violet: #BF47F6;
  --magenta: #CF437D;
  --pink: #F44C76;
  --teal: #01B4A9;
  --gold: #BF8F24;
  --purple: #5221B4;

  /* Guest aqua family */
  --aqua-300: #7BEEE3;
  --aqua-400: #5CE0D2;
  --aqua-500: #38B5A8;
  --aqua-700: #0F766E;
  --ink: #0E1B22;

  /* Status language — single source, used by CSS and JS */
  --st-new: var(--blue);
  --st-preparing: var(--amber);
  --st-ready: var(--emerald);
  --st-served: #8CA9DB;
  --st-completed: var(--cyan);
  --st-cancelled: var(--pink);

  /* Shape: radius encodes level */
  --r-modal: 16px;
  --r-card: 14px;
  --r-ctl: 10px;
  --r-pill: 999px;

  --font: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-12: 48px;

  --transition: 150ms ease;
}
@media (prefers-reduced-motion: reduce) {
  :root { --transition: 0ms; }
  * { animation: none !important; }
}

/* ── 2. Surfaces ───────────────────────────────────────────────── */
/* Backgrounds are the live site's own palette (design-system.css):
   #121820 page · #1a2332 raised · #1e2a3a cards · #0f1923 sidebar */
body[data-surface="ops"] {
  --bg: #121820;
  --bg-raise: #1a2332;
  --card: #18212C;   /* panels: card tone faded toward the page bg */
  --card-2: #1a2332;
  --card-hover: #243344;
  --line: #2a3a4e;
  --line-soft: #1e2d40;
  --fg: #f0f4f8;
  --soft: #94a3b8;
  --faint: #64748b;
  --accent-text: #4BE0FF;
  --input-bg: #243344;
  --shadow-1: 0 1px 3px rgba(0,0,0,.35);
  --shadow-2: 0 10px 30px rgba(0,0,0,.45);
  --scrim: rgba(1,8,20,.72);
  color-scheme: dark;
  background-image:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(23,213,246,.05), transparent 60%),
    radial-gradient(ellipse 50% 35% at 90% 10%, rgba(82,33,180,.06), transparent 60%);
  background-attachment: fixed;
}
body[data-surface="guest"] {
  --bg: #F3F9F8;
  --bg-raise: #EAF4F2;
  --card: #FFFFFF;
  --card-2: #FFFFFF;
  --card-hover: #F7FBFA;
  --line: #DCE9E7;
  --line-soft: #E8F1F0;
  --fg: var(--ink);
  --soft: #577071;
  --faint: #8AA0A0;
  --accent-text: var(--aqua-700);
  --input-bg: #FFFFFF;
  --shadow-1: 0 1px 3px rgba(14,27,34,.07);
  --shadow-2: 0 10px 30px rgba(14,27,34,.14);
  --scrim: rgba(14,27,34,.45);
  color-scheme: light;
}

/* ── 3. Base ───────────────────────────────────────────────────── */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
[hidden] { display: none !important; }

:is(button, a, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: var(--r-ctl);
}
body[data-surface="guest"] :is(button, a, input, select, [tabindex]):focus-visible { outline-color: var(--aqua-400); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--soft); }
.spacer { flex: 1; }

/* ── 4. Ops app layout: sidebar + topbar ───────────────────────── */
.ck-app { display: flex; min-height: 100vh; }

.ck-sidebar {
  width: 232px;
  flex-shrink: 0;
  background: #0f1923;
  border-right: 1px solid rgba(66,170,250,.25);
  transition: box-shadow 250ms ease;
  padding: var(--sp-5) var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.ck-sidebar:hover {
  box-shadow: inset -1px 0 0 rgba(1,254,255,.1), inset -18px 0 38px rgba(1,104,157,.28);
}
/* Logo is a fixed sidebar header; only the nav list below it scrolls */
.ck-logo {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  padding: 0 var(--sp-2) var(--sp-4);
}
.ck-nav-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 3px;
  margin: 0 calc(-1 * var(--sp-3));
  padding: 0 var(--sp-3);
}
.push-end { margin-top: auto; }
.ck-logo img { height: 44px; width: auto; }

.ck-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  color: var(--soft);
  font-weight: 500; font-size: .9rem;
  border: none; background: none; width: 100%; text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.ck-nav-item .nic {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(140,169,219,.08);
  transition: background var(--transition);
}
.ck-nav-item svg { width: 15px; height: 15px; }
.ck-nav-item:hover { color: var(--fg); text-decoration: none; }
.ck-nav-item:hover .nic { background: rgba(140,169,219,.16); }
.ck-nav-item.active {
  background: linear-gradient(90deg, #0A5FA8, #01689D);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(1,104,157,.35);
}
.ck-nav-item.active .nic { background: rgba(255,255,255,.16); }
.ck-nav-item .count {
  margin-left: auto;
  font-size: .7rem; font-weight: 700;
  background: var(--cyan); color: #04304F;
  border-radius: var(--r-pill);
  padding: 1px 8px;
}

/* Sidebar promo card + footer links */
.ck-sidecard {
  margin-top: var(--sp-2);
  background: #1a2332;
  border: 1px solid #2a3a4e;
  border-radius: var(--r-card);
  padding: var(--sp-3);
  display: flex; flex-direction: column; gap: 8px;
}
.ck-sidecard .row { display: flex; flex-wrap: nowrap; align-items: center; gap: 9px; margin: 0; }
/* Pages that also load Bootstrap: its .row / .row > * grid rules (gutter padding,
   width:100%) squeezed the icon to nothing and pushed the text onto its own line. */
.ck-sidecard .row > .ric { padding: 0; margin: 0; }
.ck-sidecard .row > p { flex: 1 1 auto; width: auto; max-width: none; min-width: 0; padding: 0; margin: 0; }
.ck-sidecard .ric {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.ck-sidecard .ric svg { width: 15px; height: 15px; }
.ck-sidecard p { font-size: .76rem; font-weight: 600; color: var(--fg); line-height: 1.35; }

.ck-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.ck-topbar {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6) var(--sp-2);
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
}
.ck-topbar .ck-search { flex: 1; max-width: 560px; }

/* Online pill */
.ck-online {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(66,170,250,.1);
  border: 1px solid rgba(66,170,250,.3);
  border-radius: var(--r-pill);
  color: var(--fg);
  font-size: .82rem; font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.ck-online .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px rgba(5,224,149,.8); }
.ck-online svg { width: 13px; height: 13px; color: var(--soft); }

/* Icon button with notification badge */
.ck-iconbtn {
  position: relative;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--line-soft);
  color: var(--soft);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.ck-iconbtn:hover { color: var(--fg); border-color: var(--line); }
.ck-iconbtn svg { width: 17px; height: 17px; }
.ck-iconbtn .nbadge {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; border-radius: var(--r-pill);
  background: #D14E7A; color: #fff;
  font-size: .62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* Avatar block */
.ck-avatar {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer;
  color: var(--fg); padding: 4px 6px; border-radius: var(--r-ctl);
}
.ck-avatar .av {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #2D7FF0, #01689D);
  color: #fff; font-weight: 800; font-size: .95rem;
  display: flex; align-items: center; justify-content: center;
}
.ck-avatar .meta { text-align: left; line-height: 1.2; }
.ck-avatar .nm { font-size: .84rem; font-weight: 700; }
.ck-avatar .rl { font-size: .7rem; color: var(--soft); }
.ck-avatar svg { width: 13px; height: 13px; color: var(--soft); }

.ck-page {
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-5);
  width: 100%; /* no max-width: pages use the full width next to the sidebar on every screen */
}

/* Greeting row */
.ck-greet { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.ck-greet h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.02em; }
.ck-greet .sub { color: var(--soft); font-size: .88rem; margin-top: 2px; }
.ck-datecard {
  background: var(--card-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-ctl);
  padding: 8px 16px;
  text-align: right;
  line-height: 1.35;
}
.ck-datecard .d1 { font-size: .82rem; font-weight: 600; color: #A8D0FD; }
.ck-datecard .d2 { font-size: .78rem; color: var(--soft); }

/* Mobile ops: sidebar becomes a horizontal strip */
/* Mobile shell: the sidebar auto-collapses into an off-canvas drawer
   behind a hamburger; the drawer keeps the exact desktop sidebar markup */
.ck-mobilebar { display: none; }
.ck-scrim {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(5,10,16,.55);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
@media (max-width: 880px) {
  .ck-mobilebar {
    position: sticky; top: 0; z-index: 110;
    display: flex; align-items: center; gap: 10px;
    background: #0f1923;
    border-bottom: 1px solid rgba(66,170,250,.25);
    padding: 9px 14px;
  }
  .ck-mobilebar img { height: 26px; }
  .ck-mobilebar .ttl { font-weight: 800; font-size: .95rem; }
  .ck-burger {
    background: none; border: none; cursor: pointer;
    color: var(--fg); display: flex; padding: 6px; border-radius: 8px;
  }
  .ck-burger svg { width: 22px; height: 22px; }

  .ck-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 130;
    height: 100dvh; width: 248px;
    transform: translateX(-105%);
    transition: transform .25s ease, box-shadow 250ms ease;
    box-shadow: 0 0 40px rgba(0,0,0,.5);
  }
  body.ck-nav-open .ck-sidebar { transform: translateX(0); }
  body.ck-nav-open .ck-scrim { opacity: 1; pointer-events: auto; }

  .ck-page { padding: var(--sp-3) var(--sp-4) var(--sp-5); }
  .ck-topbar { padding: var(--sp-3) var(--sp-4) var(--sp-1); flex-wrap: wrap; }
  .ck-avatar .meta { display: none; }

}

/* ── 5. Cards / panels ─────────────────────────────────────────── */
.ck-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-1);
}
.ck-card-head {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line-soft);
  font-weight: 700; font-size: 1rem;
}
.ck-card-body { padding: var(--sp-5); }
.ck-card-body.tight { padding: var(--sp-3); }
[data-scroll] { overflow-x: auto; }
.ck-modal-meta { font-size: .8rem; margin-top: var(--sp-3); }

/* Panel header icon tile */
.ck-panel-ic {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #2D7FF0, #01689D);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.ck-panel-ic svg { width: 16px; height: 16px; }

/* ── 6. Stat tiles — the four dashboard boxes ──────────────────── */
.ck-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--sp-4);
}
.ck-stat {
  position: relative;
  border-radius: var(--r-card);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  border: 1px solid;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  color: var(--fg);
}
.ck-stat .ic {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.ck-stat .ic svg { width: 21px; height: 21px; }
/* One type scale for all four boxes so their lines sit level */
.ck-stat .meta { min-width: 0; flex: 1; }
.ck-stat .lbl { font-size: .8rem; line-height: 1.3; color: var(--soft); font-weight: 500; white-space: nowrap; }
.ck-stat .val { font-size: 1.7rem; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; }
.ck-stat .delta, .ck-stat .attn { font-size: .72rem; line-height: 1.3; font-weight: 600; white-space: nowrap; }
.ck-stat .delta.up { color: var(--emerald); }
.ck-stat .delta.sub { color: var(--soft); font-weight: 500; }

/* Top boxes: each background is its icon color at low opacity */
.ck-stat.t-revenue {
  background: color-mix(in srgb, #01B4A9 8%, #121820);
  border-color: rgba(1,180,169,.45);
  box-shadow: 0 0 24px rgba(1,180,169,.12);
}
.ck-stat.t-revenue .ic { background: linear-gradient(135deg, #01B4A9, #027E87); }
.ck-stat.t-revenue .spark { width: 56px; height: 30px; margin-left: auto; align-self: flex-end; flex-shrink: 0; }
.ck-stat.t-revenue .spark path { stroke: #02FFFE; filter: drop-shadow(0 0 4px rgba(2,255,254,.6)); }

.ck-stat.t-orders {
  background: color-mix(in srgb, #673BC0 9%, #121820);
  border-color: rgba(103,59,192,.5);
}
.ck-stat.t-orders .ic { background: linear-gradient(135deg, #8A55E8, #5221B4); }

.ck-stat.t-tables {
  background: color-mix(in srgb, #BF8F24 8%, #121820);
  border-color: rgba(191,143,36,.4);
}
.ck-stat.t-tables .ic { background: linear-gradient(135deg, #E0B050, #BF8F24); }

.ck-stat.t-help {
  background: color-mix(in srgb, #CF437D 8%, #121820);
  border-color: rgba(207,67,125,.45);
  cursor: pointer;
  transition: border-color var(--transition);
}
.ck-stat.t-help { padding-right: 38px; }
.ck-stat.t-help:hover { border-color: rgba(244,76,118,.7); }
.ck-stat.t-help .ic { background: linear-gradient(135deg, #CF437D, #962A59); }
.ck-stat.t-help .attn { color: var(--pink); }
.ck-stat.t-help .chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--soft); }
.ck-stat.t-help .chev svg { width: 16px; height: 16px; }
.ck-stat.t-help.quiet { border-color: var(--line-soft); cursor: default; }
.ck-stat.t-help.quiet .attn { color: var(--soft); font-weight: 500; }

/* Occupancy donut */
.ck-donut-wrap {
  position: relative;
  width: 40px; height: 40px; flex-shrink: 0;
  margin-left: auto; align-self: center;
}
.ck-donut {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: conic-gradient(#04FFFB calc(var(--p) * 1%), #0B1628 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}
.ck-donut-wrap .pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700; color: #04FFFB;
}

/* ── 7. Buttons ────────────────────────────────────────────────── */
.ck-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .85rem; font-weight: 700;
  border-radius: var(--r-ctl);
  padding: 9px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
  background: var(--aqua-400); color: var(--ink);
}
body[data-surface="ops"] .ck-btn {
  background: linear-gradient(180deg, #F2FCFF, #D4F1FF);
  color: #063050;
  box-shadow: 0 2px 10px rgba(1,254,255,.12);
}
.ck-btn:hover { filter: brightness(1.05); }
.ck-btn:active { transform: scale(.98); }
.ck-btn svg { width: 15px; height: 15px; }

.ck-btn.ghost {
  background: transparent; color: var(--soft);
  border-color: var(--line); font-weight: 600;
  box-shadow: none;
}
.ck-btn.ghost:hover { color: var(--fg); border-color: var(--soft); filter: none; }

.ck-btn.danger { background: transparent; color: var(--st-cancelled); border-color: var(--st-cancelled); box-shadow: none; }
.ck-btn.danger:hover { background: var(--st-cancelled); color: #fff; }
/* The ops white-gradient rule above outranks .ghost/.danger, which made them
   render white and lose their text on hover; restate them at the same weight */
body[data-surface="ops"] .ck-btn.ghost { background: transparent; color: var(--soft); box-shadow: none; }
body[data-surface="ops"] .ck-btn.ghost:hover { color: var(--fg); }
body[data-surface="ops"] .ck-btn.danger { background: transparent; color: var(--st-cancelled); box-shadow: none; }
body[data-surface="ops"] .ck-btn.danger:hover { background: var(--st-cancelled); color: #fff; }

.ck-btn.sm { padding: 6px 13px; font-size: .78rem; }
.ck-btn.icon { padding: 8px; }
.ck-btn.block { width: 100%; }
.ck-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── 8. Status badges — tinted pills with dot ──────────────────── */
.ck-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 700;
  border-radius: var(--r-pill);
  padding: 3px 12px;
  white-space: nowrap;
  border: 1px solid;
}
.ck-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.ck-badge.st-new        { color: var(--st-new);       background: color-mix(in srgb, var(--st-new) 14%, transparent);       border-color: color-mix(in srgb, var(--st-new) 35%, transparent); }
.ck-badge.st-preparing  { color: var(--st-preparing); background: color-mix(in srgb, var(--st-preparing) 14%, transparent); border-color: color-mix(in srgb, var(--st-preparing) 35%, transparent); }
.ck-badge.st-ready      { color: var(--st-ready);     background: color-mix(in srgb, var(--st-ready) 12%, transparent);     border-color: color-mix(in srgb, var(--st-ready) 35%, transparent); }
.ck-badge.st-served     { color: var(--st-served);    background: color-mix(in srgb, var(--st-served) 14%, transparent);    border-color: color-mix(in srgb, var(--st-served) 35%, transparent); }
.ck-badge.st-completed  { color: var(--st-completed); background: color-mix(in srgb, var(--st-completed) 12%, transparent); border-color: color-mix(in srgb, var(--st-completed) 35%, transparent); }
.ck-badge.st-cancelled  { color: var(--st-cancelled); background: color-mix(in srgb, var(--st-cancelled) 14%, transparent); border-color: color-mix(in srgb, var(--st-cancelled) 35%, transparent); }
/* Guest surface: darker text variants for contrast on white */
body[data-surface="guest"] .ck-badge.st-preparing { color: #9A6B00; }
body[data-surface="guest"] .ck-badge.st-ready { color: #047857; }
body[data-surface="guest"] .ck-badge.st-new { color: #1D6FC2; }
body[data-surface="guest"] .ck-badge.st-completed { color: var(--aqua-700); }

.ck-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.ck-dot.st-new { background: var(--st-new); }
.ck-dot.st-preparing { background: var(--st-preparing); }
.ck-dot.st-ready { background: var(--st-ready); }
.ck-dot.st-served { background: var(--st-served); }
.ck-dot.st-completed { background: var(--st-completed); }
.ck-dot.st-cancelled { background: var(--st-cancelled); }

/* ── 9. Chips ──────────────────────────────────────────────────── */
.ck-chiprow {
  display: flex; gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.ck-chiprow::-webkit-scrollbar { display: none; }
.ck-chip {
  font-size: .82rem; font-weight: 500;
  padding: 7px 15px;
  border-radius: var(--r-pill);
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
body[data-surface="guest"] .ck-chip { background: var(--card); }
.ck-chip:hover { border-color: var(--soft); }
.ck-chip.active { background: var(--aqua-400); border-color: var(--aqua-400); color: var(--ink); font-weight: 700; }
body[data-surface="ops"] .ck-chip.active { background: linear-gradient(90deg, #0A5FA8, #01689D); border-color: #0A5FA8; color: #fff; }
.ck-chip .n { font-size: .72rem; opacity: .75; margin-left: 4px; }
.ck-chip.sm { padding: 4px 11px; font-size: .74rem; }
.ck-chip .ck-dot { margin-right: 3px; }

/* ── 10. Inputs ────────────────────────────────────────────────── */
.ck-field { display: flex; flex-direction: column; gap: 6px; }
.ck-field > label { font-size: .8rem; font-weight: 600; color: var(--soft); }

.ck-input, .ck-select {
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  color: var(--fg);
  font-family: inherit;
  font-size: .88rem;
  padding: 9px 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
  min-width: 0;
}
.ck-input::placeholder { color: var(--faint); }
.ck-input:focus, .ck-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(23,213,246,.15);
}
body[data-surface="guest"] .ck-input:focus, body[data-surface="guest"] .ck-select:focus {
  border-color: var(--aqua-400);
  box-shadow: 0 0 0 3px rgba(92,224,210,.18);
}
.ck-select { cursor: pointer; }
.ck-select.sm { padding: 6px 10px; font-size: .8rem; border-radius: var(--r-pill); padding-inline: 14px 10px; }

.ck-search { position: relative; display: flex; align-items: center; }
.ck-search svg {
  position: absolute; left: 13px; width: 15px; height: 15px;
  color: var(--faint); pointer-events: none;
}
.ck-search .ck-input { padding-left: 38px; width: 100%; border-radius: var(--r-pill); }

.ck-toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: .85rem; font-weight: 500; user-select: none; }
.ck-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.ck-toggle .track {
  width: 38px; height: 22px; border-radius: var(--r-pill);
  background: var(--line); position: relative; flex-shrink: 0;
  transition: background var(--transition);
}
.ck-toggle .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform var(--transition);
}
.ck-toggle input:checked + .track { background: var(--aqua-400); }
body[data-surface="ops"] .ck-toggle input:checked + .track { background: var(--cyan); }
.ck-toggle input:checked + .track::after { transform: translateX(16px); }
.ck-toggle input:focus-visible + .track { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ── 11. Dropdown menu ─────────────────────────────────────────── */
.ck-dd { position: relative; }
.ck-dd-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 190px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  box-shadow: var(--shadow-2);
  padding: var(--sp-1);
  z-index: 100;
  display: none;
}
.ck-dd.open .ck-dd-menu { display: block; }
.ck-dd-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: none; border: none;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--fg); font-size: .85rem; font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}
.ck-dd-item:hover { background: var(--card-hover); }
.ck-dd-item.danger { color: var(--st-cancelled); }
.ck-dd-item svg { width: 15px; height: 15px; color: var(--soft); }
.ck-dd-sep { border: none; border-top: 1px solid var(--line-soft); margin: var(--sp-1) 0; }

/* ── 12. Data table ────────────────────────────────────────────── */
.ck-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ck-table th {
  text-align: left;
  font-size: .74rem; font-weight: 600; letter-spacing: .02em;
  color: var(--soft);
  padding: 10px var(--sp-4);
  border-bottom: 1px solid var(--line);
  background: var(--bg-raise);
}
.ck-table td {
  padding: 12px var(--sp-4);
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.ck-table tbody tr { cursor: pointer; transition: background var(--transition); }
.ck-table tbody tr:hover { background: var(--card-hover); }
.ck-table td.right, .ck-table th.right { text-align: right; }

/* ── 13. Order ticket ──────────────────────────────────────────── */
.ck-ticket {
  background: var(--card-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-ctl);
  padding: var(--sp-3) var(--sp-4);
}
.ck-ticket-top { display: flex; align-items: baseline; gap: 10px; }
.ck-ticket-top .no { font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; }
.ck-ticket-top .where { color: var(--soft); font-size: .8rem; }
.ck-ticket-top .elapsed { margin-left: auto; font-weight: 800; font-size: 1.05rem; }
.elapsed.warn { color: var(--st-preparing); }
.elapsed.late { color: var(--st-cancelled); }
.ck-agebar { height: 3px; border-radius: 2px; background: var(--line-soft); margin: 8px 0 10px; overflow: hidden; }
.ck-agebar i { display: block; height: 100%; border-radius: 2px; background: var(--faint); transition: width 1s linear; }
.ck-agebar i.warn { background: var(--st-preparing); }
.ck-agebar i.late { background: var(--st-cancelled); }
.ck-ticket-items { font-size: .86rem; margin: 0 0 10px; }
.ck-ticket-items .q { color: var(--soft); }
.ck-ticket-foot { display: flex; align-items: center; gap: 10px; }

/* ── 14. Floor / table cards ───────────────────────────────────── */
/* States: available · occupied · reserved · inactive.
   Read-only by default; only the Tables page makes them buttons.
   Tables grouped by floor: .ck-floorhead above each .ck-floor grid,
   inside a .ck-scrollbody so many tables scroll within the panel. */
.ck-scrollbody { flex: 1; min-height: 0; max-height: 560px; overflow-y: auto; }
.ck-floorhead {
  display: flex; align-items: center; gap: 10px;
  font-size: .76rem; font-weight: 700;
  color: var(--soft);
  margin: var(--sp-5) 0 var(--sp-3);
}
.ck-floorhead:first-child { margin-top: 0; }
.ck-floorhead i { flex: 1; height: 1px; background: var(--line-soft); }
.ck-floorhead .cnt { font-size: .72rem; font-weight: 500; color: var(--faint); }
.ck-floor {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: var(--sp-3);
}
.ck-tablecard {
  border-radius: var(--r-ctl);
  border: 1px solid var(--line-soft);
  background: var(--card-2);
  color: var(--fg);
  padding: var(--sp-3) var(--sp-2);
  text-align: center;
  font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
button.ck-tablecard { cursor: pointer; transition: border-color var(--transition); }
button.ck-tablecard:hover { border-color: var(--soft); }
.ck-tablecard .tno { font-weight: 800; font-size: 1.02rem; }
.ck-tablecard .tst { font-size: .7rem; font-weight: 600; color: var(--soft); display: inline-flex; align-items: center; gap: 5px; }
.ck-tablecard .tst::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.ck-tablecard .seats { font-size: .7rem; color: #70B7F8; display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; }
.ck-tablecard .seats svg { width: 13px; height: 13px; }

.ck-tablecard.occupied { background: #223447; border-color: #35506B; }
.ck-tablecard.occupied .tst { color: var(--cyan); }
.ck-tablecard.occupied .tst::before { background: var(--cyan); }

.ck-tablecard.available {
  background: #16333A;
  border: 1.5px solid rgba(1,254,255,.8);
  box-shadow: 0 0 16px rgba(1,254,255,.2);
}
.ck-tablecard.available .tst { color: var(--cyan-bright); }
.ck-tablecard.available .tst::before { background: var(--cyan-bright); }

.ck-tablecard.reserved { background: #2A2B47; border-color: #584186; }
.ck-tablecard.reserved .tst { color: var(--violet); }
.ck-tablecard.reserved .tst::before { background: var(--violet); }

.ck-tablecard.inactive { opacity: .45; border-style: dashed; }

/* ── 14b. Compact order lines (dashboard rush view) ────────────── */
/* One row per order; holds 50+ orders in a scrolling list. */
.ck-lines {
  display: flex; flex-direction: column;
  max-height: 440px;
  overflow-y: auto;
}
.ck-olist-head, .ck-line {
  display: grid;
  grid-template-columns: minmax(56px, auto) minmax(72px, auto) minmax(0, 1fr) 72px 112px 18px;
  align-items: center;
  gap: 10px;
  padding: 7px var(--sp-3);
}
.ck-olist-head {
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  color: var(--soft);
  border-bottom: 1px solid var(--line);
}
.ck-line {
  border-bottom: 1px solid var(--line-soft);
  font-size: .84rem;
  color: var(--fg);
  text-decoration: none;
  transition: background var(--transition);
}
.ck-line:hover { background: var(--card-hover); text-decoration: none; }
.ck-line:last-child { border-bottom: none; }
.ck-line .no { font-weight: 800; white-space: nowrap; }
.ck-line .where { color: var(--fg); font-size: .8rem; font-weight: 500; }
.ck-line .items { color: var(--soft); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ck-line .time { font-size: .8rem; font-weight: 600; }
.ck-line .time.warn { color: var(--st-preparing); }
.ck-line .time.late { color: var(--st-cancelled); }
.ck-line .chev { color: var(--faint); display: flex; }
.ck-line .chev svg { width: 14px; height: 14px; }
@media (max-width: 640px) {
  .ck-olist-head, .ck-line { grid-template-columns: 50px 90px minmax(0,1fr) 108px; }
  .ck-olist-head .h-items, .ck-line .items, .ck-olist-head .h-chev, .ck-line .chev { display: none; }
}

/* ── 15. Status thread ─────────────────────────────────────────── */
.ck-thread { display: flex; align-items: center; margin: 2px 4px 8px; }
.ck-thread .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--aqua-400); flex-shrink: 0; }
body[data-surface="ops"] .ck-thread .dot { background: var(--cyan); }
.ck-thread .dot.now { box-shadow: 0 0 0 4px rgba(92,224,210,.3); }
body[data-surface="ops"] .ck-thread .dot.now { box-shadow: 0 0 0 4px rgba(23,213,246,.25); }
.ck-thread .dot.todo { background: var(--line); }
.ck-thread .seg { height: 2px; flex: 1; background: var(--aqua-400); }
body[data-surface="ops"] .ck-thread .seg { background: var(--cyan); }
.ck-thread .seg.todo { background: var(--line); }
.ck-thread-labels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--soft); }
.ck-thread-labels b { color: var(--fg); font-weight: 700; }

/* ── 16. Modal / bottom sheet ──────────────────────────────────── */
.ck-overlay {
  position: fixed; inset: 0;
  background: var(--scrim);
  display: none;
  align-items: center; justify-content: center;
  padding: var(--sp-4);
  z-index: 200;
}
.ck-overlay.open { display: flex; }
.ck-modal {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r-modal);
  box-shadow: var(--shadow-2);
  width: 100%; max-width: 480px;
  max-height: min(86vh, 720px);
  display: flex; flex-direction: column;
  animation: ck-modal-in .18s ease;
}
@keyframes ck-modal-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.ck-modal-head {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line-soft);
}
.ck-modal-head h3 { font-size: 1rem; font-weight: 700; }
.ck-modal-body { padding: var(--sp-5); overflow-y: auto; }
.ck-modal-foot {
  display: flex; gap: var(--sp-3); justify-content: flex-end;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--line-soft);
}
.ck-x {
  margin-left: auto;
  background: none; border: none; cursor: pointer;
  color: var(--soft); padding: 6px; border-radius: 6px;
  display: flex;
}
.ck-x:hover { color: var(--fg); background: var(--card-hover); }
.ck-x svg { width: 16px; height: 16px; }
@media (max-width: 560px) {
  body[data-surface="guest"] .ck-overlay { align-items: flex-end; padding: 0; }
  body[data-surface="guest"] .ck-modal {
    max-width: none;
    border-radius: var(--r-modal) var(--r-modal) 0 0;
    border-bottom: none;
    max-height: 88vh;
    animation: ck-sheet-in .22s ease;
  }
}
@keyframes ck-sheet-in {
  from { transform: translateY(40px); opacity: .6; }
  to { transform: none; opacity: 1; }
}

/* ── 17. Bill lines ────────────────────────────────────────────── */
.ck-bill { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ck-bill td { padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.ck-bill td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ck-bill tr.total td { border-bottom: none; font-weight: 800; font-size: .95rem; padding-top: 10px; }
.ck-bill .q { color: var(--soft); font-size: .8rem; }

/* ── 18. Promo band ────────────────────────────────────────────── */
.ck-promo {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  border: 1px solid var(--line-soft);
  background: linear-gradient(90deg, #1a2332, #161e2b);
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
}
.ck-promo .pic {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #17D5F6, #0A5FA8);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.ck-promo .pic svg { width: 19px; height: 19px; }
.ck-promo h3 { font-size: .95rem; font-weight: 800; }
.ck-promo p { font-size: .8rem; color: var(--soft); }
.ck-promo .meta { min-width: 0; }
.ck-promo .ck-btn { flex-shrink: 0; }
.ck-promo .food {
  height: 72px; width: 124px;
  object-fit: cover; object-position: 50% 32%; /* crop the photo's own dark bands, keep the bowl */
  margin-left: auto;
  flex-shrink: 0;
  opacity: .95;
  /* Fade every edge (the photo has its own dark background), so it melts into the card */
  -webkit-mask-image: radial-gradient(ellipse 50% 44% at 50% 44%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 44% at 50% 44%, #000 40%, transparent 100%);
  pointer-events: none;
}
@media (max-width: 760px) { .ck-promo .food { display: none; } }
/* Phones: text across the full width, the button on its own full-width line below */
@media (max-width: 560px) {
  .ck-promo { flex-wrap: wrap; }
  .ck-promo .meta { flex: 1 1 0; }
  .ck-promo .ck-btn { flex: 1 1 100%; justify-content: center; }
}

/* ── 19. Guest components ──────────────────────────────────────── */
.gst-wrap { max-width: 560px; margin: 0 auto; padding: var(--sp-4) var(--sp-4) 110px; }
.gst-header {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-1);
}
.gst-logo {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--aqua-300), var(--aqua-500));
  color: var(--ink); font-weight: 800; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
}
.gst-header h1 { font-size: 1.08rem; font-weight: 800; letter-spacing: -0.015em; }
.gst-header .sub { font-size: .76rem; color: var(--soft); }
.gst-tablechip {
  margin-left: auto;
  font-size: .72rem; font-weight: 700;
  color: var(--accent-text);
  background: rgba(92,224,210,.18);
  border-radius: var(--r-pill);
  padding: 5px 11px;
  white-space: nowrap;
}
.gst-sticky {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg);
  padding: var(--sp-3) 0 var(--sp-2);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.gst-cat { font-size: .95rem; font-weight: 800; letter-spacing: -0.01em; margin: var(--sp-4) 0 var(--sp-2); }
.gst-item {
  display: flex; gap: var(--sp-3);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-3);
  margin-bottom: var(--sp-2);
  box-shadow: var(--shadow-1);
}
.gst-item .tx { flex: 1; min-width: 0; }
.gst-item h3 { font-size: .95rem; font-weight: 700; letter-spacing: -0.01em; margin: 3px 0 2px; }
.gst-item .ds { font-size: .78rem; color: var(--soft); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gst-item .pr { font-size: .92rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.gst-item .side { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.gst-photo { width: 92px; height: 76px; border-radius: 10px; background: var(--bg-raise); }

.ck-veg {
  width: 14px; height: 14px;
  border: 1.5px solid #1E8A4C; border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: -2px;
  flex-shrink: 0;
}
.ck-veg i { width: 7px; height: 7px; border-radius: 50%; background: #1E8A4C; }
.ck-veg.nv { border-color: #A3342B; }
.ck-veg.nv i {
  width: 0; height: 0; border-radius: 0; background: none;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-bottom: 7px solid #A3342B;
}

.gst-add {
  font-size: .78rem; font-weight: 800; letter-spacing: .03em;
  color: var(--ink); background: var(--aqua-400);
  border: none; border-radius: var(--r-pill);
  padding: 7px 20px; cursor: pointer;
  transition: background var(--transition);
}
.gst-add:hover { background: var(--aqua-300); }
.gst-qty {
  display: flex; align-items: center;
  background: var(--aqua-400); color: var(--ink);
  border-radius: var(--r-pill);
  font-weight: 800;
}
.gst-qty button {
  background: none; border: none; cursor: pointer;
  color: var(--ink); font-size: 1rem; font-weight: 800;
  width: 30px; height: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.gst-qty .v { min-width: 16px; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }

.gst-cartpill {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: min(520px, calc(100% - 32px));
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--aqua-400); color: var(--ink);
  border: none; border-radius: var(--r-pill);
  padding: 13px 22px;
  font-family: inherit; font-size: .9rem; font-weight: 700;
  box-shadow: 0 8px 22px rgba(56,181,168,.5);
  cursor: pointer;
  z-index: 150;
  animation: ck-modal-in .2s ease;
}
.gst-cartpill .go { font-weight: 800; white-space: nowrap; }

/* ── 20. Empty state / toast ───────────────────────────────────── */
.ck-empty { text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--soft); }
.ck-empty svg { width: 34px; height: 34px; opacity: .5; margin-bottom: var(--sp-2); }
.ck-empty p { font-size: .9rem; max-width: 340px; margin: 0 auto; }
.ck-empty .hint { font-size: .78rem; color: var(--faint); margin-top: 4px; }

.ck-toast {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  background: var(--card-2);
  color: var(--fg);
  border: 1px solid var(--line);
  border-left: 3px solid var(--st-ready);
  border-radius: var(--r-ctl);
  box-shadow: var(--shadow-2);
  padding: 11px 16px;
  font-size: .85rem; font-weight: 600;
  z-index: 300;
  animation: ck-modal-in .18s ease;
}
.ck-toast.warn { border-left-color: var(--st-preparing); }
.ck-toast.error { border-left-color: var(--st-cancelled); }

/* Shared showToast() popups (js/components/toast.js appends #toastContainer.toast-container
   to <body>). Restaurant ops pages only (body > .ck-app), so login, customer and grocery
   pages are untouched: top-right on computers, across the top on phones, a readable
   dark card above modals, instead of falling to the end of the page in Bootstrap's
   near-white box. */
.ck-app ~ .toast-container {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 11000;
  display: flex; flex-direction: column; gap: 10px;
  width: min(380px, calc(100vw - 32px));
  max-width: none;
  pointer-events: none;
}
.ck-app ~ .toast-container > .toast {
  pointer-events: auto;
  width: 100%; max-width: none;
  margin: 0;
  background: var(--card-2);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  box-shadow: var(--shadow-2);
  font-size: .86rem; font-weight: 600; line-height: 1.4;
  overflow: hidden;
  animation: ck-modal-in .18s ease;
}
.ck-app ~ .toast-container > .toast .toast-body {
  display: flex; align-items: center; gap: 10px; /* also where Bootstrap's utilities aren't loaded */
  padding: 11px 14px;
  border-radius: 0;
  overflow-wrap: anywhere;
}
.ck-app ~ .toast-container > .toast .toast-body > i { font-size: 1rem; flex-shrink: 0; }
.ck-app ~ .toast-container > .toast .toast-body > span { flex: 1 1 auto; min-width: 0; }
/* Close button where Bootstrap's own styles aren't loaded (Dashboard, Analytics, QR) */
.ck-app ~ .toast-container .btn-close {
  flex-shrink: 0; width: 22px; height: 22px; padding: 0; margin-left: 4px;
  border: 0; border-radius: 6px; cursor: pointer; opacity: .7;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23f0f4f8'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center / 10px auto no-repeat;
  filter: none;
}
.ck-app ~ .toast-container .btn-close:hover { opacity: 1; background-color: rgba(255,255,255,.08); }
/* "info" popups: blue icon + bar (toast.js gives every type except success/error/warning
   the success look; the type is on data-alert-type). */
.ck-app ~ .toast-container > .toast[data-alert-type="info"] .toast-body { border-left-color: var(--blue) !important; }
.ck-app ~ .toast-container > .toast[data-alert-type="info"] .toast-body > i { color: var(--blue) !important; }
.ck-app ~ .toast-container > .toast[data-alert-type="info"] .toast-body > i::before { content: "\f05a"; }

/* ── 21. Layout utilities ──────────────────────────────────────── */
.ck-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.ck-grid-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--sp-5); align-items: stretch; }
@media (max-width: 1020px) { .ck-grid-2 { grid-template-columns: 1fr; } }
/* Panel that stretches to its grid row and scrolls its list to match */
.ck-flexcol { display: flex; flex-direction: column; }
.ck-flexcol .ck-lines { flex: 1 1 0; min-height: 260px; max-height: none; }
.ck-stack { display: flex; flex-direction: column; gap: var(--sp-3); }

/* ── 22. Dashboard extras: trend chart + most ordered ──────────── */
.ck-chartbox { position: relative; height: 250px; padding: var(--sp-2) var(--sp-3) var(--sp-3); }
.ck-popitems { display: flex; flex-direction: column; }
.ck-popitem {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 11px var(--sp-3);
  border-bottom: 1px solid var(--line-soft);
  font-size: .88rem;
}
.ck-popitem:last-child { border-bottom: none; }
.ck-popitem .rank {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: rgba(23,213,246,.1); color: var(--accent-text);
  font-weight: 800; font-size: .78rem;
  display: flex; align-items: center; justify-content: center;
}
.ck-popitem .nm { font-weight: 600; min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-popitem .qty { color: var(--soft); font-size: .8rem; }
.ck-popitem .rev { font-weight: 700; }
.ck-online.off .dot { background: var(--faint); box-shadow: none; }

/* ── 23. Menu management ───────────────────────────────────────── */
/* Tab bar */
.ck-tabbar {
  display: inline-flex; gap: 2px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 3px;
}
.ck-tab {
  border: none; background: none; cursor: pointer;
  border-radius: var(--r-pill);
  padding: 7px 20px;
  font-family: inherit; font-size: .85rem; font-weight: 600;
  color: var(--soft);
  transition: color var(--transition), background var(--transition);
}
.ck-tab:hover { color: var(--fg); }
.ck-tab.active {
  background: linear-gradient(90deg, #0A5FA8, #01689D);
  color: #fff;
}
.ck-tab .n { font-size: .72rem; opacity: .8; margin-left: 4px; }

/* Category section */
.ck-cat { margin-bottom: var(--sp-4); }
.ck-cat-head {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
}
.ck-cat-head .caret {
  background: none; border: none; cursor: pointer;
  color: var(--soft); display: flex; padding: 4px; border-radius: 6px;
  transition: transform var(--transition);
}
.ck-cat-head .caret svg { width: 15px; height: 15px; }
.ck-cat.collapsed .caret { transform: rotate(-90deg); }
.ck-cat.collapsed .ck-items { display: none; }
.ck-cat-head h2 { font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }
.ck-cat-head .ck-cat-desc { color: var(--faint); font-size: .78rem; }
.ck-cat.inactive .ck-cat-head h2 { color: var(--soft); }

.ck-badge-soft {
  font-size: .7rem; font-weight: 600;
  color: var(--soft);
  background: var(--card-hover);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-pill);
  padding: 2px 10px;
  white-space: nowrap;
}
.ck-badge-soft.alc { color: var(--st-preparing); border-color: rgba(249,187,47,.3); }

/* Item cards */
.ck-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: var(--sp-3);
  padding: 0 var(--sp-4) var(--sp-4);
}
.ck-item {
  position: relative;
  background: var(--card-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-ctl);
  padding: var(--sp-3);
  display: flex; gap: var(--sp-3);
  transition: border-color var(--transition);
}
.ck-item:hover { border-color: var(--line); }
.ck-item.off { opacity: .55; }
.ck-item.selected { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.ck-item .thumb { width: 62px; height: 62px; border-radius: 8px; flex-shrink: 0; background: var(--card-hover); object-fit: cover; }
.ck-item .tx { min-width: 0; flex: 1; }
.ck-item .nm { font-size: .9rem; font-weight: 700; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ck-item .flag { font-size: .66rem; font-weight: 700; border-radius: 4px; padding: 1px 6px; }
.ck-item .flag.spicy { color: var(--st-cancelled); background: rgba(244,76,118,.12); }
.ck-item .flag.alc { color: var(--st-preparing); background: rgba(249,187,47,.12); }
.ck-item .ds { font-size: .75rem; color: var(--faint); margin: 1px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-item .pr { font-size: .85rem; font-weight: 700; }
.ck-item .pr .var { color: var(--faint); font-weight: 500; font-size: .72rem; }
.ck-item-foot { display: flex; align-items: center; gap: var(--sp-2); margin-top: 7px; }
.ck-item-foot .ck-toggle { font-size: .72rem; color: var(--soft); gap: 6px; }
.ck-item-foot .ck-toggle .track { width: 30px; height: 18px; }
.ck-item-foot .ck-toggle .track::after { width: 12px; height: 12px; }
.ck-item-foot .ck-toggle input:checked + .track::after { transform: translateX(12px); }
.ck-sel {
  position: absolute; top: 8px; right: 8px;
  width: 16px; height: 16px; accent-color: var(--cyan); cursor: pointer;
}

/* Small icon buttons */
.ck-ib {
  background: none; border: 1px solid var(--line);
  border-radius: 7px; cursor: pointer;
  color: var(--soft); padding: 5px;
  display: inline-flex; position: relative;
  transition: color var(--transition), border-color var(--transition);
}
.ck-ib:hover { color: var(--fg); border-color: var(--soft); }
.ck-ib.danger:hover { color: var(--st-cancelled); border-color: var(--st-cancelled); }
.ck-ib svg { width: 14px; height: 14px; }
.ck-ib .nb {
  position: absolute; top: -6px; right: -6px;
  min-width: 14px; height: 14px; border-radius: var(--r-pill);
  background: var(--cyan); color: #04304F;
  font-size: .6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* Bulk action bar */
.ck-bulkbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--card-2);
  border: 1px solid var(--cyan);
  border-radius: var(--r-pill);
  padding: 8px 10px 8px 18px;
  box-shadow: var(--shadow-2);
  z-index: 150;
  font-size: .85rem; font-weight: 600;
}

/* Large modal + form layout */
.ck-modal.lg { max-width: 760px; }
.ck-formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-4); }
.ck-formgrid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .ck-formgrid { grid-template-columns: 1fr; } }
.ck-fieldset {
  border: 1px solid var(--line-soft); border-radius: var(--r-ctl);
  padding: var(--sp-3); margin-top: var(--sp-3);
}
.ck-fieldset > legend, .ck-fieldset .lg-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  font-size: .8rem; font-weight: 700; color: var(--soft);
  margin-bottom: var(--sp-2);
}
.ck-vrow {
  display: grid; grid-template-columns: 1fr 110px 32px;
  gap: var(--sp-2); margin-bottom: var(--sp-2); align-items: center;
}
.ck-vrow.ing { grid-template-columns: 1fr 86px 96px 32px; }
.ck-vrow .ck-input, .ck-vrow .ck-select { padding: 7px 10px; font-size: .82rem; }
.ck-imgdrop {
  border: 1.5px dashed var(--line); border-radius: var(--r-ctl);
  padding: var(--sp-3); text-align: center; cursor: pointer;
  color: var(--faint); font-size: .8rem;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.ck-imgdrop:hover { border-color: var(--soft); color: var(--soft); }
.ck-imgdrop img { max-height: 90px; border-radius: 8px; }

/* Deals */
.ck-deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--sp-4); }
.ck-dealcard { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); padding: var(--sp-4); }
.ck-dealcard.off { opacity: .55; }
.ck-dealcard .top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.ck-dealcard h3 { font-size: 1rem; font-weight: 800; }
.ck-dealcard .dp { margin-left: auto; font-size: 1.05rem; font-weight: 800; color: var(--accent-text); }
.ck-dealcard .was { font-size: .74rem; color: var(--faint); text-decoration: line-through; font-weight: 500; }
.ck-dealcard ul { list-style: none; margin: 0 0 8px; padding: 0; font-size: .82rem; color: var(--soft); }
.ck-dealcard ul li { padding: 2px 0; }
.ck-dealcard ul .q { color: var(--faint); }
.ck-dealcard .sched { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ck-dealcard .foot { display: flex; align-items: center; gap: var(--sp-3); border-top: 1px solid var(--line-soft); padding-top: 10px; }
.ck-dealcard .foot .ck-toggle { font-size: .72rem; color: var(--soft); gap: 6px; }
.ck-dealcard .foot .ck-toggle .track { width: 30px; height: 18px; }
.ck-dealcard .foot .ck-toggle .track::after { width: 12px; height: 12px; }
.ck-dealcard .foot .ck-toggle input:checked + .track::after { transform: translateX(12px); }

.ck-daychips { display: flex; gap: 5px; flex-wrap: wrap; }
.ck-daychip {
  width: 34px; height: 28px;
  border-radius: 7px; border: 1px solid var(--line);
  background: none; color: var(--soft);
  font-family: inherit; font-size: .7rem; font-weight: 700; cursor: pointer;
}
.ck-daychip.on { background: var(--cyan); border-color: var(--cyan); color: #04304F; }
.ck-note { font-size: .74rem; color: var(--st-preparing); }

/* ── 24. Menu management v2 (reference layout) ─────────────────── */
.ck-panel-ic.lg { width: 44px; height: 44px; border-radius: 11px; }
.ck-panel-ic.lg svg { width: 20px; height: 20px; }

/* Boxed tabs attached to the content panel */
.mm-tabs { display: flex; gap: 8px; }
.mm-tab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px;
  border: 1px solid var(--line-soft); border-bottom: none;
  border-radius: 12px 12px 0 0;
  background: var(--card);
  color: var(--soft); font-family: inherit; font-size: .88rem; font-weight: 700;
  cursor: pointer;
}
.mm-tab svg { width: 16px; height: 16px; }
.mm-tab.active {
  background: linear-gradient(180deg, #0A2A4A, #071F3A);
  border-color: #2A5E96;
  color: #fff;
}
.mm-tab.active svg { color: var(--cyan); }
.mm-body {
  border: 1px solid var(--line-soft);
  border-radius: 0 14px 14px 14px;
  background: var(--card);
  padding: var(--sp-4);
}

/* Master-detail split */
.mm-split { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
@media (max-width: 940px) { .mm-split { grid-template-columns: minmax(0, 1fr); } }

/* Category rail */
.mm-cats { display: flex; flex-direction: column; gap: 10px; }
.mm-cat {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--card-2);
  color: var(--fg); font-family: inherit; text-align: left;
  cursor: pointer;
  transition: border-color var(--transition);
}
.mm-cat:hover { border-color: var(--line); }
.mm-cat.active {
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(23,213,246,.1), rgba(10,95,168,.14));
  box-shadow: 0 0 14px rgba(23,213,246,.12);
}
/* Frozen chrome: tabs + search row + rail stay while items scroll;
   the greet header above scrolls away normally */
.mm-tabs { position: sticky; top: 0; z-index: 50; background: var(--bg); padding-top: 6px; margin-top: -6px; }
.mm-searchrow {
  position: sticky; top: 46px; z-index: 45;
  background: var(--card);
  border-radius: 0 14px 0 0;
  margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) 4px;
  padding: var(--sp-4) var(--sp-4) 12px;
}

/* Variation row with its default radio */
.ck-vrow.var4 { grid-template-columns: 20px 1fr 110px 32px; align-items: center; }
.ck-vrow.var4 .vdef { width: 15px; height: 15px; accent-color: var(--cyan); cursor: pointer; justify-self: center; }

/* Parent + subcategory sections in one scrollable detail view */
/* Clicking a rail entry must land the section heading BELOW the frozen
   tabs+search chrome (bottom ≈115px), not underneath it */
.mm-sec { scroll-margin-top: 126px; }
.mm-sec + .mm-sec { margin-top: 30px; }
.mm-sec.sub { margin-left: 28px; }
.mm-sec.sub .mm-dhead h2 { font-size: 1.02rem; }

/* Imageless categories keep the same tile size as ones with a photo */
.mm-cat:not(.dashed) { min-height: 68px; box-sizing: border-box; }
.mm-cat .sel { width: 15px; height: 15px; accent-color: var(--cyan); cursor: pointer; flex-shrink: 0; }
.mm-item .sel:disabled { cursor: not-allowed; opacity: .55; }
.mm-cat img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.mm-cat .meta { min-width: 0; flex: 1; }
.mm-cat .nm { font-weight: 800; font-size: .9rem; }
.mm-cat .ct { font-size: .72rem; color: var(--soft); }
.mm-cat .chev { color: var(--faint); display: flex; }
.mm-cat .chev svg { width: 15px; height: 15px; }
.mm-cat.inactive .nm { color: var(--soft); }
.mm-cat.dashed {
  border-style: dashed; background: none; justify-content: center;
  color: var(--soft); font-weight: 700; padding: 14px;
}
.mm-cat.dashed:hover { color: var(--fg); border-color: var(--soft); }

/* Detail pane */
.mm-dhead { display: flex; align-items: center; flex-wrap: wrap; row-gap: 8px; gap: var(--sp-3); margin-bottom: var(--sp-3); } /* wraps instead of pushing the buttons off-screen */
.mm-dhead img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.mm-dhead h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; }

/* Item card */
.mm-item {
  position: relative;
  background: var(--card-2);
  border: 1px solid var(--line-soft); border-radius: 12px;
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-3);
  display: flex; gap: var(--sp-3);
}
.mm-item.off { opacity: .55; }
.mm-item.selected { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.mm-item .sel { width: 16px; height: 16px; accent-color: var(--cyan); cursor: pointer; align-self: flex-start; margin-top: 4px; flex-shrink: 0; }
.mm-item .photo { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.mm-item .tx { min-width: 0; flex: 1; }
.mm-item .catlbl { font-size: .68rem; font-weight: 600; color: var(--faint); }
.mm-item .nm { font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-right: 86px; }
.mm-fav {
  color: #F9BB2F; background: rgba(249,187,47,.12);
  border: 1px solid rgba(249,187,47,.35); border-radius: var(--r-pill);
  font-size: .66rem; font-weight: 800; padding: 1px 9px;
  display: inline-flex; align-items: center; gap: 4px;
}
.mm-priceline { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 2px; }
.mm-price { font-size: 1.15rem; font-weight: 800; }
.mm-prep { color: var(--soft); font-size: .76rem; }
.mm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.mm-chip {
  font-size: .7rem; font-weight: 700;
  color: #BFE9FF; background: #0A2440;
  border: 1px solid #1B4A7A; border-radius: 7px;
  padding: 3px 9px; white-space: nowrap;
}
.mm-acts { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.ck-ib.cyan { color: var(--cyan); border-color: rgba(23,213,246,.5); }
.ck-ib.cyan:hover { border-color: var(--cyan); color: var(--cyan); }
.ck-ib.red { color: var(--st-cancelled); border-color: rgba(244,76,118,.5); }
.ck-ib.red:hover { border-color: var(--st-cancelled); color: var(--st-cancelled); }
.ck-ib.gold { color: #F9BB2F; border-color: rgba(249,187,47,.5); }

/* Deals board */
.mm-dealsgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); align-items: start; }
@media (max-width: 940px) { .mm-dealsgrid { grid-template-columns: 1fr; } }
.mm-dealcol { border: 1px solid var(--line-soft); border-radius: 14px; background: var(--card); padding: var(--sp-4); }
.mm-dealcol > .head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-3); font-weight: 800; font-size: .95rem; }
.mm-deal {
  border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--card-2);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.mm-deal .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mm-deal h3 { font-size: 1rem; font-weight: 800; }
.mm-deal .desc { color: var(--soft); font-size: .8rem; margin-top: 2px; }
.mm-deal .date { display: flex; align-items: center; gap: 7px; color: var(--soft); font-size: .76rem; margin: 8px 0 10px; }
.mm-deal .date svg { width: 13px; height: 13px; color: var(--faint); }
.mm-bundle { border: 1px solid var(--line-soft); border-radius: 10px; padding: 4px 6px; margin-bottom: 12px; }
.mm-brow { display: flex; align-items: center; gap: 10px; padding: 6px; }
.mm-brow + .mm-brow { border-top: 1px solid var(--line-soft); }
.mm-brow img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.mm-brow .bn { font-size: .84rem; font-weight: 600; }
.mm-brow .bp { font-size: .76rem; color: var(--soft); }
.mm-total { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .85rem; }
.mm-total .tp { font-size: 1.1rem; font-weight: 800; color: var(--accent-text); }
.mm-total .was { color: var(--faint); text-decoration: line-through; font-size: .8rem; }
.pct {
  background: #F9BB2F; color: #3A2A00;
  border-radius: 7px; font-size: .7rem; font-weight: 800; padding: 2px 8px;
}
.mm-deal .foot { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.mm-deal .foot .ck-toggle { font-size: .74rem; color: var(--soft); gap: 6px; }
.mm-deal .foot .ck-toggle .track { width: 30px; height: 18px; }
.mm-deal .foot .ck-toggle .track::after { width: 12px; height: 12px; }
.mm-deal .foot .ck-toggle input:checked + .track::after { transform: translateX(12px); }

/* ── 25. Fixes & additions (owner review) ──────────────────────── */
/* Small toggle done properly: knob always inside the track */
.ck-toggle.sm { font-size: .74rem; gap: 6px; }
.ck-toggle.sm .track { width: 30px; height: 18px; }
.ck-toggle.sm .track::after { width: 12px; height: 12px; }
.ck-toggle.sm input:checked + .track::after { transform: translateX(12px); }

/* Category rail: scrolls on long menus, stays in view while items scroll.
   Padding + negative margin give the hover pop headroom so cards never
   clip against the scroll container's edges. */
.mm-cats {
  position: sticky; top: 118px;
  max-height: calc(100vh - 134px);
  overflow-y: auto;
  padding: 8px 4px 10px 6px;
  margin: -8px 0 0 -6px;
}

/* Inline bulk bar: sits in the content flow above the item list (same
   placement as the live page's bulk toolbar), never fixed to the viewport */
.ck-bulkbar.inline {
  position: static; transform: none;
  width: 100%;
  border-radius: var(--r-md);
  margin-bottom: 16px;
}
@media (max-width: 940px) {
  .mm-cats { position: static; max-height: 300px; }
}

/* Category hover pop */
.mm-cat {
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.mm-cat:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  border-color: var(--line);
}
.mm-cat.active:hover { border-color: var(--cyan); }

/* Subcategory in the rail */
.mm-cat.child { margin-left: 20px; }
.mm-cat.child .nm { font-size: .84rem; }
.ck-vrow.x4 { grid-template-columns: 1fr 110px 32px 32px; }

/* ── 26. Bootstrap modal & form reskin (ops pages that keep BS modals) ── */
body[data-surface="ops"] { font-family: "Hanken Grotesk", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body[data-surface="ops"] .modal-content {
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: var(--r-modal);
  color: var(--fg);
  box-shadow: var(--shadow-2);
}
body[data-surface="ops"] .modal-header,
body[data-surface="ops"] .modal-footer { border-color: var(--line-soft); }
body[data-surface="ops"] .modal-title { font-size: 1.02rem; font-weight: 800; }
body[data-surface="ops"] .btn-close { filter: invert(1) grayscale(100%) brightness(1.6); }
body[data-surface="ops"] .form-control,
body[data-surface="ops"] .form-select,
body[data-surface="ops"] .input-group-text {
  background: var(--input-bg);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 10px;
}
body[data-surface="ops"] .form-select option { background: var(--input-bg); color: var(--fg); }
body[data-surface="ops"] .form-control:focus,
body[data-surface="ops"] .form-select:focus {
  background: var(--input-bg);
  color: var(--fg);
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(23,213,246,.15);
}
body[data-surface="ops"] .form-control::placeholder { color: var(--faint); }
body[data-surface="ops"] .form-label,
body[data-surface="ops"] .form-check-label { color: var(--soft); font-size: .85rem; font-weight: 600; }
body[data-surface="ops"] .form-check-input {
  background-color: var(--input-bg);
  border-color: var(--line);
}
body[data-surface="ops"] .form-check-input:checked { background-color: #01689D; border-color: #01689D; }
body[data-surface="ops"] .form-check-input:focus { box-shadow: 0 0 0 3px rgba(23,213,246,.15); }
body[data-surface="ops"] .modal .btn-primary,
body[data-surface="ops"] .modal .btn-success {
  background: linear-gradient(180deg, #F2FCFF, #D4F1FF);
  border: none; color: #04253C; font-weight: 700;
}
body[data-surface="ops"] .modal .btn-secondary {
  background: var(--input-bg); border: 1px solid var(--line); color: var(--fg);
}
body[data-surface="ops"] .modal .btn-danger { font-weight: 700; }
body[data-surface="ops"] .modal .text-muted,
body[data-surface="ops"] .modal .small { color: var(--soft) !important; }
body[data-surface="ops"] .modal .table { color: var(--fg); --bs-table-bg: transparent; border-color: var(--line-soft); }
body[data-surface="ops"] .modal .table th { color: var(--soft); border-color: var(--line); }
body[data-surface="ops"] .modal .table td { border-color: var(--line-soft); }
body[data-surface="ops"] .modal hr { border-color: var(--line); }
body[data-surface="ops"] .modal .alert-danger {
  background: rgba(244,76,118,.12); border-color: rgba(244,76,118,.4); color: #F88BA6;
}
body[data-surface="ops"] .modal .alert-warning {
  background: rgba(249,187,47,.1); border-color: rgba(249,187,47,.35); color: #F9BB2F;
}
body[data-surface="ops"] .modal .bg-light { background: var(--input-bg) !important; color: var(--fg); }
body[data-surface="ops"] .modal .bg-danger { background: #B4314F !important; }
body[data-surface="ops"] .modal .progress { background: var(--input-bg); }
body[data-surface="ops"] .loading-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,15,22,.6);
  display: none; align-items: center; justify-content: center;
}
body[data-surface="ops"] .loading-overlay.show { display: flex; }
body[data-surface="ops"] .mm-searchrow .ck-btn { flex-shrink: 0; }
/* All ops modals fit the viewport: header/footer fixed, body scrolls */
body[data-surface="ops"] .modal-dialog { margin: 12px auto; max-height: calc(100vh - 24px); }
body[data-surface="ops"] .modal-content { max-height: calc(100vh - 24px); }
body[data-surface="ops"] .modal-body { overflow-y: auto; }

/* Mobile: frozen menu-management chrome sits below the mobile bar
   (must come after the base .mm-tabs/.mm-searchrow rules to win) */
@media (max-width: 880px) {
  .mm-tabs { top: 44px; }
  .mm-searchrow { top: 90px; }
  .mm-sec { scroll-margin-top: 170px; } /* mobile bar + tabs + search */
}
@media (max-width: 640px) {
  .mm-chips { flex-wrap: wrap; }
  .ck-bulkbar.inline { flex-wrap: wrap; row-gap: 8px; }
  .ck-bulkbar.inline .spacer { display: none; }
  .mm-item .photo { width: 56px; height: 56px; }
  .mm-dhead { flex-wrap: wrap; row-gap: 8px; }
  .mm-dhead h2 { font-size: 1.05rem; }
  .mm-dhead .ck-btn { white-space: nowrap; }
  .mm-sec.sub { margin-left: 14px; }
}
/* searchable-select.css was written against design-system.css variables;
   map them to kit tokens so its dropdown panel renders on kit pages */
body[data-surface="ops"] {
  --bg-card: var(--card-2);
  --bg-card-hover: var(--card-hover);
  --bg-dark-secondary: var(--input-bg);
  --border-dark: var(--line);
  --primary-aqua: var(--cyan);
  --text-primary: var(--fg);
  --text-secondary: var(--soft);
  /* shared toast.js reads these (with its own fallbacks) */
  --success-color: var(--emerald);
  --danger-color: var(--pink);
  --warning-color: var(--amber);
}

/* Theme-owned colors read by JS (charts etc.) via getComputedStyle —
   scripts must never carry color literals of their own */
body[data-surface="ops"] {
  --chart-line: var(--cyan);
  --chart-fill-strong: rgba(23,213,246,.16);
  --chart-fill-faint: rgba(23,213,246,0);
  --chart-point-ring: var(--card);
  --chart-tip-bg: var(--card-2);
  --chart-tip-border: var(--line);
  --chart-tick: var(--faint);
  --chart-grid: rgba(42,58,78,.45);
}
.mm-fav.spicy {
  color: var(--st-cancelled);
  background: rgba(244,76,118,.1);
  border-color: rgba(244,76,118,.3);
}
/* Bootstrap .card used inside ops modals (deal item rows etc.) */
body[data-surface="ops"] .modal .card {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: 10px;
}
body[data-surface="ops"] .modal .card .card-header {
  background: transparent;
  border-color: var(--line-soft);
}
/* Day-of-week pills (deal schedule) on kit colors */
body[data-surface="ops"] .modal .btn-outline-primary {
  color: var(--soft);
  border-color: var(--line);
  background: var(--input-bg);
}
body[data-surface="ops"] .modal .btn-check:checked + .btn-outline-primary {
  background: linear-gradient(90deg, #0A5FA8, #01689D);
  border-color: #2A5E96;
  color: #fff;
}
body[data-surface="ops"] .modal .btn-check:focus-visible + .btn-outline-primary {
  box-shadow: 0 0 0 3px rgba(23,213,246,.2);
}

/* ── 27. Order management ──────────────────────────────────────── */
/* Order statuses in the colours customers see (QR order tracking,
   css/user-profile.css). Scoped to pages that opt in, so other ops
   pages keep the kit status set until the owner decides. */
body[data-status-palette="customer"] {
  --st-new: #4e73df;
  --st-preparing: #f6c23e;
  --st-ready: #1cc88a;
  --st-served: #858796;
  --st-completed: #36b9cc;
  --st-cancelled: var(--pink);   /* owner: cancelled is red (customer pages' #00CED1 was too close to Completed) */
}
/* Danger buttons stay red even though "cancelled" is not red in that set */
body[data-status-palette="customer"] .ck-btn.danger { color: var(--pink); border-color: var(--pink); }
body[data-status-palette="customer"] .ck-btn.danger:hover { background: var(--pink); color: #fff; }

.om-head-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.om-head-btns svg { width: 16px; height: 16px; }

.om-filters {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 14px; padding: 12px 16px;
}
.om-filters-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 12px; color: var(--fg); font: inherit; font-weight: 700; cursor: pointer;
}
.om-filters-toggle svg { width: 16px; height: 16px; }
.om-filters-toggle .chev { transition: transform var(--transition); }
.om-filters.collapsed .om-filters-toggle .chev { transform: rotate(180deg); }
.om-filter-row { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 14px; margin-top: 14px; align-items: end; }
.om-filters.collapsed .om-filter-row { display: none; }
.om-field label { display: block; font-size: .78rem; font-weight: 600; color: var(--soft); margin-bottom: 6px; }
.om-iconfield { position: relative; }
.om-iconfield > svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--soft); pointer-events: none;
}
.om-iconfield .ck-select, .om-iconfield .ck-input { width: 100%; padding-left: 38px; }

.om-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; }
.om-tab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 18px; margin-bottom: -1px;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--soft); font: inherit; font-size: .9rem; font-weight: 700;
  white-space: nowrap; cursor: pointer;
}
.om-tab svg { width: 18px; height: 18px; }
.om-tab:hover { color: var(--fg); }
.om-tab.active {
  color: #fff; border-bottom-color: var(--cyan);
  background: linear-gradient(180deg, transparent, rgba(23,213,246,.08));
  text-shadow: 0 0 12px rgba(23,213,246,.35);
}
.om-view[hidden] { display: none; }

.om-floor { background: var(--card); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; }
.om-floor + .om-floor { margin-top: 16px; }
.om-floor-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 16px; background: none; color: var(--fg); font: inherit; text-align: left;
  border: 0; border-bottom: 1px solid var(--line-soft); cursor: pointer;
}
.om-floor-head .ic {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--cyan);
  background: rgba(23,213,246,.1); border: 1px solid rgba(23,213,246,.25);
}
.om-floor-head .ic svg { width: 18px; height: 18px; }
.om-floor-head h3 { margin: 0; font-size: 1.02rem; font-weight: 800; }
.om-floor-head .chev { margin-left: auto; color: var(--soft); display: flex; transition: transform var(--transition); }
.om-floor-head .chev svg { width: 18px; height: 18px; }
.om-floor.collapsed .om-floor-head { border-bottom: 0; }
.om-floor.collapsed .om-floor-head .chev { transform: rotate(180deg); }
.om-floor.collapsed .om-floor-body { display: none; }
.om-floor-body { padding: 14px 16px 16px; }
.om-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }

.om-tile {
  --tc: var(--faint);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 104px; padding: 12px 14px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px;
  color: var(--fg); font: inherit; text-align: left; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.om-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.om-tile .top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 4px 8px; }  /* status drops below the label on narrow tiles instead of spilling out */
.om-tile .tno { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.om-tile .kind { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; }
.om-tile .kind svg { width: 15px; height: 15px; }
.om-tile .st { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 600; color: var(--tc); white-space: nowrap; }
.om-tile .st::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 8px var(--tc); }
.om-tile .sub { font-size: .76rem; color: var(--soft); }
.om-tile .foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-radius: 8px; font-size: .78rem; font-weight: 600; color: var(--fg);
  background: color-mix(in srgb, var(--tc) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent);
}
.om-tile .foot svg { width: 14px; height: 14px; color: var(--tc); }
/* Tables with orders take the colour of their order's status */
.om-tile.has-order {
  background: color-mix(in srgb, var(--tc) 12%, var(--card-2));
  border-color: color-mix(in srgb, var(--tc) 75%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--tc) 22%, transparent), inset 3px 0 0 var(--tc);
}
.om-tile.st-new { --tc: var(--st-new); }
.om-tile.st-preparing { --tc: var(--st-preparing); }
.om-tile.st-ready { --tc: var(--st-ready); }
.om-tile.st-served { --tc: var(--st-served); }
.om-tile.available { --tc: var(--blue); }
.om-tile.reserved { --tc: var(--violet); border-color: color-mix(in srgb, var(--violet) 45%, transparent); }
.om-tile.inactive { --tc: var(--pink); background: color-mix(in srgb, #000 18%, var(--card-2)); }
.om-tile.inactive .tno { color: var(--soft); }
.om-tile.blink { animation: om-blink 1s ease-in-out 3; }
@keyframes om-blink { 50% { box-shadow: 0 0 0 3px var(--cyan), 0 0 22px rgba(23,213,246,.5); } }

/* Order history (today) */
.om-history { margin-top: 30px; }
.om-history-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.om-history-head h2 { margin: 0; font-size: 1.1rem; font-weight: 800; display: inline-flex; align-items: center; gap: 10px; }
.om-history-head h2 svg { width: 20px; height: 20px; color: var(--cyan); }
.om-history-head #prevHistoryBtn { margin-left: auto; }
.om-history-filters .filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.om-history-filters .filters .ck-select { min-width: 170px; }
.om-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.om-stat { background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.om-stat .lbl { font-size: .74rem; font-weight: 600; color: var(--soft); }
.om-stat .val { font-size: 1.4rem; font-weight: 800; margin-top: 4px; }
.om-stat .note { font-size: .72rem; color: var(--st-preparing); }
.om-stat .split { display: flex; justify-content: space-between; font-size: .76rem; color: var(--soft); margin-top: 3px; }
.om-stat .split b { color: var(--fg); font-weight: 700; }
.om-hlist { background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.om-hrow {
  display: grid; grid-template-columns: minmax(0, 1.6fr) 64px minmax(0, 1.3fr) 118px 226px;
  align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft); font-size: .84rem;
}
.om-hrow:last-child { border-bottom: 0; }
.om-hrow.head { font-size: .72rem; font-weight: 700; color: var(--soft); text-transform: none; background: var(--card-2); }
.om-hrow .muted { color: var(--soft); }
.om-hrow button { justify-self: end; }

/* Order details */
.om-od { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; }
.om-od-items { width: 100%; border-collapse: collapse; font-size: .85rem; }
.om-od-items th { text-align: left; font-size: .72rem; font-weight: 700; color: var(--cyan); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.om-od-items td { padding: 9px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.om-od-items .num, .om-od-items th.num { text-align: right; white-space: nowrap; }
.om-od-items .opt { font-size: .76rem; color: var(--soft); }
.om-od-items .deal { font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.om-od-items .deal svg { width: 14px; height: 14px; color: var(--st-preparing); }
.om-bill { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: .85rem; }
.om-bill .row { display: flex; justify-content: space-between; gap: 12px; }
.om-bill .row span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.om-bill .row.disc { color: var(--st-ready); }
.om-bill .row.charge { color: var(--st-preparing); }
.om-bill .row.total { font-weight: 800; font-size: 1rem; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.om-side { display: flex; flex-direction: column; gap: 12px; }
.om-side .card { background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.om-side h4 { margin: 0 0 6px; font-size: .82rem; font-weight: 800; }
.om-side p { margin: 0; font-size: .84rem; color: var(--soft); }
.om-side a { color: var(--cyan); }
.om-tbl-orders { display: flex; flex-direction: column; gap: 10px; }
.om-tbl-order {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px;
}

@media (max-width: 1100px) { .om-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 880px) {
  .om-filter-row { grid-template-columns: minmax(0, 1fr); }
  .om-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .om-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .om-od { grid-template-columns: minmax(0, 1fr); }
  .om-hrow { grid-template-columns: minmax(0, 1fr) auto; }
  .om-hrow > :nth-child(2) { display: none; }
  .om-hrow .badges { grid-column: 1; }
  .om-hrow .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .om-hrow.head { display: none; }
}
/* Device-lock switches: mine = filled, unclaimed = plain, held elsewhere = amber */
.om-lock { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; border: 1px solid var(--line); background: var(--card-2); color: var(--soft); }
.om-lock.mine { background: linear-gradient(180deg, #F2FCFF, #D4F1FF); color: #04253C; border-color: transparent; }
.om-lock.other { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 55%, transparent); background: color-mix(in srgb, var(--amber) 8%, transparent); }
/* Order action buttons: outline tones like the live page (green = finish,
   amber = change the bill, blue = look/track, grey = neutral, red = cancel) */
.om-act {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 9px; font: inherit; font-size: .78rem; font-weight: 700;
  background: transparent; color: var(--soft); border: 1px solid var(--line); cursor: pointer; white-space: nowrap;
}
.om-act:hover:not(:disabled) { background: color-mix(in srgb, currentColor 10%, transparent); }
.om-act:disabled { opacity: .45; cursor: not-allowed; }
.om-act.ok { color: var(--emerald); border-color: color-mix(in srgb, var(--emerald) 55%, transparent); }
.om-act.warn { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
.om-act.info { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 55%, transparent); }
.om-act.danger { color: var(--pink); border-color: color-mix(in srgb, var(--pink) 55%, transparent); }
.om-act.primary { background: linear-gradient(180deg, #F2FCFF, #D4F1FF); color: #04253C; border-color: transparent; }
.om-act.gate { background: var(--amber); color: #1c1400; border-color: transparent; }

/* Order cards inside the table pop-up */
.om-ocards { display: flex; flex-direction: column; gap: 12px; }
.om-ocard { background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
.om-ocard.selected { border-color: color-mix(in srgb, var(--cyan) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--cyan) 35%, transparent); }
.om-ocard .hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.om-ocard .hd b { font-size: .95rem; }
.om-ocard .hd .meta { color: var(--soft); font-size: .78rem; }
.om-ocard .hd .amt { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.om-ocard .lines { margin: 8px 0; font-size: .82rem; color: var(--soft); }
.om-ocard .note { font-size: .78rem; color: var(--amber); margin-bottom: 8px; }
.om-ocard .rider { font-size: .8rem; color: var(--soft); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.om-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.om-tactions { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.om-tactions h4 { margin: 0 0 4px; font-size: .9rem; font-weight: 800; }
.om-tactions .hint { font-size: .76rem; color: var(--soft); margin-bottom: 10px; }
.om-paid { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; margin-bottom: 12px; font-size: .82rem; font-weight: 700; color: var(--emerald); background: color-mix(in srgb, var(--emerald) 10%, transparent); border: 1px solid color-mix(in srgb, var(--emerald) 35%, transparent); }
.om-bill-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* Progress button in a tile's footer (tile itself still opens the pop-up) */
.om-tile .foot.act { width: 100%; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; text-align: left; transition: background var(--transition); }
.om-tile .foot.act span { display: inline-flex; align-items: center; gap: 8px; }
.om-tile .foot.act:hover { background: color-mix(in srgb, var(--tc) 22%, transparent); }
.om-tile .foot.act.gate { color: #1c1400; background: var(--amber); border-color: transparent; }
.om-tile .foot.act.gate svg { color: #1c1400; }
/* "View details": navigation, so it sits apart from the order's action row */
.om-viewbtn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--r-pill);
  font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
  color: var(--cyan); background: rgba(23,213,246,.08); border: 1px solid rgba(23,213,246,.45);
}
.om-viewbtn svg { width: 15px; height: 15px; }
.om-viewbtn:hover { background: rgba(23,213,246,.16); }
.om-ocard .hd .amt + .om-viewbtn { margin-left: 4px; }
.om-act.primary:hover:not(:disabled) { background: linear-gradient(180deg, #FFFFFF, #E2F6FF); filter: brightness(1.04); }
.om-act.gate:hover:not(:disabled) { background: var(--amber); filter: brightness(1.08); }
.om-act svg { width: 14px; height: 14px; }

/* Cancel-order pop-up */
.om-refund { padding: 10px 12px; border-radius: 10px; font-size: .82rem; color: var(--fg);
  background: color-mix(in srgb, var(--blue) 12%, transparent); border: 1px solid color-mix(in srgb, var(--blue) 35%, transparent); }
.om-check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; cursor: pointer; }
.om-check input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--cyan); cursor: pointer; }
.om-check small { display: block; color: var(--soft); font-size: .76rem; margin-top: 2px; }
.om-cancel { display: flex; flex-direction: column; gap: 14px; }
.ck-btn.solid-danger, body[data-surface="ops"] .ck-btn.solid-danger { background: var(--pink); color: #fff; box-shadow: none; }
.ck-btn.solid-danger:hover, body[data-surface="ops"] .ck-btn.solid-danger:hover { background: var(--pink); filter: brightness(1.08); }

/* Card right column: amount + View details on top, Print Bill pushed to the bottom */
.om-ocard .side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.om-ocard .side .amt { font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }
.om-ocard .side .om-printbtn { margin-top: auto; }
.om-printbtn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--r-pill);
  font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
  color: var(--soft); background: transparent; border: 1px solid var(--line);
}
.om-printbtn svg { width: 15px; height: 15px; }
.om-printbtn:hover { color: var(--fg); border-color: var(--soft); }
@media (max-width: 640px) {
  .om-ocard { grid-template-columns: 1fr; }
  .om-ocard .side { flex-direction: row; align-items: center; flex-wrap: wrap; order: -1; }
  .om-ocard .side .amt { margin-right: auto; }
  .om-ocard .side .om-printbtn { margin-top: 0; }
}
.om-ocard .side .om-viewbtn { margin-bottom: 30px; }   /* keep Print Bill well clear of View details */
@media (max-width: 640px) { .om-ocard .side .om-viewbtn { margin-bottom: 0; } }

/* History rows (today + previous): live card content in table form */
.om-hrow .sub { font-size: .74rem; color: var(--soft); margin-top: 2px; }
.om-hrow .sub.due { color: var(--pink); }
.om-hrow .sub.ret { color: var(--blue); }
.om-hrow .badges { display: flex; flex-wrap: wrap; gap: 6px; }
.om-hrow .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.om-hrow .acts button { justify-self: auto; }
.om-chip-muted { font-size: .74rem; font-weight: 700; color: var(--soft); padding: 5px 10px; border-radius: var(--r-pill); border: 1px dashed var(--line); align-self: center; }
.om-more { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.om-more small { color: var(--soft); font-size: .76rem; }
.om-more:has(#hMore[hidden]) small { margin-top: -6px; }

/* Previous History pop-up */
.om-ph { display: flex; flex-direction: column; gap: 12px; }
.om-ph-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.om-ph-row .ck-field { min-width: 160px; }
.om-ph-row .ck-field.grow { flex: 1; min-width: 200px; }
.om-ph-row.top { align-items: flex-end; }
.om-ph-stats { flex: 1; min-width: 260px; font-size: .82rem; line-height: 1.6; padding: 8px 12px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line-soft); }
.om-ph-stats .muted { color: var(--soft); }
.om-ph-clear { display: flex; justify-content: flex-end; margin-top: -4px; }
.om-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: .8rem; font-weight: 600; color: var(--cyan); cursor: pointer; }
.om-linkbtn:hover { text-decoration: underline; }
.om-ph .om-hlist { max-height: none; }

/* ── Status View ── */
.om-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.om-col { background: var(--card); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; }
.om-col-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line-soft); cursor: pointer;
  font: inherit; color: inherit; text-align: left; background: color-mix(in srgb, var(--tc) 10%, transparent); border-top: 3px solid var(--tc); }
.om-col-head:hover { background: color-mix(in srgb, var(--tc) 16%, transparent); }
.om-col-head h3 { margin: 0; font-size: .92rem; font-weight: 800; color: var(--tc); }
.om-col-head .chev, .om-done-head .chev { margin-left: auto; display: flex; color: var(--soft); transition: transform var(--transition); }
.om-col-head .chev svg, .om-done-head .chev svg { width: 16px; height: 16px; }
.om-col.collapsed .chev, .om-done.collapsed .chev { transform: rotate(180deg); }
.om-col.collapsed .body, .om-done.collapsed .om-done-body { display: none; }
.om-col.collapsed .om-col-head { border-bottom: 0; }
.om-col-head .cnt { min-width: 24px; text-align: center; padding: 2px 8px; border-radius: var(--r-pill); font-size: .76rem; font-weight: 800;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 18%, transparent); }
.om-col .body { display: flex; flex-direction: column; gap: 10px; padding: 12px; min-height: 120px; }
.om-col-empty { color: var(--soft); font-size: .82rem; text-align: center; padding: 28px 0; }
.om-scard { background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 11px; padding: 11px 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.om-scard .hd { display: flex; align-items: center; gap: 8px; width: 100%; }
.om-scard .hd .ic svg { width: 16px; height: 16px; color: var(--cyan); display: block; }
.om-scard .hd b { font-size: .9rem; }
.om-scard .hd small, .om-scard .dhead small { margin-left: auto; color: var(--soft); font-size: .74rem; }
.om-scard .meta { font-size: .8rem; color: var(--soft); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.om-scard.delivery { border-color: color-mix(in srgb, var(--pink) 40%, transparent); }
.om-scard .dhead { display: flex; align-items: center; gap: 8px; width: 100%; flex-wrap: wrap; font-size: .82rem; font-weight: 700; }
.om-scard .dhead > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.om-scard .dhead svg { width: 15px; height: 15px; color: var(--pink); }
.om-scard .who { font-size: .8rem; }
.om-scard .addr { font-size: .76rem; color: var(--soft); width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.om-scard .rline { font-size: .8rem; color: var(--soft); }
.om-scard .rline b { color: var(--fg); }
.om-rs { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); color: var(--soft); background: color-mix(in srgb, var(--soft) 16%, transparent); }
.om-rs.assigned { color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, transparent); }
.om-rs.out_for_delivery { color: var(--blue); background: color-mix(in srgb, var(--blue) 16%, transparent); }
.om-rs.delivered { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 16%, transparent); }
.om-viewbtn.ghost { color: var(--soft); background: transparent; border-color: var(--line); }
.om-done { margin-top: 26px; }
.om-done-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 0 12px; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.om-done-head h2 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.om-done-head .cnt { font-size: .74rem; padding: 1px 8px; border-radius: var(--r-pill); background: var(--card-2); color: var(--soft); }
.om-done-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .om-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .om-cols { grid-template-columns: 1fr; } }

/* ── Kitchen KOT ── */
.om-kitchen { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.om-kcard { background: var(--card); border: 1px solid var(--line-soft); border-top: 3px solid var(--st-preparing); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.om-kcard header { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.om-kcard h3 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.om-kcard h4 { margin: 0; font-size: 1rem; font-weight: 800; color: var(--soft); }
.om-kcard header p { margin: 2px 0 0; font-size: .76rem; color: var(--soft); }
.om-kcard .r { text-align: right; }
.om-kcard .el { font-size: .95rem !important; font-weight: 800; color: var(--emerald) !important; font-variant-numeric: tabular-nums; }
.om-kcard .el.attention { color: var(--amber) !important; }
.om-kcard .el.urgent { color: var(--pink) !important; }
.om-kcard ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.om-kcard li { display: flex; justify-content: space-between; gap: 10px; font-size: 1rem; font-weight: 600; }
.om-kcard li small { display: block; font-size: .76rem; font-weight: 500; color: var(--soft); margin-top: 2px; }
.om-kcard li b { font-size: 1.05rem; color: var(--cyan); }
.om-kcard li.deal { font-size: .82rem; font-weight: 800; color: var(--soft); display: flex; align-items: center; gap: 6px; justify-content: flex-start; margin-top: 4px; }
.om-kcard li.deal svg { width: 14px; height: 14px; }
.om-kcard.lg li:not(.deal) { font-size: 1.15rem; }
.om-kcard.sm li:not(.deal) { font-size: .88rem; }
.om-kcard .si { padding: 9px 11px; border-radius: 10px; font-size: .82rem; color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.om-kcard .si p { margin: 3px 0 0; color: var(--fg); }
.om-ready { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px; border-radius: 11px; border: 0; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 800; color: #04210f; background: var(--emerald); }
.om-ready svg { width: 17px; height: 17px; }
.om-ready:hover { filter: brightness(1.08); }

/* ── Active Orders ── */
.om-active-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.om-active-head h2 { margin: 0; font-size: 1.05rem; font-weight: 800; display: inline-flex; align-items: center; gap: 9px; }
.om-active-head h2 svg { width: 19px; height: 19px; color: var(--amber); }
.om-active-head .cnt { font-size: .76rem; padding: 2px 9px; border-radius: var(--r-pill); background: var(--card-2); color: var(--soft); }

/* ── Settings pop-ups ── */
.om-set { display: flex; flex-direction: column; gap: 18px; }
.om-set section { display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.om-set section:last-child { border-bottom: 0; padding-bottom: 0; }
.om-set h4 { margin: 0; font-size: .92rem; font-weight: 800; color: var(--cyan); display: flex; align-items: center; gap: 8px; }
.om-set-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.om-set-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.om-set-toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .88rem; }
.om-set-toggle .ck-toggle { margin-top: 1px; }
.om-set-toggle small { display: block; color: var(--soft); font-size: .78rem; margin-top: 3px; font-weight: 500; }
.om-help { color: var(--soft); font-size: .76rem; }
.om-set .req { color: var(--pink); }
.om-set-btnrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.om-err { padding: 9px 12px; border-radius: 10px; font-size: .82rem; color: var(--pink); background: color-mix(in srgb, var(--pink) 10%, transparent); border: 1px solid color-mix(in srgb, var(--pink) 35%, transparent); }
.om-upi { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: .9rem; }
.om-qr { width: 200px; height: 200px; border-radius: 12px; }
.om-count { font-size: .74rem; padding: 1px 8px; border-radius: var(--r-pill); background: var(--card-2); color: var(--soft); }
.om-rules { display: flex; flex-direction: column; gap: 8px; }
.om-rule { display: grid; grid-template-columns: auto 86px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line-soft); }
.om-rule.off .tag, .om-rule.off .txt { opacity: .5; }
.om-rule .val { font-weight: 700; color: var(--cyan); margin-left: 4px; }
.om-off { font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: var(--r-pill); color: var(--soft); border: 1px dashed var(--line); margin-left: 4px; }
.om-rule .ctl { display: flex; gap: 6px; }
.om-iconbtn { width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 800;
  color: var(--soft); background: transparent; border: 1px solid var(--line); }
.om-iconbtn svg { width: 15px; height: 15px; }
.om-iconbtn:hover:not(:disabled) { color: var(--fg); border-color: var(--soft); }
.om-iconbtn.danger { color: var(--pink); border-color: color-mix(in srgb, var(--pink) 45%, transparent); }
.om-iconbtn.danger:hover { color: var(--pink); background: color-mix(in srgb, var(--pink) 12%, transparent); }
.om-iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.om-rule-confirm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-top: -4px; border-radius: 10px; font-size: .84rem;
  background: color-mix(in srgb, var(--pink) 10%, transparent); border: 1px solid color-mix(in srgb, var(--pink) 35%, transparent); }
.om-rule-confirm span { flex: 1; min-width: 200px; }
.om-rule small { display: block; color: var(--soft); font-size: .76rem; margin-top: 2px; }
.om-rule .tag { justify-content: center; text-transform: capitalize; cursor: default; padding: 3px 8px; }
.om-linkbtn.danger { color: var(--pink); }
.om-chkrow { display: flex; gap: 18px; flex-wrap: wrap; }
.om-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.om-preview { padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line); }
.om-preview h5 { margin: 0 0 4px; font-size: .82rem; font-weight: 800; }
.om-preview p { margin: 0; font-size: .84rem; color: var(--soft); }
@media (max-width: 640px) {
  .om-set-grid, .om-set-grid.two { grid-template-columns: 1fr; }
  .om-rule { grid-template-columns: auto minmax(0, 1fr); }
  .om-rule .tag { display: none; }
  .om-rule .ctl { grid-column: 1 / -1; justify-content: flex-end; }
}
.om-agroup { margin-bottom: 20px; }
.om-agroup h3 { margin: 0 0 10px; font-size: .9rem; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--soft); }
.om-agroup h3 svg { width: 16px; height: 16px; color: var(--cyan); }
.om-agroup h3 .cnt { font-size: .72rem; padding: 1px 8px; border-radius: var(--r-pill); background: var(--card-2); }

/* Delivery payments that aren't orders (read-only strips) */
.om-paystrip { margin-bottom: 18px; }
.om-paystrip h4 { margin: 0 0 10px; font-size: .9rem; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--soft); }
.om-paystrip h4 svg { width: 16px; height: 16px; color: var(--cyan); }
.om-paygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.om-paycard { background: var(--card); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: .84rem; }
.om-paycard .ph { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.om-paycard .ph small { display: block; color: var(--soft); font-size: .76rem; margin-top: 2px; }
.om-paycard .pt { margin: 0; }
.om-paycard .pt .muted, .om-paycard .pref { color: var(--soft); }
.om-paycard .pref { margin: 0; font-size: .76rem; }
.om-paycard .pitems { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 6px 0; display: flex; flex-direction: column; gap: 4px; }
.om-paycard .pitems > div { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; }
.om-paycard .pitems small { display: block; color: var(--soft); font-size: .74rem; }
.om-paycard .ptotal { display: flex; justify-content: space-between; }
.om-paybadge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); }
.om-paybadge.verifying { color: var(--blue); background: color-mix(in srgb, var(--blue) 16%, transparent); }
.om-paybadge.refund { color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, transparent); }
.om-paybadge.refunded { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 16%, transparent); }
.om-paybadge.failed { color: var(--pink); background: color-mix(in srgb, var(--pink) 16%, transparent); }
.om-spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: om-spin .8s linear infinite; }
@keyframes om-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .om-spin { animation: none; } }

/* ── 28. Order management — live page bindings ─────────────────── */
/* The live Orders page keeps its Bootstrap tabs/modals and design-system.css
   underneath; these rules give its existing markup (same IDs, same JS) the
   kit look. Scoped to body[data-status-palette="customer"] = the Orders page. */
body[data-status-palette="customer"] .ck-page { padding-top: 22px; }
.om-greet { margin-bottom: 18px; }
.om-greet .ck-panel-ic i { font-size: 1.15rem; }
.om-title { display: flex; align-items: center; gap: 10px; margin: 0; }
.om-head-btns .ck-btn i { font-size: .85rem; }
.om-head-btns .btn.ck-btn { line-height: 1.2; }
body[data-status-palette="customer"] #deviceLocksToggleBtn[aria-expanded="true"] { color: var(--cyan); border-color: var(--cyan); }
.om-locks { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; }
body[data-status-palette="customer"] .om-filters { margin-bottom: 18px; }
.om-filters-toggle i { font-size: .85rem; }
.om-filter-active { font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: var(--r-pill); color: #04253C; background: var(--cyan); }
.om-filter-panel { padding-top: 14px; }

/* Bootstrap tabs → kit underline tabs */
body[data-status-palette="customer"] #ordersViewTabs { flex-wrap: nowrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
body[data-status-palette="customer"] #ordersViewTabs .nav-link {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 18px; margin-bottom: -1px;
  background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0;
  color: var(--soft); font-size: .9rem; font-weight: 700; white-space: nowrap;
}
body[data-status-palette="customer"] #ordersViewTabs .nav-link i { margin: 0 !important; }
body[data-status-palette="customer"] #ordersViewTabs .nav-link:hover { color: var(--fg); }
body[data-status-palette="customer"] #ordersViewTabs .nav-link.active {
  color: #fff; border-bottom-color: var(--cyan);
  background: linear-gradient(180deg, transparent, rgba(23,213,246,.08));
  text-shadow: 0 0 12px rgba(23,213,246,.35);
}
body[data-status-palette="customer"] #deviceLocksToggleBtn { width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; }
body[data-status-palette="customer"] #deviceLocksToggleBtn i { font-size: .8rem; }
/* Device-lock chips (renderPrintDeviceLockToggles): this device = cyan,
   unclaimed = neutral, another device = amber — same three states as before */
#printDeviceLocksRow .print-device-lock-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 700;
  background: var(--card); border: 1px solid var(--line); color: var(--soft);
}
#printDeviceLocksRow .print-device-lock-toggle i { margin: 0 !important; }
#printDeviceLocksRow .print-device-lock-toggle:hover { color: var(--fg); border-color: var(--soft); transform: none; }
#printDeviceLocksRow .print-device-lock-toggle.btn-primary { color: var(--cyan); border-color: rgba(23,213,246,.55); background: rgba(23,213,246,.1); }
#printDeviceLocksRow .print-device-lock-toggle.btn-outline-warning { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 50%, transparent); background: color-mix(in srgb, var(--amber) 8%, transparent); }
#orderFiltersWrapper .form-select, #orderFiltersWrapper .form-control { font-size: .88rem; padding-top: 8px; padding-bottom: 8px; }

/* KOT View on live markup (renderFloorSection / renderTableCard / renderTakeawaySection) */
.om-floor-head.static { cursor: default; }
.om-floor-head .ic i { font-size: .95rem; }
.om-floor-head .chev i { font-size: .8rem; }
.om-floor-head.collapsed { border-bottom: 0; }
.om-floor-head.collapsed .chev { transform: rotate(180deg); }
#kotTablesContainer .om-floor + .om-floor { margin-top: 16px; }
.om-tile .kind i { font-size: .8rem; }
.om-tile .who { font-weight: 800; }
.om-tile .foot i { font-size: .72rem; color: var(--tc); }
.om-tile .foot.act span i { width: 14px; text-align: center; }
.om-tile .foot.act.gate i { color: #1c1400; }
.om-tile .foot.act:disabled { opacity: .6; cursor: progress; }
.om-tile.occupied { --tc: var(--st-served); }
.om-tile.table-highlight-blink { animation: om-blink 1s ease-in-out 3; }
/* Table pop-up order cards on live markup (createKOTOrderCard) */
#kotTableModal .om-act i, #kotTableModal .om-viewbtn i, #kotTableModal .om-printbtn i { font-size: .78rem; }
#kotTableModal .om-ocard .hd .meta { flex-basis: 100%; }
#kotTableModal .om-ocard .rider-assign-section, #kotTableModal .om-ocard .rider-display { margin: 8px 0; max-width: 420px; }
#kotTableModal .om-tactions h4 { color: var(--fg); }
#kotTableModal .om-tactions .hint i { color: var(--cyan); }
#kotPaidBanner { border-radius: 10px; }
/* Order history on live markup (buildOrderHistoryCardHTML / renderOrderHistory) */
body[data-status-palette="customer"] .om-history { margin-top: 28px; }
.om-history-head h2 i { color: var(--cyan); font-size: 1rem; }
.om-history-head #openPreviousHistoryBtn { margin-left: auto; }
.om-history-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.om-hfield { min-width: 180px; flex: 1 1 180px; max-width: 260px; }
.om-hfield .form-label { font-size: .76rem; margin-bottom: 4px; }
.om-hfield .form-select { font-size: .86rem; padding-top: 7px; padding-bottom: 7px; }
#historyPendingAmount { color: var(--amber); }
#historyPendingAmount:empty { display: none; }
#loadMoreContainer, #prevHistoryLoadMoreContainer { text-align: center; }
#loadMoreContainer small { display: block; margin-top: 6px; }
.om-hlist > .text-center { padding: 26px 0; color: var(--soft); }
.om-hlist .om-act i { font-size: .76rem; }
.om-pay.paid { --st-x: var(--st-ready); }
.om-pay.refunded { --st-x: var(--st-completed); }
.om-pay.refund-pending { --st-x: var(--st-served); }
.om-pay.refund-failed { --st-x: var(--pink); }
.ck-badge.om-pay { color: var(--st-x); background: color-mix(in srgb, var(--st-x) 14%, transparent); border-color: color-mix(in srgb, var(--st-x) 35%, transparent); }
#previousHistoryModal .om-ph-stats { margin-top: 8px; }
/* Read-only delivery payment strips keep their component markup; kit look */
.om-paystrip .delivery-payments-grid .qr-checkout-card { background: var(--card); border: 1px dashed var(--line); border-radius: 12px; }
body[data-status-palette="customer"] .om-hrow { grid-template-columns: minmax(0, 1.5fr) 64px minmax(0, 1.2fr) 110px 264px; }
body[data-status-palette="customer"] .om-hrow .acts { flex-wrap: nowrap; }
@media (max-width: 760px) {
  body[data-status-palette="customer"] .om-hrow { grid-template-columns: minmax(0, 1fr) auto; }
  body[data-status-palette="customer"] .om-hrow .acts { flex-wrap: wrap; }
}

/* Kitchen KOT on live markup (createKitchenKOTCard) — colours only; sizes,
   dense mode and the live elapsed timer keep their own page rules */
body[data-status-palette="customer"] .kitchen-kot-card {
  background: var(--card); border: 1px solid var(--line-soft); border-top: 3px solid var(--st-preparing);
  border-radius: 14px; color: var(--fg); box-shadow: none;
}
body[data-status-palette="customer"] .kitchen-kot-card .kitchen-kot-header { border-bottom: 1px dashed var(--line); }
body[data-status-palette="customer"] .kitchen-kot-card .table-heading,
body[data-status-palette="customer"] .kitchen-kot-card .item-name { color: var(--fg); }
body[data-status-palette="customer"] .kitchen-kot-card .order-number { color: var(--soft); }
body[data-status-palette="customer"] .kitchen-kot-card .order-time,
body[data-status-palette="customer"] .kitchen-kot-card .item-details { color: var(--soft); }
body[data-status-palette="customer"] .kitchen-kot-card .time-elapsed.elapsed-normal { color: var(--emerald); }
body[data-status-palette="customer"] .kitchen-kot-card .time-elapsed.elapsed-attention { color: var(--amber); }
body[data-status-palette="customer"] .kitchen-kot-card .time-elapsed.elapsed-urgent { color: var(--pink); }
body[data-status-palette="customer"] .kitchen-kot-card .item-list li { border-bottom-color: var(--line-soft); }
body[data-status-palette="customer"] .kitchen-kot-card .item-quantity { color: var(--cyan); }
body[data-status-palette="customer"] .kitchen-kot-card .kitchen-kot-special-instructions {
  background: color-mix(in srgb, var(--amber) 10%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  border-left: 4px solid var(--amber); border-radius: 10px;
}
body[data-status-palette="customer"] .kitchen-kot-card .kitchen-kot-special-instructions strong { color: var(--amber); }
body[data-status-palette="customer"] .kitchen-kot-card .kitchen-kot-special-instructions p { color: var(--fg); }
body[data-status-palette="customer"] .kitchen-kot-card .ready-button { background: var(--emerald); color: #04210f; border-radius: 11px; font-weight: 800; }
body[data-status-palette="customer"] .kitchen-kot-card .ready-button:hover { background: var(--emerald); filter: brightness(1.08); }
body[data-status-palette="customer"] .kitchen-empty-state { color: var(--soft); }

/* Status View on live markup */
body[data-status-palette="customer"] .om-col .body > .text-center { padding: 28px 0 !important; font-size: .82rem; color: var(--soft) !important; }
body[data-status-palette="customer"] .om-scard .hd .ic i { color: var(--cyan); font-size: .9rem; }
body[data-status-palette="customer"] .om-scard.delivery .dhead i { color: var(--pink); }
body[data-status-palette="customer"] .om-scard .who i, body[data-status-palette="customer"] .om-scard .addr i { color: var(--soft); font-size: .72rem; }
body[data-status-palette="customer"] .om-scard .rider-assign-section, body[data-status-palette="customer"] .om-scard .rider-display { width: 100%; }
body[data-status-palette="customer"] .om-scard .om-viewbtn i { font-size: .78rem; }
.om-pay.cod { --st-x: var(--soft); }
.om-pay.unpaid { --st-x: var(--pink); }
#loadMoreCompletedContainer { text-align: center; margin-top: 12px; }
#loadMoreCompletedContainer small { display: block; margin-top: 6px; color: var(--soft); }
.om-active-head h2 i { color: var(--amber); font-size: 1rem; }
.om-agroup h3 i { color: var(--cyan); font-size: .85rem; }
/* Tax/charge rules list on live markup (populateRulesList) */
#activeRulesList { display: flex; flex-direction: column; gap: 8px; }
#activeRulesList .om-rule .rule-type-badge { justify-self: start; text-align: center; min-width: 76px; }
#activeRulesList .om-rule .txt strong { color: var(--fg); }
#activeRulesList .om-iconbtn i { font-size: .8rem; }
body[data-status-palette="customer"] #kitchenKotContainer.row { margin-left: 0; margin-right: 0; }
/* Tabs scroll sideways on phones without showing a scrollbar strip */
body[data-status-palette="customer"] #ordersViewTabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
body[data-status-palette="customer"] #ordersViewTabs::-webkit-scrollbar { display: none; }
@media (max-width: 640px) {
  .om-greet .om-head-btns { width: 100%; }
  body[data-status-palette="customer"] #ordersViewTabs .nav-link { padding: 10px 12px; }
}
/* Order card in the table pop-up: status on its own top line; roomier details row */
#kotTableModal .om-ocard-status { margin-bottom: 8px; }
#kotTableModal .om-ocard .hd { align-items: baseline; gap: 12px; margin-bottom: 14px; }
#kotTableModal .om-ocard .hd b { font-size: 1.05rem; }
#kotTableModal .om-ocard .hd .meta { flex-basis: auto; font-size: .88rem; color: var(--soft); }
/* "+N more" items preview on the pop-up order card */
.om-itemsmore { position: relative; color: var(--cyan); font-weight: 700; cursor: help; border-bottom: 1px dotted currentColor; outline: none; }
.om-itemspop {
  display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 220px; max-width: 320px; padding: 8px 12px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0,0,0,.45);
  color: var(--fg); font-weight: 500; white-space: normal; cursor: default;
}
.om-itemspop ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .84rem; }
.om-itemspop li.more { color: var(--soft); }
.om-itemsmore:hover .om-itemspop, .om-itemsmore:focus .om-itemspop, .om-itemsmore:focus-within .om-itemspop { display: block; }
body[data-status-palette="customer"] .kitchen-kot-card { display: flex; flex-direction: column; }

/* Kitchen KOT auto-fit: renderKitchenKOT sets data-tier from the ticket count.
   Each tier narrows the tickets (more per row) and scales type + padding. */
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] {
  display: grid; gap: calc(14px * var(--kfs)); align-items: stretch;
  grid-template-columns: repeat(auto-fill, minmax(var(--kmin), 1fr));
}
body[data-status-palette="customer"] #kitchenKotContainer[data-tier="1"] { --kmin: 300px; --kfs: 1; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier="2"] { --kmin: 180px; --kfs: .88; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier="3"] { --kmin: 155px; --kfs: .78; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier="4"] { --kmin: 122px; --kfs: .68; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] > * { width: auto; max-width: none; flex: none; padding: 0; margin: 0; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .kitchen-kot-card { padding: calc(14px * var(--kfs)); border-radius: calc(14px * var(--kfs)); min-width: 0; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .kitchen-kot-header { padding-bottom: calc(8px * var(--kfs)); margin-bottom: calc(6px * var(--kfs)); }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .table-heading { font-size: calc(1.3rem * var(--kfs)); }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .order-number { font-size: calc(1.05rem * var(--kfs)); }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .order-time { font-size: calc(.78rem * var(--kfs)); margin-top: 0; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .time-elapsed { font-size: calc(1rem * var(--kfs)); margin-top: 0; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .item-list { margin-top: calc(4px * var(--kfs)); }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .item-list li { font-size: calc(1rem * var(--kfs)); padding: calc(6px * var(--kfs)) 0; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .item-quantity { font-size: calc(1.05rem * var(--kfs)); min-width: 0; margin-left: 6px; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .item-details { font-size: calc(.78rem * var(--kfs)); }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .kitchen-kot-special-instructions { font-size: calc(.85rem * var(--kfs)); padding: calc(8px * var(--kfs)) calc(10px * var(--kfs)); margin-top: calc(8px * var(--kfs)); }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .ready-button { font-size: calc(.95rem * var(--kfs)); padding: calc(10px * var(--kfs)) 6px; margin-top: auto; }
/* A ticket with many items inside a roomy tier still tightens its rows a little */
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .kitchen-kot-card.size-small .item-list li { font-size: calc(.92rem * var(--kfs)); padding: calc(4px * var(--kfs)) 0; }
@media (max-width: 640px) {
  body[data-status-palette="customer"] #kitchenKotContainer[data-tier="3"],
  body[data-status-palette="customer"] #kitchenKotContainer[data-tier="4"] { --kmin: 150px; }
}
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .kitchen-kot-special-instructions p,
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .kitchen-kot-special-instructions strong { font-size: calc(.85rem * var(--kfs)); }

/* ≤8 tickets (data-pack="grid"): even rows, Mark as Ready aligned at the bottom */
body[data-status-palette="customer"] #kitchenKotContainer[data-pack="grid"] { align-items: stretch; }
body[data-status-palette="customer"] #kitchenKotContainer[data-pack="grid"] .ready-button { margin-top: auto; }
/* >8 tickets (data-pack="masonry"): layoutKitchenTickets places each ticket */
body[data-status-palette="customer"] #kitchenKotContainer[data-pack="masonry"] { grid-auto-rows: 2px; row-gap: 0; align-items: start; }
body[data-status-palette="customer"] #kitchenKotContainer[data-pack="masonry"] .kitchen-kot-card { align-self: start; }
body[data-status-palette="customer"] #kitchenKotContainer[data-pack="masonry"] .ready-button { margin-top: calc(10px * var(--kfs)); }
/* Long orders: wider ticket, items in two (or three) columns */
body[data-status-palette="customer"] #kitchenKotContainer[data-pack="grid"] .kitchen-kot-card.kot-long { grid-column: span 2; }
body[data-status-palette="customer"] #kitchenKotContainer[data-pack="grid"] .kitchen-kot-card.kot-xlong { grid-column: span 3; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .kitchen-kot-card.kot-long .item-list { columns: 2; column-gap: calc(18px * var(--kfs)); }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .kitchen-kot-card.kot-xlong .item-list { columns: 3; }
body[data-status-palette="customer"] #kitchenKotContainer[data-tier] .kitchen-kot-card.kot-long .item-list li { break-inside: avoid; }
/* Order number(s) under the table number on KOT tiles */
.om-tile .ono { font-size: .8rem; font-weight: 700; color: var(--soft); margin-top: -4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Tile order-number line holds the "+N more" pop-list, so it can't clip */
.om-tile .ono { overflow: visible; white-space: normal; }
.om-tile .ono .om-itemspop { font-size: .82rem; }
/* Let tile pop-lists overlap the floor panel instead of being clipped */
#kotTablesContainer .om-floor { overflow: visible; }
#kotTablesContainer .om-floor-head { border-radius: 14px 14px 0 0; }
#kotTablesContainer .om-tile:hover, #kotTablesContainer .om-tile:focus-within { z-index: 5; }
.om-tile .ono .om-itemspop { left: auto; right: 0; }
/* Table pop-up: Table Actions stays pinned at the bottom while order cards scroll */
#kotTableModal .modal-body { padding-bottom: 0 !important; }
#kotTableModal .om-tactions {
  position: sticky; bottom: 0; z-index: 2;
  background: var(--card-2); margin: 16px -16px 0; padding: 14px 16px 16px;
  box-shadow: 0 -10px 18px rgba(0,0,0,.35);
}
/* Settings pop-up on live markup */
#settingsModal .om-set-narrow { max-width: 280px; }
#settingsModal .om-set-toggle b { color: var(--fg); font-weight: 600; }
#settingsModal .om-act i { font-size: .8rem; }
#taxChargeConfigModal .om-rules-title { display: flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 800; color: var(--cyan); margin-bottom: 10px; }
#activeRulesList .rule-item { margin-bottom: 0; }
/* Rule form: order-type chips (Bootstrap btn-check) — one calm style, cyan when on */
#taxChargeConfigModal .om-typechip {
  border: 1px solid var(--line); background: var(--input-bg); color: var(--soft);
  border-radius: var(--r-pill); font-weight: 700; padding: 6px 14px;
}
#taxChargeConfigModal .om-typechip:hover { color: var(--fg); border-color: var(--soft); }
#taxChargeConfigModal .btn-check:checked + .om-typechip {
  color: var(--cyan); border-color: rgba(23,213,246,.6); background: rgba(23,213,246,.12);
}
#taxChargeConfigModal .btn-check:focus-visible + .om-typechip { box-shadow: 0 0 0 3px rgba(23,213,246,.2); }
#taxChargeConfigModal .card-header h6 { color: var(--cyan); font-weight: 800; }

/* ── 29. Menu management — styles moved out of the page and its JS ── */
/* Wrong-PIN shake (menu-management.html sets style.animation = 'shake …') */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
body[data-surface="ops"] #pinInput:focus { border-color: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 25%, transparent); }
.mm-preview-img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; }
.mm-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.mm-thumb-ph { width: 40px; height: 40px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--input-bg); }
.mm-typebadge.veg { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 15%, transparent); }
.mm-typebadge.nonveg { color: var(--pink); background: color-mix(in srgb, var(--pink) 15%, transparent); }
.mm-typebadge i { font-size: 8px; }
.mm-migrate-overlay {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg, #121820) 80%, transparent); backdrop-filter: blur(5px);
}
.mm-migrate-card { background: var(--card-2); border: 1px solid var(--line); padding: 40px; border-radius: 14px; text-align: center; max-width: 500px; box-shadow: var(--shadow-2); color: var(--fg); }
.mm-migrate-spin { width: 3rem; height: 3rem; color: var(--cyan); }

/* ── 30. Bootstrap colour slots → theme colours (all ops pages) ───── */
/* Tables: Bootstrap 5.3 colours cells via --bs-table-* (was set by design-system.css) */
body[data-surface="ops"] .table {
  --bs-table-color: var(--fg); --bs-table-bg: transparent; --bs-table-border-color: var(--line-soft);
  --bs-table-striped-color: var(--fg); --bs-table-striped-bg: color-mix(in srgb, var(--fg) 3%, transparent);
  --bs-table-hover-color: var(--fg); --bs-table-hover-bg: color-mix(in srgb, var(--fg) 5%, transparent);
  --bs-table-active-color: var(--fg); --bs-table-active-bg: color-mix(in srgb, var(--fg) 6%, transparent);
}
/* Bootstrap utilities (text-*, bg-*, border-*) and alerts read these, so
   their colour now comes from this file. RGB triplets mirror the tokens
   above (--cyan, --emerald, --amber, --pink, --blue, --soft). */
body[data-surface="ops"] {
  --bs-primary: #17D5F6;   --bs-primary-rgb: 23, 213, 246;
  --bs-success: #05E095;   --bs-success-rgb: 5, 224, 149;
  --bs-warning: #F9BB2F;   --bs-warning-rgb: 249, 187, 47;
  --bs-danger: #F44C76;    --bs-danger-rgb: 244, 76, 118;
  --bs-info: #42AAFA;      --bs-info-rgb: 66, 170, 250;
  --bs-secondary: #94a3b8; --bs-secondary-rgb: 148, 163, 184;
  --bs-link-color: var(--cyan); --bs-link-color-rgb: 23, 213, 246; --bs-link-hover-color: var(--fg);
  /* Muted text (.form-text help lines, .text-body-secondary) — was Bootstrap's dark grey, unreadable on the dark surface */
  --bs-secondary-color: var(--soft); --bs-tertiary-color: var(--faint);
  --bs-border-color: var(--line); --bs-border-color-translucent: rgba(42,58,78,.6);
  --bs-primary-text-emphasis: #7FE6FA;   --bs-primary-bg-subtle: rgba(23,213,246,.12);   --bs-primary-border-subtle: rgba(23,213,246,.4);
  --bs-success-text-emphasis: #6FF0C2;   --bs-success-bg-subtle: rgba(5,224,149,.12);    --bs-success-border-subtle: rgba(5,224,149,.4);
  --bs-warning-text-emphasis: #F9BB2F;   --bs-warning-bg-subtle: rgba(249,187,47,.1);    --bs-warning-border-subtle: rgba(249,187,47,.35);
  --bs-danger-text-emphasis: #F88BA6;    --bs-danger-bg-subtle: rgba(244,76,118,.12);    --bs-danger-border-subtle: rgba(244,76,118,.4);
  --bs-info-text-emphasis: #8ECBFC;      --bs-info-bg-subtle: rgba(66,170,250,.12);      --bs-info-border-subtle: rgba(66,170,250,.4);
  --bs-secondary-text-emphasis: var(--soft); --bs-secondary-bg-subtle: rgba(148,163,184,.1); --bs-secondary-border-subtle: rgba(148,163,184,.3);
}
/* Buttons carry their own Bootstrap literals — remap per variant */
body[data-surface="ops"] .btn-success { --bs-btn-bg: var(--emerald); --bs-btn-border-color: var(--emerald); --bs-btn-color: #04210f; --bs-btn-hover-bg: #04c785; --bs-btn-hover-border-color: #04c785; --bs-btn-hover-color: #04210f; --bs-btn-active-bg: #04b378; --bs-btn-active-border-color: #04b378; --bs-btn-active-color: #04210f; --bs-btn-disabled-bg: var(--emerald); --bs-btn-disabled-border-color: var(--emerald); --bs-btn-disabled-color: #04210f; }
body[data-surface="ops"] .btn-danger { --bs-btn-bg: var(--pink); --bs-btn-border-color: var(--pink); --bs-btn-color: #fff; --bs-btn-hover-bg: #e23d67; --bs-btn-hover-border-color: #e23d67; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #cf3459; --bs-btn-active-border-color: #cf3459; --bs-btn-disabled-bg: var(--pink); --bs-btn-disabled-border-color: var(--pink); }
body[data-surface="ops"] .btn-warning { --bs-btn-bg: var(--amber); --bs-btn-border-color: var(--amber); --bs-btn-color: #1c1400; --bs-btn-hover-bg: #f0ad18; --bs-btn-hover-border-color: #f0ad18; --bs-btn-hover-color: #1c1400; --bs-btn-active-bg: #e0a010; --bs-btn-active-border-color: #e0a010; --bs-btn-disabled-bg: var(--amber); --bs-btn-disabled-border-color: var(--amber); --bs-btn-disabled-color: #1c1400; }
body[data-surface="ops"] .btn-info { --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-color: #04253C; --bs-btn-hover-bg: #2f9cf3; --bs-btn-hover-border-color: #2f9cf3; --bs-btn-hover-color: #04253C; }
body[data-surface="ops"] .btn-outline-danger { --bs-btn-color: var(--pink); --bs-btn-border-color: color-mix(in srgb, var(--pink) 60%, transparent); --bs-btn-hover-bg: var(--pink); --bs-btn-hover-border-color: var(--pink); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--pink); --bs-btn-active-border-color: var(--pink); --bs-btn-disabled-color: var(--pink); --bs-btn-disabled-border-color: color-mix(in srgb, var(--pink) 40%, transparent); }
body[data-surface="ops"] .btn-outline-success { --bs-btn-color: var(--emerald); --bs-btn-border-color: color-mix(in srgb, var(--emerald) 60%, transparent); --bs-btn-hover-bg: var(--emerald); --bs-btn-hover-border-color: var(--emerald); --bs-btn-hover-color: #04210f; --bs-btn-active-bg: var(--emerald); --bs-btn-active-border-color: var(--emerald); }
body[data-surface="ops"] .btn-outline-warning { --bs-btn-color: var(--amber); --bs-btn-border-color: color-mix(in srgb, var(--amber) 60%, transparent); --bs-btn-hover-bg: var(--amber); --bs-btn-hover-border-color: var(--amber); --bs-btn-hover-color: #1c1400; --bs-btn-active-bg: var(--amber); --bs-btn-active-border-color: var(--amber); }
body[data-surface="ops"] .btn-outline-info { --bs-btn-color: var(--blue); --bs-btn-border-color: color-mix(in srgb, var(--blue) 60%, transparent); --bs-btn-hover-bg: var(--blue); --bs-btn-hover-border-color: var(--blue); --bs-btn-hover-color: #04253C; --bs-btn-active-bg: var(--blue); --bs-btn-active-border-color: var(--blue); }
body[data-surface="ops"] .btn-outline-primary { --bs-btn-color: var(--cyan); --bs-btn-border-color: color-mix(in srgb, var(--cyan) 55%, transparent); --bs-btn-hover-bg: rgba(23,213,246,.12); --bs-btn-hover-border-color: var(--cyan); --bs-btn-hover-color: var(--cyan); --bs-btn-active-bg: rgba(23,213,246,.18); --bs-btn-active-border-color: var(--cyan); --bs-btn-active-color: var(--cyan); }
body[data-surface="ops"] .btn-outline-secondary { --bs-btn-color: var(--soft); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--input-bg); --bs-btn-hover-border-color: var(--soft); --bs-btn-hover-color: var(--fg); --bs-btn-active-bg: var(--input-bg); --bs-btn-active-border-color: var(--soft); --bs-btn-active-color: var(--fg); }
body[data-surface="ops"] .btn-secondary { --bs-btn-bg: var(--input-bg); --bs-btn-border-color: var(--line); --bs-btn-color: var(--fg); --bs-btn-hover-bg: var(--line); --bs-btn-hover-border-color: var(--soft); --bs-btn-hover-color: var(--fg); --bs-btn-active-bg: var(--line); --bs-btn-active-border-color: var(--soft); --bs-btn-active-color: var(--fg); }
body[data-surface="ops"] .btn-link { --bs-btn-color: var(--cyan); --bs-btn-hover-color: var(--fg); }
body[data-surface="ops"] .bg-light { background-color: var(--input-bg) !important; color: var(--fg); }
body[data-surface="ops"] .bg-dark { background-color: var(--bg, #121820) !important; }
body[data-surface="ops"] .text-dark { color: #1c1400 !important; }

/* ── 31. Order management — rules moved from orders.html's <style> block ──
   Scoped with :where(), which adds no specificity, and kept last in the
   file like the page block was, so the cascade is unchanged. Old
   design-system variables were swapped for theme tokens. */
:where(body[data-status-palette="customer"]) .order-items { max-height: 150px; overflow-y: auto; padding: 0.5rem; background: var(--input-bg); border-radius: 0.25rem; margin: 0.5rem 0; }
:where(body[data-status-palette="customer"]) #orderNotifications { position: fixed; top: 20px; right: 20px; z-index: 1050; }
:where(body[data-status-palette="customer"]) .modal { pointer-events: none; }
:where(body[data-status-palette="customer"]) .modal.show { pointer-events: auto; }
:where(body[data-status-palette="customer"]) .modal-dialog { margin: 1.75rem auto; pointer-events: auto; }
:where(body[data-status-palette="customer"]) .modal-content { pointer-events: auto; }
:where(body[data-status-palette="customer"]) .modal-backdrop.show { opacity: 0.5; }
:where(body[data-status-palette="customer"]) .modal-content { pointer-events: auto !important; position: relative !important; display: flex !important; flex-direction: column !important; background-color: var(--card-2) !important; border: 1px solid var(--line) !important; border-radius: 0.3rem !important; outline: 0 !important; width: 100% !important; }
:where(body[data-status-palette="customer"]) .modal-body { position: relative !important; flex: 1 1 auto !important; padding: 1rem !important; }
:where(body[data-status-palette="customer"]) .notification { animation: slideIn 0.5s ease-out; }
@keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
:where(body[data-status-palette="customer"]) #activeRulesList .rule-item { background: var(--card); border: 1px solid var(--line-soft); border-radius: 0.375rem; padding: 1rem; margin-bottom: 0.75rem; transition: all 0.2s; }
:where(body[data-status-palette="customer"]) #activeRulesList .rule-item:hover { box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075); }
:where(body[data-status-palette="customer"]) .rule-type-badge { font-size: 0.75rem; padding: 0.25rem 0.5rem; border-radius: 0.25rem; }
:where(body[data-status-palette="customer"]) .rule-type-tax { background-color: var(--cyan); color: var(--bg); }
:where(body[data-status-palette="customer"]) .rule-type-charge { background-color: var(--emerald); color: var(--bg); }
:where(body[data-status-palette="customer"]) .rule-type-discount { background-color: var(--amber); color: var(--ink); }
:where(body[data-status-palette="customer"]) #selectedItemsList .selected-item,
:where(body[data-status-palette="customer"]) #selectedCategoriesList .selected-category,
:where(body[data-status-palette="customer"]) #previousChargesList .previous-charge { display: inline-block; background: var(--cyan); color: var(--bg); padding: 0.375rem 0.75rem; border-radius: 0.25rem; margin: 0.25rem; font-size: 0.875rem; }
:where(body[data-status-palette="customer"]) #selectedItemsList .selected-item .remove-btn,
:where(body[data-status-palette="customer"]) #selectedCategoriesList .selected-category .remove-btn { margin-left: 0.5rem; cursor: pointer; opacity: 0.8; }
:where(body[data-status-palette="customer"]) #selectedItemsList .selected-item .remove-btn:hover,
:where(body[data-status-palette="customer"]) #selectedCategoriesList .selected-category .remove-btn:hover { opacity: 1; }
:where(body[data-status-palette="customer"]) #calculationPreview { border-left: 4px solid var(--cyan); }
:where(body[data-status-palette="customer"]) #previewContent { font-family: 'Courier New', monospace; font-size: 0.875rem; z-index: 9999; }
:where(body[data-status-palette="customer"]) .split-method-card { border: 2px solid transparent; cursor: pointer; transition: all 0.2s; }
:where(body[data-status-palette="customer"]) .split-method-card:hover { border-color: var(--cyan); }
:where(body[data-status-palette="customer"]) .split-method-card.active { border-color: var(--cyan); background-color: rgba(23,213,246,.1); }
:where(body[data-status-palette="customer"]) .split-part-row { background: var(--card); padding: 0.75rem; border-radius: 0.375rem; margin-bottom: 0.5rem; }
:where(body[data-status-palette="customer"]) .payment-history-table { font-size: 0.875rem; }
:where(body[data-status-palette="customer"]) .payment-history-table th { background: var(--card); font-weight: 600; }
:where(body[data-status-palette="customer"]) .payment-balance { font-size: 1.25rem; font-weight: bold; color: var(--cyan); }
:where(body[data-status-palette="customer"]) #kitchenKotContainer { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; grid-auto-rows: minmax(auto, 1fr); }
:where(body[data-status-palette="customer"]) #kitchenKotContainer[data-card-count="1"] { grid-template-columns: minmax(300px, 500px); }
:where(body[data-status-palette="customer"]) #kitchenKotContainer[data-card-count="2"] { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
:where(body[data-status-palette="customer"]) #kitchenKotContainer[data-card-count="3"],
:where(body[data-status-palette="customer"]) #kitchenKotContainer[data-card-count="4"] { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (min-width: 1400px) {
  :where(body[data-status-palette="customer"]) #kitchenKotContainer {
                grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            }
}
@media (min-width: 1800px) {
  :where(body[data-status-palette="customer"]) #kitchenKotContainer {
                grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            }
}
:where(body[data-status-palette="customer"]) .kitchen-kot-card { background: var(--card); border-radius: 6px; border: 2px solid var(--line); padding: 1rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.6rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .kitchen-kot-card { padding: 0.55rem 0.65rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .kitchen-kot-header { margin-bottom: 0.35rem; padding-bottom: 0.35rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .table-heading { font-size: 1.15rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .order-number { font-size: 1rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .order-time { font-size: 0.7rem; margin-top: 0.1rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .time-elapsed { font-size: 0.85rem; margin-top: 0.1rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .item-list { margin-top: 0.35rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .item-list li { font-size: 0.9rem; padding: 0.25rem 0; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .item-quantity { font-size: 0.95rem; margin-left: 0.5rem; min-width: 2rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .item-details { font-size: 0.75rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .ready-button { padding: 0.4rem 0.5rem; font-size: 0.85rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer.kot-dense .kitchen-kot-special-instructions { font-size: 0.8rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card.size-small .table-heading { font-size: 1.8rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card.size-small .order-number { font-size: 1.4rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card.size-small .item-list li { font-size: 1rem; padding: 0.4rem 0; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card.size-small .item-quantity { font-size: 1.2rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card.size-small .item-details { font-size: 0.85rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card.size-large .table-heading { font-size: 2.2rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card.size-large .order-number { font-size: 1.8rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card.size-large .item-list li { font-size: 1.2rem; padding: 0.6rem 0; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card.size-large .item-quantity { font-size: 1.4rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card.size-large .item-details { font-size: 0.95rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--blue); }
:where(body[data-status-palette="customer"]) .kitchen-kot-header .header-left { flex: 1; }
:where(body[data-status-palette="customer"]) .kitchen-kot-header .header-right { flex: 1; text-align: right; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .table-heading { font-size: 2rem; font-weight: bold; color: var(--fg); margin: 0; line-height: 1; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .order-number { font-size: 1.6rem; font-weight: bold; color: var(--blue); margin: 0; line-height: 1; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .order-time { font-size: 0.95rem; color: var(--soft); margin-top: 0.3rem; margin-bottom: 0; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .time-elapsed { font-size: 1.2rem; font-weight: bold; margin-top: 0.3rem; margin-bottom: 0; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .time-elapsed.elapsed-normal { color: var(--emerald); }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .time-elapsed.elapsed-attention { color: var(--amber); }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .time-elapsed.elapsed-urgent { color: var(--pink); }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .item-list { list-style: none; padding: 0; margin: 1rem 0 0 0; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .item-list li { font-size: 1.1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: flex-start; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .item-list li:last-child { border-bottom: none; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .item-name { font-weight: 600; color: var(--fg); flex: 1; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .item-quantity { font-size: 1.3rem; font-weight: bold; color: var(--pink); margin-left: 1rem; min-width: 2.5rem; text-align: right; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .item-details { font-size: 0.9rem; color: var(--soft); font-style: italic; display: block; margin-top: 0.2rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .kitchen-kot-special-instructions { margin-top: 1rem; padding: 0.6rem 0.75rem; background: color-mix(in srgb, var(--amber) 12%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); border-left: 4px solid var(--amber); border-radius: 4px; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .kitchen-kot-special-instructions strong { display: block; font-size: 0.85rem; color: var(--amber); margin-bottom: 0.2rem; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .kitchen-kot-special-instructions p { margin: 0; font-size: 1rem; color: var(--fg); word-wrap: break-word; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .ready-button { width: 100%; padding: 0.75rem; font-size: 1.1rem; font-weight: bold; margin-top: 1rem; background: var(--emerald); border: none; color: var(--card); border-radius: 6px; transition: all 0.2s; }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .ready-button:hover { background: var(--emerald); transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .ready-button:active { transform: translateY(0); }
:where(body[data-status-palette="customer"]) .kitchen-kot-card .ready-button:disabled { background: var(--soft); cursor: not-allowed; transform: none; }
:where(body[data-status-palette="customer"]) .kitchen-empty-state { text-align: center; padding: 4rem 2rem; color: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; }
:where(body[data-status-palette="customer"]) .kitchen-empty-state i { font-size: 4rem; margin-bottom: 1rem; color: var(--faint); }
:where(body[data-status-palette="customer"]) .kitchen-empty-state h4 { color: var(--fg); margin-bottom: 0.5rem; }
:where(body[data-status-palette="customer"]) #kitchenKotContainer:has(.kitchen-empty-state) { display: flex; justify-content: center; align-items: center; min-height: 400px; }
@media (max-width: 767px) {
  :where(body[data-status-palette="customer"]) .kitchen-kot-card .table-heading {
                font-size: 2rem;
            }
  :where(body[data-status-palette="customer"]) .kitchen-kot-card .order-number {
                font-size: 1.5rem;
            }
  :where(body[data-status-palette="customer"]) .kitchen-kot-card .item-list li {
                font-size: 1.1rem;
            }
  :where(body[data-status-palette="customer"]) .kitchen-kot-card .item-quantity {
                font-size: 1.3rem;
            }
}
@media (max-width: 576px) {
  :where(body[data-status-palette="customer"]) #orderDetailsModal .table th,
:where(body[data-status-palette="customer"]) #orderDetailsModal .table td {
                padding: 0.35rem 0.4rem;
                font-size: 0.8rem;
            }
  :where(body[data-status-palette="customer"]) #orderDetailsModal .table td[style*="min-width"] {
                min-width: 0 !important;
            }
}
:where(body[data-status-palette="customer"]) .collapsible-panel { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.25s ease, opacity 0.2s ease; }
:where(body[data-status-palette="customer"]) .collapsible-panel.expanded { max-height: 300px; opacity: 1; }
:where(body[data-status-palette="customer"]) .filters-toggle-btn.locked-open { cursor: default; }
:where(body[data-status-palette="customer"]) .filters-toggle-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
:where(body[data-status-palette="customer"]) .delivery-payments-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:0.75rem; }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .qr-checkout-card { background:var(--card-2); border:1px solid var(--line); border-radius:12px; padding:1rem; }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .status-badge { display:inline-block; padding:0.2rem 0.55rem; border-radius:999px; font-size:0.75rem; font-weight:600; white-space:nowrap; }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .status-badge.verifying { background:var(--blue); color:var(--ink); }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .status-badge.refund_processing { background:var(--amber); color:var(--ink); }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .status-badge.refund_initiated { background:var(--cyan); color:var(--ink); }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .status-badge.refunded { background:var(--emerald); color:var(--ink); }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .status-badge.needs_attention { background:var(--pink); color:var(--card); }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .status-badge.under_review { background:var(--soft); color:var(--ink); }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .status-badge.payment_failed { background:var(--pink); color:var(--card); }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .order-items { border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin:0.5rem 0; padding:0.3rem 0; }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .order-item { display:flex; gap:0.5rem; font-size:0.85rem; padding:0.15rem 0; }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .item-details { flex:1; }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .order-total { display:flex; justify-content:space-between; font-weight:600; }
:where(body[data-status-palette="customer"]) .delivery-payments-grid .qr-checkout-status-text { font-size:0.85rem; }

/* Small classes that replaced inline colours in orders.html / orders.js */
:where(body[data-status-palette="customer"]) .om-panel { background: var(--card); border-radius: 0.375rem; }
:where(body[data-status-palette="customer"]) .om-inset { background: var(--input-bg); border-color: var(--line) !important; }
/* Bootstrap paints :disabled inputs light grey; keep them readable on dark */
:where(body[data-status-palette="customer"]) .om-disabled-input,
:where(body[data-status-palette="customer"]) .om-disabled-input:disabled { background-color: var(--input-bg); color: var(--soft); opacity: 1; border-color: var(--line); }
:where(body[data-status-palette="customer"]) .om-editrow { border-bottom: 1px solid var(--line-soft); }
:where(body[data-status-palette="customer"]) .om-editrow.wrap { flex-wrap: wrap; gap: 0.5rem; }
:where(body[data-status-palette="customer"]) .om-editrow.alt { background: color-mix(in srgb, var(--fg) 3%, transparent); }

/* Track Rider map: Google Maps needs literal colours, so orders.js reads
   them from these tokens (like the dashboard chart's --chart-*). */
body[data-surface="ops"] {
  --map-geometry: #2e2e2e; --map-label: #8a8a8a; --map-admin: #808080; --map-country: #a8a8a8;
  --map-locality: #c2c2c2; --map-road: #3d3d3d; --map-road-label: #989898; --map-arterial: #484848;
  --map-highway: #4e4e4e; --map-controlled: #5c5c5c; --map-local-label: #717171;
  --map-water: #1c2d42; --map-water-label: #4d4d4d;
}

/* ── 32. Live Orders (Create New Order) — POS layout ───────────────────
   Desktop (≥992px): categories | menu tiles | order panel, filling the
   screen height; each column scrolls on its own. The page opts into the
   auto-hide sidebar (body[data-nav="autohide"], see js/components/ck-shell.js).
   Phone: order card on top, "View Order" strip, sticky category chips,
   2-column tiles; the order replaces the menu in the page (body.cart-open). */
/* Auto-hide sidebar (body[data-nav="autohide"]) — desktop only; phones keep the drawer */
.ck-navedge { display: none; }
.ck-navbtn { display: none; }
@media (min-width: 881px) {
  body[data-nav="autohide"] .ck-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 130; height: 100vh;
    transform: translateX(-105%); transition: transform .22s ease, box-shadow 250ms ease;
    box-shadow: 0 0 40px rgba(0,0,0,.55);
  }
  body[data-nav="autohide"].ck-nav-peek .ck-sidebar,
  body[data-nav="autohide"].ck-nav-open .ck-sidebar { transform: none; }
  body[data-nav="autohide"].ck-nav-open .ck-scrim { opacity: 1; pointer-events: auto; }
  body[data-nav="autohide"] .ck-navedge { display: block; position: fixed; top: 0; left: 0; bottom: 0; width: 10px; z-index: 125; }
  body[data-nav="autohide"] .ck-navbtn {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--line); background: var(--card); color: var(--fg);
  }
  body[data-nav="autohide"] .ck-navbtn:hover { border-color: var(--cyan); color: var(--accent-text); }
  body[data-nav="autohide"] .ck-navbtn svg { width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce) { body[data-nav="autohide"] .ck-sidebar { transition: none; } }

.pos-page { display: flex; flex-direction: column; gap: 12px; padding-top: 14px !important; padding-bottom: 14px !important; }
.pos-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pos-head h1 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.pos-head .spacer { flex: 1; }

.pos {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) 320px; gap: 12px;
  height: calc(100vh - 82px); min-height: 440px;
}
.pos > * { min-height: 0; }

/* Categories column */
.pos-cats { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; padding: 8px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); }
.pos-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 10px 10px; border-radius: 9px; border: 0; background: transparent; cursor: pointer;
  color: var(--soft); font: inherit; font-size: .84rem; font-weight: 600; text-align: left;
}
.pos-cat span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pos-cat span svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--amber); }
.pos-cat small { font-size: .7rem; font-weight: 700; color: var(--faint); }
.pos-cat.sub { padding-left: 22px; font-size: .8rem; }
.pos-cat:hover { color: var(--fg); background: var(--card-hover); }
.pos-cat.on { color: var(--ink); background: var(--cyan); }
.pos-cat.on small, .pos-cat.on span svg { color: var(--ink); }
.pos-cats-pin { display: flex; flex-direction: column; gap: 2px; position: sticky; top: -8px; z-index: 2; margin: -8px -8px 4px; padding: 8px 8px 6px; background: var(--card); border-bottom: 1px solid var(--line-soft); }
.pos-chev { font-style: normal; display: inline-block; width: 10px; font-size: .95rem; line-height: 1; color: var(--faint); transition: transform .15s ease; }
.pos-chev.open { transform: rotate(90deg); }
.pos-cat.on .pos-chev { color: var(--ink); }
.pos-cat.sub { position: relative; }
.pos-cat.sub::before { content: ""; position: absolute; left: 14px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--line); }
.pos-crumb { color: var(--faint); font-weight: 600; margin-right: 2px; }
.pos-sechead small { font-size: .68rem; font-weight: 700; color: var(--faint); margin-left: 2px; }
.pos-results { font-size: .78rem; color: var(--soft); margin-top: 10px; }
.pos-noresult { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 40px 0; color: var(--soft); text-align: center; }
.pos-noresult svg { width: 30px; height: 30px; color: var(--faint); margin-bottom: 6px; }
.pos-noresult b { color: var(--fg); }
.pos-noresult span { font-size: .82rem; }

/* Menu column */
.pos-menu { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); overflow: hidden; }
.pos-tools { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.lo-search { position: relative; flex: 1; min-width: 0; }
.lo-search > svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.lo-search .ck-input { width: 100%; padding: 8px 32px 8px 36px; border-radius: var(--r-pill); }
.lo-clear { position: absolute; right: 7px; top: 50%; translate: 0 -50%; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--line); color: var(--fg); cursor: pointer; font-size: .95rem; line-height: 1; }
.lo-veg { white-space: nowrap; font-size: .8rem; }
.lo-vegdot { width: 12px; height: 12px; border: 1.5px solid var(--emerald); border-radius: 3px; position: relative; }
.lo-vegdot::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--emerald); }
.pos-custom { padding: 8px 12px; }
.pos-custom svg { width: 14px; height: 14px; }
.pos-grid-wrap { flex: 1; overflow-y: auto; padding: 4px 12px 14px; }
.pos-sechead { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 800; color: var(--soft); margin: 12px 0 8px; }
.pos-sechead svg { width: 13px; height: 13px; color: var(--amber); }
.pos-sechead.sub { padding-left: 10px; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
/* Menu tile surface: neutral slate grey lifted off the navy panel (owner-approved). */
.pos { --tile-bg: color-mix(in srgb, var(--fg) 7%, var(--card)); --tile-line: color-mix(in srgb, var(--fg) 10%, transparent); --tile-hover: color-mix(in srgb, var(--fg) 11%, var(--card)); }
.pos-tile:hover { background: var(--tile-hover); }
.pos-tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  min-height: 78px; padding: 10px; border-radius: 11px; text-align: left; cursor: pointer;
  background: var(--tile-bg); border: 1px solid var(--tile-line); color: var(--fg); font: inherit;
  transition: border-color var(--transition), background var(--transition), transform 80ms ease;
}
.pos-tile:hover { border-color: var(--cyan); }
.pos-tile:active { transform: scale(.97); }
.pos-tile.in { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 12%, var(--tile-bg)); }
.pos-tname { display: flex; gap: 6px; align-items: flex-start; font-size: .82rem; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pos-tname .lo-dot { display: inline-block; margin: 1px 6px 0 0; vertical-align: -2px; }
.pos-tparts { font-size: .7rem; color: var(--soft); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pos-tfoot { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.pos-tfoot b { font-size: .84rem; font-weight: 800; }
.pos-tfoot s { font-size: .7rem; color: var(--faint); }
.pos-tfoot em { font-style: normal; font-size: .66rem; font-weight: 700; color: var(--accent-text); border: 1px solid color-mix(in srgb, var(--cyan) 45%, transparent); border-radius: var(--r-pill); padding: 1px 7px; }
.pos-tile.deal { border-style: dashed; border-color: color-mix(in srgb, var(--amber) 55%, transparent); }
.pos-tile.deal.in { border-style: solid; border-color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, var(--tile-bg)); }
.pos-q { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); background: var(--cyan); color: var(--ink); font-size: .74rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--card); }
.lo-dot { flex-shrink: 0; width: 13px; height: 13px; border: 1.5px solid; border-radius: 3px; position: relative; }
.lo-dot::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: currentColor; }
.lo-dot.veg { color: var(--emerald); }
.lo-dot.nonveg { color: var(--pink); }
.lo-dealtag { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 18px; height: 18px; margin-right: 6px; vertical-align: -4px; border-radius: 5px; color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, transparent); }
.lo-dealtag svg { width: 11px; height: 11px; }
.lo-dealtag.sm { width: 16px; height: 16px; }
.lo-empty { text-align: center; color: var(--soft); font-size: .84rem; padding: 28px 0; }

.pos-menu.locked .pos-tools, .pos-menu.locked .pos-grid-wrap { filter: blur(2px); opacity: .3; pointer-events: none; user-select: none; }
.lo-locked { display: none; }
.pos-menu.locked .lo-locked { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; padding: 90px 20px 20px; text-align: center; }
.lo-locked > div { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 280px; }
.lo-locked svg { width: 26px; height: 26px; color: var(--cyan); }
.lo-locked b { font-size: 1rem; }
.lo-locked span { font-size: .82rem; color: var(--soft); }

/* Order panel (ticket) */
.pos-ticket { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); overflow: hidden; }
.pos-setup { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.pos-types { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; gap: 3px; border-radius: 11px; background: var(--bg-raise); }
.pos-type { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 4px; border-radius: 8px; border: 0; background: transparent; color: var(--soft); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.pos-type:hover { color: var(--fg); }
.pos-type.active { background: var(--cyan); color: var(--ink); }
.pos-type:disabled { opacity: .4; cursor: not-allowed; }
.pos-type:disabled:hover { color: var(--soft); }
.lo-type-count { font-size: .66rem; font-weight: 800; padding: 0 6px; border-radius: var(--r-pill); background: var(--line); color: var(--fg); }
.pos-type.active .lo-type-count { background: color-mix(in srgb, var(--ink) 18%, transparent); color: var(--ink); }
.pos-details { display: flex; flex-direction: column; gap: 6px; }
.lo-dlabel { font-size: .74rem; font-weight: 600; color: var(--soft); }
.pos-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; max-height: 96px; overflow-y: auto; }
.lo-tchip { height: 36px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-raise); color: var(--fg); font: inherit; font-size: .95rem; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.lo-tchip small { font-size: .66rem; font-weight: 600; color: var(--soft); }
.lo-tchip:hover { border-color: var(--cyan); }
.lo-tchip.on { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }
.pos-chosen { display: flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 700; }
.pos-chosen > span:nth-child(2) { flex: 1; min-width: 0; }
.pos-occ { font-size: .7rem; font-weight: 700; color: var(--amber); }
.pos-tbadge { min-width: 30px; height: 30px; padding: 0 12px; white-space: nowrap; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 1rem; background: var(--cyan); color: var(--ink); }
.pos-change { border: 1px solid var(--line); background: transparent; color: var(--soft); font: inherit; font-size: .76rem; font-weight: 700; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.pos-change:hover { color: var(--fg); border-color: var(--soft); }
.pos-custlink { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; max-width: 100%; border: 0; background: transparent; padding: 2px 0; font: inherit; font-size: .76rem; font-weight: 700; color: var(--accent-text); cursor: pointer; }
.pos-custlink:hover .pos-custedit, .pos-custlink:hover { text-decoration: underline; }
.pos-custchip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-custchip svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--soft); }
.pos-custedit { color: var(--accent-text); }
.pos-custbox { padding: 8px; gap: 6px; }
.pos-custbox .ck-input { padding: 6px 10px; font-size: .8rem; }
.pos-cust { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pos-cust .ck-input { padding: 6px 10px; font-size: .8rem; min-width: 0; }
.lo-dnote { font-size: .74rem; color: var(--soft); }
.lo-dnote:empty { display: none; }
.lo-dnote.err { color: var(--pink); }

.pos-lines-head { display: flex; align-items: center; gap: 4px; padding: 6px 10px 0; font-size: .76rem; font-weight: 700; color: var(--soft); }
.pos-note { border: 0; background: transparent; color: var(--accent-text); font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; padding: 3px 6px; border-radius: 6px; }
.pos-note:hover { background: color-mix(in srgb, var(--cyan) 12%, transparent); }
.pos-lines-head > span { flex: 1; }
.pos-back { display: none; }
.pos-clear { border: 0; background: transparent; color: var(--pink); font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.pos-clear:hover { background: color-mix(in srgb, var(--pink) 12%, transparent); }
.pos-lines { flex: 1; overflow-y: auto; padding: 2px 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.pos-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; align-items: center; gap: 6px; padding: 5px 6px; margin: 0 -6px; border-radius: 8px; border-bottom: 1px dashed var(--line-soft); }
.pos-line.flash { animation: pos-flash 1.1s ease-out; }
@keyframes pos-flash { 0%, 35% { background: color-mix(in srgb, var(--cyan) 18%, transparent); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .pos-line.flash { animation: none; outline: 1px solid var(--cyan); } }
.pos-line-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pos-line-main > b { font-size: .8rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.pos-line-main small { font-size: .68rem; color: var(--soft); overflow-wrap: anywhere; line-height: 1.3; }
.pos-line-main small.ex { color: var(--blue); }
.pos-line-amt { text-align: right; font-size: .8rem; }
.lo-custom { font-size: .62rem; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); background: var(--line); color: var(--soft); vertical-align: 1px; }
.lo-step { display: inline-flex; align-items: center; border-radius: 9px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--cyan) 55%, transparent); }
.lo-step button { width: 28px; height: 28px; border: 0; background: transparent; color: var(--accent-text); font: inherit; font-size: 1rem; font-weight: 800; cursor: pointer; }
.lo-step button:hover { background: color-mix(in srgb, var(--cyan) 14%, transparent); }
.lo-step b { min-width: 22px; text-align: center; font-size: .82rem; }
.pos-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 0 10px; color: var(--soft); text-align: center; }
.pos-empty svg { width: 28px; height: 28px; color: var(--faint); margin-bottom: 4px; }
.pos-empty b { color: var(--fg); font-size: .9rem; }
.pos-empty span { font-size: .78rem; }
.pos-custbtn { align-self: flex-start; }
.pos-custbtn svg { width: 13px; height: 13px; }
.lo-composer { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-raise); }
.lo-composer .ck-input { padding: 7px 10px; font-size: .82rem; }
.lo-crow { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.lo-crow:last-child { border-bottom: 0; padding-bottom: 0; }
.lo-crow-top, .lo-crow-mid { display: flex; gap: 6px; align-items: center; }
.lo-crow-top .ck-input, .lo-crow-mid .ck-input { flex: 1; min-width: 0; }
.lo-crow-mid .lo-cq { flex: 0 0 64px; }
.lo-crow-total { font-size: .76rem; color: var(--soft); white-space: nowrap; }
.lo-crow-x { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--pink) 55%, transparent); background: transparent; color: var(--pink); cursor: pointer; font-size: 1.1rem; }
.lo-crow-flags { display: flex; gap: 14px; font-size: .76rem; color: var(--soft); }
.lo-crow-flags label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.lo-crow-flags input { accent-color: var(--cyan); }
.lo-crow-actions { display: flex; gap: 8px; }
.lo-crow-actions > * { flex: 1; justify-content: center; }
.lo-cerr { font-size: .76rem; color: var(--pink); }

.pos-foot { padding: 6px 10px 10px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; }
.pos-line .lo-step button { width: 24px; height: 24px; font-size: .92rem; }
.pos-line .lo-step b { min-width: 18px; font-size: .78rem; }
.pos-instr { display: flex; flex-direction: column; gap: 2px; }
.pos-instr textarea { resize: none; font-size: .8rem; padding: 7px 10px; }
.lo-count { align-self: flex-end; font-size: .68rem; color: var(--faint); }
.lo-breakdown { display: flex; flex-direction: column; gap: 2px; font-size: .74rem; color: var(--soft); }
.lo-breakdown:empty { display: none; }
.lo-breakdown > div { display: flex; justify-content: space-between; gap: 10px; }
.lo-breakdown .chg { color: var(--amber); }
.pos-taxrow { display: flex; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: transparent; padding: 0; font: inherit; font-size: .72rem; color: var(--soft); cursor: pointer; text-align: left; }
.pos-taxrow b { color: var(--fg); font-weight: 700; }
.pos-taxrow:hover { color: var(--fg); }
.pos-taxline { padding-left: 12px; font-size: .7rem; }
.lo-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.lo-total b { font-size: 1.2rem; font-weight: 800; }
.lo-checkout { width: 100%; padding: 10px 14px; font-size: .9rem; justify-content: space-between; }
.lo-checkout b { font-size: 1.05rem; font-weight: 800; }
.lo-checkout:disabled { opacity: .4; cursor: not-allowed; filter: none; }

/* Options + checkout pop-ups */
.lo-opt-h { font-size: .8rem; font-weight: 700; color: var(--soft); margin: 4px 0 8px; }
.lo-opts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.lo-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-size: .88rem; }
.lo-opt input { accent-color: var(--cyan); }
.lo-opt span { flex: 1; }
.lo-opt.on { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 8%, transparent); }
.lo-sum-for { font-size: .8rem; font-weight: 600; color: var(--accent-text); margin-bottom: 10px; }
.lo-sum { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.lo-sum > div { display: flex; justify-content: space-between; gap: 10px; }
.lo-breakdown.in-modal { margin-bottom: 8px; }
.lo-paygrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lo-pay { padding: 11px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; font-weight: 700; cursor: pointer; }
.lo-pay.on { border-color: var(--emerald); background: color-mix(in srgb, var(--emerald) 14%, transparent); color: var(--emerald); }
.lo-place { background: var(--emerald) !important; color: var(--ink) !important; flex: 1; }

/* Phone strip (hidden on desktop) */
.lo-cartstrip { display: none; }

@media (max-width: 1180px) and (min-width: 992px) {
  .pos { grid-template-columns: 132px minmax(0, 1fr) 290px; }
}
@media (max-width: 991px) {
  .pos { display: flex; flex-direction: column; height: auto; min-height: 0; gap: 10px; }
  .pos-ticket { display: contents; }
  .pos-setup { order: 1; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); }
  .lo-cartstrip { order: 2; }
  .pos-cats { order: 3; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .pos-cats-pin { flex-direction: row; position: static; margin: 0; padding: 0 6px 0 0; border-bottom: 0; border-right: 1px solid var(--line-soft); }
  .pos-cat.sub::before { display: none; }
  .pos-cat { white-space: nowrap; flex-shrink: 0; gap: 8px; }
  .pos-cat.sub { padding-left: 10px; }
  .pos-menu { order: 4; overflow: visible; }
  .pos-grid-wrap { overflow: visible; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .pos-lines-head, .pos-lines, .pos-foot { display: none; }
  body:not(.cart-open) .lo-cartstrip:not(:disabled) { display: flex; }
  body.cart-open .pos-cats, body.cart-open .pos-menu, body.cart-open .lo-cartstrip { display: none; }
  body.cart-open .pos-lines-head, body.cart-open .pos-lines, body.cart-open .pos-foot { display: flex; background: var(--card); border: 1px solid var(--line-soft); }
  body.cart-open .pos-lines-head { order: 5; border-radius: var(--r-card) var(--r-card) 0 0; border-bottom: 0; padding: 10px 12px 4px; }
  body.cart-open .pos-lines { order: 6; border-top: 0; border-bottom: 0; overflow: visible; }
  body.cart-open .pos-foot { order: 7; flex-direction: column; border-radius: 0 0 var(--r-card) var(--r-card); position: sticky; bottom: 0; z-index: 40; box-shadow: 0 -8px 18px -10px rgba(0,0,0,.7); padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  /* "← Menu" — small silver button */
  .pos-back { --silver-hi: #F7F9FB; --silver-lo: #C4CCD5; --silver-ink: #1B2430; --silver-edge: #9AA4AF;
    display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 4px 11px; border-radius: 8px; cursor: pointer;
    background: linear-gradient(180deg, var(--silver-hi), var(--silver-lo)); color: var(--silver-ink);
    border: 1px solid var(--silver-edge); box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 1px 3px rgba(0,0,0,.35);
    font: inherit; font-size: .76rem; font-weight: 700; letter-spacing: .01em; }
  .pos-back:hover { filter: brightness(1.04); }
  .pos-back:active { background: linear-gradient(180deg, var(--silver-lo), var(--silver-hi)); }
  .lo-cartstrip {
    align-items: center; gap: 10px; width: 100%; position: sticky; top: 12px; z-index: 50;
    padding: 12px 14px; border-radius: var(--r-card); cursor: pointer; font: inherit; text-align: left;
    background: linear-gradient(180deg, #F2FCFF, #D4F1FF); color: #063050; border: 0; box-shadow: 0 4px 16px rgba(1,254,255,.14);
  }
  .lo-cartstrip > svg { width: 20px; height: 20px; flex-shrink: 0; }
  .lo-strip-txt { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: baseline; font-size: .9rem; font-weight: 800; }
  .lo-strip-go { font-size: .82rem; font-weight: 800; padding: 6px 12px; border-radius: 8px; background: color-mix(in srgb, currentColor 12%, transparent); }
  .pos-menu.locked .lo-locked { padding-top: 40px; }
  .pos-menu.locked { min-height: 260px; }
}
/* Phone: the View Order strip and the category chips both stay reachable while scrolling */
@media (max-width: 991px) {
  .pos-cats { position: sticky; top: 8px; z-index: 45; box-shadow: 0 6px 14px -8px rgba(0,0,0,.6); }
  .pos:has(.lo-cartstrip:not(:disabled)) .pos-cats { top: 72px; }
}
@media (max-width: 880px) {
  .lo-cartstrip { top: 58px; }
  .pos-cats { top: 58px; }
  .pos:has(.lo-cartstrip:not(:disabled)) .pos-cats { top: 120px; }
}
@media (max-width: 560px) {
  .pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-tools { flex-wrap: wrap; }
  .lo-search { flex-basis: 100%; }
  .pos-cust { grid-template-columns: 1fr; }
}

/* Live page bindings — the page keeps its existing element IDs and show/hide
   switches (set by js/restaurant/live-orders.js); these map them onto the
   styles above. */
.lo-native-select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; clip-path: inset(50%); }
#dineInForm, #takeawayForm, #existingTableForm { display: none; }
.pos-details > * + * { margin-top: 6px; }
#orderTypeHint { margin: 0; }
#customerDetailsComposer, #customerDetailsError { display: none; }
.pos-custbox > * + * { margin-top: 6px; }
.pos-custlink.is-editing { display: none; }
.pos-setup-actions { display: flex; align-items: center; gap: 12px; }
.pos-setup-actions:has(> .pos-custlink:not(.d-none)) { margin-top: 2px; }
.pos-customlink { margin-left: auto; flex-shrink: 0; }
.pos-types { display: flex; }
.pos-type { flex: 1 1 0; }
.lo-type-count:empty { display: none; }
.lo-clear { display: none; }
.pos-back { display: none; }
@media (min-width: 992px) { .pos-back { display: none !important; } }
#cartCountBadge { display: inline !important; }
.pos-lines { position: relative; }
#specialInstructions { max-height: 64px; overflow-y: hidden; }
.pos-taxline.disc { color: var(--emerald); }
.pos-head h1, .lo-optsheet-head h3 { margin: 0; }
.pos-chosen .pos-occ { flex: 1; }
.pos-chosen .pos-tbadge + .pos-change { margin-left: auto; }

/* Loading overlay + spinner */
.lo-loading { position: fixed; inset: 0; z-index: 400; display: none; place-items: center; background: var(--bg); }
.lo-loading.show { display: grid; }
.lo-spinner { display: inline-block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--cyan); animation: lo-spin .8s linear infinite; }
.lo-spinner.sm { width: 14px; height: 14px; border-width: 2px; border-color: currentColor; border-right-color: transparent; margin-right: 8px; vertical-align: -2px; }
@keyframes lo-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lo-spinner { animation-duration: 2.4s; } }

/* Sizes / extras picker */
.lo-optsheet { position: fixed; inset: 0; z-index: 1060; display: none; align-items: center; justify-content: center; padding: 16px; background: var(--scrim); opacity: 0; transition: opacity .2s ease; }
.lo-optsheet.show { opacity: 1; }
.lo-optsheet-card { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-modal); box-shadow: var(--shadow-2); overflow: hidden; }
.lo-optsheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.lo-optsheet-head h3 { font-size: 1rem; font-weight: 700; }
.lo-optsheet-body { padding: 16px 20px 4px; overflow-y: auto; }
#selectionSummary { display: flex !important; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
button.lo-opt { width: 100%; background: transparent; color: var(--fg); font: inherit; font-size: .88rem; text-align: left; }
.lo-opt.selected { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 8%, transparent); }
.lo-opt b { font-weight: 700; }
.lo-radio, .lo-check { flex-shrink: 0; width: 16px; height: 16px; border: 1.5px solid var(--soft); position: relative; }
.lo-radio { border-radius: 50%; }
.lo-check { border-radius: 4px; }
.lo-opt.selected .lo-radio { border-color: var(--cyan); }
.lo-opt.selected .lo-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--cyan); }
.lo-opt.selected .lo-check { border-color: var(--cyan); background: var(--cyan); }
.lo-opt.selected .lo-check::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Checkout + custom item pop-ups (Bootstrap modals, reskinned in §26) */
.lo-place { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; }
.lo-place svg { width: 15px; height: 15px; }
.lo-cmore { margin-top: 10px; }
.lo-sum > div > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lo-sum small { font-size: .74rem; color: var(--soft); }
.lo-sum small.ex { color: var(--blue); }
.lo-sum .lo-dealtag { display: inline-flex; margin: 0 4px 0 2px; }
.lo-sum-name { overflow-wrap: anywhere; }

/* ── 33. Tables (floors, table cards, reservations) ─────────────────
   Table status colours match the Orders KOT View tiles:
   available blue · occupied blue-grey · reserved violet · inactive pink. */
.tb-page { display: flex; flex-direction: column; gap: var(--sp-4); }
.tb-greet .spacer { flex: 1; }
/* Floor-status language: green = free, red = busy, amber = held, grey = off.
   (Was blue vs muted blue-grey — same hue family, indistinguishable from afar.) */
.st-available { --tc: var(--emerald); }
.st-occupied { --tc: var(--pink); }
.st-reserved { --tc: var(--amber); }
.st-inactive { --tc: var(--soft); }

/* View tabs */
.tb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); }
.tb-tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; background: transparent; color: var(--soft); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tb-tab svg { width: 16px; height: 16px; }
.tb-tab:hover { color: var(--fg); }
.tb-tab.active { color: var(--accent-text); border-bottom-color: var(--cyan); }
.tb-tabcount { font-size: .7rem; font-weight: 800; padding: 1px 7px; border-radius: var(--r-pill); background: var(--line); color: var(--fg); }
.tb-tabdot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); }

/* Filters */
.tb-filters { display: flex; flex-direction: column; gap: 10px; }
.tb-statuschips { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-schip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card); color: var(--soft); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.tb-schip i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 6px var(--tc); }
.tb-schip b { font-size: .72rem; padding: 0 7px; border-radius: var(--r-pill); background: var(--line); color: var(--fg); }
.tb-schip:hover { color: var(--fg); border-color: var(--soft); }
.tb-schip.on { color: var(--fg); border-color: var(--tc, var(--cyan)); background: color-mix(in srgb, var(--tc, var(--cyan)) 12%, var(--card)); }
.tb-schip.on:not([class*="st-"]) { border-color: var(--cyan); }
.tb-filterrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tb-search { flex: 0 1 220px; min-width: 160px; }
.tb-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--card); border: 1px solid var(--line-soft); }
.tb-seg button { padding: 6px 12px; border-radius: 8px; border: 0; background: transparent; color: var(--soft); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tb-seg button:hover { color: var(--fg); }
.tb-seg button.on { background: var(--cyan); color: var(--ink); }
.tb-reset { border: 0; background: transparent; color: var(--accent-text); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; padding: 6px 4px; }

/* Floors */
.tb-floor { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); margin-bottom: var(--sp-4); }
.tb-floorhead { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: transparent; color: var(--fg); font: inherit; cursor: pointer; text-align: left; }
.tb-floorhead > b { font-size: 1rem; font-weight: 800; }
.tb-count { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); background: var(--line); color: var(--soft); }
.tb-count.red { background: color-mix(in srgb, var(--pink) 20%, transparent); color: var(--pink); }
.tb-occ { margin-left: auto; font-size: .78rem; color: var(--soft); }
.tb-chev svg { width: 18px; height: 18px; color: var(--soft); transition: transform .15s ease; }
.tb-floor.collapsed .tb-chev svg { transform: rotate(-90deg); }
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; padding: 0 16px 16px; }

/* Table card */
.tb-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 13px; background: color-mix(in srgb, var(--tc) 7%, var(--card)); border: 2px solid var(--tc); transition: transform .15s ease, box-shadow .15s ease; }
.tb-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .35), 0 0 14px color-mix(in srgb, var(--tc) 30%, transparent); }
.tb-card.st-inactive { opacity: .72; }
.tb-card-top { display: flex; align-items: flex-start; gap: 10px; }
.tb-thumb { flex-shrink: 0; width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--cyan) 12%, transparent); color: var(--accent-text); }
.tb-thumb svg { width: 18px; height: 18px; }
.tb-card-name { display: flex; flex-direction: column; line-height: 1; flex: 1; min-width: 0; }
.tb-card-name small { font-size: .7rem; font-weight: 600; color: var(--soft); text-transform: none; }
.tb-card-name b { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.tb-stmenu { position: relative; }
.tb-stbtn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 10px; border-radius: var(--r-pill); border: 1px solid color-mix(in srgb, var(--tc) 50%, transparent); background: color-mix(in srgb, var(--tc) 12%, transparent); color: var(--fg); font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.tb-stbtn i, .tb-stlist i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 6px var(--tc); }
.tb-stbtn svg { width: 13px; height: 13px; color: var(--soft); }
.tb-stlist { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 150px; padding: 5px; border-radius: 11px; background: var(--card-2); border: 1px solid var(--line); box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 2px; }
.tb-stlist button { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; text-align: left; }
.tb-stlist button:hover { background: var(--card-hover); }
.tb-stlist button.on { background: color-mix(in srgb, var(--tc) 14%, transparent); }
.tb-card-info { display: flex; flex-direction: column; gap: 3px; font-size: .82rem; color: var(--soft); }
.tb-card-info > span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--fg); font-weight: 600; }
.tb-card-info svg { width: 15px; height: 15px; color: var(--soft); }
.tb-desc { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-card-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px; border-top: 1px dashed var(--line-soft); padding-top: 10px; }
.tb-card-actions .spacer { flex: 1; }
.tb-card-actions .om-act svg { width: 14px; height: 14px; }
.tb-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--soft); cursor: pointer; }
.tb-icon svg { width: 15px; height: 15px; }
.tb-icon:hover { color: var(--fg); border-color: var(--soft); }
.tb-icon.danger:hover { color: var(--pink); border-color: color-mix(in srgb, var(--pink) 55%, transparent); }
.tb-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 16px; text-align: center; color: var(--soft); background: var(--card); border: 1px dashed var(--line); border-radius: var(--r-card); }
.tb-empty svg { width: 30px; height: 30px; color: var(--faint); }
.tb-empty b { color: var(--fg); }
.tb-empty span { font-size: .82rem; }
.tb-empty.sm { padding: 22px 16px; grid-column: 1 / -1; }

/* Add / edit table */
.tb-formgrid { grid-template-columns: 1fr 1fr; }
.tb-photo { margin-top: 12px; }
.tb-photobox { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 11px; border: 1px dashed var(--line); }
.tb-photoprev, .tb-photoempty { width: 72px; height: 56px; border-radius: 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .66rem; color: var(--soft); background: var(--bg-raise); flex-shrink: 0; }
.tb-photoprev { background: color-mix(in srgb, var(--cyan) 14%, var(--bg-raise)); color: var(--accent-text); }
.tb-photoprev svg, .tb-photoempty svg { width: 20px; height: 20px; }
.tb-photoacts { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-confirm { margin: 0; color: var(--soft); }

/* Reservations */
.tb-reshead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tb-reshead h2 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.tb-reshead .spacer { flex: 1; }
.tb-ressub { font-size: .8rem; color: var(--soft); }
.tb-resfilters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tb-resfilters .lo-search { flex: 1 1 220px; max-width: 320px; }
.tb-restable { width: 110px; }
.tb-resfilters .ck-select { width: auto; min-width: 150px; }
.tb-ressec h3 { display: flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 800; margin: 6px 0 10px; }
.tb-sechead { display: flex; align-items: center; gap: 12px; }
.tb-sechead h3 { flex: 1; min-width: 0; }
.tb-live { width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 color-mix(in srgb, var(--pink) 60%, transparent); animation: tb-pulse 1.6s ease-out infinite; }
@keyframes tb-pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .tb-live { animation: none; } }
.tb-rescards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tb-res { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 13px; background: var(--card); border: 1px solid var(--line-soft); }
.tb-res.past { border-color: color-mix(in srgb, var(--pink) 40%, transparent); }
.tb-res-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tb-res-top b { font-size: 1.05rem; font-weight: 800; }
.tb-res-meta { display: flex; gap: 14px; font-size: .82rem; color: var(--fg); font-weight: 600; }
.tb-res-meta span, .tb-res-who { display: inline-flex; align-items: center; gap: 6px; }
.tb-res-meta svg, .tb-res-who svg { width: 14px; height: 14px; color: var(--soft); }
.tb-res-who { font-size: .8rem; color: var(--soft); }
.tb-res-acts { display: flex; gap: 8px; margin-top: 4px; }
.tb-res-acts .ck-btn svg { width: 14px; height: 14px; }
.tb-badge { display: inline-flex; align-items: center; font-style: normal; font-size: .7rem; font-weight: 800; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.tb-b-new { color: var(--blue); background: color-mix(in srgb, var(--blue) 16%, transparent); }
.tb-b-change { color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, transparent); }
.tb-b-cancel { color: var(--pink); background: color-mix(in srgb, var(--pink) 16%, transparent); }
.tb-b-ok { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 16%, transparent); }
.tb-b-bad { color: var(--pink); background: color-mix(in srgb, var(--pink) 14%, transparent); }
.tb-b-past { color: var(--soft); background: var(--line); }
.tb-htable { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); overflow: hidden; }
.tb-hrow { display: grid; grid-template-columns: 1.3fr .8fr 1.4fr 1.2fr 1fr 44px; gap: 10px; align-items: center; padding: 10px 14px; font-size: .84rem; border-top: 1px solid var(--line-soft); }
.tb-hrow.head { border-top: 0; font-size: .72rem; font-weight: 700; color: var(--soft); background: color-mix(in srgb, var(--fg) 3%, transparent); }
.tb-hrow em { color: var(--faint); }
.tb-hrow .t { color: var(--soft); }
.tb-hrow .tb-icon { width: 30px; height: 30px; }
.tb-more { text-align: center; font-size: .78rem; color: var(--soft); padding: 10px; }
.tb-pagerow { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .78rem; color: var(--soft); padding: 10px 2px; }
.tb-prevclear { display: flex; justify-content: flex-end; margin: 2px 0 10px; }
.tb-details { display: flex; flex-direction: column; margin: 12px 0; border: 1px solid var(--line-soft); border-radius: 11px; overflow: hidden; }
.tb-drow { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; font-size: .86rem; border-top: 1px solid var(--line-soft); }
.tb-drow:first-child { border-top: 0; }
.tb-drow span { color: var(--soft); }
.tb-special { display: flex; gap: 10px; padding: 10px 12px; border-radius: 11px; background: color-mix(in srgb, var(--amber) 10%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); font-size: .84rem; }
.tb-special svg { width: 16px; height: 16px; color: var(--amber); flex-shrink: 0; margin-top: 2px; }
.tb-special small { display: block; font-size: .72rem; font-weight: 700; color: var(--amber); margin-bottom: 2px; }
.tb-change { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.tb-change > div { padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); font-size: .82rem; }
.tb-change > div:last-child { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.tb-change small { display: block; font-size: .7rem; color: var(--soft); margin-bottom: 3px; }
.tb-prevfilters { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: end; margin-bottom: 14px; }
.tb-pq { grid-column: span 2; }

@media (max-width: 760px) {
  .tb-hrow { grid-template-columns: 1fr auto; grid-template-areas: "tb st" "cu cu" "ti ac"; row-gap: 4px; }
  .tb-hrow.head { display: none; }
  .tb-hrow > span:nth-child(1) { grid-area: ti; font-size: .76rem; }
  .tb-hrow > span:nth-child(2) { grid-area: tb; }
  .tb-hrow > span:nth-child(3) { grid-area: cu; }
  .tb-hrow > span:nth-child(4) { display: none; }
  .tb-hrow > span:nth-child(5) { grid-area: st; }
  .tb-hrow > span:nth-child(6) { grid-area: ac; justify-self: end; }
  .tb-prevfilters { grid-template-columns: 1fr 1fr; }
  .tb-pq { grid-column: span 2; }
}
@media (max-width: 560px) {
  .tb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
  .tb-card { padding: 12px; }
  .tb-card-top { flex-wrap: wrap; }
  .tb-stmenu { width: 100%; }
  .tb-stbtn { width: 100%; justify-content: space-between; }
  .tb-stlist { left: 0; right: auto; }
  .tb-thumb { display: none; }
  /* Action row on a ~130px-wide 2-up tile: Reserve flexes into the leftover
     space (icon dropped, label centred), edit/delete become fixed 28px — the
     row totals exactly the tile width instead of clipping the delete button. */
  .tb-card-actions { gap: 4px; }
  .tb-card-actions .spacer { display: none; }
  .tb-card-actions .om-act { flex: 1; justify-content: center; min-width: 0; padding: 5px 6px; font-size: .72rem; }
  .tb-card-actions .om-act svg { display: none; }
  .tb-card-actions .tb-icon { flex: 0 0 28px; width: 28px; height: 28px; }
  .tb-formgrid { grid-template-columns: 1fr; }
  .tb-seg { width: 100%; overflow-x: auto; }
  .tb-search { flex: 1 1 100%; }
  .tb-occ { display: none; }
  .tb-chev { margin-left: auto; }
  .tb-restable, .tb-resfilters .ck-select { flex: 1; }
  .tb-change { grid-template-columns: 1fr; }
  .tb-prevfilters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tb-prevfilters .ck-input, .tb-prevfilters .ck-select { min-width: 0; width: 100%; }
}

/* Live page bindings — the page keeps its element IDs and show/hide switches
   (set by js/restaurant/tables.js); these map them onto the styles above. */
#incomingReservationsContainer, #activeReservationsEmpty, #reservationHistoryEmpty,
#reservationPagination, #prevReservationHistoryEmpty, #prevReservationHistoryLoadMoreContainer { display: none; }
#reservationPagination[style*="block"] { display: flex !important; }
#activeReservationsEmpty[style*="block"], #reservationHistoryEmpty[style*="block"], #prevReservationHistoryEmpty[style*="block"] { display: flex !important; }
.tb-floor-plain { padding-top: 16px; }
.tb-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.tb-thumb { overflow: hidden; }
.tb-floorfilter { width: auto; min-width: 140px; }
.tb-formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.tb-details:empty { display: none; }
.tb-times { margin-top: 0; }
.tb-source { margin-top: 10px; font-size: .78rem; color: var(--soft); }
.tb-hmsg { display: block; text-align: center; padding: 24px 14px; color: var(--soft); }
.tb-hmsg.err { color: var(--pink); }
.tb-clearrow { display: flex; justify-content: flex-end; margin: 2px 0 10px; }
.tb-confirm b { color: var(--fg); }
#tableConfirmModal .tb-confirm, #cancelReservationModal .tb-confirm { color: var(--fg); }
.tb-prevfilters > div { min-width: 0; }

/* Table photo (add / edit) — the frame matches the customer app's table
   card (1.707:1), so the preview is the shape guests actually see */
.tb-photobox .table-image-frame { flex: 0 0 auto; }
.table-image-frame { position: relative; width: 160px; max-width: 100%; aspect-ratio: 1.707; border: 1px dashed var(--line); border-radius: 9px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--bg-raise); }
.table-image-preview { width: 100%; height: 100%; object-fit: cover; display: none; }
.table-image-preview.is-set { display: block; }
.table-image-empty { font-size: .78rem; color: var(--soft); }
.table-image-error { display: none; margin-top: .5rem; font-size: .82rem; color: var(--pink); }
.table-image-error.is-shown { display: block; }

@media (max-width: 560px) {
  .tb-formgrid { grid-template-columns: 1fr; }
  .tb-photobox { flex-wrap: wrap; }
  .tb-floorfilter { flex: 1; }
}

/* Incoming request tiles pop in and out (continuous) so new requests catch the eye;
   staggered, paused on hover so the buttons are easy to hit, off for reduced motion */
.tb-incoming .tb-res { border-color: color-mix(in srgb, var(--pink) 45%, var(--line-soft)); animation: tb-pop 2.4s ease-in-out infinite; will-change: transform; }
.tb-incoming .tb-res:nth-child(3n+2) { animation-delay: .4s; }
.tb-incoming .tb-res:nth-child(3n+3) { animation-delay: .8s; }
.tb-incoming .tb-res:hover, .tb-incoming .tb-res:focus-within { animation-play-state: paused; }
@keyframes tb-pop {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
  50% { transform: scale(1.03); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 22%, transparent), 0 10px 26px -10px color-mix(in srgb, var(--pink) 55%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .tb-incoming .tb-res { animation: none; } }

/* Orders KOT View: tiles with a new order pop in and out (same motion as Tables'
   incoming requests), glowing in the tile's own status colour; a search-match
   blink keeps priority; paused on hover; off for reduced motion */
.om-tile.has-order.st-new:not(.blink):not(.table-highlight-blink) { animation: om-pop 2.4s ease-in-out infinite; will-change: transform; }
.om-tiles > .om-tile.has-order.st-new:nth-child(3n+2) { animation-delay: .4s; }
.om-tiles > .om-tile.has-order.st-new:nth-child(3n+3) { animation-delay: .8s; }
.om-tile.has-order.st-new:hover, .om-tile.has-order.st-new:focus-within { animation-play-state: paused; }
@keyframes om-pop {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
  50% { transform: scale(1.03); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 22%, transparent), 0 10px 26px -10px color-mix(in srgb, var(--tc) 55%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .om-tile.has-order.st-new { animation: none; } }

/* ══ 34. Inventory (stock list, history, expiry) ═══════════════════
   Stock language: critical pink · low amber · good blue · excellent emerald.
   Expiry language: expired pink · expiring soon amber · fresh emerald.
   Data-driven widths/angles come from step classes (lv-NN, pNN) so no
   page script ever writes a style. */
.iv-page { display: flex; flex-direction: column; gap: var(--sp-4); }
.sk-critical { --tc: var(--pink); }
.sk-low { --tc: var(--amber); }
.sk-good { --tc: var(--blue); }
.sk-excellent { --tc: var(--emerald); }
.ex-expired { --tc: var(--pink); }
.ex-soon { --tc: var(--amber); }
.ex-fresh { --tc: var(--emerald); }
.lv-0 { width: 0%; } .lv-5 { width: 5%; } .lv-10 { width: 10%; } .lv-15 { width: 15%; } .lv-20 { width: 20%; } .lv-25 { width: 25%; } .lv-30 { width: 30%; } .lv-35 { width: 35%; } .lv-40 { width: 40%; } .lv-45 { width: 45%; } .lv-50 { width: 50%; } .lv-55 { width: 55%; } .lv-60 { width: 60%; } .lv-65 { width: 65%; } .lv-70 { width: 70%; } .lv-75 { width: 75%; } .lv-80 { width: 80%; } .lv-85 { width: 85%; } .lv-90 { width: 90%; } .lv-95 { width: 95%; } .lv-100 { width: 100%; }
/* scoped to the ring so they beat its own --p: 0 default */
.iv-ring.p0 { --p: 0; } .iv-ring.p5 { --p: 5; } .iv-ring.p10 { --p: 10; } .iv-ring.p15 { --p: 15; } .iv-ring.p20 { --p: 20; } .iv-ring.p25 { --p: 25; } .iv-ring.p30 { --p: 30; } .iv-ring.p35 { --p: 35; } .iv-ring.p40 { --p: 40; } .iv-ring.p45 { --p: 45; } .iv-ring.p50 { --p: 50; } .iv-ring.p55 { --p: 55; } .iv-ring.p60 { --p: 60; } .iv-ring.p65 { --p: 65; } .iv-ring.p70 { --p: 70; } .iv-ring.p75 { --p: 75; } .iv-ring.p80 { --p: 80; } .iv-ring.p85 { --p: 85; } .iv-ring.p90 { --p: 90; } .iv-ring.p95 { --p: 95; } .iv-ring.p100 { --p: 100; }

/* Headline tiles */
.iv-kpis { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: var(--sp-3); }
.iv-kpi { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line-soft); overflow: hidden; }
.iv-kpi::after { content: ""; position: absolute; inset: auto -30px -60px auto; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tc, var(--cyan)) 16%, transparent), transparent); pointer-events: none; }
.iv-kpi .meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.iv-kpi .lbl { font-size: .78rem; font-weight: 600; color: var(--soft); }
.iv-kpi .val { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; white-space: nowrap; }
.iv-kpi .sub { font-size: .74rem; font-weight: 600; color: var(--faint); }
.iv-kpi.t-value { --tc: var(--cyan); }
.iv-kpi.t-low { --tc: var(--amber); }
.iv-kpi.t-expiry { --tc: var(--pink); }
.iv-kpi.t-low.on .val, .iv-kpi.t-expiry.on .val { color: var(--tc); }
.iv-kpi.t-low.on .sub, .iv-kpi.t-expiry.on .sub { color: var(--tc); }
.iv-kpi .ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); }
.iv-kpi .ic svg { width: 20px; height: 20px; }
/* Stock health ring */
.iv-health.h-excellent { --tc: var(--emerald); }
.iv-health.h-good { --tc: var(--blue); }
.iv-health.h-warning { --tc: var(--amber); }
.iv-health.h-critical { --tc: var(--pink); }
.iv-ring { --p: 0; position: relative; width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; background: conic-gradient(var(--tc) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; }
.iv-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--card); }
.iv-ring span { position: relative; font-size: .95rem; font-weight: 800; }
.iv-health .val { font-size: 1.05rem; }
.iv-health .lvl { color: var(--tc); }

/* Fast-moving ribbon */
.iv-fast { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-card); background: linear-gradient(90deg, color-mix(in srgb, var(--pink) 10%, var(--card)), var(--card) 45%); border: 1px solid var(--line-soft); min-width: 0; }
.iv-fast-h { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: .85rem; font-weight: 800; }
.iv-fast-h svg { width: 18px; height: 18px; color: var(--pink); }
.iv-fast-h small { font-weight: 600; color: var(--faint); font-size: .72rem; }
.iv-fastlist { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.iv-fastlist::-webkit-scrollbar { display: none; }
.iv-fastchip { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 5px 6px 5px 12px; border-radius: var(--r-pill); background: var(--bg-raise); border: 1px solid var(--line); font-size: .82rem; font-weight: 700; }
.iv-fastchip b { font-size: .72rem; padding: 2px 8px; border-radius: var(--r-pill); color: var(--tc); background: color-mix(in srgb, var(--tc) 16%, transparent); }
.iv-fastempty { font-size: .8rem; color: var(--faint); }

/* Filters (status chips reuse .tb-schip) */
.iv-filters { display: flex; flex-direction: column; gap: 10px; }
.iv-filterrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.iv-filterrow .lo-search { flex: 1 1 220px; max-width: 300px; }
.iv-filterrow .ck-select { width: auto; min-width: 170px; }

/* Stock list */
.iv-list { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); overflow: hidden; }
.iv-row { display: grid; grid-template-columns: minmax(150px, 1.5fr) minmax(170px, 1.6fr) 104px minmax(92px, .9fr) minmax(118px, 1fr) minmax(90px, .9fr) 156px; gap: 14px; align-items: center; padding: 12px 16px 12px 13px; border-bottom: 1px solid var(--line-soft); border-left: 3px solid transparent; }
.iv-row:last-child { border-bottom: 0; }
.iv-row:not(.iv-head):hover { background: var(--card-hover); }
.iv-row.sk-critical, .iv-row.sk-low { border-left-color: var(--tc); }
.iv-head { padding-top: 10px; padding-bottom: 10px; background: var(--bg-raise); font-size: .7rem; font-weight: 800; letter-spacing: .04em; color: var(--soft); }
.iv-name { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.iv-name b { font-size: .92rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.iv-name small { font-size: .74rem; color: var(--faint); font-weight: 600; }
.iv-hot { display: inline-flex; align-items: center; gap: 3px; width: fit-content; font-size: .66rem; font-weight: 800; padding: 1px 7px; border-radius: var(--r-pill); color: var(--pink); background: color-mix(in srgb, var(--pink) 15%, transparent); }
.iv-hot svg { width: 11px; height: 11px; }
.iv-stock { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.iv-stock .q { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.iv-stock .q b { font-size: .92rem; font-weight: 800; white-space: nowrap; }
.iv-stock .q small { font-size: .72rem; color: var(--faint); white-space: nowrap; }
.iv-stock.neg .q b { color: var(--pink); }
/* Level bar: full = 4× the minimum. Amber line = minimum stock alert (25%);
   middle line = halfway, i.e. 2× the minimum, where stock counts as Excellent */
.iv-bar { position: relative; height: 6px; border-radius: 4px; background: var(--line); }
.iv-bar > i { display: block; height: 100%; border-radius: 4px; background: var(--tc); box-shadow: 0 0 8px color-mix(in srgb, var(--tc) 55%, transparent); }
.iv-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--soft); opacity: .7; }
.iv-bar::before { content: ""; position: absolute; left: 25%; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: var(--amber); box-shadow: 0 0 6px color-mix(in srgb, var(--amber) 70%, transparent); }
.iv-stock .q small.min { color: var(--amber); }
.iv-key { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; font-weight: 700; letter-spacing: 0; color: var(--faint); }
.iv-key i { width: 2px; height: 10px; border-radius: 1px; background: var(--soft); opacity: .7; }
.iv-key i.min { background: var(--amber); opacity: 1; margin-left: 4px; }
.iv-key i.min:first-child { margin-left: 0; }
.iv-pill { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 3px 10px; border-radius: var(--r-pill); font-size: .74rem; font-weight: 800; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); white-space: nowrap; }
.iv-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tc); }
.iv-val { font-weight: 800; font-size: .9rem; white-space: nowrap; }
.iv-val.neg { color: var(--pink); }
.iv-exp { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.iv-exp small { font-size: .74rem; color: var(--soft); white-space: nowrap; }
.iv-none { font-size: .8rem; color: var(--faint); }
.iv-sup { font-size: .84rem; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-acts { display: flex; gap: 6px; justify-content: flex-end; }
.iv-act { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-raise); color: var(--soft); cursor: pointer; transition: color var(--transition), border-color var(--transition), background var(--transition); }
.iv-act svg { width: 16px; height: 16px; }
.iv-act span { display: none; }
.iv-act:hover { color: var(--fg); border-color: var(--soft); }
.iv-act.restock:hover { color: var(--emerald); border-color: var(--emerald); background: color-mix(in srgb, var(--emerald) 10%, var(--bg-raise)); }
.iv-act.waste:hover { color: var(--amber); border-color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, var(--bg-raise)); }
.iv-act.del:hover { color: var(--pink); border-color: var(--pink); background: color-mix(in srgb, var(--pink) 10%, var(--bg-raise)); }
.iv-act.edit:hover { color: var(--accent-text); border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, var(--bg-raise)); }
.iv-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 16px; text-align: center; color: var(--soft); }
.iv-empty svg { width: 34px; height: 34px; color: var(--faint); }
.iv-empty b { color: var(--fg); font-size: .95rem; }
.iv-empty small { font-size: .8rem; }

/* History timeline */
.iv-histbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.iv-histbar .ck-field { margin: 0; }
.iv-histbar .ck-input { width: 160px; }
.iv-day { font-size: .74rem; font-weight: 800; letter-spacing: .04em; color: var(--soft); padding: 14px 4px 8px; }
.iv-tl { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); overflow: hidden; }
.iv-ev { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: start; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.iv-ev:last-child { border-bottom: 0; }
.iv-ev.hx-purchase { --tc: var(--emerald); }
.iv-ev.hx-deduction { --tc: var(--pink); }
.iv-ev.hx-restoration { --tc: var(--blue); }
.iv-ev.hx-adjustment { --tc: var(--amber); }
.iv-ev .dot { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); }
.iv-ev .dot svg { width: 17px; height: 17px; }
.iv-ev .what { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.iv-ev .what b { font-size: .9rem; }
.iv-ev .chg { font-size: .84rem; font-weight: 700; }
.iv-ev .chg em { font-style: normal; color: var(--tc); font-weight: 800; }
.iv-ev .chg span { color: var(--faint); font-weight: 600; }
.iv-ev .more { font-size: .76rem; color: var(--soft); }
.iv-ev .when { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: .74rem; color: var(--faint); white-space: nowrap; }
.iv-ev .when .iv-pill::before { display: none; }
.iv-more { display: flex; justify-content: center; padding-top: var(--sp-3); }

/* Expiry management */
.iv-exlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.iv-excard { display: grid; grid-template-columns: 74px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-card); background: color-mix(in srgb, var(--tc) 6%, var(--card)); border: 1px solid color-mix(in srgb, var(--tc) 30%, var(--line-soft)); }
.iv-days { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 74px; border-radius: 12px; background: color-mix(in srgb, var(--tc) 14%, transparent); color: var(--tc); }
.iv-days b { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.iv-days small { font-size: .66rem; font-weight: 800; margin-top: 4px; }
.iv-exinfo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.iv-exinfo .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.iv-exinfo b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-exinfo small { font-size: .76rem; color: var(--soft); }
.iv-exinfo .ck-btn { align-self: flex-start; margin-top: 4px; }

/* Item & waste pop-ups */
.iv-sec { font-size: .72rem; font-weight: 800; letter-spacing: .05em; color: var(--accent-text); margin: 4px 0 10px; }
.iv-sec + .ck-formgrid, .iv-sec + .iv-grid3 { margin-bottom: 18px; }
.iv-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.iv-calc { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl); border: 1px dashed var(--line); background: var(--bg-raise); font-size: .84rem; color: var(--soft); margin-bottom: 18px; }
.iv-calc b { color: var(--fg); font-size: 1rem; }
.iv-calc.ok { border-color: color-mix(in srgb, var(--emerald) 50%, var(--line)); }
.iv-calc.ok b { color: var(--emerald); }
.iv-readout { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.iv-readout div { padding: 10px 12px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.iv-readout small { display: block; font-size: .72rem; color: var(--faint); font-weight: 700; }
.iv-readout b { font-size: .95rem; }
.iv-qtyunit { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }
.iv-hint { font-size: .74rem; color: var(--soft); margin-top: 5px; }
.iv-confirm { color: var(--soft); line-height: 1.55; margin: 0; }
.iv-confirm b { color: var(--fg); }

@media (max-width: 1180px) {
  .iv-kpis { grid-template-columns: 1fr 1fr; }
  .iv-row { grid-template-columns: minmax(140px, 1.4fr) minmax(150px, 1.5fr) 100px minmax(86px, .8fr) minmax(110px, 1fr) 156px; }
  .iv-row > .iv-sup { display: none; }
}
/* Card rows from 1100px (was 860px): the 6-column table needs ~845px, wider than
   the space next to the sidebar on small laptops, which made the whole page scroll sideways */
@media (max-width: 1100px) {
  .iv-head { display: none; }
  .iv-row { grid-template-columns: 1fr auto; grid-template-areas: "name status" "stock stock" "val exp" "acts acts"; gap: 10px 12px; padding: 14px; }
  .iv-row > .iv-name { grid-area: name; }
  .iv-row > .iv-pill { grid-area: status; justify-self: end; align-self: start; }
  .iv-row > .iv-stock { grid-area: stock; }
  .iv-row > .iv-val { grid-area: val; }
  .iv-row > .iv-exp { grid-area: exp; justify-self: end; align-items: flex-end; }
  .iv-row > .iv-acts { grid-area: acts; justify-content: stretch; }
  .iv-act { flex: 1; width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: .76rem; font-weight: 700; }
  .iv-act span { display: inline; }
}
@media (max-width: 560px) {
  .iv-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .iv-kpi { padding: 12px; gap: 10px; }
  .iv-kpi .ic { display: none; }
  .iv-kpi .val { font-size: 1.3rem; }
  .iv-health, .iv-kpi.t-value { grid-column: 1 / -1; }
  .iv-fast { flex-direction: column; align-items: flex-start; }
  .iv-fastlist { width: 100%; }
  .iv-filterrow .lo-search { max-width: none; flex-basis: 100%; }
  .iv-filterrow .ck-select { flex: 1; min-width: 0; }
  .iv-histbar .ck-field { flex: 1; }
  .iv-histbar .ck-input { width: 100%; }
  .iv-grid3 { grid-template-columns: 1fr 1fr; }
  .iv-grid3 > :last-child { grid-column: 1 / -1; }
  .iv-ev { grid-template-columns: 32px 1fr; }
  .iv-ev .when { grid-column: 2; flex-direction: row; align-items: center; }
  .iv-exlist { grid-template-columns: 1fr; }
}

/* Inventory additions (owner review: min-alert line, where-used card, deals) */
.ck-field .iv-calc { margin-bottom: 0; padding: 9px 12px; }
.iv-head .iv-sup { font-size: inherit; color: inherit; }
.iv-tabs { overflow-x: auto; scrollbar-width: none; }
.iv-tabs::-webkit-scrollbar { display: none; }
.iv-tabs .tb-tab { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 560px) { .iv-filterrow .tb-seg { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; } .iv-filterrow .tb-seg button { white-space: nowrap; } }

/* Where-used: item name is a button; hover hint + click card listing the
   menu items whose recipe uses it (height follows the list, scrolls past ~6) */
.iv-list { overflow: visible; }
.iv-list > .iv-row:first-child { border-radius: var(--r-card) var(--r-card) 0 0; }
.iv-list > .iv-row:last-child { border-radius: 0 0 var(--r-card) var(--r-card); }
.iv-name { position: relative; }
.iv-namebtn { position: relative; display: inline-flex; align-items: center; gap: 4px; width: fit-content; max-width: 100%; padding: 0; border: 0; background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.iv-namebtn b { border-bottom: 1px dashed transparent; transition: border-color var(--transition), color var(--transition); }
.iv-namebtn svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--faint); transition: transform .15s ease, color var(--transition); }
.iv-namebtn:hover b, .iv-namebtn:focus-visible b { color: var(--accent-text); border-bottom-color: color-mix(in srgb, var(--cyan) 60%, transparent); }
.iv-namebtn:hover svg { color: var(--accent-text); }
.iv-namebtn[aria-expanded="true"] b { color: var(--accent-text); }
.iv-namebtn[aria-expanded="true"] svg { transform: rotate(180deg); color: var(--accent-text); }
.iv-namebtn::after { content: attr(data-hint); position: absolute; left: 0; bottom: calc(100% + 8px); padding: 5px 9px; border-radius: 7px; background: var(--card-2); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--fg); font-size: .72rem; font-weight: 600; white-space: nowrap; opacity: 0; translate: 0 4px; pointer-events: none; transition: opacity .15s ease, translate .15s ease; z-index: 6; }
.iv-namebtn:hover::after { opacity: 1; translate: 0 0; transition-delay: .25s; }
.iv-namebtn[aria-expanded="true"]::after { display: none; }
.iv-used { position: absolute; left: -4px; top: calc(100% + 6px); z-index: 20; width: 330px; max-width: calc(100vw - 32px); background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-2); animation: ck-modal-in .16s ease; overflow: hidden; }
.iv-usedhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line-soft); }
.iv-usedhead b { font-size: .9rem; }
.iv-usedhead span { font-size: .72rem; font-weight: 700; color: var(--accent-text); white-space: nowrap; }
.iv-usedlist { list-style: none; margin: 0; padding: 4px 0; max-height: 300px; overflow-y: auto; }
.iv-usedlist li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 14px; }
.iv-usedlist li + li { border-top: 1px solid var(--line-soft); }
.iv-usedlist .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--accent-text); background: color-mix(in srgb, var(--cyan) 12%, transparent); }
.iv-usedlist .ic svg { width: 15px; height: 15px; }
.iv-usedlist div { min-width: 0; display: flex; flex-direction: column; }
.iv-usedlist div b { font-size: .84rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-usedlist div small { font-size: .7rem; color: var(--faint); }
.iv-usedlist .qs { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.iv-usedlist em { font-style: normal; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.iv-usedlist em i { font-style: normal; font-weight: 600; color: var(--faint); margin-right: 5px; }
.iv-usedfoot { padding: 8px 14px; border-top: 1px solid var(--line-soft); font-size: .7rem; color: var(--faint); text-align: right; }
.iv-usednone { margin: 0; padding: 14px; font-size: .8rem; color: var(--soft); line-height: 1.5; }
@media (hover: none) { .iv-namebtn::after { display: none; } }

.iv-usedsub { padding: 8px 14px 2px; font-size: .68rem; font-weight: 800; letter-spacing: .05em; color: var(--soft); border-top: 1px solid var(--line-soft); }
.iv-usedlist.deals .ic { color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); }
.iv-usedlist.deals { max-height: 200px; }

/* Inventory — live-page bindings (elements the demo doesn't have) */
.iv-page .tab-content { min-width: 0; }
.iv-histbar { margin-bottom: 2px; }
#historyLoadMoreContainer { display: none; }
#historyLoadMoreContainer[style*="block"] { display: flex !important; }
#wasteOtherReasonGroup { display: none; }
#wasteOtherReasonGroup[style*="block"] { display: flex !important; }
.iv-note { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-ctl); font-size: .82rem; color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.iv-loading { position: fixed; inset: 0; z-index: 2000; align-items: center; justify-content: center; background: var(--scrim); }
.iv-loading > div { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--fg); }
.iv-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--cyan); animation: iv-spin .8s linear infinite; }
@keyframes iv-spin { to { transform: rotate(360deg); } }
.iv-empty .iv-spinner { width: 26px; height: 26px; }

/* ══ 35. Inventory analytics ═══════════════════════════════════════
   Chart series colours: the kit hues one step deeper so fills sit in the
   dark-mode lightness band; order validated for colour-blind separation
   (cyan · amber · emerald · violet · pink). Charts read these tokens, so
   no colour is written in page scripts. */
:root {
  --chart-1: #0B9DB6;
  --chart-2: #B38306;
  --chart-3: #02A66D;
  --chart-4: #C048F7;
  --chart-5: #EC4470;
  --chart-grid: rgba(148,163,184,.12);
  --chart-tick: #94a3b8;
}
.ia-page { display: flex; flex-direction: column; gap: var(--sp-4); }
.ia-back { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--accent-text); text-decoration: none; margin-bottom: 2px; }
.ia-back svg { width: 14px; height: 14px; }
.ia-greet .acts { display: flex; gap: 8px; flex-wrap: wrap; }
/* Date bar */
.ia-datebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 5; box-shadow: var(--shadow-1); }
.ia-datebar .tb-seg { flex-wrap: wrap; background: var(--bg-raise); }
.ia-custom { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.ia-custom .ck-input { width: 150px; padding-top: 7px; padding-bottom: 7px; }
.ia-custom > span { font-size: .78rem; color: var(--faint); }
.ia-range { font-size: .78rem; color: var(--soft); }
.ia-range b { color: var(--fg); }
/* Jump links */
.ia-jump { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.ia-jump::-webkit-scrollbar { display: none; }
.ia-jump a { flex-shrink: 0; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--soft); text-decoration: none; font-size: .78rem; font-weight: 700; }
.ia-jump a:hover { color: var(--fg); border-color: var(--soft); }
/* Sections */
.ia-sec { display: flex; flex-direction: column; gap: var(--sp-3); scroll-margin-top: 84px; }
.ia-sechead { display: flex; align-items: baseline; gap: 10px; padding-top: var(--sp-2); }
.ia-sechead h2 { font-size: 1.05rem; font-weight: 800; }
.ia-sechead span { font-size: .78rem; color: var(--faint); }
.ia-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.ia-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); min-width: 0; display: flex; flex-direction: column; }
.ia-cardhead { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.ia-cardhead h3 { font-size: .92rem; font-weight: 800; }
.ia-cardhead p { font-size: .74rem; color: var(--faint); margin: 2px 0 0; }
.ia-cardhead .ck-panel-ic { flex-shrink: 0; }
.ia-cardbody { padding: 8px 16px 16px; flex: 1; min-width: 0; }
.ia-chart { position: relative; height: 260px; }
.ia-chart.short { height: 220px; }
.ia-chart.tall { height: 300px; }
/* Overview hero */
.ia-hero { display: grid; grid-template-columns: 300px 1fr; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-card); overflow: hidden; }
.ia-ledger { display: flex; flex-direction: column; gap: 16px; padding: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--cyan) 10%, var(--card)), var(--card) 70%); border-right: 1px solid var(--line-soft); }
.ia-ledger .big small { display: block; font-size: .78rem; font-weight: 700; color: var(--soft); }
.ia-ledger .big b { display: block; font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.ia-ledger .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ia-ledger .pair div { padding: 10px 12px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); min-width: 0; }
.ia-ledger .pair small { display: block; font-size: .7rem; font-weight: 700; color: var(--faint); }
.ia-ledger .pair b { display: block; font-size: 1.05rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ia-ledger .note { font-size: .74rem; color: var(--faint); margin-top: auto; }
.ia-hero .ia-cardbody { padding-top: 4px; }
/* Stock status stacked bar */
.ia-status { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin: 10px 0 14px; }
.ia-status i { display: block; flex: 1; height: 100%; background: var(--tc); }
.ia-statuslegend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ia-statuslegend div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.ia-statuslegend i { width: 10px; height: 10px; border-radius: 3px; background: var(--tc); flex-shrink: 0; }
.ia-statuslegend span { font-size: .8rem; color: var(--soft); flex: 1; }
.ia-statuslegend b { font-size: 1.05rem; font-weight: 800; }
/* Data tables */
.ia-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ia-table th { text-align: left; font-size: .68rem; font-weight: 800; letter-spacing: .04em; color: var(--soft); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ia-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.ia-table tr:last-child td { border-bottom: 0; }
.ia-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ia-table td b { font-weight: 800; }
.ia-scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; }
.ia-scroll thead th { position: sticky; top: 0; background: var(--card); z-index: 1; }
.ia-meter { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.ia-meter .iv-bar { width: 64px; height: 5px; }
.ia-meter .iv-bar::after, .ia-meter .iv-bar::before { display: none; }
.ia-meter.m-hi { --tc: var(--emerald); }
.ia-meter.m-mid { --tc: var(--amber); }
.ia-meter.m-lo { --tc: var(--soft); }
.ia-tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: var(--r-pill); color: var(--tc, var(--soft)); background: color-mix(in srgb, var(--tc, var(--soft)) 14%, transparent); white-space: nowrap; }
.ia-tag.t-danger { --tc: var(--pink); }
.ia-tag.t-warn { --tc: var(--amber); }
.ia-tag.t-info { --tc: var(--blue); }
.ia-tag.t-muted { --tc: var(--faint); }
/* Peak-usage heatmap: one cell per day × hour, intensity in six steps */
.ia-heat { display: grid; grid-template-columns: 40px repeat(24, minmax(0, 1fr)); gap: 3px; min-width: 620px; }
.ia-heat .d { font-size: .7rem; font-weight: 700; color: var(--soft); display: flex; align-items: center; }
.ia-heat .h { font-size: .6rem; color: var(--faint); text-align: center; padding-top: 4px; }
.ia-heat .c { aspect-ratio: 1.25; border-radius: 4px; background: var(--bg-raise); }
:is(.ia-heat, .ia-heatkey) .c.hm-1 { background: color-mix(in srgb, var(--chart-1) 22%, var(--bg-raise)); }
:is(.ia-heat, .ia-heatkey) .c.hm-2 { background: color-mix(in srgb, var(--chart-1) 42%, var(--bg-raise)); }
:is(.ia-heat, .ia-heatkey) .c.hm-3 { background: color-mix(in srgb, var(--chart-1) 62%, var(--bg-raise)); }
:is(.ia-heat, .ia-heatkey) .c.hm-4 { background: color-mix(in srgb, var(--chart-1) 82%, var(--bg-raise)); }
:is(.ia-heat, .ia-heatkey) .c.hm-5 { background: var(--cyan); box-shadow: 0 0 8px color-mix(in srgb, var(--cyan) 60%, transparent); }
.ia-heat .c:hover { outline: 2px solid var(--fg); outline-offset: 1px; }
.ia-heatwrap { overflow-x: auto; padding-bottom: 4px; }
.ia-heatkey { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 10px; font-size: .7rem; color: var(--faint); }
.ia-heatkey .c { width: 16px; height: 12px; border-radius: 3px; background: var(--bg-raise); }
.ia-heatkey span { margin: 0 4px; }
.ia-heattip { font-size: .78rem; color: var(--soft); min-height: 1.2em; margin-top: 6px; }
.ia-heattip b { color: var(--fg); }
/* Empty / no data */
.ia-nodata { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 180px; color: var(--faint); font-size: .84rem; text-align: center; }
.ia-nodata svg { width: 30px; height: 30px; }
/* Export pop-up */
.ia-checks { display: flex; flex-direction: column; gap: 8px; }
.ia-check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--bg-raise); cursor: pointer; font-size: .86rem; font-weight: 600; }
.ia-check input { width: 16px; height: 16px; accent-color: var(--cyan); }
.ia-progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 14px 0 6px; }
.ia-progress i { display: block; height: 100%; background: var(--cyan); transition: width .3s ease; }
.ia-progresstext { font-size: .78rem; color: var(--soft); text-align: center; }

@media (max-width: 1080px) {
  .ia-hero { grid-template-columns: 1fr; }
  .ia-ledger { border-right: 0; border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 900px) {
  .ia-grid2 { grid-template-columns: 1fr; }
  .ia-custom { margin-left: 0; }
}
@media (max-width: 560px) {
  .ia-datebar { position: static; }
  .ia-custom .ck-input { width: calc(50% - 30px); min-width: 0; }
  .ia-ledger .big b { font-size: 1.8rem; }
  .ia-chart { height: 230px; }
}
.ia-incl { margin-top: 14px; }
#exportModal .ck-formgrid { margin-top: 12px; }
.ia-grid2.ia-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; }
@media (max-width: 900px) { .ia-grid2.ia-split { grid-template-columns: 1fr; } }

/* Inventory analytics — live-page bindings */
:root {
  --chart-6: #64748b; /* neutral series: waste "Quality issue" */
  --chart-7: #94a3b8; /* neutral series: waste "Other" */
}
.tb-seg button.active { background: var(--cyan); color: var(--ink); }
.ia-stack { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.ia-loading { display: flex; align-items: center; justify-content: center; min-height: 180px; }
.ia-chartwrap, .ia-content, .ia-nodata { display: none; }
.ia-nodata[style*="block"] { display: flex !important; }
.ia-content.ia-scroll { max-height: 420px; }
.ia-table td.ia-neg { color: var(--pink); }
.ia-exportdates { margin-top: 12px; }
.ia-greet .acts .ck-btn svg { width: 16px; height: 16px; }
/* Analytics on phones: the whole 24-hour heatmap fits the screen (busy lunch/dinner
   hours visible without sideways scrolling); section subtitles drop below the title */
@media (max-width: 560px) {
  .ia-heat { min-width: 0; gap: 2px; grid-template-columns: 30px repeat(24, minmax(0, 1fr)); }
  .ia-heat .c { aspect-ratio: 1; border-radius: 2px; }
  .ia-heat .h { font-size: .55rem; }
  .ia-heat .d { font-size: .62rem; }
  .ia-sechead { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* ══ 36. Analytics (sales) ═════════════════════════════════════════
   Builds on §35 (ia-card, date bar, charts) and §34 (iv-kpi tiles, ring). */
.an-page .ia-datebar { gap: 14px; }
.an-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
.an-kpi.t-orders { --tc: var(--blue); }
.an-kpi.t-revenue { --tc: var(--emerald); }
.an-kpi.t-aov { --tc: var(--violet); }
.an-kpi.t-time { --tc: var(--amber); }
.an-kpi .lbl em { font-style: normal; font-weight: 600; color: var(--faint); font-size: .68rem; margin-left: 4px; }
.an-trend { font-size: .74rem; font-weight: 700; min-height: 1em; }
.an-trend .up { color: var(--emerald); }
.an-trend .down { color: var(--pink); }
.an-trend small { color: var(--faint); font-weight: 600; margin-left: 4px; }
/* Compare switch */
.an-switch { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--soft); cursor: pointer; user-select: none; }
.an-switch input { position: absolute; opacity: 0; pointer-events: none; }
.an-switch .track { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--line); transition: background var(--transition); flex-shrink: 0; }
.an-switch .track i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--fg); transition: transform var(--transition); }
.an-switch input:checked + .track { background: var(--cyan); }
.an-switch input:checked + .track i { transform: translateX(16px); background: var(--ink); }
.an-switch input:focus-visible + .track { outline: 2px solid var(--cyan); outline-offset: 2px; }
.an-datebar .ia-custom { margin-left: 0; }
/* Seven ranges stay on one row; on narrow screens the row swipes sideways (like the section buttons) */
.an-datebar .tb-seg { flex-wrap: nowrap; max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.an-datebar .tb-seg::-webkit-scrollbar { display: none; }
.an-datebar .tb-seg button { flex-shrink: 0; }
/* Rows */
.an-row { display: grid; gap: var(--sp-3); }
.an-row-hero { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: stretch; }
.an-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Closed-within-30 ring */
.an-ringrow { display: flex; align-items: center; gap: 16px; }
.an-ringrow .iv-ring { width: 84px; height: 84px; --tc: var(--cyan); }
.an-ringrow .iv-ring::before { inset: 9px; }
.an-ringrow .iv-ring span { font-size: 1.15rem; }
.an-ringrow .iv-ring.r-good { --tc: var(--emerald); }
.an-ringrow .iv-ring.r-mid { --tc: var(--amber); }
.an-ringrow .iv-ring.r-low { --tc: var(--pink); }
.an-ringtxt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.an-ringtxt b { font-size: .92rem; }
.an-ringtxt small { font-size: .74rem; color: var(--faint); line-height: 1.45; }
/* Order behaviour: one bar split by order type */
.an-mix { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line); margin: 6px 0 12px; }
.an-mix i { display: block; height: 100%; background: var(--tc); flex: 0 0 auto; }
.an-mix i:last-child { flex: 1 1 auto; }
.an-mixlegend { display: flex; flex-direction: column; gap: 8px; }
.an-mixlegend div { display: flex; align-items: center; gap: 10px; font-size: .84rem; }
.an-mixlegend i { width: 10px; height: 10px; border-radius: 3px; background: var(--tc); flex-shrink: 0; }
.an-mixlegend span { color: var(--soft); flex: 1; }
.an-mixlegend b { font-weight: 800; }
.an-mixlegend small { color: var(--faint); font-weight: 600; width: 44px; text-align: right; }
.mx-dinein { --tc: var(--chart-1); }
.mx-takeaway { --tc: var(--chart-2); }
.mx-other { --tc: var(--chart-4); }
/* Popular items */
.an-pop { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.an-pop li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.an-pop li:last-child { border-bottom: 0; }
.an-pop .rk { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: var(--accent-text); background: color-mix(in srgb, var(--cyan) 12%, transparent); }
.an-pop li:first-child .rk { color: var(--ink); background: var(--cyan); }
.an-pop .nm { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.an-pop .nm b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-pop .nm small { font-size: .74rem; color: var(--faint); }
.an-pop .rev { font-weight: 800; font-size: .88rem; white-space: nowrap; }
.an-pop .empty { display: block; padding: 24px 0; text-align: center; color: var(--faint); font-size: .84rem; border: 0; }
/* Export menu */
.an-export { position: relative; }
.an-export .chev { width: 14px; height: 14px; margin-left: 2px; transition: transform .15s ease; }
.an-export [aria-expanded="true"] .chev { transform: rotate(180deg); }
.an-exportmenu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 300px; max-width: calc(100vw - 32px); padding: 6px; border-radius: var(--r-card); background: var(--card-2); border: 1px solid var(--line); box-shadow: var(--shadow-2); animation: ck-modal-in .16s ease; }
.an-exsec { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.an-exsec + .an-exsec { border-top: 1px solid var(--line-soft); }
.an-exsec b { font-size: .86rem; }
.an-exsec small { font-size: .74rem; color: var(--faint); margin-top: -6px; }
.an-exrow { display: flex; gap: 8px; }
.an-exrow > * { flex: 1; }
.an-exrow .ck-select { min-width: 0; }

@media (max-width: 1100px) {
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-row-hero { grid-template-columns: 1fr; }
  .an-row-3 { grid-template-columns: 1fr 1fr; }
  .an-row-3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .an-row-3 { grid-template-columns: 1fr; }
  .an-switch { margin-left: 0; }
}
@media (max-width: 560px) {
  .an-kpis { gap: 10px; }
  .an-kpi { padding: 12px; }
  .an-kpi .ic { display: none; }
  .an-kpi .val { font-size: 1.25rem; }
  .an-kpi .lbl em { display: block; margin: 0; }
  .an-export { width: 100%; }
  .an-export > .ck-btn { width: 100%; justify-content: center; }
  .an-exportmenu { left: 0; right: 0; width: auto; }
}
.an-exsec small.an-caveat { margin-top: 0; color: var(--amber); }

/* Ready → Served card */
.an-rts { display: flex; flex-direction: column; gap: 14px; }
.an-rts-main { display: flex; flex-direction: column; gap: 2px; }
.an-rts-main b { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.an-rts-main small { font-size: .76rem; color: var(--faint); font-weight: 600; }
.an-rts-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.an-rts-split > div { display: grid; grid-template-columns: 10px 1fr; column-gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.an-rts-split i { width: 10px; height: 10px; border-radius: 3px; background: var(--tc); grid-row: 1 / span 2; }
.an-rts-split small { font-size: .72rem; color: var(--soft); font-weight: 700; }
.an-rts-split b { font-size: 1.05rem; font-weight: 800; }
.an-rts-split.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 400px) { .an-rts-split.three { grid-template-columns: 1fr 1fr; } }
/* Analytics — money, channels, pairs, turnover, delivery timeline */
.an-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.an-bar > i { display: block; height: 100%; border-radius: 4px; background: var(--tc, var(--chart-1)); }
.an-empty { margin: 0; padding: 20px 0; text-align: center; color: var(--faint); font-size: .84rem; }
.an-flow { display: flex; flex-direction: column; gap: 14px; }
.an-flowrow { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: baseline; }
.an-flowrow span { font-size: .84rem; color: var(--soft); font-weight: 600; }
.an-flowrow b { font-size: .95rem; font-weight: 800; white-space: nowrap; }
.an-flowrow .an-bar { grid-column: 1 / -1; }
.an-flowrow.start { --tc: var(--soft); }
.an-flowrow.minus { --tc: var(--chart-5); }
.an-flowrow.minus b { color: var(--pink); }
.an-flowrow.total { --tc: var(--chart-3); padding-top: 12px; border-top: 1px dashed var(--line); }
.an-flowrow.total span { color: var(--fg); }
.an-flowrow.total b { font-size: 1.2rem; color: var(--emerald); }
.an-flownote { margin: 14px 0 0; font-size: .76rem; color: var(--faint); line-height: 1.5; }
.an-channels { display: flex; flex-direction: column; gap: 16px; }
.an-channel { display: flex; flex-direction: column; gap: 8px; }
.an-channel .top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.an-channel .top > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.an-channel .top small { font-size: .72rem; color: var(--faint); }
.an-channel .top b { font-size: .9rem; }
.an-channel .rev { text-align: right; align-items: flex-end; }
.an-channel .meta { display: flex; gap: 14px; font-size: .74rem; color: var(--soft); font-weight: 600; }
.ch-counter { --tc: var(--chart-1); }
.ch-qr { --tc: var(--chart-2); }
.ch-app { --tc: var(--chart-4); }
.an-pairs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.an-pairs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.an-pairs li:last-child { border-bottom: 0; }
.an-pairs .pr { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; font-size: .86rem; }
.an-pairs .pr span { color: var(--accent-text); font-weight: 800; }
.an-pairs .ct { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.an-pairs .ct b { font-size: 1rem; font-weight: 800; }
.an-pairs .ct small { font-size: .7rem; color: var(--faint); }
.an-pairs .empty { display: block; padding: 20px 0; text-align: center; color: var(--faint); font-size: .84rem; border: 0; }
.an-deliv { display: flex; flex-direction: column; gap: 14px; }
.an-delivtop b { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.an-delivtop small { font-size: .76rem; color: var(--faint); font-weight: 600; }
.an-delivbar { display: flex; gap: 3px; height: 16px; border-radius: 8px; overflow: hidden; }
.an-delivbar i { display: block; height: 100%; background: var(--tc); flex: 0 0 auto; }
.an-delivbar i:last-child { flex: 1 1 auto; }
.an-delivlegend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.an-delivlegend > div { display: grid; grid-template-columns: 10px 1fr; column-gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.an-delivlegend i { width: 10px; height: 10px; border-radius: 3px; background: var(--tc); grid-row: 1 / span 2; }
.an-delivlegend span { font-size: .72rem; color: var(--soft); font-weight: 700; }
.an-delivlegend b { font-size: 1.05rem; font-weight: 800; }
.dv-assign { --tc: var(--chart-2); }
.dv-out { --tc: var(--chart-4); }
.dv-drive { --tc: var(--chart-1); }
@media (max-width: 700px) { .an-delivlegend { grid-template-columns: 1fr; } }

/* Analytics PDF report: printed on white. analytics.js reads these (and --chart-*) for the
   report's text, rules and bands, so no colour is written in the script. */
:root {
  --pdf-ink: #0f172a;
  --pdf-soft: #475569;
  --pdf-muted: #94a3b8;
  --pdf-line: #e2e8f0;
  --pdf-band: #f1f5f9;
}

/* ══ 37. QR Codes (table and takeaway QR) ══════════════════════════
   QR codes are drawn black on white by the library; --qr-paper is the white
   tile they sit on, in both themes, so scanners always get full contrast. */
:root { --qr-paper: #ffffff; }
.qr-page { display: flex; flex-direction: column; gap: var(--sp-4); }
/* Title block shares the row with the icon on phones (QR and Settings headers) */
:is(.qr-page, .st-page) .ck-greet > div:first-of-type { flex: 1 1 200px; min-width: 0; }
.qr-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-box { display: grid; place-items: center; padding: 10px; border-radius: 12px; background: var(--qr-paper); width: fit-content; margin-inline: auto; box-shadow: var(--shadow-1); }
.qr-box img, .qr-box canvas { display: block; }
.qr-box.sm { padding: 6px; border-radius: 8px; }
.qr-box.lg { padding: 14px; border-radius: 16px; }
/* How it works (collapsible) */
.qr-how { border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line-soft); }
.qr-how > summary { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; list-style: none; }
.qr-how > summary::-webkit-details-marker { display: none; }
.qr-how > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--soft); border-bottom: 2px solid var(--soft); transform: rotate(45deg); transition: transform var(--transition); align-self: center; }
.qr-how[open] > summary::after { transform: rotate(-135deg); }
.qr-how > summary b { font-size: .95rem; }
.qr-how > summary span { font-size: .8rem; color: var(--soft); }
.qr-howbody { display: flex; gap: var(--sp-5); align-items: center; padding: 0 18px 18px; }
.qr-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.qr-steps li { counter-increment: step; position: relative; padding: 12px 12px 12px 44px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; }
.qr-steps li::before { content: counter(step); position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: var(--ink); background: var(--cyan); }
.qr-steps b { font-size: .82rem; }
.qr-steps span { font-size: .74rem; color: var(--soft); line-height: 1.4; }
.qr-sample { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.qr-sample figcaption { font-size: .72rem; color: var(--faint); }
/* Takeaway QR */
.qr-takeaway { display: flex; align-items: center; gap: var(--sp-5); padding: var(--sp-5); border-radius: var(--r-card); background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 10%, var(--card)), var(--card) 60%); border: 1px solid color-mix(in srgb, var(--cyan) 35%, var(--line-soft)); box-shadow: var(--shadow-1); }
.qr-takeaway .qr-box { margin: 0; flex-shrink: 0; }
.qr-twtext { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qr-twtext .ck-badge-soft { width: fit-content; display: inline-flex; align-items: center; gap: 6px; }
.qr-twtext .ck-badge-soft svg { width: 13px; height: 13px; }
.qr-twtext h2 { font-size: 1.2rem; font-weight: 800; margin: 0; }
.qr-twtext p { margin: 0; font-size: .86rem; color: var(--soft); line-height: 1.55; max-width: 60ch; }
.qr-twtext p b { color: var(--fg); }
.qr-mute { color: var(--faint) !important; }
.qr-twacts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
/* Table QR grid */
.qr-sec { display: flex; flex-direction: column; gap: var(--sp-3); }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-3); }
.qr-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line-soft); box-shadow: var(--shadow-1); transition: border-color var(--transition), transform var(--transition); }
.qr-card:hover { border-color: color-mix(in srgb, var(--cyan) 45%, var(--line-soft)); transform: translateY(-1px); }
.qr-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qr-card h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.qr-meta { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; color: var(--soft); padding: 3px 9px; border-radius: var(--r-pill); background: var(--bg-raise); }
.qr-meta svg, .qr-where svg { width: 13px; height: 13px; }
.qr-where { display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: .78rem; font-weight: 600; color: var(--fg); }
.qr-where.unset { color: var(--faint); font-weight: 500; }
.qr-card > .ck-btn { justify-content: center; }
.qr-cardmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* Card previews: the real A6 Midnight card (336 × 474) scaled down */
.qr-mini { --s: .6; width: calc(336px * var(--s)); height: calc(474px * var(--s)); margin-inline: auto; flex-shrink: 0; }
.qr-mini > .qp-paper { max-width: none; transform: scale(var(--s)); transform-origin: top left; box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.qr-mini.lg { --s: .72; margin: 0; }
.qr-tone button { min-width: 64px; }
.qr-empty { border-radius: var(--r-card); background: var(--card); border: 1px dashed var(--line); }
@media (max-width: 760px) {
  .qr-howbody { flex-direction: column; align-items: stretch; }
  .qr-steps { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .qr-steps li { padding: 9px 10px 9px 40px; }
  .qr-steps li::before { top: 9px; left: 10px; }
  .qr-sample { flex-direction: row; justify-content: center; }
  .qr-takeaway { flex-direction: column; align-items: stretch; text-align: left; }
  .qr-takeaway .qr-box, .qr-mini.lg { margin-inline: auto; }
}
@media (max-width: 560px) {
  .qr-acts { width: 100%; }
  .qr-acts .ck-btn { flex: 1; justify-content: center; }
  .qr-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .qr-mini { --s: .43; }
  .qr-card > .ck-btn { font-size: .72rem; padding-inline: 6px; }
  .qr-cardmeta { flex-direction: column; align-items: center; gap: 4px; }
  .qr-card { padding: 12px; gap: 10px; }
}

/* ══ 37b. Midnight QR card (the downloadable QR design) ═════════════
   One A6 card in two fixed colours: black (default — inverted code, white
   squares on black) and white. The restaurant's logo is the only colour; the
   QR and Cheqkr pieces read --mn-* and --qp-paper. Preview size is 336 × 474
   (A6 at 3.2 px/mm); downloads repaint it at 300 dpi from these styles. */
:root { --mn-black: #0b0b0c; --mn-white: #ffffff; --mn-grey: #8a8f98; --qp-paper: #ffffff; --qp-ink: #0f172a; }
.qp-paper { border-radius: 6px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.3); max-width: 100%; }
.qp-a6 { width: 336px; height: 474px; }
.qp-card { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--qp-paper); color: var(--qp-ink); font-family: var(--font); }
.qp-qr { --qp-qr: 150; position: relative; width: fit-content; margin-inline: auto; padding: 10px; border-radius: 14px; background: var(--qp-paper); }
.qp-qrcode { width: calc(var(--qp-qr) * 1px); aspect-ratio: 1; }
.qp-qrcode img, .qp-qrcode canvas { display: block; width: 100%; height: auto; }
/* Show the drawn canvas, never the library's <img> copy: qrcodejs skips making the <img> on
   current Android (it misreads "Android 13" as an old version) and, elsewhere, hides the canvas
   inline once its copy is ready — !important keeps the canvas on every browser. */
.qp-qrcode canvas { display: block !important; }
.qp-qrcode img { display: none !important; }
.qp-qrlogo { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 22%; background: var(--qp-paper); box-shadow: 0 0 0 3px var(--qp-paper); }
.qp-qrlogo img { width: 82%; height: 82%; object-fit: contain; }
.mn { --mn-bg: var(--mn-black); --mn-fg: var(--mn-white); padding: 12px; background: var(--mn-bg); color: var(--mn-fg); }
.mn.white { --mn-bg: var(--mn-white); --mn-fg: var(--mn-black); }
.mn-frame { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 18px 14px 12px; border: 1.5px solid var(--mn-fg); border-radius: 10px; text-align: center; }
.mn-logo { width: 78px; height: 78px; border-radius: 18px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 2px var(--mn-fg); }
.mn-mono { display: grid; place-items: center; font-size: 1.7rem; font-weight: 800; letter-spacing: .04em; color: var(--mn-bg); background: var(--mn-fg); }
.mn-name { font-size: 1.3rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mn-kicker { margin: 0; font-size: .64rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--mn-fg); }
.mn .qp-qr { --qp-qr: 164; margin-top: 4px; box-shadow: 0 0 0 2px var(--mn-fg); }
.mn-label { margin-top: 4px; font-size: .86rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.mn-foot { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: .7rem; font-weight: 600; color: var(--mn-grey); }
.mn-cq { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 5px; border-radius: 999px; background: var(--mn-black); }
.mn.black .mn-cq { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mn-white) 35%, transparent); }
.mn-cq img { width: 16px; height: 16px; }
.mn-cq b { font-size: .78rem; font-weight: 700; color: var(--mn-white); letter-spacing: -.01em; }
.mn.white .qp-qrlogo { background: var(--mn-black); box-shadow: 0 0 0 3px var(--qp-paper); }
.mn.black .qp-qr { background: var(--mn-black); box-shadow: 0 0 0 2px var(--mn-white); }
.mn.black .qp-qrlogo { background: var(--mn-black); box-shadow: 0 0 0 3px var(--mn-black); }
@media (max-width: 380px) { .qr-grid { grid-template-columns: minmax(0, 1fr); } .qr-mini { --s: .6; } }
/* Full-size card laid out off screen while a download is painted from it */
.qr-paintroom { position: fixed; left: -10000px; top: 0; pointer-events: none; }
/* Both colours are laid out on the QR page; the Black/White switch shows one set */
.qr-page[data-tone="black"] .tone-white, .qr-page[data-tone="white"] .tone-black { display: none; }
/* A code not drawn yet: spinner in its slot (the Cheqkr tile appears with the code) */
.qp-qr:not([data-squares]) .qp-qrlogo { visibility: hidden; }
.qp-qr:not([data-squares]) .qp-qrcode { display: grid; place-items: center; }
.qp-qr:not([data-squares]) .qp-qrcode::after { content: ""; width: 24%; aspect-ratio: 1; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--mn-fg) 22%, transparent); border-top-color: var(--mn-fg); animation: qr-spin .8s linear infinite; }
/* Download buttons while the print-ready image is made */
.qr-page .ck-btn[aria-busy="true"] { cursor: progress; }
.qr-page .ck-btn[aria-busy="true"] svg { display: none; }
.qr-page .ck-btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: qr-spin .7s linear infinite; }
@keyframes qr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qp-qr:not([data-squares]) .qp-qrcode::after, .qr-page .ck-btn[aria-busy="true"]::before { animation-duration: 2.4s; } }

/* ══ 39. Sign-in and application pages (restaurant login, staff login, join) ═══
   Full-screen, no sidebar. Login pages: brand panel on the left, form card on
   the right (phones: the card alone). Application: one wide card in sections. */
:root { --g-blue: #4285F4; --g-green: #34A853; --g-yellow: #FBBC05; --g-red: #EA4335; }
.au-body { min-height: 100vh; background: var(--bg); }
.au-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.au-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-6); padding: 40px clamp(28px, 5vw, 64px); background: radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--cyan) 8%, transparent), transparent 60%), radial-gradient(70% 55% at 20% 100%, color-mix(in srgb, var(--blue) 5%, transparent), transparent 55%), linear-gradient(90deg, rgb(0 0 0 / .3) 0%, rgb(0 0 0 / .13) 55%, transparent 100%); }
.au-brand::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(55% 55% at 28% 40%, #000, transparent); opacity: .55; }
.au-brand > * { position: relative; z-index: 1; }
.au-logo { height: 44px; width: auto; align-self: flex-start; }
.au-pitch { max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.au-pitch h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; }
.au-pitch p { margin: 0; color: var(--soft); font-size: 1rem; line-height: 1.55; }
.au-copy { color: var(--faint); font-size: .74rem; }
/* Product preview on the brand panel (decorative, sample figures) */
.au-preview { position: relative; height: 270px; margin-top: 18px; max-width: 440px; }
.au-pv { position: absolute; border-radius: 14px; background: var(--card); border: 1px solid var(--line-soft); box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.au-pv-order { left: 0; top: 0; width: 250px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; border-left: 3px solid var(--st-preparing); }
.au-pv-order .pv-top { display: flex; align-items: center; justify-content: space-between; }
.au-pv-order .pv-top b { font-size: 1rem; }
.pv-st { font-size: .68rem; font-weight: 800; padding: 3px 9px; border-radius: var(--r-pill); color: var(--st-preparing); background: color-mix(in srgb, var(--st-preparing) 15%, transparent); }
.au-pv-order ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: .82rem; color: var(--fg); }
.au-pv-order li span { color: var(--faint); font-weight: 700; margin-right: 4px; }
.pv-foot { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: .7rem; color: var(--faint); }
.pv-foot b { font-size: .9rem; color: var(--fg); }
.au-pv-sales { right: 0; top: 64px; width: 200px; padding: 14px 16px 0; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.au-pv-sales small { font-size: .7rem; color: var(--soft); font-weight: 700; }
.au-pv-sales b { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.pv-up { font-size: .72rem; color: var(--emerald); font-weight: 700; }
.pv-spark { width: calc(100% + 32px); height: 46px; margin: 8px -16px 0; display: block; }
.pv-area { fill: color-mix(in srgb, var(--cyan) 18%, transparent); }
.pv-line { fill: none; stroke: var(--cyan); stroke-width: 2; vector-effect: non-scaling-stroke; }
.au-pv-inv { left: 34px; bottom: 0; width: 236px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.pv-invtop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pv-invtop small { font-size: .7rem; color: var(--soft); font-weight: 700; }
.pv-invtop b { font-size: .8rem; color: var(--emerald); }
.au-pv-inv ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.au-pv-inv li { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 8px; font-size: .74rem; }
.au-pv-inv li span { color: var(--fg); font-weight: 600; }
.au-pv-inv em { font-style: normal; font-size: .68rem; color: var(--soft); font-weight: 700; white-space: nowrap; }
.au-pv-inv em.low { color: var(--amber); }
.pv-bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.pv-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--emerald); }
.pv-bar.low > i { background: var(--amber); }
@media (max-width: 1100px) { .au-preview { transform: scale(.88); transform-origin: left top; } }
/* Form side */
.au-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); }
.au-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 18px; padding: 30px 28px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-soft); box-shadow: var(--shadow-2); }
.au-cardlogo { display: none; height: 34px; width: auto; align-self: center; }
.au-block { display: flex; flex-direction: column; gap: 18px; }
.au-head { display: flex; flex-direction: column; gap: 4px; }
.au-head h2 { margin: 4px 0 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.au-head p { margin: 0; color: var(--soft); font-size: .88rem; }
.au-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 800; color: var(--accent-text); background: color-mix(in srgb, var(--cyan) 12%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); }
.au-badge svg { width: 13px; height: 13px; }
.au-form { display: flex; flex-direction: column; gap: 14px; }
.au-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.au-labelrow > label { font-size: .8rem; font-weight: 600; color: var(--soft); }
.au-labelrow a, .au-links a, .au-mute a { color: var(--accent-text); font-weight: 700; text-decoration: none; font-size: .8rem; }
.au-labelrow a:hover, .au-links a:hover, .au-mute a:hover { text-decoration: underline; }
.au-req { color: var(--pink); }
.au-hint { font-size: .74rem; color: var(--soft); line-height: 1.4; }
/* Input with a leading icon */
.au-ic { position: relative; }
.au-ic > svg { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.au-ic > .ck-input { padding-left: 40px; width: 100%; }
/* Password with show / hide */
.au-pw { position: relative; }
.au-pw > .ck-input { width: 100%; padding-right: 46px; }
.au-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--faint); cursor: pointer; }
.au-eye svg { width: 17px; height: 17px; }
.au-eye:hover, .au-eye[aria-pressed="true"] { color: var(--accent-text); background: var(--bg-raise); }
.au-eye:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.au-check { display: inline-flex; align-items: center; gap: 9px; font-size: .84rem; color: var(--fg); cursor: pointer; width: fit-content; }
.au-check input { width: 16px; height: 16px; accent-color: var(--cyan); margin: 0; }
.au-submit { padding-block: 12px; font-size: .95rem; }
.au-or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.au-google { justify-content: center; gap: 10px; padding-block: 11px; }
.au-g { width: 18px; height: 18px; }
.au-g .g1 { fill: var(--g-blue); } .au-g .g2 { fill: var(--g-green); } .au-g .g3 { fill: var(--g-yellow); } .au-g .g4 { fill: var(--g-red); }
.au-links { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: .82rem; color: var(--soft); text-align: center; }
.au-links.center { border-top: 0; }
.au-links > a { display: inline-flex; align-items: center; gap: 6px; }
.au-links svg { width: 14px; height: 14px; }
.au-alert { padding: 11px 13px; border-radius: var(--r-ctl); font-size: .84rem; font-weight: 600; color: var(--pink); background: color-mix(in srgb, var(--pink) 12%, transparent); border: 1px solid color-mix(in srgb, var(--pink) 35%, transparent); }
.au-mute { margin: 0; font-size: .84rem; color: var(--soft); line-height: 1.5; }
.au-mute b { color: var(--fg); }
/* Email verification step (restaurant login) */
.au-verify { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.au-verify h2 { margin: 6px 0 0; font-size: 1.3rem; font-weight: 800; }
.au-verify > p { margin: 0; font-size: .88rem; color: var(--soft); }
.au-verifyic { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; color: var(--accent-text); background: color-mix(in srgb, var(--cyan) 14%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); }
.au-verifyic svg { width: 28px; height: 28px; }
.au-stack { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 8px; }
.au-textbtn { border: 0; background: none; color: var(--soft); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; padding: 8px; }
.au-textbtn:hover { color: var(--fg); }
/* Staff login: honeypot stays invisible to people; help note; signing-in state */
.au-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.au-help { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.au-help > svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent-text); margin-top: 1px; }
.au-help div { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: var(--soft); line-height: 1.45; }
.au-help b { color: var(--fg); font-size: .84rem; }
.au-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 0; }
.au-loading p { margin: 0; color: var(--soft); font-size: .9rem; }
.au-spin { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--cyan); animation: au-spin .8s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }
/* ── Application ── */
.au-apply { display: flex; flex-direction: column; align-items: center; gap: var(--sp-4); padding: 24px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); background: radial-gradient(80% 40% at 50% 0%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent 70%), var(--bg); }
.au-applyhead { width: 100%; max-width: 820px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.au-wide { width: 100%; max-width: 820px; display: flex; flex-direction: column; gap: var(--sp-4); }
.au-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-card); border: 1px solid; flex-wrap: wrap; }
.au-banner > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; font-size: .84rem; color: var(--soft); }
.au-banner > div b { color: var(--fg); font-size: .95rem; }
.au-banneric { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; flex-shrink: 0; }
.au-banneric svg { width: 19px; height: 19px; }
.au-banner > a.ck-btn { text-decoration: none; }
.au-banner.warn { background: color-mix(in srgb, var(--amber) 10%, var(--card)); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.au-banner.warn .au-banneric { color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, transparent); }
.au-banner.ok { background: color-mix(in srgb, var(--emerald) 10%, var(--card)); border-color: color-mix(in srgb, var(--emerald) 40%, transparent); }
.au-banner.ok .au-banneric { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 16%, transparent); }
.au-intro { text-align: center; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.au-intro h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; }
.au-intro p { margin: 0; color: var(--soft); }
.au-formcard { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 26px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-soft); box-shadow: var(--shadow-2); }
.au-formcard > h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.au-sec { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--r-card); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.au-sec > header { display: flex; align-items: center; gap: 10px; }
.au-sec h3 { margin: 0; font-size: .98rem; font-weight: 800; }
.au-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .76rem; font-weight: 800; color: var(--ink); background: var(--cyan); flex-shrink: 0; }
.au-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3) var(--sp-4); }
.au-note { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; }
.au-note svg { width: 13px; height: 13px; }
.au-note.ok { color: var(--emerald); }
.au-note.warn { color: var(--amber); }
.au-formcard.locked .ck-modal.sm { max-width: 400px; }
.au-success .ck-modal-body { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding-block: 28px; }
.au-success h3 { margin: 4px 0 0; font-size: 1.3rem; font-weight: 800; }
.au-success p { margin: 0 0 8px; color: var(--soft); font-size: .9rem; line-height: 1.5; }
.au-successic { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--emerald); box-shadow: 0 0 0 8px color-mix(in srgb, var(--emerald) 18%, transparent); }
.au-successic svg { width: 30px; height: 30px; }
@media (max-width: 880px) {
  .au-page:not(.au-apply) { grid-template-columns: minmax(0, 1fr); }
  .au-brand { display: none; }
  .au-cardlogo { display: block; }
}
@media (max-width: 560px) {
  .au-card { padding: 24px 18px; border-radius: 16px; }
  .au-formcard { padding: 18px 14px; }
  .au-sec { padding: 14px; }
  .au-sec .ck-formgrid, .au-three { grid-template-columns: minmax(0, 1fr); }
  .au-formcard.locked }

/* Elements the page scripts show by setting display (messages, spinners, the email step) start hidden */
.au-start-hidden { display: none; }
/* Restaurant login: success message and the full-page "working" spinner */
.au-alert.ok { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 12%, transparent); border-color: color-mix(in srgb, var(--emerald) 35%, transparent); }
.au-alert i { margin-right: 6px; }
.au-busy { position: fixed; inset: 0; z-index: 1080; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.au-busy .spinner-border { color: var(--cyan); }
/* Staff login: the eye icon is Font Awesome (staff-login.js swaps its class) */
.au-eye i { font-size: .95rem; }
.au-loading .spinner-border { color: var(--cyan); width: 38px; height: 38px; }
/* Application: Bootstrap form markup (its validation and the shared OTP pop-up use it), in the kit's look */
.au-apply .au-sec .row { --bs-gutter-x: var(--sp-4); --bs-gutter-y: var(--sp-3); }
.au-apply .form-label { font-size: .8rem; font-weight: 600; color: var(--soft); margin-bottom: 6px; }
.au-apply .form-text { font-size: .74rem; color: var(--soft); }
.au-apply .invalid-feedback { font-size: .74rem; font-weight: 600; color: var(--pink); }
.au-apply .was-validated .form-control:invalid, .au-apply .form-control.is-invalid,
.au-apply .was-validated .form-select:invalid, .au-apply .form-select.is-invalid { border-color: var(--pink); }
.au-apply .was-validated .form-control:valid, .au-apply .form-control.is-valid,
.au-apply .was-validated .form-select:valid, .au-apply .form-select.is-valid { border-color: color-mix(in srgb, var(--emerald) 60%, var(--line)); }
.au-apply .form-control[readonly] { background: var(--bg-raise); color: var(--soft); cursor: not-allowed; }
.au-apply .input-group-text { font-weight: 700; color: var(--soft); }
.au-verifybtn { min-width: 118px; white-space: nowrap; }
.au-upper { text-transform: uppercase; }
.au-note { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; margin-top: 6px; }
.au-note.ok { color: var(--emerald); }
.au-note.warn { color: var(--amber); }
/* Operating days: restaurant-interest.js builds Bootstrap checkboxes; shown here as chips */
.au-days { display: flex; flex-wrap: wrap; gap: 8px; }
.au-days .form-check { margin: 0; padding: 0; }
.au-days .form-check-input { position: absolute; opacity: 0; pointer-events: none; }
.au-days .form-check-label { display: inline-flex; padding: 7px 13px; border-radius: var(--r-pill); font-size: .8rem; font-weight: 700; color: var(--soft); background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition); }
.au-days .form-check-input:checked + .form-check-label { color: var(--ink); background: var(--cyan); border-color: var(--cyan); }
.au-days .form-check-input:focus-visible + .form-check-label { outline: 2px solid var(--cyan); outline-offset: 2px; }
.au-floaterr { position: fixed; right: 20px; bottom: 20px; z-index: 1090; max-width: min(420px, calc(100vw - 40px)); }
/* Shared phone-OTP pop-up (js/components/applicant-phone-otp.js): bigger, spaced code box */
.au-body #otpModal #otpInput { font-size: 1.5rem; letter-spacing: .5em; font-weight: 800; text-align: center; }
.au-body #otpModal .modal-title { font-weight: 800; }
/* Success pop-up */
.au-body #successModal .modal-body { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 28px; }
.au-body #successModal h4 { margin: 4px 0 0; font-size: 1.3rem; font-weight: 800; }
.au-body #successModal p { margin: 0 0 8px; color: var(--soft); font-size: .9rem; line-height: 1.5; }
@media (max-width: 560px) {
  .au-apply .au-sec .row > [class*="col-md"] { flex: 0 0 100%; max-width: 100%; }
  .au-floaterr { left: 16px; right: 16px; bottom: 16px; }
}
/* The application form is shown with display: block by the page script, so its sections are spaced with margins */
.au-apply .au-formcard.au-form > * + * { margin-top: 16px; }

/* Restaurant application, step 1 (restaurant-email-verification.html) */
.au-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 700; color: var(--faint); }
.au-steps li { display: flex; align-items: center; gap: 8px; }
.au-steps li + li::before { content: ""; width: 36px; height: 2px; border-radius: 2px; background: var(--line); margin-right: 2px; }
.au-steps .au-num { color: var(--soft); background: var(--bg-raise); border: 1px solid var(--line); }
.au-steps li.on { color: var(--fg); }
.au-steps li.on .au-num { color: var(--ink); background: var(--cyan); border-color: var(--cyan); }
.au-lead { display: flex; flex-direction: column; gap: 4px; }
.au-lead h3, .au-sent h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.au-lead p { margin: 0; color: var(--soft); font-size: .84rem; line-height: 1.5; }
.au-sent { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 20px 16px; border-radius: var(--r-card); background: color-mix(in srgb, var(--emerald) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--emerald) 35%, transparent); }
.au-sent .au-successic { width: 52px; height: 52px; }
.au-sent .au-successic svg { width: 24px; height: 24px; }
.au-sent p { margin: 0; color: var(--soft); font-size: .84rem; line-height: 1.5; }
.au-sent p b { color: var(--fg); word-break: break-all; }
.au-nextsteps { display: flex; flex-direction: column; gap: 8px; font-size: .84rem; }
.au-nextsteps ol { margin: 0; padding: 0; list-style: none; counter-reset: au-step; display: flex; flex-direction: column; gap: 8px; }
.au-nextsteps li { counter-increment: au-step; display: flex; align-items: center; gap: 10px; color: var(--soft); }
.au-nextsteps li::before { content: counter(au-step); width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-size: .72rem; font-weight: 800; color: var(--accent-text); background: color-mix(in srgb, var(--cyan) 14%, transparent); }
.au-help.warn > svg { color: var(--amber); }
.au-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.au-actions .ck-btn svg, .au-submit svg { width: 16px; height: 16px; }
.au-textbtn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; background: none; color: var(--accent-text); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; border-radius: var(--r-ctl); }
.au-textbtn:hover { color: var(--fg); }
.au-textbtn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.au-textbtn svg { width: 14px; height: 14px; }
/* Live page: the script shows these sections with display: block, so they space their children with margins */
.au-flow > * + * { margin-top: 18px; }
.au-busyline { text-align: center; padding: 6px 0; }
.au-busyline .spinner-border { color: var(--cyan); }

/* Staff login preview: kitchen ticket and table status (colours as on the Tables page) */
.pv-st.ok { color: var(--st-ready); background: color-mix(in srgb, var(--st-ready) 15%, transparent); }
.au-pv-kot { right: 0; top: 30px; width: 200px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; border-left: 3px solid var(--st-ready); }
.au-pv-kot .pv-top { display: flex; align-items: center; justify-content: space-between; }
.au-pv-kot .pv-top b { font-size: .95rem; }
.au-pv-kot small { font-size: .7rem; color: var(--soft); font-weight: 700; }
.au-pv-kot ul { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .8rem; }
.au-pv-kot li span { color: var(--faint); font-weight: 700; margin-right: 4px; }
.au-pv-tables { left: 34px; bottom: 0; width: 224px; padding: 11px 13px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.au-pv-tables .pv-invtop b { color: var(--cyan); }
.pv-tgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pv-tgrid i { font-style: normal; display: grid; place-items: center; height: 22px; border-radius: 7px; font-size: .7rem; font-weight: 800; color: var(--soft); background: var(--bg-raise); border: 1px solid var(--line); }
.pv-tgrid i.occ { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 14%, transparent); border-color: color-mix(in srgb, var(--cyan) 40%, transparent); }
.pv-tgrid i.res { color: var(--violet); background: color-mix(in srgb, var(--violet) 16%, transparent); border-color: color-mix(in srgb, var(--violet) 45%, transparent); }
.pv-tkey { display: flex; gap: 10px; font-size: .66rem; font-weight: 700; color: var(--soft); }
.pv-tkey span { display: inline-flex; align-items: center; gap: 4px; }
.pv-tkey span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pv-tkey span.occ::before { background: var(--cyan); }
.pv-tkey span.res::before { background: var(--violet); }
.au-preview.staff { height: 300px; }
.au-pitch p { text-wrap: pretty; }
@media (max-width: 480px) {
  .au-steps { gap: 7px; font-size: .74rem; }
  .au-steps li { gap: 6px; white-space: nowrap; }
  .au-steps li + li::before { width: 14px; }
  .au-steps .au-num { width: 22px; height: 22px; font-size: .7rem; }
}
@media (max-width: 359px) { .au-steps { flex-wrap: wrap; row-gap: 8px; } .au-steps li + li::before { display: none; } }
@media (max-width: 560px) { .au-applyhead { justify-content: center; } }


/* ══ 38. Settings (tabs + panes) — live 2026-10-30 ══════════════════════════════ */
   Left: sections grouped (Restaurant, Orders & printing, People, Your account,
   Coming soon). Right: one pane at a time, built from st-card blocks. Phones:
   the section list becomes one sideways-swiping row. */
.st-page { display: flex; flex-direction: column; gap: var(--sp-4); }
.st-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.st-nav { position: sticky; top: var(--sp-4); display: flex; flex-direction: column; gap: 14px; padding: 12px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line-soft); box-shadow: var(--shadow-1);
  /* Never taller than the window: a long list scrolls on its own while it stays in place */
  max-height: calc(100vh - 2 * var(--sp-4)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.st-navgroup { display: flex; flex-direction: column; gap: 2px; }
.st-navlabel { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 0 10px 4px; }
.st-navitem { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--soft); font: inherit; font-size: .84rem; font-weight: 600; text-align: left; cursor: pointer; transition: background var(--transition), color var(--transition); }
.st-navitem svg { width: 16px; height: 16px; flex-shrink: 0; }
.st-navitem:hover:not(:disabled) { background: var(--bg-raise); color: var(--fg); }
.st-navitem.on { background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--accent-text); box-shadow: inset 3px 0 0 var(--cyan); }
.st-navitem:disabled { cursor: default; opacity: .45; }
.st-navitem:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.st-panes { min-width: 0; }
.st-pane { display: flex; flex-direction: column; gap: var(--sp-3); }
.st-panehead h2 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.st-panehead p { margin: 2px 0 0; font-size: .84rem; color: var(--soft); }
/* Cards */
.st-card { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line-soft); box-shadow: var(--shadow-1); min-width: 0; }
.st-card > header { display: flex; align-items: center; gap: 12px; }
.st-card > header h3 { margin: 0; font-size: .98rem; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-card > header p { margin: 2px 0 0; font-size: .78rem; color: var(--soft); }
.st-card.soon { border-style: dashed; }
.st-card.soon .ck-field, .st-card.soon .st-apps { opacity: .55; }
.st-headbtn { margin-left: auto; }
.st-soon { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-pill); font-size: .64rem; font-weight: 800; letter-spacing: .02em; color: var(--soft); background: var(--bg-raise); border: 1px solid var(--line); white-space: nowrap; }
.st-hint { font-size: .74rem; color: var(--faint); line-height: 1.45; }
.st-hint a { color: var(--accent-text); }
.st-note { margin: 0; font-size: .82rem; color: var(--soft); line-height: 1.5; }
.st-after { margin-top: 4px; }
.st-labelrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-labelrow > label:first-child { font-size: .8rem; font-weight: 600; color: var(--soft); display: inline-flex; align-items: center; gap: 8px; }
.st-print { color: var(--faint); }
.st-softfield { padding: 10px 12px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px dashed var(--line); }
.st-page .ck-input:disabled, .st-page .ck-select:disabled, .st-page .ck-input[readonly] { opacity: .65; cursor: not-allowed; }
/* Switch rows: title + explanation on the left, switch on the right */
.st-list { display: flex; flex-direction: column; }
.st-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.st-list > .st-switch:first-child { padding-top: 0; }
.st-list > .st-switch:last-child { border-bottom: 0; padding-bottom: 0; }
.st-switch .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-switch .txt b { font-size: .86rem; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-switch .txt span { font-size: .76rem; color: var(--soft); line-height: 1.45; max-width: 68ch; }
.st-switch .ck-toggle, .st-switch .ck-btn { flex-shrink: 0; }
.st-switch.soon .txt span, .st-switch.soon .ck-toggle { opacity: .55; }
.st-page .ck-toggle input:disabled + .track { cursor: not-allowed; }
.st-cardacts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.st-cardacts.left { justify-content: flex-start; }
.st-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-mute { color: var(--faint); }
/* Save bar sticks to the bottom of the screen while the pane scrolls */
.st-savebar { position: sticky; bottom: 0; z-index: 4; display: flex; justify-content: flex-end; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 60%, transparent); }
/* Logo */
.st-logo, .st-printlogo { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.st-logoimg { width: 84px; height: 84px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; letter-spacing: .04em; color: var(--accent-text); background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--cyan) 25%, var(--bg-raise)), var(--bg-raise)); border: 1px solid var(--line); }
.st-printlogoimg { width: 160px; height: 56px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; letter-spacing: .3em; color: var(--qr-paper); background: var(--ink); border: 1px solid var(--line); }
.st-logoacts { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; flex: 1; }
/* Delivery apps (coming soon) */
.st-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-app { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.st-app > b { font-size: .9rem; }
.st-app > .st-soon { align-self: flex-start; }
.st-app .ck-formgrid { grid-template-columns: 1fr; gap: 8px; }
/* User management */
.st-toolbar { display: flex; justify-content: space-between; align-items: center; }
.st-adduser { border-color: color-mix(in srgb, var(--cyan) 35%, var(--line-soft)); }
.st-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .84rem; margin-top: 4px; }
.st-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; }
.st-check { display: flex; align-items: flex-start; gap: 8px; font-size: .82rem; color: var(--fg); cursor: pointer; line-height: 1.4; }
.st-check input { accent-color: var(--cyan); width: 16px; height: 16px; margin: 1px 0 0; flex-shrink: 0; }
.st-table td { vertical-align: middle; }
.st-table td:first-child b { white-space: nowrap; }
.st-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 220px; }
.st-tag { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: var(--r-pill); background: var(--bg-raise); color: var(--soft); border: 1px solid var(--line-soft); white-space: nowrap; }
.st-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; }
.st-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-pill.on { color: var(--emerald); }
.st-pill.off { color: var(--faint); }
.st-rowacts { display: inline-flex; gap: 6px; }
/* System: printer */
.st-printer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.st-printer small { display: block; font-size: .72rem; color: var(--soft); }
.st-status { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; }
.st-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.st-status.ok::before { background: var(--emerald); box-shadow: 0 0 0 4px color-mix(in srgb, var(--emerald) 20%, transparent); }
/* Delivery map (Google Map on the live page) */
.st-map { position: relative; height: 220px; border-radius: var(--r-ctl); overflow: hidden; display: grid; place-items: center; background: repeating-linear-gradient(0deg, transparent 0 38px, var(--line-soft) 38px 39px), repeating-linear-gradient(90deg, transparent 0 38px, var(--line-soft) 38px 39px), var(--bg-raise); border: 1px solid var(--line); }
.st-mapring { position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 2px solid var(--blue); background: color-mix(in srgb, var(--blue) 14%, transparent); }
.st-mappin { position: absolute; color: var(--pink); transform: translateY(-12px); }
.st-mappin svg { width: 30px; height: 30px; fill: color-mix(in srgb, var(--pink) 30%, transparent); }
.st-map small { position: absolute; left: 10px; right: 10px; bottom: 8px; font-size: .7rem; color: var(--soft); text-align: center; }
/* Customers / referrals filters */
.st-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.st-filters .ck-select { width: auto; }
.st-search { position: relative; flex: 1 1 220px; min-width: 0; }
.st-search svg { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--faint); }
.st-search .ck-input { padding-left: 36px; width: 100%; }
/* App images */
.st-imggrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--sp-3); }
.st-photo { position: relative; margin: 0; border-radius: var(--r-ctl); overflow: hidden; background: var(--bg-raise); border: 1px solid var(--line); aspect-ratio: 1; max-width: 100%; }
.st-photo.sq { width: 160px; }
.st-photo.wide { aspect-ratio: 16 / 7; }
.st-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-photox { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 70%, transparent); color: var(--fg); cursor: pointer; }
.st-photox svg { width: 13px; height: 13px; }
.st-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.st-addphoto { aspect-ratio: 1; border-radius: var(--r-ctl); border: 1px dashed var(--line); background: transparent; color: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.st-addphoto:hover { color: var(--accent-text); border-color: var(--cyan); }
.st-addphoto svg { width: 20px; height: 20px; }
/* Referrals */
.st-refcode { flex-direction: row; align-items: center; justify-content: space-between; background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 12%, var(--card)), var(--card) 65%); border-color: color-mix(in srgb, var(--cyan) 35%, var(--line-soft)); }
.st-refcode small { display: block; font-size: .74rem; color: var(--soft); }
.st-refcode b { font-size: 1.5rem; font-weight: 800; letter-spacing: .08em; color: var(--accent-text); }
.st-refsteps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.st-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
@media (max-width: 1100px) {
  .st-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .st-apps { grid-template-columns: 1fr; }
  .st-stats { grid-template-columns: 1fr 1fr; }
  .st-refsteps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  .st-layout { grid-template-columns: minmax(0, 1fr); }
  .st-nav { position: static; flex-direction: row; gap: 6px; padding: 6px; max-height: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .st-nav::-webkit-scrollbar { display: none; }
  .st-navgroup { flex-direction: row; gap: 4px; flex-shrink: 0; }
  .st-navlabel { display: none; }
  .st-navgroup.soon { display: none; }
  .st-navitem { width: auto; white-space: nowrap; padding: 7px 12px; }
  .st-navitem.on { box-shadow: none; }
  .st-imggrid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .st-card { padding: var(--sp-4); }
  .st-card .ck-formgrid { grid-template-columns: minmax(0, 1fr); }
  .st-switch { align-items: flex-start; }
  .st-filters .ck-select { flex: 1 1 140px; }
  .st-refsteps { grid-template-columns: minmax(0, 1fr); }
  .st-refcode b { font-size: 1.2rem; }
  .st-savebar .ck-btn { width: 100%; justify-content: center; }
}


/* Settings · sections as tabs across the top (owner 2026-10-30): the main sidebar stays visible */
.st-layout { grid-template-columns: minmax(0, 1fr); }
.st-layout > * { min-width: 0; }
.st-nav { position: sticky; top: 0; z-index: 20; flex-direction: row; align-items: center; gap: 0; padding: 6px; max-height: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.st-nav::-webkit-scrollbar { display: none; }
.st-navgroup { flex-direction: row; align-items: center; gap: 2px; flex-shrink: 0; }
.st-navgroup + .st-navgroup { margin-left: 6px; padding-left: 6px; border-left: 1px solid var(--line); }
.st-navlabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; }
.st-navitem { width: auto; white-space: nowrap; padding: 8px 11px; }
.st-navitem.on { box-shadow: inset 0 -2px 0 var(--cyan); }
.st-navgroup.soon { margin-left: auto; }
.st-soonbtn { color: var(--faint); }
.st-soonbtn .st-chev { width: 14px; height: 14px; transition: transform var(--transition); }
.st-soonbtn[aria-expanded="true"] .st-chev { transform: rotate(180deg); }
.st-soonmenu { position: fixed; z-index: 60; min-width: 200px; padding: 8px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 2px; }
.st-soonmenu[hidden] { display: none; }
.st-soonmenu p { margin: 2px 8px 6px; font-size: .7rem; font-weight: 700; color: var(--faint); }
.st-soonmenu .st-navitem { width: 100%; justify-content: flex-start; }
@media (max-width: 1500px) { .st-nav .st-navgroup:not(.soon) .st-navitem > svg { display: none; } }
@media (max-width: 880px) { .st-nav { position: static; } .st-navgroup.soon { display: none; } .st-nav .st-navitem > svg { display: none; } }

/* Settings · thermal printer logo: preview shaped like a real logo (384 × 150 px), recommended size on its own line */
.st-printlogo { align-items: flex-start; }
.st-printlogoimg { width: min(288px, 100%); height: auto; aspect-ratio: 384 / 150; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.st-printlogoimg small { font-size: .62rem; font-weight: 700; letter-spacing: .04em; opacity: .55; }
.st-recsize { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: .8rem; color: var(--fg); }
.st-recsize b { font-weight: 800; }
.st-recsize span { padding: 3px 9px; border-radius: var(--r-pill); background: var(--bg-raise); border: 1px solid var(--line); font-weight: 700; color: var(--soft); }
.st-printlogo .st-logoacts { flex: 1 1 240px; min-width: 0; }
.st-printlogo .st-logoacts .st-row { flex-wrap: wrap; }
.st-soonmenu { top: var(--st-soon-top, 64px); right: var(--st-soon-right, 16px); }
.st-tabitem { display: contents; }

/* ── Settings · section styles (a) ── */
/* Settings live · builder A (Profile, Account, Delivery). Scoped to .st-page, kit tokens only. */

/* The live <form> wraps a pane's cards + save bar; it must not break the pane's card spacing
   or the sticky save bar, so the form box itself is dropped from layout. */
.st-page .st-paneform { display: contents; }

/* Profile · logo: the live <img id="restaurantLogo"> takes the demo's logo tile */
.st-page img.st-logoimg { display: block; padding: 8px; object-fit: contain; overflow: hidden; }

/* Profile · upload error line (settings.js shows/hides it with style.display) */
.st-page .st-err { font-size: .74rem; font-weight: 600; color: var(--pink); }

/* settings.js swaps the logo button's content to Font Awesome while uploading and after
   ('<i class="fas fa-spinner fa-spin me-2">' / '<i class="fas fa-upload me-2">'): size it like the kit's svg
   and let the button's own gap do the spacing instead of Bootstrap's me-2. */
.st-page .ck-btn > i.fas { width: 15px; font-size: 14px; line-height: 1; text-align: center; }
.st-page .ck-btn > i.fas.me-2 { margin-right: 0 !important; }

/* Delivery · the Google Map is drawn into #deliveryMap; it keeps the demo's map box */
.st-page .st-livemap { display: block; }
.st-page .st-maphint { margin-top: calc(var(--sp-3) * -1 + 6px); text-align: center; }

/* Bootstrap 5 (still loaded on the live page) makes form controls and buttons inherit the body's
   line-height and gives h1-h6 line-height 1.2; the demo (no Bootstrap) uses the browser/kit values.
   Page-wide on .st-page so every pane matches the demo. */
.st-page .ck-input, .st-page .ck-select, .st-page .ck-btn { line-height: normal; }
.st-page .st-panehead h2, .st-page .st-card > header h3 { line-height: 1.5; }

/* Business hours editor (Profile): one row per day */
.st-page .st-hours { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.st-page .st-hrow { display: grid; grid-template-columns: 110px auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px 10px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.st-page .st-hday { font-size: .86rem; font-weight: 700; }
.st-page .st-htimes { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-page .st-htimes .ck-input { width: 128px; padding-top: 6px; padding-bottom: 6px; }
.st-page .st-hto { font-size: .8rem; color: var(--soft); }
.st-page .st-hclosed { display: none; font-size: .82rem; font-weight: 700; color: var(--faint); }
.st-page .st-hrow.closed .st-htimes { display: none; }
.st-page .st-hrow.closed .st-hclosed { display: inline; }
.st-page .st-hrow.bad { border-color: var(--pink); }
@media (max-width: 560px) {
  .st-page .st-hrow { grid-template-columns: 1fr auto; }
  .st-page .st-htimes, .st-page .st-hclosed { grid-column: 1 / -1; }
  .st-page .st-htimes .ck-input { flex: 1; width: auto; }
}

/* ── Settings · section styles (b) ── */
/* Settings live port · builder B · System pane (scoped under .st-page, kit tokens only) */

/* Two live forms (#integrationForm, #systemSettingsForm) wrap the System cards; let the
   cards sit directly in the pane's column so the card spacing matches the demo */
.st-page #pane-system > form { display: contents; }

/* Print server status: settings.js replaces the className with text-muted / text-success /
   text-warning / text-danger, so the demo's .st-status look is keyed on the id */
.st-page .st-printer > div { min-width: 0; }
.st-page #printerDetectionStatus { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; font-weight: 700; color: var(--fg) !important; }
.st-page #printerDetectionStatus::before { content: ""; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.st-page #printerDetectionStatus.text-success::before { background: var(--emerald); box-shadow: 0 0 0 4px color-mix(in srgb, var(--emerald) 20%, transparent); }
.st-page #printerDetectionStatus.text-warning::before { background: var(--amber); box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 20%, transparent); }
.st-page #printerDetectionStatus.text-danger::before { background: var(--pink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pink) 20%, transparent); }

/* Thermal printer logo preview (384 × 150 box): the uploaded bitmap shows on paper white;
   the placeholder (shown/hidden by settings.js with style.display) stacks its two lines */
.st-page #printLogoUploadSection .st-printlogoimg { overflow: hidden; }
.st-page #printLogoPreview { max-width: 100%; max-height: 100%; object-fit: contain; background: var(--qr-paper); }
.st-page #printLogoPlaceholder { display: block; text-align: center; }
.st-page #printLogoPlaceholder > span { display: block; font-size: .8rem; letter-spacing: .06em; }
.st-page #printLogoPlaceholder > small { display: block; margin-top: 4px; }

/* settings.js shows Remove with style.display = 'inline-block'; keep the kit button layout */
.st-page #removePrintLogoButton:not([style*="none"]) { display: inline-flex !important; }

/* settings.js swaps these buttons' contents for Font Awesome icons (Uploading… / Removing… /
   Printing…); size them like the kit's button icons and drop Bootstrap's extra margin */
.st-page #printLogoUploadButton > i, .st-page #removePrintLogoButton > i, .st-page #testPrintBtn > i { width: 15px; font-size: 13px; text-align: center; margin: 0 !important; }

/* Print logo upload messages (shown with style.display by settings.js) */
.st-page .st-bmsg { font-size: .78rem; line-height: 1.45; }
.st-page .st-bmsg.err { color: var(--pink); }
.st-page .st-bmsg.ok { color: var(--emerald); }

/* Test print result: settings.js sets className = 'alert alert-info|success|danger mt-2 mb-0' */
.st-page #testPrintResult.alert { margin: 0 !important; padding: 10px 12px; border-radius: var(--r-ctl); color: var(--fg); background: color-mix(in srgb, var(--blue) 10%, transparent); border: 1px solid color-mix(in srgb, var(--blue) 40%, transparent); line-height: 1.45; }
.st-page #testPrintResult.alert > i, .st-page #testPrintResult.alert #testPrintMessage > i { color: var(--blue); }
.st-page #testPrintResult.alert-success { background: color-mix(in srgb, var(--emerald) 10%, transparent); border-color: color-mix(in srgb, var(--emerald) 40%, transparent); }
.st-page #testPrintResult.alert-success > i, .st-page #testPrintResult.alert-success #testPrintMessage > i { color: var(--emerald); }
.st-page #testPrintResult.alert-danger { background: color-mix(in srgb, var(--pink) 10%, transparent); border-color: color-mix(in srgb, var(--pink) 40%, transparent); }
.st-page #testPrintResult.alert-danger > i, .st-page #testPrintResult.alert-danger #testPrintMessage > i { color: var(--pink); }

/* ── Settings · section styles (c) ── */
/* Settings live port · builder C · User Management + Customers.
   Everything here is scoped under .st-page and uses kit tokens only.
   Most rules restyle HTML that settings.js / customers.js inject at runtime
   (Bootstrap badges, btn btn-sm, accordion, utility classes) to match the demo. */

/* ── User Management ─────────────────────────────────────────────── */

/* Domain restriction badge: settings.js rewrites its className to
   "badge bg-success|bg-secondary me-2" and sets style.display, so style by id */
.st-page #domainRestrictionBadge { padding: 4px 10px; border-radius: var(--r-pill); font-size: .74rem; font-weight: 700; line-height: 1.3; white-space: nowrap; color: var(--soft); background: var(--bg-raise) !important; border: 1px solid var(--line); }
.st-page #domainRestrictionBadge.bg-success { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 12%, transparent) !important; border-color: color-mix(in srgb, var(--emerald) 40%, transparent); }
.st-page #domainRestrictionBadge svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 6px; }

/* Wrappers that settings.js shows with style.display = 'block' keep the card spacing */
.st-page .st-c-group { display: flex; flex-direction: column; gap: var(--sp-3); }
/* "Only allow @<domain> emails": the domain is its own span inside the title, keep it one run of text */
.st-page .st-switch .txt b:has(> #currentDomain) { display: block; }
.st-page .st-switch .txt #currentDomain { font-size: inherit; color: inherit; line-height: inherit; }
/* applyRoleTemplate() paints ticked rows #0d6efd inline; the demo keeps them plain */
.st-page .st-check { color: var(--fg) !important; }
/* After a failed save, settings.js puts a Font Awesome save icon back in the button */
.st-page #addUserForm button[type="submit"] .fa-save { display: none; }

/* Inactive users: Bootstrap accordion markup kept for data-bs-toggle="collapse",
   shown as the demo's small ghost button + table */
.st-page #inactiveUsersAccordion .accordion-item { background: transparent; border: 0; border-radius: 0; color: inherit; }
.st-page #inactiveUsersAccordion .accordion-header { margin: 0; font-size: inherit; line-height: inherit; }
.st-page #inactiveUsersAccordion .accordion-button { width: auto; gap: 0; border-radius: var(--r-ctl); overflow-anchor: none; }
.st-page #inactiveUsersAccordion .accordion-button,
.st-page #inactiveUsersAccordion .accordion-button:not(.collapsed),
.st-page #inactiveUsersAccordion .accordion-button:focus { background: transparent; color: var(--soft); border-color: var(--line); box-shadow: none; }
.st-page #inactiveUsersAccordion .accordion-button:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--fg); }
.st-page #inactiveUsersAccordion .accordion-button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.st-page #inactiveUsersAccordion .accordion-button::after { display: none; }
.st-page #inactiveUsersAccordion .accordion-body { padding: var(--sp-3) 0 0; }

/* Injected staff / activity rows */
.st-page #activeStaffBody td:first-child:not([colspan]),
.st-page #inactiveStaffBody td:first-child:not([colspan]),
.st-page #activityLogBody td:nth-child(2) { font-weight: 800; }
.st-page #activeStaffBody td:first-child:not([colspan]),
.st-page #inactiveStaffBody td:first-child:not([colspan]) { white-space: nowrap; }
/* Role: plain text, as in the demo */
.st-page #activeStaffBody td:nth-child(3) .badge,
.st-page #inactiveStaffBody td:nth-child(3) .badge { display: inline; padding: 0; border-radius: 0; background: none !important; color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; white-space: normal; }
/* Pages: "N pages" as a demo tag (full list in its title tooltip) */
.st-page #activeStaffBody td:nth-child(4) .badge { display: inline-block; padding: 2px 7px; border-radius: var(--r-pill); background: var(--bg-raise) !important; color: var(--soft); border: 1px solid var(--line-soft); font-size: .68rem; font-weight: 700; line-height: 1.4; cursor: help; }
/* Status: the demo's green dot pill */
.st-page #activeStaffBody td:nth-child(5) .badge { display: inline-flex; align-items: center; gap: 6px; padding: 0; border-radius: 0; background: none !important; color: var(--emerald); font-size: .74rem; font-weight: 700; line-height: inherit; }
.st-page #activeStaffBody td:nth-child(5) .badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
/* Actions: Bootstrap btn-sm outline buttons → kit ghost / danger small buttons */
.st-page #activeStaffBody td:last-child:not([colspan]),
.st-page #inactiveStaffBody td:last-child:not([colspan]) { text-align: right; white-space: nowrap; }
.st-page #activeStaffBody .btn,
.st-page #inactiveStaffBody .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 6px 13px; font: inherit; font-size: .78rem; font-weight: 600; line-height: 1.2; border-radius: var(--r-ctl); border: 1px solid var(--line); background: transparent; color: var(--soft); box-shadow: none; cursor: pointer; transition: background var(--transition), border-color var(--transition), color var(--transition); }
.st-page #activeStaffBody .btn { padding: 6px 9px; }
.st-page #activeStaffBody .btn + .btn { margin-left: 2px; }
.st-page #activeStaffBody .btn:hover,
.st-page #inactiveStaffBody .btn:hover { background: color-mix(in srgb, var(--fg) 6%, transparent); color: var(--fg); border-color: var(--soft); }
.st-page #activeStaffBody .btn:focus-visible,
.st-page #inactiveStaffBody .btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; box-shadow: none; }
.st-page #activeStaffBody .btn-outline-danger { color: var(--st-cancelled); border-color: var(--st-cancelled); }
.st-page #activeStaffBody .btn-outline-danger:hover { background: var(--st-cancelled); border-color: var(--st-cancelled); color: #fff; }
.st-page #activeStaffBody .btn:disabled,
.st-page #inactiveStaffBody .btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Customers ───────────────────────────────────────────────────── */
.st-page .st-c-stats { align-self: center; margin-left: auto; }
.st-page .st-c-stats:empty { display: none; }
/* Load More row disappears while customers.js keeps the button hidden */
.st-page .st-c-more:has(> #loadMoreCustomers[style*="none"]) { display: none; }

/* Injected customer rows: one type size as in the demo, name bold, numbers right-aligned */
.st-page #customersTableBody td { font-size: inherit !important; }
.st-page #customersTableBody td:first-child:not([colspan]) { font-weight: 800; white-space: nowrap; }
.st-page #customersTableBody td.text-muted:not([colspan]) { color: inherit !important; }
.st-page #customersTableBody td.text-center:not([colspan]) { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-page #customersTableBody td.text-center:not([colspan]) strong { font-weight: inherit; }
.st-page #customersTableBody td.text-end { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── Empty / loading / error rows (both panes) ───────────────────── */
.st-page :is(#activeStaffBody, #inactiveStaffBody, #activityLogBody, #customersTableBody) td[colspan] { padding: 20px 0; text-align: center; color: var(--faint) !important; font-size: .84rem; font-weight: 400; }
.st-page #customersTableBody td[colspan].text-danger { color: var(--pink) !important; }
.st-page #customersTableBody td[colspan] .spinner-border { color: var(--cyan); vertical-align: -2px; }

/* Domain restriction: settings.js flashes a tick on "#domainRestriction + label .fa-save" after it saves (its only
   saved confirmation). The track is that label; the icon sits just right of the switch and shows only as the tick. */
.st-page #domainRestriction + label.track { position: relative; }
.st-page #domainRestriction + label.track > i { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); margin: 0 !important; font-size: .85rem; transition: opacity .2s ease; }
.st-page #domainRestriction + label.track > i.fa-save { opacity: 0; }
.st-page #domainRestriction + label.track > i.fa-check { opacity: 1; color: var(--emerald) !important; }

/* ── Settings · section styles (d) ── */
/* Settings · builder D — App Images, Referrals, Request Payout modal.
   Styles the elements app-images.js / referrals.js toggle or inject at runtime
   so they match the approved demo. Kit tokens only. */

/* ── App Images: discovery / cover frames ─────────────────────────── */
.st-page .st-imgslot { display: grid; place-items: center; }
.st-page .st-imgslot > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-page .app-image-empty { font-size: .76rem; font-weight: 600; color: var(--faint); text-align: center; padding: 8px; }
.st-page .st-error { font-size: .8rem; font-weight: 600; color: var(--st-cancelled); line-height: 1.45; }

/* ── App Images: gallery (tiles injected into #galleryGrid) ───────── */
/* The grid container is replaced wholesale by app-images.js; letting it flow
   as "contents" puts every tile, and the Add tile after it, on one .st-gallery grid. */
.st-page .st-gallery > .app-gallery-grid { display: contents; }
.st-page .app-gallery-tile { position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--r-ctl); overflow: hidden; background: var(--bg-raise); border: 1px solid var(--line); }
.st-page .app-gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-page .app-gallery-order { position: absolute; top: 6px; left: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-pill); display: grid; place-items: center; font-size: .7rem; font-weight: 800; color: var(--fg); background: color-mix(in srgb, var(--ink) 70%, transparent); }
.st-page .app-gallery-tools { display: contents; }
.st-page .app-gallery-tools button { position: absolute; width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 70%, transparent); color: var(--fg); cursor: pointer; transition: background var(--transition), opacity var(--transition); }
.st-page .app-gallery-tools button i { font-size: .68rem; }
.st-page .app-gallery-tools [data-action="left"] { left: 6px; bottom: 6px; }
.st-page .app-gallery-tools [data-action="right"] { left: 36px; bottom: 6px; }
.st-page .app-gallery-tools [data-action="remove"] { top: 6px; right: 6px; }
.st-page .app-gallery-tools button:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 90%, transparent); }
.st-page .app-gallery-tools [data-action="remove"]:hover:not(:disabled) { background: var(--st-cancelled); color: #fff; }
.st-page .app-gallery-tools button:disabled { opacity: .35; cursor: default; }
.st-page .app-gallery-tools button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.st-page .app-gallery-empty { aspect-ratio: 1; display: grid; place-items: center; padding: 10px; text-align: center; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); font-size: .76rem; font-weight: 600; color: var(--faint); }
.st-page .st-addphoto:disabled { opacity: .45; cursor: not-allowed; }
.st-page .st-addphoto:disabled:hover { color: var(--soft); border-color: var(--line); }
.st-page .st-addphoto .fa-spinner { margin: 0 !important; font-size: 1.1rem; }

/* ── Referrals ────────────────────────────────────────────────────── */
/* Shown by referrals.js with style.display = '' → this layout applies */
.st-page .st-refenrolled { display: flex; flex-direction: column; gap: var(--sp-3); }
.st-page .st-refcodeval { display: block; min-height: 1.2em; font-size: 1.5rem; font-weight: 800; letter-spacing: .08em; color: var(--accent-text); }
.st-page .st-refjoin { background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 12%, var(--card)), var(--card) 65%); border-color: color-mix(in srgb, var(--cyan) 35%, var(--line-soft)); }
.st-page .st-refjoin .st-note { max-width: 72ch; }
.st-page .st-refjoin .st-note strong { color: var(--fg); }
.st-page .st-check a { color: var(--accent-text); }
.st-page .iv-kpi h3.val { margin: 0; }
.st-page .st-stats .iv-kpi { align-items: flex-start; }
/* referrals.js rewrites the whole class to "referral-trend up|down|new" */
.st-page .referral-trend { font-size: .74rem; font-weight: 600; color: var(--faint); }
.st-page .referral-trend:empty { display: none; }
.st-page .referral-trend.up { color: var(--emerald); }
.st-page .referral-trend.down { color: var(--st-cancelled); }
.st-page .st-reftable td:first-child { font-weight: 700; }
.st-page .st-reftable td.text-end { text-align: left !important; }
.st-page .st-reftable td[colspan] { text-align: center; font-weight: 600; color: var(--faint) !important; padding: 24px 10px; }
.st-page .ck-btn .spinner-border { width: 14px; height: 14px; border-width: 2px; margin: 0 !important; }

/* ── Request Payout modal (Bootstrap modal reskinned to the demo pop-up) ── */
body[data-surface="ops"] #requestPayoutModal .modal-dialog { max-width: 480px; }
body[data-surface="ops"] #requestPayoutModal .modal-dialog-centered { min-height: calc(100% - 24px); }
body[data-surface="ops"] #requestPayoutModal .modal-content { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--r-modal); box-shadow: var(--shadow-2); color: var(--fg); max-height: min(86vh, 720px); overflow: hidden; }
body[data-surface="ops"] #requestPayoutModal .modal-header { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--line-soft); border-radius: 0; }
body[data-surface="ops"] #requestPayoutModal .modal-header h3 { margin: 0; font-size: 1rem; font-weight: 700; }
body[data-surface="ops"] #requestPayoutModal .modal-body { padding: var(--sp-5); overflow-y: auto; }
body[data-surface="ops"] #requestPayoutModal .modal-footer { display: flex; flex-wrap: nowrap; gap: var(--sp-3); justify-content: flex-end; padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--line-soft); border-radius: 0; }
body[data-surface="ops"] #requestPayoutModal .modal-footer > * { margin: 0; }
body[data-surface="ops"] #requestPayoutModal .st-labelrow > label:first-child { display: inline; }
body[data-surface="ops"] #requestPayoutModal #payoutPanLabel .text-muted { font-weight: 400; color: var(--soft) !important; }
body[data-surface="ops"] #requestPayoutModal #payoutPanLabel .text-danger { color: var(--st-cancelled) !important; }
body[data-surface="ops"] #requestPayoutModal .st-check a { color: var(--accent-text); }
/* Account number + verify: show/hide eye sits inside the field */
body[data-surface="ops"] #requestPayoutModal .st-secret { position: relative; display: flex; }
body[data-surface="ops"] #requestPayoutModal .st-secret .ck-input { width: 100%; padding-right: 42px; }
body[data-surface="ops"] #requestPayoutModal .st-secretbtn { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; display: grid; place-items: center; background: none; color: var(--soft); cursor: pointer; }
body[data-surface="ops"] #requestPayoutModal .st-secretbtn:hover { color: var(--fg); background: var(--card-hover); }
body[data-surface="ops"] #requestPayoutModal .st-secretbtn i { font-size: .82rem; }
/* referrals.js adds .is-valid to the verify field when both numbers match */
body[data-surface="ops"] #requestPayoutModal .ck-input.is-valid { border-color: var(--emerald); box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald) 15%, transparent); }
/* Same dim backdrop as the demo pop-ups (this is the page's only Bootstrap modal) */
body[data-surface="ops"]:has(#requestPayoutModal) > .modal-backdrop { --bs-backdrop-opacity: 1; background-color: var(--scrim); }
/* Phones: floating bottom sheet, like every kit pop-up */
@media (max-width: 560px) {
  body[data-surface="ops"] #requestPayoutModal .modal-dialog { margin: 0; max-width: none; max-height: none; min-height: 100%; align-items: flex-end; }
  body[data-surface="ops"] #requestPayoutModal.fade .modal-dialog { transform: translateY(100%); transition: transform .22s ease; }
  body[data-surface="ops"] #requestPayoutModal.show .modal-dialog { transform: none; }
  body[data-surface="ops"] #requestPayoutModal .modal-content { border-radius: var(--r-modal) var(--r-modal) 0 0; border-bottom: none; max-height: 88vh; max-height: 88dvh; }
  body[data-surface="ops"] #requestPayoutModal .ck-formgrid { grid-template-columns: minmax(0, 1fr); }
}

/* ══════════════════════════════════════════════════════════════════
   ── 27. Guest menu — restaurant customer menu (menu.html) ─────────
   "Calm List" layout. Class prefix gm-* is used by menu.html/menu.js
   only, and every rule below is scoped to <body class="gm-page">, so
   nothing here can reach another page. Element ids, JS hook classes
   (.add-to-cart, .variation-option, .open, .show …) and Bootstrap
   behaviour are unchanged; this section only paints them.
   ══════════════════════════════════════════════════════════════════ */
body.gm-page {
  --gm-gut: 16px;
  --gm-col: 640px;
  --gm-nav-h: 60px;
  --gm-green: #047857;
  --gm-red: #A3213F;
  --gm-red-bg: #FFF4F6;
  overflow-x: hidden;
}
@media (max-width: 420px) { body.gm-page { --gm-gut: 12px; } }

/* Column: one centred column on every screen */
.gm-page .gm-head,
.gm-page .gm-main { width: 100%; max-width: calc(var(--gm-col) + 2 * var(--gm-gut)); margin: 0 auto; padding-left: var(--gm-gut); padding-right: var(--gm-gut); }
.gm-page .gm-main { padding-bottom: calc(var(--gm-nav-h) + 96px + env(safe-area-inset-bottom, 0px)); }

/* Header card */
.gm-page .gm-head { padding-top: var(--gm-gut); }
.gm-page .gm-head-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; box-shadow: var(--shadow-1); }
.gm-page .gm-logo { position: relative; width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; overflow: hidden; background: linear-gradient(135deg, var(--aqua-300), var(--aqua-500)); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.gm-page .gm-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--card); color: transparent; font-size: 0; }
.gm-page .gm-logo img:not([src]), .gm-page .gm-logo img[src=""] { display: none; }
.gm-page .gm-head-t { flex: 1; min-width: 0; }
.gm-page .gm-head-t h1 { font-size: 1.08rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; overflow-wrap: anywhere; color: var(--fg); }
.gm-page .gm-head-t .table-number { display: inline-block; margin: 4px 0 0; font-size: .74rem; font-weight: 700; line-height: 1.3; color: var(--accent-text); background: rgba(92,224,210,.18); border-radius: var(--r-pill); padding: 3px 10px; }
/* Veg-only switch (Bootstrap form-switch, repainted) */
.gm-page .gm-vegt { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; min-height: 0; flex-shrink: 0; }
.gm-page .gm-vegt .form-check-input { float: none; margin: 0; width: 38px; height: 22px; cursor: pointer; background-color: var(--line); border-color: var(--line); --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); }
.gm-page .gm-vegt .form-check-input:checked { background-color: var(--aqua-400); border-color: var(--aqua-400); }
.gm-page .gm-vegt .form-check-input:focus { border-color: var(--aqua-400); box-shadow: 0 0 0 3px rgba(92,224,210,.25); }
.gm-page .gm-vegt .form-check-label { font-size: .8rem; font-weight: 700; color: var(--fg); white-space: nowrap; cursor: pointer; }
.gm-page .gm-vegt .form-check-label i { color: #1E8A4C !important; }
@media (max-width: 420px) {
  .gm-page .gm-vegt .form-check-label { font-size: 0; }
  .gm-page .gm-vegt .form-check-label i { font-size: .9rem; margin: 0 !important; }
}

/* Offline / status banner */
.gm-page .gm-banner { background: var(--bg); padding: 10px var(--gm-gut) 0; z-index: 1020; }
.gm-page .gm-offline { max-width: var(--gm-col); margin: 0 auto; display: flex; align-items: flex-start; gap: 10px; background: var(--gm-red-bg); border: 1px solid color-mix(in srgb, var(--st-cancelled) 35%, transparent); color: var(--gm-red); border-radius: var(--r-card); padding: 10px 14px; font-size: .82rem; font-weight: 600; line-height: 1.4; }
.gm-page .gm-offline i { margin: 2px 0 0 !important; flex-shrink: 0; }

/* Section titles */
.gm-page .gm-sec-title { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; color: var(--fg); margin: 18px 0 8px; }

/* Deals — horizontal rail of cards */
.gm-page .gm-deals { margin: 0; }
.gm-page .gm-deal-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc(50% - 5px); gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.gm-page .gm-deal-rail::-webkit-scrollbar { display: none; }
@media (max-width: 560px) { .gm-page .gm-deal-rail { grid-auto-columns: minmax(240px, 82%); } }
.gm-page .gm-deal { scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-1); min-width: 0; color: var(--fg); }
.gm-page .gm-dealtag { align-self: flex-start; display: inline-flex; gap: 5px; align-items: center; font-size: .7rem; font-weight: 800; color: var(--gm-red); background: rgba(244,76,118,.12) !important; padding: 3px 9px; border-radius: var(--r-pill); }
.gm-page .gm-dealtag i { font-size: .66rem; }
.gm-page .gm-deal-name { font-size: .98rem; font-weight: 800; letter-spacing: -.01em; margin: 0; color: var(--fg); }
.gm-page .gm-deal-items { display: flex; flex-direction: column; gap: 6px; }
.gm-page .gm-deal-it { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.gm-page .gm-deal-it .deal-item-image { width: 34px; height: 28px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--bg-raise); }
.gm-page .gm-deal-it .gm-deal-n { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gm-page .gm-deal-it .deal-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gm-page .gm-deal-f { margin-top: auto; border-top: 1px solid var(--line-soft); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.gm-page .gm-deal-tot { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: .82rem; color: var(--soft); }
.gm-page .gm-deal-tot .deal-price { font-size: 1.05rem; font-weight: 800; color: var(--fg); font-variant-numeric: tabular-nums; }
.gm-page .gm-deal-tot .original-price { font-size: .8rem; color: var(--faint); text-decoration: line-through; font-variant-numeric: tabular-nums; }

/* Discount display (owner rule): discounted price big, original small + struck, "% off" */
.gm-page .gm-deal-p { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.gm-page .gm-mrp { font-size: .74rem; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.gm-page .gm-off { display: inline-block; font-size: .68rem; font-weight: 800; line-height: 1.4; color: var(--gm-green); background: rgba(5,224,149,.14); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.gm-page .gm-cl-deal .gm-off { margin-left: 6px; }
@media (max-width: 560px) { .gm-page .gm-deal-p { flex-direction: column; align-items: flex-end; gap: 0; line-height: 1.25; } }

/* Category sections (Bootstrap collapse kept) */
.gm-page .gm-cat { margin: 0; }
.gm-page .gm-cat-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 14px 2px 10px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--fg); text-align: left; cursor: pointer; font: inherit; }
.gm-page .gm-cat-btn[aria-expanded="true"] { border-bottom-color: transparent; }
.gm-page .gm-cat-btn .category-title { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; margin: 0; color: var(--fg); overflow-wrap: anywhere; }
.gm-page .gm-cat-n { font-size: .74rem; color: var(--faint); font-weight: 600; white-space: nowrap; }
.gm-page .gm-cat-btn .category-chevron { order: 3; margin-left: auto; color: var(--soft); font-size: .8rem; flex-shrink: 0; }
.gm-page .gm-cat-b { padding: 2px 0 6px; }
.gm-page .gm-subcat { font-size: .78rem; font-weight: 800; color: var(--soft); margin: 12px 0 8px; text-transform: uppercase; letter-spacing: .05em; overflow-wrap: anywhere; }

/* Item card — text left, photo right, button under the photo */
.gm-page .gm-it { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px; margin-bottom: 8px; box-shadow: var(--shadow-1); color: var(--fg); }
.gm-page .gm-it-tx { flex: 1; min-width: 0; }
.gm-page .gm-it-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 16px; }
.gm-page .gm-it .item-name { font-size: .98rem; font-weight: 700; letter-spacing: -.01em; margin: 4px 0 2px; color: var(--fg); overflow-wrap: anywhere; }
.gm-page .gm-it .item-price { display: block; font-size: .92rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2px 0 6px; color: var(--fg); }
.gm-page .gm-it .item-description { font-size: .78rem; color: var(--soft); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.gm-page .gm-it .item-description:empty { display: none; }
.gm-page .gm-it-side { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex-shrink: 0; width: 112px; }
.gm-page .gm-it .item-image { position: relative; width: 112px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--bg-raise); flex-shrink: 0; }
.gm-page .gm-it .item-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gm-page .gm-it .item-image + .item-actions { margin-top: -16px; }
.gm-page .gm-it-side:has(> .item-image[style*="none"]) .item-actions { margin-top: 0; }
.gm-page .gm-it .item-actions { position: relative; z-index: 1; display: flex; justify-content: center; max-width: 100%; }
/* Tags */
.gm-page .food-type-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .68rem; font-weight: 700; line-height: 1; color: #1E8A4C; }
.gm-page .food-type-badge i { width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; font-size: 6px; }
.gm-page .food-type-badge:not(.veg) { color: #A3342B; }
.gm-page .spicy-badge, .gm-page .variations-badge, .gm-page .extras-badge { display: inline-flex; align-items: center; font-size: .72rem; line-height: 1; }
.gm-page .spicy-badge { color: #C2410C; }
.gm-page .variations-badge, .gm-page .extras-badge { color: var(--faint); }
.gm-page .popular-badge, .gm-page .popular-badge-inline { font-size: .66rem; font-weight: 800; line-height: 1.5; color: #9A6B00; background: rgba(249,187,47,.22); border-radius: 6px; padding: 1px 7px; }
.gm-page .popular-badge { position: absolute; top: 6px; left: 6px; background: #FFF4D6; }

/* ADD / Select Options button + quantity stepper */
.gm-page .gm-add { font: inherit; font-size: .76rem; font-weight: 800; letter-spacing: .02em; line-height: 1.2; color: var(--accent-text); background: var(--card); border: 1.5px solid var(--aqua-400); border-radius: var(--r-ctl); padding: 8px 12px; min-height: 36px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-shadow: var(--shadow-1); max-width: 100%; }
.gm-page .gm-add:hover { background: #EFFCFA; color: var(--accent-text); }
.gm-page .gm-add:disabled { opacity: .5; cursor: not-allowed; }
.gm-page .gm-it-side .gm-add { width: 100%; padding: 8px 6px; }
.gm-page .gm-add .badge { background: var(--aqua-400) !important; color: var(--ink) !important; font-size: .68rem; border-radius: var(--r-pill); padding: 2px 6px; margin: 0 !important; }
.gm-page .quantity-control { display: inline-flex; align-items: center; background: var(--aqua-400); color: var(--ink); border-radius: var(--r-ctl); font-weight: 800; box-shadow: var(--shadow-1); margin: 0 !important; }
.gm-page .quantity-control .btn { background: none; border: 0; color: var(--ink); width: 34px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; border-radius: var(--r-ctl); box-shadow: none; }
.gm-page .quantity-control .btn:hover, .gm-page .quantity-control .btn:active { background: rgba(14,27,34,.08); color: var(--ink); }
.gm-page .quantity-control .quantity { min-width: 22px; margin: 0 !important; text-align: center; font-size: .88rem; font-variant-numeric: tabular-nums; }

/* Bottom navigation (fixed) */
.gm-page .gm-bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(14,27,34,.06); padding-bottom: env(safe-area-inset-bottom, 0px); }
.gm-page .gm-bnav-in { max-width: var(--gm-col); margin: 0 auto; display: flex; justify-content: space-around; height: var(--gm-nav-h); }
.gm-page .gm-bnav .nav-link { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 4px; font-size: .7rem; font-weight: 700; color: var(--faint); text-decoration: none; }
.gm-page .gm-bnav .nav-link i { font-size: 1.1rem; }
.gm-page .gm-bnav .nav-link.active { color: var(--accent-text); }
.gm-page .gm-bnav .nav-link:hover { color: var(--fg); text-decoration: none; }
.gm-page .gm-bnav .nav-badge { position: absolute; top: 4px; left: calc(50% + 6px); line-height: 1; }
.gm-page .gm-bnav .nav-badge .badge { background: var(--st-cancelled) !important; font-size: .62rem; padding: 2px 6px; }

/* Floating row above the nav: cart pill + categories button */
.gm-page .gm-float { position: fixed; left: 0; right: 0; bottom: calc(var(--gm-nav-h) + 12px + env(safe-area-inset-bottom, 0px)); z-index: 95; max-width: calc(var(--gm-col) + 2 * var(--gm-gut)); margin: 0 auto; padding: 0 var(--gm-gut); display: flex; flex-direction: row-reverse; align-items: center; gap: 10px; pointer-events: none; }
.gm-page .gm-float > * { pointer-events: auto; }
.gm-page .gm-catbtn { width: 50px; height: 50px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--fg); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; box-shadow: 0 6px 18px rgba(14,27,34,.16); cursor: pointer; }
.gm-page .gm-catbtn:hover { color: var(--accent-text); }
.gm-page .gm-cartpill { flex: 1; min-width: 0; height: 50px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; cursor: pointer; font: inherit; background: var(--aqua-400); color: var(--ink); border-radius: var(--r-pill); padding: 0 20px; font-size: .9rem; font-weight: 700; box-shadow: 0 8px 22px rgba(56,181,168,.45); animation: ck-modal-in .2s ease; }
.gm-page .gm-cartpill:hover { filter: brightness(1.04); }
.gm-page .gm-cartpill .gm-pl, .gm-page .gm-cartpill .gm-pr { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.gm-page .gm-cartpill .gm-pr { font-weight: 800; }
.gm-page .gm-cartpill .gm-pr i { font-size: .78rem; }
.gm-page .gm-cartpill .floating-cart-count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: .78rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }

/* Overlays + sheets (checkout, recovery, options, categories) */
@keyframes gm-sheet-up { from { transform: translateY(60px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes gm-fade { from { opacity: 0; } to { opacity: 1; } }
.gm-page .gm-ovl, .gm-page .checkout-modal { position: fixed; inset: 0; z-index: 2000; background: var(--scrim); }
.gm-page .checkout-modal.show { animation: gm-fade .2s ease; }
.gm-page :is(.gm-ovl, .checkout-modal) > .gm-sheet { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; box-shadow: var(--shadow-2); animation: gm-sheet-up .25s ease; }
.gm-page .gm-sheet::before { content: ""; display: block; flex-shrink: 0; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 0; }
@media (min-width: 700px) {
  .gm-page :is(.gm-ovl, .checkout-modal) > .gm-sheet { top: 50%; bottom: auto; transform: translateY(-50%); max-width: 520px; max-height: 86vh; border-radius: var(--r-modal); border-bottom: 1px solid var(--line); animation: gm-fade .2s ease; }
  .gm-page .gm-sheet::before { display: none; }
}
.gm-page .gm-sheet .modal-header { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); flex-shrink: 0; }
.gm-page .gm-sheet .modal-header h5 { font-size: 1rem; font-weight: 800; margin: 0; color: var(--fg); min-width: 0; overflow-wrap: anywhere; }
.gm-page .gm-sheet .modal-header .btn-close { margin: 0 0 0 auto; flex-shrink: 0; width: 28px; height: 28px; padding: 0; border-radius: 8px; background-size: 11px; opacity: .55; }
.gm-page .gm-sheet .modal-header .btn-close:hover { opacity: .9; background-color: var(--bg-raise); }
.gm-page .gm-sheet .modal-header .btn-close i { display: none; }
.gm-page .gm-sheet .modal-body { padding: 14px 18px; flex: 1 1 auto; min-height: 0; overflow-y: auto; color: var(--fg); }
.gm-page .gm-sheet .modal-footer { display: block; padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-soft); flex-shrink: 0; }
.gm-page .gm-sheet .modal-footer > * { margin: 0; }
.gm-page .gm-cta { padding: 12px 18px; font-size: .92rem; font-weight: 800; }
.gm-page .gm-cta:disabled { opacity: .45; }

/* Checkout: items, bill, fields, payment */
.gm-page #orderSummaryItems { margin-bottom: 4px; }
.gm-page .gm-sum-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-size: .86rem; padding: 4px 0; }
.gm-page .gm-sum-row > span { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gm-page .gm-sum-row > div { min-width: 0; overflow-wrap: anywhere; }
.gm-page .gm-sum-row .text-info { color: var(--soft) !important; font-size: .76rem; }
.gm-page .gm-sum-row .text-success { color: var(--gm-red) !important; font-size: .74rem; font-weight: 700; }
.gm-page .price-summary { border-top: 1px solid var(--line-soft); margin-top: 6px; }
.gm-page .price-summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .86rem; border-bottom: 1px solid var(--line-soft); }
.gm-page .price-summary > .tax-row { color: var(--soft); }
.gm-page .price-summary > div > span:last-child { font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gm-page .price-summary > .total-row { border-bottom: 0; font-weight: 800; font-size: .98rem; padding-top: 10px; margin: 0; }
.gm-page .price-summary > .total-row > span:last-child { font-weight: 800; }
.gm-page .price-summary > .gm-checking { justify-content: flex-start; align-items: center; gap: 8px; color: var(--soft); font-size: .8rem; background: var(--bg-raise); border: 0; border-radius: var(--r-ctl); padding: 9px 12px; margin-top: 8px; }
.gm-page .price-summary > .gm-checking .spinner-border { color: var(--aqua-500); flex-shrink: 0; }
.gm-page .price-summary > .gm-qerr { display: block; color: var(--gm-red) !important; background: var(--gm-red-bg); border: 0; border-radius: var(--r-ctl); padding: 9px 12px; margin-top: 8px; font-size: .8rem; }
.gm-page .gm-qerr .cp-retry-link { color: var(--accent-text); font-weight: 700; }
.gm-page .gm-field { margin-top: 16px; position: relative; }
.gm-page .gm-field label, .gm-page .gm-lbl { display: block; font-size: .8rem; font-weight: 600; color: var(--soft); margin: 0 0 6px; }
.gm-page .gm-field label .text-muted, .gm-page .gm-opt { font-weight: 500; color: var(--faint) !important; }
.gm-page .gm-field .ck-input { width: 100%; }
.gm-page #specialInstructions { min-height: 42px; max-height: 72px; line-height: 1.4; transition: height .1s ease; }
.gm-page .gm-counter { font-size: .68rem; color: var(--faint); text-align: right; margin-top: 3px; }
.gm-page .gm-2col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 360px) { .gm-page .gm-2col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.gm-page .gm-hint { font-size: .74rem; color: var(--soft); margin-top: 6px; }
.gm-page .payment-section { margin-top: 16px; }
.gm-page .payment-section .form-select { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 11px 38px 11px 13px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--fg); background-color: var(--input-bg); cursor: pointer; }
.gm-page .payment-section .form-select:focus { border-color: var(--aqua-400); box-shadow: 0 0 0 3px rgba(92,224,210,.18); }
.gm-page .payment-section small { font-size: .74rem; line-height: 1.45; color: var(--soft) !important; margin-top: 8px !important; }
.gm-page .payment-section small .fa-circle-info { color: var(--aqua-700); }
.gm-page .payment-section > .form-label { display: block; font-size: .8rem; font-weight: 600 !important; color: var(--soft); margin: 0 0 8px; }
.gm-page .payment-message { color: var(--accent-text); font-size: .8rem; margin-top: 6px; }
.gm-page .payment-message:empty { display: none; }
.gm-page .gm-payopt { display: flex; align-items: center; gap: 10px; min-height: 0; margin: 0 0 8px !important; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); background: var(--card); }
.gm-page .gm-payopt .form-check-input { float: none; margin: 0; flex-shrink: 0; width: 18px; height: 18px; cursor: pointer; border: 2px solid var(--line); }
.gm-page .gm-payopt .form-check-input:checked { background-color: var(--aqua-500); border-color: var(--aqua-500); }
.gm-page .gm-payopt .form-check-input:focus { box-shadow: 0 0 0 3px rgba(92,224,210,.25); }
.gm-page .gm-payopt .form-check-label { flex: 1; padding: 12px 0; font-size: .88rem; font-weight: 700; color: var(--fg); cursor: pointer; }
.gm-page .gm-payopt .form-check-label i { width: 18px; text-align: center; color: var(--soft) !important; margin-right: 8px !important; }
.gm-page .gm-payopt:has(.form-check-input:checked) { border-color: var(--aqua-400); background: rgba(92,224,210,.08); }

/* Delivery-recovery footer: stacked buttons */
.gm-page .gm-stack { display: flex !important; flex-direction: column; gap: 8px; align-items: stretch; }
.gm-page .gm-linkbtn { background: none; border: 0; padding: 8px; font: inherit; font-size: .86rem; font-weight: 700; color: var(--soft); cursor: pointer; }
.gm-page .gm-linkbtn:hover { color: var(--fg); }

/* Size / options sheet */
.gm-page .quantity-variations-modal { align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .25s ease; }
.gm-page .quantity-variations-modal.show { opacity: 1; }
.gm-page .gm-h4 { font-size: .76rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); margin: 4px 0 10px; }
.gm-page .variations-list, .gm-page .extras-list { display: flex; flex-direction: column; gap: 8px; }
.gm-page .extras-section { margin-top: 16px; }
.gm-page .variation-option, .gm-page .extra-option { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); padding: 11px 12px; cursor: pointer; font-size: .88rem; background: var(--card); transition: border-color var(--transition), background var(--transition); }
.gm-page .variation-option:hover, .gm-page .extra-option:hover { border-color: var(--aqua-300); }
.gm-page .variation-option.selected, .gm-page .extra-option.selected { border-color: var(--aqua-400); background: rgba(92,224,210,.08); }
.gm-page .gm-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; position: relative; }
.gm-page .variation-option.selected .gm-radio { border-color: var(--aqua-500); }
.gm-page .variation-option.selected .gm-radio::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--aqua-500); }
.gm-page .variation-details, .gm-page .extra-info, .gm-page .extra-details { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gm-page .variation-name, .gm-page .extra-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.gm-page .variation-price, .gm-page .extra-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gm-page .variation-badge { font-size: .66rem; font-weight: 700; color: var(--accent-text); background: rgba(92,224,210,.18); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.gm-page .extra-checkbox { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-size: .62rem; }
.gm-page .extra-checkbox.checked { background: var(--aqua-500); border-color: var(--aqua-500); }
/* An earlier kit section has an unscoped `#selectionSummary { display: flex !important }`
   (live-orders options sheet); restate block layout here, and still honour the
   inline display:none menu.js uses while the sheet is closed. */
.gm-page #selectionSummary { display: block !important; gap: 0; padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); }
.gm-page #selectionSummary[style*="none"] { display: none !important; }
.gm-page .selection-summary { position: sticky; bottom: -14px; margin: 16px -18px -14px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line-soft); }
.gm-page .summary-header h6 { font-size: .76rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); margin: 0 0 4px; }
.gm-page .summary-details:empty { display: none; }
.gm-page .summary-total { display: flex; gap: 6px; justify-content: space-between; align-items: baseline; font-size: .92rem; font-weight: 700; }
.gm-page .summary-total .total-price { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gm-page #addToCartFromModal { margin-top: 10px; }

/* Categories quick-jump sheet */
.gm-page .categories-modal { z-index: 2000; background: transparent; transition: background-color .25s ease; overflow: hidden; }
.gm-page .categories-modal.show { background: var(--scrim); }
.gm-page .categories-modal > .gm-sheet { max-height: min(70vh, 520px); transform: translateY(100%); transition: transform .28s ease-out; animation: none; }
.gm-page .categories-modal.show > .gm-sheet { transform: none; }
@media (min-width: 700px) {
  .gm-page .categories-modal > .gm-sheet { top: auto; bottom: 0; border-radius: 20px 20px 0 0; border-bottom: 0; transform: translateY(100%); }
  .gm-page .categories-modal.show > .gm-sheet { transform: none; }
}
.gm-page #categoryList { display: flex; flex-direction: column; gap: 6px; }
.gm-page #categoryList .list-group-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; border: 1px solid var(--line) !important; border-radius: var(--r-ctl) !important; background: var(--card); color: var(--fg); padding: 12px 14px; font: inherit; font-size: .92rem; font-weight: 700; text-align: left; margin: 0; }
.gm-page #categoryList .list-group-item::after { content: "\203A"; font-size: 1.2rem; line-height: 1; color: var(--faint); }
.gm-page #categoryList .list-group-item:hover { border-color: var(--aqua-400) !important; background: rgba(92,224,210,.08); }

/* Cart — bottom sheet */
.gm-page .gm-cart { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; margin: 0 auto; width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(14,27,34,.22); transform: translateY(105%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; }
.gm-page .gm-cart.open { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }
.gm-page .gm-cart::before { content: ""; display: block; flex-shrink: 0; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 0; }
.gm-page .gm-cart .cart-header { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--line-soft); flex-shrink: 0; }
.gm-page .gm-cart .cart-header h5 { font-size: 1.02rem; font-weight: 800; color: var(--fg); }
.gm-page .gm-cart .cart-header .btn-close { margin-left: auto; width: 28px; height: 28px; padding: 0; border-radius: 8px; background-size: 11px; opacity: .55; }
.gm-page .gm-cart .cart-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 18px; }
.gm-page #cartItems { display: flex; flex-direction: column; }
.gm-page .gm-clearrow { order: 99; justify-content: flex-start !important; margin: 0 !important; }
.gm-page .gm-clear { display: inline-flex; gap: 6px; align-items: center; background: none; border: 0; color: var(--gm-red); font: inherit; font-size: .8rem; font-weight: 700; padding: 10px 0; cursor: pointer; }
.gm-page .gm-cl { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.gm-page .gm-cl-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gm-page .gm-cl-name { font-size: .9rem; font-weight: 700; margin: 0; line-height: 1.35; color: var(--fg); min-width: 0; overflow-wrap: anywhere; }
.gm-page .gm-cl-name small { font-size: .76rem; font-weight: 500; }
.gm-page .gm-cl-name .text-muted { color: var(--soft) !important; }
.gm-page .gm-cl-name .text-info { color: var(--soft) !important; }
.gm-page .gm-cl-del { background: none; border: 0; padding: 4px 6px; color: var(--faint); border-radius: 8px; cursor: pointer; font-size: .82rem; flex-shrink: 0; }
.gm-page .gm-cl-del:hover { color: var(--gm-red); background: var(--gm-red-bg); }
.gm-page .gm-cl-deal { font-size: .76rem; margin-top: 4px; }
.gm-page .gm-cl-deal .text-success { color: var(--gm-red) !important; font-weight: 700; }
.gm-page .gm-cl-deal .text-muted { color: var(--faint) !important; }
.gm-page .gm-cl .extras-breakdown { font-size: .74rem; color: var(--soft) !important; margin-top: 4px; line-height: 1.45; }
.gm-page .gm-cl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.gm-page .gm-cl-row .quantity-control { box-shadow: none; }
.gm-page .gm-cl-row .quantity-control .btn { width: 30px; height: 30px; font-size: .7rem; }
.gm-page .gm-cl-row .quantity-control .quantity { font-size: .82rem; }
.gm-page .gm-cl-row .item-total { font-weight: 800; font-size: .92rem; font-variant-numeric: tabular-nums; }
.gm-page .gm-cart .cart-footer { flex-shrink: 0; padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-soft); }
.gm-page .gm-cart .cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: .95rem; font-weight: 700; margin-bottom: 10px; }
.gm-page .gm-cart .cart-total #cartTotal { font-size: 1.12rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Acknowledgement / "Price updated" dialog */
.gm-page #ackDialog { position: fixed; inset: 0; z-index: 2200; align-items: center; justify-content: center; padding: var(--gm-gut); background: var(--scrim); }
.gm-page #ackDialog:not([hidden]) { display: flex; }
.gm-page .ack-dialog-card { background: var(--card); color: var(--fg); border-radius: var(--r-modal); box-shadow: var(--shadow-2); width: min(360px, 100%); max-height: 85vh; padding: 22px 20px 18px; text-align: center; display: flex; flex-direction: column; overflow: hidden; animation: ck-modal-in .18s ease; }
.gm-page .ack-dialog-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 10px; background: rgba(249,187,47,.2); color: #9A6B00; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.gm-page .ack-dialog-heading { flex-shrink: 0; font-size: 1.05rem; font-weight: 800; margin: 0 0 6px; color: var(--fg); }
.gm-page .ack-dialog-message { flex: 1 1 auto; min-height: 0; overflow-y: auto; font-size: .88rem; line-height: 1.5; color: var(--soft); margin: 0 0 16px; overflow-wrap: anywhere; white-space: pre-line; }
.gm-page .ack-dialog-actions { display: flex; flex-shrink: 0; gap: 10px; }
.gm-page .ack-dialog-actions .ack-okay, .gm-page .ack-dialog-actions .ack-cancel { flex: 1; width: auto; }
.gm-page .ack-okay, .gm-page .ack-cancel { display: block; font: inherit; font-size: .9rem; font-weight: 800; border-radius: var(--r-ctl); padding: 11px 14px; box-shadow: none; cursor: pointer; }
.gm-page .ack-okay { background: var(--aqua-400); border: 1px solid var(--aqua-400); color: var(--ink); }
.gm-page .ack-okay:hover { background: var(--aqua-300); border-color: var(--aqua-300); }
.gm-page .ack-cancel { background: transparent; border: 1px solid var(--line); color: var(--soft); font-weight: 600; }
.gm-page .ack-cancel:hover { color: var(--fg); border-color: var(--soft); }
.gm-page .ack-cancel[hidden] { display: none; }
.gm-page .ack-okay:focus, .gm-page .ack-cancel:focus { outline: none; }
.gm-page .ack-okay:focus-visible, .gm-page .ack-cancel:focus-visible { outline: 2px solid var(--aqua-500); outline-offset: 2px; }

/* Loading overlay + toasts */
.gm-page .gm-loading { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(243,249,248,.88); }
.gm-page .gm-loading .spinner-border { color: var(--aqua-500) !important; width: 2.5rem; height: 2.5rem; border-width: .25rem; }
.gm-page .gm-toast { position: fixed; left: 0; right: 0; bottom: calc(var(--gm-nav-h) + 74px + env(safe-area-inset-bottom, 0px)); margin: 0 auto; width: fit-content; max-width: min(520px, calc(100% - 2 * var(--gm-gut))); background: var(--ink); color: #fff; border: 0; border-radius: var(--r-ctl); box-shadow: var(--shadow-2); padding: 11px 16px; font-size: .86rem; font-weight: 600; line-height: 1.4; text-align: center; overflow-wrap: anywhere; }
.gm-page #notification.gm-toast { z-index: 1080; }
.gm-page #error-message.gm-toast { z-index: 2100; background: var(--gm-red-bg); color: var(--gm-red); border: 1px solid color-mix(in srgb, var(--st-cancelled) 45%, transparent); pointer-events: none; }

/* Delivery address modal (Bootstrap modal, repainted) */
.gm-page .gm-addrmodal .modal-dialog { max-width: 520px; }
.gm-page .gm-addrmodal .modal-content { background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-modal); box-shadow: var(--shadow-2); overflow: hidden; }
.gm-page .gm-addrmodal .modal-header { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.gm-page .gm-addrmodal .modal-title { font-size: 1rem; font-weight: 800; }
.gm-page .gm-addrmodal .modal-title i { color: var(--gm-red) !important; }
.gm-page .gm-addrmodal .modal-header .btn-close { width: 28px; height: 28px; padding: 0; margin: 0 0 0 auto; border-radius: 8px; background-size: 11px; opacity: .55; }
.gm-page .gm-addrmodal .modal-body { padding: 14px 18px; }
.gm-page .gm-addrmodal .modal-footer { padding: 12px 18px 16px; border-top: 1px solid var(--line-soft); gap: 10px; flex-wrap: wrap; }
.gm-page .gm-addrmodal .modal-footer > * { margin: 0; }
.gm-page .gm-addrmodal .modal-footer .ck-btn { flex: 1 1 auto; padding: 11px 16px; }
.gm-page .gm-addrmodal .modal-footer #confirmAddressBtn { flex: 2 1 auto; }
.gm-page .gm-addrmodal #savedAddressList > .text-muted { font-size: .82rem; color: var(--soft) !important; }
.gm-page .gm-addr { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: var(--r-ctl); padding: 10px 8px 10px 12px; margin-bottom: 8px; cursor: pointer; background: var(--card); transition: border-color var(--transition), background var(--transition); }
.gm-page .gm-addr:hover { border-color: var(--aqua-300); }
.gm-page .gm-addr:has(input:checked) { border-color: var(--aqua-400); background: rgba(92,224,210,.08); }
.gm-page .gm-addr .form-check-input { float: none; margin: 0; flex-shrink: 0; width: 18px; height: 18px; border: 2px solid var(--line); cursor: pointer; }
.gm-page .gm-addr .form-check-input:checked { background-color: var(--aqua-500); border-color: var(--aqua-500); }
.gm-page .gm-addr .form-check-input:focus { box-shadow: 0 0 0 3px rgba(92,224,210,.25); }
.gm-page .gm-addr label { flex: 1; min-width: 0; margin: 0; cursor: pointer; }
.gm-page .gm-addr-nick { font-size: .88rem; font-weight: 700; color: var(--fg); overflow-wrap: anywhere; }
.gm-page .gm-addr-line { font-size: .8rem; color: var(--soft); overflow-wrap: anywhere; }
.gm-page .gm-addr-btn { background: none; border: 0; color: var(--soft); padding: 7px; border-radius: 8px; cursor: pointer; font-size: .82rem; flex-shrink: 0; line-height: 1; }
.gm-page .gm-addr-btn:hover { background: var(--bg-raise); color: var(--fg); }
.gm-page .gm-addr-btn.addr-delete-btn { color: var(--gm-red); }
.gm-page .gm-addnew { display: flex; width: 100%; gap: 6px; align-items: center; justify-content: center; border: 1.5px dashed var(--line); background: none; border-radius: var(--r-ctl); padding: 10px; margin-top: 4px; font: inherit; font-size: .86rem; font-weight: 700; color: var(--accent-text); cursor: pointer; }
.gm-page .gm-addnew:hover { border-color: var(--aqua-400); background: rgba(92,224,210,.06); }
.gm-page .gm-addrform { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 14px; margin-bottom: 12px; }
.gm-page .gm-addrform h6 { font-size: .76rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); margin: 0; }
.gm-page .gm-addrform .ck-input { width: 100%; }
.gm-page .gm-addrform .gm-2col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.gm-page .gm-addrform #addrPickerMap { border: 1px solid var(--line); background: #E6F0EA; }
.gm-page .gm-addrform .form-text { font-size: .74rem; color: var(--soft); margin-top: 6px; }
.gm-page .gm-err { display: flex; gap: 6px; align-items: center; font-size: .78rem; font-weight: 600; color: var(--gm-red); background: var(--gm-red-bg); border-radius: 8px; padding: 8px 10px; margin: 0; }
.gm-page .gm-rangemsg { display: flex; gap: 6px; align-items: center; flex: 1 1 100%; font-size: .78rem; font-weight: 600; color: var(--gm-red); background: var(--gm-red-bg); border-radius: 8px; padding: 8px 10px; }
.gm-page .gm-rangemsg i { margin: 0 !important; }
.gm-page:has(.gm-addrmodal) > .modal-backdrop { --bs-backdrop-opacity: 1; background-color: var(--scrim); }
@media (max-width: 560px) {
  .gm-page .gm-addrmodal .modal-dialog { margin: 0; max-width: none; min-height: 100%; align-items: flex-end; }
  .gm-page .gm-addrmodal.fade .modal-dialog { transform: translateY(100%); transition: transform .22s ease; }
  .gm-page .gm-addrmodal.show .modal-dialog { transform: none; }
  .gm-page .gm-addrmodal .modal-content { border-radius: 20px 20px 0 0; border-bottom: 0; max-height: 92vh; max-height: 92dvh; }
  .gm-page .gm-addrmodal .modal-body { overflow-y: auto; }
  .gm-page .gm-addrmodal .modal-footer { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
/* ── end 27. Guest menu ── */

/* ══════════════════════════════════════════════════════════════════
   ── 28. Customer orders / profile (user-profile.html) ─────────────
   "Calm List" look of section 27 carried over to the page a customer
   lands on after ordering (Orders tab, checkout/refund cards, Order
   History, Order Details modal, Profile tab, bottom nav). Shared by
   restaurant and grocery customers. Every rule is scoped to
   <body class="up-page">, so nothing here reaches another page.
   Ids, JS hook classes (.nav-link, .tab-content, .active, .order-card,
   .status-badge <status>, .view-order-details-btn, .show, .d-none …)
   and Bootstrap behaviour are unchanged; this section only paints them.
   Cards from checkout-history-panel.js / grocery-checkout-history-panel.js
   (.qr-checkout-card) are painted here too, on this page only.
   ══════════════════════════════════════════════════════════════════ */
body.up-page {
  --up-gut: 16px;
  --up-col: 640px;
  --up-nav-h: 60px;
  --up-green: #047857;
  --up-red: #A3213F;
  --up-red-bg: #FFF4F6;
  --up-amber: #9A6B00;
  --up-info: #0E7490;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: calc(var(--up-nav-h) + 24px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 420px) { body.up-page { --up-gut: 12px; } }

/* Column + tabs (display toggled by .active, as before) */
.up-page .up-main { width: 100%; max-width: calc(var(--up-col) + 2 * var(--up-gut)); margin: 0 auto; }
.up-page .tab-content { display: none; padding: var(--up-gut); }
.up-page .tab-content.active { display: block; }

/* Bootstrap text colours, made readable on the light surface (same meaning) */
.up-page .text-muted { color: var(--soft) !important; }
.up-page .text-info { color: var(--up-info) !important; }
.up-page .text-success { color: var(--up-green) !important; }
.up-page .text-warning { color: var(--up-amber) !important; }
.up-page .text-danger { color: var(--up-red) !important; }
.up-page code { font-size: .76rem; color: var(--fg); background: var(--bg-raise); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }

/* Order cards — live orders, history, prepaid checkout cards */
.up-page .order-card,
.up-page .history-order-card { position: relative; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-1); padding: 14px; margin-bottom: 10px; overflow: hidden; }
.up-page .order-card h5,
.up-page .history-order-card h5 { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; color: var(--fg); overflow-wrap: anywhere; }
.up-page .order-card .d-flex.justify-content-between.align-items-start,
.up-page .history-order-card > .d-flex.justify-content-between.align-items-start { gap: 10px; }
.up-page .order-card .d-flex.justify-content-between.align-items-start > div:first-child,
.up-page .history-order-card > .d-flex.justify-content-between.align-items-start > div:first-child { min-width: 0; }
.up-page .order-card p,
.up-page .history-order-card p { font-size: .8rem; line-height: 1.45; }
.up-page .order-card .mx-2 { margin: 0 6px !important; color: var(--faint); }
.up-page .qr-checkout-card .qr-checkout-status-text { font-size: .84rem; line-height: 1.5; color: var(--fg); background: var(--bg-raise); border-radius: var(--r-ctl); padding: 10px 12px; }
.up-page .qr-checkout-highlight { box-shadow: 0 0 0 2px var(--aqua-400), var(--shadow-1); border-color: var(--aqua-400); }
.up-page .qr-checkout-timeline,
.up-page .order-reference-ids,
.up-page .order-price-breakup { font-size: .78rem; color: var(--soft); }
.up-page .order-price-breakup > div { padding: 1px 0; }

/* Status pill — same hue per status as before, on the kit's status tokens */
.up-page .status-badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 800; line-height: 1.3; white-space: nowrap; color: var(--soft); background: var(--bg-raise); border: 1px solid var(--line); }
.up-page .status-badge .spinner-border { width: .75rem; height: .75rem; border-width: .14em; margin: 0 !important; }
.up-page .status-badge:is(.pending_approval, .placed, .verifying) { color: #1D6FC2; background: color-mix(in srgb, var(--st-new) 14%, #fff); border-color: color-mix(in srgb, var(--st-new) 35%, transparent); }
.up-page .status-badge:is(.preparing, .packing_items, .refund_processing) { color: var(--up-amber); background: color-mix(in srgb, var(--st-preparing) 16%, #fff); border-color: color-mix(in srgb, var(--st-preparing) 40%, transparent); }
.up-page .status-badge:is(.ready, .refunded) { color: var(--up-green); background: color-mix(in srgb, var(--st-ready) 13%, #fff); border-color: color-mix(in srgb, var(--st-ready) 35%, transparent); }
.up-page .status-badge:is(.served, .under_review) { color: #4A5F86; background: color-mix(in srgb, var(--st-served) 16%, #fff); border-color: color-mix(in srgb, var(--st-served) 40%, transparent); }
.up-page .status-badge:is(.completed, .refund_initiated) { color: var(--aqua-700); background: color-mix(in srgb, var(--st-completed) 12%, #fff); border-color: color-mix(in srgb, var(--st-completed) 35%, transparent); }
.up-page .status-badge:is(.cancelled, .needs_attention, .payment_failed) { color: var(--up-red); background: var(--up-red-bg); border-color: color-mix(in srgb, var(--st-cancelled) 35%, transparent); }
.up-page .status-badge[data-store="grocery"].out_for_delivery { color: #1D4ED8; background: color-mix(in srgb, #3b82f6 13%, #fff); border-color: color-mix(in srgb, #3b82f6 35%, transparent); }

/* Item lines */
.up-page .order-items { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin: 10px 0 !important; padding: 8px 0; }
.up-page .order-item { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; margin: 0; }
.up-page .item-quantity { flex-shrink: 0; min-width: 30px; text-align: center; font-size: .74rem; font-weight: 800; line-height: 1.5; color: var(--accent-text); background: rgba(92,224,210,.16); border-radius: 8px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.up-page .item-details { flex: 1; min-width: 0; font-size: .78rem; line-height: 1.35; }
.up-page .item-details > br { display: none; }
.up-page .item-details > small { display: block; font-size: .74rem; margin-top: 1px; }
.up-page .item-name { display: block; font-size: .88rem; font-weight: 600; color: var(--fg); overflow-wrap: anywhere; }
.up-page .item-price { flex-shrink: 0; text-align: right; font-size: .86rem; font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.up-page .order-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; font-size: .88rem; font-weight: 700; color: var(--soft); }
.up-page .order-total .total-amount { font-size: 1.08rem; font-weight: 800; color: var(--fg); font-variant-numeric: tabular-nums; }

/* Special instructions + acknowledgement chip */
.up-page .order-instructions { border-top: 1px solid var(--line-soft); padding-top: 8px; font-size: .82rem; overflow-wrap: anywhere; }
.up-page .ack-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--r-pill); font-size: .7rem; font-weight: 800; line-height: 1.5; }
.up-page .ack-badge.accepted { background: rgba(5,224,149,.14); color: var(--up-green); }
.up-page .ack-badge.pending { background: rgba(249,187,47,.2); color: var(--up-amber); }

/* Refund boxes (tint comes from the inline style; shape + text here) */
.up-page .refund-note { border-radius: var(--r-ctl) !important; padding: 10px 12px !important; color: var(--fg); overflow-wrap: anywhere; }

/* Buttons: View Details, Load More (outline pills, like the menu's ADD) */
.up-page .view-order-details-btn,
.up-page .up-morebtn { font: inherit; font-size: .78rem; font-weight: 800; line-height: 1.2; color: var(--accent-text); background: var(--card); border: 1.5px solid var(--aqua-400); border-radius: var(--r-ctl); padding: 8px 14px; min-height: 36px; box-shadow: var(--shadow-1); }
.up-page .view-order-details-btn:hover, .up-page .view-order-details-btn:active,
.up-page .up-morebtn:hover, .up-page .up-morebtn:active { background: #EFFCFA; color: var(--accent-text); border-color: var(--aqua-400); }

/* Order History section */
.up-page .order-history-section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
.up-page .up-sec-title { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; color: var(--fg); margin: 0 0 10px !important; display: flex; align-items: center; }
.up-page .up-sec-title i { color: var(--soft); font-size: .9rem; }
.up-page #order-history-container > p { font-size: .86rem; color: var(--soft); padding: 18px 0; }
.up-page .empty-state { text-align: center; padding: 32px 16px; color: var(--soft); }
.up-page .empty-state i { font-size: 2.2rem; margin-bottom: 12px; color: var(--aqua-500); opacity: .5; }
.up-page #active-orders-container > .text-center p { font-size: .9rem; }

/* Profile tab */
.up-page .up-prof-top { margin-bottom: 12px !important; }
.up-page .up-logout { font: inherit; font-size: .84rem; font-weight: 800; color: var(--up-red); background: var(--card); border: 1.5px solid color-mix(in srgb, var(--st-cancelled) 45%, transparent); border-radius: var(--r-ctl); padding: 8px 14px; box-shadow: var(--shadow-1); }
.up-page .up-logout:hover, .up-page .up-logout:active { color: var(--up-red); background: var(--up-red-bg); border-color: var(--st-cancelled); }
.up-page .up-logout i { margin-right: 6px; }
.up-page .profile-form { background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-1); padding: 18px 16px 4px; }
.up-page .profile-form .form-label { font-size: .8rem; font-weight: 600; color: var(--soft); margin-bottom: 6px; }
.up-page .profile-form .form-control { font: inherit; font-size: .92rem; font-weight: 600; color: var(--fg); background: var(--input-bg); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 13px; }
.up-page .profile-form .form-control:focus { border-color: var(--aqua-400); box-shadow: 0 0 0 3px rgba(92,224,210,.18); }
.up-page .profile-form .form-control:disabled { color: var(--fg); background: var(--bg-raise); border-color: var(--line-soft); opacity: 1; -webkit-text-fill-color: var(--fg); }
.up-page .profile-form .d-flex.align-items-center { align-items: flex-end !important; }
.up-page #editNameBtn { color: var(--accent-text); width: 42px; height: 42px; padding: 0; border-radius: var(--r-ctl); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.up-page #editNameBtn.d-none { display: none !important; }
.up-page #editNameBtn:hover { background: var(--bg-raise); }
.up-page #saveNameBtn { font: inherit; font-size: .86rem; font-weight: 800; color: var(--ink); background: var(--aqua-400); border: 1px solid var(--aqua-400); border-radius: var(--r-ctl); padding: 10px 16px; }
.up-page #saveNameBtn:hover { background: var(--aqua-300); border-color: var(--aqua-300); }

/* Bottom navigation (fixed) */
.up-page .up-bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(14,27,34,.06); padding-bottom: env(safe-area-inset-bottom, 0px); }
.up-page .up-bnav-in { max-width: var(--up-col); margin: 0 auto; display: flex; justify-content: space-around; height: var(--up-nav-h); }
.up-page .up-bnav .nav-link { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 4px; font-size: .7rem; font-weight: 700; color: var(--faint); text-decoration: none; }
.up-page .up-bnav .nav-link i { font-size: 1.1rem; }
.up-page .up-bnav .nav-link.active { color: var(--accent-text); }
.up-page .up-bnav .nav-link:hover { color: var(--fg); text-decoration: none; }
.up-page .up-bnav .nav-link.active:hover { color: var(--accent-text); }

/* Floating help button (shown by JS via style.display) */
.up-page #helpButton { display: none; position: fixed; right: var(--up-gut); bottom: calc(var(--up-nav-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 1000; width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 0; background: var(--aqua-400); color: var(--ink); font-size: 1.05rem; box-shadow: 0 8px 22px rgba(56,181,168,.45); }
.up-page #helpButton:hover { background: var(--aqua-300); }
.up-page #helpButton:active { transform: scale(.95); }

/* Toast (opacity toggled by .show, as before) */
.up-page #notification { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--up-nav-h) + 20px + env(safe-area-inset-bottom, 0px)); z-index: 1100; width: max-content; max-width: calc(100% - 2 * var(--up-gut)); background: var(--ink); color: #fff; border-radius: var(--r-ctl); box-shadow: var(--shadow-2); padding: 11px 16px; font-size: .86rem; font-weight: 600; line-height: 1.4; text-align: center; overflow-wrap: anywhere; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.up-page #notification.show { opacity: 1; }

/* "Order Cancelled" banner (position + show/d-none unchanged) */
.up-page #cancelledOrderCard { animation: up-slide-down .3s ease-out; background: var(--up-red-bg); color: var(--up-red); border: 1px solid color-mix(in srgb, var(--st-cancelled) 40%, transparent); border-radius: var(--r-card) !important; box-shadow: var(--shadow-2) !important; font-size: .86rem; margin: 0 !important; width: calc(100% - 2 * var(--up-gut)); max-width: 480px; min-width: 0 !important; }
.up-page #cancelledOrderCard strong { font-weight: 800; }
@keyframes up-slide-down { from { transform: translate(-50%, -100%); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Order Details modal (Bootstrap modal, repainted; bottom sheet on phones) */
.up-page .up-codm .modal-content { background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-modal); box-shadow: var(--shadow-2); overflow: hidden; }
.up-page .up-codm .modal-header { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.up-page .up-codm .modal-title { font-size: 1rem; font-weight: 800; color: var(--fg); }
.up-page .up-codm .modal-header .btn-close { width: 28px; height: 28px; padding: 0; margin: 0 0 0 auto; border-radius: 8px; background-size: 11px; opacity: .55; }
.up-page .up-codm .modal-header .btn-close:hover { opacity: .9; background-color: var(--bg-raise); }
.up-page .up-codm .modal-body { padding: 14px 18px 18px; font-size: .86rem; }
.up-page .up-codm .table { --bs-table-bg: transparent; --bs-table-color: var(--fg); color: var(--fg); font-size: .84rem; margin-bottom: 8px !important; }
.up-page .up-codm .table > :not(caption) > * > * { background: transparent; color: inherit; border-bottom-color: var(--line-soft); padding: 7px 4px; }
.up-page .up-codm .table thead th { font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); border-bottom-color: var(--line); }
.up-page .up-codm .table tbody td:first-child { font-weight: 600; overflow-wrap: anywhere; }
.up-page .up-codm .table td.text-end { font-variant-numeric: tabular-nums; white-space: nowrap; }
.up-page .up-codm .table tfoot td { font-size: .82rem; }
.up-page .up-codm .table.codm-items tfoot tr:first-child td { border-top: 1px solid var(--line); }
.up-page .up-codm .table tfoot tr.fw-bold td { font-size: 1rem; font-weight: 800; border-bottom: 0; padding-top: 10px; }
.up-page .up-codm .codm-meta { background: var(--bg-raise); border: 1px solid var(--line-soft); border-radius: var(--r-card); padding: 14px; font-size: .84rem; overflow-wrap: anywhere; }
.up-page .up-codm a { color: var(--accent-text); font-weight: 600; }
.up-page:has(.up-codm.show) > .modal-backdrop { --bs-backdrop-opacity: 1; background-color: var(--scrim); }
@media (max-width: 560px) {
  .up-page .up-codm .modal-dialog { --bs-modal-margin: 0; margin: 0; max-width: none; height: 100%; min-height: 100%; align-items: flex-end; }
  .up-page .up-codm.fade .modal-dialog { transform: translateY(100%); transition: transform .22s ease; }
  .up-page .up-codm.show .modal-dialog { transform: none; }
  .up-page .up-codm .modal-content { border-radius: 20px 20px 0 0; border-bottom: 0; max-height: 92vh; max-height: 92dvh; }
  .up-page .up-codm .modal-content::before { content: ""; display: block; flex-shrink: 0; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 0; }
  .up-page .up-codm .modal-body { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
}
/* ── end 28. Customer orders / profile ── */

/* ── Printers page (restaurant/printers.html) ─────────────────────────────
   This computer's KOT / bill / station printers + Custom KOT stations. */
.pr-page .pr-how { max-width: 80ch; }
.pr-page .pr-warn { color: var(--amber); font-weight: 600; }
.pr-page .pr-label { max-width: 360px; }
.pr-rows { display: flex; flex-direction: column; }
.pr-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(200px, 320px) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.pr-row:last-child { border-bottom: 0; }
.pr-rowtxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pr-rowtxt b { font-size: .9rem; }
.pr-rowtxt span { font-size: .76rem; color: var(--soft); }
.pr-row .ck-select { width: 100%; }
.pr-stations { display: flex; flex-direction: column; gap: 10px; }
.pr-station { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--bg-raise); border: 1px solid var(--line-soft); }
.pr-swhat { font-size: .8rem; color: var(--soft); min-width: 0; }
.pr-add { display: flex; gap: 10px; flex-wrap: wrap; }
.pr-add .ck-input { flex: 1 1 220px; max-width: 320px; }
@media (max-width: 640px) {
  .pr-row { grid-template-columns: 1fr auto; }
  .pr-row .pr-rowtxt { grid-column: 1 / -1; }
  .pr-station { grid-template-columns: 1fr 1fr; }
  .pr-station .pr-sname, .pr-station .pr-swhat { grid-column: 1 / -1; }
}
