/* =====================================================================
   Hardware Store design system
   One set of tokens + components for the shop, admin and delivery apps.
   Mobile first (360–430px), scales to tablet/desktop; light + dark.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* brand: orange 700 passes WCAG AA (5.2:1) with white text */
  --brand: #c2410c; --brand-hover: #9a3412; --brand-ink: #fff;
  --brand-50: #fff7ed; --brand-100: #ffedd5; --brand-200: #fed7aa;

  /* neutrals (slate) */
  --bg: #f4f5f7; --surface: #fff; --surface-2: #f8fafc; --sunken: #eef0f3;
  --line: #e2e5ea; --line-strong: #cbd2da;
  --text: #0f172a; --text-2: #334155; --muted: #64748b; --faint: #94a3b8;

  /* meaning */
  --success: #15803d; --success-bg: #dcfce7; --warning: #b45309; --warning-bg: #fef3c7;
  --danger: #b91c1c; --danger-bg: #fee2e2; --info: #1d4ed8; --info-bg: #dbeafe;
  --violet: #6d28d9; --violet-bg: #ede9fe;

  /* type: the phone's own fonts (Roboto + Noto Devanagari on Android), nothing to download */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 17px; --fs-xl: 20px; --fs-2xl: 24px;

  /* space (4px grid), shape, depth, motion */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --e1: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --e2: 0 4px 14px rgba(15, 23, 42, .08);
  --e3: 0 14px 34px rgba(15, 23, 42, .18);
  --ring: 0 0 0 3px rgba(194, 65, 12, .32);
  --fast: 140ms; --med: 220ms; --ease: cubic-bezier(.2, .8, .2, 1);

  --appbar-h: 60px; --tabbar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #fb923c; --brand-hover: #fdba74; --brand-ink: #1c0a02;
    --brand-50: #2a1609; --brand-100: #3a1d0b; --brand-200: #5a2d10;
    --bg: #0b0f14; --surface: #131922; --surface-2: #161d27; --sunken: #0f141b;
    --line: #243040; --line-strong: #33404f;
    --text: #e8ecf2; --text-2: #c6cfdb; --muted: #94a3b8; --faint: #64748b;
    --success: #4ade80; --success-bg: #0f2a1a; --warning: #fbbf24; --warning-bg: #2d2208;
    --danger: #f87171; --danger-bg: #2f1313; --info: #93c5fd; --info-bg: #11213d;
    --violet: #c4b5fd; --violet-bg: #221a3d;
    --e1: 0 1px 2px rgba(0, 0, 0, .4); --e2: 0 6px 18px rgba(0, 0, 0, .45); --e3: 0 16px 40px rgba(0, 0, 0, .6);
    --ring: 0 0 0 3px rgba(251, 146, 60, .4);
    color-scheme: dark;
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 400 var(--fs-md)/1.5 var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--tabbar-h) + 88px + env(safe-area-inset-bottom));
}
main { max-width: 720px; margin: 0 auto; padding: var(--s3) var(--s4) var(--s6); }
h1, h2, h3 { line-height: 1.25; margin: 0; color: var(--text); }
h2 { font-size: var(--fs-xl); font-weight: 750; margin: var(--s1) 0 var(--s3); letter-spacing: -.01em; }
h3 { font-size: var(--fs-lg); font-weight: 700; }
a { color: var(--brand); }
img { display: block; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
td, th { padding: var(--s2) var(--s1); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.r { text-align: right; }
.ico { flex: none; vertical-align: middle; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
::selection { background: var(--brand-200); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- 3. Layout helpers ---------- */
.row { display: flex; gap: var(--s2); align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: var(--s3); }
.muted { color: var(--muted); font-size: var(--fs-sm); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.strong { font-weight: 700; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tap { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- 4. App bar ---------- */
.top, .appbar {
  position: sticky; top: 0; z-index: 20; height: var(--appbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  padding: 0 var(--s4); padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); color: var(--text);
}
.brandmark { display: flex; align-items: center; gap: var(--s3); min-width: 0; text-decoration: none; color: inherit; }
.logo {
  width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, #ea580c, #9a3412); color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15);
}
.brandmark .t { font-weight: 750; font-size: var(--fs-lg); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brandmark .s { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top a { color: var(--brand); font-weight: 600; text-decoration: none; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: var(--r-pill);
  background: transparent; border: 0; color: var(--text-2); cursor: pointer; padding: 0;
  transition: background var(--fast);
}
.icon-btn:hover { background: var(--sunken); }
.pill-btn {
  height: 36px; padding: 0 var(--s3); border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-2); font: 600 var(--fs-sm) var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}

/* ---------- 5. Buttons ---------- */
button, .btn {
  -webkit-appearance: none; appearance: none; font: 650 var(--fs-md)/1 var(--font);
  min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-md); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand);
  text-decoration: none; transition: background var(--fast), transform var(--fast), box-shadow var(--fast), border-color var(--fast);
  white-space: nowrap;
}
button:hover, .btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button:active, .btn:active { transform: scale(.98); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
button.ghost, .btn--secondary { background: var(--surface); color: var(--brand); border-color: var(--line-strong); }
button.ghost:hover, .btn--secondary:hover { background: var(--brand-50); border-color: var(--brand-200); }
.btn--quiet { background: transparent; color: var(--text-2); border-color: transparent; }
.btn--quiet:hover { background: var(--sunken); border-color: transparent; }
.btn--danger { background: var(--surface); color: var(--danger); border-color: var(--line-strong); }
.btn--danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn--sm { min-height: 36px; padding: 0 var(--s3); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn--lg { min-height: 52px; font-size: var(--fs-lg); border-radius: var(--r-md); }
.full, .btn--block { width: 100%; margin-top: var(--s3); }
.btn--wa { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn--wa:hover { background: #15803d; border-color: #15803d; }
.tabbar button, .icon-btn, .cat, .seg button, .chip { min-height: 0; }

/* ---------- 6. Form fields ---------- */
label { display: block; margin: var(--s3) 0 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
input, select, textarea {
  width: 100%; font: 400 16px/1.4 var(--font); color: var(--text); background: var(--surface);
  min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color var(--fast), box-shadow var(--fast);
}
textarea { min-height: 80px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); margin: 0; flex: none; }
.field-prefix { display: flex; align-items: stretch; }
.field-prefix span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--sunken); color: var(--muted); font-weight: 600; }
.field-prefix input { border-radius: 0 var(--r-md) var(--r-md) 0; }
.otp-input { letter-spacing: .5em; text-align: center; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.radio {
  display: flex; gap: var(--s3); align-items: center; padding: var(--s3); margin: var(--s2) 0;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer;
  font-weight: 500; color: var(--text); transition: border-color var(--fast), background var(--fast);
}
.radio:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.radio .ico { color: var(--brand); }
.radio .sub { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }

/* ---------- 7. Surfaces ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s4); margin-bottom: var(--s3); box-shadow: var(--e1);
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card--flat { box-shadow: none; }
.card--accent { border-color: var(--brand-200); background: linear-gradient(180deg, var(--brand-50), var(--surface)); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: var(--s6) 0 var(--s3); }
.section-head h3, h3.sec { font-size: var(--fs-lg); font-weight: 750; margin: var(--s6) 0 var(--s3); }
.section-head h3 { margin: 0; }
.divider { height: 1px; background: var(--line); margin: var(--s3) 0; border: 0; }
.list { margin: 0; padding: 0; list-style: none; }
.list-row {
  display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; min-height: 52px;
  border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 550;
}
.list-row:last-child { border-bottom: 0; }
.list-row .lead { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--sunken); color: var(--text-2); }
.list-row .trail { color: var(--faint); }
.list-row.danger { color: var(--danger); }
.list-row.danger .lead { background: var(--danger-bg); color: var(--danger); }

/* ---------- 8. Badges, chips, segmented ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 650; background: var(--sunken); color: var(--text-2); white-space: nowrap;
}
.badge.paid, .badge.delivered, .badge.st-delivered, .badge--success { background: var(--success-bg); color: var(--success); }
.badge.cancelled, .badge.failed, .badge.refund_due, .badge.st-cancelled, .badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge.placed, .badge.st-placed, .badge.pending, .badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge.confirmed, .badge.st-confirmed, .badge.on_credit, .badge--info { background: var(--info-bg); color: var(--info); }
.badge.packed, .badge.st-packed { background: var(--violet-bg); color: var(--violet); }
.badge.out_for_delivery, .badge.st-out_for_delivery, .badge--brand { background: var(--brand-100); color: var(--brand); }
.save-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--success-bg); color: var(--success); font-size: var(--fs-xs); font-weight: 750; }
.chips, .seg { display: flex; gap: var(--s2); overflow-x: auto; padding: 2px 2px var(--s2); margin: 0 0 var(--s3); scrollbar-width: none; }
.chips::-webkit-scrollbar, .seg::-webkit-scrollbar, .hscroll::-webkit-scrollbar { display: none; }
.chips button, .chip {
  flex: none; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--line-strong);
}
.chips button:not(.ghost), .chip.is-on { background: var(--text); color: var(--surface); border-color: var(--text); }
.chips button.ghost:hover { background: var(--sunken); border-color: var(--line-strong); color: var(--text); }
.chips a { text-decoration: none; }

/* ---------- 9. Bottom tab bar ---------- */
.tabs, .tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line);
}
.tabs button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; border-radius: 0; color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 6px 2px;
  min-height: 0;
}
.tabs button:hover { background: none; color: var(--text); }
.tabs button .ico { width: 24px; height: 24px; }
.tabs button.on { color: var(--brand); }
.tabs button.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.tabs .count {
  position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 750; display: grid; place-items: center; line-height: 1;
}
.tabs .count:empty { display: none; }
.tabs .count.bump { animation: bump var(--med) var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }

/* ---------- 10. Toast ---------- */
#toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom));
  width: min(92vw, 440px); z-index: 60; display: flex; align-items: center; gap: var(--s3);
  padding: 12px 16px; border-radius: var(--r-md); background: #0f172a; color: #f8fafc; box-shadow: var(--e3);
  font-size: var(--fs-sm); font-weight: 550; animation: toast-in var(--med) var(--ease);
}
#netbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80; padding: 6px 16px calc(6px); padding-top: calc(6px + env(safe-area-inset-top));
  background: #0f172a; color: #fde68a; font-size: var(--fs-xs); font-weight: 650; text-align: center;
}
#netbar[hidden] { display: none; }
#toast.ok .ico { color: #4ade80; } #toast.err .ico { color: #f87171; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 11. Skeleton + empty states ---------- */
.sk { position: relative; overflow: hidden; background: var(--sunken); border-radius: var(--r-sm); }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation: shimmer 1.2s infinite; }
@media (prefers-color-scheme: dark) { .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); } }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-line { height: 12px; margin: 8px 0; }
.empty { text-align: center; padding: var(--s8) var(--s4); }
.empty .bubble { width: 84px; height: 84px; margin: 0 auto var(--s4); border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 auto var(--s4); max-width: 30ch; }

/* ---------- 12. Shop: promo, search, categories ---------- */
.promo {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: var(--s5) var(--s4) var(--s4); margin: var(--s2) 0 var(--s4);
  color: #fff; background: radial-gradient(120% 140% at 100% 0%, #f97316 0%, #c2410c 45%, #7c2d12 100%); box-shadow: var(--e2);
}
.promo::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.promo h1 { color: #fff; font-size: 22px; font-weight: 800; letter-spacing: -.01em; max-width: 18ch; }
.promo p { margin: 6px 0 0; opacity: .9; font-size: var(--fs-sm); }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: var(--s4) 0; font-size: 12.5px; font-weight: 600; }
.perks span { display: flex; align-items: center; gap: 6px; }
.perks .ico { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.promo .row .btn { flex: 1; }
.promo .btn--light { background: #fff; color: #9a3412; border-color: #fff; }
.promo .btn--light:hover { background: #fff7ed; }
.searchbar { position: sticky; top: var(--appbar-h); z-index: 15; margin: 0 calc(-1 * var(--s4)); padding: var(--s2) var(--s4); background: var(--bg); }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-left: 44px; min-height: 50px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--e1); border-color: var(--line); }
.catgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.cat {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s3) var(--s1) var(--s2);
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
  font: 600 12px/1.25 var(--font); text-align: center; white-space: normal;
}
.cat:hover { background: var(--surface); border-color: var(--line-strong); }
.cat .cico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.cat small { color: var(--faint); font-size: 11px; font-weight: 500; }
.cat.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand); }
.cat.on .cico { background: var(--brand); color: var(--brand-ink); }

