/* Modern Matrix RMS UI layer.
   Presentation only: no data model, routing, or API assumptions live here. */

:root {
    --mx-brand: #0c2d57;
    --mx-brand-light: #1a3f6f;
    --mx-brand-dark: #081e3d;
    --mx-brand-bg: rgba(12, 45, 87, 0.06);
    --mx-brand-bg-hover: rgba(12, 45, 87, 0.1);
    --mx-accent: #17a2b8;
    --mx-success: #10b981;
    --mx-warning: #f59e0b;
    --mx-danger: #ef4444;
    --mx-surface: #ffffff;
    --mx-bg: #f8fafc;
    --mx-border: #f1f5f9;
    --mx-border-2: #e2e8f0;
    --mx-text: #0f172a;
    --mx-text-secondary: #475569;
    --mx-text-muted: #556478;
    --mx-radius: 0.85rem;
    --mx-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --mx-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    --mx-shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.14);
}

body {
    background: var(--mx-bg) !important;
    color: var(--mx-text);
    font-family: "Inter", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-main,
.app-content {
    background: var(--mx-bg) !important;
}

.app-header {
    border: 0 !important;
    box-shadow: var(--mx-shadow-sm) !important;
    min-height: 70px;
}

.app-header .nav-link {
    color: var(--mx-text-secondary) !important;
    font-weight: 700;
}

.matrix-sidebar-toggle {
    border: 0;
    background: transparent;
    min-height: 2.4rem;
    min-width: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
}

.matrix-sidebar-toggle:hover,
.matrix-sidebar-toggle:focus {
    background: var(--mx-brand-bg-hover);
}

.matrix-sidebar-toggle:focus-visible {
    outline: 2px solid var(--mx-brand);
    outline-offset: 2px;
}

.app-sidebar {
    background: linear-gradient(180deg, var(--mx-brand-dark) 0%, #111827 100%) !important;
}

.app-sidebar .sidebar-brand {
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    padding: 1rem 0.8rem !important;
}

.app-sidebar .nav-link {
    color: rgba(255,255,255,0.72) !important;
    border-radius: 0.6rem;
    margin: 2px 10px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.18s ease;
}

.app-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.09) !important;
    color: #fff !important;
}

.app-sidebar .nav-link.active {
    background: linear-gradient(135deg, #0d6efd, #0c2d57) !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.24);
}

.app-sidebar .nav-header {
    color: #a4b7cf !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.16em !important;
    font-weight: 900 !important;
    padding: 1.1rem 1.35rem 0.45rem !important;
}

.card,
.list-card {
    background: var(--mx-surface);
    border: 1px solid var(--mx-border) !important;
    border-radius: 1rem !important;
    box-shadow: var(--mx-shadow-sm) !important;
    overflow: hidden;
}

.card:hover,
.list-card:hover {
    box-shadow: var(--mx-shadow) !important;
}

.card-header {
    background: var(--mx-surface) !important;
    border-bottom: 1px solid var(--mx-border) !important;
}

.content-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-title {
    margin: 0;
    color: var(--mx-text);
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.page-subtitle {
    margin: 0.25rem 0 0;
    color: var(--mx-text-secondary);
    font-size: 0.95rem;
}

.btn-primary-pill,
.btn-dark.btn-primary-pill {
    background: var(--mx-brand) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 0.8rem !important;
    padding: 0.65rem 1.35rem !important;
    font-size: 0.86rem;
    font-weight: 850;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 8px 20px rgba(12,45,87,0.22);
    transition: all 0.18s ease;
}

.btn-primary-pill:hover {
    background: var(--mx-brand-light) !important;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(12,45,87,0.28);
}

.search-panel {
    background: var(--mx-surface);
    border: 1px solid var(--mx-border);
    border-radius: 1rem;
    box-shadow: var(--mx-shadow-sm);
    padding: 0.85rem;
    margin-bottom: 1rem;
}

.search-wrap {
    position: relative;
}

.search-wrap i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mx-text-muted);
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    min-height: 2.65rem;
    border-radius: 0.85rem !important;
    border: 2px solid var(--mx-border-2) !important;
    background: #fff !important;
    padding: 0.5rem 1rem 0.5rem 2.55rem !important;
    color: var(--mx-text) !important;
    font-weight: 750 !important;
    outline: none;
}

