/* ═══════════════════════════════════════════════════════════════════
   NAIJAGAZ — design system
   Cobalt + ember on warm ivory. Mobile-first. Modern, magical, Naija.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* ── Color: cobalt scale ── */
  --cobalt-900: #051A6B;
  --cobalt-800: #0723A0;
  --cobalt-700: #0930B0;
  --cobalt-600: #0B3FE0;   /* primary brand */
  --cobalt-500: #2557FF;
  --cobalt-300: #7E9AFF;
  --cobalt-100: #DCE5FF;
  --cobalt-50:  #F0F4FF;

  /* ── Color: ember scale ── */
  --ember-600: #EA580C;
  --ember-500: #F97316;    /* accent */
  --ember-400: #FB923C;
  --ember-100: #FFE5D2;

  /* ── Color: surfaces & ink ── */
  --ivory:     #FAF7F0;
  --paper:     #FFFFFF;
  --paper-2:   #FBFAF4;
  --ink-900:   #0A0F1F;
  --ink-800:   #0F172A;
  --ink-600:   #475569;
  --ink-500:   #64748B;
  --ink-400:   #94A3B8;
  --line:      #E8E2D1;
  --line-2:    #F2EEE0;

  /* ── Status ── */
  --success:   #16A34A;
  --warn:      #DC2626;

  /* ── Gradients (the magic) ── */
  --grad-flame:   linear-gradient(135deg, #0B3FE0 0%, #5B21B6 55%, #F97316 100%);
  --grad-cobalt:  linear-gradient(135deg, #0B3FE0 0%, #2557FF 100%);
  --grad-ember:   linear-gradient(135deg, #EA580C 0%, #FB923C 100%);
  --grad-hero:    radial-gradient(circle at 50% 0%, rgba(11, 63, 224, 0.10) 0%, transparent 60%);

  /* ── Shadows: layered, modern ── */
  --sh-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --sh-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.06);
  --sh-xl: 0 24px 60px -12px rgba(15, 23, 42, 0.18), 0 8px 16px rgba(15, 23, 42, 0.08);
  --glow-cobalt: 0 12px 32px -8px rgba(11, 63, 224, 0.5);
  --glow-flame:  0 16px 40px -8px rgba(91, 33, 182, 0.45), 0 8px 24px -4px rgba(249, 115, 22, 0.35);
  --glow-ember:  0 8px 24px -4px rgba(249, 115, 22, 0.4);

  /* ── Radius scale ── */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-pill: 9999px;

  /* ── Type scale ── */
  --fs-display-1: clamp(36px, 8vw, 52px);
  --fs-display-2: clamp(28px, 6vw, 36px);
  --fs-headline: 24px;
  --fs-title:    20px;
  --fs-body-lg:  18px;
  --fs-body:     17px;
  --fs-body-sm:  15px;
  --fs-caption:  13px;

  /* ── Easing ── */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Layout ── */
  --content-w: 480px;

  /* ── Sacred Lattice ─────────────────────────────────────
     Three concentric rings (Adinkrahene — kingship, greatness,
     firmness of faith) with a four-tick cosmic axis and an
     ember spark at center. Tiled at 200×200 across surfaces.
     Authentic to Akan symbology, restrained to ~6% opacity so
     it lives behind content without competing.
     ────────────────────────────────────────────────────── */
  --lattice-cobalt: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'><g transform='translate(100,100)' fill='none' stroke='%230B3FE0' stroke-width='0.7'><circle r='44' opacity='0.06'/><circle r='30' opacity='0.08'/><circle r='16' opacity='0.10'/><line x1='-58' y1='0' x2='-48' y2='0' opacity='0.06'/><line x1='48' y1='0' x2='58' y2='0' opacity='0.06'/><line x1='0' y1='-58' x2='0' y2='-48' opacity='0.06'/><line x1='0' y1='48' x2='0' y2='58' opacity='0.06'/><circle r='1.8' fill='%23F97316' stroke='none' opacity='0.55'/></g></svg>");

  /* ── Vesica Grid ─────────────────────────────────────────
     Almond intersections (vesica piscis — meeting of two
     worlds, sacred birth) tiled at 80×80 for inner-card
     watermarks. Used on summary cards and success surfaces.
     ────────────────────────────────────────────────────── */
  --vesica-grid: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><g fill='none' stroke='%230B3FE0' stroke-width='0.5' opacity='0.06'><path d='M 40 30 A 14 14 0 0 1 40 50 A 14 14 0 0 1 40 30 Z'/><circle cx='40' cy='40' r='1.2' fill='%230B3FE0' stroke='none' opacity='0.3'/></g></svg>");
}

/* ═══════════════════════════════════════════════════════════════════
   DARK THEME — every token redefined for dark surfaces.
   Activated by [data-theme="dark"] on <html>. Auto-detected via
   prefers-color-scheme on first load; user can override via toggle.
   ═══════════════════════════════════════════════════════════════════ */

[data-theme="dark"] {
  /* Surfaces — deep navy with subtle layer separation */
  --ivory:     #08101F;
  --paper:     #14192E;
  --paper-2:   #1A2040;

  /* Ink — inverted: light text on dark bg */
  --ink-900:   #F1F5F9;
  --ink-800:   #E2E8F0;
  --ink-600:   #CBD5E1;
  --ink-500:   #94A3B8;
  --ink-400:   #64748B;

  /* Borders — soft slate */
  --line:      #2A3048;
  --line-2:    #1E243C;

  /* Brand — cobalt lifted for dark contrast */
  --cobalt-900: #0B1E5C;
  --cobalt-800: #1E3A8A;
  --cobalt-700: #3563EE;
  --cobalt-600: #5582FF;
  --cobalt-500: #7197FF;
  --cobalt-300: #9DB6FF;
  --cobalt-100: #20335A;
  --cobalt-50:  #14233D;

  /* Ember stays warm; tint adjusted for dark backdrop */
  --ember-600: #EA580C;
  --ember-500: #FB923C;
  --ember-400: #FDBA74;
  --ember-100: #2C1F0F;

  /* Gradients — re-derived from new cobalt scale */
  --grad-flame:   linear-gradient(135deg, #5582FF 0%, #7C3AED 55%, #FB923C 100%);
  --grad-cobalt:  linear-gradient(135deg, #5582FF 0%, #3563EE 100%);
  --grad-ember:   linear-gradient(135deg, #EA580C 0%, #FB923C 100%);
  --grad-hero:    radial-gradient(circle at 50% 0%, rgba(85, 130, 255, 0.20) 0%, transparent 60%);

  /* Shadows — heavier alphas for dark surfaces */
  --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.30);
  --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.22);
  --sh-md: 0 4px 12px rgba(0, 0, 0, 0.40), 0 2px 4px rgba(0, 0, 0, 0.22);
  --sh-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.50), 0 4px 8px rgba(0, 0, 0, 0.30);
  --sh-xl: 0 24px 60px -12px rgba(0, 0, 0, 0.60), 0 8px 16px rgba(0, 0, 0, 0.35);
  --glow-cobalt: 0 12px 32px -8px rgba(85, 130, 255, 0.55);
  --glow-flame:  0 16px 40px -8px rgba(124, 58, 237, 0.50), 0 8px 24px -4px rgba(251, 146, 60, 0.40);
  --glow-ember:  0 8px 24px -4px rgba(251, 146, 60, 0.45);

  /* Sacred Lattice — lighter strokes glow against navy */
  --lattice-cobalt: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'><g transform='translate(100,100)' fill='none' stroke='%2360A5FA' stroke-width='0.7'><circle r='44' opacity='0.10'/><circle r='30' opacity='0.13'/><circle r='16' opacity='0.17'/><line x1='-58' y1='0' x2='-48' y2='0' opacity='0.10'/><line x1='48' y1='0' x2='58' y2='0' opacity='0.10'/><line x1='0' y1='-58' x2='0' y2='-48' opacity='0.10'/><line x1='0' y1='48' x2='0' y2='58' opacity='0.10'/><circle r='1.9' fill='%23FB923C' stroke='none' opacity='0.75'/></g></svg>");

  --vesica-grid: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><g fill='none' stroke='%2360A5FA' stroke-width='0.5' opacity='0.10'><path d='M 40 30 A 14 14 0 0 1 40 50 A 14 14 0 0 1 40 30 Z'/><circle cx='40' cy='40' r='1.2' fill='%2360A5FA' stroke='none' opacity='0.4'/></g></svg>");
}

/* Smooth color/background transitions on theme swap. Limited to top
   surfaces — children inherit `color` and re-paint without animations. */
html, body {
  transition: background-color 0.45s var(--ease-out-expo),
              color 0.30s var(--ease-out-expo);
}

/* Specific surfaces also benefit from a light tween on swap */
.topbar, .summary, .status-card, .size-card, .pill, .radio,
.field input, .field select, .field textarea,
.btn-secondary, .btn-whatsapp, .install-sheet, .install-card, .rider-info, .sheet {
  transition: background-color 0.35s var(--ease-out-expo),
              border-color 0.30s var(--ease-out-expo),
              color 0.25s var(--ease-out-expo);
}

/* ── Reset ── */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: 'Ubuntu', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink-800);
  background: var(--lattice-cobalt) 0 0 / 200px 200px, var(--ivory);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}
