/* Payroll additions on top of Anchor's style.css (copied as-is). Tokens only:
   every colour here comes from a variable defined in style.css for both themes. */

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; font-size: 12.5px; color: var(--text3); }
.meta strong { color: var(--text); }

.notice { padding: 11px 14px; border-radius: var(--r); border: 1px solid var(--border); font-size: 13px; line-height: 1.5; margin: 0 0 14px; background: var(--card); }
.page-body > .notice { margin: 0; }
.notice-ok   { border-color: color-mix(in srgb, var(--green) 30%, transparent); background: var(--green-soft); color: var(--text); }
.notice-info { border-color: color-mix(in srgb, var(--blue) 30%, transparent); background: var(--blue-soft); color: var(--text); }
.notice-warn { border-color: color-mix(in srgb, var(--amber) 35%, transparent); background: var(--amber-soft); color: var(--text); }
.notice-err  { border-color: color-mix(in srgb, var(--red) 35%, transparent); background: var(--red-soft); color: var(--text); }

.inline-form { display: inline-flex; align-items: center; gap: 8px; }
.page-header .inline-form select, .page-header .inline-form input { width: auto; }
.w-year { width: 92px !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-xs { padding: 2px 8px; font-size: 11.5px; margin-left: 8px; }

.stmt-totals { display: flex; gap: 8px; align-items: baseline; font-size: 13px; font-variant-numeric: tabular-nums; }
.stmt-totals strong { margin-right: 10px; }

.warn-list { list-style: none; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.warn-list li { font-size: 12.5px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--amber-soft); color: var(--text); }

.diff { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg2); }
.diff-title { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text3); margin-bottom: 6px; }
.diff-table { border: none; width: auto; min-width: 0; background: transparent; }
.diff-table td { height: auto; padding: 3px 14px 3px 0; border: none; font-size: 12.5px; }
.diff-table .up { color: var(--accent-text); font-weight: 600; }
.diff-table .down { color: var(--text2); font-weight: 600; }

table.lines tr.group th { background: var(--bg2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text3); }
table.lines tr.changed td { background: var(--accent-softer); }
table.lines tr.changed td:first-child { box-shadow: inset 3px 0 0 var(--violet); }
td.trace { font-size: 11.5px; color: var(--text3); line-height: 1.45; min-width: 280px; overflow-wrap: anywhere; }

