/* ==========================================================================
   UUHF BILLING SYSTEM - CLEAN & MODERN DESIGN SYSTEM
   Uttarakhand University of Horticulture and Forestry
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    /* Brand Primary Colors */
    --uuhf-emerald: #059669;
    --uuhf-emerald-dark: #047857;
    --uuhf-emerald-darker: #064e3b;
    --uuhf-emerald-light: #10b981;
    --uuhf-emerald-mint: #34d399;
    --uuhf-emerald-subtle: #ecfdf5;

    /* Light Theme (Default: Clean, Fresh, Pure White) */
    --theme-bg: #ffffff;
    --theme-card-bg: #ffffff;
    --theme-card-border: #e9eef2;
    --border-subtle: #f1f5f9;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;

    --theme-header-bg: #ffffff;
    --theme-header-border: #edf2f7;
    --header-text: #0f172a;
    --header-subtitle: #64748b;

    --theme-sidebar-bg: #072a20;
    --theme-sidebar-border: rgba(52, 211, 153, 0.15);

    --pill-bg: #f8fafc;
    --pill-border: #e9eef2;
    --pill-hover-bg: #f1f5f9;

    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    --card-hover-shadow: 0 16px 32px -4px rgba(15, 23, 42, 0.09), 0 4px 12px -2px rgba(15, 23, 42, 0.03);

    --badge-active-bg: #ecfdf5;
    --badge-active-color: #047857;
    --badge-active-border: #a7f3d0;

    --badge-inactive-bg: #fef2f2;
    --badge-inactive-color: #b91c1c;
    --badge-inactive-border: #fecaca;
}

/* Dark Mode Theme */
body.dark-only {
    --theme-bg: #0a1410;
    --theme-card-bg: #11231c;
    --theme-card-border: rgba(52, 211, 153, 0.16);
    --border-subtle: rgba(255, 255, 255, 0.07);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    --theme-header-bg: #0e1e18;
    --theme-header-border: rgba(52, 211, 153, 0.15);
    --header-text: #ffffff;
    --header-subtitle: #a7f3d0;

    --theme-sidebar-bg: #061712;
    --theme-sidebar-border: rgba(52, 211, 153, 0.12);

    --pill-bg: rgba(255, 255, 255, 0.06);
    --pill-border: rgba(52, 211, 153, 0.2);
    --pill-hover-bg: rgba(255, 255, 255, 0.12);

    --card-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    --card-hover-shadow: 0 14px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(16, 185, 129, 0.15);

    --badge-active-bg: rgba(16, 185, 129, 0.16);
    --badge-active-color: #34d399;
    --badge-active-border: rgba(52, 211, 153, 0.3);

    --badge-inactive-bg: rgba(239, 68, 68, 0.16);
    --badge-inactive-color: #f87171;
    --badge-inactive-border: rgba(239, 68, 68, 0.3);
}

/* Global Font & Body */
body, 
.page-wrapper,
.page-body-wrapper {
    font-family: 'Plus Jakarta Sans', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-main);
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.page-body {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    min-height: calc(100vh - 80px);
    transition: background-color 0.3s ease;
    padding-bottom: 40px;
}

/* ==========================================================================
   TOP HEADER BAR
   ========================================================================== */
.page-header {
    border-bottom: 1px solid var(--theme-header-border) !important;
    background: var(--theme-header-bg) !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
    transition: all 0.3s ease;
}

.page-header .header-wrapper,
.uuhf-header-wrapper {
    background: var(--theme-header-bg) !important;
    padding: 12px 24px !important;
    border-bottom: none !important;
}

.uuhf-header-title {
    color: var(--header-text) !important;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.2px;
}

