:root :is(.operations-room-content:has([data-route]:is(
  [data-route="operation-reconciliation"], [data-route="fuel-advance-review"],
  [data-route="cargo-insurance-hub"], [data-route="accountant-load-workbench"],
  [data-route="ai-accounting-review"], [data-route="accountant-assistant"],
  [data-route="accounting-agreements"], [data-route="invoices"],
  [data-route="tax-management"], [data-route="staff-pay"],
  [data-route="staff-compensation"], [data-route="availability-support"]
))) {
  --accounting-surface: color-mix(in srgb, var(--room-accent, #c99b62) 23%, var(--background));
  --accounting-muted: color-mix(in srgb, var(--foreground) 80%, var(--accounting-surface));
  --accounting-gold: #795208;
  --accounting-green: #166534;
  --accounting-orange: #874207;
  --accounting-purple: #693da0;
  --accounting-blue: #075985;
  --accounting-cyan: #155e75;
  --accounting-red: #a41d35;
  --card: var(--accounting-surface);
  --card-elevated: var(--accounting-surface);
  --card-bg: var(--accounting-surface);
  --surface: var(--accounting-surface);
  --input-background: var(--accounting-surface);
  --muted: var(--accounting-surface);
  --muted-foreground: var(--accounting-muted);
  --workspace-muted: var(--accounting-muted);
  --text-muted: var(--accounting-muted);
  --room-heading: var(--foreground);
  --success: var(--accounting-green);
  --warning: var(--accounting-orange);
  --danger: var(--accounting-red);
  --destructive: var(--accounting-red);
  --error: var(--accounting-red);
  --info: var(--accounting-blue);
  --num-gold: var(--accounting-gold);
  background: var(--accounting-surface);
  color: var(--foreground);
}
:root[data-theme="dark"] .operations-room-content:has([data-route]:is(
  [data-route="operation-reconciliation"], [data-route="fuel-advance-review"],
  [data-route="cargo-insurance-hub"], [data-route="accountant-load-workbench"],
  [data-route="ai-accounting-review"], [data-route="accountant-assistant"],
  [data-route="accounting-agreements"], [data-route="invoices"],
  [data-route="tax-management"], [data-route="staff-pay"],
  [data-route="staff-compensation"], [data-route="availability-support"]
)) {
  --accounting-gold: #f1d187;
  --accounting-green: #b8f6d3;
  --accounting-orange: #ffdcad;
  --accounting-purple: #d7bbff;
  --accounting-blue: #a3d3ff;
  --accounting-cyan: #b9effb;
  --accounting-red: #ffb4c1;
}

:root :is(.accountant-workbench-page, .operation-reconciliation,
  [data-route="fuel-advance-review"], .page.cargo-insurance-hub, .executive-accountant-page,
  .assistant-page, .financial-terms, .mc-invoices-page, .staff-pay-page,
  .availability-support-page) {
  background: transparent;
  color: var(--foreground);
}
:root .executive-accountant-page { --muted-foreground: var(--accounting-muted); }
:root .operation-reconciliation {
  --or-text: var(--foreground);
  --or-muted: var(--accounting-muted);
  --or-surface: var(--accounting-surface);
}


:root :is(.accountant-workbench-page, .mc-invoices-page, .staff-pay-page) .card,
:root :is(.historical-settlement-inbox, .historical-settlement-inbox > header,
  .historical-vault-count, .historical-settlement-upload label,
  .historical-vault-queue > article, .historical-vault-legend span,
  .settlement-intelligence-onboarding, .settlement-intelligence-progress,
  .assistant-panel, .assistant-draft, .financial-terms__proposal,
  .cargo-driver-card, .cargo-dialog, .cargo-action-menu,
  [data-route="fuel-advance-review"] .fuel-advance-panel, [data-route="fuel-advance-review"] .fuel-advance-hero, [data-route="fuel-advance-review"] .fuel-limit, [data-route="fuel-advance-review"] .fuel-hub-card) {
  background: var(--accounting-surface);
  color: var(--foreground);
}

:root .mc-invoices-page .card[style*="background"] {
  background: var(--accounting-surface) !important;
}
:root :is(.historical-settlement-inbox h2, .historical-vault-queue h3,
  .historical-settlement-upload label, [data-route="fuel-advance-review"] .fuel-advance-hero h1) {
  color: var(--foreground);
}
:root :is(.historical-settlement-inbox > header p, .historical-vault-queue p,
  .historical-vault-queue span:not([class]), .historical-settlement-upload label > span,
  .historical-settlement-upload label > small, .financial-terms dt,
  .financial-terms small, .financial-terms__legend,
  .cargo-equipment dt,
  [data-route="fuel-advance-review"] .fuel-advance-hero p, [data-route="fuel-advance-review"] .fuel-limit span) { color: var(--accounting-muted); }


:root :is(.accountant-workbench-page, [data-route="fuel-advance-review"], .cargo-insurance-hub,
  .assistant-page, .financial-terms, .executive-accountant-page,
  .mc-invoices-page, .staff-pay-page, [data-route="tax-management"],
  [data-route="staff-compensation"], .availability-support-page) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  background: var(--accounting-surface);
  color: var(--foreground);
  border-color: color-mix(in srgb, var(--foreground) 45%, var(--accounting-surface));
}
:root .operations-room-content :is(.accountant-workbench-page,
  [data-route="fuel-advance-review"], .cargo-insurance-hub, .assistant-page,
  .financial-terms, .executive-accountant-page, .mc-invoices-page,
  .staff-pay-page, [data-route="tax-management"],
  [data-route="staff-compensation"], .availability-support-page) ::placeholder {
  color: var(--accounting-muted);
  opacity: 1;
}
:root :is(.accountant-workbench-page, [data-route="fuel-advance-review"], .cargo-insurance-hub,
  .assistant-page, .financial-terms, .executive-accountant-page,
  .mc-invoices-page, .staff-pay-page, [data-route="tax-management"],
  [data-route="staff-compensation"], .availability-support-page) :focus-visible {
  outline: 3px solid var(--accounting-blue);
  outline-offset: 3px;
}


:root :is(.workbench-system-tools > summary small,
  .settlement-intelligence-onboarding label, .historical-vault-legend .is-purple,
  .historical-vault-queue .is-ambiguous small) { color: var(--accounting-purple); }
:root :is(.historical-settlement-inbox > header small,
  .settlement-intelligence-onboarding > div small,
  .historical-vault-legend .is-cyan, .financial-terms__record) { color: var(--accounting-cyan); }
:root :is(.historical-vault-count b, .historical-vault-count span,
  .financial-terms__label, .financial-terms__money, [data-route="fuel-advance-review"] .fuel-kicker,
  [data-route="fuel-advance-review"] .fuel-limit strong) { color: var(--accounting-gold); }
:root :is(.historical-vault-legend .is-orange, .historical-vault-queue small,
  [data-route="fuel-advance-review"] .fuel-hub-card header span, [data-route="fuel-advance-review"] .fuel-hub-card dd) { color: var(--accounting-orange); }
:root :is(.historical-vault-legend .is-green, [data-route="fuel-advance-review"] .fuel-hub-card.is-recovered header span,
  .workbench-primary-source small, .or-eyebrow,
  .or-tabs button[aria-current]) { color: var(--accounting-green); }
:root :is(.workbench-manual-boundary small, [data-route="fuel-advance-review"] .fuel-hub-card summary) { color: var(--accounting-blue); }
:root [data-route="fuel-advance-review"] .fuel-hub-card.is-needs_matching header span { color: var(--accounting-purple); }
:root .accountant-workbench-page .workbench-connection small,
:root .settlement-intelligence-progress b { color: var(--accounting-purple); }
:root .settlement-intelligence > header small { color: var(--accounting-cyan); }
:root .accountant-workbench-page :is(.workbench-sheet-sync h2, .workbench-sheet-sync dd,
  .workbench-identity-activity h2, .workbench-identity-log strong) { color: var(--foreground); }
:root .accountant-workbench-page :is(.workbench-sheet-sync p, .workbench-sheet-sync dt,
  .workbench-sheet-sync dl small, .workbench-identity-activity p,
  .workbench-identity-empty) { color: var(--accounting-muted); }
:root .accountant-workbench-page .workbench-sheet-sync small { color: var(--accounting-gold); }
:root .accountant-workbench-page .workbench-identity-activity > header small { color: var(--accounting-cyan); }
:root .accountant-workbench-page :is(.workbench-sync-legend .is-ddc,
  .workbench-sync-filters button, .workbench-sheet-sync .is-history-retained dd,
  .driver-ledger-inventory > summary span, .driver-ledger-metrics .is-blue,
  .driver-ledger-journal-diagnosis.is-missing strong, .settlement-fuel-help a) { color: var(--accounting-blue); }
:root .accountant-workbench-page :is(.workbench-sync-legend .is-workflow,
  .driver-ledger-mode.is-reconciling, .driver-ledger-metrics .is-purple) { color: var(--accounting-purple); }
:root .accountant-workbench-page :is(.workbench-sync-legend .is-sheet,
  .workbench-sync-filters .is-ready, .driver-ledger-resolution-check.is-blocked,
  .driver-ledger-journal-diagnosis.is-excess strong) { color: var(--accounting-orange); }
:root .accountant-workbench-page :is(.driver-ledger-mode.is-canonical,
  .driver-ledger-cutover-control.is-live small, .driver-ledger-cutover-control.is-live strong,
  .driver-ledger-review footer b, .workbench-sync-filters .is-matched) { color: var(--accounting-green); }
:root .accountant-workbench-page :is(.driver-ledger-answer .is-alert,
  .driver-ledger-metrics .is-red, .driver-ledger-review > header > span,
  .driver-ledger-review summary > span, .driver-ledger-paid-proof.is-blocked > header > span,
  .driver-ledger-paid-cycles .is-ineligible > span, .workbench-sync-filters .is-correction) { color: var(--accounting-red); }
:root .accountant-workbench-page .driver-ledger-review details .btn.is-green {
  background: color-mix(in srgb, var(--accounting-green) 8%, var(--accounting-surface));
  color: var(--accounting-green);
}
:root .accountant-workbench-page .historical-vault-queue .is-ambiguous small { color: var(--accounting-purple); }
:root .accountant-workbench-page [title^="DDC status:"] { color: #172033 !important; }
:root .accountant-workbench-page .driver-ledger-blocker-truth > header > .is-blocked { color: var(--accounting-red); }
:root .accountant-workbench-page .workbench-sheet-sync .is-history-retained .stat-number { color: #a3d3ff; }
:root [data-route="fuel-advance-review"] .fuel-recovery-select { color: var(--accounting-orange); }
:root [data-route="fuel-advance-review"] .fuel-match-explanation {
  background: color-mix(in srgb, var(--accounting-purple) 6%, var(--accounting-surface));
  color: var(--accounting-purple);
}
:root [data-route="fuel-advance-review"] .fuel-view-tabs button.active { background: #166534; color: #fff; }

:root [data-route="fuel-advance-review"] .fuel-hub-tabs button,
:root .financial-terms button:not(:where(.financial-terms__approve, .financial-terms__reject)),
:root [data-route="tax-management"] .nav-item {
  background: var(--accounting-surface);
  color: var(--foreground);
}
:root [data-route="fuel-advance-review"] .fuel-hub-tabs button[aria-pressed="true"],
:root .financial-terms button[aria-pressed="true"],
:root [data-route="tax-management"] .nav-item.active {
  background: color-mix(in srgb, var(--accounting-gold) 8%, var(--accounting-surface));
  color: var(--accounting-gold);
  border-color: currentColor;
}
:root [data-route="fuel-advance-review"] .fuel-hub-tabs button:hover:not(:disabled),
:root .financial-terms button:hover:not(:disabled) {
  box-shadow: inset 0 0 0 2px currentColor;
  filter: none;
}


:root .cargo-insurance-hub :is(.account-connection-status__icon,
  .account-connection-status strong) { color: inherit; }
:root .cargo-insurance-hub .account-connection-status small { color: inherit; }
:root .cargo-action-menu { border-color: var(--accounting-muted); }

:root .cargo-driver-money > div {
  background: var(--accounting-surface);
  color: var(--foreground);
}
:root .cargo-driver-money > .insurance { color: var(--accounting-purple); }
:root .cargo-driver-money > .recovery { color: var(--accounting-cyan); }
:root .cargo-driver-money > .balance { color: var(--accounting-gold); }
:root .cargo-driver-money > div > dt { color: inherit; }
:root .financial-terms__evidence {
  color: var(--accounting-cyan);
  background: color-mix(in srgb, var(--accounting-cyan) 6%, var(--accounting-surface));
}


:root .operations-room-content .staff-pay-page {
  --card: var(--accounting-surface);
  --card-elevated: var(--accounting-surface);
  --muted: var(--accounting-surface);
  --col-previous-balance: var(--accounting-red);
  --col-salary: var(--accounting-green);
  --col-bonus: var(--accounting-gold);
  --col-eagle: var(--accounting-cyan);
  --col-other-bonus: var(--accounting-purple);
  --col-total: var(--accounting-purple);
  --col-paid: var(--accounting-blue);
  --col-fee: var(--accounting-red);
  --col-rollover: var(--accounting-orange);
  --col-grand-rising: var(--accounting-blue);
}
:root .staff-pay-page :is(.staff-pay-remaining, .staff-pay-desktop-card,
  .staff-pay-ledger th, .staff-pay-ledger td, .mp-card) {
  background: var(--accounting-surface);
}
:root .staff-pay-page .staff-pay-priority-banner {
  background: var(--accounting-surface);
  color: var(--accounting-orange);
}
:root .staff-pay-page .staff-pay-upcoming-banner { color: var(--accounting-blue); }
:root .staff-pay-page :is(.staff-pay-priority-item small, .staff-pay-priority-rank) { color: inherit; }
:root .staff-pay-page .dispatch-pay-review { color: var(--accounting-orange); }
:root .staff-pay-page :is(.mp-expand-toggle, .mp-chevron) { color: var(--accounting-blue); }
:root .staff-pay-page .mp-grand-rising-heading { background: var(--accounting-surface); }
:root .staff-pay-page .mp-gr-linked { color: var(--accounting-muted); }
:root .staff-pay-page .mp-gr-linked > span { color: var(--accounting-green); }
:root .staff-pay-page .pay-pause-label { color: var(--accounting-purple); }
:root .staff-pay-page :is(.stat-sub, [data-stat-copy]) .pay-pause-label { color: #d7bbff; }

:root .staff-pay-page :is(.grand-rising-status-trigger, .col-grand-rising button,
  .mp-gr-status-button, .mp-grand-rising-days button, .mp-status-badge):not([style*="var(--muted)"]),
:root .staff-pay-page .col-status > button > span:first-child {
  color: #172033 !important;
}
:root .availability-eyebrow { color: var(--accounting-green); }
:root .availability-ai-advisor header small { color: var(--accounting-blue); }
:root .availability-ai-result > div span { color: var(--accounting-purple); }
:root .availability-case-follow-through > header small { color: var(--accounting-blue); }
:root .availability-review-card.urgent > summary { background: var(--accounting-surface); }
:root .availability-section-heading > span,
:root .availability-summary-icon { background: #166534; color: #fff; }
:root .availability-form-section:nth-of-type(3) .availability-section-heading > span { background: #075985; }
:root .availability-form-section:nth-of-type(4) .availability-section-heading > span { background: #874207; }
:root .availability-form-section:nth-of-type(5) .availability-section-heading > span { background: #693da0; color: #fff; }
:root .staff-pay-page .staff-pay-availability-link { background: #693da0 !important; color: #fff; }

:root .availability-support-page :is(.availability-submit-btn, .availability-approve,
  .availability-recommended-action) { background: #166534 !important; color: #fff !important; }
:root .availability-support-page :is(.availability-info, .availability-recommended-action.needs-info) {
  background: #075985 !important; color: #fff !important;
}
:root .availability-support-page .availability-deny { background: #6d2937 !important; color: #fff !important; }
:root :is(.accountant-workbench-page, [data-route="fuel-advance-review"], .mc-invoices-page,
  .staff-pay-page, [data-route="staff-compensation"], [data-route="tax-management"]) .btn-destructive {
  background: #6d2937;
  color: #fff;
}

:root [data-route="staff-pay"] :is(.btn, .badge)[style*="var(--destructive"] {
  --destructive: #6d2937;
  color: #fff !important;
}
:root [data-route="invoices"] .badge[style*="var(--error)"] { --error: #991b1b; }
:root :is(.accountant-workbench-page, [data-route="fuel-advance-review"], .mc-invoices-page,
  .staff-pay-page, [data-route="staff-compensation"], [data-route="tax-management"]) .btn-destructive:hover:not(:disabled) {
  background: #842b3d;
  color: #fff;
}


:root .financial-terms button.financial-terms__approve { color: #fff; background: #17613e; }
:root .financial-terms button.financial-terms__reject { color: #fff; background: #6d2937; }


:root .staff-pay-page .warn-box:has(> strong[style*="var(--num-gold)"]) {
  background: var(--accounting-surface);
  color: var(--accounting-orange);
}
:root .staff-pay-page :is(.sales-cash-bonus-panel > header span,
  .sales-cash-bonus-toggle > span) { color: var(--accounting-gold); }
:root[data-theme="dark"] .staff-pay-page .cell-flag:is(
  [style^="color: rgb(6, 95, 70)"], [style^="color:#065f46"],
  [style^="color: #065f46"]) {
  color: #70d4ae !important;
}

:root .accountant-workbench-page .workbench-fuel-warning { color: var(--accounting-orange); }


:root .operations-room-content:has([data-route="settlements"] .driver-list-page) {
  --settlement-landing-surface: color-mix(in srgb, var(--room-accent, #c99b62) 23%, var(--background));
  --settlement-landing-muted: color-mix(in srgb, var(--foreground) 80%, var(--settlement-landing-surface));
  --settlement-landing-green: #166534;
  --settlement-landing-orange: #874207;
  --settlement-landing-purple: #693da0;
  --settlement-landing-gold: #795208;
  --card: var(--settlement-landing-surface);
  --card-elevated: var(--settlement-landing-surface);
  --card-bg: var(--settlement-landing-surface);
  --input-background: var(--settlement-landing-surface);
  --input-bg: var(--settlement-landing-surface);
  --input-text: var(--foreground);
  --muted-foreground: var(--settlement-landing-muted);
  background: var(--settlement-landing-surface);
  color: var(--foreground);
}
:root[data-theme="dark"] .operations-room-content:has([data-route="settlements"] .driver-list-page) {
  --settlement-landing-green: #b8f6d3;
  --settlement-landing-orange: #ffdcad;
  --settlement-landing-purple: #d7bbff;
  --settlement-landing-gold: #f1d187;
}
:root [data-route="settlements"] .driver-list-page :is(.card, .recipient-panel) {
  background: var(--settlement-landing-surface);
  color: var(--foreground);
}
:root .operations-room-content:has([data-route="settlements"] .driver-list-page) :is(.driver-list-page, .settlement-support) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  background: var(--settlement-landing-surface);
  color: var(--foreground);
  border-color: color-mix(in srgb, var(--foreground) 45%, var(--settlement-landing-surface));
}
:root .operations-room-content:has([data-route="settlements"] .driver-list-page) :is(.driver-list-page, .settlement-support) ::placeholder {
  color: var(--settlement-landing-muted);
  opacity: 1;
}

:root [data-route="settlements"] .driver-list-page .recipient-controls .btn-success {
  background: linear-gradient(145deg, #bbf7d0, #86efac);
  color: #14532d;
  border-color: #166534;
}

:root [data-route="settlements"] .driver-list-page :is(
  .badge[title="DDC status: In Transit"],
  .driver-lifecycle > .badge[title="Current work, separate from roster status"][style*="rgb(219, 234, 254)"]
) { color: #075985 !important; }
:root [data-route="settlements"] .driver-list-page :is(
  .badge[title="DDC status: Delivered"], .badge[title="DDC status: Paid"]
) { color: #166534 !important; }

:root [data-route="settlements"] .driver-list-page :is(
  .driver-table .num-cell, .driver-card-row > span
)[style*="var(--success)"] { color: var(--settlement-landing-green) !important; }
:root [data-route="settlements"] .driver-list-page :is(
  .driver-table td > div, .driver-card-row > span
)[style*="var(--warning)"] { color: var(--settlement-landing-orange) !important; }

:root [data-route="settlements"] .driver-list-page .driver-table .num-cell:is(
  [style^="color: rgb(124, 58, 237)"], [style^="color: #7c3aed"]
) { color: var(--settlement-landing-purple) !important; }

:root .operations-room-content:has([data-route="settlements"] .driver-list-page) .settlement-support > summary {
  color: var(--settlement-landing-green);
}
:root .operations-room-content:has([data-route="settlements"] .driver-list-page) .ss-allocation-values strong {
  color: var(--settlement-landing-gold);
}
