/* styles.css - Versión COMPLETA con scroll optimizado para móviles y sidebar fijo */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 70px;
    /* Espacio para el header fijo */
}

/* Categorías desplegables */
.category {
    margin-bottom: 10px;
}

.category-header {
    padding: 12px 15px;
    color: #1261aa;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    transition: all 0.3s;
}

.category-header:hover {
    background: #f5f7fa;
}

.category-header i {
    transition: transform 0.3s;
    font-size: 12px;
}

.category-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.category-content.expanded {
    max-height: 500px;
}

/* Ítems de navegación dentro de categorías */
.category-content .nav-item {
    padding: 10px 15px 10px 35px;
    margin-left: 10px;
    border-left: 2px solid #e1e5e9;
}

.category-content .nav-item::before {
    left: -2px;
}

/* Icono de flecha cuando está expandido */
.category-header .fa-chevron-down {
    transform: rotate(0deg);
}

.category-header.expanded .fa-chevron-down {
    transform: rotate(180deg);
}

/* Estilos para el panel de filtros */
.filters-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.filter-group input[type="date"] {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
}

.filters-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-filter-toggle {
    background: #1261aa;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-filter-toggle:hover {
    background: #2c3a4f;
}

.btn-filter {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.btn-clear {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-form {
    background: #1261aa;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-form h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #1261aa;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 14px;
    color: #666;
}

/* Configuración tabs */
.config-tab-content {
    display: block;
    padding: 20px;
    background: transparent;
    border-radius: 8px;
    margin-top: 15px;
}

.config-tab-content.hidden {
    display: none;
}

.btn-tab-toggle {
    padding: 8px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 8px;
    font-size: 14px;
}

.export-btn {
    background: #16a34a;
    color: white;
}

.btn-tab-toggle.active {
    background: #1261aa;
    color: white;
}

.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Main Panel Styles */
.main-panel {
    min-height: 100vh;
    background: #f5f7fa;
    overflow-x: hidden;
}

/* ============================================== */
/* HEADER FIJO - REVISADO */
/* ============================================== */
.header {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    /* Cambiado de sticky a fixed */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    /* Z-index más alto */
    max-width: 100vw;
    height: 70px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-image {
    height: auto;
    max-height: 40px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo-image:hover {
    opacity: 0.9;
}

.header h1 {
    color: #333;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-logout {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    white-space: nowrap;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #1261aa;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
    z-index: 1101;
}

/* ============================================== */
/* SIDEBAR FIXED - CORRECCIÓN COMPLETA */
/* ============================================== */

/* CONTENEDOR PRINCIPAL CON PADDING PARA SIDEBAR */
.container {
    display: flex;
    max-width: 100%;
    margin: 0;
    padding: 0 0 0 250px;
    /* Padding izquierdo para sidebar fijo */
    gap: 0;
    position: relative;
    min-height: calc(100vh - 70px);
    overflow-x: hidden;
}

/* Sidebar Styles - FIXED POSITION */
.sidebar {
    width: 250px;
    background: white;
    padding: 20px 15px;
    height: calc(100vh - 70px);
    /* Altura fija desde el header */
    overflow-y: auto;
    position: fixed;
    /* Posición fija */
    top: 70px;
    /* Pegado debajo del header */
    left: 0;
    /* Alineado a la izquierda */
    z-index: 1000;
    /* Z-index alto pero menor que header */
    border-right: 1px solid #e1e5e9;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    transform: translateX(0);
    /* Siempre visible en desktop */
}

/* CORRECCIÓN DEL PROBLEMA DEL SIDEBAR EN PANTALLAS GRANDES */
.sidebar.active {
    transform: translateX(0) !important;
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Main Content - CON MARGEN PARA SIDEBAR FIJO */
.main-content {
    flex: 1;
    background: #f5f7fa;
    padding: 20px;
    min-height: calc(100vh - 70px);
    overflow-y: auto;
    width: 100%;
    overflow-x: hidden;
    margin-left: 0;
    /* Sin margen porque sidebar es fixed */
}

/* ============================================== */
/* MOBILE SIDEBAR - CORREGIDO PARA FUNCIONAR */
/* ============================================== */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block !important;
        cursor: pointer;
        pointer-events: auto;
    }

    /* Resetear estilos del sidebar para móvil */
    .sidebar {
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        width: 280px !important;
        height: calc(100vh - 70px) !important;
        background: white !important;
        z-index: 1100 !important;
        transition: transform 0.3s ease !important;
        transform: translateX(-100%) !important;
        /* Oculto por defecto */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2) !important;
        overflow-y: auto !important;
        border-right: none !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar.active {
        transform: translateX(0) !important;
        /* Visible cuando tiene clase active */
    }

    /* Overlay para móvil */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1099;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }

    /* Ajustar contenedor principal en móvil */
    .container {
        padding-left: 0 !important;
        /* Quitar padding en móvil */
        flex-direction: column;
        padding: 0;
        overflow-x: hidden;
    }

    .main-content {
        width: 100%;
        padding: 15px;
        min-height: calc(100vh - 70px);
        overflow-x: hidden;
        margin-left: 0;
    }

    .header-logo h1 {
        font-size: 16px;
        max-width: 150px;
    }

    .user-info span {
        display: none;
    }

    .btn-logout span {
        display: none;
    }

    .btn-logout {
        padding: 8px;
    }

    .btn-logout i {
        margin: 0;
    }

    /* Asegurar que el botón sea clickeable */
    .mobile-menu-toggle {
        position: relative;
        z-index: 1200;
    }
}

/* ============================================== */
/* DESKTOP - SIDEBAR SIEMPRE FIJO Y VISIBLE */
/* ============================================== */
@media (min-width: 993px) {
    .sidebar {
        position: fixed !important;
        transform: translateX(0) !important;
        height: calc(100vh - 70px);
        top: 70px;
    }

    .container {
        padding-left: 250px;
    }

    /* Ocultar overlay en desktop */
    .sidebar-overlay {
        display: none !important;
    }

    /* Asegurar que el contenido no quede detrás del sidebar */
    .main-content {
        margin-left: 0;
        width: calc(100% - 250px);
    }

    /* Ocultar botón de menú móvil en desktop */
    .mobile-menu-toggle {
        display: none !important;
    }
}

.nav-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item:hover {
    background: #f8f9fa;
}

.nav-item.active {
    background: #1261aa;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Mejorar feedback táctil para dispositivos móviles */
@media (max-width: 992px) {
    .nav-item:active {
        background-color: rgba(18, 97, 170, 0.1);
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

.content-header {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow: hidden;
}

.content-header h2 {
    margin-right: auto;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-primary {
    background: #1261aa;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-primary:hover {
    background: #0d4f8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 97, 170, 0.2);
}

.btn-action.btn-primary {
    color: rgb(22, 184, 106);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    transition: transform 0.2s;
}

.btn-action.btn-confirm {
    color: rgb(22, 163, 184);
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    transition: transform 0.2s;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: transform 0.2s;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #1261aa;
    box-shadow: 0 0 0 3px rgba(18, 97, 170, 0.1);
}

/* ============================================== */
/* TABLA CON SCROLL HORIZONTAL CONTROLADO EN MÓVIL */
/* ============================================== */
.reservations-table-container {
    background: white;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    position: relative;
    max-width: 100%;
}

/* IMPORTANTE: En escritorio, tablas normales */
.reservations-table-container:not(.has-many-columns) .reservations-table {
    width: 100%;
    table-layout: auto;
    min-width: 0;
}

.reservations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

/* Cabeceras fijas */
.reservations-table th {
    background: #1261aa;
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 2px solid #0d4f8a;
    min-width: 120px;
    white-space: nowrap;
}

/* ============================================== */
/* MÓVIL: Scroll horizontal DENTRO del contenedor */
/* ============================================== */
@media (max-width: 768px) {
    .reservations-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100vw;
        position: relative;
        left: 0;
        right: 0;

    }

    .brand-info {
        margin-left: -60px;
    }

    #appLogo {
        margin-left: -130px;

    }

    .reservations-table {
        min-width: 800px;
        width: auto;
        margin: 0;
    }

    /* Primera columna fija SOLO cuando hay scroll */
    .reservations-table th:first-child,
    .reservations-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 30;
        min-width: 120px;
        box-shadow: 3px 0 8px rgba(0, 0, 0, 0.15);
        border-right: 2px solid #e1e5e9;
        background: white;
    }

    .reservations-table th:first-child {
        background: #0d4f8a;
        z-index: 40;
    }

    .reservations-table td:first-child {
        background: white;
        font-weight: 600;
    }

    /* Indicador visual de scroll - solo aparece cuando hay scroll real */
    .reservations-table-container.scrollable::after {
        content: '← Desliza →';
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 11px;
        z-index: 5;
        animation: pulse 2s infinite;
        pointer-events: none;
    }

    /* Asegurar que el contenedor de la tabla no cause scroll en la página */
    .reservations-table-container,
    .rooms-table-container {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    /* Ajustar padding del contenido principal en móvil */
    .main-content {
        padding-left: 10px;
        padding-right: 10px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Asegurar que el header tampoco cause scroll */
    .content-header {
        margin-left: 0;
        margin-right: 0;
        padding-left: 10px;
        padding-right: 10px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
}

.reservations-table td {
    padding: 12px;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: middle;
    min-width: 120px;
    background: white;
    transition: background-color 0.3s;
}

.reservations-table tbody tr {
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.reservations-table tbody tr:hover {
    background: #f8f9fa;
}

.reservations-table tbody tr:hover td {
    background: #f8f9fa;
}

.reservations-table tbody tr:hover td:first-child {
    background: #e9ecef;
}

.reservations-table tbody tr.selected {
    background: #f0f4ff;
}

.reservations-table tbody tr.selected td:first-child {
    background: #e3e9ff;
    border-left: 4px solid #667eea;
}

/* Bordes de estado para filas */
.row-confirmed {
    border-left: 6px solid #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05) !important;
}

.row-pending {
    border-left: 6px solid #f39c12 !important;
    background-color: rgba(243, 156, 18, 0.05) !important;
}

.row-canceled {
    border-left: 6px solid #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
}

.row-completed {
    border-left: 6px solid #17a2b8 !important;
    background-color: rgba(23, 162, 184, 0.05) !important;
}

/* Scrollbar personalizado para la tabla */
.reservations-table-container::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.reservations-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
    margin: 0 10px;
}

.reservations-table-container::-webkit-scrollbar-thumb {
    background: #1261aa;
    border-radius: 4px;
}

.reservations-table-container::-webkit-scrollbar-thumb:hover {
    background: #0d4f8a;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    display: inline-block;
    min-width: 100px;
    text-transform: uppercase;
    margin-top: 4px;
}

.status-confirmada,
.status-confirmado,
.status-pagada {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pendiente,
.status-pendiente-de-pago {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.status-checkout {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-cancelada,
.status-cancelado {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-finalizada,
.status-completada {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.reservation-number {
    font-weight: bold;
    color: #667eea;
}

.guest-name {
    font-weight: 600;
    color: #333;
}

.guest-contact {
    font-size: 12px;
    opacity: 0.8;
    color: #666;
    margin-top: 3px;
}

.room-info {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    display: inline-block;
}

.price-cell {
    font-weight: bold;
    color: #28a745;
    text-align: right;
}

.dates-cell {
    font-size: 12px;
    color: #666;
}

.actions-cell {
    text-align: center;
    min-width: 150px;
}

.btn-action {
    background: none;
    border: none;
    padding: 6px;
    margin: 0 2px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.btn-action:hover {
    background: #f8f9fa;
}

.btn-assign {
    color: #007bff;
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-assign:hover {
    color: #0056b3;
    transform: scale(1.05);
}

.btn-delete {
    color: #dc3545;
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-delete:hover {
    color: #a71d2a;
    transform: scale(1.05);
}

.btn-extend {
    color: #28a745;
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-extend:hover {
    color: #1e7e34;
    transform: scale(1.05);
}

/* Contenedor para alinear siempre los botones */
.btn-action-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

/* Estilo base */
.btn-action {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-primary:hover {
    transform: scale(1.08);
}

/* Botón pagado */
.btn-success {
    color: #28a745;
    cursor: default;
}

/* Deshabilitado */
.btn-action:disabled {
    opacity: 0.7;
}

/* Botón ver detalle */
.btn-info {
    color: #17a2b8;
}

.btn-info:hover {
    transform: scale(1.08);
}

.table-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Rooms Table Styles */
.rooms-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    position: relative;
    max-width: 100%;
}

/* NUEVO: Tablas que no tienen muchas columnas se ajustan completamente */
.rooms-table-container:not(.has-many-columns) .rooms-table {
    width: 100%;
    table-layout: auto;
    min-width: 0;
}

.rooms-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

/* ============================================== */
/* MÓVIL: Scroll horizontal DENTRO del contenedor para rooms también */
/* ============================================== */
@media (max-width: 768px) {
    .rooms-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100vw;
        position: relative;
        left: 0;
        right: 0;
    }

    .rooms-table {
        min-width: 800px;
        width: auto;
        margin: 0;
    }

    /* Primera columna fija SOLO cuando hay scroll */
    .rooms-table th:first-child,
    .rooms-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 30;
        min-width: 120px;
        box-shadow: 3px 0 8px rgba(0, 0, 0, 0.15);
        border-right: 2px solid #e1e5e9;
        background: white;
    }

    .rooms-table th:first-child {
        background: #0d4f8a;
        z-index: 40;
    }

    .rooms-table td:first-child {
        background: white;
        font-weight: 600;
    }

    /* Indicador visual de scroll - solo aparece cuando hay scroll real */
    .rooms-table-container.scrollable::after {
        content: '← Desliza →';
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 11px;
        z-index: 5;
        animation: pulse 2s infinite;
        pointer-events: none;
    }
}

.rooms-table th {
    background: #1261aa;
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.rooms-table td {
    padding: 12px;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: middle;
}

.rooms-table tbody tr {
    cursor: pointer;
    transition: all 0.2s;
}

.rooms-table tbody tr:hover {
    background: #f8f9fa;
}

.room-number-cell {
    font-weight: bold;
    color: #2c3e50;
}

.room-type-cell {
    color: #333;
}

.room-price-cell {
    font-weight: bold;
    color: #28a745;
}

.current-reservation-cell {
    font-size: 12px;
    color: #666;
}

/* Status badges for rooms */
.room-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    display: inline-block;
}

.room-status-disponible {
    background: #d4edda;
    color: #155724;
}

.room-status-ocupada {
    background: #f8d7da;
    color: #721c24;
}

.room-status-mantenimiento {
    background: #fff3cd;
    color: #856404;
}

.room-status-limpieza {
    background: #cce5ff;
    color: #004085;
}

/* Grids generales */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.room-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 10px;
}

.hidden {
    display: none !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* ===== ESTILOS PARA EL NUEVO FLUJO DE 3 PASOS ===== */
.reservation-steps {
    display: flex;
    justify-content: space-between;
    margin: 20px 0 30px;
    position: relative;
}

.reservation-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e1e5e9;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.step.active .step-number {
    background: #1261aa;
    color: white;
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.step.active .step-label {
    color: #1261aa;
    font-weight: 500;
}

.reservation-step {
    display: block;
}

.reservation-step.hidden {
    display: none;
}

/* Mejoras para el flujo de 3 pasos */
.step-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.step-header h4 {
    margin-bottom: 5px;
    color: #333;
}

.step-info {
    font-size: 14px;
    color: #666;
}

.rooms-selection-container {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
}

.room-card-selectable {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.room-card-selectable:hover {
    border-color: #1261aa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.room-card-selectable.selected {
    border-color: #28a745;
    background: #f8fff9;
}

.room-card-selectable .room-selected-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    display: none;
}

.room-card-selectable.selected .room-selected-badge {
    display: block;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.room-description {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
    min-height: 40px;
}

.room-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12px;
    color: #555;
    margin-bottom: 15px;
}

.room-detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.room-detail-item i {
    color: #1261aa;
    width: 16px;
}

.room-availability {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 6px;
    font-size: 11px;
    color: #28a745;
    text-align: center;
    margin-bottom: 10px;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
}

.reservation-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.reservation-summary h5 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.summary-details {
    display: grid;
    gap: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed #dee2e6;
}

.summary-item:last-child {
    border-bottom: none;
}

.no-rooms-message {
    text-align: center;
    padding: 40px;
    color: #666;
    grid-column: 1 / -1;
}

.no-rooms-message i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
}

.no-rooms-message p {
    margin-bottom: 15px;
    font-size: 16px;
}

/* Estilos para menú de acciones desplegable */
.action-menu-wrapper {
    position: relative;
    display: inline-block;
}

.btn-menu {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-menu:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(18, 97, 170, 0.3);
}

.action-menu {
    position: fixed;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 99999;
    padding: 8px 0;
    animation: fadeIn 0.2s ease;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
}

.menu-item {
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #495057;
    font-size: 14px;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.menu-item.text-danger {
    color: #dc3545;
}

.menu-item.text-danger:hover {
    background-color: #f8d7da;
}

/* Estilos para popups de tarifas */
.tarifas-popup-content {
    position: static;
    display: inline-block;
}

.btn-view-tarifas {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-view-tarifas:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tarifas-popup {
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 10000;
    min-width: 280px;
    animation: fadeIn 0.2s ease;
    transform: translateX(-50%);
    top: 50px;
    left: 50%;
}

.tarifas-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tarifa-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tarifa-item:last-child {
    border-bottom: none;
}

.tarifa-label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.tarifa-value {
    font-size: 14px;
    color: #2196F3;
    font-weight: bold;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}

.modal-overlay.active {
    display: block;
}

/* Alertas y mensajes */
.alert.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    border: 1px solid #bee5eb;
}

.alert.alert-info i {
    margin-right: 5px;
}

.text-muted {
    color: #6c757d !important;
    font-size: 13px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    border: 1px solid #c3e6cb;
}

/* ============================================== */
/* RESPONSIVE MEJORADO */
/* ============================================== */
@media (max-width: 1200px) {
    .sidebar {
        width: 220px;
    }

    .container {
        padding-left: 220px;
    }

    .main-content {
        width: calc(100% - 220px);
    }
}

@media (max-width: 992px) {
    .main-content {
        padding: 15px;
    }

    .content-header {
        padding: 12px;
        margin-bottom: 15px;
    }

    .content-header h2 {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 0 !important;
    }

    .main-content {
        width: 100%;
        padding: 12px;
        overflow-x: hidden;
        max-width: 100vw;
    }

    .content-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .content-header h2 {
        margin-right: 0;
        text-align: center;
        font-size: 18px;
        width: 100%;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .btn-primary,
    .btn-filter-toggle,
    .btn-secondary,
    .btn-warning {
        width: 100%;
        justify-content: center;
    }

    .search-box input {
        font-size: 14px;
        padding: 10px 12px;
        width: 100%;
        max-width: 100%;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    /* Tablas en móviles */
    .reservations-table th,
    .reservations-table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .rooms-table th,
    .rooms-table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .status-badge {
        font-size: 10px;
        padding: 3px 6px;
        min-width: 90px;
    }

    .btn-action {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .rooms-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .step-actions {
        flex-direction: column;
        gap: 10px;
    }

    .step-actions button {
        width: 100%;
        justify-content: center;
    }

    /* Asegurar que ningún elemento cause scroll horizontal */
    .stats-grid,
    .filters-grid,
    .form-row {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 12px 15px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .logo-image {
        max-height: 35px;
    }

    .header h1 {
        font-size: 16px;
        max-width: 150px;
    }

    .btn-logout {
        padding: 6px;
        font-size: 13px;
    }

    .main-content {
        padding: 10px;
        width: 100%;
        max-width: 100vw;
    }

    .content-header {
        padding: 10px;
        width: 100%;
    }

    .content-header h2 {
        font-size: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
    }

    .stat-card {
        padding: 15px;
        width: 100%;
    }

    .stat-number {
        font-size: 24px;
    }

    /* Tablas en móviles pequeños */
    .reservations-table th,
    .reservations-table td {
        padding: 8px 6px;
        font-size: 12px;
    }

    .rooms-table th,
    .rooms-table td {
        padding: 8px 6px;
        font-size: 12px;
    }

    .status-badge {
        font-size: 9px;
        padding: 2px 5px;
        min-width: 80px;
    }

    /* Ocultar indicador de scroll en móviles pequeños */
    .reservations-table-container.scrollable::after,
    .rooms-table-container.scrollable::after {
        display: none;
    }
}

@media (max-width: 375px) {
    .header {
        padding: 10px 12px;
    }

    .logo-image {
        max-height: 30px;
    }

    .header h1 {
        font-size: 14px;
        max-width: 120px;
    }

    .mobile-menu-toggle {
        font-size: 20px;
        padding: 6px;
    }

    .main-content {
        padding: 8px;
    }

    .reservations-table th,
    .reservations-table td {
        padding: 6px 4px;
        font-size: 11px;
    }

    .rooms-table th,
    .rooms-table td {
        padding: 6px 4px;
        font-size: 11px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    .btn-action:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-warning:hover {
        transform: none;
    }

    .btn-action,
    .btn-accion-menu,
    .menu-accion-item {
        min-height: 44px;
        min-width: 44px;
    }

    .btn-action {
        width: 44px;
        height: 44px;
    }

    /* Mejorar scroll en dispositivos táctiles */
    .reservations-table-container,
    .rooms-table-container {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        overscroll-behavior-x: contain;
    }

    /* Botones más grandes para touch */
    .nav-item {
        min-height: 44px;
    }
}

/* Scrollbar personalizado para todo el sitio */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #1261aa;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0d4f8a;
}

/* Ajustes para los contenedores dentro del main-content */
.main-content>div {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Mejora para las tablas en pantallas grandes */
@media (min-width: 1200px) {

    .reservations-table:not(.has-many-columns),
    .rooms-table:not(.has-many-columns) {
        table-layout: auto;
    }
}

/* Animaciones suaves */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto de carga */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1261aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* IMPORTANTE: Clase para evitar que el sidebar se bloquee */
.sidebar.unlocked {
    transform: translateX(0) !important;
    position: relative !important;
    height: auto !important;
    top: 0 !important;
}


.form-group label.optional:after {
    content: "";
}

/* Mejoras visuales para precio */
.price {
    font-weight: 600;
}

.price .label {
    color: #212529;
}

.price .value {
    color: #af1714;
}

.price.pay .value {
    color: #198754;
}

.payment {
    font-size: 12px;
    opacity: 0.8;
    color: #6c757d;
}

/* Clase específica para detectar JavaScript */
.js-enabled .sidebar {
    transition: transform 0.3s ease;
}

/* Clase para forzar que el scroll sea solo dentro del contenedor */
.scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

/* Previene el scroll horizontal en todo el body */
body.no-horizontal-scroll {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Clase auxiliar para debug */
.debug-border {
    border: 1px solid red !important;
}

/* ======================== */
/* MODAL GENÉRICO MODERNO */
/* ======================== */
.modal-generic {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
}

.modal-generic.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-generic-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-generic-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-generic-header h3 {
    margin: 0;
    color: #1261aa;
    font-size: 20px;
    font-weight: 600;
}

.modal-generic-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-generic-close:hover {
    background: #f5f7fa;
    color: #333;
}

.modal-generic-body {
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
    max-height: calc(85vh - 140px);
}

.modal-generic-body::-webkit-scrollbar {
    width: 6px;
}

.modal-generic-body::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.modal-generic-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.modal-generic-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.modal-generic-footer {
    padding: 16px 24px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    background: #f8f9fa;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* Tamaños del modal */
.modal-generic-content.small {
    max-width: 400px;
}

.modal-generic-content.medium {
    max-width: 600px;
}

.modal-generic-content.large {
    max-width: 800px;
}

.modal-generic-content.full {
    max-width: 95vw;
    max-height: 90vh;
}

/* Estilos para el contenido del modal */
.modal-generic-body .form-group {
    margin-bottom: 20px;
}

.modal-generic-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-generic-body .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.modal-generic-body .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: white;
}

.modal-generic-body .form-control:focus {
    outline: none;
    border-color: #1261aa;
    box-shadow: 0 0 0 3px rgba(18, 97, 170, 0.1);
}

.modal-generic-body select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.modal-generic-body textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Botones dentro del modal */
.modal-generic-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: center;
}

.modal-generic-btn.primary {
    background: #1261aa;
    color: white;
}

.modal-generic-btn.primary:hover {
    background: #0d4f8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(18, 97, 170, 0.2);
}

.modal-generic-btn.secondary {
    background: #6c757d;
    color: white;
}

.modal-generic-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.modal-generic-btn.outline {
    background: transparent;
    border: 2px solid #1261aa;
    color: #1261aa;
}

.modal-generic-btn.outline:hover {
    background: #1261aa;
    color: white;
}

/* Alertas dentro del modal */
.modal-generic-alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.modal-generic-alert.info {
    background: #e8f4fd;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.modal-generic-alert.warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.modal-generic-alert.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.modal-generic-alert.danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.modal-generic-alert i {
    font-size: 16px;
    flex-shrink: 0;
}

/* Información de contexto */
.modal-generic-context {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #1261aa;
}

.modal-generic-context h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.modal-generic-context p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-generic-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }

    .modal-generic-header {
        padding: 20px 20px 12px;
    }

    .modal-generic-body {
        padding: 16px 20px;
        max-height: calc(90vh - 130px);
    }

    .modal-generic-footer {
        padding: 12px 20px;
        flex-wrap: wrap;
    }

    .modal-generic-btn {
        flex: 1;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .modal-generic-content {
        width: 98%;
        border-radius: 10px;
    }

    .modal-generic-header {
        padding: 16px 16px 12px;
    }

    .modal-generic-header h3 {
        font-size: 18px;
    }

    .modal-generic-body {
        padding: 12px 16px;
    }

    .modal-generic-footer {
        padding: 12px 16px;
        gap: 8px;
    }
}


/* Estilos para los filtros de fecha dinámicos */
.date-filters-container {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    padding: 20px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.date-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.date-filter-group {
    display: flex;
    flex-direction: column;
}

.date-filter-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-filter-group label i {
    color: #4a6cf7;
}

.date-filter-control {
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
    width: 100%;
}

.date-filter-control:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.date-filters-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: #4a6cf7;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background: #3a5ce5;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: white;
    color: #4a6cf7;
    border: 1px solid #4a6cf7;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: #4a6cf7;
    color: white;
}

.quick-filters {
    display: flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    margin-left: 10px;
}

.quick-filters button {
    padding: 10px 15px;
    border: 1px solid #4a6cf7;
    background: white;
    color: #4a6cf7;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.quick-filters button:first-child {
    border-radius: 6px 0 0 6px;
}

.quick-filters button:last-child {
    border-radius: 0 6px 6px 0;
}

.quick-filters button:hover {
    background: #4a6cf7;
    color: white;
}

.quick-filters button.active {
    background: #4a6cf7;
    color: white;
}

.results-count {
    background: #e7f3ff;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #1261aa;
    display: none;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.results-count i {
    color: #4a6cf7;
}

.results-count strong {
    font-weight: 600;
    color: #333;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-results i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.no-results h4 {
    color: #6c757d;
    margin-bottom: 8px;
}

.no-results p {
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tarifa-detalles-container {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 0;
    /* Cambiado de -25px a 0 para un solo periodo */
}

.btn-primary .acomodacion {
    margin-top: 10px;
}

/* Animación circular del spinner */
.spinner-icon {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Clase que activa el estado de carga */
.is-loading .spinner-icon {
    display: inline-block;
}

.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.version-tag {
    font-size: 0.85rem;
    color: #888;
    font-family: monospace;
}