/**
 * AdminLTE Header & Menu UI/UX Update
 * UI/UX Pro Max: Minimalism & Swiss Style + Healthcare Color Palette
 *
 * Summary of AdminLTE UI Structure:
 * - Header (.main-header): Fixed top header with logo and navbar
 * - Logo (.logo): Left side logo area (255px width)
 * - Navbar (.navbar): Right side navigation with toggle button, page title, and user menu
 * - Sidebar (.main-sidebar): Left side navigation menu (255px width)
 * - Sidebar Menu (.sidebar-menu): Tree structure menu with icons and labels
 * - Menu Items: Single items and treeview items with submenus
 *
 * Design Principles Applied:
 * - Minimalism & Swiss Style: Clean, spacious, functional, high contrast
 * - Healthcare Color Palette: Calm blue primary, soft backgrounds
 * - Smooth Transitions: 200-250ms hover effects
 * - Proper Z-Index: z-50 for nav, z-40 for dropdowns
 * - Typography: Inter font family (consistent with app)
 */

/**
 * AdminLTE Header & Menu UI/UX Update
 * Uses shared variables from colors.css and spacing.css
 *
 * Note:
 * - Colors are imported from colors.css
 * - Spacing, radius, and transitions are imported from spacing.css
 * - Sidebar-specific colors are mapped to ocean blue theme
 */

/* ========== HEADER STYLING ========== */
.main-header {
    background: linear-gradient(135deg, #13162a 0%, #1a1d30 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    transition: var(--transition-base);
}

/* Logo Area */
.main-header .logo {
    width: 255px;
    height: 60px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition-base);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.main-header .logo:hover {
    background: rgba(79, 135, 255, 0.12);
}

.main-header .logo .logo-lg,
.main-header .logo .logo-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Prevent duplicate logo rendering in expanded state */
.main-header .logo .logo-mini {
    display: none;
}

.main-header .logo .logo-lg {
    display: inline-flex;
}

.main-header .logo .topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

/* Alan logo image — replaces emoji + text wordmark in header */
.main-header .logo .topbar-logo-img {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(79, 135, 255, 0.25));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.main-header .logo:hover .topbar-logo-img {
    transform: scale(1.04);
    filter: drop-shadow(0 6px 16px rgba(79, 135, 255, 0.4));
}

.main-header .logo .logo-mini {
    width: 100%;
}

.main-header .logo .topbar-logo-img--mini {
    height: 32px;
    max-width: 40px;
}

/* Navbar */
.main-header .navbar {
    margin-left: 255px;
    height: 60px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
    transition: var(--transition-base);
}

/* Override AdminLTE skin-blue navbar color with purple theme */
.skin-blue .main-header .navbar,
.skin-blue .main-header .navbar .sidebar-toggle:hover,
.skin-blue .main-header .navbar .nav > li > a:hover,
.skin-blue .main-header .navbar .nav > li > a:active,
.skin-blue .main-header .navbar .nav > li > a:focus,
.skin-blue .main-header .navbar .nav .open > a,
.skin-blue .main-header .navbar .nav .open > a:hover,
.skin-blue .main-header .navbar .nav .open > a:focus {
    background-color: transparent;
}

.skin-blue .main-header .navbar {
    background-image: none;
}

/* Keep logo area in same main-header tone under AdminLTE skin */
.skin-blue .main-header .logo,
.skin-blue .main-header .logo:hover,
.skin-blue .main-header .logo:active,
.skin-blue .main-header .logo:focus {
    background: transparent;
    color: #FFFFFF;
}

/* Sidebar Toggle Button — small circular badge straddling the border between
   .logo (255px) and .navbar, half over each side. Colors are theme-adaptive
   (see brand.css) same as before the circle redesign — only shape/icon/
   position changed, not the color scheme.
   AdminLTE.min.css puts its own default hamburger glyph on this element via
   `.sidebar-toggle:before { content: "\f0c9" }` (fa-bars) — independent of
   whatever icons we put inside. There's also a more specific
   `.main-header .sidebar-toggle::before` rule in the same vendor file, so a
   plain override loses the specificity fight in some cases; !important
   guarantees it's actually gone (same pattern already used elsewhere in this
   file/brand.css to override AdminLTE). */
.sidebar-toggle:before {
    content: none !important;
}

/* !important throughout: AdminLTE.min.css's `.main-header .sidebar-toggle`
   (2 classes, incl. `padding: 15px`) and the skin-blue `:hover` variants
   (4 classes) both outrank a plain `.sidebar-toggle`/`.sidebar-toggle:hover`
   on specificity alone — without !important AdminLTE's padding wins and the
   button renders at ~32px instead of the intended 20px. */
.sidebar-toggle {
    position: fixed;
    top: 30px;
    left: 255px;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 0 !important;
    cursor: pointer;
    transition: var(--transition-base), left 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px !important;
    height: 20px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

body.sidebar-collapse .sidebar-toggle {
    left: 50px;
}

@media (max-width: 767px) {
    .sidebar-toggle {
        left: auto;
        right: var(--spacing-md);
        transform: translateY(-50%);
        /* Nút vốn là hình tròn 20px — dưới xa mức tối thiểu cho ngón tay
           (WCAG 2.5.8 / Apple HIG khuyến nghị 44px), nên trên điện thoại rất
           hay bấm trượt. Phóng vòng tròn nhìn thấy lên 28px cho dễ thấy, còn
           KHOẢNG BẤM thì nới bằng ::after trong suốt 44x44 ở dưới — cách này
           không đụng tới bố cục header (pseudo-element không chiếm chỗ). */
        width: 28px !important;
        height: 28px !important;
    }

    .sidebar-toggle::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 44px;
        height: 44px;
        transform: translate(-50%, -50%);
        border-radius: 50%;
    }

    .sidebar-toggle-icon {
        font-size: 11px;
    }

    body.sidebar-collapse .sidebar-toggle {
        left: auto;
        right: var(--spacing-md);
    }
}

.sidebar-toggle:hover {
    background: rgba(79, 135, 255, 0.22) !important;
    border-color: #4f87ff;
}

.sidebar-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-10);
}

