:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #344054;
    background: #f5f7fb;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
    background: #f5f7fb;
}

body {
    font-size: 0.94rem;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: #275dca;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(74, 134, 232, 0.4);
    outline-offset: 2px;
}

.content {
    padding-top: 0;
}

.blazor-error-boundary {
    padding: 1rem 1rem 1rem 3.7rem;
    color: #fff;
    background: #b42318;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* Cash and bank workspace */
.cash-page, .cash-form-page, .cash-details-page, .cash-transactions-page { display: grid; gap: 1rem; }
.cash-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }
.cash-summary-card, .cash-detail-summary > div { padding: 1rem 1.1rem; background: #fff; border: 1px solid #e4e9f0; border-radius: 0.85rem; box-shadow: 0 7px 22px rgba(16, 24, 40, 0.035); }
.cash-summary-card .summary-label, .cash-detail-summary span { display: block; color: #667085; font-size: 0.73rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.cash-summary-card strong { display: block; margin-top: 0.35rem; color: #172235; font-size: 1.18rem; }
.cash-summary-card.summary-highlight { background: #eff6ff; border-color: #cfe0fb; }
.cash-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 0.65rem; padding: 0.85rem; background: #fff; border: 1px solid #e4e9f0; border-radius: 0.85rem; }
.cash-toolbar > .filter-control { min-width: 10rem; flex: 1 1 12rem; }
.filter-control { min-height: 2.45rem; padding: 0.45rem 0.65rem; color: #344054; background: #fff; border: 1px solid #d8e0ea; border-radius: 0.55rem; }
.cash-toolbar .date-filter { display: grid; gap: 0.2rem; color: #667085; font-size: 0.72rem; font-weight: 700; }
.cash-toolbar .date-filter .filter-control { min-width: 9.5rem; }
.cash-table-card, .cash-detail-card { overflow: hidden; background: #fff; border: 1px solid #e4e9f0; border-radius: 0.9rem; box-shadow: 0 7px 22px rgba(16, 24, 40, 0.035); }
.cash-table-card .table-card-heading, .cash-detail-card .table-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid #eef1f5; }
.cash-table-card h2, .cash-detail-card h2 { margin: 0; color: #172235; font-size: 1rem; }
.cash-table-card .table-card-heading p { margin: 0.18rem 0 0; color: #667085; font-size: 0.8rem; }
.table-context { color: #667085; font-size: 0.74rem; }
.table-scroll { overflow-x: auto; }
.cash-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.cash-table th { padding: 0.7rem 0.85rem; color: #667085; background: #fafbfc; font-size: 0.7rem; letter-spacing: 0.04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.cash-table td { padding: 0.8rem 0.85rem; color: #475467; border-top: 1px solid #eef1f5; font-size: 0.82rem; vertical-align: middle; }
.cash-table td strong { display: block; color: #172235; }
.cash-table .item-code { display: block; margin-top: 0.1rem; color: #98a2b3; font-size: 0.7rem; }
.current-balance { color: #172235 !important; font-weight: 750; white-space: nowrap; }
.row-actions { white-space: nowrap; }
.text-action { margin-right: 0.55rem; padding: 0; color: #275dca; background: transparent; border: 0; font-size: 0.78rem; text-decoration: none; cursor: pointer; }
.text-action:hover { color: #17459f; text-decoration: underline; }
.type-pill, .status-pill { display: inline-block; padding: 0.25rem 0.55rem; border-radius: 999px; font-size: 0.68rem; font-weight: 750; white-space: nowrap; }
.type-pill { color: #475467; background: #f2f4f7; }
.in-pill { color: #25734f; background: #e8f7ef; }
.out-pill { color: #b42318; background: #fff0f0; }
.status-active { color: #25734f; background: #e8f7ef; }
.status-inactive { color: #667085; background: #f2f4f7; }
.money-in-text { color: #25734f !important; font-weight: 700; white-space: nowrap; }
.money-out-text { color: #b42318 !important; font-weight: 700; white-space: nowrap; }
.cash-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }
.cash-detail-summary strong { display: block; margin-top: 0.35rem; color: #172235; font-size: 1.05rem; }
.cash-detail-summary .detail-total { background: #eff6ff; border-color: #cfe0fb; }
.details-heading-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: end; gap: 0.55rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0.5rem 1.1rem 1.1rem; }
.detail-grid > div { padding: 0.75rem 0; border-bottom: 1px solid #eef1f5; }
.detail-grid .detail-wide { grid-column: 1 / -1; }
.detail-grid dt { color: #667085; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.detail-grid dd { margin: 0.25rem 0 0; color: #172235; font-size: 0.88rem; }
.form-check-field { align-self: center; }
.form-check-field label { display: flex; align-items: center; gap: 0.5rem; color: #344054; font-weight: 650; }
.form-check-field input { width: 1rem; height: 1rem; }
.form-readonly-value { min-height: 2.55rem; display: flex; align-items: center; padding: .65rem .75rem; color: #667085; background: #f8fafc; border: 1px solid #e4e9f0; border-radius: .55rem; font-size: .84rem; }
.radio-group { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; min-height: 2.55rem; }
.radio-option { display: inline-flex; align-items: center; gap: .4rem; color: #344054; font-size: .84rem; font-weight: 650; }
.radio-option input { width: 1rem; height: 1rem; accent-color: #275dca; }
.field-warning { color: #9a6700 !important; }
.money-in-button { background: #2e8b62 !important; border-color: #2e8b62 !important; }
.money-out-button { background: #c24136 !important; border-color: #c24136 !important; }
.sales-page, .sales-form-page, .sales-details-page { display: grid; gap: 1rem; }
.sales-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.sales-summary-grid > div { padding: 1rem 1.1rem; background: #fff; border: 1px solid #e4e9f0; border-radius: .85rem; box-shadow: 0 7px 22px rgba(16,24,40,.035); }
.sales-summary-grid span { display: block; color: #667085; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sales-summary-grid strong { display: block; margin-top: .35rem; color: #172235; font-size: 1.15rem; }
.sales-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; padding: .85rem; background: #fff; border: 1px solid #e4e9f0; border-radius: .85rem; }
.sales-toolbar > .filter-control { min-width: 10rem; flex: 1 1 12rem; }
.sales-toolbar .date-filter { display: grid; gap: .2rem; color: #667085; font-size: .72rem; font-weight: 700; }
.invoice-items-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.3rem; }
.invoice-items-heading h2 { margin: 0; color: #172235; font-size: 1rem; }
.invoice-items-heading p { margin: .15rem 0 0; color: #667085; font-size: .8rem; }
.invoice-items-table { overflow-x: auto; margin-top: .65rem; border: 1px solid #e4e9f0; border-radius: .7rem; }
.invoice-items-table .cash-table { min-width: 1050px; }
.invoice-items-table .filter-control { width: 100%; min-width: 7rem; }
.quantity-control { max-width: 6.5rem; }
.price-control { max-width: 8rem; }
.line-total { color: #172235 !important; font-weight: 750; white-space: nowrap; }
.invoice-totals { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; margin-top: 1rem; }
.invoice-totals > div { padding: .7rem .8rem; background: #f8fafc; border: 1px solid #e4e9f0; border-radius: .6rem; }
.invoice-totals span { display: block; color: #667085; font-size: .68rem; text-transform: uppercase; }
.invoice-totals strong { display: block; margin-top: .25rem; color: #172235; font-size: .85rem; }
.invoice-totals .invoice-total-final { background: #eff6ff; border-color: #cfe0fb; }
.invoice-effect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.effect-copy { padding: .6rem 1.1rem 1rem; color: #475467; }
.effect-copy p { display: flex; justify-content: space-between; gap: 1rem; margin: .75rem 0; }
.effect-copy strong { color: #172235; }
.effect-copy .effect-total { padding-top: .75rem; border-top: 1px solid #eef1f5; font-weight: 700; }
.status-partial { color: #8a5a08; background: #fff4d6; }
@media (max-width: 900px) { .sales-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .invoice-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sales-summary-grid, .invoice-totals, .invoice-effect-grid { grid-template-columns: 1fr; } .sales-toolbar > .filter-control, .sales-toolbar .date-filter { width: 100%; min-width: 0; } .sales-toolbar .date-filter .filter-control { width: 100%; } .invoice-items-heading { align-items: stretch; flex-direction: column; } }

@media (max-width: 900px) { .cash-summary-grid, .cash-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cash-summary-grid, .cash-detail-summary, .detail-grid { grid-template-columns: 1fr; } .cash-toolbar > .filter-control, .cash-toolbar .date-filter, .cash-toolbar .date-filter .filter-control { width: 100%; min-width: 0; } .cash-toolbar > button { width: 100%; } .details-heading-actions { justify-content: start; } .detail-grid .detail-wide { grid-column: auto; } }

/* Shared action buttons */
body .app-shell a.primary-button,
body .app-shell button.primary-button,
body .app-shell a.secondary-button,
body .app-shell button.secondary-button,
body .app-shell a.back-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 2.7rem !important;
    margin: 0 !important;
    padding: 0.62rem 1rem !important;
    border: 1px solid transparent !important;
    border-radius: 0.68rem !important;
    box-shadow: 0 2px 5px rgba(16, 24, 40, 0.07);
    font-size: 0.84rem;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none !important;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body .app-shell a.primary-button,
body .app-shell button.primary-button {
    color: #fff !important;
    background: #275dca !important;
    border-color: #275dca !important;
}

body .app-shell a.primary-button:hover,
body .app-shell button.primary-button:hover {
    color: #fff !important;
    background: #204fae !important;
    border-color: #204fae !important;
    box-shadow: 0 5px 12px rgba(39, 93, 202, 0.2);
    transform: translateY(-1px);
}

body .app-shell a.secondary-button,
body .app-shell button.secondary-button,
body .app-shell a.back-link {
    color: #344054 !important;
    background: #fff !important;
    border-color: #cbd7e6 !important;
}

body .app-shell a.secondary-button:hover,
body .app-shell button.secondary-button:hover,
body .app-shell a.back-link:hover {
    color: #17459f !important;
    background: #f3f7fd !important;
    border-color: #8eb3e8 !important;
    box-shadow: 0 4px 10px rgba(39, 93, 202, 0.12);
    transform: translateY(-1px);
}

body .app-shell a.primary-button:focus-visible,
body .app-shell button.primary-button:focus-visible,
body .app-shell a.secondary-button:focus-visible,
body .app-shell button.secondary-button:focus-visible,
body .app-shell a.back-link:focus-visible,
body .app-shell a.text-action:focus-visible,
body .app-shell button.text-action:focus-visible {
    outline: 3px solid rgba(74, 134, 232, 0.4) !important;
    outline-offset: 3px;
}

body .app-shell a.primary-button:disabled,
body .app-shell button.primary-button:disabled,
body .app-shell button.secondary-button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

body .app-shell a.money-in-button,
body .app-shell button.money-in-button,
body .app-shell a.stock-in-button,
body .app-shell button.stock-in-button {
    color: #fff !important;
    background: #2e8b62 !important;
    border-color: #2e8b62 !important;
}

body .app-shell a.money-in-button:hover,
body .app-shell button.money-in-button:hover,
body .app-shell a.stock-in-button:hover,
body .app-shell button.stock-in-button:hover {
    color: #fff !important;
    background: #25734f !important;
    border-color: #25734f !important;
}

body .app-shell a.money-out-button,
body .app-shell button.money-out-button,
body .app-shell a.stock-out-button,
body .app-shell button.stock-out-button {
    color: #fff !important;
    background: #c24136 !important;
    border-color: #c24136 !important;
}

body .app-shell a.money-out-button:hover,
body .app-shell button.money-out-button:hover,
body .app-shell a.stock-out-button:hover,
body .app-shell button.stock-out-button:hover {
    color: #fff !important;
    background: #a9332d !important;
    border-color: #a9332d !important;
}

body .app-shell .form-actions,
body .app-shell .details-heading-actions,
body .app-shell .invoice-items-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.85rem !important;
}

body .app-shell .form-actions > *,
body .app-shell .details-heading-actions > * {
    margin: 0 !important;
}

body .app-shell .row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem !important;
    white-space: normal;
}

body .app-shell a.text-action,
body .app-shell button.text-action,
body .app-shell button.clear-filters-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 2.05rem !important;
    margin: 0.15rem 0.2rem 0.15rem 0 !important;
    padding: 0.38rem 0.68rem !important;
    color: #275dca !important;
    background: #f4f7fc !important;
    border: 1px solid #d5e1f0 !important;
    border-radius: 0.5rem !important;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

body .app-shell a.text-action:hover,
body .app-shell button.text-action:hover,
body .app-shell button.clear-filters-button:hover {
    color: #17459f !important;
    background: #e9f1fc !important;
    border-color: #9ebce7 !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

body .app-shell a.text-action.danger-action,
body .app-shell button.text-action.danger-action {
    color: #b42318 !important;
    background: #fff4f2 !important;
    border-color: #f0c5bf !important;
}

body .app-shell a.text-action.danger-action:hover,
body .app-shell button.text-action.danger-action:hover {
    color: #8f1d14 !important;
    background: #ffe7e3 !important;
    border-color: #e6a49b !important;
}

body .app-shell .confirm-button,
body .app-shell .cancel-button {
    min-height: 2rem;
    margin: 0 0.2rem 0 0;
    padding: 0.35rem 0.62rem;
    border-radius: 0.45rem;
    font-size: 0.74rem;
    font-weight: 700;
}

body .app-shell .confirm-button { color: #fff; background: #c24136; border: 1px solid #c24136; }
body .app-shell .cancel-button { color: #344054; background: #fff; border: 1px solid #cbd7e6; }

@media (max-width: 640px) {
    body .app-shell .form-actions,
    body .app-shell .details-heading-actions {
        align-items: stretch;
        flex-direction: column;
    }

    body .app-shell .form-actions > *,
    body .app-shell .details-heading-actions > * {
        width: 100%;
    }
}

/* Data Import Center */
.data-import-page { max-width: 1500px; margin: 0 auto; }
.data-import-upload-card, .data-import-info-card, .data-import-sheet-card, .data-import-confirmation { margin-bottom: 1rem; padding: 1.25rem; background: #fff; border: 1px solid #e4e9f0; border-radius: 0.9rem; box-shadow: 0 8px 26px rgba(16, 24, 40, 0.035); }
.data-import-upload-card { display: flex; align-items: center; gap: 1.2rem; justify-content: space-between; }
.data-import-upload-card h2, .data-import-info-card h2, .data-import-sheet-card h2 { margin: 0 0 0.3rem; color: #172235; font-size: 1.1rem; }
.data-import-upload-card p, .data-import-info-card p { margin: 0; color: #667085; font-size: 0.86rem; }
.data-import-file-name, .data-import-party-code { color: #5278bd; font-size: 0.78rem; font-weight: 700; }
.data-import-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.data-import-action-card { display: flex; align-items: center; gap: 0.9rem; min-height: 7rem; padding: 1.2rem; color: #172235 !important; background: #fff; border: 1px solid #dce5f0; border-radius: 0.9rem; text-decoration: none !important; box-shadow: 0 8px 26px rgba(16, 24, 40, 0.035); }
.data-import-action-card:hover { background: #f7faff; border-color: #94b9eb; text-decoration: none !important; }
.data-import-card-icon { display: grid; width: 2.7rem; height: 2.7rem; flex: 0 0 2.7rem; place-items: center; color: #245fb7; background: #eaf2ff; border-radius: 0.75rem; font-size: 1.35rem; font-weight: 800; }
.data-import-action-card strong, .data-import-action-card small { display: block; }
.data-import-action-card strong { margin-bottom: 0.25rem; font-size: 0.97rem; }
.data-import-action-card small { color: #667085; font-size: 0.78rem; line-height: 1.45; }
.data-import-card-arrow { margin-left: auto; color: #5278bd; font-size: 1.2rem; }
.data-import-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.data-import-summary > div { padding: 0.85rem 1rem; background: #f8fafc; border: 1px solid #e4e9f0; border-radius: 0.7rem; }
.data-import-summary strong, .data-import-summary span { display: block; }
.data-import-summary strong { color: #172235; font-size: 1.25rem; }
.data-import-summary span { margin-top: 0.2rem; color: #667085; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.data-import-alert { margin: 0 0 1rem; padding: 0.85rem 1rem; border: 1px solid; border-radius: 0.65rem; font-size: 0.84rem; }
.data-import-alert.info { color: #245fb7; background: #edf5ff; border-color: #bdd5f5; }
.data-import-alert.error { color: #8f1d14; background: #fff4f2; border-color: #f0c5bf; }
.data-import-alert.success { color: #166534; background: #effcf3; border-color: #b7e4c2; }
.data-import-alert a { color: inherit; font-weight: 800; }
.data-import-sheet-heading { display: flex; align-items: flex-start; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; }
.data-import-sheet-heading .eyebrow { margin-bottom: 0.35rem; }
.data-import-sheet-heading h2 small { display: inline-block; margin-left: 0.45rem; color: #5278bd; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; }
.data-import-balance { min-width: 12rem; padding: 0.7rem 0.85rem; border-radius: 0.65rem; text-align: right; }
.data-import-balance span, .data-import-balance strong, .data-import-balance small { display: block; }
.data-import-balance span { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }
.data-import-balance strong { margin-top: 0.15rem; font-size: 0.92rem; }
.data-import-balance small { margin-top: 0.15rem; font-size: 0.7rem; }
.data-import-balance.verified { color: #166534; background: #effcf3; }
.data-import-balance.mismatch { color: #8f1d14; background: #fff4f2; }
.data-import-balance.neutral { color: #475467; background: #f2f4f7; }
.data-import-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 0.76rem; }
.data-import-table th { padding: 0.65rem 0.55rem; color: #667085; background: #f8fafc; font-size: 0.67rem; letter-spacing: 0.04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-import-table td { padding: 0.65rem 0.55rem; color: #344054; border-top: 1px solid #edf0f4; vertical-align: top; }
.data-import-table td:nth-child(5), .data-import-table td:nth-child(6), .data-import-table td:nth-child(7), .data-import-table td:nth-child(8) { white-space: nowrap; text-align: right; }
.data-import-status { display: inline-block; padding: 0.22rem 0.45rem; border-radius: 999px; font-size: 0.64rem; font-weight: 800; text-transform: uppercase; }
.status-valid, .status-completed { color: #166534; background: #dcfce7; }
.status-warning, .status-completedwithwarnings { color: #92400e; background: #fef3c7; }
.status-error { color: #991b1b; background: #fee2e2; }
.status-skipped { color: #475467; background: #eaecf0; }
.data-import-message { display: block; max-width: 18rem; margin-top: 0.3rem; color: #667085; line-height: 1.35; }
.data-import-confirmation { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.data-import-confirmation strong, .data-import-confirmation span { display: block; }
.data-import-confirmation strong { color: #172235; }
.data-import-confirmation span { margin-top: 0.2rem; color: #667085; font-size: 0.78rem; }
.data-import-confirm-actions { display: flex; align-items: center; gap: 0.55rem; }
.data-import-confirm-actions > span { white-space: nowrap; }
.data-import-document-card { margin-bottom: 1rem; padding: 1.25rem; background: #fff; border: 1px solid #dce5f0; border-radius: 0.9rem; box-shadow: 0 8px 26px rgba(16, 24, 40, 0.035); }
.data-import-document-heading { display: flex; align-items: flex-start; gap: 1rem; justify-content: space-between; }
.data-import-document-heading h2 { margin: 0 0 0.3rem; color: #172235; font-size: 1.1rem; }
.data-import-document-heading h2 small { display: inline-block; margin-left: 0.45rem; color: #5278bd; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; }
.data-import-document-message { max-width: none; margin: 0.65rem 0 1rem; }
.data-import-document-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.data-import-document-grid > div { padding: 0.7rem 0.8rem; background: #f8fafc; border: 1px solid #e4e9f0; border-radius: 0.65rem; }
.data-import-document-grid span, .data-import-document-grid strong, .data-import-document-grid small { display: block; }
.data-import-document-grid span { color: #667085; font-size: 0.67rem; font-weight: 800; text-transform: uppercase; }
.data-import-document-grid strong { margin-top: 0.22rem; color: #172235; font-size: 0.88rem; }
.data-import-document-grid small { margin-top: 0.2rem; color: #98a2b3; font-size: 0.68rem; }
.data-import-reconciliation { display: grid; gap: 0.15rem; margin: 0 0 1rem; padding: 0.75rem 0.85rem; border-radius: 0.65rem; font-size: 0.77rem; }
.data-import-reconciliation.verified { color: #166534; background: #effcf3; border: 1px solid #b7e4c2; }
.data-import-reconciliation.review { color: #92400e; background: #fffaeb; border: 1px solid #f5d58a; }
.data-import-reconciliation span, .data-import-reconciliation small { color: inherit; }
.data-import-document-lines { min-width: 780px; }
.business-report { display: grid; gap: 1rem; min-width: 0; }
.business-report-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; margin: 0; padding: 1rem; border: 1px solid #e4e9f0; border-radius: .85rem; background: #fff; min-width: 0; }
.business-report-filters .report-search-field { flex: 1; min-width: min(22rem, 100%); }
.business-report-filters .filter-control { width: 100%; }
.business-report-summary { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.business-report-section { min-width: 0; overflow: hidden; border: 1px solid #e4e9f0; border-radius: .85rem; background: #fff; }
.business-report-section h2 { margin: 0; padding: 1rem 1.1rem; background: #f8fafc; color: #172235; font-size: 1rem; border-bottom: 1px solid #e4e9f0; }
.business-report-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.business-report-table th, .business-report-table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid #edf0f4; white-space: nowrap; font-variant-numeric: tabular-nums; }
.business-report-table th { color: #475467; background: #fbfcfe; font-size: .72rem; }
.business-report-table td { color: #344054; }
.business-report-table tbody tr:last-child td { border-bottom: 0; }
.business-report-table tbody tr:hover { background: #f8fbff; }
.business-report-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .8rem; color: #667085; font-size: .8rem; }
@media (max-width: 640px) {
    .business-report-filters .report-period-field, .business-report-filters button { width: 100%; min-width: 0; }
    .business-report-summary { grid-template-columns: 1fr; }
    .business-report-pager { justify-content: flex-start; }
    .business-report .page-heading { align-items: flex-start; flex-direction: column; gap: .8rem; }
}
.profit-loss-page { display: grid; gap: 1rem; }
.profit-loss-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 0.7rem; padding: 0.9rem; background: #fff; border: 1px solid #e4e9f0; border-radius: 0.85rem; }
.report-period-field { display: grid; min-width: 11rem; gap: 0.25rem; color: #667085; font-size: 0.72rem; font-weight: 750; }
.report-period-field select, .report-period-field .filter-control { min-height: 2.45rem; padding: 0.45rem 0.65rem; color: #344054; background: #fff; border: 1px solid #d8e0ea; border-radius: 0.55rem; }
.profit-loss-toolbar > button { margin-left: auto !important; }
.report-period-caption { margin: -0.3rem 0 0; color: #667085; font-size: 0.8rem; }
.profit-loss-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }
.profit-loss-summary > div { padding: 1rem 1.1rem; background: #fff; border: 1px solid #e4e9f0; border-radius: 0.85rem; box-shadow: 0 7px 22px rgba(16, 24, 40, 0.035); }
.profit-loss-summary span { display: block; color: #667085; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.profit-loss-summary strong { display: block; margin-top: 0.35rem; color: #172235; font-size: 1.16rem; }
.profit-loss-summary-highlight { background: #eff6ff !important; border-color: #cfe0fb !important; }
.amount-profit { color: #16704a !important; }
.amount-loss { color: #b42318 !important; }
.profit-loss-statement { overflow: hidden; background: #fff; border: 1px solid #dfe6ef; border-radius: 0.9rem; box-shadow: 0 8px 26px rgba(16, 24, 40, 0.04); }
.statement-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.35rem; background: #f8fafc; border-bottom: 1px solid #e4e9f0; }
.statement-heading h2 { margin: 0.15rem 0 0; color: #172235; font-size: 1.15rem; }
.statement-heading > span { color: #667085; font-size: 0.75rem; white-space: nowrap; }
.statement-section { padding: 1rem 1.35rem 0.2rem; }
.statement-section h3 { margin: 0 0 0.45rem; color: #5278bd; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.statement-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; color: #475467; border-bottom: 1px solid #f0f2f5; }
.statement-row a { color: #275dca; text-decoration: none; }
.statement-row a:hover { text-decoration: underline; }
.statement-row > strong { color: #172235; font-weight: 700; white-space: nowrap; }
.statement-negative { color: #b42318 !important; }
.statement-subtotal { margin-top: 0.15rem; color: #172235; border-top: 1px solid #cfd8e4; border-bottom: 0; }
.statement-information { color: #667085; font-size: 0.8rem; }
.statement-information small { display: block; margin-top: 0.12rem; color: #98a2b3; font-size: 0.7rem; }
.statement-empty { padding: 0.45rem 0; color: #98a2b3; font-size: 0.82rem; }
.statement-highlight-row, .statement-final-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: 0.75rem; padding: 0.9rem 1.35rem; color: #172235; background: #f8fafc; border-top: 1px solid #dfe6ef; border-bottom: 1px solid #dfe6ef; }
.statement-final-row { margin-top: 1rem; padding-top: 1.1rem; padding-bottom: 1.1rem; color: #172235; background: #eff6ff; border-color: #cfe0fb; font-size: 1.02rem; }
.report-note, .report-alert, .report-empty-state, .report-notes, .depreciation-details { padding: 0.85rem 1rem; border-radius: 0.7rem; font-size: 0.82rem; }
.report-note { color: #475467; background: #f8fafc; border: 1px solid #e4e9f0; }
.report-alert { color: #8f1d14; background: #fff4f2; border: 1px solid #f0c5bf; }
.report-empty-state { color: #667085; background: #fff; border: 1px solid #e4e9f0; }
.depreciation-details { color: #475467; background: #fff; border: 1px solid #e4e9f0; }
.depreciation-details summary { color: #172235; font-weight: 750; cursor: pointer; }
.depreciation-details p { margin: 0.8rem 0 0; }
.depreciation-details table { width: 100%; min-width: 500px; margin-top: 0.8rem; border-collapse: collapse; font-size: 0.8rem; }
.depreciation-details th, .depreciation-details td { padding: 0.65rem 0.55rem; border-top: 1px solid #edf0f4; text-align: left; }
.depreciation-details th { color: #667085; background: #f8fafc; font-size: 0.68rem; text-transform: uppercase; }
.depreciation-details td:last-child, .depreciation-details th:last-child { text-align: right; white-space: nowrap; }
.report-notes { color: #667085; background: #fff; border: 1px solid #e4e9f0; }
.report-notes h2 { margin: 0 0 0.45rem; color: #172235; font-size: 0.92rem; }
.report-notes ul { margin: 0; padding-left: 1.15rem; }
.report-notes li { margin: 0.2rem 0; }
.report-notes p { margin: 0.6rem 0 0; color: #98a2b3; font-size: 0.76rem; }
@media (max-width: 760px) {
    .data-import-card-grid, .data-import-summary { grid-template-columns: 1fr; }
    .data-import-upload-card, .data-import-sheet-heading, .data-import-confirmation { align-items: stretch; flex-direction: column; }
    .data-import-balance { min-width: 0; text-align: left; }
    .data-import-confirm-actions { align-items: stretch; flex-wrap: wrap; }
    .data-import-document-heading { align-items: stretch; flex-direction: column; }
    .data-import-document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profit-loss-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profit-loss-toolbar > button { width: 100%; margin-left: 0 !important; }
}
@media (max-width: 640px) {
    .profit-loss-summary { grid-template-columns: 1fr; }
    .report-period-field { width: 100%; min-width: 0; }
    .statement-heading { align-items: flex-start; flex-direction: column; }
    .statement-heading > span { white-space: normal; }
    .statement-row, .statement-highlight-row, .statement-final-row { gap: 0.7rem; }
}
.balance-sheet-page { display: grid; gap: 1rem; }
.balance-sheet-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 0.7rem; padding: 0.9rem; background: #fff; border: 1px solid #e4e9f0; border-radius: 0.85rem; }
.balance-sheet-toolbar > button { margin-left: auto !important; }
.balance-sheet-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.85rem; }
.balance-sheet-summary > div { padding: 1rem 1.1rem; background: #fff; border: 1px solid #e4e9f0; border-radius: 0.85rem; box-shadow: 0 7px 22px rgba(16, 24, 40, 0.035); }
.balance-sheet-summary span { display: block; color: #667085; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; }
.balance-sheet-summary strong { display: block; margin-top: 0.35rem; color: #172235; font-size: 1.16rem; }
.balance-sheet-summary-highlight { background: #eff6ff !important; border-color: #cfe0fb !important; }
.balance-sheet-statement { overflow: hidden; background: #fff; border: 1px solid #dfe6ef; border-radius: 0.9rem; box-shadow: 0 8px 26px rgba(16, 24, 40, 0.04); }
.balance-sheet-statement .statement-section { padding-top: 1.1rem; }
.balance-sheet-statement h4 { margin: 1rem 0 0.3rem; color: #344054; font-size: 0.83rem; }
.balance-sheet-statement .statement-row small { display: block; margin-top: 0.12rem; color: #98a2b3; font-size: 0.7rem; }
.balance-check-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.8rem 1.35rem; color: #166534; background: #effcf3; border-top: 1px solid #b7e4c2; }
.balance-check-row small { display: block; margin-top: 0.12rem; color: #4d8562; font-size: 0.7rem; }
.review-recommended { color: #7a4b00; background: #fffaeb; border-color: #f5d58a; }
.review-recommended a { margin-left: 0.35rem; color: inherit; font-weight: 750; }
.balance-detail-panel { padding: 0.9rem 1rem; color: #475467; background: #fff; border: 1px solid #e4e9f0; border-radius: 0.7rem; font-size: 0.82rem; }
.balance-detail-panel summary { color: #172235; font-weight: 750; cursor: pointer; }
.balance-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin: 0.9rem 0; }
.balance-detail-card { padding: 0.8rem; background: #f8fafc; border: 1px solid #e4e9f0; border-radius: 0.65rem; }
.balance-detail-card h4 { margin: 0 0 0.35rem; color: #172235; font-size: 0.82rem; }
.balance-detail-card p { margin: 0; color: #98a2b3; font-size: 0.76rem; }
.balance-detail-card > div { display: flex; justify-content: space-between; gap: 0.7rem; padding: 0.32rem 0; border-top: 1px solid #e7ebf0; }
.balance-detail-card > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balance-detail-card > div strong { color: #172235; white-space: nowrap; }
.balance-detail-table { width: 100%; min-width: 650px; margin-top: 0.9rem; border-collapse: collapse; font-size: 0.78rem; }
.balance-detail-table th, .balance-detail-table td { padding: 0.62rem 0.55rem; border-top: 1px solid #edf0f4; text-align: left; }
.balance-detail-table th { color: #667085; background: #f8fafc; font-size: 0.67rem; letter-spacing: 0.04em; text-transform: uppercase; }
.balance-detail-table .amount-column { text-align: right; white-space: nowrap; }
@media (max-width: 900px) {
    .balance-sheet-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .balance-sheet-toolbar > button { width: 100%; margin-left: 0 !important; }
}
@media (max-width: 640px) {
    .balance-sheet-summary { grid-template-columns: 1fr; }
    .balance-sheet-toolbar .report-period-field { width: 100%; min-width: 0; }
    .balance-detail-grid { grid-template-columns: 1fr; }
    .balance-check-row { align-items: flex-start; flex-direction: column; }
}
