/* Panel de abonados · diseño Palomera (DISENO.md §13).

   Los colores salen de la paloma: un gris paloma claro de fondo, el violeta
   del reflejo del cuello para lo que se hace, y el verde azulado para «al
   día». En el teléfono el panel es una app: barra de cuatro botones abajo, al
   alcance del pulgar, y botones de 52 px. En la PC, la misma navegación es
   una barra lateral.

   Sin fuentes externas ni scripts en línea (CSP): Figtree va servida desde
   /estatico/fuentes, con su licencia OFL al lado. Una sola fuente variable. */

@font-face {
  font-family: "Figtree"; font-weight: 400 800; font-display: swap;
  src: url("fuentes/figtree.woff2") format("woff2");
}

:root {
  --fondo: #f2f3f6;
  --hoja: #ffffff;
  --linea: #e1e3e9;
  --linea-fuerte: #c9cdd7;
  --tinta: #18202e;
  --tinta-2: #3e4656;
  --tenue: #5b6475;
  --campo: #ffffff;
  /* El violeta del cuello: todo lo que se pulsa. */
  --accion: #4b32c3;
  --accion-hundida: #36239a;
  --accion-suave: #efecfd;
  --accion-tinta: #ffffff;
  /* Las tres luces. El punto lleva el color vivo; el texto, uno más oscuro
     que pasa contraste sobre blanco. */
  --aire: #0e8a7e;      --aire-tinta: #0a5f57;   --aire-suave: #ddf2ef;
  /* El botón de pagar: más oscuro que la luz, para que el blanco pase 4.5:1. */
  --pago: #0b7a70;      --pago-tinta: #ffffff;
  --aviso: #c27a00;     --aviso-tinta: #8a5600;  --aviso-suave: #fbf0dc;
  --fuera: #c2412d;     --fuera-tinta: #a3321f;  --fuera-suave: #fbe7e3;
  /* La tele. */
  --pantalla: #1c2836;
  --pantalla-borde: #10161f;
  --pantalla-tinta: #ffffff;
  --pantalla-tenue: #a9b6c4;

  --letra: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fija: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radio: 14px;
  --radio-chico: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #12151c;
    --hoja: #1b1f29;
    --linea: #2b3140;
    --linea-fuerte: #3b4254;
    --tinta: #e9ecf2;
    --tinta-2: #c4c9d4;
    --tenue: #9aa3b4;
    --campo: #151922;
    --accion: #8f7dff;
    --accion-hundida: #ada0ff;
    --accion-suave: #262140;
    --accion-tinta: #120d2b;
    --aire: #2fb3a5;      --aire-tinta: #5fd0c3;   --aire-suave: #14302d;
    --pago: #2fb3a5;      --pago-tinta: #06201d;
    --aviso: #e0a334;     --aviso-tinta: #f0c068;  --aviso-suave: #33270f;
    --fuera: #ef6e5a;     --fuera-tinta: #f69a8b;  --fuera-suave: #3a1c18;
    --pantalla: #0f1620;
    --pantalla-borde: #2b3646;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--fondo); color: var(--tinta);
  font: 400 1rem/1.5 var(--letra); -webkit-text-size-adjust: 100%;
}
a { color: var(--accion); text-underline-offset: 0.15em; }
a:hover { color: var(--accion-hundida); }
:focus-visible { outline: 3px solid var(--accion); outline-offset: 2px; }

