/* =========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    --dark-bg: #050505;       /* Negro profundo */
    --panel-bg: #101010;      /* Gris muy oscuro para tarjetas */
    --accent: #FFD700;        /* DORADO PRINCIPAL */
    --accent-dim: #b39700;    /* Dorado oscuro */
    --accent-light: #ffea70;  /* Dorado claro */
    --text-main: #f0f0f0;
    --text-muted: #aaaaaa;
    --danger: #ff4d4d;
    --success: #00b894;
    --border-color: #333333;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Segoe UI', sans-serif;
    /* NEW: Color extra para eventos */
    --info: #00cec9; 
}

* { box-sizing: border-box; }

body { 
    margin: 0; 
    font-family: var(--font-body); 
    background-color: var(--dark-bg); 
    color: var(--text-main); 
    scroll-behavior: smooth;
}

h1, h2, h3 { font-family: var(--font-heading); letter-spacing: 1px; }

/* =========================================
   2. HERO SECTION & NAVBAR
   ========================================= */
.navbar { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px 40px; background-color: rgba(5, 5, 5, 0.95); 
    border-bottom: 2px solid var(--accent); 
    position: sticky; top: 0; z-index: 1000; 
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.15); 
}
.logo { font-size: 1.6rem; font-weight: bold; color: var(--accent); letter-spacing: 2px; }
.nav-links { list-style: none; display: flex; gap: 25px; padding: 0; margin: 0; }
.nav-links a { text-decoration: none; color: white; transition: 0.3s; font-weight: 600; font-size: 0.95rem; text-transform: uppercase;}
.nav-links a:hover { color: var(--accent); }
.admin-link { color: var(--accent) !important; border: 1px solid var(--accent); padding: 6px 18px; border-radius: 50px; }
.admin-link:hover { background: var(--accent); color: black !important; box-shadow: 0 0 10px var(--accent); }

.hero {
    height: 85vh;
    background: url('https://images.unsplash.com/photo-1542314831-068cd1dbfeeb?q=80&w=1600&auto=format&fit=crop') no-repeat center center/cover;
    background-attachment: fixed; /* Parallax */
    position: relative;
}
.hero-overlay-gradient {
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, var(--dark-bg) 100%);
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero-content h1 { 
    font-size: 5.5rem; margin: 0; color: var(--accent); 
    text-shadow: 0px 4px 30px rgba(0,0,0,0.8); 
    animation: fadeInDown 1s ease-out;
}
.slogan { 
    font-size: 1.4rem; color: #fff; margin-top: 15px; letter-spacing: 4px; font-weight: 300; 
    text-transform: uppercase; animation: fadeInUp 1s ease-out 0.5s both;
}
.hero-badges { margin: 30px 0; display: flex; gap: 20px; justify-content: center; animation: fadeInUp 1s ease-out 0.8s both;}
.hero-badges span { background: rgba(0,0,0,0.6); padding: 8px 15px; border-radius: 20px; border: 1px solid #555; color: #ddd; font-size: 0.9rem; }
.btn-primary-hero {
    background: var(--accent); color: black; padding: 15px 40px; font-size: 1.1rem; border-radius: 4px;
    text-decoration: none; font-weight: bold; transition: 0.3s; display: inline-block;
    animation: fadeInUp 1s ease-out 1s both;
}
.btn-primary-hero:hover { background: white; box-shadow: 0 0 20px white; }

/* =========================================
   3. CATÁLOGO
   ========================================= */
.container { max-width: 1250px; margin: auto; padding: 20px; }
.section-container-title { text-align: center; margin: 60px 0 40px; }
.section-title { font-size: 3rem; color: var(--accent); margin-bottom: 10px; border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 10px;}
.section-subtitle { color: var(--text-muted); font-size: 1.1rem; }

.cat-header { 
    color: white; font-size: 1.8rem; margin-top: 60px; margin-bottom: 20px; 
    border-left: 5px solid var(--accent); padding-left: 15px; 
}

.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.room-card { 
    background-color: var(--panel-bg); border-radius: 12px; overflow: hidden; 
    border: 1px solid #222; transition: all 0.4s ease; position: relative;
}
.room-card:hover { transform: translateY(-10px); border-color: var(--accent); box-shadow: 0 10px 40px rgba(0,0,0,0.6); }

.room-img-container { width: 100%; height: 250px; overflow: hidden; position: relative; }
.room-img-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.room-card:hover .room-img-container img { transform: scale(1.1); }
.room-tag { 
    position: absolute; top: 15px; right: 15px; background: var(--accent); 
    color: black; padding: 5px 12px; font-weight: bold; border-radius: 3px; font-size: 0.8rem;
}

.room-info { padding: 25px; text-align: center; }
.room-info h4 { font-size: 1.5rem; margin: 0 0 10px; color: white; }
.room-info p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; min-height: 50px; }
.room-mini-features { display: flex; justify-content: center; gap: 15px; margin: 15px 0; color: var(--accent); font-size: 1.2rem; }
.price { display: block; font-size: 1.4rem; color: var(--accent); font-weight: bold; margin-bottom: 15px; }

