/* /assets/css/login_split.css (Versión Final con Diseño Móvil Premium) */

:root {
    --primary-color: #005f73;
    --accent-color: #FF8C00;
    --dark-bg: #212529;
    --light-bg: #f8f9fa;
    --text-light: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body, html { height: 100%; font-family: 'Poppins', sans-serif; overflow-x: hidden; }

/* --- PRELOADER --- */
#preloader { position: fixed; width: 100%; height: 100%; background: white; display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 1; transition: opacity 0.5s ease-out; }
.typing { font-size: 3rem; font-weight: 700; color: var(--accent-color); border-right: 4px solid var(--primary-color); animation: blinkCursor 0.75s step-end infinite; }
@keyframes blinkCursor { from, to { border-color: transparent; } 50% { border-color: var(--primary-color); } }

/* --- DISEÑO DE ESCRITORIO (PANTALLA DIVIDIDA) --- */
.split-container { display: flex; height: 100vh; }
.info-side { flex: 1; background-color: var(--dark-bg); display: flex; align-items: center; justify-content: center; position: relative; color: var(--text-light); padding: 2rem; }
#particles-js { position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 1; }
.welcome-text { text-align: center; z-index: 2; animation: fadeIn 1.5s ease-in-out; }
.info-logo { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--accent-color); margin-bottom: 1.5rem; }
.welcome-text h1 { font-size: 2.8rem; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.5); color: var(--accent-color); }
.welcome-text p { font-size: 1.2rem; margin-top: 0.5rem; opacity: 0.9; }
.form-side { flex-basis: 480px; background-color: var(--light-bg); display: flex; align-items: center; justify-content: center; padding: 2rem; }
.login-card { width: 100%; max-width: 380px; animation: slideInFromRight 1s ease-out forwards; background: #fff; padding: 2.5rem 3rem; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.05); border: 1px solid #e9ecef; }
@keyframes slideInFromRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
.login-header { text-align: center; margin-bottom: 2.5rem; }
.login-header h2 { font-size: 2.2rem; color: var(--primary-color); font-weight: 600; }
.login-header p { color: #666; }
.mobile-logo { display: none; } /* Oculto en escritorio */

/* --- ESTILOS DE FORMULARIO (PARA AMBAS VISTAS) --- */
.input-group { position: relative; margin-bottom: 2.5rem; }
.input-group i.fas { position: absolute; left: 0; top: 10px; color: #ccc; transition: color 0.3s ease; }
.input-group input { width: 100%; padding: 10px 0 10px 35px; border: none; border-bottom: 2px solid #ccc; background: transparent; font-size: 1rem; font-family: 'Poppins', sans-serif; outline: none; position: relative; z-index: 2; }
.input-group label { position: absolute; top: 10px; left: 35px; color: #999; pointer-events: none; transition: all 0.2s ease-out; z-index: 1; }
.input-group input:focus, .input-group input:not(:placeholder-shown) { border-bottom-color: var(--accent-color); }
.input-group input:focus + label, .input-group input:not(:placeholder-shown) + label { transform: translateY(-24px); font-size: 0.8rem; color: var(--accent-color); }
.input-group input:focus ~ i.fas { color: var(--accent-color); }
.password-toggle { position: absolute; right: 5px; top: 10px; cursor: pointer; color: #aaa; z-index: 3; }
.btn-login { width: 100%; padding: 1rem; border: none; border-radius: 8px; background: linear-gradient(45deg, var(--accent-color), #fca311); color: white; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease-in-out; position: relative; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); }
.btn-login:hover:not(:disabled) { transform: translateY(-4px) scale(1.02); box-shadow: 0 10px 20px rgba(255, 140, 0, 0.4); }
.btn-login:active:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 10px rgba(255, 140, 0, 0.4); }
.btn-login.loading .btn-text { opacity: 0; }
.btn-login .spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; position: absolute; top: 50%; left: 50%; margin-top: -10px; margin-left: -10px; opacity: 0; }
.btn-login.loading .spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { padding: 0.8rem 1rem; margin-bottom: 1.5rem; border-radius: 8px; font-size: 0.9rem; text-align: center; }
.alert-danger { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* =================================================================== */
/* ===== DISEÑO RESPONSIVO PARA MÓVILES (MENOS DE 900px) ===== */
/* =================================================================== */
@media (max-width: 900px) {
    .split-container {
        flex-direction: column;
    }

    /* Ocultamos el texto de bienvenida de la versión de escritorio */
    .info-side .welcome-text {
        display: none;
    }

    /* La animación ahora es un fondo de pantalla completa */
    .info-side {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        z-index: 1;
    }

    .form-side {
        position: relative;
        z-index: 2;
        background-color: transparent; /* Permite ver la animación de fondo */
        width: 100%;
        min-height: 100vh;
        padding: 20px;
        flex-basis: auto;
    }

    /* El efecto "Cristal Esmerilado" para la tarjeta de login */
    .login-card {
        background: rgba(10, 10, 10, 0.35);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
        padding: 2rem;
        margin: auto; /* Centra la tarjeta */
        animation: fadeIn 1s ease-out; /* Animación de entrada suave */
    }

    /* Mostramos el logo específico para móviles */
    .mobile-logo {
        display: block;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        border: 2px solid var(--accent-color);
        margin: 0 auto 1.5rem; /* Centra el logo */
    }

    /* Ajustamos los colores del texto para que contrasten con el fondo oscuro */
    .login-header h2, .login-header p, .input-group label {
        color: var(--text-light);
    }
    .login-header p {
        opacity: 0.8;
    }

    /* Ajustamos los colores de los inputs */
    .input-group input {
        color: var(--text-light);
        border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    }
    .input-group i.fas, .password-toggle {
        color: rgba(255, 255, 255, 0.7);
    }
}