/* Bugchain — navy/amber/cream brand system (v3 redesign)
   Replaces the earlier Nu-inspired light-canvas redesign with Marketing's
   finished Bugchain visual identity: a navy canvas throughout, amber used
   for what should grab attention (titles, card borders, primary buttons,
   active/selected states), and cream for text that's meant to be read
   (body copy, descriptions, option labels). 'Outfit' (600/700/800) is the
   display/heading/wordmark face, 'Nunito Sans' (400/600/700) is the body
   face — both loaded from Google Fonts in index.html, with a close
   system-font fallback stack below in case that CDN isn't reachable (this
   sandbox's network egress blocks fonts.googleapis.com — confirmed via a
   direct request — so the fonts could NOT be visually verified in this
   session's screenshots; a real deployment has normal internet access, but
   flagging this so it's not silently assumed proven).

   JUDGMENT CALLS made translating the brand brief into CSS (flagging per
   Tech Office practice rather than silently deciding):
   1. Card border spec says "~1-1.2px amber border" — using 1.5px, the
      nearest value that renders crisply and consistently across browsers/
      pixel densities; true sub-2px borders often vanish or alias badly.
   2. The brief lists three core colors (Navy/Amber/Cream) as "the" system,
      then separately describes a "dark mode variant" with its own ground/
      surface/ink/muted tokens and says the primary button "flips to amber
      fill / navy text in dark mode." Taken completely literally that would
      mean the DEFAULT primary button is something other than amber — but
      amber is also explicitly called out as used for "primary buttons" in
      the base palette description, and a CTA that changes color between
      light/dark mode is generally bad practice for brand recognition. This
      build keeps ONE consistent primary-button treatment (amber fill /
      navy text) in both modes, and reads the dark-mode line as confirming
      that treatment carries over rather than as a literal color swap.
      Flagging for Marketing/CEO Office to confirm or correct.
   3. The base (non-dark) theme has no separate "card surface" color in the
      brief — only navy/amber/cream. Cards on the base theme are the same
      navy as the page, differentiated by their amber border only. The
      explicit ground/surface split only appears in the dark-mode tokens,
      so that's where a second elevation layer shows up.
*/

:root {
  /* ---- brand tokens (base / default theme) ---- */
  --navy: #1A2332;
  --amber: #F5A623;
  --amber-strong: #e0930f;
  --cream: #FAF7F2;

  --bg: var(--navy);
  --surface: var(--navy);
  --surface-raised: #212B40;
  --ink: var(--cream);
  --ink-muted: rgba(250, 247, 242, 0.68);
  --ink-faint: rgba(250, 247, 242, 0.46);
  --title: var(--amber);
  --border-amber: rgba(245, 166, 35, 0.9);
  --border-amber-soft: rgba(245, 166, 35, 0.35);
  --selected-fill: rgba(245, 166, 35, 0.14);

  --primary-btn-bg: var(--amber);
  --primary-btn-text: var(--navy);

  --success: #4ADE80; --success-bg: rgba(74, 222, 128, 0.14);
  --warn: #F5A623; --warn-bg: rgba(245, 166, 35, 0.14);
  --danger: #F2745F; --danger-bg: rgba(242, 116, 95, 0.14);
  --mint: #4ADE80; --mint-light: rgba(74, 222, 128, 0.14);
  --gold: var(--amber); --gold-dark: var(--amber-strong); --gold-light: rgba(245, 166, 35, 0.16);

  --radius: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --font-heading: 'Outfit', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Nunito Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  font-size: 16px;
}

/* ---- dark mode variant: deeper ground, an explicit surface layer, muted
   secondary text. Opt in via [data-theme="dark"], or follow the OS setting
   when no explicit choice has been made ([data-theme="light"] escapes it). ---- */