.btn-book { 
    background: transparent; border: 2px solid var(--accent); color: var(--accent); 
    padding: 10px 25px; font-weight: bold; cursor: pointer; transition: 0.3s; width: 100%;
    font-size: 1rem; text-transform: uppercase;
}
.btn-book:hover { background: var(--accent); color: black; }

.separator-gold { height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); margin: 60px 0; opacity: 0.5; }

/* =========================================
   4. MODALES (GENERAL & LOGIN)
   ========================================= */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.92); z-index: 2000; 
    display: none; justify-content: center; align-items: center; 
    backdrop-filter: blur(8px);
}
.login-box, .reserva-box { 
    background: var(--panel-bg); padding: 40px; border-radius: 8px; 
    border: 1px solid var(--border-color); width: 90%; max-width: 450px; 
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.1); animation: zoomIn 0.3s;
}
.login-icon { font-size: 3rem; color: var(--accent); margin-bottom: 20px; text-align: center; }
.login-box input, .reserva-box input, .reserva-box select { 
    width: 100%; padding: 15px; background: #000; border: 1px solid #333; 
    color: white; margin-bottom: 15px; border-radius: 4px; 
}
.btn-primary { 
    background: var(--accent); color: black; border: none; padding: 12px; 
    font-weight: bold; cursor: pointer; transition: 0.3s; border-radius: 4px; 
}
.btn-secondary { background: #333; color: white; border: 1px solid #555; padding: 12px; cursor: pointer; transition: 0.3s; }
.btn-secondary:hover { background: #555; }
.error-text { color: var(--danger); text-align: center; margin-top: 10px; }

/* =========================================
   5. MODAL: DETALLE HABITACIÓN (GALERÍA)
   ========================================= */
.detalle-box {
    background: #0f0f0f; width: 95%; max-width: 1100px; height: 90vh;
    border-radius: 10px; border: 1px solid var(--accent-dim);
    display: flex; flex-direction: column; overflow: hidden; position: relative;
    box-shadow: 0 0 60px rgba(0,0,0,0.9); animation: slideUp 0.4s;
}
.close-btn-modal {
    position: absolute; top: 15px; right: 15px; background: none; border: none; 
    color: white; font-size: 1.5rem; cursor: pointer; z-index: 10; transition: 0.3s;
}
.close-btn-modal:hover { color: var(--danger); transform: rotate(90deg); }

.detalle-header { padding: 20px 30px; border-bottom: 1px solid #333; display: flex; align-items: center; justify-content: space-between;}
.detalle-header h2 { margin: 0; color: var(--accent); font-size: 2rem; }
.detail-badge { background: var(--success); color: white; padding: 5px 10px; border-radius: 4px; font-size: 0.8rem; text-transform: uppercase; font-weight: bold;}

.detalle-content-flex { display: flex; flex: 1; overflow: hidden; }

/* Galería Izquierda */
.gallery-section { flex: 1.8; padding: 20px; display: flex; flex-direction: column; background: #080808; border-right: 1px solid #333;}
.main-image-frame { 
    flex: 1; width: 100%; overflow: hidden; border-radius: 5px; border: 1px solid #333; position: relative;
    margin-bottom: 15px; 
}
.main-image-frame img { width: 100%; height: 100%; object-fit: cover; }
.zoom-icon { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.7); padding: 8px; border-radius: 50%; color: white;}

.thumbnails-scroll { 
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; height: 90px;
}
.thumbnails-scroll img {
    height: 100%; width: 120px; object-fit: cover; border-radius: 4px; cursor: pointer; 
    opacity: 0.5; border: 2px solid transparent; transition: 0.3s;
}
.thumbnails-scroll img:hover, .thumbnails-scroll img.active-thumb { opacity: 1; border-color: var(--accent); }

/* Info Derecha */
.info-section { flex: 1; padding: 30px; overflow-y: auto; background: #121212; }
.info-subtitle { color: var(--text-main); font-size: 1.1rem; border-left: 3px solid var(--accent); padding-left: 10px; margin-top: 20px; }
.desc-text { color: var(--text-muted); line-height: 1.7; font-size: 0.95rem; }

.features-grid { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; list-style: none; padding: 0; margin-top: 15px;
}
.features-grid li { display: flex; align-items: center; gap: 10px; color: #ddd; font-size: 0.9rem; background: #1a1a1a; padding: 10px; border-radius: 5px;}
.features-grid li i { color: var(--accent); width: 20px; text-align: center; }

.divider { height: 1px; background: #333; margin: 30px 0; }

.booking-action-area { text-align: center; }
.price-display { margin-bottom: 20px; }
.price-display .label { display: block; font-size: 0.8rem; color: #888; text-transform: uppercase; }
.price-display .big-price { font-size: 2.5rem; color: var(--accent); font-weight: bold; }

.btn-gold-glow {
    background: var(--accent); color: black; border: none; width: 100%; padding: 15px;
    font-size: 1.1rem; font-weight: bold; border-radius: 5px; cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3); transition: 0.3s;
}
.btn-gold-glow:hover { box-shadow: 0 0 25px rgba(255, 215, 0, 0.6); transform: scale(1.02); }
.small-note { font-size: 0.75rem; color: #555; margin-top: 10px; text-align: center; }

/* =========================================
   6. ADMIN PANEL & TABLAS
   ========================================= */
.admin-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #333; }
.admin-layout { display: flex; gap: 20px; min-height: 600px; }

.admin-sidebar { 
    width: 260px; background: #111; border: 1px solid #333; border-radius: 8px; display: flex; flex-direction: column; 
    padding: 10px; gap: 5px;
}
.sidebar-header { color: #555; font-size: 0.8rem; padding: 10px; font-weight: bold; }
.tab-btn { 
    padding: 12px 15px; background: transparent; color: #aaa; border: none; text-align: left; 
    cursor: pointer; border-radius: 5px; transition: 0.2s; font-size: 0.95rem; 
}
.tab-btn i { width: 25px; }
.tab-btn:hover { background: #222; color: white; }
.tab-btn.active { background: var(--accent); color: black; font-weight: bold; }

.admin-content-area { flex: 1; background: #111; border: 1px solid #333; border-radius: 8px; padding: 25px; position: relative;}
.tab-content { display: none; animation: fadeIn 0.4s; }
.active-content { display: block; }

/* Dashboard Stats */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #1a1a1a; padding: 20px; border-radius: 8px; border-left: 4px solid var(--accent); }
.stat-card h4 { margin: 0 0 10px; color: #888; font-size: 0.85rem; text-transform: uppercase; }
.stat-number { font-size: 2.2rem; font-weight: bold; margin: 0; color: white; }
.trend { font-size: 0.8rem; margin-top: 5px; display: block; }
.trend.up { color: var(--success); }

/* Monitor de Habitaciones */
.monitor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; margin-top: 20px; }
.monitor-box { 
    height: 80px; background: #222; border: 1px solid #333; border-radius: 5px; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    font-size: 0.8rem; cursor: pointer; color: #aaa; transition: 0.2s;
}
.monitor-box strong { font-size: 1.1rem; color: white; margin-bottom: 3px; }
.status-free { border-bottom: 4px solid var(--success); }
.status-busy { border-bottom: 4px solid var(--danger); background: #2a1111; color: #ffadad;}
.status-cleaning { border-bottom: 4px solid var(--accent); background: #2a2500; color: #fff3a0;}

/* Tabla Clientes (Nuevo) */
.table-responsive { overflow-x: auto; margin-top: 20px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th { text-align: left; padding: 12px; background: #222; color: var(--accent); border-bottom: 2px solid #333; }
.admin-table td { padding: 12px; border-bottom: 1px solid #222; color: #ddd; }
.admin-table tr:hover { background: #161616; }
.filter-bar { display: flex; gap: 10px; margin-bottom: 15px; }
.admin-search-input, .admin-select-input { padding: 8px; background: #222; border: 1px solid #444; color: white; border-radius: 4px; }

/* Footer */
footer { background: #080808; padding: 40px; text-align: center; border-top: 1px solid #222; margin-top: 50px; }
.footer-content { opacity: 0.6; }

/* Animaciones */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive Mobile */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 3rem; }
    .detalle-content-flex { flex-direction: column; }
    .gallery-section { border-right: none; border-bottom: 1px solid #333; }
    .main-image-frame { height: 200px; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; flex-direction: row; overflow-x: auto; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------
   NUEVOS ESTILOS AGREGADOS (CORRECCIONES)
   ------------------------------------------------------------------- */

/* 1. SCROLL MODAL CORRECCIÓN */
.scrollable-modal {
    max-height: 85vh; 
    overflow-y: auto; 
}
.scrollable-modal::-webkit-scrollbar { width: 8px; }
.scrollable-modal::-webkit-scrollbar-track { background: #111; }
.scrollable-modal::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
.scrollable-modal::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* 2. CALENDARIO GRID PROFESIONAL */
.calendar-pro-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.btn-mini { background: #333; color: white; border: none; padding: 5px 10px; cursor: pointer; border-radius: 4px; }
.calendar-pro-container {
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    gap: 1px; background: #333; border: 1px solid #333; border-radius: 8px; overflow: hidden;
}
.cal-day-header { background: #222; padding: 10px; text-align: center; font-weight: bold; color: var(--accent); font-size: 0.9rem; text-transform: uppercase;}
.cal-day-cell { 
    background: #111; min-height: 100px; padding: 10px; position: relative; 
    transition: 0.2s; cursor: pointer;
}
.cal-day-cell:hover { background: #181818; }
.cal-num { font-weight: bold; color: #555; display: block; margin-bottom: 5px; }
.cal-event { 
    font-size: 0.7rem; padding: 3px 6px; margin-bottom: 2px; border-radius: 3px; 
    color: black; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.evt-generic { background: var(--info); color: black; } /* Evento genérico DB */
.is-today { background: #1a1a10; box-shadow: inset 0 0 10px #222; }
.is-today .cal-num { color: var(--accent); }

/* 3. TARJETAS PERSONAL (CON FOTO) */
.staff-header-info { margin-bottom: 20px; display: flex; gap: 20px; color: #888; font-size: 0.9rem;}
.staff-header-info i { color: var(--accent); }
.staff-grid-large { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.staff-card-pro { 
    background: #1a1a1a; padding: 15px; border-radius: 8px; display: flex; align-items: center; gap: 15px;
    border: 1px solid #333; position: relative; overflow: hidden;
}
.staff-card-pro::before { content:''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #444; }
.staff-card-pro.status-active::before { background: var(--success); box-shadow: 0 0 10px var(--success); }
.staff-card-pro.status-busy::before { background: var(--accent); }
.staff-card-pro.status-off::before { background: #333; }
.staff-avatar { 
    width: 50px; height: 50px; border-radius: 50%; background: #333; 
    display: flex; align-items: center; justify-content: center; font-weight: bold; color: #ddd; font-size: 1.2rem;
    border: 2px solid #444; overflow: hidden;
}
.staff-avatar img { width: 100%; height: 100%; object-fit: cover; }
.staff-info { flex: 1; }
.staff-info h4 { margin: 0; color: white; font-size: 1rem; }
.staff-info p { margin: 2px 0; color: #888; font-size: 0.8rem; }
.staff-badge { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; background: #333; color: #aaa; display: inline-block; margin-top: 5px;}
.bg-active { background: rgba(0, 184, 148, 0.2); color: var(--success); }
.bg-busy { background: rgba(255, 215, 0, 0.2); color: var(--accent); }