/* =====================================================================
   Métreur Art & Fenêtres — Design Premium FPEE "Ruche"
   Palette BeetoB · Inter · gradients signature · ombres calibrées
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  /* Charte Art & Fenêtres — charbon + lime */
  --charbon: #2a292a;
  --charbon-dark: #1a191a;
  --charbon-light: #3e3d3e;
  --lime: #B6D23D;
  --lime-dark: #90a82e;
  --lime-light: #cde060;
  --lime-bg: rgba(182,210,61,0.10);

  /* Compat couleurs (remappées sur charte AF) */
  --blue: #2a292a;
  --blue-dark: #1a191a;
  --blue-darkest: #2a292a;
  --blue-light: #3e3d3e;
  --blue-lighter: #c8d89e;
  --gold: #B6D23D;
  --gold-dark: #90a82e;
  --gold-light: #cde060;
  --dark: #2a292a;

  /* Typographie */
  --sans: 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Surfaces */
  --surface-0: #FFFFFF;
  --surface-1: #F6F6F4;
  --surface-2: #EEEDE9;
  --surface-3: #E4E3DC;

  /* Textes */
  --text-1: #2a292a;
  --text-2: #5a5959;
  --text-3: #9a9898;

  /* Bordures */
  --border-1: #E4E3DC;
  --border-2: #D4D3CA;
  --border-strong: #B4B3A8;

  /* États */
  --success: #1B9E7A;
  --warning: #D88B1C;
  --danger: #D14444;
  --info: #2a292a;

  /* Ombres */
  --shadow-xs: 0 1px 2px rgba(42,41,42,0.06);
  --shadow-sm: 0 2px 8px rgba(42,41,42,0.08), 0 1px 2px rgba(42,41,42,0.04);
  --shadow-md: 0 6px 24px rgba(42,41,42,0.10), 0 2px 6px rgba(42,41,42,0.05);
  --shadow-lg: 0 18px 60px rgba(42,41,42,0.14), 0 6px 18px rgba(42,41,42,0.07);
  --shadow-glow-blue: 0 0 0 4px rgba(182,210,61,0.22);
  --shadow-glow-gold: 0 0 0 4px rgba(182,210,61,0.22);

  /* Gradients signature AF */
  --grad-primary: linear-gradient(135deg, #1a191a 0%, #2a292a 100%);
  --grad-gold: linear-gradient(135deg, #B6D23D 0%, #cde060 100%);
  --grad-energy: linear-gradient(135deg, #2a292a 0%, #3e3d3e 100%);
  --grad-hero: linear-gradient(135deg, #1a191a 0%, #2a292a 55%, #3e3d3e 100%);
  --grad-glass: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);

  /* Espacements */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px;
  --radius-xl: 20px; --radius-full: 9999px;

  /* Transitions */
  --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Compat ancien code */
  --bleu: var(--charbon);
  --bleu2: var(--charbon-dark);
  --bleu3: var(--charbon-light);
  --accent: var(--lime);
  --accent2: var(--lime-light);
  --accent-bg: var(--lime-bg);
  --ok: var(--success);
  --warn: var(--warning);
  --bg: var(--surface-1);
  --card: var(--surface-0);
  --ink: var(--text-1);
  --muted: var(--text-2);
  --line: var(--border-1);
  --radius: var(--radius-md);
  --shadow: var(--shadow-sm);
  --shadow-hover: var(--shadow-md);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--surface-1);
  color: var(--text-1);
  display: flex; flex-direction: column; min-height: 100vh;
  font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-tap-highlight-color: rgba(0,120,200,0.10);
}

::selection {
  background: var(--gold);
  color: var(--dark);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-2); border-radius: var(--radius-full);
  border: 3px solid var(--surface-1);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Animations */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(27,158,122,0.4); }
  50% { box-shadow: 0 0 16px rgba(27,158,122,0.7); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Barre réseau ── */
.netbar {
  font-size: 11px; font-weight: 700; text-align: center;
  padding: 5px 8px; color: #fff; background: var(--success);
  letter-spacing: .06em; text-transform: uppercase;
}
.netbar.off { background: var(--text-3); }
.netbar::before { content: "En ligne — sync auto"; }
.netbar.off::before { content: "Hors-ligne — données enregistrées localement"; }

/* ── En-tête premium ── */
.appbar {
  background: var(--grad-hero);
  color: #fff;
  padding: 18px 20px 20px;
  display: flex; align-items: center; gap: 14px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.appbar::before {
  content: ''; position: absolute; top: -60px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(216,139,28,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.appbar::after {
  content: ''; position: absolute; bottom: -30px; left: 20%;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(77,163,224,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.appbar-title {
  font-weight: 700; font-size: 17px; letter-spacing: .2px;
  position: relative; z-index: 1;
}
.appbar-sub {
  position: absolute; right: 20px; top: 20px;
  font-size: 12px; opacity: .65; font-weight: 500;
  z-index: 1;
}
.iconbtn {
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff; font-size: 22px; line-height: 1;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t-fast); cursor: pointer;
  position: relative; z-index: 1;
}
.iconbtn:hover { background: rgba(255,255,255,0.18); }

/* ── Contenu ── */
.view {
  flex: 1; padding: 18px 16px 90px; overflow-y: auto;
  animation: fade-in .3s ease-out;
}
.footer {
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--surface-0);
  border-top: 1px solid var(--border-1);
  box-shadow: 0 -2px 12px rgba(11,41,73,0.04);
}
.footer:empty { display: none; }

/* ── Cartes premium ── */
.card {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base);
  position: relative; overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }
.card h3 {
  margin: 0 0 6px; font-size: 15px; font-weight: 700;
  color: var(--blue-darkest);
}
.card .sub { color: var(--text-2); font-size: 13px; line-height: 1.55; }

/* ── Stat-cards (KPI style BeetoB Ruche) ── */
.stat-card {
  background: var(--blue-darkest);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.25rem;
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 80px; height: 80px;
  background: radial-gradient(circle, rgba(216,139,28,0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.stat-card .stat-num {
  font-size: 2.2rem; font-weight: 800; line-height: 1; margin-bottom: .3rem;
  position: relative;
}
.stat-card .stat-label {
  font-size: .78rem; color: rgba(255,255,255,0.6); font-weight: 500;
  position: relative;
}
.stat-card .stat-trend {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .72rem; font-weight: 700;
  color: #39d98a; background: rgba(57,217,138,0.12);
  padding: .2rem .55rem; border-radius: var(--radius-full); margin-top: .5rem;
  position: relative;
}
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 16px;
}

/* ── Section titles ── */
.section-title {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3); margin: 22px 2px 12px;
  display: flex; align-items: center; gap: .6rem;
}
.section-title:first-child { margin-top: 4px; }
.section-title::before {
  content: ''; width: 3px; height: 1.1em;
  background: var(--grad-gold); border-radius: 2px; flex-shrink: 0;
}

/* ── Chips (style BeetoB) ── */
.chip {
  background: var(--surface-0); border-radius: var(--radius-md); padding: 14px 16px;
  box-shadow: var(--shadow-sm); display: flex; align-items: flex-start; gap: 12px;
  font-size: .85rem; color: var(--text-1); line-height: 1.55;
  border: 1px solid var(--border-1);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.chip-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--accent-bg); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.chips-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }

/* ── Highlight-box (hero banner) ── */
.highlight-box {
  background: var(--grad-hero);
  color: #fff; border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem; margin-bottom: 16px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.highlight-box::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(216,139,28,0.15) 0%, transparent 60%);
  border-radius: 50%;
}
.highlight-box p {
  font-size: .95rem; font-weight: 500; line-height: 1.65; position: relative;
}
.highlight-box .highlight-source {
  margin-top: .8rem; font-size: .75rem; color: rgba(255,255,255,0.5); position: relative;
}

/* ── Note-box ── */
.note-box {
  background: rgba(216,139,28,0.06);
  border: 1px solid rgba(216,139,28,0.18);
  border-radius: var(--radius-md); padding: 14px 16px;
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .82rem; color: var(--text-1); margin-bottom: 14px;
}
.note-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .05rem; }

/* ── Tableaux premium ── */
.table-wrapper {
  background: var(--surface-0); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 14px;
  border: 1px solid var(--border-1);
}
.table-wrapper table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.table-wrapper thead { background: var(--blue-darkest); color: #fff; }
.table-wrapper thead th {
  padding: .75rem 1rem; text-align: left; font-weight: 600;
  font-size: .75rem; letter-spacing: .05em; text-transform: uppercase;
}
.table-wrapper tbody tr { border-bottom: 1px solid var(--border-1); }
.table-wrapper tbody tr:last-child { border-bottom: none; }
.table-wrapper tbody tr:hover { background: rgba(0,120,200,0.03); }
.table-wrapper tbody td { padding: .65rem 1rem; color: var(--text-1); }

/* ── Layouts ── */
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ── Boutons premium (BeetoB) ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: 0; border-radius: var(--radius-md);
  padding: 14px 18px; font-size: 15px; font-weight: 700;
  font-family: var(--sans); cursor: pointer;
  transition: all var(--t-base); position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0; transition: opacity var(--t-base);
}
.btn:hover::before { opacity: 1; }

.btn.primary {
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 4px 16px rgba(0,82,156,0.25);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,82,156,0.3); }
.btn.primary:active { transform: translateY(0); }

.btn.accent {
  background: var(--grad-gold); color: #1a1402;
  box-shadow: 0 4px 16px rgba(216,139,28,0.25);
}
.btn.accent:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(216,139,28,0.35); }

