/* ============================================================
   KikiSend — Modern Design System v7
   Solid colors · 3D depth · Deep green + Lemon green
   ============================================================ */

:root {
  /* ── Core brand: deep green backbone ─────────────────────── */
  --green-950: #061509;
  --green-900: #0a2417;
  --green-800: #0d3b1f;
  --green-700: #15532b;
  --green-600: #1a6839;
  --green-500: #1f7d44;
  --green-400: #2d9556;
  --green-300: #4cb073;

  /* ── Lemon green accent ──────────────────────────────────── */
  --lemon-900: #6b8a18;
  --lemon-700: #95b81f;
  --lemon-600: #aac92a;
  --lemon-500: #c5f02d;
  --lemon-400: #d4f558;
  --lemon-300: #e3f88a;
  --lemon-200: #eef9c2;
  --lemon-100: #f5fbe1;
  --lemon-50:  #fbfee9;

  /* ── Semantic (mapped from the above) ────────────────────── */
  --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(197, 240, 45, 0.14);
  --brand-glow:     rgba(197, 240, 45, 0.45);
  --brand-ink:      var(--green-900);

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

  /* ── Status / utility ────────────────────────────────────── */
  --info:        #2563eb;
  --info-soft:   rgba(37, 99, 235, 0.10);
  --warn:        #d97706;
  --warn-soft:   rgba(217, 119, 6, 0.10);
  --danger:      #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.10);
  --success:     var(--green-600);
  --success-soft:rgba(26, 104, 57, 0.10);
  --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 ────────────────────────────────────────────── */
  --bg:          #f6fbf3;
  --bg-2:        #ecf3e0;
  --surface:     #ffffff;
  --surface-2:   #f4f8ee;
  --surface-3:   #e8efde;
  --card:        #ffffff;
  --card-hover:  #f9fcf3;
  --nav:         rgba(255, 255, 255, 0.85);
  --sidebar:     #ffffff;
  --sidebar-head:#f4f8ee;

  --input:       #f4f8ee;
  --input-focus: #ffffff;
  --input-border:#dfe7d2;

  /* ── Text ────────────────────────────────────────────────── */
  --text:        #1f2a1c;
  --text-strong: #0a2417;
  --text-muted:  #5b6a52;
  --text-dim:    #8a9582;
  --on-deep:     #e8f5d8;
  --on-deep-mut: rgba(232, 245, 216, 0.75);

  /* ── Borders ─────────────────────────────────────────────── */
  --line:        #e1ead4;
  --line-strong: #cad6b6;
  --line-soft:   #eef3e2;

  --scrim:       rgba(10, 36, 23, 0.62);

  /* ── Shadows (solid color shadows for 3D, no gradient blur) ─ */
  --shadow-xs:   0 1px 2px rgba(10, 36, 23, .06), 0 0 0 1px rgba(10, 36, 23, .04);
  --shadow-sm:   0 2px 4px rgba(10, 36, 23, .06), 0 4px 12px rgba(10, 36, 23, .06);
  --shadow-md:   0 4px 8px rgba(10, 36, 23, .08), 0 8px 24px rgba(10, 36, 23, .08);
  --shadow-lg:   0 8px 16px rgba(10, 36, 23, .10), 0 16px 40px rgba(10, 36, 23, .10);
  --shadow-xl:   0 12px 24px rgba(10, 36, 23, .12), 0 24px 56px rgba(10, 36, 23, .14);
  --shadow-card: 0 1px 0 rgba(10,36,23,.04), 0 6px 18px rgba(10,36,23,.06);
  --shadow-card-hover: 0 2px 0 rgba(10,36,23,.05), 0 16px 32px rgba(10,36,23,.12);

  /* ── 3D specific shadows ─────────────────────────────────── */
  --shadow-3d-sm: 0 1px 0 var(--green-800), 0 2px 0 var(--green-900), 0 4px 12px rgba(10,36,23,.15);
  --shadow-3d:    0 2px 0 var(--green-800), 0 4px 0 var(--green-900), 0 8px 20px rgba(10,36,23,.18);
  --shadow-3d-lg: 0 3px 0 var(--green-800), 0 6px 0 var(--green-900), 0 12px 28px rgba(10,36,23,.22);
  --shadow-lemon: 0 2px 0 var(--lemon-700), 0 4px 0 var(--lemon-900), 0 8px 24px rgba(197,240,45,.35);
  --shadow-lemon-sm: 0 1px 0 var(--lemon-700), 0 3px 0 var(--lemon-900), 0 6px 16px rgba(197,240,45,.30);

  /* ── Radius ──────────────────────────────────────────────── */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-2xl: 32px;
  --r-3xl: 40px;
  --r-pill: 999px;

  /* ── Layout ──────────────────────────────────────────────── */
  --nav-h: 70px;
  --bottom-h: 76px;
  --container: 1280px;
  --container-sm: 960px;

  /* ── Type ────────────────────────────────────────────────── */
  --f-body: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-disp: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --f-num:  'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

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

[data-theme="dark"] {
  --brand:          var(--lemon-500);
  --brand-hover:    var(--lemon-400);
  --brand-active:   var(--lemon-600);
  --brand-deep:     var(--green-900);
  --brand-darker:   #030a05;
  --brand-rich:     var(--green-700);
  --brand-mid:      var(--green-500);
  --brand-light:    rgba(197, 240, 45, 0.10);
  --brand-soft:     rgba(197, 240, 45, 0.10);
  --brand-glow:     rgba(197, 240, 45, 0.35);

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

  --info:    #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.14);
  --warn:    #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.14);
  --danger:  #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --purple:  #a78bfa;
  --purple-soft: rgba(167, 139, 250, 0.14);
  --teal:    #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.14);
  --pink:    #f472b6;
  --pink-soft: rgba(244, 114, 182, 0.14);
  --indigo:  #818cf8;
  --indigo-soft: rgba(129, 140, 248, 0.14);

  --bg:        #061509;
  --bg-2:      #0a1f10;
  --surface:   #0d2417;
  --surface-2: #112e1d;
  --surface-3: #163823;
  --card:      #0d2417;
  --card-hover:#112e1d;
  --nav:       rgba(6, 21, 9, 0.88);
  --sidebar:   #0a1f10;
  --sidebar-head: #112e1d;

  --input:     #112e1d;
  --input-focus: #163823;
  --input-border: #1f4a2d;

  --text:        #e6f0d9;
  --text-strong: #ffffff;
  --text-muted:  #9aaf8b;
  --text-dim:    #6b7c61;

  --line:        #1a3d24;
  --line-strong: #244a30;
  --line-soft:   #112e1d;

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

  --shadow-xs:   0 1px 2px rgba(0,0,0,.5);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.45);
  --shadow-md:   0 8px 24px rgba(0,0,0,.5);
  --shadow-lg:   0 16px 40px rgba(0,0,0,.55);
  --shadow-xl:   0 24px 56px rgba(0,0,0,.6);
  --shadow-card: 0 1px 0 rgba(255,255,255,.04), 0 6px 18px rgba(0,0,0,.4);
  --shadow-card-hover: 0 2px 0 rgba(255,255,255,.06), 0 16px 32px rgba(0,0,0,.55);

  --shadow-3d-sm: 0 1px 0 var(--green-700), 0 2px 0 var(--green-900), 0 4px 12px rgba(0,0,0,.4);
  --shadow-3d:    0 2px 0 var(--green-700), 0 4px 0 var(--green-900), 0 8px 20px rgba(0,0,0,.5);
  --shadow-3d-lg: 0 3px 0 var(--green-700), 0 6px 0 var(--green-900), 0 12px 28px rgba(0,0,0,.55);
  --shadow-lemon: 0 2px 0 var(--lemon-700), 0 4px 0 var(--lemon-900), 0 8px 24px rgba(0,0,0,.6);
  --shadow-lemon-sm: 0 1px 0 var(--lemon-700), 0 3px 0 var(--lemon-900), 0 6px 16px rgba(0,0,0,.5);
}

/* ── Base reset ────────────────────────────────────────────── */
*, *::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;
  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; }

::selection { background: var(--brand); color: var(--green-900); }

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

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

/* ── Headings ──────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--f-disp); font-weight: 800; letter-spacing: -.025em; color: var(--text-strong); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.25; }
h4 { font-size: 1.05rem; line-height: 1.3; }
p { color: var(--text); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
  width: 100%;
  letter-spacing: -.005em;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-sm { padding: 9px 14px; font-size: .85rem; border-radius: var(--r-sm); width: auto; }
.btn-lg { padding: 16px 28px; font-size: 1rem; border-radius: var(--r-md); }

/* Primary CTA — solid lemon with solid 3D green drop-shadow */
.btn-primary {
  background: var(--brand);
  color: var(--green-900);
  box-shadow: var(--shadow-lemon-sm);
}
.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lemon);
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--lemon-900), 0 0 0 rgba(0,0,0,0);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-strong);
  border-color: var(--line-strong);
  box-shadow: 0 2px 0 var(--line-strong);
}
.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--green-500);
  color: var(--green-700);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--green-300);
}
.btn-secondary:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--line-strong); }

.btn-ghost { background: transparent; color: var(--text-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--green-700); }

.btn-accent {
  background: var(--green-700);
  color: #fff;
  box-shadow: var(--shadow-3d-sm);
}
.btn-accent:hover { background: var(--green-800); transform: translateY(-1px); box-shadow: var(--shadow-3d); }
.btn-accent:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--green-900); }

.btn-deep {
  background: var(--green-900);
  color: var(--lemon-300);
  box-shadow: 0 2px 0 #000, 0 6px 16px rgba(0,0,0,.2);
}
.btn-deep:hover { background: var(--green-800); transform: translateY(-1px); }
.btn-deep:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }

.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 2px 0 #991b1b, 0 6px 14px rgba(220,38,38,.25); }
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }
.btn-danger:active { transform: translateY(2px); box-shadow: 0 1px 0 #991b1b; }

.btn-outline {
  background: transparent;
  color: var(--green-700);
  border-color: var(--green-700);
  box-shadow: 0 2px 0 var(--green-300);
}
.btn-outline:hover { background: var(--green-700); color: var(--lemon-300); transform: translateY(-1px); }
.btn-outline:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--green-300); }

/* ── Inputs ────────────────────────────────────────────────── */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: .85rem; font-weight: 600;
  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"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--input);
  border: 1px solid var(--input-border);
  border-radius: var(--r-md);
  font-size: .95rem;
  color: var(--text-strong);
  transition: all var(--t-fast) var(--ease);
  outline: none;
}
.ks-input:focus,
.ks-search-input:focus,
input:focus,
select:focus,
textarea:focus {
  background: var(--input-focus);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.ks-search-input::placeholder,
input::placeholder { color: var(--text-dim); }
select {
  appearance: none; -webkit-appearance: none;
  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 14px center;
  padding-right: 40px;
}
.field-error { color: var(--danger); font-size: .82rem; margin-top: 6px; font-weight: 600; }
.field-hint  { color: var(--text-muted); font-size: .82rem; margin-top: 6px; }

.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);
}
.pw-toggle:hover { background: var(--surface-2); color: var(--text-strong); }

/* ── Top Navigation ────────────────────────────────────────── */
.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: 50;
  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-hamburger {
  width: 40px; height: 40px;
  display: none; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: background var(--t-fast) var(--ease);
}
.kiki-hamburger:hover { background: var(--brand-soft); border-color: var(--brand); }
.kiki-hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--green-800);
  border-radius: 2px;
  transition: transform var(--t-base) var(--ease), opacity var(--t-fast) var(--ease);
}
.kiki-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.kiki-hamburger.open span:nth-child(2) { opacity: 0; }
.kiki-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 900px) { .kiki-hamburger { display: flex; } }

