:root {
    --primary: #1a237e; 
    --primary-blue: #1e88e5;  
    --accent: #3949ab;  
    --glow: #00d2ff;    
    --bg: #f4f7fe;     
    --white: #ffffff;
    --text-light: #64748b;
}

/* --- RESET Y ESTILOS BASE --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', sans-serif; 
}

body {
    background: var(--bg);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- CONTENEDOR PRINCIPAL --- */
.login-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    height: 600px;
    background: var(--white);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    margin: 20px;
}

/* --- PANEL IZQUIERDO --- */
.login-side-image {
    flex: 1.2;
    /* Degradado radial */
    background: radial-gradient(circle at center, #2e5bff 0%, #1a237e 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    padding: 40px;
    text-align: center;
    overflow: hidden;
}

/* Brillo celeste decorativo superior */
.login-side-image::before {
    content: '';
    position: absolute;
    top: 10%; right: 15%;
    width: 180px; height: 180px;
    background: var(--glow);
    filter: blur(90px);
    opacity: 0.5;
    border-radius: 50%;
}

.side-content {
    position: relative;
    z-index: 2;
}

/* Ilustración principal flotante */
.qr-illustration {
    font-size: 180px;
    margin-bottom: 20px;
    color: var(--white);
    filter: drop-shadow(0 0 25px rgba(0, 210, 255, 0.6));
    animation: float 4s ease-in-out infinite;
}

/* Animación de flotado  */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.side-content h2 { font-size: 32px; margin-bottom: 15px; font-weight: 700; }
.side-content p { opacity: 0.8; font-weight: 300; line-height: 1.6; max-width: 400px; }

/* --- MINI LOGO INFERIOR IZQUIERDO --- */
.mini-logo {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
    opacity: 0.9;
}

.mini-logo-icon {
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.mini-logo span {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.5px;
}

/* --- PANEL DERECHO --- */
.login-side-form {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Encabezado del formulario centrado */
.form-header { 
    text-align: center;
    margin-bottom: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo superior del formulario */
.form-logo {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin-bottom: 15px;
    box-shadow: 0 10px 20px rgba(26, 35, 126, 0.2);
}

.form-header h1 { font-size: 28px; color: var(--primary); font-weight: 800; }
.form-header p { color: #888; margin-top: 5px; font-size: 15px; }

/* --- ESTILOS DE INPUTS --- */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
    font-size: 20px;
    transition: 0.3s;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 48px;
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    border-radius: 15px;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 10px 20px -5px rgba(26, 35, 126, 0.1);
}

.input-group input:focus + i { color: var(--accent); }

/* --- BOTÓN DE ACCESO --- */
.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(26, 35, 126, 0.2);
    margin-top: 10px;
}

.btn-login:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(26, 35, 126, 0.3);
}

/* Recordarme / Olvidé contraseña */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    cursor: pointer;
}

.remember-me input {
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* footer */

.login-footer {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* --- ALERTAS DE ERROR --- */
.alert {
    background: #fff5f5;
    color: #e53e3e;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    border-left: 4px solid #e53e3e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- RESPONSIVO --- */
@media (max-width: 850px) {
    .login-side-image { display: none; } /* Oculta panel azul en móviles */
    .login-container { max-width: 450px; height: auto; }
    .login-side-form { padding: 40px 30px; } /* Reduce el padding para pantallas pequeñas */

    .form-options { flex-direction: column; align-items: center; gap: 16px; width: 100%; text-align: center; }
    .remember-me, .forgot-password { width: 100%; justify-content: center; }
}

/* Ajuste para que el texto de las alertas */
.swal2-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    font-size: 1.5rem !important;
    color: #444 !important;
}
.swal2-popup {
    border-radius: 25px !important;
}
.swal2-styled.swal2-confirm {
    border-radius: 12px !important;
    font-weight: 600;
}