/* ============================================================
   BE CARS — Design System v2
   Premium automotive · dark · refined cyan + Tenerife sun warm accent
   ============================================================ */

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

:root {
  /* — Surfaces (deep blue-ink, not pure black) — */
  --bg-0:        oklch(0.14 0.012 240);
  --bg-1:        oklch(0.175 0.013 240);
  --bg-2:        oklch(0.215 0.015 240);
  --bg-3:        oklch(0.255 0.017 240);
  --bg-4:        oklch(0.30 0.018 240);

  /* — Borders / strokes — */
  --stroke-1:    oklch(0.30 0.012 240 / 0.55);
  --stroke-2:    oklch(0.40 0.018 240 / 0.7);
  --stroke-3:    oklch(0.55 0.025 240 / 0.5);

  /* — Text — */
  --text-1:      oklch(0.975 0.005 240);
  --text-2:      oklch(0.78 0.012 240);
  --text-3:      oklch(0.58 0.012 240);
  --text-4:      oklch(0.45 0.012 240);

  /* — Brand accent (refined cyan, less neon) — */
  --accent:      oklch(0.80 0.12 215);
  --accent-2:    oklch(0.70 0.14 220);
  --accent-soft: oklch(0.80 0.12 215 / 0.14);
  --accent-ink:  oklch(0.20 0.04 220);

  /* — Warm secondary (Tenerife sun) — */
  --warm:        oklch(0.78 0.14 55);
  --warm-soft:   oklch(0.78 0.14 55 / 0.14);

  /* — States — */
  --ok:          oklch(0.78 0.17 150);
  --ok-soft:     oklch(0.78 0.17 150 / 0.14);
  --warn:        oklch(0.82 0.15 85);
  --danger:      oklch(0.68 0.21 25);
  --danger-soft: oklch(0.68 0.21 25 / 0.14);

  /* — Radii — */
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 14px;
  --r-4: 20px;
  --r-pill: 999px;

  /* — Shadows / glows — */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4), 0 0 0 0.5px var(--stroke-1) inset;
  --shadow-md: 0 8px 24px -8px rgba(0,0,0,0.5), 0 0 0 0.5px var(--stroke-1) inset;
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,0.7), 0 0 0 0.5px var(--stroke-2) inset;
  --glow-accent: 0 0 0 1px oklch(0.80 0.12 215 / 0.5), 0 8px 28px oklch(0.80 0.12 215 / 0.25);

  /* — Density — */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 72px;

  /* — Type scale — */
  --t-xs: 11px;
  --t-sm: 13px;
  --t-base: 15px;
  --t-md: 17px;
  --t-lg: 22px;
  --t-xl: 28px;
  --t-2xl: 36px;
  --t-3xl: 48px;
  --t-4xl: 72px;
  --t-5xl: 104px;
}

/* density: compact */
.density-compact {
  --space-3: 10px;
  --space-4: 12px;
  --space-5: 14px;
  --space-6: 18px;
  --space-7: 24px;
}

/* alternate accents (set on .screen) */
.accent-amber {
  --accent:      oklch(0.78 0.14 55);
  --accent-2:    oklch(0.70 0.16 50);
  --accent-soft: oklch(0.78 0.14 55 / 0.14);
  --accent-ink:  oklch(0.22 0.05 60);
}
.accent-mint {
  --accent:      oklch(0.80 0.13 170);
  --accent-2:    oklch(0.70 0.15 165);
  --accent-soft: oklch(0.80 0.13 170 / 0.14);
  --accent-ink:  oklch(0.20 0.04 170);
}
.accent-violet {
  --accent:      oklch(0.74 0.14 290);
  --accent-2:    oklch(0.66 0.18 290);
  --accent-soft: oklch(0.74 0.14 290 / 0.14);
  --accent-ink:  oklch(0.20 0.05 290);
}

/* ============================================================
   Body reset (production)
   ============================================================ */