.kiki-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.05rem;
  color: var(--text-strong);
  letter-spacing: -.02em;
}
/* Brand mark with 3D solid shadow */
.kb-ball {
  width: 38px; height: 38px;
  background: var(--brand);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--green-900);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0;
  box-shadow: 0 2px 0 var(--lemon-700), 0 4px 0 var(--lemon-900), 0 6px 12px rgba(197,240,45,.30);
  position: relative;
  overflow: hidden;
}
.kb-ball img { width: 100%; height: 100%; object-fit: cover; }
.kb-label { color: var(--text-strong); font-weight: 800; }

.kiki-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}
@media (max-width: 900px) { .kiki-links { display: none; } }

.kl-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--r-pill);
  transition: all var(--t-fast) var(--ease);
}
.kl-link:hover { background: var(--brand-soft); color: var(--green-700); }
.kl-link.active { background: var(--brand); color: var(--green-900); box-shadow: 0 2px 0 var(--lemon-900), 0 4px 12px rgba(197,240,45,.35); }
.kl-link i { font-size: .85rem; }

.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: all var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--brand-soft); color: var(--green-700); border-color: var(--brand); transform: translateY(-1px); }
.icon-btn:active { transform: translateY(1px); }
.notif-dot {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  background: var(--danger);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: .65rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--surface);
}

/* Wallet pill — solid 3D lemon */
.wallet-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: var(--r-pill);
  font-weight: 800; font-size: .85rem;
  transition: all var(--t-fast) var(--ease);
  border: 1px solid var(--lemon-700);
  box-shadow: 0 2px 0 var(--lemon-900), 0 4px 12px rgba(197,240,45,.30);
}
.wallet-pill:hover { background: var(--brand-hover); transform: translateY(-1px); box-shadow: 0 3px 0 var(--lemon-900), 0 6px 14px rgba(197,240,45,.45); }
.wallet-pill:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--lemon-900); }
.wallet-pill i { font-size: .8rem; }

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

.user-drop-wrap { position: relative; }
.user-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  transition: all var(--t-fast) var(--ease);
  border: 1px solid var(--line);
}
.user-btn:hover { background: var(--brand-soft); border-color: var(--brand); }
.nav-avatar {
  width: 32px; height: 32px;
  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;
  box-shadow: 0 2px 0 var(--green-900);
}
.uname { font-size: .9rem; font-weight: 600; color: var(--text-strong); }
@media (max-width: 600px) { .uname { display: none; } }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px); right: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--t-fast) var(--ease);
  z-index: 60;
}
.user-drop-wrap.open .user-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.user-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: .9rem;
  color: var(--text);
  transition: background var(--t-fast) var(--ease);
}
.user-dropdown a:hover { background: var(--brand-soft); color: var(--green-800); }
.user-dropdown a i { color: var(--green-700); width: 16px; text-align: center; }
.user-dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.user-dropdown .ud-danger { color: var(--danger); }
.user-dropdown .ud-header {
  padding: 10px 12px;
  font-size: .78rem;
  color: var(--text-muted);
}
.user-dropdown .ud-header strong { display: block; color: var(--text-strong); margin-top: 2px; font-weight: 700; font-size: .9rem; }

/* ── Sidebar ───────────────────────────────────────────────── */
.kiki-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 300px;
  max-width: 86vw;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  z-index: 70;
  transform: translateX(-100%);
  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; justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.sb-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: .95rem;
  letter-spacing: -.02em;
  color: var(--text-strong);
}
.sb-ball {
  width: 38px; height: 38px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  box-shadow: 0 2px 0 var(--lemon-700), 0 4px 0 var(--lemon-900);
  overflow: hidden;
}
.sb-ball img { width: 100%; height: 100%; object-fit: cover; }
.sb-close {
  width: 38px; height: 38px;
  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);
  transition: all 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;
  padding: 18px 20px;
  background: var(--sidebar-head);
  border-bottom: 1px solid var(--line);
}
.sbu-name { font-weight: 700; color: var(--text-strong); font-size: .95rem; }
.sbu-wallet { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }

.sb-body { flex: 1; overflow-y: auto; padding: 12px 0; }
.sb-section {
  font-size: .7rem; font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 14px 20px 8px;
}
.sb-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  font-size: .92rem;
  color: var(--text);
  transition: background var(--t-fast) var(--ease);
  border-radius: 0;
  position: relative;
}
.sb-link:hover { background: var(--surface-2); }
.sb-link.active {
  color: var(--green-800);
  background: var(--brand-soft);
  font-weight: 700;
}
.sb-link.active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 4px;
  background: var(--brand);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px var(--brand-glow);
}
.sbl-icon { width: 18px; 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: 10px 20px; }
.sb-danger { color: var(--danger); }

.sb-foot { padding: 16px 20px; border-top: 1px solid var(--line); }
.sb-theme-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .9rem;
  color: var(--text);
}
.theme-pill {
  width: 44px; height: 26px;
  background: var(--surface-3);
  border-radius: var(--r-pill);
  position: relative;
  transition: background var(--t-base) var(--ease);
  border: 1px solid var(--line);
}
.theme-pill .tp-track { width: 100%; height: 100%; position: relative; }
.theme-pill .tp-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: var(--brand);
  border-radius: 50%;
  transition: transform var(--t-base) var(--ease);
  box-shadow: 0 1px 0 var(--lemon-900);
}
[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: 65;
  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 Mobile Nav ─────────────────────────────────────── */
.mob-bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 12px; right: 12px;
  height: var(--bottom-h);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  display: none;
  align-items: center;
  justify-content: space-around;
  z-index: 60;
  box-shadow: 0 12px 32px rgba(10,36,23,.18), 0 2px 6px rgba(10,36,23,.08);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: 6px;
}
@media (max-width: 900px) {
  .mob-bottom-nav { display: flex; }
}
.mob-nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  height: 100%;
  border-radius: var(--r-lg);
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--t-fast) var(--ease);
}
.mob-nav-item:hover { color: var(--green-700); }
.mob-nav-item.active {
  color: var(--green-900);
  background: var(--brand);
  box-shadow: 0 2px 0 var(--lemon-900), 0 4px 10px rgba(197,240,45,.35);
}
.mob-nav-item i { font-size: 1.05rem; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.3); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  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(-10px); }
}
@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); }
}

.animate-in {
  opacity: 0;
  animation: fadeUp .55s var(--ease) forwards;
}
.animate-in-1 { animation-delay: .06s; }
.animate-in-2 { animation-delay: .12s; }
.animate-in-3 { animation-delay: .18s; }
.animate-in-4 { animation-delay: .24s; }
.animate-in-5 { animation-delay: .30s; }
.animate-in-6 { animation-delay: .36s; }

/* ── Modals ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: var(--scrim);
  z-index: 90;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
}
@media (min-width: 700px) {
  .modal-overlay { align-items: center; }
}
.modal-overlay.show { display: flex; animation: fadeIn .2s var(--ease); }
.modal-sheet {
  background: var(--surface);
  border-radius: var(--r-2xl);
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 24px;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: fadeUp .3s var(--ease);
}
.modal-handle {
  display: block;
  width: 40px; height: 4px;
  background: var(--line-strong);
  border-radius: 2px;
  margin: -16px auto 16px;
}
@media (min-width: 700px) { .modal-handle { display: none; } }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border-radius: 50%;
  color: var(--text-muted);
  transition: all var(--t-fast) var(--ease);
  border: 1px solid var(--line);
}
.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: 38px; height: 38px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 2px 0 var(--lemon-700), 0 4px 0 var(--lemon-900);
  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: 10px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--r-pill);
  transition: all var(--t-fast) var(--ease);
}
.modal-tabs button.active {
  background: var(--brand);
  color: var(--green-900);
  box-shadow: 0 2px 0 var(--lemon-900), 0 4px 10px rgba(197,240,45,.35);
}
.auth-title { font-size: 1.4rem; margin-bottom: 4px; }
.auth-sub { color: var(--text-muted); font-size: .92rem; }


/* ============================================================
   LANDING PAGE � Strategic use of k3.jpg (landscape hero),
   k1.jpg (square features), k2.jpg (square rider section)
   Solid colors � 3D believable depth � No gradients
   ============================================================ */

.home-feed {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* -- HERO (with k3.jpg landscape image) --------------------- */
.home-hero {
  position: relative;
  padding: 56px 48px;
  border-radius: var(--r-3xl);
  background: var(--green-900);
  color: var(--on-deep);
  overflow: hidden;
  margin-bottom: 32px;
  min-height: 380px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 32px;
  align-items: center;
  box-shadow: 0 14px 0 #03100a, 0 28px 60px rgba(6,21,9,.45);
}
.home-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--green-800);
  opacity: .35;
  pointer-events: none;
}
.home-hero::after {
  content: "";
  position: absolute; right: -120px; bottom: -120px;
  width: 380px; height: 380px;
  background: var(--green-800);
  border-radius: 50%;
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 580px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--green-800);
  border: 1px solid var(--green-700);
  border-radius: var(--r-pill);
  font-size: .76rem; font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 22px;
  color: var(--lemon-300);
}
.hero-badge .pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(197,240,45,.7);
  animation: pulse 2s ease-in-out infinite;
}
.home-hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: 18px;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.035em;
}
.home-hero h1 .highlight {
  color: var(--lemon-400);
  font-style: italic;
  position: relative;
  display: inline-block;
}
.home-hero h1 .highlight::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 6px;
  background: var(--brand);
  border-radius: 3px;
  opacity: .6;
  z-index: -1;
}
.home-hero p {
  color: var(--on-deep-mut);
  max-width: 520px;
  margin-bottom: 28px;
  font-size: 1.05rem;
  line-height: 1.55;
}
.hero-search {
  display: flex; gap: 8px;
  background: var(--surface);
  padding: 6px;
  border-radius: var(--r-pill);
  max-width: 540px;
  box-shadow: 0 4px 0 var(--green-950), 0 14px 28px rgba(0,0,0,.35);
}
.hero-search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 12px 18px;
  font-size: .95rem;
  color: var(--text-strong);
  font-weight: 500;
}
.hero-search input:focus { box-shadow: none; outline: none; }
.hero-search input::placeholder { color: var(--text-dim); }
.hero-search button {
  padding: 12px 24px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: var(--r-pill);
  font-weight: 800;
  font-size: .9rem;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 2px 0 var(--lemon-900), 0 4px 12px rgba(197,240,45,.35);
}
.hero-search button:hover { background: var(--brand-hover); transform: translateY(-1px); }
.hero-search button:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--lemon-900); }

.hero-stats {
  display: flex; gap: 36px;
  margin-top: 32px;
  position: relative; z-index: 2;
  flex-wrap: wrap;
}
.hero-stat .stat-num {
  font-family: var(--f-num);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--lemon-300);
  line-height: 1;
}
.hero-stat .stat-label {
  font-size: .78rem;
  color: var(--on-deep-mut);
  font-weight: 500;
  margin-top: 4px;
}

/* 3D tilted image frame (k3.jpg landscape) */
.hero-image {
  position: relative;
  z-index: 2;
  display: none;
  perspective: 1200px;
}
@media (min-width: 1000px) { .hero-image { display: block; } }

/* Tablet (801-999px) — use the landscape image as the hero background
   instead of the side frame, since the side frame would crowd the content */
