/* Banamar · panel de llaves · diseño «Marca» (el que eligió el dueño el 06-12-2026).
   La marca manda: el azul marino de las letras del logotipo, el amarillo del banano y el verde de la palma.
   Todo el CSS de la página vive aquí (la CSP no admite estilos en línea). Sin recursos de fuera: las formas son CSS.
   Reglas de color: el amarillo nunca es texto ni va detrás de texto claro (solo fondo con texto oscuro, o adorno);
   el logotipo va siempre sobre blanco y nunca más grande que su tamaño. Los colores están en las variables de abajo
   (claro y oscuro); todo texto y todo botón pasa AA en los dos temas, y el contorno de campos y botones, 3:1. */
:root {
  /* Marca (medidos en logo.png) */
  --marino: #263997;        /* letras del logotipo */
  --marino-hondo: #1a2870;  /* cabecera y panel de marca */
  --marino-noche: #121c55;  /* degradado del panel de marca */
  --amarillo: #fbc631;      /* banano: fondos con texto oscuro y adornos */
  --verde: #076931;         /* palma */
  --verde-hoja: #2e8a55;    /* palma, tono de luz (solo adorno) */

  /* Superficies y texto (tema claro) */
  --fondo: #f3f5fa;
  --tarjeta: #ffffff;
  --borde: #dde2ee;
  --borde-fuerte: #b9c1d6;
  --borde-campo: #7b84a3;   /* borde de los campos: 3:1 o más sobre la tarjeta (contraste de los controles) */
  --tinta: #141a33;
  --tinta-suave: #4a5272;
  --enlace: #263997;
  --tinte: #eef1fb;         /* fondo suave azul */
  --boton: #263997;
  --boton-hover: #1a2870;
  --sobre-boton: #ffffff;
  --exito: #075a2b;         /* texto verde */
  --exito-fondo: #e4f3ea;
  --exito-borde: #9fd0b2;
  --aviso-fondo: #fff4d1;   /* amarillo suave, con texto oscuro */
  --alerta: #b3261e;
  --alerta-fondo: #fdecea;
  --alerta-borde: #f1b4ae;
  --sobre-alerta: #ffffff;
  --neutro-fondo: #eceef3;
  --neutro-texto: #3e4560;
  --foco: #263997;
  --sombra: 0 1px 2px rgb(20 26 51 / 0.06), 0 4px 16px rgb(20 26 51 / 0.06);
  --velo: rgb(14 20 52 / 0.6);

  --texto: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, "Noto Sans", sans-serif;
  --titulo: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, "Roboto Mono", monospace;

  --radio: 14px;
  --radio-control: 10px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #0b1024;
    --tarjeta: #151c3b;
    --borde: #2a3462;
    --borde-fuerte: #4a568c;
    --borde-campo: #6b78b0;
    --tinta: #e9ecf8;
    --tinta-suave: #adb5d8;
    --enlace: #aebbff;
    --tinte: #1c2551;
    --boton: #9eadff;
    --boton-hover: #b8c3ff;
    --sobre-boton: #0b1024;
    --exito: #7fd9a3;
    --exito-fondo: #10301f;
    --exito-borde: #2b6b47;
    --aviso-fondo: #3a300b;
    --alerta: #ffa197;
    --alerta-fondo: #3b1517;
    --alerta-borde: #7a2e2b;
    --sobre-alerta: #2a0a08;
    --neutro-fondo: #232b4f;
    --neutro-texto: #c8cee8;
    --foco: #fbc631;
    --sombra: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 20px rgb(0 0 0 / 0.25);
    --velo: rgb(0 0 0 / 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.55;
}

/* ---------- Cabecera: barra marina, el logotipo en su placa blanca y la franja amarilla y verde ---------- */
.membrete {
  position: relative;
  background: var(--marino-hondo);
  color: #ffffff;
}

.membrete::after {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--amarillo) 0 64%, var(--verde) 64% 100%);
}

