/* Red GNSS · panel
   Identidad: el símbolo cartográfico del vértice geodésico (triángulo con punto) marca las
   estaciones en todo el panel. Verde selva para la estructura, amarillo de campo para el acento. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fuentes/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fuentes/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fuentes/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("fuentes/barlow-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("fuentes/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("fuentes/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fuentes/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --selva: #12261e;
  --selva-2: #1b3a2d;
  --selva-3: #26503e;
  --vertice: #f2b33d;
  --vertice-osc: #8a5a00;
  --papel: #eff2ef;
  --blanco: #ffffff;
  --tinta: #17201c;
  --gris: #5b6862;
  --gris-2: #8a958f;
  --linea: #d6ddd8;
  --linea-2: #e7ece8;
  --ok: #12754f;   --ok-f: #e0f1e8;
  --mal: #b02a1f;  --mal-f: #fbe8e5;
  --pend: #a95100; --pend-f: #fcecd9;
  --neutro: #4d5953; --neutro-f: #e9edea;
  --rover: #1c65a8; --rover-f: #e2edf8;
  --radio: 10px;
  --radio-ctl: 7px;
  --texto: "Barlow", "Segoe UI", system-ui, sans-serif;
  --titulos: "Barlow Semi Condensed", "Barlow", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ancho-lateral: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 400 15px/1.5 var(--texto);
  font-variant-numeric: tabular-nums;
}
a { color: var(--selva-3); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--selva); }
h1, h2, h3 { font-family: var(--titulos); font-weight: 700; margin: 0; letter-spacing: -0.005em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-weight: 500; font-size: 0.93em; }
:focus-visible { outline: 3px solid var(--vertice); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ estructura */
.app {
  display: grid; grid-template-columns: var(--ancho-lateral) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(90deg, var(--selva) 0 var(--ancho-lateral), var(--papel) var(--ancho-lateral));
}

