@font-face { font-family: "Schibsted Grotesk"; src: url("schibsted.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  color-scheme: light;
  --papel: #f4f8f7;
  --superficie: #fcfdfc;
  --superficie-2: #eef4f2;
  --linea: #dbe5e2;
  --linea-fuerte: #c5d3cf;
  --tinta: #0a191a;
  --tinta-2: #3d4d4b;
  --tinta-3: #66746f;
  --verde: #5acb94;
  --laurel: #077649;
  --bosque: #03432a;
  --acento: #077649;
  --acento-txt: #ffffff;
  /* Series (validadas: verde, naranja, azul) */
  --s1: #0b7a4f;
  --s2: #eb6834;
  --s3: #2a78d6;
  /* Escala secuencial de un solo tono */
  --sec-0: #e3f1ea; --sec-1: #bfe2cf; --sec-2: #8fcdae; --sec-3: #57b285; --sec-4: #2b9064; --sec-5: #126d48; --sec-6: #03432a;
  /* Estados (siempre con icono y texto) */
  --bien: #0a8a0a; --bien-fondo: #e3f4e3;
  --medio: #8a6100; --medio-fondo: #fff3d6;
  --alto: #a8481f; --alto-fondo: #fde8de;
  --critico: #b52b2b; --critico-fondo: #fbe3e3;
  --sombra: 0 1px 2px rgb(10 25 26 / 0.05), 0 4px 16px rgb(10 25 26 / 0.04);
  --radio: 14px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --papel: #0a1615; --superficie: #0f1f1d; --superficie-2: #152a27; --linea: #1f3834; --linea-fuerte: #2b4a45;
    --tinta: #e9f1ee; --tinta-2: #b9c9c4; --tinta-3: #8fa39d;
    --acento: #5acb94; --acento-txt: #0a191a;
    --s1: #2fae78; --s2: #e06a3a; --s3: #4b8fe0;
    --sec-0: #15302a; --sec-1: #1b4537; --sec-2: #1f5c45; --sec-3: #257754; --sec-4: #339666; --sec-5: #55b783; --sec-6: #94dbb2;
    --bien: #5fd07a; --bien-fondo: #133222; --medio: #f3c04f; --medio-fondo: #34290d; --alto: #f29a74; --alto-fondo: #3a2117; --critico: #f07a7a; --critico-fondo: #3d1818;
    --sombra: 0 1px 2px rgb(0 0 0 / 0.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --papel: #0a1615; --superficie: #0f1f1d; --superficie-2: #152a27; --linea: #1f3834; --linea-fuerte: #2b4a45;
  --tinta: #e9f1ee; --tinta-2: #b9c9c4; --tinta-3: #8fa39d;
  --acento: #5acb94; --acento-txt: #0a191a;
  --s1: #2fae78; --s2: #e06a3a; --s3: #4b8fe0;
  --sec-0: #15302a; --sec-1: #1b4537; --sec-2: #1f5c45; --sec-3: #257754; --sec-4: #339666; --sec-5: #55b783; --sec-6: #94dbb2;
  --bien: #5fd07a; --bien-fondo: #133222; --medio: #f3c04f; --medio-fondo: #34290d; --alto: #f29a74; --alto-fondo: #3a2117; --critico: #f07a7a; --critico-fondo: #3d1818;
  --sombra: 0 1px 2px rgb(0 0 0 / 0.3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  background: var(--papel);
  color: var(--tinta);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acento); }
h2, h3, h4 { line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 4px; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--superficie); padding: 8px 12px; z-index: 10; }
.saltar:focus { left: 8px; }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 5; background: color-mix(in oklab, var(--papel) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); }
.cab-fila { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 12px 24px 8px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tinta); }
.marca svg { width: 34px; height: 34px; }
.m-fondo { fill: var(--tinta); } .m-verde { fill: var(--verde); } .m-col { fill: var(--papel); }
.marca-txt { display: flex; flex-direction: column; line-height: 1.05; }
.marca-txt b { font-size: 19px; letter-spacing: -0.01em; }
.marca-txt span { font-size: 12px; color: var(--tinta-3); }
.municipio { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.muni-nombre { font-weight: 600; }
.demo { font-size: 12px; color: var(--tinta-3); }
.boton-tema { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--linea); background: var(--superficie); display: grid; place-items: center; cursor: pointer; transition: transform 140ms var(--ease-out); }
.boton-tema:active { transform: scale(0.95); }
.boton-tema svg { width: 18px; height: 18px; fill: none; stroke: var(--tinta-2); stroke-width: 1.5; }
.boton-tema .relleno-tema { fill: var(--tinta-2); stroke: none; }
.boton-tema[data-tema="light"] .relleno-tema { fill: none; }
.boton-tema[data-tema="dark"] svg circle { fill: var(--tinta-2); }