h1, h2, h3 { color: var(--tinta); }
h1 { font-size: 1.75rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 1rem; }
h2 { font-size: 1.125rem; font-weight: 700; line-height: 1.25; margin: 1.75rem 0 0.75rem; }
h3 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 0.5rem; }
p { max-width: 68ch; }
.tenue { color: var(--tenue); }
.pequeno { font-size: 0.875rem; line-height: 1.45; }
.numeros, td.numeros { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* -- Avisos de toda la página -------------------------------------------- */
.sin-cifrar {
  max-width: none; margin: 0; padding: 0.4rem 1rem; text-align: center;
  font-size: 0.8125rem; color: var(--aviso-tinta); background: var(--aviso-suave);
  border-bottom: 1px solid color-mix(in srgb, var(--aviso) 35%, transparent);
}

/* -- El marco: barra lateral en la PC ------------------------------------ */
.app {
  display: flex; align-items: flex-start; min-height: 100vh;
  /* La barra lateral pinta su columna entera aunque la página sea más larga que ella. */
  background: linear-gradient(to right, var(--hoja) 247px, var(--linea) 247px 248px, transparent 248px);
}
.barra {
  position: sticky; top: 0; flex: none; width: 248px; min-height: 100vh; max-height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 1.5rem 1rem; background: var(--hoja); border-right: 1px solid var(--linea);
}
.barra .marca { display: grid; gap: 0.1rem; padding: 0 0.75rem; text-decoration: none; color: var(--tinta); }
.barra .isp { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.barra .producto { font-size: 0.8125rem; color: var(--tenue); }
.barra nav { display: flex; flex-direction: column; gap: 0.15rem; }
.barra nav a {
  display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; padding: 0 0.75rem;
  border-radius: var(--radio-chico); color: var(--tinta-2); font-weight: 600; text-decoration: none;
}
.barra nav a.menor { min-height: 2.5rem; font-weight: 500; font-size: 0.9375rem; color: var(--tenue); }
.barra nav a:hover { background: var(--fondo); color: var(--tinta); }
.barra nav a[aria-current] { background: var(--accion-suave); color: var(--accion-hundida); font-weight: 700; }
.barra nav svg {
  width: 1.375rem; height: 1.375rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.barra .separador { height: 1px; background: var(--linea); margin: 0.6rem 0.75rem; }
.barra .solo-movil { display: none; }
.barra .quien { margin-top: auto; display: flex; flex-direction: column; gap: 0.6rem; padding: 0 0.25rem; }
.barra .avatar {
  display: flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; padding: 0 0.5rem;
  border-radius: var(--radio-chico); color: var(--tinta); text-decoration: none;
}
.barra .avatar > span:first-child {
  width: 2.25rem; height: 2.25rem; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accion-suave); color: var(--accion); font-weight: 800;
}
.barra .avatar small { display: block; color: var(--tenue); font-size: 0.8125rem; }
.barra .avatar[aria-current] { background: var(--accion-suave); }
.barra form { margin: 0; }
.barra .quien button { width: 100%; }

main { flex: 1 1 auto; min-width: 0; max-width: 1080px; padding: 2rem 2.5rem 4rem; }
body > main { margin: 0 auto; }
main.estrecho { max-width: 420px; padding-top: 10vh; margin: 0 auto; }
main.estrecho h1 + p { margin: -0.6rem 0 1.25rem; color: var(--tenue); }

/* -- En el teléfono: barra arriba con el nombre, botones abajo ----------- */
@media (max-width: 900px) {
  .app { display: block; background: none; }
  .barra {
    position: static; width: auto; min-height: 0; flex-direction: row; align-items: center;
    justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-right: 0;
    border-bottom: 1px solid var(--linea);
  }
  .barra .marca { padding: 0; }
  .barra .isp { font-size: 1.125rem; }
  .barra .quien { margin: 0; padding: 0; flex-direction: row; align-items: center; }
  .barra .quien form, .barra .quien-texto { display: none; }
  .barra .avatar { padding: 0; }
  .barra nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.25rem;
    padding: 0.4rem 0.5rem calc(0.4rem + env(safe-area-inset-bottom));
    background: var(--hoja); border-top: 1px solid var(--linea);
  }
  .barra nav .secundaria { display: none; }
  .barra nav .solo-movil { display: flex; }
  .barra nav a.principal {
    flex-direction: column; justify-content: center; gap: 0.15rem; min-height: 3.5rem; padding: 0;
    font-size: 0.75rem; font-weight: 600; color: var(--tenue); background: none;
  }
  .barra nav a.principal[aria-current] { color: var(--accion); background: none; font-weight: 800; }
  main { padding: 1.25rem 1rem calc(6.5rem + env(safe-area-inset-bottom)); }
}

/* -- Piezas -------------------------------------------------------------- */
.cabecera { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.75rem 1.5rem; margin-bottom: 1.25rem; }
.cabecera h1, .cabecera h2 { margin: 0; }
.cabecera.titular p { margin: 0.35rem 0 0; }
.hoja > .cabecera:first-child { align-items: baseline; margin-bottom: 1rem; }

.hoja { background: var(--hoja); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.1rem 1.25rem; }
.hoja + .hoja { margin-top: 1rem; }
.hoja > h2:first-child { margin-top: 0; }
.separada { margin-top: 1.75rem; }
.cuidado { border-color: color-mix(in srgb, var(--fuera) 35%, var(--linea)); }
.cuidado h2, .cuidado > summary { color: var(--fuera-tinta); }

/* Tablas: en la PC, filas limpias; en el teléfono, una tarjeta por abonado. */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem 1rem; vertical-align: top; }
th { font-size: 0.8125rem; font-weight: 600; color: var(--tenue); border-bottom: 1px solid var(--linea); }
td { border-bottom: 1px solid var(--linea); }
.tabla { overflow-x: auto; background: var(--hoja); border: 1px solid var(--linea); border-radius: var(--radio); }
.tabla tr:last-child td { border-bottom: 0; }
td a { font-weight: 600; color: var(--tinta); text-decoration: none; }
td a:hover { color: var(--accion); text-decoration: underline; }