@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;
    box-shadow: 0 14px 0 #03100a, 0 28px 60px rgba(6,21,9,.55);
  }
  .home-hero::before {
    background: var(--green-950);
    opacity: .7;
  }
  .home-hero h1 { color: #fff; }
  .home-hero p { color: rgba(232, 245, 216, .92); }
}
.hero-image-frame {
  position: relative;
  background: var(--lemon-300);
  border-radius: var(--r-2xl);
  padding: 8px;
  transform: rotate(-3deg);
  box-shadow:
    0 6px 0 var(--green-700),
    0 12px 0 var(--green-800),
    0 22px 50px rgba(0,0,0,.55);
  transition: transform var(--t-slow) var(--ease-spring);
}
.hero-image-frame:hover { transform: rotate(-1deg) translateY(-4px); }
.hero-image-frame img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: calc(var(--r-2xl) - 8px);
}
.hero-image-tag {
  position: absolute;
  top: -18px; right: -18px;
  background: var(--brand);
  color: var(--green-900);
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: .8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 0 var(--lemon-900), 0 8px 16px rgba(0,0,0,.35);
  transform: rotate(6deg);
  animation: float 4s ease-in-out infinite;
}
.hero-image-tag::before { content: "?"; font-size: 1rem; }
.hero-image-card {
  position: absolute;
  bottom: -22px; left: -28px;
  background: var(--surface);
  color: var(--text-strong);
  padding: 14px 16px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 2px 0 var(--line);
  transform: rotate(-4deg);
  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;
  box-shadow: 0 2px 0 var(--lemon-900);
}
.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; }

@media (max-width: 800px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: 56px 24px 44px;
    min-height: 460px;
    background-image: url('../images/k3.jpg');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    color: var(--on-deep);
    box-shadow: 0 14px 0 #03100a, 0 28px 60px rgba(6,21,9,.55);
  }
  /* Strong dark overlay so the text stays readable over the photo */
  .home-hero::before {
    background: var(--green-950);
    opacity: .72;
  }
  /* Keep the green decorative circle on mobile too */
  .home-hero::after {
    width: 260px; height: 260px;
    right: -80px; bottom: -80px;
    background: var(--green-800);
    opacity: .55;
  }
  .home-hero h1 { color: #fff; }
  .home-hero p { color: rgba(232, 245, 216, .92); }
  .hero-badge { color: var(--lemon-300); }
  .hero-stats { gap: 22px; }
  .hero-stat .stat-num { font-size: 1.45rem; }
  .hero-stat .stat-label { font-size: .74rem; }
  .hero-search { box-shadow: 0 4px 0 var(--green-950), 0 14px 28px rgba(0,0,0,.45); }
}

@media (max-width: 480px) {
  .home-hero {
    padding: 48px 18px 36px;
    min-height: 420px;
    background-position: 70% center;
  }
  .hero-search { padding: 5px; }
  .hero-search input { padding: 11px 14px; font-size: .9rem; }
  .hero-search button { padding: 11px 18px; font-size: .85rem; }
}

/* -- Sticky Search Header ------------------------------------ */
.home-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
  padding: 0 4px;
  position: relative;
  z-index: 50;
}
.home-loc-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: .88rem; font-weight: 700;
  color: var(--text-strong);
  transition: all var(--t-fast) var(--ease);
  max-width: 50%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: var(--shadow-card);
}
.home-loc-pill:hover { background: var(--brand-soft); border-color: var(--brand); transform: translateY(-1px); }
.home-loc-pill:active { transform: translateY(1px); }
.home-loc-pill .pin-icon { color: var(--green-700); font-size: .9rem; }
.home-search { flex: 1; position: relative; z-index: 60; }
.home-search .search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--green-700);
  font-size: .9rem;
  pointer-events: none;
  z-index: 2;
}
.home-search .ks-search-input {
  padding-left: 42px;
  padding-right: 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-card);
  font-size: .92rem;
}
.home-search .search-dropdown,
.home-search > .search-dropdown { z-index: 61 !important; }

/* -- Category grid ------------------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.cat-grid-item {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 26px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  transition: all var(--t-base) var(--ease);
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.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 {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--brand);
}
.cat-grid-item:hover::before { opacity: 1; }
.cat-grid-item.selected {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--green-900);
  box-shadow: 0 4px 0 var(--lemon-900), 0 12px 24px rgba(197,240,45,.35);
}
.cat-grid-item.selected .cat-name { color: var(--green-900); }
.cat-grid-item.selected .cat-count { color: var(--green-800); }
.cat-grid-item .cat-icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-lg);
  background: var(--bg-accent, var(--brand-soft));
  font-size: 1.8rem;
  transition: transform var(--t-base) var(--ease-spring);
  border: 2px solid var(--line);
}
.cat-grid-item:hover .cat-icon {
  transform: scale(1.1) rotate(-5deg);
  border-color: var(--brand);
}
.cat-grid-item .cat-name {
  font-size: .95rem; font-weight: 800;
  color: var(--text-strong);
  margin-top: 4px;
}
.cat-grid-item .cat-count {
  font-size: .76rem;
  color: var(--text-muted);
  margin-top: -4px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cat-grid-item { padding: 16px 8px; border-radius: var(--r-lg); }
  .cat-grid-item .cat-icon { width: 52px; height: 52px; font-size: 1.45rem; }
  .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 (solid colors) ---------------------------- */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.promo-card {
  position: relative;
  padding: 28px 26px;
  border-radius: var(--r-2xl);
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--t-base) var(--ease);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.promo-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.promo-card .promo-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: var(--r-pill);
  font-size: .7rem; font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  width: fit-content;
  position: relative; z-index: 1;
  box-shadow: 0 2px 0 var(--lemon-900);
}
.promo-card h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
  color: #fff;
  position: relative; z-index: 1;
  margin-top: 14px;
  letter-spacing: -.02em;
}
.promo-card p {
  font-size: .88rem;
  opacity: .88;
  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;
  opacity: .95;
  z-index: 1;
}
.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-700); color: var(--green-900); }
.promo-card.promo-pink p { color: rgba(10,36,23,.85); }
.promo-card.promo-pink h3 { color: var(--green-900); }
.promo-card.promo-pink .promo-tag { background: var(--green-900); color: var(--lemon-300); box-shadow: 0 2px 0 #000; }

/* -- Section title ------------------------------------------- */
.hf-section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 36px 4px 18px;
  gap: 12px;
}
.hf-section-title h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -.025em;
}
.hf-section-title .meta-text {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}
.hf-section-title a {
  font-size: .88rem; font-weight: 700; color: var(--green-700);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: background var(--t-fast) var(--ease);
  border: 1px solid transparent;
}
.hf-section-title a:hover { background: var(--brand-soft); border-color: var(--brand); }

/* -- Carousel ------------------------------------------------ */
.hf-carousel {
  display: flex; gap: 16px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 6px 16px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.hf-carousel::-webkit-scrollbar { display: none; }
.hf-carousel > * { scroll-snap-align: start; }

/* -- Featured merchant card ---------------------------------- */
.feat-card {
  flex: 0 0 270px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--t-base) var(--ease);
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow-card);
}
.feat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--brand);
}
.fc-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  background: var(--lemon-100);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.fc-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.feat-card:hover .fc-cover img { transform: scale(1.08); }
.fc-emoji {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
}
.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: 4px 10px;
  border-radius: var(--r-pill);
  font-size: .7rem; font-weight: 800;
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 2px 0 var(--line-strong), 0 4px 8px rgba(10,36,23,.12);
}
.fc-badge-new { background: var(--brand); color: var(--green-900); box-shadow: 0 2px 0 var(--lemon-900); }
.fc-badge-closed { background: var(--danger); color: #fff; box-shadow: 0 2px 0 #991b1b; }
.fc-badge-rating { }
.fc-badge-rating .star { color: var(--warn); }

.fc-body { padding: 14px 16px 18px; }
.fc-body h4 {
  font-size: 1.02rem;
  margin-bottom: 6px;
  letter-spacing: -.01em;
}
.fc-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem;
  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;
}

/* -- Regular merchant card (square 1:1) --------------------- */
.rec-card {
  flex: 0 0 190px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--t-base) var(--ease);
  position: relative;
  box-shadow: var(--shadow-card);
}
.rec-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--brand);
}
.rc-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--lemon-100);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.rc-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.rec-card:hover .rc-cover img { transform: scale(1.08); }
.rc-emoji {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.save-heart {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
  background: var(--surface);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  box-shadow: 0 2px 0 var(--line-strong), 0 4px 8px rgba(10,36,23,.12);
  transition: all var(--t-fast) var(--ease);
  z-index: 2;
  border: 1px solid var(--line);
}
.save-heart:hover { transform: scale(1.1); color: var(--danger); border-color: var(--danger); }
.save-heart.saved { color: var(--danger); background: var(--surface); }
.rc-body { padding: 12px 14px 14px; }
.rc-body h4 {
  font-size: .92rem;
  margin-bottom: 2px;
  font-weight: 800;
}
.rc-cat { font-size: .76rem; color: var(--text-muted); font-weight: 600; }

/* -- Why us -------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.feature-card {
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  transition: all var(--t-base) var(--ease);
  box-shadow: var(--shadow-card);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--brand);
}
.feat-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 14px;
  box-shadow: 0 3px 0 rgba(0,0,0,.08);
}
.feature-card h4 { font-size: 1.05rem; margin-bottom: 6px; }
.feature-card p { color: var(--text-muted); font-size: .88rem; line-height: 1.5; }

/* -- CTA Banner (deep green with 3D depth) ----------------- */
.cta-banner {
  position: relative;
  padding: 52px 32px;
  border-radius: var(--r-2xl);
  background: var(--green-900);
  color: var(--on-deep);
  text-align: center;
  overflow: hidden;
  margin-top: 32px;
  box-shadow: 0 12px 0 #03100a, 0 24px 50px rgba(6,21,9,.4);
}
.cta-banner::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--green-800);
  opacity: .35;
  pointer-events: none;
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin-bottom: 12px;
  letter-spacing: -.025em;
}
.cta-banner p {
  color: var(--on-deep-mut);
  margin-bottom: 26px;
  font-size: 1rem;
  max-width: 500px;
  margin-inline: auto;
}
.cta-banner .btn {
  background: var(--brand);
  color: var(--green-900);
  width: auto;
  padding: 16px 32px;
  display: inline-flex;
  box-shadow: 0 4px 0 var(--lemon-900), 0 10px 22px rgba(197,240,45,.40);
}
.cta-banner .btn:hover { background: var(--brand-hover); transform: translateY(-2px); }
.cta-banner .btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--lemon-900); }