.sidebar-toggle-icon {
    display: none;
    font-size: 9px;
    color: #FFFFFF;
    transition: var(--transition-base);
}

.sidebar-toggle-icon--collapse {
    display: block;
}

body.sidebar-collapse .sidebar-toggle-icon--collapse {
    display: none;
}

body.sidebar-collapse .sidebar-toggle-icon--expand {
    display: block;
}

.sidebar-toggle:hover .sidebar-toggle-icon {
    transform: scale(1.15);
}

/* Page Title in Header */
.navbar-custom-menu-div {
    display: flex;
    align-items: center;
    flex: 1;
    gap: var(--spacing-md);
}

.navbar-custom-menu-div h3 {
    margin: 0;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-sans);
    letter-spacing: -0.01em;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User Menu */
.navbar-custom-menu {
    z-index: 1001;
}

.navbar-custom-menu .nav > li > a {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.navbar-custom-menu .nav > li > a:hover {
    background: rgba(79, 135, 255, 0.22);
}

.custom-header-profile {
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 14px;
}

.custom-header-profile .user-image {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-base);
}

.custom-header-profile:hover .user-image {
    border-color: #4f87ff;
    transform: scale(1.05);
}

/* User Dropdown Menu - Modern UI */
.navbar-custom-menu .dropdown-menu {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    background: #13162a;
    padding: 0;
    margin-top: var(--spacing-sm);
    min-width: 280px;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease-out;
    z-index: 1002;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-custom-menu .dropdown-menu .user-header {
    background: var(--color-primary);
    padding: var(--spacing-xl) var(--spacing-lg);
    text-align: center;
    color: var(--color-text-white);
    position: relative;
    overflow: hidden;
}

.navbar-custom-menu .dropdown-menu .user-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.navbar-custom-menu .dropdown-menu .user-header .img-circle {
    width: 72px;
    height: 72px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-full);
    margin: 0 auto var(--spacing-md);
    display: block;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.navbar-custom-menu .dropdown-menu:hover .user-header .img-circle {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-lg);
}

