/* =========================================================
   DISEÑO SPLIT-SCREEN SAAS (ULTRA PREMIUM)
   ========================================================= */
.auth-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-base);
    font-family: var(--font-body);
}

.auth-main {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* =========================================================
   LADO IZQUIERDO: BRANDING INMERSIVO Y ANIMADO
   ========================================================= */
.auth-brand-side {
    flex: 1.2;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-12) var(--space-16);
    overflow: hidden;
}

.auth-brand-bg {
    position: absolute;
    top: -5%; left: -5%; right: -5%; bottom: -5%; 
    background-image: url('https://images.unsplash.com/photo-1566073771259-6a8506099945?q=80&w=2070&auto=format&fit=crop'); 
    background-size: cover;
    background-position: center;
    z-index: 1;
    animation: kenBurns 20s ease-in-out infinite alternate;
}

@keyframes kenBurns {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.05) translate(-1%, -1%); }
}

/* Filtro oscuro base */
.auth-brand-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 2;
}

/* Tinte dinámico que reacciona al selector de temas */
.auth-brand-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, var(--accent-primary) 100%);
    opacity: 0.35; 
    z-index: 3;
}

/* Alineación forzada a la izquierda */
.auth-brand-content {
    position: relative;
    z-index: 4; /* Por encima de los filtros */
    max-width: 650px;
    text-align: left;
}

/* =========================================================
   NUEVO: CEJA DE MARCA (LOGO + BADGE ALINEADOS)
   ========================================================= */
.auth-brand-eyebrow {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

/* La caja ancla para el logo */
.auth-logo-box {
    display: flex; 
    align-items: center;
    justify-content: center;
    width: 80px; 
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    flex-shrink: 0; /* Evita que el contenedor lo aplaste */
}

/* 🚀 FIX: Estilos separados para la imagen real del Hotel */
.auth-brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    padding: 6px;
    box-sizing: border-box;
}

/* El SVG por defecto (cuando no han subido logo) */
.auth-brand-logo-svg {
    max-height: 44px; 
    max-width: 44px;
    display: block;
    margin-bottom: 0;
    color: var(--accent-primary); /* Se tiñe con el tema */
}

/* Badge limpio sin márgenes (controlado por el gap del eyebrow) */
.auth-badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--accent-primary);
    color: var(--text-inverse, #ffffff);
    border: none;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.auth-brand-title {
    font-family: var(--font-display);
    font-size: 3.8rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 var(--space-4) 0;
    line-height: 1.1;
    letter-spacing: -1.5px;
    text-shadow: 0 4px 16px rgba(0,0,0,0.8);
}

.auth-brand-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

/* =========================================================
   LADO DERECHO: FORMULARIO LIMPIO
   ========================================================= */
.auth-form-side {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-12) var(--space-10);
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* SELECTOR DE TEMAS (Alineado a la derecha, arriba de la línea) */
.auth-theme-selector {
    display: flex;
    justify-content: flex-end; 
    gap: 12px;
    margin-bottom: var(--space-8);
}

.theme-dot-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    padding: 0;
}

.theme-dot-btn:hover {
    transform: scale(1.2);
}

.theme-dot-btn.active {
    border-color: var(--text-primary);
    transform: scale(1.2);
    box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--text-primary);
}

