/* ==========================================================================
   LOGIN.CSS
   Página standalone (no extiende base.html) — usada solo en login.html.
   Tiene su propio :root porque no comparte cascada con base.css.
   Paleta y visualización alineadas con index.css (mismo fondo claro,
   mismas tarjetas, mismos acentos).
   ========================================================================== */

/* ===== VARIABLES ===== */
:root {
    --primary: #601818;
    --primary-dark: #2d0e0e;
    --primary-light: #8e2b2b;
    --accent: #dfb23f;
    --accent-hover: #f1c754;
    --gold-footer: #a9824d;
    --gold-footer-dark: #8f6c3d;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #2d0e0e;
    --light: #faf8f5;
    --card-bg: #ffffff;
    --border: #eaded5;
    --text: #2b1d1d;
    --text-muted: #726262;
    --radius: 14px;
    --radius-pill: 9999px;
    --shadow: 0 4px 6px -1px rgba(96, 24, 24, 0.05), 0 2px 4px -1px rgba(96, 24, 24, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(96, 24, 24, 0.1), 0 10px 10px -5px rgba(96, 24, 24, 0.04);
    --transition: all 0.2s ease;
}

/* ===== RESET ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   NAVBAR (idéntico al de index/base.css — logo + nombre a la izquierda)
   ========================================================================== */
.navbar {
    background: var(--card-bg);
    padding: 0.7rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.nav-logo {
    height: 46px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.nav-brand:hover .nav-logo {
    transform: scale(1.08) rotate(-3deg);
}

.brand-text {
    color: var(--primary);
    letter-spacing: 0.3px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a:hover {
    color: var(--primary);
    background: rgba(96, 24, 24, 0.08);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===== LOGIN CONTAINER (columna única, centrado en toda la pantalla) ===== */
.login-container {
    display: flex;
    flex: 1;
}

/* ==========================================================================
   FONDO DETRÁS DEL FORMULARIO
   Foto de la biblioteca, desenfocada y oscurecida con el guinda de marca
   para que aporte ambiente sin restarle atención a la tarjeta de login.
   ========================================================================== */
.login-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--light);
}

.login-right::before {
    content: '';
    position: absolute;
    inset: -20px;
    background:
        linear-gradient(135deg, rgba(10, 8, 8, 0.68) 0%, rgba(20, 16, 16, 0.5) 100%),
        url('../img/FONDOLOGIN.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(6px);
    z-index: 0;
}

.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.6rem 2.4rem;
}

.login-header {
    margin-bottom: 32px;
    text-align: center;
}

.login-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== FORM ===== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--primary);
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    font-size: 14px;
    transition: var(--transition);
    background: #fff;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(223, 178, 63, 0.25);
}

.password-input {
    position: relative;
}

.password-input input {
    width: 100%;
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.toggle-password:hover {
    color: var(--text);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.forgot-password {
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== LOGIN BUTTON ===== */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.login-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(96, 24, 24, 0.35);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== TOAST (login es standalone, necesita su propia copia) ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    min-width: 280px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success { border-left: 4px solid var(--success); }
.toast-success i { color: var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-error i { color: var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning i { color: var(--warning); }
.toast-info { border-left: 4px solid var(--info); }
.toast-info i { color: var(--info); }

/* ==========================================================================
   LOGIN FOOTER — barra de contacto (logo + teléfono / correo / dirección),
   fondo oscuro institucional con columnas separadas por divisores.
   ========================================================================== */
.login-footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #150606 100%);
    color: #fff;
    padding: 1.8rem 3rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2.2rem;
}

.login-footer-brand {
    display: flex;
    align-items: center;
    padding-right: 2.2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.login-footer-brand img {
    height: 54px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.login-footer-contacts {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 0;
}

.login-footer-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 1.8rem;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.login-footer-item:first-child {
    border-left: none;
    padding-left: 0;
}

.login-footer-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--primary-light);
}

.login-footer-item span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.login-footer-item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    max-width: 260px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-brand {
        font-size: 1.2rem;
    }

    .nav-logo {
        height: 38px;
    }

    .login-right {
        padding: 24px;
    }

    .login-card {
        padding: 2rem 1.6rem;
    }

    .login-footer {
        padding: 20px 24px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .login-footer-brand {
        padding-right: 0;
        border-right: none;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        width: 100%;
    }

    .login-footer-contacts {
        flex-direction: column;
        gap: 1.2rem;
        width: 100%;
    }

    .login-footer-item {
        border-left: none;
        padding: 0;
    }

    .login-footer-item strong {
        max-width: 100%;
    }
}

/* ==========================================================================
   AUTENTICACIÓN CON GOOGLE
   Mantiene la paleta institucional de Bibliotecas Emir.
   ========================================================================== */

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 18px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    box-sizing: border-box;

    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: var(--radius);

    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    text-align: center;

    cursor: pointer;
    transition: var(--transition);
}

.google-login-btn:hover {
    background: #f8faff;
    border-color: #c5c9ce;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.google-login-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.google-login-btn:focus-visible {
    outline: 2px solid #4285f4;
    outline-offset: 3px;
}

.google-login-btn img {
    display: block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.google-login-btn span {
    display: inline-block;
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 480px) {
    .login-divider {
        gap: 10px;
        margin: 20px 0 14px;
        font-size: 10px;
    }

    .google-login-btn {
        min-height: 46px;
        padding: 11px 12px;
        font-size: 13px;
    }
}