/* ══════════════════════════════════════════════════════════════════════════════
   PREMIUM ENTERPRISE DARK MODE SYSTEM (LUXE & GARDENS)
   100% Comprehensive Dark Mode Rule Set - Zero Light Leaks Across All Pages
   ══════════════════════════════════════════════════════════════════════════════ */

/* Core Theme Tokens & CSS Variables Override */
html[data-bs-theme="dark"],
html.dark-mode,
body.dark-mode,
.dark-mode,
[data-bs-theme="dark"] body {
    --pms-bg: #0b0f19 !important;
    --pms-card: #0f172a !important;
    --pms-card-bg: #0f172a !important;
    --pms-card-inner: #1e293b !important;
    --pms-border: rgba(255, 255, 255, 0.08) !important;
    --pms-border-light: rgba(255, 255, 255, 0.05) !important;
    --pms-text: #f8fafc !important;
    --pms-text-main: #f8fafc !important;
    --pms-text-secondary: #cbd5e1 !important;
    --pms-text-muted: #94a3b8 !important;
    --pms-accent: #38bdf8 !important;
    --pms-input-bg: #0b0f19 !important;

    background-color: #0b0f19 !important;
    color: #f8fafc !important;
}

/* Page Layout Wrappers */
html[data-bs-theme="dark"] #layout-wrapper,
html[data-bs-theme="dark"] .main-content,
html[data-bs-theme="dark"] .page-content,
html[data-bs-theme="dark"] .content-body,
body.dark-mode #layout-wrapper,
body.dark-mode .main-content,
body.dark-mode .page-content,
body.dark-mode .content-body,
.dark-mode #layout-wrapper,
.dark-mode .main-content,
.dark-mode .page-content,
.dark-mode .content-body {
    background-color: #0b0f19 !important;
    color: #f8fafc !important;
}

/* Topbar Header & Sidebar */
html[data-bs-theme="dark"] #page-topbar,
html[data-bs-theme="dark"] .navbar-header,
html[data-bs-theme="dark"] .topbar-user-btn,
body.dark-mode #page-topbar,
body.dark-mode .navbar-header,
body.dark-mode .topbar-user-btn,
.dark-mode #page-topbar,
.dark-mode .navbar-header,
.dark-mode .topbar-user-btn {
    background-color: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}

