/* ============================================================
   Grilzo · Operator Console
   Premium SaaS dashboard: dark sidebar, light content, data-dense.
   ============================================================ */

:root {
  /* Surfaces — white content, dark-grey sidebar */
  --bg:           #F7F8FA;
  --bg-2:         #ECEFF3;
  --surface:      #FFFFFF;
  --surface-2:    #FAFBFC;
  --sidebar:      #1F2127;          /* dark grey (lighter than pure black) */
  --sidebar-2:    #2A2D35;
  --sidebar-line: rgba(255, 255, 255, .08);
  --sidebar-text: #C5C8CE;
  --sidebar-text-strong: #FFFFFF;
  --sidebar-text-muted:  #6E737B;

  /* Ink (light black) */
  --ink:          #0F1115;
  --ink-2:        #1A1D24;
  --ink-3:        #2A2F38;
  --text:         #1A1D24;
  --text-2:       #4A5160;
  --muted:        #6B7280;
  --muted-2:      #9AA1AE;

  /* Borders / dividers */
  --line:         #E5E8EE;
  --line-2:       #EFF2F6;
  --line-strong:  #CFD4DC;

  /* Brand accent — YELLOW. Variable names kept (--gold/--ember) for stability; values changed. */
  --gold:         #F5C518;          /* primary yellow */
  --gold-2:       #D4A50E;          /* darker yellow (hover / pressed) */
  --gold-soft:    #FCE789;          /* soft yellow */
  --gold-bg:      #FFF8DD;          /* yellow tint background */
  --ember:        #6B7280;          /* re-cast as neutral grey — no more red */
  --ember-2:      #4A5160;
  --olive:        #4A5160;          /* re-cast as dark slate */

  /* Functional status colors */
  --success:      #0F8F5B;
  --success-bg:   #E3F5EC;
  --warning:      #B26A00;
  --warning-bg:   #FFF1D6;
  --danger:       #C0322B;
  --danger-bg:    #FBE3E1;
  --info:         #1F5BB8;
  --info-bg:      #E0EBFA;
  --neutral-bg:   #EEF0F4;

  /* Chart palette — yellow + greyscale + functional colors */
  --chart-1:      #F5C518;  /* yellow */
  --chart-2:      #1F2127;  /* dark grey */
  --chart-3:      #0F8F5B;  /* green */
  --chart-4:      #1F5BB8;  /* blue */
  --chart-5:      #9AA1AE;  /* light grey */
  --chart-6:      #D4A50E;  /* darker yellow */

  /* Type */
  --f-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --f-mono:    'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Geometry */
  --sidebar-w:    228px;
  --topbar-h:     64px;
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadow */
  --sh-xs: 0 1px 2px rgba(11, 13, 18, .04);
  --sh-sm: 0 1px 3px rgba(11, 13, 18, .06), 0 1px 2px rgba(11, 13, 18, .04);
  --sh-md: 0 6px 16px -6px rgba(11, 13, 18, .10), 0 2px 6px rgba(11, 13, 18, .06);
  --sh-lg: 0 24px 40px -16px rgba(11, 13, 18, .18), 0 8px 16px -8px rgba(11, 13, 18, .08);
  --sh-focus: 0 0 0 3px rgba(194, 135, 41, .25);
}

/* ============================================================
   Dark theme — main content inverts; sidebar stays dark.
   Activated by html[data-theme="dark"] (toggled by JS, persisted in localStorage).
   ============================================================ */
html[data-theme="dark"] {
  --bg:           #0E1014;
  --bg-2:         #15181E;
  --surface:      #181B22;
  --surface-2:    #1F232B;

  --ink:          #F4F6FA;
  --ink-2:        #E1E4EA;
  --ink-3:        #C4C9D3;
  --text:         #E5E8EE;
  --text-2:       #B7BDC6;
  --muted:        #8C939E;
  --muted-2:      #6E737B;

  --line:         rgba(255, 255, 255, .08);
  --line-2:       rgba(255, 255, 255, .05);
  --line-strong:  rgba(255, 255, 255, .14);

  /* Status backgrounds — translucent overlays of the foreground colour */
  --success-bg:   rgba(15, 143, 91, .18);
  --warning-bg:   rgba(178, 106, 0, .22);
  --danger-bg:    rgba(192, 50, 43, .22);
  --info-bg:      rgba(31, 91, 184, .22);
  --gold-bg:      rgba(232, 163, 58, .15);
  --neutral-bg:   rgba(255, 255, 255, .06);

  /* Marigold — warm, food-brand, premium on dark surfaces. Replaces the harsh bright yellow. */
  --gold:         #E8A33A;
  --gold-2:       #C48421;
  --gold-soft:    rgba(232, 163, 58, .35);

  /* Slightly brighter functional colours so they read on dark surfaces */
  --success:      #2BB378;
  --warning:      #E8A23A;
  --danger:       #E66058;
  --info:         #5A8AE0;

  /* Shadows deepen on dark surfaces */
  --sh-xs: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-sm: 0 2px 6px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .25);
  --sh-md: 0 8px 22px -8px rgba(0, 0, 0, .55), 0 3px 8px rgba(0, 0, 0, .35);
  --sh-lg: 0 28px 48px -18px rgba(0, 0, 0, .65), 0 10px 20px -8px rgba(0, 0, 0, .45);
}

/* OSM / Leaflet tiles look harsh on dark — invert + hue-rotate gives a usable dark map */
html[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.85); }
html[data-theme="dark"] .leaflet-control-attribution { background: rgba(24, 27, 34, .85); color: var(--text-2); }
html[data-theme="dark"] .leaflet-control-attribution a { color: var(--text); }

/* Inputs in dark mode need a darker fill or they look like punched holes */
html[data-theme="dark"] .input,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="time"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--line);
}
html[data-theme="dark"] .btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}
html[data-theme="dark"] .btn-ghost:hover { background: var(--bg-2); }
html[data-theme="dark"] code { background: var(--bg-2); color: #F2C26A; padding: 1px 6px; border-radius: 4px; }

/* Gold-backed elements need dark text in both themes (gold itself is a light hue) */
html[data-theme="dark"] .btn-gold,
html[data-theme="dark"] .btn-gold:hover,
html[data-theme="dark"] .avatar,
html[data-theme="dark"] .sidebar-brand .mark {
  color: #0F1115;
}
/* Elements that use --ink as background flip to light surface in dark mode.
   Their hardcoded `color: white` becomes white-on-white. Force dark text. */
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .pill-ink,
html[data-theme="dark"] .status-DELIVERED,
html[data-theme="dark"] .status-FULFILLED,
html[data-theme="dark"] .status-PAID,
html[data-theme="dark"] .step-rail .step.current {
  color: #0F1115;
}
/* Active sidebar nav: gold accent rail reads cleaner in the new tone */
html[data-theme="dark"] .nav a.active { box-shadow: inset 2px 0 0 var(--gold); }
/* Gold pill: ensure foreground reads on the translucent gold bg */
html[data-theme="dark"] .pill-gold { color: #F2C26A; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.25;
}
/* Browser default of 700 for <strong>/<b> reads as blocky on dark surfaces.
   Tame to 600 (semi-bold) so emphasis stays clear without smearing. */
strong, b { font-weight: 600; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

.display { font-family: var(--f-display); font-weight: 500; letter-spacing: -.02em; }
.mono { font-family: var(--f-mono); }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-1 { flex: 1; }
.space-between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

::selection { background: var(--gold-soft); color: var(--ink); }

code {
  font-family: var(--f-mono);
  font-size: 12px;
  background: var(--neutral-bg);
  padding: 2px 6px;
  border-radius: var(--r-xs);
  color: var(--ink-2);
}

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ----- Sidebar ----- */
.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--sidebar-line);
  /* Hide scrollbar but allow scrolling when content overflows */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sidebar-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sidebar-line);
  color: var(--sidebar-text-strong);
}
.sidebar-brand .mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 6px 14px -4px rgba(194, 135, 41, .5);
}
.sidebar-brand .word {
  font-family: var(--f-display);
  font-size: 20px;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.sidebar-brand .word small {
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--sidebar-text-muted);
  margin-top: 2px;
}

.sidebar-section { padding: 8px 8px 0; }
.sidebar-section + .sidebar-section {
  margin-top: 10px;
  padding-top: 8px;
}
.sidebar-section-title {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sidebar-text-muted);
  padding: 0 10px 4px;
  opacity: .75;
}

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover {
  background: var(--sidebar-2);
  color: var(--sidebar-text-strong);
}
.nav a.active {
  background: var(--sidebar-2);
  color: var(--sidebar-text-strong);
  box-shadow: inset 2px 0 0 var(--gold);
}
.nav a .icon { width: 15px; height: 15px; flex-shrink: 0; color: currentColor; opacity: .85; }
.nav a .badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--r-pill);
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--sidebar-line);
  display: flex; flex-direction: column; gap: 10px;
}
.sidebar-foot-user { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 30px; height: 30px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--ink);
  display: grid; place-items: center;
  font-weight: 600; font-size: 12px;
  flex-shrink: 0;
}
.sidebar-foot .avatar { width: 30px; height: 30px; font-size: 12px; }
.sidebar-foot .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sidebar-foot .who strong { color: var(--sidebar-text-strong); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .who small { font-size: 10.5px; color: var(--sidebar-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .theme-toggle {
  flex-shrink: 0;
  color: var(--sidebar-text-muted);
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  transition: background .15s, color .15s;
  background: transparent; border: 0; cursor: pointer;
}
.sidebar-foot .theme-toggle:hover { background: var(--sidebar-2); color: var(--sidebar-text-strong); }

.signout-form { margin: 0; }
.signout-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--sidebar-2);
  color: var(--sidebar-text-strong);
  border: 1px solid var(--sidebar-line);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.signout-btn:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.signout-btn:active { transform: scale(.985); }
.signout-btn .icon { width: 15px; height: 15px; }

/* Theme toggle: show moon in light, sun in dark. */
.theme-toggle .theme-icon-light { display: none; }
.theme-toggle .theme-icon-dark  { display: block; }
html[data-theme="dark"] .theme-toggle .theme-icon-light { display: block; }
html[data-theme="dark"] .theme-toggle .theme-icon-dark  { display: none; }

/* ----- Main column ----- */
.main {
  display: flex; flex-direction: column;
  min-width: 0;     /* lets tables scroll */
  background: var(--bg);
}
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}
.topbar .crumbs {
  font-size: 12px;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.topbar .crumbs .sep { color: var(--line-strong); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Installed desktop app: collapse the PWA title/URL bar into just the window
   controls (min/max/close), overlaid on the app. Reserve the overlay strip so
   nothing sits under the controls — top-left on macOS, top-right on Windows —
   and keep that strip draggable so the window can still be moved. */
@media (display-mode: window-controls-overlay) {
  .sidebar { padding-top: env(titlebar-area-height, 33px); }
  .sidebar-brand { -webkit-app-region: drag; app-region: drag; }
  .topbar {
    height: calc(var(--topbar-h) + env(titlebar-area-height, 33px));
    padding-top: env(titlebar-area-height, 33px);
    -webkit-app-region: drag; app-region: drag;
  }
  .topbar a, .topbar button, .topbar input, .topbar .searchbox,
  .topbar .menu-toggle, .sidebar-brand a, .sidebar-brand button {
    -webkit-app-region: no-drag; app-region: no-drag;
  }
}
.searchbox {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  min-width: 240px;
  color: var(--muted);
}
.searchbox input {
  border: 0; background: transparent; outline: none;
  flex: 1; font-size: 13px; color: var(--ink);
}

/* Master admin search (topbar live investor lookup) */
.admin-search { position: relative; }
.admin-search .searchbox { min-width: 280px; }
.admin-search-panel {
  position: absolute; top: calc(100% + 8px); left: 0;
  width: min(440px, 92vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md, 12px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .18);
  padding: 6px; z-index: 60;
  max-height: 70vh; overflow-y: auto;
}
.admin-search-item {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  column-gap: 10px; row-gap: 2px;
  padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: var(--text);
}
.admin-search-item:hover { background: var(--bg-2); }
.admin-search-name { grid-column: 1; grid-row: 1; font-weight: 600; font-size: 14px; color: var(--ink); }
.admin-search-meta { grid-column: 1; grid-row: 2; font-size: 12px; color: var(--muted); }
.admin-search-pill {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px;
  background: var(--gold-bg); color: var(--gold-2);
}
.admin-search-empty { padding: 14px 12px; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 760px) {
  .admin-search .searchbox { min-width: 0; width: 160px; }
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }

.page {
  padding: 28px;
  display: flex; flex-direction: column; gap: 24px;
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.page-head h1 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- Flash messages ---------- */
.flashes { display: flex; flex-direction: column; gap: 8px; }
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13.5px;
  box-shadow: var(--sh-xs);
}
.flash-info { border-left-color: var(--info); }
.flash-error { border-left-color: var(--danger); background: var(--danger-bg); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h2 { font-size: 14px; font-weight: 600; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; }
.card-flush { padding: 0; }
.card-flush .data-table { border: 0; border-radius: 0; box-shadow: none; }
.card-flush .data-table thead th:first-child,
.card-flush .data-table tbody td:first-child { padding-left: 20px; }
.card-flush .data-table thead th:last-child,
.card-flush .data-table tbody td:last-child { padding-right: 20px; }

/* ---------- Metric cards ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  box-shadow: var(--sh-xs);
  position: relative;
  overflow: hidden;
}
.metric .metric-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.metric .metric-label .icon {
  width: 16px; height: 16px;
  padding: 4px;
  background: var(--neutral-bg);
  border-radius: var(--r-xs);
  color: var(--ink-2);
  box-sizing: content-box;
}
.metric .metric-label .icon.gold  { background: var(--gold-bg);    color: var(--gold-2); }
.metric .metric-label .icon.green { background: var(--success-bg); color: var(--success); }
.metric .metric-label .icon.blue  { background: var(--info-bg);    color: var(--info); }
.metric .metric-label .icon.red   { background: var(--danger-bg);  color: var(--danger); }
.metric .metric-value {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -.02em;
  margin-top: 10px;
  line-height: 1.1;
}
.metric .metric-foot {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }
.trend-up   { color: var(--success); }
.trend-down { color: var(--danger); }
.trend-flat { color: var(--muted); }

/* ---------- Grid helpers ---------- */
.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }
@media (max-width: 1100px) { .col-8, .col-7, .col-6, .col-5, .col-4, .col-3 { grid-column: span 12; } }

/* ---------- Tables ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 13.5px;
  box-shadow: var(--sh-xs);
}
.data-table thead th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
}
.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--surface-2); }
.data-table tbody tr.row-link { cursor: pointer; }
.data-table tfoot td { padding: 12px 14px; font-weight: 500; background: var(--surface-2); border-top: 1px solid var(--line); }
.data-table .cell-strong { font-weight: 600; color: var(--ink); }
.data-table .cell-money { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.actions-cell { display: flex; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, transform .08s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--ink-2); color: white; }
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  font-weight: 600;
}
.btn-gold:hover { background: var(--gold-2); color: var(--ink); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--sh-xs);
}
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--line);
}
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger-bg); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
  padding: 8px;
  width: 34px; height: 34px;
}
.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--info);
  font-weight: 500;
  font-size: 13px;
}
.link-btn:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .02em; }
.field-hint  { font-size: 12px; color: var(--muted); }
.field input, .field textarea, .field select,
input.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus,
input.input:focus, select.input:focus, textarea.input:focus {
  outline: 0;
  border-color: var(--gold);
  box-shadow: var(--sh-focus);
}
.field textarea { resize: vertical; min-height: 80px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .row-2, .row-3 { grid-template-columns: 1fr; } }
.radio-row, .check-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.radio-row:hover, .check-row:hover { background: var(--bg); }
.radio-row input, .check-row input { accent-color: var(--gold); }
.qty-input { width: 76px; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--neutral-bg);
  color: var(--ink-2);
  border: 1px solid transparent;
}
.pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.pill-success      { color: var(--success); background: var(--success-bg); }
.pill-warning      { color: var(--warning); background: var(--warning-bg); }
.pill-danger       { color: var(--danger);  background: var(--danger-bg); }
.pill-info         { color: var(--info);    background: var(--info-bg); }
.pill-gold         { color: var(--gold-2);  background: var(--gold-bg); }
.pill-ember        { color: var(--warning); background: var(--warning-bg); }
.pill-ink          { color: white; background: var(--ink); }

/* status -> pill mapping */
.status-DRAFT             { color: var(--muted);   background: var(--neutral-bg); }
.status-PLACED            { color: var(--gold-2);  background: var(--gold-bg); }
.status-ACCEPTED          { color: var(--info);    background: var(--info-bg); }
.status-PREPARING         { color: var(--warning); background: var(--warning-bg); }
.status-READY             { color: var(--success); background: var(--success-bg); }
.status-OUT_FOR_DELIVERY  { color: var(--gold-2);  background: var(--gold-bg); }
.status-DELIVERED         { color: white;          background: var(--ink); }
.status-CANCELLED         { color: var(--danger);  background: var(--danger-bg); }
.status-active            { color: var(--success); background: var(--success-bg); }
.status-inactive          { color: var(--muted);   background: var(--neutral-bg); }
.status-OPEN              { color: var(--success); background: var(--success-bg); }
.status-CLOSED            { color: var(--muted);   background: var(--neutral-bg); }
.status-MAINTENANCE       { color: var(--warning); background: var(--warning-bg); }
.status-ONLINE            { color: var(--success); background: var(--success-bg); }
.status-OFFLINE           { color: var(--muted);   background: var(--neutral-bg); }
.status-ON_TRIP           { color: var(--gold-2);  background: var(--gold-bg); }
.status-REQUESTED         { color: var(--gold-2);  background: var(--gold-bg); }
.status-ACKNOWLEDGED      { color: var(--info);    background: var(--info-bg); }
.status-IN_TRANSIT        { color: var(--warning); background: var(--warning-bg); }
.status-DISPATCHED        { color: var(--warning); background: var(--warning-bg); }
.status-FULFILLED         { color: white;          background: var(--ink); }
.status-CREATED           { color: var(--info);    background: var(--info-bg); }
.status-CAPTURED          { color: var(--success); background: var(--success-bg); }
.status-FAILED            { color: var(--danger);  background: var(--danger-bg); }
.status-REFUNDED          { color: var(--muted);   background: var(--neutral-bg); }
/* Hiring Phase 2 statuses */
.status-SCHEDULED         { color: var(--info);    background: var(--info-bg); }
.status-COMPLETED         { color: var(--success); background: var(--success-bg); }
.status-MISSED            { color: var(--danger);  background: var(--danger-bg); }
.status-PRESENT           { color: var(--success); background: var(--success-bg); }
.status-LATE              { color: var(--warning); background: var(--warning-bg); }
.status-HALF_DAY          { color: var(--gold-2);  background: var(--gold-bg); }
.status-ABSENT            { color: var(--danger);  background: var(--danger-bg); }
.status-FINALIZED         { color: var(--info);    background: var(--info-bg); }
.status-PAID              { color: white;          background: var(--ink); }
.status-warning           { color: var(--warning); background: var(--warning-bg); }

/* ---------- Pipeline (the 7-step order lifecycle) ---------- */
.pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 16px 20px;
}
@media (max-width: 900px) { .pipeline { grid-template-columns: repeat(3, 1fr); } }
.pipe-step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  position: relative;
}
.pipe-step .pipe-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pipe-step .pipe-count {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 26px;
  color: var(--ink);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-top: 4px;
}
.pipe-step .pipe-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; border-radius: 0 0 var(--r-md) var(--r-md);
}
.pipe-PLACED   .pipe-bar { background: var(--gold); }
.pipe-ACCEPTED .pipe-bar { background: var(--info); }
.pipe-PREPARING .pipe-bar { background: var(--warning); }
.pipe-READY    .pipe-bar { background: var(--success); }
.pipe-OUT_FOR_DELIVERY .pipe-bar { background: var(--gold-2); }
.pipe-DELIVERED .pipe-bar { background: var(--ink); }