html, body { margin: 0; padding: 0; background: var(--bg-0); }
body { font-family: 'Geist', system-ui, sans-serif; color: var(--text-1); -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
button, input, textarea, select { font-family: inherit; color: inherit; }

/* page-level screen takes the full viewport */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Base — applied to .screen so design-canvas stays neutral
   ============================================================ */
.screen, .screen * { box-sizing: border-box; }
.screen {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: var(--t-base);
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  color: var(--text-1);
  background: var(--bg-0);
  letter-spacing: -0.005em;
  line-height: 1.45;
  position: relative;
  overflow: hidden;
}

.screen .mono {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-feature-settings: 'ss01';
  letter-spacing: 0.02em;
}

/* Ambient glow texture for hero screens */
.screen.glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 0%, oklch(0.80 0.12 215 / 0.10), transparent 60%),
    radial-gradient(ellipse 50% 35% at 100% 100%, oklch(0.78 0.14 55 / 0.06), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.screen.glow > * { position: relative; z-index: 1; }

/* ============================================================
   Atoms
   ============================================================ */
.label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  border: 1px solid oklch(0.80 0.12 215 / 0.25);
  color: var(--accent);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 18%, transparent);
}
.dot.lg { width: 8px; height: 8px; box-shadow: 0 0 0 4px color-mix(in oklch, currentColor 18%, transparent); }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stroke-1) 20%, var(--stroke-1) 80%, transparent);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: var(--r-3);
  border: 1px solid var(--stroke-2);
  background: var(--bg-2);
  color: var(--text-1);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover { background: var(--bg-3); border-color: var(--stroke-3); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  box-shadow: var(--glow-accent);
}
.btn-primary:hover { background: var(--accent); filter: brightness(1.05); }

.btn-warm {
  background: var(--warm);
  color: oklch(0.22 0.05 60);
  border-color: transparent;
}

.btn-ghost { background: transparent; border-color: var(--stroke-1); }
.btn-ghost:hover { background: var(--bg-1); }

.btn-whatsapp {
  background: oklch(0.74 0.17 150);
  color: oklch(0.18 0.04 150);
  border-color: transparent;
}

.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--r-2); }
.btn-lg { height: 60px; padding: 0 28px; font-size: 16px; border-radius: var(--r-3); }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }

/* ============================================================
   Cards / Surfaces
   ============================================================ */
.card {
  background: var(--bg-2);
  border: 1px solid var(--stroke-1);
  border-radius: var(--r-3);
  position: relative;
}
.card-pad { padding: var(--space-5); }
.card-tight { padding: var(--space-4); }
.card-flush { padding: 0; }

.card.elevated {
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border-color: var(--stroke-2);
  box-shadow: var(--shadow-md);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

/* corner bracket detail */
.card.bracketed::before, .card.bracketed::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--accent);
  opacity: 0.5;
}
.card.bracketed::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.card.bracketed::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ============================================================
   Status pills
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  border: 1px solid var(--stroke-2);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-2);
  white-space: nowrap;
}
.pill.ok { color: var(--ok); border-color: oklch(0.78 0.17 150 / 0.3); background: var(--ok-soft); }
.pill.warn { color: var(--warn); border-color: oklch(0.82 0.15 85 / 0.3); background: oklch(0.82 0.15 85 / 0.10); }
.pill.danger { color: var(--danger); border-color: oklch(0.68 0.21 25 / 0.3); background: var(--danger-soft); }
.pill.accent { color: var(--accent); border-color: oklch(0.80 0.12 215 / 0.3); background: var(--accent-soft); }
.pill.lg { height: 36px; padding: 0 16px; font-size: 12.5px; }

/* ============================================================
   Form fields
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.input {
  height: 52px;
  padding: 0 16px;
  background: var(--bg-1);
  border: 1px solid var(--stroke-1);
  border-radius: var(--r-2);
  color: var(--text-1);
  font: inherit;
  font-size: 15px;
  transition: border-color .15s, background .15s;
  width: 100%;
}
.input::placeholder { color: var(--text-4); }
.input:focus { outline: none; border-color: var(--accent); background: var(--bg-2); }
.input.with-prefix { padding-left: 56px; }
.field-wrap { position: relative; }
.field-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 13px;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
textarea.input { height: auto; padding: 14px 16px; resize: none; min-height: 100px; }

/* ============================================================
   Logo plate
   ============================================================ */
