/**
 * 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: var(--color-bg-primary);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    z-index: 50;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    transition: var(--transition-base);
}

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

.main-header .logo:hover {
    background: var(--color-gray-700);
}

.main-header .logo img.logo-lg {
    max-height: 40px;
    max-width: 200px;
    object-fit: contain;
    padding: var(--spacing-xs);
    transition: var(--transition-transform);
}

.main-header .logo:hover img.logo-lg {
    transform: scale(1.02);
}

.main-header .logo .logo-mini {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-white-90);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

/* 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);
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    margin-right: var(--spacing-md);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.sidebar-toggle:hover {
    background: var(--color-bg-tertiary);
    border-color: var(--color-primary);
}

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

.sidebar-toggle .icon-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 1px;
    margin: 3px 0;
    transition: var(--transition-base);
}

.sidebar-toggle:hover .icon-bar {
    background: var(--color-primary);
    transform: scaleX(1.1);
}

/* 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: var(--color-text-inverse);
    font-size: 18px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.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(255, 255, 255, 0.15);
}

.custom-header-profile {
    color: var(--color-text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
}

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

.custom-header-profile:hover .user-image {
    border-color: var(--color-primary);
    transform: scale(1.05);
}

/* User Dropdown Menu - Modern UI */
.navbar-custom-menu .dropdown-menu {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    background: var(--color-bg-primary);
    padding: 0;
    margin-top: var(--spacing-sm);
    min-width: 280px;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease-out;
}

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

.navbar-custom-menu .dropdown-menu .user-header {
    background: var(--gradient-ocean);
    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: 'Inter', sans-serif;
    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: var(--color-bg-primary);
    display: flex;
    gap: var(--spacing-sm);
    border-top: 1px solid var(--color-border-light);
}

.navbar-custom-menu .dropdown-menu .user-footer .btn {
    flex: 1;
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: 'Inter', sans-serif;
    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 STYLING ========== */
.main-sidebar {
    width: 255px;
    background: var(--color-gray-800);
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    z-index: 40;
    transition: var(--transition);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    border-right: 1px solid var(--color-border-glass-light);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 !important; /* Override AdminLTE default padding for desktop */
}

/* Sidebar Scrollbar */
.main-sidebar::-webkit-scrollbar {
    width: 6px;
}

.main-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.main-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.main-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Section */
.main-sidebar .sidebar {
    padding: 0 !important; /* Override AdminLTE default padding-bottom: 10px */
    height: 100%;
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: var(--spacing-sm) 0;
}

.sidebar-menu > li {
    margin: 0;
    padding: 0;
}

/* Menu Header (Section Title) */
.sidebar-menu li.header {
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-xs);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--color-text-white-60);
    font-family: 'Inter', sans-serif;
    margin-top: var(--spacing-sm);
    position: relative;
}

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

.sidebar-menu li.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--spacing-lg);
    right: var(--spacing-lg);
    height: 1px;
    background: var(--color-border-glass-light);
}

/* Menu Items */
.sidebar-menu > li > a {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--color-text-white-90);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-base);
    border-left: 3px solid transparent;
    cursor: pointer;
    position: relative;
    margin: 2px var(--spacing-xs);
    border-radius: var(--radius-xs);
}

.sidebar-menu > li > a:hover {
    background: var(--color-gray-700);
    color: var(--color-text-white);
    border-left-color: var(--color-primary);
    /* Keep consistent padding on hover - no left padding shift */
}

.sidebar-menu > li.active > a,
.sidebar-menu > li.active > a:hover {
    background: var(--color-primary);
    color: var(--color-text-white);
    border-left-color: var(--color-primary);
    font-weight: 600;
}

/* Menu Icons */
.sidebar-menu > li > a > i {
    width: 20px;
    min-width: 20px; /* Prevent icon from shrinking */
    margin-right: var(--spacing-sm);
    font-size: 16px;
    text-align: center;
    transition: var(--transition-base);
    color: var(--color-text-white-60);
    flex-shrink: 0; /* Keep icon size consistent */
}

/* Treeview Icons - Slightly smaller for hierarchy */
.sidebar-menu .treeview-menu > li > a > i {
    width: 18px;
    min-width: 18px;
    font-size: 14px;
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
}

.sidebar-menu > li > a:hover > i {
    color: var(--color-text-white);
}

.sidebar-menu > li.active > a > i {
    color: var(--color-text-white);
}

