/* Estilo "Starlink": oscuro primero (casi negro, vidrio esmerilado, bordes finos,
   numeros grandes y livianos, color solo para el estado y un acento frio para las
   acciones). El oscuro es el tema de base (:root) y el predeterminado de la app; el
   claro se define dos veces: con data-theme="light" (lo elige el cliente en Cuenta) y
   con prefers-color-scheme: light cuando eligio "Automatico" (data-theme="auto").
   tests/test_web.py vigila que las dos definiciones del claro sean iguales.
   Outfit para todo (pesos finos en lo grande), JetBrains Mono solo para numeros
   chicos y Syncopate solo para el wordmark; las fuentes las sirve la app (la CSP es
   default-src 'self'). Primero el celular (barra de pestanas abajo); desde 900 px,
   barra lateral fina. */
@font-face { font-family: 'Outfit'; font-weight: 300 800; font-display: swap;
  src: url('/static/fuentes/outfit.woff2') format('woff2'); }
@font-face { font-family: 'Syncopate'; font-weight: 700; font-display: swap;
  src: url('/static/fuentes/syncopate.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400 700; font-display: swap;
  src: url('/static/fuentes/jetbrains-mono.woff2') format('woff2'); }

:root {
  --bg: #05070a;
  --fondo-brillo: rgb(47 110 165 / .28);
  --panel: #0e1217;
  --surface: rgb(255 255 255 / .05);
  --surface-2: rgb(255 255 255 / .08);
  --text: #f4f6f8;
  --muted: #a0a9b6;
  --border: rgb(255 255 255 / .12);
  --primary: #2f6ea5;
  --on-primary: #ffffff;
  --primary-texto: #7ab8ee;
  --primary-soft: rgb(122 184 238 / .15);
  --ok: #3ddc97;
  --ok-soft: rgb(61 220 151 / .13);
  --warn: #fbbf24;
  --warn-soft: rgb(251 191 36 / .13);
  --danger: #ff7a7a;
  --danger-soft: rgb(255 122 122 / .13);
  --danger-boton: #c42b2b;
  --serie1: #7ab8ee;
  --serie2: #f59e0b;
  --sombra: none;
  --sombra-hero: none;
  --hero: rgb(255 255 255 / .04);
  --hero-borde: rgb(255 255 255 / .14);
  --hero-linea: rgb(255 255 255 / .09);
  --scrim: rgb(0 0 0 / .65);
  --barra: rgb(10 13 18 / .78);
  --vidrio: saturate(150%) blur(20px);
  --glow-ok: 0 0 32px rgb(61 220 151 / .30);
  --glow-mal: 0 0 32px rgb(255 122 122 / .26);
  --glow-bk: 0 0 32px rgb(251 191 36 / .22);
  --estrella: rgb(255 255 255 / .75);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --bg: #e9edf3;
    --fondo-brillo: rgb(47 110 165 / .16);
    --panel: #ffffff;
    --surface: rgb(255 255 255 / .72);
    --surface-2: rgb(15 23 42 / .055);
    --text: #0b1220;
    --muted: #4a566a;
    --border: rgb(15 23 42 / .13);
    --primary: #2f6ea5;
    --on-primary: #ffffff;
    --primary-texto: #1d5b94;
    --primary-soft: rgb(47 110 165 / .11);
    --ok: #0b7a4b;
    --ok-soft: rgb(11 122 75 / .11);
    --warn: #8a5200;
    --warn-soft: rgb(194 120 0 / .12);
    --danger: #c42b2b;
    --danger-soft: rgb(196 43 43 / .1);
    --danger-boton: #c42b2b;
    --serie1: #2f6ea5;
    --serie2: #d97706;
    --sombra: 0 1px 2px rgb(15 23 42 / .05), 0 8px 24px rgb(15 23 42 / .05);
    --sombra-hero: 0 1px 2px rgb(15 23 42 / .05), 0 16px 40px rgb(47 110 165 / .12);
    --hero: rgb(255 255 255 / .8);
    --hero-borde: rgb(15 23 42 / .12);
    --hero-linea: rgb(15 23 42 / .1);
    --scrim: rgb(15 23 42 / .5);
    --barra: rgb(255 255 255 / .82);
    --vidrio: saturate(160%) blur(20px);
    --glow-ok: 0 0 0 transparent;
    --glow-mal: 0 0 0 transparent;
    --glow-bk: 0 0 0 transparent;
    --estrella: transparent;
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #e9edf3;
  --fondo-brillo: rgb(47 110 165 / .16);
  --panel: #ffffff;
  --surface: rgb(255 255 255 / .72);
  --surface-2: rgb(15 23 42 / .055);
  --text: #0b1220;
  --muted: #4a566a;
  --border: rgb(15 23 42 / .13);
  --primary: #2f6ea5;
  --on-primary: #ffffff;
  --primary-texto: #1d5b94;
  --primary-soft: rgb(47 110 165 / .11);
  --ok: #0b7a4b;
  --ok-soft: rgb(11 122 75 / .11);
  --warn: #8a5200;
  --warn-soft: rgb(194 120 0 / .12);
  --danger: #c42b2b;
  --danger-soft: rgb(196 43 43 / .1);
  --danger-boton: #c42b2b;
  --serie1: #2f6ea5;
  --serie2: #d97706;
  --sombra: 0 1px 2px rgb(15 23 42 / .05), 0 8px 24px rgb(15 23 42 / .05);
  --sombra-hero: 0 1px 2px rgb(15 23 42 / .05), 0 16px 40px rgb(47 110 165 / .12);
  --hero: rgb(255 255 255 / .8);
  --hero-borde: rgb(15 23 42 / .12);
  --hero-linea: rgb(15 23 42 / .1);
  --scrim: rgb(15 23 42 / .5);
  --barra: rgb(255 255 255 / .82);
  --vidrio: saturate(160%) blur(20px);
  --glow-ok: 0 0 0 transparent;
  --glow-mal: 0 0 0 transparent;
  --glow-bk: 0 0 0 transparent;
  --estrella: transparent;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  background: radial-gradient(900px 520px at 50% -8%, var(--fondo-brillo), transparent 70%) no-repeat, var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/22px 'Outfit', system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; line-height: 30px; font-weight: 300; letter-spacing: -.005em; }
h2 { font-size: 16px; line-height: 24px; font-weight: 400; }
a { color: var(--primary-texto); }
button { font: inherit; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.suave { color: var(--muted); font-size: 14px; line-height: 20px; }
.cargando { color: var(--muted); text-align: center; padding: 48px 0; font-weight: 300; letter-spacing: .04em; }
.icono { width: 24px; height: 24px; flex: none; }

:focus-visible { outline: 2px solid var(--primary-texto); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Logo: dos imagenes y se ve la que va con el tema (el oscuro es el de base). */
.logo { display: inline-block; flex: none; line-height: 0; }
.logo img { width: 100%; height: 100%; border-radius: 22%; display: block; }
.logo.chico { width: 36px; height: 36px; }
.logo.grande { width: 96px; height: 96px; margin: 0 auto 8px; display: block; box-shadow: 0 0 56px rgb(47 110 165 / .45); border-radius: 22%; }
.logo-claro { display: none !important; }
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] .logo-claro { display: block !important; }
  :root[data-theme="auto"] .logo-oscuro { display: none !important; }
}
:root[data-theme="light"] .logo-claro { display: block !important; }
:root[data-theme="light"] .logo-oscuro { display: none !important; }
.wordmark { font-family: 'Syncopate', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: .06em; }

/* Escenas (las llena web/escena.js): contenedores vacios con su lugar reservado. Sin
   escena, el hero y Mi red se ven bien igual (brillo en CSS); con ella, la escena
   es un cartel arriba de la tarjeta que se funde con el vidrio. */
.escena { position: relative; width: 100%; height: 240px; border-radius: 20px; overflow: hidden; margin-bottom: 16px; }
.escena canvas { display: block; width: 100%; height: 100%; }
.hero .escena {
  order: -1; flex: 0 0 100%; width: calc(100% + 40px); height: 240px; margin: -24px -20px 8px; border-radius: 0;
  -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent);
}
.nodo-red .escena, .escena-red { height: 260px; margin-bottom: 20px; background: radial-gradient(60% 80% at 50% 100%, var(--primary-soft), transparent); }
/* Ingreso: a pantalla completa detras de todo. Sin escena queda el cielo de estrellas en CSS. */
.escena-ingreso {
  position: fixed; inset: 0; z-index: 0; width: auto; height: auto; margin: 0; border-radius: 0; pointer-events: none;
  background:
    radial-gradient(1.6px 1.6px at 12% 18%, var(--estrella), transparent),
    radial-gradient(1.6px 1.6px at 78% 12%, var(--estrella), transparent),
    radial-gradient(2.2px 2.2px at 34% 42%, var(--estrella), transparent),
    radial-gradient(1.6px 1.6px at 90% 38%, var(--estrella), transparent),
    radial-gradient(1.6px 1.6px at 8% 66%, var(--estrella), transparent),
    radial-gradient(2.2px 2.2px at 62% 74%, var(--estrella), transparent),
    radial-gradient(1.6px 1.6px at 46% 90%, var(--estrella), transparent),
    radial-gradient(1.6px 1.6px at 22% 84%, var(--estrella), transparent),
    radial-gradient(1.6px 1.6px at 70% 30%, var(--estrella), transparent),
    radial-gradient(70% 45% at 50% 108%, rgb(47 110 165 / .45), transparent 70%),
    radial-gradient(60% 40% at 50% -5%, var(--fondo-brillo), transparent 70%);
}

