/* =============================================================================
 * Cuenta ASX · hoja de estilos (el mismo lenguaje visual de Studio, Control y
 * Gimnasio Mental)
 *
 * Los tokens, la base y los componentes son los de Control, tal cual: tarjetas
 * de 16 px con sombra suave, Nunito, azul para acciones, verde «va bien»,
 * ámbar «ojo», rojo solo errores, todo lo tocable ≥ 44 px. Al final va lo
 * propio de la cuenta (foto, direcciones, campos dobles, ver contraseña).
 * ========================================================================== */

@layer comun, tokens, base, estructura, componentes, pantallas, utilidades;

/* Tokens de estructura del paquete común, en su propia capa para que los de
   Studio siempre le ganen sin depender del orden de carga. */
@import url("/comun/css/tokens.css") layer(comun);

/* --- Tokens --------------------------------------------------------------- */
/* La misma paleta y tipografía que Gimnasio Mental (azul #4285f4 del
   ecosistema, Nunito, tarjetas blancas con borde fino y sombra suave), con el
   azul de acción oscurecido a #2f6fdb para llegar a 4.5:1 con texto blanco
   (RNF-041). */
@layer tokens {
  :root {
    --asx-marca: #2f6fdb;
    --asx-marca-contraste: #ffffff;
    --asx-marca-suave: #e8f0fe;
    --asxb-ancho: 1080px;
    --asxb-fuente: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --c-fondo: #f7f8fa;
    --c-tarjeta: #ffffff;
    --c-texto: #3b3f5c;
    --c-fuerte: #1f2340;
    --c-tenue: #676d88;
    --c-borde: #e0e6ed;
    --c-azul: #2f6fdb;
    --c-azul-claro: #4285f4;
    --c-azul-fuerte: #1f57c3;
    --c-azul-suave: #e8f0fe;
    --c-verde: #00874a;
    --c-verde-suave: #e3f6ec;
    --c-wa: #128c4b;
    --c-ambar: #9a5c00;
    --c-ambar-suave: #fff4df;
    --c-rojo: #d0333d;
    --c-rojo-suave: #fdecee;
    --c-sombra: 0 6px 18px rgba(31, 45, 61, .07);
    --c-sombra-hover: 0 14px 28px rgba(31, 45, 61, .12);
    --c-sombra-alta: 0 18px 50px rgba(31, 45, 61, .20);
    --c-radio: 16px;
    --c-radio-chico: 10px;
    --c-texto-base: 17px;
    --c-titulo: clamp(24px, 5.2vw, 28px);
    --c-numero: 40px;
    --c-principal: 52px;
    --c-toque: 44px;
    --c-barra: 56px;
    --c-abajo: 66px;
    --c-columna: 720px;
    --c-mov: 180ms cubic-bezier(.2, .7, .2, 1);
    --c-fuente: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
  }

  /* Oscuro: el mismo de Gimnasio Mental. Sigue al sistema o al interruptor de
     la barra (que pone `data-theme` en <html>). */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --c-fondo: #060818; --c-tarjeta: #0e1726; --c-texto: #e0e6ed; --c-fuerte: #ffffff; --c-tenue: #9aa3bd; --c-borde: #1b2e4b;
      --c-azul: #4a86f0; --c-azul-claro: #6b9cf5; --c-azul-fuerte: #2f6fdb; --c-azul-suave: #1e3255;
      --c-verde: #3ccf8a; --c-verde-suave: #0f2e22; --c-ambar: #f0b454; --c-ambar-suave: #33270f; --c-rojo: #ff7b83; --c-rojo-suave: #3a1719;
      --c-sombra: 0 6px 18px rgba(0, 0, 0, .25); --c-sombra-hover: 0 14px 28px rgba(0, 0, 0, .4);
      --asx-marca: #4a86f0; --asx-marca-suave: #1e3255;
      --asxb-fondo: #0e1726; --asxb-texto: #e0e6ed; --asxb-texto-tenue: #9aa3bd; --asxb-borde: #1b2e4b;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --c-fondo: #060818; --c-tarjeta: #0e1726; --c-texto: #e0e6ed; --c-fuerte: #ffffff; --c-tenue: #9aa3bd; --c-borde: #1b2e4b;
    --c-azul: #4a86f0; --c-azul-claro: #6b9cf5; --c-azul-fuerte: #2f6fdb; --c-azul-suave: #1e3255;
    --c-verde: #3ccf8a; --c-verde-suave: #0f2e22; --c-ambar: #f0b454; --c-ambar-suave: #33270f; --c-rojo: #ff7b83; --c-rojo-suave: #3a1719;
    --c-sombra: 0 6px 18px rgba(0, 0, 0, .25); --c-sombra-hover: 0 14px 28px rgba(0, 0, 0, .4);
    --asx-marca: #4a86f0; --asx-marca-suave: #1e3255;
    color-scheme: dark;
  }

  @media (prefers-reduced-motion: reduce) {
    :root { --c-mov: 0ms linear; }
  }
}

