@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    body.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1030;
        display: none;
        background: rgba(0, 0, 0, .45);
    }

    body.sidebar-mobile-open .sidebar-backdrop {
        display: block;
    }

    .main-content,
    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }

    body.sidebar-collapsed .sidebar {
        width: var(--sidebar-width);
    }

    body.sidebar-collapsed .nav-link span,
    body.sidebar-collapsed .nav-link small,
    body.sidebar-collapsed .submenu-caret {
        display: inline;
    }

    body.sidebar-collapsed .nav-link {
        justify-content: flex-start;
    }

    .topbar {
        padding: 10px 14px;
    }

    .user-placeholder span {
        display: none;
    }

    .content-area {
        padding: 16px;
    }
}

@media (max-width: 575.98px) {
    .table-toolbar,
    .pagination-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .table-search {
        max-width: none;
        width: 100%;
    }

    .users-toolbar-controls {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .dashboard-hero {
        padding: 24px 14px;
    }
}

@media (max-width: 767.98px) {
    .desktop-table-section {
        display: none;
    }

    .mobile-records-button {
        display: block;
    }

    .records-modal-content {
        min-height: 95vh;
    }

    .records-modal-body {
        padding: 14px;
    }

    .mobile-search {
        max-width: none;
        width: 100%;
    }

    .actions-cell {
        min-width: 94px;
    }

    .table thead th {
        font-size: .72rem;
    }

    .table td,
    .table th {
        white-space: nowrap;
    }

    .control-hours-heading,
    .projects-heading {
        flex-direction: column;
    }

    .control-hours-note {
        max-width: none;
        width: 100%;
    }

    .control-filter-menu {
        width: min(92vw, 320px);
    }

    .atividades-mobile-cards {
        display: block;
    }

    .atividades-desktop-table {
        display: none;
    }

    .assignment-detail-body {
        max-height: none;
    }

    .assignment-summary-grid {
        grid-template-columns: 1fr;
    }

    .gestor-detail-modal {
        height: 95vh;
    }

    .gestor-detail-toolbar {
        display: block;
    }

    .gestor-detail-desktop,
    .gestor-detail-desktop-search {
        display: none !important;
    }

    .gestor-detail-mobile,
    .gestor-detail-mobile-search {
        display: block !important;
    }

    #projectsModal #recordsMobile {
        display: block;
    }

    .modal-pagamentos-consultores .modal-content {
        height: 100vh;
    }

    .pagamentos-resumo {
        grid-template-columns: 1fr;
    }

    .pagamentos-tabela-wrapper {
        border-radius: 8px;
    }

    .pagamentos-table {
        display: none;
    }

    .payment-mobile-list {
        display: block;
    }

    .financeiro-lancamentos-modal {
        height: 100vh;
    }

    .financeiro-lancamentos-modal .modal-body {
        overflow: auto;
    }

    .modal-summary-row {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .desktop-table-section {
        display: block;
    }

    .mobile-records-button {
        display: none;
    }
}
@media (max-width: 767.98px) {
    .auth-page {
        padding: 14px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-panel {
        gap: 34px;
        padding: 24px;
    }

    .auth-card {
        padding: 26px 22px;
    }
}