/* La luz de estado: un punto y su texto. */
.tally { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; font-weight: 600; color: var(--color-texto, var(--tinta)); }
.tally::before { content: ""; flex: none; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--color-tally); }
.tally.bien { --color-tally: var(--aire); --color-texto: var(--aire-tinta); --color-suave: var(--aire-suave); }
.tally.aviso { --color-tally: var(--aviso); --color-texto: var(--aviso-tinta); --color-suave: var(--aviso-suave); }
.tally.mal { --color-tally: var(--fuera); --color-texto: var(--fuera-tinta); --color-suave: var(--fuera-suave); }
.tally.neutro { --color-tally: var(--tenue); --color-texto: var(--tenue); --color-suave: var(--fondo); }
.tally.grande { white-space: normal; min-height: 2.125rem; padding: 0.25rem 0.9rem; border-radius: 999px; background: var(--color-suave); font-weight: 700; }
tr.mal td:first-child { box-shadow: inset 3px 0 0 var(--fuera); }
tr.aviso td:first-child { box-shadow: inset 3px 0 0 var(--aviso); }

.chip {
  display: inline-flex; align-items: center; min-height: 2.125rem; padding: 0.25rem 0.75rem; border-radius: 999px;
  background: color-mix(in srgb, var(--tenue) 14%, var(--hoja)); color: var(--tinta-2); font-weight: 600; font-size: 0.9375rem;
}

/* -- Formularios --------------------------------------------------------- */
form.campos { display: grid; gap: 1.1rem; }
form.campos .doble { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
form.campos .doble label { align-content: end; }
label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.9375rem; }
label small { font-weight: 400; color: var(--tenue); font-size: 0.875rem; }
input, textarea, select {
  font: inherit; font-size: 1rem; font-weight: 500; color: inherit; background: var(--campo);
  border: 1px solid var(--linea-fuerte); border-radius: 12px; padding: 0.6rem 0.85rem; width: 100%; min-height: 3.25rem;
}
input:hover, textarea:hover, select:hover { border-color: var(--tenue); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accion); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accion) 22%, transparent); }
input::placeholder { color: color-mix(in srgb, var(--tenue) 80%, transparent); font-weight: 400; }
textarea { min-height: 5.5rem; }
input[type="checkbox"], input[type="radio"] { width: 1.25rem; height: 1.25rem; min-height: 0; padding: 0; accent-color: var(--accion); box-shadow: none; }
.en-linea { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.en-linea input, .en-linea select { width: auto; flex: 1; min-width: 12rem; }
.en-linea input.corto { max-width: 5.5rem; min-width: 0; flex: 0 1 5.5rem; }
form.en-linea, td form { margin: 0; }
label.casilla { display: flex; align-items: flex-start; gap: 0.7rem; font-weight: 600; }
label.casilla input { margin: 0.1rem 0 0; flex: none; }
label.casilla small { display: block; }
summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--accion); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-grid; place-items: center; width: 1.25rem; font-size: 1.25rem; line-height: 1; }
details[open] > summary::before { content: "−"; }
.campos-plegados { display: grid; gap: 1.1rem; padding-top: 0.5rem; }