img, svg, video { max-width: 100%; display: block; }
button { font-family: inherit; }
a { color: var(--cobalt-600); text-decoration: none; }

/* Display headings — Outfit, tight letter-spacing */
h1, h2, h3, .display {
  font-family: 'Outfit', 'Ubuntu', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
h1 { font-size: var(--fs-display-2); }
h2 { font-size: var(--fs-headline); letter-spacing: -0.01em; line-height: 1.2; }
h3 { font-size: var(--fs-title); }

p { margin: 0 0 12px; }
small { font-size: var(--fs-caption); }
.muted { color: var(--ink-500); }

/* ════════════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════════════ */

.container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 24px 20px 96px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--ivory);
  color: var(--ink-800);
  font-size: 22px;
  font-weight: 700;
  transition: background 0.2s, transform 0.05s;
}
.topbar .back:active { transform: scale(0.94); background: var(--cobalt-50); }
.topbar .step-label {
  color: var(--ink-500);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════
   HERO (landing)
   ════════════════════════════════════════════════ */

.hero-wrap {
  position: relative;
  background:
    var(--grad-hero),
    var(--lattice-cobalt) 0 0 / 220px 220px,
    var(--ivory);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(11, 63, 224, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(249, 115, 22, 0.07) 0%, transparent 45%);
  pointer-events: none;
}

.hero {
  position: relative;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 32px 24px 48px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-mark {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-mark .mark-img {
  width: 130px;
  height: 130px;
  position: relative;
  z-index: 2;
  animation: mark-rise 1.2s var(--ease-out-expo);
}
.hero-mark .orbit {
  position: absolute;
  inset: 0;
  animation: orbit-spin 90s linear infinite;
}
.hero-mark .orbit circle {
  fill: var(--cobalt-600);
  opacity: 0.45;
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes mark-rise {
  from { opacity: 0; transform: scale(0.85) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.hero-greeting {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-body-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--cobalt-700);
  animation: fade-rise 0.8s var(--ease-out-expo) 0.05s both;
}
[data-theme="dark"] .hero-greeting { color: var(--cobalt-300); }
.hero-greeting[hidden] { display: none; }

.hero h1 {
  font-size: var(--fs-display-1);
  margin-bottom: 16px;
  background: linear-gradient(180deg, var(--ink-900) 0%, var(--ink-800) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: fade-rise 0.8s var(--ease-out-expo) 0.15s both;
}
.hero .lede {
  font-size: var(--fs-body-lg);
  color: var(--ink-600);
  max-width: 360px;
  margin: 0 auto 36px;
  animation: fade-rise 0.8s var(--ease-out-expo) 0.3s both;
}
.hero-actions {
  animation: fade-rise 0.8s var(--ease-out-expo) 0.45s both;
}

@keyframes fade-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════ */

.btn {
  --btn-bg: var(--cobalt-600);
  --btn-fg: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 17px 22px;
  border: none;
  border-radius: var(--r-lg);
  font-family: inherit;
  font-size: var(--fs-body-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: transform 0.08s var(--ease-out-expo),
              box-shadow 0.2s,
              filter 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  text-decoration: none;
  text-align: center;
  position: relative;
  isolation: isolate;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  --btn-bg: var(--cobalt-600);
  background: var(--grad-cobalt);
  box-shadow: var(--glow-cobalt);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 16px 40px -8px rgba(11, 63, 224, 0.55); }

.btn-flame {
  background: var(--grad-flame);
  background-size: 180% 180%;
  background-position: 0% 50%;
  color: white;
  box-shadow: var(--glow-flame);
  font-size: 19px;
  padding: 19px 24px;
  transition: transform 0.08s, background-position 0.6s var(--ease-out-expo), box-shadow 0.2s, filter 0.15s;
}
.btn-flame:hover { background-position: 100% 50%; }

.btn-ember {
  background: var(--grad-ember);
  color: white;
  box-shadow: var(--glow-ember);
}

.btn-whatsapp {
  background: var(--paper);
  color: #128C7E;
  border: 1.5px solid var(--line);
  font-size: var(--fs-body);
  padding: 15px 20px;
}
.btn-whatsapp:hover { border-color: #25D366; background: #F0FDF4; }
.btn-whatsapp svg { width: 22px; height: 22px; flex-shrink: 0; fill: #25D366; }

.or-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: var(--ink-400);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--cobalt-600);
  background: transparent;
  border: 2px solid var(--line);
  font-size: var(--fs-body);
}
.btn-secondary:hover { border-color: var(--cobalt-600); background: var(--cobalt-50); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--cobalt-600);
  background: transparent;
  font-size: var(--fs-body);
  padding: 14px 16px;
}

.btn-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--cobalt-600);
  font-weight: 600;
  font-size: var(--fs-body);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: background 0.15s;
}
.btn-link:hover { background: var(--cobalt-50); }

/* Action row (back / continue) */
.actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  margin-top: 32px;
}
.actions .btn { font-size: var(--fs-body); padding: 15px 16px; }

/* ════════════════════════════════════════════════
   STEP PROGRESS BAR
   ════════════════════════════════════════════════ */

.stepper {
  display: flex;
  gap: 6px;
  padding: 12px 20px 0;
  max-width: var(--content-w);
  margin: 0 auto;
}
.stepper .seg {
  height: 4px;
  flex: 1;
  background: var(--line);
  border-radius: var(--r-pill);
  transition: background 0.4s var(--ease-out-expo);
  overflow: hidden;
  position: relative;
}
.stepper .seg.done { background: var(--cobalt-600); }
.stepper .seg.current {
  background: linear-gradient(90deg, var(--cobalt-600) 0%, var(--cobalt-300) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ════════════════════════════════════════════════
   FORM FIELDS
   ════════════════════════════════════════════════ */

.field {
  display: block;
  margin-bottom: 20px;
}
.field > span,
.field > legend {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: var(--fs-body-sm);
  color: var(--ink-800);
  letter-spacing: -0.005em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--fs-body);
  background: var(--paper);
  color: var(--ink-800);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-400); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cobalt-600);
  box-shadow: 0 0 0 4px var(--cobalt-100);
}
.field textarea { resize: vertical; min-height: 88px; }
.field.error input,
.field.error select,
.field.error textarea {
  border-color: var(--warn);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}
.field-error {
  color: var(--warn);
  font-size: var(--fs-caption);
  font-weight: 500;
  margin-top: 6px;
}

.radio {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  cursor: pointer;
  font-size: var(--fs-body);
  font-weight: 500;
  background: var(--paper);
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
  -webkit-tap-highlight-color: transparent;
}
.radio:active { transform: scale(0.99); }
.radio input { width: 22px; height: 22px; accent-color: var(--cobalt-600); flex-shrink: 0; }
.radio:has(input:checked) {
  border-color: var(--cobalt-600);
  background: var(--cobalt-50);
  box-shadow: 0 0 0 3px rgba(11, 63, 224, 0.08);
}

fieldset { border: none; padding: 0; margin: 0 0 20px; }

/* ════════════════════════════════════════════════
   PILL GRID — for short enumerable choices (districts, etc.)
   ════════════════════════════════════════════════ */

.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}
.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink-800);
  cursor: pointer;
  text-align: center;
  letter-spacing: -0.005em;
  transition: border-color 0.15s,
              background 0.15s,
              color 0.15s,
              transform 0.06s var(--ease-out-expo),
              box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.pill:active { transform: scale(0.97); }
