.hidden {
    display: none !important;
}

/* Multiselect Component */
.multiselect-wrapper {
    position: relative;
    width: 100%;
    min-width: 200px;
}

.multiselect-trigger {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.multiselect-trigger-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.multiselect-trigger .trigger-text {
    flex: 1;
    min-width: 0;
    text-align: left;
    margin-left: 12px;
}

.multiselect-trigger-caret {
    margin-left: 8px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.multiselect-trigger:hover {
    border-color: var(--brand-blue);
}

.multiselect-trigger:focus-visible {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 2px rgba(2, 68, 104, 0.12);
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    z-index: 50;
    overflow: hidden;
}

.multiselect-dropdown.hidden {
    display: none;
}

.multiselect-search {
    width: 100%;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 12px;
    outline: none;
}

.multiselect-options {
    max-height: 200px;
    overflow-y: auto;
}

.multiselect-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 12px;
    color: var(--text-primary);
}

.multiselect-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .multiselect-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.multiselect-actions {
    display: flex;
    justify-content: flex-end;
    padding: 8px;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Buttons */
.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
}

.btn-primary {
    background: var(--brand-blue);
    color: white;
    border: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* KPI Cards Overhaul */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    justify-content: stretch;
    align-items: stretch;
    margin-bottom: 24px;
}

.rc-kpi-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.rc-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.rc-kpi-row .kpi-card {
    margin-bottom: 0;
}

.rc-kpi-row-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1200px) {
    .rc-kpi-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rc-kpi-row-three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .rc-kpi-row,
    .rc-kpi-row-three {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 14px;
        justify-content: start;
    }
}

@media (min-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 320px));
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 520px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.kpi-icon-bg {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Color variations */
.kpi-card[data-color="blue"] .kpi-icon-bg {
    background: rgba(3, 105, 161, 0.1);
    color: #0369a1;
}

.kpi-card[data-color="yellow"] .kpi-icon-bg {
    background: rgba(161, 98, 7, 0.1);
    color: #a16207;
}

.kpi-card[data-color="red"] .kpi-icon-bg {
    background: rgba(185, 28, 28, 0.1);
    color: #b91c1c;
}

.kpi-card[data-color="green"] .kpi-icon-bg {
    background: rgba(21, 128, 61, 0.1);
    color: #15803d;
}

.kpi-card[data-color="purple"] .kpi-icon-bg {
    background: rgba(109, 40, 217, 0.1);
    color: #6d28d9;
}

/* Border accents */
.kpi-card[data-color="red"] {
    border-left: 3px solid #ef4444;
}

.kpi-trend-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(21, 128, 61, 0.1);
    color: #15803d;
}

.kpi-body {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.kpi-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.kpi-unit {
    font-size: 11px;
    color: var(--text-secondary);
}

.kpi-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.kpi-label,
.kpi-unit,
.kpi-subtitle {
    overflow-wrap: break-word;
    word-break: normal;
}

@media (max-width: 768px) {
    .kpi-card {
        padding: 14px;
    }
}

.kpi-sparkline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    opacity: 0.6;
}

/* Filter Button Overhaul */
.btn-filter {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(2, 68, 104, 0.08);
    color: var(--brand-blue);
    box-shadow: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-filter:hover {
    border-color: rgba(2, 68, 104, 0.35);
    background: rgba(2, 68, 104, 0.12);
}

.btn-filter:active {
    transform: translateY(1px);
}

.btn-filter:focus-visible {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 2px rgba(2, 68, 104, 0.12);
}

.btn-filter-text {
    font-size: 14px;
    line-height: 1;
}

.btn-filter-caret {
    transition: transform 0.2s ease;
}

.btn-filter[aria-expanded="true"] .btn-filter-caret,
.btn-filter.is-active .btn-filter-caret {
    transform: rotate(90deg);
}

.active-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 0;
    align-items: center;
}

.filter-header-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.filter-header-left .active-chips-container {
    min-width: 0;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.trend-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
}

.trend-chart-container {
    min-width: 720px;
}

