/* ============================================================
   Hotel Real Guatemala — Stylesheet
   Paleta: Azul marino + Dorado elegante — FONDO BLANCO
   ============================================================ */

:root {
    --navy-900:   #0a1628;
    --navy-800:   #0f2044;
    --navy-700:   #152d5e;
    --navy-600:   #1a3a7a;
    --navy-500:   #1e4494;
    --navy-400:   #2d5fbd;
    --gold-500:   #c9a84c;
    --gold-400:   #d4b462;
    --gold-300:   #e2c97e;
    --gold-200:   #f0dfa0;
    --gold-glow:  rgba(201,168,76,.18);
    --bg-base:    #f4f6fb;
    --bg-white:   #ffffff;
    --bg-card:    #ffffff;
    --bg-card2:   #f8f9fc;
    --bg-hover:   #eef1f8;
    --text-dark:    #0f1f3d;
    --text-primary: #1a2d52;
    --text-muted:   #5a6a8a;
    --text-faint:   #a0aec0;
    --border:       #dde3f0;
    --success:  #0d7a4e;
    --danger:   #c0392b;
    --warning:  #b7770d;
    --info:     #1a5fa8;
    --sidebar-w:  270px;
    --topbar-h:   68px;
    --radius:     10px;
    --radius-lg:  16px;
    --shadow-sm:  0 2px 8px rgba(10,22,40,.08);
    --shadow:     0 4px 20px rgba(10,22,40,.12);
    --shadow-lg:  0 8px 40px rgba(10,22,40,.16);
    --transition: .18s ease;
    --font-display: 'Playfair Display', serif;
    --font-body:    'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 15px;
    color-scheme: light;
    background-color: #f4f6fb !important;
}

body {
    background-color: #f4f6fb !important;
    background: #f4f6fb !important;
    color: #1a2d52 !important;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: #1e4494; text-decoration: none; transition: opacity .18s ease; }
a:hover { opacity: .75; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    position: fixed; top: 0; left: 0;
    width: 270px; height: 100vh;
    background-color: #0a1628 !important;
    background: #0a1628 !important;
    display: flex; flex-direction: column;
    z-index: 200;
    transition: transform .18s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.25);
}
.sidebar::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 200px;
    background: linear-gradient(180deg, rgba(201,168,76,.06) 0%, transparent 100%);
    pointer-events: none;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 13px;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(201,168,76,.2);
    position: relative;
}
.brand-icon {
    width: 46px; height: 46px;
    background: linear-gradient(135deg, #c9a84c, #e2c97e);
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 1.2rem; color: #0a1628;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(201,168,76,.18);
}
.brand-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700; font-size: 1.1rem;
    color: #ffffff !important; display: block;
}
.brand-sub {
    font-size: .7rem; color: #d4b462 !important;
    display: block; letter-spacing: .08em; text-transform: uppercase;
}
.sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-section {
    font-size: .63rem; font-weight: 700; letter-spacing: .12em;
    color: rgba(201,168,76,.5) !important; padding: 14px 10px 6px;
    text-transform: uppercase;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: 10px;
    color: rgba(255,255,255,.6) !important; font-size: .875rem; font-weight: 500;
    transition: all .18s ease; margin-bottom: 3px;
}
.nav-item i { width: 18px; text-align: center; font-size: .95rem; }
.nav-item:hover { background: rgba(255,255,255,.07) !important; color: rgba(255,255,255,.9) !important; }
.nav-item.active {
    background: linear-gradient(135deg, rgba(201,168,76,.2), rgba(201,168,76,.08)) !important;
    color: #e2c97e !important;
    border-left: 3px solid #c9a84c;
}
.sidebar-footer {
    padding: 14px 20px;
    font-size: .7rem; color: rgba(255,255,255,.25) !important;
    border-top: 1px solid rgba(255,255,255,.06);
}