.uuhf-header-subtitle {
    color: var(--header-subtitle) !important;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Search input */
.header-wrapper .search-full input.form-control-plaintext {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 30px !important;
    color: var(--text-main) !important;
    padding: 8px 18px !important;
    font-size: 0.88rem;
    transition: all 0.25s ease;
}

body.dark-only .header-wrapper .search-full input.form-control-plaintext {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(52, 211, 153, 0.25) !important;
    color: #ffffff !important;
}

.header-wrapper .search-full input.form-control-plaintext:focus {
    background: #ffffff !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

/* Profile Nav in Header */
.profile-media {
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    border-radius: 40px;
    padding: 4px 14px 4px 5px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.profile-media:hover {
    background: var(--pill-hover-bg);
    border-color: #10b981;
}

.uuhf-avatar-box {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.uuhf-avatar-initials {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.35);
}

.uuhf-profile-name {
    color: var(--header-text) !important;
    font-size: 0.88rem;
    line-height: 1.2;
}

.uuhf-profile-role {
    color: var(--header-subtitle) !important;
    font-size: 0.76rem;
    font-weight: 500;
}

.profile-dropdown {
    background: var(--theme-card-bg) !important;
    border: 1px solid var(--theme-card-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
    padding: 12px !important;
    min-width: 170px;
}

body.dark-only .profile-dropdown {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5) !important;
}

.profile-dropdown li a {
    color: var(--text-main) !important;
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.profile-dropdown li a:hover {
    background: #ecfdf5 !important;
    color: #047857 !important;
}

body.dark-only .profile-dropdown li a:hover {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
}

/* Day/Night icon */
#modeToggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    color: var(--text-main);
    transition: all 0.25s ease;
}

#modeToggle:hover {
    background: var(--pill-hover-bg);
    transform: rotate(15deg);
}

/* ==========================================================================
   SIDEBAR - ULTRA MODERN LUXURY DESIGN
   ========================================================================== */
.sidebar-wrapper,
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper {
    background: radial-gradient(circle at 10% 10%, rgba(52, 211, 153, 0.22) 0%, transparent 45%),
                radial-gradient(circle at 90% 90%, rgba(16, 185, 129, 0.16) 0%, transparent 50%),
                linear-gradient(180deg, #062e22 0%, #04241a 45%, #021711 100%) !important;
    background-color: #04241a !important;
    border-right: 1px solid rgba(52, 211, 153, 0.22) !important;
    box-shadow: 6px 0 32px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Logo Wrapper Header */
.sidebar-wrapper .logo-wrapper,
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .logo-wrapper {
    background: linear-gradient(180deg, rgba(6, 40, 31, 0.96) 0%, rgba(4, 28, 22, 0.96) 100%) !important;
    backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid rgba(52, 211, 153, 0.2) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
    padding: 14px 14px 14px 16px !important;
    min-height: 72px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
    gap: 8px !important;
}

.uuhf-brand-logo-circle {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(0, 0, 0, 0.5) 100%);
    border: 1.8px solid rgba(52, 211, 153, 0.6);
    padding: 2px;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.uuhf-brand-logo-circle img {
    width: 34px !important;
    height: 34px !important;
    object-fit: contain;
}

.uuhf-brand-logo-circle:hover {
    transform: scale(1.08) rotate(4deg);
    border-color: #34d399;
    box-shadow: 0 0 22px rgba(52, 211, 153, 0.7);
}

.uuhf-brand-text {
    min-width: 0;
    flex: 1;
}

.uuhf-brand-title {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.94rem !important;
    letter-spacing: 0.5px !important;
    line-height: 1.15 !important;
    font-family: 'Montserrat', sans-serif !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.uuhf-brand-sub {
    color: #34d399 !important;
    font-size: 0.64rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    display: inline-block !important;
    padding: 1.5px 7px !important;
    background: rgba(16, 185, 129, 0.16) !important;
    border-radius: 4px !important;
    border: 1px solid rgba(52, 211, 153, 0.28) !important;
    margin-top: 3px !important;
    line-height: 1.3 !important;
}

/* Sidebar Toggle Button - Never overlaps text */
.sidebar-wrapper .logo-wrapper .toggle-sidebar,
.sidebar-wrapper .toggle-sidebar {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(52, 211, 153, 0.22) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

.sidebar-wrapper .logo-wrapper .toggle-sidebar:before,
.sidebar-wrapper .toggle-sidebar:before {
    display: none !important;
    content: none !important;
}

.sidebar-wrapper .logo-wrapper .toggle-sidebar:hover,
.sidebar-wrapper .toggle-sidebar:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: #34d399 !important;
    transform: scale(1.06) !important;
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.45) !important;
}

.sidebar-wrapper .logo-wrapper .toggle-sidebar svg,
.sidebar-wrapper .logo-wrapper .toggle-sidebar i {
    width: 17px !important;
    height: 17px !important;
    color: #cbd5e1 !important;
    stroke: #cbd5e1 !important;
    transition: stroke 0.2s ease, color 0.2s ease !important;
}

.sidebar-wrapper .logo-wrapper .toggle-sidebar:hover svg,
.sidebar-wrapper .logo-wrapper .toggle-sidebar:hover i {
    color: #34d399 !important;
    stroke: #34d399 !important;
}

/* Remove ugly harsh divider lines between items */
.sidebar-links li.sidebar-main-title::before,
.sidebar-links li.sidebar-list::before,
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links .simplebar-wrapper .simplebar-mask .simplebar-content-wrapper .simplebar-content > li.sidebar-main-title::before,
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links .simplebar-wrapper .simplebar-mask .simplebar-content-wrapper .simplebar-content > li.sidebar-main-title:nth-child(2)::before {
    display: none !important;
    content: none !important;
    height: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* Sidebar List Item Container */
.sidebar-links .sidebar-list,
.sidebar-links .sidebar-main-title,
.page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper .sidebar-main .sidebar-links .simplebar-wrapper .simplebar-mask .simplebar-content-wrapper .simplebar-content > li.sidebar-main-title:not(.pin-title) {
    display: block !important;
    margin: 4px 12px !important;
    padding: 0 !important;
}

/* Sidebar Top-Level Main Links */
.sidebar-links > li.sidebar-list > a.sidebar-link,
.sidebar-links > li.sidebar-main-title > a.sidebar-link {
    color: #cbd5e1 !important;
    font-weight: 500;
    font-size: 0.90rem;
    border-radius: 12px !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border: 1px solid transparent !important;
    background: transparent;
    text-decoration: none !important;
    position: relative;
}

.sidebar-links > li.sidebar-main-title > a.sidebar-link h6,
.sidebar-links > li.sidebar-list > a.sidebar-link span {
    font-size: 0.89rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
    text-transform: capitalize !important;
    color: inherit !important;
    margin: 0 !important;
    transition: color 0.2s ease !important;
}

/* Top-Level Lead Icon Badges - ONLY targets top-level icons */
.sidebar-links > li.sidebar-list > a.sidebar-link > i:first-child,
.sidebar-links > li.sidebar-main-title > a.sidebar-link > i:first-child,
.sidebar-links > li.sidebar-list > a.sidebar-link > svg:first-child,
.sidebar-links > li.sidebar-main-title > a.sidebar-link > svg:first-child {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(6, 78, 59, 0.22) 100%) !important;
    border: 1px solid rgba(52, 211, 153, 0.22) !important;
    color: #34d399 !important;
    stroke: #34d399 !important;
    font-size: 0.92rem !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

/* Sleek Dropdown Arrow - Smooth rotation */
.sidebar-links .sidebar-link .transition-arrow,
.sidebar-links .sidebar-link i.transition-arrow {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #64748b !important;
    stroke: none !important;
    font-size: 0.74rem !important;
    margin-left: auto !important;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease !important;
}

/* Hover State - Top-Level */
.sidebar-links > li.sidebar-list > a.sidebar-link:hover,
.sidebar-links > li.sidebar-main-title > a.sidebar-link:hover {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #ffffff !important;
    border-color: rgba(52, 211, 153, 0.28) !important;
    transform: translateX(4px);
}

.sidebar-links > li.sidebar-list > a.sidebar-link:hover > i:first-child,
.sidebar-links > li.sidebar-main-title > a.sidebar-link:hover > i:first-child,
.sidebar-links > li.sidebar-list > a.sidebar-link:hover > svg:first-child,
.sidebar-links > li.sidebar-main-title > a.sidebar-link:hover > svg:first-child {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    stroke: #ffffff !important;
    border-color: #34d399 !important;
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45) !important;
}

.sidebar-links .sidebar-link:hover .transition-arrow {
    color: #cbd5e1 !important;
}

/* Accordion Open Chevron State */
a[aria-expanded="true"] .transition-arrow,
a:not(.collapsed) .transition-arrow {
    transform: rotate(180deg) !important;
    color: #34d399 !important;
}

/* Active State - Top-Level */
.sidebar-links > li.sidebar-list > a.sidebar-link.active,
.sidebar-links > li.sidebar-main-title > a.sidebar-link.active {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.24) 0%, rgba(16, 185, 129, 0.05) 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(52, 211, 153, 0.36) !important;
    border-left: 3.5px solid #10b981 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

.sidebar-links > li.sidebar-list > a.sidebar-link.active > i:first-child,
.sidebar-links > li.sidebar-main-title > a.sidebar-link.active > i:first-child,
.sidebar-links > li.sidebar-list > a.sidebar-link.active > svg:first-child,
.sidebar-links > li.sidebar-main-title > a.sidebar-link.active > svg:first-child {
    background: #10b981 !important;
    color: #ffffff !important;
    stroke: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45) !important;
}

/* ==========================================================================
   SUBMENU / NESTED MENUS - ELEGANT CLEAN LIST
   ========================================================================== */
.sidebar-links ul.collapse,
.sidebar-links .sidebar-submenu {
    background: rgba(2, 18, 14, 0.72) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 0 12px 12px 0 !important;
    margin: 4px 10px 8px 22px !important;
    padding: 6px 6px 6px 12px !important;
    border-left: 2px solid rgba(52, 211, 153, 0.32) !important;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

.sidebar-links ul.collapse li,
.sidebar-links .sidebar-submenu li {
    margin: 2px 0 !important;
    list-style: none !important;
    padding: 0 !important;
}

.sidebar-links ul.collapse li a.sidebar-link,
.sidebar-links .sidebar-submenu li a {
    padding: 7px 12px !important;
    font-size: 0.83rem !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
}

.sidebar-links ul.collapse li a.sidebar-link span,
.sidebar-links .sidebar-submenu li a span {
    font-size: 0.83rem !important;
    font-weight: 500 !important;
    color: inherit !important;
    letter-spacing: 0.15px !important;
    line-height: 1.35 !important;
    display: inline-block !important;
}

/* Glowing Submenu Bullet Dot */
.sidebar-links ul.collapse li a.sidebar-link::before,
.sidebar-links .sidebar-submenu li a::before {
    content: "" !important;
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    border-radius: 50% !important;
    background: #475569 !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: none !important;
}

/* Submenu Hover */
.sidebar-links ul.collapse li a.sidebar-link:hover,
.sidebar-links .sidebar-submenu li a:hover {
    color: #ffffff !important;
    background: rgba(16, 185, 129, 0.14) !important;
    border-color: rgba(52, 211, 153, 0.25) !important;
    transform: translateX(4px) !important;
}

.sidebar-links ul.collapse li a.sidebar-link:hover::before,
.sidebar-links .sidebar-submenu li a:hover::before {
    background: #34d399 !important;
    box-shadow: 0 0 10px #34d399 !important;
    transform: scale(1.25) !important;
}

/* Submenu Active State */
.sidebar-links ul.collapse li a.sidebar-link.active,
.sidebar-links .sidebar-submenu li a.active,
.sidebar-links ul.collapse li a.sidebar-title.active {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.08) 100%) !important;
    border: 1px solid rgba(52, 211, 153, 0.38) !important;
    border-left: 3px solid #10b981 !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

.sidebar-links ul.collapse li a.sidebar-link.active::before,
.sidebar-links .sidebar-submenu li a.active::before,
.sidebar-links ul.collapse li a.sidebar-title.active::before {
    background: #10b981 !important;
    box-shadow: 0 0 10px #10b981 !important;
    transform: scale(1.3) !important;
}

/* Hide bulky SVGs inside submenus to prevent broken checkered squares */
.sidebar-links ul.collapse li a svg,
.sidebar-links ul.collapse li a .fill-icon,
.sidebar-links .sidebar-submenu li a svg,
.sidebar-links .sidebar-submenu li a .fill-icon {
    display: none !important;
}

/* Ultra Sleek Custom Scrollbar */
.sidebar-main #sidebar-menu,
.sidebar-links,
#simple-bar,
.sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(52, 211, 153, 0.25) transparent;
}

.sidebar-main #sidebar-menu::-webkit-scrollbar,
.sidebar-links::-webkit-scrollbar,
#simple-bar::-webkit-scrollbar,
.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-main #sidebar-menu::-webkit-scrollbar-track,
.sidebar-links::-webkit-scrollbar-track,
#simple-bar::-webkit-scrollbar-track,
.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-main #sidebar-menu::-webkit-scrollbar-thumb,
.sidebar-links::-webkit-scrollbar-thumb,
#simple-bar::-webkit-scrollbar-thumb,
.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(52, 211, 153, 0.22);
    border-radius: 10px;
}

.sidebar-main #sidebar-menu::-webkit-scrollbar-thumb:hover,
.sidebar-links::-webkit-scrollbar-thumb:hover,
#simple-bar::-webkit-scrollbar-thumb:hover,
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 211, 153, 0.5);
}

