/**
 * Weland Admin — Premium Design System
 * Glassmorphism · Theme presets · Micro-interactions
 * Pure CSS variables — no business logic
 */

/* ─── Base tokens (Weland Brand — default) ───
   Palette from brand mark: cyan #00A3FF → royal #0055CC → navy #001050 */
:root,
[data-color-theme="bookedin"] {
    --bk-brand-cyan: #00A3FF;
    --bk-brand-blue: #0078D8;
    --bk-brand-royal: #0055CC;
    --bk-brand-navy: #001050;

    --bk-bg-base: #060E1F;
    --bk-bg-secondary: #0A1628;
    --bk-mesh-1: rgba(0, 163, 255, 0.18);
    --bk-mesh-2: rgba(0, 85, 204, 0.16);
    --bk-mesh-3: rgba(0, 120, 216, 0.10);

    --accent-primary: #0078D8;
    --accent-secondary: #00A3FF;
    --accent-hover: #4DB3FF;
    --accent-muted: rgba(0, 120, 216, 0.26);
    --accent-glow: rgba(0, 163, 255, 0.38);

    --bk-surface-glass: rgba(12, 28, 52, 0.86);
    --bk-surface-card: rgba(14, 32, 58, 0.92);
    --bk-surface-elevated: rgba(18, 40, 72, 0.96);
    --bk-surface-input: rgba(8, 20, 40, 0.90);

    --bk-border-glass: rgba(120, 180, 230, 0.18);
    --bk-border-subtle: rgba(120, 180, 230, 0.10);
    --bk-border-active: rgba(0, 163, 255, 0.55);

    --text-primary: #f2f7ff;
    --text-secondary: #b7c9e4;
    --text-muted: #8499b8;
    --text-breadcrumb-link: var(--accent-hover);
    --text-breadcrumb-active: var(--accent-secondary);

    --sidebar-gradient: linear-gradient(195deg, rgba(0, 85, 204, 0.42) 0%, rgba(6, 14, 31, 0.98) 55%, #040A16 100%);
    --shell-navbar-bg: linear-gradient(135deg, rgba(0, 120, 216, 0.28), rgba(6, 14, 31, 0.92));
    --shell-sidebar-bg: var(--sidebar-gradient);
    --sidebar-link: var(--text-secondary);
    --sidebar-link-hover: var(--text-primary);
    --sidebar-search-bg: var(--bk-surface-input);
    --hero-gradient: linear-gradient(155deg, #00A3FF 0%, #0078D8 42%, #0055CC 72%, #001050 100%);

    --glass-blur: 18px;
    --glass-saturate: 160%;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.32);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.22);
    --shadow-card-hover: 0 14px 44px rgba(0, 0, 0, 0.38);
    --shadow-glow: 0 0 24px var(--accent-glow);

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 280ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 450ms cubic-bezier(0.22, 1, 0.36, 1);

    --navbar-height: 44px;
    --sidebar-width: 280px;
}

/* ─── Cyberpunk Dark ─── */
[data-color-theme="cyberpunk"] {
    --bk-bg-base: #141824;
    --bk-bg-secondary: #1a2030;
    --bk-mesh-1: rgba(139, 92, 246, 0.16);
    --bk-mesh-2: rgba(249, 115, 22, 0.10);
    --bk-mesh-3: rgba(59, 130, 246, 0.08);

    --accent-primary: #8b5cf6;
    --accent-secondary: #f97316;
    --accent-hover: #a78bfa;
    --accent-muted: rgba(139, 92, 246, 0.22);
    --accent-glow: rgba(249, 115, 22, 0.4);

    --bk-surface-glass: rgba(28, 34, 52, 0.84);
    --bk-surface-card: rgba(34, 40, 60, 0.90);
    --bk-surface-elevated: rgba(42, 48, 72, 0.94);
    --bk-surface-input: rgba(22, 26, 40, 0.88);

    --bk-border-glass: rgba(255, 255, 255, 0.12);
    --bk-border-subtle: rgba(255, 255, 255, 0.07);
    --bk-border-active: rgba(249, 115, 22, 0.55);

    --text-primary: #f4f6fc;
    --text-secondary: #c4cce0;
    --text-muted: #949eb8;
    --text-breadcrumb-link: var(--accent-hover);
    --text-breadcrumb-active: var(--accent-secondary);

    --sidebar-gradient: linear-gradient(195deg, rgba(45, 25, 85, 0.96) 0%, rgba(14, 16, 28, 0.98) 55%, rgba(8, 10, 18, 1) 100%);
    --shell-navbar-bg: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(18, 21, 34, 0.88));
    --shell-sidebar-bg: var(--sidebar-gradient);
    --sidebar-link: var(--text-secondary);
    --sidebar-link-hover: var(--text-primary);
    --sidebar-search-bg: var(--bk-surface-input);
    --hero-gradient: linear-gradient(135deg, #5b21b6 0%, #3730a3 45%, #1e1b4b 100%);
}

/* ─── Elegant Dark ─── */
[data-color-theme="elegant-dark"] {
    --bk-bg-base: #18182a;
    --bk-bg-secondary: #1e1e34;
    --bk-mesh-1: rgba(99, 102, 241, 0.16);
    --bk-mesh-2: rgba(212, 165, 116, 0.12);
    --bk-mesh-3: rgba(129, 140, 248, 0.08);

    --accent-primary: #6366f1;
    --accent-secondary: #d4a574;
    --accent-hover: #818cf8;
    --accent-muted: rgba(99, 102, 241, 0.22);
    --accent-glow: rgba(212, 165, 116, 0.35);

    --bk-surface-glass: rgba(38, 38, 58, 0.86);
    --bk-surface-card: rgba(44, 44, 66, 0.92);
    --bk-surface-elevated: rgba(54, 54, 78, 0.96);
    --bk-surface-input: rgba(32, 32, 48, 0.90);

    --bk-border-glass: rgba(255, 255, 255, 0.12);
    --bk-border-subtle: rgba(255, 255, 255, 0.07);
    --bk-border-active: rgba(212, 165, 116, 0.55);

    --text-primary: #f2f2fa;
    --text-secondary: #c8c8de;
    --text-muted: #9898b4;

    --text-breadcrumb-link: var(--accent-hover);
    --text-breadcrumb-active: var(--accent-secondary);

    --sidebar-gradient: linear-gradient(195deg, rgba(48, 48, 76, 0.97) 0%, rgba(24, 24, 40, 1) 100%);
    --shell-navbar-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(38, 38, 58, 0.92));
    --shell-sidebar-bg: var(--sidebar-gradient);
    --sidebar-link: var(--text-secondary);
    --sidebar-link-hover: var(--text-primary);
    --sidebar-search-bg: var(--bk-surface-input);
    --hero-gradient: linear-gradient(135deg, #4338ca 0%, #312e81 55%, #18182a 100%);
}

/* ─── Royal Blue ─── */
[data-color-theme="royal-blue"] {
    --bk-bg-base: #0c1628;
    --bk-bg-secondary: #122038;
    --bk-mesh-1: rgba(59, 130, 246, 0.18);
    --bk-mesh-2: rgba(6, 182, 212, 0.12);
    --bk-mesh-3: rgba(96, 165, 250, 0.08);

    --accent-primary: #3b82f6;
    --accent-secondary: #06b6d4;
    --accent-hover: #60a5fa;
    --accent-muted: rgba(59, 130, 246, 0.22);
    --accent-glow: rgba(6, 182, 212, 0.4);

    --bk-surface-glass: rgba(18, 32, 58, 0.86);
    --bk-surface-card: rgba(24, 40, 68, 0.92);
    --bk-surface-elevated: rgba(32, 50, 82, 0.96);
    --bk-surface-input: rgba(16, 28, 50, 0.90);

    --bk-border-glass: rgba(255, 255, 255, 0.12);
    --bk-border-subtle: rgba(255, 255, 255, 0.07);
    --bk-border-active: rgba(6, 182, 212, 0.55);

    --text-primary: #f0f6ff;
    --text-secondary: #b8cce8;
    --text-muted: #8aa4c8;

    --text-breadcrumb-link: var(--accent-hover);
    --text-breadcrumb-active: var(--accent-secondary);

    --sidebar-gradient: linear-gradient(195deg, rgba(24, 52, 100, 0.97) 0%, rgba(12, 22, 40, 1) 100%);
    --shell-navbar-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.20), rgba(18, 32, 58, 0.92));
    --shell-sidebar-bg: var(--sidebar-gradient);
    --sidebar-link: var(--text-secondary);
    --sidebar-link-hover: var(--text-primary);
    --sidebar-search-bg: var(--bk-surface-input);
    --hero-gradient: linear-gradient(135deg, #1d4ed8 0%, #0c4a6e 55%, #0c1628 100%);
}

/* ─── Minimalist Light (Weland-aligned) ─── */
[data-color-theme="minimal-light"] {
    --bk-brand-cyan: #00A3FF;
    --bk-brand-blue: #0078D8;
    --bk-brand-royal: #0055CC;
    --bk-brand-navy: #001050;

    --bk-bg-base: #F3F7FC;
    --bk-bg-secondary: #E6EEF8;
    --bk-mesh-1: rgba(0, 120, 216, 0.07);
    --bk-mesh-2: rgba(0, 163, 255, 0.06);
    --bk-mesh-3: rgba(0, 85, 204, 0.04);
    --accent-primary: #0078D8;
    --accent-secondary: #00A3FF;
    --accent-hover: #0055CC;
    --accent-muted: rgba(0, 120, 216, 0.10);
    --accent-glow: rgba(0, 163, 255, 0.22);
    --bk-surface-glass: rgba(255, 255, 255, 0.90);
    --bk-surface-card: #ffffff;
    --bk-surface-elevated: #ffffff;
    --bk-surface-input: #F5F8FC;
    --bk-border-glass: rgba(0, 80, 168, 0.12);
    --bk-border-subtle: rgba(0, 80, 168, 0.07);
    --bk-border-active: rgba(0, 120, 216, 0.40);
    --text-primary: #001050;
    --text-secondary: #3D4F6F;
    --text-muted: #7A8BA8;
    --text-breadcrumb-link: #0078D8;
    --text-breadcrumb-active: #001050;
    --sidebar-gradient: linear-gradient(195deg, rgba(0, 120, 216, 0.08) 0%, #ffffff 42%, #F3F7FC 100%);
    --shell-navbar-bg: linear-gradient(135deg, rgba(0, 120, 216, 0.08), rgba(255, 255, 255, 0.98));
    --shell-sidebar-bg: var(--sidebar-gradient);
    --sidebar-link: #3D4F6F;
    --sidebar-link-hover: #001050;
    --sidebar-search-bg: #EEF3FA;
    --hero-gradient: linear-gradient(155deg, #00A3FF 0%, #0078D8 48%, #0055CC 100%);
    --shadow-glass: 0 8px 32px rgba(0, 40, 100, 0.07);
    --shadow-card: 0 2px 16px rgba(0, 40, 100, 0.05);
    --shadow-card-hover: 0 12px 36px rgba(0, 40, 100, 0.12);
}

/* ─── Light mode palettes (moon toggle) per color theme ─── */
html[data-color-theme="bookedin"] body.light-mode {
    --bk-bg-base: #F3F7FC;
    --bk-bg-secondary: #E6EEF8;
    --bk-mesh-1: rgba(0, 120, 216, 0.07);
    --bk-mesh-2: rgba(0, 163, 255, 0.06);
    --bk-mesh-3: rgba(0, 85, 204, 0.04);
    --accent-primary: #0078D8;
    --accent-secondary: #00A3FF;
    --accent-hover: #0055CC;
    --accent-muted: rgba(0, 120, 216, 0.10);
    --accent-glow: rgba(0, 163, 255, 0.22);
    --bk-surface-glass: rgba(255, 255, 255, 0.95);
    --bk-surface-card: #ffffff;
    --bk-surface-elevated: #ffffff;
    --bk-surface-input: #F5F8FC;
    --bk-border-glass: rgba(0, 80, 168, 0.12);
    --bk-border-subtle: rgba(0, 80, 168, 0.07);
    --bk-border-active: rgba(0, 120, 216, 0.40);
    --text-primary: #001050;
    --text-secondary: #3D4F6F;
    --text-muted: #7A8BA8;
    --text-breadcrumb-link: #0078D8;
    --text-breadcrumb-active: #001050;
    --shell-navbar-bg: linear-gradient(135deg, rgba(0, 120, 216, 0.08), rgba(255, 255, 255, 0.98));
    --shell-sidebar-bg: linear-gradient(195deg, rgba(0, 120, 216, 0.08) 0%, #ffffff 42%, #F3F7FC 100%);
    --sidebar-link: #3D4F6F;
    --sidebar-link-hover: #001050;
    --sidebar-search-bg: #EEF3FA;
    --hero-gradient: linear-gradient(155deg, #00A3FF 0%, #0078D8 48%, #0055CC 100%);
    --shadow-glass: 0 8px 32px rgba(0, 40, 100, 0.07);
    --shadow-card: 0 2px 14px rgba(0, 40, 100, 0.05);
    --shadow-card-hover: 0 12px 32px rgba(0, 40, 100, 0.12);
}

html[data-color-theme="cyberpunk"] body.light-mode {
    --bk-bg-base: #f5f4fa;
    --bk-mesh-1: rgba(139, 92, 246, 0.1);
    --bk-mesh-2: rgba(249, 115, 22, 0.06);
    --bk-surface-glass: rgba(255, 255, 255, 0.94);
    --bk-surface-card: #ffffff;
    --bk-surface-elevated: #ffffff;
    --bk-surface-input: #f8f7fc;
    --bk-border-glass: rgba(139, 92, 246, 0.12);
    --text-primary: #1a1625;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-breadcrumb-link: #7c3aed;
    --text-breadcrumb-active: #ea580c;
    --shell-navbar-bg: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(255, 255, 255, 0.98));
    --shell-sidebar-bg: linear-gradient(195deg, rgba(139, 92, 246, 0.16) 0%, #ffffff 42%, #f3f0ff 100%);
    --sidebar-link: #4b5563;
    --sidebar-link-hover: #1a1625;
    --sidebar-search-bg: #f3f0ff;
}

html[data-color-theme="elegant-dark"] body.light-mode {
    --bk-bg-base: #f8f8fa;
    --bk-mesh-1: rgba(99, 102, 241, 0.08);
    --bk-mesh-2: rgba(212, 165, 116, 0.08);
    --bk-surface-glass: rgba(255, 255, 255, 0.94);
    --bk-surface-card: #ffffff;
    --bk-surface-elevated: #ffffff;
    --bk-surface-input: #f9f9fb;
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #71717a;
    --text-breadcrumb-link: #6366f1;
    --text-breadcrumb-active: #b45309;
    --shell-navbar-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(255, 255, 255, 0.98));
    --shell-sidebar-bg: linear-gradient(195deg, rgba(99, 102, 241, 0.14) 0%, #ffffff 42%, #f5f5f9 100%);
    --sidebar-link: #52525b;
    --sidebar-link-hover: #18181b;
    --sidebar-search-bg: #f4f4f5;
}

html[data-color-theme="royal-blue"] body.light-mode {
    --bk-bg-base: #f0f6ff;
    --bk-mesh-1: rgba(59, 130, 246, 0.1);
    --bk-mesh-2: rgba(6, 182, 212, 0.08);
    --bk-surface-glass: rgba(255, 255, 255, 0.94);
    --bk-surface-card: #ffffff;
    --bk-surface-elevated: #ffffff;
    --bk-surface-input: #f0f7ff;
    --text-primary: #0c1929;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-breadcrumb-link: #2563eb;
    --text-breadcrumb-active: #0891b2;
    --shell-navbar-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(255, 255, 255, 0.98));
    --shell-sidebar-bg: linear-gradient(195deg, rgba(59, 130, 246, 0.15) 0%, #ffffff 42%, #eff6ff 100%);
    --sidebar-link: #475569;
    --sidebar-link-hover: #0c1929;
    --sidebar-search-bg: #eff6ff;
}

/* minimal-light is always light — inherit same tokens */
html[data-color-theme="minimal-light"] body.light-mode,
html[data-color-theme="minimal-light"] body#content_body {
    color: var(--text-primary);
}

/* ─── Global page canvas ─── */
html.bookdin-admin {
    scroll-behavior: smooth;
}

body#content_body.bookdin-body {
    background-color: var(--bk-bg-base) !important;
    color: var(--text-primary);
    transition: background-color var(--transition-slow), color var(--transition-base);
}

body#content_body.bookdin-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, var(--bk-mesh-1) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 10%, var(--bk-mesh-2) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, var(--bk-mesh-3, transparent) 0%, transparent 45%),
        var(--bk-bg-base);
    transition: background var(--transition-slow);
}

/* ─── Glass utility ─── */
.bk-glass {
    background: var(--bk-surface-glass) !important;
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--bk-border-glass);
    box-shadow: var(--shadow-glass);
}