/* Step rail for order detail */
.step-rail {
  display: flex; gap: 0;
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 4px;
  overflow-x: auto;
}
.step-rail .step {
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--muted);
  min-width: 110px;
}
.step-rail .step strong {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: inherit;
}
.step-rail .step small { font-size: 12px; }
.step-rail .step.done    { background: var(--surface); color: var(--ink); box-shadow: var(--sh-xs); }
.step-rail .step.current { background: var(--ink); color: white; box-shadow: var(--sh-md); }
.step-rail .step.current strong { color: var(--gold-soft); }

/* ---------- Chart container ---------- */
.chart {
  width: 100%;
  min-height: 280px;
}
.chart-sm { min-height: 200px; }

/* ---------- Misc ---------- */
.kpi-strip {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.kpi-strip .item { display: inline-flex; gap: 6px; }
.kpi-strip .item strong { color: var(--ink); font-weight: 600; }

.timeline { display: flex; flex-direction: column; gap: 10px; }
.timeline li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.timeline li strong { font-weight: 500; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-danger  { background: var(--danger); }
.dot-info    { background: var(--info); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-state .icon {
  width: 40px; height: 40px;
  margin: 0 auto 12px;
  color: var(--muted-2);
}

/* ---------- Auth screens (premium centered card) ---------- */
.auth-shell {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 50% -12%, rgba(232, 163, 58, .18), transparent 62%),
    radial-gradient(680px 360px at 0% 100%, rgba(184, 58, 27, .12), transparent 60%),
    var(--bg);
}
.auth-shell::before {
  content: ""; position: absolute; z-index: 0;
  width: 540px; height: 540px; border-radius: 50%;
  top: -190px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, var(--gold-soft), transparent 70%);
  filter: blur(22px); opacity: .55; pointer-events: none;
  animation: authGlow 7s ease-in-out infinite;
}
@keyframes authGlow {
  0%, 100% { opacity: .42; transform: translateX(-50%) scale(1); }
  50%      { opacity: .7;  transform: translateX(-50%) scale(1.08); }
}
.auth-card {
  position: relative; z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg), inset 0 0 0 1px rgba(232, 163, 58, .05);
  padding: 38px 34px;
  max-width: 430px; width: 100%;
  animation: authCardIn .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes authCardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-card .brand-head {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 24px;
}
.auth-card .brand-head .mark {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  display: grid; place-items: center;
  color: #0F1115;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  box-shadow: 0 6px 18px -6px rgba(232, 163, 58, .7), inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.auth-card h1 {
  font-family: var(--f-display);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}
.auth-card .step {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 6px;
}
.auth-card .step::before { content: ""; width: 18px; height: 1px; background: var(--gold-2); opacity: .55; }
.auth-card .input { font-size: 15px; padding: 12px 14px; }
.auth-card .btn-gold { margin-top: 4px; padding: 13px; font-size: 14.5px; }
.auth-trust {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
}
.auth-trust span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.auth-trust i { width: 13px; height: 13px; color: var(--gold-2); }
.seed-hint {
  margin-top: 22px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  font-size: 12.5px;
}
.seed-hint summary { font-weight: 600; cursor: pointer; color: var(--ink); }
.seed-hint ul { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; padding-left: 0; }
.seed-hint code { font-size: 11px; }
/* Phone-first: the card becomes a full-bleed app screen */
@media (max-width: 560px) {
  .auth-shell { padding: 0; place-items: stretch; }
  .auth-card {
    max-width: none; min-height: 100vh; min-height: 100dvh;
    border: 0; border-radius: 0; box-shadow: none;
    display: flex; flex-direction: column; justify-content: center;
    padding: calc(30px + env(safe-area-inset-top)) 22px calc(30px + env(safe-area-inset-bottom));
  }
  .auth-card h1 { font-size: 30px; }
  .auth-card .input { font-size: 16px; }   /* ≥16px stops iOS zoom-on-focus */
}

/* ---------- Customer storefront (uses same chrome but warmer) ---------- */
.storefront .hero-stall {
  background: linear-gradient(135deg, #1F2127 0%, #0F1115 100%);
  color: white;
  padding: 28px 32px;
  border-radius: var(--r-lg);
  display: flex; gap: 24px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.storefront .hero-stall h1 {
  font-family: var(--f-display);
  font-size: 28px;
  color: white;
  letter-spacing: -.02em;
}
.storefront .hero-stall .stall-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.storefront .hero-stall .stall-meta .dot { background: var(--success); margin-right: 6px; }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
/* Fixed 5-up grid for catalog pages (recipe + supply). Degrades on narrower screens. */
.menu-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 1500px) { .menu-grid-5 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1180px) { .menu-grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .menu-grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .menu-grid-5 { grid-template-columns: 1fr; } }
.menu-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
  box-shadow: var(--sh-xs);
}
.menu-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--gold-soft); }
.menu-card .cat {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.menu-card h3 { margin: 4px 0; }
.menu-card .desc { font-size: 13px; color: var(--muted); flex: 1; }
.menu-card .foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.menu-card .price {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
}

/* ---------- Mobile sidebar collapse ---------- */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    width: 248px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 0 16px; }
  .page { padding: 16px; }
}
.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  align-items: center; justify-content: center;
  color: var(--ink);
}
@media (max-width: 900px) { .menu-toggle { display: inline-flex; } }

/* ---------- Admin dashboard tabs (Network / Customers / Rentals / …) ---------- */
.dash-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 16px;
  flex-wrap: wrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.dash-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: background .15s, color .15s, transform .1s, box-shadow .15s;
  flex-shrink: 0;
  text-decoration: none;
}
.dash-tab .icon {
  width: 28px; height: 28px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(15, 17, 21, .04);
  color: var(--muted);
  transition: background .15s, color .15s, transform .12s;
  flex-shrink: 0;
}
.dash-tab:hover {
  background: var(--surface);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .12);
}
.dash-tab:hover .icon {
  background: var(--gold-bg);
  color: var(--gold-2);
}
.dash-tab.active {
  background: linear-gradient(135deg, var(--ink) 0%, #2a2d35 100%);
  color: white;
  box-shadow: 0 4px 14px -4px rgba(15, 17, 21, .35);
}
.dash-tab.active:hover { color: white; transform: translateY(-1px); }
.dash-tab.active .icon {
  background: var(--gold);
  color: var(--ink);
}

/* Dark theme: active tab uses marigold gold (since --ink flips to light, the default would be invisible). */
html[data-theme="dark"] .dash-tab .icon { background: rgba(255, 255, 255, .06); color: var(--muted); }
html[data-theme="dark"] .dash-tab:hover { background: rgba(255, 255, 255, .06); color: var(--ink); }
html[data-theme="dark"] .dash-tab:hover .icon { background: var(--gold-bg); color: var(--gold-2); }
html[data-theme="dark"] .dash-tab { color: var(--text-2); }
html[data-theme="dark"] .dash-tab.active,
html[data-theme="dark"] .dash-tab.active:hover {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: #0F1115;
  box-shadow: 0 6px 18px -6px rgba(232, 163, 58, .55), inset 0 0 0 1px rgba(15, 17, 21, .08);
}
html[data-theme="dark"] .dash-tab.active .icon {
  background: rgba(15, 17, 21, .18);
  color: #0F1115;
}

/* ============================================================
   Landing pages (marketing chrome for the 8 subdomains)
   ============================================================ */

.land-shell { background: var(--surface); color: var(--ink); }
.land-nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center;
  padding: 16px clamp(20px, 4vw, 48px);
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.land-nav .brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.land-nav .brand .mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  display: grid; place-items: center; color: white;
  font-family: var(--f-display); font-weight: 600; font-size: 16px;
}
.land-nav .brand .word {
  font-family: var(--f-display); font-size: 18px;
  letter-spacing: -.02em; font-weight: 500;
}
.land-nav .brand small {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); display: block; margin-top: 1px;
}
.land-nav-right { margin-left: auto; display: flex; gap: 12px; align-items: center; }

/* Hero with palette-based gradient */
.land-hero {
  padding: clamp(60px, 9vw, 110px) clamp(20px, 4vw, 48px) clamp(50px, 8vw, 90px);
  position: relative; overflow: hidden;
}
.land-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr; gap: 28px;
  position: relative; z-index: 2;
}
.land-hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-2); font-weight: 600;
}
.land-hero .kicker::before {
  content: ""; width: 24px; height: 1px; background: currentColor;
}
.land-hero h1 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.025em;
  color: var(--ink);
  max-width: 860px;
}
.land-hero p.lede {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--text-2);
  max-width: 620px;
  line-height: 1.55;
}
.land-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero ambient gradient — yellow accents on white, with one dark variant.
   All palette- classes kept (template references them); colors all map to yellow/grey/white. */
