/* Specific styling for Left Menu Sidebar */

.app-sidebar {
    width: var(--sidebar-width, 250px);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--neu-bg, #e6ecf5);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 5px 0 15px rgba(197, 208, 224, 0.5);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    padding: 1rem 0 1rem 0.85rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.85rem 1rem 0.25rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(200, 210, 225, 0.5);
    width: calc(100% - 0.85rem);
}



.sidebar-logo {
    max-width: 155px;
    height: auto;
}

.sidebar-close-btn {
    display: none;
    background: var(--neu-bg, #e6ecf5);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--neu-text-muted, #6c7a89);
    cursor: pointer;
    box-shadow: 2px 2px 5px #c5d0e0, -2px -2px 5px #ffffff;
    transition: all 0.2s ease;
    flex-shrink: 0;
}



.sidebar-close-btn:active {
    box-shadow: inset 2px 2px 4px #c5d0e0, inset -2px -2px 4px #ffffff;
}



/* Category Section Headers */
.sidebar-category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6d7d93;
    padding: 0.9rem 0.85rem 0.45rem 0.85rem;
    margin-top: 0.15rem;
}

/* Navigation List */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    list-style: none;
    padding: 0 0.85rem 0 0;
    margin: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d9e6 transparent;
}

/* Custom Minimal Scrollbar on Right Edge */
.sidebar-nav::-webkit-scrollbar {
    width: 2px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #d1d9e6;
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #005e85;
}

.sidebar-item {
    width: 100%;
}


/* Compact Nav Links matching mockup */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.35rem 1rem;
    color: #4a5a6c;
    text-decoration: none;
    font-size: 0.77rem;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.sidebar-link i {
    font-size: 1.25rem;
    color: #5c6c80;
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    color: #005e85;
    background-color: rgba(255, 255, 255, 0.4);
}

.sidebar-link:hover i {
    color: #005e85;
}

.sidebar-link.active {
    background: #005e85;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 94, 133, 0.3);
}

.sidebar-link.active i {
    color: #ffffff;
}

/* Submenu Arrow Rotation & Sub-item Styling */
.submenu-arrow {
    display: inline-block !important;
    transition: transform 0.25s ease-in-out !important;
}
.sidebar-link[aria-expanded="true"] .submenu-arrow,
.sidebar-link:not(.collapsed) .submenu-arrow {
    transform: rotate(90deg) !important;
}
.sidebar-link[aria-expanded="false"] .submenu-arrow,
.sidebar-link.collapsed .submenu-arrow {
    transform: rotate(0deg) !important;
}



/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* Responsive Mobile Layout (<= 991.98px) */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
    }

    .sidebar-brand {
        justify-content: space-between;
    }

    .sidebar-close-btn {
        display: flex;
    }

}