/* ==========================================================================
   EXTRANET / PMS CSS SYSTEM - PUALY RESORT & SPA
   ========================================================================== */

:root {
    /* Pualy AlertBot Trading Design System v2.0 Tokens - Lienzo Unificado */
    --bg-main: #1e293b;            /* Pualy Trading Slate Canvas */
    --bg-surface: #1e293b;         /* Mismo lienzo continuo */
    --bg-sidebar: #1e293b;         /* Mismo lienzo en barra lateral */
    --bg-header: #1e293b;          /* Mismo lienzo en encabezado superior */
    --bg-card: #093f66;            /* Pualy Trading Ocean Blue Card */
    --bg-card-hover: #0b4a78;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #3b71ca;
    
    --text-primary: #ffffff;
    --text-secondary: #b4bcc9;
    --text-muted: #8b95a8;
    
    --accent-blue: #3b71ca;
    --accent-blue-soft: rgba(59, 113, 202, 0.15);
    --accent-emerald: #3b9b6d;     /* Pualy Trading Green Profit */
    --accent-emerald-soft: rgba(59, 155, 109, 0.15);
    --accent-gold: #d69e2e;
    --accent-gold-soft: rgba(214, 158, 46, 0.15);
    --accent-rose: #cd5c5c;
    --accent-rose-soft: rgba(205, 92, 92, 0.15);
    
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.45);
    --transition-smooth: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    
    --sidebar-width: 82px;
    --header-height: 60px;
}

/* Resaltado de selección de texto de alto contraste */
::selection {
    background: #0284c7 !important;
    color: #ffffff !important;
}
::-moz-selection {
    background: #0284c7 !important;
    color: #ffffff !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */

.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ==========================================================================
   SLIM RAIL SIDEBAR NAVIGATION (82px) & FLYOUT POPOVERS
   ========================================================================== */

.sidebar.slim-rail {
    width: var(--sidebar-width) !important;
    min-width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width) !important;
    background-color: #1e293b !important; /* Pualy Slate Canvas - grisecito uniforme con el lienzo de la app */
    border-right: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 10000; /* Siempre por encima del contenido */
    height: 100vh;
    overflow: visible !important;
    user-select: none;
    position: relative;
    padding: 0;
}

/* Brand Isologo at Top - Altura unificada con el encabezado superior */
.rail-brand {
    height: var(--header-height);
    min-height: var(--header-height);
    max-height: var(--header-height);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0;
}

.rail-brand .hotel-avatar-wrapper {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(214, 158, 46, 0.6);
    box-shadow: 0 0 10px rgba(214, 158, 46, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0 auto;
}

.rail-brand .hotel-avatar-wrapper:hover {
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(214, 158, 46, 0.4);
}

/* Nav Items Container */
.rail-nav-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 10px 0;
    flex: 1;
    overflow: visible !important;
}

/* Individual Rail Item */
.rail-item {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Button & Icon (Sobrios, Monocromáticos en escala de grises) */
.rail-btn {
    width: 72px;
    height: 56px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8; /* Gris plata sobrio */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 2px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    outline: none;
    text-decoration: none;
}

.rail-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.rail-btn.active,
.rail-item.active .rail-btn {
    color: #ffffff;
    background: rgba(214, 158, 46, 0.14);
    border-color: rgba(214, 158, 46, 0.4);
    box-shadow: 0 0 14px rgba(214, 158, 46, 0.18);
}

.rail-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

.rail-btn:hover .rail-icon {
    transform: scale(1.08);
    stroke: #ffffff;
}

.rail-btn.active .rail-icon,
.rail-item.active .rail-btn .rail-icon {
    stroke: var(--accent-gold, #d69e2e);
}

.rail-label {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.1;
    text-align: center;
    color: #ffffff;
    white-space: nowrap;
    max-width: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rail-icon-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rail-badge {
    position: absolute;
    top: -5px;
    right: -9px;
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 8px;
    border: 1.5px solid #0f172a;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
}

/* User Profile at Bottom */
.rail-user-profile {
    padding: 12px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.rail-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #334155;
    color: #f8fafc;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rail-user-profile:hover .rail-user-avatar {
    border-color: var(--accent-emerald, #10b981);
    transform: scale(1.05);
}

/* User Profile Popover Dropdown */
.rail-user-popover {
    position: absolute;
    bottom: 8px;
    left: calc(100% + 12px);
    width: 230px;
    background: #162235;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    z-index: 10500;
    padding: 12px;
    animation: popoverFadeIn 0.18s ease-out;
}

@keyframes popoverFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.rail-popover-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
}

.rail-popover-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #093f66;
    color: #38bdf8;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(56, 189, 248, 0.3);
    flex-shrink: 0;
}

.rail-popover-info {
    overflow: hidden;
}

.rail-popover-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary, #f8fafc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rail-popover-role {
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rail-popover-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0 8px 0;
}

.rail-popover-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rail-popover-menu li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text-primary, #e2e8f0);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.rail-popover-menu li:hover {
    background: rgba(255, 255, 255, 0.07);
}

.rail-popover-menu li.logout-item:hover {
    background: rgba(248, 113, 113, 0.12);
}

/* ==========================================================================
   FLYOUT SUBMENUS (Menú Flotante hacia la derecha)
   ========================================================================== */

.rail-flyout {
    position: absolute;
    left: 78px;
    top: 0;
    min-width: 260px;
    max-width: 310px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    background-color: #0b1e36 !important; /* Fondo 100% opaco y sólido Pualy Ocean */
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 12px;
    box-shadow: 0 20px 50px -5px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    padding: 12px;
    z-index: 99999 !important; /* Siempre por encima de cualquier lienzo o chat */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(10px);
    transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.18s;
}

/* Puente invisible para movimiento continuo del mouse sin perder el hover */
.rail-flyout::before {
    content: '';
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: -20px;
    width: 24px;
    background: transparent;
}

/* Hover & Focus Trigger */
.rail-item:hover .rail-flyout,
.rail-item:focus-within .rail-flyout {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

/* ==========================================================================
   POSICIONAMIENTO HACIA ARRIBA PARA ELEMENTOS INFERIORES DEL SLIM RAIL
   Evita que el desplegable de Ajustes desborde el borde inferior de la pantalla
   ========================================================================== */
@media (min-width: 769px) {
    #rail-item-config .rail-flyout,
    #flyout-config {
        top: auto !important;
        bottom: -45px !important;
        max-height: calc(100vh - 40px) !important;
        overflow-y: auto !important;
        transform-origin: bottom left;
    }

    #rail-item-addons .rail-flyout,
    #flyout-addons {
        top: auto !important;
        bottom: -6px !important;
        transform-origin: bottom left;
    }
}

.flyout-header {
    padding: 4px 8px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 6px;
}

.flyout-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: #f8fafc;
    margin: 0 0 2px 0;
    letter-spacing: -0.01em;
}

.flyout-header span {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.2;
    display: block;
}

.flyout-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.flyout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.flyout-link svg {
    width: 16px;
    height: 16px;
    stroke: #94a3b8;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
    transition: stroke 0.15s ease;
}

.flyout-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.flyout-link:hover svg {
    stroke: var(--accent-gold, #d69e2e);
}

.flyout-link.active {
    background: rgba(214, 158, 46, 0.16);
    color: #ffffff;
    font-weight: 600;
}

.flyout-link.active svg {
    stroke: var(--accent-gold, #d69e2e);
}

/* ==========================================================================
   MOBILE TOGGLE & OFF-CANVAS DRAWER
   ========================================================================== */

.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mobile-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 998;
    backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar.slim-rail {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 290px !important;
        min-width: 290px !important;
        max-width: 290px !important;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        align-items: stretch;
        background: #0f172a;
        padding: 0;
    }
    
    .sidebar.slim-rail.mobile-open {
        transform: translateX(0);
    }
    
    .mobile-drawer-backdrop.active {
        display: block;
    }
    
    .sidebar.slim-rail .rail-btn {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: flex-start;
        padding: 12px 18px;
        gap: 14px;
        border-radius: 0;
    }
    
    .sidebar.slim-rail .rail-label {
        font-size: 13.5px;
        font-weight: 600;
    }
    
    .sidebar.slim-rail .rail-flyout {
        position: static;
        width: 100%;
        max-width: 100%;
        border: none;
        box-shadow: none;
        padding: 0 16px 8px 48px;
        background: rgba(0, 0, 0, 0.25);
        display: block;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        border-radius: 0;
    }
    
    .sidebar.slim-rail .flyout-header {
        display: none;
    }
}

.sidebar-brand {
    padding: 0 15px 0 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-brand-profile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    position: relative;
    min-height: 56px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-sidebar);
}

.hotel-avatar-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(214, 158, 46, 0.25), 0 4px 12px rgba(0, 0, 0, 0.25);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2px;
    margin: 0 auto;
    user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hotel-avatar-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(214, 158, 46, 0.4), 0 6px 16px rgba(0, 0, 0, 0.35);
}

.hotel-avatar-wrapper-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
}

.hotel-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
    background: transparent;
    transition: transform 0.15s ease;
}

.avatar-camera-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-sidebar);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    z-index: 10;
    transition: transform 0.15s ease, background 0.15s ease;
}

.avatar-camera-badge:hover {
    transform: scale(1.15);
    background: #e6af3e;
}

.sidebar-brand img {
    max-height: 38px;
    object-fit: contain;
}

.sidebar-toggle-btn, .sidebar-expand-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.sidebar-toggle-btn:hover, .sidebar-expand-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-expand-btn {
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.sidebar-menu {
    flex-grow: 1;
    padding: 15px 10px;
    list-style: none;
    overflow-y: auto;
}

/* Sidebar Accordion Header */
.sidebar-section-header.collapsible {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    margin-top: 14px;
    margin-bottom: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.section-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-header-title .section-icon {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease, stroke 0.2s ease, color 0.2s ease;
}

.sidebar-section-header.collapsible:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.sidebar-section-header.collapsible:hover .section-icon {
    opacity: 1;
    color: var(--accent-emerald);
}

.sidebar-section-header .section-toggle-icon {
    transition: transform 0.25s ease;
}

.sidebar-section-header.collapsed .section-toggle-icon {
    transform: rotate(-90deg);
}

.sidebar-section-content {
    margin-left: 14px;
    padding-left: 8px;
    margin-top: 4px;
    margin-bottom: 8px;
    border-left: 2px solid rgba(59, 130, 246, 0.35);
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.sidebar-section-content:hover {
    border-left-color: rgba(59, 130, 246, 0.7);
}

.sidebar-section-content.collapsed {
    display: none;
}

.sidebar-item {
    margin-bottom: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.92rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    white-space: nowrap;
}

.sidebar-link svg {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.sidebar-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    border-left: 3px solid var(--accent-emerald) !important;
    background-color: rgba(59, 155, 109, 0.16) !important;
    color: var(--accent-emerald) !important;
    font-weight: 600;
}

.sidebar-link.active svg {
    stroke: var(--accent-emerald) !important;
}

.sidebar-user {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Draggable Splitter Handle */
.sidebar-resizer {
    width: 6px;
    background-color: var(--border-color);
    cursor: col-resize;
    position: relative;
    z-index: 101;
    transition: background-color 0.2s ease, width 0.2s ease;
    user-select: none;
    flex-shrink: 0;
}

.sidebar-resizer:hover, .sidebar-resizer.is-resizing {
    background-color: var(--accent-emerald);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Main Area Container */
.main-wrapper {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
    background-color: var(--bg-main);
}

/* Header Area - Altura fija unificada con el rail-brand (Línea continua sin desniveles) */
.main-header {
    height: var(--header-height);
    min-height: var(--header-height);
    max-height: var(--header-height);
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-sizing: border-box;
    position: relative !important;
    z-index: 10000 !important;
}

.wb-header-hamburger-btn * {
    pointer-events: none;
}

.wb-header-hamburger-btn {
    height: 32px;
    padding: 4px 10px;
    font-size: 0.8rem;
    box-sizing: border-box;
}

.header-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    flex: 0 0 240px;
    overflow: hidden;
}

.header-title-section h1 {
    font-size: 1.15rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    color: var(--text-primary);
}

.header-center-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    margin-right: auto;
    flex-shrink: 0;
}

.header-meta-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

#wb-header-action-group {
    gap: 6px;
}

#wb-header-action-group .btn {
    height: 32px;
    padding: 4px 10px;
    font-size: 0.8rem;
    box-sizing: border-box;
    white-space: nowrap;
}

.system-date-badge {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    box-sizing: border-box;
    white-space: nowrap;
}

.system-date-badge svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

#btn-shift-switch {
    height: 32px;
    padding: 4px 10px;
    font-size: 0.8rem;
    box-sizing: border-box;
    white-space: nowrap;
}

