/* Panel aaHost. Hermano del sitio aahost.co: mismas tintas, mismo acento, misma geometría.
   Dirección: instrumento de operación. Fondo navy, líneas de 1px, ángulos casi rectos, un solo acento (azul cielo).
   Sin estilos en línea (la política de contenido los prohíbe). Todo estado se resuelve con HTML y CSS;
   panel.js solo mejora lo que ya funciona sin él. Las reglas del sistema están en web/DISENO.md. */
:root {
  /* Tinta y superficies: los valores de src/website/site/assets/css/app.css. */
  --fondo: #0A0E14; --elevado: #0F141C; --suave-fondo: #141A23; --tarjeta: #10161E; --alza: #161D27; --hundido: #0A0E14;
  --linea: #212A36; --linea-fuerte: #303B4A; --borde-campo: #5B6877;
  --texto: #E9EEF4; --suave: #A3B0BE; --tenue: #7C8A99;
  /* Un solo acento. */
  --acento: #38BDF8; --acento-vivo: #7DD3FC; --acento-hondo: #0EA5E9; --acento-velo: rgba(56, 189, 248, 0.12);
  --tinta: #04121C; --tinta-suave: #0A3049;
  --ok: #34D399; --ok-velo: rgba(52, 211, 153, 0.12);
  --aviso: #FBBF24; --aviso-velo: rgba(251, 191, 36, 0.14);
  --mal: #F87171; --mal-velo: rgba(248, 113, 113, 0.12);
  --marca: #38BDF8;
  /* Geometría: ángulos rectos, radios mínimos. Sin sombras difusas: líneas. */
  --r-xs: 2px; --r-sm: 3px; --r: 4px; --r-lg: 6px; --r-xl: 8px;
  --r-tarjeta: var(--r-lg); --r-pozo: var(--r); --r-campo: var(--r); --r-boton: var(--r);
  --sans: "aah-sans", "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: "aah-mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mono: var(--f-display);
  --curva: cubic-bezier(0.2, 0.8, 0.2, 1);
  --u: 8px;
  color-scheme: dark;
}
/* Las dos fuentes son variables: un archivo cubre todos los pesos. */
@font-face { font-family: "aah-mono"; src: url(/fonts/jetbrains-mono-700-latin.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "aah-sans"; src: url(/fonts/ibm-plex-sans-400-latin.woff2) format("woff2"); font-weight: 100 700; font-display: swap; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; scrollbar-color: var(--linea-fuerte) transparent; background: var(--fondo); }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 400 15px/1.55 var(--sans); caret-color: var(--acento);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
::selection { background: var(--acento); color: var(--tinta); }
a { color: var(--acento); text-decoration: underline; text-decoration-color: var(--linea-fuerte); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--acento); }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; }
h1 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.875rem); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.035em; overflow-wrap: anywhere; }
h2 { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 1.125rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; overflow-wrap: anywhere; }
/* Marca de sección: el cuadrito hueco de los pasos del sitio. */
.tarjeta > h2::before { content: ""; flex: none; width: 7px; height: 7px; border: 1px solid var(--acento); }
h3 { font-size: 0.875rem; font-weight: 600; letter-spacing: -0.02em; margin: 1.5rem 0 0.35rem; }
p { margin: 0 0 1rem; }
small { color: var(--tenue); font-size: 0.8125rem; }
strong { font-weight: 600; }
.tenue { color: var(--suave); }
.fuerte { font-weight: 600; color: var(--texto); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ruta { font-family: var(--mono); font-weight: 500; font-size: 0.9em; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.ruta.fuerte { font-weight: 600; }
code { font-family: var(--mono); font-weight: 500; font-size: 0.9em; color: var(--acento-vivo); }
.texto-mal { color: var(--mal); }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, pre:focus-visible {
  outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 1px;
}

/* Bloque de marca: logo, «aaHost» y la bajada. */
.marca { display: grid; grid-template-columns: auto auto; column-gap: 12px; row-gap: 3px; align-items: center; justify-content: start; text-decoration: none; }
.marca img { grid-row: 1 / 3; height: 38px; width: auto; }
.marca-nombre { align-self: end; font-family: var(--f-display); font-weight: 700; font-size: 18px; line-height: 1.1; letter-spacing: -0.04em; color: var(--marca); white-space: nowrap; }
.marca-nombre b { color: #fff; font-weight: 700; }
.marca-bajada { align-self: start; font-size: 11px; line-height: 1.2; letter-spacing: 0.01em; color: var(--tenue); white-space: nowrap; }

/* Insignia de icono: inicial de una cuenta o usuario, o el tipo de cosa de la fila (el icon-badge del sitio). */
.redondo {
  flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-xs);
  background: var(--acento-velo); color: var(--acento); font-family: var(--f-display); font-weight: 700; font-size: 0.875rem; text-transform: uppercase;
}
.redondo.menta, .yo .redondo { background: var(--acento); color: var(--tinta); }
.yo .redondo { width: 34px; height: 34px; }

/* Modo «viendo el panel como un cliente»: franja ámbar que no se pierde al bajar. */
.franja {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; flex-wrap: wrap;
  margin: 0; padding: 8px clamp(1rem, 0.4rem + 2vw, 2rem); background: #2B2209; color: #FDE9B4; border-bottom: 1px solid var(--aviso);
}
.franja strong { color: #fff; font-family: var(--f-display); }
.franja button { min-height: 40px; background: var(--aviso); border-color: var(--aviso); color: #231A05; }
.franja button:hover { background: #FCD34D; border-color: #FCD34D; }

.pagina { max-width: 1240px; margin: 0 auto; padding: 1.75rem clamp(1rem, 0.4rem + 2vw, 2rem) 3rem; outline: 0; }
.pagina.ancha { max-width: 1520px; }
.cabecera { display: flex; align-items: center; gap: 0.5rem 0.875rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.cabecera p { margin: 0; }
.cabecera h1 + p, .cabecera h1 + a { align-self: flex-end; padding-bottom: 0.15em; font-size: 0.875rem; }
.miga { margin: 0 0 0.5rem; color: var(--tenue); font-family: var(--f-display); font-weight: 500; font-size: 0.75rem; overflow-wrap: anywhere; }
.miga a { display: inline-block; color: var(--suave); text-decoration: none; padding: 0.7rem 0; }
.miga a:hover { color: var(--acento); }
.pie { padding: 1rem clamp(1rem, 0.4rem + 2vw, 2rem); color: var(--tenue); font-size: 0.75rem; border-top: 1px solid var(--linea); font-family: var(--f-display); }

/* Tarjeta: superficie delimitada por una línea fina; sin sombra. */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-tarjeta); padding: 1.5rem; margin-top: 1rem; scroll-margin-top: 5.5rem; min-width: 0; }
.tarjeta > :last-child { margin-bottom: 0; }
.tarjeta:hover { border-color: var(--linea-fuerte); }
.tarjeta:focus-within, .tarjeta:target { border-color: var(--acento); }
.tarjeta h1 { margin-bottom: 1rem; }
.tarjeta.riesgo, .tarjeta.riesgo:hover { border-color: rgba(248, 113, 113, 0.4); }
.tarjeta.riesgo h2 { color: var(--mal); }
.tarjeta.riesgo > h2::before { border-color: var(--mal); }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 1rem; align-items: start; margin-top: 1rem; }
.duo > .tarjeta { margin-top: 0; }
.duo.desigual { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

/* Campos y botones. */
label { display: grid; gap: 0.4rem; align-content: start; font-size: 0.8125rem; font-weight: 500; color: var(--suave); }
label small { font-weight: 400; }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  width: 100%; min-height: 44px; padding: 0.55rem 0.8rem; font: 400 0.9375rem/1.4 var(--sans); color: var(--texto);
  background: var(--hundido); border: 1px solid var(--borde-campo); border-radius: var(--r-campo);
}
input::placeholder, textarea::placeholder { color: var(--tenue); opacity: 1; }
input:not([type=checkbox]):hover, select:hover, textarea:hover { border-color: var(--suave); }
input:not([type=checkbox]):focus, select:focus, textarea:focus { border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-velo); outline: 0; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.4rem; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--suave) 50%), linear-gradient(135deg, var(--suave) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
textarea { font-family: var(--mono); font-weight: 500; font-size: 0.8125rem; line-height: 1.55; resize: vertical; }
input[type=file] { padding: 0.35rem; color: var(--suave); }
input[type=file]::file-selector-button { margin-right: 0.75rem; min-height: 32px; padding: 0 0.9rem; border: 1px solid var(--linea-fuerte); border-radius: var(--r-sm); background: var(--elevado); color: var(--texto); font: 600 0.75rem var(--f-display); cursor: pointer; }
input[type=checkbox] { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--acento); }
button, .boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 44px; padding: 0.5rem 1.2rem;
  font: 600 0.8125rem/1.2 var(--f-display); letter-spacing: -0.01em; cursor: pointer; text-decoration: none; white-space: nowrap;
  color: var(--texto); background: var(--elevado); border: 1px solid var(--linea-fuerte); border-radius: var(--r-boton);
}
button:hover, .boton:hover { background: var(--suave-fondo); border-color: var(--texto); }
button:active, .boton:active { transform: translateY(1px); }
button.primario { background: var(--acento); border-color: var(--acento); color: var(--tinta); }
button.primario:hover { background: var(--acento-vivo); border-color: var(--acento-vivo); }
button.primario:active { background: var(--acento-hondo); border-color: var(--acento-hondo); }
button.rojo { background: transparent; border-color: var(--mal); color: var(--mal); }
button.rojo:hover { background: var(--mal); border-color: var(--mal); color: #2A0606; }
button.plano { background: transparent; border-color: transparent; color: var(--suave); padding: 0.5rem 0.8rem; min-height: 40px; }
button.plano:hover { background: var(--suave-fondo); border-color: var(--linea-fuerte); color: var(--texto); }
/* En una fila de lista el botón principal va en contorno: el relleno azul se reserva para la acción de la tarjeta. */
.lista .acciones-fila > form > button.primario { background: transparent; border-color: var(--acento); color: var(--acento); min-height: 40px; padding: 0.5rem 1rem; }
.lista .acciones-fila > form > button.primario:hover { background: var(--acento-velo); }
.boton.oscuro { background: var(--tinta); border-color: var(--tinta); color: var(--acento-vivo); }
.boton.oscuro:hover { background: #0A2233; border-color: #0A2233; }
.boton.oscuro:focus-visible { outline-color: var(--tinta); }
.boton-enlace { display: inline-flex; align-items: center; min-height: 40px; padding: 0.5rem 0.8rem; border: 1px solid transparent; border-radius: var(--r-boton); color: var(--suave); font: 600 0.8125rem var(--f-display); text-decoration: none; white-space: nowrap; }
.boton-enlace:hover { background: var(--suave-fondo); border-color: var(--linea-fuerte); color: var(--texto); }

.rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem 1.125rem; align-items: start; }
.tarjeta > .rejilla { max-width: 900px; }
.rejilla .acciones { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.75rem 1rem; flex-wrap: wrap; }
.rejilla .ancho { grid-column: 1 / -1; }
.rejilla.separado, .separado { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--linea); }
.separado-arriba { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--linea); }
.tarjeta > form:not(.rejilla) { display: flex; align-items: center; gap: 0.75rem 1rem; flex-wrap: wrap; }
.tarjeta > form:not(.rejilla) > small { flex: 1 1 280px; }
.lista + form, .vacio + form, .tabla-caja + form { margin-top: 1.25rem; }
.marca-casilla, label.casilla { display: flex; align-items: flex-start; gap: 0.6rem; min-height: 40px; padding: 0.6rem 0; font-size: 0.875rem; font-weight: 400; color: var(--texto); cursor: pointer; flex-wrap: wrap; }
label.casilla small { flex-basis: 100%; padding-left: calc(20px + 0.6rem); }
fieldset { border: 1px solid var(--linea-fuerte); border-radius: var(--r); padding: 0.4rem 1rem 0.5rem; margin: 0; display: flex; flex-wrap: wrap; gap: 0 1.5rem; min-width: 0; }
legend { padding: 0 0.4rem; font-size: 0.8125rem; font-weight: 500; color: var(--suave); }
.par { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.5rem; }
.en-linea { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.en-linea input:not([type=hidden]) { width: 210px !important; }

/* Avisos, la clave que se muestra una sola vez y los estados vacíos. */
.aviso {
  display: flex; align-items: baseline; gap: 0.7rem; margin: 0 0 1rem; padding: 0.8rem 1rem; border: 1px solid var(--linea-fuerte); border-radius: var(--r);
  background: var(--elevado); overflow-wrap: anywhere; font-weight: 500;
}
.aviso::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--suave); transform: translateY(-1px); }
.aviso.ok { background: #0C1A18; border-color: rgba(52, 211, 153, 0.45); }
.aviso.ok::before { background: var(--ok); }
.aviso.error { background: #1C1114; border-color: rgba(248, 113, 113, 0.5); }
.aviso.error::before { background: var(--mal); border-radius: 0; }
.secreto { position: relative; overflow: hidden; display: grid; gap: 0.5rem; margin: 0 0 1rem; padding: 1.125rem 1.25rem; border-radius: var(--r-tarjeta); background: var(--acento); color: var(--tinta); }
.secreto strong { font-family: var(--f-display); font-size: 0.875rem; letter-spacing: -0.02em; }
.secreto code { font-size: 1rem; font-weight: 600; color: var(--tinta); user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; padding: 0.6rem 0.8rem; background: rgba(4, 18, 28, 0.1); border: 1px solid rgba(4, 18, 28, 0.25); border-radius: var(--r-sm); }
.secreto small { color: var(--tinta-suave); }
.secreto ::selection { background: var(--tinta); color: var(--acento); }
.tarjeta .secreto { margin: 1.25rem 0; }
.vacio { position: relative; color: var(--suave); padding: 2rem 1.25rem; border: 1px dashed var(--linea-fuerte); border-radius: var(--r); text-align: center; margin: 0 0 1rem; text-wrap: balance; font-family: var(--f-display); font-weight: 500; font-size: 0.8125rem; }
.vacio a { font-weight: 600; }
/* Cursor de terminal al final del texto y trazo arriba: el vacío espera a que escribas algo. */
.vacio::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 4px; background: var(--acento); vertical-align: -0.14em; }
.vacio::before { content: ""; position: absolute; left: -1px; top: -1px; width: 40px; height: 1px; background: var(--acento); transform-origin: left; }
.pagina > .vacio { background: var(--tarjeta); padding: 3rem 1.25rem; }

/* Tablas: pozo con encabezado fijo y líneas. */
.tabla-caja { overflow: auto; max-height: 78vh; border: 1px solid var(--linea); border-radius: var(--r); background: var(--hundido); scrollbar-width: thin; }
.pagina > .tabla-caja { background: var(--tarjeta); border-radius: var(--r-tarjeta); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 0.7rem 1rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--linea); }
th { position: sticky; top: 0; z-index: 1; font-family: var(--f-display); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tenue); background: var(--elevado); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--elevado); }
td form { margin: 0; }
td a { color: var(--texto); text-decoration-color: var(--linea-fuerte); }
td a:hover { color: var(--acento); }
td .acciones-fila { justify-content: flex-end; flex-wrap: nowrap; }
td details[open] { min-width: min(280px, 70vw); }
.valor { overflow-wrap: anywhere; word-break: break-all; }
td.valor { max-width: 380px; min-width: 180px; }
td:first-child { min-width: 180px; }
code.valor { display: block; margin-top: 0.4rem; font-size: 0.75rem; color: var(--suave); }

