/* ==========================================================================
   Wimo design system — v3 (WIMO identity: purple · navy · lime signal)
   Arabic-first (RTL) via logical properties · light + dark · reduced motion.
   Brand anchors: purple #6941E8 · navy #202033 · signal lime #C5F45B · off-white #F8F8F5 · coral (alerts)
   ========================================================================== */

/* Text: Plus Jakarta Sans (Latin) + IBM Plex Sans Arabic. Display: Plus Jakarta Sans 800 + Alexandria 800.
   All SIL Open Font License, self-hosted (CSP allows same-origin fonts only). */
@font-face { font-family: "Wimo Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/plusjakarta-latin.7660bd9909fb.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Wimo Sans"; font-style: normal; font-weight: 100 500; font-display: swap;
  src: url("../fonts/plexarabic-400.4fa3d81d41ab.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Wimo Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/plexarabic-600.64891a810259.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Wimo Sans"; font-style: normal; font-weight: 700 900; font-display: swap;
  src: url("../fonts/plexarabic-700.a4390abc98c2.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
/* Display faces are single heavy cuts mapped to every weight, so headings stay ExtraBold whatever weight a rule asks for. */
@font-face { font-family: "Wimo Display"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/plusjakarta-800-latin.bb239a9963fb.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Wimo Display"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/alexandria-arabic-800.d5e3d8d85b05.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }

:root {
  /* Brand scale (purple on navy) */
  --brand-900: #202033;       /* navy: headings, sidebar */
  --brand-800: #2B2B42;
  --deep: #6941E8;            /* brand purple (5.6:1 on off-white, 6.0:1 under white text) */
  --brand-600: #5A32D6;
  --brand-100: #E4DCFC;
  --brand-50: #F1EDFD;
  /* States — "ready" is the brand's signal lime; as text it uses a deep olive that keeps AA contrast */
  --ready: #3F6E00;
  --ready-strong: #2F5300;
  --ready-soft: #EEFBD3;
  --ready-fill: #C5F45B;       /* surfaces that mean "ready": customer screen, ready buttons */
  --ready-fill-hover: #B5E84A;
  --on-ready: #202033;
  --amber: #9A5B00;           /* text-safe amber */
  --amber-glow: #E5A13A;
  --amber-soft: #FBF2E2;
  --danger: #B42318;
  --danger-soft: #FFE3DF;
  --coral: #FF786B;           /* alert fills only */
  --info: #1F5FAD;
  --info-soft: #E8F0FA;
  /* Neutrals (warm off-white, navy ink) */
  --bg: #F8F8F5;
  --surface: #FDFDFB;
  --surface-2: #F1F1EC;
  --surface-3: #E9E8EF;
  --border: #E4E3EC;
  --border-strong: #CFCDDA;
  --text: #202033;
  --text-2: #4A4A5E;
  --muted: #5B5B6E;
  --brand: var(--deep);
  --focus: #6941E8;
  --on-brand: #FFFFFF;

  --font-body: "Wimo Sans", "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-display: "Wimo Display", "Wimo Sans", system-ui, sans-serif;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 24px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --shadow-1: 0 1px 2px rgba(32,32,51,.06);
  --shadow-2: 0 1px 2px rgba(32,32,51,.05), 0 6px 16px -4px rgba(32,32,51,.10);
  --shadow-3: 0 2px 4px rgba(32,32,51,.05), 0 18px 40px -12px rgba(32,32,51,.22);
  --shadow-brand: 0 8px 20px -8px rgba(105,65,232,.55);
  --ease: cubic-bezier(.2,.8,.2,1);
  --dur: .2s;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #181828; --surface: #202033; --surface-2: #2B2B42; --surface-3: #33334D; --border: #34344E; --border-strong: #4A4A66;
    --text: #F8F8F5; --text-2: #D9D8E6; --muted: #B9B9C8;
    --deep: #A68CFF; --brand-600: #B9A4FF; --brand-50: #26214A; --brand-100: #322A66;
    --ready: #C5F45B; --ready-strong: #D9FA8E; --ready-soft: #2C3A16;
    --amber: #F0B252; --amber-soft: #2A2111; --danger: #FF9D93; --danger-soft: #3A1F25; --info: #86B6F2; --info-soft: #14233A;
    --on-brand: #202033;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 8px 24px -8px rgba(0,0,0,.6); --shadow-3: 0 18px 44px -12px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #181828; --surface: #202033; --surface-2: #2B2B42; --surface-3: #33334D; --border: #34344E; --border-strong: #4A4A66;
  --text: #F8F8F5; --text-2: #D9D8E6; --muted: #B9B9C8;
  --deep: #A68CFF; --brand-600: #B9A4FF; --brand-50: #26214A; --brand-100: #322A66;
  --ready: #C5F45B; --ready-strong: #D9FA8E; --ready-soft: #2C3A16;
  --amber: #F0B252; --amber-soft: #2A2111; --danger: #FF9D93; --danger-soft: #3A1F25; --info: #86B6F2; --info-soft: #14233A;
  --on-brand: #202033;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 8px 24px -8px rgba(0,0,0,.6); --shadow-3: 0 18px 44px -12px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 15.5px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 var(--s3); font-weight: 600; letter-spacing: -.005em; color: var(--text); }
h1 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
h2, .h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 var(--s3); }
a { color: var(--deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-600); }
img, svg { max-width: 100%; }
code { font-size: .85em; background: var(--surface-2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; inset-inline-start: var(--s3); top: -60px; background: var(--surface); padding: var(--s2) var(--s4);
  border-radius: var(--r-sm); z-index: 100; box-shadow: var(--shadow-2); }
.skip-link:focus { top: var(--s3); }
.icon { flex-shrink: 0; vertical-align: middle; }
[hidden] { display: none !important; }
.tight { gap: 2px !important; }
.text-center { text-align: center; }
.mt { margin-top: var(--s4); }
.row-center { justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text-2); --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 40px; padding: 0 var(--s4); border-radius: 10px; border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); font: inherit; font-size: .925rem; font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; box-shadow: var(--shadow-1);
  transition: transform var(--dur) var(--ease), background var(--dur), border-color var(--dur), box-shadow var(--dur), color var(--dur);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { --btn-bd: var(--muted); color: var(--btn-fg); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { --btn-bg: var(--deep); --btn-fg: var(--on-brand); --btn-bd: var(--deep); box-shadow: var(--shadow-brand); }
.btn-primary:hover { --btn-bg: var(--brand-800); --btn-bd: var(--brand-800); }
:root[data-theme="dark"] .btn-primary:hover { --btn-bg: var(--brand-600); --btn-bd: var(--brand-600); }
.btn-ready { --btn-bg: var(--ready-fill); --btn-fg: var(--on-ready); --btn-bd: var(--ready-fill); box-shadow: 0 8px 20px -8px rgba(80,110,0,.45); }
.btn-ready:hover { --btn-bg: var(--ready-fill-hover); --btn-bd: var(--ready-fill-hover); }
.btn-danger { --btn-bg: var(--surface); --btn-fg: var(--danger); --btn-bd: color-mix(in srgb, var(--danger) 35%, transparent); box-shadow: none; }
.btn-danger:hover { --btn-bg: var(--danger-soft); --btn-bd: var(--danger); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; box-shadow: none; }
.btn-ghost:hover { --btn-bg: var(--surface-2); --btn-bd: transparent; }
.btn-lg { min-height: 48px; font-size: 1rem; padding: 0 var(--s5); border-radius: 12px; }
.btn-xl { min-height: 64px; font-size: 1.25rem; padding: 0 var(--s5); border-radius: 14px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 var(--s3); font-size: .84rem; border-radius: 8px; }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 34px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: var(--s4); }
.field label { font-weight: 600; font-size: .9rem; color: var(--text-2); }
.field .help { color: var(--muted); font-size: .82rem; }
.field .errors { color: var(--danger); font-size: .85rem; margin: 0; padding: 0; list-style: none; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field select, .field textarea {
  width: 100%; min-height: 44px; padding: var(--s2) var(--s3); border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; transition: border-color var(--dur), box-shadow var(--dur);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:hover, .field select:hover, .input:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: none; border-color: var(--deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--deep) 18%, transparent);
}
.field input[type=color] { width: 56px; height: 40px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); }
.field ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.field input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--deep); }
.check { display: flex; align-items: center; gap: var(--s2); font-weight: 500; }
.form-errors { background: var(--danger-soft); color: var(--danger); padding: var(--s3) var(--s4); border-radius: var(--r); margin-bottom: var(--s4);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); }
.row > .input, .row > select.input { width: auto; min-width: 150px; flex: 0 1 auto; }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow-1); }
.card + .card { margin-top: var(--s4); }
.grid > .card + .card, .row > .card + .card { margin-top: 0; }
.card-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.card-title h2, .card-title h3 { margin: 0; font-size: 1rem; }
.grid { display: grid; gap: var(--s4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stack { display: grid; gap: var(--s3); }
.row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.spacer { flex: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600;
  background: var(--surface-2); color: var(--muted); white-space: nowrap; border: 1px solid var(--border); line-height: 1.8; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge-preparing { background: var(--amber-soft); color: var(--amber); border-color: color-mix(in srgb, var(--amber-glow) 35%, transparent); }
.badge-ready, .badge-active, .badge-trial { background: var(--ready-soft); color: var(--ready-strong); border-color: color-mix(in srgb, var(--ready) 25%, transparent); }
.badge-collected { background: var(--surface-2); color: var(--muted); }
.badge-cancelled, .badge-expired, .badge-suspended { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.badge-customer { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.alert { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--border); margin-bottom: var(--s4); color: var(--text-2); }
.alert-success { background: var(--ready-soft); color: var(--ready-strong); border-color: color-mix(in srgb, var(--ready) 25%, transparent); }
.alert-error, .alert-warning { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 20%, transparent); }
.empty { text-align: center; padding: var(--s6) var(--s4); color: var(--muted); }
.empty .icon { color: var(--border-strong); margin-bottom: var(--s2); }

.stat { display: grid; gap: 4px; align-content: start; position: relative; }
.stat-label { color: var(--muted); font-size: .84rem; font-weight: 500; }
.stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-sub { font-size: .8rem; color: var(--muted); }
.stat-icon { position: absolute; inset-inline-end: var(--s5); top: var(--s5); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-50); color: var(--deep); }
.stat-icon.amber { background: var(--amber-soft); color: var(--amber); }
.stat-icon.ready { background: var(--ready-soft); color: var(--ready); }

table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: start; padding: 12px var(--s3); border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: .76rem; letter-spacing: .02em; background: var(--surface-2); }
.table thead th:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.table thead th:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.table thead th { border-bottom: 0; }
.table tbody tr { transition: background var(--dur); }
.table tbody tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* Bar chart (pure CSS; heights from server via .h-N). */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 4px; height: 150px; padding-top: var(--s3);
  direction: ltr; background-image: linear-gradient(var(--border) 1px, transparent 1px); background-size: 100% 25%; background-position: 0 0; }