.checks { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.checks input { width: auto; }
.form-actions { margin-top: 16px; display: flex; gap: 8px; }
.form-card { max-width: 760px; }
.history { list-style: none; margin-top: 12px; font-size: 12px; color: var(--text2); display: flex; flex-direction: column; gap: 3px; }
.send-back .flex-row { display: flex; gap: 8px; }
.send-back .flex-row input { flex: 1; }
.login-card select { width: 100%; margin-bottom: 14px; }

/* A statement's lines are short; let the page scroll, not the card. */
.table-wrap.uncapped { max-height: none; }
/* Success messages float bottom-right like Anchor's toasts; errors stay at the top. */
.notice-ok { position: fixed; right: 22px; bottom: 22px; z-index: 300; max-width: 420px; box-shadow: var(--shadow-md); background: var(--card); border-left: 3px solid var(--green); }
.main > .notice-err { margin-top: 16px; }
.blockers { margin: 6px 0 0 18px; display: flex; flex-direction: column; gap: 4px; }
/* Short tables (payments, liabilities) fit their card instead of scrolling sideways. */
.table-wrap.fit table { min-width: 0; }
/* Taxes & deposits */
tbody.liab.overdue td { background: var(--red-soft); }
tbody.liab tr:first-child td { border-bottom: none; }
tr.liab-action td { height: auto; padding-top: 0; padding-bottom: 12px; }
td.agency { min-width: 220px; }
.pay-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pay-form input { width: auto; min-width: 0; padding: 5px 8px; font-size: 12.5px; }
.pay-form label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; color: var(--text3); font-weight: 500; }
.pay-form input[name="amount"] { width: 100px; }
.pay-form input[name="confirmation"], .pay-form input[name="reason"] { width: 150px; }
.segmented-links { gap: 4px; }
/* Review: why each line changed */
.reasons { list-style: none; margin: 0 0 8px; font-size: 12.5px; color: var(--text2); display: flex; flex-direction: column; gap: 2px; }
.reasons li::before { content: '• '; color: var(--violet); }
.diff-table td.why { font-size: 11.5px; color: var(--text3); white-space: normal; max-width: 460px; }
.diff-table tr.unexplained td { color: var(--red); font-weight: 600; }
.flag-list li { background: var(--red-soft); }
.card-alert { border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.confirm-row { display: flex; gap: 8px; margin-top: 10px; }
.confirm-row input { flex: 1; }
/* Pay stub (also prints) */
.stub-page { background: var(--bg); display: block; }
.stub { max-width: 820px; margin: 24px auto; padding: 28px 32px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); }
.stub-actions { display: flex; justify-content: space-between; margin-bottom: 18px; }
.stub-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.stub-company { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 22px; }
.stub-meta { display: grid; grid-template-columns: auto auto; gap: 3px 14px; font-size: 13px; }
.stub-meta dt { color: var(--text3); }
.stub-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.stub-totals > div { border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stub-totals .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text3); }
.stub-totals .value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stub-totals .value.sm { font-size: 15px; }
.stub-totals .net .value { color: var(--accent-text); }
.stub-totals .ytd { font-size: 12px; color: var(--text3); }
.stub-changes { background: var(--bg2); border-radius: var(--r); padding: 12px 14px; margin-bottom: 16px; font-size: 13px; }
.stub-changes h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text3); margin-bottom: 6px; }
.stub-changes ul { margin-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.stub-section table { width: 100%; min-width: 0; margin-bottom: 12px; }
.stub-section td, .stub-section th { height: auto; padding: 6px 10px; }
.stub-foot { margin-top: 14px; }
.w2-table { width: 100%; min-width: 0; border: none; }
.w2-table td { height: auto; padding: 5px 8px; vertical-align: top; }
@media print {
  .no-print { display: none !important; }
  .stub-page { background: #fff; }
  .stub { border: none; margin: 0; padding: 0; max-width: none; }
}

/* Corrections */
.pay-form input.wide { width: 280px; }

/* ---- UX pass: Home, next steps, no sideways scrolling ---- */
.table-wrap table { min-width: 0; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text3); }
.next-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.next-date { font-family: var(--serif); font-size: 30px; line-height: 1.15; margin: 2px 0 4px; }
.next-action { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.step-text { font-size: 12.5px; }
.step-todo { color: var(--accent-text); font-weight: 600; }
.step-late { color: var(--red); font-weight: 700; }
.step-ok { color: var(--blue); }
.step-done, .step-muted { color: var(--text3); }
.todo-list { list-style: none; display: flex; flex-direction: column; }
.todo { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; }
.todo:first-child { border-top: none; }
.todo-text { flex: 1; }
.todo-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text4); }
.todo-late .todo-dot { background: var(--red); }
.todo-todo .todo-dot { background: var(--violet); }
.todo-wait .todo-dot { background: var(--amber); }
.runs-table td { vertical-align: middle; }
/* Run page */
.steps { list-style: none; display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--card); }
.steps li { flex: 1; text-align: center; font-size: 11.5px; font-weight: 600; padding: 7px 4px; color: var(--text3); border-left: 1px solid var(--border); }
.steps li:first-child { border-left: none; }
.steps li.done { color: var(--text2); background: var(--bg2); }
.steps li.now { color: #fff; background: var(--accent); }
.status-line { font-size: 13px; color: var(--text2); line-height: 1.5; }
.text-red { color: var(--red); }
.people-table td.up { color: var(--accent-text); font-weight: 600; }
.people-table td.down { color: var(--text2); font-weight: 600; }
details.stmt > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.stmt > summary::-webkit-details-marker { display: none; }
details.stmt > summary::before { content: '▸'; color: var(--text3); margin-right: 6px; }
details.stmt[open] > summary::before { content: '▾'; }
details.stmt > summary .stmt-name { flex: 1; font-weight: 700; color: var(--accent-text); }
details.stmt[open] > summary { margin-bottom: 12px; }
.sub-details { margin-top: 10px; }
.sub-details > summary { cursor: pointer; font-size: 12.5px; color: var(--text2); padding: 6px 0; }
.more-actions > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text2); }
.more-actions[open] > summary { margin-bottom: 12px; }
table.lines td.trace { min-width: 0; }
@media (max-width: 1100px) { .hide-narrow { display: none; } }
/* Employee: current setup */
.setup { list-style: none; }
.setup > li { display: grid; grid-template-columns: 130px 1fr auto; gap: 4px 16px; align-items: start; padding: 11px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.setup > li:first-child { border-top: none; }
.setup .k { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text3); padding-top: 2px; }
.setup details.edit { grid-column: 3; justify-self: end; }
.setup details.edit[open] { grid-column: 1 / -1; justify-self: stretch; background: var(--bg2); border-radius: var(--r); padding: 12px 14px; }
.setup details.edit > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--accent-text); list-style: none; text-align: right; }
.setup details.edit > summary::-webkit-details-marker { display: none; }
.setup details.edit[open] > summary { text-align: left; margin-bottom: 10px; }
.setup .private { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.setup .pv { display: inline-flex; align-items: center; gap: 6px; }
/* Taxes grouped */
.liab-list { list-style: none; }
.liab-list > li { padding: 11px 0; border-top: 1px solid var(--border); }
.liab-list > li:first-child { border-top: none; }
.liab-main { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.liab-amt { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.liab-pay { margin-top: 6px; }
.liab-pay > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--accent-text); }
.liab-pay[open] > summary { margin-bottom: 8px; }
.card-head h3 .todo-dot { display: inline-block; vertical-align: middle; margin-right: 4px; }
tr.inactive td { color: var(--text3); }
/* Audit list */
.audit-list { list-style: none; }
.audit-list li { display: grid; grid-template-columns: 10px 120px 70px 1fr; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; }
.audit-list li:first-child { border-top: none; }
.audit-who { font-weight: 600; }
.more-summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text2); }
.kpi-tile .value.text-red { color: var(--red); }
/* Sidebar mark: the white house rabbit straight on the plum rail (as in Cadence Plan), no tile */
.brand-mark.brand-mark-white { background: none; width: 30px; height: 32px; border-radius: 0; }
.brand-mark.brand-mark-white img { width: 28px; height: 30px; }
/* Filings */
details.filing > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
details.filing > summary::-webkit-details-marker { display: none; }
details.filing[open] > summary { margin-bottom: 8px; }
.filing-name { flex: 1; }
.filing-due { font-size: 12.5px; white-space: nowrap; }
.form-lines { width: 100%; min-width: 0; border: none; margin-top: 8px; }
.form-lines td { height: auto; padding: 5px 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
.form-lines tr:last-child td { border-bottom: none; }