/* Barras de progreso. */
progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; max-width: 220px; height: 4px; border: 0; border-radius: 1px; background: var(--linea); overflow: hidden; margin: 0.4rem 0; transform-origin: left; }
progress::-webkit-progress-bar { background: var(--linea); }
progress::-webkit-progress-value { background: var(--acento); }
progress::-moz-progress-bar { background: var(--acento); }
progress.alto::-webkit-progress-value { background: var(--aviso); }
progress.alto::-moz-progress-bar { background: var(--aviso); }

/* Anillo de porcentaje (SVG en línea: el trazo se mide con atributos, no con estilos en línea). */
.medidor { position: relative; flex: none; display: inline-grid; place-items: center; width: 48px; height: 48px; }
.medidor svg { grid-area: 1 / 1; width: 100%; height: 100%; transform: rotate(-90deg); }
.medidor circle { fill: none; stroke-width: 3; }
.medidor .via { stroke: var(--linea-fuerte); }
.medidor .arco { stroke: var(--acento); }
.medidor.alto .arco { stroke: var(--aviso); }
.medidor.cero .arco { display: none; }
.medidor b { grid-area: 1 / 1; font-family: var(--f-display); font-size: 0.6875rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.medidor.grande { width: 104px; height: 104px; }
.medidor.grande circle { stroke-width: 2.5; }

/* Chips de estado: la insignia del sitio. */
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.5rem; border-radius: var(--r-xs); font-family: var(--f-display); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.5; white-space: nowrap; background: var(--suave-fondo); color: var(--suave); }
.chip.bien { background: var(--ok-velo); color: var(--ok); }
.chip.mal { background: var(--aviso-velo); color: var(--aviso); }
.chip.bien::before, .chip.mal::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip.neutro { color: var(--suave); }