:root[data-theme="dark"] {
  --ground: #0F141D;
  --bg: var(--ground);
  --surface: #161D29;
  --surface-raised: #161D29;
  --ink: #EDE8DE;
  --ink-muted: #9AA3B2;
  --ink-faint: rgba(154, 163, 178, 0.75);
  --primary-btn-bg: var(--amber);
  --primary-btn-text: var(--navy);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --ground: #0F141D;
    --bg: var(--ground);
    --surface: #161D29;
    --surface-raised: #161D29;
    --ink: #EDE8DE;
    --ink-muted: #9AA3B2;
    --ink-faint: rgba(154, 163, 178, 0.75);
    --primary-btn-bg: var(--amber);
    --primary-btn-text: var(--navy);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: var(--bg);
  border-bottom: 1px solid rgba(245, 166, 35, 0.16);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand .wordmark {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem;
  letter-spacing: 0.02em; color: var(--amber); text-transform: uppercase;
}
.demo-tag { font-size: 0.6rem; font-weight: 700; background: rgba(245,166,35,0.14); color: var(--amber); padding: 2px 8px; border-radius: var(--radius-pill); margin-left: 4px; letter-spacing: 0.02em; text-transform: none; }
.lang-toggle { background: transparent; border: 1.5px solid var(--border-amber-soft); color: var(--cream); padding: 7px 14px; border-radius: var(--radius-pill); font-size: 0.82rem; font-weight: 700; cursor: pointer; font-family: var(--font-body); }
.lang-toggle:hover { border-color: var(--amber); }
.topbar-back { background: none; border: none; color: var(--cream); font-size: 1.3rem; cursor: pointer; padding: 2px 6px; }

.app { max-width: 480px; margin: 0 auto; padding: 6px 16px 90px; min-height: 70vh; }
.app.no-bottom-pad { padding-bottom: 20px; }

.footer { text-align: center; padding: 20px 16px 30px; color: var(--ink-faint); font-size: 0.74rem; }

.card {
  background: var(--surface);
  border: 1.5px solid var(--border-amber-soft);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.card.flush { padding: 0; overflow: hidden; }

/* ---- wordmark hero treatment, used on the welcome screen ---- */
.illo-wrap { display: flex; justify-content: center; margin: 10px 0 8px; }
.illo-blob {
  width: 108px; height: 108px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border-amber);
  background: rgba(245, 166, 35, 0.08);
  color: var(--amber);
  position: relative;
}
.illo-blob svg { width: 46px; height: 46px; }
.illo-blob.mint { border-color: rgba(74,222,128,0.7); background: rgba(74,222,128,0.08); color: var(--success); }

.wordmark-hero { text-align: center; margin: 4px 0 22px; }
.wordmark-hero .wordmark-big {
  font-family: var(--font-heading); font-weight: 800; font-size: 2rem; letter-spacing: 0.04em;
  color: var(--cream); text-transform: uppercase; margin: 0;
}
.wordmark-hero .wordmark-tagline {
  font-family: var(--font-heading); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.16em;
  color: var(--amber); text-transform: uppercase; margin-top: 4px;
}

/* ---- hero: used on dashboard home ---- */
.hero {
  background: var(--surface-raised);
  border: 1.5px solid var(--border-amber-soft);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 26px 22px;
  margin-bottom: 18px;
}
.hero .hero-icon { width: 64px; height: 64px; margin-bottom: 14px; color: var(--amber); }
.hero h1 { font-size: 1.5rem; margin: 0 0 8px; line-height: 1.25; color: var(--amber); }
.hero p { color: var(--ink-muted); margin: 0; font-size: 0.94rem; }

h1, h2, h3 { font-family: var(--font-heading); }
h1 { font-size: 1.7rem; margin: 4px 0 10px; letter-spacing: -0.01em; font-weight: 800; color: var(--title); }
h2 { font-size: 1.2rem; margin: 0 0 6px; letter-spacing: -0.005em; font-weight: 800; color: var(--title); }
h3 { font-weight: 700; color: var(--title); }
p.lead { color: var(--ink); opacity: 0.92; margin-top: 0; }

.step-progress { display: flex; gap: 5px; margin: 4px 0 20px; }
.step-progress .dot { flex: 1; height: 5px; border-radius: var(--radius-pill); background: rgba(245,166,35,0.18); }
.step-progress .dot.active { background: var(--amber); }
.step-progress .dot.done { background: var(--amber); opacity: 0.6; }
.step-counter { font-size: 0.74rem; color: var(--ink-faint); margin-bottom: 6px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }

label.field-label { display: block; font-weight: 700; margin: 14px 0 6px; font-size: 0.9rem; color: var(--cream); font-family: var(--font-heading); }
.hint { color: var(--ink-muted); font-size: 0.84rem; margin: -2px 0 8px; }

input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border-amber-soft);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--surface-raised);
  color: var(--cream);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,166,35,0.18); }

