/* ============================================================
   KikiSend — Design System v10 "Route"
   ------------------------------------------------------------
   Loaded LAST (after modern/market/cart/upgrade/rider) so it can
   re-skin every existing component without touching PHP or JS.

   Rules of the system
   • Flat colour only. Zero gradients. Deep forest + lemon.
   • Lemon is a FILL (buttons, active states, highlights) and always
     carries forest text. On white, text/links use forest (--brand-text).
   • One signature: the ROUTE LINE — a dashed lemon path ending in a
     pin. It appears on hero bands, progress and empty states.
   • Hierarchy by colour block + outline, not by shadow stacks.
   • Display face (Unbounded) only for h1/h2, big numbers and prices.
   • Mobile first: 360px up. Touch targets >= 44px.
   ============================================================ */

:root{
  --ks-bar-h: 60px;
  --ks-tab-h: 66px;
  --ks-out: 1.5px solid var(--line);
  --ks-pad: 16px;
  /* Desktop frame: wide content, minimal gutters (≈ Uber Eats / Glovo / Chowdeck) */
  --ks-max: 1760px;
  --ks-gutter: clamp(16px, 2.2vw, 40px);
  --ks-safe-b: env(safe-area-inset-bottom, 0px);
}

/* ── Base ─────────────────────────────────────────────────── */
html body{ font-family: var(--f-body); font-size: 15.5px; line-height: 1.55; background: var(--bg); color: var(--text); }
h1,h2{ font-family: var(--f-brand); font-weight: 700; letter-spacing: -.035em; text-wrap: balance; }
h1{ font-size: clamp(1.55rem, 6.2vw, 2.7rem); line-height: 1.08; }
h2{ font-size: clamp(1.25rem, 4.6vw, 1.9rem); line-height: 1.14; }
h3,h4{ font-family: var(--f-body); font-weight: 800; letter-spacing: -.015em; }
::selection{ background: var(--lemon-500); color: var(--green-950); }
:focus-visible{ outline: 3px solid var(--lemon-500); outline-offset: 2px; box-shadow: 0 0 0 5px var(--green-900); border-radius: 8px; }
[data-theme="dark"] :focus-visible{ box-shadow: none; }
a{ -webkit-tap-highlight-color: transparent; }
html body .page-wrapper{ padding-top: var(--ks-bar-h); padding-bottom: calc(var(--ks-tab-h) + var(--ks-safe-b) + 28px); min-height: 100vh; }
html body .container{ max-width: var(--ks-max); padding-inline: var(--ks-gutter); }
.animate-in{ animation-duration: .32s; }