/* Acciones Rápidas Centrales en Header Global */
.header-center-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.header-center-actions .btn {
    height: 34px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    box-sizing: border-box;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}

#btn-quick-reservation {
    background-color: var(--accent-emerald);
    color: #0b0f17;
}

#btn-quick-reservation:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

#btn-quick-quotation {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}

#btn-quick-quotation:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-gold);
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .header-center-actions {
        display: none;
    }
}

/* Quote Services Added Chips */
.quote-service-chip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.78rem;
    color: #f8fafc;
    transition: all 0.15s ease;
}

.quote-service-chip:hover {
    border-color: rgba(197, 168, 128, 0.35);
    background: rgba(255, 255, 255, 0.07);
}

.quote-service-chip-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0 4px;
    line-height: 1;
    border-radius: 3px;
    transition: all 0.15s ease;
}

.quote-service-chip-remove:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
}

/* Main Content Area - Pegado directamente a la línea base del Header */
.content-area {
    flex: 1 1 0%;
    min-height: 0;
    height: calc(100vh - var(--header-height));
    padding: 24px 30px;
    overflow-y: auto;
    position: relative;
    background-color: var(--bg-main);
    box-sizing: border-box;
}

/* View Container - Hidden by default unless active */
.module-view {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.module-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   COMMON COMPONENT STYLES
   ========================================================================== */

/* Grid Columns */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 24px; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 24px; }

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(8px);
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background-color: var(--bg-card-hover);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control, select, textarea {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-control:focus, select:focus, textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--accent-emerald);
    color: #0b0f17;
}

.btn-primary:hover {
    background-color: #059669;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background-color: var(--accent-rose);
    color: var(--text-primary);
}

.btn-danger:hover {
    background-color: #e11d48;
}

.btn-icon-only {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background-color: var(--accent-emerald-soft); color: var(--accent-emerald); }
.badge-warning { background-color: var(--accent-gold-soft); color: var(--accent-gold); }
.badge-danger { background-color: var(--accent-rose-soft); color: var(--accent-rose); }
.badge-info { background-color: var(--accent-blue-soft); color: var(--accent-blue); }

/* Custom Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent-emerald);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.pms-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.pms-table th {
    background-color: rgba(15, 23, 42, 0.4);
    padding: 14px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.pms-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.pms-table tbody tr {
    transition: var(--transition-smooth);
}

.pms-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   MODULES SPECIFIC STYLES
   ========================================================================== */

/* 1. DASHBOARD VIEW */
.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.stat-icon-emerald { background-color: var(--accent-emerald-soft); color: var(--accent-emerald); }
.stat-icon-gold { background-color: var(--accent-gold-soft); color: var(--accent-gold); }
.stat-icon-blue { background-color: var(--accent-blue-soft); color: var(--accent-blue); }
.stat-icon-rose { background-color: var(--accent-rose-soft); color: var(--accent-rose); }

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.alert-item:last-child { border-bottom: none; }

.alert-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-item.critical { color: var(--accent-rose); }
.alert-item.warning { color: var(--accent-gold); }
.alert-item.info { color: var(--accent-blue); }

.alert-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* 2. CRM / INBOX VIEW */
.crm-inbox-container {
    display: grid;
    grid-template-columns: 1fr;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    height: 100% !important;
    max-height: 100% !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow: hidden;
    background-color: var(--bg-card);
    margin-top: 0;
    margin-bottom: 0;
    box-shadow: var(--shadow-premium);
}

@media (min-width: 768px) {
    .crm-inbox-container {
        grid-template-columns: 290px 1fr;
    }
}

@media (min-width: 1100px) {
    .crm-inbox-container {
        grid-template-columns: 280px 1fr 330px;
    }
}

.chat-list-pane {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background-color: var(--bg-card);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.chat-list-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-search-input {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    width: 100%;
    color: var(--text-primary);
    outline: none;
    font-size: 0.85rem;
}

.chat-list-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.chat-thread-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.chat-thread-item:hover, .chat-thread-item.active {
    background-color: rgba(255, 255, 255, 0.04);
}

.chat-thread-item.active {
    border-left: 3px solid var(--accent-emerald);
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    flex-shrink: 0;
}

.chat-channel-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 1.5px solid var(--bg-main);
}

.chat-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
    box-sizing: border-box;
    line-height: 1;
}

.channel-wa { background-color: #25d366; color: #fff; }
.channel-email { background-color: #ea4335; color: #fff; }
.channel-booking { background-color: #003b95; color: #fff; }
.channel-telegram { background-color: #229ED9; color: #fff; font-size: 8px; font-weight: bold; }
.channel-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; font-size: 8px; font-weight: bold; }
.channel-facebook { background-color: #1877f2; color: #fff; font-size: 8px; font-weight: bold; }
.channel-web { background-color: #093f66; color: var(--accent-emerald); }

.chat-thread-info {
    flex-grow: 1;
    min-width: 0;
}

.chat-thread-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-thread-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-thread-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.chat-thread-last-msg {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chat Detail Pane */
.chat-detail-pane {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.chat-detail-header {
    height: 56px;
    min-height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card);
    flex-shrink: 0;
}

.chat-active-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-active-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.chat-active-status {
    font-size: 0.75rem;
    color: var(--accent-emerald);
}

.chat-messages-area {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 72%;
}

.msg-wrapper.received {
    align-self: flex-start;
}

.msg-wrapper.sent {
    align-self: flex-end;
}

.msg-author-tag {
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.2px;
    user-select: none;
}

.msg-wrapper.sent .msg-author-tag {
    align-self: flex-end;
}

.msg-wrapper.received .msg-author-tag {
    align-self: flex-start;
}

.msg-bubble {
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 0.86rem;
    line-height: 1.4;
    word-break: break-word;
    user-select: text;
}

.received .msg-bubble {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-top-left-radius: 0;
}

.sent .msg-bubble {
    background-color: var(--accent-emerald);
    color: #0b0f17;
    border-top-right-radius: 0;
}

.msg-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 3px;
    display: flex;
    gap: 6px;
    align-self: flex-end;
    align-items: center;
    user-select: none;
}

.msg-copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1;
}

.msg-copy-btn:hover {
    color: #38bdf8;
    background-color: rgba(255, 255, 255, 0.08);
}

.msg-system-note {
    align-self: center;
    background-color: rgba(234, 179, 8, 0.1);
    color: var(--accent-gold);
    border: 1px solid rgba(234, 179, 8, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    user-select: none;
}

/* Indicador de 3 puntitos "Escribiendo..." */
.typing-indicator-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin: 4px 0 8px 0;
}

.typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    background-color: #162235;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    border-top-left-radius: 2px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0s;
}

.typing-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-style: italic;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.chat-input-area {
    flex-shrink: 0;
    padding: 10px 14px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.chat-input-text {
    flex-grow: 1;
    min-width: 0;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    padding: 8px 16px;
    outline: none;
    font-size: 0.86rem;
    transition: var(--transition-smooth);
}

.chat-input-text:focus {
    border-color: var(--accent-emerald);
}

/* 3. PMS / ROOM RACK */
/* Multi-View Tabs & Filter Bar (Plano de Reservas & Operaciones) */
.spa-tabs {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    padding: 3px !important;
    gap: 4px !important;
}

.spa-tab-btn {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: 1px solid transparent !important;
    border-radius: 7px !important;
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
    outline: none !important;
}

.spa-tab-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-primary) !important;
}

.spa-tab-btn.active {
    background: var(--bg-card) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(52, 211, 153, 0.35) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
    font-weight: 600 !important;
}

.pms-rack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pms-rack-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pms-rack-nav .btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 7px !important;
    padding: 5px 10px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pms-rack-nav .btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.pms-rack-nav .btn.btn-primary,
.pms-rack-nav .btn-primary {
    background: rgba(52, 211, 153, 0.15) !important;
    border: 1px solid rgba(52, 211, 153, 0.4) !important;
    color: var(--primary) !important;
}

.pms-rack-nav .btn.btn-primary:hover,
.pms-rack-nav .btn-primary:hover {
    background: var(--primary) !important;
    color: #0b0f17 !important;
}

#rack-datepicker-start,
#rack-range-days {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
}

#rack-datepicker-start:focus,
#rack-range-days:focus {
    border-color: var(--primary) !important;
    outline: none;
}

#rack-current-range {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--primary) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

.pms-rack-scroll-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-card);
}

.pms-rack-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 1000px;
    user-select: none;
}

.pms-rack-table th, .pms-rack-table td {
    border: 1px solid var(--border-color);
    height: 60px;
    padding: 0;
    position: relative;
}