/* Colores de tus temas de Roomora OS */
.theme-dot-nebula { background-color: #0ea5e9; } 
.theme-dot-aurora { background-color: #d946ef; } 
.theme-dot-titanium { background-color: #f59e0b; } 
.theme-dot-polar { background-color: #3b82f6; } 

/* Contenedor del Título */
.auth-header {
    margin-bottom: var(--space-8);
}

/* Línea de acento atada DIRECTAMENTE al título */
.auth-title {
    position: relative;
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--text-primary);
    margin: var(--space-4) 0 var(--space-2) 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.auth-title::before {
    content: '';
    position: absolute;
    top: -20px; 
    left: 0;
    width: 40px;
    height: 4px;
    background-color: var(--accent-primary);
    border-radius: 2px;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =========================================================
   INPUTS Y BOTONES
   ========================================================= */
.auth-input-group { margin-bottom: var(--space-5); }
.auth-label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); margin-bottom: var(--space-2); text-transform: uppercase; letter-spacing: 0.5px; }
.auth-input-wrapper { position: relative; display: flex; align-items: center; }
.auth-input-wrapper svg { position: absolute; left: 16px; color: var(--text-secondary); width: 20px; height: 20px; transition: var(--transition-base); }
.auth-input { width: 100%; padding: 16px 16px 16px 48px; background-color: var(--bg-base); border: 1px solid var(--border-default); border-radius: var(--radius-md); color: var(--text-primary); font-family: var(--font-body); font-size: 1rem; transition: var(--transition-base); box-sizing: border-box; }
.auth-input:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15); }
.auth-input:focus + svg { color: var(--accent-primary); }

.auth-btn { width: 100%; padding: 16px; background-color: var(--accent-primary); color: var(--text-inverse, #ffffff); border: none; border-radius: var(--radius-md); font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; cursor: pointer; transition: var(--transition-base); display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: var(--space-6); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.auth-btn:hover { background-color: var(--accent-secondary); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.auth-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }

/* =========================================================
   🚀 RESPONSIVIDAD: ESTILO NATIVE APP (BOTTOM SHEET)
   ========================================================= */
@media (max-width: 900px) {
    /* 1. FIX DE SCROLL: Liberamos la altura para que se pueda deslizar en móvil */
    .auth-body {
        overflow-y: auto !important; 
    }

    .auth-main {
        flex-direction: column; 
        height: auto !important; 
        min-height: 100vh;
    }

    /* La imagen se convierte en la cabecera de la App */
    .auth-brand-side {
        flex: none;
        height: 38vh; 
        padding: var(--space-6);
        align-items: center;
        text-align: center;
    }

    .auth-brand-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: var(--space-4);
    }

    /* Ocultamos textos pesados para mantener el móvil limpio */
    .auth-brand-subtitle, .auth-badge {
        display: none; 
    }
    
    /* Centramos la ceja visual en móviles */
    .auth-brand-eyebrow {
        justify-content: center;
        margin-bottom: var(--space-3);
    }

    .auth-logo-box {
        width: 64px;
        height: 64px;
        margin-bottom: 0;
    }

    /* En móvil hereda el 100% del contenedor padre (64px) */
    .auth-brand-logo-svg {
        max-height: 36px;
        max-width: 36px;
    }

    .auth-brand-title {
        font-size: 2.2rem;
    }

    /* 2. FIX DE ESPACIADO: El formulario sube como hoja, con padding extra abajo */
    .auth-form-side {
        flex: 1; 
        max-width: 100%;
        margin-top: -30px; 
        border-radius: 30px 30px 0 0; 
        /* Añadimos var(--space-12) de padding inferior para que el botón de WhatsApp no tape nada */
        padding: var(--space-8) var(--space-6) var(--space-12) var(--space-6);
        box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    }

    /* Centramos el contenido de la derecha para móvil */
    .auth-theme-selector {
        justify-content: center;
    }

    .auth-header {
        text-align: center;
    }

    .auth-title::before {
        left: 50%;
        transform: translateX(-50%); 
    }
    
    /* 3. UNIFICACIÓN WHATSAPP: Metemos los estilos móviles aquí adentro */
    .floating-whatsapp { 
        bottom: 20px; 
        right: 20px; 
        padding: 12px; 
    }
    .floating-whatsapp span { 
        display: none; /* En celular solo dejamos el ícono */
    }
}

/* =========================================================
   MÓDULO DEMO Y WHATSAPP (Se inyectan dinámicamente)
   ========================================================= */
.demo-quick-access {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-subtle);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.demo-qa-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.demo-qa-title svg { width: 16px; height: 16px; color: #f59e0b; }

.demo-qa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-demo-role {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-demo-role:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

/* WhatsApp Flotante Escritorio */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    text-decoration: none !important;
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.floating-whatsapp:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
    color: #ffffff;
}