/* ============================================================
   KikiSend — Design System v9 "Fresh Market"
   Flat colour only · zero gradients · deep green × fresh green
   Light + dark · mobile-first (360px → desktop)

   Compatible drop-in for modern.css v8: every token name and
   class name your PHP / JS / inline styles use is preserved.

   Optional display font (add to header.inc.php <head>):
   <link href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&display=swap" rel="stylesheet">
   Without it, headings fall back to Plus Jakarta Sans.
   ============================================================ */

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  /* Deep forest backbone (values unchanged — inline styles rely on them) */
  --green-950: #04180F;
  --green-900: #0B3D26;
  --green-800: #115033;
  --green-700: #15602F;
  --green-600: #1E7A3C;
  --green-500: #2B9549;
  --green-400: #52B06E;
  --green-300: #8ACD9B;

  /* Fresh leaf accent (core #A3E635) */
  --lemon-900: #365314;
  --lemon-700: #4D7C0F;
  --lemon-600: #84CC16;
  --lemon-500: #A3E635;   /* THE brand lemon */
  --lemon-400: #BEF264;
  --lemon-300: #D9F99D;
  --lemon-200: #ECFCCB;
  --lemon-100: #F4FDDF;
  --lemon-50:  #F9FEEE;

  /* Brand semantics */
  --brand:        var(--lemon-500);
  --brand-hover:  var(--lemon-600);
  --brand-active: var(--lemon-700);
  --brand-deep:   var(--green-900);
  --brand-darker: var(--green-950);
  --brand-rich:   var(--green-700);
  --brand-mid:    var(--green-600);
  --brand-light:  var(--lemon-100);
  --brand-soft:   rgba(163, 230, 53, 0.30);
  --brand-glow:   rgba(163, 230, 53, 0.45);
  --brand-ink:    var(--green-900);
  --brand-text:   var(--green-700);   /* readable green for TEXT on light surfaces */
  --f-brand:      'Unbounded', 'Figtree', system-ui, sans-serif; /* display only: h1/h2, hero numbers, prices */

  --accent:        var(--green-700);
  --accent-hover:  var(--green-800);
  --accent-soft:   rgba(21, 83, 43, 0.10);
  --accent-light:  #E4F0DF;

  /* Buttons — LIGHT screens: deep green fill + white text.
     --btn-alt-* is the lemon twin: lemon fill + deep-green text.
     Use it on any deep-green surface (hero, nav, dark card) in light mode. */
  --btn-bg:        var(--green-900);
  --btn-fg:        #FFFFFF;
  --btn-bg-hover:  var(--green-800);
  --btn-bg-active: var(--green-950);
  --btn-alt-bg:        var(--lemon-500);
  --btn-alt-fg:        var(--green-900);
  --btn-alt-bg-hover:  var(--lemon-400);
  --btn-alt-bg-active: var(--lemon-600);
  --ring:          rgba(11, 61, 38, 0.35);

  --link: var(--green-700);
  --pos:  var(--green-700);

  --panel-deep:   var(--green-900);
  --panel-deep-2: var(--green-800);
  --panel-edge:   #04130b;

  /* Status — solid tints */
  --info:    #2563eb; --info-soft:   rgba(37, 99, 235, 0.10);
  --warn:    #c96a04; --warn-soft:   rgba(217, 119, 6, 0.13);
  --danger:  #d92d20; --danger-soft: rgba(217, 45, 32, 0.10);
  /* Soft destructive action (leave / cancel / delete) */
  --danger-ink:         #b42318;
  --danger-tint:        rgba(217, 45, 32, 0.06);
  --danger-tint-hover:  rgba(217, 45, 32, 0.12);
  --danger-line:        rgba(217, 45, 32, 0.24);
  --danger-line-hover:  rgba(217, 45, 32, 0.40);
  --danger-ring:        rgba(217, 45, 32, 0.16);
  --success: var(--green-600); --success-soft: rgba(26, 104, 57, 0.11);
  --purple:  #7c3aed; --purple-soft: rgba(124, 58, 237, 0.10);
  --teal:    #0d9488; --teal-soft:   rgba(13, 148, 136, 0.10);
  --pink:    #db2777; --pink-soft:   rgba(219, 39, 119, 0.10);
  --indigo:  #4f46e5; --indigo-soft: rgba(79, 70, 229, 0.10);

  /* Surfaces — leaf-tinted paper (not cream) */
  --bg:          #F2F5EC;
  --bg-2:        #E8EDDD;
  --surface:     #FFFFFF;
  --surface-2:   #EEF2E5;
  --surface-3:   #E0E8D2;
  --card:        #FFFFFF;
  --card-hover:  #FAFCF6;
  --nav:         #FFFFFF;
  --sidebar:     #FFFFFF;
  --sidebar-head:#EEF2E5;

  --input:       #F7F9F2;
  --input-focus: #FFFFFF;
  --input-border:#C9D5B6;

  /* Text */
  --text:        #1B2B21;
  --text-strong: #08200F;
  --text-muted:  #52665A;
  --text-dim:    #85948A;
  --on-deep:     #e8f5d8;
  --on-deep-mut: rgba(232, 245, 216, 0.76);

  /* Borders */
  --line:        #DCE4CF;
  --line-strong: #BFCDA9;
  --line-soft:   #E9EFDF;

  --scrim:       rgba(6, 21, 9, 0.58);

  /* Elevation — layered, green-tinted, never harsh */
  --shadow-xs:   none;
  --shadow-sm:   0 1px 0 rgba(6,36,15,.05);
  --shadow-md:   0 8px 20px -10px rgba(6,36,15,.22);
  --shadow-lg:   0 14px 30px -12px rgba(6,36,15,.28);
  --shadow-xl:   0 22px 44px -16px rgba(6,36,15,.34);
  --shadow-card: none;
  --shadow-card-hover: 0 8px 20px -10px rgba(6,36,15,.22);
  /* legacy emboss tokens now map to soft elevation */
  --shadow-3d-sm: var(--shadow-sm);
  --shadow-3d:    var(--shadow-md);
  --shadow-3d-lg: var(--shadow-lg);
  --shadow-lemon: none;
  --shadow-lemon-sm: none;

  /* Radius scale — hierarchy, not one size for everything */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 18px;
  --r-xl: 22px; --r-2xl: 26px; --r-3xl: 34px; --r-pill: 999px;

  /* Layout */
  --nav-h: 60px;
  --bottom-h: 64px;
  --container: 1280px;
  --container-sm: 960px;

  /* Type */
  --f-body: 'Figtree', 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-disp: 'Figtree', 'Plus Jakarta Sans', system-ui, sans-serif;
  --f-num:  'Figtree', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --f-ui:   var(--f-body);

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --t-fast: 150ms; --t-base: 240ms; --t-slow: 420ms;

  /* Legacy "gradient" aliases — all SOLID colours now */
  --grad-brand:  var(--green-700);
  --grad-hero:   var(--green-900);
  --grad-accent: var(--green-600);
  --grad-warm:   var(--green-900);
  --grad-cool:   var(--lemon-100);
  --grad-fresh:  var(--green-700);
}

/* ── Dark theme — forest night. Leaf buttons, deep text ────── */
[data-theme="dark"] {
  --brand-text: var(--lemon-400);
  --brand-hover:  var(--lemon-400);
  --brand-active: var(--lemon-600);
  --brand-darker: #030a05;
  --brand-mid:    var(--green-500);
  --brand-light:  rgba(163,230,53,0.14);
  --brand-soft:   rgba(163,230,53,0.14);
  --brand-glow:   rgba(163,230,53,0.28);

  --accent:        var(--green-400);
  --accent-hover:  var(--green-300);
  --accent-soft:   rgba(45, 149, 86, 0.16);
  --accent-light:  rgba(45, 149, 86, 0.12);

  /* DARK screens: lemon fill + deep-green text (deep green would vanish on a dark page) */
  --btn-bg:        var(--lemon-500);
  --btn-fg:        var(--green-900);
  --btn-bg-hover:  var(--lemon-400);
  --btn-bg-active: var(--lemon-600);
  --ring:          rgba(163,230,53,0.40);

  --link: var(--lemon-400);
  --pos:  var(--lemon-400);

  --panel-deep:   #0f2c1c;
  --panel-deep-2: #16402a;
  --panel-edge:   #020805;

  --info:    #60a5fa; --info-soft:   rgba(96, 165, 250, 0.15);
  --warn:    #fbbf24; --warn-soft:   rgba(251, 191, 36, 0.15);
  --danger:  #f87171; --danger-soft: rgba(248, 113, 113, 0.15);
  --danger-ink:         #fca5a5;
  --danger-tint:        rgba(248, 113, 113, 0.10);
  --danger-tint-hover:  rgba(248, 113, 113, 0.18);
  --danger-line:        rgba(248, 113, 113, 0.30);
  --danger-line-hover:  rgba(248, 113, 113, 0.48);
  --danger-ring:        rgba(248, 113, 113, 0.24);
  --success: var(--green-400); --success-soft: rgba(45, 149, 86, 0.18);
  --purple:  #a78bfa; --purple-soft: rgba(167, 139, 250, 0.15);
  --teal:    #2dd4bf; --teal-soft:   rgba(45, 212, 191, 0.15);
  --pink:    #f472b6; --pink-soft:   rgba(244, 114, 182, 0.15);
  --indigo:  #818cf8; --indigo-soft: rgba(129, 140, 248, 0.15);

  --bg:        #06170C;
  --bg-2:      #0A2013;
  --surface:   #0C2415;
  --surface-2: #11301D;
  --surface-3: #173F26;
  --card:      #0C2415;
  --card-hover:#11301D;
  --nav:       #06170C;
  --sidebar:   #081C10;
  --sidebar-head: #0C2415;

  --input:       #11301D;
  --input-focus: #173F26;
  --input-border:#2A5238;

  --text:        #E2EDE4;
  --text-strong: #ffffff;
  --text-muted:  #9aaa9d;
  --text-dim:    #6c7d70;
  --on-deep:     #e8f5d8;

  --line:        #1B4029;
  --line-strong: #2B5A3B;
  --line-soft:   #11301D;

  --scrim: rgba(0, 0, 0, 0.74);

  --shadow-xs:   none;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.4);
  --shadow-md:   0 8px 22px rgba(0,0,0,.45);
  --shadow-lg:   0 14px 34px rgba(0,0,0,.5);
  --shadow-xl:   0 24px 56px rgba(0,0,0,.58);
  --shadow-card: none;
  --shadow-card-hover: 0 10px 26px rgba(0,0,0,.45);

  --grad-brand:  var(--green-600);
  --grad-hero:   var(--panel-deep);
  --grad-accent: var(--green-500);
  --grad-warm:   var(--panel-deep);
  --grad-cool:   rgba(31,178,0,.12);
  --grad-fresh:  var(--green-600);
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
::selection { background: var(--brand); color: var(--green-950); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--green-500); }

.me-1 { margin-inline-end: 4px; }

/* ── Layout ────────────────────────────────────────────────── */
.page-wrapper {
  min-height: calc(100vh - var(--bottom-h));
  padding-top: calc(var(--nav-h) + 12px);
  padding-bottom: calc(var(--bottom-h) + 32px);
}
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .page-wrapper { padding-bottom: calc(var(--bottom-h) + 52px); }
}

/* ── Type ──────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--f-disp); font-weight: 800; letter-spacing: -.028em; color: var(--text-strong); text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.06; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.14; }
h3 { font-size: 1.25rem; line-height: 1.25; }
h4 { font-size: 1.05rem; line-height: 1.3; }
p  { color: var(--text); text-wrap: pretty; }

/* ============================================================
   BUTTONS — flat solids. Light: deep green + leaf text.
   Dark: leaf green + deep text.
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: var(--r-md);
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  letter-spacing: -.005em;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.btn:hover:not(:disabled) { background: var(--btn-bg-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn:active:not(:disabled) { background: var(--btn-bg-active); box-shadow: none; transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn-sm { min-height: 40px; padding: 9px 15px; font-size: .85rem; border-radius: var(--r-sm); width: auto; }
.btn-lg { min-height: 56px; padding: 16px 28px; font-size: 1rem; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 42px; height: 42px; min-height: 0; padding: 0; border-radius: 50%; }

.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-secondary { background: var(--surface-3); color: var(--text-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--line-strong); color: var(--text-strong); }
.btn-ghost { background: transparent; color: var(--text-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--link); box-shadow: none; }
.btn-outline { background: var(--accent-soft); color: var(--link); }
.btn-outline:hover:not(:disabled) { background: var(--btn-bg); color: var(--btn-fg); box-shadow: none; }
.btn-accent, .btn-deep { background: var(--green-900); color: var(--lemon-500); }
.btn-accent:hover:not(:disabled), .btn-deep:hover:not(:disabled) { background: var(--green-800); color: var(--lemon-400); }
[data-theme="dark"] .btn-accent, [data-theme="dark"] .btn-deep { background: var(--lemon-500); color: var(--green-900); }
[data-theme="dark"] .btn-accent:hover:not(:disabled), [data-theme="dark"] .btn-deep:hover:not(:disabled) { background: var(--lemon-400); color: var(--green-900); }
.btn-lemon { background: var(--lemon-500); color: var(--green-900); }
.btn-lemon:hover:not(:disabled) { background: var(--lemon-400); color: var(--green-900); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b42318; }
[data-theme="dark"] .btn-danger { background: #ef4444; color: #150404; }
[data-theme="dark"] .btn-danger:hover:not(:disabled) { background: #f87171; }

/* Soft destructive action — leave a pool, cancel an order, delete something.
   Tinted paper + deep red ink: unmistakably a button, never a glaring red block. */
.btn-danger-soft {
  background: var(--danger-tint);
  color: var(--danger-ink);
  border: 1px solid var(--danger-line);
  box-shadow: none;
}
.btn-danger-soft:hover:not(:disabled) {
  background: var(--danger-tint-hover);
  border-color: var(--danger-line-hover);
  color: var(--danger-ink);
  box-shadow: none;
}
.btn-danger-soft:active:not(:disabled) { background: var(--danger-tint-hover); color: var(--danger-ink); }
.btn-danger-soft:focus-visible { box-shadow: 0 0 0 4px var(--danger-ring); }
.btn-danger-soft:disabled { opacity: .55; }

.btn .spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2px solid rgba(128,128,128,.35); border-top-color: var(--btn-fg);
  border-radius: 50%; animation: spin .8s linear infinite;
}

/* Locate CTA — the fastest path (1 tap) gets the loudest costume */
.btn-locate {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 12px 20px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 800; font-size: 1rem; letter-spacing: -.01em;
  border: 1.5px solid transparent; border-radius: var(--r-lg);
  box-shadow: 0 6px 20px var(--brand-glow);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .12s var(--ease), background .15s var(--ease), box-shadow .2s var(--ease);
}
.btn-locate:hover:not(:disabled) { background: var(--btn-bg-hover); box-shadow: 0 10px 28px var(--brand-glow); transform: translateY(-1px); }
.btn-locate:active:not(:disabled) { transform: scale(.985); }
.btn-locate:disabled { opacity: .8; cursor: wait; transform: none; }
.btn-locate .locate-ico { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; background: rgba(128,128,128,.24); border-radius: 50%; font-size: 1.05rem; }
.btn-locate .locate-ico::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; animation: locate-ping 1.8s ease-out infinite; }
@keyframes locate-ping { 0% { transform: scale(.7); opacity: .9; } 70%, 100% { transform: scale(1.4); opacity: 0; } }
.btn-locate .locate-txt { text-align: left; line-height: 1.25; }
.btn-locate .locate-txt small { display: block; font-size: .74rem; font-weight: 700; opacity: .8; }
.btn-locate.is-locating .locate-ico::after { animation: none; opacity: 0; }
.btn-locate-sm { width: auto; min-height: 44px; padding: 8px 16px; font-size: .88rem; border-radius: var(--r-pill); }
.btn-locate-sm .locate-ico { width: 28px; height: 28px; font-size: .9rem; }

.or-divider { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--text-dim); font-size: .78rem; font-weight: 700; }
.or-divider::before, .or-divider::after { content: ''; height: 1px; flex: 1; background: var(--line); }

/* Segmented choice: one decision, equal cells */
.choice-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.choice-seg button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 56px; padding: 8px 6px;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: .78rem; font-weight: 800;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.choice-seg button .seg-ico { font-size: 1.15rem; line-height: 1; }
.choice-seg button:hover { border-color: var(--green-500); }
.choice-seg button.on { background: var(--brand-light); border-color: var(--green-500); color: var(--text-strong); box-shadow: 0 0 0 3px var(--ring); }
.choice-seg.two { grid-template-columns: repeat(2, 1fr); }
.choice-seg.two button { flex-direction: row; min-height: 52px; padding: 10px 12px; font-size: .85rem; }
@media (max-width: 400px) {
  .choice-seg:not(.two) { grid-template-columns: 1fr; }
  .choice-seg:not(.two) button { flex-direction: row; justify-content: flex-start; min-height: 48px; padding: 10px 14px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { .btn-locate .locate-ico::after { animation: none; opacity: 0; } }

/* ── Form fields ───────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 700; color: var(--text-strong); margin-bottom: 6px; }
.ks-input, .ks-search-input,
input[type="text"], input[type="tel"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], input[type="date"], input[type="datetime-local"],
input[type="time"], input[type="month"], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  background: var(--input);
  border: 1.5px solid var(--input-border);
  border-radius: var(--r-md);
  font-size: .95rem;
  color: var(--text-strong);
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.ks-input:focus, .ks-search-input:focus, input:focus, select:focus, textarea:focus {
  background: var(--input-focus); border-color: var(--green-500); box-shadow: 0 0 0 4px var(--brand-soft);
}
input::placeholder, textarea::placeholder, .ks-search-input::placeholder { color: var(--text-dim); }
.field textarea, textarea { resize: vertical; min-height: 90px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a6839' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2343C628' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.field-error { color: var(--danger); font-size: .82rem; margin-top: 6px; font-weight: 700; }
.field-hint  { color: var(--text-muted); font-size: .82rem; margin-top: 6px; }
.field input.invalid, .invalid { border-color: var(--danger) !important; }
.invalid:focus { box-shadow: 0 0 0 4px var(--danger-soft) !important; }

input[type="date"], input[type="datetime-local"], input[type="time"], input[type="month"] { font-feature-settings: "tnum"; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator, input[type="month"]::-webkit-calendar-picker-indicator {
  cursor: pointer; height: 22px; width: 22px; margin-left: 6px; opacity: .55; transition: opacity var(--t-fast) var(--ease);
}
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator, [data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator, [data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator { filter: invert(1); }
input[type="date"]:hover::-webkit-calendar-picker-indicator, input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator,
input[type="time"]:hover::-webkit-calendar-picker-indicator, input[type="month"]:hover::-webkit-calendar-picker-indicator { opacity: 1; }

.pw-wrap { position: relative; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: .9rem; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.pw-toggle:hover { background: var(--surface-3); color: var(--text-strong); }

/* ============================================================
   SHELL — top nav, dropdowns, sidebar, bottom nav, modals, toasts
   Z-SCALE: content 0-50 · sticky headers ≤40 · search ≤70
   bottom-nav 900 · cart bar 950 · top nav 1000 · dropdowns 1010
   overlay 1050 · sidebar 1100 · cart drawer 1200 · modals 1500 · toasts 3000
   ============================================================ */

/* ── Top nav ───────────────────────────────────────────────── */
.kiki-nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: var(--nav);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  z-index: 1000; display: flex; align-items: center;
}
.nav-inner { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 16px; height: 100%; }
.nav-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: 12px; }