.membrete-caja {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

/* El logotipo mide 320 × 144 con fondo blanco: va sobre una placa blanca y nunca más grande que 160 × 72. */
.logo {
  display: block;
  box-sizing: content-box;
  width: 128px;
  max-width: calc(100% - 1.25rem);
  height: auto;
  padding: 0.3rem 0.6rem;
  border-radius: 12px;
  background: #ffffff;
}

.membrete-nota {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.membrete-nota::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--amarillo);
  box-shadow: 0.8rem 0 0 var(--verde-hoja);
  margin-right: 0.8rem;
}

/* ---------- Cuerpo ---------- */
main {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.75rem 1rem 4rem;
}

p { margin: 0 0 1rem; }

/* El nombre de la sección: una píldora amarilla con texto oscuro. */
.paso {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--amarillo);
  color: #141a33;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1.5rem;
  font-family: var(--titulo);
  font-size: clamp(2rem, 1.5rem + 2vw, 2.625rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  overflow-wrap: break-word;
  text-wrap: balance;
}

/* Bajo el título, la marca en tres trazos: marino, amarillo y verde. */
h1::after {
  content: "";
  display: block;
  width: 5.5rem;
  height: 5px;
  margin-top: 0.85rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--marino) 0 50%, var(--amarillo) 50% 78%, var(--verde) 78% 100%);
}

h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-family: var(--titulo);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* Un trazo amarillo antes de cada título de tarjeta (adorno, no texto). */
h2::before {
  content: "";
  flex: none;
  width: 0.35rem;
  height: 1.15em;
  border-radius: 3px;
  background: var(--amarillo);
}

h2:focus { outline: none; }
h2:focus-visible { outline: 3px solid var(--foco); outline-offset: 4px; border-radius: 4px; }

.entradilla {
  margin: 0 0 1.5rem;
  color: var(--tinta-suave);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

/* Cada bloque es una tarjeta blanca. */
.bloque {
  margin: 0 0 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--tarjeta);
  box-shadow: var(--sombra);
}

.nota {
  font-size: 0.9375rem;
  color: var(--tinta-suave);
}

a {
  color: var(--enlace);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { text-decoration-thickness: 2px; }

/* En el teléfono, cada enlace del cuerpo ocupa 44 px de alto o más (fácil de tocar). */
main a {
  display: inline-block;
  padding: 0.6rem 0;
}

/* ---------- Avisos (role="alert") y estados (role="status") ---------- */
[role="alert"] {
  position: relative;
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem 0.8rem 2.9rem;
  border: 1px solid var(--alerta-borde);
  border-radius: var(--radio-control);
  background: var(--alerta-fondo);
  color: var(--alerta);
  font-weight: 600;
  overflow-wrap: anywhere;
}

[role="alert"]::before {
  content: "!";
  content: "!" / "";
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--alerta);
  color: var(--sobre-alerta);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.35rem;
  text-align: center;
}

/* Vacíos, los avisos no ocupan sitio pero siguen en la página (los lectores de pantalla los vigilan desde el principio). */
[role="alert"]:empty,
.estado:empty,
.vence:empty {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

[role="alert"]:empty::before,
.estado:empty::before { content: none; }

.estado {
  position: relative;
  margin: 0 0 1.25rem;
  padding: 0.8rem 1rem 0.8rem 2.9rem;
  border: 1px solid var(--exito-borde);
  border-radius: var(--radio-control);
  background: var(--exito-fondo);
  color: var(--exito);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Una marca de visto hecha con dos bordes. */
.estado::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 0.95rem;
  width: 0.5rem;
  height: 0.9rem;
  border: solid var(--exito);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* ---------- Formularios ---------- */
form { margin: 0; }

.campo { margin: 0 0 1.25rem; }

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 650;
}

/* «Mostrar la contraseña»: una casilla con su rótulo, de 44 px de alto. */
.casilla { margin-top: -0.5rem; }

.casilla label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.casilla input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--enlace);
}

