
/* ===== Sidebar vertical scrolling / up-down slider ===== */

/* Keep the sidebar fixed to the viewport and allow its navigation area
   to scroll independently when menu items exceed the screen height. */
.sidebar {
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar .brand {
    flex: 0 0 auto;
}

/* The navigation becomes the vertical slider/scroll area. */
.sidebar nav,
.sidebar .sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #f97316 rgba(255, 255, 255, .08);
    padding-bottom: 18px;
}

/* Chrome / Edge / Safari */
.sidebar nav::-webkit-scrollbar,
.sidebar .sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar nav::-webkit-scrollbar-track,
.sidebar .sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .06);
    border-radius: 999px;
}

.sidebar nav::-webkit-scrollbar-thumb,
.sidebar .sidebar-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2563eb, #f97316);
    border-radius: 999px;
    border: 2px solid #0f2a52;
}

.sidebar nav::-webkit-scrollbar-thumb:hover,
.sidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #f97316;
}

/* Optional top/bottom scroll buttons. */
.sidebar-scroll-controls {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 8px 12px 12px;
    background: rgba(5, 20, 40, .34);
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-scroll-btn {
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    color: #dbeafe;
    font-size: 13px;
    font-weight: 800;
    box-shadow: none;
}

.sidebar-scroll-btn:hover {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
}

.sidebar-scroll-btn:disabled {
    opacity: .35;
    cursor: default;
    background: rgba(255, 255, 255, .04);
}

/* Preserve independent scrolling on mobile slide-out sidebar. */
@media (max-width: 900px) {
    .sidebar {
        height: 100dvh;
        max-height: 100dvh;
    }
}