.bar { background: linear-gradient(180deg, var(--brand-600), var(--deep)); border-radius: 4px 4px 1px 1px; min-height: 2px; opacity: .92;
  transition: height .5s var(--ease), opacity var(--dur); }
.bar:hover { opacity: 1; background: var(--ready); }
.bars-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; font-size: .68rem; color: var(--muted); text-align: center;
  direction: ltr; margin-top: 6px; }

/* ---------- App shell (dashboard): dark brand sidebar ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar {
  --text: #F8F8F5; --text-2: #D9D8E6; --muted: #B9B9C8; --surface-2: rgba(255,255,255,.07); --border-strong: rgba(255,255,255,.18);
  --btn-fg: #F8F8F5;
  background: linear-gradient(180deg, var(--brand-900) 0%, #181828 100%); color: var(--text);
  padding: var(--s5) var(--s4); display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; border-inline-end: 1px solid rgba(255,255,255,.06);
}
.sidebar .btn { --btn-fg: #F8F8F5; }
.sidebar .brand { color: #fff; margin-bottom: var(--s5); padding-inline: var(--s2); }
.sidebar .brand-mark { box-shadow: none; }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--text); margin-bottom: var(--s4); }
.brand:hover { color: inherit; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: #6941E8; color: #FBFAFF; display: grid; place-items: center;
  box-shadow: var(--shadow-brand); flex-shrink: 0; }   /* the WIMO app tile: fixed purple in light and dark */
.brand-symbol { width: 60%; height: 60%; }
.brand-name { font-family: var(--font-display); font-size: 1.45rem; line-height: 1; letter-spacing: -.02em; }
.nav a { display: flex; align-items: center; gap: var(--s3); padding: 9px var(--s3); border-radius: 10px; color: var(--text-2);
  text-decoration: none; font-weight: 500; font-size: .93rem; transition: background var(--dur), color var(--dur); position: relative; }