.ayuda {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: var(--tinta-suave);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"] {
  display: block;
  width: 100%;
  min-height: 3rem;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--borde-campo);
  border-radius: var(--radio-control);
  background: var(--tarjeta);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.0625rem;
}

input[type="password"],
input.cifras {
  font-family: var(--mono);
  letter-spacing: 0.12em;
}

input.cifras { font-size: 1.25rem; letter-spacing: 0.35em; }

input.corto { max-width: 9rem; }
input.cifras.corto { max-width: 11.5rem; }

input:hover { border-color: var(--tinta-suave); }
input:focus { border-color: var(--enlace); }

.vence {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0.55rem 0 0;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--tinte);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ---------- Botones ---------- */
.acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.acciones:last-child { margin-bottom: 0; }

button {
  min-height: 3rem;
  margin: 0;
  padding: 0.65rem 1.4rem;
  border: 1.5px solid var(--boton);
  border-radius: var(--radio-control);
  background: var(--boton);
  color: var(--sobre-boton);
  font-family: var(--texto);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  border-color: var(--boton-hover);
  background: var(--boton-hover);
  box-shadow: 0 2px 8px rgb(26 40 112 / 0.25);
}

button:active { transform: translateY(1px); }

button.secundario {
  border-color: var(--borde-campo);   /* 3:1 o más sobre la tarjeta: el contorno se ve (U-2) */
  background: var(--tarjeta);
  color: var(--enlace);
}

button.secundario:hover {
  border-color: var(--enlace);
  background: var(--tinte);
  box-shadow: none;
}

button.peligro {
  border-color: var(--alerta);
  background: var(--tarjeta);
  color: var(--alerta);
}

button.peligro:hover {
  border-color: var(--alerta);
  background: var(--alerta-fondo);
  box-shadow: none;
}

button.peligro-lleno {
  border-color: var(--alerta);
  background: var(--alerta);
  color: var(--sobre-alerta);
}

button.peligro-lleno:hover { box-shadow: 0 2px 8px rgb(179 38 30 / 0.3); }

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.5;
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 2px;
}

input:focus-visible { outline-offset: 1px; }

/* En el teléfono, los botones a todo el ancho y apilados. */
@media (max-width: 30rem) {
  .acciones {
    flex-direction: column;
    align-items: stretch;
  }
  .acciones button { width: 100%; }
}

/* ---------- Páginas de acceso (entrar, elegir la contraseña, olvido): panel de marca y formulario ---------- */
main.acceso {
  max-width: 72rem;
  padding: 0 0 3rem;
}

.acceso-marca {
  position: relative;
  overflow: hidden;
  padding: 2rem 1.25rem 7rem;   /* en el teléfono, el arco empieza 0,5rem por debajo del texto (U-4) */
  background: linear-gradient(160deg, var(--marino) 0%, var(--marino-hondo) 55%, var(--marino-noche) 100%);
  color: #ffffff;
}

.acceso-marca > * { position: relative; z-index: 1; }

.acceso-marca h1 {
  max-width: 14ch;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.125rem, 1.6rem + 2.4vw, 3.25rem);
}

.acceso-marca h1::after {
  width: 6.5rem;
  height: 6px;
  margin-top: 1.1rem;
  background: linear-gradient(90deg, #ffffff 0 40%, var(--amarillo) 40% 75%, var(--verde-hoja) 75% 100%);
}

/* El banano: un arco amarillo grueso que entra por la esquina. */
.acceso-marca::before {
  content: "";
  position: absolute;
  right: -5.5rem;
  bottom: -8.5rem;
  width: 15rem;
  height: 15rem;
  border: 1.6rem solid var(--amarillo);
  border-color: var(--amarillo) transparent transparent var(--amarillo);
  border-radius: 50%;
  transform: rotate(-18deg);
}

/* La palma: dos hojas verdes (la segunda es la sombra de la primera). */
.acceso-marca::after {
  content: "";
  position: absolute;
  right: 4.2rem;
  bottom: 1.4rem;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 0 100% 0 100%;
  background: var(--verde-hoja);
  box-shadow: 2.6rem -1.4rem 0 -0.5rem var(--verde);
  transform: rotate(-8deg);
}

.acceso-cuerpo {
  position: relative;
  margin: -3rem 0.75rem 0;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--borde);
  border-radius: 18px;
  background: var(--tarjeta);
  box-shadow: 0 10px 30px rgb(20 26 51 / 0.12);
}