/* -- Stats strip --------------------------------------------- */
.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: 36px;
  box-shadow: var(--shadow-card);
}
.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-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 12px;
  box-shadow: 0 3px 0 rgba(0,0,0,.06);
}
.stat-tile .stat-value {
  font-family: var(--f-num);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1;
}
.stat-tile .stat-text {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

/* -- How it works -------------------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.step-card {
  text-align: center;
  padding: 32px 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  position: relative;
  box-shadow: var(--shadow-card);
  transition: all var(--t-base) var(--ease);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.step-card .step-num {
  position: absolute;
  top: -18px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 36px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: .95rem;
  box-shadow: 0 3px 0 var(--lemon-900), 0 6px 12px rgba(197,240,45,.35);
  border: 2px solid var(--surface);
}
.step-card .step-emoji {
  font-size: 2.6rem;
  margin-bottom: 12px;
  display: block;
}
.step-card h4 { margin-bottom: 6px; }
.step-card p { color: var(--text-muted); font-size: .88rem; }

/* -- Testimonials -------------------------------------------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}
.testimonial-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  transition: all var(--t-base) var(--ease);
  position: relative;
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.testimonial-card .stars {
  color: var(--warn);
  margin-bottom: 12px;
  font-size: .95rem;
  letter-spacing: 2px;
}
.testimonial-card p {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
}
.testimonial-user { display: flex; align-items: center; gap: 10px; }
.testimonial-user .avatar {
  width: 40px; height: 40px;
  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;
  box-shadow: 0 2px 0 var(--green-900);
}
.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; }

/* -- App download / footer cta ------------------------------- */
.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: 36px;
  box-shadow: var(--shadow-card);
  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 {
  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;
  box-shadow: var(--shadow-3d-sm);
  transition: all var(--t-fast) var(--ease);
}
.app-cta-actions .store-btn:hover { background: var(--green-800); transform: translateY(-1px); box-shadow: var(--shadow-3d); }
.app-cta-actions .store-btn small { display: block; font-size: .7rem; font-weight: 500; opacity: .8; }

.app-cta-visual { display: flex; justify-content: center; align-items: center; }
.phone-mockup {
  width: 220px; height: 440px;
  background: var(--green-900);
  border-radius: 36px;
  padding: 8px;
  box-shadow: var(--shadow-xl), 0 6px 0 #03100a;
  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: 28px;
  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;
  box-shadow: 0 2px 0 var(--line);
}

/* -- Image showcase (uses k1.jpg + k2.jpg) ------------------- */
.image-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 36px;
  align-items: stretch;
}
.showcase-tile {
  position: relative;
  background: var(--green-900);
  border-radius: var(--r-2xl);
  overflow: hidden;
  padding: 12px;
  box-shadow: 0 8px 0 #03100a, 0 18px 40px rgba(6,21,9,.35);
  transition: transform var(--t-slow) var(--ease-spring);
}
.showcase-tile:hover { transform: translateY(-6px) rotate(-1deg); }
.showcase-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: calc(var(--r-2xl) - 8px);
  display: block;
}
.showcase-tile .showcase-caption {
  position: absolute;
  bottom: 18px; left: 18px; right: 18px;
  background: var(--brand);
  color: var(--green-900);
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 0 var(--lemon-900);
  border: 1px solid var(--lemon-700);
  max-width: max-content;
}
@media (max-width: 700px) {
  .image-showcase { grid-template-columns: 1fr; }
  .showcase-tile img { aspect-ratio: 16 / 10; }
}

/* -- Web3 feature wall (3D layered cards) -------------------- */
.feature-wall {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 36px;
}
@media (max-width: 800px) { .feature-wall { grid-template-columns: 1fr; } }
.fw-main {
  background: var(--green-900);
  color: var(--on-deep);
  padding: 36px;
  border-radius: var(--r-2xl);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 0 #03100a, 0 22px 50px rgba(6,21,9,.4);
}
.fw-main::before {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 240px; height: 240px;
  background: var(--green-800);
  border-radius: 50%;
  pointer-events: none;
}
.fw-main > * { position: relative; z-index: 1; }
.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-900); width: auto; box-shadow: 0 4px 0 var(--lemon-900); }
.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: all var(--t-base) var(--ease);
  box-shadow: var(--shadow-card);
}
.fw-side-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-card-hover); }
.fw-side-card .fwsc-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--green-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 10px;
  box-shadow: 0 2px 0 var(--brand);
}
.fw-side-card h4 { font-size: 1rem; margin-bottom: 4px; }
.fw-side-card p { color: var(--text-muted); font-size: .84rem; }

/* -- Prime location sheet ------------------------------------ */
.prime-backdrop {
  position: fixed; inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(4px);
  z-index: 80;
  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: 380px;
  background: var(--surface);
  border-radius: var(--r-2xl);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow-xl);
  z-index: 85;
  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.2rem; font-weight: 800; margin-bottom: 6px; color: var(--text-strong); }
.ps-sub { color: var(--text-muted); font-size: .9rem; 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: 600;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  transition: background var(--t-fast) var(--ease);
}
.ps-dismiss:hover { background: var(--surface-2); color: var(--text-strong); }


/* ============================================================
   USER PAGES � Dashboard, Discover, Merchant, Orders, Wallet
   ============================================================ */

.dash-greeting {
  padding: 24px 4px 8px;
}
.dash-greeting h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 6px;
}
.dash-greeting p { color: var(--text-muted); }

.dash-banner {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px;
  background: var(--green-900);
  color: var(--on-deep);
  border-radius: var(--r-2xl);
  margin-bottom: 24px;
  box-shadow: 0 8px 0 #03100a, 0 16px 36px rgba(6,21,9,.35);
  position: relative;
  overflow: hidden;
}
.dash-banner::before {
  content:"";
  position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: var(--green-800);
  border-radius: 50%;
  pointer-events: none;
}
.dash-banner > * { position: relative; z-index: 1; }
.dash-banner .db-emoji {
  font-size: 2.4rem;
  background: var(--brand);
  color: var(--green-900);
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 var(--lemon-900);
  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;
  margin-bottom: 24px;
}
.search-bar > i {
  position: absolute;
  left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--green-700);
  font-size: .9rem;
  pointer-events: none;
}
.search-bar .ks-search-input {
  padding-left: 46px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-card);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  transition: all var(--t-fast) var(--ease);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--green-600);
}
.stat-card.brand::before { background: var(--brand); }
.stat-card.warn::before { background: var(--warn); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.stat-card .stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stat-card .stat-value {
  font-family: var(--f-num);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -.02em;
}
.stat-card .stat-value.brand { color: var(--green-700); }
.stat-card .stat-value.warn  { color: var(--warn); }

/* Live order card */
.live-order-card {
  display: block;
  padding: 20px 22px;
  background: var(--green-900);
  color: #fff;
  border-radius: var(--r-xl);
  box-shadow: 0 8px 0 #03100a, 0 14px 28px rgba(6,21,9,.4);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast) var(--ease);
}
.live-order-card:hover { transform: translateY(-3px); }
.live-order-card::after {
  content: "";
  position: absolute; right: -20px; top: -20px;
  width: 120px; height: 120px;
  background: var(--green-800);
  border-radius: 50%;
}
.live-order-card > * { position: relative; z-index: 1; }
.live-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: var(--r-pill);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 2px 0 var(--lemon-900);
  animation: pulse 1.6s ease-in-out infinite;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.qa-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  transition: all var(--t-fast) var(--ease);
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-card);
}
.qa-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.qa-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 3px 0 rgba(0,0,0,.08);
}
.qa-icon.green  { background: var(--brand-soft); color: var(--green-700); }
.qa-icon.teal   { background: var(--teal-soft); color: var(--teal); }
.qa-icon.pink   { background: var(--pink-soft); color: var(--pink); }
.qa-icon.purple { background: var(--purple-soft); color: var(--purple); }
.qa-icon.orange { background: var(--accent-light); color: var(--accent); }
.qa-icon.blue   { background: var(--info-soft); color: var(--info); }
.qa-card h4 { font-size: .95rem; margin-bottom: 2px; }
.qa-card small { color: var(--text-muted); font-size: .78rem; font-weight: 500; }

/* Merchant tile (followed) */
.merchant-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none; color: inherit;
  display: block;
  box-shadow: var(--shadow-card);
}
.merchant-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.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);
}
.merchant-tile h4 { padding: 12px 14px 2px; font-size: .92rem; font-weight: 800; }
.merchant-tile small { padding: 0 14px 14px; display: block; color: var(--text-muted); font-size: .78rem; font-weight: 500; }

/* -- DISCOVER PAGE ------------------------------------------- */
.discover-header {
  position: sticky;
  top: var(--nav-h);
  z-index: 30;
  background: var(--bg);
  padding: 18px 0 14px;
  margin-bottom: 8px;
}
.discover-search {
  position: relative;
  margin-bottom: 14px;
}
.discover-search > i {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--green-700);
}
.discover-search .ks-search-input {
  padding-left: 46px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.discover-tabs {
  display: flex; gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px;
  scrollbar-width: none;
}
.discover-tabs::-webkit-scrollbar { display: none; }
.discover-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
  box-shadow: 0 2px 0 var(--line);
}
.discover-tab:hover { background: var(--brand-soft); border-color: var(--brand); transform: translateY(-1px); }
.discover-tab.active {
  background: var(--green-900);
  color: var(--lemon-300);
  border-color: var(--green-900);
  box-shadow: 0 3px 0 #03100a;
}

.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.merchant-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--t-base) var(--ease);
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
}
.merchant-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.mc-cover {
  position: relative;
  aspect-ratio: 16 / 11;
  background: var(--lemon-100);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.mc-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.merchant-card:hover .mc-cover img { transform: scale(1.08); }
.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: 4px 10px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 800;
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 2px 0 var(--line-strong), 0 4px 8px rgba(10,36,23,.12);
}
.mc-badge-new { background: var(--brand); color: var(--green-900); box-shadow: 0 2px 0 var(--lemon-900); }
.mc-badge-closed { background: var(--danger); color: #fff; box-shadow: 0 2px 0 #991b1b; }
.mc-badge-open { background: var(--brand); color: var(--green-900); box-shadow: 0 2px 0 var(--lemon-900); }
.mc-badge-rating { display: inline-flex; align-items: center; gap: 4px; }
.mc-badge-rating .star { color: var(--warn); }
.mc-fav {
  margin-left: auto;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: .95rem;
  box-shadow: 0 2px 0 var(--line-strong), 0 4px 8px rgba(10,36,23,.12);
  transition: all var(--t-fast) var(--ease);
  border: 1px solid var(--line);
}
.mc-fav:hover { transform: scale(1.1); color: var(--danger); border-color: var(--danger); }
.mc-fav.saved { color: var(--danger); }
.mc-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.mc-body h4 { font-size: 1.05rem; margin-bottom: 4px; letter-spacing: -.01em; }
.mc-cat { font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 600; }
.mc-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: .82rem;
  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(--green-700); }