/* Bento de cifras: número grande en mono, rótulo pequeño arriba, detalle en gris abajo. */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 0.75rem; }
.cifras > * {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; min-height: 148px; padding: 1.125rem 1.25rem;
  background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-tarjeta); color: var(--texto); text-decoration: none;
}
.cifras > *:hover { border-color: var(--acento); background: var(--alza); }
.cifras > * > span:first-child { font-family: var(--f-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: var(--suave); }
.cifras strong { margin-top: auto; font-family: var(--f-display); font-size: clamp(1.75rem, 1.35rem + 1.1vw, 2.375rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cifras .unidad { font-size: 0.42em; font-weight: 600; letter-spacing: -0.02em; color: var(--tenue); white-space: nowrap; }
.cifras small { color: var(--tenue); }
.cifras .medidor { position: absolute; top: 1rem; right: 1rem; }
.cifras > :has(> .medidor:not(.grande)) > span:first-child { padding-right: 56px; }
.cifras > a > span:first-child { padding-right: 20px; }
.cifras > a::after { content: ""; position: absolute; top: 1.3rem; right: 1.3rem; width: 6px; height: 6px; border-top: 1.5px solid var(--tenue); border-right: 1.5px solid var(--tenue); transform: rotate(45deg); }
.cifras > a:hover::after { border-color: var(--acento); transform: translate(2px, -2px) rotate(45deg); }
.cifras .destacada, .cifras .destacada:hover { background: var(--acento); border-color: var(--acento); color: var(--tinta); }
.cifras .destacada > span:first-child { color: var(--tinta); }
.cifras .destacada small, .cifras .destacada .unidad { color: var(--tinta-suave); }
.cifras .destacada .via { stroke: rgba(4, 18, 28, 0.18); }
.cifras .destacada .arco { stroke: var(--tinta); }
.cifras .destacada .medidor.alto .arco { stroke: #7F1D1D; }
.cifras .destacada .medidor.alto b { color: #7F1D1D; }
.cifras .destacada ::selection { background: var(--tinta); color: var(--acento); }
.cifras .destacada .boton { align-self: flex-start; margin-top: 0.9rem; }
.cifras .destacada > * { position: relative; z-index: 1; }
.cifras .destacada > .medidor:not(.grande) { position: absolute; }
.cifras .medidor.grande { position: static; align-self: center; margin: auto 0; width: 128px; height: 128px; }
.cifras .medidor.grande + strong { margin-top: 0; }
.cifras .medidor.grande b { font-size: 1.5rem; letter-spacing: -0.06em; }
/* Página de una cuenta: el disco manda (azul, dos filas); memoria ancha; el resto en celdas simples. */
.cifras.de-cuenta { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cifras.de-cuenta .c-disco { grid-column: span 2; grid-row: span 2; }
.cifras.de-cuenta .c-memoria { grid-column: span 2; }
.cifras.de-portada { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.cifras.de-servidor { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cifras.de-servidor > * { grid-column: span 2; }
.cifras.de-servidor > :nth-child(n+4) { grid-column: span 3; }

/* Atajos a las secciones de una cuenta: enlaces con riel que crece. */
.atajos { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.75rem 0 0; }
.atajos a { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.9rem; border: 1px solid var(--linea); border-radius: var(--r-sm); background: var(--tarjeta); color: var(--suave); font: 600 0.8125rem var(--f-display); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.atajos a::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -1px; height: 1px; background: var(--acento); transform: scaleX(0); transform-origin: left; }
.atajos a:hover { color: var(--texto); border-color: var(--linea-fuerte); }
.atajos a:hover::after, .atajos a:focus-visible::after { transform: scaleX(1); }
.atajos a.principal { color: var(--texto); border-color: var(--linea-fuerte); }

/* Listas: insignia, nombre y dato secundario, acciones a la derecha. */
.lista { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.pagina > .lista { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-tarjeta); padding: 0.25rem 1.5rem; }
.lista li { display: flex; align-items: flex-start; gap: 0.75rem 0.875rem; padding: 0.95rem 0; border-bottom: 1px solid var(--linea); flex-wrap: wrap; }
.lista li:last-child { border-bottom: 0; }
.lista li > div:not(.acciones-fila) { display: grid; gap: 0.2rem; min-width: 0; flex: 1 1 240px; justify-items: start; align-self: center; }
.lista li > div:not(.acciones-fila) > .fuerte:first-child { font-family: var(--f-display); font-size: 0.875rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.lista li > div:not(.acciones-fila) > progress { justify-self: stretch; }
.lista li > .acciones-fila { flex: 0 1 auto; max-width: 100%; margin-left: auto; }
.lista li > small, .lista li > .chip, .lista li > form { align-self: center; }
.lista li > small { white-space: nowrap; }
.lista li > form { margin: 0; }
.lista li > div > a.fuerte { padding: 0.6rem 0; }
.lista li:has(> .acciones-fila details[open]) > .acciones-fila { flex-basis: 100%; }
.acciones-fila { display: flex; align-items: center; gap: 0.3rem 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.acciones-fila form { margin: 0; }
.tarjeta > .acciones-fila { justify-content: flex-start; padding: 0.4rem 0; border-bottom: 1px solid var(--linea); }

/* Desplegables: un botón de contorno que, abierto, se vuelve un pozo con su formulario. */
details > summary {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 40px; padding: 0 0.8rem; border: 1px solid transparent; border-radius: var(--r-boton);
  color: var(--suave); font: 600 0.8125rem var(--f-display); letter-spacing: -0.01em; cursor: pointer; list-style: none; white-space: nowrap; user-select: none; -webkit-user-select: none;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; width: 5px; height: 5px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.75; }
details > summary:hover { background: var(--suave-fondo); border-color: var(--linea-fuerte); color: var(--texto); }
details.peligro > summary:hover { color: var(--mal); border-color: rgba(248, 113, 113, 0.5); }
details[open] { flex: 1 1 100%; order: 1; background: var(--hundido); border: 1px solid var(--linea); border-radius: var(--r); padding: 0.3rem 1.125rem 1.125rem; }
details[open] > summary { color: var(--acento); margin-left: -0.8rem; }
details[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
details.peligro[open] { border-color: rgba(248, 113, 113, 0.4); }
details.peligro[open] > summary { color: var(--mal); }
details form { display: grid; gap: 0.75rem; margin-top: 0.75rem; justify-items: start; max-width: 720px; }
details form > label, details form > .par, details form > .acciones { justify-self: stretch; }
details form + form, details form + p, details p + form { margin-top: 1.125rem; padding-top: 1.125rem; border-top: 1px solid var(--linea); }
details > p { margin-bottom: 0; }
details form.rejilla { justify-items: stretch; }
details .rejilla { margin-top: 0.75rem; }
details[open] input:not([type=checkbox]):not([type=hidden]), details[open] select, details[open] textarea { background-color: var(--tarjeta); }

.fila-riesgo { display: flex; justify-content: space-between; align-items: center; gap: 0.9rem 1.25rem; padding: 1.1rem 0; border-top: 1px solid var(--linea); flex-wrap: wrap; }
.fila-riesgo:last-child { padding-bottom: 0; }
.fila-riesgo > div:first-child { display: grid; gap: 0.2rem; flex: 1 1 280px; min-width: 0; }
.fila-riesgo > div:first-child > .fuerte { font-family: var(--f-display); font-size: 0.875rem; letter-spacing: -0.02em; }
.fila-riesgo form { margin: 0; }
.fila-riesgo .acciones-fila form { display: flex; align-items: center; gap: 0.5rem 0.75rem; flex-wrap: wrap; justify-content: flex-end; }
h2 + .fila-riesgo { border-top: 0; padding-top: 0; }
.rejilla + .fila-riesgo, .tabla-caja + .fila-riesgo, details + .fila-riesgo { margin-top: 1.5rem; }

/* Lista de cuentas de la portada. */
.cuentas { list-style: none; margin: 0.75rem 0 0; padding: 0; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-tarjeta); overflow: hidden; }
.cuentas li { position: relative; display: grid; grid-template-columns: 36px minmax(140px, 1.3fr) minmax(0, 2.4fr) 124px 48px; align-items: center; gap: 0.5rem 1rem; padding: 0.85rem 1.5rem; border-bottom: 1px solid var(--linea); }
.cuentas li:last-child { border-bottom: 0; }
.cuentas li:hover { background: var(--elevado); }
/* Riel que crece al pasar por la fila. */
.cuentas li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--acento); transform: scaleY(0); transform-origin: top; }
.cuentas li:hover::before, .cuentas li:focus-within::before { transform: scaleY(1); }
.cuentas .quien { display: grid; gap: 0.1rem; min-width: 0; }
.cuentas .quien a { color: var(--texto); font-family: var(--f-display); font-weight: 700; font-size: 0.9375rem; letter-spacing: -0.03em; text-decoration: none; padding: 0.35rem 0; overflow-wrap: anywhere; }
.cuentas li:hover .quien a, .cuentas .quien a:hover { color: var(--acento); }
.cuentas .quien small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datos { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 0.5rem 1rem; margin: 0; }
.datos div { display: grid; gap: 0.1rem; min-width: 0; }
.datos dt { font-size: 0.75rem; color: var(--tenue); }
.datos dd { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 0.8125rem; letter-spacing: -0.02em; color: var(--texto); white-space: normal; }
.cuentas .chip { justify-self: start; }

/* Lista de dominios: filtro por formulario GET (sin JavaScript) y columnas que ordenan con enlaces. */
.buscador { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.buscador input[type=search] { flex: 1 1 240px; max-width: 420px; background: var(--tarjeta); }
.buscador .ordenar { display: none; flex: 1 1 100%; }
th a.orden { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 40px; margin: -0.7rem 0; color: inherit; text-decoration: none; }
th a.orden:hover, th[aria-sort] a.orden { color: var(--acento); }
.dominios td a { display: inline-block; padding: 0.55rem 0; }
.dominios td:first-child a { white-space: nowrap; overflow-wrap: normal; }
.dominios td small { display: block; }
.dominios .alias { display: block; font-weight: 400; overflow-wrap: anywhere; }
.cert { display: flex; align-items: center; gap: 0.7rem; }
.cert > span:last-child { display: grid; line-height: 1.35; }
.cert b { font-family: var(--f-display); font-size: 0.8125rem; font-weight: 600; letter-spacing: -0.02em; }
.cert .medidor { width: 40px; height: 40px; }
.texto-aviso { color: var(--aviso); }

/* Página de un dominio: resumen arriba y, debajo, las herramientas en rejilla. Cada una es una tarjeta
   que se abre ahí mismo (details) o que lleva a su página (enlace). Abierta ocupa todo el ancho. */
.cabecera .rapidos { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-left: auto; }
.bajada { margin: -0.9rem 0 1.25rem; font-size: 0.875rem; overflow-wrap: anywhere; }
.cifras strong.palabra { font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.5rem); letter-spacing: -0.04em; line-height: 1.2; }
.cifras > a:has(> .medidor)::after { display: none; }
.grupo { margin-top: 2rem; }
.grupo > h2 { margin-bottom: 0.75rem; flex-wrap: nowrap; font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--suave); }
.grupo > h2::before { content: ""; flex: none; width: 7px; height: 7px; border: 1px solid var(--acento); }
.grupo > h2::after { content: ""; flex: 1; height: 1px; background: var(--linea); }
.herramientas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); grid-auto-flow: dense; gap: 0.75rem; }
.herramienta { min-width: 0; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-tarjeta); color: var(--texto); scroll-margin-top: 5.5rem; }
a.herramienta, .herramienta > summary {
  display: flex; align-items: center; gap: 0.875rem; min-height: 76px; padding: 0.875rem 1rem; border: 0; border-radius: var(--r-tarjeta);
  color: var(--texto); font: inherit; letter-spacing: 0; text-decoration: none; white-space: normal;
}
a.herramienta { border: 1px solid var(--linea); }
.herramienta:not([open]) > summary { height: 100%; }
.herramienta:hover, .herramienta:target { border-color: var(--acento); }
.herramienta:not([open]):hover { background: var(--alza); }
.herramienta > summary:hover { background: transparent; border-color: transparent; color: var(--texto); }
.herramienta > summary::after, a.herramienta::after { flex: none; margin-right: 0.25rem; color: var(--tenue); }
a.herramienta::after { content: ""; width: 6px; height: 6px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.herramienta:hover > summary::after, a.herramienta:hover::after { color: var(--acento); }
.h-texto { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.h-texto b { font-family: var(--f-display); font-size: 0.875rem; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.h-texto small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; color: var(--suave); font-weight: 400; }
.herramienta.atencion { border-color: rgba(251, 191, 36, 0.45); }
.herramienta.atencion .redondo { background: var(--aviso-velo); color: var(--aviso); }
.herramienta[open] { grid-column: 1 / -1; order: 0; padding: 0; background: var(--hundido); border-color: var(--acento); }
.herramienta[open] > summary { margin-left: 0; min-height: 64px; color: var(--texto); border-bottom: 1px solid var(--linea); border-radius: var(--r-tarjeta) var(--r-tarjeta) 0 0; }
.herramienta[open] > summary b { color: var(--acento); }
.h-cuerpo { padding: 1.25rem; }
.h-cuerpo > :first-child { margin-top: 0; }
.h-cuerpo > :last-child { margin-bottom: 0; }
.h-cuerpo > h3 { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--linea); }
.h-cuerpo > h3:first-child { padding-top: 0; border-top: 0; }
.h-cuerpo > .acciones-fila { justify-content: flex-start; padding: 0.4rem 0; border-bottom: 1px solid var(--linea); }
.h-cuerpo .rejilla > p { margin: 0; }
/* Los formularios de un solo botón (filas de lista, celdas de tabla) no son el formulario apilado de un desplegable. */
.h-cuerpo .acciones-fila > form, .h-cuerpo .lista li > form, .h-cuerpo td form { display: block; margin: 0; padding: 0; border: 0; max-width: none; }
.mas { margin: 1.25rem 0 0; font-size: 0.875rem; }
.mas a { display: inline-block; padding: 0.6rem 0; }
.fila-riesgo > .boton { flex: none; }
.grupo + .tarjeta { margin-top: 2rem; }

/* Cuadrícula de actividad: una celda por día, más clara cuanto más tráfico. */
.actividad { display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.actividad li { width: 22px; height: 22px; border-radius: 1px; background: var(--linea); transform-origin: bottom; }
.actividad .n1 { background: #14405A; }
.actividad .n2 { background: #1D6A93; }
.actividad .n3 { background: #2A94C6; }
.actividad .n4 { background: var(--acento); }

/* Registros y editor. */
.registro { margin: 0; padding: 1.125rem 1.25rem; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-tarjeta); overflow: auto; max-height: 72vh; font: 500 0.75rem/1.65 var(--mono); color: var(--suave); white-space: pre; scrollbar-width: thin; }
.editor { display: grid; gap: 1rem; }
.editor textarea { min-height: 60vh; padding: 1rem 1.125rem; line-height: 1.6; tab-size: 4; white-space: pre; overflow: auto; background: var(--tarjeta); border-color: var(--linea-fuerte); }
.editor .acciones { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* ============ Inicio del administrador, herramientas y tableros ============ */

/* Rejilla de tarjetas del inicio: doce columnas; cada tarjeta dice cuántas ocupa. */
.tablero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.75rem; align-items: stretch; }
.tablero > .tarjeta { margin-top: 0; }
.t-4 { grid-column: span 4; }
.t-6 { grid-column: span 6; }
.t-12 { grid-column: 1 / -1; }
.t-cab { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.t-cab h2 { margin: 0; }
.t-cab h2::before { content: ""; flex: none; width: 7px; height: 7px; border: 1px solid var(--acento); }
.detalle { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px; margin: -0.5rem 0; color: var(--suave); font: 600 0.75rem var(--f-display); text-decoration: none; white-space: nowrap; }
.detalle::after { content: ""; width: 5px; height: 5px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.detalle:hover { color: var(--acento); }

/* Estado en una línea: marca y frase. La forma cambia con el nivel, no solo el color. */
.estado { display: flex; align-items: baseline; gap: 0.6rem; margin: 0 0 1rem; font-family: var(--f-display); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.estado i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--tenue); }
.estado.e-bien i { background: var(--ok); }
.estado.e-aviso i { background: var(--aviso); border-radius: 0; transform: rotate(45deg); }
.estado.e-mal i { background: var(--mal); border-radius: 0; }
.estado.e-nada { color: var(--suave); }
.sin-datos { margin: 0 0 1rem; color: var(--suave); font-family: var(--f-display); font-weight: 500; font-size: 0.8125rem; }
.chico { font-size: 0.8125rem; }
.rotulo-chico { margin: 0 0 0.6rem; font: 600 0.6875rem/1.4 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--suave); }
.chip.caido { background: var(--mal-velo); color: var(--mal); }
.chip.caido::before { content: ""; width: 5px; height: 5px; background: currentColor; }

/* Pares rótulo–dato, separados por líneas. */
.pares { display: grid; margin: 0; }
.pares > div { display: grid; grid-template-columns: minmax(0, 10.5rem) minmax(0, 1fr); gap: 0.15rem 1rem; align-items: baseline; padding: 0.6rem 0; border-top: 1px solid var(--linea); }
.pares dt { font-size: 0.8125rem; color: var(--suave); }
.pares dd { display: grid; gap: 0.1rem; margin: 0; min-width: 0; font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere; }
.pares dd small { font-weight: 400; }
.pares dd progress { max-width: none; margin: 0.3rem 0 0; }
.pares.en-dos { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
.pares.en-dos > div { grid-template-columns: minmax(0, 1fr); align-content: start; }
.tablero > .tarjeta { display: flex; flex-direction: column; }
.tablero > .tarjeta > * { flex: none; }

.hallazgos { list-style: none; display: grid; gap: 0.4rem; margin: 0 0 1rem; padding: 0; }
.hallazgos li { position: relative; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.6rem; padding-left: 1.1rem; font-size: 0.875rem; overflow-wrap: anywhere; }
.hallazgos li::before { content: ""; position: absolute; left: 1px; top: 0.5em; width: 6px; height: 6px; background: var(--aviso); transform: rotate(45deg); }
.hallazgos li.e-mal::before { background: var(--mal); transform: none; }
.hallazgos a { color: var(--texto); font-family: var(--mono); font-weight: 500; font-size: 0.9em; }

/* Tres cifras grandes en una fila. */
.tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 0 0 0.9rem; }
.tres div { display: grid; gap: 0.2rem; min-width: 0; }
.tres dt { font: 600 0.75rem var(--f-display); color: var(--suave); }
.tres dd { margin: 0; font: 700 clamp(1.5rem, 1.2rem + 0.9vw, 2.125rem)/1.05 var(--f-display); letter-spacing: -0.06em; }
progress.ancha { max-width: none; height: 6px; margin: 0 0 1rem; }

/* Noches de respaldo: una celda por noche; la marca cambia de forma con el resultado. */
.noches { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; margin: 0 0 0.5rem; padding: 0; }
.noches li { display: grid; justify-items: center; gap: 0.4rem; padding: 0.6rem 0.15rem 0.5rem; background: var(--hundido); border: 1px solid var(--linea); border-radius: var(--r-sm); color: var(--suave); font: 500 0.6875rem/1.25 var(--mono); text-align: center; }
.noches i, .noches-clave i { box-sizing: border-box; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.n-con-fallos i { background: var(--aviso); border-radius: 0; transform: rotate(45deg); }
.n-no-corrio i { background: transparent; border: 2px solid var(--mal); border-radius: 0; }
.n-pendiente i { background: transparent; border: 1px dashed var(--suave); }
.noches li.n-no-corrio { border-color: rgba(248, 113, 113, 0.45); }
.noches-clave { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0 0 1rem; color: var(--tenue); font-size: 0.75rem; }
.noches-clave span { display: inline-flex; align-items: center; gap: 0.4rem; }
.noches-clave i { width: 8px; height: 8px; }
.tira-clave { margin-top: 0.75rem; }
.tira-clave i { border-radius: 0; }
.tira-clave .t-medio i { background: var(--aviso); }
.tira-clave .t-mal i { background: var(--mal); }
.tira-clave .t-nada i { background: var(--linea-fuerte); }

/* Clasificación con barra: nombre, cifra y la barra debajo. */
.ranking { list-style: none; display: grid; gap: 0.35rem; margin: 0 0 0.5rem; padding: 0; }
.ranking li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 0.75rem; align-items: baseline; }
.ranking a { padding: 0.4rem 0 0.2rem; color: var(--texto); font: 500 0.8125rem var(--mono); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking a:hover { color: var(--acento); }
.ranking b { font: 600 0.8125rem var(--f-display); letter-spacing: -0.02em; }
.ranking progress { grid-column: 1 / -1; max-width: none; margin: 0; }
.en-columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1.25rem 1.75rem; margin-bottom: 1rem; }
.en-columnas > div { min-width: 0; }
.en-columnas.graficas { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }

/* Selector de periodo, de orden o de filtro: enlaces GET en una pieza. */
.periodos { display: inline-flex; border: 1px solid var(--linea-fuerte); border-radius: var(--r); background: var(--hundido); }
.periodos a { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 40px; padding: 0 0.8rem; border-left: 1px solid var(--linea-fuerte); color: var(--suave); font: 600 0.75rem var(--f-display); text-decoration: none; white-space: nowrap; }
.periodos a:first-child { border-left: 0; }
.periodos a:hover { color: var(--texto); background: var(--suave-fondo); }
.periodos a[aria-current] { background: var(--acento-velo); color: var(--acento); }
.periodos a:focus-visible { outline-offset: -2px; }
.periodos.al-final { margin-left: auto; }
.filtros { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; margin: 1.25rem 0 0.75rem; }
.filtros p { margin: 0; }
select.corto { width: auto; min-width: 200px; max-width: 100%; background-color: var(--tarjeta); }
details.probar { margin-top: 1rem; }
details.probar > summary { border-color: var(--linea-fuerte); color: var(--texto); padding: 0 1rem; }
.orden-proc { display: block; max-width: 46ch; color: var(--texto); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td:first-child:has(.orden-proc) { max-width: 420px; }
/* Tablas de muchas columnas: antes que aplastar los nombres, se desplazan dentro de su caja. */
table.ancha { min-width: 900px; }
.cifras.de-cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
td.motivo { min-width: 220px; overflow-wrap: anywhere; color: var(--suave); font-size: 0.875rem; }

/* Herramientas: lo que aún no existe se ve, tenue y sin enlace. */
.herramienta.proxima { display: flex; align-items: center; gap: 0.875rem; min-height: 76px; padding: 0.875rem 1rem; background: transparent; border-style: dashed; color: var(--suave); }
.herramienta.proxima:hover { background: transparent; border-color: var(--linea); }
.herramienta.proxima .redondo { background: var(--suave-fondo); color: var(--tenue); }
.herramienta.proxima b { font-weight: 500; }
.grupo > h2 + p { margin: -0.25rem 0 0.75rem; }

/* Herramientas del servidor: servicios, bloqueos, cola, registro de acciones, sesiones. */
.aviso { white-space: pre-line; }
.lista small.nota { color: var(--suave); }
.etiquetas { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; margin: 0 0 1rem; }
.etiquetas code { padding: 0.15rem 0.45rem; border: 1px solid var(--linea); border-radius: var(--r-xs); background: var(--hundido); color: var(--suave); font-size: 0.75rem; overflow-wrap: anywhere; }
td .etiquetas { margin: 0; }
.filtro-fechas { align-items: end; }
.filtro-fechas label { flex: 1 1 150px; max-width: 220px; }
.filtro-fechas input { background-color: var(--tarjeta); }
.paginas { display: flex; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap; margin: 1rem 0 0; }
.paginas p { margin: 0 0 0 auto; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primario:disabled:hover { background: var(--acento); border-color: var(--acento); }

/* Gráficas hechas en el servidor (lib/Grafica.php). El plano es un SVG que se estira; los ejes
   son HTML para que la letra no encoja. Los colores salen de estas clases, nunca del marcado. */
.grafica { margin: 0 0 1rem; min-width: 0; }
.g-lienzo { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.5rem; }
.g-eje-y, .g-eje-x { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; color: var(--tenue); font: 500 0.6875rem/1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-eje-y { grid-column: 1; grid-row: 1; flex-direction: column; text-align: right; }
.g-eje-y li { display: flex; align-items: center; justify-content: flex-end; height: 0; }
.g-plano { grid-column: 2; grid-row: 1; display: block; width: 100%; height: 180px; overflow: visible; }
.g-eje-x { grid-column: 2; grid-row: 2; margin-top: 0.5rem; }
.g-eje-x li { display: flex; justify-content: center; width: 0; }
.g-eje-x li:first-child { justify-content: flex-start; }
.g-eje-x li:last-child { justify-content: flex-end; }
.grafica.compacta .g-plano { height: 72px; }
.g-plano path { fill: none; vector-effect: non-scaling-stroke; }
.g-rejilla { stroke: var(--linea); stroke-width: 1; }
.g-linea { stroke: var(--acento); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.g-plano .g-area { fill: var(--acento); fill-opacity: 0.2; stroke: none; }
.g-linea.s2 { stroke: var(--texto); stroke-width: 1.25; stroke-opacity: 0.75; }
.g-linea.s3 { stroke: var(--borde-campo); }
.g-plano .g-area.s3 { fill: var(--borde-campo); fill-opacity: 0.3; }
.g-tope { stroke: var(--aviso); stroke-width: 1.25; stroke-dasharray: 5 4; }
.g-barra { fill: var(--acento); }
.g-barra.s-ok, .reparto .s-ok { fill: var(--ok); }
.g-barra.s-mal, .reparto .s-mal { fill: var(--mal); }
.g-barra.s-aviso, .reparto .s-aviso { fill: var(--aviso); }
.g-leyenda { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; margin: 0.9rem 0 0; padding: 0; font-size: 0.8125rem; color: var(--suave); }
.g-leyenda li { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.g-leyenda b { color: var(--texto); font-family: var(--f-display); font-weight: 600; letter-spacing: -0.02em; }
.g-muestra { flex: none; align-self: center; width: 10px; height: 10px; border-radius: 1px; background: var(--acento); }
.g-muestra.s2 { height: 2px; background: var(--texto); opacity: 0.75; }
.g-muestra.s3 { background: var(--borde-campo); }
.g-muestra.s-ok { background: var(--ok); }
.g-muestra.s-mal { background: var(--mal); }
.g-muestra.s-aviso { background: var(--aviso); }
.g-muestra.tope { height: 0; border-top: 2px dashed var(--aviso); background: none; border-radius: 0; }
.g-nota { margin: 0.5rem 0 0; color: var(--tenue); font-size: 0.75rem; }
.grafica .sin-datos { margin: 0; padding: 1.5rem 1rem; border: 1px dashed var(--linea-fuerte); border-radius: var(--r); text-align: center; }
table.oculto { min-width: 0; }
.reparto { display: block; width: 100%; height: 6px; margin: 0 0 1rem; }
.reparto .r-via { fill: var(--linea); }
.tira { display: block; width: 132px; max-width: 100%; height: 14px; }
.tira .t-bien { fill: var(--ok); }
.tira .t-medio { fill: var(--aviso); }
.tira .t-mal { fill: var(--mal); }
.tira .t-nada { fill: var(--linea-fuerte); }

/* Entrada. */
body.entrar .centro { position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 1.25rem; }
.tarjeta-entrada { position: relative; width: min(400px, 100%); background: var(--tarjeta); border: 1px solid var(--linea-fuerte); border-radius: var(--r-tarjeta); }
/* Esquina marcada: un trazo de acento que se dibuja arriba a la izquierda. */
.tarjeta-entrada::before { content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 1px; background: var(--acento); transform-origin: left; }
.tarjeta-entrada::after { content: ""; position: absolute; left: -1px; top: -1px; width: 1px; height: 56px; background: var(--acento); transform-origin: top; }
.tarjeta-entrada header { display: flex; justify-content: center; padding: 2.25rem 1rem 1.5rem; border-bottom: 1px solid var(--linea); }
.tarjeta-entrada .marca { column-gap: 14px; }
.tarjeta-entrada .marca img { height: 54px; }
.tarjeta-entrada .marca-nombre { font-size: 26px; }
.tarjeta-entrada .marca-bajada { font-size: 13px; }
.entrada { display: grid; gap: 1rem; padding: 1.5rem 1.75rem 2rem; margin: 0; }
.entrada .aviso { margin: 0; }
.entrada button { margin-top: 0.5rem; min-height: 48px; }

@media (max-width: 1100px) {
  .t-4, .t-6 { grid-column: span 6; }
  .t-4:nth-child(3) { grid-column: 1 / -1; }
  .cifras.de-cuenta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cifras.de-portada, .cifras.de-servidor, .cifras.de-cuatro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cifras.de-servidor > *, .cifras.de-servidor > :nth-child(n+4) { grid-column: auto; }
  .cifras.de-servidor > .destacada { grid-column: 1 / -1; }
  .cuentas li { grid-template-columns: 36px minmax(0, 1fr) auto 48px; }
  .cuentas .datos { grid-column: 2 / -1; grid-row: 2; }
  .duo.desigual { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .pagina { padding-top: 1.25rem; padding-bottom: 2rem; }
  .cifras.de-portada > .destacada, .cifras.de-portada > :last-child:nth-child(even) { grid-column: 1 / -1; }
  .tabla-caja { max-height: none; }
}
/* Teléfono y tableta estrecha: las tablas se apilan (una fila = un bloque) en vez de desplazarse de lado. */
@media (max-width: 700px) {
  .t-4, .t-6, .t-4:nth-child(3) { grid-column: 1 / -1; }
  .orden-proc { max-width: none; white-space: normal; overflow-wrap: anywhere; }
  td:first-child:has(.orden-proc) { max-width: none; }
  td.motivo { flex: 1 1 100%; min-width: 0; }
  table.ancha { min-width: 0; }
  .cifras.de-cuenta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cifras.de-cuenta .c-disco { grid-row: auto; }
  .cifras .medidor.grande { position: absolute; top: 1rem; right: 1rem; width: 84px; height: 84px; margin: 0; }
  .cifras .medidor.grande b { font-size: 1.0625rem; }
  .cifras .medidor.grande + strong { margin-top: auto; }
  .tabla-caja { overflow: visible; background: transparent; border: 0; border-radius: 0; }
  .pagina > .tabla-caja { padding: 0.25rem 1.125rem; border: 1px solid var(--linea); border-radius: var(--r-tarjeta); background: var(--tarjeta); }
  table, tbody { display: block; min-width: 0; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tr { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.9rem; padding: 0.8rem 0; border-bottom: 1px solid var(--linea); }
  tbody tr:last-child { border-bottom: 0; }
  tbody tr:hover { background: transparent; }
  td { display: block; padding: 0; border: 0; min-width: 0; }
  td:empty { display: none; }
  td:first-child { flex: 1 1 100%; color: var(--texto); font-weight: 600; overflow-wrap: anywhere; }
  td.valor { flex: 1 1 60%; max-width: none; min-width: 0; }
  td:last-child:has(form, .acciones-fila) { margin-left: auto; }
  td:has(.acciones-fila) { flex: 1 1 100%; }
  td .acciones-fila { justify-content: flex-start; flex-wrap: wrap; margin-left: -0.8rem; }
  td[data-r]::before { content: attr(data-r) " "; color: var(--tenue); font-size: 0.75rem; }
  /* Sin encabezados a la vista, el orden se elige en el propio filtro. */
  .buscador .ordenar { display: grid; }
  .buscador input[type=search] { max-width: none; }
}
@media (max-width: 560px) {
  .tarjeta { padding: 1.125rem; }
  .cifras > * { min-height: 128px; padding: 1rem 1.125rem; }
  .cifras .medidor { top: 0.875rem; right: 0.875rem; }
  .cifras:not(.de-cuenta):not(.de-portada):not(.de-servidor) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pagina > .lista { padding: 0.25rem 1.125rem; }
  .cuentas li { grid-template-columns: 36px minmax(0, 1fr) 48px; padding: 0.85rem 1.125rem; }
  .cuentas .chip { grid-column: 1 / -1; grid-row: 3; }
  .cuentas .datos { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr 1fr; }
  .cuentas .datos div:first-child { grid-column: 1 / -1; }
  .cuentas .medidor { grid-column: 3; grid-row: 1; }
  .en-linea, .fila-riesgo > form { width: 100%; }
  .en-linea input:not([type=hidden]) { width: 100% !important; flex: 1 1 100%; }
  .en-linea button, .fila-riesgo > form > button { flex: 1 1 auto; width: 100%; }
  .lista li > .acciones-fila { margin-left: 0; justify-content: flex-start; flex-basis: 100%; }
  .acciones-fila { justify-content: flex-start; }
  .rejilla .acciones button { flex: 1 1 auto; }
  details form { max-width: none; }
  .actividad li { width: 18px; height: 18px; }
  .cabecera .rapidos { flex: 1 1 100%; margin-left: 0; }
  .cabecera .rapidos .boton { flex: 1 1 0; }
  .buscador button { flex: 1 1 auto; }
  .pares > div { grid-template-columns: minmax(0, 1fr); }
  .pares.en-dos { grid-template-columns: minmax(0, 1fr); }
  .g-plano { height: 150px; }
  .periodos.al-final { margin-left: 0; }
  .buscador select.corto { flex: 1 1 100%; }
  .filtro-fechas label { max-width: none; }
  .paginas p { margin-left: 0; flex-basis: 100%; }
  .h-cuerpo { padding: 1rem; }
  a.herramienta, .herramienta > summary { min-height: 64px; }
}

/* ============ Movimiento ============
   Todo vive aquí dentro: con «reducir movimiento» nada se anima y la página queda en su estado final. */
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }
@keyframes vtSale { to { opacity: 0; } }
@keyframes vtEntra { from { opacity: 0; transform: translateY(8px); } }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); } 70%, 100% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); } }
@keyframes barrido { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(420%) skewX(-18deg); } }
@keyframes barrido2 { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(420%) skewX(-18deg); } }
@keyframes barraSube { from { transform: scaleY(0.15); opacity: 0; } }
@keyframes barraCrece { from { transform: scaleX(0.05); opacity: 0; } }
@keyframes anilloDibuja { from { stroke-dasharray: 0 100; } }
@keyframes rielBaja { from { transform: scaleY(0); } }
@keyframes trazo { from { transform: scaleX(0); } }
@keyframes parpadeo { 50% { opacity: 0; } }
@keyframes destello { from { border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-velo); } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Transición entre páginas (solo CSS). El riel y la cabecera no se mueven: cambia el contenido. */
  @view-transition { navigation: auto; }
  .nav { view-transition-name: nav; }
  .cabezal { view-transition-name: cabezal; }
  .barra-movil { view-transition-name: barra-movil; }
  ::view-transition-old(root) { animation: vtSale 0.14s ease both; }
  ::view-transition-new(root) { animation: vtEntra 0.3s var(--curva) both; }

  /* Entrada escalonada: cada bloque de la página sube 10px y aparece, uno tras otro. */
  .pagina > *, .cifras > *, .cuentas li, .tarjeta-entrada { animation: entra 0.4s var(--curva) both; }
  .pagina > :nth-child(2), .cifras > :nth-child(2), .cuentas li:nth-child(2) { animation-delay: 55ms; }
  .pagina > :nth-child(3), .cifras > :nth-child(3), .cuentas li:nth-child(3) { animation-delay: 110ms; }
  .pagina > :nth-child(4), .cifras > :nth-child(4), .cuentas li:nth-child(4) { animation-delay: 165ms; }
  .pagina > :nth-child(5), .cifras > :nth-child(5), .cuentas li:nth-child(5) { animation-delay: 220ms; }
  .pagina > :nth-child(6), .cifras > :nth-child(6), .cuentas li:nth-child(6) { animation-delay: 275ms; }
  .pagina > :nth-child(7), .cifras > :nth-child(7), .cuentas li:nth-child(7) { animation-delay: 330ms; }
  .pagina > :nth-child(n+8), .cifras > :nth-child(n+8), .cuentas li:nth-child(n+8) { animation-delay: 385ms; }
  .pagina > .cifras, .pagina > .cuentas, .pagina > .duo, .pagina > .tablero { animation: none; }
  .tablero > .tarjeta { animation: entra 0.4s var(--curva) both; }
  .tablero > :nth-child(2) { animation-delay: 55ms; }
  .tablero > :nth-child(3) { animation-delay: 110ms; }
  .tablero > :nth-child(4) { animation-delay: 165ms; }
  .tablero > :nth-child(5) { animation-delay: 220ms; }
  .tablero > :nth-child(n+6) { animation-delay: 275ms; }
  .g-barra { transform-box: fill-box; transform-origin: bottom; animation: barraSube 0.5s var(--curva) 0.2s both; }
  .reparto rect:not(.r-via) { transform-box: fill-box; transform-origin: left; animation: barraCrece 0.6s var(--curva) 0.2s both; }
  .mas-panel { animation: entra 0.2s var(--curva) both; }
  .detalle::after { transition: transform 0.2s var(--curva); }
  .detalle:hover::after { transform: translateX(2px) rotate(45deg); }
  .duo > .tarjeta { animation: entra 0.4s var(--curva) 220ms both; }
  .duo > .tarjeta + .tarjeta { animation-delay: 275ms; }

  /* Anillos y barras se dibujan al cargar, desde vacío hasta el valor que ya trae el marcado. */
  .medidor .arco { animation: anilloDibuja 0.9s var(--curva) 0.25s both; }
  progress { animation: barraCrece 0.6s var(--curva) 0.2s both; }
  .actividad li { animation: barraSube 0.5s var(--curva) both; }
  .actividad li:nth-child(3n+2) { animation-delay: 60ms; }
  .actividad li:nth-child(3n) { animation-delay: 120ms; }

  /* Lo que está en línea late (pequeño); la tarjeta destacada recibe un barrido de luz, una sola vez. */
  .chip.vivo::before { animation: latido 2.4s ease-out infinite; }
  .cifras .destacada::before, .secreto::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 30%; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
    transform: translateX(-120%) skewX(-18deg); animation: barrido 1.1s ease-in-out 0.55s 1 both;
  }
  .cifras .destacada:hover::before { animation: barrido2 0.9s ease-in-out 1 both; }

  /* Rieles y trazos que se dibujan. */
  .vacio::before, .tarjeta-entrada::before { animation: trazo 0.6s var(--curva) 0.3s both; }
  .tarjeta-entrada::after { animation: rielBaja 0.6s var(--curva) 0.3s both; }
  .vacio::after { animation: parpadeo 0.9s steps(1) infinite; }
  .tarjeta:target { animation: destello 1.4s ease-out both; }
  .aviso, .secreto { animation: entra 0.35s var(--curva) both; }

  /* Respuesta al pasar y al enfocar: 160–250 ms, las curvas del sitio. */
  button, .boton, input, select, textarea, summary, .yo, .boton-enlace, .atajos a, .nav a, .nav button, .barra-movil a, .tarjeta, .cifras > *, .cuentas li, .herramienta {
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.16s var(--curva);
  }
  a { transition: color 0.16s ease, text-decoration-color 0.16s ease; }
  .redondo svg, .cifras > a::after, details > summary::after { transition: transform 0.2s var(--curva), border-color 0.18s ease; }
  .lista li:hover > .redondo svg, .herramienta:not([open]):hover .redondo svg { transform: translateX(2px); }
  .herramienta:target { animation: destello 1.4s ease-out both; }
  .atajos a::after { transition: transform 0.25s var(--curva); }
  .cuentas li::before { transition: transform 0.22s var(--curva); }
  .cuentas .quien a { transition: color 0.16s ease; }

  /* Desplegables con altura animada donde el navegador lo admite; si no, se abren sin más. */
  @supports (interpolate-size: allow-keywords) and selector(::details-content) {
    :root { interpolate-size: allow-keywords; }
    details::details-content { block-size: 0; opacity: 0; overflow: clip; }
    details[open]::details-content { block-size: auto; opacity: 1; transition: block-size 0.25s var(--curva), opacity 0.2s ease 0.05s, content-visibility 0.25s allow-discrete; }
  }
}
@media (forced-colors: active) {
  .secreto, .cifras .destacada { border: 1px solid CanvasText; }
}

/* =====================================================================================================
   Sistema nuevo (ver web/DISENO.md): armazón con barra lateral rotulada, cabecera con buscador y avisos,
   y los componentes del Inicio, de la lista de dominios, de la página de un dominio y de la portada
   del cliente. Todo lo de arriba sigue valiendo para las demás pantallas.
   ===================================================================================================== */
:root { --nav: 236px; --tope: 56px; --hoja: 680px; --sombra-hoja: -24px 0 48px -12px rgba(0, 0, 0, 0.55); --info: #7DD3FC; }
.js [data-sin-js] { display: none; }
[hidden] { display: none !important; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--linea-fuerte); border-radius: var(--r-xs); background: var(--hundido); color: var(--suave); font: 600 0.6875rem/1 var(--mono); }
.salto { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 0.6rem 1rem; background: var(--acento); color: var(--tinta); font: 600 0.8125rem var(--f-display); text-decoration: none; border-radius: var(--r); }
.salto:focus { top: 12px; }
.ico { flex: none; }

/* ---- Armazón ---- */
.arm { display: grid; grid-template-columns: var(--nav) minmax(0, 1fr); align-items: start; min-height: 100vh; min-height: 100dvh; }
.nav { position: sticky; top: 0; z-index: 30; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 1.25rem; padding: 14px 12px 12px; background: var(--elevado); border-right: 1px solid var(--linea); overflow-y: auto; scrollbar-width: none; }
.nav .marca { padding: 4px 8px; }
.nav .marca img { height: 32px; }
.nav .marca-nombre { font-size: 17px; }
.nav nav { flex: 1; display: grid; gap: 2px; align-content: start; }
.nav-grupo { margin: 1.125rem 0 0.3rem; padding: 0 10px; font: 600 0.6875rem/1.4 var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--tenue); }
.nav nav a, .nav-pie button, .nav-yo, .nav-ayuda { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--suave); font: 500 0.875rem/1.2 var(--sans); letter-spacing: 0; text-decoration: none; text-align: left; justify-content: flex-start; cursor: pointer; }
.nav nav a:hover, .nav-pie button:hover, .nav-yo:hover, .nav-ayuda:hover { background: var(--suave-fondo); color: var(--texto); border-color: transparent; }
.nav nav a[aria-current=page], .nav-yo[aria-current=page] { background: var(--acento-velo); color: var(--texto); }
.nav nav a[aria-current=page] .ico { color: var(--acento); }
.nav nav a[aria-current=page]::before { content: ""; position: absolute; left: -13px; top: 6px; bottom: 6px; width: 2px; background: var(--acento); }
.nav-cifra, .campana-cifra { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: var(--r-xs); background: var(--aviso); color: #231A05; font: 700 0.6875rem/1 var(--f-display); font-variant-numeric: tabular-nums; }
.nav-cifra { margin-left: auto; }
.nav-cifra.critica, .campana.critica .campana-cifra { background: var(--mal); color: #2A0606; }
.nav-pie { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--linea); }
.nav-pie form { margin: 0; }
.nav-yo, .nav-ayuda { min-height: 48px; }
.nav-yo .redondo { width: 30px; height: 30px; background: var(--acento); color: var(--tinta); }
.nav-yo span:last-child, .nav-ayuda span { display: grid; min-width: 0; line-height: 1.25; }
.nav-yo b, .nav-ayuda b { font-weight: 600; font-size: 0.8125rem; color: var(--texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-yo small, .nav-ayuda small { font-size: 0.75rem; }
.nav-ayuda { border-color: var(--linea); margin-bottom: 6px; }
.nav-ayuda .ico { color: var(--ok); }
.barra-movil { display: none; }

.cuerpo { position: relative; isolation: isolate; display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; }
.cuerpo .pagina { flex: 1; width: 100%; }
/* Retícula técnica del sitio, que se desvanece hacia abajo. */
.cuerpo::before, body.entrar .centro::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 300px; z-index: -1; pointer-events: none;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: var(--u) var(--u);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}

/* Cabecera: dónde estás, buscador, avisos y quién eres. */
.cabezal { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 10px; min-height: var(--tope); padding: 0 clamp(1rem, 0.4rem + 2vw, 2rem); background: rgba(10, 14, 20, 0.92); border-bottom: 1px solid var(--linea); }
.migas { flex: 1; min-width: 0; }
.migas ol { display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; font: 500 0.8125rem var(--f-display); letter-spacing: -0.01em; color: var(--tenue); white-space: nowrap; overflow: hidden; }
.migas li { display: flex; align-items: center; min-width: 0; }
.migas li + li::before { content: "/"; margin: 0 0.6rem; color: var(--linea-fuerte); }
.migas a { color: var(--suave); text-decoration: none; padding: 0.5rem 0; }
.migas a:hover { color: var(--acento); }
.migas [aria-current] { color: var(--texto); overflow: hidden; text-overflow: ellipsis; }
.busca { position: relative; display: flex; align-items: center; gap: 8px; width: min(340px, 34vw); height: 36px; padding: 0 8px 0 10px; margin: 0; background: var(--tarjeta); border: 1px solid var(--linea-fuerte); border-radius: var(--r); color: var(--tenue); }
.busca:hover { border-color: var(--suave); }
.busca:focus-within { border-color: var(--acento); box-shadow: 0 0 0 3px var(--acento-velo); }
.busca input[type=search] { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; background: transparent; font-size: 0.8125rem; box-shadow: none; }
.busca input[type=search]:focus { box-shadow: none; }
.busca input::-webkit-search-cancel-button { display: none; }
.campana, .tope-lupa, .yo { position: relative; flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 0; border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--suave); }
.campana:hover, .tope-lupa:hover { background: var(--suave-fondo); border-color: var(--linea); color: var(--texto); }
.campana-cifra { position: absolute; top: -4px; right: -6px; height: 16px; min-width: 16px; padding: 0 4px; font-size: 0.625rem; }
.yo { text-decoration: none; }
.cabezal > .marca, .cabezal > .tope-lupa { display: none; }
.yo .redondo { width: 30px; height: 30px; }
.yo:hover .redondo { background: var(--acento-vivo); }

/* Avisos emergentes (atributo popover: se abre y se cierra sin JavaScript). */
.emergente { inset: calc(var(--tope) + 6px) clamp(1rem, 0.4rem + 2vw, 2rem) auto auto; width: min(380px, calc(100vw - 2rem)); margin: 0; padding: 0; background: var(--elevado); color: var(--texto); border: 1px solid var(--linea-fuerte); border-radius: var(--r-lg); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7); }
.emergente header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid var(--linea); font-family: var(--f-display); font-size: 0.8125rem; }
.emergente header a { font-size: 0.75rem; }
.emergente ul { list-style: none; margin: 0; padding: 0.25rem 0; }
.emergente li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.1rem 0.7rem; align-items: baseline; padding: 0.6rem 1rem; }
.emergente li + li { border-top: 1px solid var(--linea); }
.emergente li i { grid-row: span 2; width: 8px; height: 8px; background: var(--info); border-radius: 50%; align-self: start; margin-top: 0.4em; }
.emergente li.n-aviso i { background: var(--aviso); border-radius: 0; transform: rotate(45deg); }
.emergente li.n-critico i { background: var(--mal); border-radius: 0; }
.emergente li a, .emergente li span { color: var(--texto); font-size: 0.8125rem; font-weight: 500; text-decoration: none; line-height: 1.35; }
.emergente li a:hover { color: var(--acento); }
.emergente li small { grid-column: 2; font-size: 0.75rem; }
.emergente-vacio, .emergente-mas { margin: 0; padding: 1rem; font-size: 0.8125rem; color: var(--suave); }
.emergente-mas { padding-top: 0.25rem; }

/* ---- Piezas comunes ---- */
/* Marca de nivel: la forma dice el nivel aunque no se distinga el color. */
.led { flex: none; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tenue); }
.l-bien { background: var(--ok); }
.l-aviso { background: var(--aviso); border-radius: 0; transform: rotate(45deg); }
.l-mal { background: var(--mal); border-radius: 0; }
.l-espera { background: transparent; box-shadow: inset 0 0 0 2px var(--acento); }
.l-pausa { background: transparent; border-radius: 0; box-shadow: inset 2.5px 0 0 var(--tenue), inset -2.5px 0 0 var(--tenue); }
.l-info { background: var(--info); width: 7px; height: 7px; }
.l-nada { background: transparent; box-shadow: inset 0 0 0 1px var(--tenue); }
.con-led { display: inline-flex; align-items: baseline; gap: 0.55rem; }
.con-led .led { transform-origin: center; translate: 0 -1px; }
.con-led small { display: block; }
.c-aviso { color: var(--aviso); }
.c-mal { color: var(--mal); }
.c-nada { color: var(--suave); }
.boton.primario { background: var(--acento); border-color: var(--acento); color: var(--tinta); }
.boton.primario:hover { background: var(--acento-vivo); border-color: var(--acento-vivo); }
.boton.principal { border-color: var(--acento); color: var(--acento); background: transparent; }
.boton.principal:hover { background: var(--acento-velo); border-color: var(--acento); }
.boton.chico, button.chico { min-height: 34px; padding: 0.35rem 0.75rem; font-size: 0.75rem; gap: 0.4rem; }
.cabecera { min-height: 2.5rem; }
.cabecera.de-inicio .en-vivo { margin-left: auto; }
.en-vivo { display: inline-flex; align-items: center; gap: 0.5rem; font: 500 0.75rem var(--mono); color: var(--suave); }
.en-vivo i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.nota-pie { margin-top: 1rem; }