/* ─── Content wrapper ─── */
.app-content.content {
    background: transparent !important;
}

.content-wrapper {
    padding: 1.35rem 1.6rem 2.1rem !important;
}

.content-body > .card,
.content-body .card.bk-form-shell,
.dash-page .card {
    border: 1px solid var(--bk-border-subtle, rgba(120, 180, 230, 0.1)) !important;
    border-radius: var(--radius-lg, 16px) !important;
    box-shadow: var(--shadow-card, 0 4px 24px rgba(0, 0, 0, 0.22)) !important;
}

.content-body .card > .card-header {
    border-bottom: 1px solid var(--bk-border-subtle, rgba(120, 180, 230, 0.08));
    padding-top: 1rem;
    padding-bottom: 0.9rem;
}

/* ─── Navbar ─── */
.header-navbar.floating-nav {
    background: var(--shell-navbar-bg, var(--bk-surface-glass)) !important;
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--bk-border-glass) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-glass) !important;
    margin: 0.35rem 1rem 0 !important;
    min-height: var(--navbar-height);
    transition: background var(--transition-slow), border-color var(--transition-base), box-shadow var(--transition-base);
}

.header-navbar.navbar-light {
    color: var(--text-primary) !important;
}

.bk-navbar-collapse {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
    min-height: var(--navbar-height);
}

.bk-navbar-start {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.header-navbar .navbar-container {
    padding: 0 0.75rem !important;
    min-height: var(--navbar-height);
}

.header-navbar .navbar-collapse {
    min-height: auto !important;
}

.header-navbar .dropdown-user-link img.round {
    height: 30px !important;
    width: 30px !important;
}

.header-navbar .nav-link {
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm);
    padding: 0.28rem 0.42rem !important;
    transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.header-navbar .nav-link .ficon,
.header-navbar .nav-link i.ficon {
    font-size: 1.05rem;
    line-height: 1;
}

.header-navbar .nav-link:hover {
    color: var(--text-primary) !important;
    background: var(--accent-muted);
}

.header-navbar .user-nav {
    line-height: 1.2;
    max-width: 160px;
    overflow: hidden;
}

.header-navbar .user-name,
.header-navbar .user-status {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-navbar .user-name {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
}

.header-navbar .user-status {
    color: var(--text-muted) !important;
    font-size: 0.68rem !important;
}

.header-navbar .nav-link:hover .user-status {
    color: var(--text-muted) !important;
}

.bk-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bk-surface-elevated);
    border: 1px solid var(--bk-border-glass);
    white-space: nowrap;
}

.bk-status-pill__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.55);
    animation: bk-pulse 2.5s ease-in-out infinite;
}

@keyframes bk-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.92); }
}

.bk-user-avatar-wrap {
    position: relative;
    display: inline-block;
}

.bk-user-avatar-wrap .bk-online-dot {
    position: absolute;
    bottom: 1px;
    inset-inline-end: 1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--bk-surface-elevated);
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.45);
}

/* Navbar breadcrumb / page title */
.header-navbar .admin-page-breadcrumb {
    margin-bottom: 0;
}

.header-navbar .admin-breadcrumb-list {
    font-size: 0.78rem;
    font-weight: 500;
    gap: 0.3rem 0.4rem;
}

.header-navbar .admin-breadcrumb-item a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.header-navbar .admin-breadcrumb-item a:hover {
    color: var(--text-primary) !important;
    background: var(--accent-muted);
}

.header-navbar .admin-breadcrumb-item a i {
    font-size: 0.9rem;
    opacity: 0.85;
}

.header-navbar .admin-breadcrumb-separator {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0;
    opacity: 0.6;
}

.header-navbar .admin-breadcrumb-separator i {
    font-size: 0.85rem;
}

.bk-nav-page-title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--accent-muted);
    border: 1px solid var(--bk-border-glass);
    white-space: nowrap;
    line-height: 1.3;
}

.bk-nav-page-title i {
    font-size: 0.9rem;
    color: var(--accent-hover);
}

.bk-nav-page-title--active {
    background: linear-gradient(135deg, var(--accent-muted), transparent);
    border-inline-start: 2px solid var(--accent-secondary);
    border-radius: var(--radius-sm);
}

.header-navbar .admin-breadcrumb-item--active span {
    color: var(--text-primary) !important;
}

.bk-navbar-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.05rem;
}

.bk-navbar-divider {
    width: 1px;
    height: 18px;
    background: var(--bk-border-glass);
    margin: 0 0.25rem;
}

.header-navbar .dropdown-language .selected-language {
    font-size: 0.75rem;
}

.header-navbar .dropdown-language .flag-icon {
    width: 1.1rem;
    height: 0.85rem;
}

.header-navbar .dropdown-user .dropdown-menu {
    min-width: 13.5rem;
    width: max-content;
    max-width: min(90vw, 18rem);
    overflow: visible !important;
    padding: 0.45rem !important;
}
.header-navbar .dropdown-user .dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    overflow: visible;
    padding: 0.55rem 0.75rem !important;
}
.header-navbar .dropdown-user .dropdown-item i {
    float: none !important;
    margin: 0 !important;
    flex: 0 0 auto;
}
.header-navbar .navbar-container ul.nav li.dropdown-user .dropdown-menu-right .dropdown-item:hover,
.header-navbar .navbar-container ul.nav li.dropdown-user .dropdown-menu-right .dropdown-item:active,
.header-navbar .dropdown-user .dropdown-item:hover {
    background: var(--accent-muted) !important;
    color: var(--accent-hover) !important;
}
.header-navbar .dropdown-user .dropdown-item:hover i {
    color: var(--accent-hover) !important;
}

.header-navbar .nav-link:hover,
.header-navbar .bk-theme-toggle:hover {
    color: var(--accent-hover) !important;
    background: var(--accent-muted);
}

.header-navbar .badge-up {
    top: 2px;
    right: 2px;
    font-size: 0.6rem;
    min-width: 1rem;
    height: 1rem;
    line-height: 1rem;
    padding: 0 0.2rem;
}

/* ═══════════════════════════════════════════════════════════
   Sidebar — Weland brand (cyan → royal blue · navy)
   ═══════════════════════════════════════════════════════════ */
.main-menu.menu-fixed,
.main-menu.menu-light,
.main-menu.bk-sidebar {
    --sb-bg: #060E1F;
    --sb-item: rgba(236, 244, 255, 0.92);
    --sb-item-muted: rgba(170, 198, 230, 0.72);
    --sb-active-bg: #0078D8;
    --sb-active-text: #ffffff;
    --sb-active-glow: rgba(0, 163, 255, 0.35);
    --sb-hover-bg: rgba(255, 255, 255, 0.05);
    --sb-open-bg: rgba(0, 120, 216, 0.16);
    --sb-sub-bg: rgba(0, 0, 0, 0.28);
    --sb-sub-hover-bg: rgba(255, 255, 255, 0.06);
    --sb-sub-hover-text: #fff;
    --sb-bullet: rgba(0, 163, 255, 0.75);
    --sb-radius: 12px;
    --sb-gap: 0.22rem;
    --sb-icon-size: 2rem;

    width: var(--sidebar-width) !important;
    background:
        radial-gradient(420px 280px at 100% 0%, rgba(0, 163, 255, 0.14), transparent 58%),
        radial-gradient(380px 240px at 0% 100%, rgba(0, 85, 204, 0.12), transparent 55%),
        var(--sb-bg) !important;
    color: var(--sb-item) !important;
    border: none !important;
    border-inline-end: 1px solid rgba(120, 180, 230, 0.08) !important;
    border-inline-start: none !important;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.28) !important;
    transition: background var(--transition-slow), transform var(--transition-base), width var(--transition-base);
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.main-menu.menu-light .navigation,
.main-menu.menu-light .main-menu-content,
.main-menu.bk-sidebar .navigation,
.main-menu.bk-sidebar .main-menu-content {
    background: transparent !important;
}

.main-menu .navbar-header,
.main-menu .navbar-header.bk-sidebar-brand {
    padding: 1rem 1rem 0.65rem !important;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: stretch;
    flex: 0 0 auto;
}

.main-menu .navbar-header .nav.navbar-nav {
    width: 100%;
}

.main-menu .navbar-header .navbar-brand,
.main-menu .bk-sidebar-brand-link {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0.65rem 0.7rem !important;
    margin: 0 !important;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-decoration: none !important;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 220ms ease;
}

.main-menu .bk-sidebar-brand-link:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(0, 163, 255, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 8px 24px rgba(0, 120, 216, 0.12);
}

.bk-sidebar-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.main-menu .navbar-header .brand-logo,
.main-menu .navbar-header .img-logo,
.bk-sidebar-logo-wrap .brand-logo {
    max-height: 30px;
    max-width: 100%;
    width: auto;
    filter: none;
    transition: transform var(--transition-base);
}

.main-menu .navbar-header .brand-logo:hover,
.main-menu .navbar-header .navbar-brand:hover .brand-logo,
.bk-sidebar-brand-link:hover .brand-logo {
    transform: scale(1.04);
}

.bk-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
    text-align: start;
}