.pill.selected {
  border-color: var(--cobalt-600);
  background: var(--cobalt-50);
  color: var(--cobalt-700);
  box-shadow: 0 0 0 3px rgba(11, 63, 224, 0.10);
}
.pill-grid.error .pill {
  border-color: var(--warn);
  animation: shake 0.4s var(--ease-out-expo);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

/* ════════════════════════════════════════════════
   INPUT WITH FLAG — phone field with NG indicator
   ════════════════════════════════════════════════ */

.input-with-flag {
  position: relative;
}
.input-with-flag .flag-tag {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 1;
  font-weight: 700;
  font-size: var(--fs-body-sm);
  color: var(--cobalt-700);
}
.input-with-flag .flag-tag::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 20px;
  background: var(--line);
  margin-left: 4px;
}
.input-with-flag input { padding-left: 70px !important; }

/* ════════════════════════════════════════════════
   BOTTOM SHEET MODAL
   ════════════════════════════════════════════════ */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 31, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: backdrop-fade 0.2s ease-out;
}
.sheet-backdrop.closing { animation: backdrop-fade 0.2s ease-out reverse forwards; }
.sheet-backdrop[hidden] { display: none; }

.sheet {
  width: 100%;
  max-width: var(--content-w);
  background: var(--paper);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  padding: 8px 24px 28px;
  box-shadow: var(--sh-xl);
  animation: sheet-rise 0.4s var(--ease-out-expo);
}
.sheet-backdrop.closing .sheet {
  animation: sheet-rise 0.3s var(--ease-out-expo) reverse forwards;
}
.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--line);
  border-radius: var(--r-pill);
  margin: 0 auto 18px;
}
.sheet h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.sheet .sheet-sub {
  color: var(--ink-500);
  font-size: var(--fs-body-sm);
  margin: 0 0 18px;
}
.sheet .sheet-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

