/* =============================================================
   LOGIN.CSS - Página de inicio de sesión (escritorio)
   Sistema de Gestión Financiera San Miguel S.A.
   ============================================================= */

body.login-page,
body {
    background: linear-gradient(135deg, #1e3a8a 0%, #20b2aa 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    max-width: 920px;
    width: 100%;
    margin: 2rem;
}

/* Panel izquierdo - informativo */
.login-left {
    background: linear-gradient(145deg, #1e3a8a, #20b2aa);
    color: #ffffff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-left h2,
.login-left h4 {
    color: #ffffff;
    font-weight: 700;
}

/* Panel derecho - formulario */
.login-right {
    padding: 3rem 2.5rem;
    background-color: #ffffff;
}

/* Logo circular */
.company-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

/* Campos flotantes */
.form-floating {
    margin-bottom: 1.5rem;
}

.form-floating .form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem 0.75rem;
    height: auto;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-floating .form-control:focus {
    border-color: #20b2aa;
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.15);
}

/* Botón de login */
.btn-login {
    background: linear-gradient(135deg, #1e3a8a, #20b2aa);
    border: none;
    border-radius: 10px;
    padding: 0.8rem 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: #ffffff !important;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(30, 58, 138, 0.3);
    color: #ffffff !important;
}

/* Divisor */
.divider {
    position: relative;
    text-align: center;
    margin: 1.8rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: #dee2e6;
}

.divider span {
    background: #ffffff;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.88rem;
    position: relative;
}

/* Botones sociales */
.social-login {
    display: flex;
    gap: 0.75rem;
}

.btn-social {
    flex: 1;
    padding: 0.7rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: #ffffff;
    color: #6c757d;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn-social:hover {
    border-color: #20b2aa;
    color: #20b2aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.2);
}

/* Características de seguridad */
.security-features {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.security-features h6 {
    color: #ffffff;
    font-weight: 700;
}

.security-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.security-item:last-child { margin-bottom: 0; }
.security-item i { margin-right: 0.75rem; width: 20px; opacity: 0.9; }

/* Botón móvil toggle */
.mobile-login-toggle {
    display: none;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #1e3a8a, #20b2aa);
    border: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

/* Alerta de éxito */
.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

/* Responsive */
@media (max-width: 992px) {
    .login-container { max-width: 95%; }
}

@media (max-width: 768px) {
    .login-container {
        margin: 1rem;
        border-radius: 16px;
    }

    .login-left {
        padding: 2rem 1.5rem;
    }

    .login-right {
        padding: 2rem 1.5rem;
    }

    .company-logo {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .mobile-login-toggle { display: block; }

    .login-right { display: none; }
    .login-right.show { display: block; }
    .login-left.hide  { display: none; }
}

/* Mejoras de apariencia modernas */
.login-container {
    animation: slideUp 0.5s ease forwards;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Contador de intentos fallidos */
#lockoutBar {
    display: none;
    font-size: 0.83rem;
}

/* Toggle de contraseña */
.password-wrapper {
    position: relative;
}
.password-wrapper .form-floating { margin-bottom: 0; }
.btn-toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    z-index: 10;
    padding: 4px 6px;
    font-size: 0.95rem;
    line-height: 1;
}
.btn-toggle-pass:hover { color: #20b2aa; }

/* Icono de estado en campos */
.form-floating .form-control.is-valid  { border-color: #20b2aa; padding-right: 2.5rem; }
.form-floating .form-control.is-invalid { border-color: #dc3545; padding-right: 2.5rem; }

/* Alerta inline del formulario */
#loginAlert {
    display: none;
    border-radius: 10px;
    font-size: 0.9rem;
}

/* Info strip */
.info-strip {
    font-size: 0.82rem;
    color: #6c757d;
    text-align: center;
    margin-top: 1.2rem;
}
.info-strip a {
    color: #20b2aa;
    text-decoration: none;
}
.info-strip a:hover { text-decoration: underline; }

/* Pie de seguridad */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: #adb5bd;
    margin-top: 1rem;
}
.security-badge i { color: #20b2aa; }
