/* Sidebar overlay for mobile */
#sidebarOverlay {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(33, 37, 41, 0.5);
    transition: opacity 0.3s;
}

/* Sidebar styles */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    width: 280px;
    background: #fff;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s;
    overflow-y: auto;
}

/* Sidebar hidden on mobile by default */
@media (max-width: 992px) {
    #sidebar {
        left: -280px;
    }

    #sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem 0.5rem;
    }
}

/* Layout on desktop */
@media (min-width: 992px) {
    .main-content {
        margin-left: 280px;
        width: calc(100% - 280px);
        padding: 2rem 2rem;
    }
}

/* Sidebar close button (if you use .sidebar-close inside #sidebar) */
#sidebar .sidebar-close {
    display: none;
}

@media (max-width: 992px) {
    #sidebar .sidebar-close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 1.7rem;
        background: none;
        border: none;
        color: #343a40;
        z-index: 2001;
    }
}

/* Prevent mobile toggle button from overlapping content */
@media (max-width: 991.98px) {
    .main-content {
        padding-top: 4rem;
    }
}
