:root {
        --primary: #54a4fd;
        --primary-dark: #3254a1;
        --primary-light: #e5f5ff;
        --muted-blue: #b0c8d7;
        --dark-bg: #262937;
        --white: #ffffff;
        --sidebar-bg: var(--white);
        --text-main: var(--dark-bg);
        --text-muted: var(--muted-blue);
        --glass-border: rgba(176, 200, 215, 0.3);
        --glass-shadow: 4px 0 24px rgba(38, 41, 55, 0.05);
        --active-bg: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    

    .sidebar {
        width: 260px;
        height: 100vh;
        background: var(--sidebar-bg);
        border-right: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow);
        display: flex;
        flex-direction: column;
        transition: var(--transition);
        position: relative;
        z-index: 100;
        overflow: hidden;
        min-width: 260px;
        max-width: 260px;
    }


    .sidebar-header {
        padding: 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 88px;
        transition: var(--transition);
    }

    .sidebar.collapsed .sidebar-header {
        flex-direction: column;
        justify-content: center;
        gap: 15px;
        padding: 20px 0;
        min-height: auto;
    }

    .logo-container {
        display: flex;
        align-items: center;
        gap: 12px;
        overflow: hidden;
        white-space: nowrap;
    }

    .sidebar.collapsed .logo-container {
        justify-content: center;
        width: 100%;
    }

    .logo-img {
        width: 48px;
        height: 48px;
        min-width: 32px;
        object-fit: contain;
    }

    .logo-text {
        font-weight: 600;
        font-size: 14px;
        color: var(--text-main);
        transition: var(--transition);
        display: block;
    }

    .sidebar.collapsed .logo-text {
        display: none;
    }

    .toggle-btn {
        width: 32px;
        height: 32px;
        background: var(--primary-light);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: var(--transition);
        color: var(--primary);
        border: none;
    }

    .toggle-btn:hover {
        background: var(--primary);
        color: var(--white);
    }

    .sidebar.collapsed .toggle-btn {
        transform: rotate(180deg);
    }

    /* Search Box */
    .search-container {
        padding: 0 20px 20px;
         padding-bottom: 12px;
        position: relative;
    }

    .sidebar.collapsed .search-container {
        display: flex;
        justify-content: center;
        padding: 0 16px 20px;
    }

    .search-input {
        width: 100%;
        padding: 12px 16px 12px 40px;
        background: #f1f5f9;
        border: 1px solid transparent;
        border-radius: 12px;
        font-size: 14px;
        outline: none;
        transition: var(--transition);
        color: var(--text-main);
    }

    .sidebar.collapsed .search-input {
        padding: 0;
        width: 44px;
        height: 44px;
        cursor: pointer;
        background: #f1f5f9;
        border: none;
        display: block;
    }

    .sidebar.collapsed .search-input::placeholder {
        color: transparent;
    }
    .sidebar-bunker .sidebar-body .nav-label {
  color: #262937;
}

    .search-input:focus {
        background: var(--white);
        border-color: var(--primary);
        box-shadow: 0 0 0 4px var(--primary-light);
    }

    .search-icon {
        position: absolute;
        left: 32px;
        top: 12px;
        color: var(--text-muted);
        transition: var(--transition);
    }

    .sidebar.collapsed .search-icon {
        left: 50%;
        top: 22px;
        transform: translate(-50%, -50%);
        pointer-events: none;
    }

    /* Nav Body */
    .sidebar-body {
        flex: 1;
        overflow-y: auto;
        padding: 8px 16px 12px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .sidebar-body::-webkit-scrollbar {
        display: none;
    }

    .nav-label {
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--text-muted);
        margin: 12px 12px 6px;
        font-weight: 600;
        transition: var(--transition);
    }

    .sidebar.collapsed .nav-label {
        display: none !important;
    }

    .nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .nav-item {
        margin-bottom: 2px;
    }

    .nav-link {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        border-radius: 12px;
        text-decoration: none;
        color: #64748b;
        font-size: 14px;
        font-weight: 500;
        transition: var(--transition);
        gap: 12px;
        white-space: nowrap;
    }

    .sidebar.collapsed .nav-link {
        justify-content: center;
        padding: 12px;
    }

    .nav-link:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

    .nav-link.active {
        background: var(--active-bg);
        color: var(--white);
        box-shadow: 0 8px 16px rgba(84, 164, 253, 0.2);
    }

    .nav-link.active svg, .nav-link.active svg path {
        fill: var(--white) !important;
        stroke: var(--white) !important;
    }

    .nav-icon {
        min-width: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .nav-text {
        flex: 1;
        transition: var(--transition);
    }

    .sidebar.collapsed .nav-text,
    .sidebar.collapsed .arrow-down {
        display: none !important;
    }

    /* Dropdowns */
    .submenu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        padding-left: 20px;
        list-style: none;
    }

    .has-submenu.open .submenu {
        max-height: 800px;
        margin-top: 0px;
    }

    .has-submenu.open .arrow-down {
        transform: rotate(180deg);
    }

    .submenu-link {
        display: block;
        padding: 10px 16px;
        font-size: 13px;
        color: #64748b;
        text-decoration: none;
        border-radius: 10px;
        margin-bottom: 2px;
        transition: var(--transition);
    }

    .submenu-link:hover {
        color: var(--primary);
        background: var(--primary-light);
    }

    .sidebar .submenu .submenu-link.active {
    color: var(--primary) !important;
    background: var(--primary-light) !important;
    font-weight: 600;
}


    /* Profile Section */
    .sidebar-footer {
        padding: 20px 16px;
        border-top: 1px solid var(--glass-border);
        display: flex;
        align-items: center;
        gap: 12px;
        overflow: hidden;
        cursor: pointer;
        transition: var(--transition);
    }

    .profile-img {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        object-fit: cover;
        border: 2px solid var(--primary-light);
        transition: var(--transition);
    }

    .profile-info {
        flex: 1;
        white-space: nowrap;
        transition: var(--transition);
    }

    .profile-name {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-main);
    }

    .profile-email {
        font-size: 12px;
        color: var(--text-muted);
    }

    .sidebar.collapsed .profile-info,
    .sidebar.collapsed .sidebar-footer > svg {
        display: none !important;
    }

    .sidebar.collapsed .profile-img {
        margin: 0 auto;
    }

    .sidebar.collapsed .sidebar-footer {
        justify-content: center;
        padding: 20px 10px;
    }

    .arrow-down {
        transition: var(--transition);
    }
    
    
    element.style{
            color: var(--primary);
    background: var(--primary-light);
    }