/* Pestañas de filtro (enlaces GET) y barra de la lista. */
.pestanas { display: flex; gap: 0 1.5rem; flex-wrap: wrap; margin: 0 0 1.125rem; border-bottom: 1px solid var(--linea); }
.pestanas a { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 42px; color: var(--suave); font: 500 0.8125rem var(--sans); text-decoration: none; white-space: nowrap; }
.pestanas a b { color: var(--tenue); font: 600 0.75rem var(--f-display); }
.pestanas a:hover { color: var(--texto); }
.pestanas a[aria-current] { color: var(--texto); }
.pestanas a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--acento); }
.pestanas a[aria-current] b { color: var(--acento); }
.lista-barra { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.lista-barra .buscador { flex: 1 1 420px; margin: 0; }
.lista-barra .buscador .ordenar { display: grid; flex: 0 1 auto; }
.lista-barra select.corto { min-width: 0; }
.periodos.vistas a { gap: 0.45rem; }

/* Panel y su cabecera: superficie con línea fina. No hay tarjetas dentro de tarjetas. */
.banco { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0.75rem; margin-top: 0.75rem; align-items: stretch; }
.bloque, .falta { min-width: 0; padding: 1.25rem 1.375rem 1.375rem; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-lg); }
.bloque > :last-child, .falta > :last-child { margin-bottom: 0; }
.b-4 { grid-column: span 4; }
.b-5 { grid-column: span 5; }
.b-7 { grid-column: span 7; }
.b-12 { grid-column: 1 / -1; }
.falta { margin-top: 0.75rem; }
.b-cab { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; flex-wrap: wrap; margin-bottom: 0.875rem; min-height: 28px; }
.b-cab h2 { margin: 0; font-size: 0.875rem; }
.b-cab h2::before { content: ""; flex: none; width: 7px; height: 7px; border: 1px solid var(--acento); }
.b-cab h2 b { color: var(--acento); font-weight: 700; }
.b-cab.suelta { margin: 1.75rem 0 0.75rem; }

