/* =============================================================================
 * Euro Freight Transport · v3 design system (Phase A — Navy/Blue, Default variant)
 *
 * Phases B–E add: 7 more hero variants, palettes, type pairings, density, light
 * mode, modals, and reduced-motion fallbacks. Each is layered as additional
 * scoped overrides on top of this base — nothing here gets rewritten.
 *
 * Token cascade:
 *   :root                                 → defaults (Navy/Blue · Normal · Grotesk · Dark)
 *   :root[data-palette="graphite-lime"]   → overrides bg + accent
 *   :root[data-density="dense"]           → overrides --pad, --gap, --radius
 *   :root[data-type="mono"]               → overrides --font-* trio
 *   html[data-theme="light"]              → overrides ink + bg for paper mode
 *   body[data-variant="cartographic"]     → overrides hero grid layout only
 * ============================================================================= */

/* ── Tokens ────────────────────────────────────────────────────────────────── */
:root {
  /* Palette: Navy · Electric (default) */
  --bg:        #0b1220;
  --bg-1:      #0e1729;
  --bg-2:      #131e35;
  --ink:       #e6edf3;
  --ink-dim:   #9aa7b8;
  --ink-mute:  #6b7689;
  --line:      rgba(230, 237, 243, 0.08);
  --line-2:    rgba(230, 237, 243, 0.14);
  --accent:    #3b82f6;
  --good:      #22c55e;
  --warn:      #f59e0b;
  --bad:       #ef4444;

  /* Density: Normal */
  --pad:       28px;
  --pad-lg:    44px;
  --gap:       20px;
  --radius:    14px;

  /* Type pairing: Grotesk · Inter Tight (default) */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-sans:    'Inter Tight', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

/* ── Page shell ────────────────────────────────────────────────────────────── */
.eftv3 {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: 'tnum' 1, 'ss01' 1;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Ambient backdrop: dot grid + two soft accent radials */
.eftv3::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse at top, black 50%, transparent 90%);
}
.eftv3::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 85% -10%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 60%);
}

.eftv3 > * { position: relative; z-index: 1; }

/* ── Mono / display ────────────────────────────────────────────────────────── */
.font-display { font-family: var(--font-display); letter-spacing: -0.02em; font-feature-settings: 'tnum' 1; }
.font-mono    { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: var(--ink-mute);
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.v3-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  background: color-mix(in oklab, var(--bg-1) 80%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.v3-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.v3-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 60%, #fff 0%));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.v3-brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
}
.v3-brand-mark svg { width: 18px; height: 18px; color: #fff; position: relative; z-index: 1; }
.v3-brand-name { font-family: var(--font-display); font-weight: 500; font-size: 18px; }
.v3-brand-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  margin-left: 6px;
}

.v3-nav {
  display: flex;
  gap: 4px;
  margin-left: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.v3-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-dim);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s, background 0.15s;
}
.v3-nav a:hover { color: var(--ink); background: var(--bg-2); }
.v3-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }
.v3-nav-livedot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--good) 30%, transparent);
  animation: pulse-ring 1.8s ease-out infinite;
}

.v3-nav-more { position: relative; display: inline-flex; align-items: center; }
.v3-nav-more > button {
  background: none; border: none; cursor: pointer;
  font: inherit; color: var(--ink-dim);
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s;
}
.v3-nav-more > button:hover { color: var(--ink); background: var(--bg-2); }
.v3-nav-more-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 6px; min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 100;
}
.v3-nav-more-dropdown a {
  display: block; padding: 8px 12px; border-radius: 6px;
  color: var(--ink-dim); text-decoration: none;
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  transition: background .12s, color .12s;
}
.v3-nav-more-dropdown a:hover { background: var(--bg-1); color: var(--ink); }
.v3-nav-more[data-open] .v3-nav-more-dropdown { display: block; }

.v3-header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* Sync indicator */
.v3-sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: default;
}
.v3-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 50%, transparent);
  animation: pulse-ring 1.8s ease-out infinite;
}
.v3-sync[data-state="syncing"] .v3-sync-dot {
  background: var(--accent);
  animation-duration: 0.6s;
}
.v3-sync[data-state="error"] .v3-sync-dot {
  background: var(--bad);
  animation: none;
}

