/* 
   ORQUESTADOR GLOBAL DE ESTILOS (styles.css)
   ------------------------------------------
   Punto de entrada único que importa y organiza la jerarquía de estilos.
   Estructura:
   1. Google Fonts: Tipografía Inter.
   2. base.css: Fundamentos y variables.
   3. components.css: Elementos UI reutilizables.
   4. modules.css: Lógica visual operativa.
   5. Fixes Locales: Ajustes específicos de Layout y Responsive.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* === IMPORTACIÓN DE HOJAS DE ESTILO === */

@import 'base.css';
/* Variables, Reset y Tipografía */
@import 'components.css';
/* Botones, Tarjetas, Menús, Inputs */
@import 'modules.css';
/* Estilos específicos de cada módulo (Caja, Riu, Notas...) */
/* @import 'print.css'; -- MOVIDO A INDEX.HTML PARA CONTROLAR CACHE */

/* FIX CRÍTICO: Layout Margins Override */
/* (Eliminado para restaurar comportamiento estándar) */
/* SALVAGUARDA: Forzar comportamiento de contenedor Bootstrap */
/* === HOTELS & INDICATORS === */
.hotel-info-pill {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 24px;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.hotel-info-pill:hover {
    background: rgba(255, 255, 255, 0.65);
    transform: scale(1.03) translateY(-3px);
    box-shadow: 0 15px 35px rgba(31, 38, 135, 0.12);
    border-color: rgba(255, 255, 255, 0.8);
}

#hotel-logo {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.hotel-info-pill:hover #hotel-logo {
    transform: scale(1.1);
}

#hotel-name {
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #344767 0%, #1e293b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hotel-indicator {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* FIX: Se aplica directamente al ID para vencer especificidad */
#app-layout {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    width: 100% !important;
}

@media screen {
    /* FIX: Navbar Layout with Stacking Context */
    #navbar-container {
        position: relative;
        z-index: 5000 !important; /* Stand above module content but behind modales (10500+) */
    }
}


/* FIX: Tooltip Stacking & Styling for Nav */
.custom-tooltip {
    /* Ensure the span behaves like a block container for events/positioning */
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* Clases generadas por Bootstrap */
.tooltip {
    z-index: 10700 !important;
}

/* FIX: Ensure Dropdowns are ALWAYS on top */
.dropdown-menu {
    z-index: 1060 !important;
    position: absolute !important; /* Force standard positioning */
    /* Ensure it's not clipped */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
}

.custom-nav-tooltip {
    z-index: 10700 !important;
    pointer-events: none; 
}
/* Asegurar que el inner también hereda o respeta */
.custom-nav-tooltip .tooltip-inner {
    background-color: #333; /* Darker distinct color */
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Responsive Navbar refined fixes */
/* Only wrap on smaller screens (< 991px) */
@media (max-width: 991px) {
    .nav-tabs {
        justify-content: center;
        gap: 5px;
    }

    #navbar-container {
        padding: 0.25rem;
    }
    

    #globalUserBtn {
        flex-grow: 1;
    }
}

@media (max-width: 576px) {
    .nav-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .nav-tabs {
        border-radius: 12px;
    }

    /* En móviles pequeños, apilar controles si es necesario o dejar que el flex-wrap actúe natural */
}

/* ==========================================================================
   PANTALLA DE LOGIN (SELECTOR DE USUARIO)
   ========================================================================== */

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10200; /* Por encima de navbar (5000) y spotify (10000), pero bajo modales (10500+) */
    color: white;
}

.login-container {
    padding: 1.5rem;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    max-height: 100vh;
    overflow-y: auto;
}

.login-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.login-users-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
}

.login-user-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0.75rem;
    margin: 0;
    cursor: pointer;
    width: 140px;
    outline: none;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(5px);
}

.login-user-card:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.login-user-avatar {
    width: 100%;
    aspect-ratio: 1/1;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%; /* Make them perfectly circular as requested */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden; /* Crucial: ensures image stays inside */
    position: relative;
}

.login-user-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the square area */
    transition: transform 0.5s ease;
}

.login-user-card:hover .login-user-img {
    transform: scale(1.1); /* Subtle zoom on hover */
}

.login-user-name {
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
}

.login-user-card:hover {
    color: white;
    transform: translateY(-10px);
}

.login-user-card:hover .login-user-avatar {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 20px rgba(255,255,255,0.1);
}

.login-user-card:focus .login-user-avatar {
    border-color: var(--bs-primary, #007bff);
}

/* Success State */
.login-user-card.active .login-user-avatar {
    background: var(--bs-success, #28a745);
    border-color: white;
}

@media (max-width: 768px) {
    .login-user-card, .login-hotel-card {
        width: 110px;
    }
    .login-user-avatar {
        font-size: 2.8rem;
    }
    .login-user-name {
        font-size: 0.9rem;
    }
}

.login-hotel-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    cursor: pointer;
    width: 250px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s ease;
}

.login-hotel-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.login-hotel-logo {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 12px;
}

.login-hotel-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* MODAL DE CONTRASEÑA PREMIUM */
.login-password-modal {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.login-password-input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    padding: 1rem 1.5rem !important;
    border-radius: 15px !important;
    font-size: 1.25rem !important;
    text-align: center;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.login-password-input:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: white !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1) !important;
}

.login-password-btn {
    background: white;
    color: black;
    border: none;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s ease;
}

.login-password-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: #f8f9fa;
}

.login-password-cancel {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: none;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.login-password-cancel:hover {
    color: white;
}
/* --- ALERT WIDGET CUSTOM STYLES --- */
.bg-orange { background-color: #fd7e14 !important; }
.alert-white { background-color: #fff !important; color: #333 !important; border: 1px solid #dee2e6 !important; }
.alert-white .btn-link { color: #333 !important; }
.alert-white .badge.bg-dark { background-color: rgba(0,0,0,0.1) !important; color: #333 !important; }

/* --- BASIC ANIMATIONS (Replacement for missing animate.css) --- */
.animate__animated { animation-duration: 0.5s; animation-fill-mode: both; }
.animate__pulse { animation-name: pulse; animation-iteration-count: infinite; }
.animate__infinite { animation-iteration-count: infinite; }
.animate__fadeInDown { animation-name: fadeInDown; }

@keyframes pulse {
  from { transform: scale3d(1, 1, 1); }
  50% { transform: scale3d(1.05, 1.05, 1.05); }
  to { transform: scale3d(1, 1, 1); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translate3d(0, -20px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
