:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --primary-accent: #6366f1; /* Indigo-500 */
    --secondary-accent: #a855f7; /* Purple-500 */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
}

.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%; 
    max-width: 100vw;
    overflow-x: hidden;
}

/* Lado Izquierdo - Marketing */
.marketing-section {
    flex: 0 0 55%;
    width: 55%;
    max-width: 55%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 4rem; /* Aire lateral adecuado */
    position: relative;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('../img/marketing-bg.png');
    background-size: cover;
    background-position: center;
}

.carousel-container {
    height: 400px;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    display: flex;
    gap: 2rem;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slide h2 {
    font-size: 2.2rem !important;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: #ffffff;
}

.slide p {
    font-size: 1rem !important;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 480px;
}

/* Sobretítulo tipo píldora (Eyebrow Text) - Compacto */
.eyebrow-text {
    display: inline-block !important;
    width: max-content !important;       /* Abraza solo el texto */
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #818cf8;
    text-transform: uppercase;
    margin-top: 1rem !important;         /* Aire con el icóno superior */
    margin-bottom: 1.5rem !important;    /* Aire con el H2 */
    background: rgba(99, 102, 241, 0.15);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

/* Contenedor de cristal para íconos/Lottie */
.icon-glass-container {
    width: 90px;
    height: 90px;
    margin: 0 auto 0 auto !important;   /* Centrado; el margen inferior lo maneja eyebrow-text */
    background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255,255,255,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon-glass-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px 0 rgba(99, 102, 241, 0.25),
                inset 0 1px 0 rgba(255,255,255,0.08);
}


/* Lado Derecho - Login */
.form-section {
    flex: 0 0 45%;
    width: 45%;
    max-width: 45%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 3%;
    overflow-y: auto;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    padding: 2.5rem; /* Reducido de 3rem */
    width: 100%;
    max-width: 440px; /* Reducido de 480px */
    margin: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.brand {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-mock {
    width: 80px;
    height: 80px;
    background: url('../img/logo.png') no-repeat center center;
    background-size: contain;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    mix-blend-mode: screen; /* Oculta fondo negro del activo generado */
}

.brand h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-accent);
    background-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-group input {
    accent-color: var(--primary-accent);
    width: 18px;
    height: 18px;
}

.link-muted {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.link-muted:hover {
    color: var(--text-main);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: white;
    border: none;
    border-radius: 1rem;
    padding: 1.25rem;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

.btn-submit:active {
    transform: translateY(0);
}

.footer-pill {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pill::before {
    content: '🔒';
    font-size: 0.8rem;
}


/* ─── RESPONSIVE: Prioridad al Login en Móviles y Tablets ─── */
@media (max-width: 1024px) {

    /* El contenedor centra lo que queda (solo el formulario) */
    .login-container {
        justify-content: center;
        align-items: center;
    }

    /* Ocultamos el panel de marketing por completo */
    .marketing-section {
        display: none !important;
    }

    /* El formulario toma el 100% de la pantalla */
    .form-section {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 2rem 1rem;
        /* Anula el overflow-y:auto heredado para que el body controle el scroll */
        overflow-y: visible;
    }

    /* El panel de cristal no se estira demasiado en tablets */
    .glass-panel {
        width: 100%;
        max-width: 450px;
        padding: 2.5rem 1.75rem;
        margin: auto;
    }
}

/* ─── RESPONSIVE: Teléfonos pequeños (≤480px) ─── */
@media (max-width: 480px) {

    body, html {
        /* Permitir scroll vertical en móvil si el teclado empuja el contenido */
        overflow-y: auto !important;
        height: auto !important;
    }

    .form-section {
        padding: 1rem 0.75rem;
        align-items: flex-start; /* El panel arranca desde arriba al abrir el teclado */
    }

    .glass-panel {
        max-width: 100%;
        padding: 2rem 1.25rem;
        border-radius: 1.5rem;
        margin: 1rem auto;
    }

    .logo-font {
        font-size: 1.8rem !important;
    }

    .btn-submit {
        padding: 1rem;
    }
}