.pms-rack-table th {
    background-color: rgba(15, 23, 42, 0.5);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.day-header-number {
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
}

.day-header-name {
    font-size: 0.65rem;
    text-transform: uppercase;
}

.room-cell-header {
    background-color: rgba(15, 23, 42, 0.3);
    width: 120px;
    padding: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.room-type-tag {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: normal;
}

.rack-cell-day {
    width: 80px;
    min-width: 80px;
}

/* Reservation Bar on Rack */
.rack-reservation-bar {
    position: absolute;
    top: 10px;
    bottom: 10px;
    border-radius: 6px;
    color: #0b0f17;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.rack-reservation-bar:hover {
    transform: scaleY(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

/* Diagonal ends for Check-in / Check-out visual style */
.rack-reservation-bar.in-diagonal {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    clip-path: polygon(8px 0%, 100% 0%, 100% 100%, 0% 100%);
}

.rack-reservation-bar.out-diagonal {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    clip-path: polygon(0% 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.rack-reservation-bar.both-diagonal {
    border-radius: 0;
    clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.res-color-ota-booking { background: linear-gradient(135deg, #60a5fa, #3b82f6); color: #fff; }
.res-color-ota-airbnb { background: linear-gradient(135deg, #fb7185, #f43f5e); color: #fff; }
.res-color-direct-web { background: linear-gradient(135deg, #34d399, #059669); color: #0b0f17; }
.res-color-whatsapp { background: linear-gradient(135deg, #4ade80, #22c55e); color: #0b0f17; }
.res-color-spa { background: linear-gradient(135deg, #a855f7, #7e22ce) !important; color: #fff !important; box-shadow: 0 3px 8px rgba(168, 85, 247, 0.35); }

.rack-spa-bar {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 4px !important;
    width: calc(100% - 8px) !important;
    border-radius: 6px !important;
    clip-path: none !important;
    padding: 4px 8px !important;
    font-size: 0.72rem !important;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    z-index: 10;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rack-spa-bar:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 14px rgba(168, 85, 247, 0.5);
    z-index: 15;
}

.rack-group-header td {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.5px;
    padding: 8px 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-align: left !important;
}

/* 4. CALENDARIO / TARIFAS (100% Ancho & Controles Masivos) */
.rates-grid-container {
    display: block;
    width: 100%;
}

.rates-calendar-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
}

.rate-cell-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: var(--text-primary);
    text-align: center;
    width: 100%;
    min-width: 80px;
    padding: 4px 6px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.rate-cell-input:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-gold);
    outline: none;
    box-shadow: 0 0 6px rgba(197, 168, 128, 0.3);
}

.day-pill {
    user-select: none;
    transition: all 0.15s ease;
}

.day-pill:hover {
    background: rgba(197, 168, 128, 0.15) !important;
}

.rate-parent-badge {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
}

#view-tarifas {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#rates-calendar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#rates-calendar .card {
    margin-top: 0 !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
}

:root {
    --rates-left-col-width: 280px;
}

.rates-table-scroll-container {
    max-height: calc(100vh - 330px) !important;
    min-height: 280px !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-card);
    position: relative;
    scroll-behavior: smooth;
    scrollbar-width: auto;
    scrollbar-color: #38bdf8 #0f172a;
}

@keyframes btnConsultarPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
        background: rgba(56, 189, 248, 0.4);
        border-color: #38bdf8;
        transform: scale(0.97);
    }
    50% {
        box-shadow: 0 0 12px 3px rgba(56, 189, 248, 0.9);
        background: rgba(16, 185, 129, 0.35);
        border-color: #34d399;
        transform: scale(1.04);
        color: #f8fafc;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
        background: rgba(56, 189, 248, 0.15);
        border-color: rgba(56, 189, 248, 0.4);
        transform: scale(1);
    }
}
.btn-consultar-active {
    animation: btnConsultarPulse 0.6s ease-in-out !important;
}

@keyframes tableRefreshFlash {
    0% { opacity: 0.55; box-shadow: inset 0 0 18px rgba(56, 189, 248, 0.4); }
    100% { opacity: 1; box-shadow: none; }
}
.table-refresh-flash {
    animation: tableRefreshFlash 0.5s ease-out !important;
}

.rates-table-scroll-container table {
    width: max-content !important;
    min-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.rates-table-scroll-container::-webkit-scrollbar {
    width: 10px;
    height: 14px !important;
}
.rates-table-scroll-container::-webkit-scrollbar-track {
    background: #0f172a !important;
    border-radius: 4px;
}
.rates-table-scroll-container::-webkit-scrollbar-thumb {
    background: #38bdf8 !important;
    border: 2px solid #0f172a !important;
    border-radius: 7px !important;
}
.rates-table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #60a5fa !important;
}

.rates-sticky-th {
    position: sticky;
    top: 0;
    z-index: 15;
    background: #162235 !important;
}

.rates-sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    width: var(--rates-left-col-width, 280px) !important;
    min-width: var(--rates-left-col-width, 280px) !important;
    max-width: var(--rates-left-col-width, 280px) !important;
    background: #093f66 !important;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    text-overflow: ellipsis;
}

.rates-sticky-corner {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 25;
    width: var(--rates-left-col-width, 280px) !important;
    min-width: var(--rates-left-col-width, 280px) !important;
    max-width: var(--rates-left-col-width, 280px) !important;
    background: #162235 !important;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    text-overflow: ellipsis;
}

.rates-col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 100%;
    cursor: col-resize;
    background: rgba(56, 189, 248, 0.2);
    border-left: 1px dashed rgba(56, 189, 248, 0.6);
    z-index: 35;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.rates-col-resizer::after {
    content: '↔';
    font-size: 0.70rem;
    color: #38bdf8;
    font-weight: 800;
    pointer-events: none;
    line-height: 1;
}

.rates-col-resizer:hover,
.rates-col-resizer:active {
    background: rgba(56, 189, 248, 0.5);
    border-left: 2px solid #38bdf8;
}

/* Encabezado Maestro de Unidad / Categoría (Alto Contraste) */
.rates-category-header-row {
    background: #162235 !important;
    border-top: 3px solid #d69e2e !important;
    border-bottom: 2px solid rgba(214, 158, 46, 0.3) !important;
}

.rates-category-header-cell {
    background: #162235 !important;
    border-left: 4px solid #d69e2e !important;
    padding: 10px 14px !important;
}

/* Sub-encabezado por Pax / Ocupación */
.rates-pax-header-row {
    background: #093f66 !important;
    border-top: 1px solid rgba(59, 113, 202, 0.4) !important;
    border-bottom: 1px solid rgba(59, 113, 202, 0.2) !important;
}

.rates-pax-header-cell {
    background: #093f66 !important;
    border-left: 4px solid #3b9b6d !important;
    padding: 7px 12px 7px 20px !important;
}

/* Organigrama y Jerarquía en Árbol */
.rates-tree-indent-1 {
    padding-left: 28px !important;
}

.rates-tree-indent-2 {
    padding-left: 46px !important;
}

.rate-cell-parent-input {
    background: rgba(214, 158, 46, 0.12) !important;
    border: 1px solid #d69e2e !important;
    border-radius: 4px;
    color: #fef08a !important;
    text-align: center;
    width: 95px;
    font-size: 0.80rem;
    font-weight: 700;
    padding: 3px 4px;
    transition: all 0.2s ease;
}

.rate-cell-parent-input:focus {
    background: rgba(214, 158, 46, 0.25) !important;
    border-color: #f59e0b !important;
    outline: none;
    box-shadow: 0 0 6px rgba(214, 158, 46, 0.4);
}

.rate-cell-linked-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    color: #93c5fd;
    font-size: 0.74rem;
    font-weight: 600;
    width: 78px;
    padding: 4px 3px;
    cursor: default;
    user-select: none;
    transition: all 0.2s ease;
}

.rate-cell-linked-badge.flash-updated {
    background: rgba(214, 158, 46, 0.28) !important;
    border-color: #d69e2e !important;
    color: #fef08a !important;
}

.rate-accordion-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.rate-accordion-toggle-btn:hover {
    background: rgba(59, 113, 202, 0.2);
    border-color: var(--accent-blue);
    color: #ffffff;
}

/* ==========================================================================
   SISTEMA DE 4 GRUPOS TARIFARIOS Y CONTENEDORES ENCAPSULADOS
   ========================================================================== */
.rate-group-header-row {
    transition: background-color 0.2s ease;
}

.rate-group-header-row:hover {
    filter: brightness(1.05);
}

.rate-group-flexible {
    --group-accent: #10b981;
    --group-bg-subtle: rgba(16, 185, 129, 0.06);
    --group-border-subtle: rgba(16, 185, 129, 0.35);
}

.rate-group-semiflex {
    --group-accent: #f59e0b;
    --group-bg-subtle: rgba(245, 158, 11, 0.06);
    --group-border-subtle: rgba(245, 158, 11, 0.35);
}

.rate-group-nonref {
    --group-accent: #f43f5e;
    --group-bg-subtle: rgba(244, 63, 94, 0.06);
    --group-border-subtle: rgba(244, 63, 94, 0.35);
}

.rate-group-otas {
    --group-accent: #38bdf8;
    --group-bg-subtle: rgba(56, 189, 248, 0.06);
    --group-border-subtle: rgba(56, 189, 248, 0.35);
}

.rate-group-row-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rate-group-cell-title {
    padding: 7px 12px !important;
    border-right: 2px solid var(--border-color);
}

.rate-group-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
}

.rate-group-container-header {
    background: #162235 !important;
    border-top: 2px solid var(--group-accent) !important;
}

.rate-group-sub-row {
    background: #162235 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rate-group-sub-row:last-child {
    border-bottom: 2px solid var(--group-border-subtle) !important;
}

.rate-group-sub-cell-title {
    padding: 5px 12px 5px 36px !important;
    border-right: 2px solid var(--border-color);
    background: #131d2e !important;
}

.rate-group-switch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.rate-group-switch-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* Tarjetas Selectoras de Política de Cancelación */
.policy-selector-card {
    background: #162235;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    user-select: none;
}

.policy-selector-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(22, 34, 53, 0.95);
    transform: translateY(-1px);
}

.policy-selector-card.active-policy {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    border-width: 2px !important;
}

.policy-container-active-box {
    background: #162235;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 4px;
    border-top: 3px solid var(--policy-theme-color, #10b981);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#hierarchy-card-rateplans {
    padding: 10px 18px 12px 18px !important;
}

#active-policy-container .table-wrapper {
    height: 205px;
    max-height: 215px;
    min-height: 180px;
    overflow-y: auto;
    overflow-x: auto;
    overscroll-behavior: contain;
}

#active-policy-container .pms-table td {
    padding: 6px 10px;
    vertical-align: middle;
}


/* 5. MOTOR DE RESERVAS (PREVIEW WIDGET) */
.booking-engine-card {
    max-width: 500px;
    margin: 0 auto;
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.booking-engine-header {
    background: linear-gradient(135deg, #161e31, #0f172a);
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.booking-engine-body {
    padding: 24px;
}

.booking-step {
    display: none;
}

.booking-step.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.booking-progress-bar {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
    border-radius: 2px;
}

.booking-progress-fill {
    height: 100%;
    background-color: var(--accent-emerald);
    width: 10%;
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* 6. MODALES */
.pms-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important; /* Primera línea absoluta por encima de barras, riel y menús flotantes */
    padding: 16px;
    box-sizing: border-box;
}

.pms-modal-backdrop.active {
    display: flex;
}

.pms-modal {
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 650px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-premium);
    animation: scaleUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pms-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pms-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.pms-modal-close {
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.pms-modal-close:hover {
    color: var(--text-primary);
}

.pms-modal-body {
    padding: 20px;
}

.pms-modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Normalización Bicolor Pualy de Inputs y Formularios en Modales (Sin Negros ni Blancos) */
.pms-modal .form-control,
.pms-modal select,
.pms-modal textarea {
    background-color: var(--bg-card) !important; /* Azul Océano #093f66 */
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #f8fafc !important;
}

.pms-modal .form-control:focus,
.pms-modal select:focus,
.pms-modal textarea:focus {
    border-color: #3b82f6 !important;
    background-color: #0b4a78 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

.pms-modal .form-control[readonly] {
    background-color: rgba(9, 63, 102, 0.65) !important;
    color: #cbd5e1 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Dynamic styles for Housekeeping panel list */
.housekeeping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.housekeeping-card {
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    border-radius: 10px;
    padding: 20px;
    transition: var(--transition-smooth);
}

.housekeeping-card:hover {
    background-color: var(--bg-card-hover);
}

.housekeeping-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.housekeeping-room-name {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Sincronización OTA logs panel */
.sync-log-box {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.75rem;
    height: 180px;
    overflow-y: auto;
    color: #4ade80;
}

/* ==========================================================================
   CRM 3-COLUMN SPLIT & GUEST FOLIO STYLES
   ========================================================================== */

.filter-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.filter-pill:hover, .filter-pill.active {
    background-color: var(--accent-emerald-soft);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
}

.filter-pill.active-red {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
    font-weight: 600;
}

.filter-pill.active-emerald {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #6ee7b7 !important;
    font-weight: 600;
}

.filter-pill.active-gold {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
    color: #fde68a !important;
    font-weight: 600;
}

.bot-toggle-pill {
    background: rgba(0, 0, 0, 0.35);
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
}

/* Quick Actions Hamburger & Dropdown (Sin botones horizontales) */
.chat-actions-menu-wrapper {
    position: relative;
    display: inline-flex;
}

.chat-hamburger-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-hamburger-btn:hover {
    background: var(--accent-emerald-soft);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
    transform: scale(1.04);
}

.chat-actions-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 290px;
    max-height: calc(75vh - 40px);
    overflow-y: auto;
    background: var(--bg-card); /* Azul Océano #093f66 unificado */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    padding: 8px;
    z-index: 1050;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chat-actions-dropdown::-webkit-scrollbar {
    width: 5px;
}

.chat-actions-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.chat-actions-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.chat-actions-dropdown.active {
    display: block;
    animation: dropdownFade 0.16s ease-out;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-group-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 6px 10px 4px 10px;
}

.dropdown-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.dropdown-action-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.dropdown-action-item.highlight {
    background: rgba(245, 158, 11, 0.16);
    border-left: 3px solid #f59e0b;
}

.dropdown-action-item.highlight:hover {
    background: rgba(245, 158, 11, 0.26);
}

.action-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.action-text {
    display: flex;
    flex-direction: column;
}

.action-text strong {
    font-size: 0.82rem;
    color: #f8fafc;
}

.action-text small {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}

/* Línea Especial / Memoria del Huésped en Feed */
.guest-memory-banner {
    padding: 10px 14px;
    margin: 10px 16px 6px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #093f66 0%, #1e293b 100%);
    border: 1px solid rgba(59, 130, 246, 0.35);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.guest-memory-banner.vip {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, #093f66 0%, rgba(214, 158, 46, 0.25) 100%);
}

.guest-memory-banner.blacklist {
    border-color: rgba(225, 29, 72, 0.6);
    background: linear-gradient(135deg, #093f66 0%, rgba(225, 29, 72, 0.35) 100%);
}

/* Badges de Categoría */
.badge-vip {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #093f66 !important;
    font-weight: 700;
}

.badge-blacklist {
    background: linear-gradient(135deg, #e11d48, #be123c);
    color: #fff !important;
    font-weight: 700;
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(225, 29, 72, 0); }
}

.badge-corporate {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8 !important;
    border: 1px solid rgba(14, 165, 233, 0.4);
}

.badge-special {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.badge-standard {
    background: rgba(100, 116, 139, 0.2);
    color: #cbd5e1 !important;
    border: 1px solid rgba(100, 116, 139, 0.4);
}

/* Chips de Oferta y Preferencias */
.offer-chip-btn {
    flex: 1;
    padding: 6px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.offer-chip-btn:hover, .offer-chip-btn.active {
    background: var(--accent-gold);
    color: #093f66;
    border-color: var(--accent-gold);
    font-weight: 700;
}

.pref-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: var(--text-primary);
}

.pref-chip-remove {
    cursor: pointer;
    color: var(--text-muted);
    font-weight: bold;
    margin-left: 2px;
}

.pref-chip-remove:hover {
    color: var(--accent-rose);
}

.pref-chip-add {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 0.72rem;
    background: rgba(59, 130, 246, 0.12);
    border: 1px dashed rgba(59, 130, 246, 0.4);
    border-radius: 14px;
    color: #60a5fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pref-chip-add:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: #60a5fa;
}

/* Android / Material 3 Style Toggle Switch */
.bot-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s ease;
}

.bot-toggle-pill:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: #0b4a78;
}

.android-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    margin: 0;
    cursor: pointer;
}

.android-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.android-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4b5563; /* Gris cuando está apagado */
    border-radius: 22px;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.android-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.android-switch input:checked + .android-slider {
    background-color: var(--accent-emerald, #10b981); /* Verde cuando está prendido */
}

.android-switch input:checked + .android-slider:before {
    transform: translateX(20px); /* Se mueve a la derecha */
}

/* Column 3: Guest Folio Pane */
.guest-folio-pane {
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(100vh - var(--header-height) - 16px);
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    gap: 12px;
}

.guest-folio-pane::-webkit-scrollbar {
    width: 5px;
}
.guest-folio-pane::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.folio-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.folio-balance-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 78, 59, 0.2));
    border: 1px solid var(--accent-emerald);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 16px;
}

.folio-balance-box.pending {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.12), rgba(120, 53, 15, 0.2));
    border-color: var(--accent-gold);
}

.folio-charges-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
    max-height: 180px;
    overflow-y: auto;
}

.folio-charge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg-main);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 0.8rem;
}

/* ==========================================================================
   CHANNEL MANAGER 100% AUTOMATIZADO STYLES
   ========================================================================== */

.ota-hero-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.ota-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.ota-hero-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.ota-stat-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 18px;
    text-align: center;
    min-width: 120px;
}

.ota-stat-num {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ota-stat-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Flow Grid */
.ota-flow-grid {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.ota-flow-card {
    flex: 1;
    min-width: 220px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
    position: relative;
}

.ota-flow-card.highlight {
    border-color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.05);
}

.ota-flow-step {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.ota-flow-card.highlight .ota-flow-step {
    background: var(--accent-emerald);
    color: #000;
}

.ota-flow-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.ota-flow-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.ota-flow-arrow {
    font-size: 1.4rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .ota-flow-arrow { display: none; }
}

/* Channels Grid */
.ota-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.ota-channel-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ota-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.ota-channel-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.booking-logo { background-color: #003b95; }
.airbnb-logo { background-color: #ff5a5f; }
.expedia-logo { background-color: #ffd100; color: #000 !important; }
.despegar-logo { background-color: #7b1fa2; }

.ota-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.82rem;
    margin-bottom: 14px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.ota-metric-row {
    display: flex;
    justify-content: space-between;
}

.ota-card-footer {
    display: flex;
    gap: 8px;
}

.ota-terminal-logs {
    background-color: #080d1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.78rem;
    height: 240px;
    overflow-y: auto;
    color: #4ade80;
    line-height: 1.6;
}

.ota-log-item {
    margin-bottom: 4px;
    word-break: break-all;
}

.ota-log-item.alert {
    color: #fbbf24;
}

.ota-log-item.success {
    color: #34d399;
}

/* ==========================================================================
   MARKETING, WEB & REDES SOCIALES STYLES
   ========================================================================== */

/* Subtab views */
.marketing-sub-view {
    animation: fadeIn 0.25s ease-in-out;
}

/* Promo discount buttons */
.promo-discount-btn {
    flex: 1;
    padding: 8px 10px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.promo-discount-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.promo-discount-btn.active {
    background: var(--accent-emerald-soft);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

/* Photo selector */
.promo-photo-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 6px;
}

.promo-photo-thumb {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.promo-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.promo-photo-thumb:hover img {
    transform: scale(1.05);
}

.promo-photo-thumb.active {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.promo-photo-thumb .photo-check {
    display: none;
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--accent-emerald);
    color: #000;
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.promo-photo-thumb.active .photo-check {
    display: flex;
}

/* Mockup Container */
.mockup-view {
    animation: fadeIn 0.2s ease-in-out;
}

/* Instagram Mockup */
.ig-mockup-frame {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    max-width: 420px;
    margin: 0 auto;
}

.ig-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ig-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.85rem;
}

.ig-image-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #000;
}

.ig-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ig-promo-ribbon {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: linear-gradient(135deg, #dc2626, #ea580c);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
}

.ig-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
}

.ig-caption-box {
    padding: 0 14px 14px;
    font-size: 0.82rem;
    line-height: 1.4;
    max-height: 140px;
    overflow-y: auto;
}

/* Web Floating Banner Mockup */
.web-banner-mockup {
    background: #0b1329;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.web-banner-top-bar {
    background: linear-gradient(90deg, #d97706, #b45309);
    color: #fff;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    gap: 12px;
}

.web-banner-btn {
    background: #fff;
    color: #92400e;
    border: none;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.web-banner-btn:hover {
    background: #fef3c7;
}

.web-banner-preview-body {
    background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* WhatsApp Bot Mockup */
.wa-mockup-box {
    background: #0b141a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 16px 16px;
}

/* Media Gallery Grid */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.media-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.media-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-emerald);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.media-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.media-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-card-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.media-card-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.media-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

/* Media Section Pills & Badges */
.media-section-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.media-section-pill:hover,
.media-section-pill.active {
    background-color: var(--accent-emerald-soft);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.media-dest-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-section-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

/* ==========================================================================
   SIDEBAR SECTION HEADERS (POSICIÓN 1 MODULAR)
   ========================================================================== */

.sidebar-section-header {
    padding: 14px 12px 6px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 8px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-section-header:first-child {
    border-top: none;
    margin-top: 0;
}

/* ==========================================================================
   CHECKLIST DE COMODIDADES ESTILO BOOKING.COM
   ========================================================================== */

.amenity-category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.amenity-category-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.3);
}

.amenity-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.amenity-category-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amenity-category-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.25);
    white-space: nowrap;
}

.amenity-items-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.amenity-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    min-height: 64px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    transition: var(--transition-smooth);
    cursor: pointer;
    min-width: 0;
    gap: 12px;
}

.amenity-item-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.amenity-item-row.active {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.3);
}

.amenity-item-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.amenity-item-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.amenity-item-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
    word-break: break-word;
}

.amenity-item-desc {
    font-size: 0.73rem;
    color: var(--text-secondary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.amenity-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 8px;
}

.amenity-mode-badge {
    font-size: 0.67rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.25);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.amenity-mode-badge.extra {
    background: rgba(234, 179, 8, 0.12);
    color: var(--accent-gold);
    border-color: rgba(234, 179, 8, 0.25);
}

.amenity-season-badge {
    font-size: 0.67rem;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid #10b981;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.15s ease;
}

.amenity-season-badge:hover {
    transform: scale(1.04);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

.amenity-season-badge.seasonal {
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
    border-color: #f59e0b;
}

.amenity-season-badge.seasonal:hover {
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

/* Custom Checkbox Switch */
.switch-box {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.switch-box input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #fff;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.switch-box input:checked + .switch-slider {
    background-color: var(--accent-emerald);
    border-color: var(--accent-emerald);
}

.switch-box input:checked + .switch-slider:before {
    transform: translateX(18px);
}

/* ==========================================================================
   SISTEMA DE NOTIFICACIONES FLOTANTES (SMOOTH TOAST NOTIFICATIONS)
   ========================================================================== */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-notification {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(16, 185, 129, 0.45);
    border-left: 5px solid var(--accent-emerald);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 350px;
    max-width: 460px;
    box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.65), 0 0 15px rgba(16, 185, 129, 0.2);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: var(--text-primary);
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
}

.toast-notification.hide {
    animation: toastFadeOut 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toast-message {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.45;
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.toast-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}


/* Sortable Table Headers */
.sortable-th {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.sortable-th:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--accent-emerald, #10b981);
}
.sortable-th .sort-icon {
    font-size: 0.75rem;
    margin-left: 4px;
    display: inline-block;
    opacity: 0.8;
}
.sortable-th.active-sort {
    color: var(--accent-emerald, #10b981);
    font-weight: 700;
}

/* ==========================================================================
   CONFIGURACIÓN & MI HOTEL - SPLIT LAYOUT (SIDEBAR IZQUIERDO + FEED CENTRAL)
   ========================================================================== */
.config-split-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    height: calc(100vh - var(--header-height) - 24px);
    max-height: calc(100vh - var(--header-height) - 24px);
    min-height: 0;
    overflow: hidden;
    background-color: var(--bg-card);
    margin-top: 0;
    margin-bottom: 0;
    box-shadow: var(--shadow-premium);
}

@media (min-width: 768px) {
    .config-split-layout {
        grid-template-columns: 290px 1fr;
        grid-template-rows: minmax(0, 1fr);
    }
}

@media (min-width: 1200px) {
    .config-split-layout {
        grid-template-columns: 310px 1fr;
        grid-template-rows: minmax(0, 1fr);
    }
}

.config-sidebar-pane {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background-color: var(--bg-card);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.config-sidebar-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-card);
}

.config-sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 6px 0;
}

.config-group-header {
    padding: 10px 14px 4px 14px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.config-group-header.group-property { color: var(--accent-emerald, #10b981); }
.config-group-header.group-commercial { color: var(--accent-gold, #f59e0b); }
.config-group-header.group-channels { color: #60a5fa; }
.config-group-header.group-system { color: var(--text-muted, #94a3b8); }

.config-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.config-nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.config-nav-item.active {
    background: rgba(16, 185, 129, 0.12);
    border-left-color: var(--accent-emerald, #10b981);
}

.config-nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.config-nav-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 1.8 !important;
    fill: none !important;
    stroke: currentColor !important;
    display: block !important;
}

.config-nav-item.active .config-nav-icon {
    color: var(--accent-emerald, #10b981);
}

.config-nav-info {
    flex: 1;
    min-width: 0;
}

.config-nav-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-nav-item.active .config-nav-title {
    color: #fff;
}

.config-nav-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.config-feed-pane {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.config-feed-header {
    display: none !important;
}

.config-feed-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.config-feed-title-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-emerald, #10b981);
}

.config-feed-title-text h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #fff;
    font-weight: 700;
}

.config-feed-title-text p {
    margin: 2px 0 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.config-feed-scroll {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 20px 80px 20px;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

.config-feed-scroll.channels-active-mode {
    padding: 0 !important;
    overflow: hidden !important;
}

#hotel-channels,
#hotel-payments {
    height: 100%;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

/* ==========================================================================
   SIDEBAR HOTEL PROFILE (ESTILO WHATSAPP BUSINESS / INSTAGRAM)
   ========================================================================== */

.sidebar-brand-profile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    user-select: none;
    overflow: hidden;
    min-height: 52px;
}

.sidebar-brand-profile .sidebar-toggle-btn {
    position: absolute;
    top: 13px;
    right: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.sidebar-brand-profile .sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: var(--accent-gold, #c5a880);
}

/* Isotipo en Círculo Redondo Estilo Perfil WhatsApp / Instagram */
.hotel-avatar-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50% !important;
    border: 2px solid var(--accent-gold, #c5a880) !important;
    box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.2), 0 4px 14px rgba(0, 0, 0, 0.6) !important;
    background: radial-gradient(circle, #1e293b 0%, #090d16 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    overflow: visible !important;
    padding: 3px !important;
    margin: 0 auto;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

.hotel-avatar-wrapper:hover {
    transform: scale(1.08);
    border-color: #fff !important;
    box-shadow: 0 0 0 4px rgba(197, 168, 128, 0.35), 0 6px 18px rgba(0, 0, 0, 0.7) !important;
}

.hotel-avatar-wrapper-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hotel-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 50% !important;
    display: block !important;
    background: transparent !important;
    user-select: none;
    pointer-events: none;
}

/* Badge Pequeño de Cámara Estilo WhatsApp en la esquina inferior del círculo */
.avatar-camera-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-gold, #c5a880);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0c0d0e;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 4;
}

.hotel-avatar-wrapper:hover .avatar-camera-badge {
    transform: scale(1.15);
    background: #fff;
}

/* Bajada y Nombre del Hotel debajo del Isotipo Circular */
.hotel-brand-info {
    margin-top: 10px;
    text-align: center;
    width: 100%;
    max-width: 220px;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.25s ease;
}

.hotel-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.hotel-brand-tagline {
    font-size: 0.73rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Collapsed state adjustments (Cero cortes de texto al colapsar el menú lateral) */
.sidebar.collapsed .sidebar-brand-profile {
    padding: 12px 0 !important;
    align-items: center !important;
    justify-content: center !important;
}

.sidebar.collapsed .sidebar-brand-profile .sidebar-toggle-btn {
    display: none !important;
}

.sidebar.collapsed .hotel-avatar-wrapper {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 4px !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3), 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    margin: 0 auto !important;
}

.sidebar.collapsed .hotel-brand-info,
.sidebar.collapsed .hotel-brand-name,
.sidebar.collapsed .hotel-brand-tagline {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* ==========================================================================
   SAAS MODULAR MARKETPLACE CARDS (ESTILO PUALY TRADING)
   ========================================================================== */

.trading-module-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.trading-module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.45);
    border-color: rgba(197, 168, 128, 0.5) !important;
}

.trading-module-card.active-module {
    border-color: rgba(197, 168, 128, 0.4) !important;
    background: linear-gradient(145deg, #16181d 0%, #1a1d24 100%) !important;
}

.trading-module-card.inactive-module {
    opacity: 0.7;
    filter: grayscale(0.2);
}

.module-price-input:focus {
    outline: none;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 2px rgba(197, 168, 128, 0.25);
}

/* ==========================================================================
   MÓDULO CORE: INVENTARIO & CONFIGURACIÓN DE HABITACIONES (WIZARD PROGRESIVO)
   ========================================================================== */

/* Progress Bar del Wizard */
.wizard-progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 14px;
    padding: 0 8px;
}
.wizard-progress-bar::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}
.wizard-step-node {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.wizard-step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}
.wizard-step-node.active .wizard-step-circle {
    background: var(--accent-emerald, #10b981);
    border-color: #10b981;
    color: #fff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}
.wizard-step-node.completed .wizard-step-circle {
    background: #059669;
    border-color: #059669;
    color: #fff;
}
.wizard-step-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    max-width: 85px;
}
.wizard-step-node.active .wizard-step-label {
    color: var(--accent-emerald, #10b981);
}

/* Card Grid para Tipos de Habitación */
.room-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.room-type-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.room-type-card:hover {
    border-color: var(--accent-emerald, #10b981);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.room-type-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald, #10b981);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Tags de Amenities & Cocina */
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.tag-pill.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-emerald, #10b981);
    color: #fff;
    font-weight: 600;
}
.tag-pill-add {
    background: rgba(214, 158, 46, 0.12);
    border: 1px dashed var(--accent-gold, #d69e2e);
    color: var(--accent-gold, #d69e2e);
}
.tag-pill-add:hover {
    background: rgba(214, 158, 46, 0.25);
    color: #fff;
}

/* ==========================================================================
   SPOTLIGHT SEARCH (CTRL + K) & RATE DERIVATION MATRIX STYLES
   ========================================================================== */

/* Sidebar Search Box Container & Dropdown Styling */
.sidebar-search-box {
    padding: 10px 14px;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-sidebar, #1e293b) !important;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.spotlight-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-sidebar, #1e293b) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px;
    padding: 8px 12px;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.spotlight-input-wrapper:hover,
.spotlight-input-wrapper:focus-within {
    border-color: var(--accent-emerald, #10b981) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
    background: rgba(16, 185, 129, 0.12) !important;
}

.spotlight-input-wrapper input,
#spotlight-input {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: #ffffff !important;
    outline: none !important;
    width: 100%;
    font-size: 13.5px;
    font-weight: 500;
}

/* Prevenir que el navegador imponga un fondo blanco por autofill o estado de foco */
#spotlight-input:-webkit-autofill,
#spotlight-input:-webkit-autofill:hover,
#spotlight-input:-webkit-autofill:focus,
#spotlight-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.spotlight-input-wrapper input::placeholder {
    color: #94a3b8 !important;
}

.spotlight-results-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 10px;
    right: 10px;
    width: calc(100% - 20px);
    background: var(--bg-sidebar, #1e293b);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.85);
    z-index: 9999;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px 0;
    box-sizing: border-box;
}
.spotlight-results-dropdown.hidden {
    display: none !important;
}

.spotlight-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    gap: 8px;
    overflow: hidden;
}
.spotlight-item:last-child {
    border-bottom: none;
}
.spotlight-item:hover, .spotlight-item.focused {
    background: rgba(16, 185, 129, 0.2);
}

.spotlight-item-title {
    font-weight: 600;
    font-size: 0.8rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.spotlight-item-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
    flex-shrink: 0;
    display: none;
}
.spotlight-item:hover .spotlight-item-badge {
    background: rgba(16, 185, 129, 0.25);
    color: var(--accent-emerald, #10b981);
}

.spotlight-highlight {
    color: var(--accent-gold, #f59e0b);
    font-weight: 700;
}

/* Room Derivation & OTA Switch Matrix */
.switch-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}
.switch-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-emerald, #10b981);
    cursor: pointer;
}
.room-ota-matrix-table th {
    text-align: center;
    background: rgba(255,255,255,0.03);
}
.room-ota-matrix-table td {
    text-align: center;
    vertical-align: middle;
}

/* ==========================================================================
   PLANO DE OCUPACIÓN EN VIVO (MAPA DE CASA HOY) STYLES
   ========================================================================== */
.occupancy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.occupancy-card {
    background: var(--bg-card, #0f172a);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

.occupancy-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.occupancy-card.status-occupied {
    border-left: 5px solid #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), var(--bg-card, #0f172a));
}

.occupancy-card.status-checkin {
    border-left: 5px solid #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), var(--bg-card, #0f172a));
}

.occupancy-card.status-checkout {
    border-left: 5px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), var(--bg-card, #0f172a));
}

.occupancy-card.status-vacant {
    border-left: 5px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), var(--bg-card, #0f172a));
}

.occupancy-card.status-ooo {
    border-left: 5px solid #6b7280;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.08), var(--bg-card, #0f172a));
}

.occupancy-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 8px;
}

.occupancy-room-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    display: flex;
    align-items: center;
    gap: 8px;
}

.occupancy-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.occupancy-badge.occupied { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.occupancy-badge.checkin { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.occupancy-badge.checkout { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.occupancy-badge.vacant { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.occupancy-badge.ooo { background: rgba(107, 114, 128, 0.18); color: #9ca3af; border: 1px solid rgba(107, 114, 128, 0.3); }

.occupancy-card-body {
    font-size: 0.82rem;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.occupancy-guest-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary, #ffffff);
}

.occupancy-info-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.8rem;
}

.occupancy-card-actions {
    display: flex;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px;
    flex-wrap: wrap;
}

/* ==========================================================================
   PUALY NO-CODE WEBSITE BUILDER (SPLIT-VIEW & LIVE PREVIEW IN RAM)
   ========================================================================== */

.wb-split-container {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 20px;
    height: calc(100vh - 120px);
    overflow: hidden;
}

@media (max-width: 1200px) {
    .wb-split-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
}

/* Left Pane: Controls */
.wb-controls-pane {
    background: #111315;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 18px;
    gap: 14px;
}

.wb-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
    flex-wrap: wrap;
}

.wb-header-actions {
    display: flex;
    gap: 8px;
}

/* Accordion Cards */
.wb-card {
    background: #181A1D;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.wb-card:hover {
    border-color: rgba(197, 168, 128, 0.3);
}

.wb-card-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    user-select: none;
}

.wb-card-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}

.wb-acc-toggle {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.wb-acc-toggle.collapsed {
    transform: rotate(-90deg);
}

.wb-card-body {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.wb-card-body.collapsed {
    display: none;
}

.wb-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.wb-char-count {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.wb-char-count.good { color: var(--accent-emerald); }
.wb-char-count.warn { color: #f59e0b; }

/* Template Selector Pills */
.wb-template-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.wb-tpl-option {
    background: #111315;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wb-tpl-option:hover {
    border-color: rgba(197, 168, 128, 0.5);
    background: #1A1D20;
}

.wb-tpl-option.active {
    border-color: var(--accent-gold);
    background: rgba(197, 168, 128, 0.08);
    box-shadow: 0 0 12px rgba(197, 168, 128, 0.2);
}

.wb-tpl-badge {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 10px;
    margin-bottom: 6px;
    font-weight: 700;
    display: inline-block;
}

.wb-tpl-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.wb-tpl-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Palette Selector */
.wb-palette-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.wb-pal-option {
    background: #111315;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.wb-pal-option:hover {
    border-color: var(--accent-gold);
}

.wb-pal-option.active {
    border-color: var(--accent-gold);
    background: rgba(197, 168, 128, 0.1);
    color: #fff;
}

.wb-swatches {
    display: flex;
    gap: 4px;
}

.wb-swatches span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Toggle row */
.wb-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.wb-media-picker-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
}

.wb-media-picker-box img {
    width: 60px;
    height: 44px;
    object-fit: cover;
    border-radius: 4px;
}

/* Dynamic Section Card in Accordion 4 */
.wb-dyn-card {
    background: #131518;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wb-dyn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wb-dyn-title-input {
    background: transparent;
    border: 1px solid transparent;
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 4px 6px;
    border-radius: 4px;
    flex: 1;
}

.wb-dyn-title-input:focus {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--accent-gold);
    outline: none;
}

.wb-dyn-actions {
    display: flex;
    gap: 4px;
}

.wb-btn-icon {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.wb-btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.wb-btn-icon.delete:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Right Pane: Live Preview Device Frame */
.wb-preview-pane {
    background: #090A0B;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px;
}

.wb-preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.wb-preview-device-switch {
    display: flex;
    background: #181A1D;
    border-radius: 6px;
    padding: 3px;
    border: 1px solid var(--border-color);
}

.wb-device-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wb-device-btn.active {
    background: var(--accent-gold);
    color: #0C0D0E;
}

.wb-preview-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--accent-emerald);
}

/* Device Mockup */
.wb-device-frame {
    flex: 1;
    background: #111315;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    margin: 0 auto;
}

.wb-device-frame.desktop {
    width: 100%;
    height: 100%;
}

.wb-device-frame.mobile {
    width: 375px;
    height: 94%;
    border-radius: 30px;
    border: 8px solid #222;
}

.wb-device-bar {
    background: #1A1D20;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wb-device-bar .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.wb-device-bar .dot.red { background: #ef4444; }
.wb-device-bar .dot.yellow { background: #f59e0b; }
.wb-device-bar .dot.green { background: #10b981; }

.wb-device-url {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-left: 12px;
    font-family: monospace;
}

.wb-live-render-container {
    flex: 1;
    overflow-y: auto;
    background: #0C0D0E;
    color: #fff;
    position: relative;
    scroll-behavior: smooth;
}

.wb-section-block {
    scroll-margin-top: 75px;
    position: relative;
    transition: all 0.3s ease;
}

/* ==========================================================================
   HOTEL WEBSITE ENGINE - FULL CANVAS STUDIO STYLES
   ========================================================================== */

.wb-studio-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 72px);
    overflow: hidden;
    background: #08090A;
    position: relative;
}

/* ==========================================================================
   FLOATING HAMBURGER STUDIO CONTROLS & SLIDE-OUT DRAWER
   ========================================================================== */

.wb-floating-header-pill {
    position: absolute;
    top: 16px;
    left: 20px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(12, 13, 14, 0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(197, 168, 128, 0.4);
    border-radius: 40px;
    padding: 6px 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.wb-hamburger-trigger-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: var(--accent-gold);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.wb-hamburger-trigger-btn:hover {
    background: rgba(197, 168, 128, 0.15);
    color: #FFFFFF;
}

.wb-hamburger-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 16px;
}

.wb-hamburger-lines span {
    display: block;
    height: 2px;
    background-color: var(--accent-gold);
    border-radius: 2px;
    transition: all 0.2s ease;
}

.wb-floating-pill-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    padding-left: 10px;
}

.wb-pill-action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #E5E7EB;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wb-pill-action-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
}

.wb-pill-action-btn.publish {
    background: linear-gradient(135deg, #10B981, #059669);
    border-color: #059669;
    color: #FFFFFF;
    font-weight: 700;
}

.wb-pill-action-btn.publish:hover {
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.wb-studio-drawer {
    position: fixed !important;
    top: 70px !important;
    left: var(--sidebar-width, 72px) !important;
    bottom: 0 !important;
    width: 380px !important;
    max-width: calc(100vw - var(--sidebar-width, 72px)) !important;
    height: calc(100vh - 70px) !important;
    background: #1e293b !important; /* Grisecito elegante Pualy Slate sobre el feed */
    border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 9999 !important;
    display: none;
    flex-direction: column;
    box-shadow: 15px 0 45px rgba(0, 0, 0, 0.5) !important;
    transform: translateX(-120%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.wb-studio-drawer.active {
    display: flex !important;
    transform: translateX(0) !important;
}

.wb-drawer-backdrop {
    display: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

.wb-drawer-backdrop.active {
    display: none !important;
}

.wb-drawer-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b !important; /* Mismo color exacto del lienzo de la app, sin negro */
}

.wb-drawer-close-btn {
    background: #273549 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
    font-size: 0.95rem;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.wb-drawer-close-btn:hover {
    background: #33445c !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.wb-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wb-drawer-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wb-drawer-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.5px;
}

/* Style cards in drawer */
.wb-style-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.wb-style-card {
    background: #273549;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 12px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wb-style-card:hover {
    border-color: var(--accent-gold);
    background: #33445c;
}

.wb-style-card.active {
    border-color: var(--accent-gold);
    background: rgba(214, 158, 46, 0.16);
    box-shadow: 0 0 12px rgba(214, 158, 46, 0.25);
}

.wb-style-card-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.wb-style-card-desc {
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.35;
}

.wb-studio-header {
    background: #111316;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    z-index: 10;
}

.wb-studio-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wb-studio-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.wb-studio-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.wb-studio-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.wb-ctrl-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wb-ctrl-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wb-btn-segmented {
    display: flex !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    gap: 8px !important;
    width: 100% !important;
}

.wb-seg-btn {
    flex: 1 !important;
    background: #273549 !important; /* Mismo color gris exacto que 'Agregar Sección del Catálogo' */
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    padding: 9px 8px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
}

.wb-seg-btn:hover {
    color: #FFFFFF !important;
    background: #33445c !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.wb-seg-btn.active {
    background: var(--accent-gold, #d69e2e) !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    border-color: var(--accent-gold, #d69e2e) !important;
    box-shadow: 0 0 14px rgba(214, 158, 46, 0.4) !important;
}

/* Animaciones Cinemáticas para Modo Motion */
@keyframes wbKenBurns {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes wbGlowPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(214, 158, 46, 0); }
    50% { box-shadow: 0 0 20px rgba(214, 158, 46, 0.7); }
}

@keyframes wbFloatPill {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.wb-motion-active .wb-motion-hero-bg {
    animation: wbKenBurns 14s ease-in-out infinite alternate !important;
    transition: transform 0.5s ease;
}

.wb-motion-active .wb-motion-glow {
    animation: wbGlowPulse 2.8s infinite !important;
}

.wb-motion-active .wb-motion-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease !important;
}

.wb-motion-active .wb-motion-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55) !important;
}

.wb-drawer-section .btn-secondary {
    background: #273549;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    font-weight: 600;
    transition: all 0.2s ease;
}

.wb-drawer-section .btn-secondary:hover {
    background: #33445c;
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.wb-studio-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wb-canvas-workspace {
    flex: 1;
    overflow: hidden;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: #090A0C;
}

.wb-sync-badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Catalog Grid & Cards */
.wb-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.wb-catalog-card {
    background: #1A1D22;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.wb-catalog-card:hover {
    border-color: var(--accent-gold);
    background: #22262C;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.wb-catalog-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.wb-catalog-icon {
    font-size: 1.4rem;
}

.wb-catalog-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #FFFFFF;
}

.wb-catalog-desc {
    font-size: 0.74rem;
    color: #9CA3AF;
    line-height: 1.35;
    margin-bottom: 12px;
}

.wb-catalog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 8px;
}

.wb-catalog-source-tag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.wb-catalog-source-tag.extranet {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
}

.wb-catalog-source-tag.custom {
    background: rgba(56, 189, 248, 0.15);
    color: #38BDF8;
}

.wb-catalog-add-btn {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-gold);
    background: rgba(197, 168, 128, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(197, 168, 128, 0.3);
    transition: all 0.15s;
}

.wb-catalog-card:hover .wb-catalog-add-btn {
    background: var(--accent-gold);
    color: #0C0D0E;
}

/* In-Canvas Section Wrapper with Overlay Actions */
.wb-section-block {
    position: relative;
    transition: outline 0.2s ease;
}

.wb-section-block:hover {
    outline: 2px dashed rgba(197, 168, 128, 0.5);
    outline-offset: -2px;
}

.wb-section-toolbar {
    position: absolute;
    top: 10px;
    right: 14px;
    display: none;
    align-items: center;
    gap: 4px;
    background: rgba(12, 13, 14, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(197, 168, 128, 0.3);
    border-radius: 6px;
    padding: 4px 6px;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.wb-section-block:hover .wb-section-toolbar {
    display: flex;
}

.wb-tool-btn {
    background: transparent;
    border: none;
    color: #D1D5DB;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wb-tool-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.wb-tool-btn.delete:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #F87171;
}

/* Canvas Add Section Divider Button */
.wb-canvas-add-divider {
    padding: 24px 20px;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    margin: 20px 24px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(255, 255, 255, 0.02);
}

.wb-canvas-add-divider:hover {
    border-color: var(--accent-gold);
    background: rgba(197, 168, 128, 0.05);
    transform: scale(1.005);
}

.wb-canvas-add-divider-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ============================================================
   ESTILOS: USUARIOS Y PERMISOS (RBAC & AUDIT LOG)
   Pualy Resort & Spa — Ecosistema Hotelero & IA
   ============================================================ */

/* Badges de Roles Adicionales */
.badge-purple {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.badge-teal {
    background: rgba(20, 184, 166, 0.18);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.35);
}
.badge-orange {
    background: rgba(249, 115, 22, 0.18);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.35);
}
.badge-muted {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Tarjeta de Empleado */
.user-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.user-card:hover {
    border-color: rgba(16, 185, 129, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.user-card.is-active-shift {
    border-color: var(--accent-emerald);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.18);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.06), var(--bg-card));
}
.user-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}
.user-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 78, 59, 0.6));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.user-card-info {
    flex: 1;
    min-width: 0;
}
.user-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 2px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-card-username {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.user-card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.user-card-metric {
    font-size: 0.75rem;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}
.user-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Tarjeta de Módulo de Permisos dentro del Modal */
.perm-module-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.perm-module-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
}
.perm-module-header {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.perm-module-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
}
.perm-module-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-perm-quick {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-perm-quick:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* Grilla de Cuadraditos y Tildes (Checkbox Items) */
.perm-checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    padding: 14px 16px;
}
.perm-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}
.perm-checkbox-item:hover {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.3);
}
.perm-checkbox-item.checked {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.45);
}
.perm-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #10b981;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}
.perm-checkbox-content {
    flex: 1;
    min-width: 0;
}
.perm-checkbox-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f1f5f9;
    display: block;
    line-height: 1.3;
}
.perm-checkbox-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.3;
}

/* Tarjetas de Roles Predefinidos */
.role-preset-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}
.role-preset-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}
.role-preset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.role-preset-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}
.role-preset-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 14px;
}
.role-preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.role-chip {
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Teclado Numérico de PIN de Turno */
.pin-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    transition: all 0.15s ease;
}
.pin-circle.filled {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    transform: scale(1.15);
}
.keypad-btn {
    height: 48px;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s ease;
}
.keypad-btn:active {
    transform: scale(0.94);
}

/* ==========================================================================
   REPOSITORIO MULTIMEDIA AVANZADO (FOTOS & VIDEOS)
   ========================================================================== */

/* Dropzone interactivo dentro de modal y contenedor de Galería */
.media-modal-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.media-modal-dropzone:hover,
.media-modal-dropzone.dragover {
    border-color: var(--accent-gold, #c5a880);
    background: rgba(197, 168, 128, 0.08);
}

/* Badge de Video y Play Overlay */
.media-type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.media-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0.85;
    transition: all 0.2s ease;
}

.media-card-img-wrap:hover .media-play-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.4);
}

.media-play-btn-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(197, 168, 128, 0.9);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease;
}

.media-card-img-wrap:hover .media-play-btn-circle {
    transform: scale(1.12);
    background: #ffd700;
}

/* Tira de Batch Upload */
.media-batch-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 4px;
    margin-top: 14px;
}

.media-batch-thumb {
    position: relative;
    width: 74px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.media-batch-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-batch-thumb .remove-thumb {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: #f87171;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ==========================================================================
   SWITCHES ON/OFF & CARDS AUTOADMINISTRABLES (POLÍTICAS & SUPLEMENTOS)
   ========================================================================== */
.pms-switch, .switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
}

.pms-switch input, .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pms-switch-slider, .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: .25s ease;
    border-radius: 22px;
}

.pms-switch-slider:before, .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: #f8fafc;
    transition: .25s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.pms-switch input:checked + .pms-switch-slider,
.switch input:checked + .slider {
    background-color: #10b981;
    border-color: #059669;
}

.pms-switch input:checked + .pms-switch-slider:before,
.switch input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 22px;
}

.slider.round:before {
    border-radius: 50%;
}

.policy-selector-card.policy-disabled {
    opacity: 0.55;
    filter: grayscale(25%);
}

.ota-room-row-disabled {
    opacity: 0.45 !important;
    filter: grayscale(85%) !important;
    background: rgba(0, 0, 0, 0.22) !important;
    transition: all 0.25s ease !important;
}

.ota-room-row-disabled .room-ota-code-input {
    opacity: 0.65;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted) !important;
}

.policy-card-item, .supplement-card-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.policy-card-item:hover, .supplement-card-item:hover {
    border-color: rgba(197, 168, 128, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   ESTACIÓN DE REDACCIÓN INTELIGENTE CRM & BARRA DE ÍCONOS SOBRIOS
   ========================================================================== */

.chat-editor-card {
    display: flex;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 10px;
    margin: 10px 14px;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-editor-card:focus-within {
    border-color: rgba(197, 168, 128, 0.45);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.chat-editor-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 4px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.chat-editor-status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.chat-editor-status-indicator .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-emerald, #10b981);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.editor-header-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.editor-header-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.chat-textarea-wrapper {
    position: relative;
    width: 100%;
}

.chat-textarea-input {
    width: 100%;
    min-height: 52px;
    max-height: 180px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    line-height: 1.45;
    padding: 6px 4px;
    resize: none;
    outline: none;
    overflow-y: auto;
}

.chat-textarea-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.chat-editor-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.editor-tools-group, .editor-actions-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.editor-tools-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 3px;
}

.editor-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.editor-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.editor-icon-btn:active {
    transform: scale(0.94);
}

/* ==========================================================================
   TOOLTIPS FLOTANTES HACIA ARRIBA (SEGUROS ANTE BARRA DE TAREAS)
   ========================================================================== */

[data-tooltip-up] {
    position: relative !important;
}

.chat-action-icon-btn svg,
.btn-send-circle-green svg {
    pointer-events: none;
}

[data-tooltip-up]::after {
    content: attr(data-tooltip-up);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #090d16;
    color: #f1f5f9;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 9px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
}

[data-tooltip-up]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip seguro para el borde derecho */
[data-tooltip-up-right]::after {
    left: auto !important;
    right: 0 !important;
    transform: translateY(4px) !important;
}

[data-tooltip-up-right]:hover::after {
    transform: translateY(0) !important;
}

/* Tooltip seguro para el borde izquierdo (evita desborde hacia la izquierda) */
[data-tooltip-up-left]::after {
    left: 0 !important;
    right: auto !important;
    transform: translateY(4px) !important;
}

[data-tooltip-up-left]:hover::after {
    transform: translateY(0) !important;
}

/* Selector de Corrector Ortográfico */
.spellcheck-lang-pill {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 2px 6px;
    height: 32px;
    margin-right: 4px;
}

.spellcheck-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.74rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    padding-left: 2px;
}

.spellcheck-select option {
    background: #1e293b;
    color: #f8fafc;
}

/* Botón Circular Verde de Enviar (100% Redondo, Cero Óvalo) */
.btn-send-circle-green {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    background: #10b981 !important; /* Verde Esmeralda Pualy */
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35) !important;
    transition: transform 0.15s ease, background-color 0.15s ease !important;
}

.btn-send-circle-green:hover {
    transform: scale(1.08) !important;
    background: #059669 !important;
}

.btn-send-circle-green:active {
    transform: scale(0.94) !important;
}

.btn-send-circle:hover {
    transform: scale(1.08);
    background: #d4b88f;
    color: #000;
}

.btn-send-circle:active {
    transform: scale(0.95);
}

/* Popover de Emojis */
.emoji-picker-popover {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
    z-index: 1050;
    animation: fadeIn 0.15s ease-out;
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.emoji-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.emoji-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   MODAL FLOTANTE AMPLIO (70% DE LA PANTALLA)
   ========================================================================== */

.chat-expanded-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.chat-expanded-dialog {
    width: 70vw;
    height: 70vh;
    max-width: 1050px;
    min-height: 480px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: zoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-expanded-header {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
}

.chat-expanded-body {
    flex: 1;
    padding: 18px 20px;
    display: flex;
}

.expanded-textarea {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    color: #f8fafc;
    font-size: 0.98rem;
    line-height: 1.6;
    resize: none;
    outline: none;
}

.expanded-textarea:focus {
    border-color: rgba(197, 168, 128, 0.4);
}

.chat-expanded-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   SUBVISTAS DEL PANEL LATERAL DERECHO (PLANTILLAS & COTIZADOR)
   ========================================================================== */

.drawer-header {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
}

.btn-close-drawer {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.btn-close-drawer:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.template-search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    font-size: 0.82rem;
    outline: none;
}

.template-search-input:focus {
    border-color: var(--accent-gold, #c5a880);
}

.template-category-tabs {
    display: flex;
    padding: 2px 14px;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.template-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.template-tab-btn.active {
    color: var(--accent-gold, #c5a880);
    border-bottom-color: var(--accent-gold, #c5a880);
}

.template-cards-scroll {
    overflow-y: auto;
    max-height: calc(100vh - 280px);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-item-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.template-item-card:hover {
    border-color: rgba(197, 168, 128, 0.4);
    background: rgba(255, 255, 255, 0.04);
}

.fast-quote-scroll-body .quote-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
}

.quote-input, .quote-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 8px;
    color: #fff;
    font-size: 0.78rem;
    outline: none;
}

.quote-input:focus, .quote-select:focus {
    border-color: var(--accent-gold, #c5a880);
}

.quote-step-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--accent-gold, #c5a880);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    margin-top: 10px;
}

/* ==========================================================================
   SAAS MODULE SCOPE DETAIL MODAL (Diseño Bicolor Oficial)
   Superficie: #162235 | Paneles: #093f66 | Lienzo: #1e293b
   ========================================================================== */
.saas-scope-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: saasFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.saas-scope-card {
    background: #162235;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    width: 100%;
    max-width: 660px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    animation: saasSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes saasFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes saasSlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.saas-scope-header {
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.saas-scope-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold, #c5a880);
    flex-shrink: 0;
}

.saas-scope-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.saas-scope-badge.active {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--accent-emerald, #10b981);
}
.saas-scope-badge.inactive {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
}

.saas-scope-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}
.saas-scope-close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.06);
}

.saas-scope-body {
    padding: 20px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.saas-scope-section {
    display: flex;
    flex-direction: column;
}

.saas-scope-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-gold, #c5a880);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
    display: block;
}

.saas-scope-desc-text {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.saas-scope-injected-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.saas-scope-injected-item {
    background: rgba(9, 63, 102, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.saas-scope-injected-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.saas-scope-station-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.saas-scope-subsections-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 2px;
}

.saas-scope-sub-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.saas-scope-sub-pill strong {
    color: var(--accent-emerald, #10b981);
    font-weight: 600;
}

.saas-scope-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
}

.saas-scope-service-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.saas-scope-footer {
    padding: 14px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

/* ==========================================================================
   CATÁLOGO DE ALOJAMIENTO PMS: EDITOR EN 4 NIVELES & MULTIPLICADOR
   ========================================================================== */

/* Navegación de los 4 Niveles */
.editor-levels-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.editor-level-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    padding: 12px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.editor-level-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.editor-level-tab.active {
    color: var(--accent-emerald, #10b981);
    border-bottom-color: var(--accent-emerald, #10b981);
    background: rgba(16, 185, 129, 0.06);
}

.level-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
}

.editor-level-tab.active .level-badge {
    background: var(--accent-emerald, #10b981);
    color: #0f172a;
}

.editor-level-pane {
    display: none;
    animation: fadeIn 0.2s ease;
}

.editor-level-pane.active {
    display: block;
}

/* Tarjetas de Ocupaciones y Camas (Nivel 3) */
.occupancy-config-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    transition: border-color 0.2s;
}

.occupancy-config-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
}

.occupancy-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.occupancy-pax-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald, #10b981);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

.bed-choice-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.bed-choice-pill:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bed-choice-pill input[type="checkbox"]:checked + span {
    color: var(--accent-emerald, #10b981);
    font-weight: 600;
}

/* Multiplicador de Características (Nivel 2 y Modal) */
.amenity-multi-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    transition: all 0.2s ease;
}

.amenity-multi-item:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
}

.amenity-radio-btn-group {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px;
}

.amenity-radio-label {
    padding: 4px 10px;
    font-size: 0.72rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    margin: 0;
    color: var(--text-secondary);
}

.amenity-radio-label input {
    display: none;
}

.amenity-radio-label.active {
    background: var(--accent-emerald, #10b981);
    color: #0f172a;
    font-weight: 700;
}

/* Miniaturas de Catálogo */
.room-type-thumb-img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.channel-pill-tag {
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

/* ==========================================================================
   MODALES CON ENCABEZADO FIJO Y SCROLL INTERNO (PMS MODAL FLEX)
   Garantiza que el título y botones de acción nunca se tapen ni se pierdan al escrolear
   ========================================================================== */
.pms-modal.pms-modal-flex {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important; /* El contenedor modal no escrolea entero, escrolea su body interno */
}

.pms-modal.pms-modal-flex > .pms-modal-header {
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    background-color: #1e293b !important; /* Paleta oficial: lienzo principal opaco */
    border-bottom: 1px solid var(--border-color) !important;
}

.pms-modal.pms-modal-flex > .editor-levels-nav {
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 25 !important;
    background-color: #162235 !important; /* Superficie intermedia oficial */
    border-bottom: 1px solid var(--border-color) !important;
}

.pms-modal.pms-modal-flex > .pms-modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    scroll-padding-top: 20px !important;
    overscroll-behavior: contain !important;
}

.pms-modal.pms-modal-flex > .pms-modal-footer {
    flex-shrink: 0 !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 30 !important;
    background-color: #162235 !important;
    border-top: 1px solid var(--border-color) !important;
}

/* Contenedor desplegable de selección de habitaciones por característica */
.amenity-selector-box {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: rgba(9, 63, 102, 0.28); /* Azul océano tenue oficial */
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    margin-top: 8px;
    scroll-margin-top: 24px;
}

.amenity-multi-item {
    scroll-margin-top: 20px;
}

.occupancy-config-card {
    scroll-margin-top: 20px;
}

/* ==========================================================================
   MODULAR COBROS & PAGOS ARCHITECTURE (ESTRUCTURA DE 5 BLOQUES)
   ========================================================================== */
.payments-container-split {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.payments-sidebar-nav {
    width: 250px;
    flex-shrink: 0;
    background: var(--bg-card, #093f66);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.payments-sidebar-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    background: #162235;
}

.payments-nav-list {
    display: flex;
    flex-direction: column;
}

.payments-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    user-select: none;
}

.payments-nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.payments-nav-item.active {
    background: rgba(16, 185, 129, 0.12);
    border-left-color: var(--accent-emerald, #10b981);
}

.payments-nav-icon {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payments-nav-info {
    flex: 1;
    min-width: 0;
}

.payments-nav-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.payments-nav-item.active .payments-nav-title {
    color: #f8fafc;
    font-weight: 700;
}

.payments-nav-desc {
    font-size: 0.70rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.payments-content-area {
    flex: 1;
    min-width: 0;
}

.gateway-card {
    background: #162235;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gateway-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.gateway-card.active-gateway {
    border-color: rgba(16, 185, 129, 0.4);
}

.gateway-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

@media (max-width: 960px) {
    .payments-container-split {
        flex-direction: column;
    }
    .payments-sidebar-nav {
        width: 100% !important;
    }
}




/* ==========================================================================
   CONFIGURACIÓN - ACORDEÓN POR BLOQUES
   ========================================================================== */
.config-accordion-group {
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.config-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    border-radius: 6px;
    margin: 2px 6px;
}

.config-accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.config-accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.config-accordion-title svg {
    width: 17px;
    height: 17px;
    stroke-width: 2;
}

.config-accordion-header.group-property .config-accordion-title { color: var(--accent-emerald, #10b981); }
.config-accordion-header.group-commercial .config-accordion-title { color: var(--accent-gold, #f59e0b); }
.config-accordion-header.group-channels .config-accordion-title { color: #60a5fa; }
.config-accordion-header.group-system .config-accordion-title { color: var(--text-muted, #94a3b8); }

.config-accordion-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.config-accordion-group.expanded .config-accordion-chevron {
    transform: rotate(180deg);
}

.config-accordion-body {
    display: none;
    padding: 2px 0 6px 0;
    background: rgba(0, 0, 0, 0.08);
}

.config-accordion-group.expanded .config-accordion-body {
    display: block;
}

.config-accordion-group.expanded .config-accordion-header {
    background: rgba(255, 255, 255, 0.03);
}

/* ============================================================
   BUSCADOR GLOBAL INTELIGENTE (SPOTLIGHT & ACCESO DIRECTO)
   ============================================================ */
.global-search-container {
    position: relative;
    z-index: 999;
}

.global-search-input-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 4px 10px;
    width: 250px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.global-search-input-box:focus-within {
    width: 320px;
    border-color: var(--accent-gold);
    background: #162235;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.global-search-input-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.8rem;
    width: 100%;
    font-family: inherit;
}

.global-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 380px;
    max-height: 440px;
    background: #162235;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    z-index: 1000;
    padding: 6px;
}

.global-search-group-header {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-gold);
    padding: 6px 10px 4px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.global-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    text-align: left;
    width: 100%;
    background: transparent;
    color: inherit;
    box-sizing: border-box;
}

.global-search-item:hover,
.global-search-item.selected {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.global-search-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    color: var(--text-primary);
}

.global-search-item-content {
    flex: 1;
    min-width: 0;
}

.global-search-item-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-search-item-path {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.global-search-item-badge {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--accent-emerald);
    white-space: nowrap;
    flex-shrink: 0;
}

.global-search-highlight-target {
    outline: 2px solid var(--accent-gold) !important;
    box-shadow: 0 0 16px rgba(197, 168, 128, 0.4) !important;
    transition: all 0.3s ease !important;
}

@media (max-width: 1200px) {
    .global-search-input-box {
        width: 190px;
    }
    .global-search-input-box:focus-within {
        width: 260px;
    }
}

/* ============================================================
   MÓDULO SOPORTE Y HUB (3 COLUMNAS: HUB NAV + MIS CHATS + CHAT DUAL)
   ============================================================ */
.soporte-hub-container {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    height: calc(100vh - var(--header-height) - 16px);
    max-height: calc(100vh - var(--header-height) - 16px);
    min-height: 0;
    overflow: hidden;
    background-color: var(--bg-card);
    margin-top: -16px;
    margin-bottom: -16px;
    box-shadow: var(--shadow-premium);
}

/* COLUMNA 1: Menú de Secciones del Hub (200px) */
.soporte-hub-nav-pane {
    width: 200px;
    min-width: 200px;
    background: #093f66;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

.soporte-hub-nav-header {
    padding: 14px 14px 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.soporte-hub-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.soporte-hub-nav-title {
    margin: 6px 0 0 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 700;
}

.soporte-hub-nav-list {
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
}

.soporte-hub-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.soporte-hub-nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.soporte-hub-nav-item.active {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.3);
    color: #38bdf8;
    font-weight: 600;
}

.soporte-nav-icon {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    flex-shrink: 0;
}

.soporte-hub-count-pill {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.soporte-hub-nav-item.active .soporte-hub-count-pill {
    background: #0ea5e9;
    color: #fff;
}

.soporte-hub-count-pill.new {
    background: #10b981;
    color: #fff;
}

.soporte-hub-sla-card {
    margin: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-size: 0.72rem;
}

.soporte-sla-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.soporte-sla-sub {
    color: var(--text-muted);
    font-size: 0.68rem;
}

.soporte-sla-time {
    color: #34d399;
    font-size: 0.68rem;
    font-weight: 600;
    margin-top: 4px;
}

.soporte-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.soporte-status-indicator.online {
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* ÁREAS DE CONTENIDO DEL HUB */
.soporte-hub-content-area {
    flex: 1;
    min-width: 0;
    display: none;
    height: 100%;
    overflow: hidden;
}

.soporte-hub-content-area.active {
    display: flex;
    animation: fadeInSoporte 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.soporte-section-inner {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #1e293b;
}

.soporte-section-header {
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* SECCIÓN 1: VISTA DE CHATS (2 Columnas: Threads + Conversation) */
.soporte-chats-split-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* COLUMNA 2: Lista "Mis Chats" (280px) */
.soporte-threads-pane {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid var(--border-color);
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.soporte-threads-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.soporte-threads-scroll {
    flex: 1;
    overflow-y: auto;
}

.soporte-thread-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.soporte-thread-item:hover,
.soporte-thread-item.active {
    background-color: rgba(255, 255, 255, 0.04);
}

.soporte-thread-item.active {
    border-left: 3px solid #38bdf8;
    background-color: rgba(14, 165, 233, 0.08);
}

.soporte-thread-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.soporte-thread-info {
    flex: 1;
    min-width: 0;
}

.soporte-thread-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.soporte-thread-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.soporte-thread-time {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.soporte-thread-last {
    font-size: 0.76rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* COLUMNA 3: Conversación Activa con Burbujas Duales */
.soporte-conversation-pane {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #1e293b;
    height: 100%;
    overflow: hidden;
}

.soporte-conv-header {
    height: 56px;
    min-height: 56px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card);
    flex-shrink: 0;
}

.soporte-conv-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.soporte-conv-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.soporte-conv-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}

.soporte-conv-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* FEED DE BURBUJAS DUALES EXACTO AL CRM */
.soporte-conv-messages {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #1e293b;
}

.soporte-msg-row {
    display: flex;
    width: 100%;
}

.soporte-msg-row.received {
    justify-content: flex-start;
}

.soporte-msg-row.sent {
    justify-content: flex-end;
}

.soporte-msg-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 72%;
}

.soporte-msg-row.received .soporte-msg-wrapper {
    align-items: flex-start;
}

.soporte-msg-row.sent .soporte-msg-wrapper {
    align-items: flex-end;
}

.soporte-msg-author-tag {
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.2px;
}

.soporte-msg-author-tag.master {
    color: #38bdf8;
}

.soporte-msg-author-tag.hotel {
    color: #34d399;
}

.soporte-msg-bubble {
    padding: 9px 14px;
    border-radius: 12px;
    font-size: 0.86rem;
    line-height: 1.45;
    word-break: break-word;
}

.soporte-msg-row.received .soporte-msg-bubble {
    background-color: #093f66;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 0;
}

.soporte-msg-row.sent .soporte-msg-bubble {
    background-color: rgba(14, 165, 233, 0.22);
    border: 1px solid rgba(14, 165, 233, 0.4);
    color: var(--text-primary);
    border-top-right-radius: 0;
}

.soporte-msg-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.soporte-check-icon {
    color: #38bdf8;
    font-weight: bold;
    font-size: 0.72rem;
}

/* BARRA DE ENTRADA DEL CHAT */
.soporte-conv-input-bar {
    padding: 12px 18px;
    background: #093f66;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.soporte-attach-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.soporte-attach-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ESTILOS DE NOVEDADES, TICKETS Y AYUDA DENTRO DEL HUB */
.soporte-card {
    background: #093f66;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.soporte-news-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.soporte-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.soporte-news-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.soporte-news-tag.tag-update {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.4);
}

.soporte-news-tag.tag-feature {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.soporte-news-tag.tag-security {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.soporte-news-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.soporte-news-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    font-weight: 600;
}

.soporte-news-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

.soporte-news-meta {
    display: flex;
    gap: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 10px;
}

/* SUGERENCIAS */
.soporte-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.soporte-suggestion-item {
    display: flex;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    align-items: flex-start;
}

.soporte-sug-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 8px;
    min-width: 32px;
}

.soporte-vote-btn {
    background: transparent;
    border: none;
    color: #38bdf8;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 2px 0;
}

.soporte-sug-content strong {
    font-size: 0.88rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.soporte-sug-content p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0 0 8px 0;
}

/* CENTRO DE AYUDA */
.soporte-help-search-box {
    margin-bottom: 20px;
    max-width: 600px;
}

.soporte-help-grid {
    gap: 16px;
}

.help-category-card {
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.help-category-card:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 165, 233, 0.4);
}

.help-cat-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.help-category-card h4 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.help-category-card p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.help-cat-link {
    font-size: 0.75rem;
    color: #38bdf8;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .soporte-hub-container {
        flex-direction: column;
        height: auto;
        max-height: none;
    }
    .soporte-hub-nav-pane {
        width: 100%;
        min-width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }
    .soporte-chats-split-layout {
        flex-direction: column;
        height: auto;
    }
    .soporte-threads-pane {
        width: 100%;
        min-width: 100%;
        height: 260px;
    }
    .soporte-conversation-pane {
        height: 480px;
    }
}

/* ==========================================================================
   SERVICIOS & ADICIONALES UNIFICADOS - MASTER / DETAIL LAYOUT
   ========================================================================== */
.services-master-layout {
    display: flex;
    gap: 16px;
    align-items: stretch;
    width: 100%;
    height: calc(100vh - 160px);
    max-height: calc(100vh - 160px);
    overflow: hidden;
    margin-top: 4px;
}

.services-dept-sidebar {
    width: 250px;
    min-width: 250px;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    overflow: hidden;
}

.services-dept-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
    flex-shrink: 0;
}

.services-dept-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    flex: 1;
    padding-right: 4px;
}

.services-dept-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.84rem;
    font-weight: 500;
    user-select: none;
    flex-shrink: 0;
}

.services-dept-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.1);
}

.services-dept-item.active {
    background: var(--accent-emerald-soft);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
    font-weight: 600;
}

.services-dept-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.services-dept-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.services-dept-trash {
    background: transparent;
    border: none;
    color: #ef4444;
    opacity: 0.6;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: opacity 0.2s, background 0.2s;
}

.services-dept-trash:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.18);
}

.services-main-panel {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.services-main-panel .card {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
    margin-bottom: 0;
}

.services-main-panel .table-wrapper {
    flex: 1;
    overflow-y: auto;
    max-height: 100%;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.services-main-panel .pms-table thead th {
    position: sticky;
    top: 0;
    background: #093f66;
    z-index: 5;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
}

.service-thumb-container {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.18s ease;
}

.service-thumb-container:hover {
    transform: scale(1.08);
    border-color: var(--accent-emerald);
}

.service-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discount-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 12px;
    background: rgba(214, 158, 46, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(214, 158, 46, 0.35);
    margin-top: 3px;
}

.discount-calc-preview {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 10px;
    font-size: 0.8rem;
}

@media (max-width: 860px) {
    .services-master-layout {
        flex-direction: column;
        height: auto;
        max-height: none;
    }
    .services-dept-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
    }
    .services-dept-list {
        flex-direction: row;
        overflow-x: auto;
        max-height: none;
    }
    .services-main-panel {
        height: auto;
    }
}

/* ==========================================================================
   FICHA MAESTRA AMPLIA & PORTAL MÓVIL DE CHECK-IN
   ========================================================================== */
.pms-modal-wide {
    max-width: 1100px !important;
    width: 96vw !important;
    background-color: #162235 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

#modal-mobile-checkin-backdrop .pms-modal {
    background-color: #162235 !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6) !important;
}

#mob-signature-canvas {
    touch-action: none !important;
}

@media print {
    body * {
        visibility: hidden;
    }
    #modal-voucher-preview-backdrop,
    #modal-voucher-preview-backdrop * {
        visibility: visible;
    }
    #modal-voucher-preview-backdrop {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #ffffff !important;
        color: #000000 !important;
    }
}

/* Matriz de Amenities de Habitaciones: Estados Nítido y Apagado con Filtro */
.amenity-matrix-row {
    background: #093f66;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 14px 18px;
    transition: opacity 0.25s ease, filter 0.25s ease, border-color 0.25s ease;
}

.amenity-matrix-row.amenity-row-disabled {
    opacity: 0.42;
    filter: grayscale(0.65);
    border-color: rgba(255, 255, 255, 0.06);
}

.amenity-matrix-row.amenity-row-disabled:hover {
    opacity: 0.65;
    filter: grayscale(0.35);
}

.amenity-matrix-row.amenity-row-enabled {
    opacity: 1;
    filter: none;
}

/* ==========================================================================
   UNIVERSAL SYSTEM-WIDE LAYOUT OVERHAUL & DOUBLE-SCROLLBAR ELIMINATION
   ========================================================================== */

/* 1. Global Content Container: Flex Column, Single Viewport Height, No Global Scroll Trap */
.content-area {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100vh - var(--header-height)) !important;
    max-height: calc(100vh - var(--header-height)) !important;
    padding: 12px 18px !important;
    overflow: hidden !important;
    position: relative !important;
    box-sizing: border-box !important;
}

/* 2. Module Views: 100% Height Fill, Clean Top Ceiling Alignment */
.module-view {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
}

/* Standard scrollable module views */
.module-view:not(#view-crm):not(#view-hotel):not(#view-soporte):not(#view-pms) {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Split-layout module views (CRM, Config/Hotel, Soporte, PMS) fill height with zero outer scroll */
#view-crm,
#view-hotel,
#view-soporte,
#view-pms {
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

#view-crm:not(.active),
#view-hotel:not(.active),
#view-soporte:not(.active),
#view-pms:not(.active) {
    display: none !important;
}

/* 3. Sub-views in All Modules: Zero Top Margin, Clean Ceiling Anclaje */
.crm-sub-view,
.rates-sub-view,
.hotel-sub-view,
.marketing-sub-view,
.finanzas-sub-section,
.soporte-hub-content-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
    box-sizing: border-box !important;
}

.crm-sub-view:not(.active) {
    display: none !important;
}

#crm-inbox.active {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: 0 !important;
}

#crm-bot-brain.active {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: 0 !important;
}

#crm-bot-brain:not(.active) {
    display: none !important;
}

#crm-contacts.active {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    display: block !important;
}

#crm-contacts:not(.active) {
    display: none !important;
}

/* 4. First Child Cards & Containers in All Views: Reset Top Margin */
.crm-sub-view > .card:first-child,
.rates-sub-view > .card:first-child,
.hotel-sub-view > .card:first-child,
.marketing-sub-view > .card:first-child,
.finanzas-sub-section > .card:first-child,
.finanzas-sub-section > .grid-4:first-child,
.soporte-hub-content-area > .card:first-child,
.module-view > .card:first-child,
.module-view > .grid-4:first-child,
.module-view > .grid-2:first-child {
    margin-top: 0 !important;
}

/* 5. Fix Config / Hotel Split Layout Height & Scroll */
.config-split-layout {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
}

.config-feed-pane {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.config-feed-scroll {
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 0 40px 0 !important;
    overflow-y: auto !important;
}

/* Fix Channels and Payments when active in Config */
.hotel-sub-view#hotel-channels,
.hotel-sub-view#hotel-payments {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* 6. Room Inventory Table Scroll Fix (Ensures room rows are ALWAYS 100% visible and scrolleable) */
#cabins-unified-view .table-wrapper {
    max-height: calc(100vh - 270px) !important;
    overflow-y: auto !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
}

/* 7. Fix Soporte Hub Container Height & Tab Visibility */
.soporte-hub-container {
    margin: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 8px !important;
}

/* 8. Jerarquía Bicolor de Pestañas - Tarifas & Módulos (Fila 1 Principal y Fila 2 Secundaria) */
.rates-primary-nav-bar,
.module-primary-nav-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 2px solid rgba(56, 189, 248, 0.6);
    margin-bottom: 12px;
    gap: 8px;
    flex-wrap: wrap;
    background: transparent;
}

.rates-primary-tabs-group,
.module-primary-tabs-group {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    margin-bottom: -2px;
    position: relative;
    z-index: 10;
}

.rates-primary-tab,
.module-primary-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 9px 18px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.18s ease-in-out;
    position: relative;
    user-select: none;
    box-sizing: border-box;
}

.rates-primary-tab:hover,
.module-primary-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.rates-primary-tab.active,
.module-primary-tab.active {
    background: #093f66;
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-bottom: 2px solid #38bdf8;
    color: #f8fafc;
    font-weight: 700;
    box-shadow: 0 -2px 10px rgba(56, 189, 248, 0.15);
    z-index: 12;
}

.rates-subnav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 6px 10px;
    background: rgba(9, 63, 102, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
    gap: 8px;
}

.rates-sub-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease-in-out;
}

.rates-sub-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.rates-sub-tab.active {
    background: #093f66;
    border-color: rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(56, 189, 248, 0.2);
}

/* ==========================================================================
   PUALY HOTEL DATEPICKER SYSTEM — ELEGANTE, SUAVE & SIN FONDOS BLANCOS
   ========================================================================== */

/* 1. Indicador nativo de calendario estilizado en gris suave */
input[type="date"] {
    color-scheme: dark !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.65) brightness(1.2) !important;
    cursor: pointer !important;
    opacity: 0.8 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.15s ease;
    border-radius: 4px;
    padding: 2px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1 !important;
    filter: invert(0.9) brightness(1.4) !important;
    transform: scale(1.12);
}

/* 2. Popover Almanaque Flotante Bicolor Oficial Pualy */
.pualy-datepicker-popover {
    position: fixed;
    z-index: 100050;
    background-color: #162235;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px;
    width: 280px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
    user-select: none;
    font-family: var(--font-sans);
    color: #f8fafc;
    animation: pualyFadeSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pualyFadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pualy-dp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pualy-dp-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

.pualy-dp-nav-btns {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pualy-dp-btn-nav {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.90rem;
    transition: all 0.2s ease;
    user-select: none;
    padding: 0;
}

.pualy-dp-btn-nav:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    transform: scale(1.08);
}

.pualy-dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.pualy-dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.pualy-dp-day {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #e2e8f0;
    user-select: none;
}

.pualy-dp-day:hover:not(.pualy-dp-disabled) {
    background: rgba(59, 130, 246, 0.22);
    color: #93c5fd;
    font-weight: 600;
}

.pualy-dp-day.pualy-dp-today {
    border: 1px solid #38bdf8;
    color: #38bdf8;
    font-weight: 700;
}

.pualy-dp-day.pualy-dp-selected {
    background: var(--accent-emerald) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(59, 155, 109, 0.45);
}

.pualy-dp-day.pualy-dp-other-month {
    opacity: 0.25;
}

.pualy-dp-day.pualy-dp-disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: line-through;
}

.pualy-dp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pualy-dp-footer button {
    cursor: pointer;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.pualy-dp-btn-today {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
}

.pualy-dp-btn-today:hover {
    background: rgba(59, 155, 109, 0.2);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
}

.pualy-dp-btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
}

.pualy-dp-btn-close:hover {
    color: var(--text-primary);
}








