/* Theme toggle — sits next to language switcher, never overlays menu text */
.cblms-theme-toggle:not(.cblms-theme-toggle-admin) {
    position: relative;
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
    border-radius: 0.65rem;
    border: 1px solid rgba(20, 33, 61, 0.14);
    background: #fff;
    color: #14213d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(20, 33, 61, 0.05);
    cursor: pointer;
    padding: 0;
    transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.cblms-theme-toggle:not(.cblms-theme-toggle-admin):hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.cblms-theme-toggle:not(.cblms-theme-toggle-admin):focus-visible {
    outline: 2px solid #2f8fd1;
    outline-offset: 2px;
}

.cblms-theme-toggle-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    line-height: 1;
    white-space: nowrap;
}

.cblms-theme-toggle-admin [data-theme-icon] {
    font-size: 0.95rem;
    line-height: 1;
}

.cblms-theme-toggle-admin .cblms-theme-label {
    font-size: 0.78rem;
    font-weight: 600;
}

.cblms-theme-toggle [data-theme-icon="sun"] { display: none; }
.cblms-theme-toggle [data-theme-icon="moon"] { display: inline-block; }

html[data-bs-theme="dark"] .cblms-theme-toggle:not(.cblms-theme-toggle-admin) {
    background: #243447;
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

html[data-bs-theme="dark"] .cblms-theme-toggle [data-theme-icon="sun"] { display: inline-block; }
html[data-bs-theme="dark"] .cblms-theme-toggle [data-theme-icon="moon"] { display: none; }

.cblms-theme-toggle.is-floating {
    position: fixed;
    top: 0.75rem;
    inset-inline-end: 0.75rem;
    z-index: 1090;
}

/* Shared single language toggle (admin / portal) */
.cblms-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border-radius: 0.75rem;
    border: 1px solid #e8edf5;
    background: #fff;
    text-decoration: none;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.cblms-lang-toggle:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateY(-1px);
}

.cblms-lang-flag {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 0.15rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    display: block;
}

.cblms-lang-toggle-light {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
}

.cblms-lang-toggle-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ================================================================== */
/* Dark mode — cohesive surfaces, keep brand accents for CTAs        */
/* ================================================================== */
html[data-bs-theme="dark"] {
    color-scheme: dark;
    --cb-bg: #0b1220;
    --cb-bg-elevated: #111827;
    --cb-card: #1a2436;
    --cb-card-soft: #152033;
    --cb-text: #e8eef7;
    --cb-text-muted: #94a3b8;
    --cb-line: #2a364a;
    --cb-line-strong: #3b4a63;
    --cb-accent: #56a9e0;
    --cb-accent-soft: rgba(86, 169, 224, 0.16);

    /* Brand tokens used across website.css — keep usable, don't invert navy to white */
    --cb-teal: #8ec8f0;
    --cb-teal-dark: #0a1420;
    --cb-gold: #56a9e0;
    --cb-cream: #152033;
    --cb-border: #2a364a;
    --cb-surface: #152033;
    --cb-dark: #e8eef7;
    --cb-sky: #7dd3fc;
    --cb-login: #3d9fd6;
    --cb-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
    --cb-shadow-hover: 0 18px 48px rgba(0, 0, 0, 0.48);

    --bs-body-bg: #0b1220;
    --bs-body-color: #e8eef7;
    --bs-border-color: #2a364a;
    --bs-secondary-color: #94a3b8;
    --bs-tertiary-bg: #152033;
    --bs-secondary-bg: #1a2436;

    /* Admin panel tokens */
    --cblms-fg: #e8eef7;
    --cblms-fg-heading: #f1f5f9;
    --cblms-fg-muted: #94a3b8;
    --cblms-fg-soft: #94a3b8;
    --cblms-surface: #1a2436;
    --cblms-surface-soft: #152033;
    --cblms-surface-muted: #152033;
    --cblms-table-head-bg: #152033;
    --cblms-border: #2a364a;
    --cblms-table-hover: #1f2d44;
}

html[data-bs-theme="dark"] body,
html[data-bs-theme="dark"] .website-body,
html[data-bs-theme="dark"] .portal-body,
html[data-bs-theme="dark"] .admin-content,
html[data-bs-theme="dark"] .admin-main {
    background: var(--cb-bg) !important;
    color: var(--cb-text);
}

