
/* Sidebar: keep its tint, just make it translucent + blurred */

#sidebar {
    width: 250px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--clr-black);
    background-image:
        linear-gradient(rgba(2, 10, 29, 0.42), rgba(2, 10, 29, 0.42)),
        url('../images/banner/sidebar-dark-navy-v1.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-right: 1px solid var(--glass-border);
    color: var(--text-white);
    border-top-color: color-mix(in srgb, var(--clr-black) 72%, var(--text-white) 28%);
    z-index: 999;
    top: 0;
    height: 100vh;
}

/* Keep the brand visible while the navigation list scrolls independently. */
#sidebar > ul {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0 0 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

#sidebar > ul > li > a,
#sidebar > ul > li > a .nav-text,
#sidebar > ul > li > a i,
#sidebar .has-submenu > a::after {
    color: color-mix(in srgb, var(--text-white) 75%, var(--clr-primary-2) 5%) !important;
}

#sidebar .dashboard-sidebar-brand {
    flex: 0 0 68px;
    min-height: 68px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: -8px -10px 16px;
    padding: 0 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--text-white) 16%, transparent);
    background-color: color-mix(in srgb, var(--clr-black) 42%, transparent);
}

#sidebar .dashboard-sidebar-logo {
    display: block;
    min-width: 0;
}

/* .navbar .logo-container {
    display: none !important;

} */

body.hidden-sidebar .logo-container a{
    display: none !important;
}

body.hidden-sidebar .logo-container .toggle-btn {
    margin-inline-start: 0 !important;
}

body.with-sidebar .navbar .right-content > .dashboard-navbar-sidebar-toggle.d-none {
    display: inline-flex !important;
    flex: 0 0 var(--navbar-icon-size);
    align-items: center;
    justify-content: center;
    margin-inline-start: 0 !important;
}

@media (max-width: 768px) {
    body.with-sidebar .navbar .navbar-right-container {
        margin-inline-start: 12px !important;
    }
}

#sidebar .dashboard-sidebar-logo img {
    display: block;
    width: auto;
    max-width: 150px;
    max-height: 45px;
    object-fit: contain;
    object-position: left center;
}

#sidebar > ul::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Hidden by Bootstrap's d-none outside this theme; visual styles live in new-sidebar.css. */
#sidebar .dashboard-sidebar-brand {
    display: flex !important;
}

#sidebar .dashboard-sidebar-toggle {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--text-white);
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--text-white) 36%, transparent);
    border-radius: 50%;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#sidebar .dashboard-sidebar-toggle:hover,
#sidebar .dashboard-sidebar-toggle:focus {
    color: var(--text-white);
    background-color: color-mix(in srgb, var(--text-white) 14%, transparent);
    border-color: color-mix(in srgb, var(--text-white) 62%, transparent);
    outline: none;
}

#sidebar .dashboard-sidebar-toggle:focus-visible {
    outline: 2px solid var(--text-white);
    outline-offset: 2px;
}

#sidebar .dashboard-sidebar-chevron {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

body[dir="rtl"] #sidebar .dashboard-sidebar-chevron {
    transform: rotate(180deg);
}