/* ---- Inicio: veredicto e instrumentos ---- */
.pulso { position: relative; display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(0, 2fr); background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-lg); overflow: hidden; }
.pulso::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--tenue); transform-origin: left; }
.p-bien::before { background: var(--ok); }
.p-aviso::before { background: var(--aviso); }
.p-mal::before { background: var(--mal); }
.veredicto { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.375rem 1.5rem; min-width: 0; }
.veredicto-frase { display: flex; align-items: baseline; gap: 0.75rem; margin: 0; font: 700 clamp(1.25rem, 0.95rem + 0.9vw, 1.75rem)/1.15 var(--f-display); letter-spacing: -0.035em; text-wrap: balance; overflow-wrap: anywhere; }
.veredicto-frase .led { width: 12px; height: 12px; translate: 0 -2px; }
.veredicto-resto { display: flex; flex-wrap: wrap; gap: 0.25rem 1.125rem; margin: 0; font-size: 0.8125rem; color: var(--suave); }
.veredicto-resto a { color: var(--suave); text-decoration: none; padding: 0.3rem 0; }
.veredicto-resto a:hover { color: var(--acento); }
.veredicto-resto b { color: var(--texto); font-family: var(--f-display); font-weight: 600; }
.veredicto .detalle { margin-top: auto; align-self: flex-start; }
.instrumentos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-left: 1px solid var(--linea); }
.instrumentos > div { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; padding: 1.125rem 1.25rem 0; }
.instrumentos > div + div { border-left: 1px solid var(--linea); }
.instrumentos dt { font: 600 0.75rem var(--f-display); color: var(--suave); }
.instrumentos dt small { font-weight: 500; font-size: 0.6875rem; }
.instrumentos dd { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; margin: 0; min-width: 0; }
.instrumentos dd > b { font: 700 clamp(1.75rem, 1.2rem + 1.4vw, 2.5rem)/1 var(--f-display); letter-spacing: -0.04em; }
.instrumentos dd > b.chico { font-size: clamp(1.125rem, 0.9rem + 0.7vw, 1.5rem); line-height: 1.3; }
.instrumentos dd > b.sin { color: var(--tenue); }
.instrumentos .unidad { font-size: 0.45em; font-weight: 600; color: var(--tenue); letter-spacing: 0; }
.instrumentos small { line-height: 1.35; }
.instrumentos .chispa, .instrumentos progress { margin-top: auto; }
.instrumentos progress { max-width: none; margin-bottom: 1.25rem; }
.i-alto dd > b { color: var(--aviso); }
.chispa { display: block; width: calc(100% + 2.5rem); height: 40px; margin: 0.5rem -1.25rem 0; }
.chispa path { vector-effect: non-scaling-stroke; }
.c-linea { fill: none; stroke: var(--acento); stroke-width: 1.5; stroke-linejoin: round; }
.c-area { fill: var(--acento); fill-opacity: 0.1; stroke: none; }
.delta { display: inline-flex; align-items: center; gap: 0.35rem; }
.delta i { width: 7px; height: 6px; background: currentColor; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.delta.baja i { clip-path: polygon(0 0, 100% 0, 50% 100%); }
.pulso.de-cliente { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.pulso.de-cliente .veredicto-resto { font-size: 0.9375rem; }
.ayuda-boton { margin: 1.25rem 1.5rem; min-height: 56px; padding: 0.6rem 1.125rem; gap: 0.75rem; white-space: normal; text-align: left; }
.ayuda-boton .ico { color: var(--ok); }
.ayuda-boton span { display: grid; line-height: 1.3; }
.ayuda-boton small { font: 400 0.75rem var(--sans); letter-spacing: 0; }

/* Lo que pide atención: una fila por asunto, con su acción. */
.pendientes { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.pendientes li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.25rem 0.875rem; padding: 0.75rem 0; border-top: 1px solid var(--linea); }
.pendientes li:first-child { border-top: 0; padding-top: 0.25rem; }
.pendientes li > .led { align-self: start; margin-top: 0.45em; }
.pendientes div { display: grid; gap: 0.15rem; min-width: 0; }
.pendientes div b { font-weight: 600; font-size: 0.875rem; line-height: 1.35; overflow-wrap: anywhere; }
.pendientes div span { color: var(--suave); font-size: 0.8125rem; line-height: 1.45; }
.pendientes li > small { white-space: nowrap; }
.pendientes .boton { grid-column: 4; }
.pendientes.de-pagina { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-lg); padding: 0.5rem 1.375rem; }
.pendientes.de-pagina li { padding: 1rem 0; }
.pendientes.de-pagina li:first-child { padding-top: 0.75rem; }
.en-orden { display: flex; align-items: baseline; gap: 0.7rem; margin: 0; color: var(--suave); font-size: 0.875rem; }
.en-orden.grande { padding: 2rem 1.5rem; border: 1px solid var(--linea); border-radius: var(--r-lg); background: var(--tarjeta); font-size: 0.9375rem; }
.notas { list-style: none; margin: 0.25rem 0 0; padding: 0.75rem 0 0; border-top: 1px solid var(--linea); display: grid; gap: 0.3rem; color: var(--suave); font-size: 0.8125rem; }
.notas li { position: relative; padding-left: 1rem; }
.notas li::before { content: ""; position: absolute; left: 1px; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--info); }

