/* Páginas de cuenta (login, recuperar y restablecer contraseña). Todo color y medida sale de los
   tokens --shk-* que emite _CuentaLayout.cshtml desde ShackletonTokens.Light. Densidad "de
   lectura" de DESIGN.md: controles de 40px, space-3 entre campos, space-4 entre bloques. */

@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url("/fonts/roboto/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url("/fonts/roboto/roboto-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url("/fonts/roboto/roboto-latin-700-normal.woff2") format("woff2"); }

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

.cuenta {
    margin: 0;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    background: var(--shk-bg);
    color: var(--shk-ink);
    font-family: Roboto, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: var(--shk-control-font-size);
    line-height: 1.5;
}

/* Barra de marca: el único lugar donde DESIGN.md admite el degradado navy → navy profundo. */
.cuenta-marca {
    display: flex;
    flex-direction: column;
    gap: var(--shk-space-2);
    padding: var(--shk-space-4);
    background: linear-gradient(160deg, var(--shk-navy) 0%, var(--shk-navy-deep) 100%);
    color: var(--shk-surface);
}

.cuenta-marca p { margin: 0; }

.cuenta-marca-nombre {
    font-size: var(--shk-headline-font-size);
    font-weight: 600;
    line-height: 1.2;
}

.cuenta-marca-bajada,
.cuenta-marca-pie {
    color: color-mix(in srgb, var(--shk-surface) 80%, transparent);
    max-width: 36ch;
}

.cuenta-marca-bajada { display: none; }
.cuenta-marca-pie { display: none; font-size: var(--shk-caption-font-size); }

.cuenta-contenido {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--shk-space-4) var(--shk-space-3);
}

.cuenta-tarjeta {
    width: 100%;
    max-width: 26rem; /* ancho de contenido: un formulario de 1 columna, no un valor de la escala */
    padding: var(--shk-space-4);
    background: var(--shk-surface);
    border: 1px solid var(--shk-border);
    border-radius: var(--shk-radius);
}

@media (min-width: 900px) {
    .cuenta {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        grid-template-rows: 1fr;
    }

    .cuenta-marca {
        justify-content: center;
        gap: var(--shk-space-3);
        padding: calc(var(--shk-space-4) * 3);
    }

    .cuenta-marca-nombre { font-size: var(--shk-display-font-size); letter-spacing: -0.02em; }
    .cuenta-marca-bajada { display: block; font-size: var(--shk-subtitle-font-size); }
    .cuenta-marca-pie { display: block; margin-top: calc(var(--shk-space-4) * 2); }

    .cuenta-contenido { align-items: center; padding: calc(var(--shk-space-4) * 2); }
    .cuenta-tarjeta { padding: calc(var(--shk-space-4) * 1.5); }
}

.cuenta-titulo {
    margin: 0 0 var(--shk-space-1);
    font-size: var(--shk-headline-font-size);
    font-weight: 600;
    line-height: 1.35;
    color: var(--shk-navy);
}

.cuenta-bajada,
.cuenta-texto {
    margin: 0 0 var(--shk-space-4);
    color: var(--shk-ink-muted);
}

.cuenta-texto { color: var(--shk-ink); }

.cuenta-form {
    display: flex;
    flex-direction: column;
    gap: var(--shk-space-3);
}

.cuenta-campo {
    display: flex;
    flex-direction: column;
    gap: var(--shk-space-1);
}

.cuenta-label { font-weight: 500; }

.cuenta-input {
    width: 100%;
    height: var(--shk-control-height);
    padding: 0 var(--shk-control-padding-x);
    font: inherit;
    color: var(--shk-ink);
    background: var(--shk-surface);
    border: 1px solid var(--shk-ink-muted);
    border-radius: var(--shk-radius-sm);
}

.cuenta-input:focus-visible {
    outline: 2px solid var(--shk-accent);
    outline-offset: 1px;
    border-color: var(--shk-accent);
}

.cuenta-campo--error .cuenta-input { border-color: var(--shk-critical); }
.cuenta-campo--error .cuenta-input:focus-visible { outline-color: var(--shk-critical); }

.cuenta-password { position: relative; }
.cuenta-password .cuenta-input { padding-right: var(--shk-touch-target); }

.cuenta-ojo {
    position: absolute;
    top: 50%;
    right: var(--shk-space-1);
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(var(--shk-control-height) - var(--shk-space-2));
    height: calc(var(--shk-control-height) - var(--shk-space-2));
    padding: 0;
    border: 0;
    border-radius: var(--shk-radius-sm);
    background: transparent;
    color: var(--shk-ink-muted);
    cursor: pointer;
}