/* ---------- 13. Shop: product cards ---------- */
.hscroll { display: flex; gap: var(--s3); overflow-x: auto; padding: 2px 2px var(--s3); scroll-snap-type: x mandatory; margin: 0 -2px; }
.bcard {
  flex: 0 0 152px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s2); box-shadow: var(--e1);
}
.bcard .media { aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; margin-bottom: var(--s2); }
.bcard .pname { font-size: var(--fs-sm); min-height: 2.6em; }
.bcard .deal { font-size: var(--fs-sm); margin-top: 4px; }
.media { position: relative; background: var(--sunken); display: grid; place-items: center; color: var(--brand); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.ph { background: linear-gradient(135deg, var(--brand-50), var(--sunken)); }
.media .save-tag { position: absolute; top: 6px; left: 6px; }
.pcard { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3); margin-bottom: var(--s2); transition: border-color var(--fast), box-shadow var(--fast); }
.pcard:hover { border-color: var(--line-strong); box-shadow: var(--e2); }
.pcard .media { width: 84px; height: 84px; flex: none; border-radius: var(--r-md); overflow: hidden; }
.pname { font-weight: 650; line-height: 1.35; color: var(--text); }
.price { font-weight: 800; font-size: var(--fs-lg); color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.price small, .unit { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }
.strike, .mrp { text-decoration: line-through; color: var(--faint); font-size: var(--fs-sm); margin-left: 6px; }
.slabs, .deal { display: flex; align-items: center; gap: 5px; color: var(--success); font-size: var(--fs-sm); font-weight: 600; }
.meta { color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.meta.out { color: var(--danger); font-weight: 600; }
.pcard .ctl { align-self: flex-end; }
.add-btn { min-height: 38px; padding: 0 14px; border-radius: var(--r-sm); background: var(--surface); color: var(--brand); border: 1.5px solid var(--brand); font-weight: 750; font-size: var(--fs-sm); }
.add-btn:hover { background: var(--brand-50); border-color: var(--brand); }

/* stepper */
.qty { display: inline-flex; align-items: center; gap: 0; border-radius: var(--r-sm); background: var(--brand); color: var(--brand-ink); overflow: hidden; }
.qty button { min-height: 38px; width: 38px; padding: 0; border-radius: 0; background: transparent; color: inherit; border: 0; font-size: 20px; font-weight: 700; }
.qty button:hover { background: rgba(0, 0, 0, .12); }
.qty b, .qty input { min-width: 34px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.qty input { width: 52px; min-height: 38px; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; font-size: 16px; }
.qty input:focus { box-shadow: none; background: rgba(0, 0, 0, .12); }
.qty--lg button { width: 46px; min-height: 46px; }
.qty--lg input { width: 60px; min-height: 46px; font-size: 18px; }

/* reorder strip */
.reo { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); }
.reo .lead { width: 42px; height: 42px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--info-bg); color: var(--info); flex: none; }

/* ---------- 14. Product page ---------- */
.subbar { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3) calc(-1 * var(--s2)); font-weight: 650; color: var(--text-2); }
.pdp-media { aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--s4); border: 1px solid var(--line); }
.pdp-media img { object-fit: contain; background: var(--surface); }
.overline { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.pdp-title { font-size: 22px; font-weight: 800; margin: 4px 0 2px; letter-spacing: -.01em; }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: var(--s3) 0 var(--s2); }
.pdp-price .price { font-size: 28px; }
.facts { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.tiers { margin: 0; padding: 0; list-style: none; }
.tiers li { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s3); align-items: center; padding: 10px var(--s3); border-radius: var(--r-sm); font-variant-numeric: tabular-nums; }
.tiers li + li { margin-top: 2px; }
.tiers li.on { background: var(--success-bg); box-shadow: inset 3px 0 0 var(--success); }
.tiers .tp { font-weight: 750; }
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 25;
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(15, 23, 42, .08);
  padding: var(--s3) var(--s4);
}
.sticky-cta .inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: var(--s3); }
.sticky-cta .sum { flex: 1; min-width: 0; white-space: nowrap; }
.sticky-cta .sum > * { display: block; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta .sum .xs { color: var(--muted); }
.sticky-cta .sum b { font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }

/* ---------- 15. Cart ---------- */
.line { display: grid; grid-template-columns: 56px 1fr; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .media { width: 56px; height: 56px; border-radius: var(--r-sm); overflow: hidden; }
.line .bottom { display: flex; align-items: center; justify-content: space-between; margin-top: var(--s2); }
.line .total { font-weight: 800; font-variant-numeric: tabular-nums; }
.bill td { padding: 6px 0; border: 0; font-size: var(--fs-md); }
.bill tr.total td { border-top: 1px dashed var(--line-strong); padding-top: var(--s3); font-size: var(--fs-lg); font-weight: 800; }

/* ---------- 16. Orders ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: var(--s3) 0; }
.steps span { height: 5px; border-radius: 3px; background: var(--line); }
.steps span.done { background: var(--brand); }
.steps-labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; font-size: 10.5px; color: var(--faint); margin-top: -6px; margin-bottom: var(--s2); }
.steps-labels span.done { color: var(--text-2); font-weight: 600; }
.order-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.order-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end; margin-top: var(--s3); }

/* ---------- 17. Profile ---------- */
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-100); color: var(--brand); font-weight: 800; font-size: 22px; flex: none; }
.meter { height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; margin: var(--s2) 0; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.kv { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--muted); }
.kv b { color: var(--text); font-size: var(--fs-md); }