@keyframes backdrop-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes sheet-rise {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ════════════════════════════════════════════════
   CYLINDER SIZE GRID
   ════════════════════════════════════════════════ */

.size-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.size-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 18px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  position: relative;
  transition: border-color 0.15s, transform 0.06s var(--ease-out-expo),
              background 0.15s, box-shadow 0.2s;
  overflow: hidden;
}
.size-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-hero);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.size-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.size-card:active { transform: scale(0.97); }
.size-card.selected {
  border-color: var(--cobalt-600);
  background: var(--paper);
  box-shadow: var(--glow-cobalt);
  transform: translateY(-1px);
}
.size-card.selected::before { opacity: 1; }
.size-card.selected::after {
  content: '✓';
  position: absolute;
  top: 14px; right: 14px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--grad-cobalt);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-weight: 800;
  z-index: 2;
  box-shadow: var(--glow-cobalt);
  animation: check-pop 0.36s var(--ease-out-back);
}
@keyframes check-pop {
  from { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  to   { transform: scale(1); opacity: 1; }
}
.size-card .size {
  position: relative; z-index: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.04em;
  line-height: 1;
}
.size-card .size small {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-500);
  margin-left: 2px;
}
.size-card .price {
  position: relative; z-index: 1;
  font-family: 'Outfit', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--cobalt-600);
  margin-top: 12px;
  letter-spacing: -0.02em;
}
.size-card .days {
  position: relative; z-index: 1;
  font-size: var(--fs-caption);
  color: var(--ink-500);
  margin-top: 4px;
  font-weight: 500;
}

/* ════════════════════════════════════════════════
   SUMMARY CARD
   ════════════════════════════════════════════════ */