/* Buttons */
.v3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.v3-btn:hover { border-color: var(--line-2); background: var(--bg-2); }
.v3-btn:active { transform: translateY(1px); }
.v3-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.v3-btn--primary:hover {
  background: color-mix(in oklab, var(--accent) 80%, #fff 0%);
  border-color: color-mix(in oklab, var(--accent) 80%, #fff 0%);
}
.v3-btn--ghost { background: transparent; }

/* ── Main + sections ───────────────────────────────────────────────────────── */
.v3-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.v3-section {
  display: none;
  padding: 48px 0;
}
body[data-page="home"]      .v3-section[data-page="home"],
body[data-page="jobs"]      .v3-section[data-page="jobs"],
body[data-page="live-map"]  .v3-section[data-page="live-map"],
body[data-page="drivers"]   .v3-section[data-page="drivers"],
body[data-page="events"]    .v3-section[data-page="events"] {
  display: block;
}

/* ── Hero (Default variant) ────────────────────────────────────────────────── */
.v3-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--pad-lg);
  padding-top: var(--pad-lg);
  align-items: stretch;
}
@media (max-width: 900px) {
  .v3-hero { grid-template-columns: 1fr; }
}

.v3-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-1);
}
.v3-hero-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  animation: pulse-ring 1.8s ease-out infinite;
}

.v3-hero-headline {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(40px, 7.5vw, 104px);
  line-height: 0.95;
  margin: 24px 0;
  color: var(--ink);
}
.v3-hero-headline em {
  font-style: italic;
  color: var(--ink-dim);
  font-weight: 400;
}

.v3-hero-sub {
  color: var(--ink-dim);
  font-size: 17px;
  max-width: 52ch;
  margin-bottom: 32px;
}

.v3-hero-ctas { display: flex; gap: 12px; margin-bottom: 40px; }

/* Stat row */
.v3-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.v3-stat {
  padding: 0 var(--pad);
  border-left: 1px solid var(--line);
}
.v3-stat:first-child { border-left: 0; padding-left: 0; }
.v3-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.v3-stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.v3-stat-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--good);
  margin-top: 6px;
}

/* Right panel — live map card */
.v3-hero-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--bg-1) 80%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.v3-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.v3-panel-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}

/* ── Inline SVG live map ──────────────────────────────────────────────────── */
.v3-map-frame {
  position: relative;
  aspect-ratio: 800 / 480;
  background: #0a1020;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.v3-map-frame svg { display: block; width: 100%; height: 100%; }

/* Deep-sea radial wash so the map has horizon depth instead of a flat fill */
.v3-map-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 110%, rgba(59,130,246,0.08), transparent 60%),
    radial-gradient(90% 70% at 50% -10%, rgba(126,179,255,0.06), transparent 60%);
  pointer-events: none;
  z-index: 1;
}
/* Inner vignette to anchor the frame */
.v3-map-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.02);
}
.v3-map-frame svg { position: relative; z-index: 1; }

/* Countries: subtle interaction lift on hover. Cursor pointer hints zoomability. */
.v3-europe-svg .v3-country {
  transition: fill 0.2s, filter 0.2s;
  cursor: pointer;
}
.v3-europe-svg .v3-country:hover {
  fill: #1c2a48;
  filter: drop-shadow(0 0 8px rgba(126,179,255,0.18));
}
.v3-map-frame[data-zoom]:not([data-zoom="full"]) .v3-europe-svg { cursor: zoom-out; }

/* Cities — tiered visual hierarchy driven by data-tier */
.v3-europe-svg .v3-city { cursor: pointer; }
.v3-europe-svg .v3-city-halo { fill: url(#v3-hub-pulse); opacity: 0; transition: opacity 0.3s; }
.v3-europe-svg .v3-city-dot  { fill: var(--ink-mute); transition: fill 0.2s, r 0.2s; }
.v3-europe-svg .v3-city-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--ink-mute);
  letter-spacing: 0.04em;
  pointer-events: none;
  paint-order: stroke;
  stroke: rgba(10,16,32,0.85);
  stroke-width: 2.5;
  stroke-linejoin: round;
  transition: fill 0.2s, font-size 0.2s;
}

/* Primary tier: bright dot, halo, display-font name */
.v3-europe-svg .v3-city[data-tier="primary"] .v3-city-dot {
  fill: #ffffff;
  r: 3;
  filter: drop-shadow(0 0 4px rgba(126,179,255,0.55));
}
.v3-europe-svg .v3-city[data-tier="primary"] .v3-city-halo { opacity: 1; }
.v3-europe-svg .v3-city[data-tier="primary"] .v3-city-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  fill: var(--ink);
  letter-spacing: 0.02em;
}