/* ── Main wrapper ─────────────────────────────────────────── */
.main-wrapper {
    margin-left: 270px;
    min-height: 100vh;
    display: flex; flex-direction: column;
    background-color: #f4f6fb !important;
}
.topbar {
    height: 68px;
    background-color: #ffffff !important;
    background: #ffffff !important;
    border-bottom: 1px solid #dde3f0;
    display: flex; align-items: center; gap: 16px;
    padding: 0 32px;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(10,22,40,.08);
}
.menu-toggle { display: none; background: none; border: none; color: #5a6a8a; font-size: 1.15rem; cursor: pointer; }
.page-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700; font-size: 1.1rem; flex: 1;
    color: #0f2044 !important;
}
.hotel-star { color: #c9a84c; font-size: .75rem; letter-spacing: 3px; }
.content { padding: 30px 32px; flex: 1; background-color: #f4f6fb !important; }

/* ── Hero banner ─────────────────────────────────────────── */
.hero-banner {
    background: linear-gradient(135deg, #0f2044 0%, #1a3a7a 50%, #152d5e 100%) !important;
    border-radius: 16px;
    padding: 32px 36px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    color: #fff !important;
}
.hero-banner::before {
    content: '';
    position: absolute; top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(201,168,76,.18) 0%, transparent 70%);
}
.hero-banner::after {
    content: '★';
    position: absolute; bottom: -20px; right: 30px;
    font-size: 8rem; color: rgba(201,168,76,.06);
}
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem; font-weight: 800;
    color: #ffffff !important; margin-bottom: 6px;
}
.hero-subtitle { color: rgba(255,255,255,.65) !important; font-size: .9rem; }
.hero-date { color: #e2c97e !important; font-size: .82rem; margin-top: 10px; }

/* ── Stats grid ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px; margin-bottom: 28px;
}
.stat-card {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid #dde3f0;
    border-radius: 16px;
    padding: 22px;
    display: flex; flex-direction: column; gap: 10px;
    transition: transform .18s ease, box-shadow .18s ease;
    position: relative; overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #c9a84c, #e2c97e);
    border-radius: 16px 16px 0 0;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 4px 20px rgba(10,22,40,.12); }
.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.1rem;
}
.stat-icon.navy  { background: rgba(21,45,94,.1);   color: #1a3a7a; }
.stat-icon.gold  { background: rgba(201,168,76,.12); color: #c9a84c; }
.stat-icon.green { background: rgba(13,122,78,.1);  color: #0d7a4e; }
.stat-icon.red   { background: rgba(192,57,43,.1);  color: #c0392b; }
.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem; font-weight: 700;
    color: #0f2044 !important; line-height: 1;
}
.stat-label { font-size: .78rem; color: #5a6a8a !important; font-weight: 500; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid #dde3f0;
    border-radius: 16px;
    padding: 26px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(10,22,40,.08);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f4f6fb;
}
.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700; font-size: 1.05rem; color: #0f2044 !important;
}
.card-title i { color: #c9a84c; margin-right: 8px; }

/* ── Table ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
    background-color: #0f2044 !important;
    background: #0f2044 !important;
    color: rgba(255,255,255,.85) !important;
    font-weight: 600; font-size: .72rem;
    text-transform: uppercase; letter-spacing: .08em;
    padding: 12px 16px; text-align: left;
}
thead th:first-child { border-radius: 10px 0 0 0; }
thead th:last-child  { border-radius: 0 10px 0 0; }
tbody tr { border-bottom: 1px solid #dde3f0; transition: background .18s ease; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background-color: #eef1f8 !important; }
td { padding: 13px 16px; color: #1a2d52 !important; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 20px; border-radius: 10px;
    font-family: 'Inter', sans-serif; font-size: .85rem; font-weight: 600;
    cursor: pointer; border: none; transition: all .18s ease;
    white-space: nowrap; text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, #152d5e, #1e4494) !important;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(21,45,94,.3);
}
.btn-primary:hover { background: linear-gradient(135deg, #0f2044, #1a3a7a) !important; transform: translateY(-1px); }
.btn-gold {
    background: linear-gradient(135deg, #c9a84c, #d4b462) !important;
    color: #0a1628 !important;
    box-shadow: 0 3px 12px rgba(201,168,76,.18);
}
.btn-gold:hover { background: linear-gradient(135deg, #d4b462, #e2c97e) !important; transform: translateY(-1px); }
.btn-danger  { background: rgba(192,57,43,.1) !important; color: #c0392b !important; border: 1px solid rgba(192,57,43,.25); }
.btn-danger:hover  { background: #c0392b !important; color: #fff !important; }
.btn-secondary { background: #f8f9fc !important; color: #5a6a8a !important; border: 1px solid #dde3f0; }
.btn-secondary:hover { background: #eef1f8 !important; color: #1a2d52 !important; }
.btn-info { background: rgba(26,95,168,.1) !important; color: #1a5fa8 !important; border: 1px solid rgba(26,95,168,.2); }
.btn-info:hover { background: #1a5fa8 !important; color: #fff !important; }
.btn-sm  { padding: 7px 13px; font-size: .78rem; }
.btn-ai  { background: linear-gradient(135deg, #5b21b6, #1d4ed8) !important; color: #fff !important; }
.btn-ai:hover { opacity: .88; }

/* ── Forms ────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .8rem; font-weight: 600; color: #152d5e !important; }
.form-control {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1.5px solid #dde3f0;
    color: #1a2d52 !important;
    border-radius: 10px; padding: 10px 14px;
    font-family: 'Inter', sans-serif; font-size: .875rem;
    transition: border-color .18s ease, box-shadow .18s ease;
    width: 100%;
}
.form-control:focus { outline: none; border-color: #c9a84c; box-shadow: 0 0 0 3px rgba(201,168,76,.18); }
.form-control::placeholder { color: #a0aec0; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 20px; border-radius: 10px;
    margin-bottom: 20px; font-size: .875rem;
    transition: opacity .4s; font-weight: 500;
}
.alert-success { background: rgba(13,122,78,.08) !important; border: 1px solid rgba(13,122,78,.25); color: #0d7a4e !important; }
.alert-error   { background: rgba(192,57,43,.08) !important; border: 1px solid rgba(192,57,43,.25); color: #c0392b !important; }

/* ── Badge ────────────────────────────────────────────────── */
.badge {
    display: inline-block; padding: 4px 10px;
    border-radius: 20px; font-size: .72rem; font-weight: 600;
}
.badge-navy   { background: rgba(21,45,94,.1);   color: #1a3a7a !important; }
.badge-gold   { background: rgba(201,168,76,.15); color: #8a6a10 !important; }
.badge-green  { background: rgba(13,122,78,.1);  color: #0d7a4e !important; }
.badge-red    { background: rgba(192,57,43,.1);  color: #c0392b !important; }
.badge-blue   { background: rgba(26,95,168,.1);  color: #1a5fa8 !important; }
.badge-gray   { background: rgba(90,106,138,.1); color: #5a6a8a !important; }

/* ── Estado habitación ───────────────────────────────────── */
.estado-pill {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.estado-disponible    { background: rgba(13,122,78,.1);  color: #0d7a4e !important; }
.estado-ocupada       { background: rgba(192,57,43,.1);  color: #c0392b !important; }
.estado-mantenimiento { background: rgba(183,119,13,.1); color: #b7770d !important; }
.estado-reservada     { background: rgba(26,95,168,.1);  color: #1a5fa8 !important; }

/* ── Monto ────────────────────────────────────────────────── */
.monto { font-family: 'Playfair Display', serif; font-weight: 700; color: #152d5e !important; }
.monto-grande { font-size: 1.4rem; color: #c9a84c !important; }

/* ── Avatar ──────────────────────────────────────────────── */
.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-grid; place-items: center;
    font-weight: 700; font-size: .8rem; flex-shrink: 0;
    background: linear-gradient(135deg, #152d5e, #1e4494) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(21,45,94,.25);
}

/* ── Habitación cards ────────────────────────────────────── */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}
.room-card {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1.5px solid #dde3f0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all .18s ease;
    position: relative; overflow: hidden;
}
.room-card:hover { transform: translateY(-4px); box-shadow: 0 4px 20px rgba(10,22,40,.12); }
.room-card.disponible    { border-top: 4px solid #0d7a4e; }
.room-card.ocupada       { border-top: 4px solid #c0392b; }
.room-card.mantenimiento { border-top: 4px solid #b7770d; }
.room-card.reservada     { border-top: 4px solid #1a5fa8; }
.room-number { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 800; color: #0f2044 !important; }
.room-type   { font-size: .8rem; color: #5a6a8a !important; margin: 4px 0; }
.room-price  { font-weight: 700; color: #c9a84c !important; font-size: .95rem; margin-top: 8px; }
.room-icon   { font-size: 2rem; margin-bottom: 8px; }
.room-icon.disponible    { color: #0d7a4e; }
.room-icon.ocupada       { color: #c0392b; }
.room-icon.mantenimiento { color: #b7770d; }
.room-icon.reservada     { color: #1a5fa8; }

/* ── AI panel ─────────────────────────────────────────────── */
.ai-panel {
    background: linear-gradient(135deg, rgba(91,33,182,.06), rgba(29,78,216,.06)) !important;
    border: 1px solid rgba(91,33,182,.2);
    border-radius: 16px;
    padding: 24px; margin-top: 24px;
}
.ai-panel-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px;
    font-family: 'Playfair Display', serif; font-weight: 700; font-size: .95rem;
    color: #0f2044 !important;
}
.ai-panel-header i { color: #7c3aed; font-size: 1.1rem; }
.ai-response { font-size: .875rem; line-height: 1.8; color: #1a2d52 !important; white-space: pre-wrap; }

/* ── Factura ─────────────────────────────────────────────── */
.factura-box { border: 2px solid #152d5e; border-radius: 16px; overflow: hidden; }
.factura-header {
    background: linear-gradient(135deg, #0f2044, #1a3a7a) !important;
    color: #fff !important; padding: 24px 30px;
    display: flex; justify-content: space-between; align-items: center;
}
.factura-body { padding: 24px 30px; background-color: #ffffff !important; }
.factura-total {
    background: #0f2044 !important;
    color: #fff !important; padding: 16px 30px;
    display: flex; justify-content: space-between; align-items: center;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 52px 20px; color: #5a6a8a !important; }
.empty-state i { font-size: 2.8rem; color: #e2c97e; margin-bottom: 14px; display: block; opacity: .5; }

/* ── Overlay mobile ──────────────────────────────────────── */
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 150; }
.overlay.visible { display: block; }

/* ── Gold divider ────────────────────────────────────────── */
.gold-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    margin: 24px 0; border: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .menu-toggle { display: block; }
    .content { padding: 18px; }
    .form-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: 1.3rem; }
}