/* Dentro del formulario de acceso, los bloques no son tarjetas: ya están en una. */
.acceso-cuerpo .bloque {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.acceso-cuerpo .bloque > p:last-child { margin: 1.25rem 0 0; }

@media (min-width: 56rem) {
  main.acceso { padding: 3rem 1.5rem 4rem; }
  main.acceso {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: stretch;
  }
  .acceso-marca {
    min-height: 32rem;
    padding: 3rem 2.75rem;
    border-radius: 22px 0 0 22px;
  }
  .acceso-marca::before {
    right: -6rem;
    bottom: -6rem;
    width: 22rem;
    height: 22rem;
    border-width: 2.4rem;
  }
  .acceso-marca::after {
    right: 7.5rem;
    bottom: 3.2rem;
    width: 4.6rem;
    height: 4.6rem;
    box-shadow: 3.6rem -2rem 0 -0.6rem var(--verde);
  }
  .acceso-cuerpo {
    margin: 0;
    padding: 3rem 2.75rem;
    border-left: 0;
    border-radius: 0 22px 22px 0;
    box-shadow: var(--sombra);
    align-self: stretch;
  }
}

@media (min-width: 56rem) {
  .membrete-caja { padding: 0.9rem 1.5rem; }
  .logo { width: 160px; }
}

/* ---------- Tablero (mis llaves y cuentas) ---------- */
.tablero .paso { margin-top: 0.5rem; }

.sesion {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem 0.25rem;
  border: 1px solid var(--borde);
  border-left: 5px solid var(--marino);
  border-radius: var(--radio);
  background: var(--tarjeta);
  box-shadow: var(--sombra);
}

.sesion-fila {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin: 0 0 0.6rem;
}

.sesion-fila p { margin: 0; }

.correo-sesion {
  font-weight: 700;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
}

.sesion-enlaces {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.sesion-enlaces button { min-height: 2.75rem; padding: 0.45rem 1.2rem; }

.volver { margin: 0 0 1.25rem; }

/* El resumen: cuántas llaves vivas y el botón principal, sobre un fondo marino suave con el banano de adorno. */
.resumen {
  position: relative;
  overflow: hidden;
  margin: 0 0 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--tinte);
}

.resumen::after {
  content: "";
  position: absolute;
  right: -2.75rem;
  top: -2.75rem;
  width: 7rem;
  height: 7rem;
  border: 0.9rem solid var(--amarillo);
  border-color: transparent transparent var(--amarillo) var(--amarillo);
  border-radius: 50%;
  opacity: 0.9;
}

.resumen > * { position: relative; z-index: 1; }

.resumen .entradilla {
  margin: 0 0 1rem;
  padding-right: 3rem;
  color: var(--tinta);
  font-family: var(--titulo);
  font-size: 1.25rem;
  font-weight: 700;
}

.resumen .entradilla:empty { display: none; }

/* La llave recién creada: tarjeta con cabecera amarilla, la llave en una caja marina. */
.llave-nueva {
  margin: 0 0 1.25rem;
  padding: 0 1.25rem 1.25rem;
  overflow: hidden;
  border: 2px solid var(--amarillo);
  border-radius: var(--radio);
  background: var(--tarjeta);
  box-shadow: 0 8px 24px rgb(20 26 51 / 0.12);
}

.llave-nueva h2 {
  margin: 0 -1.25rem 1.25rem;
  padding: 0.9rem 1.25rem;
  background: var(--amarillo);
  color: #141a33;
}

.llave-nueva h2::before {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: inset 0 0 0 0.4rem var(--amarillo);
  border: 2px solid var(--verde);
}

.llave-nueva h2:focus-visible { outline-color: #141a33; outline-offset: -4px; }

.llave-codigo {
  display: block;
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radio-control);
  background: #121c55;
  color: #ffffff;
  font-family: var(--mono);
  font-size: 1.0625rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  user-select: all;
  box-shadow: inset 4px 0 0 var(--amarillo);
}

.llave-nueva .importante {
  padding: 0.7rem 1rem;
  border-left: 5px solid var(--amarillo);
  border-radius: 6px;
  background: var(--aviso-fondo);
  font-weight: 700;
}

/* ---------- Listas de llaves y de cuentas ---------- */
.lista {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lista > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--borde);
}