.kiki-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--text-strong); letter-spacing: -.02em; }
.kb-label { color: var(--text-strong); font-weight: 800; }

.kiki-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.kl-link { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; font-size: .9rem; font-weight: 700; color: var(--text-muted); border-radius: var(--r-pill); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.kl-link:hover { background: var(--surface-3); color: var(--text-strong); }
.kl-link.active { background: var(--btn-bg); color: var(--btn-fg); }
.kl-link i { font-size: .85rem; }

.kiki-hamburger { width: 44px; height: 44px; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); position: relative; flex-shrink: 0; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.kiki-hamburger:hover { background: var(--brand-soft); border-color: var(--brand); }
.kiki-hamburger.open { background: var(--btn-bg); border-color: var(--btn-bg); }
.kiki-hamburger span { display: block; width: 18px; height: 2px; background: var(--text-strong); border-radius: 2px; transform-origin: center; transition: transform var(--t-base) var(--ease), opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.kiki-hamburger.open span { background: var(--btn-fg); }
.kiki-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.kiki-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.kiki-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) { .kiki-hamburger { display: flex; } .nav-right .kiki-hamburger { order: 99; } .kiki-links { display: none; } .nav-theme { display: none !important; } }

.icon-btn { position: relative; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--text-muted); background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.icon-btn:hover { background: var(--brand-soft); color: var(--link); border-color: var(--brand); }
.notif-dot { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; background: var(--danger); color: #fff; border-radius: var(--r-pill); font-size: .66rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }

.wallet-pill { display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; background: var(--btn-bg); color: var(--btn-fg); border-radius: var(--r-pill); font-weight: 800; font-size: .86rem; transition: background var(--t-fast) var(--ease); }
.wallet-pill:hover { background: var(--btn-bg-hover); }
.wallet-pill i { font-size: .8rem; }

.nav-theme { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--text-muted); font-size: 1rem; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.nav-theme:hover { background: var(--brand-soft); border-color: var(--brand); }
.nav-theme .tp-icon { font-size: 1rem; line-height: 1; }

.user-drop-wrap, .notif-drop-wrap { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; background: var(--surface); border-radius: var(--r-pill); border: 1px solid var(--line); cursor: pointer; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.user-btn:hover { background: var(--brand-soft); border-color: var(--brand); }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--green-700); color: var(--lemon-300); font-family: var(--f-disp); font-weight: 800; font-size: 13px; overflow: hidden; }
.uname { font-size: .9rem; font-weight: 700; color: var(--text-strong); }
@media (max-width: 600px) { .uname { display: none; } }

.user-dropdown, .notif-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top right;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast);
  z-index: 1010;
}
.user-dropdown { min-width: 260px; padding: 8px; max-height: min(560px, calc(100vh - 80px)); max-height: min(560px, calc(100dvh - 80px)); overflow-y: auto; overscroll-behavior: contain; }
.user-drop-wrap.open .user-dropdown, .notif-drop-wrap.open .notif-dropdown { opacity: 1; visibility: visible; transform: none; }
.user-dropdown a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm); font-size: .9rem; font-weight: 600; color: var(--text); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.user-dropdown a:hover { background: var(--brand-soft); color: var(--link); }
.user-dropdown a i { color: var(--link); width: 16px; text-align: center; }
.user-dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.user-dropdown .ud-danger, .user-dropdown .ud-danger i { color: var(--danger); }
.user-dropdown .ud-danger:hover { background: var(--danger-soft); color: var(--danger); }
.user-dropdown .ud-header { padding: 10px 12px 12px; font-size: .78rem; color: var(--text-muted); }
.user-dropdown .ud-header strong { display: block; color: var(--text-strong); margin-top: 2px; font-weight: 800; font-size: .95rem; }

.notif-dropdown { width: 370px; max-width: calc(100vw - 24px); max-height: min(500px, 72vh); display: flex; flex-direction: column; overflow: hidden; }
.notif-dd-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 16px 10px; }
.notif-dd-head h4 { font-size: 1rem; }
.notif-dd-head button { color: var(--link); font-size: .8rem; font-weight: 800; white-space: nowrap; }
.notif-dd-head button:hover { text-decoration: underline; }
.notif-dd-list { overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.notif-dd-item { display: flex; gap: 12px; align-items: flex-start; padding: 11px; border-radius: var(--r-md); cursor: pointer; border: 1px solid transparent; text-align: left; width: 100%; background: none; font: inherit; color: inherit; transition: background var(--t-fast) var(--ease); }
.notif-dd-item:hover { background: var(--surface-2); }
.notif-dd-item.unread { background: var(--brand-soft); }
.notif-dd-item .notif-icon { width: 38px; height: 38px; font-size: .9rem; }
.notif-dd-item .nd-text { flex: 1; min-width: 0; }
.notif-dd-item .nd-title { font-size: .87rem; font-weight: 800; color: var(--text-strong); display: flex; align-items: center; gap: 6px; }
.notif-dd-item .nd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }
.notif-dd-item .nd-body { font-size: .8rem; color: var(--text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-dd-item .nd-time { font-size: .72rem; color: var(--text-dim); margin-top: 3px; }
.notif-dd-empty { padding: 30px 20px; text-align: center; color: var(--text-muted); font-size: .88rem; }
.notif-dd-foot { display: block; text-align: center; padding: 14px; border-top: 1px solid var(--line); font-size: .86rem; font-weight: 800; color: var(--link); }
.notif-dd-foot:hover { background: var(--surface-2); }
.notif-detail-icon { width: 52px; height: 52px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.notif-detail-meta { font-size: .76rem; color: var(--text-dim); margin-top: 2px; }

@media (max-width: 640px) {
  .nav-inner { gap: 10px; padding: 0 14px; }
  .nav-right { gap: 6px; margin-left: auto; }
  .wallet-pill { padding: 9px 12px; font-size: .8rem; }
  .user-dropdown { min-width: 0; width: calc(100vw - 24px); max-width: 320px; }
  .notif-dropdown { position: fixed; top: calc(var(--nav-h) + 6px); right: 12px; left: 12px; width: auto; max-width: none; }
}

/* ── Sidebar ───────────────────────────────────────────────── */
.kiki-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 310px; max-width: 88vw; background: var(--sidebar); border-right: 1px solid var(--line); z-index: 1100; transform: translateX(-105%); transition: transform var(--t-base) var(--ease); display: flex; flex-direction: column; box-shadow: var(--shadow-xl); }
.kiki-sidebar.open { transform: translateX(0); }
.sb-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); min-height: 76px; }
.sb-brand { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: .95rem; letter-spacing: -.02em; color: var(--text-strong); }
.sb-close { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--line); flex-shrink: 0; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.sb-close:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.sb-user { display: flex; align-items: center; gap: 12px; margin: 14px 14px 4px; padding: 14px; background: var(--panel-deep); color: #fff; border-radius: var(--r-lg); }
.sbu-name { font-weight: 800; color: #fff; font-size: .95rem; }
.sbu-wallet { font-size: .84rem; color: var(--lemon-300); margin-top: 2px; font-weight: 700; }
.sb-body { flex: 1; overflow-y: auto; padding: 10px 12px; }
.sb-section { font-size: .74rem; font-weight: 800; color: var(--text-dim); letter-spacing: .02em; padding: 14px 10px 6px; }
.sb-link { display: flex; align-items: center; gap: 13px; padding: 12px; margin-bottom: 2px; font-size: .93rem; font-weight: 600; color: var(--text); border-radius: var(--r-md); position: relative; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.sb-link:hover { background: var(--surface-2); }
.sb-link.active { color: var(--btn-fg); background: var(--btn-bg); font-weight: 800; }
.sbl-icon { width: 20px; text-align: center; color: inherit; opacity: .9; }
.sb-badge { margin-left: auto; background: var(--danger); color: #fff; padding: 2px 8px; border-radius: var(--r-pill); font-size: .68rem; font-weight: 800; }
.sb-hr { height: 1px; background: var(--line); margin: 8px 10px; }
.sb-danger, .sb-danger .sbl-icon { color: var(--danger); }
.sb-danger:hover { background: var(--danger-soft); }
.sb-theme-slot { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sb-foot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.sb-theme-row { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .82rem; color: var(--text-muted); font-weight: 700; }
.sb-theme-label { display: inline-flex; align-items: center; gap: 6px; }
.theme-pill { width: 46px; height: 28px; background: var(--surface-3); border-radius: var(--r-pill); position: relative; border: 1px solid var(--line); transition: background var(--t-base) var(--ease); }
.theme-pill .tp-track { width: 100%; height: 100%; position: relative; }
.theme-pill .tp-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--brand); border-radius: 50%; transition: transform var(--t-base) var(--ease); }
[data-theme="dark"] .theme-pill { background: var(--green-700); border-color: var(--green-600); }
[data-theme="dark"] .theme-pill .tp-thumb { transform: translateX(18px); }
.kiki-overlay { position: fixed; inset: 0; background: var(--scrim); z-index: 1050; opacity: 0; visibility: hidden; transition: opacity var(--t-base) var(--ease), visibility var(--t-base) var(--ease); backdrop-filter: blur(4px); }
.kiki-overlay.active { opacity: 1; visibility: visible; }

/* ── Bottom nav — floating pill ────────────────────────────── */
.mob-bottom-nav {
  position: fixed; bottom: 12px; left: 12px; right: 12px; min-height: var(--bottom-h);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl);
  display: none; align-items: stretch; justify-content: space-around; gap: 0; padding: 6px;
  z-index: 900; box-shadow: var(--shadow-lg);
}
@media (max-width: 900px) { .mob-bottom-nav { display: flex; } }
.mob-bottom-nav--always { display: flex; }
@media (min-width: 901px) { .mob-bottom-nav--always { left: 50%; right: auto; transform: translateX(-50%); width: min(600px, calc(100vw - 24px)); } }
.mob-nav-item { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 2px; border-radius: 0; font-size: .68rem; font-weight: 700; color: var(--text-muted); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
/* Segmented active pill: outer ends curved, inner dividers straight (Home | About | Sign in | Join) */
.mob-nav-item:first-child { border-top-left-radius: var(--r-xl); border-bottom-left-radius: var(--r-xl); border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mob-nav-item:last-child { border-top-right-radius: var(--r-xl); border-bottom-right-radius: var(--r-xl); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.mob-nav-item:only-child { border-radius: var(--r-xl); }
.mob-nav-item:hover { color: var(--link); }
.mob-nav-item.active { color: var(--btn-fg); background: var(--btn-bg); }
.mob-nav-item i { font-size: 1.1rem; flex-shrink: 0; }
.mob-nav-item span { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; line-height: 1.25; overflow-wrap: break-word; max-width: 100%; }
.mob-nav-pick { position: relative; }
.mob-pick-bubble { width: 54px; height: 54px; background: var(--brand); color: var(--green-950); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-top: -24px; border: 4px solid var(--surface); transition: transform var(--t-fast) var(--ease); }
.mob-pick-bubble--active { transform: scale(1.08); }
.mob-nav-pick:hover .mob-pick-bubble { transform: scale(1.08); }
.mob-pick-label { font-size: .65rem; font-weight: 800; margin-top: 2px; }

/* ── Motion ────────────────────────────────────────────────── */
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(1.25); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes slideRight { from { transform: translateX(-100%); } to { transform: translateX(0); } }
/* Entrance: kept (your pages use it) but short and subtle */
.animate-in { opacity: 0; animation: fadeUp .45s var(--ease) forwards; }
.animate-in-1 { animation-delay: .04s; } .animate-in-2 { animation-delay: .08s; } .animate-in-3 { animation-delay: .12s; }
.animate-in-4 { animation-delay: .16s; } .animate-in-5 { animation-delay: .2s; } .animate-in-6 { animation-delay: .24s; }

/* ── Modals ────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: var(--scrim); z-index: 1500; display: none; align-items: flex-end; justify-content: center; padding: 12px; backdrop-filter: blur(6px); }
@media (min-width: 700px) { .modal-overlay { align-items: center; padding: 16px; } }
.modal-overlay.show, .modal-overlay.open { display: flex; animation: fadeIn .2s var(--ease); }
.modal-sheet {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl);
  width: 100%; max-width: 460px; max-height: 92vh; max-height: 92dvh;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  padding: 28px 24px; position: relative; box-shadow: var(--shadow-xl); animation: fadeUp .3s var(--ease);
}
.modal-sheet::-webkit-scrollbar { width: 8px; }
.modal-sheet::-webkit-scrollbar-track { background: transparent; margin: 16px 0; }
.modal-sheet::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
#auth-modal .modal-sheet { padding: 26px 22px 24px; }
#auth-modal .field { margin-bottom: 13px; }
#auth-modal .auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#auth-modal .auth-row .field { margin-bottom: 13px; }
@media (max-width: 420px) { #auth-modal .auth-row { grid-template-columns: 1fr; } }
#auth-modal .btn-lg { width: 100%; margin-top: 4px; }
.modal-handle { display: block; width: 40px; height: 4px; background: var(--line-strong); border-radius: 2px; margin: -14px auto 16px; }
@media (min-width: 700px) { .modal-handle { display: none; } }
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border-radius: 50%; color: var(--text-muted); border: 1px solid var(--line); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); z-index: 2; }
.modal-close:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.b-logo { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; overflow: hidden; }
.b-logo img { width: 100%; height: 100%; object-fit: cover; }
.b-name { font-weight: 800; color: var(--text-strong); }
.modal-tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: var(--r-pill); margin-bottom: 24px; border: 1px solid var(--line); }
.modal-tabs button { flex: 1; padding: 11px; font-size: .9rem; font-weight: 700; color: var(--text-muted); border-radius: var(--r-pill); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.modal-tabs button.active { background: var(--btn-bg); color: var(--btn-fg); }
.auth-title { font-size: 1.5rem; margin-bottom: 4px; }
.auth-sub { color: var(--text-muted); font-size: .92rem; }
.auth-foot { color: var(--text-muted); text-align: center; font-size: .85rem; margin-top: 14px; }
.auth-foot a { color: var(--link); font-weight: 800; }

.confirm-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl); padding: 32px 28px; text-align: center; width: 100%; max-width: 390px; box-shadow: var(--shadow-xl); animation: pop .25s var(--ease); }
.confirm-icon { font-size: 3rem; margin-bottom: 14px; display: block; }
.confirm-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; color: var(--text-strong); font-family: var(--f-disp); }
.confirm-body { color: var(--text-muted); font-size: .92rem; margin-bottom: 22px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 8px; }
.confirm-actions .btn { flex: 1; width: auto; }

/* ── Toasts ────────────────────────────────────────────────── */
.toast-queue { position: fixed; top: calc(var(--nav-h) + 12px); right: 16px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; width: min(390px, calc(100vw - 32px)); }
.kiki-toast { --toast-accent: var(--success); pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px 12px 16px 14px; background: var(--surface); color: var(--text-strong); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-size: .88rem; font-weight: 600; line-height: 1.45; opacity: 0; transform: translateX(110%); transition: transform .35s var(--ease), opacity .3s var(--ease); }
.kiki-toast.show { opacity: 1; transform: translateX(0); }
.kiki-toast.success { --toast-accent: var(--brand); }
.kiki-toast.error { --toast-accent: var(--danger); }
.kiki-toast .toast-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; flex-shrink: 0; background: var(--toast-accent); color: #fff; }
.kiki-toast.success .toast-icon { color: var(--green-950); }
.kiki-toast .toast-msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kiki-toast .toast-close { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; color: var(--text-muted); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.kiki-toast .toast-close:hover { background: var(--surface-2); color: var(--text-strong); }
.kiki-toast .toast-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--toast-accent); transform-origin: left center; animation: toast-progress linear forwards; }
.kiki-toast.progress-paused .toast-progress { animation-play-state: paused; }
@keyframes toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 600px) { .toast-queue { left: 12px; right: 12px; width: auto; align-items: stretch; } }
@media (prefers-reduced-motion: reduce) { .kiki-toast { transform: none; transition: opacity .2s ease; } .kiki-toast .toast-progress { display: none; } }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(129,129,129,.3); border-radius: 50%; border-top-color: var(--brand); animation: spin .8s linear infinite; }

/* ── Brand logos (light/dark swap) & legacy ball ───────────── */
.kb-ball, .sb-ball, .b-logo, .ab-ball, .asb-ball { overflow: hidden; }
.kb-ball, .sb-ball, .ab-ball, .asb-ball { background: transparent !important; box-shadow: none !important; width: auto !important; height: auto !important; padding: 0 !important; }
.kb-ball img, .sb-ball img, .ab-ball img, .asb-ball img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kiki-brand-logo, .sb-brand-logo, .asb-brand-logo, .b-logo-img { display: block; width: auto; object-fit: contain; transition: opacity var(--t-fast) var(--ease); }
.kiki-brand-logo { height: 34px; max-width: 180px; }
.sb-brand-logo { height: 32px; max-width: 180px; }
.asb-brand-logo { height: 30px; max-width: 160px; }
.b-logo-img { height: 38px; max-width: 200px; }
@media (max-width: 480px) { .kiki-brand-logo { height: 30px; max-width: 150px; } }
.theme-light { display: none !important; }
.theme-dark { display: block; }
[data-theme="dark"] .theme-dark { display: none !important; }
[data-theme="dark"] .theme-light { display: block !important; }

/* ── Theme switch (sun / moon) ─────────────────────────────── */
.theme-switch { position: relative; display: inline-flex; align-items: center; width: 68px; height: 36px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill); cursor: pointer; padding: 0; transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease); flex-shrink: 0; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.theme-switch:hover { border-color: var(--brand); }
.theme-switch .ts-sun, .theme-switch .ts-moon { position: absolute; top: 50%; transform: translateY(-50%); font-size: .85rem; z-index: 1; pointer-events: none; transition: color var(--t-fast) var(--ease), transform var(--t-base) var(--ease); }
.theme-switch .ts-sun { left: 10px; color: var(--text-dim); } .theme-switch .ts-moon { right: 10px; color: var(--text-dim); }
.theme-switch[data-active="light"] .ts-sun { color: var(--lemon-900); transform: translateY(-50%) scale(1.15) rotate(15deg); }
.theme-switch[data-active="dark"] .ts-moon { color: var(--green-900); transform: translateY(-50%) scale(1.15) rotate(-15deg); }
/* Dark theme: sun/moon glyphs sit on a dark track — use light glyphs so they stay readable. */
[data-theme="dark"] .theme-switch[data-active="light"] .ts-sun { color: var(--lemon-300); }
[data-theme="dark"] .theme-switch[data-active="dark"] .ts-moon { color: var(--lemon-300); }
.theme-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; background: var(--green-900); border-radius: 50%; transition: transform var(--t-base) var(--ease-spring), background var(--t-base) var(--ease); z-index: 2; }
.theme-switch[data-active="dark"]::after { transform: translateX(32px); background: var(--brand); }
.theme-switch .ts-knob-icon { position: absolute; top: 50%; left: 17px; transform: translateY(-50%); font-size: .82rem; z-index: 3; color: var(--lemon-300); pointer-events: none; transition: transform var(--t-base) var(--ease-spring), color var(--t-base) var(--ease); }
.theme-switch[data-active="dark"] .ts-knob-icon { transform: translate(32px, -50%) rotate(-15deg); color: var(--green-900); }
.theme-switch.ts-sm { width: 54px; height: 30px; }
.theme-switch.ts-sm::after { width: 22px; height: 22px; top: 3px; left: 3px; }
.theme-switch.ts-sm[data-active="dark"]::after { transform: translateX(24px); }
.theme-switch.ts-sm .ts-knob-icon { left: 14px; font-size: .72rem; }
.theme-switch.ts-sm[data-active="dark"] .ts-knob-icon { transform: translate(24px, -50%) rotate(-15deg); }
.theme-switch.ts-sm .ts-sun { left: 8px; font-size: .72rem; } .theme-switch.ts-sm .ts-moon { right: 8px; font-size: .72rem; }
.theme-switch:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px 16px; background: var(--panel-deep); border-radius: var(--r-lg); margin-bottom: 20px; position: relative; overflow: hidden; }
.breadcrumb a { color: var(--lemon-300); font-size: .85rem; font-weight: 700; padding: 6px 12px; border-radius: var(--r-pill); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.breadcrumb a:hover { background: var(--panel-deep-2); color: var(--lemon-200); }
.breadcrumb .crumb-sep { color: var(--on-deep-mut); font-size: .7rem; }
.breadcrumb .current { background: var(--brand); color: var(--green-950); font-size: .8rem; font-weight: 800; padding: 6px 14px; border-radius: var(--r-pill); }

/* ── Deep panels: shared flat decoration (solid circles, no gradient) ── */
.home-hero, .cta-banner, .dash-banner, .live-order-card, .wallet-hero, .merchant-hero, .earnings-hero, .admin-hero, .rider-hero, .fw-main {
  position: relative; overflow: hidden; background: var(--panel-deep); color: var(--on-deep);
}
.home-hero::after, .cta-banner::after, .dash-banner::after, .live-order-card::after, .wallet-hero::after, .merchant-hero::after, .earnings-hero::after, .admin-hero::after, .rider-hero::after, .fw-main::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px; border-radius: 50%;
  background: var(--panel-deep-2); opacity: .7; pointer-events: none;
}
.home-hero::before, .cta-banner::before, .dash-banner::before, .live-order-card::before, .wallet-hero::before, .merchant-hero::before, .earnings-hero::before, .admin-hero::before, .rider-hero::before, .fw-main::before {
  content: ""; position: absolute; left: -60px; bottom: -110px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(123, 216, 94, .07); pointer-events: none;
}
.cta-banner > *, .dash-banner > *, .live-order-card > *, .wallet-hero > *, .merchant-hero > *, .earnings-hero > *, .admin-hero > *, .rider-hero > *, .fw-main > * { position: relative; z-index: 2; }

