/* ===========================================================================
   06-MODAL.CSS
   Modal de Detalhamento de Despesas / Contas Caixa / Notas Fiscais
   Design Responsivo para Desktop e Bottom-Sheet para Mobile
   =========================================================================== */

/* ===========================================================================
   MODAL DE DESPESAS (DETALHAMENTO DE CONTA CAIXA & NOTAS FISCAIS)
   Design System Moderno, Fluido e Totalmente Responsivo (Desktop & Mobile)
   =========================================================================== */

/* ===========================================================================
   PREVENÇÃO DE SQUEEZE E SALTO DE SCROLL AO ABRIR MODAL
   Impede que o Bootstrap adicione padding-right de 17px que espreme o layout,
   e impede que a tela de fundo salte para o topo (scrollY = 0) ao travar o body.
   =========================================================================== */
html {
    scrollbar-gutter: stable;
}

body.modal-open {
    padding-right: 0px !important;
    overflow-y: scroll !important;
}

.modal {
    overscroll-behavior: contain;
}

/* Modal Container & Backdrop */
.modal-despesas-modern {
    z-index: 1060;
}

.modal-despesas-modern .modal-dialog {
    max-width: 1100px;
    width: 92vw;
    margin: 1.75rem auto;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.modal-despesas-modern .modal-content {
    background-color: var(--group-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Modal Header */
.modal-despesas-modern .modal-header-custom {
    background-color: var(--card-bg) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 16px;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.modal-icon-badge {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: transform 0.2s ease;
}

.modal-icon-badge:hover {
    transform: scale(1.05);
}

.modal-header-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.modal-header-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-group-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.modal-code-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background-color: var(--group-bg);
    color: var(--card-subtext);
    border: 1px solid var(--border-color);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1;
}

.modal-title-text {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--black-text);
    letter-spacing: -0.015em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-header-total-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 8px 16px;
    background-color: var(--group-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    min-width: 150px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.modal-total-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--card-subtext);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal-total-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: #10b981;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

/* Modal Body */
.modal-despesas-modern .modal-body-custom {
    background-color: var(--group-bg) !important;
    padding: 20px 24px;
    max-height: calc(88vh - 120px);
    overflow-y: auto;
}

/* Custom Scrollbar for Modal Body */
.modal-despesas-modern .modal-body-custom::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.modal-despesas-modern .modal-body-custom::-webkit-scrollbar-track {
    background: transparent;
}

.modal-despesas-modern .modal-body-custom::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.modal-despesas-modern .modal-body-custom::-webkit-scrollbar-thumb:hover {
    background: var(--card-subtext);
}

/* Loading State */
.modal-loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.modal-loading-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--black-text);
    margin-top: 18px;
    margin-bottom: 4px;
}

.modal-loading-subtext {
    font-size: 0.85rem;
    color: var(--card-subtext);
}

/* Empty State */
.modal-empty-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px 24px;
    text-align: center;
    background-color: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 14px;
    margin: 10px 0;
}

.modal-empty-icon-box {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background-color: var(--group-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.modal-empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--black-text);
    margin-bottom: 8px;
}

.modal-empty-desc {
    font-size: 0.88rem;
    color: var(--card-subtext);
    max-width: 480px;
    margin-bottom: 18px;
    line-height: 1.5;
}

.modal-empty-tip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--black-text);
}

/* Error State */
.modal-error-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    background-color: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
}

.modal-error-icon-box {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: rgba(239, 68, 68, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.modal-error-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 6px;
}

.modal-error-msg {
    font-size: 0.88rem;
    color: var(--card-subtext);
    max-width: 500px;
    margin: 0;
}

/* Summary Toolbar */
.modal-summary-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.modal-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-toolbar-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-toolbar-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--black-text);
}

.modal-toolbar-subtitle {
    font-size: 0.82rem;
    color: var(--card-subtext);
    margin-left: 6px;
}

.modal-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-btn-pill-subtle {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--card-subtext);
    background-color: var(--group-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-btn-pill-subtle:hover {
    background-color: var(--border-color);
    color: var(--black-text);
    transform: translateY(-1px);
}

/* Accordion Custom Styling */
.modal-accordion-custom .accordion-item {
    background-color: transparent !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-accordion-custom .accordion-item:hover {
    border-color: rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.modal-accordion-custom .accordion-header {
    margin: 0;
}

.modal-accordion-custom .accordion-button {
    background-color: var(--card-bg) !important;
    color: var(--black-text) !important;
    padding: 12px 18px !important;
    box-shadow: none !important;
    border: none !important;
}

.modal-accordion-custom .accordion-button:not(.collapsed) {
    background-color: var(--card-bg) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.modal-accordion-custom .accordion-body {
    background-color: var(--group-bg) !important;
    padding: 12px 14px !important;
}

/* Calendar Day Tile */
.acc-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-right: 12px;
}

.acc-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cal-tile {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(30, 188, 128, 0.12));
    border: 1px solid rgba(59, 130, 246, 0.22);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.cal-tile-month {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--blue-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}

.cal-tile-day {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--black-text);
    line-height: 1;
    margin-top: 2px;
}

.acc-day-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.acc-day-title-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.acc-day-weekday {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--black-text);
}

.acc-day-date {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--card-subtext);
}

.acc-day-count-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--card-subtext);
}

.acc-day-total-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.acc-day-total-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--card-subtext);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.acc-day-total-val {
    font-size: 1.05rem;
    font-weight: 700;
    color: #10b981;
    font-variant-numeric: tabular-nums;
}

/* Transaction Card */
.modal-tx-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    margin-bottom: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.modal-tx-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-color: rgba(59, 130, 246, 0.35);
}