.lateral {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--selva); color: #d7e3dc;
  padding: 22px 14px 16px;
}
.marca { display: flex; gap: 11px; align-items: center; padding: 0 8px 20px; color: #fff; text-decoration: none; }
.marca:hover { color: #fff; }
.marca svg { width: 34px; height: 34px; flex: none; }
.marca b { display: block; font: 700 17px/1.05 var(--titulos); letter-spacing: 0.02em; }
.marca span { display: block; font: 600 13px/1.2 var(--titulos); color: var(--vertice); letter-spacing: 0.04em; margin-top: 2px; }

.estado-red {
  display: flex; align-items: center; gap: 8px;
  margin: 0 4px 18px; padding: 9px 10px;
  border: 1px solid var(--selva-3); border-radius: var(--radio-ctl);
  font-size: 13px; color: #c5d4cb;
}
.estado-red svg { width: 15px; height: 15px; }
.estado-red b { color: #fff; font-weight: 600; }

.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radio-ctl);
  color: #c9d7cf; text-decoration: none; font-weight: 500;
}
.menu a:hover { background: var(--selva-2); color: #fff; }
.menu a[aria-current="page"] { background: var(--selva-2); color: #fff; font-weight: 600; }
.menu a[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px;
  background: var(--vertice); border-radius: 0 3px 3px 0;
}
.menu .contador {
  margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 99px;
  background: var(--vertice); color: var(--selva); font-size: 12px; font-weight: 700; text-align: center;
}

.lateral-pie { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--selva-2); }
.quien b { display: block; color: #fff; font-weight: 600; line-height: 1.25; }
.quien span { font-size: 13px; color: #9fb3a8; }
.lateral-pie .acciones-cuenta { display: flex; gap: 6px; margin-top: 10px; }
.lateral-pie .acciones-cuenta a,
.lateral-pie .acciones-cuenta button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: var(--radio-ctl);
  border: 1px solid var(--selva-3); background: transparent; color: #d7e3dc;
  font: 500 13px var(--texto); text-decoration: none; cursor: pointer;
}
.lateral-pie .acciones-cuenta a:hover,
.lateral-pie .acciones-cuenta button:hover { background: var(--selva-2); color: #fff; }
.lateral-pie form { margin: 0; }
.nota-hora { margin-top: 12px; font-size: 12px; color: #7f978a; }

.barra-movil { display: none; }
.velo { display: none; }

.principal { min-width: 0; }
.contenido { max-width: 1240px; margin: 0 auto; padding: 30px 32px 48px; }

/* ------------------------------------------------------------------ encabezado de página */
.encabezado {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 14px 24px; margin-bottom: 22px;
}
.encabezado h1 { font-size: 32px; line-height: 1.1; }
.encabezado .contexto { margin-top: 6px; color: var(--gris); max-width: 72ch; }
.encabezado .volver { display: inline-block; margin-bottom: 6px; font-size: 14px; color: var(--gris); text-decoration: none; }
.encabezado .volver:hover { color: var(--tinta); text-decoration: underline; }
.titulo-con-estado { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acciones form { margin: 0; }

/* ------------------------------------------------------------------ avisos */
.aviso {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 16px; padding: 12px 14px;
  border: 1px solid var(--linea); border-left: 4px solid var(--selva-3); border-radius: var(--radio-ctl);
  background: var(--blanco);
}
.aviso.ok { border-left-color: var(--ok); }
.aviso.error { border-left-color: var(--mal); background: var(--mal-f); }
.aviso.atencion { border-left-color: var(--vertice); background: #fff8e8; }
.aviso .ico { margin-top: 2px; }

/* ------------------------------------------------------------------ paneles */
.panel { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); margin-bottom: 20px; min-width: 0; }
.panel-cab {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 10px 18px; padding: 16px 20px 14px; border-bottom: 1px solid var(--linea-2);
}
.panel-cab h2 { font-size: 19px; line-height: 1.25; }
.panel-cab p { margin-top: 3px; color: var(--gris); font-size: 14px; max-width: 75ch; }
.panel-cuerpo { padding: 18px 20px 20px; }
.panel-cuerpo + .panel-cuerpo { border-top: 1px solid var(--linea-2); }
.panel h3 { font-size: 16px; margin-bottom: 4px; }
.panel.plano { background: transparent; border: none; }

.rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.rejilla > .panel { margin-bottom: 0; }
.rejilla.ancha-izq { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }

/* ------------------------------------------------------------------ lectura de estado (resumen) */
.lectura {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio);
  margin-bottom: 20px;
}
.lectura > div { padding: 14px 18px; border-left: 1px solid var(--linea-2); }
.lectura > div:first-child { border-left: none; }
.lectura .valor { font: 700 30px/1.05 var(--titulos); }
.lectura .valor small { font-size: 18px; color: var(--gris-2); font-weight: 600; }
.lectura .etiqueta { margin-top: 3px; color: var(--gris); font-size: 13.5px; line-height: 1.3; }
.lectura .ok .valor { color: var(--ok); }
.lectura .mal .valor { color: var(--mal); }
.lectura .pend .valor { color: var(--pend); }

/* ------------------------------------------------------------------ mapa */
.mapa-envoltura { position: relative; }
#mapa { height: 430px; border-radius: 0 0 var(--radio) var(--radio); background: #dfe6e1; z-index: 0; }
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 20px; border-top: 1px solid var(--linea-2); font-size: 13px; color: var(--gris); }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda svg { width: 14px; height: 14px; }
.leyenda .punto-rover { width: 10px; height: 10px; border-radius: 50%; background: var(--rover); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--rover); margin: 0 2px; }
.marcador-vertice { background: none; border: none; }
.marcador-vertice svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }

/* ------------------------------------------------------------------ vértice (símbolo de estación) */
.vertice { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; }
.vertice .tri { fill: currentColor; }
.vertice .pto { fill: #fff; }
.vertice.ok { color: var(--ok); }
.vertice.mal { color: var(--mal); }
.vertice.pend { color: var(--pend); }
.vertice.neutro { color: var(--gris-2); }

/* ------------------------------------------------------------------ estados */
.estado {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 2px 10px 2px 8px; border-radius: 99px;
  font-size: 13px; font-weight: 600; line-height: 20px;
  background: var(--neutro-f); color: var(--neutro);
}
.estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.estado.ok { background: var(--ok-f); color: var(--ok); }
.estado.mal { background: var(--mal-f); color: var(--mal); }
.estado.pend { background: var(--pend-f); color: var(--pend); }
.estado.info { background: var(--rover-f); color: var(--rover); }
.estado.oscuro { background: var(--tinta); color: #fff; }
.estado.sin-punto::before { display: none; }

.etiqueta-suave { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--linea-2); color: var(--gris); font-size: 12.5px; font-weight: 600; }
.debil { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; background: var(--pend-f); color: var(--pend); font-size: 12px; font-weight: 600; }

/* ------------------------------------------------------------------ tablas */
.tabla-scroll { overflow-x: auto; }
table.tabla { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tabla th {
  text-align: left; padding: 10px 12px; white-space: nowrap;
  font: 600 13px/1.2 var(--texto); color: var(--gris);
  background: #f6f8f6; border-bottom: 1px solid var(--linea);
}
.tabla td { padding: 11px 12px; border-bottom: 1px solid var(--linea-2); vertical-align: middle; }
.tabla tbody tr:last-child td { border-bottom: none; }
.tabla tbody tr:hover td { background: #fafbfa; }
.tabla .num { text-align: right; }
.tabla th:first-child, .tabla td:first-child { padding-left: 20px; }
.tabla th:last-child, .tabla td:last-child { padding-right: 20px; }
.principal-celda { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.principal-celda > a, .principal-celda > b { font-weight: 600; color: var(--tinta); text-decoration: none; white-space: nowrap; }
.principal-celda > a:hover { text-decoration: underline; }
.secundario { display: block; color: var(--gris); font-size: 13px; line-height: 1.35; }
.en-linea-txt { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-weight: 600; }
.en-linea-txt::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.acciones-fila { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: nowrap; }
.acciones-fila form { margin: 0; }
.vacio { padding: 26px 20px; text-align: center; color: var(--gris); }
.vacio .boton { margin-top: 10px; }

/* ------------------------------------------------------------------ credenciales */
.credencial {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%;
  padding: 1px 2px 1px 9px; border: 1px solid var(--linea); border-radius: var(--radio-ctl);
  background: #f7f9f7;
}
.credencial code { font-size: 13.5px; color: var(--tinta); white-space: nowrap; }
.credencial .boton.icono { width: 28px; height: 28px; border: none; background: transparent; }
.credencial .boton.icono:hover { background: var(--linea-2); }

.ficha-datos { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; align-items: center; margin: 0; }
.ficha-datos dt { color: var(--gris); font-size: 14px; }
.ficha-datos dd { margin: 0; min-width: 0; }
.ficha-datos dd.texto { font-weight: 500; }

/* ------------------------------------------------------------------ botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 7px 14px;
  border: 1px solid var(--linea); border-radius: var(--radio-ctl);
  background: var(--blanco); color: var(--tinta);
  font: 600 14.5px/1.2 var(--texto); text-decoration: none; white-space: nowrap; cursor: pointer;
}
.boton:hover { border-color: var(--gris-2); color: var(--tinta); }
.boton.primario { background: var(--selva); border-color: var(--selva); color: #fff; }
.boton.primario:hover { background: var(--selva-2); border-color: var(--selva-2); color: #fff; }
.boton.peligro { color: var(--mal); border-color: #e9c3be; }
.boton.peligro:hover { background: var(--mal-f); border-color: var(--mal); }
.boton.discreto { border-color: transparent; background: transparent; }
.boton.discreto:hover { background: var(--linea-2); }
.boton.pequeno { min-height: 32px; padding: 4px 11px; font-size: 13.5px; }
.boton.icono { width: 36px; min-height: 0; height: 36px; padding: 0; }
.boton.icono.pequeno { width: 30px; height: 30px; }
.boton.copiado { color: var(--ok); }

/* interruptor de pausa en la lista de clientes */
.interruptor {
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 4px;
  border: 1px solid var(--linea); border-radius: 99px; background: var(--blanco);
  font: 600 13px var(--texto); color: var(--gris); cursor: pointer; white-space: nowrap;
}
.interruptor .pista { position: relative; width: 30px; height: 18px; border-radius: 99px; background: #c4ccc7; transition: background .15s; }
.interruptor .pista::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.interruptor.encendido { color: var(--ok); }
.interruptor.encendido .pista { background: var(--ok); }
.interruptor.encendido .pista::after { transform: translateX(12px); }

/* ------------------------------------------------------------------ formularios */
label { display: block; margin-bottom: 5px; font-size: 13.5px; font-weight: 600; color: #333d38; }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=date],
input[type=month], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px;
  border: 1px solid #c8d0cb; border-radius: var(--radio-ctl); background: var(--blanco);
  font: 400 15px/1.3 var(--texto); color: var(--tinta);
}
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--selva-3); outline: 3px solid rgba(242, 179, 61, .45); outline-offset: 0; }
input::placeholder { color: #9aa49f; }
.campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 16px; }
.campos .ancho { grid-column: 1 / -1; }
.campos.dos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pila { display: grid; gap: 14px; }
.ayuda { margin-top: 6px; color: var(--gris); font-size: 13.5px; line-height: 1.45; }
.casilla { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; font-size: 14.5px; color: var(--tinta); cursor: pointer; margin: 0; }
.casilla input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--selva-3); flex: none; }
.casilla.alineada { padding-top: 28px; }
.fila-botones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.con-boton { display: flex; gap: 6px; }
.con-boton input { flex: 1; min-width: 0; }

.filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.filtros a {
  padding: 6px 12px; border-radius: 99px; border: 1px solid var(--linea);
  color: var(--gris); text-decoration: none; font-size: 14px; font-weight: 500; background: var(--blanco);
}
.filtros a:hover { color: var(--tinta); border-color: var(--gris-2); }
.filtros a[aria-current="true"] { background: var(--selva); border-color: var(--selva); color: #fff; }
.barra-filtros { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--linea-2); }
.buscar { display: flex; gap: 6px; margin: 0; min-width: min(100%, 320px); }
.buscar input { flex: 1; }

/* ------------------------------------------------------------------ hojas (diálogos) */
dialog.hoja {
  width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: none; border-radius: 12px; background: var(--blanco); color: var(--tinta);
  box-shadow: 0 24px 60px rgba(10, 25, 18, .28);
}
dialog.hoja::backdrop { background: rgba(14, 30, 23, .55); }
.hoja-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px 14px; border-bottom: 1px solid var(--linea-2); }
.hoja-cab h2 { font-size: 22px; }
.hoja-cab p { margin-top: 3px; color: var(--gris); font-size: 14px; }
.hoja-cuerpo { padding: 18px 22px 22px; }
.retirar { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--linea-2); }
.retirar .fila-botones { margin-top: 12px; }
.retirar .fila-botones form { margin: 0; }

/* ------------------------------------------------------------------ listas */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--linea-2); }
.lista li:last-child { border-bottom: none; }
.lista .lado { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; text-align: right; }