/* --- Base ----------------------------------------------------------------- */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body {
    margin: 0;
    font-family: var(--c-fuente);
    font-size: var(--c-texto-base);
    line-height: 1.5;
    color: var(--c-texto);
    background: var(--c-fondo);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: anywhere;
  }
  h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 800; color: var(--c-fuerte); }
  h1 { font-size: var(--c-titulo); letter-spacing: -.015em; }
  h2 { font-size: 21px; letter-spacing: -.01em; }
  h3 { font-size: 18px; }
  p { margin: 0; }
  a { color: var(--c-azul); text-underline-offset: 3px; }
  img, svg, iframe { max-width: 100%; }
  svg { flex: 0 0 auto; }
  /* Los íconos del paquete común llegan sin tamaño: por omisión, del alto de la letra. */
  svg[viewBox="0 0 24 24"] { width: 1.25em; height: 1.25em; vertical-align: -0.22em; }
  strong, b { font-weight: 700; }
  button, input, select, textarea { font: inherit; color: inherit; }
  :focus-visible { outline: 3px solid var(--c-azul); outline-offset: 2px; border-radius: 6px; }
  [hidden] { display: none !important; }
  table { border-collapse: collapse; width: 100%; }
  hr { border: 0; border-top: 1px solid var(--c-borde); margin: 16px 0; }
  ::selection { background: var(--c-azul-suave); }
}