/* Secondary tier: clear but not loud */
.v3-europe-svg .v3-city[data-tier="secondary"] .v3-city-dot {
  fill: var(--ink-dim);
  r: 2;
}
.v3-europe-svg .v3-city[data-tier="secondary"] .v3-city-label {
  fill: var(--ink-dim);
  font-size: 9px;
}

/* Inactive / unlabeled cities */
.v3-europe-svg .v3-city[data-tier="inactive"] .v3-city-dot { fill: var(--ink-mute); r: 1.5; opacity: 0.65; }
.v3-europe-svg .v3-city[data-tier="inactive"] .v3-city-label { opacity: 0; }
.v3-europe-svg .v3-city[data-tier="inactive"]:hover .v3-city-label { opacity: 1; }

/* Hover state across all tiers */
.v3-europe-svg .v3-city:hover .v3-city-dot { fill: #7eb3ff; }
.v3-europe-svg .v3-city:hover .v3-city-label { fill: #e6edf3; }

/* Routes */
.v3-europe-svg .v3-route-live { mix-blend-mode: screen; }
.v3-europe-svg .v3-route-done { mix-blend-mode: normal; }

/* Pulse animation on primary city halos (subtle breathing) */
@keyframes v3-hub-breathe {
  0%, 100% { transform: scale(0.85); opacity: 0.55; }
  50%      { transform: scale(1.10); opacity: 0.95; }
}
.v3-europe-svg .v3-city[data-tier="primary"] .v3-city-halo {
  transform-origin: center;
  transform-box: fill-box;
  animation: v3-hub-breathe 3.4s ease-in-out infinite;
}
.v3-europe-svg .v3-city[data-tier="primary"][data-live]:not([data-live="0"]) .v3-city-halo {
  /* Cities that have active live jobs pulse faster + brighter */
  animation-duration: 1.6s;
}

/* Map tooltip overlay */
.v3-map-tooltip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  background: rgba(11,18,32,0.94);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  white-space: nowrap;
  transform: translate(0, -100%);
  opacity: 0;
  transition: opacity 0.12s;
  box-shadow: 0 6px 24px rgba(0,0,0,0.55);
}
.v3-map-tooltip[data-visible="true"] { opacity: 1; }
.v3-map-tooltip strong { display: block; font-family: var(--font-display); font-size: 12px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.v3-map-tooltip .v3-tt-live { display: block; color: #7eb3ff; }
.v3-map-tooltip .v3-tt-dim  { display: block; color: var(--ink-dim); }

/* Coord readout in the bottom-left of the map */
.v3-map-coord {
  position: absolute;
  left: 16px;
  bottom: 12px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  pointer-events: none;
  min-height: 1em;
}

/* Reset/zoom pill (when zoomed in) */
.v3-map-reset {
  position: absolute;
  right: 16px;
  top: 12px;
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(11,18,32,0.85);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}
.v3-map-frame[data-zoom]:not([data-zoom="full"]) .v3-map-reset {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Reduced motion: kill all map animations */
@media (prefers-reduced-motion: reduce) {
  .v3-europe-svg .v3-city[data-tier="primary"] .v3-city-halo { animation: none; opacity: 0.7; }
  .v3-europe-svg .v3-route-live { mix-blend-mode: normal; }
}

/* Driver mini-rows in the hero panel */
.v3-mini-rows { display: flex; flex-direction: column; }
.v3-mini-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.v3-mini-row:first-child { border-top: 0; }
.v3-mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  overflow: hidden;
}
.v3-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.v3-mini-name { color: var(--ink); }
.v3-mini-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-dim);
}

/* ── Job card ──────────────────────────────────────────────────────────────── */
.v3-jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--gap);
}
.v3-job {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  padding: var(--pad);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.v3-job:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  background: var(--bg-2);
}
.v3-job[data-live="true"]::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}
.v3-job-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.v3-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--ink-dim);
}
.v3-badge--live {
  color: var(--accent);
  border-color: color-mix(in oklab, var(--accent) 40%, transparent);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}