.navbar-custom-menu .dropdown-menu .user-header p {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.navbar-custom-menu .dropdown-menu .user-header p .user-name {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 16px;
    font-weight: 600;
}

.navbar-custom-menu .dropdown-menu .user-header p .user-position {
    display: block;
    font-size: 13px;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
}

.navbar-custom-menu .dropdown-menu .user-header p small {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 12px;
    opacity: 0.85;
    font-weight: 400;
}

.navbar-custom-menu .dropdown-menu .user-footer {
    padding: var(--spacing-md);
    background: #13162a;
    display: flex;
    gap: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-custom-menu .dropdown-menu .user-footer .btn {
    flex: 1;
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition-base);
    border: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    position: relative;
    overflow: hidden;
    min-height: 40px;
    box-shadow: var(--shadow-sm);
}

.navbar-custom-menu .dropdown-menu .user-footer .btn i {
    font-size: 14px;
    transition: var(--transition-base);
    margin-right: 0 !important; /* Override AdminLTE default margin */
}

/* Override AdminLTE/Bootstrap default icon margins in dropdown */
.dropdown-menu > li > a > .glyphicon,
.dropdown-menu > li > a > .fa,
.dropdown-menu > li > a > .ion,
.navbar-custom-menu .dropdown-menu > li > a > .glyphicon,
.navbar-custom-menu .dropdown-menu > li > a > .fa,
.navbar-custom-menu .dropdown-menu > li > a > .ion,
.navbar-custom-menu .dropdown-menu .user-footer .btn .fa,
.navbar-custom-menu .dropdown-menu .user-footer .btn .glyphicon,
.navbar-custom-menu .dropdown-menu .user-footer .btn .ion {
    margin-right: 0 !important;
}

.navbar-custom-menu .dropdown-menu .user-footer .btn span {
    font-weight: 500;
    transition: var(--transition-base);
}

/* Profile button specific styling */
.navbar-custom-menu .dropdown-menu .user-footer .btn[href*="profile"] {
    background: var(--color-bg-primary);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.navbar-custom-menu .dropdown-menu .user-footer .btn[href*="profile"]:hover {
    background: var(--color-primary);
    color: var(--color-text-white);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.navbar-custom-menu .dropdown-menu .user-footer .btn[href*="profile"]:hover i {
    transform: scale(1.1);
}

.navbar-custom-menu .dropdown-menu .user-footer .btn[href*="profile"]:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Logout button specific styling */
.navbar-custom-menu .dropdown-menu .user-footer .btn[href*="logout"] {
    background: var(--color-bg-primary);
    color: var(--color-danger);
    border-color: var(--color-danger);
}

.navbar-custom-menu .dropdown-menu .user-footer .btn[href*="logout"]:hover {
    background: var(--color-danger);
    color: var(--color-text-white);
    border-color: var(--color-danger);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.navbar-custom-menu .dropdown-menu .user-footer .btn[href*="logout"]:hover i {
    transform: scale(1.1);
}

.navbar-custom-menu .dropdown-menu .user-footer .btn[href*="logout"]:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Focus states */
.navbar-custom-menu .dropdown-menu .user-footer .btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.navbar-custom-menu .dropdown-menu .user-footer .btn[href*="logout"]:focus {
    outline-color: var(--color-danger);
}

/* ============================================================
   SIDEBAR — Modern, smooth (NITA design)
   ============================================================ */

/* ─── Pane ─── */
.main-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 255px;
    z-index: 90;
    background: #0d0f18;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 !important;
    transition: var(--transition);
}

.main-sidebar::-webkit-scrollbar { width: 6px; }
.main-sidebar::-webkit-scrollbar-track { background: transparent; }
.main-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.10); border-radius: 3px; }
.main-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(79, 135, 255, 0.35); }

.main-sidebar > .sidebar {
    padding: 0 !important;
    height: 100%;
}

/* ─── Root ul ─── */
.sidebar-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 8px 0 !important;
}

.sidebar-menu li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ─── Section header ─── */
.sidebar-menu > li.header {
    padding: 18px 22px 6px;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.55);
    user-select: none;
}

.sidebar-menu > li.header:first-child {
    margin-top: 0;
}

/* ─── Item base (all levels share) ─── */
.sidebar-menu li > a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    margin: 2px 8px;
    min-height: 42px;
    color: rgba(226, 232, 240, 0.78);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none !important;
    border: 0 !important;
    border-radius: 7px;
    background: transparent !important;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.sidebar-menu li > a:hover,