/* ------------------------------------------------------------------ filtros por columna */
.fila-filtros th { background: #fbfcfb; padding-top: 7px; padding-bottom: 9px; vertical-align: top; }
.fila-filtros input, .fila-filtros select { min-height: 34px; padding: 5px 9px; font-size: 14px; min-width: 110px; }
.fila-filtros input[type=date] { min-width: 140px; }
.rango-fechas { display: grid; gap: 4px; }
.resultado-filtros { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: var(--gris); font-size: 14px; }
.resultado-filtros b { color: var(--tinta); }

/* ------------------------------------------------------------------ eventos */
.tabla-eventos td { font-size: 14px; }
.tabla-eventos .hora { white-space: nowrap; color: var(--gris); font-size: 13.5px; }
.tabla-eventos .que { font-weight: 600; }
.ev-malo { color: var(--mal); }
.ev-bueno { color: var(--ok); }
.tabla-eventos .detalle { color: var(--gris); font-size: 13px; }
.enlace-mapa { display: inline-flex; align-items: flex-start; gap: 4px; color: var(--rover); text-decoration: none; font-weight: 500; }
.enlace-mapa:hover { color: var(--rover); text-decoration: underline; }
.enlace-mapa .ico { width: 15px; height: 15px; margin-top: 1px; }
.eventos-alto { max-height: 640px; overflow-y: auto; }
.eventos-medio { max-height: 420px; overflow-y: auto; }

/* ------------------------------------------------------------------ posición de la antena */
.coordenada { font-family: var(--mono); font-size: 15px; font-weight: 500; }

/* calidad de la señal y de los rovers */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 2px 10px; border-radius: 99px; background: var(--linea-2); font-size: 13.5px; color: var(--gris); }
.chip b { color: var(--tinta); font-weight: 700; }
.chip.ok { background: var(--ok-f); }
.chip.ok b { color: var(--ok); }
.chip.pend { background: var(--pend-f); }
.chip.pend b { color: var(--pend); }
.chip.mal { background: var(--mal-f); }
.chip.mal b { color: var(--mal); }
.barra-pct { display: flex; width: 100%; max-width: 160px; height: 8px; margin-top: 5px; border-radius: 99px; overflow: hidden; background: var(--linea-2); }
.barra-pct span { display: block; height: 100%; }
.barra-pct .fijo { background: var(--ok); }
.barra-pct .flot { background: var(--vertice); }
.comparacion { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.comparacion > div { padding: 12px 14px; border: 1px solid var(--linea-2); border-radius: var(--radio-ctl); }
.comparacion h3 { font-size: 14px; color: var(--gris); font-weight: 600; margin-bottom: 6px; }
.comparacion .grande { font: 700 24px/1.1 var(--titulos); }
.comparacion .grande.ok { color: var(--ok); }
.comparacion .grande.mal { color: var(--mal); }
.pasos { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.lista-avisos { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }

/* ------------------------------------------------------------------ entrada (login) */
.entrada { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; background: var(--blanco); }
.entrada-arte { position: relative; overflow: hidden; background: var(--selva); color: #fff; padding: 44px 48px; display: flex; flex-direction: column; justify-content: space-between; }
.entrada-arte .curvas { position: absolute; inset: 0; width: 100%; height: 100%; color: #3b6a55; }
.entrada-arte .curvas img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.entrada-arte > * { position: relative; }
.entrada-arte .marca { padding: 0; }
.entrada-arte .marca svg { width: 42px; height: 42px; }
.entrada-arte .marca b { font-size: 21px; }
.entrada-arte .marca span { font-size: 15px; }
.entrada-lema { max-width: 30ch; font: 600 30px/1.18 var(--titulos); color: #f2f6f3; }
.entrada-lema small { display: block; margin-top: 12px; font: 400 16px/1.5 var(--texto); color: #b8cbbf; max-width: 42ch; }
.entrada-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.entrada-form form { width: min(380px, 100%); }
.entrada-form h1 { font-size: 30px; margin-bottom: 4px; }
.entrada-form .contexto { color: var(--gris); margin-bottom: 24px; }
.entrada-form .boton { width: 100%; min-height: 44px; margin-top: 8px; }

/* ------------------------------------------------------------------ aviso flotante (copiado) */
.aviso-flotante {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px);
  padding: 9px 16px; border-radius: 99px; background: var(--tinta); color: #fff; font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 2000;
}
.aviso-flotante.visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ página Servidor */
.leido { margin: 0; color: var(--gris); font-size: 13.5px; }
.texto-mal { color: var(--mal); }
.texto-gris { color: var(--gris); }
.medidor { display: flex; width: 100%; height: 10px; border-radius: 99px; overflow: hidden; background: var(--linea-2); }
.medidor.grande { height: 14px; }
.medidor span { display: block; height: 100%; min-width: 0; }
.medidor .usada { background: var(--selva-3); }
.medidor .usada.pend { background: var(--pend); }
.medidor .usada.mal { background: var(--mal); }
.medidor .cache { background: #a9cbb9; }
.medidor .swap { background: var(--vertice); }
.leyenda-medidor { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; font-size: 13.5px; color: var(--gris); }
.leyenda-medidor li { display: inline-flex; align-items: center; gap: 6px; }
.leyenda-medidor b { color: var(--tinta); font-weight: 600; }
.leyenda-medidor i { width: 10px; height: 10px; border-radius: 3px; background: var(--linea-2); border: 1px solid var(--linea); }
.leyenda-medidor i.usada { background: var(--selva-3); border-color: var(--selva-3); }
.leyenda-medidor i.cache { background: #a9cbb9; border-color: #a9cbb9; }
.medidor-titulo { margin: 16px 0 6px; font-size: 13.5px; color: var(--gris); }
.medidor-titulo b { color: var(--tinta); font-weight: 600; }
.subtitulo-panel { margin: 0; padding: 12px 20px 8px; border-top: 1px solid var(--linea-2); font: 600 12.5px/1.2 var(--texto); color: var(--gris); text-transform: uppercase; letter-spacing: .05em; }
.lista.compacta li { padding: 9px 20px; }
.lista.compacta .lado { white-space: nowrap; font-weight: 600; font-size: 14px; }
.lista.compacta .principal-celda > b { white-space: normal; }
.tabla-espacio { border-top: 1px solid var(--linea-2); }
.tabla-espacio td { padding-top: 9px; padding-bottom: 9px; }
.tabla-espacio .num { white-space: nowrap; font-weight: 600; }
.puertos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.puerto { display: inline-flex; align-items: baseline; gap: 5px; padding: 2px 9px; border-radius: 99px; background: var(--rover-f); color: var(--rover); font-size: 13px; font-weight: 700; white-space: nowrap; }
.puerto small { font-size: 12px; font-weight: 500; }
.puerto.local { background: var(--linea-2); color: var(--gris); }
.fila-registro { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fila-registro select { width: auto; flex: 1 1 240px; max-width: 380px; }
.registro {
  margin-top: 12px; padding: 10px 12px; max-height: min(65vh, 620px); overflow: auto;
  border-radius: var(--radio-ctl); background: #0f1f19; color: #dbe7e0; font: 12.5px/1.55 var(--mono);
}
.registro .linea { padding: 1px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.registro .hora { color: #8fb3a2; }
.registro .n-aviso { color: #ffd27a; }
.registro .n-error { color: #ff9d8f; }

/* ------------------------------------------------------------------ pantallas medianas y celulares */
@media (max-width: 1100px) {
  .lectura { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lectura > div:nth-child(4) { border-left: none; }
  .lectura > div:nth-child(n+4) { border-top: 1px solid var(--linea-2); }
}

@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); background: var(--papel); }
  .barra-movil {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 900;
    padding: 10px 14px; background: var(--selva); color: #fff;
  }
  .barra-movil .marca { padding: 0; }
  .barra-movil .marca svg { width: 28px; height: 28px; }
  .barra-movil .marca b { font-size: 15px; }
  .barra-movil .marca span { font-size: 12px; }
  .boton-menu { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--selva-3); border-radius: var(--radio-ctl); background: transparent; color: #fff; cursor: pointer; }
  .boton-menu .ico { width: 22px; height: 22px; }
  .lateral {
    position: fixed; z-index: 1000; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: auto;
    transform: translateX(-102%); transition: transform .2s ease; overflow-y: auto;
  }
  body.menu-abierto .lateral { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
  body.menu-abierto .velo { display: block; position: fixed; inset: 0; z-index: 950; background: rgba(14, 30, 23, .5); }
  .contenido { padding: 22px 16px 40px; }
  .encabezado h1 { font-size: 27px; }
  .rejilla, .rejilla.ancha-izq { grid-template-columns: minmax(0, 1fr); }
  .entrada { grid-template-columns: minmax(0, 1fr); }
  .entrada-arte { min-height: 220px; padding: 26px 22px; gap: 26px; }
  .entrada-lema { font-size: 23px; }
}

@media (max-width: 640px) {
  .comparacion { grid-template-columns: minmax(0, 1fr); }
  .lectura { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lectura > div { border-left: none; border-top: 1px solid var(--linea-2); }
  .lectura > div:nth-child(-n+2) { border-top: none; }
  .lectura > div:nth-child(even) { border-left: 1px solid var(--linea-2); }
  .lectura .valor { font-size: 25px; }
  .lectura > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  #mapa { height: 330px; }
  .panel-cab, .panel-cuerpo { padding-left: 16px; padding-right: 16px; }
  .barra-filtros { padding: 12px 16px; }
  .campos.dos { grid-template-columns: minmax(0, 1fr); }
  .casilla.alineada { padding-top: 0; }
  .ficha-datos { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ficha-datos dd { margin-bottom: 10px; }

  /* tablas convertidas en fichas */
  table.apilable, .apilable thead, .apilable tbody, .apilable tr, .apilable td { display: block; width: 100%; }
  .apilable thead { display: none; }
  .apilable tr { padding: 12px 16px; border-bottom: 1px solid var(--linea-2); }
  .apilable tbody tr:last-child { border-bottom: none; }
  .apilable tbody tr:hover td { background: transparent; }
  .apilable td { padding: 5px 0 !important; border: none; text-align: right; }
  .apilable td::before { content: attr(data-label); float: left; margin-right: 12px; color: var(--gris); font-size: 13px; font-weight: 500; text-align: left; line-height: 30px; }
  .apilable td::after { content: ""; display: block; clear: both; }
  .apilable td.cabeza-ficha { display: block; padding-bottom: 6px !important; text-align: left; }
  .apilable td.cabeza-ficha::before { display: none; }
  .apilable td.vacio { display: block; text-align: center; }
  .apilable td.vacio::before { display: none; }
  .apilable .acciones-fila { justify-content: flex-end; flex-wrap: wrap; }
  .credencial code { white-space: normal; overflow-wrap: anywhere; }
  .apilable td.num { text-align: right; }
  /* en el celular, la fila de filtros del historial queda como un formulario sobre la lista */
  .apilable.con-filtros thead { display: block; }
  .apilable.con-filtros thead tr.titulos { display: none; }
  .apilable.con-filtros thead tr.fila-filtros { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; padding: 12px 16px; border-bottom: 1px solid var(--linea); background: #fbfcfb; }
  .apilable.con-filtros thead tr.fila-filtros th { display: block; padding: 0 !important; background: transparent; border: none; }
  .apilable.con-filtros thead tr.fila-filtros th::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 13px; color: var(--gris); font-weight: 600; }
  .apilable.con-filtros thead tr.fila-filtros th:first-child { grid-column: 1 / -1; }
  .apilable.con-filtros .rango-fechas { grid-template-columns: 1fr 1fr; }
  .fila-filtros input, .fila-filtros select { min-width: 0; width: 100%; }
  .lista li { padding: 12px 16px; flex-direction: column; align-items: flex-start; }
  .lista .lado { justify-content: flex-start; text-align: left; }
  .lista.compacta li { padding: 9px 16px; flex-direction: row; align-items: center; }
  .lista.compacta .lado { justify-content: flex-end; text-align: right; }
  .subtitulo-panel { padding-left: 16px; padding-right: 16px; }
  .fila-registro select { max-width: none; }
  .apilable td.sin-dato { display: none; }
  .registro { font-size: 11.5px; padding: 8px 10px; }
}

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