.v3-badge--done { color: var(--good); border-color: color-mix(in oklab, var(--good) 30%, transparent); }
.v3-job-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
}
.v3-job-route {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}
.v3-job-route .arrow { color: var(--ink-mute); }
.v3-job-driver {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-dim);
}
.v3-job-driver-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
}
.v3-job-driver-dot img { width: 100%; height: 100%; object-fit: cover; }
.v3-job-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
  margin-bottom: 14px;
}
.v3-job-meta div {
  display: flex;
  flex-direction: column;
}
.v3-job-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-bottom: 2px;
}
.v3-job-meta-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
}
.v3-job-progress {
  height: 3px;
  background: var(--bg-2);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.v3-job-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.6s ease;
  position: relative;
}
.v3-job[data-live="true"] .v3-job-progress-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ── Driver card ───────────────────────────────────────────────────────────── */
.v3-driver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}
.v3-driver {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  padding: var(--pad);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.v3-driver:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  background: var(--bg-2);
}
.v3-driver-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink-mute);
}
.v3-driver-avatar img { width: 100%; height: 100%; object-fit: cover; }
.v3-driver-avatar[data-online="true"]::after {
  content: '';
  position: absolute;
  right: 0; bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--good);
  border: 2px solid var(--bg-1);
}
.v3-driver-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: -0.01em;
}
.v3-driver-handle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  margin-bottom: 16px;
}
.v3-driver-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.v3-driver-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}
.v3-driver-stat-value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
}

/* ── Event row ─────────────────────────────────────────────────────────────── */
.v3-events { display: flex; flex-direction: column; }
.v3-event {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.v3-event:first-child { border-top: 0; }
.v3-event-date {
  font-family: var(--font-display);
  text-align: center;
}
.v3-event-day { font-size: 38px; line-height: 1; letter-spacing: -0.02em; }
.v3-event-month {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}
.v3-event-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.01em;
}
.v3-event-desc {
  font-size: 14px;
  color: var(--ink-dim);
  margin-top: 4px;
}
.v3-event-rsvp {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.v3-event-rsvp strong { color: var(--ink); font-size: 16px; }

/* ── Feature grid ──────────────────────────────────────────────────────────── */
.v3-features {
  margin-top: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-1);
}
@media (max-width: 800px) { .v3-features { grid-template-columns: repeat(2, 1fr); } }
.v3-feature {
  padding: var(--pad-lg);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
.v3-feature:first-child { border-left: 0; }
.v3-feature-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.12em;
}
.v3-feature-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-top: auto;
  margin-bottom: 8px;
}
.v3-feature-desc { font-size: 13px; color: var(--ink-dim); line-height: 1.5; }

/* ── CTA band ──────────────────────────────────────────────────────────────── */
.v3-cta {
  margin: 80px 0 60px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-lg);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  background:
    radial-gradient(600px 400px at 100% 0%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 60%),
    var(--bg-1);
}
.v3-cta-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.v3-cta-actions { display: flex; gap: 12px; }
@media (max-width: 700px) {
  .v3-cta { grid-template-columns: 1fr; align-items: stretch; }
  .v3-cta-actions { justify-content: flex-start; }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.v3-footer {
  border-top: 1px solid var(--line);
  padding: 56px 24px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto;
}
@media (max-width: 800px) { .v3-footer { grid-template-columns: 1fr 1fr; } }
.v3-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin: 0 0 16px;
}
.v3-footer a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 4px 0;
}
.v3-footer a:hover { color: var(--ink); }
.v3-footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
}

/* ── Section heads (eyebrow + title pattern) ───────────────────────────────── */
.v3-section-head {
  margin: 48px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: end;
}
.v3-section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
  margin: 4px 0 0;
  font-weight: 500;
}

/* ── Tabs / chips (Jobs + Events filters) ──────────────────────────────────── */
.v3-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.v3-tab {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.v3-tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--bg-2);
  border-color: var(--line-2);
}
.v3-tab .count {
  display: inline-block;
  margin-left: 6px;
  color: var(--accent);
}

/* ── Live Map page ─────────────────────────────────────────────────────────── */
.v3-livemap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap);
  min-height: 70vh;
}
@media (max-width: 900px) { .v3-livemap { grid-template-columns: 1fr; } }
.v3-livemap-map {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  overflow: hidden;
}
.v3-livemap-side {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  overflow-y: auto;
  max-height: 70vh;
}
.v3-livemap-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-left-color 0.15s;
}
.v3-livemap-row[aria-selected="true"] {
  background: color-mix(in oklab, var(--accent) 8%, transparent);
  border-left-color: var(--accent);
}
.v3-livemap-row:first-child { border-top: 0; }
.v3-livemap-row .v3-mini-avatar { width: 28px; height: 28px; }

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 50%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in oklab, var(--good) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 0%, transparent); }
}
.v3-sync[data-state="syncing"] .v3-sync-dot {
  animation-name: pulse-ring-accent;
}
@keyframes pulse-ring-accent {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 50%, transparent); }
  70%  { box-shadow: 0 0 0 8px color-mix(in oklab, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 0%, transparent); }
}

