/* Theme controls work in both appearances. Dark overrides are screen-only. */
.theme-toggle{display:grid;place-items:center;width:32px;height:32px;flex:none;border:0;border-radius:8px;background:transparent;color:#55709a;padding:4px;cursor:pointer}
.theme-toggle:hover{background:#edf2fb}.theme-toggle:focus-visible{outline:2px solid #7397ff;outline-offset:3px}
.theme-toggle svg,.theme-menu svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.login-theme-toggle{position:fixed;top:max(16px,env(safe-area-inset-top));right:18px;z-index:2;width:38px;height:38px;background:#fff;border:1px solid #e5eaf1}
.theme-menu{position:fixed;z-index:12000;display:grid;width:176px;padding:6px;border:1px solid #dce4ef;border-radius:12px;background:#fff;color:#172033;box-shadow:0 12px 35px #0002}
.theme-menu[hidden]{display:none}.theme-menu button{display:flex;align-items:center;gap:10px;min-height:39px;width:100%;border:0;border-radius:7px;background:transparent;color:inherit;padding:8px 10px;font:inherit;font-size:13px;text-align:left;cursor:pointer}
.theme-menu button:is(:hover,:focus-visible){background:#edf3ff;outline:none}.theme-menu button[aria-checked=true]{color:#315ce4;background:#edf3ff}.theme-menu b{margin-left:auto;font-weight:600;visibility:hidden}.theme-menu [aria-checked=true] b{visibility:visible}

@media screen{
html[data-theme=dark]{
  --fc-canvas:#0b111b;--fc-surface:#101626;--fc-card:#101626;--fc-ink:#f1f5f9;--fc-muted:#94a3b8;--fc-line:#29374e;
  --fc-blue:#799fff;--fc-blue-hover:#94b2ff;--fc-blue-soft:#192c50;--fc-shadow:0 2px 8px #0003;
  --blue:#799fff;--line:#29374e;--muted:#94a3b8;--ink:#f1f5f9;--bg:#0b111b;--panel:#101626;
  --theme-table:#202b3d;--theme-raised:#151d2d;--theme-hover:#1c2940;--theme-blue:#8fafff;--theme-green:#53d5a4;--theme-red:#ff7487;--theme-purple:#bc9cff;--theme-amber:#f4c56c;
  color-scheme:dark;scrollbar-color:#465874 #101626;
}
@layer appearance{
html[data-theme=dark] body{background:var(--fc-canvas)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(main,section,article,div,nav,header,footer,ul,ol,li,dl,dt,dd){color:inherit!important}
html[data-theme=dark] body :where(h1,h2,h3,h4,h5,h6,strong,b,legend,label,td,th){color:var(--fc-ink)!important}
html[data-theme=dark] body :where(span){color:inherit!important}
html[data-theme=dark] body :where(p,small,.muted,.eyebrow,.empty,.loading,.cash-empty,.loan-empty,.pt-empty,.dash-empty,.an-empty,.rp-empty){color:var(--fc-muted)!important}
html[data-theme=dark] body :where(a){color:var(--theme-blue)}
html[data-theme=dark] body :where(hr){border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(.main,#content,.content,.admin-dashboard,.personal-tracker,.cash-flow-page,.loan-tracker,.payroll-page,.tech-workspace,.tech-main,.login-screen,.login-panel,.startup-screen){background:var(--fc-canvas)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.sidebar,.sidebar>header,.sidebar>footer,.topbar,#tech-nav,#mobile-admin-nav,.mobile-more-sheet){background:#101626!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.sidebar nav a,.sidebar nav button,.topbar .icon,.header-language,.header-theme,.header-clock,.sidebar>footer .icon,#tech-nav a,#mobile-admin-nav a,#mobile-admin-nav button,.mobile-more-grid a){color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.sidebar nav a:hover,.sidebar nav button:hover,#tech-nav a:hover,#mobile-admin-nav a:hover,.mobile-more-grid a:hover){background:var(--theme-hover)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.sidebar nav a.active,.sidebar nav button.active,#tech-nav a.active,#mobile-admin-nav a.active,#mobile-admin-nav button.active,.mobile-more-grid a.active){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.sidebar nav a.active span,.sidebar nav button.active span){color:var(--theme-blue)!important}

/* Shared cards and module-specific surfaces. Map tiles, photos and canvases are untouched. */
html[data-theme=dark] body :where(
 .card,.metric,.table-wrap,.office-card,.login-card,.modal,.drawer,.camera-panel,.tech-camera-panel,.confirm-delete-dialog,.delete-confirm,.alert,
 .dash-card,.dash-metric,.dash-technician,.dash-announcement,.dash-recent-list,.dash-type-legend button,
 .cash-card,.cash-metric,.cash-settings-modal,.cash-settings-subpanel,.cash-settings-suboverlay,.cash-settings-launcher,.cash-settings-row,.cash-settings-list,.cash-settings-add,.cash-settings-toggle,.cash-settings-state,.cash-settings-childbody,.cash-account-card,.cash-subcategory-row,
 .attendance-employee-card,.attendance-daily,.attendance-detail-metrics article,.attendance-table-wrap,.attendance-hero,.attendance-record-detail,.attendance-card,.attendance-metric,
 .payroll-register,.payroll-rate-card,.payroll-summary,.payroll-hero,.payroll-attendance,.payroll-detail-metrics article,.payroll-employee-rate,.payroll-rate-result article,.payroll-payment-summary,.payroll-rate-overview,.payroll-financial-rows,.cash-advance-entry,.cash-advance-list,.inline-advance-form,.payment-history,
 .loan-metric,.loan-filter-bar,.loan-table-card,.loan-modal,.loan-export-menu,.loan-summary-card,.loan-owner-card,
 .pt-metric,.pt-table-card,.pt-modal,.pt-manager-row,
 .other-payables-section,.other-payables-table-wrap,.other-payable-modal,.other-payable-panel,.other-payable-detail,.other-payable-owner-card,.payable-owner-card,.payable-owner-menu,
 .an-stat,.an-panel,.an-scope,.an-finance-panels>article,.rp-toolbar,.rp-section,.rp-stat,.rp-scope,
 .history-activity-card,.history-closed-card,.history-detail,.history-activity-row,.announcement-card,.announcement-editor,.announcement-detail,.announcements-card,
 .recovery-metrics article,.recovery-card,.recovery-key,.branding-settings .card,.branding-preview,.branding-browser-tab,.branding-fields,
 .sms-settings-card,.sms-panel,.sms-metric,.telegram-settings-card,.telegram-panel,
 .task-card,.task-filter-bar,.task-detail-modal,.task-detail-section,.task-detail-photos button,.task-photo-gallery,.task-photo-gallery>header,.task-detail-modal .task-map-layer-menu,.task-editor-card,.task-editor-section,
 .tech-card,.tech-job-card,.tech-job-modal,.tech-task-view,.tech-customer-card,.tech-summary-card,.tech-complete-modal,.tech-profile-card,.tech-attendance-card,.salary-card,.tech-task-view>header,.tech-customer-actions a,.tech-complete-modal form>footer,.task-location-panel,
 .network-map-nap-board,.network-map-nap-card,.network-map-board-group,.network-planner-panel,.network-planner-list,.network-planner-inspector,.network-planner-route-tools,.network-planner-summary,.network-planner-state,.network-planner-step,.network-planner-power-grid div,.network-planner-loss-grid,.network-planner-core-picker,.network-planner-panel-footer,
 .modern-native-select-menu,.modern-date-popover,.modern-date-menu,.modern-filter-menu,.modern-picker,.modern-select-menu,.modern-date-calendar,.native-select-menu,.notification-menu,.theme-menu,.pwa-install-prompt,.install-prompt,.toast,.toast-card
){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important;box-shadow:var(--fc-shadow)!important}
html[data-theme=dark] body :where(.modal-layer,.drawer-layer,.tech-camera,.mobile-more-backdrop){background:rgb(0 0 0 / .7)!important}
html[data-theme=dark] body :where(.modal header,.modal footer,.drawer header,.drawer footer,.pt-modal header,.pt-modal footer,.tech-task-view footer,.task-detail-tabs,.task-detail-header,.cash-settings-modal header,.cash-settings-modal footer,.loan-modal header,.loan-modal footer){border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(.modal>header,.drawer>header,.cash-settings-main-footer,.network-planner-map-wrap,.network-planner-map-note,.network-planner-legacy){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
/* Form bodies and action bars have their own light surfaces in compact/mobile dialogs. */
html[data-theme=dark] body :where(.modal>form,.modal .form-grid,.modal .form-actions,.modal .modal-body,.drawer .form-grid,.drawer .form-actions,.drawer .modal-body,.task-editor-modal .task-location-toggle){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.cash-settings-main-footer button){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}

@media(max-width:600px){
html[data-theme=dark] body .payroll-page .payroll-table tbody tr[data-payroll-employee] td:nth-child(6){color:var(--theme-blue)!important}
}

@media(max-width:760px){
html[data-theme=dark] body .payroll-employee-body .cash-advance-list{box-shadow:none!important}
html[data-theme=dark] body .payroll-employee-body .cash-advance-entry{box-shadow:0 2px 8px rgba(0,0,0,.35)!important}
html[data-theme=dark] body .payroll-employee-body .cash-advance-edit{color:var(--fc-ink)!important}
html[data-theme=dark] body .other-payable-advance-actions button{background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body .other-payable-advance-actions :is([data-delete-other-advance],[data-delete-other-payment]){color:var(--theme-red)!important}

}

@media(max-width:750px){
html[data-theme=dark] body .other-payables-table-wrap tbody td:nth-child(3){color:var(--theme-blue)!important}
html[data-theme=dark] body .other-payable-payments .other-payable-advance-actions button{background:transparent!important;box-shadow:none!important}
html[data-theme=dark] body .other-payment-mobile-info{color:var(--fc-muted)!important}
}

@media(max-width:750px){
html[data-theme=dark] body .other-payables-table-wrap :is(tfoot,tfoot th,tfoot tr){background:transparent!important}
}

/* Retain the attendance summary's semantic number colors. */
html[data-theme=dark] body .attendance-card-metrics strong{color:var(--theme-blue)!important}
html[data-theme=dark] body .attendance-card-metrics .on-time strong{color:var(--theme-green)!important}
html[data-theme=dark] body .attendance-card-metrics .late strong{color:var(--theme-red)!important}

/* Technician portal surfaces must follow the dark text palette too. */
html[data-theme=dark] body.technician-mode :where(.tech-more-links button,.tech-photo-viewer){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important;box-shadow:var(--fc-shadow)!important}
html[data-theme=dark] body.technician-mode :where(.tech-complete-control,.tech-photo-tile,.tech-detail-map-unavailable){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body.technician-mode :where(.tech-more-links button:hover,.tech-more-links button:focus-visible,.tech-complete-control:hover,.tech-task-close:hover){background:var(--theme-hover)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body.technician-mode :where(.tech-complete-error,.tech-inline-error){background:#361c25!important;border-color:#653040!important;color:var(--theme-red)!important}
html[data-theme=dark] body.technician-mode :where(.tech-more-links small,.tech-job-meta,.tech-job-customer,.tech-task-description,.tech-detail-description,.tech-task-schedule){color:var(--fc-muted)!important}
html[data-theme=dark] body.technician-mode :where(.tech-task-section,.tech-job-actions,.tech-detail-more,.tech-photo-tile,.profile-card>div,.salary-loan-row){border-color:var(--fc-line)!important}
html[data-theme=dark] body.technician-mode :where(.status.paused){background:#2b203b!important;border-color:#594074!important;color:var(--theme-purple)!important}
html[data-theme=dark] body.technician-mode :where(.tech-schedule-badge){background:#263449!important;border-color:#475569!important;color:#d5dfed!important}
html[data-theme=dark] body.technician-mode :where(.tech-schedule-badge.is-today){background:#14382d!important;border-color:#065f46!important;color:#6ee7b7!important}
html[data-theme=dark] body.technician-mode :where(.tech-schedule-badge.is-tomorrow){background:#3b2b16!important;border-color:#854d0e!important;color:#fcd34d!important}
html[data-theme=dark] body.technician-mode :where(.tech-schedule-badge.is-overdue){background:#431f28!important;border-color:#991b1b!important;color:#fca5a5!important}

/* Tables retain subtle separators and clear hover feedback. */
html[data-theme=dark] body :where(table){background:var(--fc-surface)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(th,td,tr,thead,tbody,tfoot,.pt-pages,.pt-manager-row,.cash-pages,.entry-footer,.loan-table-card>footer,.cash-settings-row,.cash-settings-list-head,.network-map-port-row){border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(thead,th,tfoot,.cash-settings-list-head,.network-map-port-head,.payroll-table tfoot,.rp-finance-table tfoot td){background:var(--theme-table)!important}
html[data-theme=dark] body :where(th){color:var(--fc-muted)!important}
html[data-theme=dark] body :where(tbody tr){background:var(--fc-surface)!important}
html[data-theme=dark] body :where(tbody tr:hover,.recent button:hover,.tracking-list button:hover,.dash-recent-list button:hover,.dash-type-legend button:hover,.cash-settings-row:hover){background:var(--theme-hover)!important}
html[data-theme=dark] body :where(.toolbar,.cash-table-toolbar,.pt-table-toolbar,.loan-table-card>header,.entry-toolbar,.cash-summary tfoot th,.task-filter-bar,.task-detail-tabs,.attendance-toolbar,.payroll-toolbar){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.cash-table td>span,.cash-table td>strong,.loan-table-card td strong,.task-customer,.task-title,.task-description){color:var(--fc-ink)!important}

/* Remaining shell widgets and controls share the same neutral palette. */
html[data-theme=dark] body :where(.install-toast,.tech-empty,.tech-announcement,.tech-stats button,.time-card,.verify-card,.daily-records,.profile-card,.profile-hero,.history-stats article,.salary-stats article,.profile-stats article,.attendance-state,.tech-detail-more,.tech-announcement-modal,.task-search,.task-empty,.task-view-switch,.task-type-tabs,.task-pills,.task-date-trigger,.entry-footer,.entry-footer button,.an-unassigned li,.payroll-toolbar>label,.network-map-metrics article,.network-map-directory,.network-map-tabs,.network-map-search,.network-map-selection,.network-map-modal,.network-map-modal>header,.network-map-import-modal,.network-map-side-editor,.network-map-editor-dock,.customer-locations-summary article,.customer-locations-list,.customer-location-drawer,.customer-location-pick-results,.network-map-assignment-list,.network-map-board-summary,.network-map-coverages button,.network-map-basemap,.network-map-overlay,.network-map-export){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.task-type-tabs button,.task-pills button,.task-view-switch button,.network-map-heading button,.network-map-tabs button,.network-map-subscriber-status-filter button,.network-map-coverages button,.customer-locations-actions button,.customer-locations-tabs button,.network-map-modal button,.task-filter-bar button,.task-date-trigger){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.task-type-tabs button.active,.task-view-switch button.active,.task-pills button.active,.network-map-tabs button.active,.network-map-coverages button.active,.network-map-subscriber-status-filter button.active,.customer-locations-tabs button.active){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.clock-banner){background:#292318!important;border-color:#51412a!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.clock-banner.clocked,.clock-banner.completed){background:#15332b!important;border-color:#285b47!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.tech-stats button svg,.network-map-metrics article>i,.customer-locations-symbol){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.network-map-tabs button:hover,.task-pills button:hover,.task-type-tabs button:hover){background:var(--theme-hover)!important}

html[data-theme=dark] body :where(.network-map-view-bar>div,.network-map-surface,.network-map-overlay>div,.network-map-legend,.network-measure-panel,.network-measure-unit-menu,.network-map-basemap-menu,.install-help){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-map-view-bar button,.network-map-surface>button,.network-map-overlay button,.network-measure-panel button,.network-measure-mobile-action,#billing-network-measure){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-map-view-bar button.active){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.network-map-metrics article>span,.network-map-heading>div>span){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}

/* Inputs, native date pickers, custom select menus and selection states. */
html[data-theme=dark] body :where(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),select,textarea,.modern-native-select-trigger,.modern-date-trigger,.modern-filter-trigger,.modern-date-input,.modern-date-time,.recovery-upload-label){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important;color-scheme:dark!important;box-shadow:none!important}
html[data-theme=dark] body :where(input,textarea)::placeholder{color:#8191aa!important;opacity:1}
html[data-theme=dark] body :where(input[type=checkbox],input[type=radio]){accent-color:#729bff;color-scheme:dark!important}
html[data-theme=dark] body :where(.modern-native-select-menu button,.modern-filter-menu button,.modern-date-popover button,.modern-date-menu button,.modern-select-menu button,.modern-date-calendar button,.theme-menu button){background:transparent!important;color:var(--fc-ink)!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(.modern-native-select-menu button:hover,.modern-native-select-menu .selected,.modern-filter-menu button:hover,.modern-filter-menu .selected,.modern-select-menu button:hover,.modern-date-menu button:hover,.modern-date-popover button:hover,.theme-menu button:hover,.theme-menu button:focus-visible,.theme-menu [aria-checked=true]){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.modern-date-day.selected,.modern-date-day.today,.modern-calendar-day.selected,[aria-selected=true]){border-color:#799fff!important}
html[data-theme=dark] body :where(.payment-choice-grid label>span,.advance-methods label>span,.other-payable-choice-grid label>span,.other-payable-loans label>span,.task-payment-option,.task-payment-picker label,.pt-tabs button,.settings-tabs button,.history-view-tabs button,.loan-detail-tabs button){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.payment-choice-grid label:has(input:checked)>span,.advance-methods input:checked+span,.other-payable-choice-grid input:checked+span,.pt-tabs button.active,.settings-tabs button.active,.history-view-tabs button.active,.loan-detail-tabs button.active){background:var(--fc-blue-soft)!important;border-color:#799fff!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.secondary,button.secondary,.delete-confirm-cancel,.cash-pages button,.loan-table-card>footer button,.rp-pagination button,.network-planner-panel button,.network-planner-inspector button,.network-planner-route-tools button,.network-planner-top-actions button,.tech-job-actions button,.task-location-toolbar button,.task-location-panel>header button){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important;box-shadow:none!important}
html[data-theme=dark] body :where(.secondary:hover,button.secondary:hover,.network-planner-panel button:hover){background:var(--theme-hover)!important}
html[data-theme=dark] body :where(.primary,button.primary,#billing-network-add,.primary strong,.primary span,.primary small){background:#3569e8!important;border-color:#3569e8!important;color:#fff!important}
html[data-theme=dark] body :where(.primary:hover){background:#3b73f6!important}
html[data-theme=dark] body :where(.text-button,.icon,.theme-toggle){color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.theme-toggle:hover){background:var(--theme-hover)!important}
html[data-theme=dark] body :where(.login-theme-toggle){background:var(--fc-surface)!important;border-color:var(--fc-line)!important}

/* Preserve semantic colors rather than flattening financial values and statuses. */
html[data-theme=dark] body :where(.income,.income strong,.income span,.cash-num.income,.cash-summary .income,.pt-amount.income,.pt-metric.income strong,.dash-metric:has(.green) strong,.loan-green,.an-green,.rp-positive,.positive){color:var(--theme-green)!important}
html[data-theme=dark] body :where(.expense,.expense strong,.expense span,.cash-num.expense,.cash-summary .expense,.pt-amount.expense,.pt-metric.expense strong,.dash-metric:has(.red) strong,.loan-red,.negative-net,.negative,.error,.rp-negative,.advance-legacy){color:var(--theme-red)!important}
html[data-theme=dark] body :where(.cash-metric.net strong,.pt-metric.net strong,.dash-metric:has(.blue) strong){color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.cash-metric.balance strong,.pt-metric.balance strong,.dash-metric:has(.purple) strong){color:var(--theme-purple)!important}
html[data-theme=dark] body :where(.dash-metric-icon,.cash-metric i,.pt-metric i,.loan-metric-icon,.dash-task-icon,.dash-avatar){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.dash-metric-icon.green,.cash-metric.income i,.pt-metric.income i){background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.dash-metric-icon.red,.cash-metric.expense i,.pt-metric.expense i){background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body :where(.dash-metric-icon.purple,.cash-metric.balance i,.pt-metric.balance i){background:#2b203b!important;color:var(--theme-purple)!important}
html[data-theme=dark] body :where(.dash-metric-icon.amber){background:#322916!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.dash-metric-icon.cyan){background:#153137!important;color:#6dd6df!important}
html[data-theme=dark] body :where(.status,.priority,.cash-pill,.pt-pill,.loan-status,.pt-status,.other-payable-status,.cash-settings-state,.task-choice-tag){border-color:#3b4d69!important;background:#202b3d!important;color:#b6c8ea!important}
html[data-theme=dark] body :where(.status.completed,.status.paid,.status.approved,.cash-pill.income,.cash-pill.paid,.cash-pill.approved,.pt-pill.income,.loan-status.paid,.other-payable-status.active,.status.active){background:#15332b!important;border-color:#285b47!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.status.cancelled,.status.rejected,.cash-pill.expense,.cash-pill.rejected,.pt-pill.expense,.loan-status.overdue,.priority.urgent,.status.absent){background:#361c25!important;border-color:#653040!important;color:var(--theme-red)!important}
html[data-theme=dark] body :where(.status.pending,.status.in_progress,.cash-pill.pending,.pt-status.pending,.loan-status.pending,.priority.high){background:#322916!important;border-color:#65502c!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.payroll-financial-rows>div.net,.payroll-rate-correction-note,.payroll-rate-result,.payroll-payment-summary,.salary-no-loans,.dash-announcement,.an-scope,.rp-scope){background:#182039!important;border-color:#2c3f65!important}
html[data-theme=dark] body :where(.cash-pie.doughnut:after){background:var(--fc-surface)!important}
html[data-theme=dark] body :where(.dash-donut-track){stroke:#29374e!important}
html[data-theme=dark] body :where(.cash-chart text,.an-chart text,.rp-chart text){fill:var(--fc-muted)!important}
html[data-theme=dark] body :where(.dash-chart-grid i,.cash-chart line,.an-chart line){border-color:var(--fc-line)!important;stroke:var(--fc-line)!important}

html[data-theme=dark] body :where(.network-map-alert,.customer-locations-error){background:var(--fc-blue-soft)!important;border-color:var(--fc-line)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.network-map-alert.error,.customer-locations-error,.delete-confirm-error){color:var(--theme-red)!important}
html[data-theme=dark] body :where(.alert-symbol){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.alert-success .alert-symbol){background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.alert-error .alert-symbol){background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body :where(.modern-date-popover button.selected,.modern-date-popover button[aria-pressed=true]){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}

/* Network/Planner control surfaces are themed without modifying map imagery. */
html[data-theme=dark] body :where(.leaflet-control-layers,.leaflet-control-zoom a,.leaflet-popup-content-wrapper,.leaflet-popup-tip,.maplibregl-popup-content,.maplibregl-ctrl-group,.maplibregl-ctrl-group button,.task-detail-modal .task-map-layer-toggle,.task-detail-modal .task-map-layer-menu,.task-location-panel>header,.network-planner-popup-actions button,.network-planner-core-option){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.leaflet-control-attribution,.maplibregl-ctrl-attrib){background:rgb(16 22 38 / .9)!important;color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.network-map-port-row){background:var(--fc-surface)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-map-port-row.available,.network-planner-step.passed){background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.network-map-port-row.occupied,.network-planner-core-option.selected){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.network-map-port-row.reserved){background:#322916!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.network-map-port-row.disconnected,.network-map-port-row.defective,.network-planner-step.below-target){background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body :where(.network-map-port-row.suspended){background:#1c2940!important;color:var(--fc-muted)!important}

/* Module-specific surfaces and badges that also appear outside shared cards. */
html[data-theme=dark] body :where(.attendance-card-metrics){border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(.attendance-compact-card,.attendance-master-empty,.tracking-map-panel,.tracking-list-panel,.tracking-list-panel>header,.tracking-unmapped,.history-column-head,.history-detail-dialog,.history-detail-meta,.user-row-menu-list,.announcement-row-wrap,.announcement-modal,.announcement-existing-files li,.announcement-editor-modal .announcement-switch,.customer-locations-map-wrap,.customer-locations-summary>div,.customer-locations-legend){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.attendance-search,.history-search,.history-view-tabs,.history-day,.customer-locations-tabs,.attendance-actions button,.attendance-time-edit>button,.history-filter-disclosure>summary,.user-row-menu>summary,.user-actions>button,.recovery-actions a,.recovery-actions button){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.attendance-compact-card:hover,.user-row-menu-list button:hover,.user-row-menu-list button:focus-visible,.history-event:hover,.tracking-task-focus:hover){background:var(--theme-hover)!important}
html[data-theme=dark] body :where(.attendance-compact-card.selected,.tracking-task.selected,.announcement-row-wrap.pinned){background:var(--fc-blue-soft)!important;border-color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.attendance-compact-summary,.attendance-compact-arrow,.history-day,.history-actor,.history-event time,.history-view-detail){color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.attendance-avatar,.attendance-person em,.attendance-compact-person em,.attendance-hero em,.role-badge,.task-type-tabs button span,.tracking-list-panel h2 span,.tracking-unmapped h3 span,.history-event-symbol,.announcement-badge.pinned,.attendance-detail-metrics i,.history-stat-heading i){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(.punctuality,.attendance-row-status,.announcement-badge){background:var(--theme-raised)!important;color:var(--fc-muted)!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(.attendance-row-status.completed){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.punctuality.on_time,.history-event.green .history-event-symbol,.attendance-detail-metrics i.green,.history-stat-on-time .history-stat-heading i,.recovery-ready,.recovery-verified){background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.punctuality.late,.attendance-row-status.missing,.attendance-row-status.absent,.history-event.red .history-event-symbol,.attendance-detail-metrics i.red,.history-stat-late .history-stat-heading i,.history-stat-absences .history-stat-heading i,.announcement-badge.urgent){background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body :where(.punctuality.warning,.attendance-row-status.working,.history-event.amber .history-event-symbol){background:#322916!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.attendance-detail-metrics i.purple,.history-stat-hours .history-stat-heading i,.history-event.purple .history-event-symbol){background:#2b203b!important;color:var(--theme-purple)!important}
html[data-theme=dark] body :where(.user-row-menu-list button){color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.attendance-time-missing,.attendance-time-missing .attendance-time-button,.attendance-delete,.user-row-menu-list .danger,.user-actions .delete){color:var(--theme-red)!important}
html[data-theme=dark] body :where(.history-event.green .history-badge){color:var(--theme-green)!important}
html[data-theme=dark] body :where(.history-event.red .history-badge){color:var(--theme-red)!important}
html[data-theme=dark] body :where(.history-event.blue .history-badge,.attendance-selfie){color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.history-event.amber .history-badge){color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.history-event.purple .history-badge){color:var(--theme-purple)!important}
html[data-theme=dark] body :where(.cash-entry-tabs,.cash-entry-tabs button,.cash-receipt-picker-button,.cash-receipt-clear,.cash-batch-add,.history-detail-close,.history-changes pre,.announcement-file-input,.network-map-basemap>button,.network-map-overlay>button,#task-map-hint){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.cash-entry-tabs button.active){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(input[type=checkbox]:not([name=module]):not([data-choice-active])){background:#3b4d69!important}
html[data-theme=dark] body :where(input[type=checkbox]:not([name=module]):not([data-choice-active]):checked){background:#3569e8!important}
html[data-theme=dark] body :where(.sms-switches>label,.sms-template-editor,.salary-loan-summary>div,.selfie-button,.logout-button,.daily-records .record-head){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.sms-coverage,.profile-hero>em){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.clock-banner>svg,.attendance-state>svg,.gps-notice){background:#322916!important;color:var(--theme-amber)!important;stroke:var(--theme-amber)!important}
html[data-theme=dark] body :where(.gps-notice button){color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.clock-banner.clocked>svg,.clock-banner.completed>svg,.attendance-state.ready>svg,.attendance-state.completed>svg){background:#15332b!important;color:var(--theme-green)!important;stroke:var(--theme-green)!important}
html[data-theme=dark] body :where(.tech-announcement .urgent,.dash-announcement .urgent,.logout-button){background:#361c25!important;color:var(--theme-red)!important;border-color:#653040!important}
html[data-theme=dark] body :where(.salary-loan-row:hover,.salary-loan-row:focus-visible){background:var(--theme-hover)!important}
html[data-theme=dark] body :where(input[type=color]){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color-scheme:dark!important}
html[data-theme=dark] body :where(.task-card-grid,.task-list-card,.task-mobile-card){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.task-mobile-actions button,input[type=file]){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body input[type=file]::file-selector-button{background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.task-area-badge,.task-mobile-area){background:#322916!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.task-technician i){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.task-mobile-actions .delete){color:var(--theme-red)!important}
html[data-theme=dark] body :where(.verify-card header em){background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body :where(.verify-card header em.allowed){background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.task-detail-section>p,.task-detail-grid>div,.task-detail-summary-grid>div,.task-detail-extra,.task-note-image-tile,.task-note-image-tile button,.task-detail-modal .task-map-radio){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.task-detail-modal .task-map-layer-menu button){color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.task-detail-modal .task-map-layer-menu button:hover){background:var(--theme-hover)!important}
html[data-theme=dark] body :where(.payment-method){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.payment-cash,.payment-approved,.task-cashflow-action.pushed){background:#15332b!important;border-color:#285b47!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.payment-pending){background:#322916!important;border-color:#65502c!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.payment-gcash){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.payment-bank){background:#2b203b!important;color:var(--theme-purple)!important}
html[data-theme=dark] body :where(.task-cashflow-action.available,.task-cashflow-action.available:hover){background:#322916!important;border-color:#65502c!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.tech-task-view-badges .type){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}

/* Hovered table cells and account/settings panels have independent light styles. */
html[data-theme=dark] body :where(tbody tr:hover>td){background:var(--theme-hover)!important}
html[data-theme=dark] body :where(.account-popover,.account-popover button,.account-dialog,.account-dialog form){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.account-dialog>header,.account-popover .account-signout,.task-settings-tabs,.task-settings-list,.task-settings-row,.task-choice-form,.sms-card>header,.sms-switches,.sms-template-section,.sms-template-preview,.telegram-switches,.telegram-switches label+label,.telegram-table td,.branding-settings footer){border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(.account-profile-summary>div,.account-dialog-close,.account-dialog-cancel,.sms-variables,.sms-variable-groups button,.sms-template-editor code,.telegram-preview,.telegram-variables button,.task-settings-tabs button){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.account-popover button:hover,.account-popover button:focus-visible,.account-dialog-close:hover,.account-dialog-cancel:hover,.task-settings-tabs button:hover,.sms-variable-groups button:hover,.sms-variable-groups button:focus-visible,.telegram-variables button:hover){background:var(--theme-hover)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.account-profile-summary span,.sms-template-preview output,.sms-template-title button){color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.account-popover .account-signout,.account-dialog-error,.task-settings-row .delete,.recovery-actions .danger){color:var(--theme-red)!important}
html[data-theme=dark] body :where(.account-dialog-overlay){background:rgb(0 0 0 / .7)!important}
html[data-theme=dark] body :where(.account-dialog-save){background:#3569e8!important;color:#fff!important}
html[data-theme=dark] body :where(.account-dialog-save:hover){background:#3b73f6!important}
html[data-theme=dark] body :where(.task-settings-tabs button.active){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.task-choice-switch input+span){background:#3b4d69!important}
html[data-theme=dark] body :where(.task-choice-switch input:checked+span){background:#3569e8!important}
html[data-theme=dark] body :where(.sms-status,.telegram-status){background:var(--theme-raised)!important;color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.sms-status.accepted,.telegram-status.accepted){background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.sms-status.failed,.sms-status.unknown){background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body :where(.sms-status.pending,.sms-status.sending,.telegram-status.failed,.telegram-status.unknown){background:#322916!important;color:var(--theme-amber)!important}

/* Mobile navigation sheets and finance drilldowns use the shared navy surfaces. */
html[data-theme=dark] body :where(.other-payable-summary-rows,.other-payable-summary-rows>div){border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(.mobile-more-sheet>header,.mobile-more-grid a,.other-payable-detail>article){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.mobile-more-sheet header button,.mobile-more-signout,.other-payable-facts,.an-work-bar,.an-status-stack){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.mobile-more-grid a:hover,.mobile-more-sheet header button:hover,.mobile-more-signout:hover){background:var(--theme-hover)!important}
html[data-theme=dark] body :where(.mobile-more-grid a.active){background:var(--fc-blue-soft)!important;border-color:var(--theme-blue)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.mobile-more-grid svg){stroke:var(--theme-blue)!important}
html[data-theme=dark] body :where(.loan-metric-icon)::after{border-color:var(--fc-surface)!important}

/* Keep map pin labels and directory details legible over the existing basemaps. */
html[data-theme=dark] body :where(.network-pin-marker b){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important;font-size:10px!important;box-shadow:0 2px 8px #0005!important}
html[data-theme=dark] body :where(.network-map-list-row,.network-map-list>button,.network-map-assignment-list>button){border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-map-list-main,.network-map-basemap>div button){color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-map-list small){font-size:10px!important;color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.network-map-list-row:hover,.network-map-list-row.selected,.network-map-list>button:hover,.network-map-list>button.selected,.network-map-basemap>div button:hover){background:var(--theme-hover)!important}
html[data-theme=dark] body :where(.network-map-list-actions button,.network-map-selection header>button){color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.network-map-list-actions button:hover){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.network-map-list-actions button.danger){color:var(--theme-red)!important}
html[data-theme=dark] body :where(.network-map-list-actions button.danger:hover){background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body :where(.network-map-list em){background:var(--theme-raised)!important;color:var(--fc-muted)!important;font-size:10px!important}
html[data-theme=dark] body :where(.network-map-list em.active){background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.network-map-list em.disconnected,.network-map-list em.cancelled){background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body :where(.network-map-list em.maintenance,.network-map-list em.unmapped,.network-map-assignment-list em){background:#322916!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.network-map-basemap>div,.network-map-assignment-list>button){background:var(--fc-surface)!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(.network-map-assignment-list>button:hover,.network-map-assignment-list>button.selected){background:var(--theme-hover)!important}
html[data-theme=dark] body :where(.network-map-selection footer button,.network-map-selection footer a){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-map-selection footer .danger){color:var(--theme-red)!important}

/* NAP board filters, summary pills and port actions have their own light surfaces. */
html[data-theme=dark] body :where(.network-map-port-head,.network-map-nap-card>header,.network-map-nap-card>footer){border-color:var(--fc-line)!important}
html[data-theme=dark] body :where(.network-map-board-controls label,.network-map-assignment-search,.network-map-import-drop,.network-map-import-type button,.network-map-import-footer button:not(.primary),.network-map-export>div){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-map-board-controls label svg,.network-map-assignment-search svg){color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.network-map-board-summary span,.network-map-import-summary span,.network-map-import-status){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.network-map-board-summary span strong){color:inherit!important}
html[data-theme=dark] body :where(.network-map-board-summary span.warning,.network-map-import-summary span.warning){background:#322916!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.network-map-import-summary span.ready,.network-map-import-status.ready,.network-map-import-status.update){background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.network-map-import-status.unmatched,.network-map-import-status.ambiguous,.network-map-import-status.duplicate,.network-map-import-status.router,.network-map-import-status.invalid){background:#322916!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.network-map-import-status.ignored,.network-map-import-status.existing){background:var(--theme-raised)!important;color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.network-map-port-row em){background:var(--theme-raised)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.network-map-port-row.available em){background:#285b47!important;color:var(--theme-green)!important}
html[data-theme=dark] body :where(.network-map-port-row.disconnected em,.network-map-port-row.defective em,.network-map-import-error){background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body :where(.network-map-port-row.reserved em){background:#322916!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.network-map-port-row small){font-size:8px!important;color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.network-map-port-row.available:hover){background:#204536!important}
html[data-theme=dark] body :where(.network-map-port-row.disconnected:hover){background:#482430!important}
html[data-theme=dark] body :where(.network-map-nap-status){background:#15332b!important;color:var(--theme-green)!important;font-size:8px!important}
html[data-theme=dark] body :where(.network-map-nap-status.planned,.network-map-nap-status.maintenance){background:#322916!important;color:var(--theme-amber)!important}
html[data-theme=dark] body :where(.network-map-nap-status.inactive){background:var(--theme-raised)!important;color:var(--fc-muted)!important}
html[data-theme=dark] body :where(.network-map-import-type button.active){background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.network-map-import-drop:hover,.network-map-export>div button:hover){background:var(--theme-hover)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-map-export>div button){color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-map-modal footer,.network-planner-modal footer,.network-planner-edit-list,.network-planner-connection-group){background:var(--fc-surface)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-map-pin-hint,.network-planner-flow-note,.network-planner-pon-powers span,.network-planner-popup-open,.network-planner-relocate-confirm){background:var(--fc-blue-soft)!important;border-color:var(--fc-line)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.network-planner-nav-row,.network-planner-nav-add,.network-planner-nav-toggle,.network-planner-nav-visibility){color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-planner-nav-add,.network-planner-step-detail,.network-planner-splice-row,.network-planner-poi,.network-planner-core-mapping>div label,.network-planner-connection-row,.network-planner-connection-kind,.network-planner-popup-delete,.network-planner-device-ports button,.network-planner-lcp-feeds button){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;color:var(--fc-ink)!important}
html[data-theme=dark] body :where(.network-planner-nav-row:hover,.network-planner-nav-row.is-selected,.network-planner-nav-visibility:hover,.network-planner-nav-visibility:focus-visible,.network-planner-step.is-selected,.network-planner-device-ports>div.is-selected,.network-planner-lcp-output.is-selected,.network-planner-lcp-feeds>div.is-selected){background:var(--fc-blue-soft)!important;border-color:var(--theme-blue)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body :where(.network-planner-workspace.is-fullscreen){background:var(--fc-canvas)!important}
html[data-theme=dark] body :where(.network-planner-lcp-feeds,.network-planner-state.deployed){background:#15332b!important;color:var(--theme-green)!important;border-color:#285b47!important}
html[data-theme=dark] body :where(.network-planner-form-error){background:#361c25!important;color:var(--theme-red)!important;border-color:#653040!important}
}
}
@media print{html{color-scheme:light!important}.theme-menu,.theme-toggle{display:none!important}}

/* My Tracker panels and mobile cards use the same palette as the app shell. */
@media screen{
@layer appearance{
html[data-theme=dark] body .personal-tracker .pt-ledger{background:var(--fc-surface)!important;border-color:var(--fc-line)!important;box-shadow:var(--fc-shadow)!important}
html[data-theme=dark] body .personal-tracker .pt-ledger>header{background:#15332b!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body .personal-tracker .pt-ledger.expense>header{background:#361c25!important}
html[data-theme=dark] body .personal-tracker .pt-ledger header i{background:#214c3d!important;color:var(--theme-green)!important}
html[data-theme=dark] body .personal-tracker .pt-ledger.expense header i{background:#542534!important;color:var(--theme-red)!important}
html[data-theme=dark] body .personal-tracker :is(.pt-ledger.income header>strong,.pt-ledger.income .pt-ledger-entry b,.pt-metric.income strong,.pt-amount.income){color:var(--theme-green)!important}
html[data-theme=dark] body .personal-tracker :is(.pt-ledger.expense header>strong,.pt-ledger.expense .pt-ledger-entry b,.pt-metric.expense strong,.pt-amount.expense){color:var(--theme-red)!important}
html[data-theme=dark] body .personal-tracker .pt-metric.net strong{color:var(--theme-blue)!important}
html[data-theme=dark] body .personal-tracker .pt-metric.balance strong{color:var(--theme-purple)!important}
html[data-theme=dark] body .personal-tracker .pt-metric.income i{background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body .personal-tracker .pt-metric.expense i{background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body .personal-tracker .pt-metric.net i{background:var(--fc-blue-soft)!important;color:var(--theme-blue)!important}
html[data-theme=dark] body .personal-tracker .pt-metric.balance i{background:#2d2046!important;color:var(--theme-purple)!important}
html[data-theme=dark] body .personal-tracker .pt-metric i:after{border-color:var(--fc-surface)!important}
html[data-theme=dark] body .personal-tracker .pt-metric span{color:var(--fc-muted)!important}
html[data-theme=dark] body .personal-tracker .pt-ledger-entry>div>strong{color:var(--fc-ink)!important}
html[data-theme=dark] body .personal-tracker .pt-table-scroll td::before{color:var(--fc-muted)!important}
html[data-theme=dark] body .personal-tracker .pt-row-actions button{border-color:var(--fc-line)!important;color:var(--fc-muted)!important}
html[data-theme=dark] body .personal-tracker .pt-row-actions button:last-child{color:var(--theme-red)!important}
html[data-theme=dark] body :is(.pt-modal .pt-form footer,.pt-modal .pt-modal-body){background:var(--fc-surface)!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body .pt-modal .pt-save-new{background:var(--theme-raised)!important;color:var(--fc-ink)!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body .pt-modal .pt-entry-options{color:var(--fc-muted)!important}
html[data-theme=dark] body .personal-tracker .pt-ledger-entries{scrollbar-color:#465874 var(--fc-surface)!important}
html[data-theme=dark] body .personal-tracker .pt-ledger-entry::before{background:var(--theme-hover)!important}
html[data-theme=dark] body .personal-tracker .pt-ledger-entries{background:var(--fc-surface)!important}
html[data-theme=dark] body .personal-tracker .pt-ledger-entry{background:var(--fc-surface)!important;box-shadow:none!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body .pt-modal :is(.pt-shortcut-card,.pt-shortcut-menu>div){background:var(--theme-raised)!important;border-color:var(--fc-line)!important;box-shadow:var(--fc-shadow)!important}
html[data-theme=dark] body .pt-modal :is(.pt-shortcut-use,.pt-shortcut-menu button){color:var(--fc-ink)!important}
html[data-theme=dark] body .pt-modal .pt-shortcut-symbol{background:var(--fc-blue-soft)!important}
html[data-theme=dark] body .pt-modal :is(.pt-shortcut-menu summary,.pt-shortcut-archive-toggle){color:var(--fc-muted)!important}
html[data-theme=dark] body .pt-modal .pt-shortcut-use b{color:var(--theme-blue)!important}
html[data-theme=dark] body .pt-modal .pt-shortcut-use:not(:disabled):hover,html[data-theme=dark] body .pt-modal .pt-shortcut-menu button:hover{background:var(--theme-hover)!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body .pt-modal .pt-category-group{background:var(--theme-raised)!important;border-color:var(--fc-line)!important;box-shadow:var(--fc-shadow)!important}
html[data-theme=dark] body .pt-modal .pt-category-children{border-color:var(--fc-line)!important}
html[data-theme=dark] body .pt-modal :is(.pt-category-expand,.pt-category-actions button){color:var(--fc-ink)!important}
html[data-theme=dark] body .pt-modal .pt-category-count{color:var(--fc-muted)!important}
html[data-theme=dark] body .pt-modal .pt-category-type{background:#361c25!important;color:var(--theme-red)!important}
html[data-theme=dark] body .pt-modal .pt-category-group.income .pt-category-type{background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body .pt-modal .pt-category-switch{background:#465874!important}
html[data-theme=dark] body .pt-modal .pt-category-switch.active{background:#3569e8!important}
html[data-theme=dark] body .pt-modal .pt-category-switch span{background:#fff!important}
html[data-theme=dark] body .pt-detail-dialog .cash-detail-summary{background:var(--theme-raised)!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body .pt-detail-dialog :is(.cash-detail-section,.pt-detail-footer){border-color:var(--fc-line)!important}
html[data-theme=dark] body .pt-detail-dialog .cash-detail-field>span,html[data-theme=dark] body .pt-detail-dialog .cash-detail-section>span{color:var(--fc-muted)!important}
html[data-theme=dark] body .pt-detail-dialog .cash-detail-summary strong.income{color:var(--theme-green)!important}
html[data-theme=dark] body .pt-detail-dialog .cash-detail-summary strong.expense{color:var(--theme-red)!important}
html[data-theme=dark] body .pt-detail-dialog .cash-detail-status{background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body .pt-detail-dialog .cash-detail-status.unpaid{background:#322916!important;color:var(--theme-amber)!important}
html[data-theme=dark] body .cash-detail-modal .cash-detail-summary{background:var(--theme-raised)!important;border-color:var(--fc-line)!important}
html[data-theme=dark] body .cash-detail-modal :is(.cash-detail-account-balance+section,.cash-detail-balance-after){border-color:var(--fc-line)!important}
html[data-theme=dark] body .cash-detail-modal .cash-detail-account-balance dt{color:var(--fc-muted)!important}
html[data-theme=dark] body .cash-detail-modal .cash-detail-account-balance dd{color:var(--fc-ink)!important}
html[data-theme=dark] body .cash-detail-modal .cash-detail-account-balance dd.income{color:var(--theme-green)!important}
html[data-theme=dark] body .cash-detail-modal .cash-detail-account-balance dd.expense{color:var(--theme-red)!important}
html[data-theme=dark] body .cash-detail-modal .cash-detail-status{background:#15332b!important;color:var(--theme-green)!important}
html[data-theme=dark] body .cash-detail-modal .cash-detail-status.unpaid{background:#322916!important;color:var(--theme-amber)!important}
}
}