.bk-sidebar-brand-name {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.bk-sidebar-brand-sub {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(170, 198, 230, 0.78);
    line-height: 1.2;
}

.main-menu.bk-sidebar .main-menu-content {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0.1rem 0 0.75rem !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.main-menu.bk-sidebar .navigation.navigation-main {
    padding: 0.1rem 0.55rem 0.35rem !important;
    font-size: inherit;
}

.main-menu.bk-sidebar ul.navigation-main > li:first-child {
    margin-top: 0;
}

.main-menu.bk-sidebar .navigation > li,
.main-menu.menu-light.bk-sidebar .navigation > li {
    padding: 0 !important;
    margin: 0 0 var(--sb-gap) !important;
}

.main-menu .navigation-main > .nav-item > a,
.main-menu.menu-light .navigation > li > a,
.main-menu.menu-light.bk-sidebar .navigation > li > a,
body.dark-layout .main-menu.menu-light .navigation > li > a {
    color: var(--sb-item) !important;
}

.main-menu .navigation-main > .nav-item > a {
    display: flex !important;
    align-items: center;
    gap: 0.7rem;
    border-radius: var(--sb-radius);
    margin: 0 0.3rem !important;
    padding: 0.62rem 0.7rem !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    line-height: 1.3;
    letter-spacing: 0;
    background: transparent !important;
    box-shadow: none !important;
    transition: color 180ms ease, background 180ms ease, box-shadow 220ms ease, transform 180ms ease;
    position: relative;
    overflow: visible;
    white-space: nowrap;
}

.main-menu .navigation-main > .nav-item > a > span.menu-title,
.main-menu .navigation-main > .nav-item > a {
    min-width: 0;
}

/* Ellipsis on the title only — never clip the submenu caret on the link */
.main-menu .navigation-main > .nav-item > a > span.menu-title {
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-menu .navigation-main > .nav-item > a {
    overflow: visible !important;
}

.main-menu .navigation-main > .nav-item > a > span.menu-title {
    flex: 1 1 auto;
    color: inherit !important;
    font-weight: inherit !important;
}

.main-menu .navigation-main > .nav-item > a > i,
.main-menu .navigation-main > .nav-item > a > svg,
.main-menu .navigation-main > .nav-item > a [class^="icon-"],
.main-menu .navigation-main > .nav-item > a [class*=" icon-"],
.main-menu .navigation-main > .nav-item > a .feather,
body.vertical-layout.vertical-menu-modern .main-menu.bk-sidebar .navigation > li > a > i,
body.vertical-layout.vertical-menu-modern.menu-expanded .main-menu.bk-sidebar .navigation > li > a > i {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    float: none !important;
    width: var(--sb-icon-size) !important;
    height: var(--sb-icon-size) !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
    text-align: center;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: inherit !important;
    opacity: 0.95;
    box-shadow: none !important;
    transition: opacity 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body.vertical-layout.vertical-menu-modern .main-menu.bk-sidebar .navigation > li > a > i::before,
body.vertical-layout.vertical-menu-modern.menu-expanded .main-menu.bk-sidebar .navigation > li > a > i::before {
    font-size: 0.95rem !important;
    line-height: 1 !important;
}

.main-menu.bk-sidebar .navigation li a i {
    margin: 0 !important;
}

.main-menu .navigation-main > .nav-item:not(.active) > a:hover,
.main-menu.menu-light .navigation > li:not(.active) > a:hover,
body.dark-layout .main-menu.menu-light .navigation > li:not(.active) > a:hover {
    color: var(--sb-item) !important;
    background: var(--sb-hover-bg) !important;
    box-shadow: none !important;
    opacity: 1;
    transform: translateX(-2px);
}

[dir="ltr"] .main-menu .navigation-main > .nav-item:not(.active) > a:hover,
html[dir="ltr"] .main-menu .navigation-main > .nav-item:not(.active) > a:hover {
    transform: translateX(2px);
}

.main-menu .navigation-main > .nav-item > a:hover > i,
.main-menu .navigation-main > .nav-item > a:hover .feather {
    background: rgba(0, 163, 255, 0.14) !important;
    border-color: rgba(0, 163, 255, 0.22);
    box-shadow: none !important;
    opacity: 1;
    color: inherit !important;
}

.main-menu .navigation-main > .nav-item.has-sub > a {
    padding-inline-end: 2.15rem !important;
}

/* Don't style the chevron like a capsule icon */
.main-menu.bk-sidebar .navigation li.has-sub > a > i.menu-submenu-arrow {
    width: 1rem !important;
    height: 1rem !important;
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

/* Explicit Feather chevron for parent menus (flights/cars/etc.) */
.main-menu.bk-sidebar .navigation li.has-sub > a > i.menu-submenu-arrow {
    position: absolute !important;
    left: 0.75rem !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 1rem !important;
    height: 1rem !important;
    font-size: 1rem !important;
    margin: 0 !important;
    opacity: 0.9 !important;
    color: inherit !important;
    pointer-events: none !important;
    z-index: 3 !important;
    transition: transform 0.22s ease, opacity 0.18s ease !important;
}

[dir="ltr"] .main-menu.bk-sidebar .navigation li.has-sub > a > i.menu-submenu-arrow,
html[dir="ltr"] .main-menu.bk-sidebar .navigation li.has-sub > a > i.menu-submenu-arrow {
    left: auto !important;
    right: 0.75rem !important;
    transform: translateY(-50%) rotate(180deg) !important;
}

.main-menu.bk-sidebar .navigation li.open > a > i.menu-submenu-arrow,
.main-menu.bk-sidebar .navigation li.sidebar-group-active > a > i.menu-submenu-arrow {
    transform: translateY(-50%) rotate(-90deg) !important;
    opacity: 1 !important;
}

[dir="ltr"] .main-menu.bk-sidebar .navigation li.open > a > i.menu-submenu-arrow,
[dir="ltr"] .main-menu.bk-sidebar .navigation li.sidebar-group-active > a > i.menu-submenu-arrow,
html[dir="ltr"] .main-menu.bk-sidebar .navigation li.open > a > i.menu-submenu-arrow,
html[dir="ltr"] .main-menu.bk-sidebar .navigation li.sidebar-group-active > a > i.menu-submenu-arrow {
    transform: translateY(-50%) rotate(90deg) !important;
}

/* Hide legacy CSS border caret — Feather arrow is the indicator */
body.vertical-layout .main-menu.bk-sidebar .navigation li.has-sub > a:not(.mm-next)::after,
body.vertical-layout.vertical-menu-modern .main-menu.bk-sidebar .navigation li.has-sub > a:not(.mm-next)::after,
body.vertical-layout.vertical-menu-modern.menu-expanded .main-menu.bk-sidebar .navigation li.has-sub > a:not(.mm-next)::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    border: 0 !important;
}

/* Prevent icon fonts from drawing a second caret on the icon */
.main-menu.bk-sidebar .navigation > li > a > i::after,
.main-menu.bk-sidebar .navigation > li > a > svg + ::after {
    content: none !important;
    display: none !important;
}

/* Open parent — keep label readable on light & dark */
.main-menu .navigation-main > .nav-item.sidebar-group-active:not(.active) > a,
.main-menu .navigation-main > .nav-item.open:not(.active) > a,
.main-menu.menu-light .navigation > li.sidebar-group-active:not(.active) > a,
.main-menu.menu-light .navigation > li.open:not(.active) > a,
body.dark-layout .main-menu.menu-light .navigation > li.sidebar-group-active:not(.active) > a,
body.dark-layout .main-menu.menu-light .navigation > li.open:not(.active) > a,
body.light-mode .main-menu.bk-sidebar .navigation > li.sidebar-group-active:not(.active) > a,
body.light-mode .main-menu.bk-sidebar .navigation > li.open:not(.active) > a {
    color: var(--sb-item) !important;
    background: var(--sb-open-bg) !important;
    box-shadow: none !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

.main-menu .navigation-main > .nav-item.sidebar-group-active:not(.active) > a > span.menu-title,
.main-menu .navigation-main > .nav-item.open:not(.active) > a > span.menu-title {
    color: var(--sb-item) !important;
    opacity: 1 !important;
}

.main-menu .navigation-main > .nav-item.active > a,
.main-menu.menu-light .navigation > li.active > a,
.main-menu.menu-light.bk-sidebar .navigation > li.active > a,
body.dark-layout .main-menu.menu-light .navigation > li.active > a,
body.dark-layout:not(.light-mode) .main-menu .navigation > li.active > a {
    color: var(--sb-active-text) !important;
    background: linear-gradient(135deg, #00A3FF 0%, #0078D8 52%, #0055CC 100%) !important;
    box-shadow:
        0 8px 22px var(--sb-active-glow),
        0 2px 0 rgba(255, 255, 255, 0.12) inset !important;
    font-weight: 600 !important;
}

.main-menu .navigation-main > .nav-item.active > a::before,
.main-menu.menu-light .navigation > li.active > a::before {
    content: '';
    position: absolute;
    inset-inline-start: -0.15rem;
    top: 18%;
    bottom: 18%;
    width: 3px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

.main-menu .navigation-main > .nav-item.active > a > span.menu-title {
    color: var(--sb-active-text) !important;
}

.main-menu .navigation-main > .nav-item.active > a i,
.main-menu .navigation-main > .nav-item.active > a .feather,
.main-menu .navigation-main > .nav-item.active > a::after {
    color: var(--sb-active-text) !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
    opacity: 1;
}

.main-menu .navigation-main > .nav-item.active > a > i.menu-submenu-arrow {
    background: transparent !important;
    border: none !important;
}

.main-menu .navigation-main > .nav-item.sidebar-group-active > a i,
.main-menu .navigation-main > .nav-item.sidebar-group-active > a .feather,
.main-menu .navigation-main > .nav-item.open > a i,
.main-menu .navigation-main > .nav-item.open > a .feather {
    color: inherit !important;
    background: transparent !important;
    opacity: 1;
}

.main-menu .navigation-main .menu-content {
    background: var(--sb-sub-bg) !important;
    margin: 0.15rem 0.55rem 0.55rem;
    padding: 0.4rem 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.main-menu .navigation-main .menu-content > li + li {
    border-top: none;
}

.main-menu .navigation-main .menu-content > li > a,
body.dark-layout:not(.light-mode) .main-menu .navigation > li ul.menu-content li > a {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    border-radius: 10px;
    margin: 0.06rem 0;
    padding: 0.68rem 0.75rem !important;
    font-size: 0.86rem !important;
    font-weight: 400;
    line-height: 1.35;
    color: var(--sb-item-muted) !important;
    background: transparent !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 160ms ease, background 160ms ease;
}

.main-menu .navigation-main .menu-content > li > a > span.menu-title {
    color: inherit !important;
}

.main-menu .navigation-main .menu-content > li > a > i {
    position: relative;
    flex-shrink: 0;
    width: 0.85rem;
    height: 0.85rem;
    font-size: 0 !important;
    margin: 0 !important;
    text-align: center;
    background: transparent !important;
    box-shadow: none !important;
}

.main-menu .navigation-main .menu-content > li > a > i::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1.5px solid var(--sb-bullet);
    background: transparent;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.main-menu .navigation-main .menu-content > li > a:hover,
body.dark-layout:not(.light-mode) .main-menu .navigation > li ul.menu-content li > a:hover {
    color: var(--sb-sub-hover-text) !important;
    background: var(--sb-sub-hover-bg) !important;
}

.main-menu .navigation-main .menu-content > li > a:hover > i::before {
    border-color: var(--sb-active-bg);
    transform: scale(1.1);
}

.main-menu .navigation-main .menu-content > li.active > a,
body.dark-layout:not(.light-mode) .main-menu .navigation > li ul.menu-content li.active > a {
    color: #fff !important;
    background: color-mix(in srgb, var(--accent-primary, #0078D8) 28%, transparent) !important;
    font-weight: 600;
}

.main-menu .navigation-main .menu-content > li.active > a > i::before {
    border-color: var(--sb-active-bg);
    background: var(--sb-active-bg);
    box-shadow: 0 0 8px var(--sb-active-glow);
    transform: scale(1.12);
}

.bk-sidebar-search {
    padding: 0.15rem 1rem 0.85rem;
    position: relative;
    flex: 0 0 auto;
}

.bk-sidebar-search input {
    width: 100%;
    height: 40px;
    padding: 0.5rem 0.85rem;
    padding-inline-start: 2.35rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--sb-item);
    font-size: 0.82rem;
    box-shadow: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-slow);
}

.bk-sidebar-search input::placeholder {
    color: var(--sb-item-muted);
}

.bk-sidebar-search input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--accent-primary, #0078D8) 55%, transparent);
    background: rgba(0, 120, 216, 0.08);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary, #0078D8) 16%, transparent);
}

.bk-sidebar-search i {
    position: absolute;
    top: calc(50% - 0.2rem);
    inset-inline-start: 1.7rem;
    transform: translateY(-50%);
    color: var(--sb-item-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.bk-sidebar-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: auto;
    padding: 0.75rem 0.9rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.18) 100%);
}

.bk-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.45rem 0.5rem;
    border-radius: 12px;
    text-decoration: none !important;
    color: inherit !important;
    transition: background 180ms ease;
}

.bk-sidebar-user:hover {
    background: rgba(255, 255, 255, 0.05);
}

.bk-sidebar-user-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.bk-sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bk-sidebar-user-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    text-align: start;
}

.bk-sidebar-user-meta strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bk-sidebar-user-meta small {
    font-size: 0.68rem;
    color: rgba(170, 198, 230, 0.75);
}

.bk-sidebar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none !important;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.bk-sidebar-logout:hover {
    background: rgba(220, 53, 69, 0.16);
    border-color: rgba(220, 53, 69, 0.35);
    color: #ffb3bc !important;
}

.main-menu.bk-sidebar .navigation-main > .nav-item.bk-nav-hidden,
.main-menu.bk-sidebar .navigation-header.bk-nav-section.bk-nav-hidden {
    display: none !important;
}

.main-menu.bk-sidebar .main-menu-content,
.main-menu .navigation-main {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.main-menu.bk-sidebar .main-menu-content::-webkit-scrollbar,
.main-menu .navigation-main::-webkit-scrollbar {
    width: 4px;
}

.main-menu.bk-sidebar .main-menu-content::-webkit-scrollbar-thumb,
.main-menu .navigation-main::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.main-menu.bk-sidebar .main-menu-content::-webkit-scrollbar-thumb:hover,
.main-menu .navigation-main::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--accent-primary, #0078D8) 55%, transparent);
}

.main-menu .shadow-bottom {
    display: none !important;
}

body.light-mode .main-menu.bk-sidebar,
html.light-style .main-menu.bk-sidebar {
    --sb-bg: #F3F7FC;
    --sb-item: #001050;
    --sb-item-muted: #4A5F7F;
    --sb-active-bg: #0078D8;
    --sb-active-text: #ffffff;
    --sb-active-glow: rgba(0, 120, 216, 0.28);
    --sb-hover-bg: rgba(0, 120, 216, 0.06);
    --sb-open-bg: rgba(0, 120, 216, 0.10);
    --sb-sub-bg: rgba(0, 80, 168, 0.04);
    --sb-sub-hover-bg: rgba(0, 120, 216, 0.07);
    --sb-sub-hover-text: #001050;
    --sb-bullet: rgba(0, 163, 255, 0.85);
    background:
        radial-gradient(420px 280px at 100% 0%, rgba(0, 163, 255, 0.08), transparent 58%),
        var(--sb-bg) !important;
    box-shadow: 4px 0 24px rgba(0, 40, 100, 0.06) !important;
    border-inline-end: 1px solid rgba(0, 80, 168, 0.08) !important;
    border-inline-start: none !important;
}

body.light-mode .main-menu .navbar-header .navbar-brand,
body.light-mode .main-menu .bk-sidebar-brand-link,
html.light-style .main-menu .navbar-header .navbar-brand,
html.light-style .main-menu .bk-sidebar-brand-link {
    background: #fff;
    border-color: rgba(0, 80, 168, 0.08);
}

body.light-mode .bk-sidebar-logo-wrap,
html.light-style .bk-sidebar-logo-wrap {
    background: #F3F7FC;
    border-color: rgba(0, 80, 168, 0.1);
}

body.light-mode .bk-sidebar-brand-name,
html.light-style .bk-sidebar-brand-name {
    color: #001050;
}

body.light-mode .bk-sidebar-brand-sub,
html.light-style .bk-sidebar-brand-sub {
    color: #4A5F7F;
}

body.light-mode .main-menu .navigation-main > .nav-item > a > i,
body.light-mode .main-menu .navigation-main > .nav-item > a > .feather,
html.light-style .main-menu .navigation-main > .nav-item > a > i,
html.light-style .main-menu .navigation-main > .nav-item > a > .feather {
    background: rgba(0, 120, 216, 0.06) !important;
    border-color: rgba(0, 80, 168, 0.08);
}

body.light-mode .main-menu.bk-sidebar .navigation > li.sidebar-group-active:not(.active) > a > span.menu-title,
body.light-mode .main-menu.bk-sidebar .navigation > li.open:not(.active) > a > span.menu-title,
html.light-style .main-menu.bk-sidebar .navigation > li.sidebar-group-active:not(.active) > a > span.menu-title,
html.light-style .main-menu.bk-sidebar .navigation > li.open:not(.active) > a > span.menu-title {
    color: #001050 !important;
}

/* Light sidebar: readable submenu + search */
body.light-mode .main-menu .navigation-main .menu-content,
html.light-style .main-menu .navigation-main .menu-content {
    border-color: rgba(0, 80, 168, 0.08) !important;
    box-shadow: none !important;
}

body.light-mode .main-menu .navigation-main .menu-content > li.active > a,
html.light-style .main-menu .navigation-main .menu-content > li.active > a {
    color: #ffffff !important;
    background: linear-gradient(135deg, #00A3FF 0%, #0078D8 60%, #0055CC 100%) !important;
}

body.light-mode .bk-sidebar-search input,
html.light-style .bk-sidebar-search input {
    border-color: rgba(0, 80, 168, 0.12) !important;
    background: #fff !important;
    color: var(--sb-item, #001050) !important;
}

body.light-mode .bk-sidebar-footer,
html.light-style .bk-sidebar-footer {
    border-top-color: rgba(0, 80, 168, 0.1);
    background: linear-gradient(180deg, transparent 0%, rgba(0, 80, 168, 0.04) 100%);
}

body.light-mode .bk-sidebar-user-meta strong,
html.light-style .bk-sidebar-user-meta strong {
    color: #001050;
}

body.light-mode .bk-sidebar-user-meta small,
html.light-style .bk-sidebar-user-meta small {
    color: #4A5F7F;
}

body.light-mode .bk-sidebar-logout,
html.light-style .bk-sidebar-logout {
    background: #fff;
    border-color: rgba(0, 80, 168, 0.12);
    color: #001050 !important;
}

body.light-mode .main-menu.bk-sidebar .navigation > li.active > a,
body.light-mode .main-menu.bk-sidebar .navigation > li.active > a > span.menu-title,
html.light-style .main-menu.bk-sidebar .navigation > li.active > a,
html.light-style .main-menu.bk-sidebar .navigation > li.active > a > span.menu-title {
    color: #ffffff !important;
}

/* ─── Cards ─── */
.card {
    background: var(--bk-surface-card) !important;
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid var(--bk-border-glass) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    overflow: hidden;
}

body.light-mode .card:hover {
    border-color: color-mix(in srgb, var(--accent-primary) 22%, transparent);
    box-shadow: var(--shadow-card-hover);
}

body.dark-layout:not(.light-mode) .card:hover {
    border-color: color-mix(in srgb, var(--accent-secondary) 35%, transparent);
}

.card .card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--bk-border-subtle) !important;
    padding: 1rem 1.25rem !important;
}

.card .card-title {
    color: var(--text-primary) !important;
    font-size: 1rem !important;
}

.card .card-body {
    color: var(--text-primary);
}

.dash-section-title {
    font-weight: 800;
    color: var(--text-primary);
}

.dash-hero {
    overflow: hidden;
    position: relative;
    color: #fff;
}

.dash-hero::before {
    content: "";
    position: absolute;
    inset: -120px -80px auto auto;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.dash-hero::after {
    content: "";
    position: absolute;
    inset: -80px auto auto -120px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon i {
    font-size: 20px;
}

.quick-link .avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
}

.chart-card,
.quick-link,
.dash-hero {
    border-color: var(--bk-border-glass) !important;
}

.kpi-card {
    background: var(--bk-surface-card) !important;
}

.kpi-card .kpi-label {
    color: var(--text-secondary) !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kpi-card .kpi-value {
    color: var(--text-primary) !important;
    font-size: 1.5rem !important;
}

.kpi-card-accent {
    border-inline-end: 3px solid var(--kpi-accent, var(--accent-primary)) !important;
}

.kpi-card-link {
    color: inherit;
    text-decoration: none;
}

.kpi-card-link:hover {
    color: inherit;
    text-decoration: none;
}

.kpi-card-link .kpi-card {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.kpi-card-link:not(.kpi-card-link--soon):hover .kpi-card {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover) !important;
}

.kpi-card-link--soon {
    cursor: default;
    pointer-events: none;
}

.kpi-icon-soft {
    background: color-mix(in srgb, var(--kpi-accent, var(--accent-primary)) 16%, transparent) !important;
}

/* ===== Financial cards ===== */
.finance-card,
.revenue-card {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.finance-card-body {
    min-width: 0;
}

.kpi-hint {
    color: var(--text-secondary) !important;
    font-size: 0.74rem;
    line-height: 1.45;
    margin-top: 0.3rem;
    display: block;
}

.kpi-hint-highlight {
    font-weight: 700;
    color: #16A34A !important;
}

.finance-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.kpi-currency {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted) !important;
}

.revenue-card {
    background: linear-gradient(140deg,
        color-mix(in srgb, var(--kpi-accent, var(--accent-primary)) 12%, var(--bk-surface-card)),
        var(--bk-surface-card) 62%) !important;
    border: 1px solid color-mix(in srgb, var(--kpi-accent, var(--accent-primary)) 22%, transparent) !important;
}

.revenue-card .finance-value {
    font-size: 1.6rem !important;
}

.finance-growth {
    font-size: 0.74rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}

.finance-growth i {
    font-size: 0.9rem;
}

.finance-growth.is-up {
    color: #16A34A;
}

.finance-growth.is-down {
    color: #DC2626;
}

/* ===== Financial sub-sections ===== */
.dash-finance-section {
    position: relative;
}

.dash-subsection-head {
    padding: 0.5rem 0.85rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--accent-primary) 5%, transparent);
    border: 1px solid var(--bk-border-glass);
    border-inline-start: 3px solid var(--accent-primary);
    gap: 0.5rem;
}

.dash-subsection-title {
    font-weight: 800;
    font-size: 1.02rem;
    color: var(--text-primary);
}

.dash-subsection-hint {
    color: var(--text-muted);
    font-size: 0.74rem;
    margin-top: 0.1rem;
}

.dash-subsection-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary) !important;
    text-decoration: none !important;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--accent-primary) 30%, transparent);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.dash-subsection-link:hover {
    background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
    transform: translateX(-2px);
    color: var(--accent-primary) !important;
}

.dash-subsection-link i {
    font-size: 0.95rem;
}

[dir="ltr"] .dash-subsection-link i {
    transform: scaleX(-1);
}

[dir="ltr"] .dash-subsection-link:hover {
    transform: translateX(2px);
}

.dash-hero {
    background: var(--hero-gradient) !important;
    border-radius: var(--radius-xl) !important;
    border: 1px solid var(--bk-border-glass) !important;
    box-shadow: var(--shadow-glass), var(--shadow-glow) !important;
}

.dash-hero .hero-sub {
    color: rgba(255, 255, 255, 0.82) !important;
}

.dash-hero .btn-hero {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: var(--radius-md) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    transition: all var(--transition-base);
}

.dash-hero .btn-hero i {
    color: #ffffff !important;
}

.dash-hero .btn-hero:hover,
.dash-hero .btn-hero:focus {
    background: rgba(255, 255, 255, 0.28) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.quick-link {
    background: var(--bk-surface-card) !important;
    transition: transform var(--transition-base), box-shadow var(--transition-base) !important;
}

.quick-link:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-card-hover) !important;
}