.photo-input {
  display: block;
  border: 1.5px dashed var(--border-amber);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  background: rgba(245,166,35,0.06);
  margin-top: 4px;
  color: var(--cream);
  font-weight: 700;
}
.photo-input input { display: none; }
.photo-preview-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-preview { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; border: 1.5px solid var(--border-amber-soft); }

.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; }
.checkbox-row input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--amber); flex-shrink: 0; }
.checkbox-row label { font-size: 0.88rem; color: var(--ink-muted); }

button.primary {
  width: 100%;
  padding: 16px;
  background: var(--primary-btn-bg);
  color: var(--primary-btn-text);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 1.02rem;
  font-weight: 800;
  font-family: var(--font-heading);
  cursor: pointer;
  margin-top: 8px;
}
button.primary:hover { background: var(--amber-strong); }
button.primary:disabled { background: rgba(250,247,242,0.14); color: rgba(250,247,242,0.4); cursor: not-allowed; }
button.primary.icon-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
button.primary.icon-btn svg { width: 19px; height: 19px; flex-shrink: 0; }

button.gold {
  width: 100%; padding: 16px;
  background: var(--amber);
  color: var(--navy); border: none; border-radius: var(--radius-pill);
  font-size: 1.02rem; font-weight: 800; font-family: var(--font-heading); cursor: pointer; margin-top: 8px;
}
button.gold:hover { background: var(--amber-strong); }
button.gold:disabled { background: rgba(250,247,242,0.14); color: rgba(250,247,242,0.4); cursor: not-allowed; }

button.secondary {
  width: 100%; padding: 14px; background: transparent; color: var(--cream);
  border: 1.5px solid var(--border-amber-soft); border-radius: var(--radius-pill);
  font-size: 0.95rem; font-weight: 700; font-family: var(--font-heading); cursor: pointer; margin-top: 8px;
}
button.secondary:hover { border-color: var(--amber); }

button.link-btn { background: none; border: none; color: var(--amber); text-decoration: underline; cursor: pointer; font-size: 0.86rem; padding: 6px 0; font-family: var(--font-body); }

.banner { padding: 13px 15px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 14px; border: 1px solid transparent; }
.banner.info { background: rgba(245,166,35,0.1); color: var(--cream); border-color: var(--border-amber-soft); }
.banner.warn { background: var(--warn-bg); color: var(--cream); border-color: rgba(245,166,35,0.4); }
.banner.danger { background: var(--danger-bg); color: var(--cream); border-color: rgba(242,116,95,0.4); }
.banner.gold { background: var(--gold-light); color: var(--cream); font-weight: 700; border-color: var(--border-amber-soft); }

/* ---- choice cards (method selection) ---- */
.choice-grid { display: flex; flex-direction: column; gap: 12px; }
.choice-card {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--border-amber-soft); border-radius: var(--radius); background: var(--surface);
  padding: 18px; cursor: pointer; text-align: left;
}
.choice-card:hover { border-color: var(--amber); }
.choice-card.selected { border-color: var(--amber); background: var(--selected-fill); }
.choice-card .choice-icon { width: 46px; height: 46px; flex-shrink: 0; background: rgba(245,166,35,0.1); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--amber); }
.choice-card .choice-icon svg { width: 24px; height: 24px; }
.choice-card .choice-text strong { display: block; font-size: 1rem; margin-bottom: 2px; color: var(--cream); font-family: var(--font-heading); }
.choice-card .choice-text span { font-size: 0.84rem; color: var(--ink-muted); }