.lista > li:first-child { border-top: 0; padding-top: 0.25rem; }
.lista > li:last-child { padding-bottom: 0; }

/* Una llave dibujada con degradados: el ojo amarillo y la caña marina, en una placa. */
#lista-llaves > li::before {
  content: "";
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background:
    radial-gradient(circle at 14px 22px, transparent 0 4px, var(--amarillo) 4.5px 8px, transparent 8.5px),
    linear-gradient(var(--marino), var(--marino)) 21px 20.5px / 15px 3px no-repeat,
    linear-gradient(var(--marino), var(--marino)) 30px 22px / 3px 6px no-repeat,
    linear-gradient(var(--marino), var(--marino)) 34px 22px / 2.5px 4px no-repeat,
    var(--tinte);
  box-shadow: inset 0 0 0 1px var(--borde);
}

@media (prefers-color-scheme: dark) {
  #lista-llaves > li::before {
    background:
      radial-gradient(circle at 14px 22px, transparent 0 4px, var(--amarillo) 4.5px 8px, transparent 8.5px),
      linear-gradient(var(--enlace), var(--enlace)) 21px 20.5px / 15px 3px no-repeat,
      linear-gradient(var(--enlace), var(--enlace)) 30px 22px / 3px 6px no-repeat,
      linear-gradient(var(--enlace), var(--enlace)) 34px 22px / 2.5px 4px no-repeat,
      var(--tinte);
  }
}

.fila-datos {
  flex: 1 1 14rem;
  min-width: 0;
}

.fila-titulo {
  margin: 0 0 0.3rem;
  unicode-bidi: isolate;
  font-family: var(--titulo);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.fila-titulo.correo { font-family: var(--texto); font-size: 1.0625rem; }

.marca-admin {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--marino);
  color: #ffffff;
  font-family: var(--texto);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 0.15em;
}

.datos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.25rem;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--tinta-suave);
}

.datos div { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.datos dt { margin: 0; }
.datos dd { margin: 0; color: var(--tinta); font-weight: 600; font-variant-numeric: tabular-nums; }

.fila-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.fila-acciones button { min-height: 2.75rem; padding: 0.45rem 1rem; font-size: 1rem; }

@media (max-width: 30rem) {
  .fila-acciones { width: 100%; flex-direction: column; }
  .fila-acciones button { width: 100%; }
  .datos { flex-direction: column; }
  /* Cada dato en su línea, y el rótulo y su valor seguidos: si no caben, se parte el valor, no el par. */
  .datos div { display: block; }
  .datos dt { display: inline; margin-right: 0.35rem; }
  .datos dd { display: inline; }
}

.vacia {
  margin: 0;
  padding: 1.25rem;
  border: 1.5px dashed var(--borde-fuerte);
  border-radius: var(--radio-control);
  color: var(--tinta-suave);
  text-align: center;
}

/* Cuentas: una placa con una persona dibujada y el estado como distintivo de color. */
#lista-cuentas > li::before {
  content: "";
  flex: none;
  align-self: flex-start;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, var(--marino) 0 6.5px, transparent 7px),
    radial-gradient(ellipse 13px 10px at 50% 100%, var(--marino) 0 99%, transparent 100%),
    var(--tinte);
  box-shadow: inset 0 0 0 1px var(--borde);
}