.sidebar-main #sidebar-menu::-webkit-scrollbar-thumb:hover,
.sidebar-links::-webkit-scrollbar-thumb:hover,
#simple-bar::-webkit-scrollbar-thumb:hover,
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 211, 153, 0.5);
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.uuhf-hero-banner {
    background: linear-gradient(135deg, #065f46 0%, #047857 55%, #0f766e 100%);
    box-shadow: 0 10px 25px -5px rgba(4, 120, 87, 0.28), 0 6px 12px -3px rgba(4, 120, 87, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px !important;
    color: #ffffff;
    position: relative;
}

.uuhf-hero-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.22) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-chip {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.hero-date {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-weight: 500;
}

.hero-title {
    font-size: 1.65rem;
    color: #ffffff;
    letter-spacing: -0.4px;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    max-width: 620px;
    line-height: 1.5;
}

.btn-hero-primary {
    background: #ffffff !important;
    color: #047857 !important;
    font-weight: 700;
    border-radius: 10px;
    padding: 9px 20px;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}

.btn-hero-primary:hover {
    background: #f0fdf4 !important;
    color: #065f46 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 10px;
    padding: 8px 18px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}

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

/* ==========================================================================
   PAGE TITLE & BREADCRUMB
   ========================================================================== */
.overview-heading {
    color: var(--text-main);
    font-size: 1.25rem;
    letter-spacing: -0.2px;
}

.breadcrumb-home-link {
    color: #059669 !important;
    transition: color 0.2s ease;
}

.breadcrumb-home-link:hover {
    color: #047857 !important;
}

.breadcrumb-item {
    font-size: 0.88rem;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--text-muted) !important;
}

/* ==========================================================================
   MODERN STAT CARDS (CLEAN & ATTRACTIVE)
   ========================================================================== */
.uuhf-stat-card {
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-card-border);
    border-radius: 16px;
    padding: 22px 20px 18px 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 185px;
    position: relative;
    overflow: hidden;
}

/* Subtle top colored accent strip */
.uuhf-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    background: var(--card-accent, #10b981);
    border-radius: 16px 16px 0 0;
}

.uuhf-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(16, 185, 129, 0.3);
}

.uuhf-stat-card .card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.uuhf-stat-card .stat-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.35;
    margin: 0;
}

.uuhf-stat-card .stat-value {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    margin: 12px 0 6px 0;
    letter-spacing: -0.6px;
}