.land-hero.palette-ember     { background: radial-gradient(900px 500px at 100% 0%, rgba(245, 197, 24, .18), transparent 60%), radial-gradient(800px 460px at -10% 100%, rgba(31, 33, 39, .04), transparent 60%); }
.land-hero.palette-gold      { background: radial-gradient(900px 500px at 100% 0%, rgba(245, 197, 24, .25), transparent 60%), radial-gradient(800px 460px at -10% 100%, rgba(252, 231, 137, .22), transparent 60%); }
.land-hero.palette-olive     { background: radial-gradient(900px 500px at 100% 0%, rgba(74, 81, 96, .07), transparent 60%), radial-gradient(800px 460px at -10% 100%, rgba(245, 197, 24, .16), transparent 60%); }
.land-hero.palette-ink       { color: white; background: radial-gradient(900px 500px at 100% 0%, rgba(245, 197, 24, .30), transparent 50%), linear-gradient(135deg, #1F2127 0%, #0F1115 100%); }
.land-hero.palette-ink h1    { color: white; }
.land-hero.palette-ink .lede { color: rgba(255,255,255,.85); }
.land-hero.palette-ink .kicker { color: var(--gold-soft); }
.land-hero.palette-embergold { background: radial-gradient(900px 500px at 100% 0%, rgba(245, 197, 24, .25), transparent 60%), radial-gradient(800px 460px at -10% 100%, rgba(31, 33, 39, .04), transparent 60%); }
.land-hero.palette-warm      { background: radial-gradient(900px 500px at 100% 0%, rgba(245, 197, 24, .18), transparent 60%), radial-gradient(800px 460px at -10% 100%, rgba(255, 248, 221, 1), rgba(255, 248, 221, .2) 60%, transparent 80%); }

/* Decorative icon in hero corner */
.land-hero .hero-icon {
  position: absolute; right: -40px; bottom: -40px;
  width: 280px; height: 280px;
  opacity: .06; color: var(--ink);
  z-index: 1;
}
.land-hero.palette-ink .hero-icon { color: white; opacity: .12; }

/* Hero stat strip */
.hero-stats {
  display: flex; gap: 36px; flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(0,0,0,.08);
}
.land-hero.palette-ink .hero-stats { border-top-color: rgba(255,255,255,.12); }
.hero-stat .num {
  font-family: var(--f-display); font-weight: 500;
  font-size: 32px; letter-spacing: -.02em; line-height: 1;
}
.hero-stat .lbl {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin-top: 4px;
}
.land-hero.palette-ink .hero-stat .lbl { color: rgba(255,255,255,.6); }

/* Sections */
.land-section {
  padding: clamp(50px, 7vw, 90px) clamp(20px, 4vw, 48px);
}
.land-section-inner {
  max-width: 1100px; margin: 0 auto;
}
.land-section .eyebrow {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-2); font-weight: 600;
  margin-bottom: 12px;
}
.land-section h2 {
  font-family: var(--f-display);
  font-weight: 500; font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -.02em; color: var(--ink);
  max-width: 780px; line-height: 1.1;
}
.land-section .sub {
  color: var(--muted); margin-top: 12px;
  font-size: 16px; max-width: 620px;
}

.land-section.alt { background: var(--surface-2); }

/* Feature grid */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 36px;
}
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px 22px 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--gold-soft); }
.feature .ficon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gold-bg);
  color: var(--gold-2);
  display: grid; place-items: center;
  margin-bottom: 14px;
}
.feature h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* Steps */
.step-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin-top: 36px;
}
.step-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 24px;
  position: relative;
}
.step-card .n {
  font-family: var(--f-display); font-weight: 500;
  font-size: 40px; line-height: 1; color: var(--gold);
  letter-spacing: -.02em;
}
.step-card h3 { font-size: 16px; font-weight: 600; margin: 12px 0 6px; }
.step-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* CTA banner */
.land-cta {
  margin: 0;
  padding: clamp(50px, 7vw, 90px) clamp(20px, 4vw, 48px);
  background: var(--ink); color: white;
  text-align: center;
}
.land-cta h2 {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -.02em; color: white;
  max-width: 720px; margin: 0 auto;
  line-height: 1.1;
}
.land-cta p { color: rgba(255,255,255,.7); margin-top: 12px; }
.land-cta .btn-gold { margin-top: 24px; }

/* Footer */
.land-foot {
  padding: 24px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 12px; color: var(--muted); flex-wrap: wrap;
}
.land-foot a { color: var(--muted); }
.land-foot a:hover { color: var(--ink); }

/* App-landing role grid (for app.grilzo.com main page) */
.role-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-top: 36px;
}
.role-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column; gap: 10px;
}
.role-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--gold-soft); }
.role-card .ricon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-bg), var(--gold-soft));
  color: var(--gold-2);
  display: grid; place-items: center;
}
.role-card h3 { font-size: 16px; font-weight: 600; }
.role-card .sub { font-size: 13px; color: var(--muted); flex: 1; }
.role-card .domain {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--gold-2); letter-spacing: .04em;
}

/* Rentals: variant cards */
.variant-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px; margin-top: 36px;
}
.variant-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.variant-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--gold-soft); }
.variant-card .vbadge {
  align-self: flex-start;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase;
  background: var(--gold-bg); color: var(--gold-2);
  padding: 4px 10px; border-radius: var(--r-pill);
}
.variant-card h3 {
  font-family: var(--f-display); font-size: 22px;
  font-weight: 500; letter-spacing: -.02em;
}
.variant-card .price {
  font-family: var(--f-display);
  font-size: 28px; color: var(--ink); font-weight: 500;
  letter-spacing: -.02em;
}
.variant-card .price small {
  font-family: var(--f-body); font-size: 13px;
  color: var(--muted); font-weight: 400;
}
.variant-card ul {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: flex; flex-direction: column; gap: 6px;
}
.variant-card li {
  font-size: 13px; color: var(--text-2);
  display: flex; align-items: flex-start; gap: 8px;
}
.variant-card li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); margin-top: 7px; flex-shrink: 0;
}

/* Inquiry form */
.inquiry-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 32px;
  box-shadow: var(--sh-md);
  max-width: 620px; margin: 36px auto 0;
}


/* ============================================================
   PWA mobile app shell — bottom nav, app bar, install
   ============================================================ */
.bottom-nav { display: none; }
.app-bar-actions { display: flex; align-items: center; gap: 6px; }
.icon-badge-btn {
  position: relative; width: 38px; height: 38px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); background: transparent; border: 0; cursor: pointer; text-decoration: none;
}
.icon-badge-btn:hover { background: var(--bg-2); }
.icon-badge-btn .badge {
  position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger); color: #fff; font-size: 9px; font-weight: 700;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
}

@media (max-width: 900px) {
  .pwa-investor .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px -8px rgba(11, 13, 18, .14);
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 5px 0; color: var(--muted); font-size: 10px; font-weight: 600;
    text-decoration: none; position: relative; transition: color .15s;
  }
  .bottom-nav a .icon { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--gold-2); }
  .bottom-nav a.active .icon { color: var(--gold-2); }
  .bottom-nav .bn-badge {
    position: absolute; top: 0; left: 56%; background: var(--danger); color: #fff;
    font-size: 9px; font-weight: 700; min-width: 15px; height: 15px; padding: 0 3px;
    border-radius: 999px; display: flex; align-items: center; justify-content: center;
  }
  .pwa-investor .page { padding-bottom: 86px; }
  /* sticky app bar on mobile */
  .topbar { position: sticky; top: 0; z-index: 80; background: var(--surface);
            border-bottom: 1px solid var(--line); }
}

/* ============================================================
   Investor mobile — premium dark/gold polish
   ============================================================ */
@media (max-width: 900px) {
  /* Floating pill bottom nav */
  .pwa-investor .bottom-nav {
    left: 12px; right: 12px; bottom: 12px; border-radius: 22px;
    border: 1px solid var(--line); background: var(--surface);
    box-shadow: 0 14px 36px -10px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .25);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .pwa-investor .bottom-nav a { border-radius: 14px; transition: color .15s, background .15s; }
  .pwa-investor .bottom-nav a.active {
    background: var(--gold-bg);
  }
  .pwa-investor .page { padding-bottom: 104px; }

  /* Premium app bar */
  .pwa-investor .topbar {
    background: var(--surface); backdrop-filter: blur(12px);
  }
  .pwa-investor .topbar h1 { font-size: 19px; }

  /* Glassy, rounded cards + metrics on mobile */
  .pwa-investor .card,
  .pwa-investor .kpi,
  .pwa-investor .metric { border-radius: 18px; }
  .pwa-investor .card { box-shadow: 0 1px 0 rgba(255,255,255,.02); }
  .pwa-investor .page { padding-left: 14px; padding-right: 14px; }

  /* Bigger, punchier display numbers */
  .pwa-investor .metric-value,
  .pwa-investor .kpi-val { letter-spacing: -.01em; }

  /* Tap targets */
  .pwa-investor .btn { padding: 11px 16px; }
  .pwa-investor .link-btn { padding: 4px 0; }
}

/* Mobile: show only essential nav items in the drawer; deep analytics stay desktop/tablet only */
@media (max-width: 900px) {
  .pwa-investor .nav-deep { display: none !important; }
}

/* ============================================================
   No horizontal scrollbars + outlet selector tabs
   ============================================================ */
.page { overflow-x: hidden; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tab {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none;
}
.tab:hover { border-color: var(--line-strong); color: var(--ink); }
.tab.active { background: var(--gold); border-color: var(--gold); color: #0F1115; }

@media (max-width: 900px) {
  img { max-width: 100%; height: auto; }
  .metrics, .row, .card { max-width: 100%; }
  /* tables fit the screen — wrap instead of scroll */
  .data-table { width: 100%; font-size: 12px; }
  .data-table th, .data-table td {
    padding: 8px 6px; white-space: normal !important; word-break: break-word; overflow-wrap: anywhere;
  }
  .data-table code { font-size: 11px; }
}

/* Live orders — mobile: drop the outlet column (shown as a subtitle), cap recent to 10 */
.outlet-sub { display: none; }
@media (max-width: 900px) {
  .col-outlet { display: none; }
  .outlet-sub { display: block; font-size: 11px; margin-top: 3px; }
  #recent-body tr:nth-child(n+11) { display: none; }
}

/* ============================================================
   Investor portal — stack tables into label/value cards on phones
   ============================================================ */
@media (max-width: 640px) {
  .pwa-investor .data-table thead { display: none; }
  .pwa-investor .data-table,
  .pwa-investor .data-table tbody { display: block; width: 100%; }
  .pwa-investor .data-table tr {
    display: block; padding: 12px 16px; border-bottom: 1px solid var(--line);
  }
  .pwa-investor .data-table tr:last-child { border-bottom: 0; }
  .pwa-investor .data-table td {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 4px 0; border: 0; text-align: right; white-space: normal; font-size: 13px;
  }
  .pwa-investor .data-table td::before {
    content: attr(data-label); color: var(--muted); font-weight: 600; font-size: 11px;
    letter-spacing: .03em; text-transform: uppercase; text-align: left; flex-shrink: 0;
  }
  /* first cell of each row reads as a heading */
  .pwa-investor .data-table td.cell-head {
    font-family: var(--f-display); font-size: 15px; color: var(--ink);
    border-bottom: 1px dashed var(--line); padding-bottom: 8px; margin-bottom: 4px;
  }
  .pwa-investor .data-table td.cell-head::before { content: ""; }
  .pwa-investor .data-table td:empty { display: none; }
  .pwa-investor .data-table td.ta-right { justify-content: space-between; }
  /* forms inside a stacked cell keep to the right */
  .pwa-investor .data-table td form { margin-left: auto; }
}

/* In stacked mode (phones) show the outlet as its own labelled row, not the subtitle */
@media (max-width: 640px) {
  .pwa-investor .col-outlet { display: flex; }
  .pwa-investor .outlet-sub { display: none; }
}

/* ============================================================
   Mobile tables → two-part card (heading on top, details in 2 cols)
   + business-setup 2-column grid
   ============================================================ */
@media (max-width: 640px) {
  .pwa-investor .data-table tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; align-items: start;
  }
  .pwa-investor .data-table td {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
    gap: 1px; text-align: left; padding: 2px 0;
  }
  .pwa-investor .data-table td::before { font-size: 10px; }
  .pwa-investor .data-table td.cell-head {
    grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 8px;
  }
  .pwa-investor .data-table td[data-label=""] { grid-column: 1 / -1; align-items: stretch; }
  .pwa-investor .data-table td.ta-right { align-items: flex-start; }

  /* Business setup: 2 columns, no dead space */
  .biz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .biz-grid .col-3 { grid-column: auto; }
}

/* ============================================================
   Camera tiles — premium live-console look
   ============================================================ */
@keyframes grz-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.cam-tile {
  border-radius: var(--r-md); overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.cam-tile.card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--gold); }
.cam-frame {
  background: #05070a;
  box-shadow: inset 0 0 70px rgba(0,0,0,.65);
  border-radius: var(--r-sm);
}
.cam-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 0%, transparent 60%, rgba(0,0,0,.35) 100%);
  border-radius: inherit;
}
.cam-tile .pill { backdrop-filter: blur(4px); }
.cam-tile .pill span { animation: grz-pulse 1.6s infinite; }
.cam-tile .icon-badge-btn { color: var(--ink); }
.cam-tile .icon-badge-btn:hover { background: var(--gold); color: #0F1115; }

/* a touch more lift on investor cards (mobile) */
@media (max-width: 900px) {
  .pwa-investor .card { transition: transform .15s ease, box-shadow .15s ease; }
}

/* ============================================================
   UX layer — toasts, top progress bar, tap feedback
   ============================================================ */
.flashes {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 1000; display: flex; flex-direction: column; gap: 8px;
  width: min(440px, calc(100% - 24px)); pointer-events: none;
}
.flash {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  box-shadow: var(--sh-lg); font-size: 14px; color: var(--text); cursor: pointer;
  animation: toastIn .28s cubic-bezier(.2,.8,.2,1);
}
.flash span { flex: 1; }
.flash-close { color: var(--muted); flex-shrink: 0; margin-top: 1px; opacity: .7; }
.flash-info i:first-child { color: var(--success); }
.flash-error { border-left-color: var(--danger); }
.flash-error i:first-child { color: var(--danger); }
.flash-out { animation: toastOut .26s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); height: 0; padding-top: 0; padding-bottom: 0; margin: 0; } }

#grz-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1001; opacity: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 10px var(--gold); transition: width .2s ease, opacity .3s ease;
}
#grz-bar.go { opacity: 1; width: 88%; transition: width 8s cubic-bezier(.1,.7,.1,1); }
#grz-bar.done { opacity: 0; width: 100%; transition: width .2s ease, opacity .35s ease .1s; }