/* ── App bar (all roles) — solid forest, merges with the hero ── */
html body .kiki-nav{
  height: var(--ks-bar-h); background: var(--green-900); border-bottom: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none; padding-top: 0;
  box-sizing: border-box;
}
html body .kiki-nav .nav-inner{ padding: 0 var(--ks-gutter); gap: 10px; max-width: var(--ks-max); }
html body .kiki-brand-logo.theme-light{ display: none !important; }
html body .kiki-brand-logo.theme-dark{ display: block !important; }
html body .kiki-brand-logo{ height: 30px; width: auto; }
html body .kl-link{ color: rgba(255,255,255,.78); font-weight: 700; border-radius: 10px; padding: 8px 12px; font-size: .88rem; }
html body .kl-link:hover{ background: rgba(255,255,255,.1); color: #fff; }
html body .kl-link.active{ background: var(--lemon-500); color: var(--green-900); }
html body .kiki-nav .icon-btn,
html body .kiki-nav .nav-theme,
html body .kiki-nav .kiki-hamburger{
  width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.1);
  border: 0; color: var(--lemon-500); position: relative;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
html body .kiki-nav .icon-btn:hover,
html body .kiki-nav .nav-theme:hover,
html body .kiki-nav .kiki-hamburger:hover{ background: rgba(255,255,255,.1); }
html body .kiki-nav .kiki-hamburger span{ background: var(--lemon-500); }
html body .kiki-nav .nav-theme{ display: none; }                       /* theme switch lives in the side menu on phones */
html body .kiki-nav .wallet-pill{
  background: var(--lemon-500); color: var(--green-900); border: 0; border-radius: 12px;
  height: 40px; padding: 0 12px; font-weight: 800; font-size: .88rem; display: inline-flex; align-items: center; gap: 6px;
}
html body .kiki-nav .wallet-pill i{ color: var(--green-900); }
html body .kiki-nav .user-btn{ background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 12px; height: 40px; padding: 0 8px 0 4px; gap: 8px; }
html body .kiki-nav .user-btn .uname{ display: none; }
html body .kiki-nav .user-btn .fa-chevron-down{ display: none; }
html body .kiki-nav .nav-avatar{ width: 30px; height: 30px; border-radius: 9px; background: var(--lemon-500) !important; color: var(--green-900) !important; font-size: 12px !important; }
html body .kiki-nav .notif-dot{ background: var(--lemon-500); color: var(--green-900); border: 2px solid var(--green-900); font-weight: 800; }
html body .kiki-nav .btn-ghost{ color: #fff; }
html body .kiki-nav .btn-ghost:hover{ background: rgba(255,255,255,.1); color: #fff; }
html body .kiki-nav .btn-primary{ min-height: 40px; }
@media (min-width: 1000px){
  html body .kiki-nav .user-btn .uname{ display: inline; }
  html body .kiki-nav .nav-theme{ display: inline-flex; }
}
html body .kiki-nav .kiki-hamburger{ display: inline-flex; flex-direction: column; gap: 4px; }
html body .kiki-nav .kiki-hamburger span{ display: block; width: 18px; height: 2px; border-radius: 2px; }
@media (min-width: 1000px){ html body .kiki-nav .kiki-hamburger{ display: none; } }
@media (max-width: 999px){ html body .kiki-links{ display: none; } }

/* dropdowns */
html body .user-dropdown, html body .notif-dropdown{ border-radius: 18px; border: var(--ks-out); box-shadow: var(--shadow-xl); background: var(--surface); }

/* ── Side menu — forest, lemon active ─────────────────────── */
html body .kiki-sidebar{ background: var(--green-950); color: #fff; width: 320px; border-right: 0; }
html body .kiki-sidebar .sb-head{ background: transparent; border-bottom: 1px solid rgba(255,255,255,.1); }
html body .kiki-sidebar .sb-brand-logo.theme-light{ display: none !important; }
html body .kiki-sidebar .sb-brand-logo.theme-dark{ display: block !important; }
html body .kiki-sidebar .sb-close{ color: var(--lemon-500); border: 0; background: rgba(255,255,255,.1); border-radius: 12px; }
html body .kiki-sidebar .sb-user{ background: var(--green-900); border-radius: 16px; margin: 12px; border: 0; }
html body .kiki-sidebar .sbu-name{ color: #fff; }
html body .kiki-sidebar .sbu-wallet{ color: var(--lemon-500); font-weight: 800; }
html body .kiki-sidebar .sb-section{ color: rgba(255,255,255,.5); font-size: .72rem; letter-spacing: .04em; }
html body .kiki-sidebar .sb-link{ color: rgba(255,255,255,.86); border-radius: 12px; font-weight: 700; }
html body .kiki-sidebar .sb-link:hover{ background: rgba(255,255,255,.08); }
html body .kiki-sidebar .sb-link.active{ background: var(--lemon-500); color: var(--green-900); }
html body .kiki-sidebar .sb-link.active .sbl-icon{ color: var(--green-900); }
html body .kiki-sidebar .sbl-icon{ color: var(--lemon-500); }
html body .kiki-sidebar .sb-hr{ background: rgba(255,255,255,.1); }
html body .kiki-sidebar .sb-danger{ color: #ff9d92; }
html body .kiki-sidebar .sb-foot{ background: transparent; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.7); }
html body .kiki-overlay{ background: rgba(4,26,12,.6); }

/* ── Bottom tab bar — flat, full width, lemon pill behind icon ── */
html body .mob-bottom-nav{
  left: 0; right: 0; bottom: 0; border-radius: 0; border: 0; border-top: 1.5px solid var(--line);
  background: var(--surface); box-shadow: none; padding: 6px 4px calc(6px + var(--ks-safe-b));
  min-height: var(--ks-tab-h); gap: 2px;
}
html body .mob-nav-item,
html body .mob-nav-item:first-child, html body .mob-nav-item:last-child, html body .mob-nav-item:only-child{
  border-radius: 12px; background: transparent !important; color: var(--text-muted); position: relative;
  font-weight: 700; font-size: .68rem; gap: 3px; padding: 4px 2px; isolation: isolate;
}
html body .mob-nav-item i{ font-size: 1.1rem; height: 28px; width: 54px; display: flex; align-items: center; justify-content: center; border-radius: 14px; transition: background .18s ease; }
html body .mob-nav-item .mob-nav-ic{ display: flex; position: relative; }
html body .mob-nav-item .mob-nav-ic i{ margin: 0; }
html body .mob-nav-item.active{ color: var(--text-strong); font-weight: 800; }
html body .mob-nav-item.active i{ background: var(--lemon-500); color: var(--green-900); }
[data-theme="dark"] html body .mob-nav-item.active, [data-theme="dark"] .mob-nav-item.active{ color: var(--lemon-500); }
html body .mob-nav-badge{ background: var(--green-900); color: var(--lemon-500); border: 2px solid var(--surface); font-weight: 800; }
/* raised centre action (rider SCAN, merchant ITEMS) */
html body .mob-nav-pick .mob-pick-bubble{ width: 54px; height: 54px; margin-top: -26px; border-radius: 18px; background: var(--lemon-500); color: var(--green-900); border: 4px solid var(--surface); box-shadow: none; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
html body .mob-nav-pick .mob-pick-bubble i{ background: transparent; width: auto; height: auto; }
html body .mob-nav-pick .mob-pick-bubble--active{ background: var(--green-900); color: var(--lemon-500); }
html body .mob-nav-pick .mob-pick-label{ font-weight: 800; color: var(--text-strong); }
@media (min-width: 1000px){
  html body .mob-bottom-nav{ left: 50%; right: auto; transform: translateX(-50%); width: min(560px, 92vw); bottom: 16px; border: 1.5px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding-bottom: 6px; }
  html body .page-wrapper{ padding-bottom: 120px; }
}


/* Six bottom-nav items on a phone: compact labels, pill shrinks on tiny screens */
html body .mob-bottom-nav--always{ gap: 0; padding-left: 2px; padding-right: 2px; }
html body .mob-bottom-nav--always .mob-nav-item{ flex: 1 1 0; min-width: 0; font-size: .62rem; line-height: 1.1; text-align: center; }
html body .mob-bottom-nav--always .mob-nav-item i{ width: 46px; }
@media (max-width: 359px){ html body .mob-bottom-nav--always .mob-nav-item{ font-size: .56rem; } html body .mob-bottom-nav--always .mob-nav-item i{ width: 38px; font-size: 1rem; } }

/* ── Hero bands: forest, flat, full-bleed on phones, route line ── */
html body .home-hero, html body .cta-banner, html body .dash-banner, html body .live-order-card, html body .wallet-hero,
html body .merchant-hero, html body .earnings-hero, html body .admin-hero, html body .rider-hero, html body .fw-main, html body .ux-hero{
  background: var(--green-900); color: #fff; border: 0; border-radius: var(--r-xl); overflow: hidden;
  padding-bottom: 30px; position: relative; box-shadow: none;
}
html body .home-hero::before, html body .cta-banner::before, html body .dash-banner::before, html body .live-order-card::before,
html body .wallet-hero::before, html body .merchant-hero::before, html body .earnings-hero::before, html body .admin-hero::before,
html body .rider-hero::before, html body .fw-main::before, html body .ux-hero::before{
  content: ""; position: absolute; left: 20px; bottom: 13px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--lemon-500); box-shadow: none; z-index: 3; right: auto; top: auto; opacity: 1;
}
html body .home-hero::after, html body .cta-banner::after, html body .dash-banner::after, html body .live-order-card::after,
html body .wallet-hero::after, html body .merchant-hero::after, html body .earnings-hero::after, html body .admin-hero::after,
html body .rider-hero::after, html body .fw-main::after, html body .ux-hero::after{
  content: ""; position: absolute; left: 36px; right: 20px; bottom: 17px; height: 0; width: auto; top: auto;
  border: 0; border-top: 2px dashed rgba(163,230,53,.55); border-radius: 0; background: transparent; opacity: 1; z-index: 3;
}
html body .ux-hero h1, html body .rider-hero h1, html body .merchant-hero h1, html body .admin-hero h1, html body .home-hero h1,
html body .wallet-hero h1, html body .earnings-hero h1, html body .dash-banner h1, html body .ux-hero-info h1, html body .rider-hero-info h1{ color: #fff; }
html body .ux-hero-info p, html body .rider-hero-info p{ color: rgba(255,255,255,.78); }
html body .ux-eyebrow, html body .rh-eyebrow{
  background: var(--lemon-500); color: var(--green-900); border: 0; border-radius: 8px; padding: 4px 10px;
  font-weight: 800; font-size: .74rem; letter-spacing: 0; text-transform: none; display: inline-flex; align-items: center; gap: 6px;
}
html body .ux-eyebrow .pulse-dot, html body .rh-eyebrow .pulse-dot{ background: var(--green-900); }
html body .ux-float, html body .rh-float{ background: var(--lemon-500); color: var(--green-900); border-radius: 12px; border: 0; box-shadow: none; }
html body .ux-float i, html body .rh-float i{ color: var(--green-900); }
html body .ux-hero-image, html body .rider-hero-image{ background: var(--green-800); }
@media (max-width: 640px){
  html body .page-wrapper > .container > .ux-hero:first-child,
  html body .page-wrapper > .container > .rider-hero:first-child,
  html body .page-wrapper > .container > .merchant-hero:first-child,
  html body .page-wrapper > .container > .admin-hero:first-child,
  html body .page-wrapper > .container > .wallet-hero:first-child,
  html body .page-wrapper > .container > .dash-banner:first-child,
  html body .page-wrapper > .container > .earnings-hero:first-child{
    margin-inline: calc(var(--ks-gutter) * -1); border-radius: 0 0 var(--r-2xl) var(--r-2xl); margin-top: 0;
  }
}
/* stat tiles inside heroes: outlined, not boxed */
html body .ux-stat, html body .rider-hero-stats .rhs, html body .mh-stats > *{
  background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.16); border-radius: 14px; box-shadow: none;
}
html body .ux-stat b, html body .ux-stat strong, html body .rhs-num, html body .mhs-num{ font-family: var(--f-brand); color: var(--lemon-500); letter-spacing: -.03em; }
html body .ux-stat span, html body .rhs-label, html body .mhs-label{ color: rgba(255,255,255,.72); }

/* ── Buttons — v11 two-button system ──────────────────────────
   1) PRIMARY  = deep-green fill + white text   (light screens)
   2) LEMON    = #a3e635 fill + deep-green text (deep-green surfaces,
                 and EVERY primary button once the screen is dark)
   Tokens (--btn-*, --btn-alt-*) flip with [data-theme], so no
   component needs its own dark-mode rule. No borders, no outlines,
   no inset rings: buttons are solid fills only.
   ──────────────────────────────────────────────────────────── */
html body .btn{
  font-family: var(--f-body); font-weight: 800; letter-spacing: -.005em; border-radius: 14px; min-height: 48px;
  border: 0; box-shadow: none; transform: none; transition: background .15s ease, color .15s ease, transform .15s ease;
}
html body .btn:hover:not(:disabled){ transform: none; box-shadow: none; }
html body .btn:active:not(:disabled){ transform: translateY(1px); }
html body .btn:focus-visible{ outline: none; box-shadow: 0 0 0 4px var(--ring); }
html body .btn-sm{ min-height: 40px; border-radius: 12px; }
html body .btn-lg{ min-height: 56px; border-radius: 16px; font-size: 1.02rem; }

html body .btn-primary{ background: var(--btn-bg); color: var(--btn-fg); box-shadow: none; }
html body .btn-primary:hover:not(:disabled){ background: var(--btn-bg-hover); color: var(--btn-fg); }
html body .btn-primary:active:not(:disabled){ background: var(--btn-bg-active); }

/* lemon twin — usable anywhere, always lemon + deep green */
html body .btn-lemon{ background: var(--lemon-500); color: var(--green-900); }
html body .btn-lemon:hover:not(:disabled){ background: var(--lemon-400); color: var(--green-900); }

/* quiet buttons: tinted fill instead of a border */
html body .btn-secondary{ background: var(--surface-3); color: var(--text-strong); border: 0; box-shadow: none; }
html body .btn-secondary:hover:not(:disabled){ background: var(--line-strong); color: var(--text-strong); box-shadow: none; }
html body .btn-outline{ background: var(--accent-soft); color: var(--link); border: 0; box-shadow: none; }
html body .btn-outline:hover:not(:disabled){ background: var(--btn-bg); color: var(--btn-fg); }

/* deep-green / lemon-text variants */
html body .btn-accent, html body .btn-deep, html body .btn-locate{ background: var(--green-900); color: var(--lemon-500); box-shadow: none; }
html body .btn-accent:hover:not(:disabled), html body .btn-deep:hover:not(:disabled), html body .btn-locate:hover:not(:disabled){ background: var(--green-800); color: var(--lemon-400); box-shadow: none; }
html body .btn-locate{ border-radius: 16px; }
html body .btn-danger{ background: var(--danger); color: #fff; box-shadow: none; }

/* Dark screens: every deep-green button becomes lemon + deep-green text */
html[data-theme="dark"] body :is(.btn-accent, .btn-deep, .btn-locate){ background: var(--lemon-500); color: var(--green-900); }
html[data-theme="dark"] body :is(.btn-accent, .btn-deep, .btn-locate):hover:not(:disabled){ background: var(--lemon-400); color: var(--green-900); }
html[data-theme="dark"] body .btn-danger{ color: #150404; }

/* Deep-green surfaces (in light mode): the primary becomes the LEMON button,
   the secondary becomes a soft white-tint fill. */
html body :is(.kiki-nav, .kiki-sidebar, .ux-hero, .rider-hero, .merchant-hero, .admin-hero, .wallet-hero, .dash-banner, .home-hero,
  .earnings-hero, .page-hero, .disc-hero, .about-hero, .shelf-hero, .cta-banner, .live-order-card, .flow-card--dark, .zone-card--dark,
  .auth-side, .lp-final, .lp-tower, .lp-tower-main, .lp-hero, .zone-hero, .track-hero, .promo-card, .showcase-tile, .lp-clock, .lp-numbers)
  :is(.btn-primary, .btn-accent, .btn-deep, .btn-locate, .btn:not(.btn-secondary):not(.btn-ghost):not(.btn-danger):not(.btn-outline)){
  background: var(--btn-alt-bg); color: var(--btn-alt-fg); box-shadow: none;
}
html body :is(.kiki-nav, .kiki-sidebar, .ux-hero, .rider-hero, .merchant-hero, .admin-hero, .wallet-hero, .dash-banner, .home-hero,
  .earnings-hero, .page-hero, .disc-hero, .about-hero, .shelf-hero, .cta-banner, .live-order-card, .flow-card--dark, .zone-card--dark,
  .auth-side, .lp-final, .lp-tower, .lp-tower-main, .lp-hero, .zone-hero, .track-hero, .promo-card, .showcase-tile, .lp-clock, .lp-numbers)
  :is(.btn-primary, .btn-accent, .btn-deep, .btn-locate, .btn:not(.btn-secondary):not(.btn-ghost):not(.btn-danger):not(.btn-outline)):hover:not(:disabled){
  background: var(--btn-alt-bg-hover); color: var(--btn-alt-fg);
}
html body :is(.kiki-nav, .kiki-sidebar, .ux-hero, .rider-hero, .merchant-hero, .admin-hero, .wallet-hero, .dash-banner, .home-hero,
  .earnings-hero, .page-hero, .disc-hero, .about-hero, .shelf-hero, .cta-banner, .live-order-card, .flow-card--dark, .zone-card--dark,
  .auth-side, .lp-final, .lp-tower, .lp-tower-main, .lp-hero, .zone-hero, .track-hero, .promo-card, .showcase-tile, .lp-clock, .lp-numbers)
  :is(.btn-secondary, .btn-outline){ background: rgba(255,255,255,.14); color: #fff; border: 0; box-shadow: none; }
html body :is(.kiki-nav, .kiki-sidebar, .ux-hero, .rider-hero, .merchant-hero, .admin-hero, .wallet-hero, .dash-banner, .home-hero,
  .earnings-hero, .page-hero, .disc-hero, .about-hero, .shelf-hero, .cta-banner, .live-order-card, .flow-card--dark, .zone-card--dark,
  .auth-side, .lp-final, .lp-tower, .lp-tower-main, .lp-hero, .zone-hero, .track-hero, .promo-card, .showcase-tile, .lp-clock, .lp-numbers)
  :is(.btn-secondary, .btn-outline):hover:not(:disabled){ background: rgba(255,255,255,.24); color: #fff; }

/* Button-like controls that share the same two-colour rule */
html body .filter-pill.active, html body .pill.active, html body .chip.active{ background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
html body :is(.store-btn, .store-badge){ background: var(--btn-bg); color: var(--btn-fg); border: 0; }
html body :is(.store-btn, .store-badge):hover{ background: var(--btn-bg-hover); color: var(--btn-fg); }

/* ── Cards & surfaces: flat + outlined ─────────────────────── */
:where(html body) .card,
:where(html body) .flow-card,
:where(html body) .kpi-card,
:where(html body) .a-card,
:where(html body) .qa-card,
:where(html body) .order-row,
:where(html body) .zone-card,
:where(html body) .settings-card,
:where(html body) .item-feed-card,
:where(html body) .stat-card,
:where(html body) .tracking-card,
:where(html body) .about-card,
:where(html body) .lp-why-card,
:where(html body) .menu-item,
:where(html body) .gift-card,
:where(html body) .zone-run-card,
:where(html body) .settings-item,
:where(html body) .auth-card,
:where(html body) .merchant-card,
:where(html body) .disc-card {
  background: var(--surface); border: var(--ks-out); border-radius: var(--r-lg); box-shadow: none;
}
:where(html body) .kpi-card:hover,
:where(html body) .zone-run-card:hover,
:where(html body) .menu-item:hover,
:where(html body) .order-row:hover,
:where(html body) .gift-card:hover,
:where(html body) .qa-card:hover,
:where(html body) .zone-card:hover,
:where(html body) .item-feed-card:hover,
:where(html body) .settings-item:hover {
  border-color: var(--green-900); box-shadow: none; transform: none;
}
[data-theme="dark"] .kpi-card:hover, [data-theme="dark"] .qa-card:hover, [data-theme="dark"] .order-row:hover{ border-color: var(--lemon-500); }
:where(html body) .flow-card { padding: 18px; border-radius: var(--r-xl); }
:where(html body) .flow-card--dark { background: var(--green-900); border-color: var(--green-900); color: #fff; }
:where(html body) .kpi-card { border-left-width: 1.5px; padding: 14px; gap: 12px; }
:where(html body) .kpi-card::before,
:where(html body) .kpi-card::after { display: none; }
:where(html body) .kpi-icon,
:where(html body) .qa-icon,
:where(html body) .as-icon,
:where(html body) .zc-icon,
:where(html body) .s-icon,
:where(html body) .lp-why-ico,
:where(html body) .about-card-ico {
  background: var(--lemon-500) !important; color: var(--green-900) !important; border-radius: 12px; box-shadow: none;
}
:where(html body) .kpi-num,
:where(html body) .as-val { font-family: var(--f-brand); font-weight: 700; letter-spacing: -.04em; color: var(--text-strong); font-size: 1.45rem; line-height: 1.1; }
:where(html body) .kpi-label,
:where(html body) .as-lbl { color: var(--text-muted); font-weight: 700; font-size: .8rem; }
:where(html body) .admin-stat { background: var(--surface); border: var(--ks-out); border-radius: var(--r-lg); box-shadow: none; }

/* ── Badges, pills, chips ──────────────────────────────────── */
html body .badge{ border-radius: 8px; font-weight: 800; letter-spacing: 0; padding: 3px 9px; }
html body .badge-brand{ background: var(--lemon-500); color: var(--green-900); }
html body .badge-neutral{ background: var(--surface-3); color: var(--text-strong); }
html body .filter-pill, html body .pill, html body .chip{
  border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text-strong); font-weight: 700; box-shadow: none;
}
[data-theme="dark"] html body .filter-pill.active{ background: var(--lemon-500); color: var(--green-950); border-color: var(--lemon-500); }

/* ── Forms ─────────────────────────────────────────────────── */
html body .field label{ font-weight: 800; font-size: .84rem; color: var(--text-strong); }
html body .field input, html body .field select, html body .field textarea,
html body input[type=text], html body input[type=tel], html body input[type=email], html body input[type=password],
html body input[type=number], html body input[type=search], html body select, html body textarea{
  min-height: 52px; border-radius: 14px; background: var(--input); border: 1.5px solid var(--input-border); box-shadow: none;
  font-size: 1rem; /* 16px stops iOS zoom */ padding-block: 12px; color: var(--text-strong);
}
html body .field input:focus, html body .field select:focus, html body .field textarea:focus,
html body input:focus, html body select:focus, html body textarea:focus{
  background: var(--input-focus); border-color: var(--green-900); box-shadow: 0 0 0 4px var(--brand-soft); outline: none;
}
[data-theme="dark"] html body input:focus, [data-theme="dark"] html body select:focus, [data-theme="dark"] html body textarea:focus{ border-color: var(--lemon-500); }
html body textarea{ min-height: 96px; }

/* ── Sheets & modals ───────────────────────────────────────── */
html body .modal-overlay{ background: rgba(4,26,12,.6); backdrop-filter: none; }
html body .modal-sheet{ background: var(--surface); border-radius: 26px 26px 0 0; border: 0; box-shadow: none; }
@media (min-width: 700px){ html body .modal-sheet{ border-radius: 26px; } }
html body .modal-handle{ background: var(--line-strong); width: 44px; height: 5px; border-radius: 5px; }
html body .modal-close{ background: var(--surface-2); border-radius: 12px; border: 0; }

/* ── Empty states: dashed route border ─────────────────────── */
html body .empty-state{ background: var(--surface); border: 2px dashed var(--line-strong); border-radius: var(--r-xl); }
html body .empty-state .es-icon{ background: var(--lemon-500); color: var(--green-900); border-radius: 20px; }

/* ── Section titles ────────────────────────────────────────── */
html body .hf-section-title{ font-family: var(--f-body); font-weight: 800; letter-spacing: -.01em; }
html body .meta-text, html body .sub{ color: var(--text-muted); }

/* ── Site footer (public) ──────────────────────────────────── */
html body .ks-site-footer{ background: var(--green-950); border-top: 0; color: #fff; margin-top: 24px; }
html body .ks-site-footer .ks-foot-glow{ display: none; }
html body .ks-site-footer .ks-foot-logo-img.theme-light{ display: none !important; }
html body .ks-site-footer .ks-foot-logo-img.theme-dark{ display: block !important; }
html body .ks-site-footer .ks-foot-tagline{ color: var(--lemon-500); font-family: var(--f-brand); font-size: .95rem; }
html body .ks-site-footer .ks-foot-desc, html body .ks-site-footer .ks-foot-col a, html body .ks-site-footer .ks-foot-col h4,
html body .ks-site-footer .ks-site-footer-base{ color: rgba(255,255,255,.72); }
html body .ks-site-footer .ks-foot-col a:hover{ color: var(--lemon-500); }
html body .ks-site-footer .ks-foot-social a{ border-color: rgba(255,255,255,.25); color: #fff; }
html body .ks-site-footer .ks-foot-social a:hover{ background: var(--lemon-500); color: var(--green-900); border-color: var(--lemon-500); }
html body .ks-site-footer .ks-site-footer-base{ border-top: 1px solid rgba(255,255,255,.14); }

/* ── Leaflet maps: brand the chrome, keep tiles untouched ───── */
html body .leaflet-container{ font-family: var(--f-body); background: #e6ecdc; border-radius: var(--r-lg); }
html body .leaflet-bar{ border: 0; box-shadow: none; border-radius: 14px; overflow: hidden; }
html body .leaflet-bar a{ background: var(--surface); color: var(--green-900); width: 40px; height: 40px; line-height: 40px; border-bottom: 1px solid var(--line); }
html body .leaflet-bar a:hover{ background: var(--lemon-500); color: var(--green-900); }
html body .leaflet-popup-content-wrapper{ border-radius: 14px; box-shadow: var(--shadow-lg); font-weight: 600; }
html body .leaflet-control-attribution{ font-size: 10px; background: rgba(255,255,255,.8); border-radius: 8px 0 0 0; }
.ks-pin{ width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--green-900); border: 3px solid var(--lemon-500); display: flex; align-items: center; justify-content: center; }
.ks-pin > i, .ks-pin > span{ transform: rotate(45deg); color: var(--lemon-500); font-size: 13px; font-style: normal; }
.ks-pin--lemon{ background: var(--lemon-500); border-color: var(--green-900); }
.ks-pin--lemon > i, .ks-pin--lemon > span{ color: var(--green-900); }
.ks-rider-dot{ width: 18px; height: 18px; border-radius: 50%; background: var(--lemon-500); border: 4px solid var(--green-900); }

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

/* ================= BATCH 2 ================= */
/* Display face must beat component-level font-family rules */
html body h1, html body h2, html body .ux-hero-info h1, html body .rider-hero-info h1, html body .merchant-hero h1,
html body .admin-hero h1, html body .page-hero h1, html body .disc-hero h1, html body .auth-title{ font-family: var(--f-brand) !important; font-weight: 700; letter-spacing: -.035em; }
html body .kpi-num, html body .as-val, html body .mhs-num, html body .rhs-num, html body .ux-stat b, html body .ux-stat strong,
html body .wallet-hero .amount, html body .price-xl, html body .sbu-wallet b{ font-family: var(--f-brand) !important; }
html body h2{ font-size: clamp(1.15rem, 4.2vw, 1.7rem); }

/* more hero types */
html body .page-hero, html body .disc-hero, html body .about-hero, html body .zone-hero, html body .shelf-hero{
  background: var(--green-900); color: #fff; border: 0; border-radius: var(--r-xl); position: relative; overflow: hidden; padding-bottom: 30px; box-shadow: none;
}
html body .disc-hero-glow, html body .zone-hero__bg, html body .store-hero__shade{ display: none !important; }
html body .page-hero::before, html body .disc-hero::before, html body .about-hero::before, html body .shelf-hero::before{
  content: ""; position: absolute; left: 20px; bottom: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--lemon-500); z-index: 3;
}
html body .page-hero::after, html body .disc-hero::after, html body .about-hero::after, html body .shelf-hero::after{
  content: ""; position: absolute; left: 36px; right: 20px; bottom: 17px; height: 0; border-top: 2px dashed rgba(163,230,53,.55); z-index: 3; background: none;
}
html body .disc-hero h1, html body .disc-hero h2, html body .page-hero h1, html body .about-hero h1{ color: #fff; }
html body .disc-eyebrow{ color: var(--lemon-500); font-weight: 800; letter-spacing: 0; text-transform: none; }
html body .disc-hero-sub, html body .page-hero p, html body .about-hero p{ color: rgba(255,255,255,.78); }
html body .disc-live-pill{ background: var(--lemon-500); color: var(--green-900); border-radius: 12px; font-weight: 800; border: 0; }
@media (max-width: 640px){
  html body .page-wrapper > .container > .disc-hero:first-child, html body .page-wrapper > .container > .page-hero:first-child{
    margin-inline: calc(var(--ks-gutter) * -1); border-radius: 0 0 var(--r-2xl) var(--r-2xl); margin-top: 0;
  }
}

/* text inside any forest panel must be light (fixes dark-on-dark helper text) */
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.flow-card--dark,.cta-banner) :is(p,small,label,.sub,.meta-text){ color: rgba(255,255,255,.78); }
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.live-order-card) :is(h1,h2,h3,h4,strong,b){ color: #fff; }
html body .wallet-hero{ padding: 22px 20px 34px; }

/* header business pill on narrow screens */
html body .kiki-nav .wallet-pill{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
@media (max-width: 420px){ html body .kiki-nav .nav-inner{ gap: 6px; } html body .kiki-nav .wallet-pill{ max-width: 30vw; font-size: .8rem; padding: 0 9px; } }

/* stat grids: compact 2-up on phones */
@media (max-width: 640px){
  html body .kpi-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  html body .kpi-grid .kpi-card{ flex-direction: column; align-items: flex-start; }
  html body .kpi-card .kpi-icon{ width: 42px; height: 42px; }
  html body .kpi-card .kpi-num{ font-size: clamp(1.1rem, 5vw, 1.35rem); }
  html body .kpi-card .kpi-label, html body .kpi-card .kpi-sub{ line-height: 1.35; }
}
/* Very narrow phones: a single column keeps labels and naira figures readable */
@media (max-width: 400px){
  html body .kpi-grid{ grid-template-columns: 1fr; }
}

/* ── Auth pages: single clean column on phones ─────────────── */
html body .auth-wrap{ background: var(--bg); padding: 0; min-height: calc(100vh - var(--ks-bar-h)); }
html body .auth-side{ background: var(--green-900); color: #fff; border-radius: 0 0 var(--r-2xl) var(--r-2xl); position: relative; padding: 24px 20px 34px; box-shadow: none; }
html body .auth-side::before{ content: ""; position: absolute; left: 20px; bottom: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--lemon-500); }
html body .auth-side::after{ content: ""; position: absolute; left: 36px; right: 20px; bottom: 17px; border-top: 2px dashed rgba(163,230,53,.55); background: none; height: 0; width: auto; top: auto; }
html body .auth-side h1, html body .auth-side h2{ color: #fff; }
html body .auth-lead, html body .auth-points li, html body .auth-side-foot{ color: rgba(255,255,255,.8); }
html body .auth-kicker{ background: var(--lemon-500); color: var(--green-900); border-radius: 8px; padding: 4px 10px; font-weight: 800; letter-spacing: 0; text-transform: none; }
html body .auth-side-foot a{ color: var(--lemon-500); font-weight: 800; }
html body .auth-main{ background: transparent; padding: 18px var(--ks-pad) 28px; }
html body .auth-card{ border: 0; background: transparent; box-shadow: none; padding: 0; }
@media (min-width: 900px){
  html body .auth-card{ background: var(--surface); border: var(--ks-out); border-radius: var(--r-xl); padding: 28px; }
  html body .auth-side{ border-radius: var(--r-xl); }
}
html body .auth-title{ font-size: 1.5rem; }
html body .pw-toggle{ color: var(--text-muted); }

/* ================= BATCH 3 — admin shell ================= */
html body .admin-sidebar{ background: var(--green-950); border-right: 0; color: #fff; }
html body .asb-brand{ border-bottom: 1px solid rgba(255,255,255,.1); }
html body .asb-brand-logo.theme-light{ display: none !important; }
html body .asb-brand-logo.theme-dark{ display: block !important; height: 30px; }
html body .asb-section{ color: rgba(255,255,255,.45); }
html body .asb-link{ color: rgba(255,255,255,.8); border-radius: 12px; font-weight: 700; }
html body .asb-link:hover{ background: rgba(255,255,255,.08); color: #fff; }
html body .asb-link.active{ background: var(--lemon-500); color: var(--green-900); }
html body .asb-link .asb-ico{ color: var(--lemon-500); }
html body .asb-link.active .asb-ico{ color: var(--green-900); }
html body .asb-badge{ background: var(--lemon-500); color: var(--green-900); }
html body .asb-link.active .asb-badge{ background: var(--green-900); color: var(--lemon-500); }
html body .asb-foot{ border-top: 1px solid rgba(255,255,255,.1); }
html body .asb-foot a{ color: rgba(255,255,255,.7); }
html body .asb-foot a:hover{ background: rgba(255,255,255,.08); color: #fff; }
html body .asb-foot .asb-logout{ color: #ff9d92; }
html body .admin-sidebar-close{ color: var(--lemon-500); border-color: rgba(255,255,255,.22); background: transparent; }
html body .admin-topbar{ background: var(--surface); border-bottom: 1.5px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
html body .admin-sidebar-toggle{ border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); }
html body .a-card-head{ font-weight: 800; }
html body .a-table th{ background: var(--surface-2); color: var(--text-muted); font-weight: 800; font-size: .76rem; letter-spacing: .02em; }
html body .a-table td{ border-color: var(--line); }
html body .a-btn, html body .a-btn-sm{ border-radius: 10px; font-weight: 800; }
html body .a-btn-green{ background: var(--lemon-500); color: var(--green-900); }
html body .a-btn-red{ background: var(--danger); color: #fff; }
.ks-actions{ display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 760px){ html body .admin-content{ padding: 14px; } html body .admin-hero{ padding: 22px 18px 34px; } }
.asb-tag{ background: var(--lemon-500); color: var(--green-900); font-weight: 800; font-size: .68rem; padding: 3px 8px; border-radius: 8px; letter-spacing: .02em; }
html body .asb-brand{ gap: 10px; }

/* ================= BATCH 4 — landing: flat, no 3D, no overlap ================= */
html body .lp-hero{ background-image: none; box-shadow: none; border-radius: var(--r-2xl); }
html body .lp-hero h1{ font-family: var(--f-brand) !important; letter-spacing: -.04em; line-height: 1.04; }
html body .lp-hero h1 em, html body .lp-hero h1 span{ color: var(--lemon-500); font-style: normal; }
html body .lp-stage{ perspective: none; }
html body .lp-deck{ transform: none !important; animation: none; }
html body .lp-frame{ background: var(--lemon-500); box-shadow: none; border-radius: var(--r-2xl); }
html body .lp-search{ border-radius: 18px; box-shadow: none; border: 2px solid var(--lemon-500); }
html body .lp-search button{ border-radius: 12px; box-shadow: none; }
html body .lp-tag, html body .lp-chip{ border-radius: 12px; }
html body .lp-final{ background: var(--green-900); }
html body .lp-final::before, html body .lp-final::after{ display: none; }
html body .lp-svc{ box-shadow: none; border-radius: var(--r-xl); }
html body .lp-svc-go{ box-shadow: none; }
html body .lp-receipt, html body .lp-phone{ box-shadow: none; }
@media (max-width: 800px){
  /* photo sits under the copy instead of a ring over it */
  html body .lp-svc{ min-height: 0; padding: 22px; gap: 14px; }
  html body .lp-svc-copy{ max-width: 100%; }
  html body .lp-svc-img,
  html body .lp-svc--parcel .lp-svc-img{ position: relative; right: auto; bottom: auto; width: 100%; height: 150px; border-radius: 18px; border: 0; }
  html body .lp-svc-img img{ aspect-ratio: auto; height: 100%; }
  html body .lp-svc--parcel{ min-height: 0; }
  html body .lp-svc-go{ right: 18px; left: auto; top: 18px; bottom: auto; }
  html body .lp-svc-copy{ padding-right: 54px; }
}
@media (max-width: 640px){
  html body .lp-hero{ margin-inline: calc(var(--ks-gutter) * -1); border-radius: 0 0 var(--r-2xl) var(--r-2xl); padding: 28px 20px 44px; }
  html body .lp-hero h1{ font-size: 2.05rem; }
}

/* Safety note shown on live orders */
.ks-safe-note{ display: flex; gap: 12px; align-items: flex-start; background: var(--lemon-100); border: 1.5px solid var(--lemon-600); color: var(--green-900); border-radius: var(--r-lg); padding: 12px 14px; margin: 12px 0; font-size: .86rem; line-height: 1.45; }
.ks-safe-note i{ margin-top: 3px; color: var(--green-900); }
[data-theme="dark"] .ks-safe-note{ background: rgba(163,230,53,.1); border-color: rgba(163,230,53,.4); color: var(--text); }
[data-theme="dark"] .ks-safe-note i{ color: var(--lemon-500); }

/* ================= BATCH 5 — inline colours inside forest panels ================= */
/* Pages style hero text inline with dark-surface tokens; inside forest panels flip them. */
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) [style*="color:var(--text-strong)"],
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) [style*="color: var(--text-strong)"]{ color: #fff !important; }
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) [style*="color:var(--text-muted)"],
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) [style*="color: var(--text-muted)"],
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) [style*="color:var(--text)"]{ color: rgba(255,255,255,.78) !important; }
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) [style*="color:var(--text-dim)"]{ color: rgba(255,255,255,.5) !important; }
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) [style*="color:var(--brand-text)"],
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) [style*="color:var(--link)"]{ color: var(--lemon-500) !important; }
html body :is(.page-hero,.wallet-hero,.merchant-hero,.earnings-hero,.admin-hero,.dash-banner,.live-order-card) h1{ font-size: clamp(1.25rem, 5.4vw, 1.9rem) !important; line-height: 1.12; overflow-wrap: anywhere; }
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) .btn-ghost{ color: var(--lemon-500); }

/* buttons on forest panels: see the v11 button system above (lemon primary, soft white-tint secondary) */

/* status pills — flat, legible on both light and forest surfaces */
html body .order-status-pill{ border-radius: 10px; font-weight: 800; border: 0; }
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) .order-status-pill{ background: var(--lemon-500) !important; color: var(--green-900) !important; }
html body :is(.wallet-hero,.home-hero,.dash-banner,.merchant-hero,.earnings-hero,.admin-hero,.rider-hero,.ux-hero,.live-order-card,.cta-banner,.page-hero,.disc-hero,.about-hero,.shelf-hero,.flow-card--dark) .order-status-pill i{ color: var(--green-900) !important; }

/* ================= BATCH 6 — desktop frame ================= */
/* Wide, edge-to-edge content with minimal gutters (var(--ks-gutter): 16-40px).
   Single-column FORM pages get a readable measure instead of 1,400px-wide fields. */
@media (min-width: 900px){
  html body .page-wrapper > .container > :is(.ux-hero,.rider-hero,.merchant-hero,.admin-hero,.wallet-hero,.dash-banner,.earnings-hero,.page-hero,.disc-hero):first-child{ margin-top: 16px; }
  body:is(.ks-pg-send,.ks-pg-checkout,.ks-pg-account,.ks-pg-settings,.ks-pg-gift,.ks-pg-receipt,.ks-pg-notifications,.ks-pg-payout-settings,.ks-pg-kyc,.ks-pg-profile,.ks-pg-marketplace-checkout) .page-wrapper > .container{ max-width: 1200px; }
  body:is(.ks-pg-wallet,.ks-pg-following,.ks-pg-orders,.ks-pg-earnings,.ks-pg-history) .page-wrapper > .container{ max-width: 1360px; }
}
@media (min-width: 1500px){
  html body{ font-size: 16px; }
}
/* admin: use the whole canvas */
html body .admin-content{ max-width: none; padding: 24px clamp(16px, 2vw, 32px); }

/* Hero photos must never dictate hero height (they stretched to ~600px on desktop) */
html body :is(.rider-hero-image,.ux-hero-image){ position: relative; min-height: 240px; box-shadow: none !important; overflow: hidden; background: var(--green-800); padding: 0; border: 0 !important; }
html body :is(.rider-hero-image,.ux-hero-image) img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
html body :is(.rider-hero,.ux-hero){ min-height: 0; }
@media (min-width: 900px){ html body :is(.rider-hero,.ux-hero){ min-height: 260px; } }

/* Landing: .home-feed sits inside .container, so it must not add its own cap + padding */
html body .home-feed{ max-width: none; padding-inline: 0; }
@media (min-width: 900px){
  html body .lp-hero{ padding: 56px clamp(28px, 3.4vw, 64px); }
}

/* ================= BATCH 7 — brand-consistency + mobile order/send fixes ============
   First principles:
   1. One brand voice: user-facing blue/purple/pink accents become forest/lemon.
      Scoped to body.ks-role-user so admin/merchant/rider keeps its own signals.
      Live-red (mk-live, .live-badge, .ifc-live-badge, .mk-dot), danger, warn,
      follow hearts (.ifc-follow, .mbc-follow, .save-heart, .mc-fav) are untouched.
   2. Close buttons: deep forest X on light, lemon X on forest/dark — never
      lemon-on-lemon or invisible deep-on-forest.
   3. Order + send summary cards: 3-column grids collapse on phones so price,
      badges and meta never overlap. Titles/meta wrap anywhere. */

/* ── 7.1 user badges: blue/purple → brand green ── */
body.ks-role-user .badge-info, body.ks-role-user .status-pill.info,
body.ks-role-user .os-confirmed, body.ks-role-user .tx-icon.refund,
body.ks-role-user .settings-item .s-icon.info,
body.ks-role-user .admin-stat.blue .as-icon{
  background: var(--brand-soft); color: var(--link); border: 1px solid var(--brand);
}
body.ks-role-user .badge-purple, body.ks-role-user .status-pill.purple,
body.ks-role-user .os-transit{
  background: var(--brand-soft); color: var(--link); border: 1px solid var(--brand);
}
body.ks-role-user .gift-card.pink, body.ks-role-user .status-pill.pink{
  background: var(--brand-soft); color: var(--link); border-color: var(--brand);
}
body.ks-role-user .qa-card .qa-icon.blue, body.ks-role-user .qa-icon.blue{
  background: var(--brand-soft) !important; color: var(--link) !important;
}
/* stock/count numbers → readable green (was warn-orange/blue) */
body.ks-role-user .ifc-stock, body.ks-role-user .live-left{
  color: var(--link); font-weight: 800;
}
body.ks-role-user .ilu-count-badge{
  background: var(--brand-soft); border: 1px solid var(--brand); color: var(--link);
}
/* keep follow/love hearts red — explicitly excluded from the green remap */
body.ks-role-user .ifc-follow, body.ks-role-user .ifc-follow.following,
body.ks-role-user .mbc-follow.following, body.ks-role-user .save-heart.saved,
body.ks-role-user .mc-fav.saved, body.ks-role-user .follow-pill{
  border-color: var(--danger);
}

/* ── 7.2 header username → lemon on the forest app bar ── */
html body .kiki-nav .user-btn .uname{ color: var(--lemon-500); }
html body .kiki-sidebar .sbu-name{ color: var(--lemon-300); }
html body .kiki-sidebar .sb-user{ border: 1.5px solid rgba(163,230,53,.35); }

/* ── 7.3 close buttons: deep-green X in light, lemon X in dark/forest ── */
html[data-theme="light"] body .kiki-sidebar .sb-close{
  background: var(--lemon-500); color: var(--green-900); border-color: var(--green-900);
}
html[data-theme="light"] body .kiki-sidebar .sb-close:hover{
  background: var(--lemon-400); color: var(--green-900); border-color: var(--green-900);
}
html[data-theme="dark"] body .kiki-sidebar .sb-close{
  background: rgba(255,255,255,.08); color: var(--lemon-500); border-color: rgba(255,255,255,.22);
}
html[data-theme="light"] body .modal-close{ color: var(--green-900); border-color: var(--green-900); }
html[data-theme="light"] body .modal-close:hover{
  background: var(--brand-soft); color: var(--green-900); border-color: var(--green-900);
}
html[data-theme="light"] body .sr-close{ color: var(--green-900); border-color: var(--green-900); }

/* ── 7.4 order cards: professional stacked mobile layout ── */
body.ks-role-user .order-card .order-info{ min-width: 0; }
body.ks-role-user .order-card .order-info h4{
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  overflow-wrap: anywhere; line-height: 1.35;
}
body.ks-role-user .order-card .order-info .meta{
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  overflow-wrap: anywhere;
}
body.ks-role-user .order-card .badge{ white-space: nowrap; flex-shrink: 0; }
body.ks-role-user .order-card .order-right{ min-width: 0; }
body.ks-role-user .order-card .order-status-pill{ white-space: normal; text-align: right; line-height: 1.35; }
@media (max-width: 600px){
  body.ks-role-user .order-card{
    grid-template-columns: 52px minmax(0,1fr); gap: 10px 12px;
    align-items: start; padding: 14px;
  }
  body.ks-role-user .order-card .order-thumb{ width: 52px; height: 52px; font-size: 1.4rem; }
  body.ks-role-user .order-card .order-info h4{ font-size: .92rem; }
  body.ks-role-user .order-card .order-right{
    grid-column: 2; display: flex; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 8px; text-align: left; width: 100%;
  }
  body.ks-role-user .order-card .order-right .price{ margin-right: auto; font-size: 1rem; }
  body.ks-role-user .order-card .order-right .order-status-pill{ margin-top: 0; text-align: left; }
  /* gift.php inline grid (60px 1fr auto) obeys the same stacked layout */
  body.ks-role-user .order-card[style]{ grid-template-columns: 52px minmax(0,1fr); }
}

/* ── 7.5 send hub summary: same stacking guard (PHP already grids ≤640px;
      this covers 601–640px + long titles/codes on tiny screens) ── */
body.ks-role-user .send-tx .tx-main{ min-width: 0; }
body.ks-role-user .send-tx .tx-title{ white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
body.ks-role-user .send-tx .tx-sub{ row-gap: 6px; }
body.ks-role-user .send-tx .tx-sub .mono{ overflow-wrap: anywhere; }
body.ks-role-user .send-tx .tx-right{ min-width: 0; }
@media (max-width: 640px){
  body.ks-role-user .send-tx > summary{
    display: grid; grid-template-columns: 48px minmax(0,1fr);
    gap: 4px 12px; align-items: start;
  }
  body.ks-role-user .send-tx .tx-right{
    grid-column: 1 / -1; display: flex; flex-direction: row; flex-wrap: wrap;
    align-items: center; gap: 8px; text-align: left; width: 100%;
  }
  body.ks-role-user .send-tx .tx-fee{ margin-right: auto; }
}

/* ================= BATCH 8 — serial badges + handover QR mobile ============
   First principle: position in a list IS information. The number badge is a
   real element (screen-reader hidden, visual only) sitting INLINE with the
   title — first chip in the row — so it can never overlap price, status or
   meta on any screen width. Odd/even voices alternate via .is-alt on the
   card (JS re-syncs .is-alt among VISIBLE cards when the send filter hides
   some, so adjacent visible cards never share a colour). */

/* ── 8.1 serial badge — top-right corner, one component, both lists ──
   First principle: a corner badge must own its corner. Each card reserves
   a slim strip at the top (badge lives there, content starts below), so the
   number can never cover price, status or title on any screen width.
   Odd/even voices alternate via .is-alt on the card — PHP paints it first,
   renumberHub() re-syncs it among VISIBLE cards when the send filter hides
   some, so adjacent visible cards never share a colour. */
body.ks-role-user .order-list .order-card,
body.ks-role-user #hub-list .send-tx{ position: relative; padding-top: 32px; }
.ks-serial{
  position: absolute; top: 6px; right: 10px; z-index: 2;
  min-width: 28px; height: 22px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: .7rem; font-weight: 800;
  font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1;
  background: var(--green-900); color: var(--lemon-300);
  border: 1.5px solid var(--green-900);
  pointer-events: none;
}
body.ks-role-user .order-card.is-alt .ks-serial,
body.ks-role-user .send-tx.is-alt .ks-serial{
  background: var(--lemon-500); color: var(--green-900); border-color: var(--green-900);
}
/* Completed stamp: sits top-right beside the serial (serial stays in the corner),
   shown only on delivered / received / confirmed cards (orders + sends). */
.ks-done{
  position: absolute; top: 6px; right: 54px; z-index: 2;
  height: 22px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .02em; line-height: 1;
  white-space: nowrap; pointer-events: none;
  background: var(--brand-soft); color: var(--link);
  border: 1.5px solid var(--brand);
}
[data-theme="dark"] .ks-serial{
  background: var(--lemon-500); color: var(--green-950); border-color: var(--lemon-500);
}
[data-theme="dark"] body.ks-role-user .order-card.is-alt .ks-serial,
[data-theme="dark"] body.ks-role-user .send-tx.is-alt .ks-serial{
  background: var(--green-600); color: #fff; border-color: var(--green-600);
}

/* ── 8.2 handover QR — centered column on phones, untouched on desktop ── */
#handover-qr-card .handover-qr-box{
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
#handover-qr-card .handover-qr-box canvas,
#handover-qr-card .handover-qr-box img{ margin-inline: auto; }
@media (max-width: 640px){
  #handover-qr-card{ flex-direction: column; align-items: stretch; text-align: center; }
  #handover-qr-card .handover-qr-box{ width: 100%; margin-inline: auto; }
  #handover-qr-card .handover-qr-box canvas,
  #handover-qr-card .handover-qr-box img{
    width: min(220px, 64vw); height: auto; aspect-ratio: 1;
    margin-inline: auto;
  }
  #handover-code{ text-align: center; overflow-wrap: anywhere; letter-spacing: 4px; }
  #handover-qr-card .handover-qr-side{ text-align: center; }
  #handover-qr-card .handover-qr-side > div{ justify-content: center; }
}

/* Wide admin tables scroll inside their own box instead of pushing the whole page sideways */
.ops-table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }

/* ═══════════════════════════════════════════════════════════
   Dropdowns — one beautiful look everywhere
   1) every plain <select> gets a soft, rounded, arrow-styled box
   2) <select data-ks-select> becomes a searchable ks-select
   ═══════════════════════════════════════════════════════════ */
html body select:not([multiple]):not(.kss-native):not([size]) {
  -webkit-appearance: none; appearance: none;
  min-height: 48px; padding: 0 44px 0 14px; border-radius: 14px;
  background-color: var(--input); color: var(--text-strong);
  border: 1.5px solid var(--input-border); font-size: .98rem; font-weight: 600; line-height: 1.2; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230B3D26' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 16px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  text-overflow: ellipsis;
}
html[data-theme="dark"] body select:not([multiple]):not(.kss-native):not([size]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A3E635' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
html body select:not([multiple]):not(.kss-native):not([size]):hover:not(:disabled) { border-color: var(--green-600); }
html body select:not([multiple]):not(.kss-native):not([size]):focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px var(--ring); background-color: var(--input-focus, var(--input)); }
html body select:disabled { opacity: .55; cursor: not-allowed; }
html body select option, html body select optgroup { color: #0B3D26; background: #fff; font-weight: 600; }
html[data-theme="dark"] body select option, html[data-theme="dark"] body select optgroup { color: #EAF6E0; background: #0C2415; }
html body select.card-template-select, html body td select, html body .a-table select { min-height: 36px; padding: 0 34px 0 10px; border-radius: 10px; font-size: .84rem; }

.kss { position: relative; width: 100%; }
.kss.is-disabled { opacity: .55; }
.kss-native { position: absolute !important; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.kss-btn { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 14px; text-align: left; border-radius: 14px; background: var(--input); border: 1.5px solid var(--input-border); color: var(--text-strong); font-size: .98rem; font-weight: 700; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.kss-btn:hover:not(:disabled), .kss.is-open .kss-btn { border-color: var(--green-600); }
.kss-btn:focus-visible, .kss.is-open .kss-btn { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.kss-ico { font-size: 1.2rem; flex: none; }
.kss-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kss-txt.is-ph { color: var(--text-dim); font-weight: 600; }
.kss-chev { flex: none; width: 10px; height: 10px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .2s; color: var(--green-700); }
html[data-theme="dark"] .kss-chev { color: var(--lemon-500); }
.kss.is-open .kss-chev { transform: translateY(2px) rotate(-135deg); }
.kss-backdrop { position: fixed; inset: 0; z-index: 2147483000; background: transparent; }
.kss-backdrop.is-sheet { background: rgba(4, 24, 15, .55); backdrop-filter: blur(2px); }
.kss-panel { position: fixed; z-index: 2147483001; display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1.5px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(4, 24, 15, .28); overflow: hidden; animation: kssIn .16s ease both; }
@keyframes kssIn { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
.kss-grip, .kss-head { display: none; }
.kss-search { padding: 10px; border-bottom: 1px solid var(--line-soft); }
.kss-search input { width: 100%; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--input); border: 1.5px solid var(--input-border); color: var(--text-strong); font-size: .95rem; }
.kss-search input:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px var(--ring); }
.kss-list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.kss-grp { padding: 12px 12px 4px; font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-dim); }
.kss-opt { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-align: left; color: var(--text); }
.kss-opt:hover, .kss-opt:focus-visible { background: var(--surface-2); outline: none; }
.kss-opt.is-sel { background: var(--accent-soft, rgba(163,230,53,.2)); }
.kss-opt[disabled] { opacity: .45; cursor: not-allowed; }
.kss-e { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.kss-t { flex: 1; min-width: 0; }
.kss-t b { display: block; font-size: .93rem; color: var(--text-strong); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.kss-t small { display: block; font-size: .75rem; color: var(--text-muted); margin-top: 1px; }
.kss-ok { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-fg); display: grid; place-items: center; font-size: .72rem; font-style: normal; font-weight: 800; }
.kss-none { padding: 22px 14px; text-align: center; color: var(--text-muted); font-size: .9rem; }
body.kss-lock { overflow: hidden; }
@media (max-width: 640px) {
  .kss-panel.is-sheet { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important; width: 100% !important; min-width: 0 !important; max-height: 78vh !important; border-radius: 26px 26px 0 0; border-width: 1.5px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); animation: kssUp .22s ease both; }
  @keyframes kssUp { from { transform: translateY(100%); } to { transform: none; } }
  .kss-grip { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 10px auto 0; }
  .kss-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 6px; }
  .kss-head b { font-size: 1.05rem; color: var(--text-strong); }
  .kss-x { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); color: var(--text-strong); font-size: .9rem; }
  .kss-opt { padding: 12px; }
}

/* ═══ Image Bank picker + three-way photo chooser ═══ */
.photo-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.photo-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 66px; padding: 8px 6px; border-radius: 14px; background: var(--surface-3); color: var(--text-strong); font-weight: 800; font-size: .78rem; line-height: 1.15; text-align: center; transition: background .15s; }
.photo-opt span { font-size: 1.3rem; line-height: 1; }
.photo-opt:hover { background: var(--line-strong); }
.photo-opt.is-bank { background: var(--btn-bg); color: var(--btn-fg); }
.ksib { position: fixed; inset: 0; z-index: 2147482000; display: flex; align-items: center; justify-content: center; padding: 18px; }
.ksib[hidden] { display: none !important; }
.ksib-bd { position: absolute; inset: 0; background: rgba(4, 24, 15, .6); backdrop-filter: blur(3px); }
.ksib-box { position: relative; display: flex; flex-direction: column; width: min(900px, 100%); max-height: min(760px, 100%); background: var(--surface); border-radius: 26px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); }
/* Header strip never shrinks: the scrollable gallery gives up height first,
   otherwise the category chips row gets squashed and images crowd over it. */
.ksib-head, .ksib-tabs, .ksib-search, .ksib-cats, .ksib-foot { flex: 0 0 auto; }
.ksib-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.ksib-head b { font-size: 1.2rem; color: var(--text-strong); }
.ksib-x { width: 38px; height: 38px; border-radius: 50%; background: var(--surface-3); color: var(--text-strong); }
.ksib-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 18px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.ksib-tabs button { min-height: 44px; border-radius: 12px; font-weight: 800; font-size: .9rem; color: var(--text-muted); }
.ksib-tabs button.on { background: var(--btn-bg); color: var(--btn-fg); }
.ksib-search { padding: 0 18px 8px; }
.ksib-search input { width: 100%; min-height: 48px; padding: 0 16px; border-radius: 14px; background: var(--input); border: 1.5px solid var(--input-border); color: var(--text-strong); font-size: 1rem; }
.ksib-search input:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px var(--ring); }
/* Own solid strip + divider so the gallery can never paint over these chips. */
.ksib-cats { position: relative; z-index: 2; display: flex; gap: 8px; overflow-x: auto; padding: 6px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: none; scroll-padding-inline: 18px; -webkit-overflow-scrolling: touch; }
.ksib-cats::-webkit-scrollbar { display: none; }
.ksib-cats:empty { display: none; }
.ksib-cats button { flex: none; min-height: 40px; padding: 0 15px; border-radius: 999px; background: var(--surface-2); color: var(--text-strong); font-weight: 700; font-size: .84rem; white-space: nowrap; }
.ksib-cats button.on { background: var(--btn-bg); color: var(--btn-fg); }
.ksib-cats i { font-style: normal; opacity: .65; margin-left: 3px; font-size: .75rem; }
.ksib-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 14px 18px 18px; align-content: start; overscroll-behavior: contain; }
.ksib-card { position: relative; }
.ksib-pick { display: block; width: 100%; border-radius: 18px; overflow: hidden; background: var(--surface-2); text-align: left; transition: transform .15s, box-shadow .15s; }
.ksib-pick:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ksib-pick img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--surface-3); }
.ksib-pick span { display: block; padding: 9px 11px 11px; font-size: .84rem; font-weight: 700; color: var(--text-strong); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ksib-del { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(4, 24, 15, .7); color: #fff; font-size: .8rem; }
.ksib-msg { grid-column: 1 / -1; padding: 40px 16px; text-align: center; color: var(--text-muted); line-height: 1.5; }
.ksib-msg b { color: var(--text-strong); }
.ksib-foot { padding: 0 18px 16px; text-align: center; }
.ksib-foot:empty { display: none; }
body.ksib-lock { overflow: hidden; }
@media (max-width: 640px) {
  .ksib { padding: 0; align-items: flex-end; }
  .ksib-box { width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; }
  .ksib-head { padding: 14px 14px 4px; }
  .ksib-tabs { margin: 6px 14px; }
  .ksib-search { padding: 0 14px 8px; }
  .ksib-cats { padding: 4px 14px 10px; scroll-padding-inline: 14px; }
  .ksib-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px 14px 16px; }
}

/* ============================================================
   Responsive stat tiles — one shared contract
   Every hero/stat tile across merchant · rider · user · admin
   shares a row evenly, wraps instead of overflowing, and keeps
   long naira figures contained at 320px → 1440px+.
   ============================================================ */
html body .mh-stats,
html body .ux-stats,
html body .rider-hero-stats,
html body .hero-stats,
html body .stat-grid,
html body .admin-stats{ max-width: 100%; }

html body .mh-stats > *,
html body .ux-stat,
html body .rider-hero-stats > *,
html body .hero-stat,
html body .stat-card,
html body .admin-stat{ min-width: 0; max-width: 100%; box-sizing: border-box; }

/* Numeric values: fluid type + safe wrapping in every stat family */
html body .mhs-num,
html body .rhs-num,
html body .rh-stat b,
html body .ux-stat b,
html body .ux-stat strong,
html body .hero-stat .stat-num,
html body .stat-card .stat-value,
html body .admin-stat .as-val,
html body .kpi-num{ overflow-wrap: anywhere; word-break: break-word; }

/* Labels never push a tile wider than its column */
html body .mhs-label,
html body .rhs-label,
html body .rh-stat span,
html body .ux-stat span,
html body .hero-stat .stat-label,
html body .stat-card .stat-label,
html body .admin-stat .as-lbl,
html body .kpi-label,
html body .kpi-sub{ overflow-wrap: anywhere; line-height: 1.3; }

@media (max-width: 800px){
  html body .mh-stats,
  html body .ux-stats,
  html body .rider-hero-stats{ gap: 8px; }
  html body .ux-stat,
  html body .rider-hero-stats > *,
  html body .rh-stat{ flex: 1 1 110px; }
  html body .mh-stats > *{ flex: 1 1 108px; padding: 10px 12px; }
  html body .rider-hero-stats .rh-stat b,
  html body .rh-stat b{ font-size: clamp(1rem, 4vw, 1.25rem); }
}

@media (max-width: 560px){
  html body .rh-stat,
  html body .rhs,
  html body .rider-hero-stats > *{ flex: 1 1 calc(50% - 4px); }
}

@media (max-width: 480px){
  html body .ux-stat{ flex: 1 1 calc(50% - 4px); }
}

@media (max-width: 400px){
  html body .ux-stat{ padding: 10px 12px; }
  html body .rh-stat,
  html body .rhs,
  html body .rider-hero-stats > *{ padding: 10px 12px; }
  html body .stat-card{ padding: 12px; }
  html body .admin-stat{ padding: 14px; }
  html body .admin-stat .as-val{ font-size: 1.5rem; }
}