/* Icon Box */
.uuhf-stat-card .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffffff;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.uuhf-stat-card:hover .icon-box {
    transform: scale(1.08);
}

/* Icon Gradients */
.icon-indigo {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}
.card-indigo { --card-accent: #4f46e5; }

.icon-teal {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.28);
}
.card-teal { --card-accent: #0d9488; }

.icon-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.28);
}
.card-purple { --card-accent: #8b5cf6; }

.icon-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.28);
}
.card-amber { --card-accent: #f59e0b; }

.icon-cyan {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.28);
}
.card-cyan { --card-accent: #0284c7; }

.icon-rose {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.28);
}
.card-rose { --card-accent: #e11d48; }

.icon-emerald {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.28);
}
.card-emerald { --card-accent: #10b981; }

.icon-orange {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.28);
}
.card-orange { --card-accent: #ea580c; }

/* Status Badges */
.uuhf-stat-card .stat-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

.status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.2px;
}

.status-active {
    background: var(--badge-active-bg);
    color: var(--badge-active-color);
    border: 1px solid var(--badge-active-border);
}

.status-inactive {
    background: var(--badge-inactive-bg);
    color: var(--badge-inactive-color);
    border: 1px solid var(--badge-inactive-border);
}

/* ==========================================================================
   UNIVERSAL ADMIN UI SYSTEM (MATCHING DASHBOARD QUALITY)
   Applies consistent modern, simple, interactive UI across all pages
   ========================================================================== */

/* Universal Page Canvas */
.page-body,
div.page-body,
div.page-body[style*="theme-bg"],
div.page-body[style*="--theme-bg"] {
    background: #f8fafc !important;
    background-color: #f8fafc !important;
    min-height: calc(100vh - 80px);
    transition: background-color 0.3s ease;
    padding-bottom: 40px;
}

/* Page Titles and Breadcrumbs */
.page-title {
    padding: 18px 0 16px 0 !important;
}

.page-title h3,
.page-title h4,
.page-title h4.text-white,
.page-title .text-white:not(.btn):not(.badge) {
    color: #0f172a !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-title .breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.page-title .breadcrumb .breadcrumb-item,
.page-title .breadcrumb .breadcrumb-item.text-white {
    color: #64748b !important;
    font-weight: 500 !important;
    font-size: 0.88rem !important;
}

.page-title .breadcrumb .breadcrumb-item.active,
.page-title .breadcrumb .breadcrumb-item.active.text-white {
    color: #047857 !important;
    font-weight: 700 !important;
}

.page-title .breadcrumb .breadcrumb-item a {
    color: #059669 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.page-title .breadcrumb .breadcrumb-item a:hover {
    color: #047857 !important;
}

/* Universal Cards across all Admin Pages */
.card,
div.card,
div.card[style*="theme-bg"],
div.card[style*="--theme-bg"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02) !important;
    overflow: hidden;
    margin-bottom: 24px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    box-shadow: 0 8px 24px -2px rgba(15, 23, 42, 0.08) !important;
}

.card-header,
div.card-header,
div.card-header[style*="theme-primary"] {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 16px 22px !important;
    color: #ffffff !important;
}

.card-header h4,
.card-header h5,
.card-header h6,
.card-header span,
.card-header i {
    color: #ffffff !important;
    font-weight: 700;
    margin: 0;
}

.card-body,
div.card-body,
div.card-body[style*="theme-bg"],
div.card-body[style*="--theme-bg"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    padding: 24px !important;
}

/* Fix text-white inside card-body, tables, and forms so it's never invisible (excluding table headers) */
div.card-body .text-white:not(.btn):not(.badge):not(.status-badge):not(.card-header *):not(thead):not(thead *):not(th):not(th *),
div.card-body label.text-white,
div.card-body td.text-white,
div.card-body p.text-white,
div.card-body span.text-white:not(.badge):not(.status-badge):not(.btn):not(thead *):not(th *) {
    color: #1e293b !important;
}

/* Form Controls with Modern Focus Glow */
.form-label,
label {
    color: #1e293b !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    margin-bottom: 6px !important;
}

.form-control,
.form-select,
input.form-control,
select.form-control,
textarea.form-control,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
textarea {
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    color: #0f172a !important;
    padding: 10px 14px !important;
    font-size: 0.90rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

body.dark-only .form-control,
body.dark-only .form-select,
body.dark-only input,
body.dark-only textarea {
    background-color: rgba(6, 26, 20, 0.85) !important;
    border-color: rgba(52, 211, 153, 0.3) !important;
    color: #ffffff !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16) !important;
    outline: none !important;
}

.input-group-text {
    background-color: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px 0 0 10px !important;
    color: #047857 !important;
    font-size: 0.95rem !important;
}

/* Modern Select2 Controls (Comprehensive Single & Multiple Fix) */
html body .select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

/* Single Select Box */
html body .select2-container--default .select2-selection--single {
    height: 44px !important;
    min-height: 44px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

html body .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0f172a !important;
    font-size: 0.90rem !important;
    font-weight: 500 !important;
    line-height: 42px !important;
    padding-left: 14px !important;
    padding-right: 28px !important;
    width: 100% !important;
    margin: 0 !important;
}

html body .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #475569 !important;
    font-size: 0.90rem !important;
    font-weight: 500 !important;
    line-height: 42px !important;
}

html body .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
    right: 12px !important;
    top: 1px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Multiple Select Box Container */
html body .select2-container .select2-selection--multiple,
html body .select2-container--default .select2-selection--multiple {
    min-height: 44px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    padding: 4px 8px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

/* Focus and Open States */
html body .select2-container--default.select2-container--focus .select2-selection--multiple,
html body .select2-container--default.select2-container--open .select2-selection--multiple,
html body .select2-container--default.select2-container--open .select2-selection--single,
html body .select2-container--default .select2-selection--single:focus,
html body .select2-container--default .select2-selection--multiple:focus {
    border-color: #047857 !important;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15) !important;
    outline: none !important;
}

/* Multiple Select Rendered list */
html body .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 5px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    box-sizing: border-box !important;
}

html body .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Inline Search Item */
html body .select2-container--default .select2-search--inline,
html body .select2-container .select2-search--inline {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 auto !important;
    min-width: 140px !important;
    max-width: 100% !important;
    float: none !important;
}