.chart-card {
    background: var(--bk-surface-card) !important;
}

.chart-card--interactive {
    overflow: hidden;
}

.chart-card-subtitle {
    display: block;
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

.chart-card-controls .btn-outline-primary {
    border-color: var(--bk-border-glass) !important;
    color: var(--text-muted) !important;
    padding: 0.35rem 0.55rem;
}

.chart-card-controls .btn-outline-primary.active,
.chart-card-controls .btn-outline-primary:hover {
    background: color-mix(in srgb, var(--accent-primary) 18%, transparent) !important;
    border-color: var(--accent-primary) !important;
    color: var(--accent-primary) !important;
}

.chart-year-select {
    min-width: 88px;
    background: var(--bk-surface-elevated, var(--bk-surface-card)) !important;
    border-color: var(--bk-border-glass) !important;
    color: var(--text-primary) !important;
}

.chart-month-select {
    min-width: 120px;
    background: var(--bk-surface-elevated, var(--bk-surface-card)) !important;
    border-color: var(--bk-border-glass) !important;
    color: var(--text-primary) !important;
}

.chart-summary-row {
    border-bottom: 1px solid var(--bk-border-glass);
    padding-bottom: 0.75rem;
}

.chart-stat {
    padding: 0.35rem 0;
}

.chart-stat-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.chart-stat-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.chart-stat-value--sm {
    font-size: 0.95rem;
}

.chart-stat-meta {
    display: block;
    font-size: 0.72rem;
    margin-top: 0.1rem;
}

.chart-canvas-wrap {
    min-height: 340px;
    opacity: 0.4;
    transition: opacity 0.35s ease;
    /* Chart geometry stays LTR; Safari Arabic labels are rendered via HTML foreignObject. */
    direction: ltr;
    unicode-bidi: isolate;
    position: relative;
}

.chart-canvas-wrap text,
.chart-canvas-wrap tspan {
    unicode-bidi: plaintext;
}

.chart-canvas-wrap foreignObject,
.chart-canvas-wrap foreignObject div {
    direction: rtl;
    unicode-bidi: plaintext;
    -webkit-font-smoothing: antialiased;
}

.chart-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    text-align: center;
    direction: rtl;
    unicode-bidi: plaintext;
    padding-bottom: 0.5rem;
}

.chart-donut-center__label {
    font-size: 12px;
    color: var(--text-secondary, #b4b7bd);
    line-height: 1.3;
    margin-bottom: 0.15rem;
}

.chart-donut-center__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #d0d2d6);
    line-height: 1.2;
    direction: ltr;
    unicode-bidi: isolate;
}

/* Safari Arabic: HTML month labels under the chart (SVG text shaping is broken). */
.chart-canvas-wrap.chart-safari-ar {
    padding-bottom: 1.75rem;
}

.chart-xaxis-html {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0.15rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0;
    pointer-events: none;
    z-index: 2;
    direction: ltr;
}

.chart-xaxis-html__item {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-secondary, #b4b7bd);
    direction: rtl;
    unicode-bidi: plaintext;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

html[dir="rtl"] .apexcharts-legend,
html[dir="rtl"] .apexcharts-legend-text {
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: start;
}

.chart-canvas-wrap--donut {
    min-height: 260px;
}

.chart-canvas-wrap.chart-ready,
.chart-ready .chart-canvas-wrap {
    opacity: 1;
}

.chart-card.chart-loading .chart-canvas-wrap {
    opacity: 0.35;
    pointer-events: none;
}

.chart-card.chart-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent-primary) 8%, transparent), transparent);
    animation: chart-shimmer 1.2s infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes chart-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.units-breakdown-item {
    display: block;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.35rem;
    border-radius: var(--radius-md);
    text-decoration: none !important;
    color: inherit !important;
    border: 1px solid transparent;
    transition: background var(--transition-base), border-color var(--transition-base), transform var(--transition-fast);
}

.units-breakdown-item:hover {
    background: color-mix(in srgb, var(--accent-primary) 6%, transparent);
    border-color: var(--bk-border-glass);
    transform: translateX(3px);
}

[dir="rtl"] .units-breakdown-item:hover {
    transform: translateX(-3px);
}

.units-breakdown-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-inline-end: 0.4rem;
    vertical-align: middle;
}

.units-breakdown-label {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.units-breakdown-count {
    font-size: 0.82rem;
}

.units-breakdown-bar {
    height: 4px;
    border-radius: 4px;
    background: var(--bk-border-glass);
    overflow: hidden;
}

.units-breakdown-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-charts-row .chart-card {
    position: relative;
}

/* ─── Page / sidebar / reveal animations ─── */
body.bookdin-body.bk-animating .app-content,
body.bookdin-body.bk-animating .content-body {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

body.bookdin-body.bk-animating.bk-page-ready .app-content,
body.bookdin-body.bk-animating.bk-page-ready .content-body {
    opacity: 1;
    transform: none;
}

.main-menu.bk-sidebar .navigation-main > .nav-item.bk-nav-enter {
    opacity: 0;
    transform: translateX(12px);
    animation: bk-nav-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--bk-nav-delay, 0s);
}

[dir="ltr"] .main-menu.bk-sidebar .navigation-main > .nav-item.bk-nav-enter {
    transform: translateX(-12px);
}

@keyframes bk-nav-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.bk-reveal {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--bk-reveal-delay, 0s);
    will-change: opacity, transform;
}

.bk-reveal.is-visible {
    opacity: 1;
    transform: none;
}

.bk-animate-in {
    opacity: 0;
    transform: translateY(14px);
    animation: bk-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.bk-animate-in:nth-child(1) { animation-delay: 0.04s; }
.bk-animate-in:nth-child(2) { animation-delay: 0.08s; }
.bk-animate-in:nth-child(3) { animation-delay: 0.12s; }
.bk-animate-in:nth-child(4) { animation-delay: 0.16s; }
.bk-animate-in:nth-child(5) { animation-delay: 0.2s; }
.bk-animate-in:nth-child(6) { animation-delay: 0.24s; }
.bk-animate-in:nth-child(7) { animation-delay: 0.28s; }
.bk-animate-in:nth-child(8) { animation-delay: 0.32s; }

@keyframes bk-fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Soft cursor glow on interactive cards */
.kpi-card,
.quick-link,
.chart-card {
    position: relative;
    overflow: hidden;
    --bk-glow-x: 50%;
    --bk-glow-y: 40%;
}

.kpi-card::after,
.quick-link::after,
.chart-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        420px circle at var(--bk-glow-x) var(--bk-glow-y),
        color-mix(in srgb, var(--accent-primary, #8B7355) 18%, transparent),
        transparent 55%
    );
    opacity: 0;
    transition: opacity 0.35s ease;
}

.kpi-card-link:hover .kpi-card::after,
.quick-link:hover::after,
.chart-card:hover::after {
    opacity: 1;
}

.kpi-icon {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.kpi-card-link:hover .kpi-icon,
.quick-link:hover .avatar {
    transform: translateY(-2px) scale(1.06);
}

.dash-hero {
    animation: bk-hero-sheen 8s ease-in-out infinite;
}

@keyframes bk-hero-sheen {
    0%, 100% { filter: saturate(1); }
    50% { filter: saturate(1.08) brightness(1.03); }
}

.dash-finance-section {
    position: relative;
}

.dash-subsection-head {
    margin-bottom: 0.65rem;
}

.dash-subsection-link {
    transition: transform 0.25s ease, color 0.25s ease;
}

.dash-subsection-link:hover {
    transform: translateX(-3px);
}

[dir="ltr"] .dash-subsection-link:hover {
    transform: translateX(3px);
}

/* ─── Buttons ─── */
.btn.bg-gradient-primary,
.btn-primary {
    background: linear-gradient(135deg, #00A3FF 0%, #0078D8 55%, #0055CC 100%) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 4px 14px var(--accent-muted);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast) !important;
}

.btn.bg-gradient-primary:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn.bg-gradient-info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    border-radius: var(--radius-md) !important;
}

.btn.bg-gradient-success {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    border-radius: var(--radius-md) !important;
}

.btn.bg-gradient-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border-radius: var(--radius-md) !important;
}

.btn.bg-gradient-warning {
    background: linear-gradient(135deg, var(--accent-secondary), color-mix(in srgb, var(--accent-secondary) 75%, #000)) !important;
    border-radius: var(--radius-md) !important;
}

/* ─── Forms ─── */
.form-control,
.custom-file-label,
.select2-container--default .select2-selection--single {
    background: var(--bk-surface-input) !important;
    border: 1px solid var(--bk-border-glass) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px var(--accent-muted) !important;
}

.form-group > label,
.form-label {
    color: var(--text-secondary) !important;
}

/* ─── Select2 dropdown popup (dark-aware, all pages) ─── */
.select2-container--default .select2-selection--single {
    height: auto !important;
    min-height: 38px;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary) !important;
    line-height: 1.6 !important;
    padding-inline: 0.35rem;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-muted) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--text-muted) transparent transparent transparent !important;
}

.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px var(--accent-muted) !important;
}

.select2-dropdown {
    background: var(--bk-surface-elevated) !important;
    border: 1px solid var(--bk-border-glass) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-glass) !important;
    overflow: hidden;
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
}

.select2-container--default .select2-search--dropdown {
    padding: 0.5rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background: var(--bk-surface-input) !important;
    border: 1px solid var(--bk-border-glass) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.4rem 0.6rem;
    outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--accent-primary) !important;
}

.select2-container--default .select2-results__options {
    padding: 0.3rem;
}

.select2-container--default .select2-results__option {
    color: var(--text-secondary) !important;
    background: transparent !important;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    margin: 0.1rem 0;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted {
    background: var(--accent-muted) !important;
    color: var(--text-primary) !important;
}

.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option[data-selected="true"] {
    background: color-mix(in srgb, var(--accent-primary) 24%, transparent) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
}

/* ─── Tables ─── */
.table {
    color: var(--text-primary) !important;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0;
}

.table thead tr {
    background: var(--bk-surface-elevated) !important;
}

.table thead th {
    color: var(--text-secondary) !important;
    border: none !important;
    font-weight: 650;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 0.78rem 0.95rem !important;
    white-space: nowrap;
}

.table tbody tr {
    background: var(--bk-surface-card) !important;
    border-bottom: 1px solid var(--bk-border-subtle) !important;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bk-surface-elevated) !important;
    box-shadow: inset 3px 0 0 var(--accent-secondary);
}

.table td {
    border-color: var(--bk-border-subtle) !important;
    padding: 0.72rem 0.95rem !important;
    vertical-align: middle !important;
    color: var(--text-primary) !important;
    font-size: 0.9rem;
}

/* ─── Tabs (settings, profile) ─── */
.nav-pills .nav-link,
.nav-tabs .nav-link {
    color: var(--text-secondary) !important;
    border-radius: var(--radius-md) !important;
    transition: all var(--transition-fast);
}

.nav-pills .nav-link.active,
.nav-tabs .nav-link.active {
    color: var(--accent-secondary) !important;
    background: var(--accent-muted) !important;
}

/* ─── Modals & dropdowns ─── */
.modal-content {
    background: var(--bk-surface-elevated) !important;
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--bk-border-glass) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-glass);
}
html.light-style .modal-content,
body.light-mode .modal-content {
    background: #ffffff !important;
    color: #14282b !important;
    backdrop-filter: none;
}

/* Avoid nested body/footer panels inside modals (dark-layout paints them separately). */
.modal .modal-body,
.modal .modal-footer,
body.dark-layout .modal .modal-body,
body.dark-layout .modal .modal-footer {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.modal .modal-header {
    background: transparent !important;
    border-bottom: 1px solid var(--bk-border-subtle) !important;
    padding: 1.05rem 1.35rem !important;
}

.modal .modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary) !important;
}