/* ============================================================
   LANDING — hero is the one bold moment; everything else is quiet
   ============================================================ */
.home-feed { max-width: var(--container); margin: 0 auto; padding: 0 16px 80px; }

.home-hero {
  padding: 60px 52px; border-radius: var(--r-3xl); margin-bottom: 56px; min-height: 400px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center;
}
.home-hero::after { right: -110px; top: auto; bottom: -140px; width: 420px; height: 420px; }
.hero-content { position: relative; z-index: 2; max-width: 600px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--panel-deep-2); border: 1px solid var(--green-700); border-radius: var(--r-pill); font-size: .8rem; font-weight: 700; margin-bottom: 22px; color: var(--lemon-300); }
.hero-badge .pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: pulse 2s ease-in-out infinite; }
.home-hero h1 { font-size: clamp(2.3rem, 5.6vw, 3.9rem); line-height: 1.02; margin-bottom: 18px; color: #fff; letter-spacing: -.04em; }
.home-hero h1 .highlight { color: var(--lemon-300); position: relative; display: inline-block; z-index: 0; }
.home-hero h1 .highlight::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: 4px; height: 10px; background: var(--green-600); border-radius: 4px; z-index: -1; }
.home-hero p { color: var(--on-deep-mut); max-width: 500px; margin-bottom: 28px; font-size: 1.06rem; line-height: 1.6; }
.hero-search { display: flex; gap: 6px; background: var(--surface); padding: 6px; border-radius: var(--r-pill); max-width: 540px; box-shadow: var(--shadow-lg); }
.hero-search input { flex: 1; border: 0; background: transparent; padding: 12px 18px; font-size: .95rem; color: var(--text-strong); font-weight: 500; min-height: 0; border-radius: var(--r-pill); }
.hero-search input:focus { box-shadow: none; background: transparent; }
.hero-search button { padding: 12px 26px; background: var(--brand); color: var(--green-950); border-radius: var(--r-pill); font-weight: 800; font-size: .92rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.hero-search button:hover { background: var(--lemon-400); }
.hero-search button:active { transform: scale(.97); }
.hero-stats { display: flex; gap: 40px; margin-top: 34px; position: relative; z-index: 2; flex-wrap: wrap; }
.hero-stat .stat-num { font-family: var(--f-disp); font-size: 1.85rem; font-weight: 800; color: var(--lemon-300); line-height: 1; letter-spacing: -.03em; }
.hero-stat .stat-label { font-size: .8rem; color: var(--on-deep-mut); font-weight: 500; margin-top: 5px; }

/* Hero slider frame — flat lime frame, gentle tilt */
.hero-image { position: relative; z-index: 2; display: block; }
.hero-image-frame { position: relative; background: var(--lemon-300); border-radius: var(--r-2xl); padding: 8px; transform: rotate(-2.5deg); box-shadow: var(--shadow-xl); transition: transform var(--t-slow) var(--ease-spring); }
.hero-image-frame:hover { transform: rotate(-1deg); }
.hero-image-frame > img { display: block; width: 100%; height: 300px; object-fit: cover; border-radius: calc(var(--r-2xl) - 8px); }
.hero-slides { position: relative; width: 100%; height: 300px; border-radius: calc(var(--r-2xl) - 8px); overflow: hidden; background: var(--green-900); touch-action: pan-y; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s var(--ease), visibility 0s linear 1s; pointer-events: none; will-change: opacity; backface-visibility: hidden; }
.hero-slide img { display: block; width: 100%; height: 100%; object-fit: cover; transform: translateZ(0); }
.hero-slide.active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1s var(--ease), visibility 0s; }
.hero-slide.active img { animation: heroZoom 6.5s linear forwards; }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: opacity .01ms linear !important; } .hero-slide.active img, .hero-image-tag, .hero-image-card { animation: none !important; } }
.hero-slide-cap { position: absolute; left: 12px; bottom: 12px; z-index: 2; max-width: 70%; background: var(--green-950); color: var(--lemon-300); padding: 7px 13px; border-radius: var(--r-pill); font-size: .74rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .4s var(--ease); }
.hero-slide-cap.fade { opacity: 0; }
.hero-dots { position: absolute; right: 12px; bottom: 16px; z-index: 2; display: flex; align-items: center; gap: 6px; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.6); transition: all .4s var(--ease); }
.hero-dot.active { width: 26px; border-radius: var(--r-pill); background: var(--brand); }
.hero-progress { height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); margin-top: 8px; overflow: hidden; }
.hero-progress-fill { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 2px; }
.hero-image-tag { position: absolute; top: -16px; right: -14px; background: var(--brand); color: var(--green-950); padding: 10px 15px; border-radius: var(--r-md); font-weight: 800; font-size: .8rem; display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-md); transform: rotate(5deg); animation: float 4s ease-in-out infinite; }
.hero-image-tag::before { content: "✦"; font-size: .9rem; }
.hero-image-card { position: absolute; bottom: -22px; left: -26px; background: var(--surface); color: var(--text-strong); padding: 13px 16px; border-radius: var(--r-lg); display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); transform: rotate(-3deg); animation: float 5s ease-in-out infinite; }
.hero-image-card .hic-ico { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.hero-image-card .hic-meta { font-size: .78rem; color: var(--text-muted); margin-bottom: 2px; }
.hero-image-card .hic-text { font-weight: 800; color: var(--text-strong); font-size: .95rem; }

/* Tablet/mobile: photo backdrop + solid dark veil (no gradient) */
@media (max-width: 999px) {
  .hero-image { margin-top: 10px; }
  .hero-slides { height: 240px; }
  .hero-image-frame { transform: rotate(-1.5deg); }
  .hero-image-tag { top: -14px; right: 8px; }
  .hero-image-card { bottom: -14px; left: 8px; }
}
@media (max-width: 999px) and (min-width: 801px) {
  .home-hero { grid-template-columns: 1fr; padding: 56px 40px; min-height: 420px; background-image: url('../images/k3.jpg'); background-size: cover; background-position: center; background-repeat: no-repeat; }
}
@media (max-width: 800px) {
  .home-hero { grid-template-columns: 1fr; padding: 48px 22px 40px; min-height: 460px; margin-bottom: 40px; border-radius: var(--r-2xl); background-image: url('../images/k3.jpg'); background-size: cover; background-position: center right; background-repeat: no-repeat; }
  .hero-image-frame, .hero-image-frame:hover { transform: none; }
  .hero-image-tag { top: 10px; right: 10px; transform: none; padding: 8px 12px; font-size: .74rem; }
  .hero-image-card { left: 10px; bottom: 10px; transform: none; padding: 10px 12px; gap: 10px; }
  .hero-image-card .hic-ico { width: 36px; height: 36px; font-size: 1.1rem; }
  .hero-image-card .hic-text { font-size: .85rem; }
  .hero-slides { height: 210px; }
  .hero-slide-cap { font-size: .68rem; padding: 6px 10px; max-width: 62%; }
  .hero-stats { gap: 22px; margin-bottom: 24px; }
  .hero-stat .stat-num { font-size: 1.5rem; }
}
@media (max-width: 999px) {
  .home-hero::before { inset: 0; left: 0; bottom: 0; width: auto; height: auto; border-radius: 0; background: var(--green-950); opacity: .72; }
  .home-hero h1 { color: #fff; } .home-hero p { color: rgba(232,245,216,.92); }
}
@media (max-width: 480px) {
  .home-hero { padding: 42px 18px 34px; min-height: 420px; background-position: 70% center; }
  .hero-search { flex-direction: column; border-radius: var(--r-lg); padding: 8px; gap: 8px; }
  .hero-search input { padding: 13px 16px; }
  .hero-search button { justify-content: center; padding: 13px 18px; border-radius: var(--r-md); }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
  .hero-stat { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-md); padding: 12px 14px; }
  .hero-slides { height: 190px; }
}

/* ── Search header ─────────────────────────────────────────── */
.home-header { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; padding: 0 4px; position: relative; z-index: 1; }
.home-loc-pill { display: inline-flex; align-items: center; gap: 8px; padding: 13px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); font-size: .88rem; font-weight: 700; color: var(--text-strong); max-width: 50%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.home-loc-pill:hover { background: var(--brand-soft); border-color: var(--brand); }
.home-loc-pill .pin-icon { color: var(--link); font-size: .9rem; }
.pin-label { overflow: hidden; text-overflow: ellipsis; }
.home-search { flex: 1; position: relative; z-index: 60; }
.home-search:focus-within { z-index: 70; }
.home-search .search-icon, .search-bar > i, .discover-search > i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--link); font-size: .9rem; pointer-events: none; z-index: 2; }
.home-search .ks-search-input, .search-bar .ks-search-input, .discover-search .ks-search-input { padding-left: 46px; padding-right: 16px; border-radius: var(--r-pill); background: var(--surface); border-color: var(--line); font-size: .92rem; min-height: 52px; }
.home-search .ks-search-input:focus, .search-bar .ks-search-input:focus, .discover-search .ks-search-input:focus { border-color: var(--green-500); }
.home-search .search-dropdown, .home-search > .search-dropdown { z-index: 70 !important; }
@media (max-width: 800px) { .home-header { flex-direction: column; align-items: stretch; gap: 10px; } .home-loc-pill { max-width: 100%; justify-content: center; } }

/* ── Categories ────────────────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 60px; }
.cat-grid-item { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 16px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); cursor: pointer; text-align: center; position: relative; overflow: hidden; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.cat-grid-item::before { content: ""; position: absolute; inset: 0; background: var(--bg-accent, var(--brand-soft)); opacity: 0; transition: opacity var(--t-base) var(--ease); pointer-events: none; }
.cat-grid-item > * { position: relative; z-index: 1; }
.cat-grid-item:hover { border-color: var(--brand); }
.cat-grid-item:hover::before { opacity: 1; }
.cat-grid-item.selected { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.cat-grid-item.selected::before { opacity: 0; }
.cat-grid-item.selected .cat-name { color: var(--btn-fg); }
.cat-grid-item.selected .cat-count { color: var(--btn-fg); opacity: .75; }
.cat-grid-item .cat-icon { width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-xl); background: var(--bg-accent, var(--brand-soft)); font-size: 1.9rem; transition: transform var(--t-base) var(--ease-spring); overflow: hidden; padding: 0; }
.cat-grid-item .cat-icon img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; aspect-ratio: 1 / 1; }
.cat-grid-item:hover .cat-icon { transform: scale(1.06) rotate(-3deg); }
.cat-grid-item.selected .cat-icon { background: rgba(255,255,255,.16); }
[data-theme="dark"] .cat-grid-item.selected .cat-icon { background: rgba(6,21,9,.14); }
.cat-grid-item .cat-name { font-size: .95rem; font-weight: 800; color: var(--text-strong); margin-top: 2px; }
.cat-grid-item .cat-count { font-size: .78rem; color: var(--text-muted); margin-top: -6px; font-weight: 600; }
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 40px; }
  .cat-grid-item { padding: 16px 8px 14px; border-radius: var(--r-lg); gap: 8px; }
  .cat-grid-item .cat-icon { width: 54px; height: 54px; font-size: 1.5rem; border-radius: var(--r-lg); }
  .cat-grid-item .cat-name { font-size: .82rem; } .cat-grid-item .cat-count { font-size: .7rem; }
}
@media (max-width: 380px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Promo banners ─────────────────────────────────────────── */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; margin-bottom: 60px; }
.promo-card { position: relative; padding: 28px 26px; border-radius: var(--r-2xl); overflow: hidden; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; }
.promo-card .promo-tag { display: inline-flex; align-items: center; gap: 4px; padding: 6px 13px; background: var(--brand); color: var(--green-950); border-radius: var(--r-pill); font-size: .76rem; font-weight: 800; width: fit-content; position: relative; z-index: 1; }
.promo-card h3 { font-size: 1.45rem; margin: 14px 0 6px; color: #fff; position: relative; z-index: 1; letter-spacing: -.03em; }
.promo-card p { font-size: .9rem; position: relative; z-index: 1; color: rgba(255,255,255,.88); }
.promo-card .promo-emoji { position: absolute; right: 18px; bottom: 18px; font-size: 3.4rem; z-index: 1; }
.promo-card .promo-img { position: absolute; right: 16px; bottom: 16px; width: 108px; height: 108px; border-radius: var(--r-xl); overflow: hidden; z-index: 1; transform: rotate(4deg); box-shadow: var(--shadow-md); border: 3px solid rgba(255,255,255,.55); background: rgba(255,255,255,.15); }
.promo-card .promo-img img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 1 / 1; }
.promo-card > div:first-child { position: relative; z-index: 2; max-width: calc(100% - 132px); }
.promo-card.promo-green  { background: var(--green-900); }
.promo-card.promo-orange { background: var(--green-700); }
.promo-card.promo-purple { background: var(--green-800); }
.promo-card.promo-blue   { background: var(--green-600); }
.promo-card.promo-pink   { background: var(--lemon-300); color: var(--green-950); }
.promo-card.promo-pink p { color: rgba(10,36,23,.85); } .promo-card.promo-pink h3 { color: var(--green-950); }
.promo-card.promo-pink .promo-tag { background: var(--green-900); color: var(--lemon-300); }
@media (max-width: 600px) {
  .promo-grid { margin-bottom: 40px; gap: 14px; }
  .promo-card .promo-img { width: 78px; height: 78px; border-radius: var(--r-lg); right: 12px; bottom: 12px; }
  .promo-card > div:first-child { max-width: calc(100% - 96px); }
  .promo-card { padding: 22px 18px; min-height: 170px; }
  .promo-card h3 { font-size: 1.2rem; }
}

/* ── Section titles & carousels ────────────────────────────── */
.hf-section-title { display: flex; align-items: center; justify-content: space-between; margin: 56px 4px 22px; gap: 12px; }
.hf-section-title h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.hf-section-title .meta-text { font-size: .84rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
.hf-section-title a { font-size: .88rem; font-weight: 700; color: var(--link); display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid transparent; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.hf-section-title a:hover { background: var(--brand-soft); border-color: var(--brand); }
.hf-carousel { display: flex; gap: 16px; overflow-x: auto; margin: 0 -16px; padding: 8px 16px 26px; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.hf-carousel::-webkit-scrollbar { display: none; }
.hf-carousel > * { scroll-snap-align: start; }
@media (max-width: 800px) { .hf-section-title { margin: 40px 2px 16px; } .hf-carousel { gap: 14px; padding-bottom: 24px; } }

.feat-card, .rec-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; position: relative; transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.feat-card { flex: 0 0 275px; display: block; color: inherit; }
.rec-card { flex: 0 0 195px; }
.feat-card:hover, .rec-card:hover { border-color: var(--brand); box-shadow: var(--shadow-card-hover); }
.fc-cover, .rc-cover { position: relative; width: 100%; background: var(--lemon-100); overflow: hidden; }
.fc-cover { aspect-ratio: 16 / 11; } .rc-cover { aspect-ratio: 1 / 1; }
[data-theme="dark"] .fc-cover, [data-theme="dark"] .rc-cover { background: var(--surface-2); }
.fc-cover img, .rc-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.feat-card:hover .fc-cover img, .rec-card:hover .rc-cover img { transform: scale(1.05); }
.fc-emoji, .rc-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3.4rem; }
.fc-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.fc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 800; background: var(--surface); color: var(--text-strong); }
.fc-badge-new { background: var(--brand); color: var(--green-950); }
.fc-badge-closed { background: var(--danger); color: #fff; }
.fc-badge-rating .star { color: var(--warn); }
.fc-body { padding: 14px 16px 18px; }
.fc-body h4 { font-size: 1.05rem; margin-bottom: 6px; letter-spacing: -.02em; }
.fc-meta { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--text-muted); font-weight: 500; }
.fc-meta .dot-sep { width: 3px; height: 3px; background: var(--text-dim); border-radius: 50%; }
.fc-meta .rating { color: var(--warn); font-weight: 800; }
.fc-cat, .rc-cat { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.save-heart { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; background: var(--surface); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 1rem; z-index: 2; border: 1px solid var(--line); transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.save-heart:hover { color: var(--danger); border-color: var(--danger); transform: scale(1.08); }
.save-heart.saved { color: var(--danger); }
.rc-body { padding: 12px 14px 14px; } .rc-body h4 { font-size: .94rem; margin-bottom: 2px; font-weight: 800; }
@media (max-width: 480px) { .feat-card { flex-basis: 252px; } .rec-card { flex-basis: 176px; } }

/* ── Feature / step / testimonial / stats ──────────────────── */
.features-grid, .steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 60px; }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; margin-bottom: 60px; }
.feature-card, .step-card, .testimonial-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); transition: border-color var(--t-base) var(--ease); }
.feature-card:hover, .step-card:hover, .testimonial-card:hover { border-color: var(--brand); }
.feature-card { padding: 26px 22px; }
.feat-icon { width: 56px; height: 56px; border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 14px; background: var(--brand-soft); }
.feature-card h4 { font-size: 1.08rem; margin-bottom: 6px; }
.feature-card p, .step-card p { color: var(--text-muted); font-size: .9rem; line-height: 1.55; }
.step-card { text-align: center; padding: 34px 22px 26px; position: relative; }
.step-card .step-num { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 38px; height: 38px; background: var(--brand); color: var(--green-950); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; border: 4px solid var(--bg); }
.step-card .step-emoji { font-size: 2.6rem; margin-bottom: 12px; display: block; }
.step-card h4 { margin-bottom: 6px; }
.testimonial-card { padding: 24px; position: relative; }
.testimonial-card .stars { color: var(--warn); margin-bottom: 12px; font-size: .95rem; letter-spacing: 2px; }
.testimonial-card p { font-size: .96rem; line-height: 1.6; color: var(--text); margin-bottom: 16px; }
.testimonial-user { display: flex; align-items: center; gap: 10px; }
.testimonial-user .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--green-700); color: var(--lemon-300); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; }
.testimonial-user .name { font-weight: 800; color: var(--text-strong); font-size: .9rem; }
.testimonial-user .role { font-size: .78rem; color: var(--text-muted); font-weight: 500; }