/* Search input field inside Multiple Select (Fix text clipping and remove unwanted border) */
html body .select2-container--default .select2-search--inline .select2-search__field,
html body .select2-container .select2-search--inline .select2-search__field,
html body input.select2-search__field {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding: 4px 6px !important;
    margin: 0 !important;
    height: 32px !important;
    line-height: 24px !important;
    font-size: 0.90rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Hide webkit search input icons/decorations that cause extra borders */
html body .select2-container--default .select2-search--inline .select2-search__field::-webkit-search-decoration,
html body .select2-container--default .select2-search--inline .select2-search__field::-webkit-search-cancel-button,
html body .select2-container--default .select2-search--inline .select2-search__field::-webkit-search-results-button,
html body .select2-container--default .select2-search--inline .select2-search__field::-webkit-search-results-decoration {
    display: none !important;
    -webkit-appearance: none !important;
}

/* Placeholder for search input in multiple select */
html body .select2-container--default .select2-search--inline .select2-search__field::placeholder,
html body .select2-container--default .select2-search--inline .select2-search__field::-webkit-input-placeholder {
    color: #475569 !important;
    font-size: 0.90rem !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    line-height: 24px !important;
}

/* Choice / Tag Pill Items */
html body .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    margin: 2px 4px 2px 0 !important;
    font-size: 0.83rem !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 20px !important;
    box-shadow: 0 1px 3px rgba(4, 120, 87, 0.25) !important;
}

html body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #ffffff !important;
    margin-right: 6px !important;
    font-weight: bold !important;
    font-size: 14px !important;
    line-height: 1 !important;
    border: none !important;
    background: transparent !important;
    opacity: 0.85 !important;
    transition: opacity 0.15s ease !important;
    cursor: pointer !important;
}

html body .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ffffff !important;
    opacity: 1 !important;
    background: transparent !important;
}

html body .select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    padding-left: 0 !important;
    padding-right: 2px !important;
    color: #ffffff !important;
}

/* Dropdown Menu */
html body .select2-dropdown {
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    background: #ffffff !important;
    z-index: 1055 !important;
}

html body .select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 7px 12px !important;
    margin: 6px !important;
    width: calc(100% - 12px) !important;
    color: #0f172a !important;
    font-size: 0.90rem !important;
}

html body .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #047857 !important;
    color: #ffffff !important;
}

/* Dark Mode Overrides for Select2 */
body.dark-only .select2-container--default .select2-selection--single,
body.dark-only .select2-container--default .select2-selection--multiple {
    background-color: rgba(6, 26, 20, 0.85) !important;
    border-color: rgba(52, 211, 153, 0.3) !important;
    color: #ffffff !important;
}

body.dark-only .select2-container--default .select2-selection--single .select2-selection__rendered,
body.dark-only .select2-container--default .select2-search--inline .select2-search__field {
    color: #f1f5f9 !important;
}

body.dark-only .select2-container--default .select2-selection--single .select2-selection__placeholder,
body.dark-only .select2-container--default .select2-search--inline .select2-search__field::placeholder {
    color: #94a3b8 !important;
}

body.dark-only .select2-dropdown {
    background-color: #0e1e18 !important;
    border-color: rgba(52, 211, 153, 0.3) !important;
}

body.dark-only .select2-container--default .select2-results__option {
    color: #f1f5f9 !important;
}

/* Interactive Modern Buttons */
.btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    padding: 9px 18px !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary,
.btn-success,
.assign-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
}

.btn-primary:hover,
.btn-success:hover,
.assign-btn:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45) !important;
}

.btn-secondary {
    background: #f1f5f9 !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #475569 !important;
}

.btn-secondary:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

.btn-info {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3) !important;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3) !important;
}

/* Modern Tables across all Admin Pages */
.table-responsive {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
}

.table-responsive::-webkit-scrollbar,
.custom-table-wrapper::-webkit-scrollbar {
    height: 7px !important;
}

.table-responsive::-webkit-scrollbar-track,
.custom-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 4px !important;
}

.table-responsive::-webkit-scrollbar-thumb,
.custom-table-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 4px !important;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.custom-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
}

/* Accessible High Contrast Soft Badges */
.badge.bg-primary-soft,
.bg-primary-soft {
    background-color: #e0edff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
    font-weight: 600 !important;
}

.badge.bg-info-soft,
.bg-info-soft {
    background-color: #cffafe !important;
    color: #0e7490 !important;
    border: 1px solid #a5f3fc !important;
    font-weight: 600 !important;
}

.badge.bg-warning-soft,
.bg-warning-soft {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
    font-weight: 600 !important;
}

.badge.bg-role,
.bg-role {
    background-color: #f3e8ff !important;
    color: #6b21a8 !important;
    border: 1px solid #e9d5ff !important;
    font-weight: 600 !important;
}

