/* Keep daily entry first; financial details live in Payments. */
#view-payments{display:grid;gap:20px}
#view-payments>.payroll-summary{margin-bottom:0}
.employee-balances{min-width:760px;width:100%}
.employee-balances th,.employee-balances td{padding:18px 20px}
.employee-balances th:first-child,.employee-balances td:first-child{position:sticky;left:0;background:#fff;z-index:1;min-width:190px}
.employee-balances .employee-text{max-width:240px}
.employee-balances th:last-child,.employee-balances td:last-child{text-align:right}
.employee-balances .balance-amount{font-variant-numeric:tabular-nums;font-weight:500;color:#41455d}
.employee-balances .balance-due{font-weight:650;color:#6653b8}
.employee-balances .secondary{white-space:nowrap;min-height:42px}
.balance-incomplete{display:block;margin:8px 0 0 45px;font-size:12px;line-height:1.5;color:#87622a}
.payment-history>summary,.legacy-payment-details>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px;cursor:pointer;font-size:17px;font-weight:600;list-style:none}
.payment-history>summary::-webkit-details-marker,.legacy-payment-details>summary::-webkit-details-marker{display:none}
.history-count{display:inline-block;margin-left:8px;padding:2px 8px;background:#f1eefb;border-radius:6px;color:#776799;font-size:13px;font-variant-numeric:tabular-nums}
.history-count:empty{display:none}
.history-toggle{font-size:23px;color:#7b8298;transition:transform .15s}
.payment-history[open] .history-toggle{transform:rotate(180deg)}
.payment-history .panel-heading{padding-top:4px;align-items:center;gap:16px}
.payment-history .panel-heading>p{max-width:650px;margin:0;font-size:14px;line-height:1.6;color:#667087}
.legacy-payment-details>summary{font-size:14px;color:#667087;font-weight:500;justify-content:flex-start}
.legacy-payment-details>summary::before{content:'›';font-size:20px}
.legacy-payment-details[open]>summary::before{transform:rotate(90deg)}
.legacy-payment-details .payments-help{margin-top:0;font-size:14px}
.legend-dot.due{background:#eeeafa}
.day-cell.work-due{background:#eeeafa;color:#6e59ad}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:650px){
 #view-payments{gap:14px}
 .employee-balances-panel .panel-heading{align-items:flex-start;gap:16px;flex-wrap:wrap}
 .employee-balances-panel .actions{width:100%}
 .employee-balances-panel .actions>.primary{flex:1}
 .employee-balances{display:block;min-width:0}
 .employee-balances thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
 .employee-balances tbody{display:block}
 .employee-balances tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 18px;padding:16px;border-top:1px solid var(--line)}
 .employee-balances td{padding:6px 0;border:0;white-space:normal}
 .employee-balances td:first-child{position:static;min-width:0;max-width:none;grid-column:1/-1;padding-bottom:10px}
 .employee-balances .employee-text{max-width:240px}
 .employee-balances td[data-label]::before{content:attr(data-label);display:block;margin-bottom:5px;color:#667087;font-size:12px;font-weight:400}
 .employee-balances .balance-amount{font-size:18px;overflow-wrap:anywhere}
 .employee-balances td:last-child{grid-column:1/-1;padding-top:10px}
 .employee-balances td:last-child .secondary{width:100%}
 .payment-history>summary,.legacy-payment-details>summary{padding:18px 16px}
 .payment-history .panel-heading{flex-wrap:wrap}
}