.summary {
  background:
    var(--vesica-grid) 0 0 / 80px 80px,
    var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 22px 24px;
  margin-bottom: 12px;
  box-shadow: var(--sh-md);
  position: relative;
  overflow: hidden;
}
/* Faint Adinkrahene watermark — concentric circles, sacred geometry */
.summary::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1.5px solid var(--cobalt-100);
  opacity: 0.5;
  pointer-events: none;
}
.summary::after {
  content: '';
  position: absolute;
  top: -10px; right: -10px;
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 1.5px solid var(--cobalt-100);
  opacity: 0.4;
  pointer-events: none;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: var(--fs-body-sm);
  position: relative;
}
.summary-row:first-child { padding-top: 0; }
.summary-row:last-of-type { border-bottom: none; }
.summary-row .label { color: var(--ink-500); font-weight: 500; }
.summary-row .value {
  font-weight: 600;
  text-align: right;
  max-width: 60%;
  color: var(--ink-800);
}
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 18px;
  margin-top: 10px;
  border-top: 1.5px dashed var(--line);
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  position: relative;
}
.summary-total .price-flame {
  background: var(--grad-flame);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

/* ════════════════════════════════════════════════
   STATUS ICON BADGE — large gradient circle per state
   ════════════════════════════════════════════════ */

.status-icon {
  width: 96px; height: 96px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: var(--grad-cobalt);
  box-shadow: var(--glow-cobalt);
  position: relative;
  z-index: 1;
  transition: background 0.5s var(--ease-out-expo),
              box-shadow 0.5s var(--ease-out-expo);
}
.status-icon.is-preparing,
.status-icon.is-out {
  background: var(--grad-flame);
  box-shadow: var(--glow-flame);
  animation: status-breathe 2.4s ease-in-out infinite;
}
.status-icon.is-completed {
  background: linear-gradient(135deg, #16A34A 0%, #22D3EE 100%);
  box-shadow: 0 12px 32px -8px rgba(22, 163, 74, 0.45);
}
@keyframes status-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

/* ════════════════════════════════════════════════
   TRACKING TIMELINE
   ════════════════════════════════════════════════ */

.status-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  box-shadow: var(--sh-lg);
  position: relative;
  overflow: hidden;
}
.status-card::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%; transform: translateX(-50%);
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(11, 63, 224, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.status-banner {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 8px;
}
.status-id {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--fs-caption);
  color: var(--ink-500);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.timeline li {
  position: relative;
  padding: 14px 0 14px 40px;
  color: var(--ink-400);
  font-size: var(--fs-body);
  font-weight: 500;
  transition: color 0.4s;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--line);
  border: 3px solid var(--paper);
  z-index: 2;
  transition: background 0.4s var(--ease-out-back), box-shadow 0.4s;
}
.timeline li::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 32px;
  width: 2px;
  height: calc(100% - 6px);
  background: var(--line);
  transition: background 0.4s;
}
.timeline li:last-child::after { display: none; }
.timeline li.done {
  color: var(--ink-800);
  font-weight: 600;
}
.timeline li.done::before { background: var(--cobalt-600); }
.timeline li.done::after { background: var(--cobalt-600); }
.timeline li.current {
  color: var(--cobalt-600);
  font-weight: 700;
}
.timeline li.current::before {
  background: var(--ember-500);
  box-shadow: 0 0 0 4px var(--ember-100), 0 0 0 8px rgba(249, 115, 22, 0.15);
  animation: pulse-ember 2s ease-in-out infinite;
}
@keyframes pulse-ember {
  0%, 100% { box-shadow: 0 0 0 4px var(--ember-100), 0 0 0 8px rgba(249, 115, 22, 0.15); }
  50%      { box-shadow: 0 0 0 6px var(--ember-100), 0 0 0 14px rgba(249, 115, 22, 0.05); }
}

.rider-info {
  background: var(--cobalt-50);
  border: 1px solid var(--cobalt-100);
  border-radius: var(--r-lg);
  padding: 18px;
  margin: 18px 0 12px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.rider-info p { margin: 0 0 12px; font-size: var(--fs-body); }

.status-text {
  text-align: center;
  margin: 16px 0 0;
  color: var(--ink-500);
  font-size: var(--fs-body-sm);
  font-weight: 500;
}

/* Skeleton (loading) */
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, var(--line-2) 0%, var(--line) 50%, var(--line-2) 100%);
  background-size: 200% 100%;
  border-radius: var(--r-sm);
  animation: shimmer 1.4s linear infinite;
  height: 14px;
  width: 120px;
}

/* ════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════ */

.footer {
  text-align: center;
  padding: 24px 20px 36px;
  color: var(--ink-500);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.footer p { margin: 4px 0; }
.footer .footer-districts {
  font-weight: 700;
  color: var(--ink-800);
  letter-spacing: 0.06em;
  font-size: var(--fs-body-sm);
}

/* ════════════════════════════════════════════════
   INSTALL SHEET — modern bottom sheet, platform-aware
   Replaces the old sticky banner. Auto-injected by shell.js.
   Engagement-gated; dismisses for 14 days.
   ════════════════════════════════════════════════ */

.install-sheet-backdrop { z-index: 200; }

.install-sheet {
  position: relative;
  width: 100%;
  max-width: var(--content-w);
  background: var(--paper);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  padding: 14px 26px 32px;
  box-shadow: var(--sh-xl);
  animation: sheet-rise 0.4s var(--ease-out-expo);
}
.install-sheet-backdrop.closing .install-sheet {
  animation: sheet-rise 0.3s var(--ease-out-expo) reverse forwards;
}

.install-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--ivory);
  color: var(--ink-500);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.05s;
}
.install-close:hover { background: var(--line-2); }
.install-close:active { transform: scale(0.94); }

.install-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 20px;
}
.install-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  box-shadow: var(--sh-md);
  flex-shrink: 0;
}
.install-name {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 3px;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.install-host {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink-500);
  margin: 0;
  letter-spacing: 0.02em;
}

.install-body { animation: fade-rise 0.4s var(--ease-out-expo); }
.install-body[hidden] { display: none; }

.install-pitch {
  font-size: var(--fs-body);
  color: var(--ink-800);
  margin: 0 0 18px;
  line-height: 1.5;
}

.install-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 12px;
}
.install-perks li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--ink-800);
}
.install-perks li > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--cobalt-50);
  font-size: 18px;
}

/* iOS visual illustration — Safari toolbar with Share highlighted */
.ios-illustration {
  margin: 0 -8px 18px;
  border-radius: var(--r-md);
  overflow: hidden;
}
.ios-illustration svg {
  width: 100%;
  height: auto;
  display: block;
}