.btn.ok {
  background: var(--success); color: #fff;
  box-shadow: 0 4px 16px rgba(27,158,122,0.25);
}
.btn.ok:hover { transform: translateY(-1px); }

.btn.ghost {
  background: var(--surface-0); color: var(--blue-darkest);
  border: 1.5px solid var(--border-2);
  box-shadow: var(--shadow-xs);
}
.btn.ghost:hover {
  background: var(--blue-darkest); color: #fff; border-color: var(--blue-darkest);
  box-shadow: var(--shadow-sm);
}

.btn.sm { padding: 11px 14px; font-size: 14px; }
.btn:disabled { opacity: .45; pointer-events: none; }

/* ── Liste items (style BeetoB) ── */
.item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface-0); border: 1px solid var(--border-1);
  border-radius: var(--radius-lg); padding: 14px 16px;
  margin-bottom: 10px; text-align: left; width: 100%; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-fast);
}
.item:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: var(--border-2);
}
.item .ic {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--accent-bg); display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 650; color: var(--blue-darkest); font-size: 14px; }
.item .d { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.item .chev { color: var(--text-3); font-size: 22px; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: var(--radius-full); letter-spacing: .02em;
}
.badge.ok { background: rgba(27,158,122,0.10); color: var(--success); }
.badge.warn { background: rgba(216,139,28,0.10); color: var(--warning); }
.badge.todo { background: var(--surface-2); color: var(--text-3); }
.badge.danger { background: rgba(209,68,68,0.10); color: var(--danger); }
.badge.accent { background: var(--accent-bg); color: var(--gold-dark); }

/* ── Formulaires premium ── */
label.fld { display: block; margin-bottom: 14px; }
label.fld > span {
  display: block; font-size: 12px; font-weight: 650;
  color: var(--text-2); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .04em;
}
input, select, textarea {
  width: 100%; border: 1.5px solid var(--border-2);
  border-radius: var(--radius-md); padding: 13px 14px;
  font-size: 16px; background: var(--surface-0); color: var(--text-1);
  font-family: var(--sans);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--lime);
  box-shadow: var(--shadow-glow-blue);
}
textarea { min-height: 74px; resize: vertical; }
.hint {
  font-size: 12px; color: var(--text-2); margin-top: -8px; margin-bottom: 14px;
  font-style: italic;
}