/* ---- pest icon multi-select grid: amber-outlined cards, amber line-art,
   cream name underneath ---- */
.icon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.pest-icon-btn {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  border: 1.5px solid var(--border-amber-soft); border-radius: var(--radius-sm);
  padding: 14px 6px; background: var(--surface); cursor: pointer; position: relative;
}
.pest-icon-btn svg { width: 28px; height: 28px; color: var(--amber); }
.pest-icon-btn span { font-size: 0.72rem; font-weight: 600; text-align: center; line-height: 1.15; color: var(--cream); }
.pest-icon-btn.selected { border-color: var(--amber); background: var(--selected-fill); }
.pest-icon-btn .check-badge { display: none; }
.pest-icon-btn.selected .check-badge {
  display: flex; position: absolute; top: 6px; right: 6px;
  width: 16px; height: 16px; background: var(--amber); border-radius: 50%;
  color: var(--navy); font-size: 0.6rem; align-items: center; justify-content: center;
}

.pest-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(245,166,35,0.12); color: var(--cream); border: 1px solid var(--border-amber-soft); padding: 7px 13px; border-radius: var(--radius-pill); font-size: 0.86rem; font-weight: 700; margin: 4px 6px 4px 0; }
.confidence-tag { font-weight: 400; opacity: 0.75; font-size: 0.78rem; }

.tier-badge { display: inline-block; padding: 5px 12px; border-radius: var(--radius-pill); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.02em; }
.tier-1 { background: var(--mint-light); color: var(--success); }
.tier-2 { background: var(--warn-bg); color: var(--amber); }
.tier-3 { background: var(--danger-bg); color: var(--danger); }

.question-block { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border-amber-soft); }
.question-block:last-child { border-bottom: none; }
.question-text { font-weight: 700; margin: 10px 0 8px; font-size: 0.96rem; color: var(--cream); }
.yn-row { display: flex; gap: 10px; }
.yn-btn { flex: 1; padding: 12px; border-radius: var(--radius-pill); border: 1.5px solid var(--border-amber-soft); background: var(--surface); color: var(--cream); cursor: pointer; font-weight: 700; font-size: 0.92rem; font-family: var(--font-heading); }
.yn-btn.selected { background: var(--amber); color: var(--navy); border-color: var(--amber); }

/* ---- areas-of-home multi-select checkbox grid (Bugchain intake screen 1) ---- */
.areas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.area-check-card {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--border-amber-soft); border-radius: var(--radius-sm);
  padding: 14px 12px; background: var(--surface); cursor: pointer;
}
.area-check-card.full-width { grid-column: 1 / -1; }
.area-check-card:hover { border-color: var(--amber); }
.area-check-card.selected { border-color: var(--amber); background: var(--selected-fill); }
.area-check-card .box { width: 19px; height: 19px; border-radius: 5px; border: 1.5px solid var(--border-amber); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--navy); background: transparent; }
.area-check-card.selected .box { background: var(--amber); }
.area-check-card .box svg { width: 12px; height: 12px; display: none; }
.area-check-card.selected .box svg { display: block; }
.area-check-card span.label { font-size: 0.88rem; font-weight: 600; color: var(--cream); }

/* ---- 1-10 self-rated severity scale (Bugchain intake screen 2) ---- */
.severity-scale { display: flex; gap: 6px; margin: 16px 0 8px; }
.severity-box {
  flex: 1; aspect-ratio: 1; min-width: 0;
  border: 1.5px solid var(--border-amber-soft); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 0.92rem; cursor: pointer;
}
.severity-box:hover { border-color: var(--amber); }
.severity-box.selected { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.severity-anchors { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--ink-muted); margin-bottom: 18px; }

/* ---- location: amber pill primary path + divider + fallback input ---- */
.or-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; color: var(--ink-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-amber-soft); }