.nav a .icon { opacity: .8; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: -16px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: #C5F45B; }
.nav a[aria-current="page"] .icon { opacity: 1; color: #C5F45B; }
.nav-section { font-size: .72rem; color: var(--muted); margin: var(--s4) var(--s3) var(--s1); font-weight: 600; letter-spacing: .04em; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: var(--s3); margin-top: var(--s3); }
.user-chip { display: flex; align-items: center; gap: var(--s2); padding: var(--s2); border-radius: 10px; }
.user-chip .avatar { width: 34px; height: 34px; font-size: .95rem; background: rgba(255,255,255,.12); color: #fff; }
.main { padding: var(--s6) var(--s6) var(--s7); max-width: 1240px; width: 100%; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head h1 { margin: 0; }
.eyebrow { font-size: .8rem; color: var(--muted); font-weight: 500; }
.topbar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 280px; z-index: 50; transform: translateX(110%);
    transition: transform var(--dur) var(--ease); box-shadow: var(--shadow-3); }
  [dir="ltr"] .sidebar { transform: translateX(-110%); }
  .sidebar[data-open="true"] { transform: none !important; }
  .topbar { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--brand-900); color: #fff;
    position: sticky; top: 0; z-index: 40; }
  .topbar .btn { --btn-fg: #fff; }
  .main { padding: var(--s4); }
}

/* ---------- Auth / centered pages ---------- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: var(--s5);
  background: radial-gradient(1200px 500px at 50% -10%, var(--brand-50), transparent 70%), var(--bg); }
.auth-card { width: min(420px, 100%); padding: var(--s6); box-shadow: var(--shadow-3); }
.auth-card .brand { justify-content: center; margin-bottom: var(--s5); }
.auth-card-wide { max-width: 680px; }
.auth-card h1 { text-align: center; }

/* ---------- Customer experience ---------- */
.cx { min-height: 100svh; display: flex; flex-direction: column; background: var(--bg); transition: background .6s var(--ease), color .6s var(--ease); }
.cx-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s5); }
.cx-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--surface); border: 1px solid var(--border); }
.cx-logo-fallback { width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.3rem; box-shadow: var(--shadow-brand); }
.cx-cafe { font-weight: 600; line-height: 1.25; }
.cx-branch { font-size: .82rem; color: var(--muted); }
.cx-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--s4) var(--s5); text-align: center; gap: var(--s5); }
.cx-foot { padding: var(--s4) var(--s5) var(--s5); text-align: center; font-size: .78rem; color: var(--muted); display: grid; gap: var(--s2); }
.cx-card { width: min(420px, 100%); background: var(--surface); border-radius: var(--r-xl); padding: var(--s6) var(--s5); box-shadow: var(--shadow-3);
  border: 1px solid var(--border); }
.cx-card .pulse { width: 88px; height: 88px; }
.order-input { font-size: 2.2rem !important; text-align: center; letter-spacing: .1em; font-weight: 700; min-height: 72px !important;
  border-radius: var(--r-lg) !important; direction: ltr; background: var(--surface-2) !important; border-width: 1.5px !important; }
.cx-number-label { color: var(--muted); font-size: .85rem; }
.cx-number { font-size: clamp(4rem, 22vw, 6.5rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; letter-spacing: -.02em; }
.cx-status { font-family: var(--font-display); font-size: clamp(2rem, 9vw, 2.8rem); line-height: 1.2; margin: 0; }
.cx-hint { color: var(--muted); max-width: 32ch; margin: 0 auto; }
.pulse { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; position: relative; margin: 0 auto;
  background: var(--brand-50); color: var(--deep); }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.cx[data-status="preparing"] .pulse { background: var(--amber-soft); color: var(--amber); }
.cx[data-status="preparing"] .pulse::before { border: 2px solid var(--amber-glow); animation: ring 2.4s var(--ease) infinite; }
.cx[data-status="preparing"] .cx-status { color: var(--amber); }
.cx[data-status="ready"] { background: var(--ready-fill); color: var(--on-ready); }
.cx[data-status="ready"] .cx-cafe, .cx[data-status="ready"] .cx-status, .cx[data-status="ready"] .cx-number { color: var(--on-ready); }
.cx[data-status="ready"] .cx-branch, .cx[data-status="ready"] .cx-foot, .cx[data-status="ready"] .cx-number-label,
.cx[data-status="ready"] .cx-hint, .cx[data-status="ready"] .lang-switch button { color: #2B2B42; }
.cx[data-status="ready"] .pulse { background: rgba(32,32,51,.08); color: var(--on-ready); animation: pop .6s var(--ease); }
.cx[data-status="ready"] .pulse::before { border: 3px solid rgba(32,32,51,.45); animation: ring 1.2s var(--ease) infinite; }
.cx[data-status="ready"] .btn { --btn-bg: #202033; --btn-fg: #F8F8F5; --btn-bd: #202033; box-shadow: 0 10px 30px -10px rgba(0,0,0,.35); }
.cx[data-status="ready"] .cx-logo-fallback { background: #202033; color: var(--ready-fill); box-shadow: none; }
.cx[data-status="collected"] .pulse, .cx[data-status="cancelled"] .pulse, .cx[data-status="expired"] .pulse { background: var(--surface-3); color: var(--muted); }
@keyframes ring { 0% { transform: scale(.88); opacity: 1; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

.conn { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 500; padding: 3px 12px; border-radius: 999px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.conn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 20%, transparent); }
.conn[data-state="live"] { color: var(--ready); }
.conn[data-state="connecting"] { color: var(--amber); }
.conn[data-state="offline"] { color: var(--danger); }
.cx[data-status="ready"] .conn { background: rgba(32,32,51,.08); color: #202033; border-color: transparent; }

.sound-banner { width: min(420px, 100%); display: flex; align-items: center; gap: var(--s3); text-align: start;
  padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid color-mix(in srgb, var(--amber-glow) 55%, transparent);
  box-shadow: var(--shadow-2); color: var(--amber); }
.sound-banner strong { color: var(--text); }
.limits { width: min(420px, 100%); text-align: start; font-size: .84rem; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s3) var(--s4); }
.limits summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.limits ul { padding-inline-start: 1.1em; margin: var(--s2) 0 0; }
.cx[data-status="ready"] .limits, .cx[data-status="ready"] .sound-banner { display: none; }

/* ---------- Staff queue ---------- */
.staff { min-height: 100vh; display: flex; flex-direction: column; }
.staff-bar { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10; flex-wrap: wrap; box-shadow: var(--shadow-1); }
.staff-bar .brand { margin: 0; }
.staff-new { display: flex; gap: var(--s2); flex: 1; min-width: 260px; max-width: 480px; }
.staff-new .input { min-height: 48px; font-size: 1.25rem; font-weight: 700; text-align: center; direction: ltr; background: var(--surface-2); }
.lanes { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); padding: var(--s5); align-items: start; }
@media (max-width: 760px) { .lanes { grid-template-columns: 1fr; } }
.lane { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s4); min-height: 260px; box-shadow: var(--shadow-1); }
.lane-head { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s1) var(--s4); font-weight: 700; font-size: 1rem;
  border-bottom: 1px solid var(--border); margin-bottom: var(--s4); }
.lane-count { margin-inline-start: auto; min-width: 30px; height: 28px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center; font-size: .9rem;
  font-variant-numeric: tabular-nums; }
.lane[data-lane="preparing"] .lane-head { color: var(--amber); }
.lane[data-lane="preparing"] .lane-count { background: var(--amber-soft); color: var(--amber); }
.lane[data-lane="ready"] .lane-head { color: var(--ready); }
.lane[data-lane="ready"] .lane-count { background: var(--ready-soft); color: var(--ready-strong); }
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s3); }
.ticket { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s4); box-shadow: var(--shadow-2);
  display: grid; gap: var(--s3); position: relative; overflow: hidden; }