.install-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  gap: 16px;
}
.install-steps-tight { gap: 10px; }
.install-steps-tight .step-n { width: 26px; height: 26px; font-size: 13px; }
.install-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: var(--fs-body);
  line-height: 1.45;
  color: var(--ink-800);
}
.install-steps li svg {
  display: inline-block;
  vertical-align: text-bottom;
  margin: 0 2px;
  color: var(--cobalt-600);
}
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cobalt-50);
  color: var(--cobalt-700);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════
   INSTALL CARD — inline (used on order success)
   ════════════════════════════════════════════════ */

.install-card {
  margin: 22px 0 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--cobalt-50) 0%, var(--paper) 100%);
  border: 1px solid var(--cobalt-100);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}
.install-card .install-card-icon { font-size: 28px; flex-shrink: 0; }
.install-card .install-card-body { flex: 1; }
.install-card p {
  margin: 0 0 2px;
  font-size: var(--fs-body-sm);
  font-weight: 700;
  color: var(--ink-900);
}
.install-card small {
  color: var(--ink-500);
  font-size: var(--fs-caption);
}
.install-card button {
  background: var(--grad-cobalt);
  color: white;
  border: none;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: var(--fs-caption);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: transform 0.05s, box-shadow 0.2s;
}
.install-card button:hover { box-shadow: var(--glow-cobalt); }
.install-card button:active { transform: scale(0.96); }
.install-card[hidden] { display: none; }

/* ════════════════════════════════════════════════
   ORDERS LIST — /orders.html
   ════════════════════════════════════════════════ */

.orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.orders-head h1 { margin: 0; }

.orders-list {
  display: grid;
  gap: 12px;
}

.order-card {
  display: block;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--ink-800);
  position: relative;
  transition: border-color 0.15s, transform 0.06s var(--ease-out-expo),
              box-shadow 0.2s, background 0.15s;
}
.order-card:hover { border-color: var(--cobalt-300); box-shadow: var(--sh-md); transform: translateY(-1px); }
.order-card:active { transform: scale(0.99); }

.order-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.order-card-row + .order-card-row { margin-top: 10px; }

.order-card-summary strong {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-body-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
.order-district {
  font-size: var(--fs-body-sm);
  color: var(--ink-500);
  font-weight: 500;
}

.order-card-foot {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
}
.order-id {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--fs-caption);
  color: var(--ink-500);
  background: var(--ivory);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  letter-spacing: 0.02em;
}
.order-arrow {
  color: var(--cobalt-600);
  font-weight: 700;
  font-size: 18px;
}
.order-time {
  font-size: var(--fs-caption);
  color: var(--ink-500);
  font-weight: 500;
}

/* Status badges */
.order-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.order-status-sent,
.order-status-new {
  background: var(--cobalt-50);
  color: var(--cobalt-700);
}
.order-status-confirmed {
  background: var(--cobalt-100);
  color: var(--cobalt-800);
}
.order-status-preparing,
.order-status-out-for-delivery {
  background: var(--ember-100);
  color: var(--ember-600);
}
.order-status-completed,
.order-status-delivered {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}
.order-status-cancelled {
  background: rgba(220, 38, 38, 0.12);
  color: var(--warn);
}

/* ════════════════════════════════════════════════
   ADMIN — operator dashboard
   ════════════════════════════════════════════════ */

.pin-input {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0 auto;
}
.pin-input input {
  width: 56px;
  height: 64px;
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  color: var(--ink-900);
  caret-color: var(--cobalt-600);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pin-input input:focus {
  outline: none;
  border-color: var(--cobalt-600);
  box-shadow: 0 0 0 4px var(--cobalt-100);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 6px 0 18px;
}
@media (min-width: 380px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }

.stat {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-align: left;
}
.stat strong {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.stat span {
  font-size: 11px;
  color: var(--ink-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.admin-source {
  font-size: var(--fs-caption);
  margin-bottom: 16px;
}

.filter-section { display: grid; gap: 10px; margin-bottom: 18px; }
.filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.filter-label {
  font-size: var(--fs-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
  flex-shrink: 0;
  min-width: 64px;
}
.pill-grid-compact {
  display: inline-flex !important;
  gap: 6px !important;
  flex-wrap: nowrap;
  grid-template-columns: none !important;
}
.pill.pill-sm {
  min-height: 34px;
  padding: 6px 14px;
  font-size: var(--fs-caption);
  font-weight: 600;
  white-space: nowrap;
}

.admin-order-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.06s var(--ease-out-expo), box-shadow 0.2s;
}
.admin-order-card:hover { border-color: var(--cobalt-300); box-shadow: var(--sh-md); transform: translateY(-1px); }
.admin-order-card:active { transform: scale(0.99); }

.order-customer {
  font-size: var(--fs-caption);
  color: var(--ink-500);
  font-weight: 500;
}

/* Detail sheet status action grid */
.status-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.status-action-btn {
  font-size: var(--fs-body-sm);
  padding: 12px 14px;
  text-align: left;
}
.status-action-positive {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.35);
  color: var(--success);
}
.status-action-positive:hover { background: rgba(22, 163, 74, 0.14); }
.status-action-negative {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.30);
  color: var(--warn);
}
.status-action-negative:hover { background: rgba(220, 38, 38, 0.14); }

/* ════════════════════════════════════════════════
   ADDRESS CHIPS — saved-address quick-pick
   ════════════════════════════════════════════════ */

.address-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.address-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 200px;
  max-width: 260px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 0.15s, transform 0.06s var(--ease-out-expo), box-shadow 0.2s;
}
.address-chip:hover { border-color: var(--cobalt-300); box-shadow: var(--sh-sm); }
.address-chip:active { transform: scale(0.97); }
.address-chip strong {
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-body-sm);
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.address-chip small {
  font-size: var(--fs-caption);
  color: var(--ink-500);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.address-chip.is-default {
  border-color: var(--cobalt-600);
  background: var(--cobalt-50);
}
.address-chip.is-default::after {
  content: '★';
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--ember-500);
  font-size: 12px;
}
.address-chip { position: relative; }

/* ════════════════════════════════════════════════
   BROKER PIP — connection indicator
   ════════════════════════════════════════════════ */

.broker-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: auto;
  font-size: 0;
  flex-shrink: 0;
}
.broker-pip-unconfigured { background: var(--ink-400); }
.broker-pip-checking     { background: var(--cobalt-300); animation: pip-pulse 1.4s ease-in-out infinite; }
.broker-pip-online       {
  background: #16A34A;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}
.broker-pip-offline      {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

/* Address book in settings */
.addr-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
}
.addr-row:last-child { border-bottom: none; }
.addr-info {
  flex: 1;
  min-width: 0;
}
.addr-info strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: var(--fs-body-sm);
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
}
.addr-info small {
  display: block;
  font-size: var(--fs-caption);
  color: var(--ink-500);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.addr-default-badge {
  background: var(--ember-500);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: var(--r-sm);
}
.addr-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.addr-actions button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-600);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: inherit;
}
.addr-actions button:hover { border-color: var(--cobalt-600); color: var(--cobalt-700); }
.addr-actions button.danger { color: var(--warn); }
.addr-actions button.danger:hover { border-color: var(--warn); background: rgba(220, 38, 38, 0.06); }