/* Filter Bar */
.filter-header {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-drawer {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    border: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-drawer.hidden {
    display: none;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filter-group-period-custom {
    grid-column: 1 / -1;
}

.filter-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
}

.filter-select {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-control {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-control-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.filter-control-caret {
    position: absolute;
    right: 12px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.filter-select-with-icon {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-left: 40px;
    padding-right: 34px;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 2px rgba(2, 68, 104, 0.12);
    outline: none;
}

.custom-period-panel {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    padding: 12px;
}

.custom-period-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.custom-period-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-period-label {
    margin: 0;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.filter-date-input {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    font-family: var(--font-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-date-input:hover {
    border-color: var(--brand-blue);
}

.filter-date-input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 2px rgba(2, 68, 104, 0.16);
    outline: none;
}

.custom-period-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.custom-period-feedback {
    margin: 0;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-custom-apply {
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: var(--brand-blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.btn-custom-apply:hover:not(:disabled) {
    filter: brightness(1.08);
}

.btn-custom-apply:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-custom-apply:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.custom-period-status-invalid .custom-period-feedback {
    color: #b91c1c;
}

.custom-period-status-invalid .filter-date-input {
    border-color: #ef4444;
}

.custom-period-status-pending .custom-period-feedback {
    color: #a16207;
}

.custom-period-status-applied .custom-period-feedback {
    color: #15803d;
}

[data-theme="dark"] .filter-date-input:focus {
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22);
}

@media (max-width: 640px) {
    .custom-period-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-custom-apply {
        width: 100%;
    }
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.filters-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filters-chips.no-margin {
    margin: 0;
}

.chip {
    padding: 0 10px;
    min-height: 32px;
    background: rgba(3, 105, 161, 0.08);
    color: var(--brand-blue);
    border: 1px solid rgba(3, 105, 161, 0.15);
    border-radius: 999px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chip-remove {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}

.chip-remove svg {
    width: 8px;
    height: 8px;
}

.chip-remove:hover {
    opacity: 1;
}

[data-theme="dark"] .chip {
    background: #0c4a6e;
    color: #e0f2fe;
    border-color: #075985;
}

.text-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.filter-clear-btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-clear-btn:hover {
    color: var(--brand-blue);
}

.filter-clear-btn:focus-visible {
    outline: none;
    color: var(--brand-blue);
}

@media (max-width: 768px) {
    .filter-header {
        align-items: flex-start;
    }

    .filter-clear-btn {
        margin-left: auto;
    }
}

/* Page Loader */
.page-loader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(2px);
    z-index: 200;
}

.page-loader .loader-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.page-loader .loader-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    border-top-color: var(--brand-blue);
    animation: spin 0.8s linear infinite;
}

.page-loader .loader-text {
    font-size: 12px;
    font-weight: 600;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Data Table Component */
.data-table-card {
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.dt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.dt-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dt-export-btn {
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.dt-export-btn:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.dt-results {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.dt-page-size-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.dt-page-size-select {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 12px;
}

.dt-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.dt-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1080px;
}

.dt-th {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--bg-primary) 88%, #dfe6ee 12%);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    white-space: nowrap;
}

.dt-th-right {
    text-align: right;
}

.dt-th-center {
    text-align: center;
}

.dt-sort-btn {
    border: none;
    background: transparent;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.dt-sort-btn-right {
    justify-content: flex-end;
}

.dt-sort-btn-center {
    justify-content: center;
}

.dt-sort-indicator {
    color: var(--text-secondary);
    font-size: 11px;
}

.dt-row:nth-child(even) {
    background: color-mix(in srgb, var(--bg-primary) 92%, #ffffff 8%);
}

.dt-row:hover {
    background: color-mix(in srgb, rgba(2, 68, 104, 0.08) 100%, transparent 0%);
}

[data-theme="dark"] .dt-row:hover {
    background: rgba(56, 189, 248, 0.1);
}

.dt-td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.35;
    vertical-align: top;
}

.dt-td-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dt-td-center {
    text-align: center;
}

.dt-td:first-child {
    font-weight: 600;
    color: #0f2f45;
}

[data-theme="dark"] .dt-th {
    background: color-mix(in srgb, var(--bg-primary) 86%, #1f2c3e 14%);
}

[data-theme="dark"] .dt-td:first-child {
    color: #c8e6ff;
}

.dt-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 18px 12px;
    font-size: 12px;
}

.dt-state-error {
    color: #b91c1c;
}

.dt-lead-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 180px;
}

.dt-lead-cell strong {
    font-size: 12px;
    color: var(--text-primary);
}

.dt-lead-cell span {
    font-size: 11px;
    color: var(--text-secondary);
}

.dt-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.dt-badge-pending {
    border-color: #f59e0b;
    background: #fef3c7;
    color: #92400e;
}

[data-theme="dark"] .dt-badge-pending {
    border-color: #d97706;
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
}

.dt-badge-completed {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
}

[data-theme="dark"] .dt-badge-completed {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

.dt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.dt-info {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.dt-pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dt-page-btn {
    min-width: 30px;
    min-height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 12px;
    padding: 0 8px;
    cursor: pointer;
}

.dt-page-btn:hover:not(:disabled) {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.dt-page-btn.is-active {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #ffffff;
}

.dt-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.dt-page-btn-nav {
    padding: 0 10px;
}

.dt-page-ellipsis {
    color: var(--text-secondary);
    font-size: 12px;
    padding: 0 4px;
}

.dt-link {
    color: var(--brand-blue);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.dt-link:hover {
    border-bottom-color: var(--brand-blue);
}

.dt-pct-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
}

.dt-pct-green {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.dt-pct-yellow {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.dt-pct-red {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

[data-theme="dark"] .dt-pct-green {
    background: rgba(22, 163, 74, 0.2);
    border-color: #4ade80;
    color: #bbf7d0;
}

[data-theme="dark"] .dt-pct-yellow {
    background: rgba(202, 138, 4, 0.22);
    border-color: #facc15;
    color: #fde68a;
}

[data-theme="dark"] .dt-pct-red {
    background: rgba(220, 38, 38, 0.22);
    border-color: #f87171;
    color: #fecaca;
}

@media (max-width: 768px) {
    .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dt-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .dt-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Geo Heatmap (Calidad Fuentes y Producto) */
.geo-heatmap-container {
    width: 100%;
    overflow-x: auto;
}

.geo-heatmap-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.geo-heatmap-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.geo-heatmap-table th,
.geo-heatmap-table td {
    border: 1px solid var(--border-color);
    padding: 6px 8px;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
}

.geo-corner,
.geo-row-header,
.geo-col-header {
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-weight: 600;
}

.geo-row-header {
    text-align: left;
    min-width: 140px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.geo-col-header {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.geo-cell {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    min-width: 52px;
}

.geo-heatmap-table td.geo-cell {
    text-align: right;
}

.heat-lvl-0 {
    background: var(--bg-secondary);
}

.heat-lvl-1 {
    background: rgba(234, 170, 10, 0.12);
}

.heat-lvl-2 {
    background: rgba(234, 170, 10, 0.2);
}

.heat-lvl-3 {
    background: rgba(2, 68, 104, 0.22);
}

.heat-lvl-4 {
    background: rgba(2, 68, 104, 0.3);
}

.heat-lvl-5 {
    background: rgba(2, 68, 104, 0.45);
    color: #ffffff;
}

.geo-legend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.geo-legend-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.geo-legend-swatch {
    width: 16px;
    height: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}