.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl); margin-bottom: 60px; }
.stat-tile { text-align: center; padding: 12px; position: relative; }
.stat-tile:not(:last-child)::after { content: ""; position: absolute; right: -7px; top: 20%; bottom: 20%; width: 1px; background: var(--line); }
.stat-tile .stat-icon { width: 52px; height: 52px; border-radius: var(--r-lg); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 12px; background: var(--brand-soft); }
.stat-tile .stat-value { font-family: var(--f-disp); font-size: 1.95rem; font-weight: 800; color: var(--text-strong); line-height: 1; letter-spacing: -.03em; }
.stat-tile .stat-text { font-size: .85rem; color: var(--text-muted); margin-top: 5px; font-weight: 600; }

.cta-banner { padding: 56px 32px; border-radius: var(--r-3xl); text-align: center; margin-top: 56px; }
.cta-banner h2 { color: #fff; font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 12px; }
.cta-banner p { color: var(--on-deep-mut); margin-bottom: 26px; font-size: 1.02rem; max-width: 500px; margin-inline: auto; }
.cta-banner .btn { background: var(--brand); color: var(--green-950); width: auto; padding: 16px 34px; display: inline-flex; }
.cta-banner .btn:hover { background: var(--lemon-400); }

.app-cta { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 36px; padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl); margin-bottom: 60px; overflow: hidden; position: relative; }
@media (max-width: 800px) { .app-cta { grid-template-columns: 1fr; padding: 28px; } }
.app-cta-text h2 { margin-bottom: 8px; } .app-cta-text p { color: var(--text-muted); margin-bottom: 20px; }
.app-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.app-cta-actions .store-btn, .store-badge { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--green-900); color: var(--lemon-300); border-radius: var(--r-md); font-weight: 700; font-size: .9rem; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.app-cta-actions .store-btn:hover, .store-badge:hover { background: var(--green-800); color: var(--lemon-200); }
.app-cta-actions .store-btn small, .store-badge small { display: block; font-size: .7rem; font-weight: 500; opacity: .8; }
.store-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.store-badge .ss-name { display: block; font-size: .9rem; font-weight: 800; }
.app-cta-visual { display: flex; justify-content: center; align-items: center; }
.phone-mockup { width: 220px; height: 440px; background: var(--green-950); border-radius: 38px; padding: 8px; box-shadow: var(--shadow-xl); position: relative; }
.phone-mockup::before { content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 80px; height: 24px; background: #000; border-radius: 0 0 16px 16px; z-index: 2; }
.phone-screen { width: 100%; height: 100%; background: var(--bg); border-radius: 30px; padding: 32px 16px 16px; overflow: hidden; }
.phone-screen .ph-search { height: 32px; border-radius: 16px; background: var(--surface-2); margin-bottom: 14px; border: 1px solid var(--line); }
.phone-screen .ph-card { height: 80px; border-radius: var(--r-md); background: var(--lemon-100); margin-bottom: 10px; border: 1px solid var(--line); position: relative; }
[data-theme="dark"] .phone-screen .ph-card { background: var(--surface-2); }

.image-showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 60px; align-items: stretch; }
.showcase-tile { position: relative; background: var(--panel-deep); border-radius: var(--r-2xl); overflow: hidden; padding: 12px; transition: background var(--t-fast) var(--ease); }
.showcase-tile:hover { background: var(--panel-deep-2); }
.showcase-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: calc(var(--r-2xl) - 10px); display: block; transition: transform .5s var(--ease); }
.showcase-tile:hover img { transform: scale(1.03); }
.showcase-tile .showcase-caption { position: absolute; bottom: 20px; left: 20px; background: var(--brand); color: var(--green-950); padding: 10px 15px; border-radius: var(--r-md); font-weight: 800; font-size: .85rem; display: inline-flex; align-items: center; gap: 8px; max-width: max-content; }
@media (max-width: 700px) { .image-showcase { grid-template-columns: 1fr; margin-bottom: 40px; } .showcase-tile img { aspect-ratio: 16 / 10; } }

.feature-wall { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 60px; }
@media (max-width: 800px) { .feature-wall { grid-template-columns: 1fr; margin-bottom: 40px; } }
.fw-main { padding: 38px; border-radius: var(--r-2xl); }
.fw-main h2 { color: #fff; margin-bottom: 10px; } .fw-main p { color: var(--on-deep-mut); margin-bottom: 18px; }
.fw-main .fw-cta { background: var(--brand); color: var(--green-950); width: auto; }
.fw-main .fw-cta:hover { background: var(--lemon-400); }
.fw-side { display: grid; gap: 16px; }
.fw-side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; transition: border-color var(--t-base) var(--ease); }
.fw-side-card:hover { border-color: var(--brand); }
.fw-side-card .fwsc-icon { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--brand-soft); color: var(--link); display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 10px; }
.fw-side-card h4 { font-size: 1rem; margin-bottom: 4px; } .fw-side-card p { color: var(--text-muted); font-size: .86rem; }

.prime-backdrop { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(4px); z-index: 1400; opacity: 0; visibility: hidden; transition: opacity var(--t-base) var(--ease), visibility var(--t-base) var(--ease); }
.prime-backdrop.show { opacity: 1; visibility: visible; }
.prime-sheet { position: fixed; left: 50%; top: 50%; transform: translate(-50%, calc(-50% + 20px)); width: 90%; max-width: 390px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl); padding: 32px 28px; text-align: center; box-shadow: var(--shadow-xl); z-index: 1450; opacity: 0; visibility: hidden; transition: all var(--t-base) var(--ease-spring); }
.prime-sheet.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.ps-illustration { font-size: 3.5rem; margin-bottom: 14px; }
.ps-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 6px; color: var(--text-strong); font-family: var(--f-disp); }
.ps-sub { color: var(--text-muted); font-size: .92rem; margin-bottom: 22px; line-height: 1.5; }
.ps-actions { display: flex; flex-direction: column; gap: 10px; } .ps-actions .btn { width: 100%; }
.ps-dismiss { display: block; margin: 14px auto 0; font-size: .88rem; font-weight: 700; color: var(--text-muted); padding: 8px 16px; border-radius: var(--r-pill); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.ps-dismiss:hover { background: var(--surface-2); color: var(--text-strong); }
.landing-footer { margin-top: 56px; padding: 32px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl); text-align: center; }
.landing-footer h3 { margin-bottom: 8px; } .landing-footer p { color: var(--text-muted); margin-bottom: 18px; }

@media (max-width: 800px) {
  .home-feed { padding-bottom: 90px; }
  .features-grid, .steps-grid, .testimonial-grid { gap: 14px; margin-bottom: 40px; }
  .promo-card h3, .promo-card p { max-width: 76%; }
  .fw-main { padding: 28px 24px; } .stats-strip { gap: 6px; margin-bottom: 40px; }
  .cta-banner { margin-top: 36px; padding: 40px 22px; } .landing-footer { margin-top: 40px; padding: 28px 20px; }
}
@media (max-width: 480px) { .stats-strip { grid-template-columns: 1fr 1fr; padding: 18px; } .stat-tile:not(:last-child)::after { display: none; } .feature-card { padding: 20px 18px; } .step-card { padding: 28px 18px 22px; } }

/* ============================================================
   USER PAGES — dashboard, discover, merchant, orders, wallet, flows
   ============================================================ */

/* ── Shared card surface ───────────────────────────────────── */
.stat-card, .qa-card, .merchant-tile, .merchant-card, .merchant-browse-card, .item-feed-card, .order-card, .order-row,
.tracking-card, .order-summary, .flow-card, .settings-card, .notif-card, .tx-list, .list-card, .card, .kpi-card, .a-card,
.zone-card, .zone-run-card, .chart-card, .rider-card, .point-card, .item-card, .menu-item, .step-indicator, .order-timeline,
.summary-strip, .merchant-card-detail, .merchant-profile-card, .page-hero, .admin-stat, .auth-card, .option-card, .gift-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
}
.qa-card, .merchant-tile, .merchant-card, .merchant-browse-card, .order-card, .list-card, .kpi-card, .zone-card, .zone-run-card, .menu-item, .settings-item, .gift-card {
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-fast) var(--ease);
}
.qa-card:hover, .merchant-tile:hover, .merchant-card:hover, .merchant-browse-card:hover, .order-card:hover, .list-card:hover,
.kpi-card:hover, .zone-run-card:hover, .menu-item:hover, .order-row:hover, .gift-card:hover { border-color: var(--brand); }
.merchant-card:hover, .merchant-browse-card:hover { box-shadow: var(--shadow-card-hover); }
a.qa-card, a.merchant-tile, a.merchant-card, a.list-card, a.order-card, a.kpi-card, a.merchant-browse-card, a.item-feed-card { color: inherit; text-decoration: none; }

.page-hero { border-radius: var(--r-2xl); padding: 24px 26px; margin-bottom: 18px; }
.page-hero h1 { font-size: clamp(1.4rem, 3.4vw, 1.75rem); margin-bottom: 4px; }
.page-hero p { color: var(--text-muted); font-size: .95rem; }
.page-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 16px; gap: 16px; }
.page-h h1 { font-size: 1.6rem; } .page-h p { color: var(--text-muted); font-size: .92rem; }
.section { padding-block: 18px; } .section-h { display: flex; justify-content: space-between; align-items: center; }
.card { padding: 20px; margin-bottom: 14px; }
.card h3 { margin-bottom: 12px; font-size: 1.05rem; }
.card.flat { background: var(--surface-2); }
.card.glow { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.empty-state { text-align: center; padding: 48px 24px; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--r-2xl); }
.empty-state .es-icon, .discover-empty-panel .es-icon { width: 68px; height: 68px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 1.9rem; background: var(--brand-soft); border-radius: var(--r-xl); }
.empty-state h3 { font-size: 1.15rem; margin-bottom: 6px; } .empty-state p { color: var(--text-muted); font-size: .92rem; }

