/* CENAMEP base (reutilizado) */
:root{
  --bg:#0d1117; --surface:#111827; --text:#fff; --muted:#cbd5e1;
  --brand:#F8C51C; --link:#F8C51C; --radius:14px; --shadow:0 6px 16px rgba(0,0,0,.25);
}
*{ box-sizing:border-box }
html,body{ margin:0; padding:0; font-family:"Poppins",system-ui,sans-serif; background:var(--bg); color:var(--text); }

.site-header{ background:#000000; border-bottom:1px solid rgba(255,255,255,0.06); }
.site-header .wrap{ max-width:1200px; margin:0 auto; padding:12px 20px; }
.brand-block{ display:flex; align-items:center; gap:14px; }
.brand-logo img{ height:48px; width:auto; display:block; }
.brand-lines{ display:flex; flex-direction:column; line-height:1.15; }
.brand-line1{ font-weight:700; font-size:1.05rem; letter-spacing:.2px; }
.brand-line2{ color:var(--muted); font-size:.95rem; }

.container{ max-width:1200px; margin:0 auto; padding:20px; }
.hero-strong .hero-title{ margin:14px 0 6px; font-size:clamp(1.3rem, 1rem + 2.4vw, 2.2rem); font-weight:700; color:var(--text); }
.hero .updated{ color:var(--link); font-weight:500; }

.kpis{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:18px 0; }
.kpis-4{ grid-template-columns:repeat(4,1fr); }
.kpi{ background:var(--surface); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); }
.kpi h3{ margin:0 0 8px; color:var(--muted); font-weight:400; }
.kpi .value{ margin:0; font-size:clamp(1.9rem, 1.2rem + 2vw, 3.2rem); font-weight:700; color:var(--text); }
.kpi .unit{ margin:6px 0 0; color:#fff; font-weight:700; font-size:clamp(1.05rem, 0.9rem + 0.6vw, 1.2rem); }

.extremos{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.ext-card{ background:var(--surface); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); }
.ext-card h4{ margin:0 0 8px; color:var(--brand); }
.ext-card ul{ margin:0; padding-left:18px; }

.charts{ margin:22px 0; }
.tabs{ display:flex; gap:8px; flex-wrap:wrap; }
.tab{ background:var(--surface); color:var(--text); border:0; padding:8px 12px; border-radius:10px; cursor:pointer; }
.tab.active{ outline:2px solid var(--brand); }
.panes{ background:var(--surface); border-radius:var(--radius); margin-top:12px; padding:12px; min-height:340px; box-shadow:var(--shadow); }
.pane{ display:none; width:100%; }
.pane.active{ display:block; }
#chartSerie,#chartDist,#chartHour,#chartEvents{ width:100%; height:320px; }

.texto.boxed{ background:rgba(255,255,255,0.02); border:1px solid rgba(255,255,255,0.08); border-radius:var(--radius); padding:16px; text-align: justify; }
.texto a{ color:var(--link); }
.texto .nota{ color:var(--muted); font-size:.95rem; }

.linkbar{ display:flex; gap:12px; flex-wrap:wrap; margin:22px 0 10px; }
.linkbar .btn{ display:inline-block; text-decoration:none; padding:10px 14px; border-radius:12px; background:#fff; color:#111; border:2px solid var(--brand); font-weight:600; transition: all .2s ease; box-shadow:0 2px 4px rgba(0,0,0,.08); }
.linkbar .btn:hover{ background:var(--brand); color:#111; box-shadow:0 4px 10px rgba(0,0,0,.15); }

.site-footer{ background:#000000; border-top:1px solid rgba(255,255,255,0.06); }
.site-footer .wrap{ max-width:1200px; margin:0 auto; padding:12px 20px; display:flex; align-items:center; justify-content:center; }
.site-footer small{ color:var(--muted); }

/* --- Semáforo (A) y Chip (C) --- */
.jam-traffic{ display:flex; align-items:center; gap:8px; margin-top:8px; font-weight:600; color:var(--text); }
.jam-traffic .led{ width:12px; height:12px; border-radius:50%; display:inline-block; box-shadow:0 0 0 2px rgba(255,255,255,.08) inset, 0 0 8px rgba(0,0,0,.25); }
.led-green{ background:#10B981; }
.led-yellow{ background:#F59E0B; }
.led-orange{ background:#FB923C; }
.led-red{ background:#EF4444; }

.jam-chip{ display:inline-flex; align-items:center; gap:8px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.12); color:#fff; padding:6px 10px; border-radius:999px; margin:6px 0 8px; font-size:.95rem; font-weight:600; }
.jam-chip::before{ content:""; width:10px; height:10px; border-radius:50%; display:inline-block; box-shadow:0 0 0 2px rgba(255,255,255,.08) inset; }
.jam-chip.green::before{ background:#10B981; }
.jam-chip.yellow::before{ background:#F59E0B; }
.jam-chip.orange::before{ background:#FB923C; }
.jam-chip.red::before{ background:#EF4444; }

@media (max-width:900px){
  .kpis{ grid-template-columns:1fr; }
  .kpis-4{ grid-template-columns:1fr; }
  .extremos{ grid-template-columns:1fr; }
  #chartSerie,#chartDist,#chartHour,#chartEvents{ height:300px; }
}