.ticket::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--amber-glow); }
.ticket[data-status="ready"]::before { background: var(--ready); }
.ticket.enter { animation: enter .35s var(--ease); }
.ticket[data-status="ready"] { background: color-mix(in srgb, var(--ready-soft) 55%, var(--surface)); }
.ticket[data-new="true"] { box-shadow: 0 0 0 2px var(--amber-glow), var(--shadow-2); }
.ticket-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s2); }
.ticket-num { font-size: 2.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; letter-spacing: -.02em; }
.ticket-meta { justify-items: end; }
.ticket-timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); direction: ltr; font-size: .9rem;
  background: var(--surface-2); padding: 0 8px; border-radius: 6px; }
.ticket-timer[data-late="true"] { color: var(--danger); background: var(--danger-soft); }
.ticket-actions { display: flex; gap: var(--s2); }
.ticket-actions .btn-xl { flex: 1; }
.ticket-actions .btn-icon { height: 64px; width: 52px; border-radius: 14px; }
.recent { padding: 0 var(--s5) var(--s5); }
.recent-list { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; gap: var(--s2); background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 6px 3px 14px; font-weight: 600; direction: ltr; box-shadow: var(--shadow-1); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.toast-wrap { position: fixed; inset-inline: 0; bottom: var(--s5); display: grid; justify-items: center; gap: var(--s2); z-index: 200; pointer-events: none; }
.toast { background: var(--brand-900); color: #fff; padding: var(--s3) var(--s5); border-radius: 12px; box-shadow: var(--shadow-3);
  animation: enter .25s var(--ease); font-weight: 500; }

/* PIN */
.pin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s4); }
.pin-person { display: grid; justify-items: center; gap: var(--s1); padding: var(--s5) var(--s3); background: var(--surface); border-radius: var(--r-lg);
  border: 1px solid var(--border); text-decoration: none; color: var(--text); font-weight: 600; box-shadow: var(--shadow-1);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur); }
.pin-person:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--brand-100); color: var(--text); }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-50); color: var(--deep); border: 1px solid var(--brand-100);
  display: grid; place-items: center; font-size: 1.3rem; font-weight: 700; margin-bottom: var(--s1); }
.avatar-center { margin: 0 auto; }
.pin-input { font-size: 1.9rem !important; letter-spacing: .5em; text-align: center; direction: ltr; background: var(--surface-2) !important; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-top: var(--s3); direction: ltr; }
.keypad button { min-height: 60px; font-size: 1.4rem; border-radius: 12px; }

/* QR & poster */
.qr-box { background: #fff; border-radius: var(--r-lg); padding: var(--s5); display: grid; place-items: center; border: 1px solid var(--border); }
.qr-box svg { width: 100%; max-width: 300px; height: auto; }
.poster { width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; color: #202033; display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; text-align: center; padding: 18mm 16mm; box-shadow: var(--shadow-3); }
.poster-brand { font-family: var(--font-display); font-size: 60px; color: #6941E8; line-height: 1.3; }
.poster h1 { font-family: var(--font-display); font-weight: 400; font-size: 52px; line-height: 1.3; color: #6941E8; margin: 6mm 0 2mm; }
.poster .qr { width: 110mm; padding: 6mm; border: 2.5mm solid #6941E8; border-radius: 10mm; }
.poster .qr svg { width: 100%; height: auto; }
.poster ol { text-align: start; font-size: 20px; line-height: 1.9; margin: 0; padding-inline-start: 1.2em; }
.poster-foot { font-size: 14px; color: #5B5B6E; }
.print-actions { display: flex; justify-content: center; gap: var(--s3); padding: var(--s4); }
@media print {
  .print-actions, .no-print { display: none !important; }
  body { background: #fff; }
  .poster { box-shadow: none; }
  @page { size: A4; margin: 0; }
}

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%;
  animation: shimmer 1.4s infinite; border-radius: var(--r-lg); min-height: 130px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.lang-switch { display: inline-flex; }
.lang-switch button { background: none; border: 0; color: inherit; font: inherit; font-size: .85rem; cursor: pointer; padding: 6px 10px; border-radius: var(--r-sm); }
.lang-switch button:hover { background: var(--surface-2); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.checklist li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2); border-radius: 10px; }
.checklist li:hover { background: var(--surface-2); }
.checklist a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.checklist .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex-shrink: 0; }
.checklist .done .dot { background: var(--ready); border-color: var(--ready); color: #fff; }
.checklist .done a { color: var(--muted); text-decoration: line-through; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-bottom: var(--s3); }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--ready), var(--deep)); border-radius: inherit; }

.pagination { display: flex; gap: var(--s2); justify-content: center; margin-top: var(--s4); align-items: center; }

/* ==========================================================================
   Marketing site
   ========================================================================== */
.site { background: var(--surface); }
.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.site-nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.site-nav .container { display: flex; align-items: center; gap: var(--s5); min-height: 68px; }
.site-nav .brand { margin: 0; }
.site-links { display: flex; gap: var(--s1); }
.site-links a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .93rem; padding: 6px 12px; border-radius: 8px; }
.site-links a:hover { background: var(--surface-2); color: var(--text); }
.site-links a { white-space: nowrap; }
@media (max-width: 1180px) { .site-links { display: none; } }
.site-menu { display: none; position: relative; }
.site-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu[open] summary { background: var(--surface-2); }
.site-menu-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); width: min(300px, calc(100vw - 24px)); display: grid; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 20px 40px -20px rgba(0,0,0,.35); z-index: 40; }
.site-menu-panel a { padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.site-menu-panel a:hover, .site-menu-panel a:focus-visible { background: var(--surface-2); }
.site-menu-strong { color: var(--deep) !important; font-weight: 700 !important; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px !important; }
@media (max-width: 1180px) { .site-menu { display: block; } }
@media (max-width: 400px) { .site-nav .container { gap: var(--s2); } .site-nav .btn-sm { padding-inline: 8px; } .site-nav .lang-switch button { padding-inline: 6px; } .site-nav .brand-name { display: none; } }
.site-nav .container { gap: var(--s3); } .site-links a { padding: 6px 7px; font-size: .88rem; }
@media (max-width: 1520px) { .hide-tablet { display: none !important; } }

.hero { position: relative; overflow: hidden; padding: var(--s8) 0 var(--s7);
  background:
    radial-gradient(900px 420px at 85% -5%, color-mix(in srgb, var(--ready) 14%, transparent), transparent 65%),
    radial-gradient(700px 380px at 0% 10%, color-mix(in srgb, var(--deep) 10%, transparent), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--surface)); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s7); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.pill { display: inline-flex; align-items: center; gap: var(--s2); padding: 4px 14px 4px 6px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); box-shadow: var(--shadow-1); }