/* tactile tap feedback */
.btn, .bottom-nav a, .icon-badge-btn, .tab, .dash-tab { transition: transform .1s ease, background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:active, .bottom-nav a:active, .icon-badge-btn:active, .tab:active, .dash-tab:active { transform: scale(.96); }
.pwa-investor .card:active { transform: scale(.995); }
/* keyboard focus visibility */
a:focus-visible, .btn:focus-visible, .input:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Pull-to-refresh indicator (investor mobile) */
#ptr {
  position: fixed; top: 0; left: 50%; transform: translate(-50%, -48px); z-index: 999;
  width: 38px; height: 38px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--sh-md); display: grid; place-items: center;
  color: var(--gold-2); opacity: 0; transition: opacity .15s ease;
}
#ptr.show { opacity: 1; }
#ptr.spin i { animation: grz-spin .8s linear infinite; }
@keyframes grz-spin { to { transform: rotate(360deg); } }

/* ============================================================
   Mobile tables — compact 3–4 column table (override stacking)
   Show only essential columns (.m-hide is dropped on phones)
   ============================================================ */
@media (max-width: 900px) {
  .pwa-investor .data-table { display: table; width: 100%; font-size: 12.5px; }
  .pwa-investor .data-table thead { display: table-header-group; }
  .pwa-investor .data-table tbody { display: table-row-group; }
  .pwa-investor .data-table tfoot { display: table-footer-group; }
  .pwa-investor .data-table tr { display: table-row; padding: 0; border: 0; }
  .pwa-investor .data-table th,
  .pwa-investor .data-table td {
    display: table-cell; width: auto; gap: 0; padding: 9px 7px; text-align: left;
    border: 0; border-bottom: 1px solid var(--line); white-space: normal; word-break: break-word;
    flex-direction: initial; align-items: initial;
  }
  .pwa-investor .data-table th { font-size: 10px; color: var(--muted); }
  .pwa-investor .data-table td::before,
  .pwa-investor .data-table th::before { content: none !important; }
  .pwa-investor .data-table td.ta-right,
  .pwa-investor .data-table th.ta-right { text-align: right; }
  .pwa-investor .data-table td.cell-head {
    font-family: inherit; font-size: 12.5px; border-bottom: 1px solid var(--line);
    padding-bottom: 9px; margin-bottom: 0;
  }
  /* drop non-essential columns on phones */
  .pwa-investor .data-table .m-hide { display: none !important; }
}

@media (max-width: 900px) { .pwa-investor .m-show { display: inline !important; } }

/* Outlet column: never shown on mobile (authoritative) */
@media (max-width: 900px) {
  .pwa-investor .col-outlet { display: none !important; }
}

/* ============================================================
   Flashy full-screen loader (auth / loading states)
   ============================================================ */
#grz-loader {
  position: fixed; inset: 0; z-index: 2000; display: none;
  align-items: center; justify-content: center;
  background: radial-gradient(60% 60% at 50% 38%, rgba(22, 17, 8, .82), rgba(8, 9, 12, .94));
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
}
#grz-loader.show { display: flex; animation: grzLoaderIn .22s ease both; }
@keyframes grzLoaderIn { from { opacity: 0; } to { opacity: 1; } }
.grz-loader-card { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.grz-loader-spin { position: relative; width: 86px; height: 86px; }
.grz-loader-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--gold) 130deg, var(--gold-2) 290deg, transparent 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  animation: grzLoaderSpin .9s linear infinite;
  filter: drop-shadow(0 0 16px rgba(232, 163, 58, .55));
}
.grz-loader-mark {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 600; font-size: 32px;
  color: var(--gold); text-shadow: 0 0 20px rgba(232, 163, 58, .6);
  animation: grzLoaderPulse 1.3s ease-in-out infinite;
}
@keyframes grzLoaderSpin { to { transform: rotate(360deg); } }
@keyframes grzLoaderPulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.12); opacity: 1; } }
.grz-loader-text {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600;
  background: linear-gradient(90deg, rgba(233, 216, 182, .3) 0%, #fff 50%, rgba(233, 216, 182, .3) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: grzLoaderShimmer 1.6s linear infinite;
}
@keyframes grzLoaderShimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .grz-loader-ring, .grz-loader-mark, .grz-loader-text, .auth-shell::before, .auth-card { animation-duration: .001ms !important; }
}

/* ============================================================
   Dashboard mobile: wallet 2-col + outlet "this month / est net" side-by-side
   ============================================================ */
@media (max-width: 900px) {
  /* Wallet card: two columns, third stat spans the full width below */
  .pwa-investor .wstats { grid-template-columns: 1fr 1fr; gap: 14px; }
  .pwa-investor .wstats .col-4 { grid-column: auto; }
  .pwa-investor .wstats .col-4:last-child {
    grid-column: 1 / -1; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line);
  }
}
@media (max-width: 700px) {
  /* Outlet card: keep "This month" + "Your est. net" on one row */
  .pwa-investor .row-2.keep-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ============================================================
   Onboarding card — each step as its own row (number + text)
   ============================================================ */
.onb-step { display: flex; gap: 12px; align-items: flex-start; }
.onb-step .onb-n {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold-bg); color: var(--gold-2); border: 1px solid var(--gold-soft);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; margin-top: 1px;
}
.onb-step strong { display: block; font-size: 13.5px; }
.onb-step p { margin: 2px 0 0; }

/* ============================================================
   Install app — small dismissible popup (not in the top bar)
   ============================================================ */
.install-pop {
  position: fixed; z-index: 96; display: none; align-items: center; gap: 12px;
  left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 16px; box-shadow: var(--sh-lg); padding: 12px 12px 12px 14px;
}
.install-pop.show { display: flex; animation: installPopIn .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes installPopIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.install-pop-mark {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #0F1115;
  font-family: var(--f-display); font-weight: 600; font-size: 20px;
  display: grid; place-items: center; box-shadow: 0 4px 12px -4px rgba(232, 163, 58, .6);
}
.install-pop-txt { flex: 1; min-width: 0; line-height: 1.3; }
.install-pop-txt strong { display: block; font-size: 14px; }
.install-pop-txt span { font-size: 11.5px; color: var(--muted); }
.install-pop .btn-gold { flex: none; }
.install-pop-x {
  flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  color: var(--muted); background: transparent;
}
.install-pop-x:hover { background: var(--bg-2); color: var(--ink); }
@media (min-width: 901px) {
  .install-pop { left: auto; right: 20px; bottom: 20px; max-width: 380px; }
}

/* ============================================================
   Investor mobile — compact app header (smaller bar + title)
   ============================================================ */
@media (max-width: 900px) {
  .pwa-investor .topbar { height: 50px; padding: 0 12px; gap: 10px; }
  .pwa-investor .topbar h1 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
  .pwa-investor .topbar .crumbs,
  .pwa-investor .topbar-sub { display: none; }
  .pwa-investor .topbar .icon-badge-btn,
  .pwa-investor .topbar .menu-toggle { width: 34px; height: 34px; }
  .pwa-investor .topbar .menu-toggle .icon { width: 19px; height: 19px; }
}

/* ============================================================
   Responsive variant toggles — show one block on desktop, another on mobile
   (used by the investor dashboard so desktop layout stays unchanged)
   ============================================================ */
.only-mobile { display: none; }
@media (max-width: 900px) {
  .only-desktop { display: none !important; }
  .only-mobile { display: block !important; }
}

/* ============================================================
   Edge-to-edge PWA — sit cleanly against the device system bars.
   viewport-fit=cover enables env(safe-area-inset-*); without it these are 0,
   so browsers (non-installed) are unaffected. Mobile / investor app only.
   ============================================================ */
@media (max-width: 900px) {
  /* Dark app header fills the status-bar / notch region */
  .pwa-investor .topbar {
    height: calc(50px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
  }
  /* Floating bottom nav rides ABOVE the home indicator / gesture bar */
  .pwa-investor .bottom-nav {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    padding: 8px 6px;
  }
  /* Keep page content clear of the floating nav + system bar */
  .pwa-investor .page {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================================
   Mobile home — merged "Last payout / This month" card:
   shrink the two side-by-side currency values so they fit on narrow phones
   ============================================================ */
@media (max-width: 900px) {
  .pwa-investor .only-mobile .keep-2 .kpi-val { font-size: clamp(15px, 4.5vw, 19px); }
}

/* ============================================================
   Mobile stack utility — force a 2-column .row of undefined col-5/col-7
   cards into two full-width rows. Used by Wallet (Withdraw + history)
   and Refer & earn (Invite + Your referrals).
   ============================================================ */
@media (max-width: 900px) {
  .pwa-investor .wd-stack { grid-template-columns: 1fr; gap: 16px; }
  .pwa-investor .wd-stack > [class*="col-"] { grid-column: 1 / -1; }
}

/* ============================================================
   Mobile outlet — show only the 6 most recent orders (desktop keeps all)
   ============================================================ */
@media (max-width: 900px) {
  .pwa-investor #outlet-recent-body tr:nth-child(n+7) { display: none; }
}

/* ============================================================
   Mobile Refer & earn — premium reward hero
   (markup lives in .only-mobile, so these only render on phones)
   ============================================================ */
.ref-hero-m {
  position: relative; overflow: hidden; text-align: center;
  border-radius: var(--r-lg); padding: 22px 20px 20px;
  background: linear-gradient(160deg, var(--gold-bg) 0%, var(--surface) 70%);
  border: 1px solid var(--gold-soft); box-shadow: var(--sh-md);
}
.ref-hero-m::before {
  content: ""; position: absolute; top: -80px; right: -50px; width: 220px; height: 220px;
  border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), transparent 70%);
  opacity: .6; pointer-events: none;
}
.ref-hero-m > * { position: relative; }
.ref-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #0F1115;
  font-weight: 700; font-size: 12px; padding: 6px 13px; border-radius: 999px;
  box-shadow: 0 6px 16px -6px rgba(232, 163, 58, .7);
}
.ref-badge i { width: 14px; height: 14px; }
.ref-earned-lbl { margin-top: 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ref-earned { font-family: var(--f-display); font-size: 42px; line-height: 1; color: var(--success); margin-top: 3px; }
.ref-counts { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.ref-counts b { color: var(--ink); }
.ref-counts .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }
.ref-code-wrap {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding: 12px 16px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px dashed var(--gold-2); border-radius: var(--r-md);
  transition: transform .1s ease, border-color .15s ease;
}
.ref-code-wrap:active { transform: scale(.99); }
.ref-code-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ref-code-big { font-family: var(--f-mono); font-size: 24px; letter-spacing: .14em; color: var(--ink); margin-top: 2px; }
.ref-code-wrap > i { width: 20px; height: 20px; color: var(--gold-2); flex: none; }
.ref-code-wrap.copied { border-color: var(--success); }
.ref-code-wrap.copied::after {
  content: "Copied ✓"; position: absolute; top: 8px; right: 10px;
  background: var(--success); color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; animation: refCopiedIn .18s ease;
}
@keyframes refCopiedIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ref-share { width: 100%; margin-top: 14px; padding: 13px; font-size: 14.5px; }

/* ============================================================
   Mobile Profile & Banking — premium profile header
   (markup in .only-mobile, so renders on phones only)
   ============================================================ */
.prof-hero {
  display: flex; align-items: center; gap: 14px;
  border-radius: var(--r-lg); padding: 18px;
  background: linear-gradient(160deg, var(--gold-bg), var(--surface) 70%);
  border: 1px solid var(--gold-soft); box-shadow: var(--sh-sm);
}
.prof-ava {
  flex: none; width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #0F1115;
  display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; font-size: 24px;
  box-shadow: 0 6px 16px -6px rgba(232, 163, 58, .6);
}
.prof-name { font-family: var(--f-display); font-size: 19px; color: var(--ink); line-height: 1.1; }
.prof-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.prof-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ============================================================
   Cart photos — installed-cart angle views (admin manage + investor gallery)
   ============================================================ */
.cart-photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.cart-photo {
  position: relative; display: block; border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-2);
  transition: transform .12s ease, box-shadow .15s ease;
}
.cart-photo:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.cart-photo img { display: block; width: 100%; height: 140px; object-fit: cover; }
.cart-photo-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; font-size: 11px;
  color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.62));
}
.cart-photo-del { position: absolute; top: 5px; right: 5px; margin: 0; }
.cart-photo-del button {
  width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.cart-photo-del button:hover { background: var(--danger); }
@media (max-width: 560px) {
  .cart-photo-grid { grid-template-columns: 1fr 1fr; }
  .cart-photo img { height: 120px; }
}


/* ============================================================
   Customer storefront — image-first food ordering (desktop + mobile)
   ============================================================ */
.store { display: flex; flex-direction: column; gap: 6px; }

/* Cuisine tab strip — sticky, horizontally scrollable */
.cuisine-strip {
  position: sticky; top: 0; z-index: 40;
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px;
  margin: -4px -2px 8px; background: var(--bg);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cuisine-strip::-webkit-scrollbar { display: none; }
.cuisine-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-pill); text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
  font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: var(--sh-xs);
}
.cuisine-chip .icon { width: 16px; height: 16px; }
.cuisine-chip small {
  font-size: 10px; font-weight: 700; color: var(--muted-2);
  background: var(--bg-2); border-radius: var(--r-pill); padding: 1px 6px;
}
.cuisine-chip:hover { border-color: var(--gold-soft); color: var(--ink); }
.cuisine-chip.active {
  background: var(--ink); color: #fff; border-color: var(--ink);
}
.cuisine-chip.active small { background: rgba(255,255,255,.16); color: #fff; }
.cuisine-chip.active .icon { color: var(--gold); }

/* Cuisine + section headings */
.cz { scroll-margin-top: 72px; padding-top: 14px; }
.cz-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.cz-head h2 { font-family: var(--f-display); font-size: 24px; letter-spacing: -.02em; }
.cz-count { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Selected stall header */
.stall-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 0 6px; margin-top: 4px;
}
.stall-head h2 { font-family: var(--f-display); font-size: 24px; letter-spacing: -.02em; }
.stall-sub {
  display: flex; align-items: center; gap: 6px; margin-top: 3px;
  font-size: 12.5px; color: var(--muted);
}
.stall-sub .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); display: inline-block; }
.cz-section { margin-top: 14px; }
.cz-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cz-section-head h4 { font-size: 14px; font-weight: 700; }
.cz-section-sub { font-size: 12px; color: var(--muted); }