.search-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--mx-brand) !important;
    box-shadow: 0 0 0 4px rgba(12,45,87,0.09) !important;
}

.form-control,
.form-select {
    border-radius: 0.8rem !important;
    border: 2px solid var(--mx-border-2) !important;
    color: var(--mx-text) !important;
    font-weight: 700 !important;
}

.matrix-table,
.list-table {
    width: 100%;
    margin-bottom: 0;
}

.matrix-table thead th,
.list-table thead th,
.table thead th {
    background: var(--mx-bg) !important;
    color: var(--mx-text-muted) !important;
    border-bottom: 2px solid var(--mx-border) !important;
    font-size: 0.68rem !important;
    font-weight: 750 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase !important;
    padding: 1rem 1.25rem !important;
    white-space: nowrap;
}

.matrix-table tbody td,
.list-table tbody td,
.table tbody td {
    border-top: 1px solid var(--mx-border) !important;
    padding: 1rem 1.25rem !important;
    vertical-align: middle !important;
}

.matrix-table tbody tr:hover,
.list-table tbody tr:hover,
.table-hover tbody tr:hover {
    background: var(--mx-brand-bg) !important;
}

.finance-dash-kpi {
    min-height: 132px;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1.15rem;
    background: var(--mx-surface);
    border: 1px solid var(--mx-border);
    border-radius: 1rem;
    box-shadow: var(--mx-shadow-sm);
}

.finance-dash-kpi-icon,
.finance-activity-icon {
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    font-size: 1.15rem;
}