.mc-meta .dot { width: 3px; height: 3px; background: var(--text-dim); border-radius: 50%; }
.mc-delivery {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: .8rem;
  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 ----------------------------------------- */
.merchant-card-detail {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-2xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  border: 1px solid var(--line);
}
.merchant-head {
  display: flex; gap: 18px; align-items: flex-start;
  margin-bottom: 18px;
}
.merchant-logo {
  width: 88px; height: 88px;
  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;
  box-shadow: 0 3px 0 var(--line);
}
.merchant-logo img { width: 100%; height: 100%; object-fit: cover; }
.merchant-meta { flex: 1; }
.merchant-meta h1 { font-size: 1.5rem; 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 10px;
  background: var(--brand-soft);
  color: var(--green-800);
  border-radius: var(--r-pill);
  font-size: .78rem;
  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: .76rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.merchant-info-item .value { font-size: 1rem; font-weight: 800; color: var(--text-strong); margin-top: 2px; }

.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 {
  padding: 8px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
  color: var(--text-muted);
  box-shadow: 0 2px 0 var(--line);
}
.menu-cat-btn.active {
  background: var(--green-900);
  color: var(--lemon-300);
  border-color: var(--green-900);
  box-shadow: 0 3px 0 #03100a;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.menu-item {
  display: flex; gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: all var(--t-fast) var(--ease);
  box-shadow: var(--shadow-card);
}
.menu-item:hover { box-shadow: var(--shadow-card-hover); border-color: var(--brand); transform: translateY(-2px); }
.menu-item-info { flex: 1; min-width: 0; }
.menu-item-info h4 { font-size: .98rem; margin-bottom: 4px; }
.menu-item-info .desc { font-size: .82rem; 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 { font-weight: 800; color: var(--text-strong); font-size: 1rem; }
.menu-item-img {
  width: 96px; height: 96px;
  border-radius: var(--r-md);
  background: var(--lemon-100);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
}
.menu-item-img img { width: 100%; height: 100%; object-fit: cover; }
.menu-item-img .add-btn {
  position: absolute;
  right: -8px; bottom: -8px;
  width: 34px; height: 34px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 0 var(--lemon-900), 0 4px 8px rgba(0,0,0,.15);
  transition: all var(--t-fast) var(--ease-spring);
  border: 1px solid var(--lemon-700);
}
.menu-item-img .add-btn:hover {
  background: var(--brand-hover);
  transform: scale(1.1) rotate(90deg);
}

/* -- ORDERS / ORDER DETAIL ----------------------------------- */
.order-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin-bottom: 12px;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none; color: inherit;
  align-items: center;
  box-shadow: var(--shadow-card);
}
.order-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.order-thumb {
  width: 72px; height: 72px;
  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;
}
.order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-info h4 { font-size: .98rem; margin-bottom: 4px; }
.order-info .meta {
  display: flex; gap: 8px;
  font-size: .78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.order-info .meta .dot { width: 3px; height: 3px; background: var(--text-dim); border-radius: 50%; align-self: center; }
.order-right { text-align: right; }
.order-right .price { font-weight: 800; color: var(--text-strong); font-size: 1rem; }
.order-status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 800;
  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(--green-800); border: 1px solid var(--brand); }
.os-cancelled  { background: var(--danger-soft); color: var(--danger); }
.os-refunded   { background: var(--surface-3); color: var(--text-muted); }

/* Order detail page */
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}
@media (max-width: 900px) { .order-detail-grid { grid-template-columns: 1fr; } }

.tracking-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.tracking-timeline {
  position: relative;
  padding-left: 24px;
}
.tracking-timeline::before {
  content: "";
  position: absolute;
  left: 11px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding-bottom: 20px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -24px; top: 4px;
  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(--brand);
  border-color: var(--lemon-700);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.timeline-item.done::before {
  background: var(--brand);
  border-color: var(--lemon-700);
}
.timeline-item .step-time { font-size: .76rem; color: var(--text-muted); margin-top: 2px; }
.timeline-item h5 { font-size: .95rem; font-weight: 800; margin-bottom: 2px; }
.timeline-item p { font-size: .82rem; color: var(--text-muted); }

.order-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 20px;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  box-shadow: var(--shadow-card);
}
.order-summary h4 { margin-bottom: 14px; font-size: 1.05rem; }
.summary-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: .9rem;
  color: var(--text);
}
.summary-row.total {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-strong);
  border-top: 1px solid var(--line);
  margin-top: 8px; padding-top: 14px;
}

/* -- WALLET -------------------------------------------------- */
.wallet-hero {
  position: relative;
  padding: 32px;
  background: var(--green-900);
  border-radius: var(--r-2xl);
  color: #fff;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 12px 0 #03100a, 0 24px 50px rgba(6,21,9,.45);
}
.wallet-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--green-800);
  opacity: .35;
  pointer-events: none;
}
.wallet-hero::after {
  content: "";
  position: absolute; right: -80px; top: -80px;
  width: 280px; height: 280px;
  background: var(--green-800);
  border-radius: 50%;
  pointer-events: none;
}
.wallet-hero > * { position: relative; z-index: 1; }
.wallet-label {
  font-size: .82rem;
  opacity: .75;
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px;
}
.wallet-balance {
  font-family: var(--f-num);
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 18px;
  line-height: 1;
  color: var(--lemon-300);
}
.wallet-actions {
  display: flex; gap: 10px;
  flex-wrap: wrap;
}
.wallet-actions .btn {
  width: auto;
  background: var(--surface);
  color: var(--green-900);
  border: 1px solid var(--surface);
  box-shadow: 0 3px 0 var(--lemon-900);
}
.wallet-actions .btn:hover { background: var(--brand); transform: translateY(-1px); }
.wallet-actions .btn-primary { background: var(--brand); color: var(--green-900); }

.tx-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.tx-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  padding: 14px 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: 44px; height: 44px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.tx-icon.credit  { background: var(--brand-soft); color: var(--green-800); border: 1px solid var(--brand); }
.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: .92rem; font-weight: 800; margin-bottom: 2px; }
.tx-info small { font-size: .76rem; color: var(--text-muted); font-weight: 500; }
.tx-amount { font-weight: 800; font-family: var(--f-num); }
.tx-amount.credit { color: var(--green-700); }
.tx-amount.debit  { color: var(--text-strong); }

/* -- SEND PARCEL / GIFT -------------------------------------- */
.flow-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.flow-card h3 { margin-bottom: 4px; }
.flow-card .flow-sub { color: var(--text-muted); font-size: .9rem; margin-bottom: 18px; }

.step-indicator {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 24px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}
.step-indicator .step {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-muted);
}
.step-indicator .step .num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: .78rem;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.step-indicator .step.active { color: var(--green-800); }
.step-indicator .step.active .num { background: var(--brand); color: var(--green-900); border-color: var(--lemon-700); box-shadow: 0 2px 0 var(--lemon-900); }
.step-indicator .step.done { color: var(--text-strong); }
.step-indicator .step.done .num { background: var(--green-700); color: var(--lemon-300); border-color: var(--green-800); }
.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(--green-700); }

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.option-card {
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  text-align: center;
  box-shadow: 0 2px 0 var(--line);
}
.option-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 3px 0 var(--brand); }
.option-card.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 3px 0 var(--lemon-900); }
.option-card .opt-emoji { font-size: 1.8rem; margin-bottom: 8px; }
.option-card .opt-name { font-weight: 800; font-size: .9rem; margin-bottom: 2px; }
.option-card .opt-meta { font-size: .76rem; color: var(--text-muted); }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.summary-strip .ss-item .ss-label { font-size: .76rem; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.summary-strip .ss-item .ss-value { font-size: 1rem; font-weight: 800; color: var(--text-strong); }

/* -- TRACKING ------------------------------------------------ */
.track-hero {
  position: relative;
  height: 280px;
  background: var(--green-900);
  border-radius: var(--r-2xl);
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 0 #03100a, 0 16px 36px rgba(6,21,9,.4);
}
.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: 56px; height: 56px;
  background: var(--brand);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--green-900);
  font-size: 1.4rem;
  margin-bottom: 12px;
  box-shadow: 0 4px 0 var(--lemon-900), 0 12px 24px rgba(0,0,0,.5);
  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; }

.rider-card {
  display: flex; gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin-bottom: 18px;
  align-items: center;
  box-shadow: var(--shadow-card);
}
.rider-avatar {
  width: 56px; height: 56px;
  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;
  box-shadow: 0 3px 0 var(--green-900);
}
.rider-info { flex: 1; }
.rider-info h4 { font-size: 1rem; margin-bottom: 2px; }
.rider-info .sub { color: var(--text-muted); font-size: .85rem; font-weight: 500; }
.rider-actions { display: flex; gap: 8px; }
.rider-actions .icon-btn {
  background: var(--brand-soft);
  color: var(--green-700);
  border-color: var(--brand);
}
.rider-actions .icon-btn:hover { background: var(--brand); color: var(--green-900); }


/* -- ACCOUNT / NOTIFICATIONS --------------------------------- */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.settings-card h4 {
  padding: 18px 20px 12px;
  font-size: 1rem;
}
.settings-list { display: flex; flex-direction: column; }
.settings-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: background var(--t-fast) var(--ease);
}
.settings-item:hover { background: var(--brand-soft); }
.settings-item .s-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.settings-item .s-icon.brand   { background: var(--brand-soft); color: var(--green-800); }
.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: .92rem; font-weight: 800; margin-bottom: 2px; }
.settings-item .s-info small { color: var(--text-muted); font-size: .8rem; }
.settings-item .s-arrow { color: var(--text-dim); font-size: .85rem; }

.notif-card {
  display: flex; gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin-bottom: 10px;
  align-items: flex-start;
  position: relative;
  transition: all var(--t-fast) var(--ease);
  box-shadow: var(--shadow-card);
}
.notif-card.unread { border-color: var(--brand); background: var(--brand-soft); }
.notif-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.notif-icon.brand   { background: var(--brand); color: var(--green-900); box-shadow: 0 2px 0 var(--lemon-900); }
.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: .92rem; margin-bottom: 2px; font-weight: 800; }
.notif-body p { font-size: .82rem; color: var(--text-muted); line-height: 1.4; }
.notif-body .time { font-size: .74rem; color: var(--text-dim); margin-top: 4px; }

/* -- RESPONSIVE ---------------------------------------------- */
@media (max-width: 700px) {
  .order-detail-grid { grid-template-columns: 1fr; }
  .order-card { grid-template-columns: 56px 1fr auto; gap: 10px; padding: 12px; }
  .order-thumb { width: 56px; height: 56px; font-size: 1.5rem; }
  .order-info h4 { font-size: .9rem; }
  .menu-item-img { width: 80px; height: 80px; }
  .merchant-head { flex-direction: column; align-items: center; text-align: center; }
  .step-indicator { padding: 10px; }
  .step-indicator .step span:not(.num) { display: none; }
  .hero-image { display: none !important; }
  .stat-tile:not(:last-child)::after { display: none; }
  .stats-strip { padding: 18px; }
}


/* ============================================================
   TOAST, CONFIRM MODAL & LEGACY COMPAT
   ============================================================ */

.toast-queue {
  position: fixed;
  bottom: 100px;
  left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
}
.kiki-toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--green-900);
  color: var(--lemon-300);
  border-radius: var(--r-pill);
  font-size: .9rem;
  font-weight: 700;
  box-shadow: 0 6px 0 #03100a, 0 12px 28px rgba(6,21,9,.4);
  opacity: 0;
  transform: translateY(20px);
  transition: all .3s var(--ease);
  max-width: 360px;
}
.kiki-toast.show { opacity: 1; transform: translateY(0); }
.kiki-toast .toast-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
}
.kiki-toast.success .toast-icon { background: var(--brand); color: var(--green-900); }
.kiki-toast.error .toast-icon { background: var(--danger); color: #fff; }
.kiki-toast.success { background: var(--green-900); color: var(--lemon-300); }
.kiki-toast.error { background: var(--danger); color: #fff; box-shadow: 0 6px 0 #991b1b, 0 12px 28px rgba(220,38,38,.4); }
.kiki-toast .toast-close {
  margin-left: 4px;
  opacity: .7;
  font-size: .9rem;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.kiki-toast .toast-close:hover { opacity: 1; background: rgba(255,255,255,.1); }

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

.invalid { border-color: var(--danger) !important; }
.invalid:focus { box-shadow: 0 0 0 4px var(--danger-soft) !important; }

/* Confirm modal */
.confirm-box {
  background: var(--surface);
  border-radius: var(--r-2xl);
  padding: 32px 28px;
  text-align: center;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-xl);
}
.confirm-icon { font-size: 3rem; margin-bottom: 16px; display: block; }
.confirm-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; color: var(--text-strong); }
.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; }

.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(10,36,23,.3);
  border-top-color: var(--green-900);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* Section page hero (used on user pages) */
.page-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.page-hero h1 { font-size: 1.5rem; margin-bottom: 4px; }
.page-hero p { color: var(--text-muted); font-size: .95rem; }