/* ---------- 18. Login ---------- */
.auth { max-width: 420px; margin: var(--s4) auto; padding: var(--s6) var(--s5); }
.auth .bubble { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: var(--s4); }
.auth h2 { margin: 0 0 4px; }
.auth .sub { color: var(--muted); margin: 0 0 var(--s2); font-size: var(--fs-sm); }
.auth .bubble.wa { background: #dcfce7; color: #15803d; }
.auth #after { margin: var(--s2) 0 0; color: var(--text-2); }
.otp-row { display: flex; gap: var(--s2); }
.otp-row .otp-input { flex: 1; min-width: 0; }
.otp-row button { flex: none; }
.auth #openwa { margin-top: var(--s2); }
.auth .nowa { margin: var(--s4) 0 0; padding-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.auth .nowa a { font-weight: 650; white-space: nowrap; }
.linkish { background: none; border: 0; color: var(--brand); font-weight: 650; min-height: 32px; padding: 0; }
.linkish:hover { background: none; text-decoration: underline; border: 0; }

/* ---------- 19. Cart bar (floating) ---------- */
.cartbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 28;
  max-width: 696px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
  min-height: 56px; padding: 0 var(--s4); border-radius: var(--r-md); box-shadow: var(--e3); font-size: var(--fs-md);
  animation: rise var(--med) var(--ease);
}
.cartbar .l { display: flex; align-items: center; gap: var(--s3); font-weight: 650; }
.cartbar .l .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .2); font-weight: 800; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 20. Footer ---------- */
footer.legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; font-size: var(--fs-xs); color: var(--muted); margin: var(--s8) 0 var(--s2); }
footer.legal a { color: inherit; }