.table,
table.dataTable,
.table-lg {
    background: #ffffff !important;
    color: #1e293b !important;
    margin-bottom: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* Unified, continuous luxury emerald table header */
.table thead,
table.dataTable thead,
.modern-table thead,
.table-responsive > table > thead {
    background: linear-gradient(90deg, #053b2d 0%, #06543e 50%, #086b50 100%) !important;
    border-radius: 10px 10px 0 0 !important;
}

.table thead tr,
table.dataTable thead tr,
.modern-table thead tr {
    background: transparent !important;
    border: none !important;
}

.table thead th,
table.dataTable thead th,
table.dataTable thead tr th,
table.dataTable thead > tr > th,
.table thead.bg-primary th,
.modern-table thead th,
.modern-table thead tr th,
div.card-body table thead th,
div.card-body table thead th.text-white,
div.card-body table.dataTable thead th,
div.card-body table.dataTable thead th.text-white,
div.card-body .modern-table thead th,
div.card-body .modern-table thead th.text-white,
div.card-body table thead tr th,
div.card-body table thead tr th.text-white {
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    padding: 13px 18px !important;
    border: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    position: relative !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

.table thead th:last-child,
table.dataTable thead th:last-child,
.modern-table thead th:last-child,
table.dataTable thead > tr > th:last-child {
    border-right: none !important;
}

.table thead th *,
table.dataTable thead th *,
table.dataTable thead tr th *,
table.dataTable thead > tr > th *,
.table thead.bg-primary th *,
.modern-table thead th *,
div.card-body table thead th *,
div.card-body table.dataTable thead th *,
div.card-body .modern-table thead th * {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Hover highlight on sortable column headers */
table.dataTable thead > tr > th.sorting:hover,
table.dataTable thead > tr > th.sorting_asc:hover,
table.dataTable thead > tr > th.sorting_desc:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── DataTable Sorting Icons: Purge Broken Glyphicons & Triangles ── */
table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:before,
table.dataTable thead th.sorting_desc:after,
table.dataTable thead > tr > th.sorting:before,
table.dataTable thead > tr > th.sorting:after,
table.dataTable thead > tr > th.sorting_asc:before,
table.dataTable thead > tr > th.sorting_asc:after,
table.dataTable thead > tr > th.sorting_desc:before,
table.dataTable thead > tr > th.sorting_desc:after {
    display: none !important;
    content: "" !important;
}

/* Clean spacing for sort icon on interactive headers */
table.dataTable thead > tr > th.sorting,
table.dataTable thead > tr > th.sorting_asc,
table.dataTable thead > tr > th.sorting_desc {
    padding-right: 30px !important;
    cursor: pointer !important;
}

/* Elegant FontAwesome Sorting Indicator */
table.dataTable thead > tr > th.sorting::after,
table.dataTable thead > tr > th.sorting_asc::after,
table.dataTable thead > tr > th.sorting_desc::after {
    display: inline-block !important;
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-size: 0.72rem !important;
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    line-height: 1 !important;
    pointer-events: none !important;
}

/* Unsorted column: subtle double-sort arrow */
table.dataTable thead > tr > th.sorting::after {
    content: "\f0dc" !important;
    color: rgba(255, 255, 255, 0.45) !important;
}

table.dataTable thead > tr > th.sorting:hover::after {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Ascending column */
table.dataTable thead > tr > th.sorting_asc::after {
    content: "\f0de" !important;
    color: #34d399 !important;
    opacity: 1 !important;
}

/* Descending column */
table.dataTable thead > tr > th.sorting_desc::after {
    content: "\f0dd" !important;
    color: #34d399 !important;
    opacity: 1 !important;
}

/* Non-sortable column (Action column, .no-sort) */
table.dataTable thead > tr > th.no-sort::after,
table.dataTable thead > tr > th.sorting_disabled::after,
table.dataTable thead > tr > th:last-child::after {
    display: none !important;
    content: "" !important;
}

table.dataTable thead > tr > th.no-sort,
table.dataTable thead > tr > th:last-child {
    padding-right: 16px !important;
    cursor: default !important;
}

.table tbody tr,
table.dataTable tbody tr {
    background-color: #ffffff !important;
    transition: background-color 0.18s ease !important;
}

.table tbody tr:hover,
table.dataTable tbody tr:hover {
    background-color: #f0fdf4 !important;
}

.table tbody td,
table.dataTable tbody td {
    padding: 13px 16px !important;
    color: #1e293b !important;
    font-size: 0.89rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}

.table tbody tr:last-child td {
    border-bottom: none !important;
}

/* DataTables Controls Styling */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 12px 16px !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
}

.dataTables_wrapper .dataTables_filter input {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    margin-left: 8px !important;
    color: #0f172a !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #10b981 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

.dataTables_wrapper .dataTables_length select {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 5px 10px !important;
    margin: 0 6px !important;
    color: #0f172a !important;
}

.dataTables_wrapper .dataTables_info {
    padding: 14px 16px !important;
    color: #64748b !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

.dataTables_wrapper .dataTables_paginate {
    padding: 12px 16px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 0.84rem !important;
    padding: 6px 12px !important;
    margin: 0 3px !important;
    transition: all 0.2s ease !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #047857 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35) !important;
}

/* DataTables Buttons (Copy, CSV, Excel, PDF) Styling */
div.dt-buttons,
.dt-buttons {
    padding: 10px 16px 4px 16px !important;
    display: inline-flex !important;
    gap: 6px !important;
}

div.dt-buttons > .dt-button,
.dt-button,
button.dt-button {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: #334155 !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    padding: 6px 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
}

div.dt-buttons > .dt-button:hover,
.dt-button:hover,
button.dt-button:hover {
    background: #ecfdf5 !important;
    border-color: #10b981 !important;
    color: #047857 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.2) !important;
}

/* Neutralize legacy custom-table-wrapper so it never creates a black/dark green box */
.custom-table-wrapper,
div.custom-table-wrapper {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: none !important;
}

/* High Contrast Fail-Safes for Dark Mode */
body.dark-only .form-label,
body.dark-only label,
body.dark-only div.card-body label {
    color: #f1f5f9 !important;
}

body.dark-only .page-title h3,
body.dark-only .page-title h4,
body.dark-only .page-title h4.text-white,
body.dark-only .page-title .text-white {
    color: #ffffff !important;
}

body.dark-only .table tbody td,
body.dark-only table.dataTable tbody td {
    color: #f1f5f9 !important;
}

body.dark-only .table tbody tr,
body.dark-only table.dataTable tbody tr {
    background-color: #0d281f !important;
}

body.dark-only .table tbody tr:hover,
body.dark-only table.dataTable tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.15) !important;
}

body.dark-only div.dt-buttons > .dt-button,
body.dark-only .dt-button {
    background: #0f3529 !important;
    border-color: rgba(52, 211, 153, 0.35) !important;
    color: #f1f5f9 !important;
}

/* Pills & Badges across all pages */
.badge {
    padding: 5px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.2px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.badge.bg-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

.badge.bg-success {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

.badge.bg-danger {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

.badge.bg-primary,
.badge.bg-info {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

/* Footer */
footer.footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    padding: 16px 0;
}

footer.footer p {
    color: #64748b !important;
    font-size: 0.85rem;
}

/* Alerts with Smooth Corners */
#successAlert,
.alert-success {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #065f46 !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08) !important;
}

#errorAlert,
.alert-danger {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #991b1b !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08) !important;
}

/* ==========================================================================
   QUICK ACTIONS & EXPANDED DASHBOARD WIDGETS
   ========================================================================== */
.quick-action-card {
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-card-border);
    border-radius: 14px;
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--card-shadow);
    color: var(--text-main) !important;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow);
    border-color: #10b981;
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #ffffff;
}

.quick-action-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1.25;
}

.quick-action-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 2px 0 0 0;
}

/* Pipeline Steps */
.pipeline-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--pill-bg);
    margin-bottom: 10px;
    border: 1px solid var(--pill-border);
    transition: all 0.2s ease;
}

.pipeline-step:hover {
    background: var(--pill-hover-bg);
}