.modal .modal-body {
    padding: 1.2rem 1.35rem !important;
    color: var(--text-primary);
}

.modal .modal-footer {
    border-top: 1px solid var(--bk-border-subtle) !important;
    padding: 0.95rem 1.35rem 1.15rem !important;
    gap: 0.5rem;
}

.modal .close,
.modal .btn-close {
    color: var(--text-secondary) !important;
    opacity: 0.85;
    text-shadow: none;
}

.modal .close:hover,
.modal .btn-close:hover {
    color: var(--text-primary) !important;
    opacity: 1;
}

#healthPermitRejectModal .modal-content {
    align-items: stretch;
    padding: 1.25rem 0 1.35rem;
}

#healthPermitRejectModal form {
    width: 100%;
}

#healthPermitRejectModal .modal-body {
    padding-inline: 1.5rem;
}

#healthPermitRejectModal .modal-footer {
    margin-top: 1rem;
    padding-inline: 1.5rem;
    border-top: none;
}

.dropdown-menu {
    background: var(--bk-surface-elevated) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--bk-border-glass) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-card);
}

.dropdown-item {
    color: var(--text-secondary) !important;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--accent-muted) !important;
    color: var(--text-primary) !important;
}

/* ─── Theme customizer (navbar icon) ─── */
.bk-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0.35rem 0.5rem !important;
    margin: 0;
    color: var(--text-secondary) !important;
    cursor: pointer;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.bk-theme-toggle i {
    font-size: 1.15rem;
}

.bk-theme-toggle:hover,
.bk-theme-toggle:focus {
    color: var(--accent-primary) !important;
    background: var(--accent-muted) !important;
    outline: none;
    box-shadow: none;
}

body.light-mode .header-navbar .bk-theme-toggle:hover,
body.light-mode .header-navbar .bk-theme-toggle:focus {
    color: var(--accent-hover) !important;
}

.bk-theme-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 300px;
    z-index: 1060;
    background: var(--bk-surface-elevated);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    box-shadow: var(--shadow-glass);
    padding: 1.5rem;
    transition: left var(--transition-slow), right var(--transition-slow);
    overflow-y: auto;
}

html[data-textdirection="rtl"] .bk-theme-panel {
    left: -320px;
    right: auto;
    border-inline-end: 1px solid var(--bk-border-glass);
}

html[data-textdirection="rtl"] .bk-theme-panel.is-open {
    left: 0;
}

html[data-textdirection="ltr"] .bk-theme-panel {
    right: -320px;
    left: auto;
    border-inline-start: 1px solid var(--bk-border-glass);
}

html[data-textdirection="ltr"] .bk-theme-panel.is-open {
    right: 0;
}

.bk-theme-panel__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.bk-theme-panel__subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.bk-theme-presets {
    display: grid;
    gap: 0.65rem;
}

.bk-theme-preset {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--bk-border-glass);
    background: var(--bk-surface-card);
    cursor: pointer;
    transition: all var(--transition-base);
}

.bk-theme-preset:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.bk-theme-preset.is-active {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 1px var(--accent-secondary);
}

.bk-theme-preset__swatches {
    display: flex;
    gap: 4px;
}

.bk-theme-preset__swatches span {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bk-theme-preset__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.bk-theme-overlay {
    position: fixed;
    inset: 0;
    z-index: 1055;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.bk-theme-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ─── Loader ─── */
.loader {
    background: var(--bk-bg-base) !important;
}

.loader .sk-chase-dot:before {
    background-color: var(--accent-primary) !important;
}

/* ─── Dark layout overrides (Vuexy compat) ─── */
body.dark-layout:not(.light-mode) .main-menu.menu-light .navigation > li:not(.active) > a {
    color: var(--sb-item, var(--sidebar-link, var(--text-secondary))) !important;
}

body.dark-layout:not(.light-mode) a:not(.nav-link):not(.btn):not(.dropdown-item):not(.page-link) {
    color: var(--accent-hover) !important;
}

body.dark-layout:not(.light-mode) .nav-tabs .nav-item .nav-link.active,
body.dark-layout:not(.light-mode) .nav-tabs .nav-item .nav-link:hover {
    color: var(--accent-secondary) !important;
}

body.dark-layout:not(.light-mode) .card .form-group > label {
    color: var(--text-secondary) !important;
}

/* ─── Dark mode readability (lighter canvas, clearer copy) ─── */
body.dark-layout:not(.light-mode),
body#content_body.bookdin-body:not(.light-mode) {
    color: var(--text-primary);
}

body.dark-layout:not(.light-mode) .text-muted,
body#content_body.bookdin-body:not(.light-mode) .text-muted {
    color: var(--text-muted) !important;
    opacity: 1;
}

body.dark-layout:not(.light-mode) small.text-muted,
body.dark-layout:not(.light-mode) .dash-subsection-hint,
body.dark-layout:not(.light-mode) .chart-card-subtitle,
body.dark-layout:not(.light-mode) .provider-financial-live-hint {
    color: var(--text-secondary) !important;
}

/* Provider financial table: distinct column text colors */
body.dark-layout:not(.light-mode) .table.provider-financial-cols thead th.col-provider,
body.dark-layout:not(.light-mode) .table.provider-financial-cols tbody tr td.col-provider,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols thead th.col-provider,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols tbody tr td.col-provider {
    color: #E2E8F0 !important;
    font-weight: 600;
}

body.dark-layout:not(.light-mode) .table.provider-financial-cols thead th.col-sales,
body.dark-layout:not(.light-mode) .table.provider-financial-cols tbody tr td.col-sales,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols thead th.col-sales,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols tbody tr td.col-sales {
    color: #60A5FA !important;
}

body.dark-layout:not(.light-mode) .table.provider-financial-cols thead th.col-commission,
body.dark-layout:not(.light-mode) .table.provider-financial-cols tbody tr td.col-commission,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols thead th.col-commission,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols tbody tr td.col-commission {
    color: #C4B5FD !important;
}

body.dark-layout:not(.light-mode) .table.provider-financial-cols thead th.col-profit,
body.dark-layout:not(.light-mode) .table.provider-financial-cols tbody tr td.col-profit,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols thead th.col-profit,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols tbody tr td.col-profit {
    color: #4ADE80 !important;
}

body.dark-layout:not(.light-mode) .table.provider-financial-cols thead th.col-dues,
body.dark-layout:not(.light-mode) .table.provider-financial-cols tbody tr td.col-dues,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols thead th.col-dues,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols tbody tr td.col-dues {
    color: #2DD4BF !important;
}

body.dark-layout:not(.light-mode) .table.provider-financial-cols thead th.col-withdrawable,
body.dark-layout:not(.light-mode) .table.provider-financial-cols tbody tr td.col-withdrawable,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols thead th.col-withdrawable,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols tbody tr td.col-withdrawable {
    color: #38BDF8 !important;
}

body.dark-layout:not(.light-mode) .table.provider-financial-cols thead th.col-pending,
body.dark-layout:not(.light-mode) .table.provider-financial-cols tbody tr td.col-pending,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols thead th.col-pending,
body#content_body.bookdin-body:not(.light-mode) .table.provider-financial-cols tbody tr td.col-pending {
    color: #FBBF24 !important;
}

body.light-mode .table.provider-financial-cols thead th.col-provider,
body.light-mode .table.provider-financial-cols tbody tr td.col-provider,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols thead th.col-provider,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols tbody tr td.col-provider,
html.light-style .table.provider-financial-cols thead th.col-provider,
html.light-style .table.provider-financial-cols tbody tr td.col-provider,
html.light-style body#content_body.bookdin-body .table.provider-financial-cols thead th.col-provider,
html.light-style body#content_body.bookdin-body .table.provider-financial-cols tbody tr td.col-provider {
    color: #0F172A !important;
    font-weight: 700;
}

body.light-mode .table.provider-financial-cols thead th.col-sales,
body.light-mode .table.provider-financial-cols tbody tr td.col-sales,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols thead th.col-sales,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols tbody tr td.col-sales,
html.light-style .table.provider-financial-cols thead th.col-sales,
html.light-style .table.provider-financial-cols tbody tr td.col-sales {
    color: #1D4ED8 !important;
    font-weight: 600;
}

body.light-mode .table.provider-financial-cols thead th.col-commission,
body.light-mode .table.provider-financial-cols tbody tr td.col-commission,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols thead th.col-commission,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols tbody tr td.col-commission,
html.light-style .table.provider-financial-cols thead th.col-commission,
html.light-style .table.provider-financial-cols tbody tr td.col-commission {
    color: #6D28D9 !important;
    font-weight: 600;
}

body.light-mode .table.provider-financial-cols thead th.col-profit,
body.light-mode .table.provider-financial-cols tbody tr td.col-profit,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols thead th.col-profit,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols tbody tr td.col-profit,
html.light-style .table.provider-financial-cols thead th.col-profit,
html.light-style .table.provider-financial-cols tbody tr td.col-profit {
    color: #15803D !important;
    font-weight: 600;
}

body.light-mode .table.provider-financial-cols thead th.col-dues,
body.light-mode .table.provider-financial-cols tbody tr td.col-dues,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols thead th.col-dues,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols tbody tr td.col-dues,
html.light-style .table.provider-financial-cols thead th.col-dues,
html.light-style .table.provider-financial-cols tbody tr td.col-dues {
    color: #0F766E !important;
    font-weight: 600;
}

body.light-mode .table.provider-financial-cols thead th.col-withdrawable,
body.light-mode .table.provider-financial-cols tbody tr td.col-withdrawable,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols thead th.col-withdrawable,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols tbody tr td.col-withdrawable,
html.light-style .table.provider-financial-cols thead th.col-withdrawable,
html.light-style .table.provider-financial-cols tbody tr td.col-withdrawable {
    color: #0369A1 !important;
    font-weight: 600;
}

body.light-mode .table.provider-financial-cols thead th.col-pending,
body.light-mode .table.provider-financial-cols tbody tr td.col-pending,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols thead th.col-pending,
body#content_body.bookdin-body.light-mode .table.provider-financial-cols tbody tr td.col-pending,
html.light-style .table.provider-financial-cols thead th.col-pending,
html.light-style .table.provider-financial-cols tbody tr td.col-pending {
    color: #B45309 !important;
    font-weight: 600;
}

body.dark-layout:not(.light-mode) .card,
body.dark-layout:not(.light-mode) .card-body,
body.dark-layout:not(.light-mode) .content-body {
    color: var(--text-primary);
}

body.dark-layout:not(.light-mode) .card-title,
body.dark-layout:not(.light-mode) .dash-section-title,
body.dark-layout:not(.light-mode) .dash-subsection-title {
    color: var(--text-primary) !important;
}

body.dark-layout:not(.light-mode) .kpi-currency {
    color: var(--text-secondary) !important;
}

body.dark-layout:not(.light-mode) .form-control,
body.dark-layout:not(.light-mode) .custom-select,
body.dark-layout:not(.light-mode) select.form-control {
    background: var(--bk-surface-input) !important;
    border-color: var(--bk-border-glass) !important;
    color: var(--text-primary) !important;
}

body.dark-layout:not(.light-mode) .btn-outline-primary {
    color: var(--accent-hover) !important;
    border-color: color-mix(in srgb, var(--accent-primary) 45%, transparent) !important;
}

body.dark-layout:not(.light-mode) .btn-outline-primary.active,
body.dark-layout:not(.light-mode) .btn-outline-primary:hover {
    color: var(--text-primary) !important;
}