/* ---------- 21. Admin + delivery extras ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-bottom: var(--s3); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4); box-shadow: var(--e1); }
.kpi .k { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.kpi .v { font-size: 24px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .d { color: var(--muted); font-size: var(--fs-xs); }
.kpi.alert { border-color: var(--warning); background: linear-gradient(180deg, var(--warning-bg), var(--surface)); }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-md); background: var(--sunken); flex: none; display: grid; place-items: center; color: var(--brand); }
.thumb.big { width: 96px; height: 96px; }
.thumb.ph { background: linear-gradient(135deg, var(--brand-50), var(--sunken)); }
.prod { cursor: pointer; align-items: flex-start; gap: var(--s3); }
.prod:hover { border-color: var(--line-strong); box-shadow: var(--e2); }
.low { color: var(--danger); font-weight: 700; }
.imgpick { display: flex; align-items: center; gap: var(--s3); cursor: pointer; margin: 0 0 var(--s2); }
.slabhead { font-size: var(--fs-xs); margin-bottom: 4px; }
.slab { margin-bottom: 6px; }
.slab button { flex: none; width: 48px; padding: 0; }
details summary { cursor: pointer; font-weight: 650; padding: var(--s1) 0; }
.backup.bad { border-color: var(--danger); background: linear-gradient(180deg, var(--danger-bg), var(--surface)); }
.backup.warn { border-color: var(--warning); }
.backup.ok { border-color: color-mix(in srgb, var(--success) 45%, var(--line)); }
.cardgrid { display: grid; gap: var(--s3); }
.cardgrid > .card { margin: 0; }
.big-action { min-height: 56px; font-size: var(--fs-lg); border-radius: var(--r-md); }


/* ---------- 21b. Offers, brands, gallery, notifications ---------- */
.carousel { position: relative; margin: var(--s2) 0 var(--s3); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--e2); background: var(--sunken); }
.carousel .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel .track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; position: relative; }
.slide.banner { display: block; aspect-ratio: 23 / 10; padding: 0; border: 0; border-radius: 0; background: var(--sunken); min-height: 0; cursor: pointer; }
.slide.banner:hover { background: var(--sunken); }
.slide.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide .cap {
  position: absolute; inset: auto 0 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3);
  padding: 36px var(--s4) 22px; color: #fff; text-align: left; background: linear-gradient(180deg, transparent, rgba(10, 12, 16, .72));
}
.slide .cap.bare { background: none; padding-top: 0; }
.slide .cap b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.slide .cap .go { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 12px; border-radius: var(--r-pill); background: #fff; color: #111827; font-size: 13px; font-weight: 750; }
/* story-style progress: one segment per banner, the current one fills */
.segs { position: absolute; left: var(--s4); right: var(--s4); bottom: 9px; display: flex; gap: 4px; pointer-events: none; }
.segs i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .38); overflow: hidden; }
.segs i b { display: block; height: 100%; width: 0; background: #fff; }
.segs i.done b { width: 100%; }
.segs i.run b { animation: seg 5s linear forwards; }
.carousel.paused .segs i.run b { animation-play-state: paused; }
@keyframes seg { to { width: 100%; } }
.minipromo {
  display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s3); padding: var(--s3); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--e1); position: relative; overflow: hidden;
}
.minipromo::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg, #f97316, #c2410c); }
.minipromo .mp-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.minipromo b { display: block; font-size: var(--fs-sm); font-weight: 750; }
.minipromo span:not(.mp-ico) { font-size: 12px; color: var(--muted); }
.round { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--text-2); }
.round.wa { background: #16a34a; color: #fff; }

.brands { gap: var(--s2); }
.btile {
  flex: 0 0 96px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s3) var(--s1);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text); box-shadow: var(--e1); min-height: 0;
}
.btile:hover { background: var(--surface); border-color: var(--line-strong); }
.btile .bname { font-size: 12.5px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btile small { font-size: 11px; color: var(--faint); font-weight: 500; }
.bmark { flex: none; display: grid; place-items: center; border-radius: 14px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.bmark img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.bmark.mono {
  border: 0; color: #fff; font-weight: 800; letter-spacing: .02em; font-size: 15px;
  background: linear-gradient(135deg, hsl(var(--h) 62% 46%), hsl(calc(var(--h) + 28) 70% 34%));
}
.brandline { font-size: 10.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.bhero { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s2); background: linear-gradient(120deg, var(--brand-50), var(--surface) 60%); }
.bhero h1 { font-size: 22px; font-weight: 800; margin: 2px 0; }
.bhero .pill-btn { align-self: flex-start; }

.cat .cico.photo { background: var(--sunken); overflow: hidden; }
.cat .cico.photo img { width: 100%; height: 100%; object-fit: cover; }
.cat.on .cico.photo { box-shadow: 0 0 0 2px var(--brand); background: var(--sunken); }
.cat .cname { overflow-wrap: anywhere; }

.gallery { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); margin-bottom: var(--s2); }
.gtrack { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gtrack::-webkit-scrollbar { display: none; }
.gslide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.gslide img { width: 100%; height: 100%; object-fit: contain; }
.gcount { position: absolute; right: 10px; bottom: 10px; padding: 3px 10px; border-radius: var(--r-pill); background: rgba(15, 23, 42, .72); color: #fff; font-size: 12px; font-weight: 700; }
.gthumbs { display: flex; gap: var(--s2); overflow-x: auto; margin-bottom: var(--s4); padding: 2px; }
.gthumbs button { flex: none; width: 56px; height: 56px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); overflow: hidden; min-height: 0; opacity: .65; }
.gthumbs button.on { opacity: 1; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.gthumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: var(--s2); }
.brandchip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 4px; min-height: 0; border-radius: var(--r-pill);
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 750;
}
.brandchip:hover { background: var(--brand-50); border-color: var(--brand-200); }
.brandchip .bmark { border-radius: 50%; font-size: 10px; }
.share-btn { margin-left: auto; }

.notif-card { display: flex; gap: var(--s3); border-color: var(--brand-200); background: linear-gradient(135deg, var(--brand-50), var(--surface) 70%); }
.notif-card .bell { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); animation: ring 2.4s var(--ease) 1s 2; }
.notif-card p { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--text-2); }
@keyframes ring { 0%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } 50% { transform: rotate(0); } }