.finance-dash-kpi-label {
    color: var(--mx-text-muted);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.finance-dash-kpi-value {
    color: var(--mx-text);
    font-size: 1.45rem;
    line-height: 1.2;
    font-weight: 950;
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.finance-dash-kpi-subtext {
    color: var(--mx-text-secondary);
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.finance-bar-chart {
    min-height: 250px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.finance-bar-column {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.45rem;
    height: 240px;
    text-align: center;
}

.finance-bar-track {
    display: flex;
    align-items: end;
    justify-content: center;
    min-height: 160px;
    border-radius: 0.9rem;
    background: var(--mx-brand-bg);
    overflow: hidden;
}

.finance-bar-fill {
    width: 100%;
    border-radius: 0.9rem 0.9rem 0 0;
    background: linear-gradient(180deg, var(--mx-brand-light), var(--mx-brand));
    min-height: 0;
}

.finance-bar-value,
.finance-bar-label {
    color: var(--mx-text-secondary);
    font-size: 0.72rem;
    font-weight: 850;
    white-space: nowrap;
}

.finance-progress {
    height: 0.7rem;
    border-radius: 999px;
    background: var(--mx-border);
    overflow: hidden;
}

.finance-progress-fill {
    height: 100%;
    min-width: 0.35rem;
    border-radius: 999px;
}

.finance-status-tile {
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--mx-border);
    border-radius: 0.85rem;
    background: #fbfcfd;
}

.finance-attention-row,
.finance-activity-row,
.finance-readiness-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--mx-border);
    border-radius: 0.85rem;
    background: #fff;
    color: var(--mx-text);
    text-decoration: none;
}

button.finance-attention-row,
button.finance-activity-row {
    text-align: left;
}

.finance-attention-row:hover,
.finance-activity-row:hover {
    border-color: var(--mx-brand);
    box-shadow: var(--mx-shadow-sm);
}

.finance-attention-dot {
    width: 0.75rem;
    height: 0.75rem;
    flex: 0 0 auto;
    border-radius: 999px;
}

.finance-accent-primary {
    background: rgba(13, 110, 253, 0.12);
    color: #0b5ed7;
}

.finance-accent-success {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

.finance-accent-warning {
    background: rgba(245, 158, 11, 0.16);
    color: #92400e;
}

.finance-accent-danger {
    background: rgba(239, 68, 68, 0.13);
    color: #b91c1c;
}

.finance-accent-info {
    background: rgba(23, 162, 184, 0.14);
    color: #0e7490;
}

.finance-accent-secondary {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

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

@media (max-width: 991.98px) {
    .app-wrapper .app-sidebar {
        position: fixed !important;
        inset: 0 auto 0 0;
        width: min(280px, 82vw);
        margin-left: 0 !important;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        z-index: 1050;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .app-wrapper.sidebar-mobile-open .app-sidebar {
        margin-left: 0 !important;
        transform: translateX(0);
        visibility: visible;
    }

    .app-wrapper.sidebar-mobile-open .app-header,
    .app-wrapper.sidebar-mobile-open .app-main {
        margin-left: 0 !important;
    }

    .sidebar-mobile-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1040;
        display: block;
        border: 0;
        padding: 0;
        background: rgba(15, 23, 42, 0.5);
    }

    .app-header {
        position: sticky;
        top: 0;
        z-index: 1030;
    }
}

@media (min-width: 992px) {
    .sidebar-mobile-backdrop {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .content-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .content-header-row > .d-flex,
    .card-header > .d-flex {
        width: 100%;
    }

    .content-header-row .btn,
    .content-header-row .btn-primary-pill {
        justify-content: center;
        width: 100%;
    }

    .page-title {
        font-size: 1.35rem;
    }

    .page-subtitle {
        font-size: 0.88rem;
    }

    .list-card .card-footer,
    .card-footer {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .pagination {
        justify-content: center;
    }

    .finance-dash-kpi {
        min-height: auto;
        padding: 0.95rem;
    }

    .finance-dash-kpi-value {
        font-size: 1.25rem;
    }

    .finance-bar-chart {
        min-height: 200px;
        gap: 0.45rem;
    }

    .finance-bar-column {
        height: 190px;
    }

    .finance-bar-track {
        min-height: 120px;
    }

    .finance-bar-value,
    .finance-bar-label {
        font-size: 0.66rem;
    }

    .finance-attention-row,
    .finance-activity-row,
    .finance-readiness-row {
        align-items: flex-start;
        padding: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .matrix-table,
    .list-table,
    .table {
        font-size: 0.86rem;
    }

    .matrix-table thead th,
    .list-table thead th,
    .table thead th,
    .matrix-table tbody td,
    .list-table tbody td,
    .table tbody td {
        padding: 0.75rem 0.85rem !important;
    }

    .search-input,
    .form-control,
    .form-select {
        min-height: 2.75rem;
    }

    .btn,
    .btn-primary-pill {
        min-height: 2.55rem;
    }

    .finance-progress {
        height: 0.85rem;
    }

    .finance-mobile-actionbar,
    .finance-mobile-actiongroup {
        width: 100%;
        align-items: stretch !important;
    }

    .finance-mobile-actiongroup,
    .finance-mobile-actiongroup .btn {
        flex: 1 1 100%;
    }

    .finance-mobile-actiongroup .btn {
        width: 100%;
        justify-content: center;
    }
}

.badge {
    border-radius: 2rem !important;
    font-size: 0.72rem !important;
    font-weight: 850 !important;
    letter-spacing: 0.02em;
    padding: 0.38em 0.75em !important;
}

.badge.bg-success,
.badge.bg-primary,
.badge.bg-info,
.badge.bg-warning,
.badge.bg-danger,
.badge.bg-secondary {
    box-shadow: none !important;
}

.badge.bg-info {
    background: rgba(23,162,184,0.13) !important;
    color: #0e7490 !important;
    border: 1px solid rgba(23,162,184,0.2);
}

.badge.bg-warning {
    background: rgba(245,158,11,0.14) !important;
    color: #b45309 !important;
    border: 1px solid rgba(245,158,11,0.22);
}

.badge.bg-success {
    background: rgba(16,185,129,0.14) !important;
    color: #047857 !important;
    border: 1px solid rgba(16,185,129,0.22);
}

.badge.bg-danger {
    background: rgba(239,68,68,0.13) !important;
    color: #b91c1c !important;
    border: 1px solid rgba(239,68,68,0.22);
}

.badge.bg-secondary {
    background: rgba(100,116,139,0.12) !important;
    color: #475569 !important;
}

.action-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.icon-btn {
    border: 1px solid var(--mx-border-2);
    background: #fff;
    color: var(--mx-text-secondary);
    width: 2.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.icon-btn:hover {
    background: var(--mx-brand);
    border-color: var(--mx-brand);
    color: #fff;
    transform: translateY(-1px);
}

.matrix-modal-section,
.wizard-card {
    background: rgba(248,250,252,0.72);
    border: 2px solid rgba(241,245,249,0.9);
    border-radius: 1.25rem;
    padding: 1.15rem;
}

.wizard-label {
    color: var(--mx-brand);
    display: block;
    font-size: 0.66rem;
    font-weight: 950;
    letter-spacing: 0.15em;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.wizard-total-card {
    background: var(--mx-brand-bg);
    border: 2px solid rgba(12,45,87,0.08);
    border-radius: 1.15rem;
    padding: 1rem;
}

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

:where(a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .matrix-workspace *, .pos-mode *, .matrix-dialog * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.auth-shell {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: radial-gradient(ellipse at 15% 0%, #dce8f7 0%, transparent 55%), #f0f4f9;
}
.auth-card { width: min(100%, 29rem); }
.auth-card-body { padding: clamp(1.2rem, 6vw, 2.6rem); }
.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: 1.25rem;
    color: var(--mx-brand);
    font-weight: 800;
}
.auth-badge i {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    background: var(--mx-brand-dark);
    color: #f8d676;
    border-radius: .55rem;
}
.auth-card .form-label { font-weight: 650; color: #334155; font-size: .9rem; }
.auth-submit { min-height: 3rem; font-weight: 750; }

.dashboard-stat {
    height: 100%;
    min-width: 0;
    color: var(--mx-text);
    background: white;
    border: 1px solid #dce4ee;
    border-top: .25rem solid var(--stat-accent);
    box-shadow: var(--mx-shadow-sm);
    padding: clamp(.9rem, 2vw, 1.35rem);
    border-radius: .9rem;
}
.dashboard-stat-blue { --stat-accent: #285ba4; }
.dashboard-stat-teal { --stat-accent: #0d766f; }
.dashboard-stat-amber { --stat-accent: #a66315; }
.dashboard-stat-red { --stat-accent: #b43e4a; }
.dashboard-stat .label { color: #475569; font-size: .75rem; letter-spacing: .035em; opacity: 1; }
.dashboard-stat .value { font-size: clamp(1.55rem, 3vw, 2.3rem); overflow-wrap: anywhere; }
.dashboard-stat .subtext { color: #475569; opacity: 1; }
.dashboard-revenue-chart { height: clamp(13rem, 29vw, 19rem); min-width: 0; }
.dashboard-ranked-list { margin: .45rem 0 0; padding: 0; list-style: none; }
.dashboard-ranked-list li, .dashboard-ranked-list div {
    display: flex; justify-content: space-between; gap: .75rem;
    padding: .65rem 0; border-bottom: 1px solid #e2e8f0;
}
.dashboard-ranked-list dd { margin: 0; font-variant-numeric: tabular-nums; }

.invoice-context { display:grid; grid-template-columns:repeat(auto-fit,minmax(12rem,1fr)); gap:.75rem; }
.receipt-sheet { width:80mm!important; max-width:100%!important; padding:5mm!important; border-radius:0!important; font-size:11px; color:#111; }
.receipt-sheet .document-sheet-header { display:block; padding-bottom:3mm; }
.receipt-sheet .document-company-wrap { display:block; }
.receipt-sheet .document-title { font-size:18px; }
.receipt-sheet .document-meta { min-width:0; margin-top:3mm; gap:1mm; }
.receipt-sheet .document-meta-row { padding:1mm 0; border:0; background:none; border-radius:0; }
.receipt-sheet .document-company-line { font-size:10px; }
.receipt-sheet .document-company-logo { width:40px; }
.receipt-sheet .document-subtitle { display:none; }
.receipt-sheet .invoice-context { display:block; }
.receipt-sheet .document-highlight-card { border:0; padding:1mm 0; background:none; }
.receipt-sheet .document-highlight-label { display:inline; font-size:10px; margin-right:2mm; }
.receipt-sheet .document-highlight-value { display:inline; font-size:11px; }
.receipt-line { padding:2mm 0; border-bottom:1px dashed #aaa; break-inside:avoid; overflow-wrap:anywhere; }
.receipt-line div { display:flex; flex-wrap:wrap; justify-content:space-between; font-variant-numeric:tabular-nums; gap:1mm; }
.receipt-sheet .pos-totals { margin-top:3mm; }
.document-print-toolbar { flex-wrap:wrap; }
.document-print-toolbar select { width:auto; max-width:100%; }
.table-responsive { max-width:100%; }
.table td { overflow-wrap:anywhere; }

/* Workflow confirmations belong in a top-layer dialog, never in a table cell. */
.document-workflow, .document-workflow-buttons {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    vertical-align: middle;
}
.document-workflow-buttons { flex-wrap: nowrap; }
.document-workflow-buttons .btn { white-space: nowrap; min-height: 2.1rem; }
.document-workflow-note { color: #526176; font-size: .75rem; white-space: nowrap; }
.workflow-confirmation { font-weight: 400; font-size: 1rem; white-space: normal; overflow-wrap: normal; }
.workflow-confirmation textarea { min-height: 7rem; resize: vertical; font-weight: 400 !important; line-height: 1.5; }
.workflow-confirmation-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.workflow-confirmation-actions .btn { min-height: 2.75rem; padding-inline: 1.25rem; white-space: nowrap; }
.document-list-table { min-width: 58rem; table-layout: auto; }
.document-list-table td:first-child, .document-list-table td:nth-child(2),
.matrix-table td.text-end, .document-list-table td.text-end { white-space: nowrap; overflow-wrap: normal; font-variant-numeric: tabular-nums; }
.document-list-table td:last-child { white-space: nowrap; }
.document-row-actions { display: inline-flex; align-items: center; gap: .45rem; }
.search-bar-strip label { color: #526176 !important; font-weight: 600; margin-bottom: .35rem; }
.document-list-table td.document-party { min-width: 12rem; max-width: 20rem; overflow-wrap: break-word; white-space: normal; }
.table.document-list-table tbody td { padding: .8rem 1rem !important; }
.finance-payables-table td.text-end, .finance-payables-table button { white-space: nowrap; overflow-wrap: normal; }
.finance-payables-table input { min-width: 8rem; }
.count-entry-table { min-width: 48rem; }
.count-entry-table td:nth-child(2) { min-width: 18rem; max-width: 24rem; }
.count-entry-table td:not(:nth-child(2)) { white-space: nowrap; }
.count-entry-table input { min-width: 7rem; }
.document-detail-table { min-width: 48rem; }
.document-detail-table input, .document-detail-table select { min-width: 6rem; }
.document-detail-table select { min-width: 9rem; }
.document-detail-table .document-item { min-width: 16rem; max-width: 24rem; white-space: normal; overflow-wrap: anywhere; }
.item-catalog-table { min-width: 60rem; }
.item-catalog-table td:first-child, .item-catalog-table td:last-child { white-space: nowrap; }
.item-catalog-table td:nth-child(2) { min-width: 16rem; max-width: 24rem; overflow-wrap: anywhere; }
.stock-report-table { min-width: 76rem; }
.stock-report-table td:first-child { min-width: 18rem; max-width: 24rem; }
.stock-report-table td.text-end { white-space: nowrap; }
.stock-history-table { min-width: 75rem; }
.stock-history-table td:nth-child(3) { white-space: nowrap; }
.matrix-dialog fieldset:not(:has(legend)) { min-width: 0; margin: 0; padding: 0; border: 0; }
.document-detail-table td.text-end { white-space: nowrap; font-variant-numeric: tabular-nums; }
.validation-message { color: #b42318; font-size: .85rem; margin-top: .25rem; }
.finance-payables-table td:last-child { position: sticky; right: 0; background: white; box-shadow: -1px 0 #e7edf5; }
.payment-lines-table .line-action-col, .payment-lines-table .line-actions-cell { width: 132px; }
.payment-lines-table .line-actions-cell .btn { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 575.98px) {
    .workflow-confirmation-actions { flex-direction: column-reverse; }
    .workflow-confirmation-actions .btn { width: 100%; }
}
.card-body, .app-content, .app-main { min-width:0; }
@media (max-width:575.98px) {
  .card-header { padding:1rem!important; }
  .card-header .d-flex { flex-wrap:wrap; gap:.5rem; }
  .search-panel .row, .search-bar-strip .row { row-gap:.6rem; }
  .pagination { flex-wrap:wrap; }
  .document-sheet { overflow-x:auto; }
}