/* Sitios como un panel de conexiones: una ficha por sitio, lo que falla primero. */
.cifra-linea { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; margin: 0 0 0.875rem; color: var(--suave); font-size: 0.8125rem; }
.cifra-linea b { color: var(--texto); font: 700 clamp(1.5rem, 1.2rem + 0.9vw, 2rem)/1 var(--f-display); letter-spacing: -0.04em; }
.cifra-linea .unidad { font-size: 0.5em; color: var(--tenue); letter-spacing: 0; }
.fichas { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 176px), 1fr)); gap: 4px; margin: 0 0 0.75rem; padding: 0; }
.ficha { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 0.55rem; align-items: baseline; padding: 0.5rem 0.65rem; background: var(--hundido); border: 1px solid var(--linea); border-radius: var(--r-sm); color: var(--texto); text-decoration: none; }
.ficha .ruta { font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ficha small { grid-column: 2; font-size: 0.6875rem; }
.ficha:hover { border-color: var(--acento); background: var(--alza); }
.f-mal { border-color: rgba(248, 113, 113, 0.5); }
.f-mal small { color: var(--mal); }
.f-aviso small { color: var(--aviso); }
.f-espera small { color: var(--acento-vivo); }
.f-pausa .ruta { color: var(--suave); }

/* Gráficas grandes: el valor actual manda en el título de cada una. */
.graficas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 2.25rem; margin-bottom: 1rem; }
.graficas > div { min-width: 0; }
.graficas h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 0.875rem; font-size: 0.8125rem; font-weight: 600; color: var(--suave); }
.graficas h3 b { color: var(--texto); font-size: 1.375rem; font-weight: 700; letter-spacing: -0.04em; }
.graficas .g-plano { height: 190px; }
.graficas .grafica { margin-bottom: 0; }
.g-punto { stroke: var(--acento); stroke-width: 8; stroke-linecap: round; }
.g-punteada { stroke-dasharray: 4 4; }
.g-linea.s2 { stroke-width: 1.25; }

.uso-tabla { min-width: 520px; }
.uso-tabla th, .uso-tabla td { padding: 0.6rem 0.75rem; }
.uso-tabla th:first-child, .uso-tabla td:first-child { padding-left: 0; }
.uso-tabla td small { display: block; }
.uso-tabla progress { max-width: 140px; margin: 0.3rem 0 0; }
.uso-tabla th { background: transparent; }
.tabla-caja.lisa { background: transparent; border: 0; border-radius: 0; max-height: none; margin-bottom: 0.75rem; }
.tabla-caja.lisa tbody tr:hover { background: var(--alza); }

