:root {
  --acento: #38bdf8;
  --fondo: #02050b;
  --panel: rgba(6, 14, 28, .62);
  --borde: rgba(120, 200, 255, .14);
  --critico: #ff1f4b;
  --alerta: #ff8a1f;
  --aceptable: #ffd84a;
  --optimo: #2ee6c0;
}

html, body { height: 100%; background: var(--fondo); }
body { -webkit-font-smoothing: antialiased; }

.maplibregl-ctrl-attrib { background: rgba(0,0,0,.35) !important; color: #64748b !important; font-size: 9px; }
.maplibregl-ctrl-attrib a { color: #64748b !important; }
.maplibregl-ctrl-bottom-right { bottom: 36px; }

/* ---------- Tipografía / utilidades ---------- */
.lbl { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #7b8ba3; }
.num { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; font-variant-numeric: tabular-nums; }
.num-grande {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; font-size: 56px; line-height: 1;
  font-variant-numeric: tabular-nums; color: #fff;
  text-shadow: 0 0 24px color-mix(in srgb, var(--acento) 70%, transparent), 0 0 2px #fff;
}
.num-grande small { font-size: 26px; color: var(--acento); margin-left: 2px; }

/* ---------- Paneles de vidrio con esquinas HUD ---------- */
.panel {
  position: relative;
  background: linear-gradient(160deg, rgba(10, 24, 46, .72), var(--panel));
  border: 1px solid var(--borde);
  border-radius: 14px;
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 20px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none;
  border: 2px solid var(--acento); opacity: .75; transition: border-color .6s;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }

.lateral { position: fixed; z-index: 20; top: 104px; bottom: 150px; width: 340px; }

.chip, .chip-vivo {
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .15em;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--borde); color: #94a3b8; white-space: nowrap;
}
.chip-vivo { color: #fecdd3; border-color: rgba(255, 60, 90, .45); background: rgba(255, 40, 80, .1); display: inline-flex; align-items: center; gap: 7px; }
.chip-vivo i { width: 7px; height: 7px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 10px #ff3b5c; animation: latido 1.2s infinite; }
.chip-sm { font-size: 9px; padding: 2px 7px; }
@keyframes latido { 50% { opacity: .25; transform: scale(.7); } }

.logo-orbe { width: 38px; height: 38px; border-radius: 50%; position: relative; flex: none;
  background: radial-gradient(circle at 35% 35%, #fff 0 8%, var(--acento) 30%, transparent 70%);
  box-shadow: 0 0 22px var(--acento); transition: box-shadow .6s; }
.logo-orbe span { position: absolute; inset: -5px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--acento) 70%, transparent); animation: gira 8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

.punto-acento { width: 8px; height: 8px; border-radius: 2px; background: var(--acento); box-shadow: 0 0 10px var(--acento); }

/* ---------- Meta ---------- */
.barra-meta { position: relative; height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: visible; }
.barra-meta div { height: 100%; border-radius: 99px; width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1);
  background: linear-gradient(90deg, color-mix(in srgb, var(--acento) 30%, transparent), var(--acento)); box-shadow: 0 0 14px var(--acento); }
.barra-meta i { position: absolute; top: -4px; width: 2px; height: 16px; background: #fff; box-shadow: 0 0 8px #fff; transition: left 1s; }

/* ---------- Distribución ---------- */
.dist { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; }
.dist div { transition: flex-grow .8s cubic-bezier(.2,.8,.2,1); min-width: 2px; }

/* ---------- Ranking ---------- */
.ranking li {
  display: grid; grid-template-columns: 22px 1fr 58px; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 8px; font-size: 12px; position: relative;
  transition: background .6s;
}
.ranking li:hover { background: rgba(255,255,255,.04); cursor: pointer; }
.ranking li .pos { font-family: "JetBrains Mono", monospace; font-size: 10px; color: #64748b; }
.ranking li .barra { position: absolute; left: 38px; right: 74px; bottom: 2px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.05); }
.ranking li .barra b { display: block; height: 100%; border-radius: 2px; transition: width .8s; }
.ranking li .val { font-family: "JetBrains Mono", monospace; text-align: right; font-weight: 600; }
.ranking li.destello { background: color-mix(in srgb, var(--acento) 22%, transparent); }
.ranking::-webkit-scrollbar { width: 4px; }
.ranking::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.leyenda-grad { height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, var(--critico), var(--alerta) 35%, var(--aceptable) 60%, var(--optimo) 85%, #22d3ee); }

/* ---------- KPIs / feed ---------- */
.kpi { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); border-radius: 10px; padding: 8px 10px; }
.kpi-alerta { border-color: rgba(255, 60, 90, .25); }

.feed li {
  display: grid; grid-template-columns: 3px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px; margin-bottom: 4px;
  background: rgba(255,255,255,.025); animation: entra .55s cubic-bezier(.2,.9,.2,1);
}
.feed li .tira { align-self: stretch; border-radius: 3px; background: var(--c); box-shadow: 0 0 10px var(--c); }
.feed li .reg { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.feed li .meta { font-family: "JetBrains Mono", monospace; font-size: 10px; color: #7b8ba3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .lbl { letter-spacing: .08em; white-space: nowrap; }
.feed li .cambio { font-family: "JetBrains Mono", monospace; font-size: 11px; text-align: right; line-height: 1.35; }
.feed li.alerta { background: rgba(255, 31, 75, .12); box-shadow: inset 0 0 0 1px rgba(255, 31, 75, .35); }
.feed li.meta-ok { background: rgba(46, 230, 192, .1); box-shadow: inset 0 0 0 1px rgba(46, 230, 192, .35); }
.feed li:nth-child(n+8) { opacity: .6; }
.feed li:nth-child(n+11) { opacity: .3; }
@keyframes entra { from { opacity: 0; transform: translateX(40px) scale(.96); filter: blur(4px); background: color-mix(in srgb, var(--c) 35%, transparent); } }

.sube { color: #4ade80; } .baja { color: #fb7185; }

/* ---------- Botones ---------- */
.btn {
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .02em; white-space: nowrap;
  padding: 6px 8px; border-radius: 8px; border: 1px solid var(--borde); color: #cbd5e1;
  background: rgba(255,255,255,.03); transition: all .2s;
}
.btn:hover { border-color: var(--acento); color: #fff; box-shadow: 0 0 14px color-mix(in srgb, var(--acento) 35%, transparent); }
.btn-rojo { border-color: rgba(255,60,90,.4); color: #fecdd3; }
.btn-rojo:hover { border-color: #ff3b5c; box-shadow: 0 0 16px rgba(255,59,92,.5); }
.btn-toggle.activo { border-color: var(--acento); color: #fff; background: color-mix(in srgb, var(--acento) 16%, transparent); }
.btn-flotante { position: fixed; z-index: 30; top: 110px; left: 50%; transform: translateX(-50%); background: rgba(6,14,28,.8); backdrop-filter: blur(8px); }

/* ---------- Dock de indicadores ---------- */
.dock { display: flex; gap: 8px; padding: 8px; border-radius: 18px; background: rgba(6,14,28,.7);
  border: 1px solid var(--borde); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0,0,0,.5); max-width: 100%; overflow-x: auto; }
.ind {
  --c: #38bdf8; position: relative; min-width: 150px; text-align: left; padding: 9px 12px 8px; border-radius: 12px;
  border: 1px solid transparent; transition: all .35s cubic-bezier(.2,.8,.2,1); overflow: hidden;
}
.ind:hover { background: rgba(255,255,255,.04); }
.ind .cab { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #94a3b8; }
.ind svg.ico { width: 16px; height: 16px; stroke: var(--c); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ind .v { font-family: "JetBrains Mono", monospace; font-size: 20px; font-weight: 700; color: #e2e8f0; margin-top: 2px; }
.ind .v small { font-size: 11px; color: #64748b; margin-left: 2px; }
.ind .mini { position: absolute; right: 8px; bottom: 8px; width: 54px; height: 22px; opacity: .8; }
.ind.activo { background: color-mix(in srgb, var(--c) 14%, transparent); border-color: color-mix(in srgb, var(--c) 55%, transparent);
  box-shadow: 0 0 30px color-mix(in srgb, var(--c) 25%, transparent), inset 0 0 20px color-mix(in srgb, var(--c) 12%, transparent); }
.ind.activo .cab { color: #fff; }
.ind.activo::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.ind .tecla { font-family: "JetBrains Mono", monospace; font-size: 9px; color: #475569; margin-left: auto; }
.ind.ping { animation: ping-ind .7s; }
@keyframes ping-ind { 30% { box-shadow: 0 0 0 1px var(--c), 0 0 26px var(--c); } }

/* ---------- Ticker ---------- */
.ticker { display: flex; align-items: center; background: linear-gradient(0deg, rgba(2,6,14,.95), rgba(2,6,14,.7)); border-top: 1px solid var(--borde); }
.ticker-etq { flex: none; height: 100%; display: flex; align-items: center; padding: 0 16px; font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .18em;
  color: #02050b; background: var(--acento); font-weight: 700; transition: background .6s; }
.ticker-pista { flex: 1; overflow: hidden; height: 100%; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-cinta { display: inline-flex; height: 100%; align-items: center; white-space: nowrap; animation: cinta 90s linear infinite; }
.ticker-cinta span { font-family: "JetBrains Mono", monospace; font-size: 11.5px; padding: 0 18px; color: #94a3b8; }
.ticker-cinta span b { color: #e2e8f0; font-weight: 600; margin-right: 6px; }
@keyframes cinta { to { transform: translateX(-50%); } }

/* ---------- Tooltip ---------- */
.tooltip {
  position: fixed; z-index: 45; pointer-events: none; width: 250px; padding: 12px 14px; border-radius: 12px;
  background: rgba(4, 10, 22, .92); border: 1px solid var(--borde); backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.02);
}
.tooltip h4 { font-weight: 700; font-size: 15px; letter-spacing: .03em; }
.tooltip .fila { display: grid; grid-template-columns: 78px 1fr 44px; gap: 8px; align-items: center; font-size: 11px; margin-top: 6px; }
.tooltip .fila .b { height: 4px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.tooltip .fila .b i { display: block; height: 100%; border-radius: 4px; }
.tooltip .fila .n { font-family: "JetBrains Mono", monospace; text-align: right; }
.tooltip .fila.activa { color: #fff; font-weight: 600; }

/* ---------- Pulsos sobre el mapa (marcadores HTML) ---------- */
.pulso { --c: #38bdf8; width: 0; height: 0; position: relative; pointer-events: none; }
.pulso i { position: absolute; left: 0; top: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid var(--c); box-shadow: 0 0 18px var(--c), inset 0 0 12px var(--c); opacity: 0; animation: onda 2.2s cubic-bezier(.1,.7,.3,1) forwards; }
.pulso i:nth-child(2) { animation-delay: .25s; }
.pulso i:nth-child(3) { animation-delay: .5s; }
.pulso b { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 12px #fff, 0 0 30px var(--c), 0 0 60px var(--c); animation: nucleo 2.2s ease-out forwards; }
.pulso.menor i { border-width: 1.5px; }
.pulso.menor { transform: scale(.6); }
.pulso.alerta { --c: #ff1f4b; transform: scale(1.8); }
.pulso.alerta i { animation-duration: 1.6s; animation-iteration-count: 3; }
.pulso.meta-ok { --c: #2ee6c0; transform: scale(1.5); }
@keyframes onda { 0% { opacity: 1; transform: scale(.3); } 100% { opacity: 0; transform: scale(7); } }
@keyframes nucleo { 0% { transform: scale(2.2); opacity: 1; } 70% { opacity: 1; } 100% { transform: scale(.6); opacity: 0; } }

.delta-flota {
  pointer-events: none; font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 13px; white-space: nowrap;
  padding: 2px 7px; border-radius: 6px; background: rgba(2,6,14,.75); border: 1px solid currentColor;
  text-shadow: 0 0 10px currentColor; animation: flota 2.4s cubic-bezier(.2,.8,.2,1) forwards;
}
.delta-flota em { font-style: normal; color: #cbd5e1; font-weight: 500; margin-right: 5px; font-size: 10px; letter-spacing: .08em; }
@keyframes flota { 0% { opacity: 0; transform: translateY(0) scale(.7); } 15% { opacity: 1; transform: translateY(-26px) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-64px); } }

.nodo { width: 0; height: 0; position: relative; pointer-events: none; }
.nodo span { position: absolute; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.nodo .c { width: 12px; height: 12px; background: #fff; box-shadow: 0 0 14px #fff, 0 0 40px var(--acento), 0 0 80px var(--acento); }
.nodo .r1 { width: 44px; height: 44px; border: 1px dashed color-mix(in srgb, var(--acento) 80%, transparent); animation: gira-c 10s linear infinite; }
.nodo .r2 { width: 74px; height: 74px; border: 1px solid color-mix(in srgb, var(--acento) 35%, transparent); border-left-color: transparent; border-right-color: transparent; animation: gira-c 6s linear infinite reverse; }
.nodo .r3 { width: 20px; height: 20px; border: 2px solid var(--acento); animation: radar 2.4s ease-out infinite; }
.nodo .etq { top: 46px; transform: translateX(-50%); border-radius: 0; text-align: center; font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 600; letter-spacing: .2em; color: #e2e8f0; white-space: nowrap;
  text-shadow: 0 0 8px var(--acento); }
.nodo .etq small { display: block; margin-top: 2px; font-size: 8.5px; font-weight: 400; letter-spacing: .08em; color: #7b8ba3; text-shadow: none; }
.nodo.recibe .c { animation: recibe .5s; }
@keyframes gira-c { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes radar { 0% { opacity: .9; width: 14px; height: 14px; } 100% { opacity: 0; width: 120px; height: 120px; } }
@keyframes recibe { 40% { box-shadow: 0 0 30px #fff, 0 0 80px var(--acento), 0 0 140px var(--acento); transform: translate(-50%, -50%) scale(1.8); } }

/* ---------- Toasts ---------- */
.toast {
  pointer-events: none; min-width: 360px; max-width: 92vw; padding: 12px 18px 12px 14px; border-radius: 12px;
  display: flex; gap: 12px; align-items: center; background: rgba(40, 4, 14, .88); border: 1px solid rgba(255, 31, 75, .6);
  box-shadow: 0 0 40px rgba(255, 31, 75, .35), inset 0 0 30px rgba(255, 31, 75, .15); backdrop-filter: blur(10px);
  animation: toast-in .5s cubic-bezier(.2,.9,.2,1.2), toast-out .5s ease-in 5.2s forwards;
}
.toast .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; background: rgba(255, 31, 75, .25); animation: latido .9s infinite; }
.toast .t1 { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .25em; color: #fda4af; }
.toast .t2 { font-weight: 600; font-size: 14px; }
.toast.ok { background: rgba(2, 36, 30, .88); border-color: rgba(46, 230, 192, .6); box-shadow: 0 0 40px rgba(46, 230, 192, .3), inset 0 0 30px rgba(46, 230, 192, .12); }
.toast.ok .ico { background: rgba(46, 230, 192, .25); animation: none; }
.toast.ok .t1 { color: #99f6e4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-20px) scale(.9); filter: blur(6px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px); filter: blur(4px); } }

/* ---------- Atmósfera ---------- */
.atm-grid, .atm-viñeta, .atm-scan, .atm-ruido, .barrido, .alarma-borde { position: fixed; inset: 0; pointer-events: none; }
.atm-grid { z-index: 1; opacity: .35;
  background-image: linear-gradient(rgba(80,160,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(80,160,255,.05) 1px, transparent 1px);
  background-size: 60px 60px; mask-image: radial-gradient(ellipse at center, transparent 30%, #000 85%); }
.atm-viñeta { z-index: 2; background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0,0,0,.75) 100%); }
.atm-scan { z-index: 3; opacity: .22; background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px); }
.atm-scan::after { content: ""; position: absolute; inset-inline: 0; height: 160px; top: -160px;
  background: linear-gradient(180deg, transparent, rgba(120, 200, 255, .07), transparent); animation: scan 7s linear infinite; }
@keyframes scan { to { top: 100%; } }
.atm-ruido { z-index: 4; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.barrido { z-index: 5; opacity: 0; background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--acento) 30%, transparent) 48%, #fff 50%, color-mix(in srgb, var(--acento) 30%, transparent) 52%, transparent 100%);
  background-size: 50% 100%; background-repeat: no-repeat; mix-blend-mode: screen; }
.barrido.activo { animation: barre 1.1s cubic-bezier(.6,0,.3,1); }
@keyframes barre { 0% { opacity: .9; background-position: -100% 0; } 100% { opacity: .9; background-position: 200% 0; } }

.alarma-borde { z-index: 6; opacity: 0; box-shadow: inset 0 0 120px 20px rgba(255, 20, 60, .55), inset 0 0 0 2px rgba(255, 40, 80, .7); }
.alarma-borde.activo { animation: alarma 2.6s ease-out; }
@keyframes alarma { 0%, 30%, 60% { opacity: 1; } 15%, 45% { opacity: .25; } 100% { opacity: 0; } }

/* ---------- Intro ---------- */
.intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: radial-gradient(ellipse at center, #061226, #010308 70%);
  transition: opacity 1.2s ease, filter 1.2s ease, transform 1.4s ease; }
.intro.fuera { opacity: 0; filter: blur(12px); transform: scale(1.08); pointer-events: none; }
.intro-caja { text-align: center; padding: 0 20px; }
.intro-anillo { position: relative; width: 110px; height: 110px; margin: 0 auto 28px; }
.intro-anillo span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(56,189,248,.5); border-top-color: #38bdf8; animation: gira 1.6s linear infinite; }
.intro-anillo span:nth-child(2) { inset: 14px; animation-duration: 2.4s; animation-direction: reverse; border-color: rgba(167,139,250,.4); border-top-color: #a78bfa; }
.intro-anillo span:nth-child(3) { inset: 30px; animation-duration: 1.1s; border-color: rgba(52,211,153,.4); border-top-color: #34d399; box-shadow: 0 0 40px rgba(56,189,248,.35); }
.intro-titulo { position: relative; margin-top: 14px; font-size: clamp(22px, 3.4vw, 44px); font-weight: 700; letter-spacing: .12em; color: #fff;
  text-shadow: 0 0 30px rgba(56,189,248,.6); }
.intro-titulo::before, .intro-titulo::after { content: attr(data-texto); position: absolute; inset: 0; opacity: .7; }
.intro-titulo::before { color: #ff2d75; animation: glitch 2.2s infinite steps(1); clip-path: inset(0 0 60% 0); }
.intro-titulo::after { color: #22d3ee; animation: glitch 1.7s infinite reverse steps(1); clip-path: inset(55% 0 0 0); }
@keyframes glitch { 0%, 88%, 100% { transform: none; } 90% { transform: translate(-4px, 1px); } 94% { transform: translate(3px, -1px); } 97% { transform: translate(-2px, 0); } }
.intro-barra { width: min(420px, 80vw); height: 2px; margin: 18px auto 0; background: rgba(255,255,255,.08); }
.intro-barra div { height: 100%; width: 0; background: linear-gradient(90deg, #38bdf8, #a78bfa, #34d399); box-shadow: 0 0 12px #38bdf8; transition: width .25s; }

@media (max-width: 1023px) { .lateral { display: none !important; } .ind { min-width: 118px; } .ind .mini { display: none; } }
@media (prefers-reduced-motion: reduce) { .atm-scan::after, .ticker-cinta { animation: none; } }

/* ---------- Botón de tema ---------- */
.btn-tema { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; font-size: 15px; }
.btn-tema .luna { display: none; }
[data-tema="claro"] .btn-tema .sol { display: none; }
[data-tema="claro"] .btn-tema .luna { display: inline; }

/* =====================================================================
   TEMA CLARO — misma escena, sobre papel; los brillos neón se atenúan
   ===================================================================== */
[data-tema="claro"] { --fondo: #e8eef6; --panel: rgba(255, 255, 255, .72); --borde: rgba(30, 70, 120, .16); }
[data-tema="claro"] body { color: #1e293b; }
[data-tema="claro"] .text-slate-100 { color: #0f172a; }
[data-tema="claro"] .text-slate-400 { color: #475569; }
[data-tema="claro"] .text-slate-500 { color: #64748b; }
[data-tema="claro"] .text-cyan-300 { color: #0284c7; }
[data-tema="claro"] .text-cyan-300\/70 { color: #0369a1; }
[data-tema="claro"] .text-emerald-300 { color: #059669; }
[data-tema="claro"] .text-rose-300 { color: #e11d48; }
[data-tema="claro"] .border-white\/5 { border-color: rgba(15, 40, 80, .08); }
[data-tema="claro"] .lbl { color: #5b6b82; }
[data-tema="claro"] .sube { color: #059669; }
[data-tema="claro"] .baja { color: #e11d48; }

[data-tema="claro"] .num-grande { color: #0b1220; text-shadow: 0 0 22px color-mix(in srgb, var(--acento) 35%, transparent); }
[data-tema="claro"] .panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, .9), rgba(243, 247, 252, .76));
  box-shadow: 0 18px 50px rgba(30, 60, 100, .16), inset 0 1px 0 #fff;
}
[data-tema="claro"] .chip { color: #475569; }
[data-tema="claro"] .chip-vivo { color: #be123c; background: rgba(255, 40, 80, .07); }
[data-tema="claro"] .kpi { background: rgba(15, 40, 80, .035); border-color: rgba(15, 40, 80, .08); }
[data-tema="claro"] .feed li { background: rgba(15, 40, 80, .035); }
[data-tema="claro"] .feed li .meta { color: #64748b; }
[data-tema="claro"] .feed li.alerta { background: rgba(255, 31, 75, .08); }
[data-tema="claro"] .feed li.meta-ok { background: rgba(16, 185, 150, .09); }
[data-tema="claro"] .ranking li:hover { background: rgba(15, 40, 80, .05); }
[data-tema="claro"] .ranking li .barra { background: rgba(15, 40, 80, .07); }
[data-tema="claro"] .ranking li .pos { color: #94a3b8; }
[data-tema="claro"] .ranking::-webkit-scrollbar-thumb { background: rgba(15, 40, 80, .15); }
[data-tema="claro"] .barra-meta { background: rgba(15, 40, 80, .08); }
[data-tema="claro"] .barra-meta i { background: #0f172a; box-shadow: none; }

[data-tema="claro"] .btn { color: #334155; background: rgba(255, 255, 255, .65); }
[data-tema="claro"] .btn:hover, [data-tema="claro"] .btn-toggle.activo { color: #0f172a; }
[data-tema="claro"] .btn-rojo { color: #be123c; }
[data-tema="claro"] .btn-flotante { background: rgba(255, 255, 255, .9); }

[data-tema="claro"] .dock { background: rgba(255, 255, 255, .82); box-shadow: 0 18px 44px rgba(30, 60, 100, .18); }
[data-tema="claro"] .ind:hover { background: rgba(15, 40, 80, .04); }
[data-tema="claro"] .ind .cab { color: #475569; }
[data-tema="claro"] .ind .v { color: #0f172a; }
[data-tema="claro"] .ind.activo .cab { color: #0f172a; }
[data-tema="claro"] .ind .tecla { color: #94a3b8; }

[data-tema="claro"] .ticker { background: linear-gradient(0deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .82)); }
[data-tema="claro"] .ticker-cinta span { color: #475569; }
[data-tema="claro"] .ticker-cinta span b { color: #0f172a; }

[data-tema="claro"] .tooltip { background: rgba(255, 255, 255, .96); box-shadow: 0 16px 40px rgba(30, 60, 100, .22); }
[data-tema="claro"] .tooltip .fila .b { background: rgba(15, 40, 80, .08); }
[data-tema="claro"] .tooltip .fila.activa { color: #0f172a; }

[data-tema="claro"] .delta-flota { background: rgba(255, 255, 255, .92); text-shadow: none; box-shadow: 0 6px 16px rgba(30, 60, 100, .18); }
[data-tema="claro"] .delta-flota em { color: #475569; }
[data-tema="claro"] .delta-flota[style*="#4ade80"] { color: #059669 !important; }
[data-tema="claro"] .delta-flota[style*="#fb7185"] { color: #e11d48 !important; }
[data-tema="claro"] .nodo .etq { color: #0f172a; text-shadow: 0 0 10px #fff, 0 0 2px #fff; }
[data-tema="claro"] .nodo .etq small { color: #475569; }
[data-tema="claro"] .nodo .c { background: var(--acento); box-shadow: 0 0 0 3px #fff, 0 0 24px var(--acento), 0 0 60px var(--acento); }
[data-tema="claro"] .pulso b { background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 24px var(--c); }

[data-tema="claro"] .toast { background: rgba(255, 244, 246, .96); box-shadow: 0 14px 40px rgba(225, 29, 72, .22); }
[data-tema="claro"] .toast .t1 { color: #be123c; }
[data-tema="claro"] .toast .t2 { color: #0f172a; }
[data-tema="claro"] .toast.ok { background: rgba(240, 253, 249, .96); box-shadow: 0 14px 40px rgba(13, 148, 136, .2); }
[data-tema="claro"] .toast.ok .t1 { color: #0f766e; }

[data-tema="claro"] .atm-grid { opacity: .6; background-image: linear-gradient(rgba(30, 80, 140, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(30, 80, 140, .06) 1px, transparent 1px); }
[data-tema="claro"] .atm-viñeta { background: radial-gradient(ellipse at 50% 45%, transparent 50%, rgba(190, 205, 226, .7) 100%); }
[data-tema="claro"] .atm-scan { opacity: .06; }
[data-tema="claro"] .atm-ruido { opacity: .035; }
[data-tema="claro"] .barrido { mix-blend-mode: multiply; }
[data-tema="claro"] .maplibregl-ctrl-attrib { background: rgba(255, 255, 255, .6) !important; }

/* Transición suave al cambiar de tema */
.panel, .dock, .ticker, .kpi, .feed li, .btn, .tooltip, .ind { transition: background-color .5s, color .5s, border-color .5s, box-shadow .5s; }

/* ---------- Balizas de alerta activa ---------- */
.baliza { position: relative; width: 0; height: 0; pointer-events: none; }
.baliza i { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  border: 2px solid #ff1f4b; box-shadow: 0 0 14px #ff1f4b; animation: baliza 1.6s ease-out infinite; }
.baliza i:nth-child(2) { animation-delay: .8s; }
.baliza b { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: #ff1f4b; box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 0 12px #ff1f4b, 0 0 28px #ff1f4b; animation: latido 1s infinite; }
.baliza.atendida { animation: baliza-fuera .9s forwards; }
.baliza.atendida i { border-color: #2ee6c0; box-shadow: 0 0 14px #2ee6c0; }
.baliza.atendida b { background: #2ee6c0; box-shadow: 0 0 14px #2ee6c0, 0 0 30px #2ee6c0; }
@keyframes baliza { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(3.4); opacity: 0; } }
@keyframes baliza-fuera { 0% { transform: scale(1); } 40% { transform: scale(1.8); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }

.ranking li.con-alerta { background: rgba(255, 31, 75, .1); box-shadow: inset 2px 0 0 #ff1f4b; }
.ranking li.con-alerta .nom::after { content: " ⚠"; color: #ff1f4b; animation: latido 1s infinite; display: inline-block; }
.feed li.recupera { background: rgba(46, 230, 192, .07); }
[data-tema="claro"] .feed li.recupera { background: rgba(16, 185, 150, .07); }
.tip-alerta { margin-top: 6px; padding: 3px 8px; border-radius: 6px; font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .08em;
  color: #ff5a7a; background: rgba(255, 31, 75, .12); border: 1px solid rgba(255, 31, 75, .35); }

/* ---------- Selector de frecuencia ---------- */
.segmento { display: grid; grid-template-columns: repeat(3, 1fr); padding: 2px; gap: 2px; border-radius: 8px; border: 1px solid var(--borde); }
.segmento button { font-family: "JetBrains Mono", monospace; font-size: 10.5px; padding: 4px 0; border-radius: 6px; color: #94a3b8; transition: all .2s; }
.segmento button:hover { color: #fff; }
.segmento button.activo { color: #fff; background: rgba(255, 31, 75, .22); box-shadow: inset 0 0 0 1px rgba(255, 31, 75, .55), 0 0 12px rgba(255, 31, 75, .25); }
[data-tema="claro"] .segmento button { color: #475569; }
[data-tema="claro"] .segmento button:hover, [data-tema="claro"] .segmento button.activo { color: #9f1239; }
