/* 
 * Archivo: frontend/css/auth.css
 * Descripción: Estilos específicos para las pantallas de Login y Registro.
 * Implementa el diseño "Mobile First" y el layout de doble columna en Desktop.
 */

/* =========================================================
   LAYOUT PRINCIPAL
   ========================================================= */
/* El contenedor principal ocupa toda la pantalla */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* La zona de imagen/branding (se oculta en móviles) */
.auth-sidebar {
    display: none; 
}

/* La zona del formulario ocupa el 100% en móvil */
.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    background-color: var(--surface);
}

.auth-form-container {
    width: 100%;
    max-width: 400px; /* Ancho máximo para evitar inputs estirados */
}

/* =========================================================
   ENCABEZADOS
   ========================================================= */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: clamp(1.5rem, 4vw, 1.75rem); /* Texto responsivo */
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* =========================================================
   SELECTOR TIPO DE CLIENTE (PERSONA / EMPRESA)
   ========================================================= */
.client-type-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.client-type-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border);
    background-color: transparent;
    color: var(--text-light);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Estado activo cuando se selecciona una opción */
.client-type-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(0, 76, 151, 0.05); /* Fondo tenue del color primario */
}

.client-type-btn:hover:not(.active) {
    border-color: #d1d5db;
    background-color: #f9fafb;
}

/* =========================================================
   CLASES UTILITARIAS Y FOOTER
   ========================================================= */
.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.auth-footer a {
    font-weight: 600;
    color: var(--primary);
}

/* Ocultar elementos dinámicamente desde JS */
.d-none {
    display: none !important;
}

/* =========================================================
   MEDIA QUERIES (DESKTOP)
   ========================================================= */
/* A partir de 768px (Tablets y Laptops) cambiamos el diseño */
@media (min-width: 768px) {
    .auth-sidebar {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 45%;
        background-color: var(--primary);
        color: white;
        padding: 3rem;
        text-align: center;
    }

    .auth-sidebar-brand h2 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .auth-sidebar-brand p {
        font-size: 1.1rem;
        opacity: 0.9;
    }

    .auth-main {
        width: 55%;
        background-color: var(--background); /* Fondo gris claro */
    }

    /* Le damos estilo de "Tarjeta" blanca flotante al formulario */
    .auth-form-container {
        background-color: var(--surface);
        padding: 2.5rem 3rem;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
        max-width: 450px;
    }
}