.pipeline-step-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.pipeline-step-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* Status Pending */
.status-pending {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

body.dark-only .status-pending {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Section Header */
.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dashboard-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Dashboard Table Polish */
.dashboard-table-card {
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-card-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.dashboard-table thead th {
    background: var(--pill-bg) !important;
    color: var(--text-muted) !important;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--theme-card-border) !important;
}

.dashboard-table tbody td {
    padding: 14px 16px !important;
    font-size: 0.88rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-subtle);
}

.dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   AUTHORITY & MODULE CARDS (.stat-blue-card -> DASHBOARD QUALITY)
   Transforming all authority and sub-module cards into dashboard-quality stat cards
   ========================================================================== */

/* Submenu Arrow Cleanup */
.sidebar-links ul.collapse li a .according-menu,
.sidebar-links ul.collapse li a i.fa-angle-right,
.sidebar-links ul.collapse li a i.fa-chevron-right {
    display: none !important;
}

.sidebar-links ul.collapse li a.sidebar-link {
    white-space: normal !important;
    line-height: 1.35 !important;
    padding: 8px 12px !important;
}

/* Authority Page Title Clarity - High Contrast in Both Light & Dark */
.page-title h3,
.page-title h4,
.page-title h4.text-white,
.page-title .text-white {
    color: var(--text-main, #ffffff) !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.dark-only .page-title h4,
body.dark-only .page-title h3,
body.dark-only .page-title h4.text-white {
    color: #ffffff !important;
}

body:not(.dark-only) .page-title h4,
body:not(.dark-only) .page-title h3 {
    color: #0f172a !important;
    text-shadow: none !important;
}

/* Authority Stat Cards (.stat-blue-card) - Dashboard Look */
.stat-blue-card {
    background: var(--theme-card-bg, #ffffff) !important;
    border: 1px solid var(--theme-card-border, #e2e8f0) !important;
    border-radius: 18px !important;
    padding: 22px 20px 20px 20px !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.03) !important;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    color: var(--text-main, #0f172a) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 200px !important;
}

/* Glowing Top Accent Strip (Matches Dashboard Stat Card) */
.stat-blue-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%) !important;
    border-radius: 18px 18px 0 0 !important;
}

.stat-blue-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 36px -4px rgba(16, 185, 129, 0.25), 0 6px 16px -2px rgba(15, 23, 42, 0.08) !important;
    border-color: rgba(52, 211, 153, 0.5) !important;
}

/* Top Count Badge (1, 2, 3...) */
.stat-blue-card .stat-top-count {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35) !important;
}

/* Title (DEAN, VC, etc.) */
.stat-blue-card .stat-main-title {
    color: var(--text-main, #1e293b) !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

/* Hide ugly harsh hr lines completely */
.stat-blue-card hr.stat-divider {
    display: none !important;
}

/* Stat Counter Value (e.g. 2, 1...) */
.stat-blue-card .stat-value {
    font-size: 2.4rem !important;
    font-weight: 800 !important;
    color: var(--text-main, #0f172a) !important;
    letter-spacing: -0.8px !important;
    line-height: 1 !important;
    margin: 14px 0 !important;
}

body.dark-only .stat-blue-card .stat-value {
    color: #34d399 !important;
    text-shadow: 0 0 16px rgba(52, 211, 153, 0.3);
}

/* Interactive Click Button */
.stat-blue-card .btn,
.stat-blue-card .btn-primary,
.stat-blue-card a.btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    border-radius: 10px !important;
    padding: 8px 24px !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35) !important;
    transition: all 0.22s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.stat-blue-card .btn:hover,
.stat-blue-card a.btn:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5) !important;
    color: #ffffff !important;
}

/* Dark mode specific for .stat-blue-card */
body.dark-only .stat-blue-card {
    background: rgba(17, 35, 28, 0.95) !important;
    border-color: rgba(52, 211, 153, 0.25) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45) !important;
}

body.dark-only .stat-blue-card .stat-main-title {
    color: #ffffff !important;
}

/* ==========================================================================
   UUHF MULTI-DEVICE RESPONSIVE MASTER SYSTEM
   Comprehensive Optimization for Mobile, Tablet, Laptop, and Desktop
   ========================================================================== */

/* Global Anti-Overflow & Smooth Touch Scrolling */
html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
}

