﻿/* --- Variables de Color (actualizadas para coincidir con la imagen) --- */
:root {
    --bg-page: #121010; /* Púrpura base de la página */
    --card-visual: #4a1bb8; /* Púrpura más oscuro del panel visual */
    --card-form: #ffffff;
    --accent-purple-deep: #1B0E40;
    --accent-purple-light: #1B0E40;
    --accent-magenta: #e91e63; /* Magenta para el glow */
    --text-white: #ffffff;
    --text-dark: #333333;
    --border-clean: #e0e0e0;
    --moon-color: #ffca28; /* Amarillo luna */
}

.login-page-wrapper {
    background-color: var(--bg-page);
    background: linear-gradient(135deg, var(--bg-page) 0%, var(--accent-purple-light) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

/* --- CONTENEDOR DE TARJETA (SPLIT LAYOUT) --- */
.login-card-container {
    width: 100%;
    max-width: 900px; /* Más ancha para el split */
    height: 600px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    display: flex; /* DIVIDIR EN DOS */
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .login-card-container:hover {
        transform: translateY(-5px); /* Sutil efecto de levitación al pasar el mouse */
        box-shadow: 0 35px 70px rgba(0,0,0,0.4);
    }

/* --- PANEL IZQUIERDO VISUAL ANIMADO --- */
.login-visual-panel {
    flex: 1; /* Mitad de la tarjeta */
    background-color: var(--card-visual);
    position: relative;
    overflow: hidden;
    color: var(--text-white);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Alinear texto al fondo */
}

/* Contenedor principal de la escena nocturna CSS */
.visual-scene-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
    .visual-scene-container::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 30%;
        background: linear-gradient(to top, rgba(13, 10, 51, 0.8) 0%, transparent 100%);
        z-index: 4;
        pointer-events: none;
    }
/* Capas CSS de la escena con profundidad multicapa */
.sky-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Degradado más dinámico para que la base sea más clara */
    background: linear-gradient(to bottom, #151147 0%, #211c6d 60%, #3d34a5 100%);
    box-shadow: inset 0 0 100px rgba(0,0,0,0.4);
}

.moon {
    position: absolute;
    top: 15%; /* Un poco más arriba */
    left: 25%;
    width: 85px; /* Ligeramente más grande */
    height: 85px;
    background: radial-gradient(circle at 30% 30%, #ffeb3b, #ffca28);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 202, 40, 0.6), 0 0 80px rgba(255, 202, 40, 0.2);
    animation: pulseMoon 6s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulseMoon {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 40px rgba(255, 202, 40, 0.7);
    }

    50% {
        transform: scale(1.05);
        opacity: 0.85;
        box-shadow: 0 0 60px rgba(255, 202, 40, 0.9);
    }
}

/* ANIMACIÓN DE ESTRELLAS FUGACES */
.shooting-stars::before, .shooting-stars::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 2px;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0) 100%);
    border-radius: 2px;
    opacity: 0;
    animation: shootingStar 15s linear infinite;
}

.shooting-stars::before {
    top: 10%;
    left: 100%;
    animation-delay: 2s;
}

.shooting-stars::after {
    top: 35%;
    left: 100%;
    width: 100px;
    animation-delay: 8s;
}

@keyframes shootingStar {
    0% {
        transform: translateX(0) translateY(0) rotate(-35deg);
        opacity: 0;
    }

    1% {
        opacity: 1;
    }

    5% {
        opacity: 0;
    }

    20% {
        transform: translateX(-1500px) translateY(800px) rotate(-35deg);
        opacity: 0;
    }

    100% {
        transform: translateX(-1500px) translateY(800px) rotate(-35deg);
        opacity: 0;
    }
}

.mountains {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%; /* Altura reducida para que no tape todo */
    z-index: 2;
    background: #1a165a;
    /* Crea siluetas de picos perfectas */
    clip-path: polygon(0% 100%, 0% 80%, 15% 65%, 35% 85%, 55% 55%, 75% 80%, 100% 60%, 100% 100%);
    opacity: 0.9;
}

    /* Montaña delantera para dar profundidad */
    .mountains::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #0d0a33;
        clip-path: polygon(0% 100%, 10% 85%, 30% 70%, 50% 90%, 80% 65%, 100% 85%, 100% 100%);
    }

.clouds {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        radial-gradient(ellipse at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 20%),
        radial-gradient(ellipse at 80% 40%, rgba(255,255,255,0.08) 0%, transparent 30%),
        radial-gradient(ellipse at 50% 10%, rgba(255,255,255,0.05) 0%, transparent 40%);
    filter: blur(10px);
    left: 0;
    width: 100%;
    height: 100%;
}