/* ---- processing / anticipation screen ---- */
.processing-wrap { text-align: center; padding: 44px 10px; }
.processing-ring { width: 92px; height: 92px; margin: 0 auto 24px; border-radius: 50%; border: 6px solid rgba(245,166,35,0.18); border-top-color: var(--amber); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.processing-msg { font-weight: 800; font-size: 1.08rem; margin-bottom: 6px; min-height: 1.4em; color: var(--cream); font-family: var(--font-heading); }
.processing-sub { color: var(--ink-muted); font-size: 0.88rem; }

/* ---- plan card (single membership card) ---- */
.plan-card { border: 1.5px solid var(--border-amber-soft); border-radius: var(--radius); padding: 22px; margin-bottom: 14px; background: var(--surface); position: relative; }
.plan-card.recommended { border-color: var(--amber); background: var(--selected-fill); }
.plan-card .plan-badge { position: absolute; top: -12px; left: 18px; background: var(--amber); color: var(--navy); font-size: 0.7rem; font-weight: 800; padding: 4px 12px; border-radius: var(--radius-pill); }
.plan-card h3 { margin: 6px 0 4px; font-size: 1.1rem; color: var(--amber); }
.plan-card .plan-price { font-size: 1.7rem; font-weight: 800; color: var(--cream); margin: 6px 0 2px; font-family: var(--font-heading); }
.plan-card .plan-price small { font-size: 0.8rem; font-weight: 600; color: var(--ink-muted); }
.plan-card .plan-desc { font-size: 0.87rem; color: var(--ink-muted); margin-bottom: 14px; }
.plan-card ul.plan-features { margin: 0 0 16px; padding-left: 0; list-style: none; font-size: 0.88rem; color: var(--cream); }
.plan-card ul.plan-features li { margin-bottom: 8px; padding-left: 26px; position: relative; }
.plan-card ul.plan-features li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 800; }

.shipping-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--gold-light);
  border: 1px solid var(--border-amber-soft);
  border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 16px;
}
.shipping-banner .icon { font-size: 1.8rem; }
.shipping-banner strong { display: block; color: var(--amber); font-size: 1.06rem; font-family: var(--font-heading); }
.shipping-banner span { font-size: 0.83rem; color: var(--ink-muted); }

.terms-box { max-height: 160px; overflow-y: auto; border: 1px solid var(--border-amber-soft); border-radius: var(--radius-sm); padding: 14px; font-size: 0.79rem; color: var(--ink-muted); background: var(--surface-raised); margin-bottom: 4px; }

.card-badge-row { display: flex; gap: 8px; margin: 10px 0 16px; }
.card-badge-row span { font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border: 1px solid var(--border-amber-soft); border-radius: var(--radius-sm); color: var(--ink-muted); }

.product-line { border: 1px solid var(--border-amber-soft); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.product-line .p-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; color: var(--cream); }
.product-line .p-qty { color: var(--amber); font-weight: 700; }
.product-line .p-instructions { color: var(--ink-muted); font-size: 0.85rem; margin-top: 6px; }
.product-line .p-price { color: var(--ink-muted); font-size: 0.84rem; }

.schedule-item { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border-amber-soft); font-size: 0.86rem; color: var(--cream); }
.schedule-item:last-child { border-bottom: none; }
.schedule-item .tag { font-size: 0.7rem; padding: 3px 10px; border-radius: var(--radius-pill); background: rgba(245,166,35,0.12); color: var(--amber); }
.schedule-item .tag.membership { background: rgba(245,166,35,0.22); color: var(--amber); }

.disclaimers { font-size: 0.77rem; color: var(--ink-muted); margin-top: 12px; padding-left: 18px; }
.disclaimers li { margin-bottom: 5px; }

.outcome-row { display: flex; gap: 8px; flex-wrap: wrap; }
.outcome-btn { flex: 1; min-width: 100px; padding: 13px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-amber-soft); background: var(--surface); color: var(--cream); cursor: pointer; font-weight: 700; font-size: 0.88rem; text-align: center; font-family: var(--font-heading); }
.outcome-btn.selected { border-color: var(--amber); background: var(--selected-fill); }

.history-item { display: flex; justify-content: space-between; align-items: center; padding: 13px; border: 1.5px solid var(--border-amber-soft); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; background: var(--surface); color: var(--cream); }
.history-item:hover { border-color: var(--amber); }