#lista-cuentas > li.cuenta-activa::before { box-shadow: inset 0 0 0 3px var(--verde-hoja); }
#lista-cuentas > li.cuenta-pendiente::before { box-shadow: inset 0 0 0 3px var(--amarillo); }

@media (prefers-color-scheme: dark) {
  #lista-cuentas > li::before {
    background:
      radial-gradient(circle at 50% 38%, var(--enlace) 0 6.5px, transparent 7px),
      radial-gradient(ellipse 13px 10px at 50% 100%, var(--enlace) 0 99%, transparent 100%),
      var(--tinte);
  }
}

/* El estado es siempre el primer dato de la fila. */
#lista-cuentas .datos > div:first-child { flex-basis: 100%; margin-bottom: 0.2rem; }

@media (max-width: 30rem) {
  #lista-cuentas .datos > div:first-child { flex-basis: auto; }
}

#lista-cuentas .datos > div:first-child dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#lista-cuentas .datos > div:first-child dd {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  background: var(--neutro-fondo);
  color: var(--neutro-texto);
  font-size: 0.875rem;
  font-weight: 700;
}

#lista-cuentas .datos > div:first-child dd::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

#lista-cuentas li.cuenta-activa .datos > div:first-child dd {
  background: var(--exito-fondo);
  color: var(--exito);
}

#lista-cuentas li.cuenta-pendiente .datos > div:first-child dd {
  background: var(--amarillo);
  color: #141a33;
}

/* ---------- Columnas en pantallas anchas ---------- */
@media (min-width: 56rem) {
  main.tablero { padding: 2.25rem 1.5rem 4rem; }

  .columnas {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 1.25rem;
    align-items: start;
  }

  .columnas > * { min-width: 0; }

  .bloque { padding: 1.5rem; }

  .resumen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding: 1.5rem;
  }
  .resumen .entradilla { margin: 0; font-size: 1.375rem; }
  .resumen [role="alert"] { flex-basis: 100%; margin: 0; order: 3; }
  .resumen .acciones { margin: 0 4rem 0 0; }

  .sesion { padding: 1rem 1.5rem 0.35rem; }

  /* Cuentas: la lista a la izquierda; invitar y los correos, a la derecha. */
  .columnas-cuentas { grid-template-rows: auto 1fr; }
  .columnas-cuentas .cuentas { grid-column: 1; grid-row: 1 / span 2; }
  .columnas-cuentas .invitar { grid-column: 2; grid-row: 1; }
  .columnas-cuentas .correos { grid-column: 2; grid-row: 2; align-self: start; }
  .columnas-cuentas .bloque { margin: 0; }
}

/* ---------- Confirmación ---------- */
dialog {
  width: min(30rem, calc(100% - 2rem));
  margin: auto;
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid var(--borde);
  border-radius: 16px;
  background: var(--tarjeta);
  color: var(--tinta);
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.3);
}

dialog::backdrop { background: var(--velo); }

/* Un círculo rojo con «!» encabeza la confirmación: todas borran algo. */
dialog::before {
  content: "!";
  content: "!" / "";
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 0 1rem;
  border-radius: 50%;
  background: var(--alerta-fondo);
  box-shadow: inset 0 0 0 2px var(--alerta);
  color: var(--alerta);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 2.5rem;
  text-align: center;
}

.confirmar-titulo {
  margin: 0 0 0.5rem;
  font-family: var(--titulo);
  font-size: 1.25rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.confirmar-texto {
  font-size: 1.0625rem;
  overflow-wrap: anywhere;
}

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

/* ---------- Tema oscuro: retoques que tienen que ir después de las reglas base ---------- */
@media (prefers-color-scheme: dark) {
  main:not(.acceso) h1::after { background: linear-gradient(90deg, var(--enlace) 0 50%, var(--amarillo) 50% 78%, var(--verde-hoja) 78% 100%); }
  .llave-codigo { background: #0b1024; box-shadow: inset 4px 0 0 var(--amarillo), inset 0 0 0 1px var(--borde-fuerte); }
}