/* Tarjetas de vidrio: borde fino, radio grande, desenfoque del fondo. */
.tarjeta {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--sombra); padding: 20px; min-width: 0;
  -webkit-backdrop-filter: var(--vidrio); backdrop-filter: var(--vidrio);
}
.titulo-tarjeta {
  margin-bottom: 14px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.fila { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; }
.fila + .fila { border-top: 1px solid var(--border); }
.fila .etiqueta { color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 400; }
.fila .valor { font-weight: 400; text-align: right; }
.etiqueta { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

/* Marco: celular = barra superior + barra de pestanas abajo; escritorio = lateral. */
.marco { min-height: 100vh; }
.principal { min-width: 0; }
/* La cabecera "desaparece" (display: contents) para que solo la fila del titulo quede fija arriba:
   el boton de volver a "Tus conexiones" se va con el scroll y no le come pantalla a la lista. */
.superior { display: contents; }
.superior-fila {
  position: sticky; top: 0; z-index: 4; background: var(--barra); border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: var(--vidrio); backdrop-filter: var(--vidrio);
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: calc(6px + env(safe-area-inset-top)) 8px 6px 16px;
}
.superior h1 { flex: 1; min-width: 0; font-size: 20px; letter-spacing: .02em; }
.boton-icono {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px;
  padding: 0 12px; border: 0; background: transparent; color: var(--muted); border-radius: 999px; cursor: pointer;
  transition: background .18s, color .18s, transform .12s;
}
.boton-icono:hover { background: var(--surface-2); color: var(--text); }
.boton-icono:active { transform: scale(.94); }
.solo-escritorio { display: none; }
/* Con 2 o mas conexiones: "Tus conexiones" con flecha atras y la conexion de ahora. */
.volver-conexiones {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 10px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; text-align: left;
  transition: background .18s, transform .12s;
}
.volver-conexiones:hover { background: var(--surface-2); }
.volver-conexiones:active { transform: scale(.98); }
.volver-texto { display: grid; min-width: 0; line-height: 16px; }
.volver-texto .etiqueta { font-size: 10px; line-height: 14px; }
.volver-actual { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; font-size: 14px; }
.volver-movil { margin: 12px 16px 0; }

.contenido {
  max-width: 720px; margin: 0 auto; padding: 16px 16px calc(72px + env(safe-area-inset-bottom) + 24px);
  display: grid; gap: 14px; align-content: start;
}
/* Entrada de las tarjetas: aparecen subiendo apenas, una tras otra. */
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }
.contenido > *, .grilla-inicio > *, .lado > * { animation: entra .5s cubic-bezier(.2, .7, .2, 1) backwards; }
.contenido > :nth-child(2), .grilla-inicio > :nth-child(2), .lado > :nth-child(1) { animation-delay: .06s; }
.contenido > :nth-child(3), .grilla-inicio > :nth-child(3), .lado > :nth-child(2) { animation-delay: .12s; }
.contenido > :nth-child(n+4), .lado > :nth-child(n+3) { animation-delay: .18s; }

/* Barra de pestanas de abajo (celular): vidrio, icono y etiqueta; la activa en claro con una raya arriba. */
.inferior {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; background: var(--barra);
  border-top: 1px solid var(--border); height: calc(68px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-backdrop-filter: var(--vidrio); backdrop-filter: var(--vidrio);
}
.destino {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: .04em;
  transition: color .18s;
}
.inferior .destino { flex: 1; min-height: 68px; position: relative; }
.inferior .destino:active .destino-icono { transform: scale(.9); }
.destino-icono { display: grid; place-items: center; width: 48px; height: 30px; border-radius: 15px; transition: background .2s, color .2s, transform .12s; }
.destino[aria-current="page"] { color: var(--text); }
.destino[aria-current="page"] .destino-icono { color: var(--primary-texto); }
.inferior .destino[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 28px; height: 2px; margin-left: -14px; border-radius: 0 0 2px 2px;
  background: var(--primary-texto); box-shadow: 0 4px 14px var(--primary-texto);
}
.lateral { display: none; }

/* Avisos. */
.aviso {
  display: flex; gap: 12px; align-items: flex-start; border-radius: 18px; padding: 14px 16px; font-size: 14px; line-height: 20px;
  background: var(--primary-soft); color: var(--text); border: 1px solid var(--border);
}
.aviso > .icono { width: 20px; height: 20px; margin-top: 1px; color: var(--primary-texto); }
.aviso strong { display: block; font-weight: 500; }
.aviso.warn { background: var(--warn-soft); border-color: transparent; }
.aviso.warn > .icono { color: var(--warn); }
.aviso.danger { background: var(--danger-soft); border-color: transparent; }
.aviso.danger > .icono { color: var(--danger); }
.aviso-texto { flex: 1; min-width: 0; }
.aviso.con-acciones { flex-wrap: wrap; }
.aviso-acciones { flex: 0 0 100%; display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin: 0 -6px -8px 0; }
.avisos { display: grid; gap: 8px; }

/* (i) de informacion: circulo con la i, 44x44 de area tactil. */
.boton-info {
  display: inline-grid; place-items: center; flex: none; min-width: 44px; min-height: 44px; padding: 0; border: 0;
  background: transparent; color: var(--muted); border-radius: 50%; cursor: pointer; transition: background .18s, color .18s;
}
.boton-info .icono { width: 20px; height: 20px; }
.boton-info:hover { background: var(--surface-2); color: var(--text); }
.aviso .boton-info .icono { color: inherit; margin: 0; width: 20px; height: 20px; }
.boton-ocultar {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px; border: 0; background: transparent;
  color: var(--muted); border-radius: 999px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.boton-ocultar .icono { width: 16px; height: 16px; }
.boton-ocultar:hover { background: var(--surface-2); color: var(--text); }
.aviso .boton-ocultar .icono { margin: 0; color: inherit; width: 16px; height: 16px; }
.solo-lectores { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.subtitulo { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 16px 0 4px; }
.tarjeta .aviso { margin-bottom: 12px; }

/* Botones: pildoras. El primario lleva el acento frio; el secundario es vidrio con borde. */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 24px;
  border-radius: 999px; border: 1px solid transparent; background: var(--primary); color: var(--on-primary);
  font-weight: 500; letter-spacing: .02em; cursor: pointer; transition: filter .18s, background .18s, transform .12s, border-color .18s;
}
.boton:hover:not(:disabled) { filter: brightness(1.12); }
.boton:active:not(:disabled) { transform: scale(.97); }
.boton:disabled { opacity: .5; cursor: default; }
.boton.secundario { background: var(--surface); color: var(--text); border-color: var(--border);
  -webkit-backdrop-filter: var(--vidrio); backdrop-filter: var(--vidrio); }
.boton.secundario:hover:not(:disabled) { background: var(--surface-2); border-color: var(--muted); filter: none; }
.boton.peligro { background: var(--danger-boton); color: #fff; }
.boton.ancho { width: 100%; }
a.boton { text-decoration: none; }
.enlace {
  border: 0; background: none; color: var(--muted); text-decoration: underline; min-height: 44px;
  padding: 8px 0; cursor: pointer; font-size: 14px; width: 100%;
}
.enlace-flecha { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.acciones-cuenta { display: flex; flex-wrap: wrap; gap: 8px; }
.acciones-cuenta .boton { flex: 1 1 160px; }

/* Inicio. */
.grilla-inicio { display: grid; gap: 14px; }
.lado { display: contents; }
.hero { order: 1; }
.g-medio { order: 2; }
.g-red { order: 2; }
.g-consumo { order: 3; }
.g-cortes { order: 4; }
.g-ayuda { order: 5; }
.g-ayuda .suave { margin-bottom: 14px; }

/* Asistente "¿Qué te pasa?": lo revisado con su marca, una pregunta por vez y botones grandes. */
.asistente { display: grid; gap: 14px; max-width: 720px; width: 100%; margin: 0 auto; }
.revisado { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.revisado-item { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 22px; }
.revisado-item strong { font-weight: 500; }
.revisado-marca { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); }
.revisado-marca .icono { width: 16px; height: 16px; }
.revisado-item.ok .revisado-marca { background: var(--ok-soft); color: var(--ok); }
.revisado-item.mal .revisado-marca { background: var(--danger-soft); color: var(--danger); }
.opciones-asistente { display: grid; gap: 10px; }
.opciones-asistente .opcion { justify-content: flex-start; text-align: left; white-space: normal; }
.asistente-paso > p { margin-bottom: 14px; }
.asistente-paso .boton + .boton, .asistente-paso .boton + .aviso { margin-top: 10px; }
.asistente-paso .aviso { margin: 10px 0 0; }
.asistente-paso.warn { background: var(--warn-soft); }
.pregunta-asistente { font-size: 19px; line-height: 26px; font-weight: 500; margin: 0 0 12px; }
.asistente-paso.listo .pregunta-asistente { color: var(--ok); }
.respuestas-asistente { list-style: none; margin: 0; padding: 0 4px; display: grid; gap: 6px; font-size: 14px; line-height: 20px; }
.respuestas-asistente li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.respuestas-asistente strong { font-weight: 500; }
.esperando { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.esperando strong { display: block; font-weight: 500; }
.girando { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--surface-2);
  border-top-color: var(--primary-texto); animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.hero { position: relative; overflow: hidden; padding: 24px 20px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 90%; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 40%, var(--primary-soft), transparent 75%);
}
.hero > * { position: relative; }
.conexion-nombre { color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; overflow-wrap: anywhere; }
.estado-pastilla {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 18px; line-height: 24px; font-weight: 300;
  padding: 8px 18px 8px 12px; border-radius: 999px; margin-bottom: 20px; letter-spacing: .02em; align-self: flex-start;
}
.estado-pastilla .icono { width: 20px; height: 20px; }
.estado-pastilla.ok { background: var(--ok-soft); color: var(--ok); box-shadow: var(--glow-ok); }
.estado-pastilla.mal { background: var(--danger-soft); color: var(--danger); box-shadow: var(--glow-mal); }
.estado-pastilla.bk { background: var(--warn-soft); color: var(--warn); box-shadow: var(--glow-bk); }
.estado-pastilla .desde { color: var(--muted); font-weight: 300; font-size: 13px; }
.resumen-plan { display: flex; align-items: baseline; gap: 10px; }
.resumen-plan .velocidad { font-size: 80px; line-height: 80px; font-weight: 300; letter-spacing: -.03em; font-family: 'Outfit', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.resumen-plan .unidad { color: var(--muted); font-size: 15px; font-weight: 300; letter-spacing: .08em; text-transform: uppercase; }
.plan-nombre { color: var(--muted); font-size: 14px; line-height: 20px; margin: 4px 0 24px; font-weight: 300; }
.numeros { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 12px; padding-top: 20px; border-top: 1px solid var(--hero-linea); }
.numero { min-width: 0; }
.numero .valor { font-size: 26px; line-height: 30px; font-weight: 300; font-family: 'Outfit', system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.numero .etiqueta { margin-top: 2px; }
.numero-equipos { display: flex; align-items: flex-start; gap: 2px; }
.numero-equipos .boton-info { margin: -12px 0 -12px -4px; }
.numero-enlace { color: inherit; text-decoration: none; border-radius: 12px; padding: 4px 8px; margin: -4px -8px; min-height: 44px; transition: background .18s; }
.numero-enlace:hover { background: var(--surface-2); }
.numero-enlace .valor { color: var(--primary-texto); }
.lat.buena { color: var(--ok); font-weight: 400; }
.lat.regular { color: var(--warn); font-weight: 400; }
.lat.alta { color: var(--danger); font-weight: 400; }
.fila-antena { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fila-antena .etiqueta { font-weight: 500; }
.senal { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.frase-antena { font-weight: 300; font-size: 22px; line-height: 28px; }
.frase-antena.ok { color: var(--ok); }
.frase-antena.revisar { color: var(--warn); }
.frase-antena.mal { color: var(--danger); }
.frase-antena .rayita.prendida { fill: currentColor; }
.rayitas { width: 28px; height: 22px; }
.rayita { fill: var(--border); }
.rayita.prendida { fill: var(--primary-texto); }
.nota-revisar { color: var(--warn); font-weight: 400; font-size: 14px; line-height: 20px; margin-top: 8px; }
.resumen-red { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-weight: 300; font-size: 20px; line-height: 28px; margin-bottom: 4px; }
.resumen-red .icono { color: var(--primary-texto); }
.resumen-red .revisar { color: var(--warn); font-weight: 400; }
.resumen-red span:nth-child(3)::before { content: "· "; }

/* Consumo. */
.consumo-resumen { display: none; }
.consumo-lado { min-width: 0; }
.grafico { width: 100%; max-width: 520px; height: auto; display: block; }
.grafico .eje { fill: var(--muted); font-size: 10px; font-family: 'JetBrains Mono', monospace; }
.grafico .linea { stroke: var(--border); stroke-width: .75; stroke-dasharray: 2 4; }
.grafico .cero { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.puertos-uso .grafico { max-width: 420px; }
.grafico .barra-bajada { fill: var(--serie1); }
.grafico .barra-subida { fill: var(--serie2); }
.leyenda { display: flex; gap: 16px; font-size: 13px; line-height: 18px; color: var(--muted); margin: 8px 0 4px; flex-wrap: wrap; }
.leyenda span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.leyenda .bajada::before { background: var(--serie1); }
.leyenda .subida::before { background: var(--serie2); }
.leyenda .bien::before { background: var(--ok); border-radius: 50%; }
.leyenda .regular::before { background: var(--warn); border-radius: 50%; }
.leyenda .mal::before { background: var(--danger); border-radius: 50%; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 10px 4px; border-top: 1px solid var(--border); }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
details summary { cursor: pointer; color: var(--primary-texto); font-size: 14px; font-weight: 500; padding: 12px 0 4px; min-height: 44px; }

/* Pastillas de estado: siempre con texto. */
.pastilla { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .02em;
  border-radius: 999px; padding: 4px 12px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.pastilla .icono { width: 14px; height: 14px; }
.pastilla.bien, .pastilla.hecho { background: var(--ok-soft); color: var(--ok); }
.pastilla.regular { background: var(--warn-soft); color: var(--warn); }
.pastilla.mal, .pastilla.rechazado { background: var(--danger-soft); color: var(--danger); }
.pastilla.nuevo, .pastilla.tomado, .pastilla.primaria { background: var(--primary-soft); color: var(--primary-texto); }

/* Plan. */
.grilla-2 { display: grid; gap: 14px; align-content: start; }
.columna { display: grid; gap: 14px; align-content: start; }
.plan-actual {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--primary-texto);
  background: var(--primary-soft); border-radius: 18px; padding: 18px; margin-bottom: 16px;
}
.plan-actual .velocidad { font-family: 'Outfit', system-ui, sans-serif; font-size: 36px; line-height: 40px; font-weight: 300; }
.cambio-plan { display: grid; gap: 12px; }
.pedido { padding: 10px 0; }
.pedido + .pedido { border-top: 1px solid var(--border); }
.cuenta-nombre { font-weight: 300; font-size: 22px; line-height: 30px; overflow-wrap: anywhere; }

/* Formularios. */
label { display: block; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 10px 16px; min-height: 48px; transition: border-color .18s, background .18s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:hover, textarea:hover, select:hover { border-color: var(--muted); }
select { appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: var(--panel); color: var(--text); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--primary-texto); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 96px; resize: vertical; }
.error { color: var(--danger); font-size: 14px; margin-top: 8px; }
.segmentos { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; }
.segmento { flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 14px;
  cursor: pointer; transition: background .18s, color .18s; }
.segmento[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); font-weight: 500; }

/* Equipos de la casa: una seccion con borde por router o repetidor y fichas adentro. */
.grupos-red { display: grid; gap: 12px; margin-top: 12px; }
/* La red de la ultima vez que el router mando datos (avisoRedVieja): apagada, para que no se lea como de ahora. */
.red-vieja, [data-vieja] { opacity: .55; filter: grayscale(.7); }
.nodo-red-vieja .aviso { margin-bottom: 12px; }
.grupo-red { border: 1px solid var(--border); border-radius: 18px; padding: 14px; display: grid; gap: 12px; align-content: start; background: var(--surface); }
/* Cabecera en grilla: icono | titulo y subtitulo | pastilla y Detalle. El titulo largo (el modelo de una
   ONT, "Router o repetidor secundario...") se corta en 2 lineas y el subtitulo en 1, en vez de empujar
   la pastilla y el boton a otra linea y desarmar el cuadro. Todo alineado arriba. */
.grupo-cab { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 4px 10px; }
.grupo-cab > .icono { color: var(--primary-texto); margin-top: 2px; }
.grupo-titulo { display: grid; min-width: 0; }
.grupo-titulo strong { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 400; }
.grupo-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grupo-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.subgrupos-red { display: grid; gap: 14px; align-content: start; }
.subgrupo-red { display: grid; gap: 8px; align-content: start; }
.subgrupo-cab { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 10px; min-height: 26px; padding-bottom: 6px; border-bottom: 1px solid var(--border); line-height: 20px; }
.subgrupo-titulo { font-size: 0.95rem; white-space: nowrap; font-weight: 400; }
/* El lugar del nombre de la red existe siempre (con SSID, "Red sin leer" o vacio reservado): una linea fija. */
.subgrupo-ssid { font-size: 0.85rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subgrupo-ssid-sin { font-style: italic; }
.subgrupo-cuenta { justify-self: end; font-size: 0.85rem; }
/* Lugar del "Detalle" en el router principal, que no lo tiene: misma altura de cabecera que un AP. */
.grupo-reserva { display: block; min-height: 44px; }
.fichas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; align-items: stretch; align-content: start; }
.fichas > li { display: flex; min-width: 0; }
/* Estructura fija: icono 40 + nombre 2 lineas (32) + medidas 1 linea (15) + pie (18); cada renglon
   con su alto reservado aunque este vacio, asi todas las fichas miden lo mismo y el en vivo no las mueve. */
.ficha {
  position: relative; width: 100%; flex: 1; display: grid; grid-template-rows: 40px 32px 15px 18px; justify-items: center; align-content: start; gap: 4px;
  padding: 10px 6px; border: 1px solid var(--border); border-left-width: 1px; border-radius: 16px; background: var(--surface-2);
  color: var(--text); cursor: pointer; text-align: center; transition: border-color .18s, background .18s, transform .12s;
}
.ficha:hover { border-color: var(--primary-texto); }
.ficha:active { transform: scale(.97); }
.ficha-icono { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--primary-texto); }
.ficha-icono .icono { width: 22px; height: 22px; }
.ficha-nombre { font-size: 13px; line-height: 16px; height: 32px; font-weight: 400; max-width: 100%; min-width: 0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.ficha-pie { display: flex; align-items: center; justify-content: center; gap: 6px; height: 18px; max-width: 100%; min-width: 0; }
.ficha-pie > * { white-space: nowrap; }
.ficha-estado { font-size: 11px; line-height: 14px; font-weight: 500; }
.ficha-estado.regular { color: var(--warn); }
.ficha-estado.mal { color: var(--danger); }
.punto { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.punto.bien { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.punto.regular { background: var(--warn); }
.punto.mal { background: var(--danger); }
.ficha.regular { border-color: var(--warn); }
.ficha.mal { border-color: var(--danger); }
.equipo-nombre { font-weight: 400; min-width: 0; overflow-wrap: anywhere; }
.detalle-repetidor { margin: 2px 0 0; }
.senal-rep { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.barras-senal { width: 28px; height: 20px; }
.barras-senal .barra { fill: var(--border); }
.barras-senal .barra.llena { fill: var(--primary-texto); }
.nota-chica { display: block; font-size: 12px; line-height: 16px; }
.marca-mac { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 8px; }
.datos-equipo, .consumo { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 12px; line-height: 18px; color: var(--muted); }
.consumo .bajada, .casa-ahora .bajada { color: var(--primary-texto); }
.consumo .subida, .casa-ahora .subida { color: var(--warn); }
.casa-ahora { margin-top: 12px; font-size: 14px; }
.casa-ahora .num { font-weight: 400; margin-left: 8px; font-size: 13px; }
.tabla-scroll { overflow-x: auto; }
.tabla-equipos th, .tabla-equipos td { text-align: left; white-space: nowrap; padding: 10px 12px; }
.tabla-equipos td.mono { font-size: 13px; }
.tabla-equipos tr.detras td:first-child { padding-left: 36px; }
.tabla-equipos .pastilla { margin-left: 8px; }

/* Los puertos de un AP (TP-Link ADSL) van debajo de sus equipos, con las mismas bocas del router. */
.puertos-ap { margin-top: 14px; }
/* Dentro del cuadro de un AP (a veces en media columna) las bocas se acomodan al ancho: no 5 fijas como las del router. */
.puertos-ap .bocas { margin-top: 8px; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.puertos-ap .boca { padding: 12px; }
/* Puertos del router: una boca por puerto, como la parte de atras del equipo.
   Celular: 2 columnas con Internet a todo el ancho; escritorio: 5 en fila. */
.bocas { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.boca { background: var(--surface-2); border-radius: 16px; border: 1px solid var(--border); border-top: 2px solid var(--border); padding: 12px; display: grid;
  gap: 6px; align-content: start; justify-items: start; min-width: 0; }
.boca.internet { grid-column: 1 / -1; }
/* Salidas a internet (MikroTik con varios proveedores): una por renglon en el celular (la IP no entra en media
   columna); en escritorio, una al lado de la otra. */
.bocas.salidas { grid-template-columns: 1fr; }
.boca.bien { border-top-color: var(--ok); }
.boca.regular { border-top-color: var(--warn); }
.boca.mal { border-top-color: var(--danger); }
.boca-cab { display: flex; align-items: center; gap: 8px; }
.boca-cab .icono { width: 28px; height: 28px; color: var(--muted); }
.boca.bien .boca-cab .icono { color: var(--ok); }
.boca.regular .boca-cab .icono { color: var(--warn); }
.boca.mal .boca-cab .icono { color: var(--danger); }
.boca-velocidad { font-size: 16px; line-height: 20px; font-weight: 300; }
.boca-bytes { display: grid; font-size: 12px; line-height: 18px; color: var(--muted); }
.boca-bytes .bajada { color: var(--primary-texto); }
.boca-bytes .subida { color: var(--warn); }
.boca-nota { font-size: 12px; line-height: 16px; margin: 0; }
.boca-detras { font-size: 12px; line-height: 16px; color: var(--muted); overflow-wrap: anywhere; }
.pie-puertos { margin-top: 12px; }

/* Mapa: teselas satelitales de central (5x5) y un pin en la casa. */
.mapa { position: relative; height: 220px; border-radius: 18px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 12px; }
.mapa .teselas { position: absolute; width: 1280px; height: 1280px; display: grid; grid-template-columns: repeat(5, 256px); }
.mapa .teselas img { width: 256px; height: 256px; display: block; }
.mapa .pin { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -33px 0 0 -18px; color: var(--danger-boton); }
.mapa .pin .icono { width: 36px; height: 36px; fill: currentColor; stroke: #fff; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .5)); }
.mapa .pin circle { fill: #fff; stroke: none; }
.mapa .atribucion { position: absolute; right: 6px; bottom: 4px; font-size: 10px; color: #fff; text-shadow: 0 0 3px #000; }

/* Modales: hoja desde abajo en celular, centrados en escritorio. */
.fondo-modal { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; padding: 0; z-index: 10;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal {
  background: var(--panel); color: var(--text); width: 100%; max-width: 520px; border: 1px solid var(--border);
  border-radius: 28px 28px 0 0; padding: 28px 20px calc(20px + env(safe-area-inset-bottom)); max-height: 90vh; overflow-y: auto;
  animation: sube .28s cubic-bezier(.2, .7, .2, 1);
}
@keyframes sube { from { opacity: 0; transform: translateY(24px); } }
.modal:focus { outline: none; }
.modal h2 { font-size: 22px; line-height: 28px; font-weight: 300; margin-bottom: 12px; }
.modal p { margin-bottom: 12px; }
/* Con tres botones en el celular no entran en una linea: bajan al renglon siguiente ("Automatico" se salia del borde). */
.modal-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.modal-acciones .boton { flex: 1 1 auto; }

/* Ingreso y pantallas sin marco: logo y titulo grandes, centrados, formulario minimo. */
.ingreso, .centro { max-width: 440px; margin: 0 auto; padding: 48px 20px calc(32px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.ingreso { text-align: center; position: relative; z-index: 1; min-height: 100vh; align-content: center; gap: 18px; }
.ingreso h1 { font-size: 36px; line-height: 44px; font-weight: 300; letter-spacing: -.01em; }
.ingreso h1 .azul { font-family: 'Syncopate', sans-serif; font-size: 26px; font-weight: 700; color: var(--primary-texto); letter-spacing: .04em; }
.ingreso > .suave { max-width: 340px; margin: 0 auto 8px; font-size: 15px; line-height: 22px; font-weight: 300; }
.ingreso .tarjeta { text-align: left; }
.ingreso form { display: grid; gap: 16px; }
/* Ingreso con Google: blanco con la G de colores en los dos temas (su guia de marca), mas grande que el resto
   y con "Recomendado" (operador, 12/10/2026). */
.boton-google {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  min-height: 60px; margin-top: 6px; padding: 12px 20px; border-radius: 999px; border: 1px solid #dadce0;
  background: #fff; color: #1f1f1f; font-size: 17px; font-weight: 500; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18); transition: box-shadow .18s, transform .12s;
}
.boton-google:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .28); }
.boton-google:active { transform: scale(.98); }
.boton-google .logo-google { width: 26px; height: 26px; flex: none; }
.pastilla-recomendado {
  position: absolute; top: -11px; right: 18px; padding: 2px 10px; border-radius: 999px; background: var(--primary);
  color: var(--on-primary); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.separador-o { margin: 4px 0 -4px; text-align: center; color: var(--muted); font-size: 13px; }

/* Modo operador (entra con un codigo de fact): cartel fijo arriba de todo, siempre a la vista.
   El marco baja lo que mide el cartel para que no tape la barra superior ni la lateral. */
.cartel-operador {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9; display: flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 36px; padding: 6px 16px; background: var(--panel); color: var(--warn);
  border-bottom: 2px solid var(--warn); font-size: 14px; line-height: 20px; text-align: center;
}
.cartel-operador .icono { width: 18px; height: 18px; flex: none; }
.cartel-usuario { font-weight: 400; }
.cartel-ok {
  margin-left: 8px; min-height: 28px; padding: 2px 14px; border: 1px solid var(--warn); border-radius: 999px;
  background: transparent; color: var(--warn); font: inherit; font-weight: 600; cursor: pointer;
}
.cartel-ok:hover { background: var(--surface-2); }
.marco.con-cartel { padding-top: 36px; }
.marco.con-cartel .superior-fila { top: 36px; }
.buscador-conexiones { display: grid; gap: 12px; }
.buscador-conexiones input[type="search"] { width: 100%; }
.resultado-conexion {
  display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; gap: 12px; width: 100%; text-align: left;
  cursor: pointer; font: inherit; color: inherit;
}
.resultado-conexion:hover, .resultado-conexion.actual { border-color: var(--primary-texto); }

/* Escritorio (>= 900 px): barra lateral fina de 208 px y contenido de hasta 1400 px. Grilla de 8 px,
   separacion de 16/24. El celular no pasa por aca. */
@media (min-width: 900px) {
  .lateral {
    display: flex; flex-direction: column; gap: 28px; position: fixed; inset: 0 auto 0 0; width: 208px; z-index: 5;
    background: var(--barra); border-right: 1px solid var(--border); padding: 28px 16px;
    -webkit-backdrop-filter: var(--vidrio); backdrop-filter: var(--vidrio);
  }
  .lateral-marca { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
  .destinos { display: grid; gap: 4px; }
  .destinos .destino {
    flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 999px;
    font-size: 15px; font-weight: 400; letter-spacing: .01em; transition: background .18s, color .18s; position: relative;
  }
  .destinos .destino:hover { background: var(--surface-2); color: var(--text); }
  .destinos .destino-icono { width: 24px; height: 24px; background: none !important; }
  .destinos .destino[aria-current="page"] { background: var(--primary-soft); color: var(--primary-texto); }
  .lateral-pie { margin-top: auto; display: grid; gap: 12px; }
  .lateral-estado {
    display: grid; gap: 2px; padding: 14px; border-radius: 18px; background: var(--hero); border: 1px solid var(--hero-borde); min-width: 0;
  }
  .lateral-nombre { font-size: 14px; line-height: 20px; overflow-wrap: anywhere; font-weight: 400; }
  .lateral-linea { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 400; }
  .punto-estado { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
  .punto-estado.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
  .punto-estado.bk { background: var(--warn); }
  .punto-estado.mal { background: var(--danger); }
  .lateral-plan { font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }
  .marco.con-cartel .lateral { top: 36px; }
  .inferior, .volver-movil, .logo.movil { display: none; }
  .principal { margin-left: 208px; }
  .superior { display: block; }
  .superior-fila { position: static; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; max-width: 1400px; margin: 0 auto; padding: 28px 32px 0; min-height: 0; }
  .superior h1 { font-size: 36px; line-height: 42px; font-weight: 300; letter-spacing: -.01em; }
  .boton-icono { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 18px; }
  .boton-icono:hover { border-color: var(--muted); }
  .solo-escritorio { display: inline; }
  .contenido { max-width: 1400px; padding: 24px 32px 48px; gap: 24px; }
  .tarjeta { padding: 24px; }
  .titulo-tarjeta { margin-bottom: 18px; }

  /* Inicio: el estado ancho arriba y debajo una fila pareja de tarjetas. */
  .grilla-inicio { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .lado { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: stretch; }
  .lado > .tarjeta { height: 100%; }
  .hero { order: 0; }
  .lado { order: 1; }
  .g-consumo { order: 2; }
  .hero {
    display: flex; flex-wrap: wrap; align-items: stretch; gap: 40px; padding: 40px; background: var(--hero);
    border-color: var(--hero-borde); box-shadow: var(--sombra-hero); border-radius: 28px;
  }
  .hero .escena { width: calc(100% + 80px); height: 300px; margin: -40px -40px 0; }
  .hero-datos { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
  .hero .ping-hero { flex: 1.25 1 440px; min-width: 0; margin: 0; padding: 0 0 0 40px; border-top: 0; border-left: 1px solid var(--hero-linea); }
  .hero .grafico-ping { max-width: none; }
  .hero .grafico .linea { stroke: var(--hero-linea); }
  .hero .numeros { border-top-color: var(--hero-linea); margin-top: auto; }
  .hero .numero-enlace:hover { background: var(--primary-soft); }
  .resumen-plan .velocidad { font-size: 120px; line-height: 112px; letter-spacing: -.04em; color: var(--text); }
  .resumen-plan .unidad { font-size: 16px; }
  .plan-nombre { font-size: 15px; margin-bottom: 32px; }
  .numeros { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 20px 16px; padding-top: 24px; }
  .numero .valor { font-size: 28px; line-height: 34px; white-space: nowrap; }
  .resumen-red { font-size: 22px; }
  .frase-antena { font-size: 26px; line-height: 32px; }
  .consumo-cuerpo { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; align-items: start; }
  .consumo-grafico .grafico { max-width: 520px; }
  .consumo-resumen { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; padding: 20px; border-radius: 18px; background: var(--surface-2); }
  .dato-consumo .valor { font-size: 26px; line-height: 32px; font-weight: 300; }

  /* Plan y Cuenta. */
  .grilla-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
  .grilla-cuenta { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .grilla-cuenta .mapa { height: 480px; margin-bottom: 16px; }
  .plan-actual .velocidad { font-size: 48px; line-height: 52px; }

  /* Mi red: los equipos en varias columnas. */
  .grupos-red { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; align-items: stretch; }
  .aviso.con-acciones { flex-wrap: nowrap; align-items: center; }
  .aviso-acciones { flex: none; margin: -8px -6px -8px 0; }
  .tarjeta > .aviso { margin-bottom: 16px; }
  .mapa { height: 320px; }
  .fichas { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .bocas { grid-template-columns: repeat(5, 1fr); gap: 16px; }
  .boca { padding: 16px; }
  .boca.internet { grid-column: auto; }
  .bocas.salidas { grid-template-columns: repeat(3, 1fr); }
  .puertos-uso .grafico { max-width: 520px; }
  .nodo-red .escena, .escena-red { height: 340px; }
  .fondo-modal { align-items: center; padding: 24px; }
  .modal { border-radius: 28px; padding-bottom: 28px; }
}

/* Lista de conexiones (estilo Starlink): una tarjeta-boton por conexion. Celular: el
   mapa arriba y los datos abajo; desde 720 px, el mapa a la izquierda y los datos a la derecha. */
.lista-conexiones { display: grid; gap: 14px; }
.conexion-item {
  display: grid; gap: 14px; width: 100%; text-align: left; color: var(--text); font: inherit; cursor: pointer;
  align-items: center; transition: border-color .18s, background .18s, transform .12s;
}
.conexion-item:hover { border-color: var(--primary-texto); }
.conexion-item:active { transform: scale(.99); }
.conexion-item.actual { border-color: var(--primary-texto); }
.conexion-datos { display: grid; gap: 4px; min-width: 0; }
.conexion-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.conexion-titulo { font-size: 18px; line-height: 26px; overflow-wrap: anywhere; min-width: 0; font-weight: 400; }
.conexion-plan { font-weight: 300; font-size: 16px; }
.conexion-abono { font-size: 14px; }
.conexion-flecha { display: none; color: var(--muted); }
.mapa.chico { height: 140px; margin-bottom: 0; }
.mapa.chico .pin { width: 28px; height: 28px; margin: -26px 0 0 -14px; }
.mapa.chico .pin .icono { width: 28px; height: 28px; }
.mapa.sin-mapa { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
@media (min-width: 720px) {
  .conexion-item { grid-template-columns: 220px 1fr 24px; gap: 20px; }
  .conexion-flecha { display: block; }
  .mapa.chico { height: 120px; }
}
/* Escritorio: tarjetas en grilla de 2-3 columnas, con el mapa arriba y los datos abajo. */
@media (min-width: 900px) {
  .lista-conexiones { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px; }
  .conexion-item { grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; gap: 16px; }
  .conexion-flecha { display: none; }
  .mapa.chico { height: 160px; }
  .conexion-item:hover { box-shadow: 0 8px 32px rgb(47 110 165 / .22); transform: translateY(-2px); }
  .conexion-plan { font-size: 20px; }
  .conexion-abono { font-size: 15px; }
}


/* Latencia de los ultimos 60 minutos: un solo eje Y en ms; la linea tenue en 20 ms es el corte de "Buena". */
/* El grafico de latencia dentro del resumen, separado de los numeros por una linea. */
.ping-hero { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hero-linea); }
.ping-cab { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.ping-cab .subtitulo { margin: 0; }
.grafico-ping .traza-ping { fill: none; stroke: var(--serie1); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.grafico-ping .punto-ping { fill: var(--serie1); opacity: .85; }
.grafico-ping .ref-ping { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; opacity: .45; }

/* Senal en la ficha, tipo de conexion y linea de latencia con su (i). */
.ficha-senal { display: inline-flex; line-height: 0; }
.ficha-senal .barras-senal { width: 22px; height: 16px; }
.tipo-conexion { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; margin: 4px 0 8px; }
.linea-latencia { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; }
.linea-latencia .num { margin-left: 0; }
.linea-latencia .boton-info { margin: -8px 0; }

/* Modo en vivo: boton con contador, y las medidas de cada equipo (enlace WiFi y latencia). */
.boton-icono.vivo-activo { color: var(--ok); }
.punto-vivo { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); flex: none; animation: latido 1.4s ease-in-out infinite; }
@keyframes latido { 50% { opacity: .35; } }
.vivo-texto { font-size: 13px; line-height: 18px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ficha-vivo { display: block; height: 15px; max-width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 11px; line-height: 15px; color: var(--muted); }
.ficha-vivo > .vv + .vv { margin-left: 6px; }
.ficha-vivo .vv-pre { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vv.buena { color: var(--ok); }
.vv.regular { color: var(--warn); font-weight: 500; }
.vv.mala { color: var(--danger); font-weight: 500; }
.vv-en-vivo { color: var(--ok); font-weight: 500; }
.linea-latencia-dato { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0 8px; }

/* Escenas 3D (web/escena.js, Three.js): el equipo en el Inicio, la casa en Mi red y el fondo del ingreso.
   Sin WebGL o si falla la carga la caja queda con su fondo suave (Inicio, ingreso) o se esconde (Mi red). */
.escena { position: relative; overflow: hidden; border-radius: 16px; contain: layout paint;
  background: radial-gradient(ellipse at 50% 80%, var(--primary-soft), transparent 70%); }
.escena[hidden] { display: none; }
.escena-lienzo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; outline: none; }
.escena-lienzo:active { cursor: grabbing; }
.escena-router { height: 220px; margin-bottom: 8px; width: 100%; flex: 1 1 100%; }
.escena-red { height: 320px; margin-bottom: 16px; border: 1px solid var(--border); }
.escena-red .escena-ayuda { position: absolute; left: 12px; right: 12px; bottom: 8px; margin: 0; font-size: 12px; line-height: 16px;
  color: var(--muted); pointer-events: none; text-align: center; }
.escena-red[data-sin3d] { display: none; }
.escena-router[data-sin3d] { height: 96px; }
.escena-ingreso { position: fixed; inset: 0; z-index: 0; height: auto; margin: 0; border-radius: 0; pointer-events: none; contain: strict; }
.escena-ingreso .escena-lienzo { cursor: auto; touch-action: auto; }
.ingreso { position: relative; z-index: 1; }
.escena-etiqueta { position: absolute; transform: translate(-50%, -100%); max-width: 70%; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); font-size: 13px; line-height: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.escena-etiqueta[hidden] { display: none; }
/* Primer toque: el nombre y, abajo, que se toque de nuevo (o el cartel) para entrar al detalle. */
.escena-etiqueta.con-pista { pointer-events: auto; cursor: pointer; border-radius: 12px; text-align: center; }
.escena-pista { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }
.escena-pista:empty { display: none; }
.escena-volver {
  position: absolute; top: 12px; left: 12px; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
  font-weight: 500; cursor: pointer; box-shadow: var(--sombra);
}
.escena-volver[hidden] { display: none; }
/* "Ver otro modelo" de la fuente PoE (escena.js): arriba a la izquierda (a la derecha tapaba el cartel de la
   torre) y debajo de "Ver toda la casa" cuando ese esta. */
.escena-volver:not([hidden]) ~ .escena-poe { top: 56px; }
/* La guía paso a paso del router sin corriente (web/guia.js, HANDOFF §109): la escena, los pasos y sus carteles. */
.guia-fuente { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: space-between; margin: -4px 0 10px; font-size: 14px; }
.guia-fuente .enlace { width: auto; margin: 0; padding: 4px 0; min-height: 0; }
.escena-guia { height: auto; aspect-ratio: 4 / 3; border-radius: 20px; margin: 0 0 14px; border: 1px solid var(--border);
  background: radial-gradient(60% 80% at 50% 100%, var(--primary-soft), transparent); }
.escena-guia[data-sin3d] { display: none; }
.guia-canvas3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.guia-progreso { display: flex; gap: 6px; margin-bottom: 10px; }
.guia-progreso span { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-2); transition: background .3s; }
.guia-progreso span.hecho { background: var(--primary-texto); }
.guia-num { margin: 0; font-size: 13px; }
.guia-titulo { margin: 2px 0 6px; font-size: 19px; line-height: 26px; font-weight: 500; }
.guia-texto { margin: 0 0 14px; min-height: 4.4em; }
.guia-texto b { color: var(--primary-texto); font-weight: 500; }
.guia-botones { display: flex; gap: 10px; }
.guia-botones .boton { flex: 1; }
.escena-guia .etq3d { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: none; white-space: nowrap;
  background: var(--panel); color: var(--text); border: 1px solid var(--primary-texto); border-radius: 99px; padding: 5px 11px;
  font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgb(0 0 0 / .25); transition: opacity .25s; }
.escena-guia .etq3d.ok { border-color: var(--ok); color: var(--ok); }
.escena-guia .clic3d { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none;
  font-weight: 800; font-size: 18px; color: var(--ok); text-shadow: 0 1px 6px rgb(0 0 0 / .4); transition: opacity .15s, transform .2s; }
.escena-guia .clic3d.ver { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.escena-guia .ciclo { position: absolute; left: 12px; right: 112px; bottom: 14px; height: 5px; border-radius: 5px; background: rgb(128 140 155 / .3); overflow: hidden; }
.escena-guia .ciclo span { display: block; height: 100%; width: 0; background: var(--primary-texto); border-radius: 5px; }
.escena-guia .ciclo.fin span { background: var(--ok); }
.escena-guia .otra { position: absolute; left: 50%; top: 12px; transform: translate(-50%, -6px); opacity: 0; transition: opacity .2s, transform .2s;
  background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; pointer-events: none; }
.escena-guia .otra.ver { opacity: 1; transform: translate(-50%, 0); }
.escena-guia .controles { position: absolute; right: 8px; bottom: 6px; display: flex; gap: 6px; }
.escena-guia .controles button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--panel); color: var(--text);
  display: grid; place-items: center; padding: 0; box-shadow: 0 2px 8px rgb(0 0 0 / .18); cursor: pointer; }
.escena-guia .controles svg { width: 20px; height: 20px; fill: currentColor; }
.escena-guia .pista3d { position: absolute; left: 0; top: 0; transform: translate(-50%, 0) scale(.85); opacity: 0; pointer-events: none; white-space: nowrap;
  background: var(--primary); color: var(--on-primary); border-radius: 99px; padding: 5px 11px; font-size: 13px; font-weight: 600; transition: opacity .2s, transform .2s; }
.escena-guia .pista3d.ver { opacity: 1; transform: translate(-50%, 0) scale(1); }
@media (min-width: 900px) { .escena-guia { aspect-ratio: 16 / 9; } }
@media (min-width: 900px) {
  .escena-router { height: 240px; }
  .escena-red { height: 420px; }
}

/* Mi red en criollo (HANDOFF §44): la ayuda arriba de la lista, el enlace a las sugerencias y las
   sugerencias plegadas al final, en tono neutro (no son fallas). La frase del detalle de un equipo. */
.ayuda-lista { color: var(--muted); font-size: 14px; line-height: 20px; max-width: 68ch; margin: 12px 0 0; }
.enlace-mejoras {
  appearance: none; border: 0; background: transparent; color: var(--primary-texto); font: inherit; font-size: 14px;
  font-weight: 500; padding: 0; min-height: 44px; cursor: pointer; text-align: left;
}
.enlace-mejoras:hover { text-decoration: underline; }
.mejoras { margin-top: 16px; border-top: 1px solid var(--border); }
.mejoras > .suave { margin: 0 0 12px; max-width: 68ch; }
.mejoras .avisos { margin-bottom: 8px; }
.tarjeta .mejoras .aviso { margin-bottom: 0; }
.aviso.sugerencia { background: var(--surface); }
.aviso.sugerencia > .icono { color: var(--warn); }
.frase-equipo { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-size: 15px; line-height: 22px; }
.frase-equipo.regular { background: var(--warn-soft); }
.frase-equipo.mal { background: var(--danger-soft); }
.ayudas { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 -10px 4px; }
.boton-ayuda {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--primary-texto); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.boton-ayuda .icono { width: 18px; height: 18px; }
.boton-ayuda:hover { background: var(--surface-2); }

/* Detalle de un equipo (HANDOFF §45): cabecera con icono y donde esta, la frase, tres medidores en
   palabras y lo tecnico plegado. En el celular es una hoja chica (no tapa todo): alto tope y agarradera. */
.detalle-cab { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 14px; }
.detalle-icono { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--primary-texto); }
.detalle-icono.regular { border-color: var(--warn); }
.detalle-icono.mal { border-color: var(--danger); }
.detalle-icono .icono { width: 24px; height: 24px; }
.detalle-titulo { min-width: 0; }
.modal .detalle-titulo h2 { margin: 0; font-size: 20px; line-height: 26px; overflow-wrap: anywhere; }
.modal .detalle-titulo p { margin: 2px 0 0; font-size: 13px; line-height: 18px; }
.medidores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.medidor { display: grid; gap: 4px; align-content: start; padding: 12px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.medidor-titulo { font-size: 12px; line-height: 16px; color: var(--muted); }
.medidor-valor { display: flex; flex-direction: column; gap: 2px; min-height: 40px; }
.medidor-valor .barras-senal { width: 28px; height: 20px; }
.medidor-numero { font-size: 17px; line-height: 22px; }
.medidor-palabra { font-size: 15px; line-height: 20px; font-weight: 500; }
.medidor-palabra.buena { color: var(--ok); }
.medidor-palabra.regular { color: var(--warn); }
.medidor-palabra.mala { color: var(--danger); }
.medidor-ayuda { font-size: 11px; line-height: 14px; color: var(--muted); }
.modal .detalle-hoy { font-size: 14px; color: var(--muted); }
.detalle-hoy strong { color: var(--text); font-weight: 500; }
.detalle-tecnico > summary { padding-top: 4px; }
@media (max-width: 899px) {
  .modal.hoja { max-height: 72vh; padding-top: 22px; position: relative; }
  .modal.hoja::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--border); }
  .modal.hoja .frase-equipo { font-size: 14px; line-height: 20px; padding: 10px 12px; }
  .modal.hoja .modal-acciones { margin-top: 8px; }
  .medidor { padding: 10px 8px; }
}

/* Graficos que se tocan (HANDOFF §45): la linea con el punto elegido arriba, la columna o el minuto
   resaltado y el foco del teclado. touch-action deja el scroll vertical al navegador. */
.grafico-tocable { display: grid; gap: 6px; }
.grafico-tocable .grafico { touch-action: pan-y; cursor: crosshair; border-radius: 8px; }
.lectura { min-height: 40px; font-size: 14px; line-height: 20px; margin: 0; }
.lectura strong { font-weight: 500; }
.tocar-ayuda { margin: 0; }
.grafico .guia { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.grafico .punto-sel { fill: var(--serie1); stroke: var(--panel); stroke-width: 2; }
.grafico .columna-sel { fill: var(--surface-2); }
.grafico .barra-bajada, .grafico .barra-subida { opacity: .7; transition: opacity .15s; }
.grafico .barra-bajada.sel, .grafico .barra-subida.sel { opacity: 1; }
.consumo-resumen { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; padding: 16px; border-radius: 18px; background: var(--surface-2); margin-top: 12px; }
.dato-consumo .valor { font-size: 22px; line-height: 28px; font-weight: 300; }
.dato-consumo .etiqueta { font-size: 13px; line-height: 18px; color: var(--muted); }

/* Tu WiFi, Configuracion avanzada y Cuenta (HANDOFF §45). */
.acciones-lista { display: grid; gap: 4px; margin-top: 8px; }
.boton-accion {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; width: 100%; min-height: 56px;
  padding: 8px 10px; margin: 0 -10px; width: calc(100% + 20px); border: 0; border-radius: 14px; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.boton-accion:hover { background: var(--surface-2); }
.boton-accion > .icono { width: 22px; height: 22px; color: var(--primary-texto); }
.boton-accion-texto { display: grid; gap: 2px; min-width: 0; }
.boton-accion-texto strong { font-weight: 500; font-size: 15px; line-height: 20px; }
.boton-accion-texto .suave { font-size: 13px; line-height: 18px; }
.boton-accion-flecha .icono { width: 18px; height: 18px; color: var(--muted); }
.lista-redes { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.lista-redes li { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); }
.lista-redes li .mono { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lista-redes .icono { width: 20px; height: 20px; color: var(--primary-texto); }
.controles-pronto { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; opacity: .6; }
.campo-pronto { display: grid; gap: 6px; }
/* "RN_ApellidoNombre_" fijo y el resto del nombre al lado (red de invitados) */
.prefijo-fijo { display: flex; align-items: center; gap: 4px; min-width: 0; }
.prefijo-fijo > span { flex: none; overflow-wrap: anywhere; }
.prefijo-fijo > input { flex: 1; min-width: 0; }
.cartel-pronto { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--primary-soft); font-size: 14px; line-height: 20px; }
.cartel-pronto .icono { flex: none; width: 20px; height: 20px; color: var(--primary-texto); }
.estado-cuenta { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--surface); margin-bottom: 8px; }
.estado-cuenta > .icono { flex: none; width: 24px; height: 24px; color: var(--muted); }
.estado-cuenta strong { display: block; font-size: 17px; line-height: 24px; font-weight: 500; }
.estado-cuenta p { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.estado-cuenta.bien { background: var(--ok-soft); }
.estado-cuenta.bien > .icono { color: var(--ok); }
.estado-cuenta.regular { background: var(--warn-soft); }
.estado-cuenta.regular > .icono { color: var(--warn); }
.estado-cuenta.mal { background: var(--danger-soft); }
.estado-cuenta.mal > .icono { color: var(--danger); }
.facturas { list-style: none; margin: 0; padding: 0; }
.factura { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.factura > div:first-child { display: grid; gap: 2px; min-width: 0; }
.factura .suave { font-size: 13px; line-height: 18px; }
.factura-lado { display: grid; justify-items: end; gap: 4px; flex: none; }
@media (max-width: 899px) {
  .modal.hoja .modal-acciones .boton { min-height: 44px; padding: 8px 14px; font-size: 14px; }
}
.pastilla.simulado { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); }

/* Clave actual, alcance del filtro por DNS y precio del plan (HANDOFF §47). */
.etiqueta-campo { font-size: 13px; line-height: 18px; color: var(--muted); }
.clave-actual { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--surface); }
.clave-actual .mono { overflow-wrap: anywhere; font-size: 15px; }
.opcion-radio, .opcion-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; }
.opcion-radio input, .opcion-check input { width: 18px; height: 18px; margin: 0; flex: none; }
.opcion-check .icono { width: 18px; height: 18px; color: var(--primary-texto); }
.lista-equipos-filtro { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 12px; max-height: 220px; overflow-y: auto;
  padding: 4px 12px; border-radius: 14px; background: var(--surface); }
/* De que lado de un puente inalambrico esta cada equipo (HANDOFF §103): el nombre arriba y las dos opciones abajo
   en el celular (todas las filas iguales); en escritorio, en una linea. */
.lados-puente { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; padding: 0 12px;
  border-radius: 14px; background: var(--surface); }
.fila-lado { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; padding: 6px 0;
  border-bottom: 1px solid var(--border); }
.fila-lado:last-child { border-bottom: none; }
.nombre-lado { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; min-width: 0; flex: 1 1 100%; }
.nombre-lado .icono { width: 18px; height: 18px; flex: none; color: var(--primary-texto); }
.opciones-lado { display: flex; gap: 16px; }
@media (min-width: 900px) { .nombre-lado { flex: 1 1 auto; } }
.precio-plan { margin-top: 6px; font-size: 15px; color: var(--text); }
.opcion-radio, .opcion-check { text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--text); margin: 0; }

/* Registros (HANDOFF §48): pestañas, un renglon por evento con icono, texto y hora; agrupado por dia. */
.pestanas-registros { max-width: 360px; margin-bottom: 16px; }
.registros { list-style: none; margin: 0 0 8px; padding: 0; }
.registro { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.registro:last-child { border-bottom: 0; }
.registro-icono { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); color: var(--primary-texto); }
.registro-icono .icono { width: 18px; height: 18px; }
.registro.regular .registro-icono { color: var(--warn); background: var(--warn-soft); }
.registro-texto { display: grid; gap: 2px; font-size: 14px; line-height: 20px; padding-top: 5px; min-width: 0; }
.registro-estado { margin-left: 8px; vertical-align: 1px; }
.registro.tenue .registro-texto > span:first-child { color: var(--muted); }
.registro-hora { font-size: 12px; color: var(--muted); padding-top: 7px; }
.dia-registro { text-transform: none; letter-spacing: normal; font-size: 13px; font-weight: 500; color: var(--text); margin-top: 18px; }
.dia-registro::first-letter { text-transform: uppercase; }

/* Ajustes del router con backend (HANDOFF §49): controles prendidos, clave nueva con "Mostrar" y la previa. */
.controles-ajuste { display: grid; gap: 12px; margin: 0 0 12px; }
.clave-nueva { display: flex; align-items: center; gap: 8px; }
.clave-nueva input { flex: 1; min-width: 0; }
.clave-actual + .clave-actual { margin-top: 6px; }
.clave-actual > .suave { flex: none; font-size: 13px; }
.previa { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 8px; line-height: 22px; }
.nodo-cambios[hidden] { display: none; }
.factura-lado .boton-ocultar { padding: 2px 10px; font-size: 13px; }

/* Alinear (instalador): una columna angosta en cualquier pantalla, sin barra lateral; el numero grande se lee
   desde el techo con el celular en una mano. */
.marco.alinear .contenido { max-width: 720px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
/* La lectura se redibuja cada 2 s: con la entrada de .contenido > * todas las tarjetas volvian a aparecer y subir
   (operador, 24/10/2026: "la pagina se refresca constantemente"). */
.marco.alinear .contenido > * { animation: none; }
.alinear-instalacion { display: grid; gap: 12px; }
.alinear-medida { display: grid; justify-items: center; gap: 6px; text-align: center; }
.alinear-medida.bien { border-color: var(--ok); box-shadow: var(--glow-ok); }
.alinear-medida.regular { border-color: var(--warn); }
.alinear-medida.mal { border-color: var(--danger); }
.alinear-cifra { font-size: 88px; line-height: 92px; font-weight: 200; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.alinear-cifra small { font-size: 22px; font-weight: 300; color: var(--muted); letter-spacing: 0; }
.alinear-rumbo { display: grid; justify-items: center; gap: 2px; text-align: center; }
.alinear-rumbo-dato { font-size: 40px; line-height: 46px; font-weight: 300; font-variant-numeric: tabular-nums; }
.alinear-cadenas { display: grid; gap: 10px; }
.alinear-cadena { display: grid; grid-template-columns: 80px 1fr 72px; align-items: center; gap: 10px; }
.alinear-cadena .valor { text-align: right; font-variant-numeric: tabular-nums; }
.alinear-barra { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.alinear-barra-llena { display: block; height: 100%; border-radius: 999px; background: var(--serie1); }
.alinear-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alinear-edad { text-align: center; }
@media (min-width: 900px) {
  .marco.alinear .principal { margin-left: 0; }
  .marco.alinear .superior-fila, .marco.alinear .contenido { max-width: 720px; }
}

/* --- Historial de la red (operador, 25/10/2026) --- */
/* Un AP, repetidor o antena que no se ve: borde y fondo rojos, siempre con su texto ("No lo vemos"). */
.grupo-red.ausente { border-color: var(--danger); background: var(--danger-soft); }
.grupo-red.ausente .grupo-cab svg { color: var(--danger); }
.acciones-ausente { display: flex; flex-wrap: wrap; gap: 8px; }
.historial { display: grid; gap: 14px; min-height: 120px; }
.bloque-historial { display: grid; gap: 4px; }
.bloque-historial p { margin: 0; }
.grafico-historial { max-width: none; }
.grafico-historial .traza-ping { fill: none; stroke: var(--serie1); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.grafico-historial .punto-ping { fill: var(--serie1); }
/* Del mas bajo al mas alto de cada balde (lineas suaves, app.js): tenue, para que el pico no se pierda. */
.grafico .banda { fill: var(--serie1); stroke: none; opacity: .16; }
.vistos { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.visto { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 14px; padding: 6px 8px; background: var(--surface); }
.visto-boton { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; border: 0; background: transparent;
  color: inherit; text-align: left; font: inherit; cursor: pointer; padding: 0; }
.visto-texto { display: grid; min-width: 0; }
.visto-texto strong, .visto-texto .suave { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visto-texto .suave { font-size: 13px; }
.visto:not(.conectado) .ficha-icono { color: var(--muted); }

/* Velocidad de la casa (HANDOFF §133): bajada y subida como el resto de la app; el pico de bajada, punteado y tenue. */
.grafico-velocidad { max-width: 640px; }
.grafico-velocidad .traza-bajada, .grafico-velocidad .traza-subida, .grafico-velocidad .traza-pico {
  fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.grafico-velocidad .traza-bajada { stroke: var(--serie1); }
.grafico-velocidad .traza-subida { stroke: var(--serie2); }
.grafico-velocidad .traza-pico { stroke: var(--serie1); stroke-width: 1; stroke-dasharray: 3 3; opacity: .55; }
.nodo-velocidad { display: grid; gap: 10px; }
.nodo-velocidad[hidden] { display: none; }
.leyenda-velocidad { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.leyenda-velocidad span::before { content: ''; display: inline-block; width: 14px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }
.leyenda-velocidad .bajada::before { border-color: var(--serie1); }
.leyenda-velocidad .subida::before { border-color: var(--serie2); }
.leyenda-velocidad .pico::before { border-color: var(--serie1); border-top-style: dashed; opacity: .6; }