.page-wrapper {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Backdrop Overlay for Mobile/Tablet Sidebar Drawer */
.bg-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(2, 14, 10, 0.72) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 1040 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.bg-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ==========================================================================
   1. TABLET & MOBILE BREAKPOINT (<= 991.98px)
   ========================================================================== */
@media (max-width: 991.98px) {
    /* Sidebar as a Smooth Floating App Drawer */
    .page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        width: 280px !important;
        max-width: 85vw !important;
        z-index: 1050 !important;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.5) !important;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    .page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper.close_icon {
        transform: translateX(-105%) !important;
    }

    .page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper:not(.close_icon) {
        transform: translateX(0) !important;
    }

    /* Mobile Back / Close Button inside Sidebar */
    .sidebar-wrapper .logo-wrapper .back-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(52, 211, 153, 0.3) !important;
        color: #34d399 !important;
        font-size: 1rem !important;
        cursor: pointer !important;
        margin-left: 8px !important;
        transition: all 0.2s ease !important;
    }

    .sidebar-wrapper .logo-wrapper .back-btn:hover {
        background: rgba(16, 185, 129, 0.3) !important;
        color: #ffffff !important;
        transform: scale(1.08) !important;
    }

    /* Page Body takes 100% width on tablet/mobile */
    .page-wrapper.compact-wrapper .page-body-wrapper .page-body {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 16px 14px 35px !important;
        margin-top: 72px !important;
    }

    /* Top Header Bar */
    .page-header {
        margin-left: 0 !important;
        width: 100% !important;
        left: 0 !important;
        top: 0 !important;
        z-index: 1030 !important;
    }

    .header-wrapper.uuhf-header-wrapper {
        padding: 10px 16px !important;
        min-height: 64px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .header-logo-wrapper {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .header-logo-wrapper .toggle-sidebar {
        width: 36px !important;
        height: 36px !important;
        border-radius: 9px !important;
        background: rgba(16, 185, 129, 0.12) !important;
        border: 1px solid rgba(52, 211, 153, 0.3) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        padding: 0 !important;
        margin: 0 !important;
        color: #047857 !important;
    }

    body.dark-only .header-logo-wrapper .toggle-sidebar {
        color: #34d399 !important;
        background: rgba(16, 185, 129, 0.18) !important;
    }

    .header-logo-wrapper .toggle-sidebar svg {
        width: 18px !important;
        height: 18px !important;
        stroke: currentColor !important;
    }

    /* Profile nav item on tablet/mobile */
    .profile-media {
        padding: 3px 6px 3px 3px !important;
    }

    /* Tables & DataTables on Mobile/Tablet */
    .custom-table-wrapper,
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 12px !important;
        margin-bottom: 15px !important;
    }

    .table thead th,
    table.dataTable thead th,
    .modern-table thead th {
        padding: 10px 12px !important;
        font-size: 0.76rem !important;
        white-space: nowrap !important;
    }

    .table tbody td,
    table.dataTable tbody td,
    .modern-table tbody td {
        padding: 10px 12px !important;
        font-size: 0.82rem !important;
        white-space: nowrap !important;
    }

    /* DataTables Controls Responsive Wrap */
    .dataTables_wrapper {
        padding: 6px 0 !important;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100% !important;
        margin-left: 0 !important;
        border-radius: 8px !important;
        padding: 8px 12px !important;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        width: 100% !important;
        text-align: center !important;
        margin-top: 10px !important;
    }

    .dataTables_wrapper .dataTables_paginate {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
}

/* ==========================================================================
   2. MOBILE PHONES SPECIFIC (<= 767.98px)
   ========================================================================== */
@media (max-width: 767.98px) {
    /* Page Title & Breadcrumb Clean Stack */
    .page-title {
        padding-bottom: 10px !important;
        margin-bottom: 16px !important;
    }

    .page-title .row {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
    }

    .page-title .row > div {
        width: 100% !important;
        text-align: left !important;
    }

    .page-title h3,
    .page-title h4 {
        font-size: 1.15rem !important;
        line-height: 1.3 !important;
    }

    .page-title .breadcrumb {
        justify-content: flex-start !important;
        font-size: 0.78rem !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Cards */
    .card {
        border-radius: 14px !important;
        margin-bottom: 16px !important;
    }

    .card .card-header {
        padding: 14px 16px !important;
    }

    .card .card-header h4,
    .card .card-header h5 {
        font-size: 1.05rem !important;
    }

    .card .card-body {
        padding: 16px 14px !important;
    }

    /* Stat Cards 2x2 or Full-width Stack */
    .stat-blue-card {
        padding: 16px 14px !important;
        border-radius: 14px !important;
        margin-bottom: 14px !important;
    }

    .stat-blue-card .stat-value {
        font-size: 1.85rem !important;
        margin: 10px 0 !important;
    }

    .stat-blue-card .stat-main-title {
        font-size: 1.02rem !important;
    }

    .stat-blue-card .btn {
        width: 100% !important;
        text-align: center !important;
        padding: 8px 16px !important;
        font-size: 0.84rem !important;
    }

    /* Hero Banner Mobile */
    .uuhf-hero-banner {
        padding: 20px 16px !important;
        border-radius: 16px !important;
    }

    .hero-title {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }

    .hero-subtitle {
        font-size: 0.84rem !important;
        line-height: 1.45 !important;
    }

    .hero-chip {
        font-size: 0.72rem !important;
        padding: 3px 10px !important;
    }

    /* Form Fields on Mobile - Touch Friendly */
    .form-control,
    .form-select,
    .select2-container .select2-selection--single,
    .select2-container .select2-selection--multiple {
        min-height: 44px !important;
        font-size: 0.90rem !important;
        border-radius: 10px !important;
    }

    .btn {
        min-height: 42px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.88rem !important;
        border-radius: 10px !important;
    }

    /* Form rows full-width on mobile */
    .form-wizard .row > [class*="col-"] {
        margin-bottom: 6px;
    }
}

/* ==========================================================================
   3. EXTRA SMALL PHONES (<= 575.98px, e.g. 360px - 480px)
   ========================================================================== */
@media (max-width: 575.98px) {
    .page-wrapper.compact-wrapper .page-body-wrapper .page-body {
        padding: 12px 10px 30px !important;
    }

    /* Hide long welcome text in header to prevent pushing right icons */
    .left-header {
        display: none !important;
    }

    .header-wrapper.uuhf-header-wrapper {
        padding: 8px 12px !important;
    }

    .uuhf-avatar-box,
    .uuhf-avatar-initials,
    .uuhf-avatar-img {
        width: 36px !important;
        height: 36px !important;
    }

    #modeToggle {
        width: 34px !important;
        height: 34px !important;
    }

    .card .card-body {
        padding: 14px 10px !important;
    }

    .custom-table-wrapper {
        padding: 10px 8px !important;
    }
}

/* ==========================================================================
   4. LAPTOP & DESKTOP (>= 992px)
   ========================================================================== */
@media (min-width: 992px) {
    /* Hide Mobile Back Button inside Sidebar */
    .sidebar-wrapper .logo-wrapper .back-btn {
        display: none !important;
    }

    /* Fixed Desktop Sidebar */
    .page-wrapper.compact-wrapper .page-body-wrapper div.sidebar-wrapper {
        transform: none !important;
        width: 265px !important;
    }

    /* Proper Content Offset */
    .page-wrapper.compact-wrapper .page-body-wrapper .page-body {
        margin-left: 265px !important;
        width: calc(100% - 265px) !important;
    }

    /* Proper Header Offset */
    .page-wrapper.compact-wrapper .page-header {
        margin-left: 265px !important;
        width: calc(100% - 265px) !important;
    }

    .header-logo-wrapper {
        display: none !important;
    }
}

/* ==========================================================================
   Remove Duplicate Page Title (Black Text) When Green Card Header Exists
   Keeps green card-header as is; only hides black title where both exist
   ========================================================================== */
body:has(.card-header) .page-title h1,
body:has(.card-header) .page-title h2,
body:has(.card-header) .page-title h3,
body:has(.card-header) .page-title h4,
body:has(.card-header) .page-title h5,
body:has(.card-header) .page-title h6,
body.has-card-header .page-title h1,
body.has-card-header .page-title h2,
body.has-card-header .page-title h3,
body.has-card-header .page-title h4,
body.has-card-header .page-title h5,
body.has-card-header .page-title h6,
.page-body:has(.card-header) .page-title h1,
.page-body:has(.card-header) .page-title h2,
.page-body:has(.card-header) .page-title h3,
.page-body:has(.card-header) .page-title h4,
.page-body:has(.card-header) .page-title h5,
.page-body:has(.card-header) .page-title h6 {
    display: none !important;
}

body:has(.card-header) .page-title .row > div:first-child:not(:has(.breadcrumb)),
body.has-card-header .page-title .row > div:first-child:not(:has(.breadcrumb)),
.page-body:has(.card-header) .page-title .row > div:first-child:not(:has(.breadcrumb)) {
    display: none !important;
}

body:has(.card-header) .page-title .row > div:has(.breadcrumb),
body.has-card-header .page-title .row > div:has(.breadcrumb),
.page-body:has(.card-header) .page-title .row > div:has(.breadcrumb) {
    width: 100% !important;
}

body:has(.card-header) .page-title,
body.has-card-header .page-title,
.page-body:has(.card-header) .page-title {
    padding: 10px 0 12px 0 !important;
}

body:has(.card-header) .page-title:not(:has(.breadcrumb)),
body.has-card-header .page-title:not(:has(.breadcrumb)),
.page-body:has(.card-header) .page-title:not(:has(.breadcrumb)) {
    display: none !important;
}