/* Sidebar colors are owned by the Bookedin sidebar block — don't override here */
body.dark-layout:not(.light-mode) .main-menu.bk-sidebar .navigation > li.active > a {
    color: var(--sb-active-text, #ffffff) !important;
}

body.dark-layout:not(.light-mode) .main-menu.bk-sidebar .navigation > li:not(.active) > a:hover,
body.dark-layout:not(.light-mode) .main-menu.bk-sidebar .navigation > li.sidebar-group-active:not(.active) > a,
body.dark-layout:not(.light-mode) .main-menu.bk-sidebar .navigation > li.open:not(.active) > a {
    color: var(--sb-item, rgba(236, 246, 247, 0.92)) !important;
}

/* Keep tinted badge text readable — dark-layout forces white on all .badge */
body.dark-layout .badge.badge-light-warning { color: #FF9F43 !important; }
body.dark-layout .badge.badge-light-primary { color: #20a2c6 !important; }
body.dark-layout .badge.badge-light-success { color: #28C76F !important; }
body.dark-layout .badge.badge-light-info { color: #00CFE8 !important; }
body.dark-layout .badge.badge-light-danger { color: #EA5455 !important; }
body.dark-layout .badge.badge-light-secondary { color: #82868B !important; }

/* ─── Light mode readability ─── */
body.light-mode {
    color: var(--text-primary) !important;
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6,
body.light-mode .content-body p,
body.light-mode .card-body > p,
body.light-mode label,
body.light-mode .card-title,
body.light-mode .kpi-value,
body.light-mode .dash-section-title,
body.light-mode .dash-subsection-title {
    color: var(--text-primary) !important;
}

body.light-mode .kpi-label,
body.light-mode .user-status,
body.light-mode .text-muted,
body.light-mode small.text-muted,
body.light-mode .dash-subsection-hint,
body.light-mode .chart-card-subtitle {
    color: var(--text-muted) !important;
}

body.light-mode .card,
body.light-mode .card-body,
body.light-mode .content-body {
    color: var(--text-primary);
}

body.light-mode .form-control,
body.light-mode .custom-select,
body.light-mode select.form-control,
body.light-mode .custom-file-label {
    background: var(--bk-surface-input) !important;
    border-color: var(--bk-border-glass) !important;
    color: var(--text-primary) !important;
}

body.light-mode .table,
body.light-mode .table td,
body.light-mode .table thead th {
    color: var(--text-primary) !important;
}

body.light-mode .dropdown-menu .dropdown-item {
    color: var(--text-secondary) !important;
}

body.light-mode .dropdown-menu .dropdown-item:hover {
    color: var(--text-primary) !important;
}

body.light-mode .header-navbar {
    background: var(--shell-navbar-bg) !important;
}

body.light-mode .header-navbar .user-name,
body.light-mode .header-navbar .admin-breadcrumb-item a,
body.light-mode .header-navbar .admin-breadcrumb-item a span,
body.light-mode .header-navbar .nav-link,
body.light-mode .header-navbar .selected-language,
body.light-mode .header-navbar .bk-status-pill {
    color: var(--text-secondary) !important;
}

body.light-mode .header-navbar .admin-breadcrumb-item--active span,
body.light-mode .header-navbar .bk-nav-page-title {
    color: var(--text-primary) !important;
}

body.light-mode .header-navbar .bk-nav-page-title {
    background: var(--accent-muted);
    border-color: var(--bk-border-glass);
}

body.light-mode .header-navbar .nav-link:hover,
body.light-mode .header-navbar .nav-link:hover .selected-language,
body.light-mode .header-navbar .admin-breadcrumb-item a:hover,
body.light-mode .header-navbar .admin-breadcrumb-item a:hover span,
body.light-mode .header-navbar .dropdown-user-link:hover .user-name,
body.light-mode .header-navbar .bk-status-pill:hover {
    color: var(--accent-hover) !important;
}

body.light-mode .header-navbar .nav-link:hover i,
body.light-mode .header-navbar .admin-breadcrumb-item a:hover i {
    color: var(--accent-hover) !important;
}

/* Sidebar links: don't blanket-override active brand chip */
body.light-mode .main-menu.menu-light .navigation > li:not(.active) > a,
body.light-mode .main-menu.bk-sidebar .navigation > li:not(.active) > a {
    color: var(--sb-item, var(--sidebar-link)) !important;
}

body.light-mode .main-menu.menu-light .navigation > li:not(.active) > a:hover,
body.light-mode .main-menu.bk-sidebar .navigation > li:not(.active) > a:hover {
    color: var(--sb-item, var(--sidebar-link-hover)) !important;
}

body.light-mode .main-menu.menu-light .navigation > li.active > a,
body.light-mode .main-menu.bk-sidebar .navigation > li.active > a {
    color: #ffffff !important;
    background: linear-gradient(135deg, #00A3FF 0%, #0078D8 52%, #0055CC 100%) !important;
}

body.light-mode .main-menu .navigation-main .menu-content > li > a {
    color: var(--sb-item-muted) !important;
}

body.light-mode .admin-breadcrumb-separator {
    color: var(--text-muted) !important;
}

/* Keep tinted badges readable in light (Vuexy soft badges) */
body.light-mode .badge.badge-light-warning { color: #C77E0A !important; }
body.light-mode .badge.badge-light-primary { color: #0078D8 !important; }
body.light-mode .badge.badge-light-success { color: #1F9D57 !important; }
body.light-mode .badge.badge-light-info { color: #0B9BB5 !important; }
body.light-mode .badge.badge-light-danger { color: #D63B3C !important; }
body.light-mode .badge.badge-light-secondary { color: #5C6166 !important; }

/* minimal-light theme */
[data-color-theme="minimal-light"] .header-navbar .nav-link,
[data-color-theme="minimal-light"] .header-navbar .user-name,
[data-color-theme="minimal-light"] .header-navbar .admin-breadcrumb-item a {
    color: var(--text-secondary) !important;
}

[data-color-theme="minimal-light"] .header-navbar .nav-link:hover,
[data-color-theme="minimal-light"] .header-navbar .admin-breadcrumb-item a:hover,
[data-color-theme="minimal-light"] .header-navbar .admin-breadcrumb-item a:hover span,
[data-color-theme="minimal-light"] .header-navbar .dropdown-user-link:hover .user-name,
[data-color-theme="minimal-light"] .header-navbar .bk-status-pill:hover {
    color: var(--accent-hover) !important;
}

[data-color-theme="minimal-light"] .main-menu .navigation-main > .nav-item > a {
    color: var(--sidebar-link) !important;
}

[data-color-theme="minimal-light"] .main-menu .navigation-main > .nav-item.active > a {
    color: var(--sb-active-text, #ffffff) !important;
}

/* ─── Filter drawer ─── */
.btn-searchTable {
    display: inline-flex !important;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 1rem 0.3rem 0.3rem !important;
    margin: 0 !important;
    min-width: auto !important;
    background: var(--accent-muted) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--bk-border-glass) !important;
    border-radius: 999px !important;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1;
    transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

html[data-textdirection="rtl"] .btn-searchTable {
    padding: 0.3rem 0.3rem 0.3rem 1rem !important;
}

.btn-searchTable:hover,
.btn-searchTable.active {
    background: var(--accent-primary) !important;
    color: #fff !important;
    border-color: var(--accent-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--accent-muted);
}

.btn-searchTable > i {
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    outline: none !important;
    border-radius: 50% !important;
    background: var(--bk-surface-elevated) !important;
    color: var(--accent-hover) !important;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-searchTable:hover > i,
.btn-searchTable.active > i {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #fff !important;
}

/* Legacy overlay no longer used (panel is in-flow) */
.layout_ {
    display: none !important;
}

/* In-flow full-width collapsible filter panel (pushes the table down) */
.searchTable {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: 0;
    z-index: 5;
    margin: 0 !important;
    background: var(--bk-surface-elevated) !important;
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--bk-border-glass) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: none !important;
    transition: max-height var(--transition-slow), opacity var(--transition-base), margin var(--transition-base) !important;
}

.searchTable.active {
    opacity: 1;
    margin: 0.85rem 0 0.5rem !important;
    box-shadow: var(--shadow-glass);
}

.searchTable__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--bk-border-glass);
    background: linear-gradient(135deg, var(--accent-muted), transparent);
    flex-shrink: 0;
}

.searchTable__title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.searchTable__title i {
    font-size: 1rem;
    color: var(--accent-hover);
}

.searchTable__close {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--bk-border-glass);
    border-radius: 999px;
    background: var(--bk-surface-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.searchTable__close i {
    font-size: 0.7rem;
    opacity: 0.9;
}

.searchTable__close:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: #ef4444;
    color: #ef4444;
}

.searchTable .forma {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.05rem 1.15rem !important;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    align-content: start;
    align-items: start;
}

.searchTable .forma .form-group {
    margin-bottom: 0 !important;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.searchTable .forma label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary) !important;
    min-height: 1.2em;
    line-height: 1.2;
}

.searchTable .forma .controls.border {
    position: relative;
    border: none !important;
    border-radius: var(--radius-md);
    width: 100%;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
}

.searchTable .parent-input-date::after {
    display: none !important;
    content: none !important;
}

.searchTable .forma .input-type-icon {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.75rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}

.searchTable .forma .input-type-icon i,
.searchTable .forma .input-type-icon svg {
    width: 15px;
    height: 15px;
    font-size: 15px;
    stroke-width: 2;
}

.searchTable .forma .controls.control--select .input-type-icon i,
.searchTable .forma .controls.control--select .input-type-icon svg {
    width: 13px;
    height: 13px;
    font-size: 13px;
}

.searchTable .forma .select2-container {
    width: 100% !important;
    height: 42px !important;
}

.searchTable .forma .form-control,
.searchTable .forma .select2-container--default .select2-selection--single {
    width: 100% !important;
    max-width: 100% !important;
    background: var(--bk-surface-input) !important;
    border: 1px solid var(--bk-border-glass) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    min-height: 42px !important;
    height: 42px !important;
    max-height: 42px !important;
    line-height: 1.25 !important;
    font-size: 0.84rem !important;
    font-weight: 500;
    padding-block: 0 !important;
    padding-inline-start: 0.85rem !important;
    padding-inline-end: 2.25rem !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
}

.searchTable .forma .form-control {
    display: block !important;
    line-height: 40px !important;
}

.searchTable .forma .controls.control--text .form-control,
.searchTable .forma .controls.control--date .form-control {
    padding-inline-start: 0.85rem !important;
}

.searchTable .forma .controls.control--text.has-value .form-control,
.searchTable .forma .controls.control--date.has-value .form-control {
    padding-inline-start: 2.25rem !important;
}

.searchTable .custom-input-date {
    background-color: transparent !important;
    padding-inline-start: 0.85rem !important;
}

.searchTable .controls.control--date.has-value .custom-input-date {
    padding-inline-start: 2.25rem !important;
}

.searchTable .forma .form-control:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px var(--accent-muted) !important;
}

.searchTable .forma input::placeholder {
    color: var(--text-muted) !important;
    opacity: 1;
}

.searchTable .forma input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    inset-inline-end: 0;
    width: 2.25rem;
    height: 100%;
    cursor: pointer;
}

.searchTable .forma .select2-container .select2-selection__rendered {
    color: var(--text-primary) !important;
    line-height: 40px !important;
    height: 40px !important;
    font-size: 0.84rem !important;
    font-weight: 500;
    padding: 0 !important;
    padding-inline-end: 1.75rem !important;
    display: flex !important;
    align-items: center !important;
}

.searchTable .forma .select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none !important;
}

.searchTable .forma .select2-container--default .select2-selection--single .select2-selection__placeholder {
    line-height: 40px !important;
}

.searchTable .filter-clear-btn {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.65rem;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    padding: 0 !important;
    border: none !important;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.searchTable .filter-clear-btn i,
.searchTable .filter-clear-btn svg {
    width: 12px;
    height: 12px;
    font-size: 12px;
}

.searchTable .controls.has-value .filter-clear-btn {
    opacity: 1;
    pointer-events: auto;
}

.searchTable .filter-clear-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.searchTable .clean-input,
.searchTable .clear-input {
    padding: 0 !important;
    border: none !important;
    left: auto !important;
}

.searchTable__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0.85rem 1.15rem;
    border-top: 1px solid var(--bk-border-glass);
    background: var(--bk-surface-glass);
    flex-shrink: 0;
}

.searchTable__footer .searchTable__reset {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.83rem;
    font-weight: 600;
    background: transparent;
    border: 1px solid var(--bk-border-glass);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.searchTable__footer .searchTable__reset:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

@media (max-width: 1199px) {
    .searchTable .forma {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .searchTable .forma {
        grid-template-columns: 1fr;
    }
}

/* Login page glass card */
.blank-page .card {
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--bk-border-glass) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-glass);
}

.blank-page .col-lg-6.bg-white,
.blank-page .card.bg-white {
    background: var(--bk-surface-card) !important;
}

.blank-page .card-header,
.blank-page .card-title,
.blank-page label {
    color: var(--text-primary) !important;
}

.blank-page .form-control {
    background: var(--bk-surface-input) !important;
    border-color: var(--bk-border-glass) !important;
    color: var(--text-primary) !important;
}

@media (prefers-reduced-motion: reduce) {
    .bk-animate-in,
    .bk-reveal,
    .bk-nav-enter,
    .bk-status-pill__dot,
    .dash-hero {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        filter: none !important;
    }

    body.bookdin-body .app-content,
    body.bookdin-body .content-body {
        opacity: 1 !important;
        transform: none !important;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}

/* Responsive */
@media (max-width: 1199px) {
    .bk-status-pill span:not(.bk-status-pill__dot) {
        display: none;
    }
}

@media (max-width: 767px) {
    .content-wrapper {
        padding: 0.75rem !important;
    }

    .header-navbar.floating-nav {
        margin: 0.5rem !important;
        border-radius: var(--radius-md) !important;
    }
}

/* ─── Provider profile header ─── */
#user-profile .profile-header {
    margin-top: 0 !important;
    overflow: visible;
}

#user-profile .profile-header .relative {
    overflow: visible;
}

#user-profile .provider-profile-cover {
    height: 120px;
    background: var(--hero-gradient);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--bk-border-glass);
    border-bottom: none;
    overflow: hidden;
    position: relative;
}

#user-profile .provider-profile-cover::before,
#user-profile .provider-profile-cover::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

#user-profile .provider-profile-cover::before {
    inset: -70px -50px auto auto;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.12);
}

#user-profile .provider-profile-cover::after {
    inset: -40px auto auto -80px;
    width: 170px;
    height: 170px;
    background: rgba(255, 255, 255, 0.08);
}

#user-profile .profile-img-container {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: -2.75rem;
    top: auto;
    transform: translateX(-50%);
    width: auto;
    z-index: 3;
}

#user-profile .profile-img-container img {
    border: 0.3rem solid var(--bk-surface-card) !important;
    box-shadow: var(--shadow-card);
    height: 85px;
    width: 85px;
    object-fit: cover;
}

#user-profile .profile-header-nav {
    background: var(--bk-surface-card) !important;
    border: 1px solid var(--bk-border-glass);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 2.75rem 1rem 0.75rem !important;
    gap: 0.75rem;
}

#user-profile .profile-header-nav .navbar {
    justify-content: flex-start !important;
    padding: 0;
}

#user-profile .profile-header-nav .navbar .navbar-collapse {
    width: 100%;
}

#user-profile .profile-header-nav .provider-profile-tabs {
    flex-direction: row;
    justify-content: flex-start;
    width: 100%;
    margin: 0 !important;
}

#user-profile .profile-header-nav .provider-profile-tabs .nav-item {
    padding-inline: 0.75rem !important;
}

#user-profile .profile-header-nav .navbar .nav-link {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

#user-profile .profile-header-nav .navbar .nav-link:hover,
#user-profile .profile-header-nav .navbar .nav-link.active {
    color: var(--accent-secondary) !important;
}

#user-profile .provider-edit-actions .btn-primary {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    box-shadow: var(--shadow-glow);
}

@media (max-width: 575px) {
    #user-profile .provider-profile-cover {
        height: 90px;
    }

    #user-profile .profile-header-nav {
        flex-wrap: wrap;
        padding-top: 2.25rem !important;
    }

    #user-profile .profile-img-container {
        bottom: -2.25rem;
    }

    #user-profile .profile-img-container img {
        height: 70px;
        width: 70px;
    }

    #user-profile .provider-edit-actions {
        order: -1;
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}

/* =========================================================
   Dashboard — calm professional layout (content unchanged)
   ========================================================= */
.dash-page {
    --dash-gap: 1.35rem;
    --dash-radius: 14px;
    --dash-border: color-mix(in srgb, var(--text-primary) 10%, transparent);
    --dash-surface: var(--bk-surface-card);
    --dash-ink: var(--text-primary);
    --dash-muted: var(--text-muted);
    --dash-soft: color-mix(in srgb, var(--accent-primary) 7%, var(--bk-surface-card));
    display: flex;
    flex-direction: column;
    gap: calc(var(--dash-gap) + 0.35rem);
    padding-bottom: 1.5rem;
}

.dash-page .dash-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    border-radius: var(--dash-radius);
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--accent-primary) 94%, #000) 0%,
            color-mix(in srgb, var(--accent-primary) 72%, #0a1416) 72%,
            color-mix(in srgb, var(--accent-primary) 55%, #001050) 100%);
    color: #fff;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 35%, transparent);
    box-shadow:
        0 12px 28px color-mix(in srgb, var(--accent-primary) 16%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.dash-page .dash-head::after {
    content: "";
    position: absolute;
    inset-inline-end: -10%;
    top: -40%;
    width: 42%;
    height: 180%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent-secondary) 28%, transparent) 0%, transparent 68%);
    pointer-events: none;
}

.dash-page .dash-head__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #ffffff !important;
    opacity: 0.95;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.dash-page .dash-head__title {
    margin: 0;
    font-size: clamp(1.2rem, 1.8vw, 1.55rem);
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.dash-page .dash-head__title span {
    font-weight: 600;
    color: #ffffff !important;
    opacity: 0.95;
}

body.light-mode .dash-page .dash-head__eyebrow,
body.light-mode .dash-page .dash-head__title,
body.light-mode .dash-page .dash-head__title span,
body.dark-layout .dash-page .dash-head__eyebrow,
body.dark-layout .dash-page .dash-head__title,
body.dark-layout .dash-page .dash-head__title span {
    color: #ffffff !important;
}

.dash-page .dash-head__copy,
.dash-page .dash-head__cta {
    position: relative;
    z-index: 1;
}

.dash-page .dash-head__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff !important;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dash-page .dash-head__cta:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff !important;
    transform: translateY(-1px);
}

.dash-page .dash-head__cta-count {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.dash-page .dash-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dash-page .dash-block__intro {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dash-page .dash-block__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--dash-ink);
    letter-spacing: -0.01em;
}

.dash-page .dash-block__hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--dash-muted);
}

.dash-page .dash-group {
    padding: 0.95rem 1rem 0.35rem;
    border-radius: var(--dash-radius);
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dash-page .dash-group + .dash-group {
    margin-top: 0.15rem;
}

.dash-page .dash-group__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--dash-border);
}

.dash-page .dash-group__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--dash-ink);
}

