/* THRS V14.74 — Payroll / Dark Mode palette correction.
   Paint-only. Approved V14.36 finance hero SVG, flow, totals, payroll calculations,
   actions, ledger length, rows, amounts and Light Mode stay unchanged. */
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll{
 --pr36-paper:#142d40!important;
 --pr36-soft:#203d51!important;
 --pr36-ink:#edf4f8!important;
 --pr36-muted:#c1d1dc!important;
 --pr36-border:#4d6d80!important;
 --pr36-gold:#d3a654!important;
 --pr36-shadow:0 8px 21px rgba(0,8,19,.23),inset 0 1px 0 rgba(255,255,255,.035)!important;
 color-scheme:dark!important;
}
/* Keep hero chart, invoice, waving gold lines intact. Only buttons change. */
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.page-header .thrs-btn-secondary{
 background:linear-gradient(145deg,#203e51,#122e40)!important;
 color:#e9f3f9!important;
 border-color:#5c788b!important;
 box-shadow:0 5px 12px rgba(0,8,20,.2)!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.page-header .thrs-btn-primary{
 background:linear-gradient(130deg,#e1bd79,#cda357)!important;
 color:#142d40!important;
 border-color:#c6a05c!important;
 box-shadow:0 5px 12px rgba(0,8,20,.18)!important;
}
/* Three native workflow filters — retain selected state, count and dimensions. */
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip>.thrs-payroll-flow-step{
 background:linear-gradient(130deg,#18374b,#142e41)!important;
 border-color:#4e6e81!important;
 box-shadow:0 5px 13px rgba(0,8,20,.19)!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip>.thrs-payroll-flow-step.is-active{
 background:linear-gradient(130deg,#264454,#163347)!important;
 border-color:#ba9759!important;
 box-shadow:0 4px 14px rgba(0,8,20,.19),inset 0 0 0 1px rgba(211,166,84,.13)!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .thrs-payroll-flow-step .thrs-flow-index{
 background:linear-gradient(135deg,#23475a,#102e41)!important;
 border-color:#648096!important;
 color:#dce8f0!important;
 box-shadow:none!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .thrs-payroll-flow-step b{
 color:#d9b36b!important;
}
/* The four original metric cards remain fully intact — muted four-color icon wells. */
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div>.thrs-card{
 border-color:#4d6d80!important;
 box-shadow:0 6px 17px rgba(0,8,20,.2)!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div>.thrs-card:nth-child(1){
 background:radial-gradient(circle at 88% 89%,rgba(113,106,160,.11),transparent 43%),linear-gradient(130deg,#19374a,#142e40)!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div>.thrs-card:nth-child(2){
 background:radial-gradient(circle at 88% 89%,rgba(81,139,114,.11),transparent 43%),linear-gradient(130deg,#19374a,#142e40)!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div>.thrs-card:nth-child(3){
 background:radial-gradient(circle at 88% 89%,rgba(162,131,76,.11),transparent 43%),linear-gradient(130deg,#19374a,#142e40)!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div>.thrs-card:nth-child(4){
 background:radial-gradient(circle at 88% 89%,rgba(159,92,119,.10),transparent 43%),linear-gradient(130deg,#19374a,#142e40)!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div>.thrs-card:nth-child(1)::before{
 background:linear-gradient(135deg,#4b426b,#393858)!important;
 color:#dbd0f2!important;
 box-shadow:none!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div>.thrs-card:nth-child(2)::before{
 background:linear-gradient(135deg,#205a49,#194538)!important;
 color:#b7e5d0!important;
 box-shadow:none!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div>.thrs-card:nth-child(3)::before{
 background:linear-gradient(135deg,#625035,#493e31)!important;
 color:#f1d29a!important;
 box-shadow:none!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div>.thrs-card:nth-child(4)::before{
 background:linear-gradient(135deg,#673c51,#4a3445)!important;
 color:#f1c4d5!important;
 box-shadow:none!important;
}
/* Control dashboard and salary review notes: dark surfaces, accessible warning text. */
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div+.thrs-card>div:last-child>div:first-child>div{
 background:linear-gradient(135deg,#1b3a4d,#183448)!important;
 border-color:#547287!important;
 box-shadow:none!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-payroll-flow-strip+div+.thrs-card>div:last-child>div:nth-child(2)>div>strong{
 background:#1c3c50!important;
 border-color:#557487!important;
 color:#eaf4f8!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll [style*="color: rgb(180, 83, 9)"],
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll [style*="color: #b45309"]{
 color:#e4bc79!important;
}
/* Inputs and filters should use native dark menus; no widths or field count changed. */
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-card:has(.form-select):not(:has(.modern-table)) :is(.form-input,.form-select){
 background:#1a394c!important;
 border-color:#5a778b!important;
 color:#eaf4fa!important;
 -webkit-text-fill-color:#eaf4fa!important;
 color-scheme:dark!important;
 box-shadow:0 4px 10px rgba(0,8,20,.16)!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-card:has(.form-select):not(:has(.modern-table)) .form-select option{
 background:#183548!important;
 color:#eaf4f9!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-card:has(.form-select):not(:has(.modern-table)) .form-input::placeholder{
 color:#bed0dc!important;
 -webkit-text-fill-color:#bed0dc!important;
 opacity:1!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>.thrs-card:has(.form-select):not(:has(.modern-table)) .thrs-btn{
 background:#204054!important;
 border-color:#56768a!important;
 color:#ecf4f9!important;
}
/* Finance ledger: alternating quiet navy rows, preserve all monetary values. */
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table thead th{
 background:linear-gradient(130deg,#1b394c,#112d40)!important;
 border-bottom-color:#5b788a!important;
 color:#d8e5ec!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody tr.modern-table-row:nth-child(odd) td{
 background:#142f43!important;
 border-bottom-color:#415f73!important;
 color:#eaf4f9!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody tr.modern-table-row:nth-child(even) td{
 background:#203d51!important;
 border-bottom-color:#496a7e!important;
 color:#eaf4f9!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody tr.modern-table-row:hover td{
 background:#2b4b5f!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody tr.modern-table-row td:nth-child(4) span{
 color:#84c9a8!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody tr.modern-table-row td:nth-child(5) span{
 color:#a6c0e3!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody tr.modern-table-row td:nth-child(6) span{
 color:#e7aab2!important;
}
/* High-contrast status badges: fix the old forced pale success backgrounds. */
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody td .badge-success{
 background:#194538!important;
 color:#bee8d3!important;
 border-color:#4e8871!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody td .badge-warning{
 background:#473a2a!important;
 color:#eed19c!important;
 border-color:#977b50!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody td .badge-info{
 background:#254257!important;
 color:#c8dfef!important;
 border-color:#577a90!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody td .badge-danger{
 background:#482f3b!important;
 color:#eebec8!important;
 border-color:#976374!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody td:last-child .thrs-btn-secondary{
 background:#204055!important;
 color:#eaf4f9!important;
 border-color:#5b7b8e!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody td:last-child .thrs-btn-success{
 background:linear-gradient(140deg,#235d4a,#1b493c)!important;
 color:#c6edda!important;
 border-color:#5a9479!important;
 box-shadow:none!important;
}
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll .modern-table tbody td:last-child .thrs-btn-danger{
 background:#633844!important;
 color:#f3d2dc!important;
 border-color:#a26b78!important;
 box-shadow:none!important;
}
/* Inline error state is also dark-only; do not change retry behavior. */
html[data-theme="dark"] body .thrs-shell .thrs-page-payroll>div[role="alert"]{
 background:#3f3037!important;
 border-color:#94606b!important;
 color:#f0c9d1!important;
}
/* No geometry, type, spacing, layout, data, workflow, or light CSS changes. */