.sidebar {
    min-width: unset !important;
    max-width: unset !important;
}

/* YOUR COLLAPSED STATE */
.sidebar.collapsed {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    flex: 0 0 72px !important;
}

/* CONTENT SHIFT FIX */
/*.fixed .sidebar.collapsed + .content-wrapper {*/
/*    margin-left: 72px !important;*/
/*}*/

/* EXPANDED STATE */
/*.fixed .sidebar:not(.collapsed) + .content-wrapper {*/
/*    margin-left: 260px !important;*/
/*}*/
/* Navbar adjustment based on sidebar state */
.fixed .sidebar.collapsed + .content-wrapper .navbar-custom-menu.navbar {
    left: 72px !important;
}
/*.fixed .sidebar:not(.collapsed) + .content-wrapper .navbar-custom-menu.navbar {*/
/*    left: 260px !important;*/
/*}*/

/* PROFILE CARD â€“ ACTIVE GRADIENT */
.profile-card {
    background: var(--active-bg); /* ðŸ‘ˆ same active gradient */
    border-radius: 16px;          /* square with soft edges */
    padding: 14px;
    margin: 14px;
    position: relative;
    color: #fff;
}

/* CARD CONTENT */
.profile-card-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* IMAGE */
.profile-card .profile-img {
    width: 44px;
    height: 44px;
    border-radius: 12px; /* square avatar */
    object-fit: cover;
    background: #fff;
}

