/**
 * CATURCA Editorial - Login Styles
 * Composición Elite de dos paneles en escritorio y columna única fluida en móvil
 */

/* ==========================================================================
   1. CONTENEDOR DE PANTALLA COMPLETA
   ========================================================================== */
.login-screen {
    min-height: 100vh;
    background-color: var(--caturca-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 1rem;
    font-family: var(--font-body);
}

.login-dual-card {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    max-width: 860px;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid var(--caturca-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   2. PANEL INSTITUCIONAL IZQUIERDO (BRANDING CATURCA)
   ========================================================================== */
.login-brand-panel {
    background: linear-gradient(135deg, rgba(0, 34, 68, 0.94) 0%, rgba(0, 24, 48, 0.96) 100%), url('/img/carabobo-hero-mobile.webp');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 3rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.login-brand-header {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-brand-logo {
    max-width: 170px;
    height: auto;
    filter: brightness(0) invert(1); /* Blanco institucional sobre fondo oscuro */
}

.login-brand-tagline {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.35;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.login-brand-subtext {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.login-brand-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.25rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ==========================================================================
   3. PANEL FORMULARIO DERECHO (GESTIÓN EDITORIAL)
   ========================================================================== */
.login-form-panel {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
}

.login-header-group {
    margin-bottom: 1.75rem;
}

.login-title {
    font-size: 1.6rem;
    color: var(--caturca-navy);
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--caturca-text-muted);
    line-height: 1.45;
}

/* Alerta de Error en Login */
.login-alert-error {
    background-color: var(--alert-danger-bg);
    border: 1px solid var(--alert-danger-border);
    border-left: 4px solid #dc2626;
    color: var(--alert-danger-text);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.login-alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: #dc2626;
}

/* ==========================================================================
   4. INPUT CONTRASEÑA CON EYE TOGGLE ACCESIBLE
   ========================================================================== */
.input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-password-wrapper .form-control {
    padding-right: 3rem;
}

.btn-toggle-password {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--caturca-text-muted);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.btn-toggle-password:hover {
    color: var(--caturca-navy);
    background-color: var(--caturca-surface-light);
}

.btn-toggle-password:focus-visible {
    outline: 2px solid var(--caturca-border-focus);
    outline-offset: 1px;
}

.btn-toggle-password svg {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
}

.btn-toggle-password svg[hidden] {
    display: none !important;
}

/* ==========================================================================
   5. ENLACES Y FOOTER INSTITUCIONAL DEL LOGIN
   ========================================================================== */
.login-actions-group {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.back-home-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--caturca-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
}

.back-home-link:hover {
    color: var(--caturca-blue);
    text-decoration: underline;
}

.back-home-link:focus-visible {
    outline: 2px solid var(--caturca-border-focus);
    outline-offset: 2px;
}

.login-page-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--caturca-text-muted);
    line-height: 1.5;
}

.login-page-footer .institution-name {
    font-weight: 600;
    color: var(--caturca-navy);
}

/* ==========================================================================
   6. RESPONSIVE MÓVIL Y TABLET VERTICAL (< 1024px)
   ========================================================================== */
@media (max-width: 1023.98px) {
    .login-screen {
        padding: 1rem;
        justify-content: flex-start;
    }
    .login-dual-card {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin-top: 1rem;
    }
    .login-brand-panel {
        padding: 1.75rem 1.5rem;
        gap: 1rem;
    }
    .login-brand-logo {
        max-width: 140px;
    }
    .login-brand-tagline {
        font-size: 1.05rem;
    }
    .login-brand-footer {
        display: none;
    }
    .login-form-panel {
        padding: 1.75rem 1.5rem;
    }
    .login-title {
        font-size: 1.4rem;
    }
}
