/* Mobile Navbar - Hidden on Desktop */
.mobile-navbar {
    display: none;
}

/* Mobile Layout */
@media (max-width: 1024px) {

    /* Show mobile navbar */
    .mobile-navbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: var(--bg-sidebar);
        color: white;
        padding: 0 1rem;
        z-index: 1001;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .mobile-menu-btn {
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        padding: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu-btn svg {
        fill: white;
    }

    .mobile-logo {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1rem;
        font-weight: 600;
    }

    .mobile-logo svg {
        fill: var(--primary-color);
    }

    /* Sidebar positioning */
    nav.sidebar {
        position: fixed !important;
        z-index: 2000 !important;
        height: 100vh !important;
        width: 260px !important;
        top: 0 !important;
        left: -260px !important;
        background-color: #0f172a !important;
        transition: left 0.3s ease !important;
        display: flex !important;
        flex-direction: column !important;
        padding-top: 60px !important;
        visibility: visible !important;
    }

    nav.sidebar.open {
        left: 0 !important;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.5) !important;
    }

    nav.sidebar .nav-menu {
        display: block !important;
        width: 100% !important;
        margin-top: 1rem !important;
    }

    nav.sidebar .nav-item {
        display: block !important;
        width: 100% !important;
    }

    nav.sidebar .nav-link {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        justify-content: flex-start !important;
        padding: 1rem 1.5rem !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    nav.sidebar .nav-link span {
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-left: 10px !important;
        font-size: 1rem !important;
        color: #e2e8f0 !important;
        width: auto !important;
    }

    nav.sidebar .nav-link svg {
        min-width: 24px !important;
        min-height: 24px !important;
        display: block !important;
        margin-right: 0 !important;
    }

    /* Main content positioning */
    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 60px !important;
        z-index: 1 !important;
    }

    /* Overlay when sidebar is open */
    /* Overlay when sidebar is open */
    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        /* Below sidebar (2000), above content */
        cursor: pointer;
        pointer-events: auto !important;
    }

    body.sidebar-open #sidebar-overlay {
        display: block !important;
    }

    /* Hide desktop logo in sidebar on mobile */
    .sidebar .logo {
        display: none !important;
    }
}