/* --- Estructura: barra superior, columna, destinos ------------------------- */
@layer estructura {
  .saltar { position: absolute; left: -9999px; }
  .saltar:focus { left: 12px; top: 12px; z-index: 100; background: var(--c-tarjeta); padding: 10px 14px; border-radius: 10px; }

  .columna {
    width: min(var(--c-columna), 100%);
    margin-inline: auto;
    padding: 20px 16px calc(var(--c-abajo) + 96px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 16px;
  }
  .columna-enfoque { padding-bottom: calc(40px + env(safe-area-inset-bottom)); min-height: calc(100dvh - var(--c-barra)); }
  .columna-ancha { width: min(1100px, 100%); }

  /* Destinos: barra inferior en celular (ícono y nombre, nunca solo ícono),
     como la de Gimnasio Mental. */
  .destinos .destinos-fila { display: flex; width: 100%; }
  .destinos a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: var(--c-toque); padding: 6px 4px; text-decoration: none; color: var(--c-tenue);
    font-size: 12.5px; font-weight: 700; position: relative; transition: color var(--c-mov);
  }
  .destinos a svg { width: 22px; height: 22px; }
  .destinos a:hover { color: var(--c-texto); }
  .destinos a[aria-current="page"] { color: var(--c-azul); }
  .destinos-abajo {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    height: calc(var(--c-abajo) + env(safe-area-inset-bottom));
    padding: 4px max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left));
    background: var(--c-tarjeta); border-top: 1px solid var(--c-borde);
    box-shadow: 0 -4px 16px rgba(31, 45, 61, .05);
  }
  .destinos-abajo a[aria-current="page"]::before {
    content: ""; position: absolute; top: -4px; left: 26%; right: 26%; height: 3px; border-radius: 0 0 3px 3px; background: var(--c-azul);
  }
  .destinos-arriba { display: none; }

  /* Computadora: los mismos destinos como pestañas centradas bajo la barra
     (las de Gimnasio Mental), con la línea azul en la activa. Sin menú lateral. */
  @media (min-width: 900px) {
    .destinos-abajo { display: none; }
    .destinos-arriba {
      display: block; position: sticky; top: var(--asxb-barra-alto, 56px); z-index: 1020;
      background: var(--c-tarjeta); border-bottom: 1px solid var(--c-borde);
    }
    .destinos-arriba .destinos-fila { max-width: var(--c-columna); margin-inline: auto; justify-content: center; gap: 6px; }
    .destinos-arriba a { flex: 0 0 auto; flex-direction: row; gap: 8px; font-size: 15px; padding: 14px 18px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
    .destinos-arriba a svg { width: 18px; height: 18px; }
    .destinos-arriba a[aria-current="page"] { border-bottom-color: var(--c-azul); }
    .columna { padding-bottom: 64px; padding-top: 28px; gap: 18px; }
    :root { --c-texto-base: 16.5px; }
  }

  /* Acción principal: un solo botón grande al alcance del pulgar. */
  .accion-fija {
    position: sticky; z-index: 30;
    bottom: calc(var(--c-abajo) + 12px + env(safe-area-inset-bottom));
    margin-top: 8px;
  }
  .accion-fija::before { content: ""; position: absolute; inset: -20px -16px -12px; background: linear-gradient(to bottom, transparent, var(--c-fondo) 45%); z-index: -1; pointer-events: none; }
  .columna-enfoque .accion-fija { bottom: calc(12px + env(safe-area-inset-bottom)); }
  @media (min-width: 900px) {
    .accion-fija { position: static; }
    .accion-fija::before { display: none; }
  }
}

