/* MOBILE RESPONSIVE - SIMPLIFIED & WORKING */

/* === DESKTOP (default) === */
.menu-toggle {
    display: none;
}

/* === MOBILE (<= 768px) === */
@media (max-width: 768px) {

    /* HAMBURGER MENU - SHOW IT */
    .menu-toggle {
        display: inline-block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--text-primary);
        cursor: pointer;
        padding: 0.5rem;
        margin-right: auto;
        z-index: 1100;
    }

    .menu-toggle:hover {
        color: var(--primary-color);
    }

    /* SIDEBAR - HIDE OFF-SCREEN BY DEFAULT */
    .sidebar {
        position: fixed !important;
        transform: translateX(-100%) !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 260px !important;
        z-index: 1050 !important;
        transition: transform 0.3s ease !important;
        background: var(--bg-sidebar) !important;
    }

    /* SIDEBAR.SHOW - SLIDE IN */
    .sidebar.show {
        transform: translateX(0) !important;
    }

    /* OVERLAY WHEN SIDEBAR OPEN */
    .sidebar.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    /* CONTENT - NO MARGIN ON MOBILE */
    #content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* TOPBAR */
    .topbar {
        padding: 0 0.75rem !important;
    }

    /* TABLES - ENABLE HORIZONTAL SCROLL */
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: block !important;
    }

    .table-responsive>.table {
        min-width: 800px !important;
    }
}

/* === IDENTITY LAYOUT SPECIFIC === */
.identity-layout .sidebar {
    z-index: 999 !important;
}

.identity-layout #content-wrapper {
    position: relative !important;
    z-index: 1 !important;
}