/* admin: photo manager, brand and banner cards */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: var(--s2); margin-top: var(--s2); }
.photo { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--sunken); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .cover { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: var(--r-pill); background: var(--brand); color: var(--brand-ink); font-size: 10.5px; font-weight: 750; }
.photo .ph-actions { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; }
.photo .ph-actions button { width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 50%; background: rgba(15, 23, 42, .72); border: 0; color: #fff; }
.photo.add { display: grid; place-items: center; align-content: center; gap: 4px; border-style: dashed; border-width: 2px; color: var(--brand); font-size: 12px; font-weight: 700; cursor: pointer; }
.photo.add input { display: none; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--sunken); overflow-x: auto; margin-bottom: var(--s4); }
.seg button { flex: 1 0 auto; min-height: 36px; border-radius: var(--r-pill); background: transparent; border: 0; color: var(--text-2); font-size: var(--fs-sm); font-weight: 650; padding: 0 12px; }
/* small phones (360px): keep the four admin sections and the product buy bar on one line */
@media (max-width: 400px) {
  .seg button { padding: 0 8px; font-size: 12.5px; }
  .sticky-cta .inner { gap: var(--s2); }
  .sticky-cta .btn--lg { padding: 0 14px; font-size: var(--fs-md); }
  .sticky-cta .qty--lg button { width: 38px; }
  .sticky-cta .qty--lg input { width: 44px; }
}
.seg button:hover { background: var(--surface); color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--e1); }
.bnr-preview { aspect-ratio: 23 / 10; border-radius: var(--r-md); overflow: hidden; background: var(--sunken); margin: calc(-1 * var(--s1)) 0 var(--s3); position: relative; }
.bnr-preview img { width: 100%; height: 100%; object-fit: cover; }
.bnr-preview.off img { filter: grayscale(1); opacity: .5; }
.logo-pick { cursor: pointer; position: relative; }
.logo-pick input { display: none; }
.logo-pick::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 12px no-repeat; border: 2px solid var(--surface); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }


