/* =========================================================
   Estilos Novedosos para la Página de Login (Versión Glassmorphism)
   ========================================================= */

:root {
    --primary-color: #3d8bfd;
    --primary-dark: #2979ff;
    --secondary-color: #f1f3f4;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    margin: 0;
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1200px;
    height: 700px;
    background: transparent; 
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: fadeInContainer 0.8s ease-out forwards;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes fadeInContainer {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Panel de Información (Izquierdo) --- */
.info-panel {
    background: rgba(30, 93, 206, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-logo { font-size: 1.5rem; display: flex; align-items: center; gap: 0.75rem; }
.welcome-content { text-align: center; }
.welcome-title { font-size: 2.8rem; font-weight: 700; margin-bottom: 1rem; min-height: 50px; }
.welcome-text { font-size: 1.1rem; opacity: 0.9; max-width: 350px; margin: 0 auto 2rem auto; }

.animated-icon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    font-size: 2.5rem;
    margin-top: 3rem;
}
.animated-icon-grid i { opacity: 0.5; transition: all 0.3s ease; animation: float 4s ease-in-out infinite; }
.animated-icon-grid i:nth-child(2) { animation-delay: 1s; }
.animated-icon-grid i:nth-child(3) { animation-delay: 2s; }
.animated-icon-grid i:nth-child(4) { animation-delay: 3s; }
.animated-icon-grid:hover i { opacity: 1; transform: scale(1.1); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.info-footer { text-align: center; font-size: 0.8rem; opacity: 0.7; }

/* --- Panel de Formulario (Derecho) --- */
.form-panel {
    display: grid;
    place-items: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.form-wrapper { width: 100%; max-width: 400px; }
.form-title { font-weight: 700; font-size: 2.2rem; color: #ffffff; }
.form-subtitle { color: rgba(255, 255, 255, 0.8); margin-bottom: 2.5rem; }

.form-floating > .form-control { border: none; border-bottom: 2px solid rgba(255, 255, 255, 0.3); border-radius: 0; background: transparent; color: #fff; transition: all 0.3s ease; }
.form-floating > .form-control:focus { box-shadow: none; border-color: var(--primary-color); }
.form-floating > label { color: rgba(255, 255, 255, 0.7); transition: all 0.3s ease; }
.form-floating > .form-control:focus ~ label, .form-floating > .form-control:not(:placeholder-shown) ~ label { color: var(--primary-color); transform: scale(.85) translateY(-.8rem) translateX(.15rem); }
.form-control::placeholder { color: rgba(255, 255, 255, 0.5); opacity: 1; }
.form-check-label { color: rgba(255, 255, 255, 0.9); }
.form-check-input { background-color: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.3); }
.form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); }
.text-muted, .text-muted a { color: rgba(255, 255, 255, 0.8) !important; }
.text-muted a:hover { color: #fff !important; }

.btn-login { padding: 0.9rem; font-size: 1.1rem; font-weight: 600; border-radius: 50px; background-color: var(--primary-color); border: none; position: relative; overflow: hidden; transition: all 0.4s ease-in-out; }
.btn-login .btn-text { transition: transform 0.4s ease; display: inline-block; }
.btn-login .btn-icon { position: absolute; top: 50%; right: -30px; transform: translateY(-50%); opacity: 0; transition: all 0.4s ease-in-out; font-size: 1.5rem; }
.btn-login:hover { background-color: var(--primary-dark); box-shadow: 0 10px 20px -10px var(--primary-color); }
.btn-login:hover .btn-text { transform: translateX(-15px); }
.btn-login:hover .btn-icon { right: 20px; opacity: 1; }

/* --- Responsividad --- */
@media (max-width: 992px) {
    .login-container { grid-template-columns: 1fr; height: auto; max-width: 500px; margin: 2rem; border: 1px solid rgba(255, 255, 255, 0.2); }
    .info-panel { display: none; }
    .form-panel { padding: 2rem; border-radius: 1.5rem; }
}

/* =========================================================
   ANIMACIONES SECUENCIALES (Controladas por JS)
   ========================================================= */

/* Estado inicial de los elementos (invisibles) */
#anim-line-1, #anim-line-2, #anim-line-3, #anim-line-4 {
    opacity: 0;
}

/* --- Animación 1: Máquina de Escribir --- */
#anim-line-1.animate {
    opacity: 1;
    overflow: hidden;
    white-space: nowrap;
    border-right: .15em solid white;
    width: auto; /* Dejamos que el JS lo maneje, pero la animación lo sobreescribe */
    animation: typing 1.5s steps(20, end) forwards, blink-caret .75s step-end infinite;
    animation-delay: 0.5s;
}

/* --- Animación 2 y 3: Deslizar hacia arriba --- */
#anim-line-2.animate, #anim-line-3.animate {
    animation: fadeInSlideUp 1s ease-out forwards;
}
#anim-line-2.animate { animation-delay: 0.8s; }
#anim-line-3.animate { animation-delay: 1.1s; }

/* --- Animación 4: Aparecer con Desenfoque --- */
#anim-line-4.animate {
    animation: fadeInBlur 1.2s ease-out forwards;
    animation-delay: 2.2s; /* Inicia cuando termina el typing */
}

/* --- Definición de los Keyframes (no cambian) --- */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: white; }
}
@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInBlur {
    from { opacity: 0; filter: blur(8px); }
    to { opacity: 1; filter: blur(0); }
}