/* ════════════════════════════════════════════════
   GPS BUTTON — order step 2
   ════════════════════════════════════════════════ */

.gps-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--cobalt-50);
  border: 1px solid var(--cobalt-100);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  color: var(--cobalt-700);
  cursor: pointer;
  width: 100%;
  margin-bottom: 12px;
  transition: background 0.15s, transform 0.05s;
}
.gps-button:hover { background: var(--cobalt-100); }
.gps-button:active { transform: scale(0.99); }
.gps-button.captured {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.30);
  color: var(--success);
}
.gps-button[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ════════════════════════════════════════════════
   SETTINGS PAGE
   ════════════════════════════════════════════════ */

.settings-section { margin-bottom: 28px; }
.settings-h {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--ink-500);
  text-transform: uppercase;
  margin: 0 0 10px 4px;
}
.settings-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 14px;
  border-bottom: 1px solid var(--line-2);
}
.settings-row:last-child { border-bottom: none; }
.settings-label {
  font-size: var(--fs-body-sm);
  color: var(--ink-600);
  font-weight: 500;
}
.settings-value {
  font-size: var(--fs-body-sm);
  font-weight: 600;
  color: var(--ink-900);
  text-align: right;
}
.settings-value.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.settings-value.link {
  color: var(--cobalt-600);
  text-decoration: none;
}
.settings-value.link:hover { text-decoration: underline; }

.settings-segmented {
  display: inline-flex;
  background: var(--ivory);
  padding: 3px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  gap: 0;
}
.settings-segmented button {
  border: none;
  background: transparent;
  color: var(--ink-600);
  font-family: inherit;
  font-size: var(--fs-caption);
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.05s;
  white-space: nowrap;
}
.settings-segmented button:active { transform: scale(0.96); }
.settings-segmented button.selected {
  background: var(--paper);
  color: var(--cobalt-700);
  box-shadow: var(--sh-sm);
}

.settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px 14px;
  background: var(--paper-2);
  border-top: 1px solid var(--line-2);
}
.settings-actions .btn {
  font-size: var(--fs-caption);
  padding: 10px 12px;
}
.settings-actions .btn.danger {
  color: var(--warn);
  border-color: rgba(220, 38, 38, 0.2);
}
.settings-actions .btn.danger:hover {
  background: rgba(220, 38, 38, 0.06);
  border-color: var(--warn);
}

/* ════════════════════════════════════════════════
   APP UPDATE TOAST — when SW finds a newer version
   ════════════════════════════════════════════════ */

.update-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-cobalt);
  color: white;
  padding: 12px 16px 12px 18px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--glow-cobalt);
  z-index: 90;
  animation: toast-rise 0.4s var(--ease-out-back);
  font-size: var(--fs-body-sm);
  font-weight: 600;
}
.update-toast button {
  background: white;
  color: var(--cobalt-700);
  border: none;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: var(--fs-caption);
  cursor: pointer;
  font-family: inherit;
}
.update-toast.dismissing { animation: toast-fade 0.3s ease-in forwards; }

/* ════════════════════════════════════════════════
   SPINNER + STATUS UTILITIES
   ════════════════════════════════════════════════ */

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
.btn-secondary .spinner { border-color: var(--line); border-top-color: var(--cobalt-600); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════
   STEP TRANSITIONS
   ════════════════════════════════════════════════ */

.step {
  animation: step-in 0.4s var(--ease-out-expo);
}
.step[hidden] { display: none !important; }
@keyframes step-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ════════════════════════════════════════════════
   SUCCESS OVERLAY — the signature moment
   ════════════════════════════════════════════════ */

.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(11, 63, 224, 0.14) 0%, transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(249, 115, 22, 0.12) 0%, transparent 50%),
    var(--lattice-cobalt) 0 0 / 240px 240px,
    var(--ivory);
  animation: overlay-fade-out 0.6s ease-in 2.4s forwards;
}
.success-overlay[hidden] { display: none; }