.cuenta-ojo svg { width: var(--shk-subtitle-font-size); height: var(--shk-subtitle-font-size); fill: currentColor; }
.cuenta-ojo:hover,
.cuenta-ojo:focus-visible { color: var(--shk-accent-strong); background: var(--shk-accent-soft); }
.cuenta-ojo:focus-visible { outline: 2px solid var(--shk-accent); outline-offset: 0; }
.cuenta-ojo .cuenta-ojo-ocultar { display: none; }
.cuenta-ojo[aria-pressed="true"] .cuenta-ojo-ver { display: none; }
.cuenta-ojo[aria-pressed="true"] .cuenta-ojo-ocultar { display: block; }

.cuenta-error,
.cuenta-mayus {
    margin: 0;
    font-size: var(--shk-caption-font-size);
}

.cuenta-error { color: var(--shk-critical); font-weight: 500; }
.cuenta-error::before { content: "✕ "; }
.cuenta-mayus { color: var(--shk-warning); }
.cuenta-error[hidden], .cuenta-mayus[hidden] { display: none; }

.cuenta-fila {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--shk-space-2);
}

.cuenta-check {
    display: inline-flex;
    align-items: center;
    gap: var(--shk-space-2);
    min-height: var(--shk-control-height);
    cursor: pointer;
}

.cuenta-check input {
    width: var(--shk-subtitle-font-size);
    height: var(--shk-subtitle-font-size);
    margin: 0;
    accent-color: var(--shk-navy);
}

.cuenta-enlace {
    color: var(--shk-accent-strong);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.cuenta-enlace:hover { color: var(--shk-navy); }
.cuenta-enlace:focus-visible { outline: 2px solid var(--shk-accent); outline-offset: 2px; border-radius: var(--shk-space-1); }

.cuenta-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--shk-space-2);
    width: 100%;
    height: var(--shk-control-height);
    margin-top: var(--shk-space-2);
    padding: 0 var(--shk-space-3);
    font: inherit;
    font-weight: 500;
    color: var(--shk-surface);
    background: var(--shk-navy);
    border: 1px solid var(--shk-navy);
    border-radius: var(--shk-radius-sm);
    text-decoration: none;
    cursor: pointer;
}

.cuenta-boton:hover { background: var(--shk-navy-deep); }
.cuenta-boton:focus-visible { outline: 2px solid var(--shk-accent); outline-offset: 2px; }
.cuenta-boton[aria-disabled="true"] { cursor: progress; opacity: 0.8; }

.cuenta-boton--secundario {
    color: var(--shk-navy);
    background: var(--shk-surface);
    border-color: var(--shk-accent);
}

.cuenta-boton--secundario:hover { background: var(--shk-accent-soft); }

.cuenta-boton-giro {
    width: var(--shk-subtitle-font-size);
    height: var(--shk-subtitle-font-size);
    border: 2px solid color-mix(in srgb, var(--shk-surface) 40%, transparent);
    border-top-color: var(--shk-surface);
    border-radius: 50%;
    animation: cuenta-giro 0.8s linear infinite;
}

@keyframes cuenta-giro { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .cuenta-boton-giro { animation: none; }
}

.cuenta-aviso {
    display: flex;
    gap: var(--shk-space-2);
    align-items: flex-start;
    margin-bottom: var(--shk-space-3);
    padding: var(--shk-space-2) var(--shk-space-3);
    border: 1px solid;
    border-radius: var(--shk-radius-sm);
}

.cuenta-aviso:focus { outline: none; }
.cuenta-aviso:focus-visible { outline: 2px solid var(--shk-accent); outline-offset: 2px; }
.cuenta-aviso p { margin: 0; }
.cuenta-aviso-icono { flex: none; width: var(--shk-subtitle-font-size); height: var(--shk-subtitle-font-size); margin-top: 0.15em; fill: currentColor; }
.cuenta-aviso--error { color: var(--shk-critical); background: var(--shk-critical-soft); border-color: var(--shk-critical); }
.cuenta-aviso--exito { color: var(--shk-ok); background: var(--shk-ok-soft); border-color: var(--shk-ok); }
.cuenta-aviso--info { color: var(--shk-info); background: var(--shk-info-soft); border-color: var(--shk-info); }
.cuenta-aviso--error p, .cuenta-aviso--exito p, .cuenta-aviso--info p { color: var(--shk-ink); }

.cuenta-reglas {
    padding: var(--shk-space-2) var(--shk-space-3);
    background: var(--shk-surface-2);
    border-radius: var(--shk-radius-sm);
}

.cuenta-reglas-titulo { margin: 0 0 var(--shk-space-1); font-weight: 500; }
.cuenta-reglas ul { margin: 0; padding-left: var(--shk-space-3); }

.cuenta-pie { margin: var(--shk-space-4) 0 0; text-align: center; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