.sidebar-menu li > a:focus {
    background: rgba(79, 135, 255, 0.08) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.sidebar-menu li.active > a,
.sidebar-menu li.active > a:hover {
    background: rgba(79, 135, 255, 0.16) !important;
    color: #ffffff !important;
}

/* Icon (fixed slot) */
.sidebar-menu li > a > i {
    flex-shrink: 0;
    width: 18px;
    min-width: 18px;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    color: rgba(148, 163, 184, 0.85);
    transition: color 0.18s ease;
}

.sidebar-menu li > a:hover > i,
.sidebar-menu li.active > a > i {
    color: #4f87ff;
}

/* Label */
.sidebar-menu li > a > span {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
    word-wrap: break-word;
}

/* Chevron */
.sidebar-menu .treeview > a > .pull-right-container {
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-menu .treeview > a > .pull-right-container > i {
    font-size: 14px;
    color: rgba(148, 163, 184, 0.55);
    transition: transform 0.25s ease, color 0.18s ease;
}

.sidebar-menu .treeview.menu-open > a > .pull-right-container > i {
    transform: rotate(-90deg);
    color: #4f87ff;
}

/* ─── Submenu ─── */
.sidebar-menu .treeview-menu {
    list-style: none !important;
    margin: 2px 0 4px 28px !important;
    padding: 2px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-menu .treeview.menu-open > .treeview-menu {
    max-height: 5000px;
    overflow: visible;
}

/* Submenu items inherit root padding/font — only color differs to show hierarchy */
.sidebar-menu .treeview-menu > li > a {
    color: rgba(203, 213, 225, 0.78);
}

/* Nested level 2 — small indent accumulates only */
.sidebar-menu .treeview-menu .treeview-menu {
    margin-left: 14px !important;
}

.sidebar-menu .treeview-menu .treeview-menu > li > a {
    color: rgba(148, 163, 184, 0.85);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    .main-header .logo {
        width: 100%;
    }

    .main-header .navbar {
        margin-left: 0;
        width: 100%;
    }

    .main-sidebar {
        transform: translateX(-100%);
    }

    .sidebar-open .main-sidebar {
        transform: translateX(0);
    }

    .navbar-custom-menu-div h3 {
        font-size: 16px;
    }
}

/* Sidebar Collapse State */
@media (min-width: 768px) {
    .sidebar-collapse .main-sidebar {
        transform: translateX(-100%);
    }

    .sidebar-collapse .main-header .navbar {
        margin-left: 0;
    }

    .sidebar-collapse .main-header .logo {
        width: 50px;
    }

    .sidebar-mini.sidebar-collapse .main-header .logo .logo-mini {
        display: inline-flex !important;
    }

    .sidebar-mini.sidebar-collapse .main-header .logo .logo-lg {
        display: none !important;
    }

    .sidebar-mini.sidebar-collapse .main-sidebar {
        width: 50px;
    }

    .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > span {
        display: none;
    }

    .sidebar-mini.sidebar-collapse .sidebar-menu > li > a {
        justify-content: center;
        padding: 12px;
    }

    .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > i {
        margin-right: 0;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .main-header,
    .main-sidebar,
    .sidebar-menu > li > a,
    .sidebar-toggle {
        transition: none;
    }
}

/* Focus States */
.sidebar-toggle:focus-visible,
.sidebar-menu > li > a:focus-visible,
.navbar-custom-menu .nav > li > a:focus-visible,
.navbar-custom-menu .dropdown-menu .user-footer .btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Accessibility - Reduced Motion for Dropdown */
@media (prefers-reduced-motion: reduce) {
    .navbar-custom-menu .dropdown-menu {
        animation: none;
    }

    .navbar-custom-menu .dropdown-menu .user-header .img-circle,
    .navbar-custom-menu .dropdown-menu .user-footer .btn {
        transition: none;
    }

    .navbar-custom-menu .dropdown-menu .user-footer .btn:hover {
        transform: none;
    }
}

/* ========== CONTENT WRAPPER ADJUSTMENT ========== */
.content-wrapper {
    margin-left: 255px;
    margin-top: 60px;
    transition: margin-left var(--transition);
}

/* Override AdminLTE default padding for fixed layout */
.fixed .content-wrapper,
.fixed .right-side {
    padding-top: 0 !important;
}

/* ========== FIXED LAYOUT SCROLL - FOLLOWING AdminLTE PATTERN ========== */
/*
 * AdminLTE fixed layout pattern:
 * - .fixed .wrapper has overflow: hidden (AdminLTE default)
 * - .fixed .content-wrapper should be scrollable container
 * - Content inside .content-wrapper can grow naturally
 */

/* Content wrapper is the scrollable container in fixed layout */
/* This follows AdminLTE's design: wrapper is fixed, content-wrapper scrolls */
.fixed .content-wrapper {
    height: calc(100vh - 60px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    /* Remove padding-top from AdminLTE default (we use margin-top instead) */
    padding-top: 0 !important;
}

/* Content inside wrapper should grow naturally */
.fixed .content {
    min-height: auto !important;
    height: auto !important;
    /* Allow content to grow beyond viewport */
    overflow: visible !important;
}

/* Ensure React components don't prevent scrolling */
/* Apply to all React pages - common pattern: *-page class */
.fixed .content .doctor-assignments-page,
.fixed .content .cskh-tasks-page,
.fixed .content .users-page,
.fixed .content .user-form-page,
.fixed .content .profile-page,
.fixed .content .roles-page,
.fixed .content .role-form-page,
.fixed .content [class*="-page"],
.fixed .content [data-react-component] {
    min-height: auto !important;
    height: auto !important;
    /* Ensure React pages don't set fixed height that prevents scroll */
    max-height: none !important;
}

/* The height:auto override above also collapses [data-react-component]'s own
   min-height:60vh (master.blade.php) while it's still empty — before any React
   content (even the Suspense fallback, which is a child and unaffected) has
   mounted — so the CSS-only loading spinner loses its centering box and renders
   right under the header instead. Restore it only for the empty state; :empty
   stops matching the instant real content mounts, so this can't reintroduce a
   fixed height on loaded pages. */
.fixed .content [data-react-component]:empty {
    min-height: 60vh !important;
}

/* Note: We DON'T override .fixed .wrapper overflow: hidden */
/* This is AdminLTE's design - wrapper is fixed, content-wrapper scrolls */
/* Following AdminLTE pattern ensures compatibility with all AdminLTE features */

@media (max-width: 767px) {
    .content-wrapper {
        margin-left: 0;
    }

    /* Override AdminLTE default padding for mobile fixed layout */
    .fixed .content-wrapper,
    .fixed .right-side {
        padding-top: 0 !important;
    }
}

.sidebar-collapse .content-wrapper {
    margin-left: 0;
}

/* ========== FINAL PURPLE LOCK (override AdminLTE skin-blue) ========== */
.skin-blue .main-header,
.skin-blue .main-header .navbar,
.skin-blue .main-header .logo {
    background: linear-gradient(135deg, #13162a 0%, #1a1d30 100%) !important;
}

.skin-blue .main-header .logo {
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.skin-blue .main-header .logo:hover,
.skin-blue .main-header .navbar .sidebar-toggle:hover,
.skin-blue .main-header .navbar .nav > li > a:hover,
.skin-blue .main-header .navbar .nav > li > a:active,
.skin-blue .main-header .navbar .nav > li > a:focus,
.skin-blue .main-header .navbar .nav .open > a,
.skin-blue .main-header .navbar .nav .open > a:hover,
.skin-blue .main-header .navbar .nav .open > a:focus,
.skin-blue .main-header .navbar .nav > .active > a {
    background: rgba(79, 135, 255, 0.22) !important;
    color: #FFFFFF !important;
}

.skin-blue .wrapper,
.skin-blue .main-sidebar,
.skin-blue .left-side {
    background-color: #0d0f18 !important;
}

.skin-blue .sidebar-menu > li.header {
    background: #13162a !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

.skin-blue .sidebar-menu > li:hover > a,
.skin-blue .sidebar-menu > li.active > a,
.skin-blue .sidebar-menu > li.menu-open > a {
    background: #1a1d30 !important;
    color: #FFFFFF !important;
    border-left: none !important;
}

/* Final override: remove any remaining left indicator on hover/active */
.skin-blue .main-sidebar .sidebar-menu > li > a:hover,
.skin-blue .main-sidebar .sidebar-menu > li.active > a,
.skin-blue .main-sidebar .sidebar-menu > li.menu-open > a,
.skin-blue .main-sidebar .sidebar-menu .treeview-menu > li > a:hover,
.skin-blue .main-sidebar .sidebar-menu .treeview-menu > li.active > a {
    border-left: 0 !important;
    border-left-width: 0 !important;
    border-left-style: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