/* --- Componentes ----------------------------------------------------------- */
@layer componentes {
  /* Tarjeta */
  .tarjeta {
    background: var(--c-tarjeta); border-radius: var(--c-radio); box-shadow: var(--c-sombra);
    padding: 20px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--c-borde);
  }
  .tarjeta-enlace { text-decoration: none; color: inherit; transition: transform var(--c-mov), box-shadow var(--c-mov); }
  .tarjeta-enlace:hover { box-shadow: var(--c-sombra-hover); transform: translateY(-2px); border-color: color-mix(in srgb, var(--c-azul) 25%, var(--c-borde)); }
  .tarjeta-enlace:active { transform: scale(.99); }
  .tarjeta-grande { padding: 28px 22px; gap: 16px; }
  .tarjeta-azul { background: linear-gradient(135deg, #3d6ff0 0%, #6a4fe0 100%); color: #fff; border-color: transparent; }
  .tarjeta-azul h1, .tarjeta-azul h2, .tarjeta-azul h3 { color: #fff; }
  .tarjeta-azul a:not(.boton) { color: #fff; }
  .tarjeta-verde { background: var(--c-verde-suave); }
  .tarjeta-ambar { background: var(--c-ambar-suave); }
  .tarjeta-plana { box-shadow: none; border-color: var(--c-borde); }
  .tarjeta-cabeza { display: flex; align-items: center; gap: 10px; }
  .tarjeta-cabeza h2, .tarjeta-cabeza h3 { flex: 1; }
  .etiqueta { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--c-tenue); }
  .etiqueta svg { width: 15px; height: 15px; }
  .tarjeta-azul .etiqueta { color: rgba(255,255,255,.8); }
  .frase { font-size: 19px; line-height: 1.45; }
  .frase strong { color: var(--c-azul); }
  .tarjeta-azul .frase strong { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-underline-offset: 4px; }
  .tenue { color: var(--c-tenue); }
  .chico { font-size: 15px; }
  .mini { font-size: 13.5px; }

  /* Botones */
  .boton {
    font-family: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: var(--c-toque); padding: 10px 18px; border-radius: 12px; border: 1.5px solid transparent;
    font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center;
    transition: background var(--c-mov), transform var(--c-mov), box-shadow var(--c-mov);
    -webkit-tap-highlight-color: transparent;
  }
  .boton:active { transform: scale(.98); }
  .boton svg { width: 20px; height: 20px; }
  .boton-principal { min-height: var(--c-principal); width: 100%; font-size: 17.5px; font-weight: 800; background: var(--c-azul); color: #fff; box-shadow: 0 8px 20px rgba(47, 111, 219, .30); }
  .boton-principal:hover { background: var(--c-azul-fuerte); }
  .boton-azul { background: var(--c-azul); color: #fff; }
  .boton-azul:hover { background: var(--c-azul-fuerte); }
  .boton-wa { background: var(--c-wa); color: #fff; }
  .boton-wa:hover { filter: brightness(1.06); }
  .boton-principal.boton-wa { box-shadow: 0 6px 16px rgba(20, 138, 74, .28); }
  .boton-linea { background: transparent; color: var(--c-azul); border-color: color-mix(in srgb, var(--c-azul) 35%, transparent); }
  .boton-linea:hover { background: var(--c-azul-suave); }
  .boton-suave { background: var(--c-azul-suave); color: var(--c-azul); }
  .boton-texto { background: transparent; color: var(--c-azul); padding-inline: 10px; }
  .boton-texto:hover { background: var(--c-azul-suave); }
  .boton-peligro { background: var(--c-rojo); color: #fff; }
  .boton-blanco { background: #fff; color: var(--c-azul-fuerte); }
  .boton-ancho { width: 100%; }
  .boton-chico { min-height: 38px; padding: 6px 12px; font-size: 14.5px; border-radius: 10px; }
  .boton[disabled], .boton[aria-disabled="true"] { opacity: .55; pointer-events: none; }
  .botones { display: flex; flex-wrap: wrap; gap: 10px; }
  .botones-pila { display: flex; flex-direction: column; gap: 10px; }
  .icono-boton { width: var(--c-toque); height: var(--c-toque); border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--c-texto); }
  .icono-boton:hover { background: var(--c-fondo); }
  .icono-boton svg { width: 22px; height: 22px; }

  /* Números grandes */
  .numeros { display: grid; gap: 12px; grid-template-columns: 1fr; }
  @media (min-width: 560px) { .numeros { grid-template-columns: repeat(3, 1fr); } }
  .numero { background: var(--c-tarjeta); border-radius: var(--c-radio); box-shadow: var(--c-sombra); border: 1px solid var(--c-borde); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
  .numero-valor { font-size: var(--c-numero); font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .numero-nombre { font-weight: 600; color: var(--c-tenue); font-size: 15px; }
  .numero-frase { font-size: 15px; }
  .cambio { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; padding: 2px 10px; border-radius: 999px; align-self: flex-start; }
  .cambio-sube { background: var(--c-verde-suave); color: var(--c-verde); }
  .cambio-baja { background: var(--c-ambar-suave); color: var(--c-ambar); }
  .cambio-igual { background: var(--c-fondo); color: var(--c-tenue); }

  /* Chips de estado */
  .chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: var(--c-fondo); color: var(--c-tenue); white-space: nowrap; }
  .chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
  .chip-verde { background: var(--c-verde-suave); color: var(--c-verde); }
  .chip-ambar { background: var(--c-ambar-suave); color: var(--c-ambar); }
  .chip-azul { background: var(--c-azul-suave); color: var(--c-azul); }
  .chip-rojo { background: var(--c-rojo-suave); color: var(--c-rojo); }
  .chip-sin-punto::before { display: none; }
  .nuevo { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--c-azul); color: #fff; letter-spacing: .02em; }

  /* Listas en renglones */
  .renglones { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .renglon {
    display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px 4px;
    border-bottom: 1px solid var(--c-borde); text-decoration: none; color: inherit; background: transparent; border-inline: 0; border-top: 0; width: 100%; text-align: left; cursor: pointer; font-size: 16.5px;
  }
  .renglones > li:last-child .renglon, .renglones > .renglon:last-child { border-bottom: 0; }
  .renglon-icono { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--c-azul-suave); color: var(--c-azul); flex: 0 0 auto; }
  .renglon-icono svg { width: 20px; height: 20px; }
  .renglon-texto { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .renglon-texto small { color: var(--c-tenue); font-size: 14.5px; }
  .renglon-flecha { color: var(--c-tenue); width: 20px; height: 20px; }
  .renglon-peligro { color: var(--c-rojo); }
  .renglon-peligro .renglon-icono { background: var(--c-rojo-suave); color: var(--c-rojo); }

  /* Hojas: suben desde abajo (celular) o panel centrado (computadora). */
  dialog.hoja {
    border: 0; padding: 0; margin: 0; color: var(--c-texto); background: var(--c-tarjeta);
    width: 100%; max-width: 100%; max-height: min(92dvh, 900px);
    position: fixed; inset: auto 0 0 0; border-radius: 22px 22px 0 0;
    box-shadow: var(--c-sombra-alta); overflow: hidden; display: none; flex-direction: column;
  }
  dialog.hoja[open] { display: flex; animation: hoja-sube var(--c-mov); }
  dialog.hoja::backdrop { background: rgba(8, 14, 28, .45); animation: velo var(--c-mov); }
  .hoja-asa { width: 44px; height: 5px; border-radius: 99px; background: var(--c-borde); margin: 10px auto 2px; flex: 0 0 auto; }
  .hoja-cabeza { display: flex; align-items: center; gap: 10px; padding: 8px 20px 4px; }
  .hoja-cabeza h2 { flex: 1; font-size: 20px; }
  .hoja-cuerpo { padding: 8px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
  .hoja-pie { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--c-borde); display: flex; flex-direction: column; gap: 10px; }
  @media (min-width: 900px) {
    dialog.hoja { inset: 0; margin: auto; width: min(560px, calc(100% - 32px)); height: fit-content; border-radius: 20px; }
    dialog.hoja[open] { animation: hoja-aparece var(--c-mov); }
    .hoja-asa { display: none; }
    .hoja-cabeza { padding-top: 18px; }
  }
  @keyframes hoja-sube { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
  @keyframes hoja-aparece { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes velo { from { opacity: 0; } }

  /* Aviso «Listo · Deshacer» (6 s, abajo). */
  .aviso {
    position: fixed; left: 50%; z-index: 90; transform: translateX(-50%);
    bottom: calc(var(--c-abajo) + 16px + env(safe-area-inset-bottom));
    width: max-content; max-width: calc(100% - 24px);
    display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 18px; border-radius: 14px;
    background: #16233f; color: #fff; box-shadow: var(--c-sombra-alta); font-size: 15.5px;
    animation: hoja-sube var(--c-mov);
  }
  .aviso[data-tipo="error"] { background: #7f1d1d; }
  .aviso button { background: transparent; border: 0; color: #9cc0ff; font-weight: 700; min-height: 40px; padding: 0 10px; border-radius: 10px; cursor: pointer; }
  @media (min-width: 900px) { .aviso { bottom: 24px; } }
  .sin-destinos .aviso { bottom: calc(20px + env(safe-area-inset-bottom)); }

  /* Formularios */
  .campo { display: flex; flex-direction: column; gap: 6px; }
  .campo > label, .campo > .campo-nombre { font-weight: 600; font-size: 15.5px; }
  .campo small, .ayuda { color: var(--c-tenue); font-size: 14.5px; }
  .entrada, .campo input:not([type="checkbox"]):not([type="radio"]), .campo select, .campo textarea {
    width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--c-borde);
    background: var(--c-tarjeta); font-size: 17px; transition: border-color var(--c-mov), box-shadow var(--c-mov);
  }
  .campo textarea { min-height: 110px; resize: vertical; }
  .entrada:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { outline: 0; border-color: var(--c-azul); box-shadow: 0 0 0 4px var(--c-azul-suave); }
  .campo-error { color: var(--c-rojo); font-size: 14.5px; font-weight: 600; }
  .casilla { display: flex; align-items: center; gap: 12px; min-height: var(--c-toque); cursor: pointer; }
  .casilla input { width: 24px; height: 24px; accent-color: var(--c-azul); }
  .interruptor { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; cursor: pointer; }
  .interruptor input { appearance: none; width: 52px; height: 32px; border-radius: 999px; background: var(--c-borde); position: relative; cursor: pointer; transition: background var(--c-mov); flex: 0 0 auto; }
  .interruptor input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform var(--c-mov); }
  .interruptor input:checked { background: var(--c-verde); }
  .interruptor input:checked::after { transform: translateX(20px); }
  .opciones { display: grid; gap: 10px; }
  .opcion {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 14px 16px; border-radius: 14px; cursor: pointer;
    border: 1.5px solid var(--c-borde); background: var(--c-tarjeta); font-weight: 600; font-size: 17px; text-align: left; width: 100%;
  }
  .opcion svg { width: 24px; height: 24px; color: var(--c-azul); }
  .opcion:hover { border-color: color-mix(in srgb, var(--c-azul) 45%, var(--c-borde)); }
  .opcion[aria-pressed="true"], .opcion:has(input:checked) { border-color: var(--c-azul); background: var(--c-azul-suave); box-shadow: 0 0 0 1px var(--c-azul) inset; }
  .opcion input { position: absolute; opacity: 0; pointer-events: none; }
  .segmentos { display: inline-flex; padding: 4px; gap: 4px; background: var(--c-fondo); border-radius: 12px; border: 1px solid var(--c-borde); }
  .segmentos a, .segmentos button { min-height: 38px; padding: 6px 14px; border-radius: 9px; border: 0; background: transparent; font-weight: 600; font-size: 14.5px; color: var(--c-tenue); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
  .segmentos [aria-current="true"], .segmentos [aria-pressed="true"] { background: var(--c-tarjeta); color: var(--c-texto); box-shadow: var(--c-sombra); }

  /* Progreso */
  .progreso { height: 12px; border-radius: 99px; background: var(--c-fondo); overflow: hidden; }
  .progreso span { display: block; height: 100%; border-radius: inherit; background: var(--c-verde); transition: width var(--c-mov); }
  .progreso.ambar span { background: #d58a12; }
  .puntos { display: flex; gap: 8px; justify-content: center; }
  .puntos span { width: 10px; height: 10px; border-radius: 50%; background: var(--c-borde); transition: all var(--c-mov); }
  .puntos span.hecho { background: var(--c-azul); }
  .puntos span.actual { width: 28px; border-radius: 99px; background: var(--c-azul); }

  .qr-caja { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; border-radius: 16px; background: #fff; color: #111; border: 1px solid var(--c-borde); }
  .qr-caja canvas, .qr-caja img { width: 220px; height: 220px; image-rendering: pixelated; }

  /* Estado vacío */
  .vacio { text-align: center; align-items: center; padding: 36px 22px; }
  .vacio .vacio-icono { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--c-azul-suave); color: var(--c-azul); }
  .vacio .vacio-icono svg { width: 34px; height: 34px; }

}

@layer pantallas {
  .saludo { display: flex; flex-direction: column; gap: 4px; }
  .saludo p { color: var(--c-tenue); }
  /* Acceso */
  .acceso { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background:
    radial-gradient(1200px 500px at 100% -10%, var(--c-azul-suave), transparent 60%), var(--c-fondo); }
  .acceso-caja { width: min(440px, 100%); display: flex; flex-direction: column; gap: 18px; }
  .acceso-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 24px; justify-content: center; }
  .acceso-logo img { width: 44px; height: 44px; }
  .separador-o { display: flex; align-items: center; gap: 12px; color: var(--c-tenue); font-size: 14px; }
  .separador-o::before, .separador-o::after { content: ""; flex: 1; height: 1px; background: var(--c-borde); }

}

@layer utilidades {
  .visualmente-oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .fila { display: flex; align-items: center; gap: 10px; }
  .fila-entre { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .envolver { flex-wrap: wrap; }
  .pila { display: flex; flex-direction: column; gap: 10px; }
  .pila-chica { display: flex; flex-direction: column; gap: 4px; }
  .centro { text-align: center; }
  .crece { flex: 1; min-width: 0; }
  .mt-0 { margin-top: 0; }
  .sin-margen { margin: 0; }
  .verde { color: var(--c-verde); }
  .ambar { color: var(--c-ambar); }
  .rojo { color: var(--c-rojo); }
  .azul { color: var(--c-azul); }
  @media (max-width: 899px) { .solo-compu { display: none !important; } }
  @media (min-width: 900px) { .solo-celular { display: none !important; } }
}

/* --- Compartido con Gimnasio Mental y Studio ---------------------------- */
@layer componentes {
  .volver { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 40px; padding: 4px 10px 4px 4px; margin-bottom: -6px;
    color: var(--c-tenue); font-weight: 700; font-size: 15px; text-decoration: none; border-radius: 10px; }
  .volver:hover { color: var(--c-azul); background: var(--c-azul-suave); }
  .volver svg { width: 18px; height: 18px; }
  dl.datos { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px 16px; }
  dl.datos dt { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--c-tenue); margin-top: 8px; }
  dl.datos dd { margin: 0; font-size: 16px; }
  @media (min-width: 560px) { dl.datos { grid-template-columns: 170px 1fr; } dl.datos dt { margin-top: 0; padding-top: 3px; } dl.datos dd { padding-bottom: 8px; } }
  .lista-numerada { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 15.5px; }
  code { background: var(--c-azul-suave); color: var(--c-azul); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
}

/* =============================================================================
 * Propio de la cuenta
 * ========================================================================== */
@layer pantallas {
  /* Marca: el mismo tratamiento que «Studio» junto a su ícono. */
  .marca-cuenta { display: inline-flex; align-items: center; gap: 8px; font-family: "Nunito", system-ui, sans-serif; font-weight: 800;
    font-size: 24px; letter-spacing: -.02em; line-height: 1; color: #0b3a8c; }
  .asxb-marca .marca-cuenta img, .marca-cuenta img { height: 32px; width: 32px; }
  :root[data-theme="dark"] .marca-cuenta { color: #eaf1ff; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .marca-cuenta { color: #eaf1ff; } }
  @media (max-width: 420px) { .asxb-marca .marca-cuenta { font-size: 21px; } .asxb-marca .marca-cuenta img { height: 28px; width: 28px; } }
  .acceso-logo.marca-cuenta { font-size: 30px; }
  .acceso-logo.marca-cuenta img { height: 46px; width: 46px; }

  /* Foto de la persona */
  .identidad { flex-direction: row; align-items: center; gap: 18px; }
  .foto { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; object-fit: cover;
    color: #fff; font-weight: 800; font-size: 20px; box-shadow: 0 0 0 3px var(--c-tarjeta), 0 0 0 5px var(--c-azul-suave); }
  .foto-grande { width: 88px; height: 88px; font-size: 32px; }
  @media (max-width: 420px) { .identidad { flex-direction: column; text-align: center; } .identidad .botones { justify-content: center; } }
  .subir { position: relative; overflow: hidden; }
  .subir input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

  /* Formularios */
  .dos-campos { display: grid; gap: 10px; }
  @media (min-width: 560px) { .dos-campos { grid-template-columns: 1fr 1fr; } }
  fieldset.grupo { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
  fieldset.grupo legend { font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--c-tenue); margin-bottom: 6px; padding: 0; }
  fieldset.grupo + fieldset.grupo { border-top: 1px solid var(--c-borde); padding-top: 16px; }
  .clave { position: relative; }
  .clave .entrada { padding-right: 54px; }
  .clave-ver { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 10px;
    background: transparent; color: var(--c-tenue); display: grid; place-items: center; cursor: pointer; }
  .clave-ver:hover { color: var(--c-azul); background: var(--c-azul-suave); }
  .clave-ver[aria-pressed="true"] { color: var(--c-azul); }
  .entrada.codigo { text-align: center; font-size: 28px !important; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
  .secreto { display: inline-block; margin-top: 6px; font-size: 15px; letter-spacing: .08em; user-select: all; }
  .campo select { appearance: auto; }
  .campo input[readonly] { background: var(--c-fondo); color: var(--c-tenue); }

  /* Renglones que no son enlace (seguridad, sesiones, actividad) */
  .renglon-estatico { cursor: default; }
  .renglon-estatico form { flex: 0 0 auto; }
  .renglon-icono-gris { background: var(--c-fondo); color: var(--c-tenue); }
  .renglon-icono-verde { background: var(--c-verde-suave); color: var(--c-verde); }
  .renglon-icono-ambar { background: var(--c-ambar-suave); color: var(--c-ambar); }
  .renglon-icono-rojo { background: var(--c-rojo-suave); color: var(--c-rojo); }
  .renglon-icono-azul { background: var(--c-azul-suave); color: var(--c-azul); }
  .renglon .chip { flex: 0 0 auto; }
  a.chip, .chip-boton { text-decoration: none; border: 0; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; }
  a.chip:hover, .chip-boton:hover { filter: brightness(.97); text-decoration: underline; }

  /* Tarjetas de aviso */
  .tarjeta-roja { background: var(--c-rojo-suave); border-color: color-mix(in srgb, var(--c-rojo) 30%, var(--c-borde)); }
  .tarjeta-roja h2 { color: var(--c-rojo); }
  .tarjeta.fila { flex-direction: row; align-items: center; }
  .tarjeta.fila > svg { width: 24px; height: 24px; flex: 0 0 auto; }

  /* Direcciones */
  .lista-direcciones { display: grid; gap: 14px; }
  @media (min-width: 760px) { .lista-direcciones { grid-template-columns: 1fr 1fr; } }
  .direccion address { font-style: normal; font-size: 16px; line-height: 1.5; }
  .direccion-principal { border-color: color-mix(in srgb, var(--c-azul) 40%, var(--c-borde)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-azul) 40%, transparent), var(--c-sombra); }
  .direccion .botones { margin-top: auto; padding-top: 4px; gap: 4px; }
  .direccion h2 { font-size: 18px; }

  /* Inicio */
  .dos-columnas { display: grid; gap: 16px; }
  .dos-columnas > .tarjeta { min-width: 0; }
  @media (min-width: 760px) { .dos-columnas { grid-template-columns: 1fr 1fr; } }
  .tarjeta-cabeza .renglon-icono { width: 36px; height: 36px; border-radius: 10px; }
  .tarjeta-cabeza .renglon-icono svg { width: 18px; height: 18px; }
  .tarjeta-cabeza h2 { font-size: 18px; }

  /* La línea que recuerda qué se administra aquí (Especificación §14). */
  .pie-cuenta { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; color: var(--c-tenue); font-size: 13.5px; }
  .pie-cuenta svg { width: 16px; height: 16px; margin-top: 2px; }
}