/* ── Mesures 3x3 ── */
.measure {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 6px;
}
.measure input {
  text-align: center; font-weight: 800; font-size: 18px; padding: 14px 6px;
  border-radius: var(--radius-md); font-family: var(--mono);
}
.measure .lab {
  grid-column: 1 / -1; font-size: 11px; font-weight: 700;
  color: var(--text-3); margin-top: 8px;
  text-transform: uppercase; letter-spacing: .06em;
}
.measfield.active input {
  border-color: var(--gold); box-shadow: var(--shadow-glow-gold);
}

.calcbox {
  background: var(--blue-darkest); border-radius: var(--radius-lg);
  padding: 18px; margin-top: 10px; color: #fff;
}
.calcbox .big {
  font-size: 28px; font-weight: 800; font-family: var(--mono);
}
.calcbox .lbl {
  font-size: 11px; color: rgba(255,255,255,0.5);
  text-transform: uppercase; letter-spacing: .06em;
}
.calcbox .sub { color: rgba(255,255,255,0.7); font-size: 13px; line-height: 1.55; margin-top: 8px; }

/* ── Alertes ── */
.alert {
  border-radius: var(--radius-md); padding: 12px 14px; font-size: 13px;
  margin: 8px 0; display: flex; gap: 10px;
  border: 1px solid transparent;
}
.alert.warn {
  background: rgba(216,139,28,0.08); color: #8a5800;
  border-color: rgba(216,139,28,0.2);
}
.alert.danger {
  background: rgba(209,68,68,0.08); color: #8a241b;
  border-color: rgba(209,68,68,0.2);
}
.alert.ok {
  background: rgba(27,158,122,0.08); color: #1a6b41;
  border-color: rgba(27,158,122,0.2);
}

/* ── Bouton laser ── */
.laserbtn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--grad-primary); color: #fff;
  border: 0; border-radius: var(--radius-md);
  padding: 13px; font-weight: 700; font-size: 14px; width: 100%; margin-top: 2px;
  box-shadow: 0 4px 16px rgba(0,82,156,0.2);
  transition: all var(--t-base); cursor: pointer;
  font-family: var(--sans);
}
.laserbtn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,82,156,0.28); }
.laserbtn .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #39d98a; box-shadow: 0 0 8px #39d98a;
  animation: pulse-glow 2s infinite;
}