/* Las opciones del plan: tarjetas en vez de una lista desplegable. */
.opciones { border: 0; margin: 0; padding: 0; min-width: 0; }
.opciones legend { font-weight: 600; font-size: 0.9375rem; padding: 0; margin-bottom: 0.5rem; }
.opciones .rejilla-opciones { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.opcion {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.1rem 0.6rem; padding: 0.85rem 1rem;
  border: 1px solid var(--linea-fuerte); border-radius: var(--radio); background: var(--campo); cursor: pointer; font-size: 1rem;
}
.opcion small { grid-column: 2; }
.opcion:has(input:checked) { border-color: var(--accion); box-shadow: inset 0 0 0 1px var(--accion); background: var(--accion-suave); }

/* Botones: llenos de violeta para lo principal, con borde para lo demás. */
button, a.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none;
  min-height: 3rem; padding: 0.6rem 1.25rem; border-radius: 12px;
  border: 1px solid var(--accion); background: var(--accion); color: var(--accion-tinta);
}
button:hover, a.boton:hover { background: var(--accion-hundida); border-color: var(--accion-hundida); color: var(--accion-tinta); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.7; cursor: progress; }
button.secundario, a.boton.secundario { background: var(--hoja); color: var(--tinta); border-color: var(--linea-fuerte); }
button.secundario:hover, a.boton.secundario:hover { background: var(--fondo); border-color: var(--tenue); color: var(--tinta); }
button.pago { background: var(--pago); border-color: var(--pago); color: var(--pago-tinta); }
button.pago:hover { background: color-mix(in srgb, var(--pago) 85%, var(--tinta)); border-color: transparent; color: var(--pago-tinta); }
button.peligro { background: var(--hoja); border-color: color-mix(in srgb, var(--fuera) 55%, var(--linea)); color: var(--fuera-tinta); }
button.peligro:hover { background: var(--fuera-suave); color: var(--fuera-tinta); border-color: var(--fuera); }
button.discreto {
  min-height: 2.75rem; background: none; border: 0; padding: 0; color: var(--accion);
  font-weight: 600; text-decoration: underline; text-underline-offset: 0.15em;
}
button.discreto:hover { background: none; color: var(--accion-hundida); }
.ancho { width: 100%; min-height: 3.5rem; font-size: 1.0625rem; border-radius: var(--radio); }
a.enlace-ancho { display: flex; align-items: center; justify-content: center; min-height: 2.75rem; font-weight: 600; text-decoration: none; text-align: center; }
.botonera { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
.botonera form { margin: 0; display: grid; }

/* -- Lo que el panel tiene que decir ------------------------------------- */
.error, .aviso-caja, .bien-caja {
  max-width: none; border-radius: 12px; padding: 0.8rem 1rem; margin: 0 0 1rem; border: 1px solid;
}
.error { border-color: color-mix(in srgb, var(--fuera) 45%, transparent); background: var(--fuera-suave); color: var(--fuera-tinta); }
.aviso-caja { border-color: color-mix(in srgb, var(--aviso) 45%, transparent); background: var(--aviso-suave); color: var(--tinta); }
.bien-caja { border-color: color-mix(in srgb, var(--aire) 45%, transparent); background: var(--aire-suave); color: var(--tinta); }
.aviso-caja ul, .error ul { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.nota { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.9rem 1rem; margin: 0 0 1rem; border-radius: var(--radio); background: var(--accion-suave); max-width: none; }
.nota svg { flex: none; width: 1.375rem; height: 1.375rem; fill: none; stroke: var(--accion); stroke-width: 2; stroke-linecap: round; }

.lista-alias { list-style: none; padding: 0; margin: 0 0 1rem; }
.lista-alias li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--linea); }

dl.datos { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.4rem 1.25rem; margin: 0 0 0.75rem; }
dl.datos dt { color: var(--tenue); }
dl.datos dd { margin: 0; font-weight: 500; }