.navegacion { max-width: 1320px; margin: 0 auto; display: flex; gap: 4px; align-items: center; padding: 0 24px 10px; overflow-x: auto; scrollbar-width: none; }
.navegacion::-webkit-scrollbar { display: none; }
.nav-grupo { font-size: 12px; color: var(--tinta-3); margin-right: 6px; white-space: nowrap; }
.navegacion a { white-space: nowrap; text-decoration: none; color: var(--tinta-2); padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: background-color 150ms ease, color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .navegacion a:hover { background: var(--superficie-2); color: var(--tinta); } }
.navegacion a[aria-current="page"] { background: var(--tinta); color: var(--papel); }
.nav-sep { width: 1px; height: 18px; background: var(--linea-fuerte); margin: 0 8px; flex: none; }

/* Vista */
main { max-width: 1320px; margin: 0 auto; padding: 28px 24px 48px; outline: none; }
.vista-cab { margin-bottom: 22px; max-width: 760px; }
.vista-cab h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; outline: none; }
.perfil-etq { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--laurel); margin-bottom: 6px; }
:root[data-theme="dark"] .perfil-etq { color: var(--verde); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .perfil-etq { color: var(--verde); } }
.vista-intro { color: var(--tinta-2); margin-top: 8px; font-size: 16px; }
main > * { animation: entrar 260ms var(--ease-out) both; }
main > *:nth-child(2) { animation-delay: 40ms; } main > *:nth-child(3) { animation-delay: 80ms; }
@keyframes entrar { from { opacity: 0; transform: translateY(6px); } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--sombra); }
.kpi-etq { font-size: 13px; color: var(--tinta-2); }
.bh-num, .num, .m-valor, .pendientes b, .correo-kpis b, #reloj, .ab-min, time, .eje { font-variant-numeric: tabular-nums; }
.kpi-valor { font-size: 32px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.kpi-valor small { font-size: 15px; font-weight: 500; color: var(--tinta-2); letter-spacing: 0; }
.kpi-nota { font-size: 12.5px; color: var(--tinta-3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.delta, .estado { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 2px 8px 2px 6px; border-radius: 999px; white-space: nowrap; }
.delta svg, .estado svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.delta.bueno, .estado.ok { color: var(--bien); background: var(--bien-fondo); }
.delta.malo, .estado.serio { color: var(--alto); background: var(--alto-fondo); }
.estado.aviso { color: var(--medio); background: var(--medio-fondo); }
.estado.critico { color: var(--critico); background: var(--critico-fondo); }
.estado.neutro { color: var(--tinta-2); background: var(--superficie-2); padding-left: 8px; }

.rejilla-vista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tarjeta { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); padding: 18px 18px 16px; box-shadow: var(--sombra); min-width: 0; }
.tarjeta.ancha { grid-column: 1 / -1; }
.t-cab { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.t-cab h3 { font-size: 16px; font-weight: 600; }
.t-cab p { color: var(--tinta-2); font-size: 13.5px; margin-top: 3px; max-width: 70ch; }

/* Gráficos */
.grafico { width: 100%; height: auto; display: block; overflow: visible; }
.rejilla { stroke: var(--linea); stroke-width: 1; }
.eje { fill: var(--tinta-3); font-size: 11px; }
.rotulo { fill: var(--tinta-2); font-size: 12px; font-weight: 600; }
.linea { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.linea.discontinua { stroke-dasharray: 5 4; }
.linea.s1, .punto.s1, .punto-h.s1 { stroke: var(--s1); } .linea.s2, .punto.s2, .punto-h.s2 { stroke: var(--s2); } .linea.s3, .punto.s3, .punto-h.s3 { stroke: var(--s3); }
.punto { fill: var(--superficie); stroke-width: 2; }
.punto-h { fill: var(--superficie); stroke-width: 2; opacity: 0; }
.cruceta { stroke: var(--tinta-3); stroke-width: 1; opacity: 0; }
.col:hover .cruceta, .col:hover .punto-h { opacity: 1; }
.relleno.s1 { fill: var(--s1); } .relleno.s2 { fill: var(--s2); } .relleno.s3 { fill: var(--s3); }
.barra:hover .relleno { opacity: 0.8; }
.leyenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--tinta-2); margin-bottom: 6px; }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.tt-marca { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--s1); }
.tt-marca.s2 { background: var(--s2); } .tt-marca.s3 { background: var(--s3); }
.tt-marca.discontinua { background: repeating-linear-gradient(90deg, var(--s2) 0 5px, transparent 5px 8px); }
[class*="sec-"] { transition: opacity 150ms ease; }
.sec-0 { fill: var(--sec-0); background: var(--sec-0); } .sec-1 { fill: var(--sec-1); background: var(--sec-1); } .sec-2 { fill: var(--sec-2); background: var(--sec-2); }
.sec-3 { fill: var(--sec-3); background: var(--sec-3); } .sec-4 { fill: var(--sec-4); background: var(--sec-4); } .sec-5 { fill: var(--sec-5); background: var(--sec-5); } .sec-6 { fill: var(--sec-6); background: var(--sec-6); }
.calor rect:hover, .barrio:hover polygon { opacity: 0.78; }
.calor-scroll { overflow-x: auto; }
.calor { min-width: 560px; max-width: 820px; }
.leyenda-sec { display: flex; align-items: center; gap: 2px; font-size: 12px; color: var(--tinta-3); margin-top: 8px; }
.leyenda-sec i { width: 22px; height: 10px; border-radius: 2px; }
.leyenda-sec span:first-child { margin-right: 6px; } .leyenda-sec span:last-child { margin-left: 6px; }
.mapa polygon { stroke: var(--superficie); stroke-width: 2.5; stroke-linejoin: round; }
.mapa-nombre { font-size: 12px; font-weight: 600; fill: var(--tinta); pointer-events: none; }
.mapa-nombre.claro { fill: #f4f8f7; }
:root[data-theme="dark"] .mapa-nombre { fill: var(--tinta); } :root[data-theme="dark"] .mapa-nombre.claro { fill: #0a191a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mapa-nombre.claro { fill: #0a191a; } }
.cam { fill: var(--tinta); stroke: var(--superficie); stroke-width: 1.5; }
.cam.caida { fill: var(--critico); }
.acceso rect { fill: var(--superficie); stroke: var(--tinta); stroke-width: 1.5; }
.acceso path { stroke: var(--tinta); stroke-width: 1.5; }

.barras-h { display: flex; flex-direction: column; gap: 10px; }
.bh-fila { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.bh-etq { color: var(--tinta-2); }
.bh-pista { position: relative; height: 10px; background: var(--superficie-2); border-radius: 4px; }
.bh-valor { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; background: var(--s1); }
.bh-valor.s2 { background: var(--s2); } .bh-valor.s3 { background: var(--s3); }
.objetivo { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--tinta); z-index: 1; border-radius: 1px; }
.bh-num { font-weight: 600; min-width: 64px; text-align: right; }

.apilada { display: flex; gap: 2px; height: 22px; margin-top: 4px; }
.ap-seg:first-child { border-radius: 4px 0 0 4px; } .ap-seg:last-child { border-radius: 0 4px 4px 0; }
.apilada-etq { display: flex; gap: 2px; margin-top: 8px; font-size: 12.5px; color: var(--tinta-2); }
.apilada-etq span { min-width: 0; line-height: 1.3; }
.apilada-etq b { display: block; color: var(--tinta); }

.multiples { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.multiple { border: 1px solid var(--linea); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.m-etq { font-size: 13px; color: var(--tinta-2); }
.m-valor { font-size: 24px; font-weight: 600; line-height: 1; }
.m-valor small { font-size: 12px; font-weight: 400; color: var(--tinta-3); }
.multiple .delta { align-self: flex-start; }
.spark { width: 100%; height: 36px; }

.ver-tabla { margin-top: 10px; font-size: 13px; }
.ver-tabla summary { cursor: pointer; color: var(--tinta-2); width: fit-content; }
.tabla-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; margin-top: 8px; }
th, td { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--linea); vertical-align: top; }
thead th { color: var(--tinta-3); font-weight: 500; font-size: 12px; }
tbody th { font-weight: 500; }
.tabla-datos tbody th span { display: block; color: var(--tinta-3); font-weight: 400; font-size: 12px; }
.num { text-align: right; }

/* Listas de tarjetas */
.frases, .avisos, .eventos, .pendientes, .unidades, .abiertos, .alertas, .briefing { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.frases li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.frases li:last-child { border: 0; }
.frases p { flex: 1; }
.boton-icono { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--linea); background: var(--superficie); border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; color: var(--tinta-2); transition: transform 140ms var(--ease-out); flex: none; }
.boton-icono:active { transform: scale(0.96); }
.boton-icono svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.avisos li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.avisos li:last-child { border: 0; }
.avisos .estado { flex: none; margin-top: 1px; min-width: 84px; }
.avisos p { font-size: 14px; color: var(--tinta-2); }
.avisos b { color: var(--tinta); font-weight: 600; }
.eventos li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--linea); align-items: center; }
.eventos li:last-child { border: 0; }
.ev-fecha { font-weight: 600; min-width: 54px; color: var(--laurel); }
.eventos div { display: flex; flex-direction: column; }
.eventos span { font-size: 13px; color: var(--tinta-3); }
.pendientes li { display: grid; grid-template-columns: 52px 1fr; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.pendientes li:last-child { border: 0; }
.pendientes b { font-size: 22px; grid-row: span 2; line-height: 1.1; }
.pendientes em { font-style: normal; font-size: 12.5px; color: var(--tinta-3); }

.boton { display: inline-flex; align-items: center; gap: 8px; background: var(--acento); color: var(--acento-txt); border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; transition: transform 140ms var(--ease-out), opacity 150ms ease; }
.boton:active { transform: scale(0.97); }
.boton svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.boton.peq { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.boton.sec { background: var(--superficie-2); color: var(--tinta); }
@media (hover: hover) and (pointer: fine) { .boton:hover { opacity: 0.9; } }
.pie-vista { margin-top: 20px; }
.texto { color: var(--tinta-2); margin-bottom: 14px; }
.nota-fuente { font-size: 12.5px; color: var(--tinta-3); margin-top: 12px; }

/* Sala del turno */
.turno-barra { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--tinta-2); margin-bottom: 14px; }
#reloj { font-weight: 600; color: var(--tinta); font-size: 15px; }
.en-vivo { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--critico); }
.en-vivo i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: latido 1.6s ease-in-out infinite; }
@keyframes latido { 50% { opacity: 0.3; } }
.rejilla-turno { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; align-items: start; }
.col-media { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.alertas { gap: 10px; }
.alerta { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px; border: 1px solid var(--linea); border-radius: 12px; background: var(--superficie); transition: opacity 180ms ease, transform 180ms var(--ease-out); }
.alerta[data-nivel="critico"] { border-color: color-mix(in oklab, var(--critico) 55%, var(--linea)); }
.alerta.nueva { animation: llegar 300ms var(--ease-out) both; }
@keyframes llegar { from { opacity: 0; transform: translateY(-8px); } }
.alerta.saliendo { opacity: 0; transform: translateX(12px); }
.alerta.atendida { opacity: 0.72; }
.mini { width: 120px; height: auto; border-radius: 8px; display: block; }
.al-cuerpo { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13.5px; }
.al-cab { display: flex; justify-content: space-between; align-items: center; }
.al-cab time { font-size: 12.5px; color: var(--tinta-3); }
.al-cuerpo > span { color: var(--tinta-2); }
.al-lista { font-size: 12.5px; color: var(--tinta-3) !important; }
.al-acciones { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.asignada { display: inline-flex; gap: 6px; align-items: center; color: var(--bien); font-weight: 600; font-size: 13px; }
.sin-unidad { display: inline-flex; gap: 6px; align-items: center; color: var(--alto); font-weight: 600; font-size: 13px; }
.sin-unidad svg, .asignada svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.matricula { font-family: ui-monospace, "Cascadia Mono", monospace; font-weight: 600; background: var(--superficie-2); border: 1px solid var(--linea-fuerte); border-radius: 4px; padding: 0 5px; color: var(--tinta); letter-spacing: 0.04em; }
.matricula.grande { font-size: 20px; padding: 2px 10px; }
.unidades li, .abiertos li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--linea); font-size: 13.5px; }
.unidades li:last-child, .abiertos li:last-child { border: 0; }
.unidades li > b { min-width: 40px; }
.unidades li > div, .abiertos li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.unidades em { font-style: normal; color: var(--tinta-3); font-size: 12.5px; }
.abiertos span { color: var(--tinta-3); font-size: 12.5px; }
.ab-min { font-weight: 600; min-width: 52px; }
.ab-min.largo { color: var(--alto); }
.relevo { margin: 0; font-size: 14px; }

