.main-header {
    z-index: 1000 !important;
}

.help-block {
    color: #a94442;
    display: block;
}

.error-message .help-block {
    display: block;
}

.flag-text {
    margin-left: 10px;
}

.has-success > input {
    border-color: #28a745;
}

.has-error > input {
    border-color: #dc3545;
}

.select2-container--bootstrap .select2-selection--single {
    height: calc(1.5em + .5rem + 2px);
    font-size: 0.875rem;
    line-height: 1.5;
}
.select2-container--bootstrap .select2-selection--single .select2-selection__rendered {
    line-height: 1.3;
}
.select2-container--bootstrap .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + .5rem + 2px);
}

/* 
default if 1050, this is when membership modal is also visible to make ubo above it 
it's also not 1051.. because the select2 dropdown uses 1051 :-)
*/
#modal-new-ubo {
    z-index: 1052; 
}

.uppy-Dashboard-Item-preview {
    display: none !important;
}

#table-mpans td {
    padding: 0.5rem;
}

/* readonly inputs don't look great with default background */
.flatpickr-input {
    background-color: #ffffff !important;
}

#supplier-allocation-table tfoot tr.summary-metric-start td,
#supplier-allocation-nbp-table tfoot tr.summary-metric-start td {
    border-top: 3px solid #9aa4af;
}

#supplier-allocation-table tfoot tr.summary-metric-row td:first-child,
#supplier-allocation-nbp-table tfoot tr.summary-metric-row td:first-child {
    text-align: right;
}

#supplier-allocation-table tfoot tr.summary-metric-header th,
#supplier-allocation-nbp-table tfoot tr.summary-metric-header th {
    background-color: #dde3ea;
    color: #495057;
    font-size: 0.85em;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
    border-top: 3px solid #9aa4af;
}

#supplier-allocation-table tfoot tr.summary-metric-header th.summary-metric-total-header,
#supplier-allocation-nbp-table tfoot tr.summary-metric-header th.summary-metric-total-header {
    white-space: nowrap;
    cursor: help;
}

.summary-metric-total-icon {
    font-size: 0.85em;
    opacity: 0.85;
}


#supplier-allocation-table tfoot tr.summary-metric-row.summary-metric-note-row td,
#supplier-allocation-nbp-table tfoot tr.summary-metric-row.summary-metric-note-row td {
    background-color: #ffffff !important;
    color: #6c757d !important;
    font-size: 0.85em !important;
    font-style: normal !important;
    font-weight: normal !important;
    text-align: left !important;
    padding: 0.5rem 0.75rem !important;
    border: 0 !important;
    border-top: 1px solid #dee2e6 !important;
    line-height: 1.5 !important;
}

#supplier-allocation-table tfoot tr.summary-metric-row.summary-metric-note-row + tr.summary-metric-row.summary-metric-note-row td,
#supplier-allocation-nbp-table tfoot tr.summary-metric-row.summary-metric-note-row + tr.summary-metric-row.summary-metric-note-row td {
    border-top: 0 !important;
    padding-top: 0 !important;
}

#supplier-allocation-table tfoot tr.summary-metric-note-row td .fa-circle-info,
#supplier-allocation-nbp-table tfoot tr.summary-metric-note-row td .fa-circle-info {
    margin-right: 0.5rem;
}

.report-settings-split-card .card-header {
    border-bottom-color: #d8dee6;
}

.report-settings-split-toggle {
    margin-left: 1rem;
}

.report-settings-split-toggle .custom-control-label {
    font-weight: 500;
}

.report-settings-split-card .card-body {
    padding: 1.5rem;
}

.report-settings-split-body-disabled {
    opacity: 0.72;
}

.report-settings-split-intro {
    max-width: 56rem;
    margin-bottom: 1.5rem !important;
    line-height: 1.45;
}

.report-settings-split-main {
    align-items: flex-start;
    row-gap: 1rem;
}

.report-settings-split-main > [class*="col-"] > .form-group {
    margin-bottom: 0;
}

.report-settings-split-preview-col {
    display: flex;
    align-items: flex-end;
}

.report-settings-split-preview {
    width: 100%;
    min-height: 0;
    padding: 1rem 1.15rem;
    border: 1px solid #d8dee6;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.report-settings-split-label {
    margin-bottom: 0.45rem;
    color: #5f6b7a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.report-settings-split-value {
    color: #1f2937;
    margin-top: 0.35rem;
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1;
}

.report-settings-split-value.text-success {
    color: #28a745;
}

.report-settings-split-value.text-danger {
    color: #dc3545;
}

.report-settings-split-note {
    margin-top: 0.9rem;
}

.report-settings-split-card .invalid-feedback {
    display: block;
}

.report-settings-split-card .invalid-feedback:empty {
    display: none;
}

.report-settings-split-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #edf1f5;
    gap: 0.75rem 1rem;
}

.report-settings-split-actions p {
    max-width: 44rem;
    line-height: 1.4;
}

.report-settings-split-actions > * {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .report-settings-split-toggle {
        margin-left: 0;
        margin-top: 0.75rem;
    }

    .report-settings-split-card .card-body {
        padding: 1.25rem;
    }

    .report-settings-split-preview-col {
        display: block;
        margin-top: 1rem;
    }

    .report-settings-split-actions {
        margin-top: 1.25rem;
        padding-top: 1rem;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .report-settings-split-preview,
    .report-settings-split-value,
    .report-settings-split-actions .btn {
        transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
    }
}