.pill b { background: var(--ready-soft); color: var(--ready-strong); padding: 1px 10px; border-radius: 999px; font-weight: 700; }
.hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 5.6vw, 4.4rem); line-height: 1.12; margin: var(--s5) 0 var(--s4);
  color: var(--brand-900); letter-spacing: 0; }
:root[data-theme="dark"] .hero h1 { color: var(--text); }
.hero h1 em { font-style: normal; color: var(--ready); }
.lead { font-size: 1.15rem; color: var(--text-2); max-width: 46ch; line-height: 1.75; }
.hero-cta { display: flex; gap: var(--s3); flex-wrap: wrap; margin: var(--s5) 0 var(--s4); }
.hero-points { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--muted); font-size: .9rem; list-style: none; padding: 0; margin: 0; }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .icon { color: var(--ready); }
.hero-visual { position: relative; min-height: 460px; }
.device-tablet { position: absolute; inset-inline-end: 0; top: 24px; width: 92%; border-radius: 18px; overflow: hidden; background: var(--surface);
  border: 8px solid #202033; box-shadow: var(--shadow-3); }
.device-phone { position: absolute; inset-inline-start: 0; bottom: 0; width: 34%; min-width: 170px; border-radius: 30px; overflow: hidden;
  border: 7px solid #202033; box-shadow: 0 30px 60px -20px rgba(32,32,51,.55); background: #202033; }
.device-tablet img, .device-phone img { display: block; width: 100%; height: auto; }
@media (max-width: 960px) { .hero-visual { min-height: max(380px, 72vw); } } /* tall enough that the phone never rides up over the buttons */

.section { padding: var(--s8) 0; }
.section-alt { background: var(--bg); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin: 0 auto var(--s7); text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: var(--s3); }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.kicker { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--deep); background: var(--brand-50); padding: 3px 12px; border-radius: 999px;
  margin-bottom: var(--s3); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s6) var(--s5); box-shadow: var(--shadow-1); position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: var(--s5); inset-inline-end: var(--s5); font-size: 2.6rem; font-weight: 700;
  color: var(--surface-3); line-height: 1; }
.step-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--deep); margin-bottom: var(--s4); }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); margin: 0; }

.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s7); align-items: center; }
.feature-row + .feature-row { margin-top: var(--s8); }
.feature-row.flip > :first-child { order: 2; }
@media (max-width: 900px) { .feature-row { grid-template-columns: 1fr; } .feature-row.flip > :first-child { order: 0; } }
.feature-row h3 { font-size: 1.6rem; margin-bottom: var(--s3); }
.feature-row p { color: var(--muted); font-size: 1.02rem; }
.ticks { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s2); }
.ticks li { display: flex; gap: var(--s2); align-items: flex-start; color: var(--text-2); }
.ticks .icon { color: var(--ready); margin-top: 4px; }
.shot { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-3); background: var(--surface); }
.shot img { display: block; width: 100%; height: auto; }
.shot-phone { max-width: 300px; margin: 0 auto; border-radius: 30px; border: 7px solid #202033; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); max-width: 920px; margin: 0 auto; }
@media (max-width: 800px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s6); box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.plan-featured { border-color: var(--deep); box-shadow: 0 0 0 1px var(--deep), var(--shadow-3); position: relative; }
.plan-tag { position: absolute; top: -13px; inset-inline-start: var(--s6); background: var(--deep); color: var(--on-brand); font-size: .75rem; font-weight: 700;
  padding: 3px 12px; border-radius: 999px; }
.plan h3 { font-size: 1.35rem; margin-bottom: 4px; }
.plan-price { font-size: 1.5rem; font-weight: 700; margin: var(--s4) 0; color: var(--deep); }
.plan .ticks { margin: 0 0 var(--s5); flex: 1; }
.soon { font-size: .72rem; font-weight: 700; color: var(--amber); background: var(--amber-soft); padding: 1px 8px; border-radius: 999px; margin-inline-start: 6px; }

.compare { max-width: 920px; margin: var(--s7) auto 0; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.yes { color: var(--ready); font-weight: 700; }
.no { color: var(--muted); }

.faq { max-width: 780px; margin: 0 auto; display: grid; gap: var(--s3); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s4) var(--s5); box-shadow: var(--shadow-1); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--s3); }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: var(--s3) 0 0; }