.dash-page .dash-group__hint {
    margin: 0.15rem 0 0;
    font-size: 0.74rem;
    color: var(--dash-muted);
}

.dash-page .dash-group__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-primary) !important;
    text-decoration: none !important;
    padding: 0.28rem 0.55rem;
    border-radius: 8px;
    transition: background 0.18s ease;
}

.dash-page .dash-group__link:hover {
    background: var(--dash-soft);
}

[dir="ltr"] .dash-page .dash-group__link i {
    transform: scaleX(-1);
}

.dash-page .dash-metric-row {
    margin-left: -0.4rem;
    margin-right: -0.4rem;
}

.dash-page .dash-metric-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    margin-bottom: 0.8rem;
}

.dash-page .dash-metric-row .kpi-card-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 100%;
}

.dash-page .dash-metric-row .kpi-card-link .dash-metric,
.dash-page .dash-metric-row .kpi-card-link .kpi-card {
    flex: 1 1 auto;
    width: 100%;
}

.dash-page .dash-metric,
.dash-page .kpi-card.dash-metric {
    height: 100%;
    border-radius: 14px !important;
    border: 1px solid var(--dash-border) !important;
    background: color-mix(in srgb, var(--bk-surface-card) 96%, transparent) !important;
    box-shadow: 0 1px 2px rgba(0, 40, 100, 0.03), 0 8px 20px rgba(0, 40, 100, 0.04) !important;
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dash-page .dash-metric::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--kpi-accent, var(--accent-primary));
    opacity: 0.85;
}

.dash-page .dash-metric::after,
.dash-page .chart-card::after,
.dash-page .quick-link::after {
    display: none !important;
}

.dash-page .kpi-card-link:hover .dash-metric {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--kpi-accent, var(--accent-primary)) 35%, var(--dash-border)) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06) !important;
}

.dash-page .dash-metric .card-body {
    padding: 0.95rem 1rem !important;
}

.dash-page .dash-metric .kpi-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--dash-muted) !important;
    margin-bottom: 0.35rem;
}

.dash-page .dash-metric .kpi-value {
    font-size: 1.35rem !important;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--dash-ink) !important;
    line-height: 1.2;
}

.dash-page .dash-metric .kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--kpi-accent, var(--accent-primary)) 12%, transparent) !important;
    color: var(--kpi-accent, var(--accent-primary));
    flex-shrink: 0;
}

.dash-page .dash-metric .kpi-icon i {
    color: inherit !important;
    font-size: 1.05rem;
}

.dash-page .dash-metric--emphasis {
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--kpi-accent, var(--accent-primary)) 8%, var(--bk-surface-card)),
        var(--bk-surface-card) 70%
    ) !important;
}

.dash-page .dash-metric__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.4rem;
}

.dash-page .kpi-hint {
    font-size: 0.72rem;
    color: var(--dash-muted) !important;
}

.dash-page .finance-growth {
    font-size: 0.72rem;
}

/* Quick links — compact tiles */
.dash-page .dash-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.7rem;
}

.dash-page .dash-quick-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    text-decoration: none !important;
    color: inherit !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dash-page .dash-quick-item:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent-primary) 35%, var(--dash-border));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.dash-page .dash-quick-item__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dash-soft);
    color: var(--accent-primary);
    flex-shrink: 0;
}

.dash-page .dash-quick-item__icon i {
    font-size: 1.05rem;
}

.dash-page .dash-quick-item__meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
}

.dash-page .dash-quick-item__count {
    font-size: 1.05rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    color: var(--dash-ink);
    line-height: 1.15;
}

.dash-page .dash-quick-item__name {
    font-size: 0.78rem;
    color: var(--dash-muted);
    white-space: normal;
    overflow: visible;
    display: block;
    line-height: 1.35;
    word-break: break-word;
}

/* Charts panel */
.dash-page .dash-panel,
.dash-page .chart-card.dash-panel {
    border: 1px solid var(--dash-border) !important;
    border-radius: var(--dash-radius) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    background: var(--dash-surface) !important;
}

.dash-page .dash-panel .card-header {
    padding: 1rem 1.15rem !important;
}

.dash-page .dash-panel .card-title {
    font-size: 0.98rem !important;
    font-weight: 700 !important;
}

.dash-page .chart-canvas-wrap {
    opacity: 1;
    min-height: 320px;
    position: relative;
    padding-top: 2rem;
}

.dash-page .chart-card .card-header {
    padding-inline-end: 1rem !important;
    position: relative;
    z-index: 2;
}

.dash-page .apexcharts-toolbar {
    top: 8px !important;
    inset-inline-end: 8px !important;
    z-index: 4;
}

.dash-page .apexcharts-legend {
    padding: 0 8px !important;
}

.dash-page .apexcharts-menu {
    min-width: 140px;
    z-index: 5;
}

.dash-page .chart-canvas-wrap--donut {
    min-height: 220px;
}

.dash-page .units-breakdown-item {
    border-radius: 10px;
}

.dash-page .units-breakdown-item:hover {
    transform: none;
}

body.light-mode .dash-page .dash-group,
body.light-mode .dash-page .dash-quick-item,
body.light-mode .dash-page .dash-panel {
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.light-mode .dash-page .dash-metric {
    background: #fff !important;
}

@media (max-width: 767.98px) {
    .dash-page .dash-head {
        align-items: stretch;
    }

    .dash-page .dash-head__cta {
        width: 100%;
        justify-content: center;
    }

    .dash-page .dash-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================================
   Bug fixes: empty-state icon, action icon contrast, checkbox alignment,
   collapsed sidebar arrow, table image preview
   ========================================================================== */

/* Empty-state placeholder (replaces a storage-dependent image that could be
   missing after a fresh deploy/clone, causing a broken-image icon). */
.bk-empty-state-icon {
    display: block;
    width: 64px;
    height: 64px;
    font-size: 64px;
    line-height: 1;
    margin: 0 auto 0.5rem;
    opacity: 0.35;
    color: inherit;
}

/* Action column icons — light mode needs dark glyphs on the pale badge.
   Unscoped `.feather.icon-eye/.icon-edit { color: white }` used to wash
   view/edit out; colors are applied to span, a, and i so they always win. */
html.light-style .product-action,
body.light-mode .product-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

html.light-style .product-action > span,
body.light-mode .product-action > span {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #eef2f6;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

html.light-style .product-action > span.text-primary a,
html.light-style .product-action > span.text-primary i,
html.light-style .product-action > span.text-primary a i,
body.light-mode .product-action > span.text-primary a,
body.light-mode .product-action > span.text-primary i,
body.light-mode .product-action > span.text-primary a i {
    color: #0f535e !important;
    stroke: #0f535e !important;
}

html.light-style .product-action > span.text-primary,
body.light-mode .product-action > span.text-primary {
    color: #0f535e !important;
    background: #e5f3f4;
    border-color: #c5e2e5;
}

html.light-style .product-action > span.text-info,
body.light-mode .product-action > span.text-info {
    color: #0e7490 !important;
    background: #e7f6f8;
    border-color: #c5e8ee;
}

html.light-style .product-action > span.text-danger,
html.light-style .product-action > span.delete-row,
body.light-mode .product-action > span.text-danger,
body.light-mode .product-action > span.delete-row {
    color: #b42318 !important;
    background: #fdecea;
    border-color: #f5c6c2;
}

html.light-style .product-action > span.text-muted,
html.light-style .product-action > span.text-muted i,
body.light-mode .product-action > span.text-muted,
body.light-mode .product-action > span.text-muted i {
    color: #94a3b8 !important;
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

html.light-style .product-action > span:not(.text-muted):hover,
body.light-mode .product-action > span:not(.text-muted):hover {
    filter: brightness(0.97);
}

/* Table bulk-select checkbox column — keep the header "select all" checkbox
   aligned with the row checkboxes below it (list tables all share id="tab"). */
table#tab > thead > tr > th:first-child,
table#tab > tbody > tr > td:first-child {
    text-align: center;
    vertical-align: middle;
}
table#tab > thead > tr > th:first-child input[type="checkbox"],
table#tab > tbody > tr > td:first-child input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
}

/* Collapsed (icon-only) sidebar rail has no room for the submenu direction
   arrow next to the item icon — hide it there instead of overlapping. */
body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.bk-sidebar:not(.expanded) .navigation li.has-sub > a > i.menu-submenu-arrow {
    display: none !important;
}

body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.bk-sidebar:not(.expanded) .bk-sidebar-brand-text,
body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.bk-sidebar:not(.expanded) .bk-sidebar-search,
body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.bk-sidebar:not(.expanded) .bk-sidebar-user-meta,
body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.bk-sidebar:not(.expanded) .bk-sidebar-logout {
    display: none !important;
}

body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.bk-sidebar:not(.expanded) .bk-sidebar-brand-link {
    justify-content: center;
    padding: 0.45rem !important;
}

body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.bk-sidebar:not(.expanded) .bk-sidebar-footer {
    justify-content: center;
    padding: 0.65rem 0.4rem 0.85rem;
}

body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.bk-sidebar:not(.expanded) .bk-sidebar-user {
    justify-content: center;
    padding: 0.25rem;
}

body.vertical-layout.vertical-menu-modern.menu-collapsed .main-menu.bk-sidebar:not(.expanded) .navigation > li > a > i:not(.menu-submenu-arrow) {
    margin-inline: auto !important;
}

/* Image preview — tables and show pages. Click thumbnail for full size. */
table img,
.card img,
.card-body img,
.card-content img,
.complaint-images-grid img {
    cursor: zoom-in;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
table img:hover,
.card img:hover,
.card-body img:hover,
.card-content img:hover,
.complaint-images-grid img:hover {
    transform: scale(1.04);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.header-navbar img,
.main-menu img,
.footer img,
.modal img,
.bk-image-preview-overlay img {
    cursor: default;
    transform: none;
    box-shadow: none;
}

.modal {
    z-index: 1050;
}
.modal-backdrop {
    z-index: 1040;
}
.bk-image-preview-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.bk-image-preview-overlay.is-open {
    display: flex;
}
.bk-image-preview-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.bk-image-preview-close {
    position: absolute;
    top: 20px;
    right: 28px;
    font-size: 2.2rem;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    opacity: 0.85;
    background: transparent;
    border: 0;
}
.bk-image-preview-close:hover {
    opacity: 1;
}
/* ─── Password visibility toggle (auto-injected, see bookdin-admin.js) ─── */
.bk-pw-toggle-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.bk-pw-toggle-wrap .form-control,
.bk-pw-toggle-wrap input {
    padding-inline-end: 2.75rem !important;
}

.bk-pw-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.55rem;
    transform: translateY(-50%);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: transparent;
    border: 0;
    color: #64748b;
    cursor: pointer;
    z-index: 6;
    line-height: 1;
}

.bk-pw-toggle:hover,
.bk-pw-toggle:focus {
    color: #0078D8;
}

.bk-pw-toggle i {
    font-size: 1.05rem;
    color: inherit !important;
}

html.light-style .bk-pw-toggle,
body.light-mode .bk-pw-toggle,
body.light-mode .bk-pw-toggle i,
html.light-style .bk-pw-toggle i {
    color: #475569 !important;
}

body.dark-layout:not(.light-mode) .bk-pw-toggle,
body.dark-layout:not(.light-mode) .bk-pw-toggle i {
    color: #d0d2d6 !important;
}

body.bk-image-preview-lock {
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   Form / Show / Edit pages — organized layout + motion
   (visual only — does not change validation behavior)
   ═══════════════════════════════════════════════════════════ */
#multiple-column-form,
.bk-form-page {
    --bk-form-gap: 1rem;
}

#multiple-column-form > .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

#multiple-column-form > .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#multiple-column-form .card,
.bk-form-page > .card,
.content-body > .card.bk-form-shell {
    border: 1px solid var(--bk-border-glass) !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(0, 40, 100, 0.03),
        0 12px 28px rgba(0, 40, 100, 0.05) !important;
}

#multiple-column-form .card-header,
.content-body > .card.bk-form-shell > .card-header {
    position: relative;
    padding: 1.1rem 1.35rem !important;
    border-bottom: 1px solid var(--bk-border-subtle) !important;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--accent-primary) 8%, transparent) 0%,
            transparent 62%) !important;
}

#multiple-column-form .card-header::before,
.content-body > .card.bk-form-shell > .card-header::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #00A3FF 0%, #0078D8 55%, #0055CC 100%);
}

#multiple-column-form .card-header .card-title,
.content-body > .card.bk-form-shell > .card-header .card-title {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    color: var(--text-primary) !important;
}

#multiple-column-form .card-body,
.content-body > .card.bk-form-shell > .card-content > .card-body,
.content-body > .card.bk-form-shell > .card-body {
    padding: 1.35rem 1.35rem 1.5rem !important;
}

#multiple-column-form .form-body > .row {
    row-gap: 0.15rem;
}

#multiple-column-form .form-group,
.content-body > .card.bk-form-shell .form-group {
    margin-bottom: 1.05rem;
}

#multiple-column-form .form-group > label,
#multiple-column-form .form-group label:not(.uploadImg):not(.custom-control-label):not(.container-checkbox),
.content-body > .card.bk-form-shell .form-group > label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.45rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary) !important;
}

#multiple-column-form .form-control,
#multiple-column-form textarea.form-control,
#multiple-column-form select.form-control,
.content-body > .card.bk-form-shell .form-control {
    min-height: 42px;
    padding: 0.55rem 0.85rem !important;
    border-radius: 10px !important;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease,
        background-color 0.2s ease !important;
}

#multiple-column-form textarea.form-control,
.content-body > .card.bk-form-shell textarea.form-control {
    min-height: 110px;
}

#multiple-column-form .form-control:hover:not(:disabled):not([readonly]),
.content-body > .card.bk-form-shell .form-control:hover:not(:disabled):not([readonly]) {
    border-color: color-mix(in srgb, var(--accent-primary) 35%, var(--bk-border-glass)) !important;
}

#multiple-column-form .form-control:focus,
.content-body > .card.bk-form-shell .form-control:focus {
    transform: translateY(-1px);
}

#multiple-column-form .form-control:disabled,
#multiple-column-form .form-control[readonly],
#multiple-column-form .store input:disabled,
#multiple-column-form .store textarea:disabled,
#multiple-column-form .store select:disabled,
.content-body > .card.bk-form-shell .form-control:disabled,
.content-body > .card.bk-form-shell .form-control[readonly] {
    opacity: 1 !important;
    background: color-mix(in srgb, var(--bk-surface-input) 70%, var(--bk-bg-base)) !important;
    border-color: var(--bk-border-subtle) !important;
    color: var(--text-primary) !important;
    cursor: default;
}

#multiple-column-form .select2-container--default .select2-selection--single {
    min-height: 42px !important;
    border-radius: 10px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#multiple-column-form .dropBox,
#multiple-column-form .imagesUploadBlock,
#multiple-column-form .uploadImg {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

#multiple-column-form .uploadImg:hover {
    transform: translateY(-2px);
}

#multiple-column-form .form-actions,
#multiple-column-form .col-12.d-flex,
#multiple-column-form .col-12.text-center,
#multiple-column-form .d-flex.justify-content-center {
    margin-top: 0.35rem;
    gap: 0.65rem;
    flex-wrap: wrap;
}