.bitacora { list-style: none; margin: 0; padding: 0; }
.bitacora li { display: grid; grid-template-columns: 5.25rem minmax(0, 1fr); gap: 0 0.875rem; align-items: baseline; padding: 0.55rem 0; border-top: 1px solid var(--linea); font-size: 0.8125rem; }
.bitacora li:first-child { border-top: 0; padding-top: 0.2rem; }
.bitacora time { color: var(--tenue); font-family: var(--mono); font-weight: 500; font-size: 0.75rem; }
.bitacora b { font-weight: 600; }
.bitacora .ruta { color: var(--suave); }
.bitacora small { display: block; }
.rapidos-fila { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--linea); }
.rapidos-fila a { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 38px; padding: 0 0.875rem; border: 1px solid var(--linea); border-radius: var(--r-sm); background: var(--tarjeta); color: var(--suave); font: 600 0.8125rem var(--f-display); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.rapidos-fila a:hover { color: var(--texto); border-color: var(--linea-fuerte); background: var(--alza); }
.rapidos-fila a.principal { color: var(--acento); border-color: var(--acento); background: transparent; }
.rapidos-fila a.principal:hover { background: var(--acento-velo); }

/* ---- Miniatura de un sitio ---- */
.mini { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background-color: var(--hundido);
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px); background-size: 16px 16px; }
.mini-siglas { position: absolute; inset: 0; display: grid; place-items: center; color: var(--linea-fuerte); font: 700 clamp(2rem, 18cqw, 4.5rem)/1 var(--f-display); letter-spacing: -0.04em; }
.mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ---- Lista de dominios: tarjetas ---- */
.sitios { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 0.875rem; margin: 0; padding: 0; }
.sitio { display: flex; flex-direction: column; min-width: 0; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-lg); overflow: hidden; container-type: inline-size; }
.sitio:hover, .sitio:focus-within { border-color: var(--linea-fuerte); }
.sitio-vista { position: relative; display: block; border-bottom: 1px solid var(--linea); }
.sitio-cinta { position: absolute; left: 0; bottom: 0; padding: 0.3rem 0.65rem; background: rgba(10, 14, 20, 0.92); color: var(--texto); font: 600 0.6875rem/1.4 var(--f-display); letter-spacing: 0.02em; border-top: 1px solid var(--linea-fuerte); border-right: 1px solid var(--linea-fuerte); border-top-right-radius: var(--r-sm); }
.c-mal.sitio-cinta { background: var(--mal); color: #2A0606; border-color: var(--mal); }
.c-espera.sitio-cinta { color: var(--acento-vivo); }
.s-mal .mini img { filter: grayscale(0.85) brightness(0.6); }
.s-pausa .mini img { filter: grayscale(1) brightness(0.45); }
.s-espera .mini img { filter: saturate(0.6) brightness(0.8); }
.s-mal.sitio { border-color: rgba(248, 113, 113, 0.45); }
.sitio-cuerpo { flex: 1; display: flex; flex-direction: column; gap: 0.7rem; padding: 0.95rem 1.05rem 1rem; min-width: 0; }
.sitio h2, .sitio h3 { margin: 0; font-size: 0.9375rem; font-weight: 700; letter-spacing: -0.03em; display: block; }
.sitio h2 a, .sitio h3 a { color: var(--texto); text-decoration: none; overflow-wrap: anywhere; }
.sitio h2 a:hover, .sitio h3 a:hover { color: var(--acento); }
.sitio-estado { display: flex; align-items: baseline; gap: 0.6rem; margin: 0; font-size: 0.8125rem; line-height: 1.4; }
.sitio-estado .led { translate: 0 -1px; }
.sitio-estado span { display: grid; gap: 0.05rem; min-width: 0; }
.sitio-estado b { font-weight: 600; }
.sitio-datos { display: grid; grid-template-columns: 1.6fr 1fr; gap: 0.6rem 1rem; margin: 0; padding-top: 0.7rem; border-top: 1px solid var(--linea); }
.sitio-datos div { display: grid; gap: 0.1rem; align-content: start; min-width: 0; }
.sitio-datos dt { font-size: 0.6875rem; color: var(--tenue); }
.sitio-datos dd { margin: 0; font-size: 0.8125rem; font-weight: 500; overflow-wrap: anywhere; }
.sitio-datos dd small { display: block; font-weight: 400; font-size: 0.75rem; line-height: 1.35; }
.sitio-acciones { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.2rem; }
.sitios.de-cliente { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }
.de-cliente .mini { aspect-ratio: 16 / 9; }
.de-cliente .sitio h3 { font-size: 1.0625rem; }
.banco.suelto { align-items: start; }
.tareas-comunes { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid var(--linea); }
.tareas-comunes a { display: flex; align-items: center; gap: 0.65rem; min-height: 52px; padding: 0.45rem 0.25rem; border-bottom: 1px solid var(--linea); color: var(--texto); text-decoration: none; }
.tareas-comunes li:nth-child(odd) a { padding-right: 0.75rem; }
.tareas-comunes a .ico { color: var(--acento); }
.tareas-comunes a span { display: grid; line-height: 1.3; min-width: 0; }
.tareas-comunes a b { font-size: 0.8125rem; font-weight: 600; }
.tareas-comunes a small { font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tareas-comunes a:hover b { color: var(--acento); }
.medidas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.medidas div { display: grid; gap: 0.3rem; align-content: start; min-width: 0; }
.medidas dt { font: 600 0.75rem var(--f-display); color: var(--suave); }
.medidas dd { display: grid; gap: 0.15rem; margin: 0; }
.medidas dd b { font: 700 clamp(1.25rem, 1.05rem + 0.6vw, 1.625rem)/1.1 var(--f-display); letter-spacing: -0.04em; }
.medidas progress { max-width: none; }
.como { list-style: none; display: grid; gap: 0; margin: 0 0 0.875rem; padding: 0; }
.como li { display: grid; gap: 0.15rem; padding: 0.65rem 0; border-top: 1px solid var(--linea); font-size: 0.8125rem; }
.como li:first-child { border-top: 0; padding-top: 0; }
.como b { font-weight: 600; font-size: 0.875rem; }
.como span { color: var(--suave); line-height: 1.5; }
.como i { font-style: normal; color: var(--texto); font-weight: 500; }

/* ---- Página de un dominio ---- */
.dom { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.25rem, 0.5rem + 2vw, 2.5rem); align-items: start; }
.dom-vista { margin: 0; min-width: 0; container-type: inline-size; }
.navegador { border: 1px solid var(--linea-fuerte); border-radius: var(--r-lg); overflow: hidden; background: var(--tarjeta); }
.navegador-barra { display: flex; align-items: center; gap: 0.6rem; margin: 0; min-height: 36px; padding: 0 0.4rem 0 0.8rem; border-bottom: 1px solid var(--linea-fuerte); background: var(--elevado); font-size: 0.75rem; color: var(--suave); }
.navegador-barra .ruta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.navegador-barra a { display: inline-grid; place-items: center; width: 32px; height: 32px; color: var(--suave); border-radius: var(--r-sm); }
.navegador-barra a:hover { color: var(--acento); background: var(--suave-fondo); }
.dom-vista figcaption { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; margin-top: 0.4rem; color: var(--tenue); font-size: 0.75rem; }
.dom-vista figcaption form { margin: 0; }
.s-mal .navegador .mini img { filter: grayscale(0.85) brightness(0.6); }
.s-pausa .navegador .mini img { filter: grayscale(1) brightness(0.45); }
.dom-resumen { display: grid; gap: 0.75rem; min-width: 0; align-content: start; }
.dom-resumen h1 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem); }
.dom-bajada { margin: -0.25rem 0 0; color: var(--suave); font-size: 0.875rem; overflow-wrap: anywhere; }
.dom-bajada:empty { display: none; }
.hechos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.75rem; margin: 0.25rem 0 0; border-bottom: 1px solid var(--linea); }
.hechos > div { display: grid; gap: 0.2rem; align-content: start; min-width: 0; padding: 0.7rem 0 0.8rem; border-top: 1px solid var(--linea); }
.hechos dt { font: 600 0.6875rem var(--f-display); letter-spacing: 0.04em; color: var(--tenue); }
.hechos dd { display: grid; gap: 0.15rem; margin: 0; min-width: 0; font-size: 0.875rem; }
.hechos dd b { font-weight: 600; overflow-wrap: anywhere; }
.hechos dd b.num, .hechos dd > .ruta { font-family: var(--f-display); letter-spacing: -0.02em; }
.hechos dd small { line-height: 1.45; }
.hechos .tira { margin-top: 0.3rem; width: 100%; max-width: 220px; height: 10px; }
.dom-acciones { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.dom + .falta { margin-top: 1.5rem; }

/* Herramientas: un índice por grupos. Cada fila dice su estado; al abrirse sale una hoja lateral. */
.herr-grupos { margin-top: 1.75rem; }
.herr-grupo { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0.5rem 1.5rem; padding: 1.125rem 0 1.25rem; border-top: 1px solid var(--linea); }
.herr-grupo > header h2 { margin: 0.55rem 0 0.2rem; font-size: 0.875rem; }
.herr-grupo > header h2::before { content: ""; flex: none; width: 7px; height: 7px; border: 1px solid var(--acento); }
.herr-grupo > header p { margin: 0; padding-left: calc(7px + 0.6rem); color: var(--tenue); font-size: 0.75rem; line-height: 1.4; }
.herr-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: 0; padding: 0 1px 1px 0; }
.herr { min-width: 0; margin: 0 -1px -1px 0; background: var(--tarjeta); border: 1px solid var(--linea); color: var(--texto); scroll-margin-top: calc(var(--tope) + 1rem); }
a.herr, .herr > summary { position: relative; display: flex; align-items: center; gap: 0.8rem; width: 100%; min-height: 66px; padding: 0.7rem 2rem 0.7rem 0.9rem; border: 0; border-radius: 0; color: var(--texto); font: inherit; letter-spacing: 0; text-decoration: none; white-space: normal; cursor: pointer; }
a.herr { border: 1px solid var(--linea); }
.herr > summary::after, a.herr::after { content: ""; position: absolute; right: 0.95rem; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-top: 1.5px solid var(--tenue); border-right: 1.5px solid var(--tenue); border-bottom: 0; transform: rotate(45deg); opacity: 1; }
.herr:hover, .herr:focus-within { position: relative; z-index: 1; border-color: var(--acento); background: var(--alza); }
.herr > summary:hover { background: transparent; border-color: transparent; color: var(--texto); }
.herr:hover > summary::after, a.herr:hover::after { border-color: var(--acento); }
.herr .redondo { width: 34px; height: 34px; }
.herr.atencion .redondo { background: var(--aviso-velo); color: var(--aviso); }
.herr.atencion .h-texto small { color: var(--aviso); }
/* Abierta: la fila queda marcada en su sitio y el cuerpo pasa a una hoja fija a la derecha, sobre un velo. */
details.herr[open] { flex: none; order: 0; padding: 0; background: var(--acento-velo); border: 1px solid var(--acento); border-radius: 0; z-index: 60; position: relative; }
details.herr[open] > summary { margin: 0; color: var(--texto); }
details.herr[open] > summary b { color: var(--acento); }
details.herr[open] > summary::after { margin-top: -3px; transform: rotate(45deg); border-color: var(--acento); }
details.herr::details-content { block-size: auto; opacity: 1; overflow: visible; transition: none; }
details.herr[open]::before { content: ""; position: fixed; inset: 0; z-index: 70; background: rgba(4, 7, 11, 0.66); }
.hoja { position: fixed; inset: 0 0 0 auto; z-index: 71; width: min(var(--hoja), 100vw); display: flex; flex-direction: column; background: var(--elevado); border-left: 1px solid var(--linea-fuerte); box-shadow: var(--sombra-hoja); overflow-y: auto; overscroll-behavior: contain; cursor: auto; }
.herr.ancha .hoja { width: min(920px, 100vw); }
.hoja-cab { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 0.875rem; padding: 0.875rem 0.875rem 0.875rem 1.375rem; background: var(--elevado); border-bottom: 1px solid var(--linea); }
.hoja-cab > div { flex: 1; min-width: 0; }
.hoja-cab h3 { margin: 0; font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.03em; outline: 0; }
.hoja-cab p { margin: 0.1rem 0 0; color: var(--suave); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hoja-cerrar { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--linea); border-radius: var(--r); color: var(--suave); }
.hoja-cerrar:hover { color: var(--texto); border-color: var(--texto); background: var(--suave-fondo); }
.hoja .h-cuerpo { padding: 1.375rem; }
.hoja .h-cuerpo > form:not(.rejilla) { display: grid; gap: 0.75rem; justify-items: start; }
.hoja .h-cuerpo > form + form, .hoja .h-cuerpo > .pares + form { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--linea); }
.hoja .rejilla { max-width: none; }
.hoja input:not([type=checkbox]):not([type=hidden]), .hoja select, .hoja textarea { background-color: var(--fondo); }
html:has(details.herr[open]) { overflow: hidden; scrollbar-gutter: stable; }
/* Con una hoja abierta, el cuerpo pasa por encima de la barra lateral y de la barra de móvil. */
.cuerpo:has(details.herr[open]) { z-index: 50; }