/* Agente */
.agente-envoltura { display: grid; grid-template-columns: 380px 1fr; gap: 32px; align-items: start; }
.movil { border: 10px solid var(--tinta); border-radius: 36px; background: var(--superficie); min-height: 680px; overflow: hidden; box-shadow: 0 20px 50px rgb(10 25 26 / 0.18); }
:root[data-theme="dark"] .movil { border-color: #23403b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .movil { border-color: #23403b; } }
.movil-barra { display: flex; justify-content: space-between; padding: 14px 18px 10px; font-size: 13px; font-weight: 600; background: var(--superficie-2); }
.movil-pestanas { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--linea); }
.movil-pestanas button { border: 0; background: none; padding: 12px 4px; font-size: 14px; font-weight: 500; color: var(--tinta-3); cursor: pointer; border-bottom: 2px solid transparent; transition: color 150ms ease, border-color 150ms ease; }
.movil-pestanas button[aria-selected="true"] { color: var(--tinta); border-bottom-color: var(--acento); }
.movil-panel[hidden] { display: none; }
.movil-panel { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.movil-panel h4 { font-size: 14px; margin-top: 4px; }
.aviso-movil { border: 1px solid var(--linea-fuerte); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: 14px; }
.aviso-movil span:not(.estado) { color: var(--tinta-3); font-size: 13px; }
.briefing { gap: 8px; }
.briefing li { font-size: 13.5px; color: var(--tinta-2); padding: 10px 12px; background: var(--superficie-2); border-radius: 10px; }
.briefing b { display: block; color: var(--tinta); }
.form-movil { display: flex; flex-direction: column; gap: 6px; }
.form-movil label { font-size: 13px; color: var(--tinta-2); margin-top: 6px; }
.form-movil input, .form-movil select, .form-movil textarea { border: 1px solid var(--linea-fuerte); border-radius: 10px; padding: 10px 12px; background: var(--superficie); font-size: 16px; }
.form-movil .boton { margin-top: 10px; justify-content: center; }
.adjuntos { display: flex; gap: 8px; margin-top: 8px; }
.adjuntos span { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--superficie-2); color: var(--tinta-2); }
.res-mat { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding-top: 4px; }
.res-mat ul { list-style: none; padding: 0; margin: 0; width: 100%; }
.res-mat li { display: flex; justify-content: space-between; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--linea); }
.res-mat time { color: var(--tinta-3); }
.registro { font-size: 12px; color: var(--tinta-3); }
.error { color: var(--critico); font-size: 13.5px; }
.exito { display: flex; gap: 8px; align-items: center; color: var(--bien); font-weight: 600; font-size: 14px; }
.exito svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.agente-notas h3 { font-size: 18px; margin-bottom: 12px; }
.agente-notas ul { padding-left: 18px; display: flex; flex-direction: column; gap: 10px; color: var(--tinta-2); max-width: 60ch; }
.agente-notas b { color: var(--tinta); }