/* ── Dashboard ─────────────────────────────────────────────── */
.dash-greeting { padding: 26px 4px 10px; }
.dash-greeting h1 { font-size: clamp(1.7rem, 4.4vw, 2.4rem); margin-bottom: 6px; }
.dash-greeting p { color: var(--text-muted); }
.dash-banner { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: var(--r-2xl); margin-bottom: 24px; }
.dash-banner .db-emoji { font-size: 2.2rem; background: var(--brand); color: var(--green-950); width: 58px; height: 58px; border-radius: var(--r-lg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-banner .db-text { flex: 1; }
.dash-banner h3 { margin-bottom: 4px; font-size: 1.15rem; color: #fff; }
.dash-banner p { color: var(--on-deep-mut); font-size: .92rem; }
.search-bar { position: relative; z-index: 60; isolation: isolate; margin-bottom: 24px; }
.search-bar:focus-within { z-index: 70; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin-bottom: 24px; }
.stat-card { padding: 18px 20px; position: relative; overflow: hidden; transition: border-color var(--t-fast) var(--ease); }
.stat-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--green-600); }
.stat-card.brand::before { background: var(--brand); } .stat-card.warn::before { background: var(--warn); }
.stat-card:hover { border-color: var(--brand); }
.stat-card .stat-label { font-size: .82rem; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.stat-card .stat-value { font-family: var(--f-disp); font-size: 1.75rem; font-weight: 800; color: var(--text-strong); letter-spacing: -.03em; overflow-wrap: anywhere; word-break: break-word; }
.stat-card .stat-value.brand { color: var(--link); } .stat-card .stat-value.warn { color: var(--warn); }
.live-order-card { display: block; padding: 20px 22px; color: #fff; border-radius: var(--r-xl); margin-bottom: 24px; }
.live-order-card::after { width: 130px; height: 130px; right: -20px; top: -20px; }
.live-order-card .live-order-title { color: #fff; } .live-order-card .live-order-meta { color: var(--lemon-200); opacity: .95; } .live-order-card .live-order-arrow { color: #fff; }
.live-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; background: var(--brand); color: var(--green-950); border-radius: var(--r-pill); font-size: .7rem; font-weight: 800; animation: pulse 1.6s ease-in-out infinite; }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
.qa-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.qa-icon { width: 50px; height: 50px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.qa-icon.green { background: var(--brand-soft); } .qa-icon.teal { background: var(--teal-soft); } .qa-icon.pink { background: var(--pink-soft); }
.qa-icon.purple { background: var(--purple-soft); } .qa-icon.orange { background: var(--accent-light); } .qa-icon.blue { background: var(--info-soft); }
.qa-card h4 { font-size: .96rem; margin-bottom: 2px; } .qa-card small { color: var(--text-muted); font-size: .8rem; font-weight: 500; }
.merchant-tile { border-radius: var(--r-lg); overflow: hidden; display: block; }
.merchant-tile img { transition: transform .4s var(--ease); } .merchant-tile:hover img { transform: scale(1.05); }
.mt-emoji { width: 100%; aspect-ratio: 16/10; background: var(--lemon-100); display: flex; align-items: center; justify-content: center; font-size: 3rem; border-bottom: 1px solid var(--line); }
[data-theme="dark"] .mt-emoji { background: var(--surface-2); }
.merchant-tile h4 { padding: 12px 14px 2px; font-size: .94rem; } .merchant-tile small { padding: 0 14px 14px; display: block; color: var(--text-muted); font-size: .8rem; }
.merchant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
@media (max-width: 600px) { .quick-actions { grid-template-columns: repeat(2, 1fr); gap: 8px; } .qa-card { padding: 14px; gap: 12px; } .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .stat-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } .stat-card { padding: 14px; } .stat-card .stat-value { font-size: clamp(1.05rem, 5vw, 1.4rem); } }

/* ── Discover ──────────────────────────────────────────────── */
.discover-header { background: var(--bg); padding: 18px 0 14px; margin-bottom: 8px; }
.discover-search { position: relative; margin-bottom: 14px; }
.sticky-filter-bar { position: sticky; top: var(--nav-h); z-index: 30; margin: 0 -16px 14px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line-soft); }
@media (min-width: 901px) { .sticky-filter-bar { margin-inline: -24px; padding-inline: 24px; } }
.sticky-filter-bar > .discover-tabs, .sticky-filter-bar > .filter-row { margin: 0; padding: 2px; }
.sticky-filter-bar::after { content: "←  Slide to see more  →"; display: block; text-align: center; padding-top: 8px; font-size: .7rem; font-weight: 700; color: var(--text-dim); animation: hintNudge 2.4s ease-in-out infinite; }
@keyframes hintNudge { 0%, 100% { transform: translateX(-3px); opacity: .7; } 50% { transform: translateX(3px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sticky-filter-bar::after { animation: none; } }
@media (min-width: 901px) { .sticky-filter-bar::after { display: none; } }

.discover-tabs, .filter-row { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px; scrollbar-width: none; scroll-snap-type: x proximity; min-width: 0; }
.filter-row { margin-bottom: 18px; padding-bottom: 8px; }
@media (min-width: 901px) { .discover-tabs, .filter-row { margin-inline: -24px; padding-inline: 24px; } }
.discover-tabs::-webkit-scrollbar, .filter-row::-webkit-scrollbar { display: none; }
.discover-tab, .filter-pill, .menu-cat-btn, .chip, .pay-method {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; min-height: 42px; flex-shrink: 0; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: .86rem; font-weight: 700; color: var(--text); white-space: nowrap; cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.discover-tab:hover, .filter-pill:hover, .menu-cat-btn:hover, .chip:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--link); }
.discover-tab.active, .filter-pill.active, .menu-cat-btn.active, .chip.active, .pay-method.active { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.chip { padding: 6px 13px; min-height: 0; font-size: .8rem; color: var(--text-muted); background: var(--surface-2); }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-method { border-radius: var(--r-md); background: var(--surface-2); color: var(--text-muted); font-size: .88rem; }

/* Inline search results — normal flow, never overlays */
.discover-results-panel { margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.sr-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-soft); }
.sr-title { flex: 1; min-width: 0; font-size: .84rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-count { min-width: 26px; height: 26px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-pill); background: var(--brand); color: var(--green-950); font-size: .74rem; font-weight: 800; flex-shrink: 0; }
.sr-close { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text-muted); font-size: 1.1rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.sr-close:hover { color: var(--danger); border-color: var(--danger); }
.sr-list { max-height: 480px; overflow-y: auto; overscroll-behavior: contain; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.sr-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border: 1px solid transparent; border-radius: var(--r-lg); transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.sr-item:hover { background: var(--brand-soft); border-color: var(--brand); }
.sr-thumb { width: 52px; min-width: 52px; height: 52px; border-radius: var(--r-md); background: var(--lemon-100); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; overflow: hidden; }
[data-theme="dark"] .sr-thumb { background: var(--surface-2); }
.sr-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sr-name { display: block; font-weight: 800; color: var(--text-strong); font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-vendor-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sr-vendor { flex: 1; min-width: 0; display: block; font-size: .8rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-follow { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--brand-soft); border: 1px solid var(--brand); color: var(--link); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.sr-heart { font-size: .7rem; }
.sr-price { display: block; margin-top: 5px; font-weight: 800; color: var(--text-strong); font-size: .92rem; }
.sr-go { flex-shrink: 0; margin-top: 8px; color: var(--text-dim); font-size: .7rem; transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.sr-item:hover .sr-go { color: var(--link); transform: translateX(3px); }
.sr-foot { padding: 10px 14px; background: var(--surface-2); border-top: 1px solid var(--line-soft); font-size: .74rem; font-weight: 600; color: var(--text-dim); text-align: center; }
.discover-empty-panel { margin: 0 0 18px; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--r-xl); text-align: center; padding: 34px 20px; }
.discover-empty-panel h3 { font-size: 1.08rem; margin-bottom: 4px; } .discover-empty-panel p { color: var(--text-muted); font-size: .88rem; margin: 0 0 14px; }
.sr-clear-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px; min-height: 44px; border-radius: var(--r-pill); background: var(--btn-bg); color: var(--btn-fg); font-size: .86rem; font-weight: 800; }
.sr-clear-btn:hover { background: var(--btn-bg-hover); }
@media (max-width: 600px) { .sr-list { max-height: 60vh; } .sr-thumb { width: 46px; min-width: 46px; height: 46px; font-size: 1.3rem; } .sr-name { font-size: .88rem; } }

/* ── Item feed (photo-first cards) ─────────────────────────── */
.item-feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 32px; }
.item-feed-card { border-radius: var(--r-xl); overflow: hidden; display: flex; flex-direction: column; transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-fast) var(--ease); }
.item-feed-card:hover { border-color: var(--brand); box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.ifc-photo, .live-item-card .ifc-photo { position: relative; aspect-ratio: 4 / 3; background: var(--lemon-100); overflow: hidden; }
.live-item-card .ifc-photo { aspect-ratio: 3 / 2; }
[data-theme="dark"] .ifc-photo { background: var(--surface-2); }
.ifc-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.item-feed-card:hover .ifc-photo img { transform: scale(1.05); }
.ifc-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3.1rem; }
.ifc-closed-badge, .ifc-live-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; background: var(--danger); color: #fff; border-radius: var(--r-pill); font-size: .7rem; font-weight: 800; }
.ifc-closed-badge { background: rgba(10,36,23,.78); }
.ifc-live-badge .mk-dot { width: .5em; height: .5em; background: #fff; margin-right: 0; box-shadow: 0 0 0 0 rgba(255,255,255,.45); animation: mk-pulse 1.8s ease-out infinite; }
.ifc-timer-badge { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; background: var(--green-900); color: var(--lemon-300); border-radius: var(--r-pill); font-size: .7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ifc-timer-badge.is-soon { background: var(--danger); color: #fff; }
.ifc-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.ifc-name { font-size: .97rem; font-weight: 800; color: var(--text-strong); margin-bottom: 4px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--f-body); letter-spacing: -.015em; }
.ifc-desc { font-size: .8rem; color: var(--text-muted); line-height: 1.35; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ifc-merchant { display: flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ifc-merchant-icon { font-size: .85rem; flex-shrink: 0; }
.ifc-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.ifc-price { font-weight: 800; font-size: 1.08rem; color: var(--text-strong); font-family: var(--f-disp); letter-spacing: -.02em; }
.ifc-add { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--brand); color: var(--green-950); border-radius: 50%; font-size: .9rem; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.item-feed-card:hover .ifc-add, .ifc-add:hover { background: var(--lemon-400); transform: scale(1.08); }
.ifc-add:active { transform: scale(.92); }
.ifc-stock { font-size: .74rem; color: var(--warn); font-weight: 700; }
.ifc-follow { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; color: var(--text-muted); font-size: .88rem; flex-shrink: 0; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.ifc-follow:hover, .ifc-follow.following { color: var(--danger); border-color: var(--danger); }
.ifc-follow.following { background: var(--danger-soft); }
@media (max-width: 600px) { .item-feed-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .ifc-body { padding: 10px 12px 12px; } .ifc-name { font-size: .88rem; } .ifc-price { font-size: .96rem; } .ifc-add { width: 36px; height: 36px; } }
@media (max-width: 380px) { .item-feed-grid { grid-template-columns: 1fr; } }

/* Merchant browse grid (discover) */
.merchant-browse-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0 4px; }
.merchant-browse-card { display: flex; flex-direction: column; border-radius: var(--r-xl); overflow: hidden; }
.mbc-photo { position: relative; width: 100%; aspect-ratio: 4/3; background: var(--lemon-100); display: flex; align-items: center; justify-content: center; overflow: hidden; }
[data-theme="dark"] .mbc-photo { background: var(--surface-2); }
.mbc-photo img { width: 100%; height: 100%; object-fit: cover; }
.mbc-emoji { font-size: 2.6rem; }
.mbc-open, .mbc-closed, .mbc-new { position: absolute; top: 10px; font-size: .68rem; font-weight: 800; padding: 4px 10px; border-radius: var(--r-pill); }
.mbc-open { left: 10px; background: var(--brand); color: var(--green-950); }
.mbc-closed { left: 10px; background: rgba(10,36,23,.78); color: #fff; }
.mbc-new { right: 10px; background: var(--surface); color: var(--link); }
.mbc-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mbc-name { font-size: .95rem; font-weight: 800; color: var(--text-strong); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--f-body); letter-spacing: -.015em; }
.mbc-meta { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--text-muted); }
.mbc-cat { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mbc-rating { white-space: nowrap; font-weight: 700; color: var(--text-strong); }
.mbc-actions { margin-top: 8px; }
.mbc-follow { width: 100%; min-height: 38px; padding: 7px 0; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: var(--surface); font-size: .78rem; font-weight: 800; color: var(--text-strong); transition: all var(--t-fast) var(--ease); }
.mbc-follow:hover { border-color: var(--brand); color: var(--link); }
.mbc-follow.following { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
@media (max-width: 1000px) { .merchant-browse-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .merchant-browse-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* Merchant cards (following page) & follow controls */
.discover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; margin-bottom: 32px; }
.merchant-card { display: flex; flex-direction: column; overflow: hidden; }
.mc-cover { position: relative; aspect-ratio: 16 / 11; background: var(--lemon-100); overflow: hidden; border-bottom: 1px solid var(--line); }
[data-theme="dark"] .mc-cover { background: var(--surface-2); }
.mc-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.merchant-card:hover .mc-cover img { transform: scale(1.05); }
.mc-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 4rem; }
.mc-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: space-between; }
.mc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: var(--r-pill); font-size: .74rem; font-weight: 800; background: var(--surface); color: var(--text-strong); }
.mc-badge-new, .mc-badge-open { background: var(--brand); color: var(--green-950); } .mc-badge-closed { background: var(--danger); color: #fff; }
.mc-badge-rating .star { color: var(--warn); }
.mc-fav { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: .95rem; border: 1px solid var(--line); cursor: pointer; transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.mc-fav:hover, .mc-fav.saved { color: var(--success); border-color: var(--success); }
.mc-body .follow-btn { position: static; align-self: flex-start; margin: 10px 0 0; }
.mc-fav.follow-btn { width: auto; min-height: 38px; padding: 7px 15px; border-radius: var(--r-pill); gap: 6px; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.mc-fav.follow-btn .mc-fav-ico { font-size: .85rem; line-height: 1; } .mc-fav.follow-btn .mc-fav-label { line-height: 1; }
.mc-fav.follow-btn.saved { background: var(--success-soft); }
.mc-fav.follow-btn.saved:hover { background: var(--success); color: #fff; }
.mc-fav.follow-btn:disabled { opacity: .7; cursor: wait; } .mc-fav.follow-btn:active { transform: scale(.96); }
.follow-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 12px; padding: 10px 16px; border-radius: var(--r-pill); border: 1px solid var(--success); background: var(--success-soft); color: var(--success); font-size: .86rem; font-weight: 800; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.follow-pill:hover { background: var(--success); color: #fff; } .follow-pill:active { transform: scale(.98); } .follow-pill:disabled { opacity: .7; cursor: wait; }
[data-theme="dark"] .mc-fav.follow-btn.saved, [data-theme="dark"] .follow-pill { color: var(--lemon-400); border-color: var(--lemon-400); }
.mc-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.mc-body h4 { font-size: 1.08rem; margin-bottom: 4px; } .mc-cat { font-size: .84rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 600; }
.mc-meta { display: flex; align-items: center; gap: 12px; font-size: .84rem; color: var(--text-muted); margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.mc-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; } .mc-meta i { font-size: .75rem; color: var(--link); }
.mc-meta .dot { width: 3px; height: 3px; background: var(--text-dim); border-radius: 50%; margin: 0; box-shadow: none; }
.mc-delivery { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--text-muted); display: flex; align-items: center; justify-content: space-between; }
.mc-delivery strong { color: var(--text-strong); font-weight: 800; }

/* ── Merchant detail & menu ────────────────────────────────── */
.merchant-card-detail { position: relative; border-radius: var(--r-2xl); padding: 24px; margin-bottom: 24px; }
.merchant-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.merchant-logo { width: 92px; height: 92px; border-radius: var(--r-xl); background: var(--lemon-100); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; flex-shrink: 0; border: 1px solid var(--line); overflow: hidden; }
[data-theme="dark"] .merchant-logo { background: var(--surface-2); }
.merchant-logo img { width: 100%; height: 100%; object-fit: cover; }
.merchant-meta { flex: 1; } .merchant-meta h1 { font-size: 1.6rem; margin-bottom: 4px; }
.merchant-meta .mc-line { font-size: .9rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.merchant-meta .rating-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; background: var(--brand-soft); color: var(--link); border-radius: var(--r-pill); font-size: .8rem; font-weight: 800; border: 1px solid var(--brand); }
.merchant-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.merchant-info-item .label { font-size: .78rem; color: var(--text-muted); font-weight: 700; }
.merchant-info-item .value { font-size: 1.02rem; font-weight: 800; color: var(--text-strong); margin-top: 2px; }
.merchant-cover { display: none; }
.menu-categories { display: flex; gap: 8px; overflow-x: auto; margin: 0 -24px 18px; padding: 0 24px; scrollbar-width: none; }
.menu-categories::-webkit-scrollbar { display: none; }
.menu-cat-btn { min-height: 40px; padding: 8px 16px; background: var(--surface-2); color: var(--text-muted); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.menu-item { display: flex; gap: 14px; padding: 14px; border-radius: var(--r-lg); }
.menu-item-info { flex: 1; min-width: 0; } .menu-item-info h4 { font-size: 1rem; margin-bottom: 4px; font-family: var(--f-body); letter-spacing: -.015em; }
.menu-item-info .desc { font-size: .83rem; color: var(--text-muted); line-height: 1.45; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item-info .price, .menu-item .price { font-weight: 800; color: var(--text-strong); font-size: 1.02rem; font-family: var(--f-disp); }
.menu-item.unavailable, .item-card.unavailable { opacity: .55; }
.menu-item-img { width: 100px; height: 100px; border-radius: var(--r-md); background: var(--lemon-100); flex-shrink: 0; position: relative; border: 1px solid var(--line); }
[data-theme="dark"] .menu-item-img { background: var(--surface-2); }
.menu-item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.menu-item-img .add-btn { position: absolute; right: -8px; bottom: -8px; width: 40px; height: 40px; background: var(--brand); color: var(--green-950); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700; border: 3px solid var(--surface); box-shadow: var(--shadow-sm); transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.menu-item-img .add-btn:hover { background: var(--lemon-400); transform: scale(1.1); } .menu-item-img .add-btn:active { transform: scale(.94); }
.item-card { display: flex; gap: 14px; padding: 14px; border-radius: var(--r-lg); margin-bottom: 10px; align-items: center; }
.item-card .item-photo { width: 76px; height: 76px; border-radius: var(--r-md); background: var(--lemon-100); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; border: 1px solid var(--line); }
[data-theme="dark"] .item-card .item-photo { background: var(--surface-2); }
.item-card .item-photo img { width: 100%; height: 100%; object-fit: cover; } .item-card .item-photo i { color: var(--text-muted); font-size: 1.4rem; }
.item-card .item-info { flex: 1; min-width: 0; } .item-card .item-info h4 { font-size: 1rem; margin-bottom: 4px; }
.item-card .item-info p { font-size: .83rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 6px; }
.item-card .item-price { font-weight: 800; color: var(--text-strong); font-size: 1.02rem; } .item-card .item-actions { flex-shrink: 0; }

/* ── Orders & tracking ─────────────────────────────────────── */
.order-card { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 16px; margin-bottom: 12px; align-items: center; }
.order-thumb { width: 76px; height: 76px; border-radius: var(--r-md); background: var(--lemon-100); display: flex; align-items: center; justify-content: center; font-size: 2rem; overflow: hidden; border: 1px solid var(--line); flex-shrink: 0; }
[data-theme="dark"] .order-thumb { background: var(--surface-2); }
.order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-info h4 { font-size: 1rem; margin-bottom: 4px; }
.order-info .meta { display: flex; gap: 8px; font-size: .8rem; color: var(--text-muted); flex-wrap: wrap; }
.order-info .meta .dot, .order-row .or-info .meta .dot, .zone-card .zc-info .sub .dot { width: 3px; height: 3px; background: var(--text-dim); border-radius: 50%; align-self: center; margin: 0; box-shadow: none; }
.order-right { text-align: right; } .order-right .price { font-weight: 800; color: var(--text-strong); font-size: 1.02rem; font-family: var(--f-disp); }
.order-status-pill, .status-pill, .badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: var(--r-pill); font-size: .74rem; font-weight: 800; }
.order-status-pill { margin-top: 6px; }
.os-confirmed { background: var(--info-soft); color: var(--info); } .os-preparing { background: var(--warn-soft); color: var(--warn); }
.os-ready { background: var(--accent-soft); color: var(--accent); } .os-transit { background: var(--purple-soft); color: var(--purple); }
.os-delivered { background: var(--brand-soft); color: var(--link); border: 1px solid var(--brand); } .os-cancelled { background: var(--danger-soft); color: var(--danger); }
.os-refunded { background: var(--surface-3); color: var(--text-muted); }
.status-pill.warn, .badge-warn { background: var(--warn-soft); color: var(--warn); } .status-pill.info, .badge-info { background: var(--info-soft); color: var(--info); }
.status-pill.teal { background: var(--teal-soft); color: var(--teal); } .status-pill.pink { background: var(--pink-soft); color: var(--pink); }
.status-pill.purple, .badge-purple { background: var(--purple-soft); color: var(--purple); } .status-pill.danger, .badge-danger { background: var(--danger-soft); color: var(--danger); }
.status-pill.muted, .badge-neutral { background: var(--surface-3); color: var(--text-muted); }
.status-pill.green, .badge-brand { background: var(--brand-soft); color: var(--link); border: 1px solid var(--brand); }
.badge { letter-spacing: .01em; padding: 3px 10px; font-size: .72rem; }
.amount-pos { color: var(--pos); font-weight: 800; font-family: var(--f-num); } .amount-neg { color: var(--text-strong); font-weight: 800; font-family: var(--f-num); }

.order-detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
@media (max-width: 900px) { .order-detail-grid { grid-template-columns: 1fr; } }
.tracking-card { padding: 24px; margin-bottom: 18px; }
.tracking-timeline { position: relative; padding-left: 26px; }
.tracking-timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 22px; } .timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -26px; top: 3px; width: 22px; height: 22px; background: var(--surface); border: 2px solid var(--line-strong); border-radius: 50%; z-index: 1; }
.timeline-item.active::before { background: var(--green-900); border-color: var(--green-900); box-shadow: 0 0 0 5px var(--brand-soft); }
.timeline-item.done::before { background: var(--green-900); border-color: var(--green-900); }
.timeline-item.done::after { content: "✓"; position: absolute; left: -26px; top: 3px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 900; line-height: 1; z-index: 2; }
.timeline-item .step-time { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.timeline-item h5 { font-size: .96rem; font-weight: 800; margin-bottom: 2px; } .timeline-item p { font-size: .84rem; color: var(--text-muted); }
/* Card-style variant (user/send.php .tx-timeline) uses bordered boxes, not dots — hide the dot pseudos + rail. */
.tx-timeline .tracking-timeline { padding-left: 0; }
.tx-timeline .tracking-timeline::before, .tx-timeline .timeline-item::before, .tx-timeline .timeline-item::after { display: none; }
.order-summary { padding: 22px; position: sticky; top: calc(var(--nav-h) + 16px); }
.order-summary h4 { margin-bottom: 14px; font-size: 1.08rem; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: .92rem; color: var(--text); }
.summary-row.total { font-weight: 800; font-size: 1.12rem; color: var(--text-strong); border-top: 1px dashed var(--line-strong); margin-top: 8px; padding-top: 14px; }
.track-hero { position: relative; height: 290px; background: var(--panel-deep); border-radius: var(--r-2xl); overflow: hidden; margin-bottom: 18px; }
.track-hero .map-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.track-hero .map-pin { width: 58px; height: 58px; background: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--green-950); font-size: 1.4rem; margin-bottom: 12px; animation: float 2s ease-in-out infinite; }
.track-hero .map-text { color: #fff; font-weight: 800; } .track-hero .map-sub { color: var(--on-deep-mut); font-size: .9rem; margin-top: 4px; }
.tracking-map { width: 100%; height: 320px; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
@media (min-width: 640px) { .tracking-map { height: 420px; } }
.leaflet-pane { z-index: 1 !important; }

/* ============================================================
   MAP TOGGLES + MAP MODALS — single source of truth.
   First principle: every Streets/Satellite and Google/Live
   switch is the same segmented control, themed via
   --btn-bg / --btn-fg so light + dark both stay readable.
   Works even when google_maps_bridge.inc.php is NOT included
   (e.g. index, register, account, send, checkout pickers).
   ============================================================ */
.gm-toggle { display: flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; margin: 0; width: 100%; }
.gm-toggle button { flex: 1 1 0; min-width: 0; border: 0; background: transparent; padding: 0 8px; min-height: 44px; border-radius: 10px; font-weight: 800; font-size: .85rem; line-height: 1.2; color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.gm-toggle button:hover { background: var(--surface-3); color: var(--text-strong); }
.gm-toggle button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.gm-toggle button.active, .gm-toggle button[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); box-shadow: var(--shadow-sm); }
.gm-toggle button.active:hover, .gm-toggle button[aria-selected="true"]:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }
@media (max-width: 380px) { .gm-toggle button { font-size: .78rem; min-height: 42px; } }

/* Location-picker modal internals (replaces inline styles) */
.lp-sheet { padding: 0 !important; max-width: 520px; overflow-y: auto; }
.lp-pad { padding: 20px 20px 8px; }
.lp-label { display: block; font-size: .78rem; font-weight: 800; color: var(--text-muted); margin-bottom: 6px; }
.lp-input { width: 100%; background: var(--input); border: 1.5px solid var(--input-border); border-radius: 10px; padding: 12px 14px; color: var(--text-strong); font-size: 14px; }
.lp-input--brand { border-color: var(--brand); }
.lp-input:focus { background: var(--input-focus); border-color: var(--green-500); box-shadow: 0 0 0 4px var(--brand-soft); outline: none; }
.lp-results { display: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; max-height: 230px; overflow-y: auto; }
.lp-chips { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; }
.lp-chip { width: auto; padding: 7px 12px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.lp-details { margin-top: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.lp-details + .lp-details { margin-top: 8px; }
.lp-details summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--text-muted); }
.lp-toggle-row { padding: 4px 20px 8px; display: flex; gap: 6px; }
.lp-map { width: 100%; height: 250px; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); z-index: 1; }
.lp-map .leaflet-container { background: var(--surface-2); font-family: inherit; }
.lp-actions { padding: 10px 20px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.lp-actions .btn { width: auto; flex: 1; min-width: 140px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.lp-foot { padding: 14px 20px 20px; }
.lp-status { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; min-height: 18px; }
.lp-place-row:hover, .lp-result-row:hover { background: var(--surface-2); }

/* Leaflet controls respect light/dark theme */
.leaflet-bar a { background: var(--surface); color: var(--text-strong); border-color: var(--line); }
.leaflet-bar a:hover { background: var(--surface-2); color: var(--link); }
.leaflet-control-layers { background: var(--surface); color: var(--text-strong); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-md); font-size: .8rem; }
.leaflet-control-attribution { background: rgba(255,255,255,.7); font-size: 10px; }
[data-theme="dark"] .leaflet-control-attribution { background: rgba(0,0,0,.55); color: #9aaa9d; }
[data-theme="dark"] .leaflet-control-attribution a { color: #9aaa9d; }
.leaflet-container { z-index: 1; }
.rider-card { display: flex; gap: 14px; padding: 18px; margin-bottom: 18px; align-items: center; }
.rider-avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--green-700); color: var(--lemon-300); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; flex-shrink: 0; }
.rider-info { flex: 1; } .rider-info h4 { font-size: 1.02rem; margin-bottom: 2px; } .rider-info .sub { color: var(--text-muted); font-size: .86rem; font-weight: 500; }
.rider-actions { display: flex; gap: 8px; }
.rider-actions .icon-btn { background: var(--brand-soft); color: var(--link); border-color: var(--brand); }
.rider-actions .icon-btn:hover { background: var(--brand); color: var(--green-950); }
.order-timeline { display: flex; align-items: center; gap: 6px; padding: 14px 18px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.order-timeline::-webkit-scrollbar { display: none; }
.order-timeline .step { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; flex-shrink: 0; scroll-snap-align: start; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--line); border-radius: var(--r-pill); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.order-timeline .step.done { background: var(--brand-soft); color: var(--link); border-color: var(--green-900); }
.order-timeline .step.done::before { content: "✓"; font-weight: 900; color: var(--green-900); }
.order-timeline .step.active { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
.order-timeline .sep { color: var(--text-dim); font-size: .85rem; flex-shrink: 0; }
.stars-row { display: inline-flex; gap: 4px; font-size: 1.7rem; }
.stars-row span { cursor: pointer; color: var(--text-dim); transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.stars-row span:hover { transform: scale(1.15); color: var(--warn); } .stars-row span.filled { color: var(--warn); }
.stars { display: inline-flex; gap: 4px; font-size: 1.4rem; } .stars span { cursor: pointer; }

/* ── Wallet ────────────────────────────────────────────────── */
.wallet-hero { padding: 34px; border-radius: var(--r-2xl); color: #fff; margin-bottom: 24px; }
.wallet-label { font-size: .86rem; opacity: .78; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.wallet-balance { font-family: var(--f-disp); font-size: clamp(2.5rem, 7vw, 3.5rem); font-weight: 800; letter-spacing: -.04em; margin-bottom: 20px; line-height: 1; color: var(--lemon-300); overflow-wrap: anywhere; word-break: break-word; }
.wallet-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.wallet-actions .btn, .earnings-hero .eh-actions .btn { width: auto; background: var(--brand); color: var(--green-950); }
.wallet-actions .btn:hover, .earnings-hero .eh-actions .btn:hover { background: var(--lemon-400); }
.tx-list { border-radius: var(--r-xl); overflow: hidden; }
.tx-item { display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; padding: 15px 18px; align-items: center; border-bottom: 1px solid var(--line-soft); transition: background var(--t-fast) var(--ease); }
.tx-item:hover { background: var(--surface-2); } .tx-item:last-child { border-bottom: 0; }
.tx-icon { width: 46px; height: 46px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.tx-icon.credit { background: var(--brand-soft); color: var(--link); } .tx-icon.debit { background: var(--danger-soft); color: var(--danger); } .tx-icon.refund { background: var(--info-soft); color: var(--info); }
.tx-info h5 { font-size: .94rem; font-weight: 800; margin-bottom: 2px; } .tx-info small { font-size: .78rem; color: var(--text-muted); font-weight: 500; }
.tx-amount { font-weight: 800; font-family: var(--f-num); } .tx-amount.credit { color: var(--pos); } .tx-amount.debit { color: var(--text-strong); }

/* ── Send / gift flows ─────────────────────────────────────── */
.flow-card { border-radius: var(--r-2xl); padding: 24px; margin-bottom: 16px; }
.flow-card h3 { margin-bottom: 4px; } .flow-card .flow-sub { color: var(--text-muted); font-size: .92rem; margin-bottom: 18px; }
.flow-card--dark { background: var(--green-700); border-color: var(--green-700); }
.flow-card--dark h4 { color: #fff; } .flow-card--dark small, .flow-card--dark p { color: rgba(255,255,255,.88); } .flow-card--dark a { color: var(--lemon-200); }
.flow-card--dark .flow-row { display: flex; gap: 14px; align-items: center; }
@media (max-width: 560px) { .flow-card--dark .flow-row { flex-wrap: wrap; } .flow-card--dark .flow-row .btn { flex: 1 1 100%; width: 100% !important; } }
.step-indicator { display: flex; align-items: center; gap: 6px; margin-bottom: 24px; padding: 14px 18px; }
.step-indicator .step { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 700; color: var(--text-muted); }
.step-indicator .step .num { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; flex-shrink: 0; }
.step-indicator .step.active { color: var(--text-strong); } .step-indicator .step.active .num { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 0 0 4px var(--brand-soft); }
.step-indicator .step.done { color: var(--text-strong); } .step-indicator .step.done .num { background: var(--brand); color: var(--green-950); }
.step-indicator .div-line { flex: 1; height: 2px; background: var(--surface-3); max-width: 30px; border-radius: 2px; } .step-indicator .step.done + .div-line { background: var(--brand); }
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.option-card { padding: 16px; border-width: 2px; border-radius: var(--r-lg); cursor: pointer; text-align: center; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.option-card:hover { border-color: var(--brand); } .option-card.selected { border-color: var(--brand); background: var(--brand-soft); }
.option-card .opt-emoji { font-size: 1.8rem; margin-bottom: 8px; } .option-card .opt-name { font-weight: 800; font-size: .92rem; margin-bottom: 2px; } .option-card .opt-meta { font-size: .78rem; color: var(--text-muted); }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; padding: 18px; margin-bottom: 16px; }
.summary-strip .ss-item .ss-label { font-size: .78rem; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; } .summary-strip .ss-item .ss-value { font-size: 1.02rem; font-weight: 800; color: var(--text-strong); }
.point-card { padding: 18px; border-radius: var(--r-lg); } .point-card .pc-line { display: flex; gap: 14px; align-items: flex-start; }
.point-card .pc-num { width: 38px; height: 38px; background: var(--btn-bg); color: var(--btn-fg); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.point-card .pc-meta { flex: 1; } .point-card .pc-meta h4 { font-size: 1rem; margin-bottom: 2px; }
.gift-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-lg); background: var(--brand-soft); border-color: var(--brand); }
.gift-card.pink { background: var(--pink-soft); border-color: var(--pink); } .gift-card.teal { background: var(--teal-soft); border-color: var(--teal); } .gift-card.purple { background: var(--purple-soft); border-color: var(--purple); }
.gift-card .gc-icon { width: 42px; height: 42px; border-radius: var(--r-md); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.gift-card .gc-meta h4 { font-size: .96rem; margin-bottom: 2px; } .gift-card .gc-meta small { color: var(--text-muted); font-size: .8rem; }
.zone-run-banner { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--purple-soft); border: 1px solid var(--purple); border-radius: var(--r-lg); }
.zone-run-banner .zr-icon { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--purple); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.zone-run-banner h4 { font-size: 1rem; margin-bottom: 2px; } .zone-run-banner p { color: var(--text-muted); font-size: .84rem; margin: 0; }
.zone-run-card { display: flex; align-items: center; gap: 14px; padding: 16px; } .zone-run-card.is-open { border-color: var(--purple); background: var(--purple-soft); }
.zone-run-card .zr-meta { flex: 1; min-width: 0; } .zone-run-card .zr-meta h3 { font-size: 1.02rem; margin-bottom: 4px; } .zone-run-card .zr-meta small { display: block; color: var(--text-muted); font-size: .84rem; }
.list-card { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; }
.list-card .row-1 { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 1; min-width: 0; } .list-card .actions { margin-top: 10px; display: flex; gap: 8px; }

/* ── Settings & notifications ──────────────────────────────── */
.settings-card { overflow: hidden; margin-bottom: 18px; } .settings-card h4 { padding: 18px 20px 12px; font-size: 1.02rem; }
.settings-list { display: flex; flex-direction: column; }
.settings-item { display: flex; align-items: center; gap: 14px; padding: 15px 20px; border-top: 1px solid var(--line); color: inherit; }
.settings-item:hover { background: var(--brand-soft); }
.settings-item .s-icon { width: 40px; height: 40px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.settings-item .s-icon.brand { background: var(--brand-soft); color: var(--link); } .settings-item .s-icon.purple { background: var(--purple-soft); color: var(--purple); }
.settings-item .s-icon.warn { background: var(--accent-light); color: var(--accent); } .settings-item .s-icon.info { background: var(--info-soft); color: var(--info); } .settings-item .s-icon.danger { background: var(--danger-soft); color: var(--danger); }
.settings-item .s-info { flex: 1; } .settings-item .s-info h5 { font-size: .94rem; font-weight: 800; margin-bottom: 2px; } .settings-item .s-info small { color: var(--text-muted); font-size: .82rem; } .settings-item .s-arrow { color: var(--text-dim); font-size: .85rem; }
.notif-card { display: flex; gap: 14px; padding: 16px 18px; margin-bottom: 10px; align-items: flex-start; position: relative; }
.notif-card.unread { border-color: var(--brand); background: var(--brand-soft); }
button.notif-card { border: 1px solid var(--line); font-family: inherit; text-align: left; width: 100%; } button.notif-card.unread { border-color: var(--brand); }
.notif-icon { width: 42px; height: 42px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.notif-icon.brand { background: var(--brand); color: var(--green-950); } .notif-icon.warn { background: var(--warn); color: #fff; } .notif-icon.info { background: var(--info); color: #fff; } .notif-icon.purple { background: var(--purple); color: #fff; }
.notif-body { flex: 1; min-width: 0; } .notif-body h5 { font-size: .94rem; margin-bottom: 2px; font-weight: 800; } .notif-body p { font-size: .84rem; color: var(--text-muted); line-height: 1.4; } .notif-body .time { font-size: .76rem; color: var(--text-dim); margin-top: 4px; }

/* ── Search dropdown (global widget) ───────────────────────── */
.search-dropdown { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xl); max-height: 380px; overflow-y: auto; z-index: 70; }
.search-drop-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background var(--t-fast) var(--ease); }
.search-drop-item:hover { background: var(--brand-soft); } .search-drop-item:last-child { border-bottom: 0; }
.search-drop-item .sdi-icon { font-size: 1.4rem; width: 36px; display: flex; align-items: center; justify-content: center; } .search-drop-item .sdi-info { flex: 1; min-width: 0; }
.search-drop-item .sdi-title { display: block; font-weight: 700; color: var(--text-strong); font-size: .92rem; } .search-drop-item .sdi-sub { display: block; font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.search-drop-item .sdi-price { font-weight: 800; color: var(--text-strong); font-family: var(--f-num); font-size: .92rem; }
.search-see-all { display: block; text-align: center; padding: 13px; font-weight: 800; color: var(--link); font-size: .86rem; background: var(--surface-2); border-top: 1px solid var(--line); }
.search-see-all:hover { background: var(--brand-soft); }

/* Legacy cart bar + lines (older pages) */
.cart-bar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(120%); z-index: 800; width: calc(100% - 32px); max-width: 480px; transition: transform .3s var(--ease-spring); }
.cart-bar.show { transform: translateX(-50%) translateY(0); } .cart-bar .btn { border-radius: var(--r-pill); padding: 16px 24px; }
@media (max-width: 900px) { .cart-bar { bottom: calc(var(--bottom-h) + 20px); } } @media (max-width: 480px) { .cart-bar { bottom: calc(var(--bottom-h) + 32px); } }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); } .cart-name { flex: 1; font-weight: 700; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty button { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.cart-qty button:hover { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; } .cart-qty span { min-width: 20px; text-align: center; font-weight: 800; }
.cart-price { font-weight: 800; color: var(--text-strong); min-width: 80px; text-align: right; font-family: var(--f-num); }
.dot { display: inline-block; width: 7px; height: 7px; background: var(--brand); border-radius: 50%; margin-right: 6px; }

/* ── Responsive tuning ─────────────────────────────────────── */
@media (max-width: 480px) {
  :root { --nav-h: 64px; --bottom-h: 70px; }
  .merchant-card .mc-body, .order-card, .order-row, .rider-card, .kpi-card, .qa-card, .list-card, .zone-card { padding: 14px; gap: 12px; }
  .modal-sheet { padding: 24px 18px; } .page-hero { padding: 18px; } .flow-card { padding: 20px; }
  .order-card { grid-template-columns: 58px 1fr auto; gap: 10px; } .order-thumb { width: 58px; height: 58px; font-size: 1.5rem; } .order-info h4 { font-size: .92rem; }
  .menu-item-img { width: 84px; height: 84px; } .merchant-head { flex-direction: column; align-items: center; text-align: center; }
  .step-indicator { padding: 10px; } .step-indicator .step span:not(.num) { display: none; } .wallet-hero { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ============================================================
   MERCHANT · RIDER · ADMIN · AUTH
   ============================================================ */

.auth-shell { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 450px; border-radius: var(--r-2xl); padding: 34px 28px; box-shadow: var(--shadow-lg); }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--text-strong); margin-bottom: 24px; }
.auth-card .auth-title { font-size: 1.6rem; margin-bottom: 6px; } .auth-card .auth-sub { margin-bottom: 22px; }

/* ── Remember-me row (user · merchant · rider logins) ─────────── */
.remember-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 14px; font-size: .88rem; }
.remember-row a { color: var(--brand-text, #0B3D26); font-weight: 700; text-decoration: none; white-space: nowrap; }
.remember-row a:hover { text-decoration: underline; }
.remember-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--text-muted, #475467); font-weight: 600; user-select: none; }
.remember-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.remember-check .rc-box { width: 20px; height: 20px; border-radius: 7px; border: 1.5px solid var(--border, #d0d5dd); background: var(--surface, #fff); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; color: #fff; transition: background .15s, border-color .15s; flex: none; }
.remember-check .rc-box::after { content: "✓"; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; font-weight: 900; }
.remember-check input:checked + .rc-box { background: var(--brand, #0B3D26); border-color: var(--brand, #0B3D26); color: var(--green-950, #041A0C); }
.remember-check input:checked + .rc-box::after { opacity: 1; transform: scale(1); }
.remember-check input:focus-visible + .rc-box { outline: 2px solid var(--brand, #0B3D26); outline-offset: 2px; }

/* Merchant dashboard */
.merchant-hero { padding: 34px; border-radius: var(--r-2xl); margin-bottom: 20px; }
.merchant-hero h1 { color: #fff; font-size: 1.8rem; margin-bottom: 6px; } .merchant-hero p { color: var(--on-deep-mut); }
/* Stat tiles: fluid boxes that share each row evenly at every width.
   flex-basis keeps 2 tiles per row on phones and all 5 on wider heroes,
   while min-width:0 lets long naira figures wrap instead of bursting out. */
.merchant-hero .mh-stats { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.merchant-hero .mh-stats .mhs { display: flex; flex-direction: column; justify-content: center; flex: 1 1 116px; min-width: 0; padding: 12px 14px; }
.merchant-hero .mh-stats .mhs-num, .rider-hero-stats .rhs-num { font-family: var(--f-disp); font-size: clamp(1.1rem, 1.9vw, 1.5rem); font-weight: 800; color: var(--lemon-300); line-height: 1.15; letter-spacing: -.03em; overflow-wrap: anywhere; word-break: break-word; }
.merchant-hero .mh-stats .mhs-label, .rider-hero-stats .rhs-label { font-size: .8rem; color: var(--on-deep-mut); font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; line-height: 1.3; }
@media (max-width: 900px) {
  .merchant-hero .mh-stats .mhs { flex-basis: calc(33.333% - 7px); }
}
@media (max-width: 600px) {
  .merchant-hero .mh-stats { gap: 8px; margin-top: 16px; }
  .merchant-hero .mh-stats .mhs { flex-basis: calc(50% - 4px); padding: 10px 12px; }
}
.merchant-hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.status-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); cursor: pointer; font-size: .86rem; font-weight: 700; transition: border-color var(--t-fast) var(--ease); }
.status-toggle:hover { border-color: var(--brand); }
.status-toggle .dot { width: 10px; height: 10px; margin: 0; background: var(--text-dim); transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.status-toggle.open .dot { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.order-row { display: grid; grid-template-columns: 60px 1fr auto auto; gap: 14px; padding: 16px; margin-bottom: 10px; align-items: center; transition: border-color var(--t-fast) var(--ease); }
.order-row .or-thumb { width: 58px; height: 58px; border-radius: var(--r-md); background: var(--lemon-100); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text-strong); font-weight: 800; border: 1px solid var(--line); }
[data-theme="dark"] .order-row .or-thumb { background: var(--surface-2); }
.order-row .or-info { min-width: 0; } .order-row .or-info h4 { font-size: 1rem; margin-bottom: 4px; }
.order-row .or-info .meta { font-size: .84rem; color: var(--text-muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.order-row .or-price { font-family: var(--f-disp); font-weight: 800; color: var(--text-strong); font-size: 1.05rem; overflow-wrap: anywhere; } .order-row .or-action { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Queue cards (rider "available" + "P2P requests") pack the price inside
   .or-action, so they only need three columns: thumb · info · actions. */
.order-row--queue { grid-template-columns: 60px 1fr auto; }

/* Mobile: stack every order row into a clean two-line card so the action
   buttons never overflow the screen. The old layout crammed the price plus
   several buttons into one narrow "auto" column and distorted badly on phones. */
@media (max-width: 600px) {
  .order-row, .order-row--queue { grid-template-columns: 46px 1fr; gap: 10px 12px; padding: 14px; align-items: start; }
  .order-row .or-thumb { width: 44px; height: 44px; font-size: 1.2rem; }
  .order-row .or-info h4 { font-size: .95rem; }
  .order-row .or-price { grid-column: 2; grid-row: 2; margin-top: 2px; }
  .order-row .or-action { grid-column: 1 / -1; gap: 8px; }
}

/* ── Global card-text hardening (rider · merchant · user) ──────────────
   First principles: cards are thumb + text + actions. The text column must
   own min-width:0 and wrap long addresses ("Abeokuta → Abeokuta…"); action
   buttons must stack full-width on phones instead of squeezing nowrap. */
.order-row .or-info h4, .flow-card h4, .order-card h4, .zone-card h4,
.rider-card h4, .list-card h4 {
  min-width: 0; overflow-wrap: anywhere; word-break: break-word; line-height: 1.45;
}
.order-row .or-info .meta > span, .flow-card p, .order-card p { min-width: 0; overflow-wrap: anywhere; }
.flow-card > div, .order-card > div, .zone-card > div { min-width: 0; }
.kpi-card .kpi-num { overflow-wrap: anywhere; word-break: break-word; }
/* Desktop: right-aligned action column inside zone-cards;
   mobile: wrapping row with full-width buttons. */
.zc-actions-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 1 auto; min-width: 0; }
@media (max-width: 600px) {
  .zone-card { flex-wrap: wrap; }
  .zc-actions-col { flex-direction: row; flex: 1 1 100%; align-items: stretch; flex-wrap: wrap; }
  .order-row .or-action .btn, .flow-card .btn, .zone-card .btn { flex: 1 1 100%; max-width: 100%; white-space: normal;
    text-align: center; line-height: 1.35; justify-content: center; }
  .order-row .or-action .icon-btn, .flow-card .icon-btn, .zone-card .icon-btn { flex: 0 0 auto; }
  .order-card { grid-template-columns: 46px minmax(0,1fr) !important; }
  .order-card .order-right, .order-card .or-action { grid-column: 1 / -1; }
}

/* ── Shared order-list accordion (combo box) ───────────────────────────
   Tap the trigger to expand a scrollable list, tap an option to pick it.
   Used by rider/scan.php ("Which order?") and merchant/discover-riders.php
   ("Order to deliver"). Driven by assets/js/ks-accordion.js. */
.ks-accordion { position: relative; }
.ks-accordion-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--input-border); border-radius: 12px; padding: 12px 14px;
  color: var(--text-strong); font-size: .95rem; font-weight: 700; min-height: 48px; cursor: pointer; text-align: left;
  transition: border-color .15s; }
.ks-accordion-trigger:hover { border-color: var(--brand); }
.ks-accordion.open .ks-accordion-trigger { border-color: var(--brand); }
.ks-accordion-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-accordion-value.is-placeholder { color: var(--text-muted); font-weight: 500; }
.ks-accordion-trigger .fa-chevron-down { transition: transform .22s ease; color: var(--text-muted); font-size: .8rem; flex-shrink: 0; }
.ks-accordion.open .ks-accordion-trigger .fa-chevron-down { transform: rotate(180deg); color: var(--brand-text); }
.ks-accordion-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  max-height: 320px; overflow: auto; padding: 6px; }
.ks-order-option { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent;
  padding: 11px 12px; border-radius: 10px; text-align: left; cursor: pointer; }
.ks-order-option:hover { background: var(--surface-2); }
.ks-order-option.selected { background: var(--brand-soft); }
.ks-opt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ks-opt-code { font-family: var(--f-mono); font-weight: 700; font-size: .85rem; color: var(--text-strong); }
.ks-opt-sub { font-size: .78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-opt-check { color: var(--brand-text); opacity: 0; font-size: .9rem; transition: opacity .15s; flex-shrink: 0; }
.ks-order-option.selected .ks-opt-check { opacity: 1; }
.ks-opt-empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: .85rem; }

.items-table { width: 100%; min-width: 620px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; border-collapse: collapse; }
.items-table th, .items-table td { white-space: nowrap; } .items-table td .item-name { white-space: normal; }
.items-table thead { background: var(--surface-2); }
.items-table th { text-align: left; padding: 14px 18px; font-size: .8rem; font-weight: 800; color: var(--text-muted); border-bottom: 1px solid var(--line); }
.items-table td { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); font-size: .92rem; color: var(--text); vertical-align: middle; }
.items-table tbody tr:last-child td { border-bottom: 0; } .items-table tbody tr:hover { background: var(--surface-2); }
.items-table .item-thumb { width: 50px; height: 50px; border-radius: var(--r-sm); background: var(--lemon-100); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; overflow: hidden; flex-shrink: 0; border: 1px solid var(--line); }
[data-theme="dark"] .items-table .item-thumb { background: var(--surface-2); }
.items-table .item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.items-table .item-name { font-weight: 800; color: var(--text-strong); } .items-table .item-price { font-family: var(--f-num); font-weight: 800; color: var(--text-strong); }
.items-table .item-stock { font-size: .86rem; } .items-table .item-stock.in-stock { color: var(--pos); font-weight: 700; } .items-table .item-stock.low-stock { color: var(--warn); font-weight: 700; } .items-table .item-stock.out-stock { color: var(--danger); font-weight: 700; }
.items-table .item-actions { display: flex; gap: 6px; justify-content: flex-end; }
.item-form-grid, .admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .item-form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .item-form-grid, .admin-form-grid { grid-template-columns: 1fr; } }

.earnings-hero { padding: 34px; border-radius: var(--r-2xl); color: #fff; margin-bottom: 20px; }
.earnings-hero .eh-label { font-size: .86rem; opacity: .78; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.earnings-hero .eh-balance { font-family: var(--f-disp); font-size: clamp(2.5rem, 7vw, 3.5rem); font-weight: 800; letter-spacing: -.04em; margin-bottom: 8px; line-height: 1; color: var(--lemon-300); overflow-wrap: anywhere; word-break: break-word; }
.earnings-hero .eh-trend { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; background: var(--brand); color: var(--green-950); border-radius: var(--r-pill); font-size: .84rem; font-weight: 800; }
.earnings-hero .eh-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.chart-card { padding: 20px; margin-bottom: 18px; } .chart-card h4 { margin-bottom: 14px; font-size: 1.02rem; }
.chart-bars { display: flex; gap: 8px; height: 170px; align-items: flex-end; padding: 8px 0; }
.chart-bar { flex: 1; background: var(--brand); border-radius: var(--r-sm) var(--r-sm) 4px 4px; min-height: 8px; position: relative; transition: opacity var(--t-fast) var(--ease); }
.chart-bar:hover { opacity: .85; }
.chart-bar .cb-label { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--text-muted); white-space: nowrap; }
.chart-bar .cb-value { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: .7rem; font-weight: 800; color: var(--text-strong); white-space: nowrap; }
@media (max-width: 560px) { .chart-bars { overflow-x: auto; padding: 26px 2px; height: auto; min-height: 150px; scrollbar-width: none; } .chart-bars::-webkit-scrollbar { display: none; } .chart-bar { flex: 1 0 34px; } .chart-bar .cb-value, .chart-bar .cb-label { font-size: .6rem; } }

.zone-card { padding: 18px 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 14px; }
.zone-card:hover { border-color: var(--purple); }
.zone-card .zc-icon { width: 48px; height: 48px; background: var(--purple-soft); color: var(--purple); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.zone-card .zc-info { flex: 1; min-width: 0; } .zone-card .zc-info h4 { font-size: 1.02rem; margin-bottom: 4px; }
.zone-card .zc-info .sub { font-size: .84rem; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.zone-card .zc-stat { font-family: var(--f-disp); font-weight: 800; color: var(--text-strong); font-size: 1.1rem; } .zone-card .zc-stat small { display: block; font-size: .74rem; font-weight: 600; color: var(--text-muted); font-family: var(--f-body); }
.zone-card--dark { background: var(--green-700); border-color: var(--green-700); }
.zone-card--dark .zc-info h4 { color: #fff; } .zone-card--dark .zc-info .sub, .zone-card--dark .zc-info .sub span { color: rgba(255,255,255,.88); }
.zone-card--dark .zc-info .sub .dot { background: rgba(255,255,255,.5); } .zone-card--dark .zc-info .sub i { color: var(--lemon-200); }
@media (max-width: 560px) { .zone-card--dark { flex-wrap: wrap; } }

.stamp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 10px; margin: 14px 0; }
.stamp-cell { aspect-ratio: 1; background: var(--surface-2); border: 2px dashed var(--line-strong); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text-dim); }
.stamp-cell.filled { background: var(--brand); border-color: var(--lemon-700); color: var(--green-950); border-style: solid; }
.merchant-status-banner { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--r-xl); margin-bottom: 18px; }
.merchant-status-banner.suspended { background: var(--danger-soft); border-color: var(--danger); }
.merchant-status-banner .msb-icon { width: 42px; height: 42px; background: var(--warn); color: #fff; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.merchant-status-banner.suspended .msb-icon { background: var(--danger); }
.merchant-status-banner .msb-info { flex: 1; min-width: 0; } .merchant-status-banner h5 { font-size: .96rem; font-weight: 800; color: var(--text-strong); } .merchant-status-banner p { font-size: .84rem; color: var(--text-muted); margin-top: 2px; }
.ks-toggle { position: relative; width: 46px; height: 26px; background: var(--surface-3); border-radius: var(--r-pill); cursor: pointer; transition: background var(--t-base) var(--ease); flex-shrink: 0; border: 1px solid var(--line-strong); }
.ks-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: var(--surface); border-radius: 50%; box-shadow: var(--shadow-xs); transition: transform var(--t-base) var(--ease-spring); }
.ks-toggle.on { background: var(--brand); border-color: var(--lemon-700); } .ks-toggle.on::after { transform: translateX(20px); }
.edit-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); transition: background var(--t-fast) var(--ease); }
.edit-row:last-child { border-bottom: 0; } .edit-row:hover { background: var(--surface-2); } .edit-row label { font-weight: 700; min-width: 140px; } .edit-row .edit-control { flex: 1; min-width: 0; }
@media (max-width: 600px) { .edit-row { flex-wrap: wrap; gap: 8px; } .edit-row label { min-width: 0; flex: 1 1 100%; } .edit-row .edit-control { flex: 1 1 100%; } }
.merchant-profile-card { display: flex; align-items: center; gap: 18px; padding: 24px; border-radius: var(--r-2xl); margin-bottom: 24px; }
.merchant-profile-card .mpc-logo { width: 90px; height: 90px; border-radius: var(--r-xl); background: var(--green-700); color: var(--lemon-300); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; font-weight: 800; flex-shrink: 0; overflow: hidden; }
.merchant-profile-card .mpc-logo img { width: 100%; height: 100%; object-fit: cover; }
.merchant-profile-card .mpc-info { flex: 1; min-width: 0; } .merchant-profile-card .mpc-info h2 { font-size: 1.45rem; margin-bottom: 6px; }
.merchant-profile-card .mpc-info .sub { color: var(--text-muted); font-size: .9rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; margin-bottom: 24px; }
@media (max-width: 1199px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; position: relative; overflow: hidden; }
.kpi-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); transition: width var(--t-base) var(--ease); }
.kpi-card:hover::before { width: 6px; }
.kpi-card .kpi-icon { width: 50px; height: 50px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.kpi-card .kpi-body { flex: 1; min-width: 0; }
.kpi-card .kpi-num { font-family: var(--f-disp); font-size: clamp(1.2rem, 2.4vw, 1.65rem); font-weight: 800; color: var(--text-strong); line-height: 1.05; letter-spacing: -.03em; overflow-wrap: anywhere; word-break: break-word; }
.kpi-card .kpi-label { font-size: .82rem; color: var(--text-muted); font-weight: 700; margin-top: 5px; overflow-wrap: anywhere; } .kpi-card .kpi-sub { font-size: .78rem; color: var(--text-dim); margin-top: 2px; overflow-wrap: anywhere; }
.kpi-card .kpi-arrow { color: var(--text-dim); font-size: .85rem; transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); } .kpi-card:hover .kpi-arrow { color: var(--link); transform: translateX(4px); }
.kpi-card.kpi-warn::before { background: var(--warn); } .kpi-card.kpi-warn .kpi-icon { background: var(--warn-soft); color: var(--warn); }
.kpi-card.kpi-purple::before { background: var(--purple); } .kpi-card.kpi-purple .kpi-icon { background: var(--purple-soft); color: var(--purple); }
.kpi-card.kpi-brand::before { background: var(--brand); } .kpi-card.kpi-brand .kpi-icon { background: var(--brand-soft); color: var(--link); }
.kpi-card.kpi-accent::before { background: var(--accent); } .kpi-card.kpi-accent .kpi-icon { background: var(--accent-light); color: var(--accent); }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 24px; } @media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.quick-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r-md); color: inherit; border: 1px solid transparent; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.quick-row:hover { background: var(--brand-soft); border-color: var(--brand); }
.quick-row .qr-icon { width: 42px; height: 42px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.quick-row .qr-icon.green { background: var(--brand-soft); color: var(--link); } .quick-row .qr-icon.orange { background: var(--accent-light); color: var(--accent); } .quick-row .qr-icon.purple { background: var(--purple-soft); color: var(--purple); } .quick-row .qr-icon.pink { background: var(--pink-soft); color: var(--pink); }
.quick-row .qr-info { flex: 1; min-width: 0; } .quick-row .qr-info strong { display: block; font-size: .94rem; font-weight: 800; color: var(--text-strong); overflow-wrap: anywhere; } .quick-row .qr-info small { display: block; font-size: .78rem; color: var(--text-muted); font-weight: 600; overflow-wrap: anywhere; }
.quick-row .qr-arrow { color: var(--text-dim); font-size: .78rem; transition: transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease); } .quick-row:hover .qr-arrow { transform: translateX(4px); color: var(--link); }

.zone-suggest-card { background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--r-xl); padding: 18px 20px; margin-bottom: 18px; display: flex; align-items: center; gap: 14px; }
.zone-suggest-card .zs-icon { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--brand); color: var(--green-950); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.zone-suggest-card .zs-info { flex: 1; min-width: 0; } .zone-suggest-card h4 { font-size: 1rem; margin-bottom: 4px; } .zone-suggest-card p { font-size: .84rem; color: var(--text-muted); margin: 0; } .zone-suggest-card .zs-cta { width: auto; flex-shrink: 0; }
@media (max-width: 600px) { .zone-suggest-card { flex-wrap: wrap; gap: 12px; padding: 16px; } .zone-suggest-card .zs-icon { width: 42px; height: 42px; font-size: 1.2rem; } .zone-suggest-card .zs-info { flex: 1 1 180px; } .zone-suggest-card .zs-cta { flex: 1 1 100%; width: 100%; justify-content: center; } }
.gps-detect-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 14px; font-size: .84rem; color: var(--text-muted); }
.gps-detect-bar .gps-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: pulse 2s ease-in-out infinite; }
.gps-detect-bar .gps-coords { font-family: var(--f-mono); color: var(--text-strong); font-weight: 700; } .gps-detect-bar .gps-accuracy { color: var(--text-dim); font-size: .78rem; }

/* Rider */
.rider-hero { padding: 0; border-radius: var(--r-2xl); margin-bottom: 20px; display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; min-height: 260px; }
.rider-hero-info { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.rider-hero-info h1 { color: #fff; font-size: 1.8rem; margin-bottom: 8px; } .rider-hero-info p { color: var(--on-deep-mut); margin-bottom: 18px; }
.rider-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; } .rider-hero-stats .rhs { display: flex; flex-direction: column; justify-content: center; flex: 1 1 108px; min-width: 0; padding: 10px 14px; }
.rider-hero-image { position: relative; background: var(--lemon-300); padding: 10px; align-self: stretch; display: none; }
@media (min-width: 800px) { .rider-hero-image { display: block; } }
.rider-hero-image img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--r-2xl) - 10px); display: block; }
@media (max-width: 800px) { .rider-hero { grid-template-columns: 1fr; } .rider-hero-image, .merchant-hero-grid .rider-hero-image { display: none; } .merchant-hero-grid { grid-template-columns: 1fr; } .merchant-hero { padding: 26px 22px; } .merchant-hero h1 { font-size: 1.45rem; } .rider-hero-info { padding: 26px 22px; } }

/* Admin */
.kb-admin { display: flex; min-height: 100vh; background: var(--bg); }
.admin-sidebar { width: 252px; min-width: 252px; background: var(--surface); border-right: 1px solid var(--line); position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 1100; display: flex; flex-direction: column; }
.admin-main { margin-left: 252px; flex: 1; min-height: 100vh; background: var(--bg); }
.admin-topbar { position: sticky; top: 0; z-index: 50; height: 64px; background: var(--nav); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.admin-content { padding: 24px; max-width: 1600px; }
.asb-brand { padding: 20px 18px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); min-height: 78px; }
.asb-brand .asb-info { display: none; } .asb-brand .asb-name { font-weight: 800; font-size: .98rem; color: var(--text-strong); letter-spacing: -.02em; }
.asb-brand .asb-sub { font-size: .7rem; color: var(--text-muted); font-weight: 700; display: block; }
.asb-nav { padding: 14px 10px; flex: 1; }
.asb-section { font-size: .72rem; color: var(--text-dim); padding: 14px 12px 6px; font-weight: 800; }
.asb-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-md); font-size: .88rem; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.asb-link:hover { background: var(--brand-soft); color: var(--link); }
.asb-link.active { background: var(--btn-bg); color: var(--btn-fg); font-weight: 800; } .asb-link .asb-ico { width: 18px; text-align: center; font-size: .85rem; } .asb-link.active .asb-ico { color: var(--btn-fg); }
.asb-badge { margin-left: auto; background: var(--btn-bg); color: var(--btn-fg); font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: var(--r-pill); min-width: 22px; text-align: center; } .asb-badge.warn { background: var(--warn); color: #fff; }
[data-theme="dark"] .asb-badge.warn { color: #1a1000; }

/* ── Dark-theme contrast guard: semantic solids turn light in dark mode,
   so solid badges/icons that use white text in light mode get deep text. ── */
[data-theme="dark"] .notif-dot,
[data-theme="dark"] .sb-badge,
[data-theme="dark"] .fc-badge-closed,
[data-theme="dark"] .ifc-closed-badge,
[data-theme="dark"] .ifc-live-badge,
[data-theme="dark"] .ifc-timer-badge.is-soon,
[data-theme="dark"] .mc-badge-closed,
[data-theme="dark"] .notif-icon.warn,
[data-theme="dark"] .notif-icon.info,
[data-theme="dark"] .notif-icon.purple,
[data-theme="dark"] .zone-run-banner .zr-icon,
[data-theme="dark"] .merchant-status-banner .msb-icon { color: #1a1000; }
.asb-link.active .asb-badge { background: var(--btn-fg); color: var(--btn-bg); }
.asb-foot { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.asb-foot a { font-size: .84rem; color: var(--text-muted); padding: 9px 10px; border-radius: var(--r-sm); display: flex; align-items: center; gap: 8px; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.asb-foot a:hover { color: var(--link); background: var(--brand-soft); } .asb-foot .asb-logout { color: var(--danger); } .asb-foot .asb-logout:hover { background: var(--danger-soft); }
.tb-title { font-family: var(--f-disp); font-size: 1.15rem; font-weight: 800; color: var(--text-strong); letter-spacing: -.02em; text-transform: capitalize; }
.tb-right { display: flex; align-items: center; gap: 12px; } .tb-user { font-size: .86rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.tb-role { font-size: .7rem; padding: 3px 11px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--link); border: 1px solid var(--brand); font-weight: 800; }
.tb-role.super { background: var(--purple-soft); color: var(--purple); border-color: var(--purple); }
.admin-hero { padding: 32px 36px; border-radius: var(--r-2xl); color: #fff; margin-bottom: 24px; } .admin-hero h1 { color: #fff; font-size: 1.8rem; margin-bottom: 4px; } .admin-hero p { color: var(--on-deep-mut); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 24px; }
.admin-stat { position: relative; padding: 20px; overflow: hidden; transition: border-color var(--t-fast) var(--ease); }
.admin-stat::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.admin-stat:hover { border-color: var(--brand); } .admin-stat.blue::before { background: var(--info); } .admin-stat.purple::before { background: var(--purple); } .admin-stat.amber::before { background: var(--warn); } .admin-stat.red::before { background: var(--danger); }
.admin-stat .as-icon { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: var(--r-md); background: var(--brand-soft); color: var(--link); display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.admin-stat.blue .as-icon { background: var(--info-soft); color: var(--info); } .admin-stat.purple .as-icon { background: var(--purple-soft); color: var(--purple); } .admin-stat.amber .as-icon { background: var(--warn-soft); color: var(--warn); } .admin-stat.red .as-icon { background: var(--danger-soft); color: var(--danger); }
.admin-stat .as-val { font-family: var(--f-disp); font-size: 1.8rem; font-weight: 800; color: var(--text-strong); letter-spacing: -.03em; line-height: 1.1; }
.admin-stat .as-lbl { font-size: .78rem; color: var(--text-muted); margin-top: 4px; font-weight: 700; }
.a-card { margin-bottom: 16px; overflow: hidden; }
.a-card-head { padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 1rem; font-weight: 800; color: var(--text-strong); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.a-card-body { padding: 20px; } .a-card-body.flush { padding: 0; }
.a-table { width: 100%; border-collapse: collapse; font-size: .88rem; } .a-table thead { background: var(--surface-2); }
.a-table th { text-align: left; padding: 12px 16px; font-size: .76rem; color: var(--text-muted); font-weight: 800; border-bottom: 1px solid var(--line); }
.a-table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text); vertical-align: middle; }
.a-table th, .a-table td { white-space: nowrap; } .a-table td.wrap, .a-table th.wrap { white-space: normal; }
.a-table tbody tr:last-child td { border-bottom: 0; } .a-table tbody tr:hover { background: var(--surface-2); } .a-table .mono { font-family: var(--f-mono); font-size: .82rem; }
.a-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; min-height: 38px; border-radius: var(--r-md); font-size: .85rem; font-weight: 700; cursor: pointer; border: 1px solid transparent; background: var(--btn-bg); color: var(--btn-fg); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.a-btn:hover { background: var(--btn-bg-hover); } .a-btn-sm { padding: 6px 12px; min-height: 32px; font-size: .78rem; } .a-btn-green { background: var(--btn-bg); color: var(--btn-fg); }
.a-btn-red { background: var(--danger); color: #fff; } .a-btn-red:hover { background: #b42318; }
.a-btn-outline { background: transparent; color: var(--link); border-color: var(--link); } .a-btn-outline:hover { background: var(--link); color: var(--surface); }
[data-theme="dark"] .a-btn-outline:hover { color: var(--green-950); }
.a-msg { padding: 14px 18px; border-radius: var(--r-md); font-size: .88rem; margin-bottom: 16px; font-weight: 600; }
.a-msg-ok { background: var(--brand-soft); color: var(--link); border: 1px solid var(--brand); } .a-msg-err { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); } .a-msg-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); }
.admin-sidebar-toggle { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-strong); flex-shrink: 0; }
.admin-sidebar-close { display: none; margin-left: auto; border: 1px solid var(--line); border-radius: var(--r-md); width: 36px; height: 36px; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-105%); visibility: hidden; transition: transform var(--t-base) var(--ease), visibility var(--t-base) var(--ease); max-width: 86vw; box-shadow: var(--shadow-xl); }
  .admin-sidebar.open { display: flex !important; transform: translateX(0); visibility: visible; }
  .admin-main { margin-left: 0; } .admin-stats { grid-template-columns: repeat(2, 1fr); } .admin-sidebar-close { display: inline-flex; }
}
@media (min-width: 901px) { .admin-sidebar-toggle { display: none !important; } }
@media (max-width: 640px) { .admin-content [style*="1fr 1fr"], .kb-admin [style*="1fr 1fr"] { grid-template-columns: 1fr !important; } .tb-right { gap: 8px; } .tb-user .tb-name { display: none; } .tb-title { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 480px) { .admin-stats { grid-template-columns: 1fr; } .admin-topbar { padding: 0 14px; } .admin-content { padding: 16px; } .admin-hero { padding: 24px 20px; } }

/* ── Sliding category rail (ilueats-style) ─────────────────────
   Round icons + labels in a swipeable strip with gentle auto-slide.
   Used on Browse (discover), Home (dashboard) and Market pages. */
.ks-cat-rail-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 14px 6px 10px; margin: 0 0 14px; overflow: hidden; }
.ks-cat-rail { display: flex; gap: 4px; overflow-x: auto; padding: 2px 10px 6px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%); }
.ks-cat-rail::-webkit-scrollbar { display: none; }
.ks-cat-rail.is-drag { cursor: grabbing; scroll-snap-type: none; }
.ks-cat-item { flex: 0 0 82px; width: 82px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 8px 4px 6px; background: transparent; border: 0; border-radius: var(--r-lg); text-decoration: none; color: inherit;
  opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .45s var(--ease), transform .45s var(--ease), background var(--t-fast) var(--ease); transition-delay: var(--d, 0ms); }
.ks-cat-rail.in-view .ks-cat-item { opacity: 1; transform: none; }
.ks-cat-item:hover { background: var(--brand-soft); }
.ks-cat-ico { width: 52px; height: 52px; border-radius: 50%; background: var(--lemon-100); display: flex; align-items: center; justify-content: center; font-size: 1.55rem; color: var(--text-strong);
  box-shadow: inset 0 0 0 1px var(--line-soft); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  animation: ksCatFloat 3.2s ease-in-out infinite; animation-delay: var(--d, 0ms); }
[data-theme="dark"] .ks-cat-ico { background: var(--surface-2); }
.ks-cat-ico .fa { font-size: 1.1rem; color: var(--link); }
.ks-cat-item:hover .ks-cat-ico { transform: translateY(-3px) scale(1.06); box-shadow: inset 0 0 0 1px var(--brand), 0 6px 14px rgba(0,0,0,.1); }
.ks-cat-item.active .ks-cat-ico { background: var(--brand); box-shadow: 0 0 0 2px var(--brand), 0 8px 18px rgba(0,0,0,.14); transform: scale(1.05); }
.ks-cat-item.active .ks-cat-ico .fa { color: var(--green-950); }
.ks-cat-lbl { font-size: .7rem; font-weight: 700; color: var(--text-muted); text-align: center; line-height: 1.2; min-height: 2em; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ks-cat-item.active .ks-cat-lbl { color: var(--text-strong); }
@keyframes ksCatFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
.ks-cat-progress { height: 3px; margin: 2px 16px 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ks-cat-progress span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--brand); transform: scaleX(.2); transform-origin: left center; }
@media (prefers-reduced-motion: reduce) { .ks-cat-ico { animation: none; } .ks-cat-item { opacity: 1; transform: none; transition: none; } }
@media (min-width: 901px) { .ks-cat-item { flex-basis: 92px; width: 92px; } .ks-cat-ico { width: 56px; height: 56px; font-size: 1.7rem; } }

/* ── Zone runs market page (animated, not static) ───────────── */
.zone-hero { position: relative; overflow: hidden; border-radius: var(--r-2xl); color: #fff; margin-bottom: 14px; background: var(--panel-deep); }
/* Flat solid-circle decoration (mirrors .home-hero, .wallet-hero — no gradient) */
.zone-hero::after { content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px; border-radius: 50%; background: var(--panel-deep-2); opacity: .6; pointer-events: none; }
.zone-hero__bg { position: absolute; inset: 0; overflow: hidden; opacity: .16; font-size: 5rem; pointer-events: none; }
.zone-hero__bg span { position: absolute; animation: zoneDrift 11s ease-in-out infinite; }
.zone-hero__bg span:nth-child(1) { left: 6%; top: -8px; }
.zone-hero__bg span:nth-child(2) { left: 38%; bottom: -14px; animation-delay: -3s; font-size: 3.4rem; }
.zone-hero__bg span:nth-child(3) { left: 64%; top: -6px; animation-delay: -6s; font-size: 3rem; }
.zone-hero__bg span:nth-child(4) { right: 4%; bottom: -10px; animation-delay: -8s; }
@keyframes zoneDrift { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(10px) rotate(4deg); } }
.zone-hero__inner { position: relative; z-index: 2; display: flex; gap: 14px; align-items: center; padding: 26px 24px 18px; }
.zone-hero__inner h1 { color: #fff; font-size: 1.7rem; margin: 4px 0; }
.zone-hero__inner p { color: rgba(255,255,255,.87); font-size: .95rem; margin: 0; }
.zone-hero__eyebrow { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
  padding: 4px 12px; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.zone-hero__van { margin-left: auto; font-size: 4.2rem; flex-shrink: 0; animation: zoneVan 3.4s ease-in-out infinite; filter: drop-shadow(0 10px 14px rgba(0,0,0,.3)); }
@keyframes zoneVan { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(-10px) rotate(-2deg); } }
.zone-ticker { position: relative; z-index: 2; overflow: hidden; border-top: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.18); }
.zone-ticker__track { display: inline-flex; white-space: nowrap; padding: 8px 0; font-size: .78rem; font-weight: 700; color: #fff;
  animation: zoneTick 22s linear infinite; }
.zone-ticker__track span { padding-right: 8px; }
@keyframes zoneTick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mk-run-card { opacity: 0; transform: translateY(12px); animation: mkRunIn .5s var(--ease) forwards; animation-delay: var(--d, 0ms);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-fast) var(--ease); }
@keyframes mkRunIn { to { opacity: 1; transform: none; } }
.mk-run-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.mk-run-card.is-open .order-status-pill { animation: runPulse 2s ease-in-out infinite; }
@keyframes runPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(58,130,0,.4); } 50% { box-shadow: 0 0 0 6px rgba(58,130,0,0); } }
.zone-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.zone-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; align-items: center;
  opacity: 0; transform: translateY(10px); animation: mkRunIn .5s var(--ease) forwards; animation-delay: var(--d, 0ms); }
.zone-step span { font-size: 1.3rem; } .zone-step b { font-size: .82rem; color: var(--text-strong); } .zone-step small { font-size: .72rem; color: var(--text-muted); }
@media (max-width: 600px) { .zone-steps { grid-template-columns: 1fr; } .zone-hero__van { font-size: 3rem; } }
@media (prefers-reduced-motion: reduce) { .zone-hero, .zone-hero::after, .zone-hero__bg span, .zone-hero__van, .zone-ticker__track, .mk-run-card, .zone-step { animation: none; } .mk-run-card, .zone-step { opacity: 1; transform: none; } }

/* ── Google Sign-In (shared: user modal · merchant · rider · gift claim) ──
   Classes are rendered by includes/google_auth.inc.php
   (google_auth_button / google_auth_icon). Previously unstyled, so the
   button fell back to a plain text link. */
.ga-wrap { margin: 0 0 16px; }
.btn-ga {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 50px; padding: 12px 18px;
  background: #fff; color: #1f1f1f;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font-family: var(--f-body); font-size: .92rem; font-weight: 700;
  text-decoration: none; cursor: pointer; box-sizing: border-box;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.btn-ga:hover { border-color: #bdc1c6; box-shadow: var(--shadow-md); transform: translateY(-1px); color: #1f1f1f; }
.btn-ga:active { transform: scale(.99); box-shadow: none; }
.btn-ga:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn-ga span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-ico { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ga-ico svg { display: block; }
.ga-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; }
.ga-divider::before, .ga-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ga-divider span { font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: var(--text-muted); white-space: nowrap; }
.ga-fineprint { font-size: .76rem; color: var(--text-muted); text-align: center; margin: 8px 0 0; line-height: 1.5; }
.ga-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 14px; margin: 0 0 14px;
  font-size: .85rem; color: var(--text); line-height: 1.5;
}
.ga-note-ico { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: 50%; }
.ga-note-sub { display: block; color: var(--text-muted); font-size: .8rem; margin-top: 2px; }
.ga-alt { background: none; border: none; padding: 0; margin-top: 6px; color: var(--link); font-size: .8rem; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ga-alt:hover { color: var(--brand-text); }
[data-theme="dark"] .btn-ga { background: #fff; color: #1f1f1f; border-color: #5f6368; }
[data-theme="dark"] .btn-ga:hover { border-color: #80868b; }
[data-theme="dark"] .ga-note-ico { background: #fff; }

/* ============================================================
   v9.1 — User / sender interface polish
   Flat colour only · theme-aware · zero gradients
   ============================================================ */

/* In-page anchors clear the fixed top nav (e.g. merchant #mkLive,
   wallet #tx-list) instead of hiding behind it. */
[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* Top nav — subtle flat elevation so the bar reads as a layer
   over content without a hard drop shadow in either theme. */
.kiki-nav { box-shadow: 0 1px 0 var(--line), 0 8px 24px -20px rgba(6, 21, 9, .55); }
[data-theme="dark"] .kiki-nav { box-shadow: 0 1px 0 var(--line), 0 10px 28px -22px rgba(0, 0, 0, .85); }

/* Active nav pill — a touch more presence so the current section
   is obvious at a glance (flat fill + soft ring, no gradient). */
.kl-link.active, .sb-link.active { box-shadow: 0 0 0 1px var(--btn-bg), 0 6px 16px -8px var(--brand-glow); }

/* Hover affordance for primary buttons is already solid; give the
   flat cards a crisper, more tactile lift on interactive hover. */
.stat-card, .qa-card, .quick-row, .kpi-card, .zone-card, .list-card, .menu-item {
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.stat-card:hover, .qa-card:hover, .quick-row:hover, .kpi-card:hover, .zone-card:hover, .list-card:hover, .menu-item:hover {
  transform: translateY(-2px);
}

/* Display font is now loaded (Bricolage Grotesque) — let the numeric
   figures inherit its tight, confident metrics for a cleaner rhythm. */
.stat-value, .wallet-balance, .eh-balance, .kpi-num, .admin-stat .as-val, .fee-amount, .ifc-price {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   v9.2 — Brand contrast enforcement (first principles)
   Rule: deep-green bg => lemon text ONLY. Lemon bg => deep text ONLY.
   Non-brand button fills (purple/pink/blue) are remapped to brand.
   This is a safety net for legacy inline styles; new code should use
   .btn-primary (lemon+deep) / .btn-accent/.btn-deep (deep+lemon) and
   .badge-brand / .kpi-brand directly.
   Works in light + dark: lemon (#D9F99D/#A3E635) on deep (#0A3A1E)
   is ~9:1; deep (#041A0C) on lemon is ~14:1. Both pass WCAG AA.
   ============================================================ */

/* Any button carrying a deep-green inline fill gets lemon text. */
.btn[style*="var(--accent)"],
.btn[style*="var(--green-900)"],
.btn[style*="var(--green-950)"],
.btn[style*="var(--brand-deep)"],
.btn[style*="var(--grad-hero)"],
.btn[style*="var(--grad-brand)"] {
  background: var(--green-900) !important;
  color: var(--lemon-300) !important;
  border-color: transparent !important;
}
[data-theme="dark"] .btn[style*="var(--accent)"],
[data-theme="dark"] .btn[style*="var(--green-900)"],
[data-theme="dark"] .btn[style*="var(--green-950)"] {
  background: var(--green-800) !important;
  color: var(--lemon-300) !important;
}

/* Any button carrying a non-brand fill (purple/pink/blue/teal/info)
   is forced back to the brand system: lemon bg + deep text. */
.btn[style*="var(--purple)"],
.btn[style*="var(--pink)"],
.btn[style*="var(--info)"],
.btn[style*="var(--teal)"],
.btn[style*="var(--indigo)"] {
  background: var(--btn-bg) !important;
  color: var(--btn-fg) !important;
  border-color: transparent !important;
}

/* Deep icon tiles that still use white get lemon (same contrast, on-brand). */
.zc-icon[style*="var(--accent)"],
.or-thumb[style*="var(--accent)"] { color: var(--lemon-300) !important; }

/* Non-brand badges/pills remapped to brand green system. */
.badge-purple, .status-pill.purple,
.os-transit {
  background: var(--brand-soft) !important;
  color: var(--link) !important;
  border: 1px solid var(--brand) !important;
}
.os-confirmed, .status-pill.info, .badge-info {
  background: var(--brand-soft) !important;
  color: var(--link) !important;
}
.status-pill.teal, .status-pill.pink {
  background: var(--brand-soft) !important;
  color: var(--link) !important;
}

/* Non-brand KPI / zone accents remapped to brand. */
.kpi-card.kpi-purple::before { background: var(--brand) !important; }
.kpi-card.kpi-purple .kpi-icon {
  background: var(--brand-soft) !important;
  color: var(--link) !important;
}
.zone-card .zc-icon {
  background: var(--brand-soft);
  color: var(--link);
}
.zone-card--dark .zc-icon,
.zone-card[style*="accent"] .zc-icon { color: var(--lemon-300); }
.notif-icon.purple, .notif-icon.info,
.zr-icon, .qa-icon.purple, .qa-icon.blue, .qa-icon.pink,
.qr-icon.purple, .qr-icon.pink, .s-icon.purple, .s-icon.info {
  background: var(--brand-soft) !important;
  color: var(--link) !important;
}
.zone-run-banner, .zone-run-card.is-open {
  border-color: var(--brand) !important;
  background: var(--brand-soft) !important;
}
.tb-role.super,
.admin-stat.blue .as-icon, .admin-stat.purple .as-icon,
.admin-stat.blue::before, .admin-stat.purple::before {
  background: var(--brand-soft) !important;
  color: var(--link) !important;
}
.admin-stat.blue::before, .admin-stat.purple::before { background: var(--brand) !important; }
.mkco-route__dot--end { background: var(--green-700) !important; }

/* ============================================================
   v9.3 — Mobile layout guards (first principles, 360px)
   The recurring breakage across user/rider/merchant pages:
   decorative dot separators (span.dot) sitting as lone flex
   items inside wrapping rows strand on their own line. Dots
   are pure decoration — gap spacing already separates items —
   so hide them on phones. Desktop keeps them.
   Also: tx grid uses minmax(0,1fr) so long reasons/codes wrap
   instead of pushing amounts off-screen; mc-meta wraps;
   pills/badges get crush protection. Light + dark safe
   (layout-only, no colour changes).
   ============================================================ */
.tx-item { grid-template-columns: 46px minmax(0, 1fr) auto; }
.tx-item .tx-info { min-width: 0; }
.tx-item .tx-info h5, .tx-item .tx-info small {
  overflow-wrap: anywhere; word-break: break-word; min-width: 0;
}
.tx-item .tx-amount { white-space: nowrap; flex-shrink: 0; }
.mc-meta { flex-wrap: wrap; row-gap: 6px; }
.notif-body p, .notif-body h5 { overflow-wrap: anywhere; word-break: break-word; }
.cat-badge {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  vertical-align: bottom;
}
.mk-row { grid-template-columns: 58px minmax(0, 1fr); }
.mk-row > * { min-width: 0; }
.mk-row__name { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 640px) {
  /* Orphan-dot cure: every known wrapping meta/sub row. */
  .or-info .meta .dot,
  .order-info .meta .dot,
  .order-row .meta .dot,
  .flow-card .meta .dot,
  .zone-card .zc-info .sub .dot,
  .rider-card .sub .dot,
  .mpc-info .sub .dot,
  .invite-row .meta .dot { display: none; }
  .tx-item { gap: 10px; padding: 12px 14px; }
}
