.main-content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 30px; display: flex; flex-direction: column; gap: 0; position: relative; }

.header-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; margin: -30px -30px 15px -30px; position: sticky; top: -30px; z-index: 100; background: rgba(8, 10, 15, 0.95); padding: 30px 30px 15px 30px; backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,0.05); }
.header-bar h2 { margin: 0; font-size: 1.7rem; font-weight: 700; color: #fff; letter-spacing: -0.5px; }
.user-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

.tab-section { display: none; animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.tab-section.active { display: block; padding-top: 0px; }
.tab-section.dashboard-view--compact.active { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-top: 0px; gap: 16px; }
.dashboard-analytics-view.active { overflow: hidden; padding-bottom: 0; }
.dashboard-analytics-view.active > .analytics-locked-gate { margin-top: 0; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.glow-sidebar { width: 260px; background: rgba(255,255,255,.01); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; z-index: 50; padding: 24px 0; contain: layout style paint; }
.brand-logo { padding: 0 24px 30px; font-weight: 800; font-size: 1.3rem; color: var(--glow); letter-spacing: 0.5px; }
.nav-item { padding: 14px 24px; color: var(--text-muted); cursor: pointer; transition: background 0.2s, color 0.2s; font-weight: 500; font-size: 0.95rem; display: flex; align-items: center; gap: 12px; border-left: 3px solid transparent; text-decoration: none; }
#sidebar button.nav-item { width: 100%; border: none; background: transparent; font: inherit; text-align: left; appearance: none; -webkit-appearance: none; outline: none; color: inherit; }
.nav-item svg { width: 20px; height: 20px; stroke-width: 2; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.02); }
.nav-item.active, #sidebar button.nav-item.active { color: var(--glow); background: rgba(var(--glow-rgb), 0.05); border-left-color: var(--glow); font-weight: 600; }

.mobile-menu-fab {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 160;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(12, 16, 24, 0.92);
    color: var(--glow);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.mobile-menu-fab svg { stroke: currentColor; }

.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px 20px; margin-bottom: 6px; flex-shrink: 0; }
.sidebar-head .brand-logo { flex: 1; min-width: 0; padding: 0 8px 0 0; margin: 0; font-weight: 800; font-size: 1.12rem; color: var(--glow); letter-spacing: 0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-menu-close { display: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04); color: var(--text-muted); align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: color 0.2s, background 0.2s; }
.mobile-menu-close:hover { color: var(--glow); background: rgba(255, 255, 255, 0.08); }

.sidebar-scrim { display: none; position: fixed; inset: 0; background: rgba(4, 6, 8, 0.55); z-index: 140; backdrop-filter: blur(4px); }
body.app-layout.sidebar-drawer-open .sidebar-scrim { display: block; }

@media (max-width: 768px) {
    body.app-layout { flex-direction: row; }
    .mobile-menu-fab { display: inline-flex; }
    body.app-layout.sidebar-drawer-open .mobile-menu-fab { display: none; }
    .sidebar-head { display: flex; }
    .mobile-menu-close { display: inline-flex; }
    .main-content { padding: 30px 15px 28px 15px; }
    .glow-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 88vw);
        height: 100vh;
        padding: 18px 0 24px;
        border-right: 1px solid var(--border);
        border-top: none;
        flex-direction: column;
        justify-content: flex-start;
        background: rgba(8, 12, 16, 0.98);
        z-index: 150;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
    }
    body.app-layout.sidebar-drawer-open .glow-sidebar { transform: translateX(0); }
    .header-bar { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: -30px -15px 15px -15px; padding: 22px 15px 15px 68px; top: -30px; min-height: 72px; }
    .today-indicator { flex: 1 1 100% !important; order: 3; margin-top: 4px; text-align: center; }
    
    .search-wrapper { flex-wrap: nowrap !important; gap: 8px !important; align-items: flex-end !important; }
    .search-by-container { flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; flex-shrink: 0 !important; flex: 0 0 auto; }
    .search-by-label { display: block; text-transform: capitalize !important; font-size: 0.75rem !important; margin-left: 2px; }
    .search-select-wrap { width: 110px !important; max-width: 110px !important; }
    .search-select-wrap .ri-dropdown-trigger { font-size: 0.8rem !important; padding: 8px 10px !important; min-height: 40px !important; }
    .search-select-wrap .ri-dropdown-label { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
    .search-input-container { flex-wrap: nowrap !important; align-items: flex-end !important; gap: 8px !important; }
    
    .filter-label-text { display: none !important; }
    .filter-icon-mobile { display: block !important; }
    .filter-select-wrap { width: 44px !important; height: 44px; display: flex !important; justify-content: center; align-items: center; }
    .filter-select-wrap .ri-dropdown-trigger { padding: 0 !important; width: 44px; height: 44px; justify-content: center; }
    .filter-select-wrap .dropdown-chevron { display: none !important; }
    .filter-select-wrap .ri-dropdown-menu { width: 140px !important; min-width: 140px !important; right: 0 !important; left: auto !important; }
    #filterActiveDot { right: 8px !important; top: 8px !important; }
}

.admin-layout { display: flex; min-height: 100vh; width: 100vw; }
.admin-sidebar { width: 220px; background: rgba(255,255,255,.01); border-right: 1px solid var(--border); padding: 20px 0; display: flex; flex-direction: column; flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 300; }
.admin-content { flex: 1; overflow-y: auto; padding: 24px; margin-left: 220px; }
.admin-content h2:first-child { color: #fff; margin: 0 0 20px; font-size: 1.3rem; font-weight: 700; }
@media (max-width: 768px) { .admin-sidebar { display: none; } .admin-content { margin-left: 0; } }