code { font-family: inherit; font-weight: 600; overflow-wrap: anywhere; }
code.clave {
  display: inline-block; font: 600 1.25rem/1.3 var(--fija); letter-spacing: 0.04em;
  padding: 0.45rem 0.75rem; background: var(--fondo); border: 1px dashed var(--linea-fuerte); border-radius: var(--radio-chico); user-select: all;
}
pre.jellyfin { white-space: pre-wrap; font: 0.8rem/1.4 var(--fija); margin: 0; color: var(--tenue); }
.logo-muestra { background: #000; padding: 1rem; border-radius: var(--radio-chico); margin: 0 0 0.5rem; }
.logo-muestra img { height: 28px; width: auto; display: block; }
.qr svg { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: var(--radio-chico); }
.rejilla { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; }

/* -- Inicio -------------------------------------------------------------- */
.saludo { display: grid; gap: 0.1rem; margin-bottom: 1.25rem; }
.saludo span { color: var(--tenue); font-weight: 600; font-size: 0.875rem; }
@media (max-width: 900px) { .saludo span { display: none; } }
@media (max-width: 560px) { .solo-pc { display: none; } }
.saludo h1 { margin: 0; }
.gran-accion {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem; margin-bottom: 1rem;
  border-radius: 20px; background: var(--accion); color: var(--accion-tinta); text-decoration: none;
}
.gran-accion:hover { background: var(--accion-hundida); color: var(--accion-tinta); }
.gran-accion .icono { width: 3.5rem; height: 3.5rem; flex: none; border-radius: 16px; background: rgb(255 255 255 / 0.16); display: grid; place-items: center; }
.gran-accion svg { width: 1.9rem; height: 1.9rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gran-accion b { display: block; font-size: 1.25rem; }
.gran-accion small { font-size: 0.9375rem; opacity: 0.88; }
form.buscar { display: flex; gap: 0.5rem; margin: 0 0 1.5rem; }
form.buscar input { font-size: 1.0625rem; }

.cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.cifra { display: grid; gap: 0.2rem; padding: 0.9rem 1rem; border-radius: var(--radio); background: var(--hoja); border: 1px solid var(--linea); color: var(--tinta); text-decoration: none; }
.cifra:hover { border-color: var(--linea-fuerte); color: var(--tinta); }
.cifra b { font-size: 1.75rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cifra .tally { font-size: 0.875rem; white-space: normal; }

/* Una lista de abonados: renglones con su luz, y el botón al lado. */
.lista { list-style: none; margin: 0 0 1rem; padding: 0; background: var(--hoja); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.lista li { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--linea); }
.lista li:last-child { border-bottom: 0; }
.lista .quien-es { display: grid; flex: 1 1 auto; min-width: 0; gap: 0.15rem; color: var(--tinta); text-decoration: none; }
.lista .quien-es b { font-weight: 700; font-size: 1.0625rem; }
.lista .quien-es:hover b { color: var(--accion); }
.lista .tally { font-size: 0.875rem; white-space: normal; }
.lista form { margin: 0; flex: none; }
.lista button { min-height: 2.75rem; padding: 0.4rem 0.9rem; font-size: 0.9375rem; }
.titulo-lista { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin: 1.5rem 0 0.6rem; }
.titulo-lista h2 { margin: 0; }

/* -- El alta ------------------------------------------------------------- */
.estrecha { max-width: 560px; }
.pasos { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; color: var(--tenue); font-weight: 600; font-size: 0.875rem; }
.progreso { height: 6px; border-radius: 3px; background: var(--linea); margin-bottom: 1.5rem; overflow: hidden; }
.progreso span { display: block; height: 100%; border-radius: 3px; background: var(--accion); }
.pie-fijo, .pie-final { margin-top: 1.5rem; display: grid; gap: 0.6rem; }
.otras-salidas { display: grid; justify-items: center; gap: 0.25rem; margin-top: 0.5rem; }
@media (max-width: 900px) {
  /* El botón de seguir, siempre a la vista sobre la barra de abajo. */
  .pie-fijo {
    position: sticky; bottom: calc(4.4rem + env(safe-area-inset-bottom)); z-index: 5;
    margin: 1.5rem -1rem 0; padding: 0.75rem 1rem; background: var(--fondo); border-top: 1px solid var(--linea);
  }
}

/* La tele dibujada: dónde mirar el código. */
.tele { display: grid; justify-items: center; margin: 0.5rem 0 1.5rem; }
.tele .pantalla {
  width: min(280px, 100%); aspect-ratio: 16 / 9; display: grid; place-content: center; gap: 0.35rem; text-align: center;
  border: 8px solid var(--pantalla-borde); border-radius: 12px; background: var(--pantalla); color: var(--pantalla-tinta);
}
.tele .pantalla small { color: var(--pantalla-tenue); font-size: 0.75rem; }
.tele .pantalla b { font-size: 1.85rem; font-weight: 800; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.tele .pie { width: 60px; height: 10px; background: var(--pantalla-borde); border-radius: 0 0 6px 6px; }

/* El código: un solo campo grande, con las cifras espaciadas. Seis
   casillas separadas pedirían un script para saltar de una a otra y para
   pegar; dibujarlas detrás de un campo depende del ancho exacto de cada letra
   en cada navegador, y en las pruebas la primera cifra se salía de la vista. */
input.codigo {
  width: 100%; max-width: 22rem; min-height: 4.25rem; padding: 0.5rem 0.75rem 0.5rem calc(0.75rem + 0.3em);
  font: 800 2.25rem/1 var(--letra); letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums;
  border: 2px solid var(--linea-fuerte); border-radius: var(--radio); caret-color: var(--accion);
}
input.codigo::placeholder { color: var(--linea-fuerte); letter-spacing: 0.3em; }
input.codigo:focus { border-color: var(--accion); background: var(--accion-suave); }
@media (max-width: 900px) { .tele .pantalla { width: min(220px, 100%); border-width: 6px; } .tele .pantalla b { font-size: 1.5rem; } }
@media (max-width: 380px) { input.codigo { font-size: 1.85rem; letter-spacing: 0.22em; } }

/* -- Listo --------------------------------------------------------------- */
.listo { text-align: center; display: grid; justify-items: center; gap: 0.75rem; padding: 1.5rem 0 1rem; }
.listo .sello { width: 5.5rem; height: 5.5rem; border-radius: 50%; background: var(--aire); display: grid; place-items: center; }
.listo .sello svg { width: 2.75rem; height: 2.75rem; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.listo h1 { margin: 0; }
.listo p { margin: 0; color: var(--tinta-2); }

/* -- La ficha ------------------------------------------------------------ */
.ficha { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.ficha > .ancha { grid-column: 1 / -1; }
.ficha .hoja + .hoja { margin-top: 0; }
@media (max-width: 1100px) { .ficha { grid-template-columns: minmax(0, 1fr); } }
.etiquetas { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.acciones-ficha .boton { white-space: nowrap; padding-inline: 0.75rem; }
.acciones-ficha { display: grid; gap: 0.6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; max-width: 560px; }
.teles { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.teles li { display: flex; align-items: center; gap: 0.85rem; padding: 0.65rem 0; border-bottom: 1px solid var(--linea); }
.teles li:last-child { border-bottom: 0; }
.teles .icono { width: 2.75rem; height: 2.75rem; flex: none; border-radius: 12px; background: var(--accion-suave); display: grid; place-items: center; }
.teles .icono svg { width: 1.375rem; height: 1.375rem; fill: none; stroke: var(--accion); stroke-width: 1.8; stroke-linecap: round; }
.teles b { display: block; }
.teles .crece { flex: 1; min-width: 0; }
.teles li { flex-wrap: wrap; }
.teles details.quitar summary { cursor: pointer; color: var(--accion); }
.teles details.quitar[open] { flex-basis: 100%; }

/* La pantalla de activar: varias cuentas, una tras otra. */
.activar form.campos { gap: 0.75rem; justify-items: start; }
.activar #activar-titulo { display: none; }
.activar form.campos + form.campos { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--linea); }
.activar form.campos button { width: 100%; min-height: 3.5rem; font-size: 1.0625rem; border-radius: var(--radio); }

/* -- En el teléfono, las tablas de campo son tarjetas -------------------- */
@media (max-width: 560px) {
  h1 { font-size: 1.5rem; }
  table.apilable thead { display: none; }
  table.apilable, table.apilable tbody, table.apilable tr, table.apilable td { display: block; }
  table.apilable tr { padding: 0.75rem 1rem; border-bottom: 1px solid var(--linea); }
  table.apilable tr:last-child { border-bottom: 0; }
  table.apilable td { border: 0; padding: 0.1rem 0; }
  table.apilable td:empty { display: none; }
  table.apilable tr.mal td:first-child, table.apilable tr.aviso td:first-child { box-shadow: none; }
  table.apilable tr.mal { box-shadow: inset 3px 0 0 var(--fuera); }
  table.apilable tr.aviso { box-shadow: inset 3px 0 0 var(--aviso); }
  table.apilable td:first-child a { font-size: 1.0625rem; }
  table.apilable td:not(:first-child):not(:last-child) { display: inline-block; margin-right: 1.25rem; color: var(--tenue); }
  .cifras { gap: 0.5rem; }
  .cifra { padding: 0.75rem; }
  .cifra b { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } button:active { transform: none; } }