.cta-band { background: linear-gradient(135deg, var(--brand-900), var(--deep) 60%, var(--brand-600)); color: #fff; border-radius: var(--r-xl); padding: var(--s7);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: start; box-shadow: var(--shadow-3); }
@media (max-width: 900px) { .cta-band { grid-template-columns: 1fr; padding: var(--s5); } }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { color: rgba(255,255,255,.82); }
.cta-band .card { color: var(--text); }
.cta-band .card p { color: var(--text-2); }
.cta-band .card .muted { color: var(--muted); }
.cta-band .ticks li { color: rgba(255,255,255,.9); }
.cta-band .ticks .icon { color: #C5F45B; }

.site-foot { padding: var(--s7) 0 var(--s6); border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.site-foot .container { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; justify-content: space-between; }
.site-foot a { color: var(--muted); }
.note { font-size: .78rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* bar heights (generated) */
.h-0{height:0%}.h-1{height:1%}.h-2{height:2%}.h-3{height:3%}.h-4{height:4%}.h-5{height:5%}.h-6{height:6%}.h-7{height:7%}.h-8{height:8%}.h-9{height:9%}.h-10{height:10%}.h-11{height:11%}.h-12{height:12%}.h-13{height:13%}.h-14{height:14%}.h-15{height:15%}.h-16{height:16%}.h-17{height:17%}.h-18{height:18%}.h-19{height:19%}.h-20{height:20%}.h-21{height:21%}.h-22{height:22%}.h-23{height:23%}.h-24{height:24%}.h-25{height:25%}.h-26{height:26%}.h-27{height:27%}.h-28{height:28%}.h-29{height:29%}.h-30{height:30%}.h-31{height:31%}.h-32{height:32%}.h-33{height:33%}.h-34{height:34%}.h-35{height:35%}.h-36{height:36%}.h-37{height:37%}.h-38{height:38%}.h-39{height:39%}.h-40{height:40%}.h-41{height:41%}.h-42{height:42%}.h-43{height:43%}.h-44{height:44%}.h-45{height:45%}.h-46{height:46%}.h-47{height:47%}.h-48{height:48%}.h-49{height:49%}.h-50{height:50%}.h-51{height:51%}.h-52{height:52%}.h-53{height:53%}.h-54{height:54%}.h-55{height:55%}.h-56{height:56%}.h-57{height:57%}.h-58{height:58%}.h-59{height:59%}.h-60{height:60%}.h-61{height:61%}.h-62{height:62%}.h-63{height:63%}.h-64{height:64%}.h-65{height:65%}.h-66{height:66%}.h-67{height:67%}.h-68{height:68%}.h-69{height:69%}.h-70{height:70%}.h-71{height:71%}.h-72{height:72%}.h-73{height:73%}.h-74{height:74%}.h-75{height:75%}.h-76{height:76%}.h-77{height:77%}.h-78{height:78%}.h-79{height:79%}.h-80{height:80%}.h-81{height:81%}.h-82{height:82%}.h-83{height:83%}.h-84{height:84%}.h-85{height:85%}.h-86{height:86%}.h-87{height:87%}.h-88{height:88%}.h-89{height:89%}.h-90{height:90%}.h-91{height:91%}.h-92{height:92%}.h-93{height:93%}.h-94{height:94%}.h-95{height:95%}.h-96{height:96%}.h-97{height:97%}.h-98{height:98%}.h-99{height:99%}.h-100{height:100%}

/* widths (generated) */
.w-0{width:0%}.w-1{width:1%}.w-2{width:2%}.w-3{width:3%}.w-4{width:4%}.w-5{width:5%}.w-6{width:6%}.w-7{width:7%}.w-8{width:8%}.w-9{width:9%}.w-10{width:10%}.w-11{width:11%}.w-12{width:12%}.w-13{width:13%}.w-14{width:14%}.w-15{width:15%}.w-16{width:16%}.w-17{width:17%}.w-18{width:18%}.w-19{width:19%}.w-20{width:20%}.w-21{width:21%}.w-22{width:22%}.w-23{width:23%}.w-24{width:24%}.w-25{width:25%}.w-26{width:26%}.w-27{width:27%}.w-28{width:28%}.w-29{width:29%}.w-30{width:30%}.w-31{width:31%}.w-32{width:32%}.w-33{width:33%}.w-34{width:34%}.w-35{width:35%}.w-36{width:36%}.w-37{width:37%}.w-38{width:38%}.w-39{width:39%}.w-40{width:40%}.w-41{width:41%}.w-42{width:42%}.w-43{width:43%}.w-44{width:44%}.w-45{width:45%}.w-46{width:46%}.w-47{width:47%}.w-48{width:48%}.w-49{width:49%}.w-50{width:50%}.w-51{width:51%}.w-52{width:52%}.w-53{width:53%}.w-54{width:54%}.w-55{width:55%}.w-56{width:56%}.w-57{width:57%}.w-58{width:58%}.w-59{width:59%}.w-60{width:60%}.w-61{width:61%}.w-62{width:62%}.w-63{width:63%}.w-64{width:64%}.w-65{width:65%}.w-66{width:66%}.w-67{width:67%}.w-68{width:68%}.w-69{width:69%}.w-70{width:70%}.w-71{width:71%}.w-72{width:72%}.w-73{width:73%}.w-74{width:74%}.w-75{width:75%}.w-76{width:76%}.w-77{width:77%}.w-78{width:78%}.w-79{width:79%}.w-80{width:80%}.w-81{width:81%}.w-82{width:82%}.w-83{width:83%}.w-84{width:84%}.w-85{width:85%}.w-86{width:86%}.w-87{width:87%}.w-88{width:88%}.w-89{width:89%}.w-90{width:90%}.w-91{width:91%}.w-92{width:92%}.w-93{width:93%}.w-94{width:94%}.w-95{width:95%}.w-96{width:96%}.w-97{width:97%}.w-98{width:98%}.w-99{width:99%}.w-100{width:100%}
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: -1px; }
@media (max-width: 640px) { .hide-phone { display: none !important; } .site-nav .container { gap: var(--s3); } .site-nav .btn-sm { padding-inline: 10px; } }

.auth-card form + p { margin-top: var(--s4); }
.td-actions { display: flex; gap: var(--s2); align-items: center; justify-content: flex-end; }
.site-links a[aria-current="page"] { color: var(--deep); background: var(--brand-50); }
.foot-grid { display: grid !important; grid-template-columns: 1.4fr repeat(4, 1fr); gap: var(--s6); align-items: start !important; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { color: var(--deep); }
.foot-grid strong { color: var(--text); margin-bottom: var(--s1); }
.foot-copy { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--border); display: block !important; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.page-hero { padding: var(--s8) 0 var(--s6); background: linear-gradient(180deg, var(--bg), var(--surface)); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 4.5vw, 3.4rem); color: var(--brand-900); margin: var(--s3) 0; line-height: 1.2; }
:root[data-theme="dark"] .page-hero h1 { color: var(--text); }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: var(--s6); }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-inline-start: 1.2em; }
.legal-note { background: var(--amber-soft); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber-glow) 40%, transparent); padding: var(--s3) var(--s4); border-radius: var(--r); margin-bottom: var(--s5); }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s5); }
@media (max-width: 860px) { .cards-3 { grid-template-columns: 1fr; } }
.demo-stage { display: grid; grid-template-columns: 300px 1fr; gap: var(--s6); align-items: start; }
@media (max-width: 900px) { .demo-stage { grid-template-columns: 1fr; } }
.demo-phone { border: 8px solid #202033; border-radius: 34px; overflow: hidden; box-shadow: var(--shadow-3); background: var(--bg); min-height: 560px; display: flex; flex-direction: column; }
.demo-phone .cx { min-height: 544px; }
.demo-tag { display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 700; color: var(--amber); background: var(--amber-soft); padding: 3px 12px; border-radius: 999px; }
.cta-ghost { --btn-fg: #fff !important; --btn-bd: rgba(255,255,255,.35) !important; }
.mb { margin-bottom: var(--s4); }
.small-value { font-size: 1.2rem; }
.ops-sidebar { background: linear-gradient(180deg, #202033 0%, #181828 100%); }

.formset td.field { margin: 0; display: table-cell; vertical-align: top; } .formset .input, .formset input, .formset select { min-width: 90px; }
/* Accessible amber ink for small text on tinted backgrounds (WCAG AA ≥ 4.5:1 on --amber-soft). */
:root { --amber-ink: #7A4A00; }
:root[data-theme="dark"] { --amber-ink: #F6C77A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --amber-ink: #F6C77A; } }
.soon, .legal-note, .badge-preparing, .demo-tag, .lane[data-lane="preparing"] .lane-count { color: var(--amber-ink); }

/* ---------------- Kitchen & bar stations ---------------- */
.station { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.station-off { margin: 16px; padding: 12px 16px; border-radius: var(--r); background: var(--amber-soft); color: var(--amber-ink); }
.station-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 16px; align-content: start; }
.st-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.st-new { border-color: var(--amber); }
.st-started { border-color: var(--info); }
.st-done { background: var(--surface-2); }  /* finished: tinted, not faded, so text keeps its contrast */
.st-head { display: flex; justify-content: space-between; align-items: baseline; }
.st-label { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: var(--deep); }
.st-age { font-variant-numeric: tabular-nums; color: var(--muted); }
.st-late { color: var(--danger); font-weight: 700; }
.st-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 1.15rem; }
.st-mod { font-size: .95rem; color: var(--muted); padding-inline-start: 1.2em; }
.st-note { margin: 0; padding: 6px 10px; background: var(--amber-soft); border-radius: var(--r-sm); }
.st-actions { display: flex; gap: 8px; margin-top: auto; }
.st-actions .btn-lg { flex: 1; }
.st-empty { grid-column: 1 / -1; text-align: center; font-size: 1.3rem; padding: 60px 0; }
.station-done { padding: 0 16px 16px; }
.station-done-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.station-link { color: inherit; text-decoration: none; }
.print-frame { position: fixed; width: 1px; height: 1px; border: 0; inset-inline-start: -10px; bottom: 0; opacity: 0; }

/* ---------------- Counter screen (TV) ---------------- */
.screen { min-height: 100vh; display: flex; flex-direction: column; background: #202033; color: #fff; padding: 2vh 3vw; }
.screen-head { display: flex; align-items: center; gap: 2vw; }
.screen-head h1 { font-family: var(--font-display); font-weight: 400; font-size: 5vh; margin: 0; flex: 1; color: #fff; }
.screen .conn { background: transparent; color: #D9D8E6; border-color: transparent; }
.screen-logo { height: 8vh; width: auto; border-radius: 12px; background: #fff; }
.screen-cols { flex: 1; display: grid; grid-template-columns: 1fr 1.4fr; gap: 3vw; margin-top: 3vh; }
.screen-one { grid-template-columns: 1fr; }
.screen-cols h2 { font-size: 4vh; margin: 0 0 2vh; color: #D9D8E6; }
.screen-ready h2 { color: #C5F45B; }
.screen-nums { display: flex; flex-wrap: wrap; gap: 1.6vh; align-content: flex-start; }
.screen-num { font-family: var(--font-display); font-size: 8vh; line-height: 1; padding: 1.5vh 2.4vh; border-radius: 2vh; background: rgba(255,255,255,.08); }
.screen-ready .screen-num { background: #C5F45B; color: #202033; }
.screen-new { animation: screen-pop 1.2s var(--ease) 3; }
@keyframes screen-pop { 50% { transform: scale(1.12); background: #E5A13A; } }
.screen-foot { font-size: 3vh; text-align: center; opacity: .85; padding-top: 2vh; }
@media (prefers-reduced-motion: reduce) { .screen-new { animation: none; } }

/* ---------------- Order from the table ---------------- */
.table-order { max-width: 720px; margin: 0 auto; padding: 16px 16px 110px; }
.to-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.to-head h1 { margin: 0; font-size: 1.4rem; }
.to-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 14px; background: #fff; }
.to-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 14px; white-space: nowrap; font: inherit; }
.chip-on { background: var(--deep); color: var(--on-brand); border-color: var(--deep); }
.to-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.to-prod { display: flex; flex-direction: column; gap: 4px; text-align: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 10px; font: inherit; color: inherit; }
.to-prod img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); }
.to-name { font-weight: 600; }
.to-price { color: var(--muted); font-variant-numeric: tabular-nums; }
.to-bar { position: fixed; bottom: 0; inset-inline: 0; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--border); display: flex; justify-content: center; }
.to-bar .btn { width: 100%; max-width: 680px; }
.to-status { margin-top: 16px; font-weight: 600; }

/* ---------------- Table QR poster ---------------- */
.table-poster { min-height: auto; padding: 14mm; gap: 6mm; }
.poster-title { font-family: var(--font-display); font-weight: 400; font-size: 34px; color: #6941E8; margin: 0; }
.poster-table { font-family: var(--font-display); font-size: 64px; color: #202033; line-height: 1; }
.poster-qr { width: 90mm; }
.poster-qr svg { width: 100%; height: auto; }
.poster-cta { font-size: 20px; text-align: center; }

/* ---------------- Customer journey (marketing) ---------------- */
.journey { list-style: none; margin: 0 auto; padding: 0; max-width: 1040px; position: relative; display: grid; gap: var(--s6); }
.journey::before { content: ""; position: absolute; inset-inline-start: 27px; top: 28px; bottom: 28px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--deep), var(--ready)); opacity: .35; }
.j-step { position: relative; display: grid; grid-template-columns: 56px 1fr auto; gap: var(--s5); align-items: start; }
.j-num { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--deep); color: var(--on-brand);
  font-family: var(--font-display); font-size: 1.7rem; position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--bg); }
.j-ready .j-num { background: var(--ready); }
.j-body h2 { margin: 10px 0 var(--s3); font-size: 1.45rem; }
.j-lanes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.j-lane { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s4); }
.j-lane p { margin: 6px 0 0; color: var(--text-2); }
.j-cust { border-inline-start: 4px solid var(--ready); }
.j-cafe { border-inline-start: 4px solid var(--amber); }
.j-who { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; color: var(--deep); }
.j-ready .j-lane { background: var(--ready-soft); }
.j-phone { margin: 0; width: 170px; }
.j-phone img, .j-mini-phones img, .j-shots img { display: block; width: 100%; height: auto; border-radius: 22px; border: 6px solid #202033;
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.45); background: #fff; }
.j-dine { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); counter-reset: step; }
.j-shots { display: grid; grid-template-columns: 170px 1fr 1fr; gap: var(--s5); align-items: start; margin-top: var(--s6); }
.j-shots figure { margin: 0; text-align: center; }
.j-shots .j-wide img { border-width: 4px; border-radius: 14px; }
.j-shots figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.j-mini { list-style: none; padding: 0; margin: 0 0 var(--s6); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); }
.j-mini li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 16px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); font-weight: 600; }
.j-mini li + li::before { content: "←"; color: var(--muted); margin-inline-end: 4px; font-weight: 400; }
[dir=ltr] .j-mini li + li::before { content: "→"; }
.j-mini-n { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--deep); color: var(--on-brand);
  font-size: .85rem; }
.j-mini-ready { background: var(--ready-soft) !important; border-color: var(--ready) !important; }
.j-mini-ready .j-mini-n { background: var(--ready); }
.j-mini-phones { display: flex; justify-content: center; gap: var(--s5); }
.j-mini-phones img { width: 180px; }
@media (max-width: 860px) {
  .j-step { grid-template-columns: 44px 1fr; }
  .j-num { width: 44px; height: 44px; font-size: 1.35rem; }
  .journey::before { inset-inline-start: 21px; }
  .j-phone { grid-column: 2; width: 150px; }
  .j-lanes, .j-dine { grid-template-columns: 1fr; }
  .j-shots { grid-template-columns: 1fr; justify-items: center; }
  .j-shots figure:first-child { width: 170px; }
  .j-mini li + li::before { display: none; }
  .j-mini-phones img { width: 30%; max-width: 150px; border-width: 4px; border-radius: 14px; }
}
.j-player { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); justify-content: center; margin-bottom: var(--s6); }
.j-step { transition: opacity var(--dur) var(--ease); }
.journey:has(.j-active) .j-step:not(.j-active) { opacity: .45; }
.j-active .j-num { box-shadow: 0 0 0 6px var(--bg), 0 0 0 11px var(--amber-soft); }
.plan-price small { font-size: .55em; font-weight: 500; color: var(--muted); }
.plan-yearly, .plan-note { display: block; font-size: .9rem; font-weight: 500; color: var(--muted); margin-top: 4px; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: start; }
.calc-dl { display: grid; gap: var(--s3); margin: 0; }
.calc-dl div { display: flex; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
.calc-dl dt { color: var(--text-2); } .calc-dl dd { margin: 0; font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.calc-wati dd { color: var(--ready-strong); }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.city-ticks { max-width: 720px; margin: 0 auto; }
.j-video { margin: 0 auto var(--s6); max-width: 980px; }
.j-video video { display: block; width: 100%; height: auto; border-radius: 16px; background: #202033; box-shadow: 0 24px 50px -28px rgba(0,0,0,.5); }
.j-video figcaption { margin-top: 8px; text-align: center; font-size: .9rem; color: var(--muted); }
/* A badge inside a vertical stack keeps its own width instead of stretching (checklist "optional"). */
.stack > .badge { justify-self: start; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.grid > * { min-width: 0; } /* long content scrolls inside its card instead of widening the page */

/* ---------------- Posters on small screens (preview only; print keeps exact A4) ---------------- */
@media screen and (max-width: 860px) { main.poster { zoom: .8; } }
@media screen and (max-width: 690px) { main.poster { zoom: .62; } }
@media screen and (max-width: 540px) { main.poster { zoom: .48; } }
@media screen and (max-width: 420px) { main.poster { zoom: .42; } .print-actions { flex-wrap: wrap; } }
@media screen and (max-width: 375px) { main.poster { zoom: .39; } }
@media screen {
  .table-poster { width: 100%; max-width: 210mm; padding: clamp(16px, 4vw, 14mm); }
  .poster-qr { max-width: 100%; }
}
.mono { overflow-wrap: anywhere; }
@media print { .table-wrap { overflow: visible; } }
/* Plain checkboxes/radios: big enough to tap on a phone. */
input[type=checkbox]:not([class]), input[type=radio]:not([class]) { width: 20px; height: 20px; accent-color: var(--deep); flex-shrink: 0; }
/* Form fields laid out in a row share the width and wrap on small screens. */
.row > .field { flex: 1 1 160px; min-width: 0; }
/* Stacked items shrink to the screen; wide content (tables) scrolls inside them. */
.stack > * { min-width: 0; }
/* Long button labels wrap on phones instead of pushing the page sideways. */
@media (max-width: 600px) { .btn { white-space: normal; max-width: 100%; text-align: center; } }
/* Dark mode by phone setting (no explicit theme chosen) gets the same fixes as the dark theme toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary:hover { --btn-bg: var(--brand-600); --btn-bd: var(--brand-600); }
  :root:not([data-theme="light"]) .hero h1, :root:not([data-theme="light"]) .page-hero h1 { color: var(--text); }
}
/* Stat cards: values sit at the start edge (right in Arabic) even when the number is LTR, and the label
   leaves room for the corner icon, so the icon never covers the number. */
.stat > .stat-value, .stat > .stat-sub { justify-self: start; }
.stat:has(> .stat-icon) > .stat-label { padding-inline-end: 52px; }
.stat:has(> .stat-icon) > .stat-value { max-width: calc(100% - 52px); }
/* Repeating form rows (sizes, options, recipes, received stock): a table on wide screens, one small card per row on phones. */
.fs-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } /* read by screen readers; shown on phones */
.formset input[type=checkbox] { min-width: 0; width: 20px; height: 20px; }
@media (max-width: 640px) {
  .formset thead { display: none; }
  .formset, .formset tbody, .formset tr, .formset td.field { display: block; width: 100%; }
  .formset tr { border: 1px solid var(--border); border-radius: var(--r-md, 12px); padding: var(--s3); margin-bottom: var(--s3); background: var(--surface); }
  .formset td.field { border: 0; padding: 4px 0; }
  .formset .fs-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
  .formset td.field:has(input[type=checkbox]) { display: flex; align-items: center; gap: var(--s2); }
  .formset td.field:has(input[type=checkbox]) .fs-label { margin: 0; order: 2; }
  .formset .input, .formset input:not([type=checkbox]), .formset select { width: 100%; min-width: 0; }
}

/* Green surfaces that carry white text (ready button, customer "ready" screen): same deep green in light and
   dark mode so white text keeps WCAG AA contrast (5.5:1); the bright --ready stays for icons and accents. */
/* The information sheet is always printed paper: keep its headings dark in dark mode. */
.sheet h2, .sheet h3 { color: #202033; }
.table-wrap:focus-visible { outline: 2px solid var(--deep); outline-offset: 2px; border-radius: 8px; }
@media (max-width: 480px) { .row > .input, .row > select.input { min-width: 0; flex: 1 1 140px; } }