/* Dish cards */
.dish-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px;
}
.dish {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-xs); transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
.dish:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--gold-soft); }
.dish-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); }
.dish-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-tag {
  position: absolute; top: 10px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .02em; padding: 4px 8px;
  border-radius: var(--r-pill); backdrop-filter: blur(4px);
}
.dish-tag.tag-star { left: 10px; background: rgba(15,17,21,.78); color: var(--gold); }
.dish-tag.tag-save { right: 10px; background: var(--success); color: #fff; }
.dish-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.dish-name { font-size: 15px; font-weight: 700; line-height: 1.25; }
.dish-desc {
  font-size: 12.5px; color: var(--muted); line-height: 1.4; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dish-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.dish-price { display: flex; align-items: baseline; gap: 7px; }
.dish-price .now { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.dish-price .strike { font-size: 12px; color: var(--muted-2); text-decoration: line-through; }

/* Add button + quantity stepper */
.dish-add { display: flex; align-items: center; }
.dish-add .addform { margin: 0; }
.addbtn { min-width: 78px; justify-content: center; }
.qstep {
  display: inline-flex; align-items: center; gap: 2px; background: var(--gold);
  border-radius: var(--r-pill); padding: 3px; box-shadow: var(--sh-xs);
}
.qstep form { margin: 0; display: flex; }
.qbtn {
  width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1;
  display: grid; place-items: center; transition: background .12s;
}
.qbtn:hover { background: rgba(15,17,21,.12); }
.qval { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; color: var(--ink); }

/* Sticky floating bag bar */
.bagbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 90;
  width: min(520px, calc(100% - 32px));
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  padding: 12px 18px; border-radius: var(--r-pill); text-decoration: none;
  background: var(--ink); color: #fff; box-shadow: var(--sh-lg);
  transition: transform .25s ease, opacity .2s ease;
}
.bagbar .bagbar-left { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.85); }
.bagbar .bagbar-left strong { color: #fff; }
.bagbar .bagbar-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--gold); }
.bagbar .bagbar-total { font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.bagbar.is-empty { transform: translate(-50%, 120%); opacity: 0; pointer-events: none; }

/* Switch-bag modal */
.switch-modal {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(15,17,21,.55); padding: 20px; backdrop-filter: blur(2px);
}
.switch-card {
  background: var(--surface); border-radius: var(--r-lg); padding: 26px 24px; max-width: 360px;
  text-align: center; box-shadow: var(--sh-lg); border: 1px solid var(--line);
}
.switch-ic {
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold-bg); color: var(--gold-2);
  display: grid; place-items: center; margin: 0 auto 14px;
}
.switch-card h3 { font-family: var(--f-display); font-size: 20px; margin-bottom: 8px; }
.switch-card p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.switch-actions { display: flex; gap: 10px; margin-top: 20px; }
.switch-actions .btn { flex: 1; justify-content: center; }

/* Honor the HTML `hidden` attribute over the display rules above */
.qstep[hidden], .dish-add .addform[hidden], .switch-modal[hidden] { display: none; }
.bottom-nav .bn-badge[hidden] { display: none; }

/* ---- Cart page ---- */
.bag-list { display: flex; flex-direction: column; }
.bag-row {
  display: grid; grid-template-columns: 56px 1fr auto auto; align-items: center; gap: 14px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-2);
}
.bag-row:last-child { border-bottom: 0; }
.bag-thumb { width: 56px; height: 56px; border-radius: var(--r-sm); object-fit: cover; background: var(--bg-2); }
.bag-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bag-info strong { font-size: 14px; }
.bag-info .muted { font-size: 12px; }
.bag-qty .qstep { background: var(--bg-2); }
.bag-qty .qbtn { color: var(--ink); }
.bag-qty .qbtn:hover { background: rgba(15,17,21,.08); }
.bag-line { font-family: var(--f-display); font-weight: 600; min-width: 64px; text-align: right; }
.bag-summary .card-foot { padding: 14px 16px; }

/* Upsell strip on the cart page */
.upsell .card-head { border-bottom: 0; padding-bottom: 4px; }
.upsell-strip {
  display: flex; gap: 12px; overflow-x: auto; padding: 6px 16px 16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.upsell-strip::-webkit-scrollbar { display: none; }
.upsell-card { flex: 0 0 130px; width: 130px; }
.upsell-card form { margin: 0; }
.upsell-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-md); background: var(--bg-2); border: 1px solid var(--line); }
.upsell-name {
  font-size: 12.5px; font-weight: 600; margin-top: 7px; line-height: 1.2; min-height: 30px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.upsell-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; }
.upsell-price { font-family: var(--f-display); font-weight: 600; font-size: 14px; color: var(--ink); }
.upsell-add {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--gold-2);
  background: var(--gold-bg); color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1;
  cursor: pointer; display: grid; place-items: center; transition: background .12s, transform .1s;
}
.upsell-add:hover { background: var(--gold); }
.upsell-add:active { transform: scale(.9); }

/* ---- Checkout ---- */
.addr-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.addr-card {
  display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--r-md); cursor: pointer; transition: border-color .15s, background .15s;
}
.addr-card:has(input:checked) { border-color: var(--gold); background: var(--gold-bg); }
.addr-card input { margin-top: 3px; accent-color: var(--gold-2); }
.addr-body { display: flex; flex-direction: column; gap: 2px; }
.addr-body strong { font-size: 13.5px; }
.addr-body .muted { font-size: 12px; }
.pay-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--r-md); cursor: pointer; transition: border-color .15s, background .15s;
}
.pay-card:has(input:checked) { border-color: var(--gold); background: var(--gold-bg); }
.pay-card input { accent-color: var(--gold-2); }
.pay-ic { width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--bg-2); display: grid; place-items: center; color: var(--ink); }
.pay-body { display: flex; flex-direction: column; gap: 1px; }
.pay-body strong { font-size: 14px; }
.pay-body .muted { font-size: 12px; }
.co-line { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; }
.co-thumb { width: 34px; height: 34px; border-radius: var(--r-xs); object-fit: cover; background: var(--bg-2); }
.co-name { font-size: 13px; min-width: 0; }
.co-qty { color: var(--gold-2); font-weight: 700; }

/* ---- Customer mobile shell ---- */
@media (max-width: 900px) {
  .pwa-customer .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px -8px rgba(11, 13, 18, .14);
  }
  .pwa-customer .page { padding-bottom: 150px; padding-left: 14px; padding-right: 14px; }
  .pwa-customer .topbar { position: sticky; top: 0; z-index: 80; background: var(--surface); border-bottom: 1px solid var(--line); }
  .pwa-customer .cuisine-strip { top: var(--topbar-h); }

  .dish-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dish-media { aspect-ratio: 1 / 1; }
  .dish-name { font-size: 13.5px; }
  .dish-desc { display: none; }
  .dish-price .now { font-size: 16px; }
  .addbtn { min-width: 0; padding: 6px 12px; }

  /* bag bar floats above the bottom nav */
  .pwa-customer .bagbar { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); }

  /* cart rows stack the line price under qty */
  .bag-row { grid-template-columns: 52px 1fr auto; row-gap: 8px; }
  .bag-thumb { width: 52px; height: 52px; }
  .bag-line { grid-column: 2 / 4; text-align: left; font-size: 14px; }
  .addr-choices { grid-template-columns: 1fr; }
  .co-name { font-size: 12.5px; }
}

/* Single column on very small phones */
@media (max-width: 380px) {
  .dish-grid { grid-template-columns: 1fr; }
  .dish-media { aspect-ratio: 16 / 10; }
  .dish-desc { display: -webkit-box; }
}


/* ============================================================
   Delivery partner (rider) app — mobile-first, big tap targets
   ============================================================ */