#multiple-column-form .btn,
#multiple-column-form .submit_button,
#multiple-column-form .submit-button,
.content-body > .card.bk-form-shell .btn {
    min-height: 42px;
    padding-inline: 1.15rem !important;
    border-radius: 10px !important;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

#multiple-column-form .btn:hover,
#multiple-column-form .submit_button:hover,
#multiple-column-form .submit-button:hover,
.content-body > .card.bk-form-shell .btn:hover {
    transform: translateY(-1px);
}

#multiple-column-form .btn-outline-warning,
#multiple-column-form .btn-outline-secondary,
#multiple-column-form a.btn {
    border-radius: 10px !important;
}

/* Staggered field entrance */
#multiple-column-form .bk-form-field,
.content-body > .card.bk-form-shell .bk-form-field {
    opacity: 0;
    transform: translateY(14px);
    animation: bk-form-field-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--bk-form-delay, 0s);
}

@keyframes bk-form-field-in {
    to {
        opacity: 1;
        transform: none;
    }
}

#multiple-column-form .card.bk-form-shell,
.content-body > .card.bk-form-shell {
    animation: bk-form-shell-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bk-form-shell-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

#multiple-column-form .store .btn[disabled],
#multiple-column-form form.store .btn:disabled {
    opacity: 0.7;
}

body.light-mode #multiple-column-form .card,
body.light-mode .content-body > .card.bk-form-shell,
html.light-style #multiple-column-form .card,
html.light-style .content-body > .card.bk-form-shell {
    box-shadow:
        0 1px 2px rgba(0, 40, 100, 0.03),
        0 10px 24px rgba(0, 40, 100, 0.04) !important;
}

body.dark-layout:not(.light-mode) #multiple-column-form .card-header,
body.dark-layout:not(.light-mode) .content-body > .card.bk-form-shell > .card-header {
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--accent-primary) 14%, transparent) 0%,
            transparent 65%) !important;
}

@media (prefers-reduced-motion: reduce) {
    #multiple-column-form .bk-form-field,
    #multiple-column-form .card.bk-form-shell,
    .content-body > .card.bk-form-shell,
    .content-body > .card.bk-form-shell .bk-form-field,
    #multiple-column-form .form-control,
    #multiple-column-form .btn {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

@media (max-width: 767.98px) {
    #multiple-column-form .card-body,
    .content-body > .card.bk-form-shell .card-body {
        padding: 1rem !important;
    }

    #multiple-column-form .card-header,
    .content-body > .card.bk-form-shell > .card-header {
        padding: 0.95rem 1rem !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   Show / detail pages — tile layout (not bare <p> dumps)
   ═══════════════════════════════════════════════════════════ */
.bk-show-page {
    --bk-show-gap: 0.85rem;
}

.bk-show-shell.card {
    border: 1px solid var(--bk-border-glass) !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(0, 40, 100, 0.03),
        0 12px 28px rgba(0, 40, 100, 0.05) !important;
    animation: bk-form-shell-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bk-show-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    padding: 1.1rem 1.35rem !important;
    border-bottom: 1px solid var(--bk-border-subtle) !important;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--accent-primary) 8%, transparent) 0%,
            transparent 62%) !important;
}

.bk-show-header::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #00A3FF 0%, #0078D8 55%, #0055CC 100%);
}

.bk-show-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

.bk-show-subtitle {
    margin-top: 0.35rem !important;
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.bk-show-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bk-show-header__actions .btn {
    min-height: 36px;
    border-radius: 10px !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.bk-show-media {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.35rem 0.25rem;
    background:
        radial-gradient(ellipse at 50% 0%,
            color-mix(in srgb, var(--accent-primary) 12%, transparent) 0%,
            transparent 70%);
}

.bk-show-media img,
.bk-show-media__img {
    max-height: 96px;
    max-width: min(240px, 70vw);
    object-fit: contain;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    background: color-mix(in srgb, var(--bk-surface-card, #fff) 88%, var(--accent-primary));
    border: 1px solid var(--bk-border-subtle);
    box-shadow: 0 8px 20px rgba(0, 40, 100, 0.06);
}

.bk-show-body {
    padding: 1.25rem 1.35rem 1.5rem !important;
}

.bk-show-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--bk-show-gap);
}

.bk-show-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.95rem 1.05rem;
    border-radius: 12px;
    border: 1px solid var(--bk-border-subtle);
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--bk-surface-input, rgba(255,255,255,0.04)) 80%, transparent) 0%,
            transparent 100%);
    opacity: 0;
    transform: translateY(12px);
    animation: bk-form-field-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--bk-form-delay, 0s);
}

.bk-show-field--wide {
    grid-column: 1 / -1;
}

.bk-show-field__label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
}

.bk-show-field__value {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.45;
}

.bk-show-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.bk-show-badge.is-active {
    color: #0b7a45;
    background: color-mix(in srgb, #22c55e 16%, transparent);
    border: 1px solid color-mix(in srgb, #22c55e 28%, transparent);
}

.bk-show-badge.is-inactive {
    color: #9a3412;
    background: color-mix(in srgb, #f97316 14%, transparent);
    border: 1px solid color-mix(in srgb, #f97316 26%, transparent);
}

body.dark-layout:not(.light-mode) .bk-show-badge.is-active {
    color: #86efac;
}

body.dark-layout:not(.light-mode) .bk-show-badge.is-inactive {
    color: #fdba74;
}

.bk-show-footer {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bk-border-subtle);
}

.bk-show-section-title {
    grid-column: 1 / -1;
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Form-based show pages → detail tiles */
#multiple-column-form.bk-show-as-detail form.store .form-group {
    margin-bottom: 0;
    padding: 0.95rem 1.05rem;
    border-radius: 12px;
    border: 1px solid var(--bk-border-subtle);
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--bk-surface-input, rgba(255,255,255,0.04)) 80%, transparent) 0%,
            transparent 100%);
    height: 100%;
}

#multiple-column-form.bk-show-as-detail form.store .form-body > .row {
    row-gap: 0.85rem;
}

#multiple-column-form.bk-show-as-detail form.store .form-group > label {
    margin-bottom: 0.35rem !important;
    font-size: 0.78rem !important;
}

#multiple-column-form.bk-show-as-detail form.store .form-control:disabled,
#multiple-column-form.bk-show-as-detail form.store .form-control[readonly],
#multiple-column-form.bk-show-as-detail form.store input:disabled,
#multiple-column-form.bk-show-as-detail form.store textarea:disabled,
#multiple-column-form.bk-show-as-detail form.store select:disabled {
    min-height: auto !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    font-size: 0.98rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    resize: none;
    pointer-events: none;
}

#multiple-column-form.bk-show-as-detail form.store .select2-container {
    pointer-events: none;
}

#multiple-column-form.bk-show-as-detail form.store .select2-container--default .select2-selection--single {
    min-height: auto !important;
    border: none !important;
    background: transparent !important;
}

#multiple-column-form.bk-show-as-detail form.store .select2-selection__arrow {
    display: none !important;
}

#multiple-column-form.bk-show-as-detail form.store .dropBox,
#multiple-column-form.bk-show-as-detail form.store .imagesUploadBlock {
    pointer-events: none;
}

#multiple-column-form.bk-show-as-detail form.store label.uploadImg > span,
#multiple-column-form.bk-show-as-detail form.store label.uploadImg > input {
    display: none !important;
}

#multiple-column-form.bk-show-as-detail form.store .uploadedBlock {
    display: block !important;
}

#multiple-column-form.bk-show-as-detail form.store .uploadedBlock img {
    max-height: 120px;
    border-radius: 12px;
    border: 1px solid var(--bk-border-subtle);
}

#multiple-column-form.bk-show-as-detail form.store .form-actions,
#multiple-column-form.bk-show-as-detail form.store .submit_button,
#multiple-column-form.bk-show-as-detail form.store button[type="submit"],
#multiple-column-form.bk-show-as-detail form.store .btn-success {
    display: none !important;
}

#multiple-column-form.bk-show-as-detail .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 767.98px) {
    .bk-show-grid {
        grid-template-columns: 1fr;
    }

    .bk-show-header,
    .bk-show-body {
        padding-inline: 1rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bk-show-shell.card,
    .bk-show-field {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================================================
   Professional polish pack — tables, badges, forms, empty, dash, mobile
   ========================================================================== */

/* Status / badge chips */
.badge,
.order-status-badge,
.bk-status-pill,
.table .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 26px;
    padding: 0.28rem 0.7rem !important;
    border-radius: 999px !important;
    font-size: 0.75rem !important;
    font-weight: 650 !important;
    letter-spacing: 0.01em;
    line-height: 1.2;
    border: 1px solid transparent;
    white-space: nowrap;
}

.order-status-badge {
    background: color-mix(in srgb, var(--accent-primary) 14%, transparent);
    color: var(--text-primary) !important;
    border-color: color-mix(in srgb, var(--accent-primary) 22%, transparent);
}

/* Product action — dark + light unified */
.product-action {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.product-action > span,
.product-action > a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary) !important;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
}

.product-action > span a,
.product-action > span i,
.product-action > a i {
    color: inherit !important;
    margin: 0 !important;
    font-size: 0.95rem;
}

.product-action > span:hover,
.product-action > a:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--accent-primary) 18%, transparent);
    border-color: color-mix(in srgb, var(--accent-primary) 30%, transparent);
    color: #fff !important;
}

.product-action > span.text-danger,
.product-action > span.delete-row,
.product-action > span.delete-row:hover {
    color: #ff8d95 !important;
}

.product-action > span.text-danger:hover,
.product-action > span.delete-row:hover {
    background: rgba(234, 84, 85, 0.16);
    border-color: rgba(234, 84, 85, 0.35);
}

body.light-mode .product-action > span,
body.light-mode .product-action > a,
html.light-style .product-action > span,
html.light-style .product-action > a {
    background: #eef2f6;
    border-color: #e2e8f0;
    color: #1e293b !important;
}

/* Empty state */
.bk-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 2.4rem 1.25rem;
    text-align: center;
}

.bk-empty-state-icon {
    display: grid !important;
    place-items: center;
    width: 64px !important;
    height: 64px !important;
    margin: 0 auto 0.35rem !important;
    border-radius: 18px;
    background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-primary) 18%, transparent);
    color: var(--accent-secondary) !important;
    font-size: 1.7rem !important;
    line-height: 1 !important;
    opacity: 1 !important;
}

.bk-empty-state-title {
    margin: 0;
    max-width: 28ch;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary) !important;
    font-family: inherit !important;
}

.bk-empty-state-actions {
    margin-top: 0.55rem;
}

/* Table loader */
.table_loader,
.position-relative > .table_loader {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--bk-surface-card) 72%, transparent);
    backdrop-filter: blur(4px);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.table_loader.is-loading,
.position-relative.is-loading > .table_loader {
    display: flex !important;
}

.table_loader::before {
    content: "";
    width: 18px;
    height: 18px;
    margin-inline-end: 0.55rem;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--accent-primary) 25%, transparent);
    border-top-color: var(--accent-secondary);
    animation: bk-spin 0.7s linear infinite;
}

@keyframes bk-spin {
    to { transform: rotate(360deg); }
}

/* Form validation */
.form-group.error > label,
.form-group.has-error > label {
    color: #ea5455 !important;
}

.form-group.error .form-control,
.form-group.has-error .form-control,
.form-control.is-invalid {
    border-color: rgba(234, 84, 85, 0.7) !important;
    box-shadow: 0 0 0 3px rgba(234, 84, 85, 0.12) !important;
}

.form-group.error .help-block,
.form-group.has-error .help-block,
.invalid-feedback,
.help-block.with-errors ul {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #ea5455 !important;
    list-style: none;
    padding: 0;
}

#multiple-column-form .form-body > .row > [class*="col-"] > hr,
.content-body .card.bk-form-shell hr {
    border: 0;
    border-top: 1px solid var(--bk-border-subtle);
    margin: 0.35rem 0 1.1rem;
    opacity: 1;
}

/* Legacy show cards → closer to show-page look */
.content-body .card:not(.bk-form-shell):not(.kpi-card):not(.chart-card) .card-header {
    border-bottom: 1px solid var(--bk-border-subtle);
}

body.bookdin-body .content-body .nav-tabs {
    gap: 0.35rem;
    border-bottom: 1px solid var(--bk-border-subtle);
    margin-bottom: 1rem;
}

/* Dashboard hierarchy */
.dash-page .dash-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dash-page .dash-section-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 750;
    color: var(--text-primary) !important;
}

.dash-page .dash-subsection-hint,
.dash-page .chart-card-subtitle {
    color: var(--text-muted) !important;
    font-size: 0.82rem;
}

.dash-page .kpi-card,
.dash-page .kpi-card-link {
    border: 1px solid var(--dash-border, var(--bk-border-subtle)) !important;
    border-radius: 16px !important;
    transition: transform 220ms var(--transition-base, ease), box-shadow 220ms ease, border-color 220ms ease;
}

.dash-page .kpi-card:hover,
.dash-page .kpi-card-link:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent-primary) 35%, transparent) !important;
    box-shadow: 0 14px 30px color-mix(in srgb, var(--accent-primary) 14%, transparent);
}

.dash-page .kpi-value {
    font-size: clamp(1.35rem, 2vw, 1.7rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

.dash-page .dash-metric {
    position: relative;
}

.dash-page .dash-metric:first-of-type .kpi-card,
.dash-page .dash-group:first-of-type .kpi-card-link:first-child .kpi-card {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--accent-primary) 10%, transparent), transparent 55%),
        var(--bk-surface-card);
}

/* Sidebar section labels */
.main-menu.bk-sidebar .navigation-header.bk-nav-section,
.main-menu.bk-sidebar li.navigation-header.bk-nav-section {
    display: flex !important;
    align-items: center;
    margin: 0.85rem 0.75rem 0.35rem !important;
    padding: 0.15rem 0.35rem !important;
    pointer-events: none;
}

.main-menu.bk-sidebar .navigation-header.bk-nav-section span {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(170, 198, 230, 0.55) !important;
    line-height: 1.2;
}

body.light-mode .main-menu.bk-sidebar .navigation-header.bk-nav-section span,
html.light-style .main-menu.bk-sidebar .navigation-header.bk-nav-section span {
    color: #6b7f9c !important;
}

/* Softer nav enter motion */
.main-menu.bk-sidebar .navigation-main > .nav-item.bk-nav-enter {
    animation: bk-nav-fade 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--bk-nav-delay, 0s);
}

@keyframes bk-nav-fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.main-menu.bk-sidebar .navigation-main .menu-content {
    transition: opacity 180ms ease;
}

/* Mobile shell */
@media (max-width: 1199.98px) {
    .main-menu.bk-sidebar {
        box-shadow: 16px 0 48px rgba(0, 0, 0, 0.45) !important;
    }

    .header-navbar.floating-nav.bk-navbar {
        margin: 0.45rem 0.65rem 0 !important;
        border-radius: 14px !important;
    }

    .bk-navbar-actions .nav-item:has(.bk-theme-toggle) {
        display: list-item !important;
    }

    .content-wrapper {
        padding: 1rem 0.85rem 1.5rem !important;
    }

    .bk-sidebar-brand-name {
        font-size: 0.85rem;
    }

    .product-action > span,
    .product-action > a {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 767.98px) {
    .dash-page .dash-head {
        padding: 1rem 1.05rem;
    }

    .table thead th,
    .table td {
        padding: 0.65rem 0.7rem !important;
        font-size: 0.84rem;
    }

    .bk-sidebar-footer {
        padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .main-menu.bk-sidebar .navigation-main > .nav-item.bk-nav-enter,
    .dash-page .kpi-card,
    .dash-page .kpi-card-link,
    .product-action > span,
    .table_loader::before {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}