/* ---------- 21c. Account hub, addresses, support, FAQ, about ---------- */
#acct { position: relative; }
#acct.dot::after { content: ""; position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
.lead.tone-orange { background: var(--brand-50); color: var(--brand); }
.lead.tone-blue { background: var(--info-bg); color: var(--info); }
.lead.tone-green { background: var(--success-bg); color: var(--success); }
.lead.tone-violet { background: var(--violet-bg); color: var(--violet); }
.lead.tone-red { background: var(--danger-bg); color: var(--danger); }
.lead.tone-slate { background: var(--sunken); color: var(--text-2); }
.lead.tone-wa { background: #16a34a; color: #fff; }
.lead { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.lead.sm { width: 30px; height: 30px; border-radius: 9px; }

.acct-hero {
  margin: var(--s2) 0 var(--s3); padding: var(--s4); border-radius: var(--r-xl); color: #f8fafc; position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, #3b1d0e 0%, #1e293b 45%, #0f172a 100%); box-shadow: var(--e2);
}
.acct-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(249, 115, 22, .35), transparent 70%); pointer-events: none; }
.avatar.xl { width: 64px; height: 64px; font-size: 24px; background: linear-gradient(135deg, #f97316, #c2410c); color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .14); }
.acct-name { font-size: 19px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-meta { font-size: var(--fs-sm); color: #cbd5e1; margin-top: 2px; }
.acct-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .12); font-size: 12px; font-weight: 650; }
.icon-btn.on-dark { color: #e2e8f0; background: rgba(255, 255, 255, .08); position: relative; z-index: 1; }
.icon-btn.on-dark:hover { background: rgba(255, 255, 255, .16); }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: var(--s4); border-radius: var(--r-md); background: rgba(255, 255, 255, .06); position: relative; z-index: 1; }
.acct-stats button { min-height: 0; padding: 12px 6px; border: 0; border-radius: 0; background: transparent; color: #f8fafc; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding-left: 14px; }
.acct-stats button + button { border-left: 1px solid rgba(255, 255, 255, .1); }
.acct-stats button:hover { background: rgba(255, 255, 255, .06); }
.acct-stats b { font-size: 17px; font-variant-numeric: tabular-nums; }
.acct-stats span { font-size: 11.5px; color: #94a3b8; font-weight: 600; }
.credit-card { display: block; width: 100%; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--line); min-height: 0; font-weight: 400; }
.credit-card:hover { background: var(--surface); border-color: var(--brand-200); }
.big { font-size: 24px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.acct-group { margin-top: var(--s5); }
.acct-group h4 { margin: 0 0 var(--s2) var(--s1); font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.acct-group .card, .list.card { padding: 2px var(--s4); }
.acct-row { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--text); justify-content: flex-start; text-align: left; font-weight: 550; padding: 12px 0; min-height: 64px; cursor: pointer; }
li:last-child > .acct-row { border-bottom: 0; }
.acct-row:hover { background: transparent; border-color: var(--line); }
.acct-row:hover .rt { color: var(--brand); }
.acct-row .rt { display: block; font-weight: 650; font-size: var(--fs-md); }
.acct-row .rs { display: block; font-size: 12.5px; color: var(--muted); font-weight: 450; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62vw; }
.count-pill { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 12px; font-weight: 750; }
.count-pill.soft { background: var(--info-bg); color: var(--info); width: auto; }
.seg.mini { margin: 0; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--sunken); flex: none; }
.seg.mini button { min-height: 30px; padding: 0 12px; font-size: 13px; border-radius: var(--r-pill); background: transparent; border: 0; color: var(--text-2); }
.seg.mini button.on { background: var(--surface); color: var(--text); box-shadow: var(--e1); }
.logout-btn { width: 100%; margin-top: var(--s5); background: var(--surface); color: var(--danger); border: 1px solid var(--line-strong); }
.logout-btn:hover { background: var(--danger-bg); border-color: var(--danger); }
.app-foot { text-align: center; color: var(--faint); font-size: 12px; margin: var(--s4) 0 var(--s2); }

.add-tile { width: 100%; min-height: 56px; margin-bottom: var(--s3); background: var(--surface); color: var(--brand); border: 2px dashed var(--brand-200); border-radius: var(--r-lg); }
.add-tile:hover { background: var(--brand-50); border-color: var(--brand); }
.addr-card.is-default { border-color: var(--brand-200); box-shadow: inset 3px 0 0 var(--brand), var(--e1); }
.addr-lbl { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; font-size: var(--fs-sm); }
.addr-line { margin: 8px 0 4px; line-height: 1.5; }
.addr-card .actions { margin-top: var(--s3); }
.danger-text { color: var(--danger); margin-left: auto; }
.lbl-seg { margin: var(--s3) 0 0; }
.lbl-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: var(--r-pill); background: transparent; border: 0; color: var(--text-2); font-weight: 650; padding: 0 10px; }
.lbl-seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--e1); }
.addr-pick { align-items: flex-start; }
.addr-pick .sub { display: block; white-space: normal; }
.addr-pick input { margin-top: 8px; }