.success-content {
  max-width: 360px;
  padding: 0 24px;
}

/* Inline variant — used inside step 5 of the order flow (no overlay) */
.success-step { text-align: center; padding-top: 16px; }
.success-step .success-mark { width: 200px; height: 200px; margin: 0 auto 28px; }
.success-step .success-flame { width: 120px; height: 120px; }
.success-step .success-orbit circle { fill: var(--cobalt-600); }
.success-step .success-title { animation: success-text-rise 0.7s var(--ease-out-expo) 0.2s both; }
.success-step .success-id    { animation: success-text-rise 0.6s var(--ease-out-expo) 0.4s both; }
.success-step .success-sub   { animation: success-text-rise 0.6s var(--ease-out-expo) 0.55s both; }

.success-mark {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 32px;
}
.success-orbit {
  position: absolute;
  inset: 0;
  fill: var(--cobalt-600);
  opacity: 0;
  animation:
    success-orbit-in 0.9s var(--ease-out-expo) 0.1s forwards,
    orbit-spin 60s linear 1s infinite;
}
.success-orbit circle { fill: var(--cobalt-600); }
.success-flame {
  width: 150px;
  height: 150px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  opacity: 0;
  animation:
    flame-burst 0.9s var(--ease-out-back) 0.2s forwards,
    flame-glow 1.6s ease-in-out 1.1s infinite;
}
@keyframes success-orbit-in {
  from { opacity: 0; transform: rotate(-160deg) scale(0.7); }
  to   { opacity: 0.55; transform: rotate(0) scale(1); }
}
@keyframes flame-burst {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-8deg); }
  60%  { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(2deg); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); filter: drop-shadow(0 0 28px rgba(11, 63, 224, 0.4)) drop-shadow(0 0 18px rgba(249, 115, 22, 0.35)); }
}
@keyframes flame-glow {
  0%, 100% { filter: drop-shadow(0 0 24px rgba(11, 63, 224, 0.4)) drop-shadow(0 0 16px rgba(249, 115, 22, 0.30)); }
  50%      { filter: drop-shadow(0 0 44px rgba(11, 63, 224, 0.6)) drop-shadow(0 0 26px rgba(249, 115, 22, 0.50)); }
}

.success-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(36px, 9vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--grad-flame);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin: 0 0 14px;
  opacity: 0;
  transform: translateY(16px);
  animation: success-text-rise 0.7s var(--ease-out-expo) 0.6s forwards;
}
.success-id {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  color: var(--ink-500);
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  opacity: 0;
  animation: success-text-rise 0.6s var(--ease-out-expo) 0.85s forwards;
}
.success-sub {
  font-size: var(--fs-body-lg);
  color: var(--ink-600);
  margin: 0;
  font-weight: 500;
  opacity: 0;
  animation: success-text-rise 0.6s var(--ease-out-expo) 1.05s forwards;
}
@keyframes success-text-rise {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes overlay-fade-out {
  to { opacity: 0; pointer-events: none; }
}

/* ════════════════════════════════════════════════
   THEME TOGGLE — floating top-right, all pages
   ════════════════════════════════════════════════ */

.theme-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-800);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  z-index: 60;
  padding: 0;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Twemoji Mozilla', system-ui;
  box-shadow: var(--sh-sm);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s var(--ease-out-back),
              background 0.25s, border-color 0.25s,
              box-shadow 0.25s;
}
.theme-toggle:hover {
  transform: scale(1.08);
  border-color: var(--cobalt-600);
  box-shadow: var(--sh-md);
}
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--cobalt-100), var(--sh-md);
}

/* ════════════════════════════════════════════════
   CONNECTIVITY PIP — offline indicator
   ════════════════════════════════════════════════ */

.connectivity-pip {
  position: fixed;
  top: 18px;
  right: 64px;
  background: linear-gradient(135deg, #DC2626 0%, #F97316 100%);
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 12px 6px 26px;
  border-radius: var(--r-pill);
  box-shadow: 0 6px 18px -4px rgba(220, 38, 38, 0.5);
  z-index: 60;
  animation: pip-rise 0.34s var(--ease-out-back);
  pointer-events: none;
}
.connectivity-pip::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  animation: pip-pulse 1.4s ease-in-out infinite;
}
@keyframes pip-rise {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pip-pulse {
  0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
  50%      { opacity: 0.4; transform: translateY(-50%) scale(0.7); }
}
.connectivity-pip[hidden] { display: none; }

/* ════════════════════════════════════════════════
   TOAST — transient notifications
   ════════════════════════════════════════════════ */

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-900);
  color: var(--paper);
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-size: var(--fs-body-sm);
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: var(--sh-lg);
  z-index: 90;
  animation: toast-rise 0.4s var(--ease-out-back);
  white-space: nowrap;
}
[data-theme="dark"] .toast {
  background: var(--paper);
  color: var(--ink-900);
}
.toast.dismissing { animation: toast-fade 0.3s ease-in forwards; }
@keyframes toast-rise {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes toast-fade {
  to { opacity: 0; transform: translate(-50%, -10px); }
}

/* ════════════════════════════════════════════════
   ACCESSIBILITY: respect motion preferences
   ════════════════════════════════════════════════ */

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