/* Cómo funciona */
.diagrama-scroll { overflow-x: auto; }
.diagrama { width: 100%; min-width: 720px; height: auto; display: block; }
.zona { fill: var(--superficie-2); stroke: var(--linea-fuerte); stroke-dasharray: 4 4; }
.zona.nube { fill: var(--superficie); stroke-dasharray: none; }
.zona-txt { fill: var(--tinta-2); font-size: 13px; font-weight: 600; }
.caja { fill: var(--superficie); stroke: var(--linea-fuerte); }
.caja.destacada { fill: var(--bosque); stroke: none; }
.caja-txt { fill: var(--tinta); font-size: 14px; font-weight: 600; }
.caja-sub { fill: var(--tinta-3); font-size: 12px; }
.caja-txt.claro, .caja-sub.claro { fill: #eef4f2; }
.flecha { fill: none; stroke: var(--tinta-3); stroke-width: 1.5; }
.flecha.gruesa { stroke: var(--laurel); stroke-width: 3; }
.flecha-txt { fill: var(--tinta-2); font-size: 12px; }
.tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 18px; }
.tres h4 { font-size: 15px; margin-bottom: 4px; }
.tres p { font-size: 14px; color: var(--tinta-2); }
.sub-seccion { font-size: 18px; margin: 26px 0 12px; }
.conectores { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.conector { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.con-cab { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.conector p { font-size: 13.5px; color: var(--tinta-2); flex: 1; }
.con-datos { font-size: 12.5px; color: var(--tinta-3); }
.privacidad { display: flex; flex-direction: column; gap: 10px; }
.interruptor { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.interruptor input { position: absolute; opacity: 0; }
.interruptor span { width: 34px; height: 20px; border-radius: 999px; background: var(--linea-fuerte); position: relative; flex: none; }
.interruptor span::after { content: ""; position: absolute; width: 16px; height: 16px; top: 2px; left: 2px; border-radius: 50%; background: var(--superficie); transition: transform 160ms var(--ease-out); }
.interruptor input:checked + span { background: var(--laurel); }
.interruptor input:checked + span::after { transform: translateX(14px); }

/* Parte semanal */
.correo { max-width: 720px; background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.correo-cab { padding: 14px 20px; background: var(--superficie-2); font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.correo-cab span { display: inline-block; width: 64px; color: var(--tinta-3); }
.correo-cuerpo { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.correo-cuerpo ul { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 6px; color: var(--tinta-2); }
.correo-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.correo-kpis div { background: var(--superficie-2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; }
.correo-kpis b { font-size: 20px; }
.correo-kpis span { font-size: 12px; color: var(--tinta-3); }

/* Modal y tooltip */
.modal { border: 1px solid var(--linea); border-radius: 16px; padding: 22px; max-width: 620px; width: calc(100% - 32px); background: var(--superficie); color: var(--tinta); }
.modal[open] { animation: modal 200ms var(--ease-out); }
@keyframes modal { from { opacity: 0; transform: scale(0.97); } }
.modal::backdrop { background: rgb(10 25 26 / 0.45); }
.modal-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cerrar { border: 0; background: var(--superficie-2); width: 32px; height: 32px; border-radius: 8px; font-size: 20px; cursor: pointer; }
.indice { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--tinta-2); }
.indice b { color: var(--tinta); }
.tooltip { position: fixed; left: 0; top: 0; z-index: 20; pointer-events: none; background: var(--tinta); color: var(--papel); border-radius: 10px; padding: 8px 11px; font-size: 12.5px; line-height: 1.4; max-width: 260px; opacity: 0; transition: opacity 120ms ease; display: flex; flex-direction: column; gap: 2px; }
.tooltip.visible { opacity: 1; }
.tooltip strong { font-weight: 600; }
.tt-fila { display: flex; align-items: center; gap: 6px; }
.tt-fila b { margin-left: auto; padding-left: 12px; }

.pie { max-width: 1320px; margin: 0 auto; padding: 20px 24px 40px; font-size: 13px; color: var(--tinta-3); border-top: 1px solid var(--linea); }
.noscript { padding: 24px; }

/* Pantallas medianas y móviles */
@media (max-width: 1080px) {
  .rejilla-turno { grid-template-columns: 1fr 1fr; }
  .col-alertas { grid-column: 1 / -1; }
  .multiples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .cab-fila, .navegacion, main, .pie { padding-left: 16px; padding-right: 16px; }
  .municipio .demo { display: none; }
  .rejilla-vista, .rejilla-turno, .agente-envoltura, .tres { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-valor { font-size: 26px; }
  .multiples { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .movil { border-width: 6px; border-radius: 26px; min-height: 0; }
  .correo-kpis { grid-template-columns: repeat(2, 1fr); }
  .alerta { grid-template-columns: 88px 1fr; }
  .mini { width: 88px; }
  .bh-fila { grid-template-columns: minmax(90px, 40%) 1fr auto; }
  .apilada-etq { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  main > *, .alerta.nueva, .modal[open] { animation: none; }
  .en-vivo i { animation: none; }
  .alerta { transition: opacity 180ms ease; }
}