.tx-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.tx-card-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tx-tag-origin {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    line-height: 1.2;
}

.tx-origin-banco {
    background-color: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.tx-origin-caixa {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.tx-origin-pagar {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.tx-origin-rec {
    background-color: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.tx-origin-default {
    background-color: var(--group-bg);
    color: var(--card-subtext);
    border: 1px solid var(--border-color);
}

.tx-tag-doc {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--group-bg);
    color: var(--card-subtext);
    border: 1px solid var(--border-color);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tx-tag-conta {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: rgba(59, 130, 246, 0.08);
    color: var(--blue-500);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tx-status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.tx-status-pago {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.tx-status-pendente {
    background-color: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.tx-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.tx-status-pago .tx-status-dot {
    background-color: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.tx-status-pendente .tx-status-dot {
    background-color: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.tx-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.tx-card-desc-col {
    flex: 1;
    min-width: 0;
}

.tx-fornecedor-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black-text);
    line-height: 1.35;
    word-break: break-word;
}

.tx-card-val-col {
    text-align: right;
    white-space: nowrap;
}

.tx-card-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: #10b981;
    font-variant-numeric: tabular-nums;
}

.tx-card-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    display: flex;
    justify-content: flex-start;
}

.tx-btn-detalhar {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--blue-500);
    background-color: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tx-btn-detalhar:hover {
    background-color: var(--blue-500);
    color: #ffffff;
    border-color: var(--blue-500);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Pagination Box */
.modal-pagination-box {
    background-color: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-pag-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modal-pag-info {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--black-text);
}

.modal-pag-sub {
    font-size: 0.8rem;
    color: var(--card-subtext);
}

.modal-pag-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-btn-action-primary {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--blue-500);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

.modal-btn-action-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.35);
}

.modal-btn-action-secondary {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue-500);
    background-color: transparent;
    border: 1px solid var(--blue-500);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-action-secondary:hover {
    background-color: rgba(59, 130, 246, 0.08);
}

.modal-all-loaded-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--card-subtext);
    margin-top: 14px;
}

/* Detail View (Level 2) */
.modal-btn-back {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--black-text);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.modal-btn-back:hover {
    background-color: var(--group-bg);
    border-color: var(--blue-500);
    color: var(--blue-500);
    transform: translateY(-1px);
}

.doc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.doc-kpi-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.doc-kpi-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background-color: var(--group-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-kpi-data {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.doc-kpi-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--card-subtext);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.doc-kpi-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--black-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.doc-items-header-left {
    display: flex;
    align-items: center;
}

.doc-items-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--black-text);
    margin: 0;
}

.doc-items-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    background-color: rgba(59, 130, 246, 0.12);
    color: var(--blue-500);
    margin-left: 10px;
}

.doc-items-table-wrapper {
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.modal-notice-banner {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    color: var(--black-text);
}

.modal-empty-notice {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    color: var(--card-subtext);
    font-size: 0.9rem;
}

/* ===========================================================================
   RESPONSIVIDADE DO MODAL PARA MOBILE (< 768px)
   Transforma em Bottom-Sheet App-Like Moderno
   =========================================================================== */
@media (max-width: 768px) {
    body.modal-open {
        overflow: hidden !important;
        padding-right: 0px !important;
    }

    .modal-despesas-modern .modal-dialog {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100% !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        transform: translate3d(0, 0, 0) !important;
    }

    .modal-despesas-modern .modal-content {
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100% !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Puxador visual desnecessário em tela cheia */
    .modal-despesas-modern .modal-content::before {
        display: none !important;
    }

    .modal-despesas-modern .modal-header-custom {
        padding: 12px 16px !important;
        flex: 0 0 auto !important;
        border-radius: 0 !important;
    }

    .modal-header-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .modal-header-left {
        width: 100% !important;
        gap: 10px !important;
    }

    .modal-icon-badge {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        border-radius: 10px !important;
    }

    .modal-title-text {
        font-size: 1.05rem !important;
        white-space: normal !important;
        line-height: 1.25 !important;
    }

    .modal-header-total-box {
        width: 100% !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 6px 12px !important;
        min-width: unset !important;
    }

    .modal-despesas-modern .modal-body-custom {
        padding: 14px 12px !important;
        flex: 1 1 auto !important;
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
    }

    /* Toolbar Mobile */
    .modal-summary-toolbar {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 10px 12px !important;
    }

    .modal-toolbar-right {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }

    .modal-btn-pill-subtle {
        flex: 1 !important;
        justify-content: center !important;
        min-height: 40px !important;
    }

    /* Accordion Header Mobile */
    .acc-header-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        padding-right: 6px !important;
    }

    .acc-day-total-box {
        align-items: flex-start !important;
        width: 100% !important;
        padding-top: 4px;
        border-top: 1px dashed var(--border-color);
    }

    .acc-day-total-label {
        display: none !important;
    }

    /* Cards Mobile */
    .modal-tx-card {
        padding: 10px 12px !important;
    }

    .tx-card-body {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .tx-card-val-col {
        width: 100% !important;
        text-align: right !important;
    }

    .tx-btn-detalhar {
        width: 100% !important;
        justify-content: center !important;
        min-height: 42px !important;
    }

    /* Paginação Mobile */
    .modal-pagination-box {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 12px !important;
    }

    .modal-pag-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .modal-btn-action-primary,
    .modal-btn-action-secondary {
        width: 100% !important;
        justify-content: center !important;
        min-height: 44px !important;
    }

    /* KPI Grid Mobile */
    .doc-kpi-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .doc-kpi-card {
        padding: 10px !important;
        gap: 8px !important;
    }

    .doc-kpi-icon {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
    }

    .doc-kpi-value {
        font-size: 0.85rem !important;
    }
}