.inbox .acct-row { min-height: 0; }
.inbox-row { align-items: flex-start; }
.inbox-row .rs { white-space: normal; max-width: none; }
.inbox-row .when { display: block; font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.inbox-row.unread .rt::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--brand); vertical-align: middle; }

.help-hero { margin: var(--s1) 0 var(--s4); }
.help-hero h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.help-hero p { color: var(--muted); margin: 6px 0 0; }
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.topic { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: var(--s3); min-height: 0; text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e1); font-weight: 400; }
.topic:hover { background: var(--surface); border-color: var(--brand-200); }
.topic b { font-size: var(--fs-sm); font-weight: 750; margin-top: 4px; }
.topic small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.tk-card { display: block; width: 100%; text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--line); font-weight: 400; min-height: 0; }
.tk-card:hover { background: var(--surface); border-color: var(--line-strong); }
.tk-last { margin: 8px 0 6px; color: var(--text-2); font-size: var(--fs-sm); }
.center { text-align: center; }
.help-call { margin-top: var(--s5); flex-wrap: wrap; }
.help-call > .row { width: 100%; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }

.thread { display: flex; flex-direction: column; gap: 10px; padding: var(--s2) 0 calc(var(--s8) + 24px); }
.msg { max-width: 82%; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--e1); }
.msg.me { align-self: flex-end; background: var(--brand-50); border-color: var(--brand-200); border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg .who { font-size: 11.5px; color: var(--muted); font-weight: 650; margin-bottom: 4px; }
.msg p { margin: 0; white-space: pre-line; line-height: 1.45; }
.msg img { display: block; max-width: 220px; max-height: 260px; border-radius: 10px; margin: 2px 0 6px; object-fit: cover; }
.composer {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 25; display: flex; align-items: flex-end; gap: 6px;
  padding: 8px 12px; background: color-mix(in srgb, var(--surface) 96%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(10px);
}
.composer textarea { min-height: 44px; max-height: 140px; resize: none; border-radius: 22px; padding: 11px 16px; }
.send-btn { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 50%; flex: none; }
body.wide .composer, .composer.static { position: static; border: 1px solid var(--line); border-radius: var(--r-lg); }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: var(--s2); box-shadow: var(--e1); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 14px var(--s4); font-weight: 650; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { flex: none; color: var(--muted); transition: transform var(--fast) var(--ease); }
.faq details[open] summary .ico { transform: rotate(180deg); color: var(--brand); }
.faq details[open] { border-color: var(--brand-200); }
.faq p { margin: 0; padding: 0 var(--s4) 14px; color: var(--text-2); line-height: 1.55; }
.still { margin-top: var(--s4); }

.about-hero { text-align: center; padding: var(--s5) var(--s4) var(--s4); margin: var(--s2) 0 var(--s3); border-radius: var(--r-xl); color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #f97316 0%, #c2410c 45%, #7c2d12 100%); box-shadow: var(--e2); }
.about-logo img { width: 100%; height: 100%; border-radius: 22px; }
.about-logo { width: 72px; height: 72px; margin: 0 auto var(--s3); border-radius: 22px; display: grid; place-items: center; background: #fff; color: #c2410c; font-size: 34px; font-weight: 900; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }
.about-hero h1 { color: #fff; font-size: 22px; font-weight: 800; }
.about-hero p { margin: 4px 0 0; opacity: .9; font-size: var(--fs-sm); }
.about-text p { margin: 0; line-height: 1.6; white-space: pre-line; }
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.why { display: flex; align-items: center; gap: 10px; padding: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); font-size: var(--fs-sm); }

.bigcats { display: grid; gap: var(--s2); }
.bigcat { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s3); min-height: 0; text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e1); font-weight: 400; }
.bigcat:hover { background: var(--surface); border-color: var(--brand-200); }
.bigcat b { display: block; font-weight: 700; }
.bigcat small { color: var(--muted); }
.bigcat > .ico { color: var(--faint); }
.bc-img { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.bc-img img { width: 100%; height: 100%; object-fit: cover; }
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.brand-grid .btile { flex: none; }

.order-tabs { margin-bottom: var(--s3); padding: 4px; border-radius: var(--r-pill); background: var(--sunken); }
.order-tabs button { flex: 1; min-height: 38px; border-radius: var(--r-pill); background: transparent; border: 0; color: var(--text-2); font-weight: 650; }
.order-tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--e1); }
.order-tabs .n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--line); font-size: 11.5px; }
.order-tabs button.on .n { background: var(--brand); color: var(--brand-ink); }
.driver { gap: 10px; margin: 0 0 var(--s3); padding: 10px; border-radius: var(--r-md); background: var(--brand-50); border: 1px solid var(--brand-200); }

