/* Employee payroll overview. Detail and printable payslips keep their own styles. */
.employee-payslip-page {
    --payroll-accent: var(--ep-brand, #00877d);
    --payroll-ink: var(--ep-text, #243247);
    --payroll-muted: var(--ep-muted, #64748b);
    --payroll-surface: var(--ep-surface, #fff);
    --payroll-border: var(--ep-border, #e3e8ef);
    --payroll-soft: var(--ep-soft, var(--teal-soft, #e2f5f0));
}
.payroll-overview { display: grid; gap: 24px; width: 100%; min-width: 0; color: var(--payroll-ink); }
.payroll-summary { padding: 20px; background: var(--payroll-surface); border: 1px solid var(--payroll-border); border-radius: 18px; min-width: 0; }
.payroll-salary-card { display: flex; align-items: center; gap: 16px; padding: 22px 18px; border-radius: 14px; background: var(--payroll-soft); }
.payroll-wallet-icon { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; color: var(--payroll-accent); background: color-mix(in srgb, var(--payroll-accent) 12%, var(--payroll-surface)); border-radius: 13px; }
.payroll-wallet-icon svg { width: 29px; height: 29px; }
.payroll-salary-card > div { display: grid; gap: 5px; min-width: 0; }
.payroll-salary-card span:not(.payroll-wallet-icon) { font-size: 12px; }
.payroll-salary-card strong { font-size: clamp(22px, 5.8vw, 30px); line-height: 1.2; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.payroll-salary-card small { color: var(--payroll-muted); font-size: 10px; line-height: 1.5; }
.payroll-summary-lines { margin: 14px 0 0; }
.payroll-summary-lines > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; }
.payroll-summary-lines dt { display: flex; align-items: center; gap: 9px; color: var(--payroll-muted); font-size: 12px; font-weight: 400; }
.payroll-summary-lines dt svg { flex-shrink: 0; }
.payroll-summary-lines dd { margin: 0; color: var(--payroll-ink); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.payroll-deductions-line dt svg { color: var(--payroll-accent); }
.payroll-summary-lines .payroll-take-home { margin-top: 8px; padding: 17px 2px; border-top: 1px solid var(--payroll-border); }
.payroll-take-home dt, .payroll-take-home dd { color: var(--payroll-ink); font-weight: 600; font-size: 15px; }
.payroll-view-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 11px; background: var(--payroll-accent); color: #fff; font-size: 13px; box-shadow: 0 4px 12px #00877d18; }
.payroll-view-button:hover { filter: brightness(.95); }
.payroll-history { min-width: 0; }
.payroll-history-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 8px; }
.payroll-history-heading h2 { margin: 0; color: var(--payroll-ink); font-size: 14px; line-height: 1.4; letter-spacing: -.015em; }
.payroll-history-heading button { min-height: 44px; padding: 8px 0 8px 14px; border: 0; background: transparent; color: var(--payroll-accent); font-size: 11px; }
.payroll-history-list { display: grid; gap: 10px; }
.payroll-history-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 14px 12px; border: 1px solid var(--payroll-border); border-radius: 13px; background: var(--payroll-surface); color: var(--payroll-ink); text-align: left; }
.payroll-history-card:hover { border-color: var(--payroll-accent); }
.payroll-history-icon { display: grid; place-items: center; width: 36px; height: 40px; border-radius: 10px; background: var(--payroll-soft); color: var(--payroll-accent); }
.payroll-history-period, .payroll-history-amount { display: grid; gap: 4px; min-width: 0; }
.payroll-history-period strong, .payroll-history-amount strong { font-size: 12px; line-height: 1.5; }
.payroll-history-period small, .payroll-history-amount small { font-size: 10px; line-height: 1.5; color: var(--payroll-muted); overflow-wrap: anywhere; }
.payroll-history-amount { text-align: right; font-variant-numeric: tabular-nums; }
.payroll-history-amount small { color: var(--payroll-accent); }
.payroll-overview button:focus-visible { outline: 2px solid var(--payroll-accent); outline-offset: 3px; }
html[data-theme="dark"] .payroll-view-button { color: #12322e; }
@media (min-width: 1000px) {
    .payroll-overview { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 28px; max-width: 1100px; }
}
@media (max-width: 760px) {
    /* Match the Attendance and Requests menu palette, including the shell. */
    body .page:has(.employee-payslip-page.is-list-open, .employee-employment-page, .employee-service-record-list-page) {
        --ep-brand: #00877d; --ep-soft: #e2f5f0; --ep-bg: #f2f8fa;
        --ep-surface: #fff; --ep-text: #101e43; --ep-muted: #607187; --ep-border: #e0ebee;
    }
    html[data-theme="dark"] body .page:has(.employee-payslip-page.is-list-open, .employee-employment-page, .employee-service-record-list-page) {
        --ep-brand: #7ddfc9; --ep-soft: #1b423f; --ep-bg: #12232b;
        --ep-surface: #1b303b; --ep-text: #edf6ff; --ep-muted: #b4c8d7; --ep-border: #354d58;
    }
    .payroll-overview { gap: 16px; }
    .payroll-summary { padding: 0; border: 0; border-radius: 0; background: transparent; }
    .payroll-salary-card { padding: 20px 16px; }
    .payroll-history-heading { margin-bottom: 6px; }
}
@media (max-width: 359px) {
    .payroll-salary-card { gap: 12px; padding: 18px 12px; }
    .payroll-wallet-icon { width: 40px; height: 44px; }
    .payroll-history-card { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; padding: 12px 9px; }
    .payroll-history-icon { width: 28px; }
    .payroll-history-period strong, .payroll-history-amount strong { font-size: 11px; }
}

.payroll-salary-card .payroll-salary-change { color: var(--payroll-accent); font-size: 11px; line-height: 1.5; }
.payroll-salary-card .payroll-salary-change.is-decrease { color: var(--hris-danger, #b91c1c); }
.payroll-salary-card .payroll-salary-change.is-unchanged { color: var(--payroll-muted); }
html[data-theme="dark"] .payroll-salary-card .payroll-salary-change.is-decrease { color: #fda4af; }