/* TEXT */
.profile-card .profile-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.profile-card .profile-role {
    font-size: 11px;
    margin: 0;
    color: rgba(255,255,255,0.8);
}

/* 3 DOT BUTTON */
.profile-menu-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-sidebar-toggle {
    display: none !important;
}

/* Hide search completely in collapsed sidebar */
.sidebar.collapsed .search-container {
    display: none !important;
}


.profile-dropdown {
    position: fixed;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
    min-width: 180px;
    display: none;
    flex-direction: column;
    z-index: 9999;

    /* 🔥 IMPORTANT FIXES */
    box-sizing: border-box;
    align-items: stretch;
}

/* show dropdown */
.profile-dropdown.show {
    display: flex;
}

/* reset all spacing issues */
.profile-dropdown * {
    box-sizing: border-box;
}

/* form reset (THIS WAS THE MAIN ISSUE) */
.profile-dropdown form {
    margin: 0;
    padding: 0;
}

/* dropdown items */
.profile-dropdown a,
.profile-dropdown button {
    margin: 0;                 /* 🔥 IMPORTANT */
    padding: 12px 16px;
    font-size: 13px;
    background: none;
    border: none;
    text-align: left;
    color: #262937;
    cursor: pointer;
    width: 100%;
    line-height: 1.2;          /* 🔥 prevents height growth */
}

/* hover */
.profile-dropdown a:hover,
.profile-dropdown button:hover {
    background: #f1f5ff;
    color: var(--primary);
}


@media (max-width: 767px) {

    /* Wrapper should not reserve sidebar space */
    .wrapper {
        display: block !important;
    }

    /* Sidebar becomes overlay */
    .sidebar {
        position: fixed !important;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
    }

    /* When sidebar is open */
    .sidebar.show {
        left: 0;
    }

    /* 🔥 IMPORTANT: remove fixed layout forcing height */
    body.fixed {
        height: auto !important;
        min-height: auto !important;
    }

    /* Allow content to size naturally */
    .content-wrapper {
        min-height: auto !important;
        height: auto !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
    }
}
@media (min-width: 768px) {

    .fixed .sidebar.collapsed + .content-wrapper {
        margin-left: 72px !important;
    }

    .fixed .sidebar:not(.collapsed) + .content-wrapper {
        margin-left: 260px !important;
    }

    .fixed .sidebar.collapsed + .content-wrapper .navbar-custom-menu.navbar {
        left: 72px !important;
    }

    .fixed .sidebar:not(.collapsed) + .content-wrapper .navbar-custom-menu.navbar {
        left: 260px !important;
    }

}
@media (max-width: 767px) {

    .navbar-custom-menu.navbar {
        display: flex;
        align-items: center;
        gap: 12px;
    }

   .mobile-sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        border: none;
        background: var(--primary-light);
        color: var(--primary);
        width: 40px;
        height: 40px;
        border-radius: 10px;
        font-size: 20px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .mobile-sidebar-toggle:active {
        background: var(--primary);
        color: #fff;
    }

    /* Page title should take remaining space */
    .page-header {
        flex: 1;
        min-width: 0;
    }
    
      /* Hide desktop sidebar toggle button */
    .toggle-btn,
    .sidebar-toggle-icon {
        display: none !important;
    }
     /* Sidebar must ALWAYS be full width on mobile */
    .sidebar {
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
    }

    /* Ignore collapsed state on mobile */
    .sidebar.collapsed {
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
        flex: 0 0 260px !important;
    }
    
     /* Ignore admin template mini sidebar on mobile */
    body.sidebar-mini .sidebar {
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
        flex: 0 0 260px !important;
    }

    /* Even if collapsed class exists, force full width */
    body.sidebar-mini .sidebar.collapsed {
        width: 260px !important;
        min-width: 260px !important;
        max-width: 260px !important;
    }

    /* Show text + search properly */
    body.sidebar-mini .sidebar .nav-text,
    body.sidebar-mini .sidebar .logo-text,
    body.sidebar-mini .sidebar .search-container {
        display: block !important;
    }
    
    
    
    
    
}