.logoplate {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 14px 0 10px;
  background: var(--bg-2);
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-2);
  font-family: 'Geist', system-ui;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text-1);
}
.logoplate .logomark {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--accent);
  position: relative;
  overflow: hidden;
}
.logoplate .logomark::after {
  content: '';
  position: absolute;
  inset: auto 0 4px 0;
  height: 3px;
  background: oklch(0.22 0.04 220);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 60% 100%);
}
.logoplate .be { color: var(--accent); font-weight: 700; }
.logoplate .div { color: var(--text-4); font-weight: 300; margin: 0 2px; }

/* ============================================================
   Image placeholder (striped)
   ============================================================ */
.imgph {
  background:
    repeating-linear-gradient(
      135deg,
      oklch(0.22 0.012 240) 0 8px,
      oklch(0.20 0.012 240) 8px 16px
    );
  border: 1px solid var(--stroke-1);
  border-radius: var(--r-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.imgph::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--stroke-2);
  border-radius: calc(var(--r-3) - 6px);
  pointer-events: none;
}

/* ============================================================
   KPI card
   ============================================================ */
.kpi {
  background: var(--bg-2);
  border: 1px solid var(--stroke-1);
  border-radius: var(--r-3);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
}
.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kpi-value {
  font-family: 'Geist', system-ui;
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-feature-settings: 'tnum';
  color: var(--text-1);
}
.kpi-sub {
  font-size: 12.5px;
  color: var(--text-3);
}
.kpi-bar {
  height: 2px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
}
.kpi-bar > i {
  display: block;
  height: 100%;
  background: var(--accent);
}

/* ============================================================
   Bar chart (CSS only)
   ============================================================ */
.chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 6px;
  height: 96px;
  padding: 0 2px;
}
.chart > i {
  background: var(--bg-3);
  border-radius: 3px 3px 0 0;
  position: relative;
}
.chart > i.hi { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.chart > i.mid { background: linear-gradient(180deg, oklch(0.55 0.06 220), oklch(0.40 0.04 220)); }

/* ============================================================
   List row (sidebar quick access)
   ============================================================ */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--stroke-1);
  border-radius: var(--r-2);
  cursor: pointer;
  transition: background .12s, border-color .12s;
  color: var(--text-1);
  text-decoration: none;
}
.row:hover { background: var(--bg-3); border-color: var(--stroke-2); }
.row + .row { margin-top: 8px; }
.row-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-2);
  background: var(--bg-3);
  border: 1px solid var(--stroke-1);
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: 14px; font-weight: 600; color: var(--text-1); }
.row-sub { font-size: 12px; color: var(--text-3); font-family: 'Geist Mono', monospace; }
.row-arrow { color: var(--text-3); font-size: 16px; }
.row.active { background: var(--accent-soft); border-color: oklch(0.80 0.12 215 / 0.4); }
.row.active .row-title { color: var(--accent); }

/* ============================================================
   Tabs / segmented
   ============================================================ */
.seg {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--stroke-1);
  border-radius: var(--r-3);
  gap: 2px;
}
.seg button {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-2);
  border: 0;
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.seg button.active {
  background: var(--bg-4);
  color: var(--text-1);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   Display type
   ============================================================ */
.display {
  font-family: 'Geist', system-ui;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.92;
}
.display.huge { font-size: var(--t-5xl); font-weight: 800; letter-spacing: -0.05em; }
.display.big { font-size: var(--t-4xl); }
.display.med { font-size: var(--t-3xl); }

.display .stroke-text {
  -webkit-text-stroke: 1.5px var(--accent);
  color: transparent;
}
.display .grad {
  background: linear-gradient(180deg, var(--text-1) 0%, oklch(0.70 0.05 215) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.display .grad-accent {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   Utility
   ============================================================ */
.row-flex { display: flex; align-items: center; }
.col-flex { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.grow { flex: 1; }
.muted { color: var(--text-3); }
.subtle { color: var(--text-4); }
.right { margin-left: auto; }
.tnum { font-feature-settings: 'tnum'; }
.tight { letter-spacing: -0.02em; }
.upper { text-transform: uppercase; letter-spacing: 0.14em; font-size: 10.5px; font-family: 'Geist Mono', monospace; }