.rider { width: 100%; max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

/* Online toggle hero */
.rider-hero { border: 0; border-radius: var(--r-lg); padding: 18px 18px 16px; color: #fff; box-shadow: var(--sh-md); }
.rider-hero.is-offline { background: linear-gradient(135deg, #2A2D35, #0F1115); }
.rider-hero.is-online { background: linear-gradient(135deg, #0F8F5B, #0B6E47); }
.rider-hero-top { display: flex; align-items: flex-start; justify-content: space-between; }
.rider-hello { font-size: 13px; color: rgba(255,255,255,.8); }
.rider-state { display: flex; align-items: center; gap: 7px; font-family: var(--f-display); font-size: 20px; font-weight: 600; margin-top: 2px; }
.rider-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.5); }
.rider-hero.is-online .rider-dot { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.rider-rating { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.16); padding: 4px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; }
.rider-hero-hint { color: rgba(255,255,255,.8); font-size: 12.5px; margin-top: 10px; }
.rider-toggle-btn { width: 100%; margin-top: 14px; border: 0; border-radius: var(--r-md); padding: 13px; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: var(--ink); transition: transform .1s; }
.rider-toggle-btn .icon { width: 18px; height: 18px; }
.rider-toggle-btn:active { transform: scale(.98); }
.rider-hero.is-online .rider-toggle-btn { background: rgba(255,255,255,.18); color: #fff; }

/* Stat tiles */
.rider-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rider-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 8px; text-align: center; box-shadow: var(--sh-xs); }
.rider-stat-val { display: block; font-family: var(--f-display); font-weight: 600; font-size: 19px; color: var(--ink); }
.rider-stat-lbl { font-size: 11px; color: var(--muted); }

.rider-h { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.rider-h-count { background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 700; border-radius: var(--r-pill); padding: 1px 8px; }

/* Active trip card */
.trip-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-sm); text-decoration: none; color: inherit; }
.trip-card:active { transform: scale(.99); }
.trip-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.trip-payout { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--success); }
.trip-route { display: flex; flex-direction: column; gap: 10px; padding-left: 2px; }
.trip-leg { display: flex; gap: 10px; align-items: flex-start; }
.trip-leg small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.trip-leg strong { font-size: 13.5px; }
.trip-pin { width: 11px; height: 11px; border-radius: 50%; margin-top: 3px; flex: 0 0 auto; }
.pin-pickup { background: var(--gold); box-shadow: 0 0 0 3px var(--gold-bg); }
.pin-drop { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.trip-card-cta { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.trip-open { color: var(--gold-2); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }

/* Available order card */
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-xs); }
.order-card-head { display: flex; align-items: center; justify-content: space-between; }
.order-card-head strong { font-size: 15px; }
.order-earn { font-family: var(--f-display); font-weight: 600; font-size: 16px; color: var(--success); }
.order-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin: 8px 0 12px; }
.order-accept { width: 100%; border: 0; border-radius: var(--r-md); padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; background: var(--gold); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .12s, transform .1s; }
.order-accept .icon { width: 17px; height: 17px; }
.order-accept:hover { background: var(--gold-2); }
.order-accept:active { transform: scale(.98); }

.rider-empty { text-align: center; padding: 30px 18px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.rider-empty .icon { width: 30px; height: 30px; color: var(--muted-2); margin-bottom: 8px; }
.rider-empty p { font-size: 13px; }

/* Trip detail */
.trip-steps { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 10px; box-shadow: var(--sh-xs); }
.trip-step { flex: 1; text-align: center; font-size: 11px; font-weight: 600; color: var(--muted-2); }
.trip-step .ts-dot { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--line-strong); margin: 0 auto 6px; }
.trip-step.done { color: var(--success); }
.trip-step.done .ts-dot { background: var(--success); }
.trip-step.current { color: var(--gold-2); }
.trip-step.current .ts-dot { background: var(--gold); box-shadow: 0 0 0 4px var(--gold-bg); }

.leg-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-xs); }
.leg-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 8px; }
.leg-card strong { font-size: 15px; }
.leg-card .muted { font-size: 13px; margin-top: 2px; }
.leg-actions { display: flex; gap: 10px; margin-top: 12px; }
.leg-nav, .leg-call { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 700; text-decoration: none; }
.leg-nav { background: var(--ink); color: #fff; margin-top: 4px; }
.leg-call { background: var(--success-bg); color: var(--success); }
.trip-items { margin: 6px 0 0; padding: 0; list-style: none; }
.trip-items li { font-size: 13.5px; padding: 3px 0; }
.trip-items li span { color: var(--gold-2); font-weight: 700; }
.trip-pay-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.trip-payout-big { font-family: var(--f-display); font-size: 22px; font-weight: 600; color: var(--success); }

.trip-action { max-width: 620px; margin: 16px auto 0; }
.btn-trip { width: 100%; border: 0; border-radius: var(--r-md); padding: 15px; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--gold); color: var(--ink); text-decoration: none; transition: transform .1s; }
.btn-trip:active { transform: scale(.98); }
.btn-trip .icon { width: 19px; height: 19px; }
.btn-trip-done { background: var(--success); color: #fff; }
.btn-trip-finished { background: var(--bg-2); color: var(--text); }

/* Earnings */
.earn-hero { background: linear-gradient(135deg, #1F2127, #0F1115); color: #fff; border-radius: var(--r-lg); padding: 22px 18px; text-align: center; box-shadow: var(--sh-md); }
.earn-hero-lbl { font-size: 13px; color: rgba(255,255,255,.75); }
.earn-hero-val { font-family: var(--f-display); font-weight: 600; font-size: 40px; line-height: 1.1; margin: 4px 0; color: var(--gold); }
.earn-hero-sub { font-size: 12.5px; color: rgba(255,255,255,.7); }
.earn-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.earn-row:last-child { border-bottom: 0; }
.earn-row-ic { width: 34px; height: 34px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: grid; place-items: center; flex: 0 0 auto; }
.earn-row-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.earn-row-info strong { font-size: 13.5px; }
.earn-row-info .muted { font-size: 12px; }
.earn-row-amt { font-family: var(--f-display); font-weight: 600; color: var(--success); }

/* ---- Rider wallet ---- */
.wallet-card { background: linear-gradient(135deg, #1F2127, #0F1115); color: #fff; border-radius: var(--r-lg); padding: 22px 20px; box-shadow: var(--sh-md); }
.wallet-lbl { font-size: 13px; color: rgba(255,255,255,.72); }
.wallet-val { font-family: var(--f-display); font-weight: 600; font-size: 42px; line-height: 1.05; margin: 4px 0; color: var(--gold); }
.wallet-sub { font-size: 12.5px; color: rgba(255,255,255,.66); }
.wallet-withdraw { margin-top: 16px; padding: 16px; }
.ww-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ww-head h3 { font-size: 15px; font-weight: 700; }
.ww-dest { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.ww-form { display: flex; gap: 10px; align-items: stretch; }
.ww-input { display: flex; align-items: center; gap: 4px; flex: 1; border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 12px; background: var(--surface); }
.ww-cur { color: var(--muted); font-weight: 600; }
.ww-input input { flex: 1; border: 0; background: transparent; font-size: 18px; font-weight: 600; padding: 11px 0; outline: none; color: var(--ink); width: 100%; }
.ww-note { font-size: 12px; margin-top: 10px; }
.wd-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.wd-row:last-child { border-bottom: 0; }
.wd-info { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }
.wd-info strong { font-size: 14px; }
.wd-info .muted { font-size: 11.5px; }
.wd-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.wd-requested { background: var(--warning-bg); color: var(--warning); }
.wd-paid { background: var(--success-bg); color: var(--success); }
.wd-rejected { background: var(--danger-bg); color: var(--danger); }
.ledger-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.ledger-credit { background: var(--success-bg); color: var(--success); }
.ledger-debit { background: var(--bg-2); color: var(--muted); }
.ledger-info { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }
.ledger-info strong { font-size: 13.5px; }
.ledger-info .muted { font-size: 11.5px; }
.ledger-amt { font-family: var(--f-display); font-weight: 600; font-size: 14px; }
.ledger-amt-credit { color: var(--success); }
.ledger-amt-debit { color: var(--ink); }

/* ============================================================
   Rider DESKTOP — wide dispatch console
   ============================================================ */
.rdc { display: flex; flex-direction: column; gap: 18px; }

/* Stats strip */
.rdc-strip { display: grid; grid-template-columns: minmax(260px, 1.4fr) repeat(4, 1fr); gap: 14px; align-items: stretch; }
.rdc-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-radius: var(--r-lg); padding: 14px 16px; color: #fff; box-shadow: var(--sh-sm); }
.rdc-status.off { background: linear-gradient(135deg, #2A2D35, #16181D); }
.rdc-status.on  { background: linear-gradient(135deg, #0F8F5B, #0B6E47); }
.rdc-status-info { display: flex; align-items: center; gap: 11px; min-width: 0; }
.rdc-status-dot { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.45); flex: 0 0 auto; }
.rdc-status.on .rdc-status-dot { background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.rdc-status-info strong { display: block; font-size: 15px; font-weight: 700; }
.rdc-status-info small { font-size: 12px; color: rgba(255,255,255,.78); }
.rdc-toggle { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: var(--r-md); padding: 10px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer; background: #fff; color: var(--ink); white-space: nowrap; transition: transform .1s; }
.rdc-toggle:active { transform: scale(.97); }
.rdc-status.on .rdc-toggle { background: rgba(255,255,255,.18); color: #fff; }
.rdc-stat { display: flex; align-items: center; gap: 11px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-xs); }
.rdc-stat-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--muted); flex: 0 0 auto; }
.rdc-stat-ic.earn { background: var(--success-bg); color: var(--success); }
.rdc-stat-val { display: block; font-family: var(--f-display); font-weight: 600; font-size: 22px; line-height: 1.05; color: var(--ink); }
.rdc-stat-lbl { font-size: 11.5px; color: var(--muted); }

/* Console grid */
.rdc-grid { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.rdc-main { min-width: 0; }
.rdc-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--sh-sm); }
.rdc-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rdc-panel-eyebrow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rdc-panel-head h3 { font-family: var(--f-display); font-size: 20px; font-weight: 600; margin-top: 2px; }
.rdc-map { height: 300px; margin-bottom: 16px; }
.rdc-legs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rdc-leg { display: flex; gap: 11px; align-items: flex-start; background: var(--bg-2); border-radius: var(--r-md); padding: 12px; }
.rdc-leg .trip-pin { margin-top: 4px; }
.rdc-leg small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rdc-leg strong { font-size: 14px; }
.rdc-leg .muted { font-size: 12.5px; margin-top: 2px; }
.rdc-trip-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.rdc-trip-foot-lbl { display: block; font-size: 12px; color: var(--muted); }
.rdc-trip-foot-val { font-family: var(--f-display); font-weight: 600; font-size: 22px; color: var(--success); }
.rdc-open-btn { display: inline-flex; align-items: center; gap: 7px; border-radius: var(--r-md); padding: 12px 18px; font-size: 14.5px; font-weight: 700; text-decoration: none; background: var(--gold); color: var(--ink); transition: background .12s, transform .1s; }
.rdc-open-btn:hover { background: var(--gold-2); }
.rdc-open-btn:active { transform: scale(.98); }
.rdc-noactive { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 320px; color: var(--muted); }
.rdc-noactive .icon { width: 40px; height: 40px; color: var(--muted-2); margin-bottom: 12px; }
.rdc-noactive h3 { font-family: var(--f-display); font-size: 19px; color: var(--ink); }
.rdc-noactive p { font-size: 13.5px; margin-top: 4px; max-width: 320px; }

/* Available queue (side column) */
.rdc-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-xs); position: sticky; top: 80px; }
.rdc-side-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.rdc-side-head h3 { font-size: 15px; font-weight: 700; }
.rdc-queue { display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 160px); overflow-y: auto; }
.rdc-queue .order-card { box-shadow: none; }

/* Console collapses gracefully on smaller laptops */
@media (max-width: 1100px) and (min-width: 901px) {
  .rdc-strip { grid-template-columns: 1fr 1fr; }
  .rdc-status { grid-column: 1 / -1; }
  .rdc-grid { grid-template-columns: 1fr; }
  .rdc-side { position: static; }
  .rdc-queue { max-height: none; }
}

/* Rider mobile shell */
@media (max-width: 900px) {
  .pwa-rider .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px -8px rgba(11, 13, 18, .14);
  }
  .pwa-rider .page { padding-bottom: 150px; padding-left: 14px; padding-right: 14px; }
  .pwa-rider .topbar { position: sticky; top: 0; z-index: 80; background: var(--surface); border-bottom: 1px solid var(--line); }
  .trip-action { position: fixed; left: 14px; right: 14px; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); margin: 0; z-index: 90; box-shadow: var(--sh-lg); border-radius: var(--r-md); }

  /* ---- Dark driver-app premium polish (mobile only) ---- */
  .pwa-rider { --rider-neon: #1FE08A; }

  /* Neon online hero */
  .pwa-rider .rider-hero { border-radius: 20px; padding: 20px 18px 18px; }
  .pwa-rider .rider-hero.is-online { background: linear-gradient(140deg, #16C46F 0%, #0A8F4E 100%); box-shadow: 0 14px 34px -14px rgba(31, 224, 138, .55); }
  .pwa-rider .rider-hero.is-offline { background: linear-gradient(140deg, #20242C, #101216); box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .6); }
  .pwa-rider .rider-hero.is-online .rider-dot { background: var(--rider-neon); box-shadow: 0 0 0 4px rgba(31, 224, 138, .3), 0 0 12px rgba(31, 224, 138, .9); }
  .pwa-rider .rider-state { font-size: 21px; }
  .pwa-rider .rider-hero.is-online .rider-toggle-btn { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28); }
  .pwa-rider .rider-hero.is-offline .rider-toggle-btn { background: var(--rider-neon); color: #06251A; }

  /* Earnings banner */
  .pwa-rider .rider-earn-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: linear-gradient(140deg, #1C1F26, #121419); border: 1px solid rgba(255,255,255,.07); border-radius: 18px; padding: 16px 18px; box-shadow: var(--sh-md); }
  .pwa-rider .reb-lbl { display: block; font-size: 12px; color: rgba(255,255,255,.6); }
  .pwa-rider .reb-val { display: block; font-family: var(--f-display); font-weight: 600; font-size: 34px; line-height: 1.05; color: var(--gold); margin-top: 2px; }
  .pwa-rider .reb-sub { display: flex; gap: 18px; text-align: right; }
  .pwa-rider .reb-sub div { display: flex; flex-direction: column; }
  .pwa-rider .reb-sub strong { font-family: var(--f-display); font-weight: 600; font-size: 19px; color: #fff; }
  .pwa-rider .reb-sub span { font-size: 10.5px; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .04em; }

  /* Glanceable cards */
  .pwa-rider .trip-card, .pwa-rider .order-card { border-radius: 16px; }
  .pwa-rider .order-accept { background: var(--rider-neon); color: #06251A; }
  .pwa-rider .order-accept:hover { background: #2BEE96; }
  .pwa-rider .trip-payout, .pwa-rider .order-earn, .pwa-rider .trip-open { color: var(--rider-neon); }
  .pwa-rider .pin-drop { background: var(--rider-neon); box-shadow: 0 0 0 3px rgba(31, 224, 138, .2); }
  .pwa-rider .rider-h-count { background: var(--rider-neon); color: #06251A; }

  /* Wallet (mobile dark) */
  .pwa-rider .wallet-card { border-radius: 20px; background: linear-gradient(140deg, #16C46F 0%, #0A8F4E 100%); box-shadow: 0 14px 34px -16px rgba(31, 224, 138, .5); }
  .pwa-rider .wallet-val { color: #fff; }
  .pwa-rider .wallet-lbl, .pwa-rider .wallet-sub { color: rgba(255,255,255,.8); }
  .pwa-rider .wallet-withdraw { border-radius: 16px; }
  .pwa-rider .ww-form .btn-primary { background: var(--rider-neon); color: #06251A; border-color: var(--rider-neon); }
  .pwa-rider .ledger-amt-credit { color: var(--rider-neon); }
}


/* ============================================================
   Seller / stall operator app — kitchen queue + POS
   ============================================================ */
.kds { display: flex; flex-direction: column; gap: 16px; }
.kds-detail { max-width: 620px; margin: 0 auto; }
.kds-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kds-hello { font-family: var(--f-display); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.kds-stalls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Kitchen ticket cards */
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-sm); display: flex; flex-direction: column; }
.ticket.tk-placed { border-left: 4px solid var(--info); }
.ticket.tk-accepted { border-left: 4px solid var(--warning); }
.ticket.tk-preparing { border-left: 4px solid var(--gold-2); }
.ticket.tk-ready { border-left: 4px solid var(--success); }
.ticket-top { display: flex; align-items: center; justify-content: space-between; }
.ticket-code { display: flex; align-items: center; gap: 8px; }
.ticket-code strong { font-size: 16px; }
.ch-badge { font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 7px; border-radius: var(--r-pill); }
.ch-walkin { background: var(--gold-bg); color: var(--gold-2); }
.ch-app { background: var(--info-bg); color: var(--info); }
.ticket-time { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.ticket-status { margin: 8px 0; }
.ticket-items { list-style: none; margin: 4px 0 0; padding: 0; }
.ticket-items li { font-size: 13.5px; padding: 2px 0; }
.ticket-items .tq { color: var(--gold-2); font-weight: 700; margin-right: 4px; }
.ticket-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.ticket-total { font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.ticket-action { width: 100%; margin-top: 12px; border: 0; border-radius: var(--r-md); padding: 12px; font-size: 14.5px; font-weight: 700; cursor: pointer; background: var(--gold); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .12s, transform .1s; }
.ticket-action .icon { width: 16px; height: 16px; }
.ticket-action:hover { background: var(--gold-2); }
.ticket-action:active { transform: scale(.98); }
.ticket-action-done { background: var(--success); color: #fff; }
.ticket-wait { margin-top: 12px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--success); background: var(--success-bg); border-radius: var(--r-md); padding: 9px; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* Order detail prep list */
.ticket-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.prep-list { list-style: none; margin: 0; padding: 4px 0; }
.prep-list li { display: flex; align-items: baseline; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.prep-list li:last-child { border-bottom: 0; }
.prep-qty { font-family: var(--f-display); font-weight: 600; font-size: 20px; color: var(--gold-2); min-width: 44px; }
.prep-name { font-size: 15px; }

/* ---- POS ---- */
.pos { display: flex; flex-direction: column; gap: 14px; }
.pos-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pos-bar .input { max-width: 220px; }
.pos-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.pos-menu { min-width: 0; }
.pos-sec { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 6px 0 8px; }
.pos-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; margin-bottom: 18px; }
.pos-item { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; align-items: flex-start; text-align: left; min-height: 76px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-xs); cursor: pointer; transition: border-color .12s, transform .08s, box-shadow .12s; }
.pos-item:hover { border-color: var(--gold-soft); box-shadow: var(--sh-sm); }
.pos-item:active { transform: scale(.97); border-color: var(--gold); }
.pos-item-name { font-weight: 600; font-size: 13.5px; line-height: 1.2; }
.pos-item-price { font-family: var(--f-display); font-weight: 600; font-size: 15px; color: var(--ink); }

.pos-ticket { position: sticky; top: 80px; display: flex; flex-direction: column; max-height: calc(100vh - 100px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-sm); }
.pos-ticket-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pos-ticket-head h3 { font-family: var(--f-display); font-size: 18px; }
.pos-lines { flex: 1; overflow-y: auto; min-height: 70px; }
.pos-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 0; }
.pos-line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.pos-line-info { display: flex; flex-direction: column; min-width: 0; }
.pos-line-info strong { font-size: 13.5px; }
.pos-line-info .muted { font-size: 11px; }
.pos-qstep { background: var(--bg-2); }
.pos-line-amt { font-family: var(--f-display); font-weight: 600; font-size: 14px; min-width: 64px; text-align: right; }
.pos-summary { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pos-summary > div { font-size: 13.5px; }
.pos-total-row strong { font-family: var(--f-display); font-size: 20px; }
.pos-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.pos-pay-opt { display: flex; cursor: pointer; }
.pos-pay-opt input { position: absolute; opacity: 0; }
.pos-pay-opt span { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: 13.5px; font-weight: 600; }
.pos-pay-opt input:checked + span { border-color: var(--gold); background: var(--gold-bg); color: var(--ink); }
.pos-charge { width: 100%; border: 0; border-radius: var(--r-md); padding: 14px; font-size: 16px; font-weight: 700; cursor: pointer; background: var(--gold); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .12s, transform .1s; }
.pos-charge .icon { width: 18px; height: 18px; }
.pos-charge:hover:not(:disabled) { background: var(--gold-2); }
.pos-charge:active:not(:disabled) { transform: scale(.98); }
.pos-charge:disabled { opacity: .5; cursor: not-allowed; }

.pos-mobile-bar, .pos-backdrop, .pos-sheet-close { display: none; }

/* Seller mobile shell */
@media (max-width: 900px) {
  .pwa-seller .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px -8px rgba(11, 13, 18, .14);
  }
  .pwa-seller .page { padding-bottom: 90px; padding-left: 14px; padding-right: 14px; }
  .pwa-seller .topbar { position: sticky; top: 0; z-index: 80; background: var(--surface); border-bottom: 1px solid var(--line); }
  .kds-grid { grid-template-columns: 1fr; }
  .kds-detail + .trip-action, .pwa-seller .trip-action { position: fixed; left: 14px; right: 14px; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); margin: 0; z-index: 90; box-shadow: var(--sh-lg); border-radius: var(--r-md); }

  /* POS mobile: menu full + slide-up ticket sheet */
  .pos-layout { grid-template-columns: 1fr; }
  .pos-items { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); }
  .pwa-seller .page { padding-bottom: 130px; }
  .pos-ticket {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 97;
    max-height: 82vh; border-radius: 18px 18px 0 0;
    transform: translateY(110%); transition: transform .26s ease;
  }
  .pos-ticket.open { transform: none; }
  .pos-sheet-close { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; background: var(--bg-2); border-radius: 50%; cursor: pointer; color: var(--ink); }
  .pos-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 96; }
  .pos-mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 12px; right: 12px; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 94;
    border: 0; border-radius: var(--r-pill); padding: 13px 18px; cursor: pointer;
    background: var(--ink); color: #fff; box-shadow: var(--sh-lg); opacity: .55; pointer-events: none;
    transition: opacity .15s;
  }
  .pos-mobile-bar.has-items { opacity: 1; pointer-events: auto; }
  .pmb-count { font-size: 13px; color: rgba(255,255,255,.85); }
  .pmb-cta { font-weight: 700; font-size: 14px; color: var(--gold); display: inline-flex; align-items: center; gap: 5px; }
  .pmb-total { font-family: var(--f-display); font-weight: 600; font-size: 16px; }
}


/* ============================================================
   Supplier app — orders, vehicles, catalogue
   ============================================================ */
.v-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; padding: 7px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.filter-chip:hover { border-color: var(--gold-soft); color: var(--ink); }
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Vehicle cards */
.veh-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-xs); display: flex; flex-direction: column; gap: 5px; }
.veh-top { display: flex; align-items: center; justify-content: space-between; }
.veh-reg { display: flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-weight: 700; font-size: 15px; }
.veh-type { font-weight: 600; font-size: 13.5px; }
.veh-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.veh-foot form { margin: 0; }

/* Catalogue rows */
.cat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.cat-row:last-child { border-bottom: 0; }
.cat-row-right { display: flex; align-items: center; gap: 10px; }
.cat-row-right form { margin: 0; }
.cat-row-right .cell-money { font-family: var(--f-display); font-weight: 600; }

/* Dispatch action (vehicle select + button) */
.dispatch-form { display: flex; gap: 10px; align-items: stretch; }
.dispatch-form .input { flex: 1; }
.dispatch-form .btn-trip { width: auto; flex: 0 0 auto; padding-left: 22px; padding-right: 22px; }

@media (max-width: 680px) { .v-stats { grid-template-columns: repeat(2, 1fr); } }

/* Supplier mobile shell */
@media (max-width: 900px) {
  .pwa-vendor .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px -8px rgba(11, 13, 18, .14);
  }
  .pwa-vendor .page { padding-bottom: 150px; padding-left: 14px; padding-right: 14px; }
  .pwa-vendor .topbar { position: sticky; top: 0; z-index: 80; background: var(--surface); border-bottom: 1px solid var(--line); }
  .pwa-vendor .trip-action { position: fixed; left: 14px; right: 14px; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); margin: 0; z-index: 90; box-shadow: var(--sh-lg); border-radius: var(--r-md); }

  /* Distributor shares the same mobile shell */
  .pwa-distributor .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px -8px rgba(11, 13, 18, .14);
  }
  .pwa-distributor .page { padding-bottom: 150px; padding-left: 14px; padding-right: 14px; }
  .pwa-distributor .topbar { position: sticky; top: 0; z-index: 80; background: var(--surface); border-bottom: 1px solid var(--line); }
  .pwa-distributor .trip-action { position: fixed; left: 14px; right: 14px; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); margin: 0; z-index: 90; box-shadow: var(--sh-lg); border-radius: var(--r-md); }
}

/* ============================================================
   Rental partner mobile shell — premium polish (like investor)
   Used at rent.grilzo.com / /partner/* on phones.
   ============================================================ */
@media (max-width: 900px) {
  /* Floating pill bottom-nav, edges 12px, lifted above home indicator */
  .pwa-partner .bottom-nav {
    display: flex; position: fixed; left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 95; border-radius: 22px;
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 14px 36px -10px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .12);
    padding: 8px 6px;
  }
  .pwa-partner .bottom-nav a { border-radius: 14px; transition: color .15s, background .15s; }
  .pwa-partner .bottom-nav a.active { background: var(--gold-bg); }
  .pwa-partner .page {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
    padding-left: 14px; padding-right: 14px;
  }

  /* Compact app bar — sticks under status-bar / notch */
  .pwa-partner .topbar {
    position: sticky; top: 0; z-index: 80;
    background: var(--surface); border-bottom: 1px solid var(--line);
    height: calc(50px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 12px 0;
    gap: 10px; backdrop-filter: blur(12px);
  }
  .pwa-partner .topbar h1 { font-size: 19px; }
  .pwa-partner .topbar .crumbs,
  .pwa-partner .topbar-sub { display: none; }
  .pwa-partner .topbar .icon-badge-btn,
  .pwa-partner .topbar .menu-toggle { width: 34px; height: 34px; }
  .pwa-partner .topbar .menu-toggle .icon { width: 19px; height: 19px; }

  /* Glassy, rounded cards + metrics */
  .pwa-partner .card,
  .pwa-partner .kpi,
  .pwa-partner .metric { border-radius: 18px; }
  .pwa-partner .card { transition: transform .15s ease, box-shadow .15s ease; }
  .pwa-partner .card:active { transform: scale(.995); }

  /* Tap targets */
  .pwa-partner .btn { padding: 11px 16px; }
  .pwa-partner .link-btn { padding: 4px 0; }

  /* Page-head: stack title and CTA */
  .pwa-partner .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pwa-partner .page-head .btn { width: 100%; }

  /* Metrics: 2 columns instead of 4 on phones */
  .pwa-partner .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pwa-partner .metric-value { font-size: clamp(18px, 5.4vw, 24px); }

  /* Two-column .row collapses; col-8/col-4 stack full-width */
  .pwa-partner .row { grid-template-columns: 1fr; gap: 12px; }
  .pwa-partner .row > [class*="col-"] { grid-column: 1 / -1; }

  /* Tables: compact, wrap cells (don't horizontally scroll on phones) */
  .pwa-partner .data-table { width: 100%; font-size: 12.5px; }
  .pwa-partner .data-table th,
  .pwa-partner .data-table td {
    padding: 9px 6px; white-space: normal; word-break: break-word; overflow-wrap: anywhere;
  }
  .pwa-partner .data-table th { font-size: 10px; color: var(--muted); }
  .pwa-partner .data-table code { font-size: 11px; }
  .pwa-partner .data-table .m-hide { display: none !important; }
}

/* Stack invoice rows into label/value cards on the narrowest phones */
@media (max-width: 560px) {
  .pwa-partner .data-table thead { display: none; }
  .pwa-partner .data-table,
  .pwa-partner .data-table tbody { display: block; width: 100%; }
  .pwa-partner .data-table tr {
    display: block; padding: 12px 14px; border-bottom: 1px solid var(--line);
  }
  .pwa-partner .data-table tr:last-child { border-bottom: 0; }
  .pwa-partner .data-table td {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 4px 0; border: 0; text-align: right; white-space: normal; font-size: 13px;
  }
  .pwa-partner .data-table td::before {
    content: attr(data-label); color: var(--muted); font-weight: 600; font-size: 11px;
    letter-spacing: .03em; text-transform: uppercase; text-align: left; flex-shrink: 0;
  }
  .pwa-partner .data-table td.cell-head {
    font-family: var(--f-display); font-size: 15px; color: var(--ink);
    border-bottom: 1px dashed var(--line); padding-bottom: 8px; margin-bottom: 4px;
    text-align: left;
  }
  .pwa-partner .data-table td.cell-head::before { content: ""; }
  .pwa-partner .data-table td:empty { display: none; }
  .pwa-partner .data-table td form { margin-left: auto; }
}


/* ============================================================
   Rental cart ordering (public rent.grilzo.com)
   ============================================================ */
.rent-order-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.rent-order-main { min-width: 0; }
.rent-summary { position: sticky; top: 24px; }
.rent-summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-md); }
.rent-summary-card h3 { font-family: var(--f-display); font-size: 19px; margin-bottom: 12px; }
.rent-sum-cart { color: var(--muted); font-size: 13px; padding: 8px 0; }
.rent-sum-rows { display: flex; flex-direction: column; gap: 9px; }
.rent-sum-rows > div { font-size: 13.5px; }
.rent-sum-rows hr { margin: 4px 0; }
.rent-sum-total strong { font-family: var(--f-display); font-size: 20px; }
.field-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.rent-trust { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.rent-trust li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.rent-trust li i { color: var(--success); flex: 0 0 auto; }
@media (max-width: 860px) {
  .rent-order-grid { grid-template-columns: 1fr; }
  .rent-summary { position: static; }
}


/* ============================================================
   Customer: category tiles, coupons, search, account, tracking
   ============================================================ */

/* Dark/secondary button */
.btn-dark {
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
}
.btn-dark:hover { background: var(--ink-2); }

/* Category tiles — 6 per row, wraps to a second row at 12 */
.cat-tiles {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
  padding: 6px 2px 10px;
}
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }
.cat-tile-img {
  position: relative;
  width: 100%; aspect-ratio: 1 / 1; border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-2); display: grid; place-items: center; color: var(--gold-2);
  border: 1px solid var(--line); box-shadow: var(--sh-xs); transition: transform .15s ease, box-shadow .15s ease;
}
.cat-tile-overlay { display: none; }   /* desktop uses the label below; mobile overlays the name */
.cat-tile-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-tile:hover .cat-tile-img { transform: translateY(-3px); box-shadow: var(--sh-md); }
.cat-tile-label { font-size: 12.5px; font-weight: 600; color: var(--text); text-align: center; }
.cat-tile-label .lbl-mobile { display: none; }   /* desktop shows the short label */
.cat-tile.not-live .cat-tile-img { position: relative; }
.cat-tile.not-live .cat-tile-img img { filter: grayscale(.55) brightness(.85); }
.cat-tile.not-live .cat-tile-label { color: var(--muted); }
.cat-tile-soon {
  position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 6px; border-radius: var(--r-pill);
  background: rgba(15,17,21,.78); color: var(--gold); backdrop-filter: blur(3px);
}

/* Tab strip "soon" marker */
.cuisine-chip.not-live { opacity: .82; }
.cuisine-chip .soon-dot { color: var(--warning); background: var(--warning-bg); }

/* Coming-soon stall header + banner */
.stall-sub-soon { color: var(--warning); }
.soon-banner {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 6px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--warning-bg); color: var(--warning); font-size: 13px; line-height: 1.4;
}

/* Non-orderable dish chip */
.dish-soon {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  color: var(--muted); background: var(--bg-2); border-radius: var(--r-pill); padding: 6px 11px;
}
.dish.is-soon .dish-media img { filter: grayscale(.4) brightness(.92); }

/* Coupon card */
.coupon-card { padding: 14px 16px; }
.coupon-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.coupon-form .input { flex: 1; text-transform: uppercase; }
.coupon-ic { color: var(--gold-2); display: grid; place-items: center; flex: 0 0 auto; }
.coupon-applied { display: flex; align-items: center; gap: 10px; }
.coupon-applied .coupon-ic { color: var(--success); }
.coupon-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.coupon-txt strong { font-size: 13.5px; letter-spacing: .02em; }
.coupon-txt .muted { font-size: 12px; }

/* Search */
.search-bar { display: flex; align-items: center; gap: 10px; position: relative; }
.search-bar .input { flex: 1; padding-left: 38px; }
.search-bar .search-ic { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }

/* Account */
.acct-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.acct-avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold); color: var(--ink);
  display: grid; place-items: center; font-family: var(--f-display); font-size: 24px; font-weight: 600; flex: 0 0 auto;
}
.acct-id { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.acct-id strong { font-size: 16px; }
.acct-stat { text-align: center; }
.acct-stat-num { display: block; font-family: var(--f-display); font-size: 24px; font-weight: 600; color: var(--ink); }
.acct-addr { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.acct-addr:last-child { border-bottom: 0; }
.refer-code {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--gold-bg); border: 1px dashed var(--gold-2); border-radius: var(--r-md); padding: 10px 14px;
}
.refer-code code { font-family: var(--f-mono); font-size: 17px; font-weight: 600; letter-spacing: .08em; color: var(--ink); }
.danger-card { border-color: var(--danger-bg); }

/* Order tracking */
.track-eta {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  background: linear-gradient(135deg, #1F2127 0%, #0F1115 100%); color: #fff; border-radius: var(--r-lg);
}
.track-eta .track-eta-ic { width: 44px; height: 44px; border-radius: 50%; background: rgba(245,197,24,.16); color: var(--gold); display: grid; place-items: center; flex: 0 0 auto; }
.track-eta-min { font-family: var(--f-display); font-size: 22px; font-weight: 600; }
.track-eta-sub { font-size: 12.5px; color: rgba(255,255,255,.75); }
.track-map { height: 260px; width: 100%; border-radius: var(--r-md); overflow: hidden; z-index: 0; }
.rider-card { display: flex; align-items: center; gap: 12px; }
.rider-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-2); display: grid; place-items: center; color: var(--ink); font-weight: 700; flex: 0 0 auto; }
.rider-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.rider-meta strong { font-size: 14px; }
.rider-call { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 900px) {
  /* Mobile greeting */
  .menu-greeting { padding: 2px 2px 12px; }
  .menu-greeting h2 { font-family: var(--f-display); font-size: 23px; letter-spacing: -.02em; }
  .menu-greeting p { color: var(--muted); font-size: 13px; margin-top: 3px; }

  /* 4-up cuisine tiles with the full name below each */
  .cat-tiles { grid-template-columns: repeat(4, 1fr); gap: 9px 8px; }
  .cat-tile { gap: 6px; }
  .cat-tile-img { aspect-ratio: 1 / 1; border-radius: var(--r-md); }
  .cat-tile-label { font-size: 10.5px; line-height: 1.18; font-weight: 600; }
  .cat-tile-label .lbl-desktop { display: none; }
  .cat-tile-label .lbl-mobile { display: inline; }
  .cat-tile.active .cat-tile-img { outline: 2px solid var(--gold); outline-offset: 2px; }
  .cat-tile.active .cat-tile-label { color: var(--gold-2); font-weight: 700; }
  .cat-tile.not-live .cat-tile-img img { filter: grayscale(.5) brightness(.78); }
  .cat-tile.not-live .cat-tile-label { color: var(--muted); }
  .cat-tile:active .cat-tile-img { transform: scale(.96); }
  .cat-tile-soon { top: 4px; right: 4px; padding: 1px 5px; font-size: 8px; }

  .coupon-form { flex-wrap: wrap; }
  .track-map { height: 220px; }
}


/* ============================================================
   Landing pages — mobile (rent.grilzo.com, careers, app, role landings)
   Scoped to body.land-shell so it never leaks into the operator app.
   ============================================================ */
@media (max-width: 760px) {
  .land-shell .land-nav {
    padding: 10px 14px;
    gap: 10px;
  }
  .land-shell .land-nav .brand .word { font-size: 15px; }
  .land-shell .land-nav .brand small { letter-spacing: .15em; }
  .land-shell .land-nav-right { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .land-shell .land-nav-right .btn { padding: 7px 11px; font-size: 12.5px; }

  /* Hero — punchier, less white space */
  .land-shell .land-hero { padding: 40px 18px 44px; }
  .land-shell .land-hero-inner { gap: 18px; }
  .land-shell .land-hero h1 { font-size: clamp(28px, 8vw, 36px); }
  .land-shell .land-hero p.lede { font-size: 14.5px; line-height: 1.55; }
  .land-shell .land-hero-cta { gap: 8px; }
  .land-shell .land-hero-cta .btn { flex: 1 1 100%; justify-content: center; padding: 12px 16px; font-size: 14px; }

  /* Decorative corner icon: hide on phones so it doesn't crowd the copy */
  .land-shell .land-hero .hero-icon { display: none; }

  /* Stats: 2x2 grid instead of horizontal row */
  .land-shell .hero-stats {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px;
    padding-top: 18px; margin-top: 4px;
  }
  .land-shell .hero-stat .num { font-size: 22px; }
  .land-shell .hero-stat .lbl { font-size: 11.5px; margin-top: 2px; }

  /* Sections: smaller padding, tighter type */
  .land-shell .land-section { padding: 44px 18px; }
  .land-shell .land-section h2 { font-size: clamp(22px, 5vw, 28px); }
  .land-shell .land-section .eyebrow { font-size: 10.5px; }
  .land-shell .land-section .sub { font-size: 13.5px; }

  /* Variant + step + role cards: full width, snappier padding */
  .land-shell .variant-grid,
  .land-shell .step-grid,
  .land-shell .role-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
  .land-shell .variant-card,
  .land-shell .step-card,
  .land-shell .role-card { padding: 18px; }
  .land-shell .variant-card .price { font-size: 22px; }
  .land-shell .step-card .n { font-size: 32px; }

  /* CTA banner */
  .land-shell .land-cta { padding: 56px 20px; }
  .land-shell .land-cta h2 { font-size: clamp(22px, 6vw, 30px); }

  /* Footer */
  .land-shell .land-foot {
    flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 20px; font-size: 11.5px;
  }
}

/* /rent landing — sticky bottom CTA on mobile so 'Apply' is one tap away */
@media (max-width: 760px) {
  .land-shell.rent-sticky::after {
    content: none;   /* placeholder for cases that need spacing only */
  }
  .rent-sticky-cta {
    position: fixed; left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    background: var(--ink); color: white;
    border-radius: 16px; padding: 12px 14px;
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, .35);
  }
  .rent-sticky-cta strong { font-family: var(--f-display); font-weight: 500; font-size: 14px; flex: 1; }
  .rent-sticky-cta .btn-gold { padding: 9px 14px; font-size: 13.5px; }
  .land-shell.has-sticky-cta .land-foot { padding-bottom: 96px; }
}
@media (min-width: 761px) {
  .rent-sticky-cta { display: none; }
}


/* ============================================================
   Admin → Rentals — polished header action group
   ============================================================ */
.rental-header-actions {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}

/* Compact insight chip — small inline pill with icon + number + tiny label */
.rha-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 12.5px;
  transition: transform .1s, box-shadow .15s, border-color .15s;
  white-space: nowrap;
}
.rha-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -6px rgba(0,0,0,.18); }
.rha-chip .icon { width: 14px; height: 14px; }
.rha-chip-num { font-family: var(--f-display); font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; }
.rha-chip-label { font-size: 11px; opacity: .7; font-weight: 500; }

