
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f4f8; /* Un fondo suave para centrar el login */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

/* --- Contenedor Principal --- */
.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 100%;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Para mantener los bordes redondeados */
}

/* --- Panel de Bienvenida (Izquierda) --- */
.welcome-panel {
    background: linear-gradient(135deg, #0072ff, #003a9b);
    color: #ffffff;
    padding: 4rem;
    position: relative; /* Para los círculos decorativos */
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.welcome-content {
    position: relative;
    z-index: 2;
}

.welcome-panel h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.welcome-panel h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.welcome-panel p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Círculos decorativos */
.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 114, 255, 0.8); /* Un azul más claro y sólido */
    z-index: 1;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -80px;
    right: -50px;
}

/* --- Panel de Formulario (Derecha) --- */
.form-panel {
    padding: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-content {
    max-width: 350px;
    width: 100%;
}

.form-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.form-content .subtitle {
    font-size: 1rem;
    color: #718096;
    margin-bottom: 2rem;
}

/* Grupo de Inputs (con icono) */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    pointer-events: none; /* Para que no interfiera con el clic en el input */
}

.input-group input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem; /* Espacio para el icono */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f7fafc;
    font-size: 1rem;
    color: #2d3748;
}

.input-group input::placeholder {
    color: #a0aec0;
}

/* Botón para mostrar/ocultar contraseña */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #4a5568;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Opciones (Remember me / Forgot) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    color: #4a5568;
}

.remember-me input[type="checkbox"] {
    margin-right: 0.5rem;
}

.forgot-password {
    color: #0072ff;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Botones */
.btn {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: #0072ff;
    color: white;
}

.btn-primary:hover {
    background-color: #005bb5;
}

.btn-secondary {
    background-color: #ffffff;
    color: #2d3748;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background-color: #f7fafc;
}

/* Divisor "Or" */
.divider {
    text-align: center;
    color: #a0aec0;
    font-size: 0.8rem;
    margin: 1.5rem 0;
    text-transform: uppercase;
}

/* Link de Sign up */
.signup-link {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #718096;
}

.signup-link a {
    color: #0072ff;
    text-decoration: none;
    font-weight: 500;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* --- Diseño Responsivo --- */

/* Tablets y móviles grandes */
@media (max-width: 900px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 1rem;
    }

    /* Ocultamos el panel de bienvenida en pantallas más pequeñas
       para priorizar el formulario */
    .welcome-panel {
        display: none;
    }

    .form-panel {
        padding: 3rem;
    }
}

/* Móviles pequeños */
@media (max-width: 500px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .login-container {
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
        min-height: 100vh;
    }

    .form-panel {
        padding: 2rem;
    }

    .form-content h2 {
        font-size: 2rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}


/* Variables Material Design 3 */
:root {
    --md-sys-color-primary: #005ac1; /* Azul profesional */
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-surface-variant: #e1e2ec;
    --md-sys-transition: cubic-bezier(0.2, 0.0, 0, 1.0); /* Standard Easing */
}

/* Contenedor relativo para manejar las vistas */
.form-content {
    position: relative;
    overflow: hidden; /* Evita scroll durante la animación */
    min-height: 400px; /* Altura mínima para evitar saltos */
}

/* Clases de las Vistas */
.auth-view {
    transition: transform 0.4s var(--md-sys-transition), opacity 0.3s var(--md-sys-transition);
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(30px); /* Estado inicial oculto */
}

/* Vista Activa */
.auth-view.active {
    position: relative; /* Vuelve al flujo normal */
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
}

/* Estado cuando la vista sale */
.auth-view.hidden-left {
    transform: translateX(-30px);
    opacity: 0;
    position: absolute;
}

/* Botón de texto estilo MD3 */
.btn-text {
    background: none;
    border: none;
    color: var(--md-sys-color-primary);
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    margin-top: 10px;
}

.btn-text:hover {
    text-decoration: underline;
}

/* Ajuste para el texto descriptivo */
.recovery-text {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