/* ── Toast ────────────────────────────────────────────────────────────────── */
.v3-toasts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  z-index: 50;
  pointer-events: none;
}
.v3-toast {
  pointer-events: auto;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-2);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  max-width: 380px;
  animation: toast-in 0.3s ease-out;
}
@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.v3-toast-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--good);
  display: grid;
  place-items: center;
  color: #000;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

/* ── Reduced-motion guard ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .v3-sync-dot, .v3-hero-tag-dot, .v3-nav-livedot { animation: none !important; }
  .v3-job-progress-bar { transition: none !important; }
  * { animation-duration: 0.001s !important; }
}

/* ── Phase A.5 touch-up: cargo chip, damage colors, skeleton, flag, online ── */

.v3-cargo {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v3-dmg.dmg--good { color: var(--good); }
.v3-dmg.dmg--ok   { color: var(--warn); }
.v3-dmg.dmg--bad  { color: var(--bad); }

.v3-job-meta-2 {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  grid-template-columns: 1fr 1fr;
}

/* Skeleton placeholder card */
.v3-job--skeleton { opacity: 0.55; pointer-events: none; }
.v3-job--skeleton .v3-job-driver-dot,
.v3-job--skeleton .v3-job-progress { opacity: 0.4; }
.v3-sk-line,
.v3-sk-block {
  display: inline-block;
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--line-2) 50%, var(--bg-2) 100%);
  background-size: 200% 100%;
  border-radius: 4px;
  height: 12px;
  animation: sk-shimmer 1.6s ease-in-out infinite;
}
.v3-sk-block { width: 18px; height: 18px; border-radius: 50%; }
@keyframes sk-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.v3-flag {
  margin-right: 6px;
  font-size: 13px;
  vertical-align: middle;
  filter: saturate(0.85);
}

/* Mini-avatar online dot (drivers in the hero panel + live-map sidebar) */
.v3-mini-avatar { position: relative; }
.v3-mini-avatar[data-online="true"]::after {
  content: '';
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  border: 1.5px solid var(--bg-1);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 50%, transparent);
  animation: pulse-ring 1.8s ease-out infinite;
}

/* ── At-a-glance KPI strip ────────────────────────────────────────────────── */
.v3-kpi-strip {
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-1);
  overflow: hidden;
}
@media (max-width: 900px) { .v3-kpi-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .v3-kpi-strip { grid-template-columns: repeat(2, 1fr); } }
.v3-kpi {
  padding: 18px var(--pad);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v3-kpi:first-child { border-left: 0; }
.v3-kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}
.v3-kpi-value {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.v3-kpi-value sup {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-mute);
  margin-left: 4px;
  vertical-align: super;
}
.v3-kpi-pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  vertical-align: middle;
  margin-right: 6px;
  animation: pulse-ring 1.8s ease-out infinite;
}

/* ── About EFT block ──────────────────────────────────────────────────────── */
.v3-about {
  margin: 64px 0 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--pad-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-lg);
  background: var(--bg-1);
  align-items: start;
}
@media (max-width: 800px) { .v3-about { grid-template-columns: 1fr; } }
.v3-about-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0 0 16px;
}
.v3-about-copy p {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 12px;
}
.v3-about-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.v3-about-num {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}
.v3-about-num .num {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
  display: block;
}
.v3-about-num .label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-top: 4px;
  display: block;
}

/* ── Section-head row-count indicator ─────────────────────────────────────── */
.v3-section-head { align-items: flex-end; }
.v3-section-head .row-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: right;
}
.v3-section-head .row-count strong {
  color: var(--ink);
  font-weight: 500;
}

/* ── Empty states ─────────────────────────────────────────────────────────── */
.v3-empty {
  padding: 40px var(--pad);
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.v3-empty .v3-empty-glyph {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
.eftv3 ::-webkit-scrollbar { width: 10px; height: 10px; }
.eftv3 ::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 5px;
}
.eftv3 ::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }
.eftv3 ::-webkit-scrollbar-track { background: transparent; }