/* Filter pills */
.filter-row {
  display: flex; gap: 8px;
  overflow-x: auto;
  margin: 0 -16px 18px;
  padding: 0 16px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
  box-shadow: 0 2px 0 var(--line);
}
.filter-pill:hover { background: var(--brand-soft); border-color: var(--brand); transform: translateY(-1px); }
.filter-pill.active { background: var(--brand); color: var(--green-900); border-color: var(--lemon-700); box-shadow: 0 3px 0 var(--lemon-900); }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.badge-brand   { background: var(--brand-soft); color: var(--green-800); border: 1px solid var(--brand); }
.badge-warn    { background: var(--warn-soft); color: var(--warn); }
.badge-danger  { background: var(--danger-soft); color: var(--danger); }
.badge-info    { background: var(--info-soft); color: var(--info); }
.badge-purple  { background: var(--purple-soft); color: var(--purple); }
.badge-neutral { background: var(--surface-3); color: var(--text-muted); }

/* Mobile app promo / downloads */
.store-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.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);
  box-shadow: var(--shadow-3d-sm);
  transition: all var(--t-fast) var(--ease);
}
.store-badge:hover { background: var(--green-800); transform: translateY(-1px); }
.store-badge:active { transform: translateY(1px); box-shadow: 0 1px 0 #000; }
.store-badge small { font-size: .68rem; opacity: .8; }
.store-badge .ss-name { display: block; font-size: .9rem; font-weight: 800; }

/* Chip group */
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { background: var(--brand-soft); color: var(--green-800); border-color: var(--brand); }
.chip.active { background: var(--green-900); color: var(--lemon-300); border-color: var(--green-900); }


/* ============================================================
   MERCHANT PAGE � Menu, Add Button, Cart Bar
   ============================================================ */

.menu-item-img .add-btn {
  position: absolute;
  right: -10px; bottom: -10px;
  width: 36px; height: 36px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  box-shadow: 0 2px 0 var(--lemon-900), 0 4px 8px rgba(0,0,0,.15);
  transition: all var(--t-fast) var(--ease-spring);
  border: 1px solid var(--lemon-700);
}
.menu-item-img .add-btn:hover {
  background: var(--brand-hover);
  transform: scale(1.1) rotate(90deg);
}

.cart-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 60;
  width: calc(100% - 32px);
  max-width: 480px;
  transition: transform .3s var(--ease-spring);
}
.cart-bar.show { transform: translateX(-50%) translateY(0); }
.cart-bar .btn {
  box-shadow: 0 6px 0 var(--lemon-900), 0 14px 32px rgba(197,240,45,.40);
  border-radius: var(--r-pill);
  padding: 16px 24px;
}
@media (max-width: 900px) {
  .cart-bar { bottom: calc(var(--bottom-h) + 16px); }
}

.menu-item .price { color: var(--text-strong); font-weight: 800; font-size: 1rem; }
.menu-item.unavailable { opacity: .55; }

.merchant-cover {
  position: relative;
  width: 100%;
  height: 200px;
  background: var(--green-900);
  overflow: hidden;
  margin-top: -16px;
  margin-bottom: -60px;
}
.merchant-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.merchant-cover::after {
  content: ""; position: absolute; inset: 0;
  background: var(--green-900);
  opacity: .35;
}
.merchant-cover { display: none; }


/* ============================================================
   ORDER DETAILS � Stars, Order Timeline Polish
   ============================================================ */

.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; }

/* Order timeline visual steps */
.order-timeline {
  display: flex; align-items: center; gap: 6px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin-bottom: 16px;
  overflow-x: auto;
  box-shadow: var(--shadow-card);
}
.order-timeline .step {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  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(--green-800); border-color: var(--brand); }
.order-timeline .step.active { background: var(--brand); color: var(--green-900); border-color: var(--lemon-700); box-shadow: 0 2px 0 var(--lemon-900); }
.order-timeline .sep { color: var(--text-dim); font-size: .85rem; }


/* ============================================================
   MAP & ADDITIONAL HELPERS
   ============================================================ */

.tracking-map {
  width: 100%;
  height: 300px;
  border-radius: var(--r-xl);
  overflow: hidden;
}

/* Footer (landing page) */
.landing-footer {
  margin-top: 40px;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  text-align: center;
  box-shadow: var(--shadow-card);
}
.landing-footer h3 { margin-bottom: 8px; }
.landing-footer p { color: var(--text-muted); margin-bottom: 18px; }

/* List card legacy compatibility */
.list-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin-bottom: 12px;
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
}
.list-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.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; }

/* Status pill */
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 800;
}
.status-pill.warn   { background: var(--warn-soft); color: var(--warn); }
.status-pill.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 { background: var(--purple-soft); color: var(--purple); }
.status-pill.danger { background: var(--danger-soft); color: var(--danger); }
.status-pill.muted  { background: var(--surface-3); color: var(--text-muted); }
.status-pill.green  { background: var(--brand-soft); color: var(--green-800); border: 1px solid var(--brand); }

/* Amounts (wallet) */
.amount-pos { color: var(--green-700); font-weight: 800; font-family: var(--f-num); }
.amount-neg { color: var(--text-strong); font-weight: 800; font-family: var(--f-num); }

/* Card legacy */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.card h3 { margin-bottom: 12px; font-size: 1.05rem; }
.card.glow { box-shadow: 0 0 0 4px var(--brand-soft); }

/* Page header (legacy) */
.page-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0 16px;
  gap: 16px;
}
.page-h h1 { font-size: 1.5rem; }
.page-h p { color: var(--text-muted); font-size: .92rem; }

/* Section helpers (legacy) */
.section { padding-block: 18px; }
.section-h { display: flex; justify-content: space-between; align-items: center; }

/* Gift card (legacy) */
.gift-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: var(--r-lg);
  transition: all var(--t-fast) var(--ease);
}
.gift-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.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: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.gift-card .gc-meta h4 { font-size: .95rem; margin-bottom: 2px; }
.gift-card .gc-meta small { color: var(--text-muted); font-size: .78rem; }

/* Zone run banner (legacy) */
.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: .82rem; margin: 0; }

/* Zone run card (legacy) */
.zone-run-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  transition: all var(--t-fast) var(--ease);
  box-shadow: var(--shadow-card);
}
.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: 1rem; margin-bottom: 4px; }
.zone-run-card .zr-meta small { display: block; color: var(--text-muted); font-size: .82rem; }

/* Merchant grid (legacy) */
.merchant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

/* Dot animation */
.dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--brand);
  border-radius: 50%;
  margin-right: 6px;
}

/* Cart line (legacy compat) */
.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: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.cart-qty button:hover { background: var(--brand); color: var(--green-900); border-color: var(--lemon-700); }
.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); }

/* Pay method tab buttons */
.pay-method {
  padding: 10px 14px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--r-md);
  transition: all var(--t-fast) var(--ease);
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.pay-method.active { background: var(--brand); color: var(--green-900); border-color: var(--lemon-700); box-shadow: 0 2px 0 var(--lemon-900); }

/* Point card (legacy) */
.point-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.point-card .pc-line { display: flex; gap: 14px; align-items: flex-start; }
.point-card .pc-num {
  width: 36px; height: 36px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 0 var(--lemon-900);
}
.point-card .pc-meta { flex: 1; }
.point-card .pc-meta h4 { font-size: 1rem; margin-bottom: 2px; }

/* Item card (legacy) */
.item-card {
  display: flex; gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 10px;
  align-items: center;
  box-shadow: var(--shadow-card);
}
.item-card.unavailable { opacity: .55; }
.item-card .item-photo {
  width: 72px; height: 72px;
  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);
}
.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: .98rem; margin-bottom: 4px; }
.item-card .item-info p { font-size: .82rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 6px; }
.item-card .item-price { font-weight: 800; color: var(--text-strong); font-size: 1rem; }
.item-card .item-actions { flex-shrink: 0; }


/* ============================================================
   SEARCH WIDGET DROPDOWN
   ============================================================ */

.search-dropdown {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  max-height: 380px;
  overflow-y: auto;
  z-index: 9999;
}
.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: .76rem; 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: 12px;
  font-weight: 800;
  color: var(--green-700);
  font-size: .85rem;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.search-see-all:hover { background: var(--brand-soft); }


/* ============================================================
   MERCHANT PAGES
   Dashboard, Orders, Items, Earnings, Zone Runs
   ============================================================ */

.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: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 32px 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-brand .ab-ball {
  width: 38px; height: 38px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 2px 0 var(--lemon-700), 0 4px 0 var(--lemon-900);
  overflow: hidden;
}
.auth-brand .ab-ball img { width: 100%; height: 100%; object-fit: cover; }
.auth-title { font-size: 1.5rem; margin-bottom: 6px; }
.auth-sub { color: var(--text-muted); margin-bottom: 22px; font-size: .92rem; }
.auth-foot { color: var(--text-muted); font-size: .85rem; text-align: center; margin-top: 14px; }
.auth-foot a { color: var(--green-700); font-weight: 700; }
.btn-block { width: 100%; }

/* Merchant dashboard hero */
.merchant-hero {
  position: relative;
  padding: 32px;
  border-radius: var(--r-2xl);
  background: var(--green-900);
  color: var(--on-deep);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 10px 0 #03100a, 0 22px 50px rgba(6,21,9,.4);
}
.merchant-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--green-800);
  opacity: .35;
  pointer-events: none;
}
.merchant-hero > * { position: relative; z-index: 2; }
.merchant-hero h1 { color: #fff; font-size: 1.7rem; margin-bottom: 6px; }
.merchant-hero p { color: var(--on-deep-mut); }
.merchant-hero .mh-stats {
  display: flex; gap: 28px; margin-top: 20px; flex-wrap: wrap;
}
.merchant-hero .mh-stats .mhs { display: flex; flex-direction: column; }
.merchant-hero .mh-stats .mhs-num {
  font-family: var(--f-num);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--lemon-300);
  line-height: 1;
}
.merchant-hero .mh-stats .mhs-label {
  font-size: .78rem;
  color: var(--on-deep-mut);
  font-weight: 600;
  margin-top: 4px;
}

/* Status toggle pill */
.status-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  font-size: .85rem;
  font-weight: 700;
  box-shadow: 0 2px 0 var(--line);
}
.status-toggle:hover { border-color: var(--brand); }
.status-toggle .dot {
  width: 10px; height: 10px;
  background: var(--text-dim);
  border-radius: 50%;
  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 (merchant view) */
.order-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin-bottom: 10px;
  align-items: center;
  transition: all var(--t-fast) var(--ease);
  box-shadow: var(--shadow-card);
}
.order-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.order-row .or-thumb {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  background: var(--lemon-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  color: var(--text-strong);
  font-weight: 800;
  border: 1px solid var(--line);
}
.order-row .or-info { min-width: 0; }
.order-row .or-info h4 { font-size: .98rem; margin-bottom: 4px; }
.order-row .or-info .meta { font-size: .82rem; color: var(--text-muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.order-row .or-info .meta .dot { width: 3px; height: 3px; background: var(--text-dim); border-radius: 50%; align-self: center; }
.order-row .or-price { font-family: var(--f-num); font-weight: 800; color: var(--text-strong); font-size: 1rem; }
.order-row .or-action { display: flex; gap: 6px; }

/* Items / Menu management */
.items-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  border-collapse: collapse;
  box-shadow: var(--shadow-card);
}
.items-table thead { background: var(--surface-2); }
.items-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  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: .9rem;
  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: 48px; height: 48px;
  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);
}
.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: .85rem; }
.items-table .item-stock.in-stock { color: var(--green-700); 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 edit modal */
.item-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 { grid-template-columns: 1fr; } }

