/* ==========================================================================
FORGOT-PASSWORD.CSS - Página de Recuperación de Contraseña DNBLP
Incluye neutralización de estilos globales (02-components.css)
========================================================================== */

/* ==========================================================================
OCULTAR ELEMENTOS DEL LAYOUT EN PÁGINAS DE AUTH
========================================================================== */
.app-container > header .header-right {
    display: none;
}

/* En móviles, ocultar todo el header para máxima limpieza */
@media (max-width: 640px) {
    .app-container > header {
        display: none;
    }
}

/* ==========================================================================
WRAPPER CON GRADIENTE INSTITUCIONAL
========================================================================== */
.auth-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column; /* Apila la tarjeta y el pie verticalmente */
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        var(--dnblp-teal) 0%,
        var(--dnblp-cyan) 50%,
        var(--dnblp-sage) 100%);
    padding: 20px;
    box-sizing: border-box;
    gap: 24px; /* ✅ CLAVE: Espacio controlado entre la tarjeta y el pie */
}

/* ==========================================================================
CONTENEDOR PRINCIPAL (Tarjeta Blanca)
========================================================================== */
.auth-container {
    max-width: 520px;
    width: 100%;
    margin: 0 auto; /* ✅ Eliminamos el margin: 4rem que separaba todo */
    padding: 2.5rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1),
                0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200, #e5e7eb);
    box-sizing: border-box;
}

/* ==========================================================================
LOGO INSTITUCIONAL
========================================================================== */
.branding-header {
    text-align: center;
    margin-bottom: 24px;
}

.dnblp-logo {
    max-width: 240px;
    width: 100%;
    height: auto;
    display: inline-block;
    mix-blend-mode: multiply;
}

/* ==========================================================================
HEADER DE LA TARJETA (Título y descripción)
========================================================================== */
.auth-header h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dnblp-teal, #0a6677);
    text-align: center;
}

.auth-header p {
    margin: 0 0 2rem 0;
    font-size: 0.95rem;
    color: var(--gray-600, #4b5563);
    text-align: center;
    line-height: 1.5;
}

/* ==========================================================================
NEUTRALIZACIÓN DEL GRID GLOBAL (02-components.css)
========================================================================== */
/* Esta es la regla CLAVE que faltaba. Sin ella, el form-group hereda el 
   grid de 2 columnas del layout global y rompe el diseño de auth. */

.auth-container .form-group,
.auth-form .form-group {
    display: block !important;
    gap: 0;
    margin-bottom: 1.5rem;
}

.auth-container .form-group label,
.auth-container .form-group input {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
CAMPOS DEL FORMULARIO
========================================================================== */
.form-group label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700, #374151);
}

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300, #d1d5db);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--text-color);
}

.form-group input:focus {
    outline: none;
    border-color: var(--dnblp-teal, #0a6677);
    box-shadow: 0 0 0 3px rgba(10, 102, 119, 0.15);
}

.form-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-500, #6b7280);
    line-height: 1.4;
}

/* ==========================================================================
BOTÓN DE ENVÍO
========================================================================== */
.btn-primary-full {
    width: 100%;
    padding: 0.9rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--dnblp-teal, #0a6677);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.btn-primary-full:hover:not(:disabled) {
    background-color: #085260;
}

.btn-primary-full:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-primary-full:disabled {
    background-color: var(--gray-400, #9ca3af);
    cursor: not-allowed;
    opacity: 0.7;
}

/* ==========================================================================
FOOTER (Enlace para volver al login)
========================================================================== */
.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200, #e5e7eb);
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-600, #4b5563);
}

.auth-footer p {
    margin: 0;
}

.auth-footer a {
    color: var(--dnblp-teal, #0a6677);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    text-decoration: underline;
    color: #085260;
}

/* ==========================================================================
FOOTER INFERIOR GLOBAL (Leyenda institucional)
========================================================================== */
.auth-bottom-footer {
    text-align: center;
    margin: 0;
    padding: 0 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Ajuste para móviles muy pequeños */
@media (max-width: 400px) {
    .auth-bottom-footer {
        font-size: 11px;
        margin-top: 16px;
    }
}

/* ==========================================================================
RESPONSIVE: MÓVILES (Hasta 640px)
========================================================================== */
@media (max-width: 640px) {

    .auth-wrapper {
        padding: 16px;
        gap: 16px; /* Reducimos un poco el espacio en móviles */
        justify-content: flex-start; /* En móviles, empezamos un poco más arriba */
        padding-top: 40px;
    }

    .auth-container {
        margin: 0;
        padding: 1.5rem;
        max-width: 100%;
    }

    .dnblp-logo {
        max-width: 180px;
    }

    .auth-header h2 {
        font-size: 1.3rem;
    }

    .auth-header p {
        font-size: 0.9rem;
    }

    .form-group input {
        padding: 0.75rem 0.9rem;
        font-size: 1rem; /* Mantener 1rem (16px) para evitar zoom en iOS */
    }

    .btn-primary-full {
        padding: 0.85rem;
    }
}