.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
.qa { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: var(--s3); min-height: 0; text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e1); font-weight: 400; }
.qa:hover { background: var(--surface); border-color: var(--brand-200); }
.qa { min-width: 0; }
.qa b { font-size: 12.5px; font-weight: 700; line-height: 1.3; max-width: 100%; overflow-wrap: anywhere; }
.qa small { font-size: 11px; color: #94a3b8; margin-top: -6px; }
.qa.dark { background: #0f172a; border-color: #0f172a; color: #f8fafc; }
.qa.dark:hover { background: #1e293b; border-color: #1e293b; }
.qa.dark .lead { background: var(--brand); color: #fff; }
.qa.dark b { font-size: 15px; font-variant-numeric: tabular-nums; }
.sort-sel { position: relative; display: inline-flex; align-items: center; margin: 0; }
.sort-sel select { min-height: 34px; height: 34px; padding: 0 30px 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; appearance: none; -webkit-appearance: none; background: var(--surface); }
.sort-sel .ico { position: absolute; right: 10px; pointer-events: none; color: var(--muted); }

/* admin support */
.logincode summary { list-style: none; cursor: pointer; }
.logincode summary::-webkit-details-marker { display: none; }
.codebox { margin-top: var(--s3); padding: var(--s3); border-radius: var(--r-md); background: var(--success-bg); display: grid; gap: 2px; text-align: center; }
.codebox b { font-size: 32px; letter-spacing: .12em; color: var(--success); font-variant-numeric: tabular-nums; }
.tk-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.composer.card { position: static; display: block; backdrop-filter: none; }

/* ---------- 22. Larger screens ---------- */
@media (min-width: 640px) {
  .catgrid { grid-template-columns: repeat(6, 1fr); }
  .promo h1 { font-size: 26px; max-width: none; }
  .slide.banner { aspect-ratio: 3 / 1; }
  .perks { grid-template-columns: repeat(4, auto); justify-content: start; gap: 8px 20px; }
}
@media (min-width: 960px) {
  body.wide main { max-width: 1120px; }
  body.wide .cardgrid { grid-template-columns: repeat(2, 1fr); }
  body.wide .kpis { grid-template-columns: repeat(4, 1fr); }
  body.wide .tabs { position: sticky; top: var(--appbar-h); bottom: auto; height: 52px; padding: 0; border-top: 0; border-bottom: 1px solid var(--line); grid-auto-columns: max-content; justify-content: center; gap: var(--s6); }
  body.wide .tabs button { flex-direction: row; gap: 8px; font-size: var(--fs-sm); padding: 0 var(--s2); }
  body.wide .tabs button.on::before { top: auto; bottom: 0; left: 0; right: 0; border-radius: 3px 3px 0 0; }
  body.wide { padding-bottom: var(--s8); }
  body.wide #toast { bottom: var(--s6); }
  body.wide .tabs .count { position: static; order: 3; }
}