/* Earnings dashboard */
.earnings-hero {
  position: relative;
  padding: 32px;
  border-radius: var(--r-2xl);
  background: var(--green-900);
  color: #fff;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 12px 0 #03100a, 0 24px 50px rgba(6,21,9,.45);
}
.earnings-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--green-800);
  opacity: .35;
  pointer-events: none;
}
.earnings-hero > * { position: relative; z-index: 2; }
.earnings-hero .eh-label { font-size: .82rem; opacity: .75; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.earnings-hero .eh-balance {
  font-family: var(--f-num);
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 6px;
  line-height: 1;
  color: var(--lemon-300);
}
.earnings-hero .eh-trend {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: var(--r-pill);
  font-size: .82rem;
  font-weight: 800;
  box-shadow: 0 2px 0 var(--lemon-900);
}
.earnings-hero .eh-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.earnings-hero .eh-actions .btn {
  width: auto;
  background: var(--surface);
  color: var(--green-900);
  border: 1px solid var(--surface);
  box-shadow: 0 3px 0 var(--lemon-900);
}
.earnings-hero .eh-actions .btn:hover { background: var(--brand); transform: translateY(-1px); }
.earnings-hero .eh-actions .btn-primary { background: var(--brand); color: var(--green-900); }

/* Chart placeholder */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.chart-card h4 { margin-bottom: 14px; font-size: 1rem; }
.chart-bars {
  display: flex; gap: 8px;
  height: 160px;
  align-items: flex-end;
  padding: 8px 0;
}
.chart-bar {
  flex: 1;
  background: var(--brand);
  border: 1px solid var(--lemon-700);
  border-bottom: 0;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  min-height: 8px;
  position: relative;
  transition: opacity var(--t-fast) var(--ease);
  box-shadow: 0 2px 0 var(--lemon-700);
}
.chart-bar:hover { opacity: .85; }
.chart-bar .cb-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .68rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.chart-bar .cb-value {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .68rem;
  font-weight: 800;
  color: var(--text-strong);
  white-space: nowrap;
}

/* Zone run card (merchant view) */
.zone-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--t-fast) var(--ease);
  box-shadow: var(--shadow-card);
}
.zone-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-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: 1rem; margin-bottom: 4px; }
.zone-card .zc-info .sub { font-size: .82rem; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.zone-card .zc-info .sub .dot { width: 3px; height: 3px; background: var(--text-dim); border-radius: 50%; align-self: center; }
.zone-card .zc-stat {
  font-family: var(--f-num);
  font-weight: 800;
  color: var(--text-strong);
  font-size: 1.1rem;
}
.zone-card .zc-stat small { display: block; font-size: .72rem; font-weight: 600; color: var(--text-muted); }

/* Pickup-style bubble for merchant mobile nav */
.mob-nav-pick { position: relative; }
.mob-pick-bubble {
  width: 52px; height: 52px;
  background: var(--brand);
  color: var(--green-900);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-top: -22px;
  box-shadow: 0 4px 0 var(--lemon-900), 0 8px 18px rgba(197,240,45,.35);
  border: 1px solid var(--lemon-700);
  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; letter-spacing: .04em; margin-top: 2px; }

/* Loyalty stamp card */
.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-900);
  border-style: solid;
  box-shadow: 0 2px 0 var(--lemon-900);
}

/* Notification toast (merchants) */
.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.pending { background: var(--warn-soft); border-color: var(--warn); }
.merchant-status-banner.suspended { background: var(--danger-soft); border-color: var(--danger); }
.merchant-status-banner .msb-icon {
  width: 40px; height: 40px;
  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; }
.merchant-status-banner h5 { font-size: .95rem; font-weight: 800; color: var(--text-strong); }
.merchant-status-banner p { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }

/* Toggle switch */
.ks-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  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);
}
.ks-toggle::after {
  content: "";
  position: absolute;
  top: 1px; left: 1px;
  width: 20px; height: 20px;
  background: var(--surface);
  border-radius: 50%;
  transition: transform var(--t-base) var(--ease);
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.ks-toggle.on { background: var(--green-700); border-color: var(--green-800); }
.ks-toggle.on::after { transform: translateX(20px); }

/* Inline edit row */
.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; }

/* Account section (merchant) */
.merchant-profile-card {
  display: flex; align-items: center; gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}
.merchant-profile-card .mpc-logo {
  width: 88px; height: 88px;
  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;
  box-shadow: 0 3px 0 var(--green-900);
}
.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.4rem; 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; }


/* ============================================================
   MERCHANT DASHBOARD POLISH
   KPI cards, quick rows, two-column dashboard grid
   ============================================================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.kpi-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--brand);
  transition: width var(--t-base) var(--ease);
}
.kpi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: var(--brand); }
.kpi-card:hover::before { width: 6px; }
.kpi-card .kpi-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform var(--t-base) var(--ease);
  box-shadow: 0 3px 0 rgba(0,0,0,.06);
}
.kpi-card:hover .kpi-icon { transform: scale(1.1) rotate(-5deg); }
.kpi-card .kpi-body { flex: 1; min-width: 0; }
.kpi-card .kpi-num {
  font-family: var(--f-num);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1;
  letter-spacing: -.02em;
}
.kpi-card .kpi-label {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kpi-card .kpi-sub {
  font-size: .76rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.kpi-card .kpi-arrow {
  color: var(--text-dim);
  font-size: .85rem;
  transition: all var(--t-fast) var(--ease);
}
.kpi-card:hover .kpi-arrow { color: var(--green-700); 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(--green-800); border: 1px solid var(--brand); }
.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);
  transition: all var(--t-fast) var(--ease);
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
}
.quick-row:hover { background: var(--brand-soft); border-color: var(--brand); transform: translateX(4px); }
.quick-row .qr-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.quick-row .qr-icon.green  { background: var(--brand-soft); color: var(--green-800); }
.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; }
.quick-row .qr-info strong { display: block; font-size: .92rem; font-weight: 800; color: var(--text-strong); }
.quick-row .qr-info small { font-size: .76rem; color: var(--text-muted); font-weight: 600; }
.quick-row .qr-arrow { color: var(--text-dim); font-size: .78rem; transition: transform var(--t-fast) var(--ease); }
.quick-row:hover .qr-arrow { transform: translateX(4px); color: var(--green-700); }


/* ============================================================
   DATE / TIME INPUTS � modern calendar picker styling
   ============================================================ */

input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"] {
  font-family: var(--f-body);
  font-feature-settings: "tnum";
  color: var(--text-strong);
}

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 {
  background: transparent;
  cursor: pointer;
  height: 22px;
  width: 22px;
  margin-left: 6px;
  opacity: .55;
  transition: opacity var(--t-fast) var(--ease);
  filter: invert(var(--picker-invert, 0));
}
[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 {
  --picker-invert: 1;
  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;
}

input[type="datetime-local"] { min-height: 46px; position: relative; }
input[type="datetime-local"]:focus { background: var(--input-focus); }

/* Time field placeholder */
input[type="time"] { font-variant-numeric: tabular-nums; }


/* ============================================================
   ADMIN PANEL � sidebar shell + admin tables + admin cards
   ============================================================ */

.kb-admin {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.admin-sidebar {
  width: 250px;
  min-width: 250px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  z-index: 70;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.admin-main {
  margin-left: 250px;
  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: 12px;
  border-bottom: 1px solid var(--line);
}
.asb-brand .asb-ball {
  width: 38px; height: 38px;
  background: var(--brand);
  color: var(--green-900);
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 0 var(--lemon-700), 0 4px 0 var(--lemon-900);
  overflow: hidden;
}
.asb-brand .asb-ball img { width: 100%; height: 100%; object-fit: cover; }
.asb-brand .asb-info { min-width: 0; }
.asb-brand .asb-name {
  font-weight: 800;
  font-size: .98rem;
  color: var(--text-strong);
  letter-spacing: -.02em;
}
.asb-brand .asb-sub {
  font-size: .65rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: .06em;
  display: block;
  text-transform: uppercase;
}

.asb-nav { padding: 14px 10px; flex: 1; }
.asb-section {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  padding: 14px 12px 6px;
  font-weight: 800;
}
.asb-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--t-fast) var(--ease);
  margin-bottom: 2px;
}
.asb-link:hover { background: var(--brand-soft); color: var(--green-800); }
.asb-link.active {
  background: var(--green-900);
  color: var(--lemon-300);
  font-weight: 800;
  box-shadow: 0 3px 0 #03100a;
}
.asb-link .asb-ico { width: 18px; text-align: center; font-size: .85rem; }
.asb-link.active .asb-ico { color: var(--lemon-300); }
.asb-badge {
  margin-left: auto;
  background: var(--brand);
  color: var(--green-900);
  font-size: .68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  min-width: 22px;
  text-align: center;
  box-shadow: 0 1px 0 var(--lemon-900);
}
.asb-badge.warn { background: var(--warn); color: #fff; box-shadow: 0 1px 0 #92400e; }

.asb-foot {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.asb-foot a {
  font-size: .82rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; gap: 8px;
  transition: all var(--t-fast) var(--ease);
}
.asb-foot a:hover { color: var(--green-800); background: var(--brand-soft); }
.asb-foot .asb-logout { color: var(--danger); }
.asb-foot .asb-logout:hover { background: var(--danger-soft); }

/* Admin topbar */
.tb-title {
  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: .85rem;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.tb-role {
  font-size: .65rem;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--green-800);
  border: 1px solid var(--brand);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
}
.tb-role.super { background: var(--purple-soft); color: var(--purple); border-color: var(--purple); }

/* Admin page hero */
.admin-hero {
  position: relative;
  padding: 32px 36px;
  border-radius: var(--r-2xl);
  background: var(--green-900);
  color: #fff;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 0 12px 0 #03100a, 0 24px 50px rgba(6,21,9,.4);
}
.admin-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--green-800);
  opacity: .35;
  pointer-events: none;
}
.admin-hero > * { position: relative; z-index: 2; }
.admin-hero h1 {
  color: #fff;
  font-size: 1.7rem;
  margin-bottom: 4px;
  letter-spacing: -.025em;
}
.admin-hero p { color: var(--on-deep-mut); }

/* Admin stat cards (dark mode-friendly) */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.admin-stat {
  position: relative;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  transition: all var(--t-fast) var(--ease);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.admin-stat::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--brand);
  transition: width var(--t-base) var(--ease);
}
.admin-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.admin-stat:hover::before { width: 6px; }
.admin-stat.green::before { background: 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: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--green-800);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
}
.admin-stat.green .as-icon { background: var(--brand-soft); color: var(--green-800); border: 1px solid var(--brand); }
.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-num);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.admin-stat .as-lbl {
  font-size: .74rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}

/* Admin cards */
.a-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.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; }

/* Admin table */
.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: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  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);
}
.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; }

/* Admin form fields (reuse modern field) */
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .admin-form-grid { grid-template-columns: 1fr; } }

