/* OVERLANE — sistema visual
   Asfalto de noche, línea amarilla de carril, verde de señal de autopista.
   Barlow (inspirada en la señalización vial de California) + JetBrains Mono para datos. */
@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Barlow:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --asphalt: #0d0e10;
  --asphalt-2: #141619;
  --asphalt-3: #1b1e22;
  --asphalt-4: #23272c;
  --rule: #2b3036;
  --rule-soft: #1f2328;
  --text: #ecebe6;
  --text-2: #b9bbbe;
  --muted: #80868d;
  --lane: #f2b200;          /* línea amarilla */
  --lane-hover: #ffc627;
  --lane-ink: #1b1400;
  --lane-dim: rgba(242, 178, 0, .12);
  --sign: #128452;          /* verde de señal */
  --sign-text: #4cc38a;
  --sign-dim: rgba(18, 132, 82, .16);
  --alert: #e5534b;
  --alert-dim: rgba(229, 83, 75, .14);
  --info: #6aa9e9;

  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Barlow", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 4px;
  --r: 6px;
  --r-lg: 10px;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--asphalt);
  color: var(--text);
  font: 400 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--lane); color: var(--lane-ink); }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--f-mono); font-feature-settings: "zero" 1; }
.num { font-variant-numeric: tabular-nums; }

/* ── Tipografía ───────────────────────────── */
.display {
  font: 700 clamp(44px, 7.2vw, 96px)/.92 var(--f-display);
  letter-spacing: -.01em;
  text-transform: uppercase;
  margin: 0;
}
.h2 {
  font: 700 clamp(32px, 4.4vw, 54px)/.98 var(--f-display);
  text-transform: uppercase;
  margin: 0;
}
.h3 { font: 600 22px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; margin: 0; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); max-width: 58ch; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

/* Marcador de milla: número de sección como poste verde de autopista */
.mile {
  display: inline-grid; place-items: center;
  min-width: 30px; height: 38px; padding: 0 6px;
  background: var(--sign); color: #fff;
  border: 1.5px solid rgba(255,255,255,.85); border-radius: 3px;
  font: 700 15px/1 var(--f-display); letter-spacing: .02em;
}
.mile small { display: block; font-size: 8px; letter-spacing: .12em; opacity: .85; margin-bottom: -6px; }

/* Línea discontinua de carril */
.lane-rule {
  height: 3px; border: 0; margin: 0;
  background: repeating-linear-gradient(90deg, var(--lane) 0 28px, transparent 28px 52px);
  opacity: .9;
}
.lane-rule.white { background: repeating-linear-gradient(90deg, rgba(255,255,255,.5) 0 22px, transparent 22px 44px); }

/* ── Botones ──────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: var(--r);
  border: 1px solid transparent;
  font: 600 15px/1 var(--f-body); letter-spacing: .01em;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--lane); color: var(--lane-ink); }
.btn-primary:hover { background: var(--lane-hover); }
.btn-ghost { border-color: var(--rule); color: var(--text); background: rgba(13,14,16,.35); }
.btn-ghost:hover { border-color: var(--text-2); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn small { font: 500 11px/1 var(--f-mono); opacity: .7; letter-spacing: .04em; }

/* ── Etiquetas de estado ──────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px; border-radius: 3px;
  font: 600 11px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  background: var(--asphalt-4); color: var(--text-2);
}
.tag.ok { background: var(--sign-dim); color: var(--sign-text); }
.tag.warn { background: var(--lane-dim); color: var(--lane); }
.tag.bad { background: var(--alert-dim); color: var(--alert); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot.live { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ── Paneles ─────────────────────────────── */
.panel { background: var(--asphalt-2); border: 1px solid var(--rule-soft); border-radius: var(--r-lg); }

/* ── Tabla tipo tablero de salidas ───────── */
.board { width: 100%; border-collapse: collapse; font-family: var(--f-mono); font-size: 13.5px; }
.board th {
  text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--rule);
}
.board td { padding: 13px 14px; border-bottom: 1px solid var(--rule-soft); white-space: nowrap; }
.board tr:last-child td { border-bottom: 0; }
.board .route { color: var(--text); font-weight: 500; }
.board .route i { font-style: normal; color: var(--lane); padding: 0 8px; }
.board .r { text-align: right; }
.board tr.flash td { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: var(--lane-dim); } to { background: transparent; } }

/* ── Mapa ─────────────────────────────────── */
.map svg { width: 100%; height: 100%; display: block; }
.map .state { fill: #15181b; stroke: #2a2f35; stroke-width: .7; }
.map .state.ats { fill: #1c2024; stroke: #3a4048; }
.map .route-line { fill: none; stroke: var(--lane); stroke-width: 1.4; stroke-dasharray: 5 5; opacity: .55; }
.map .city { fill: #5d646c; }
.map .city.hub { fill: var(--text-2); }
.map .city-label { fill: var(--muted); font: 500 10px var(--f-mono); letter-spacing: .04em; }
.map .truck { fill: var(--lane); stroke: var(--asphalt); stroke-width: 2; }
.map .truck.mine { fill: var(--sign-text); }
.map .truck-halo { fill: var(--lane); opacity: .18; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Marca: icono + OVER (blanco) LANE (amarillo) ── */
.logo { display: inline-flex; align-items: center; gap: 11px; font: 700 26px/1 var(--f-display); letter-spacing: .08em; color: var(--text); text-decoration: none; }
.logo img { width: 36px; height: 36px; border-radius: 7px; box-shadow: 0 0 0 1px var(--rule); }
.logo span { color: var(--lane); }
.logo.sm { font-size: 19px; gap: 8px; }
.logo.sm img { width: 26px; height: 26px; border-radius: 5px; }
.logo.lg { font-size: 54px; gap: 18px; }
.logo.lg img { width: 72px; height: 72px; border-radius: 14px; }
.logo b { font-weight: inherit; }

/* ── Elementos de la web en vivo ── */
.launcher-shot { margin: 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--rule); box-shadow: 0 40px 120px -40px rgba(0,0,0,.8); background: var(--asphalt-2); }
.launcher-shot img { width: 100%; height: auto; display: block; }
.launcher-shot figcaption { padding: 10px 14px; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--rule-soft); }
.panel.recent { margin-top: 16px; }
.recent-row { display: grid; grid-template-columns: 100px 1fr auto; gap: 14px; align-items: center; padding: 11px 18px; border-top: 1px solid var(--rule-soft); font-size: 14.5px; }
.sys.soon { background: var(--asphalt-2); }
.sys.soon .h3 { color: var(--lane); }
.map-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; max-width: 420px; text-align: center; padding: 16px 20px; background: rgba(20,22,25,.92); border: 1px solid var(--rule); border-radius: var(--r-lg); color: var(--text-2); font-size: 15px; }
.muted { color: var(--muted); }
.sys .viz > .label { display: block; margin-top: 6px; }
@media (max-width: 640px) { .recent-row { grid-template-columns: 1fr; gap: 4px; } }