/* —— Website nav —— */
html[data-bs-theme="dark"] .luxury-nav,
html[data-bs-theme="dark"] .luxury-nav.is-scrolled {
    background: rgba(11, 18, 32, 0.94) !important;
    border-bottom-color: var(--cb-line) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

html[data-bs-theme="dark"] .navbar-brand,
html[data-bs-theme="dark"] .brand-nav-text {
    color: var(--cb-text) !important;
}

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

html[data-bs-theme="dark"] .luxury-nav .nav-link:hover,
html[data-bs-theme="dark"] .luxury-nav .nav-link:focus {
    color: #fff !important;
    background: rgba(86, 169, 224, 0.14);
}

html[data-bs-theme="dark"] .navbar-toggler { border-color: var(--cb-line-strong); }
html[data-bs-theme="dark"] .navbar-toggler-icon { filter: invert(1); }

html[data-bs-theme="dark"] .website-nav-logo,
html[data-bs-theme="dark"] .footer-logo,
html[data-bs-theme="dark"] .login-modal-logo {
    background: #fff;
    border-color: rgba(255, 255, 255, 0.12);
}

html[data-bs-theme="dark"] .nav-utility-inline {
    border-inline-start-color: var(--cb-line);
}

html[data-bs-theme="dark"] .nav-login-btn {
    background: var(--cb-login);
    color: #fff !important;
    border-color: transparent;
}

html[data-bs-theme="dark"] .nav-lang-toggle {
    background: var(--cb-card);
    border-color: var(--cb-line);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .nav-lang-toggle:hover {
    background: #243447;
    color: #fff;
    border-color: var(--cb-accent);
}

html[data-bs-theme="dark"] .nav-login-menu,
html[data-bs-theme="dark"] .dropdown-menu {
    background: var(--cb-card);
    border-color: var(--cb-line);
    box-shadow: var(--cb-shadow);
}

html[data-bs-theme="dark"] .nav-login-option:hover,
html[data-bs-theme="dark"] .nav-login-option:focus,
html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
    background: rgba(86, 169, 224, 0.12);
    color: #fff;
}

html[data-bs-theme="dark"] .nav-login-option strong,
html[data-bs-theme="dark"] .dropdown-item {
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .nav-login-option small,
html[data-bs-theme="dark"] .nav-login-mobile-label,
html[data-bs-theme="dark"] .utility-link {
    color: var(--cb-text-muted);
}

html[data-bs-theme="dark"] .nav-login-mobile {
    background: var(--cb-card-soft);
    border-color: var(--cb-line);
}

html[data-bs-theme="dark"] .nav-login-mobile-item {
    background: var(--cb-card);
    border-color: var(--cb-line);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .nav-login-option-icon-hotel { background: rgba(61, 159, 214, 0.18); color: #7dd3fc; }
html[data-bs-theme="dark"] .nav-login-option-icon-customer { background: rgba(86, 169, 224, 0.18); color: #93c5fd; }
html[data-bs-theme="dark"] .nav-login-option-icon-staff { background: rgba(148, 163, 184, 0.18); color: #e2e8f0; }

/* —— Website hero & sections —— */
html[data-bs-theme="dark"] .hero-section {
    background: linear-gradient(180deg, #0b1220 0%, #101a2c 55%, #0b1220 100%);
}

html[data-bs-theme="dark"] .hero-orb-1 {
    background: radial-gradient(circle, rgba(86, 169, 224, 0.22), transparent 68%);
}

html[data-bs-theme="dark"] .hero-orb-2 {
    background: radial-gradient(circle, rgba(61, 159, 214, 0.16), transparent 70%);
}

html[data-bs-theme="dark"] .hero-orb-3 {
    background: radial-gradient(circle, rgba(125, 211, 252, 0.14), transparent 72%);
}

html[data-bs-theme="dark"] .hero-badge {
    background: rgba(86, 169, 224, 0.16);
    color: #93c5fd;
}

html[data-bs-theme="dark"] .hero-title,
html[data-bs-theme="dark"] .section-title,
html[data-bs-theme="dark"] .clean-category-label {
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .hero-tagline,
html[data-bs-theme="dark"] .section-subtitle,
html[data-bs-theme="dark"] .about-copy,
html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .text-secondary {
    color: var(--cb-text-muted) !important;
}

html[data-bs-theme="dark"] .hero-feature,
html[data-bs-theme="dark"] .hero-showcase-frame,
html[data-bs-theme="dark"] .hero-cta-secondary,
html[data-bs-theme="dark"] .hero-float-card {
    background: var(--cb-card);
    border-color: var(--cb-line);
    color: var(--cb-text);
    box-shadow: var(--cb-shadow);
}

html[data-bs-theme="dark"] .hero-feature-icon,
html[data-bs-theme="dark"] .clean-category-icon {
    background: var(--cb-card-soft);
    border-color: var(--cb-line);
    color: var(--cb-accent);
}

html[data-bs-theme="dark"] .hero-cta-secondary:hover {
    background: #243447;
    color: #fff;
    border-color: var(--cb-accent);
}

html[data-bs-theme="dark"] .hero-float-card strong { color: var(--cb-text); }
html[data-bs-theme="dark"] .hero-float-card small { color: var(--cb-text-muted); }

html[data-bs-theme="dark"] .what-we-clean-strip,
html[data-bs-theme="dark"] .promo-banner-section,
html[data-bs-theme="dark"] #about,
html[data-bs-theme="dark"] #packages {
    background: var(--cb-bg);
    border-color: var(--cb-line);
}

html[data-bs-theme="dark"] #services,
html[data-bs-theme="dark"] #contact,
html[data-bs-theme="dark"] #gallery {
    background: var(--cb-bg-elevated);
    border-color: var(--cb-line);
}

html[data-bs-theme="dark"] .service-card,
html[data-bs-theme="dark"] .package-card,
html[data-bs-theme="dark"] .workflow-card,
html[data-bs-theme="dark"] .feature-card,
html[data-bs-theme="dark"] .gallery-card,
html[data-bs-theme="dark"] .contact-card,
html[data-bs-theme="dark"] .about-panel,
html[data-bs-theme="dark"] .track-result-card,
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .list-group-item,
html[data-bs-theme="dark"] .accordion-item,
html[data-bs-theme="dark"] .offcanvas {
    background: var(--cb-card) !important;
    border-color: var(--cb-line) !important;
    color: var(--cb-text);
    box-shadow: var(--cb-shadow);
}

html[data-bs-theme="dark"] .service-card:hover,
html[data-bs-theme="dark"] .package-card:hover {
    border-color: rgba(86, 169, 224, 0.35);
}

html[data-bs-theme="dark"] .package-card .price-tag {
    color: #93c5fd;
}

html[data-bs-theme="dark"] .site-footer,
html[data-bs-theme="dark"] .website-footer {
    background: #070d18;
    color: rgba(232, 238, 247, 0.82);
    border-top: 1px solid var(--cb-line);
}

html[data-bs-theme="dark"] .login-modal-body,
html[data-bs-theme="dark"] .modal-body,
html[data-bs-theme="dark"] .modal-footer,
html[data-bs-theme="dark"] .modal-header:not([class*="login-modal-header"]) {
    background: var(--cb-card);
    border-color: var(--cb-line);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(1);
}

/* Keep colored login headers readable */
html[data-bs-theme="dark"] .login-modal-header-hotel {
    background: linear-gradient(135deg, #0b4f78, #0a3d5c);
}

html[data-bs-theme="dark"] .login-modal-header-customer {
    background: linear-gradient(135deg, #2f8fd1, #1d6fa3);
}

html[data-bs-theme="dark"] .login-modal-header-staff {
    background: linear-gradient(135deg, #1a2f4d, #14213d);
}

html[data-bs-theme="dark"] .login-modal-header .login-modal-title,
html[data-bs-theme="dark"] .login-modal-header .login-modal-subtitle {
    color: #fff !important;
}

html[data-bs-theme="dark"] .login-modal-submit-staff {
    background: #1e3354;
    color: #fff;
}

html[data-bs-theme="dark"] .hero-cta-primary {
    background: linear-gradient(135deg, #56a9e0, #2f8fd1);
    color: #fff;
}

/* —— Forms & tables —— */
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .input-group-text,
html[data-bs-theme="dark"] textarea.form-control {
    background-color: #0f172a !important;
    border-color: var(--cb-line-strong) !important;
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .form-control::placeholder {
    color: #64748b;
}

html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
    background-color: #0f172a !important;
    border-color: var(--cb-accent) !important;
    box-shadow: 0 0 0 0.2rem rgba(86, 169, 224, 0.22);
    color: #f8fafc !important;
}

html[data-bs-theme="dark"] .form-check-input {
    background-color: #0f172a;
    border-color: var(--cb-line-strong);
}

html[data-bs-theme="dark"] .table {
    --bs-table-bg: var(--cb-card);
    --bs-table-color: var(--cb-text);
    --bs-table-border-color: var(--cb-line);
    --bs-table-striped-bg: #152033;
    --bs-table-hover-bg: #1f2d44;
    --bs-table-striped-color: var(--cb-text);
    --bs-table-hover-color: #f8fafc;
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .table thead th,
html[data-bs-theme="dark"] .dash-table thead th {
    background: #152033;
    color: #cbd5e1;
    border-color: var(--cb-line);
}

/* Admin panels — app.css sets dark text on tables/cards; restore readable contrast */
html[data-bs-theme="dark"] .admin-content .card-header h4,
html[data-bs-theme="dark"] .admin-content .card-header h5,
html[data-bs-theme="dark"] .admin-content .card-header .h4,
html[data-bs-theme="dark"] .admin-content .form-label,
html[data-bs-theme="dark"] .admin-content .modal-title,
html[data-bs-theme="dark"] .admin-content .nav-tabs .nav-link,
html[data-bs-theme="dark"] .topbar-user-name {
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .admin-content .nav-tabs .nav-link.active {
    color: #93c5fd !important;
}

html[data-bs-theme="dark"] .admin-content .text-muted,
html[data-bs-theme="dark"] .admin-content .form-text,
html[data-bs-theme="dark"] .admin-content small,
html[data-bs-theme="dark"] .admin-content .small {
    color: var(--cb-text-muted) !important;
}

html[data-bs-theme="dark"] .admin-content .table,
html[data-bs-theme="dark"] .admin-content .table > :not(caption) > * > * {
    color: var(--cb-text) !important;
    border-color: var(--cb-line) !important;
}

html[data-bs-theme="dark"] .admin-content .table td,
html[data-bs-theme="dark"] .admin-content .table th,
html[data-bs-theme="dark"] .admin-content .table tbody td,
html[data-bs-theme="dark"] .admin-content .dash-table tbody td {
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .admin-content .table thead th,
html[data-bs-theme="dark"] .admin-content .table-light th,
html[data-bs-theme="dark"] .admin-content .table > thead.table-light > tr > th {
    background-color: #152033 !important;
    color: #cbd5e1 !important;
    border-color: var(--cb-line) !important;
}

html[data-bs-theme="dark"] .admin-content .table > tfoot.table-light > tr > th,
html[data-bs-theme="dark"] .admin-content .table > tfoot.table-light > tr > td,
html[data-bs-theme="dark"] .admin-content .table > tbody > tr.table-light > th,
html[data-bs-theme="dark"] .admin-content .table > tbody > tr.table-light > td {
    background-color: #152033 !important;
    color: #cbd5e1 !important;
    border-color: var(--cb-line) !important;
}

html[data-bs-theme="dark"] .admin-content tfoot.table-light .text-success,
html[data-bs-theme="dark"] .admin-content tbody > tr.table-light .text-success {
    color: #34d399 !important;
}

html[data-bs-theme="dark"] .admin-content tfoot.table-light .text-danger,
html[data-bs-theme="dark"] .admin-content tbody > tr.table-light .text-danger {
    color: #f87171 !important;
}

html[data-bs-theme="dark"] .admin-content tfoot.table-light .text-muted,
html[data-bs-theme="dark"] .admin-content tbody > tr.table-light .text-muted {
    color: var(--cb-text-muted) !important;
}

html[data-bs-theme="dark"] .hotel-admin .table > tfoot.table-light > tr > *,
html[data-bs-theme="dark"] .hotel-admin .table > tbody > tr.table-light > *,
html[data-bs-theme="dark"] .reports-dashboard .table > tfoot.table-light > tr > *,
html[data-bs-theme="dark"] .reports-dashboard .table > tbody > tr.table-light > * {
    background-color: #152033 !important;
    color: #cbd5e1 !important;
    border-color: var(--cb-line) !important;
}

html[data-bs-theme="dark"] .admin-content .table-hover > tbody > tr:hover > * {
    --bs-table-hover-bg: #1f2d44;
    --bs-table-hover-color: #f8fafc;
    color: #f8fafc !important;
    background-color: #1f2d44 !important;
}

html[data-bs-theme="dark"] .dash-table thead th,
html[data-bs-theme="dark"] .dash-table tbody td,
html[data-bs-theme="dark"] .dash-board .card-header h6,
html[data-bs-theme="dark"] .dash-filter-label,
html[data-bs-theme="dark"] .dash-period-label {
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .dash-summary-card {
    background: var(--cb-card) !important;
    border-color: var(--cb-line) !important;
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .dash-summary-title,
html[data-bs-theme="dark"] .dash-summary-row {
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .dash-summary-meta {
    color: var(--cb-text-muted) !important;
}

html[data-bs-theme="dark"] .dash-unpaid-link {
    color: #fbbf24 !important;
}

html[data-bs-theme="dark"] .dash-unpaid-link:hover {
    color: #fde68a !important;
}

html[data-bs-theme="dark"] .dash-paid-link {
    color: #4ade80 !important;
}

html[data-bs-theme="dark"] .dash-paid-link:hover {
    color: #86efac !important;
}

html[data-bs-theme="dark"] .dash-billed-link {
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .dash-billed-link:hover {
    color: #93c5fd !important;
}

html[data-bs-theme="dark"] .package-alert-card {
    background: var(--cb-card) !important;
    border-color: var(--cb-line) !important;
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .package-alert-card.is-warn {
    background: rgba(234, 179, 8, 0.12) !important;
    border-color: rgba(234, 179, 8, 0.35) !important;
    color: #fde68a !important;
}

html[data-bs-theme="dark"] .package-alerts-search {
    border-top-color: var(--cb-line) !important;
}

html[data-bs-theme="dark"] #regularResultsTable tbody tr.row-unpaid,
html[data-bs-theme="dark"] #packageResultsTable tbody tr.row-unpaid,
html[data-bs-theme="dark"] #subscriptionResultsTable tbody tr.row-unpaid,
html[data-bs-theme="dark"] #regularBalancesTable tbody tr.row-unpaid,
html[data-bs-theme="dark"] #packageBalancesTable tbody tr.row-unpaid,
html[data-bs-theme="dark"] #reprintRegularTable tbody tr.row-unpaid,
html[data-bs-theme="dark"] #reprintPackageTable tbody tr.row-unpaid,
html[data-bs-theme="dark"] #reprintSubscriptionTable tbody tr.row-unpaid {
    background: rgba(234, 179, 8, 0.1) !important;
}

html[data-bs-theme="dark"] #regularResultsTable tbody tr.row-unpaid td,
html[data-bs-theme="dark"] #packageResultsTable tbody tr.row-unpaid td,
html[data-bs-theme="dark"] #subscriptionResultsTable tbody tr.row-unpaid td,
html[data-bs-theme="dark"] #regularBalancesTable tbody tr.row-unpaid td,
html[data-bs-theme="dark"] #packageBalancesTable tbody tr.row-unpaid td,
html[data-bs-theme="dark"] #reprintRegularTable tbody tr.row-unpaid td,
html[data-bs-theme="dark"] #reprintPackageTable tbody tr.row-unpaid td,
html[data-bs-theme="dark"] #reprintSubscriptionTable tbody tr.row-unpaid td {
    color: #fde68a !important;
}

html[data-bs-theme="dark"] .pay-status-unpaid {
    color: #fcd34d !important;
}

html[data-bs-theme="dark"] .pay-status-paid {
    color: #86efac !important;
}

html[data-bs-theme="dark"] .accountant-period-bar {
    background: linear-gradient(180deg, #152033, var(--cb-card)) !important;
    border-color: var(--cb-line) !important;
    color: var(--cb-text);
}

html[data-bs-theme="dark"] table.dataTable tbody td,
html[data-bs-theme="dark"] table.dataTable thead th {
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .reports-dashboard .reports-title,
html[data-bs-theme="dark"] .reports-dashboard .reports-filter .form-label,
html[data-bs-theme="dark"] .reports-kpi {
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .reports-kpi {
    background: var(--cb-card) !important;
    border-color: var(--cb-line) !important;
}

html[data-bs-theme="dark"] .reports-mini-table thead th,
html[data-bs-theme="dark"] .reports-mini-table td {
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .hotel-admin .table thead th {
    background: #152033 !important;
    color: #cbd5e1 !important;
}

html[data-bs-theme="dark"] .hotel-admin .table td,
html[data-bs-theme="dark"] .hotel-admin .table tbody td {
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .hotel-admin .hq-card {
    background: var(--cb-card) !important;
    border-color: var(--cb-line) !important;
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-light,
html[data-bs-theme="dark"] .bg-body,
html[data-bs-theme="dark"] .bg-body-tertiary {
    background-color: var(--cb-card) !important;
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .border,
html[data-bs-theme="dark"] .border-bottom,
html[data-bs-theme="dark"] .border-top,
html[data-bs-theme="dark"] .border-start,
html[data-bs-theme="dark"] .border-end {
    border-color: var(--cb-line) !important;
}

html[data-bs-theme="dark"] hr {
    border-color: var(--cb-line);
    opacity: 1;
}

/* —— Buttons —— */
html[data-bs-theme="dark"] .btn-outline-secondary,
html[data-bs-theme="dark"] .btn-outline-dark {
    color: #cbd5e1;
    border-color: var(--cb-line-strong);
}

html[data-bs-theme="dark"] .btn-outline-secondary:hover,
html[data-bs-theme="dark"] .btn-outline-dark:hover {
    background: #243447;
    border-color: #64748b;
    color: #fff;
}

html[data-bs-theme="dark"] .btn-light,
html[data-bs-theme="dark"] .btn-outline-light {
    background: #243447;
    border-color: var(--cb-line-strong);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .btn-light:hover {
    background: #2f4058;
    color: #fff;
}

html[data-bs-theme="dark"] .btn-primary,
html[data-bs-theme="dark"] .btn-gold {
    background: var(--cb-accent);
    border-color: var(--cb-accent);
    color: #0b1220;
}

html[data-bs-theme="dark"] .btn-primary:hover,
html[data-bs-theme="dark"] .btn-gold:hover {
    background: #7bbce8;
    border-color: #7bbce8;
    color: #0b1220;
}

/* —— Admin —— */
html[data-bs-theme="dark"] .admin-topbar {
    background: var(--cb-card) !important;
    border-bottom-color: var(--cb-line) !important;
}

html[data-bs-theme="dark"] .topbar-user-name { color: #f1f5f9; }

html[data-bs-theme="dark"] .admin-user-avatar {
    background: rgba(123, 188, 232, 0.18);
    color: #7bbce8;
}

html[data-bs-theme="dark"] .sidebar-reopen-btn {
    background: #243447;
    border-color: var(--cb-line);
    color: #7bbce8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

html[data-bs-theme="dark"] .sidebar-reopen-btn:hover,
html[data-bs-theme="dark"] .sidebar-reopen-btn:focus {
    background: #2f4058;
    border-color: #7bbce8;
    color: #fff;
}

html[data-bs-theme="dark"] .admin-topbar .btn-outline-secondary,
html[data-bs-theme="dark"] .admin-topbar .cblms-theme-toggle-admin {
    background: #243447;
    border-color: var(--cb-line);
    color: #fff;
}

html[data-bs-theme="dark"] .admin-topbar .cblms-theme-toggle-admin [data-theme-icon] {
    color: #fff;
}

html[data-bs-theme="dark"] .admin-topbar .btn-outline-secondary:hover,
html[data-bs-theme="dark"] .admin-topbar .cblms-theme-toggle-admin:hover {
    background: #2f4058;
    border-color: #3d5168;
    color: #fff;
}

html[data-bs-theme="dark"] body.sidebar-open::after {
    background: rgba(2, 6, 23, 0.72);
}

html[data-bs-theme="dark"] .admin-sidebar {
    background: linear-gradient(180deg, #0b2230, #12394a);
    box-shadow: 10px 0 28px rgba(0, 0, 0, 0.45);
}

html[data-bs-theme="dark"][dir="rtl"] .admin-sidebar {
    box-shadow: -10px 0 28px rgba(0, 0, 0, 0.45);
}

html[data-bs-theme="dark"] .sidebar-mobile-close {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .admin-user-menu-avatar-lg {
    background: rgba(123, 188, 232, 0.18);
    color: #7bbce8;
}

html[data-bs-theme="dark"] .admin-user-menu-panel {
    background: var(--cb-card);
    border-color: var(--cb-line);
}

html[data-bs-theme="dark"] .admin-user-menu-title {
    color: #f1f5f9;
}

html[data-bs-theme="dark"] .admin-user-menu-role {
    color: var(--cb-text-muted);
}

html[data-bs-theme="dark"] .admin-user-menu-panel .dropdown-item,
html[data-bs-theme="dark"] .admin-user-menu-item {
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .admin-user-menu-panel .dropdown-item:hover,
html[data-bs-theme="dark"] .admin-user-menu-item:hover {
    background: #243447;
    color: #fff;
}

html[data-bs-theme="dark"] .admin-user-menu-item-icon {
    color: var(--cb-text-muted);
}

html[data-bs-theme="dark"] .cblms-lang-toggle:not(.cblms-lang-toggle-light) {
    background: #243447;
    border-color: var(--cb-line);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .cblms-lang-toggle:not(.cblms-lang-toggle-light):hover {
    background: #2f4058;
    color: #fff;
}

html[data-bs-theme="dark"] .stat-card,
html[data-bs-theme="dark"] .workflow-card,
html[data-bs-theme="dark"] .dash-board .card,
html[data-bs-theme="dark"] .page-back-bar .page-back-btn {
    background: var(--cb-card) !important;
    border-color: var(--cb-line);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .page-back-bar .page-back-btn:hover {
    background: #243447 !important;
}

html[data-bs-theme="dark"] .dash-kpi-soft,
html[data-bs-theme="dark"] .dash-kpi-soft-teal,
html[data-bs-theme="dark"] .dash-kpi-soft-gold,
html[data-bs-theme="dark"] .dash-kpi-soft-navy {
    background: #152033 !important;
    color: var(--cb-text);
    border: 1px solid var(--cb-line);
}

html[data-bs-theme="dark"] .dash-period-meta,
html[data-bs-theme="dark"] .dash-kpi-label,
html[data-bs-theme="dark"] .dash-kpi-meta {
    color: var(--cb-text-muted) !important;
}

html[data-bs-theme="dark"] .dash-kpi-value,
html[data-bs-theme="dark"] .dash-period-value,
html[data-bs-theme="dark"] .dash-board .card-header h6 {
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .notif-dropdown .list-group-item.unread {
    background: rgba(86, 169, 224, 0.12) !important;
}

html[data-bs-theme="dark"] .notif-dropdown .list-group-item:hover {
    background: #243447 !important;
}

html[data-bs-theme="dark"] .notif-toast {
    background: #1a2436;
    border-color: var(--cb-line);
    color: var(--cb-text);
    box-shadow: var(--cb-shadow);
}

html[data-bs-theme="dark"] .alert-warning,
html[data-bs-theme="dark"] .alert-info,
html[data-bs-theme="dark"] .alert-success,
html[data-bs-theme="dark"] .alert-danger,
html[data-bs-theme="dark"] .alert-primary,
html[data-bs-theme="dark"] .alert-secondary {
    border-color: transparent;
}

html[data-bs-theme="dark"] .alert-warning { background: rgba(234, 179, 8, 0.16); color: #fde68a; }
html[data-bs-theme="dark"] .alert-info { background: rgba(56, 189, 248, 0.14); color: #bae6fd; }
html[data-bs-theme="dark"] .alert-success { background: rgba(34, 197, 94, 0.14); color: #bbf7d0; }
html[data-bs-theme="dark"] .alert-danger { background: rgba(248, 113, 113, 0.14); color: #fecaca; }
html[data-bs-theme="dark"] .alert-primary { background: rgba(86, 169, 224, 0.16); color: #bfdbfe; }
html[data-bs-theme="dark"] .alert-secondary { background: rgba(148, 163, 184, 0.14); color: #e2e8f0; }

html[data-bs-theme="dark"] .badge.bg-light,
html[data-bs-theme="dark"] .badge.text-dark {
    background: #243447 !important;
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] .pagination .page-link {
    background: var(--cb-card);
    border-color: var(--cb-line);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background: var(--cb-accent);
    border-color: var(--cb-accent);
    color: #0b1220;
}

html[data-bs-theme="dark"] .pagination .page-link:hover {
    background: #243447;
    color: #fff;
}

html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info,
html[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate {
    color: var(--cb-text-muted);
}

html[data-bs-theme="dark"] table.dataTable tbody tr {
    background: transparent;
}

html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection,
html[data-bs-theme="dark"] .select2-dropdown,
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown,
html[data-bs-theme="dark"] .select2-results,
html[data-bs-theme="dark"] .select2-results__options,
html[data-bs-theme="dark"] .select2-results__option,
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-search,
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field {
    background-color: #0f172a !important;
    border-color: var(--cb-line-strong) !important;
    color: var(--cb-text) !important;
}

html[data-bs-theme="dark"] .hotel-admin .select2-container--bootstrap-5 .select2-selection,
html[data-bs-theme="dark"] .hotel-admin .select2-dropdown,
html[data-bs-theme="dark"] .hotel-admin .select2-results__options,
html[data-bs-theme="dark"] .hotel-admin .select2-results__option {
    background: #0f172a !important;
    border-color: #3b4a63 !important;
    color: #e8eef7 !important;
}

html[data-bs-theme="dark"] .select2-results__option--highlighted,
html[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted {
    background: rgba(86, 169, 224, 0.28) !important;
    color: #fff !important;
}

html[data-bs-theme="dark"] .swal2-popup {
    background: var(--cb-card);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .swal2-title,
html[data-bs-theme="dark"] .swal2-html-container,
html[data-bs-theme="dark"] .swal2-content {
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .swal2-input,
html[data-bs-theme="dark"] .swal2-textarea,
html[data-bs-theme="dark"] .swal2-select {
    background: #0f172a !important;
    color: var(--cb-text) !important;
    border-color: var(--cb-line-strong) !important;
}

/* —— Auth —— */
html[data-bs-theme="dark"] .auth-body {
    background: linear-gradient(135deg, #070d18, #0f2a38 55%, #12394a) !important;
}

html[data-bs-theme="dark"] .auth-card,
html[data-bs-theme="dark"] .portal-login-card {
    background: var(--cb-card);
    border-color: var(--cb-line);
    color: var(--cb-text);
    box-shadow: var(--cb-shadow);
}

/* —— Portal —— */
html[data-bs-theme="dark"] .portal-card,
html[data-bs-theme="dark"] .package-portal-card,
html[data-bs-theme="dark"] .available-package-card {
    background: var(--cb-card) !important;
    border-color: var(--cb-line);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .portal-renew-card {
    background: linear-gradient(135deg, #2a2418, #1a2436) !important;
    border-color: rgba(234, 179, 8, 0.25);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .portal-section-title {
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .portal-hero-card,
html[data-bs-theme="dark"] .portal-hero-card h1,
html[data-bs-theme="dark"] .portal-hero-card h2,
html[data-bs-theme="dark"] .portal-hero-card h3,
html[data-bs-theme="dark"] .portal-hero-card h4,
html[data-bs-theme="dark"] .portal-hero-card h5,
html[data-bs-theme="dark"] .portal-hero-card p,
html[data-bs-theme="dark"] .dash-kpi-navy,
html[data-bs-theme="dark"] .dash-kpi-teal,
html[data-bs-theme="dark"] .dash-kpi-green,
html[data-bs-theme="dark"] .dash-kpi-gold,
html[data-bs-theme="dark"] .dash-kpi-slate,
html[data-bs-theme="dark"] .dash-kpi-accent {
    color: #fff !important;
}

/* —— Live chat —— */
html[data-bs-theme="dark"] .cb-chat-panel {
    background: var(--cb-card);
    border-color: var(--cb-line);
    box-shadow: var(--cb-shadow);
}

html[data-bs-theme="dark"] .cb-chat-body,
html[data-bs-theme="dark"] .cb-chat-thread-wrap,
html[data-bs-theme="dark"] .cb-chat-thread {
    background: #0f172a;
}

html[data-bs-theme="dark"] .cb-chat-footer,
html[data-bs-theme="dark"] .cb-chat-attach-bar {
    background: var(--cb-card);
    border-color: var(--cb-line);
}

html[data-bs-theme="dark"] .cb-bot-bubble,
html[data-bs-theme="dark"] .cb-msg,
html[data-bs-theme="dark"] .cb-msg.is-bot {
    background: #243447;
    border-color: var(--cb-line);
    color: var(--cb-text);
    box-shadow: none;
}

html[data-bs-theme="dark"] .cb-msg.is-staff {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.28);
    color: #dcfce7;
}

html[data-bs-theme="dark"] .cb-msg.is-staff-named .cb-msg-meta {
    color: #86efac;
}

html[data-bs-theme="dark"] .cb-choice {
    background: #1a2436;
    border-color: #3d9fd6;
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .cb-choice:hover {
    background: rgba(86, 169, 224, 0.16);
}

html[data-bs-theme="dark"] .cb-attach-btn {
    background: #243447;
    border-color: var(--cb-line);
    color: #93c5fd;
}

html[data-bs-theme="dark"] .list-group-item-action:hover,
html[data-bs-theme="dark"] .list-group-item-action:focus {
    background: #243447;
    color: #fff;
}

html[data-bs-theme="dark"] code,
html[data-bs-theme="dark"] .form-text {
    color: #93c5fd;
}

html[data-bs-theme="dark"] code {
    background: rgba(86, 169, 224, 0.12);
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
}

html[data-bs-theme="dark"] .progress {
    background-color: #243447;
}

html[data-bs-theme="dark"] .accordion-button {
    background: var(--cb-card);
    color: var(--cb-text);
}

html[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background: #152033;
    color: #93c5fd;
    box-shadow: inset 0 -1px 0 var(--cb-line);
}

html[data-bs-theme="dark"] .accordion-button::after {
    filter: invert(1);
}

html[data-bs-theme="dark"] .accordion-body {
    background: var(--cb-card);
    color: var(--cb-text);
}

/* ===== Admin / hotel — global dark readability (token safety net) ===== */
html[data-bs-theme="dark"] .hotel-admin {
    --ha-ink: var(--cblms-fg);
    --ha-muted: var(--cblms-fg-muted);
    --ha-line: var(--cblms-border);
    --ha-sky: var(--cblms-surface-soft);
    color: var(--cblms-fg);
}

html[data-bs-theme="dark"] .admin-content .card,
html[data-bs-theme="dark"] .admin-content .modal-content,
html[data-bs-theme="dark"] .admin-content .list-group-item,
html[data-bs-theme="dark"] .admin-content .accordion-item,
html[data-bs-theme="dark"] .hotel-admin .card,
html[data-bs-theme="dark"] .hotel-admin .invoice-panel,
html[data-bs-theme="dark"] .stat-card,
html[data-bs-theme="dark"] .workflow-card,
html[data-bs-theme="dark"] .reports-dashboard .card {
    background-color: var(--cblms-surface) !important;
    color: var(--cblms-fg) !important;
    border-color: var(--cblms-border) !important;
}

html[data-bs-theme="dark"] .admin-content table :is(td, th),
html[data-bs-theme="dark"] .hotel-admin table :is(td, th),
html[data-bs-theme="dark"] .reports-dashboard table :is(td, th),
html[data-bs-theme="dark"] table.dataTable :is(td, th) {
    color: var(--cblms-fg) !important;
}

html[data-bs-theme="dark"] .admin-content table thead :is(td, th),
html[data-bs-theme="dark"] .hotel-admin table thead :is(td, th),
html[data-bs-theme="dark"] .reports-dashboard table thead :is(td, th),
html[data-bs-theme="dark"] table.dataTable thead :is(td, th) {
    background-color: var(--cblms-table-head-bg) !important;
    color: #cbd5e1 !important;
}

html[data-bs-theme="dark"] .admin-content .table-hover > tbody > tr:hover > *,
html[data-bs-theme="dark"] .hotel-admin .table-hover > tbody > tr:hover > * {
    color: #f8fafc !important;
    background-color: var(--cblms-table-hover) !important;
}

html[data-bs-theme="dark"] .admin-content .text-dark,
html[data-bs-theme="dark"] .hotel-admin .text-dark,
html[data-bs-theme="dark"] .reports-dashboard .text-dark {
    color: var(--cblms-fg) !important;
}

html[data-bs-theme="dark"] .package-choice-box {
    background: var(--cblms-surface) !important;
    color: var(--cblms-fg) !important;
    border-color: var(--cblms-border) !important;
}

html[data-bs-theme="dark"] .package-choice-box.is-selected,
html[data-bs-theme="dark"] .package-choice-box.border-primary {
    border-color: #56a9e0 !important;
    background: #1a5f7a !important;
    color: #fff !important;
}

html[data-bs-theme="dark"] .sub-customer-panel {
    background: rgba(86, 169, 224, 0.12);
    border-color: var(--cblms-border);
}

html[data-bs-theme="dark"] .sub-customer-panel-name,
html[data-bs-theme="dark"] .sub-customer-panel-title {
    color: var(--cblms-fg);
}

html[data-bs-theme="dark"] .hotel-admin .hq-card {
    background: var(--cblms-surface) !important;
    color: var(--cblms-fg) !important;
    border-color: var(--cblms-border) !important;
}

html[data-bs-theme="dark"] .workflow-card-media {
    background: linear-gradient(135deg, #152033, #1a2436) !important;
}

html[data-bs-theme="dark"] .admin-content .fw-semibold,
html[data-bs-theme="dark"] .admin-content .fw-bold:not(.btn) {
    color: var(--cblms-fg-heading);
}

html[data-bs-theme="dark"] .admin-content .card-header.bg-primary,
html[data-bs-theme="dark"] .admin-content .card-header.bg-success,
html[data-bs-theme="dark"] .admin-content .card-header.bg-danger,
html[data-bs-theme="dark"] .admin-content .card-header.bg-warning,
html[data-bs-theme="dark"] .admin-content .card-header.bg-info,
html[data-bs-theme="dark"] #packageSearchResults .card-header,
html[data-bs-theme="dark"] #regularSearchResults .card-header {
    color: #fff !important;
}

html[data-bs-theme="dark"] .admin-content .card-header.bg-primary *,
html[data-bs-theme="dark"] .admin-content .card-header.bg-success *,
html[data-bs-theme="dark"] #packageSearchResults .card-header *,
html[data-bs-theme="dark"] #regularSearchResults .card-header * {
    color: inherit !important;
}

@media (max-width: 575.98px) {
    .admin-topbar-icon-btn,
    .admin-topbar-tools .cblms-lang-toggle,
    .admin-topbar-tools .cblms-theme-toggle-admin,
    .admin-user-menu-toggle {
        width: 2rem;
        min-width: 2rem;
        height: 2rem;
        min-height: 2rem;
    }
    .admin-topbar-tools .cblms-lang-toggle {
        width: auto;
        min-width: 2rem;
        padding: 0 0.3rem !important;
    }
}

@media print {
    .cblms-theme-toggle { display: none !important; }
    html[data-bs-theme="dark"] body,
    html[data-bs-theme="dark"] .card,
    html[data-bs-theme="dark"] .admin-content {
        background: #fff !important;
        color: #000 !important;
    }
}