/* ---- Paleta de órdenes y avisos que flotan (los crea o los abre panel.js) ---- */
.paleta { width: min(660px, calc(100vw - 1.5rem)); max-height: min(70vh, 620px); margin: 11vh auto auto; padding: 0; background: var(--elevado); color: var(--texto); border: 1px solid var(--linea-fuerte); border-radius: var(--r-xl); box-shadow: 0 28px 70px -16px rgba(0, 0, 0, 0.8); overflow: hidden; }
.paleta[open] { display: flex; flex-direction: column; }
.paleta::backdrop { background: rgba(4, 7, 11, 0.62); }
.paleta form { display: flex; align-items: center; gap: 0.75rem; margin: 0; padding: 0 1rem; border-bottom: 1px solid var(--linea); color: var(--tenue); }
.paleta input[type=search] { flex: 1; min-height: 56px; padding: 0; border: 0; background: transparent; font-size: 1rem; box-shadow: none; }
.paleta input[type=search]:focus { box-shadow: none; }
.paleta input::-webkit-search-cancel-button { display: none; }
.paleta ul { flex: 1; list-style: none; margin: 0; padding: 0.375rem; overflow-y: auto; scrollbar-width: thin; }
.paleta li.paleta-grupo { padding: 0.7rem 0.75rem 0.3rem; font: 600 0.6875rem var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--tenue); }
.paleta li a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 0.75rem; min-height: 44px; padding: 0.35rem 0.75rem; border-radius: var(--r); color: var(--texto); text-decoration: none; }
.paleta li a .ico { color: var(--tenue); }
.paleta li a b { font: 500 0.875rem var(--mono); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paleta li a small { font-size: 0.75rem; white-space: nowrap; }
.paleta li a[aria-selected=true] { background: var(--acento-velo); }
.paleta li a[aria-selected=true] .ico, .paleta li a[aria-selected=true] b { color: var(--acento-vivo); }
.paleta-vacio { padding: 1.5rem 0.75rem; color: var(--suave); font-size: 0.875rem; }
.paleta-pie { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; margin: 0; padding: 0.6rem 1rem; border-top: 1px solid var(--linea); color: var(--tenue); font-size: 0.75rem; }
.paleta-pie span { display: inline-flex; align-items: center; gap: 0.35rem; }
.tostadas { position: fixed; right: 1rem; bottom: 1rem; z-index: 90; display: grid; gap: 0.5rem; width: min(400px, calc(100vw - 2rem)); pointer-events: none; }
.tostadas .aviso { margin: 0; pointer-events: auto; box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.8); }
.copiar { justify-self: start; min-height: 34px; padding: 0.3rem 0.8rem; background: var(--tinta); border-color: var(--tinta); color: var(--acento-vivo); font-size: 0.75rem; }
.copiar:hover { background: #0A2233; border-color: #0A2233; }
.cambio { animation: none; }

/* Resultados del buscador. */
.buscador.grande input[type=search] { max-width: 560px; min-height: 48px; }
.resultados { margin-top: 1.5rem; }
.resultados h2 { margin-bottom: 0.5rem; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--suave); }
.resultados h2 b { color: var(--tenue); }
.resultados ul { list-style: none; margin: 0; padding: 0; background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--r-lg); }
.resultados li + li { border-top: 1px solid var(--linea); }
.resultados a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0 0.875rem; min-height: 48px; padding: 0.4rem 1.125rem; color: var(--texto); text-decoration: none; }
.resultados a .ico { color: var(--tenue); }
.resultados a:hover { background: var(--alza); }
.resultados a:hover .ruta, .resultados a:hover .ico:last-child { color: var(--acento); }

/* ---- Anchos intermedios ---- */
@media (max-width: 1280px) {
  :root { --nav: 208px; }
  .pulso { grid-template-columns: 1fr; }
  .instrumentos { border-left: 0; border-top: 1px solid var(--linea); }
  .b-4 { grid-column: span 6; }
  .b-4:nth-of-type(3n) { grid-column: 1 / -1; }
  .b-5, .b-7 { grid-column: 1 / -1; }
  .pulso.de-cliente { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 1020px) {
  .dom { grid-template-columns: 1fr; }
  .dom-vista { max-width: 620px; }
  .herr-grupo { grid-template-columns: 1fr; }
  .herr-grupo > header { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
  .herr-grupo > header h2 { margin: 0; }
  .herr-grupo > header p { padding-left: 0; }
}
/* ---- Móvil: la navegación baja a una barra de cinco huecos y la cabecera se queda con lo esencial ---- */
@media (max-width: 860px) {
  .arm { display: block; padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .nav { display: none; }
  .cuerpo { min-height: 0; }
  .cabezal { gap: 4px; padding: 0 0.75rem; }
  .cabezal > .marca { display: flex; align-items: center; margin-right: auto; min-height: 44px; }
  .cabezal > .tope-lupa { display: inline-grid; }
  .cabezal > .marca img { height: 28px; }
  .cabezal > .marca .marca-nombre, .cabezal > .marca .marca-bajada { display: none; }
  .migas, .busca { display: none; }
  .campana, .tope-lupa, .yo { width: 44px; height: 44px; }
  .campana-cifra { top: 2px; right: 0; }
  .emergente { inset: calc(var(--tope) + 6px) 0.75rem auto 0.75rem; width: auto; }
  .barra-movil { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--elevado); border-top: 1px solid var(--linea-fuerte); }
  .barra-movil a, .barra-movil summary, .barra-movil button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 100%; height: 52px; min-height: 0; margin: 0; padding: 0 2px; border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--tenue); font: 500 0.6875rem/1.2 var(--sans); letter-spacing: 0; text-decoration: none; white-space: nowrap; }
  .barra-movil .rotulo { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .barra-movil a[aria-current=page], .mas-menu.actual > summary, .mas-menu[open] > summary { color: var(--acento); }
  .barra-movil a[aria-current=page]::before, .mas-menu.actual > summary::before { content: ""; position: absolute; left: 22%; right: 22%; top: -5px; height: 2px; background: var(--acento); }
  .barra-movil .nav-cifra { position: absolute; top: 3px; left: 50%; margin-left: 6px; height: 15px; min-width: 15px; font-size: 0.5625rem; }
  .mas-menu, .mas-menu[open] { display: block; flex: none; order: 0; min-width: 0; padding: 0; background: none; border: 0; border-radius: 0; }
  .mas-menu > summary::after { display: none; }
  .mas-menu[open] > summary { background: var(--acento-velo); margin: 0; }
  .mas-menu::details-content { overflow: visible; }
  .mas-panel { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 8px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 8px; background: var(--elevado); border: 1px solid var(--linea-fuerte); border-radius: var(--r-lg); box-shadow: 0 -18px 40px -14px rgba(0, 0, 0, 0.8); }
  .mas-panel form { margin: 0; display: block; }
  .mas-panel a, .mas-panel button { height: 60px; border-color: var(--linea); font-size: 0.75rem; }
  .mas-panel a[aria-current=page]::before { display: none; }
  .instrumentos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .instrumentos > div:nth-child(3) { border-left: 0; }
  .instrumentos > div:nth-child(n+3) { border-top: 1px solid var(--linea); }
  .b-4, .b-4:nth-of-type(3n) { grid-column: 1 / -1; }
  .graficas { grid-template-columns: 1fr; }
  .hoja, .herr.ancha .hoja { width: 100vw; border-left: 0; }
  .tostadas { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .pulso.de-cliente { grid-template-columns: 1fr; }
  .ayuda-boton { margin: 0 1.25rem 1.25rem; }
  .medidas { grid-template-columns: 1fr; }
  .boton.chico, button.chico { min-height: 40px; }
  .paleta { margin-top: 0.75rem; max-height: 80vh; }
  .paleta-pie span:last-child { display: none; }
}
@media (max-width: 700px) {
  .uso-tabla { min-width: 0; }
  .uso-tabla td:first-child { padding-left: 0; }
  .uso-tabla td { flex: 1 1 28%; }
  .uso-tabla progress { max-width: none; }
  .lista-barra .buscador .ordenar { flex: 1 1 100%; }
  .con-led small { display: inline; }
}
@media (max-width: 560px) {
  .bloque, .falta { padding: 1rem 1rem 1.125rem; }
  .veredicto { padding: 1.125rem 1rem; }
  .instrumentos > div { padding: 0.875rem 1rem 0; }
  .chispa { width: calc(100% + 2rem); margin-left: -1rem; margin-right: -1rem; }
  .pendientes li { grid-template-columns: auto minmax(0, 1fr); }
  .pendientes li > small { grid-column: 2; }
  .pendientes .boton { grid-column: 2; justify-self: start; }
  .hechos { grid-template-columns: 1fr; }
  .dom-acciones .boton { flex: 1 1 auto; }
  .sitio-acciones .boton { flex: 1 1 auto; }
  .hoja .h-cuerpo { padding: 1rem; }
  .hoja-cab { padding-left: 1rem; }
  .bitacora li { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .tareas-comunes { grid-template-columns: 1fr; }
  .tareas-comunes li:nth-child(odd) a { padding-right: 0.25rem; }
  .periodos.vistas span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pestanas { gap: 0 1.125rem; }
}

/* ---- Movimiento del sistema nuevo. Con «reducir movimiento» todo queda en su estado final. ---- */
@keyframes hojaEntra { from { transform: translateX(28px); opacity: 0; } }
@keyframes veloEntra { from { opacity: 0; } }
@keyframes dibuja { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes paletaEntra { from { transform: translateY(-8px) scale(0.985); opacity: 0; } }
@keyframes pulsoVivo { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); } 70%, 100% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); } }
@keyframes parpadeoCifra { from { color: var(--acento-vivo); } }
@keyframes tostadaEntra { from { transform: translateY(10px); opacity: 0; } }
@keyframes tostadaSale { to { transform: translateY(6px); opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  /* Una sola entrada escalonada por página: los paneles suben 10px en orden de lectura. */
  /* «backwards», no «both»: una animación de transform que sigue vigente al terminar atraparía la hoja fija de una herramienta. */
  .banco > .bloque, .sitios > .sitio, .herr-grupo { animation: entra 0.42s var(--curva) backwards; }
  .banco > :nth-child(2), .sitios > :nth-child(2), .herr-grupo:nth-child(2) { animation-delay: 45ms; }
  .banco > :nth-child(3), .sitios > :nth-child(3), .herr-grupo:nth-child(3) { animation-delay: 90ms; }
  .banco > :nth-child(4), .sitios > :nth-child(4), .herr-grupo:nth-child(4) { animation-delay: 135ms; }
  .banco > :nth-child(5), .sitios > :nth-child(5), .herr-grupo:nth-child(5) { animation-delay: 180ms; }
  .banco > :nth-child(6), .sitios > :nth-child(6), .herr-grupo:nth-child(6) { animation-delay: 225ms; }
  .banco > :nth-child(n+7), .sitios > :nth-child(n+7) { animation-delay: 270ms; }
  .pagina > .banco, .pagina > .sitios, .pagina > .herr-grupos, .pagina > .dom { animation: none; }
  /* Las gráficas se dibujan de izquierda a derecha, como un registrador. */
  .graficas .g-plano, .chispa { animation: dibuja 1s cubic-bezier(0.3, 0.7, 0.2, 1) 0.15s both; }
  .pulso::before { animation: trazo 0.7s var(--curva) 0.1s both; }
  .en-vivo i { animation: pulsoVivo 2.4s ease-out infinite; }
  .cambio { animation: parpadeoCifra 1.2s ease-out both; }
  .hoja { animation: hojaEntra 0.28s var(--curva) both; }
  details.herr[open]::before { animation: veloEntra 0.2s ease both; }
  .paleta[open] { animation: paletaEntra 0.18s var(--curva) both; }
  .paleta::backdrop { animation: veloEntra 0.18s ease both; }
  .tostadas .aviso { animation: tostadaEntra 0.3s var(--curva) both; }
  .tostadas .aviso.sale { animation: tostadaSale 0.25s ease both; }
  .emergente:popover-open { animation: paletaEntra 0.16s var(--curva) both; }
  .sitio, .herr, .ficha, .rapidos-fila a, .pestanas a, .busca, .campana, .tope-lupa, .hoja-cerrar, .tareas-comunes a b, .navegador-barra a { transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease; }
  .mini img { transition: transform 0.5s var(--curva), filter 0.3s ease; }
  .sitio:hover .mini img { transform: scale(1.025); }
  .herr > summary::after, a.herr::after { transition: translate 0.2s var(--curva), border-color 0.16s ease; }
  .herr:hover > summary::after, a.herr:hover::after { translate: 3px 0; }
  .herr:not([open]):hover .redondo svg { transform: none; }
  .mas-panel { animation: entra 0.2s var(--curva) both; }
}
@media (forced-colors: active) {
  .led { forced-color-adjust: none; }
  .hoja, .paleta, .emergente { border: 1px solid CanvasText; }
}
.hoja label.casilla { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.6rem; }
.hoja label.casilla small { grid-column: 2; padding-left: 0; }

/* Notas bajo el formulario de entrada (doble factor, panel anterior). */
.nota-entrada { margin: 0; font-size: 0.85rem; line-height: 1.45; color: var(--suave); }
.nota-entrada a { color: var(--acento); }
