:root {
    /* SIDEBAR DIMENSIONS */
    --sidebar-expanded-width: 256px; 
    --sidebar-collapsed-width: 64px;  

    /* FONT & TEXT COLORS - HIGH CONTRAST */
    --sidebar-font-family: 'Mulish', sans-serif;
    
    /* Contrast Text Colors */
    --color-text-primary: #0f172a;   /* slate-900 - Headers & User name */
    --color-text-body: #334155;      /* slate-700 - Default link labels */
    --color-text-muted: #64748b;     /* slate-500 - Section labels & arrows */
    --color-text-subtle: #475569;    /* slate-600 - Submenu link labels */

    /* Hover & Active States */
    --color-text-hover: #020617;     /* slate-950 - Hover text */
    --color-text-active: #4338ca;    /* indigo-700 - Active page route selection */

    /* Action & Status Text Colors */
    --color-text-badge: #4f46e5;     /* indigo-600 - Profile/Role badges */
    --color-text-danger: #be123c;    /* rose-700 - Logout button text */
}

/* GLOBAL SIDEBAR FONT APPLICATION */
#sidebar {
    width: var(--sidebar-expanded-width);
    font-family: var(--sidebar-font-family);
    color: var(--color-text-body);
    will-change: width, transform;
}

#sidebar.sidebar-collapsed {
    width: var(--sidebar-collapsed-width) !important;
}

/* =========================================================
   LOGO & ICON TOGGLING
   ========================================================= */
#sidebar .brand-logo-full {
    display: block !important;
}

#sidebar .brand-icon-small {
    display: none !important;
}

#sidebar.sidebar-collapsed .brand-logo-full {
    display: none !important;
}

#sidebar.sidebar-collapsed .brand-icon-small {
    display: block !important;
    margin: 0 auto;
}

/* HEADINGS & PROFILE TEXT OVERRIDES */
#sidebar h2, 
#sidebar .user-name {
    color: var(--color-text-primary) !important;
}

#sidebar .section-label {
    color: var(--color-text-muted) !important;
}

/* NAVIGATION LINKS TEXT COLORING */
#sidebar .sidebar-link {
    color: var(--color-text-body);
}

#sidebar .sidebar-link:hover {
    color: var(--color-text-hover);
}

#sidebar .sidebar-link.active,
#sidebar a.text-indigo-600 {
    color: var(--color-text-active) !important;
}

/* SUBMENU LINK COLORING */
#sidebar [id$="-sub"] a {
    color: var(--color-text-subtle);
}

#sidebar [id$="-sub"] a:hover {
    color: var(--color-text-hover);
}

#sidebar [id$="-sub"] a.text-indigo-600 {
    color: var(--color-text-active) !important;
}

/* LOGOUT BUTTON TEXT COLORING */
#sidebar a[href*="logout.php"] {
    color: var(--color-text-danger) !important;
}

/* SIDEBAR COLLAPSED STATES */
.sidebar-collapsed .sidebar-info {
    opacity: 0 !important;
    max-width: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    pointer-events: none;
    display: none !important;
}

.sidebar-collapsed .sidebar-link {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.sidebar-collapsed [id$="-arrow"],
.sidebar-collapsed [id$="-sub"] {
    display: none !important;
}

/* SCROLLBAR CUSTOMIZATION */
.custom-scrollbar {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(148, 163, 184, 0.4) transparent !important;
    -webkit-overflow-scrolling: touch;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 5px !important;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent !important;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4) !important;
    border-radius: 10px !important;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6) !important;
}

/* PRINT MEDIA OVERRIDES */
@media print {
    #sidebar, .sidebar, #sidebar-overlay, .mobile-trigger-bar {
        display: none !important;
    }
    #main-content {
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}