.rha-chip-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  border-color: var(--gold-2); color: var(--ink);
}
.rha-chip-amber {
  background: var(--warning-bg, #FFF4DA);
  border-color: rgba(232, 163, 58, .35);
  color: var(--warning, #B27D1A);
}
.rha-chip-red {
  background: var(--danger-bg, #FEEAEA);
  border-color: rgba(216, 64, 64, .35);
  color: var(--danger, #B43232);
}

@media (max-width: 1100px) {
  .rha-chip { padding: 5px 10px; font-size: 11.5px; }
  .rha-chip-num { font-size: 12.5px; }
  .rha-chip-label { display: none; }
}
@media (max-width: 760px) {
  .rental-header-actions { gap: 6px; }
}

/* Count chip baked into a .btn (e.g. "Applications  3") */
.btn.btn-with-meta { padding-right: 6px; }
.btn-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px; padding: 0 7px;
  border-radius: 999px;
  background: rgba(15, 17, 21, .14);
  color: inherit;
  font-size: 11px; font-weight: 700;
  margin-left: 8px;
}
.btn-gold .btn-badge { background: rgba(15, 17, 21, .22); }
.btn-ghost .btn-badge { background: var(--gold-bg); color: var(--gold-2); }

.btn-meta {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold-bg);
  color: var(--gold-2);
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 12px;
  margin-left: 8px;
  letter-spacing: -.01em;
}

/* Quick-add dropdown */
.qa-menu { position: relative; }
.qa-menu .qa-trigger { padding-right: 10px; }
.qa-menu-pop {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  padding: 6px; z-index: 50;
  flex-direction: column;
}
.qa-menu.open .qa-menu-pop { display: flex; }
.qa-menu-pop a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 13.5px; font-weight: 500;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.qa-menu-pop a:hover {
  background: var(--gold-bg);
  color: var(--gold-2);
}
.qa-menu-pop a .icon {
  width: 16px; height: 16px;
  color: var(--muted);
}
.qa-menu-pop a:hover .icon { color: var(--gold-2); }

/* Click-outside: closed by toggling .open on parent; basic close on body click */
@media (max-width: 900px) {
  .rental-header-actions .btn { padding: 8px 12px; font-size: 13px; }
  .rental-header-actions .btn-meta,
  .rental-header-actions .btn-badge { font-size: 10.5px; }
}


/* ============================================================
   Rental partner wallet — premium hero + grid layout
   Used at /partner/wallet on both desktop and mobile.
   ============================================================ */

/* Hero balance — full-width gradient card with the headline number */
.wallet-hero {
  position: relative;
  margin-bottom: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0F1115 0%, #1A1D24 60%, #2A2D35 100%);
  color: #F5EBC8;
  overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.wallet-hero-inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 28px 36px;
}
.wallet-hero-meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wallet-hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  padding: 6px 12px;
  background: rgba(245, 197, 24, .14);
  border: 1px solid rgba(245, 197, 24, .26);
  color: #F5C518;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
}
.wallet-hero-sub {
  margin: 0; max-width: 460px;
  color: rgba(245, 235, 200, .65);
  font-size: 13.5px; line-height: 1.5;
}
.wallet-hero-amount {
  display: inline-flex; align-items: baseline;
  font-family: var(--f-display);
  font-weight: 500;
  color: #F5C518;
  letter-spacing: -.025em;
  line-height: 1;
  text-shadow: 0 0 30px rgba(245, 197, 24, .26);
  white-space: nowrap;
}
.wallet-hero-amount .rupee { font-size: 36px; margin-right: 6px; opacity: .85; }
.wallet-hero-amount .num   { font-size: clamp(40px, 5.4vw, 64px); }
.wallet-hero-amount .paise { font-size: 22px; opacity: .55; margin-left: 4px; letter-spacing: -.01em; }
.wallet-hero-foot {
  grid-column: 1 / -1;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 500;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 180, 80, .10);
  border: 1px solid rgba(255, 180, 80, .22);
  color: #FFC368;
  width: max-content; max-width: 100%;
}
.wallet-hero-foot.ok {
  background: rgba(64, 196, 110, .12);
  border-color: rgba(64, 196, 110, .26);
  color: #66E29B;
}
.wallet-hero-foot strong { color: inherit; }
.wallet-hero-glow {
  position: absolute; z-index: 0;
  right: -160px; top: -160px;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 24, .35), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