/* Admin buttons */
.a-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: var(--r-md);
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-strong);
  transition: all var(--t-fast) var(--ease);
  box-shadow: 0 2px 0 var(--line);
}
.a-btn:hover { background: var(--surface-2); border-color: var(--line-strong); transform: translateY(-1px); }
.a-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--line); }
.a-btn-sm { padding: 6px 12px; font-size: .78rem; }
.a-btn-green {
  background: var(--brand);
  color: var(--green-900);
  border-color: var(--lemon-700);
  box-shadow: 0 2px 0 var(--lemon-900);
}
.a-btn-green:hover { background: var(--brand-hover); border-color: var(--lemon-900); }
.a-btn-red { background: var(--danger); color: #fff; border-color: #991b1b; box-shadow: 0 2px 0 #991b1b; }
.a-btn-red:hover { background: #b91c1c; }
.a-btn-outline { background: transparent; color: var(--green-700); border-color: var(--green-700); box-shadow: 0 2px 0 var(--green-300); }
.a-btn-outline:hover { background: var(--green-700); color: var(--lemon-300); }

/* Admin alert / message */
.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(--green-800); 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 responsive */
@media (max-width: 900px) {
  .admin-sidebar {
    display: flex;
    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); }
}
@media (max-width: 480px) {
  .admin-stats { grid-template-columns: 1fr; }
  .admin-topbar { padding: 0 14px; }
  .admin-content { padding: 16px; }
}

/* Admin mobile sidebar toggle */
.admin-sidebar-toggle {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-strong);
  cursor: pointer;
  flex-shrink: 0;
}
.admin-sidebar-close {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .admin-sidebar-close { display: inline-flex; }
}
@media (min-width: 901px) { .admin-sidebar-toggle { display: none !important; } }
.admin-sidebar.open { display: flex !important; }


/* ============================================================
   ZONE SUGGESTION MODAL
   ============================================================ */

.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-900);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 2px 0 var(--lemon-900);
}
.zone-suggest-card .zs-info { flex: 1; }
.zone-suggest-card h4 { font-size: 1rem; margin-bottom: 4px; color: var(--text-strong); }
.zone-suggest-card p { font-size: .82rem; color: var(--text-muted); margin: 0; }

.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: .82rem;
  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: .76rem; }


/* ============================================================
   RIDER DASHBOARD � image showcase (k2.jpg) on hero
   ============================================================ */

.rider-hero {
  position: relative;
  padding: 0;
  border-radius: var(--r-2xl);
  background: var(--green-900);
  color: var(--on-deep);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 10px 0 #03100a, 0 22px 50px rgba(6,21,9,.40);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  min-height: 260px;
}
.rider-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--green-800);
  opacity: .35;
  pointer-events: none;
}
.rider-hero-info {
  padding: 32px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rider-hero-info h1 { color: #fff; font-size: 1.7rem; margin-bottom: 8px; }
.rider-hero-info p { color: var(--on-deep-mut); margin-bottom: 18px; }
.rider-hero-stats {
  display: flex; gap: 22px; flex-wrap: wrap; margin-top: 6px;
}
.rider-hero-stats .rhs { display: flex; flex-direction: column; }
.rider-hero-stats .rhs-num {
  font-family: var(--f-num);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--lemon-300);
  line-height: 1;
}
.rider-hero-stats .rhs-label {
  font-size: .78rem;
  color: var(--on-deep-mut);
  font-weight: 600;
  margin-top: 4px;
}

.rider-hero-image {
  position: relative;
  z-index: 1;
  background: var(--lemon-300);
  padding: 10px;
  align-self: stretch;
  display: none;
  border-left: 0;
}
@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 { display: none; }
}

/* -- Tablet -------------------------------------------------- */
@media (max-width: 900px) {
  .nav-inner { padding: 0 16px; }
  .container { padding-inline: 16px; }
  .merchant-hero h1 { font-size: 1.4rem; }
}

/* -- Small phone polish -------------------------------------- */
@media (max-width: 480px) {
  :root { --nav-h: 64px; --bottom-h: 70px; }
  .home-hero { padding: 28px 18px; }
  .home-hero h1 { font-size: 1.9rem; }
  .hero-stats { gap: 18px; }
  .hero-stat .stat-num { font-size: 1.15rem; }
  .hero-stat .stat-label { font-size: .7rem; }
  .cat-grid-item { padding: 14px 6px; }
  .promo-card { padding: 22px 18px; min-height: 160px; }
  .promo-card h3 { font-size: 1.2rem; }
  .feature-card { padding: 20px 18px; }
  .step-card { padding: 26px 18px 22px; }
  .testimonial-card { padding: 20px; }
  .stats-strip { padding: 20px 14px; gap: 10px; }
  .stat-tile .stat-value { font-size: 1.5rem; }
  .merchant-card, .order-card, .order-row, .rider-card, .kpi-card, .qa-card, .quick-row, .list-card, .zone-card {
    padding: 14px;
    gap: 12px;
  }
  .modal-sheet { padding: 22px 18px; }
  .page-hero { padding: 18px; }
  .flow-card { padding: 20px; }
  .cta-banner { padding: 36px 20px; }
}

/* -- Reduce motion ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================================
   FAVICON IMAGE FALLBACK � ensures favicon looks crisp
   in navballs/sidebars/modals regardless of PNG transparency
   ============================================================ */
.kb-ball,
.sb-ball,
.b-logo,
.ab-ball,
.asb-ball,
.nav-avatar {
  overflow: hidden;
}
.kb-ball img,
.sb-ball img,
.b-logo img,
.ab-ball img,
.asb-ball img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Solid yellow background fallback if favicon is transparent */
.kb-ball,
.sb-ball,
.ab-ball {
  background: var(--brand);
}
.b-logo {
  background: var(--brand);
  color: var(--green-900);
}


/* ============================================================
   BRAND LOGO (logo-dark for light bg, logo-white for dark bg)
   ============================================================ */
.kiki-brand-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: opacity var(--t-fast) var(--ease);
}
@media (max-width: 480px) {
  .kiki-brand-logo { height: 30px; max-width: 150px; }
}

/* Theme-aware logo swap */
.kiki-brand-logo.theme-dark  { display: block; }
.kiki-brand-logo.theme-light { display: none; }
[data-theme="dark"] .kiki-brand-logo.theme-dark  { display: none; }
[data-theme="dark"] .kiki-brand-logo.theme-light { display: block; }

/* Sidebar brand logo */
.sb-brand-logo {
  display: block;
  height: 32px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}
.sb-brand-logo.theme-dark  { display: block; }
.sb-brand-logo.theme-light { display: none; }
[data-theme="dark"] .sb-brand-logo.theme-dark  { display: none; }
[data-theme="dark"] .sb-brand-logo.theme-light { display: block; }

/* Admin sidebar brand logo */
.asb-brand-logo {
  display: block;
  height: 30px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.asb-brand-logo.theme-dark  { display: block; }
.asb-brand-logo.theme-light { display: none; }
[data-theme="dark"] .asb-brand-logo.theme-dark  { display: none; }
[data-theme="dark"] .asb-brand-logo.theme-light { display: block; }

/* Auth modal brand logo */
.b-logo-img {
  display: block;
  height: 38px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}
.b-logo-img.theme-dark  { display: block; }
.b-logo-img.theme-light { display: none; }
[data-theme="dark"] .b-logo-img.theme-dark  { display: none; }
[data-theme="dark"] .b-logo-img.theme-light { display: block; }


/* ============================================================
   MOBILE HAMBURGER � moved to right side, more beautiful
   ============================================================ */
.kiki-hamburger {
  width: 42px;
  height: 42px;
  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);
  box-shadow: 0 2px 0 var(--line);
  transition: all var(--t-fast) var(--ease);
  position: relative;
  flex-shrink: 0;
}
.kiki-hamburger:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--brand);
}
.kiki-hamburger:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--line);
}
.kiki-hamburger.open {
  background: var(--brand);
  border-color: var(--lemon-700);
  box-shadow: 0 2px 0 var(--lemon-900);
}
.kiki-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--green-800);
  border-radius: 2px;
  transition: transform var(--t-base) var(--ease), opacity var(--t-fast) var(--ease);
  transform-origin: center;
}
[data-theme="dark"] .kiki-hamburger span { background: var(--lemon-300); }
.kiki-hamburger.open span { background: var(--green-900); }
.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); }

/* Move hamburger to right on mobile */
@media (max-width: 900px) {
  .kiki-hamburger { display: flex; }
  /* In nav-right it sits as the rightmost item */
  .nav-right .kiki-hamburger { order: 99; }
}


/* -- Admin sidebar brand with logo (no more ball+text) ------- */
.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; }

/* Hide legacy brand-ball backgrounds (cleaner look) */
.kb-ball,
.sb-ball,
.b-logo,
.ab-ball,
.asb-ball {
  background: transparent !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
}

/* sb-brand and asb-brand should align logos nicely */
.sb-brand { gap: 10px; }


/* ============================================================
   THEME SWITCH � premium sliding sun/moon toggle
   - Used in the sidebar header (mobile-first)
   - Slides with a solid 3D knob
   ============================================================ */
.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 68px;
  height: 34px;
  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);
  box-shadow: inset 0 1px 2px rgba(10,36,23,.06), 0 2px 0 var(--line);
  flex-shrink: 0;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.theme-switch:hover { border-color: var(--brand); }
.theme-switch:active { transform: translateY(1px); box-shadow: inset 0 1px 2px rgba(10,36,23,.06), 0 1px 0 var(--line); }

/* Track icons � sun (left) + moon (right), both always visible */
.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), opacity var(--t-fast) var(--ease), transform var(--t-base) var(--ease);
}
.theme-switch .ts-sun  { left: 9px;  color: var(--text-dim); }
.theme-switch .ts-moon { right: 9px; color: var(--text-dim); }

/* Active icon (per state) � solid lemon color, scaled */
.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);
}

/* Sliding knob � solid 3D lemon disk */
.theme-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  background: var(--brand);
  border-radius: 50%;
  box-shadow: 0 2px 0 var(--lemon-700), 0 3px 0 var(--lemon-900), 0 4px 10px rgba(0,0,0,.18);
  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(34px);
  background: var(--green-700);
  box-shadow: 0 2px 0 var(--green-900), 0 3px 0 #03100a, 0 4px 10px rgba(0,0,0,.25);
}

/* Knob icon inside */
.theme-switch .ts-knob-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  font-size: .82rem;
  z-index: 3;
  color: var(--green-900);
  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(34px, -50%) rotate(-15deg);
  color: var(--lemon-300);
}

/* Variant sizes */
.theme-switch.ts-sm { width: 54px; height: 28px; }
.theme-switch.ts-sm::after { width: 22px; height: 22px; top: 2px; left: 2px; }
.theme-switch.ts-sm[data-active="dark"]::after { transform: translateX(26px); }
.theme-switch.ts-sm .ts-knob-icon { left: 12px; font-size: .72rem; }
.theme-switch.ts-sm[data-active="dark"] .ts-knob-icon { transform: translate(26px, -50%) rotate(-15deg); }
.theme-switch.ts-sm .ts-sun  { left: 7px; font-size: .72rem; }
.theme-switch.ts-sm .ts-moon { right: 7px; font-size: .72rem; }

/* ============================================================
   MOBILE � hide old header theme button, keep the new sidebar one
   ============================================================ */
@media (max-width: 900px) {
  .nav-theme { display: none !important; }
  .kiki-nav .theme-pill.nav-theme { display: none !important; }
}

/* Sidebar top-bar layout � make room for the new theme switch */
.sb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  min-height: 76px;
}
.sb-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-theme-slot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.sb-close {
  flex-shrink: 0;
}


/* ============================================================
   SIDEBAR FOOT � only shows current theme label (the switch
   is now in the sidebar top). Make it look like a status footer.
   ============================================================ */
.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;
  letter-spacing: .02em;
}
.sb-theme-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sb-theme-label #sb-theme-icon {
  font-size: .9rem;
}

/* ============================================================
   THEME SWITCH � additional polish
   ============================================================ */
.theme-switch:focus-visible {
  outline: 3px solid var(--brand-soft);
  outline-offset: 2px;
}
.theme-switch::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: var(--r-pill);
  background: var(--brand);
  opacity: 0;
  z-index: -1;
  transition: opacity var(--t-fast) var(--ease);
}
.theme-switch:hover::before { opacity: .12; }