.trees {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 3;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 20px;
    background: linear-gradient(to top, #05041a 40%, transparent); /* Suelo del bosque */
}

    /* Crear pinos usando pseudoelementos (más limpio que gradientes) */
    .trees::before, .trees::after {
        content: '▲ ▲   ▲ ▲ ▲';
        font-size: 30px;
        color: #05041a;
        letter-spacing: 15px;
        filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
    }

/* Superposición de texto sobre la escena */
.visual-text-overlay {
    position: relative;
    z-index: 5;
    text-align: center;
}

.rz-color-white-opacity {
    color: rgba(255,255,255,0.7) !important;
}

.footer-instruction, .footer-tip {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

.footer-tip {
    font-size: 0.65rem;
    opacity: 0.5 !important;
    margin-bottom: 0;
}

/* --- CUERPO DEL FORMULARIO LIMPIO Y REACTIVO --- */
.login-form-body {
    flex: 1; /* Mitad de la tarjeta */
    padding: 80px 70px; /* Más padding vertical */
    background: var(--card-form);
    display: flex;
    flex-direction: column;
}

.welcome-text {
    letter-spacing: 2px;
    font-weight: 300;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: rgba(0,0,0,0.4) !important;
}

.website-title {
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-purple-deep);
}

.form-instruction {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 400;
}

/* --- INPUTS LIMPIOS (Solo borde inferior) --- */
.input-container {
    position: relative;
    margin-bottom: 25px;
}

.custom-radzen-label {
    display: block;
    color: rgba(0,0,0,0.5) !important;
    font-size: 0.75rem !important;
    font-weight: normal !important;
    margin-bottom: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

::deep .custom-radzen-input-clean {
    width: 100% !important;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 2px solid var(--border-clean) !important; /* Estilo de línea */
    border-radius: 0 !important;
    padding: 10px 0 !important; /* Más padding vertical, nada horizontal */
    color: var(--text-dark) !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
}

    /* EFECTO FOCUS REACTIVO (Línea de color y Glow sutil) */
    ::deep .custom-radzen-input-clean:focus-within {
        border-bottom: 2px solid var(--accent-purple-deep) !important;
        box-shadow: none !important;
        background: linear-gradient(90deg, transparent, rgba(156, 39, 176, 0.05)) !important; /* Resplandor muy sutil */
    }

    ::deep .custom-radzen-input-clean input::placeholder {
        color: rgba(0,0,0,0.3) !important;
        font-weight: 300;
    }

/* --- OPCIONES DEL FORMULARIO --- */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-remember {
    color: rgba(0,0,0,0.6) !important;
}

/* Estilizar el Checkbox Radzen */
::deep .rz-checkbox-box {
    border-color: rgba(0,0,0,0.3) !important;
}

::deep .rz-state-focused .rz-checkbox-box {
    box-shadow: 0 0 0 0.2rem rgba(103, 58, 183, 0.2) !important;
}

.forgot-password-link {
    padding: 0 !important;
    text-transform: none !important;
    font-weight: normal !important;
    color: var(--accent-purple-deep) !important;
}

    .forgot-password-link:hover {
        color: var(--accent-purple-light) !important;
        text-decoration: underline !important;
    }

/* --- ALERTAS --- */
::deep .custom-alert {
    border-radius: 8px !important;
    font-size: 0.8rem !important;
}

/* --- BOTÓN SUBMIT (LIMPIO, DE COLOR Y CON GLOW REACTIVO) --- */
.btn-submit-wrapper {
    margin-top: 30px;
}

.btn-submit-clean {
    background-color: var(--accent-purple-deep) !important;
    border: none !important;
    border-radius: 30px !important;
    padding: 12px 60px !important;
    font-weight: bold !important;
    letter-spacing: 1px !important;
    color: white !important;
    width: 100% !important; /* Ancho completo */
    box-shadow: 0 5px 15px rgba(103, 58, 183, 0.3) !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
}

    .btn-submit-clean:hover {
        transform: translateY(-3px) !important; /* Levitación sutil */
        background-color: var(--accent-purple-light) !important;
        box-shadow: 0 10px 25px rgba(233, 30, 99, 0.4) !important; /* Resplandor magenta al hover */
    }

/* --- CREATE ACCOUNT --- */
.create-account-link {
    color: var(--accent-purple-deep) !important;
    font-size: 0.8rem !important;
    text-transform: none !important;
}


/* --- RESPONSIVIDAD --- */

@media (max-width: 768px) {
    /* 1. Cambiamos la tarjeta a vertical */
    .login-card-container {
        flex-direction: column;
        height: auto; /* Permitimos que crezca según el contenido */
        max-width: 95%; /* Un poco de margen a los lados */
        margin: 20px 0;
    }

    /* 2. Ajustamos el panel visual */
    .login-visual-panel {
        height: 250px; /* Reducimos la altura en móvil */
        padding: 30px;
        flex: none; /* Evitamos que intente ocupar el 50% */
    }

    /* 3. Ajustamos el panel del formulario */
    .login-form-body {
        padding: 40px 30px; /* Menos padding en móvil */
        flex: none;
    }

    /* 4. Escala de la luna y montañas para móvil */
    .moon {
        width: 60px;
        height: 60px;
        top: 10%;
        left: 15%;
    }

    .mountains {
        height: 50%; /* Que se vean un poco más altas en el espacio reducido */
    }

    /* 5. Títulos más pequeños para que no rompan el layout */
    .website-title {
        font-size: 1.5rem !important;
    }

    /* 6. Botón de login a ancho completo */
    .btn-submit-clean {
        padding: 12px 20px !important;
    }
}

/* Ajuste para pantallas muy pequeñas (celulares mini) */
@media (max-width: 480px) {
    .login-visual-panel {
        height: 180px; /* Aún más pequeño */
    }

    .form-options {
        flex-direction: column; /* Apilamos 'Remember me' y 'Olvide contraseña' */
        align-items: flex-start;
        gap: 15px;
    }
}