/* ── Schéma menuiserie ── */
.schema { display: flex; justify-content: center; padding: 8px 0 2px; }
svg.win { width: 160px; height: auto; }

/* ── Check items ── */
.check {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px; border-bottom: 1px solid var(--border-1);
}
.check:last-child { border-bottom: 0; }
.check .cl { flex: 1; }
.check .cl .t { font-weight: 650; color: var(--blue-darkest); font-size: 14px; }
.check .cl .d { font-size: 12.5px; color: var(--text-2); }
.toggle {
  width: 52px; height: 30px; border-radius: var(--radius-full);
  background: var(--border-2); position: relative; border: 0; flex-shrink: 0; cursor: pointer;
  transition: background var(--t-base);
}
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: .2s var(--ease-spring);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle.on { background: var(--success); }
.toggle.on::after { left: 25px; }
.toggle.danger.on { background: var(--danger); }

/* ── Photos ── */
.photogrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo {
  aspect-ratio: 4/3; border-radius: var(--radius-md);
  border: 2px dashed var(--border-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--text-3); font-size: 12px; font-weight: 600;
  background: var(--surface-1); text-align: center; padding: 6px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.photo:hover { border-color: var(--blue-light); background: var(--surface-2); }
.photo.done {
  border-style: solid; border-color: var(--success);
  background: var(--success); color: #fff;
  position: relative; overflow: hidden;
}
.photo.done .px { font-size: 26px; }
.photo .ph { font-size: 24px; }

/* ── Pills ── */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pill {
  border: 1.5px solid var(--border-2); background: var(--surface-0);
  border-radius: var(--radius-full); padding: 9px 16px; font-size: 13px;
  font-weight: 600; cursor: pointer;
  transition: all var(--t-base); font-family: var(--sans);
}
.pill:hover { border-color: var(--blue-light); background: rgba(0,120,200,0.04); }
.pill.on {
  background: var(--grad-primary); color: #fff; border-color: transparent;
  box-shadow: 0 2px 12px rgba(0,82,156,0.2);
}

/* ── Misc ── */
.tools li { margin-bottom: 8px; font-size: 14px; color: var(--text-1); }
.kv {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border-1); font-size: 14px;
}
.kv:last-child { border: 0; }
.kv .k { color: var(--text-2); font-weight: 500; }
.kv .v { font-weight: 700; text-align: right; color: var(--blue-darkest); }
.muted { color: var(--text-2); }
.center { text-align: center; }
.mb0 { margin-bottom: 0; }
.sp { height: 10px; }

/* ── Tournée card (hero gradient) ── */
.card-tournee {
  background: var(--grad-hero); color: #fff; border: none;
  box-shadow: var(--shadow-md);
}
.card-tournee::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(216,139,28,0.15) 0%, transparent 60%);
  border-radius: 50%;
}
.card-tournee h3 { color: #fff !important; }
.card-tournee .sub { color: rgba(255,255,255,.65); }

/* ── Demo banner ── */
.demo-banner {
  border: 2px solid var(--gold) !important;
  background: linear-gradient(135deg, #fffdf5 0%, #fff9e8 100%) !important;
  border-left: 5px solid var(--gold) !important;
}
.demo-banner h3 { color: var(--gold) !important; font-weight: 800; }

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 20px 0; color: var(--text-3);
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-1);
}

/* ── Progress ── */
.progress-wrap {
  width: 100%; height: 6px; background: var(--border-1);
  border-radius: var(--radius-full); margin-top: 6px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--grad-gold);
  border-radius: var(--radius-full); transition: width .4s var(--ease-spring);
}

/* ── Tab bar (bottom navigation premium) ── */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex;
  background: var(--surface-0);
  border-top: 1px solid var(--border-1);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(11,41,73,0.06);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; color: var(--text-3);
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  padding: 8px 4px; cursor: pointer;
  transition: color var(--t-fast); font-family: var(--sans);
}
.tab .tab-icon { font-size: 22px; line-height: 1; transition: transform var(--t-base); }
.tab .tab-label { text-transform: uppercase; letter-spacing: .06em; }
.tab.active { color: var(--charbon); }
.tab.active .tab-icon { transform: scale(1.1); }
.tab.active::after {
  content: ''; display: block; width: 24px; height: 3px;
  background: var(--lime); border-radius: 2px; margin-top: 3px;
}

/* ── Responsive ── */
@media (max-width: 380px) {
  .stat-row { grid-template-columns: 1fr 1fr; }
  .measure input { font-size: 16px; padding: 12px 4px; }
  .appbar-title { font-size: 15px; }
}

@media (min-width: 640px) {
  .view { padding: 24px 24px 90px; max-width: 640px; margin: 0 auto; }
  .card { padding: 22px; }
  .stat-row { grid-template-columns: repeat(3, 1fr); }
}