/* Menu Labels */
.sidebar-menu > li > a > span {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

/* Treeview Menu (Submenu) */
.sidebar-menu .treeview {
    position: relative;
}

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

.sidebar-menu .treeview > a .pull-right-container > i {
    transition: var(--transition-transform);
    font-size: 14px;
}

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

.sidebar-menu .treeview-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: var(--spacing-xs) 0 !important;
    background: rgba(0, 0, 0, 0.15) !important; /* Slightly lighter for better hierarchy */
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
    border-left: 2px solid var(--color-border-glass-light) !important;
    margin-left: var(--spacing-md) !important; /* Subtle indentation for visual hierarchy */
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
}

.sidebar-menu .treeview.menu-open > .treeview-menu {
    max-height: 5000px; /* Increased for deep nested trees */
    overflow: visible; /* Allow content to be visible */
}

/* Nested treeview (treeview within treeview) */
.sidebar-menu .treeview-menu .treeview {
    position: relative;
}

.sidebar-menu .treeview-menu .treeview > a {
    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-md) !important; /* Consistent with treeview items */
}

.sidebar-menu .treeview-menu .treeview-menu {
    margin-left: var(--spacing-md) !important; /* Consistent indentation for nested levels */
    background: rgba(0, 0, 0, 0.1) !important; /* Lighter background for deeper nesting */
}

.sidebar-menu .treeview-menu > li > a {
    padding: var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-md) !important; /* Consistent padding with root, slight left indent */
    color: var(--color-text-white-60) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    border-left: 3px solid transparent !important;
    transition: var(--transition-base) !important;
    margin: 2px var(--spacing-xs) !important;
    border-radius: var(--radius-xs) !important;
    background: transparent !important;
    display: flex;
    align-items: center; /* Center align for better visual balance */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.5;
    min-height: 36px; /* Slightly smaller than root for hierarchy */
}

/* Text/label in treeview items */
.sidebar-menu .treeview-menu > li > a > span,
.sidebar-menu .treeview-menu > li > a > i + span {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.5;
    padding-right: var(--spacing-xs);
    min-width: 0; /* Allow text to shrink and wrap properly */
}

.sidebar-menu .treeview-menu > li > a:hover {
    background: var(--color-gray-700) !important;
    color: var(--color-text-white) !important;
    border-left-color: var(--color-primary) !important;
    white-space: normal; /* Allow text to wrap on hover */
}

.sidebar-menu .treeview-menu > li.active > a,
.sidebar-menu .treeview-menu > li.active > a:hover {
    background: var(--color-primary) !important;
    color: var(--color-text-white) !important;
    border-left-color: var(--color-primary) !important;
    font-weight: 500 !important;
}

/* Override AdminLTE default treeview styles with higher specificity */
.main-sidebar .sidebar .sidebar-menu .treeview-menu > li > a,
.main-sidebar .sidebar-menu .treeview-menu > li > a,
.sidebar-menu .treeview-menu li > a {
    background: transparent !important;
    color: var(--color-text-white-60) !important;
    border-left: 3px solid transparent !important;
    white-space: normal !important; /* Allow text wrapping */
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.5 !important;
    padding-left: 0 !important; /* Remove all left padding */
}

.main-sidebar .sidebar .sidebar-menu .treeview-menu > li > a:hover,
.main-sidebar .sidebar-menu .treeview-menu > li > a:hover,
.sidebar-menu .treeview-menu li > a:hover {
    background: var(--color-gray-700) !important;
    color: var(--color-text-white) !important;
    border-left-color: var(--color-primary) !important;
    white-space: normal !important; /* Allow text wrapping on hover */
}

.main-sidebar .sidebar .sidebar-menu .treeview-menu > li.active > a,
.main-sidebar .sidebar-menu .treeview-menu > li.active > a,
.sidebar-menu .treeview-menu li.active > a {
    background: var(--color-primary) !important;
    color: var(--color-text-white) !important;
    border-left-color: var(--color-primary) !important;
    white-space: normal !important; /* Allow text wrapping for active items */
}

/* Nested treeview menu items - consistent indentation for visual hierarchy */
.sidebar-menu .treeview-menu .treeview-menu > li > a {
    padding-left: var(--spacing-md) !important; /* Level 2: consistent indent */
}

.sidebar-menu .treeview-menu .treeview-menu .treeview-menu > li > a {
    padding-left: var(--spacing-lg) !important; /* Level 3: deeper indent */
}

.sidebar-menu .treeview-menu .treeview-menu .treeview-menu .treeview-menu > li > a {
    padding-left: var(--spacing-xl) !important; /* Level 4: deepest indent */
}

/* Ensure nested treeview menus are visible when open */
.sidebar-menu .treeview-menu .treeview.menu-open > .treeview-menu {
    max-height: 5000px !important;
    overflow: visible !important;
}

/* ========== 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-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;
}

/* 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;
}

