.mobile-sidebar-toggle {
    display: none;
}

.mobile-header-menu-toggle,
.header-mobile-more-item {
    display: none !important;
}

@media (max-width: 1024px) {
    html,
    body {
        overflow-x: hidden;
    }

    .page,
    .has-sidebar-left,
    .task-focus-container,
    .task-main-detail-view,
    .container-fluid {
        max-width: 100%;
    }

    .main-sidebar {
        width: 280px;
        max-width: calc(100vw - 32px) !important;
        transform: translateX(-100%) !important;
        z-index: 1045;
    }

    body.sidebar-open .main-sidebar {
        transform: translateX(0) !important;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.28);
    }

    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.28);
        z-index: 1040;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .mobile-sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-right: 0.5rem;
        flex: 0 0 auto;
    }

    .dashboard-topbar {
        z-index: 9999 !important;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .dashboard-topbar .dashboard-topbar-actions {
        width: 100%;
    }

    .dashboard-topbar .dashboard-topbar-nav {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    #app > div:not(.dashboard-sticky),
    .page {
        overflow-x: hidden;
    }

    .dashboard-sticky,
    .dashboard-topbar-shell,
    .dashboard-topbar {
        overflow: visible;
    }

    .dashboard-topbar .header-user-menu,
    .dashboard-topbar .header-notification-menu {
        right: 0;
        left: auto;
        max-width: calc(100vw - 24px);
    }

    .task-details-header .container-fluid > .d-flex {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .task-details-header .title-status-wrapper,
    .task-details-header .header-actions {
        flex-wrap: wrap;
    }

    .task-main-detail-view {
        margin-left: 0;
        margin-right: 0;
    }

    .task-main-detail-view .task-sidebar,
    .task-main-detail-view .task-detail-comm {
        width: 100%;
        max-width: 100%;
    }

    .task-focus-header,
    .task-focus-header .task-focus-meta,
    .task-focus-header .task-focus-header-actions {
        flex-wrap: wrap;
    }

    .partner-queries-page .table-fixed {
        min-width: 960px;
    }
}

@media (max-width: 768px) {
    .mobile-sidebar-toggle {
        margin-right: 0.25rem;
    }

    .header-mobile-more-item {
        display: flex !important;
        align-items: center;
    }

    .mobile-header-menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .dashboard-topbar {
        z-index: 9999 !important;
        flex-wrap: nowrap;
        align-items: center;
        padding: 0.75rem !important;
        gap: 0.5rem;
        overflow: visible !important;
    }

    .dashboard-topbar .dashboard-topbar-actions {
        width: auto;
        margin-left: auto;
        overflow: visible;
    }

    .dashboard-topbar .dashboard-topbar-nav {
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 0.35rem;
        overflow: visible;
    }

    .dashboard-sticky,
    .dashboard-topbar-shell,
    .dashboard-topbar,
    .dashboard-topbar .navbar-custom-menu,
    .dashboard-topbar .header-item,
    .dashboard-topbar .dropdown,
    .dashboard-topbar .dropdown-menu {
        overflow: visible !important;
    }

    .dashboard-topbar .header-mobile-more-item {
        position: static;
    }

    .dashboard-topbar .header-item .btn-danger.btn-sm {
        width: 100%;
    }

    .dashboard-topbar .header-brand-wrap {
        min-width: 0;
        flex: 1 1 auto;
    }

    .dashboard-topbar .header-brand-logo {
        max-width: 130px;
        height: auto;
    }

    .dashboard-topbar .header-item-impersonation,
    .dashboard-topbar .header-item-create-task,
    .dashboard-topbar .header-item-rfq,
    .dashboard-topbar .header-item-todo,
    .dashboard-topbar .header-item-reminder,
    .dashboard-topbar .header-item-theme {
        display: none;
    }

    .dashboard-topbar .header-item-language,
    .dashboard-topbar .header-item-notification,
    .dashboard-topbar .header-item-user,
    .dashboard-topbar .header-mobile-more-item {
        display: flex;
        align-items: center;
    }

    .dashboard-topbar .header-user-menu,
    .dashboard-topbar .header-notification-menu {
        min-width: 0;
        width: 320px;
        max-width: calc(100vw - 24px);
    }

    .mobile-header-menu {
        display: none;
        position: fixed !important;
        width: 240px;
        max-width: calc(100vw - 24px);
        min-width: 220px;
        max-width: calc(100vw - 24px);
        padding: 0.5rem 0;
        z-index: 999999 !important;
        right: 12px !important;
        left: auto !important;
        top: 65px !important;
        transform: none !important;
        will-change: auto;
        margin-top: 0 !important;
        background-color: var(--bg-dropdown, #fff) !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
        border: 1px solid var(--border-color, rgba(0,0,0,0.1)) !important;
        border-radius: 8px !important;
    }

    .dashboard-topbar .header-mobile-more-item.show .mobile-header-menu,
    .dashboard-topbar .mobile-header-menu.show,
    .dropdown.show > .mobile-header-menu {
        display: block !important; visibility: visible !important; opacity: 1 !important;
    }

    .mobile-header-menu .mobile-header-menu-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        padding: 0.65rem 1rem;
        background: transparent;
        border: 0;
    }

    .mobile-header-menu .mobile-header-menu-link i {
        width: 16px;
        text-align: center;
    }

    .comm-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .comm-tab-label {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .task-main-detail-view {
        min-height: 0;
        gap: 0.5rem;
    }

    .task-main-detail-view .task-detail-comm {
        min-height: 60vh;
    }

    .task-focus-container,
    .task-details-header .container-fluid,
    .page > .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .task-focus-header {
        padding: 1rem !important;
    }

    .task-focus-title {
        word-break: break-word;
    }

    .table-responsive {
        border: 0;
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        width: 100%;
        min-width: 0;
    }

    .table-responsive .dataTables_wrapper {
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    div.table-responsive > div.dataTables_wrapper > div.row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    div.dataTables_wrapper div.dataTables_length,
    div.dataTables_wrapper div.dataTables_filter,
    div.dataTables_wrapper div.dataTables_info,
    div.dataTables_wrapper div.dataTables_paginate {
        text-align: left !important;
        width: 100%;
    }

    div#sample_1_info,
    div#sample_1_filter,
    div#sample_1_length {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .partner-queries-page .table-fixed {
        min-width: 840px;
    }
}