html[data-bs-theme="dark"] .app-menu,
html[data-bs-theme="dark"] .navbar-menu,
body.dark-mode .app-menu,
body.dark-mode .navbar-menu,
.dark-mode .app-menu,
.dark-mode .navbar-menu {
    background-color: #0b0f19 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] .nav-link,
body.dark-mode .nav-link,
.dark-mode .nav-link {
    color: #cbd5e1 !important;
}

html[data-bs-theme="dark"] .nav-link:hover,
html[data-bs-theme="dark"] .nav-link.active,
body.dark-mode .nav-link:hover,
body.dark-mode .nav-link.active,
.dark-mode .nav-link:hover,
.dark-mode .nav-link.active {
    color: #38bdf8 !important;
    background-color: rgba(56, 189, 248, 0.1) !important;
}

/* ── WALKIN BOOKING SPECIFIC FORM & SECTION CARDS (GUEST PROFILE & STAY ALLOCATION) ── */
html[data-bs-theme="dark"] .pms-section-card,
html[data-bs-theme="dark"] .pms-section-header,
html[data-bs-theme="dark"] .pms-section-body,
html[data-bs-theme="dark"] .pms-progress-tracker,
html[data-bs-theme="dark"] .pms-card,
html[data-bs-theme="dark"] .wb-card,
html[data-bs-theme="dark"] .form-card,
html[data-bs-theme="dark"] .guest-profile-card,
html[data-bs-theme="dark"] .stay-allocation-card,
html[data-bs-theme="dark"] .room-type-card,
html[data-bs-theme="dark"] .pms-form-card,
body.dark-mode .pms-section-card,
body.dark-mode .pms-section-header,
body.dark-mode .pms-section-body,
body.dark-mode .pms-progress-tracker,
body.dark-mode .pms-card,
body.dark-mode .wb-card,
body.dark-mode .form-card,
body.dark-mode .guest-profile-card,
body.dark-mode .stay-allocation-card,
body.dark-mode .room-type-card,
body.dark-mode .pms-form-card,
.dark-mode .pms-section-card,
.dark-mode .pms-section-header,
.dark-mode .pms-section-body,
.dark-mode .pms-progress-tracker,
.dark-mode .pms-card,
.dark-mode .wb-card,
.dark-mode .form-card,
.dark-mode .guest-profile-card,
.dark-mode .stay-allocation-card,
.dark-mode .room-type-card,
.dark-mode .pms-form-card {
    background-color: #0f172a !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
}

html[data-bs-theme="dark"] .form-section-title,
body.dark-mode .form-section-title,
.dark-mode .form-section-title {
    color: #f8fafc !important;
}

html[data-bs-theme="dark"] .pms-form-label,
body.dark-mode .pms-form-label,
.dark-mode .pms-form-label {
    color: #94a3b8 !important;
}

html[data-bs-theme="dark"] .pms-avatar,
body.dark-mode .pms-avatar,
.dark-mode .pms-avatar {
    background-color: #1e293b !important;
    color: #38bdf8 !important;
}

/* ── BOOKING MANAGEMENT CARDS & FILTERS ── */
html[data-bs-theme="dark"] .booking-mgmt-card,
html[data-bs-theme="dark"] .stat-widget,
html[data-bs-theme="dark"] .filter-section,
html[data-bs-theme="dark"] .filter-pills-container,
body.dark-mode .booking-mgmt-card,
body.dark-mode .stat-widget,
body.dark-mode .filter-section,
body.dark-mode .filter-pills-container,
.dark-mode .booking-mgmt-card,
.dark-mode .stat-widget,
.dark-mode .filter-section,
.dark-mode .filter-pills-container {
    background-color: #0f172a !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
}

html[data-bs-theme="dark"] .filter-pill,
body.dark-mode .filter-pill,
.dark-mode .filter-pill {
    background-color: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
}

html[data-bs-theme="dark"] .filter-pill.active,
body.dark-mode .filter-pill.active,
.dark-mode .filter-pill.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/* ── BOOKING CALENDAR PAGE LIGHT-LEAK OVERRIDES ── */
html[data-bs-theme="dark"] .pms-sticky-toolbar,
body.dark-mode .pms-sticky-toolbar,
.dark-mode .pms-sticky-toolbar {
    background-color: #0b0f19 !important;
    background: #0b0f19 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(8px) !important;
}

html[data-bs-theme="dark"] .pms-heatmap-card,
body.dark-mode .pms-heatmap-card,
.dark-mode .pms-heatmap-card {
    background-color: #0f172a !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}

html[data-bs-theme="dark"] .pms-timeline-container,
html[data-bs-theme="dark"] .pms-sidebar-right,
html[data-bs-theme="dark"] .pms-timeline-cell-room,
body.dark-mode .pms-timeline-container,
body.dark-mode .pms-sidebar-right,
body.dark-mode .pms-timeline-cell-room,
.dark-mode .pms-timeline-container,
.dark-mode .pms-sidebar-right,
.dark-mode .pms-timeline-cell-room {
    background-color: #0f172a !important;
    background: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}

html[data-bs-theme="dark"] .pms-timeline-header-scroll,
body.dark-mode .pms-timeline-header-scroll,
.dark-mode .pms-timeline-header-scroll {
    background: #0b0f19 !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] .btn-segmented,
body.dark-mode .btn-segmented,
.dark-mode .btn-segmented {
    background-color: #0b0f19 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ── ROOM STATUS & BOOKINGS FILTER PANELS OVERRIDES ── */
html[data-bs-theme="dark"] .fp-card,
html[data-bs-theme="dark"] .fp-head,
html[data-bs-theme="dark"] .fp-body,
html[data-bs-theme="dark"] .pms-filter-card,
html[data-bs-theme="dark"] .filter-card,
html[data-bs-theme="dark"] .filter-panel,
html[data-bs-theme="dark"] .pms-filter-box,
body.dark-mode .fp-card,
body.dark-mode .fp-head,
body.dark-mode .fp-body,
body.dark-mode .pms-filter-card,
body.dark-mode .filter-card,
body.dark-mode .filter-panel,
body.dark-mode .pms-filter-box,
.dark-mode .fp-card,
.dark-mode .fp-head,
.dark-mode .fp-body,
.dark-mode .pms-filter-card,
.dark-mode .filter-card,
.dark-mode .filter-panel,
.dark-mode .pms-filter-box {
    background-color: #0f172a !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}

/* ── HOME PAGE RECENT ACTIVITY / ARRIVALS / DEPARTURES ── */
html[data-bs-theme="dark"] .ops-panel,
html[data-bs-theme="dark"] .guest-card,
html[data-bs-theme="dark"] .pms-summary-card,
body.dark-mode .ops-panel,
body.dark-mode .guest-card,
body.dark-mode .pms-summary-card,
.dark-mode .ops-panel,
.dark-mode .guest-card,
.dark-mode .pms-summary-card {
    background-color: #0f172a !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
}

html[data-bs-theme="dark"] .ops-panel-header,
html[data-bs-theme="dark"] .ops-panel-body,
body.dark-mode .ops-panel-header,
body.dark-mode .ops-panel-body,
.dark-mode .ops-panel-header,
.dark-mode .ops-panel-body {
    background-color: #0f172a !important;
    background: #0f172a !important;
    color: #f8fafc !important;
}

html[data-bs-theme="dark"] .activity-item,
body.dark-mode .activity-item,
.dark-mode .activity-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

html[data-bs-theme="dark"] .activity-item:hover,
body.dark-mode .activity-item:hover,
.dark-mode .activity-item:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

html[data-bs-theme="dark"] .activity-desc,
body.dark-mode .activity-desc,
.dark-mode .activity-desc {
    color: #f8fafc !important;
}

/* ── COMPLETE ELIMINATION OF ALL WHITE INLINE & CLASS BACKGROUNDS ── */
html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-light,
html[data-bs-theme="dark"] .card-header.bg-white,
html[data-bs-theme="dark"] .physical-room-selector,
html[data-bs-theme="dark"] .pms-room-checkbox-label,
html[data-bs-theme="dark"] [style*="background: #fff"],
html[data-bs-theme="dark"] [style*="background:#fff"],
html[data-bs-theme="dark"] [style*="background: white"],
html[data-bs-theme="dark"] [style*="background:white"],
html[data-bs-theme="dark"] [style*="background-color: #fff"],
html[data-bs-theme="dark"] [style*="background-color:#fff"],
html[data-bs-theme="dark"] [style*="background-color: white"],
html[data-bs-theme="dark"] [style*="background-color:white"],
body.dark-mode .bg-white,
body.dark-mode .bg-light,
body.dark-mode .card-header.bg-white,
body.dark-mode [style*="background: #fff"],
body.dark-mode [style*="background:#fff"],
body.dark-mode [style*="background: white"],
body.dark-mode [style*="background:white"],
body.dark-mode [style*="background-color: #fff"],
body.dark-mode [style*="background-color:#fff"],
body.dark-mode [style*="background-color: white"],
body.dark-mode [style*="background-color:white"],
.dark-mode .bg-white,
.dark-mode .bg-light,
.dark-mode [style*="background: #fff"],
.dark-mode [style*="background:#fff"],
.dark-mode [style*="background: white"],
.dark-mode [style*="background:white"],
.dark-mode [style*="background-color: #fff"],
.dark-mode [style*="background-color:#fff"],
.dark-mode [style*="background-color: white"],
.dark-mode [style*="background-color:white"] {
    background-color: #0f172a !important;
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── CARDS, PANELS, MODALS & TABLES ── */
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .pms-card,
html[data-bs-theme="dark"] .rd-card,
html[data-bs-theme="dark"] .kpi-card,
body.dark-mode .card,
body.dark-mode .pms-card,
body.dark-mode .rd-card,
body.dark-mode .kpi-card,
.dark-mode .card,
.dark-mode .pms-card,
.dark-mode .rd-card,
.dark-mode .kpi-card {
    background-color: #0f172a !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    color: #f8fafc !important;
}

html[data-bs-theme="dark"] .card-header,
html[data-bs-theme="dark"] .card-footer,
body.dark-mode .card-header,
body.dark-mode .card-footer,
.dark-mode .card-header,
.dark-mode .card-footer {
    background-color: #0f172a !important;
    background: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}

/* Headings & Text */
html[data-bs-theme="dark"] h1, html[data-bs-theme="dark"] h2, html[data-bs-theme="dark"] h3,
html[data-bs-theme="dark"] h4, html[data-bs-theme="dark"] h5, html[data-bs-theme="dark"] h6,
html[data-bs-theme="dark"] .fw-bold, html[data-bs-theme="dark"] .fw-semibold,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode .fw-bold, body.dark-mode .fw-semibold,
.dark-mode h1, .dark-mode h2, .dark-mode h3,
.dark-mode h4, .dark-mode h5, .dark-mode h6,
.dark-mode .fw-bold, .dark-mode .fw-semibold {
    color: #f8fafc !important;
}

html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .text-secondary,
body.dark-mode .text-muted,
body.dark-mode .text-secondary,
.dark-mode .text-muted,
.dark-mode .text-secondary {
    color: #94a3b8 !important;
}

html[data-bs-theme="dark"] .text-dark,
body.dark-mode .text-dark,
.dark-mode .text-dark {
    color: #f8fafc !important;
}

/* Forms & Text Controls */
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] textarea,
html[data-bs-theme="dark"] .input-group-text,
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode textarea,
body.dark-mode .input-group-text,
.dark-mode .form-control,
.dark-mode .form-select,
.dark-mode textarea,
.dark-mode .input-group-text {
    background-color: #0b0f19 !important;
    background: #0b0f19 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
    border-radius: 8px !important;
}

/* Segmented Filter Buttons & Badges */
html[data-bs-theme="dark"] .seg-group,
body.dark-mode .seg-group,
.dark-mode .seg-group {
    background-color: #0b0f19 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] .seg-btn,
body.dark-mode .seg-btn,
.dark-mode .seg-btn {
    color: #94a3b8 !important;
    background: transparent !important;
}

html[data-bs-theme="dark"] .seg-btn.active,
body.dark-mode .seg-btn.active,
.dark-mode .seg-btn.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/* DataTables & Tables */
html[data-bs-theme="dark"] table,
html[data-bs-theme="dark"] .table,
html[data-bs-theme="dark"] table.dataTable,
body.dark-mode table,
body.dark-mode .table,
body.dark-mode table.dataTable,
.dark-mode table,
.dark-mode .table,
.dark-mode table.dataTable {
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background-color: #0f172a !important;
}

html[data-bs-theme="dark"] table thead th,
html[data-bs-theme="dark"] .table thead th,
html[data-bs-theme="dark"] table.dataTable thead th,
body.dark-mode table thead th,
body.dark-mode .table thead th,
body.dark-mode table.dataTable thead th,
.dark-mode table thead th,
.dark-mode .table thead th,
.dark-mode table.dataTable thead th {
    background-color: #0b0f19 !important;
    color: #cbd5e1 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] table tbody td,
html[data-bs-theme="dark"] .table tbody td,
html[data-bs-theme="dark"] table.dataTable tbody td,
body.dark-mode table tbody td,
body.dark-mode .table tbody td,
body.dark-mode table.dataTable tbody td,
.dark-mode table tbody td,
.dark-mode .table tbody td,
.dark-mode table.dataTable tbody td {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Modals & Popups */
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .offcanvas,
body.dark-mode .modal-content,
body.dark-mode .offcanvas,
.dark-mode .modal-content,
.dark-mode .offcanvas {
    background-color: #0f172a !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}

html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-footer,
html[data-bs-theme="dark"] .offcanvas-header,
body.dark-mode .modal-header,
body.dark-mode .modal-footer,
body.dark-mode .offcanvas-header,
.dark-mode .modal-header,
.dark-mode .modal-footer,
.dark-mode .offcanvas-header {
    background-color: #0b0f19 !important;
    background: #0b0f19 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