.success-check { width: 76px; height: 76px; margin: 6px auto 18px; }

.otp-row { display: flex; gap: 8px; justify-content: center; margin: 14px 0; }
.otp-row input { width: 44px; height: 54px; text-align: center; font-size: 1.3rem; font-weight: 700; padding: 0; border-radius: var(--radius-sm); }

/* ---- bottom tab bar (members area) ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg); border-top: 1px solid var(--border-amber-soft);
  display: flex; justify-content: space-around; padding: 9px 4px calc(9px + env(safe-area-inset-bottom));
  z-index: 30;
}
.tab-btn {
  background: none; border: none; color: var(--ink-faint); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 0.65rem; font-weight: 700; padding: 5px 8px; flex: 1; border-radius: var(--radius-sm);
  font-family: var(--font-heading);
}
.tab-btn svg { width: 21px; height: 21px; }
.tab-btn.active { color: var(--amber); background: rgba(245,166,35,0.1); }

/* ---- dashboard ---- */
.dash-greeting { color: var(--ink-muted); font-size: 0.92rem; margin-bottom: 2px; }
.dash-name { font-size: 1.4rem; font-weight: 800; color: var(--cream); font-family: var(--font-heading); }
.stat-row { display: flex; gap: 10px; margin-top: 16px; }
.stat-pill { flex: 1; background: rgba(245,166,35,0.08); border: 1px solid var(--border-amber-soft); border-radius: var(--radius-sm); padding: 11px 13px; }
.stat-pill .stat-label { font-size: 0.68rem; color: var(--ink-muted); }
.stat-pill .stat-value { font-size: 0.98rem; font-weight: 800; margin-top: 2px; color: var(--cream); font-family: var(--font-heading); }

.dash-card { background: var(--surface); border: 1.5px solid var(--border-amber-soft); border-radius: var(--radius); padding: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 14px; cursor: pointer; }
.dash-card:hover { border-color: var(--amber); }
.dash-card .dash-icon { width: 42px; height: 42px; flex-shrink: 0; background: rgba(245,166,35,0.1); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--amber); }
.dash-card .dash-icon svg { width: 22px; height: 22px; }
.dash-card .dash-text strong { display: block; font-size: 0.96rem; color: var(--cream); font-family: var(--font-heading); }
.dash-card .dash-text span { font-size: 0.8rem; color: var(--ink-muted); }
.dash-card .chev { margin-left: auto; color: var(--amber); }

.video-placeholder {
  aspect-ratio: 16/9; background: var(--surface-raised); border: 1px solid var(--border-amber-soft); border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-muted); margin-bottom: 12px; gap: 6px;
}
.video-placeholder .play-btn { width: 48px; height: 48px; border-radius: 50%; background: rgba(245,166,35,0.16); color: var(--amber); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.video-placeholder span { font-size: 0.76rem; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; margin-top: 8px; }
.spec-table td { padding: 8px 0; border-bottom: 1px solid var(--border-amber-soft); color: var(--cream); }
.spec-table td:first-child { color: var(--ink-muted); width: 42%; }
.spec-table td:last-child { font-weight: 700; text-align: right; color: var(--cream); }

.referral-code-box { display: flex; align-items: center; justify-content: space-between; background: var(--surface-raised); border: 1.5px solid var(--border-amber-soft); color: var(--cream); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.referral-code-box .code { font-size: 1.4rem; font-weight: 800; letter-spacing: 0.08em; color: var(--amber); font-family: var(--font-heading); }
.referral-code-box button { background: var(--amber); color: var(--navy); border: none; padding: 9px 16px; border-radius: var(--radius-pill); font-weight: 800; font-size: 0.8rem; cursor: pointer; font-family: var(--font-heading); }

.spinner { width: 34px; height: 34px; margin: 30px auto; border: 3px solid rgba(245,166,35,0.18); border-top-color: var(--amber); border-radius: 50%; animation: spin 0.8s linear infinite; }