/* Two-up grid: Top up + Pay from wallet */
.wallet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.wallet-card .card-body { padding: 20px; }
.wallet-card .card-head { padding: 16px 20px; }

/* Big legible amount input */
.wallet-amt-input {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -.01em;
  padding: 14px 16px;
}

/* Quick top-up chips */
.wallet-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-amt {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, transform .08s;
}
.chip-amt:hover { background: var(--gold-bg); border-color: var(--gold-soft); color: var(--gold-2); }
.chip-amt:active { transform: scale(.97); }

.wallet-cta { width: 100%; padding: 13px; font-size: 14.5px; }
.wallet-hint { font-size: 11.5px; margin: 0; }

/* Pay-from-wallet cards */
.wallet-pay-list { display: flex; flex-direction: column; gap: 10px; padding: 12px 20px 20px; }
.wpay-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .15s, background .15s, transform .1s;
}
.wpay-card:hover { border-color: var(--gold-soft); }
.wpay-card.is-funded { background: var(--gold-bg); border-color: var(--gold-soft); }
.wpay-card.is-low    { opacity: .9; }
.wpay-left { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wpay-code { font-size: 14px; }
.wpay-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; }
.wpay-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 130px; }
.wpay-amt { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.wpay-btn { padding: 7px 14px; }
.wpay-low { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--danger); }

.wallet-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 36px 24px; text-align: center;
}
.wallet-empty p { margin: 0; }

/* Transaction list — wide rows, color-tagged */
.wallet-txns { margin-top: 4px; }
.wallet-txn-list { list-style: none; margin: 0; padding: 8px 0; }
.wtxn-row {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 20px;
  border-top: 1px solid var(--line-2);
  transition: background .12s;
}
.wtxn-row:first-child { border-top: 0; }
.wtxn-row:hover { background: var(--bg-2); }
.wtxn-ic {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
}
.wtxn-ic .icon { width: 16px; height: 16px; }
.wtxn-ic.credit { background: var(--success-bg); color: var(--success); }
.wtxn-ic.debit  { background: var(--danger-bg);  color: var(--danger); }
.wtxn-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wtxn-info strong { font-size: 13.5px; font-weight: 600; }
.wtxn-info .muted { font-size: 11.5px; }
.wtxn-info code { font-size: 10.5px; }
.wtxn-amt-block { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.wtxn-amt {
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  letter-spacing: -.005em;
}
.wtxn-amt.credit { color: var(--success); }
.wtxn-amt.debit  { color: var(--danger);  }
.wtxn-bal { font-size: 10.5px; }

/* ---------------- Mobile / narrow ---------------- */
@media (max-width: 900px) {
  .wallet-hero { border-radius: 18px; margin-bottom: 14px; }
  .wallet-hero-inner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px 20px;
  }
  .wallet-hero-amount { justify-content: flex-start; }
  .wallet-hero-amount .num { font-size: clamp(38px, 11vw, 52px); }
  .wallet-hero-amount .rupee { font-size: 28px; }
  .wallet-hero-amount .paise { font-size: 18px; }
  .wallet-hero-glow { width: 320px; height: 320px; right: -120px; top: -140px; opacity: .8; }

  .wallet-grid { grid-template-columns: 1fr; gap: 14px; }
  .wallet-card .card-body { padding: 16px; }
  .wallet-card .card-head { padding: 14px 16px; }

  .wallet-pay-list { padding: 8px 14px 16px; }
  .wpay-card { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .wpay-right { flex-direction: row; justify-content: space-between; align-items: center; width: 100%; min-width: 0; }
  .wpay-amt { font-size: 17px; }

  .wtxn-row { padding: 12px 14px; grid-template-columns: 34px 1fr auto; gap: 11px; }
  .wtxn-ic { width: 34px; height: 34px; }
  .wtxn-amt { font-size: 14px; }
}


/* ============================================================
   Partner KYC documents page
   ============================================================ */
.kyc-list { display: flex; flex-direction: column; }
.kyc-row {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--line-2);
}
.kyc-row:first-child { border-top: 0; }
.kyc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gold-bg);
  color: var(--gold-2);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.kyc-icon i { width: 20px; height: 20px; }
.kyc-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kyc-info strong { font-size: 14px; font-weight: 600; }
.kyc-status { display: flex; align-items: center; gap: 6px; }
.kyc-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kyc-actions .btn-sm { padding: 6px 10px; font-size: 12px; }
.kyc-upload-form { margin: 0; display: inline-flex; }
.kyc-upload-btn {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.kyc-upload-btn .icon { width: 13px; height: 13px; }

@media (max-width: 720px) {
  .kyc-row {
    grid-template-columns: 40px 1fr;
    gap: 12px; padding: 14px 16px;
    row-gap: 10px;
  }
  .kyc-icon { width: 40px; height: 40px; }
  .kyc-icon i { width: 18px; height: 18px; }
  .kyc-status, .kyc-actions {
    grid-column: 2 / -1;
  }
  .kyc-actions { justify-content: flex-start; }
}


/* ============================================================
   Partner catalog — segmented Recipes/Supplies switcher
   ============================================================ */
.catalog-switch {
  display: flex; gap: 6px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 18px;
  width: max-content; max-width: 100%;
}
.catalog-switch-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13.5px; font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s, box-shadow .15s;
}
.catalog-switch-tab .icon { width: 15px; height: 15px; }
.catalog-switch-tab:hover { color: var(--ink); }
.catalog-switch-tab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 0 0 1px var(--line);
}
.catalog-switch-count {
  display: inline-flex; align-items: center;
  min-width: 22px; padding: 0 7px;
  height: 18px;
  border-radius: 999px;
  background: var(--gold-bg);
  color: var(--gold-2);
  font-family: var(--f-mono);
  font-size: 10.5px; font-weight: 700;
  margin-left: 2px;
}
.catalog-switch-bag {
  font-size: 11px;
  color: var(--gold-2);
  font-weight: 500;
  margin-left: 4px;
}

@media (max-width: 560px) {
  .catalog-switch { width: 100%; }
  .catalog-switch-tab { flex: 1; justify-content: center; padding: 9px 8px; font-size: 12.5px; }
  .catalog-switch-bag { display: none; }
}


/* ============================================================
   Admin → Franchise → Support inbox
   ============================================================ */
.support-list { list-style: none; margin: 0; padding: 0; }
.support-row { border-top: 1px solid var(--line-2); }
.support-row:first-child { border-top: 0; }
.support-row.is-unread { background: var(--gold-bg); }
.support-link {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.support-link:hover { background: var(--bg-2); }
.support-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: var(--ink);
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px;
}
.support-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.support-name-row { display: flex; align-items: baseline; gap: 8px; }
.support-name-row strong { font-size: 14px; }
.support-preview { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 480px; }
.support-sender { color: var(--gold-2); font-weight: 600; }
.support-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
