/* Login (mismo diseño que turnos-salamanca). Dos columnas: acceso con
 * Microsoft sobre papel | fotografía sin velo. En pantallas angostas solo
 * queda el panel. Montserrat. */

:root {
    --login-papel: oklch(96% 0.006 30);
    --login-tinta: oklch(21% 0.020 20);
    --login-tinta-2: oklch(36% 0.016 20);
    --login-suave: oklch(45% 0.014 25);
    --login-filete: oklch(84% 0.010 30);
    --login-filete-fuerte: oklch(56% 0.014 25);
    --login-acento: #601028;
    --login-acento-hondo: oklch(26% 0.100 11);
    --login-acento-tinta: oklch(97% 0.005 30);
    --login-foco: oklch(34% 0.118 11 / 0.22);
    --login-error: oklch(44% 0.190 32);
    --login-error-fondo: oklch(95% 0.030 30);
    --login-ok: oklch(46% 0.110 155);
    --login-ok-fondo: oklch(95% 0.035 155);
}

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

/* body:has() le gana en especificidad al body del Bootstrap de Vite, que
 * se carga después. */
body:has(.auth-page) {
    margin: 0;
    background: var(--login-papel);
    color: var(--login-tinta);
    font-family: "Montserrat", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-page p {
    margin: 0;
}

.auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Columna del formulario: marca arriba, formulario al centro, letra chica
 * abajo. */
.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 48px 72px;
}

.auth-marca {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-marca__escudo {
    height: 44px;
    width: auto;
}

.auth-marca__nombre {
    font-size: 14px;
    font-weight: 700;
}

.auth-cuerpo {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 26rem;
}

.auth-encabezado {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-rotulo {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--login-acento);
}

.auth-titulo {
    margin: 0;
    font-size: 44px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.auth-subtitulo {
    font-size: 15px;
    line-height: 1.5;
    color: var(--login-tinta-2);
}

/* Avisos del servidor: texto + icono, nunca solo color. */
.aviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid oklch(44% 0.190 32 / 0.35);
    border-radius: 4px;
    background: var(--login-error-fondo);
    color: var(--login-error);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.aviso--ok {
    border-color: oklch(46% 0.110 155 / 0.35);
    background: var(--login-ok-fondo);
    color: var(--login-ok);
}

.aviso__icono {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.is-hidden {
    display: none;
}

.auth-enviar svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-enviar:focus-visible,
.auth-pie a:focus-visible {
    outline: 2px solid var(--login-acento);
    outline-offset: 2px;
}

/* Botón primario: caja, nunca pastilla. */
.auth-enviar {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--login-acento);
    border-radius: 4px;
    background: var(--login-acento);
    color: var(--login-acento-tinta);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 120ms ease-out;
}

.auth-enviar svg {
    stroke-width: 1.8;
}

.auth-enviar:hover {
    background: var(--login-acento-hondo);
}

.auth-microsoft svg {
    stroke: none;
}

.auth-enviar:disabled {
    cursor: progress;
    opacity: 0.75;
}

/* Letra chica */
.auth-pie {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 26rem;
    padding-top: 16px;
    border-top: 1px solid var(--login-filete);
    font-size: 12px;
    line-height: 1.5;
    color: var(--login-suave);
}

.auth-pie a {
    color: var(--login-acento);
}

.auth-pie a:hover {
    color: var(--login-acento-hondo);
}

/* El aviso de reCAPTCHA va en .auth-pie, como permite Google. */
.grecaptcha-badge {
    visibility: hidden;
}

/* Columna de la fotografía, sin velo. */
.auth-foto {
    background: url("/images/gaceta.jpg") center / cover no-repeat;
}

@media (max-width: 56rem) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-foto {
        display: none;
    }

    .auth-panel {
        gap: 28px;
        padding: 24px 20px;
    }

    /* Marca y formulario forman un bloque centrado en vertical (los dos
     * margin-top: auto reparten el espacio libre); la letra chica, abajo. */
    .auth-marca {
        gap: 14px;
        margin-top: auto;
    }

    .auth-marca__escudo {
        height: 56px;
    }

    .auth-marca__nombre {
        font-size: 16px;
    }

    .auth-cuerpo {
        max-width: none;
    }

    .auth-pie {
        margin-top: auto;
    }

    .auth-titulo {
        font-size: 34px;
    }

    .auth-subtitulo {
        font-size: 14px;
    }

    .auth-pie {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-enviar {
        transition: none;
    }
}
