/* --- Estilos Generales y Fondo --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0c0c20; /* Un azul un poco más oscuro */
    color: #E5E7EB;
    overflow: hidden; /* Evita barras de scroll por los elementos decorativos */
}

/* --- Contenedor Principal de Dos Columnas --- */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* --- Columna Izquierda (Branding) --- */
.auth-branding {
    width: 45%;
    background-color: #10102c;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 102, 255, 0.2), transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(0, 102, 255, 0.2), transparent 50%);
}


.branding-logo {
    width: 140px;
    height: 140px;
    margin-bottom: 40px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 8px 32px rgba(0,102,255,0.18), 0 2px 8px rgba(0,0,0,0.12);
    border-radius: 32px;
    background: rgba(0,102,255,0.04);
    transition: transform 0.3s cubic-bezier(.4,2,.6,1), box-shadow 0.3s;
}

.branding-logo.login-impact-logo {
    width: 180px;
    height: 180px;
    margin-bottom: 48px;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    animation: logoPop 1.1s cubic-bezier(.4,2,.6,1);
}

@keyframes logoPop {
    0% { transform: scale(0.7) rotate(-10deg); opacity: 0; }
    60% { transform: scale(1.15) rotate(4deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); }
}

.branding-title {
    font-size: 36px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 16px;
    line-height: 1.3;
}

.branding-subtitle {
    font-size: 18px;
    color: #a0a0b8;
    max-width: 480px;
    line-height: 1.6;
    word-wrap: break-word;
    hyphens: none;
}

/* --- Columna Derecha (Formulario) --- */
.auth-form-container {
    width: 55%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    animation: fadeIn 0.8s ease-in-out;
    position: relative;
    z-index: 10;
}

.auth-form-card .form-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 1rem;
}

.auth-form-card > .form-logo {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Tarjeta del Formulario (Tu .login-container original, ahora llamado .auth-form-card) --- */
.auth-form-card {
    background: rgba(30, 30, 58, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    margin: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* --- Encabezado del Formulario --- */
.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #FFFFFF;
}

.form-subtitle {
    font-size: 16px;
    color: #a0a0b8;
}

/* --- Grupos de Formulario y Campos de Texto --- */
.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: #c0c0d8;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.form-group input {
    width: 100%;
    background-color: rgba(16, 16, 44, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 14px 14px 48px;
    color: #E5E7EB;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: #8b8b9c;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(0, 102, 255, 0.6);
    background-color: #10102c;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b8b9c;
    transition: color 0.3s ease;
}

.form-group input:focus + .input-icon {
    color: #0066ff;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #8b8b9c;
    font-size: 16px;
}

/* --- Botón Principal --- */
.btn-submit {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(90deg, #0066ff, #0052cc);
    transition: all 0.3s ease;
    margin-top: 16px;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.2);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

/* --- Pie de Página del Formulario --- */
.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #a0a0b8;
}

.form-footer a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* --- Fila "Recordarme" --- */
.remember-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

/* --- Enlace "Volver" --- */
.back-link {
    display: block;
    text-align: center;
    margin-top: 24px;
    color: #a0a0b8;
    text-decoration: none;
    font-size: 14px;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    body {
        overflow-y: auto;
    }

    .auth-wrapper {
        display: block;
    }

    .auth-branding {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        display: block;
        background-color: #10102c;
        background-image:
            radial-gradient(circle at 10% 20%, rgba(0, 102, 255, 0.2), transparent 50%),
            radial-gradient(circle at 90% 80%, rgba(0, 102, 255, 0.2), transparent 50%);
        pointer-events: none;
        z-index: 0;
    }

    .auth-branding > *:not(#particles-js) {
        display: none;
    }

    .auth-form-card > .form-logo {
        display: block;
    }

    .auth-form-container {
        width: 100%;
        min-height: 100vh;
        padding: 1rem;
    }
}

/* Fondo animado de nodos (particles.js) y efectos visuales */
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.auth-branding {
    z-index: 2;
}

.auth-branding > *:not(#particles-js) {
    position: relative;
    z-index: 3;
}

.auth-form-container, .auth-form-card {
    position: relative;
    z-index: 10;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 80% 10%, rgba(0,102,255,0.08), transparent 60%),
                radial-gradient(circle at 10% 90%, rgba(0,102,255,0.08), transparent 60%);
    z-index: 0;
    pointer-events: none;
}