/* ==========================================================================
   LOGIN Y RECUPERACIÓN DE CONTRASEÑA
   Vistas: login/login, login/recuperar, login/recuperar_mensaje,
           login/restablecer

   Las variables de color (--bg-base, --text-oscuro, --accent...) están
   definidas en el <style> de templates/header.php. Se dejan valores de
   respaldo por si alguna vista se sirve sin esa cabecera.
   ========================================================================== */

.auth-shell {
    font-family: 'Inter', 'Jost', sans-serif;
    color: var(--text-oscuro, #1a1614);
    background: var(--bg-base, #f5ebdf);
    padding: 4rem 0 5rem;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

/* ---------- TARJETA ---------- */
.auth-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--blanco, #ffffff);
    border: 1px solid var(--borde-suave, rgba(31, 26, 23, 0.1));
    border-top: 3px solid var(--accent, #0a0908);
    border-radius: 2px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.07);
    padding: 2.75rem 2.5rem 2.5rem;
}

.auth-card-head {
    margin-bottom: 1.75rem;
}

.auth-shell .eyebrow {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent, #0a0908);
    margin-bottom: 0.75rem;
}

.auth-card h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.55rem, 2.4vw, 1.95rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 1.1rem;
    color: var(--text-oscuro, #1a1614);
}

.auth-shell .copy-divider {
    width: 48px;
    height: 2px;
    background: var(--accent, #0a0908);
    margin-bottom: 1.25rem;
}

.auth-lead {
    font-size: 0.93rem;
    line-height: 1.75;
    color: var(--text-suave, #3a3028);
    margin: 0;
}

/* ---------- AVISOS ---------- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: 0.86rem;
    line-height: 1.6;
    border-radius: 2px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
}

.auth-alert i {
    margin-top: 0.15rem;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.auth-alert p:last-child,
.auth-alert ul:last-child {
    margin-bottom: 0;
}

.auth-alert ul {
    padding-left: 1.1rem;
    margin: 0;
}

.auth-alert-error {
    background: #fbeae7;
    border-left: 3px solid #b3402c;
    color: #7d2b1c;
}

.auth-alert-error i {
    color: #b3402c;
}

.auth-alert-success {
    background: #eaf3ec;
    border-left: 3px solid #3f7d55;
    color: #2c5a3d;
}

.auth-alert-success i {
    color: #3f7d55;
}

/* ---------- FORMULARIO ---------- */
.auth-field {
    margin-bottom: 1.25rem;
}

.auth-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-suave, #3a3028);
    margin-bottom: 0.5rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    font-family: 'Inter', 'Jost', sans-serif;
    font-size: 0.95rem;
    color: var(--text-oscuro, #1a1614);
    background: var(--bg-cream, #faf3ea);
    border: 1px solid var(--borde-suave, rgba(31, 26, 23, 0.1));
    border-radius: 2px;
    padding: 0.8rem 1rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: rgba(26, 22, 20, 0.38);
}

.auth-input:hover {
    border-color: rgba(31, 26, 23, 0.22);
}

.auth-input:focus {
    outline: none;
    background: var(--blanco, #ffffff);
    border-color: var(--accent-soft, #c89b6e);
    box-shadow: 0 0 0 3px rgba(200, 155, 110, 0.18);
}

/* Deja hueco al botón de mostrar/ocultar contraseña */
.auth-input-wrap .auth-input[type="password"],
.auth-input-wrap .auth-input[type="text"] {
    padding-right: 2.9rem;
}

.auth-toggle-pass {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 2.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: var(--text-suave, #3a3028);
    opacity: 0.55;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.auth-toggle-pass:hover,
.auth-toggle-pass:focus-visible {
    opacity: 1;
    color: var(--accent, #0a0908);
}

.auth-hint {
    display: block;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-suave, #3a3028);
    opacity: 0.75;
    margin-top: 0.45rem;
}

/* ---------- RECAPTCHA ---------- */
.auth-captcha {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

/* El widget mide 304px fijos: se reescala en pantallas estrechas */
@media (max-width: 400px) {
    .auth-captcha {
        transform: scale(0.85);
        transform-origin: center;
    }
}

/* ---------- BOTÓN ---------- */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blanco, #ffffff);
    background: var(--text-oscuro, #1a1614);
    border: 1px solid var(--text-oscuro, #1a1614);
    border-radius: 2px;
    padding: 0.95rem 1.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.auth-btn:hover,
.auth-btn:focus-visible {
    background: var(--accent-soft, #c89b6e);
    border-color: var(--accent-soft, #c89b6e);
    color: var(--text-oscuro, #1a1614);
}

.auth-btn:focus-visible {
    outline: 2px solid rgba(200, 155, 110, 0.6);
    outline-offset: 2px;
}

/* Variante secundaria (Volver) */
.auth-btn-ghost {
    color: var(--text-oscuro, #1a1614);
    background: transparent;
}

.auth-btn-ghost:hover,
.auth-btn-ghost:focus-visible {
    background: var(--text-oscuro, #1a1614);
    border-color: var(--text-oscuro, #1a1614);
    color: var(--blanco, #ffffff);
}

/* ---------- ENLACES DEL FORMULARIO ---------- */
.auth-form-foot {
    margin-top: 1.35rem;
    text-align: center;
}

.auth-link {
    font-size: 0.84rem;
    color: var(--text-suave, #3a3028);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.auth-link:hover,
.auth-link:focus-visible {
    color: var(--accent, #0a0908);
    border-bottom-color: var(--accent-soft, #c89b6e);
}

.auth-foot {
    text-align: center;
    margin-top: 1.6rem;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-suave, #3a3028);
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.auth-back:hover,
.auth-back:focus-visible {
    opacity: 1;
    color: var(--accent, #0a0908);
}

/* ---------- ESTADO / MENSAJE (correo enviado) ---------- */
.auth-card.is-message {
    text-align: center;
}

.auth-card.is-message .copy-divider {
    margin-left: auto;
    margin-right: auto;
}

.auth-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-base, #f5ebdf);
    color: var(--accent, #0a0908);
    font-size: 1.35rem;
}

.auth-email {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-oscuro, #1a1614);
    word-break: break-word;
    margin: 1.1rem 0;
}

.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    text-align: left;
    background: var(--bg-cream, #faf3ea);
    border-left: 3px solid var(--accent-soft, #c89b6e);
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--text-suave, #3a3028);
    padding: 0.85rem 1rem;
    margin: 1.5rem 0;
}

.auth-note i {
    margin-top: 0.2rem;
    color: var(--accent-soft, #c89b6e);
    flex-shrink: 0;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 575.98px) {
    .auth-shell {
        padding: 2.5rem 0 3.5rem;
        display: block;
    }

    .auth-card {
        padding: 2rem 1.4rem 1.85rem;
    }

    .auth-card h1 {
        font-size: 1.4rem;
    }
}
