/* Home and Month-End Close (UX overhaul batch 1, 2026-10-04). Zentrum tokens only. */

/* --- Home ------------------------------------------------------------------- */
.hm-top { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hm-head h2, .hm-figs-head h2 { font-size: 20px; margin: 0; }
.hm-empty { margin: 4px 0 0; }
.hm-list { list-style: none; margin: 0; padding: 0; }
.hm-task {
  display: grid; grid-template-columns: 4px minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--amino-border);
}
.hm-task:first-child { border-top: 0; }
.hm-mark { align-self: stretch; border-radius: 4px; background: var(--z-accent); }
.hm-task.warn .hm-mark { background: var(--z-warn); }
.hm-task.bad .hm-mark { background: var(--z-bad); }
.hm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-text strong { font-weight: 600; color: var(--amino-text); }
.hm-text .muted { font-size: 13px; overflow-wrap: anywhere; }
.hm-amt { font-variant-numeric: tabular-nums; font-family: var(--z-font-mono); font-size: 13px; color: var(--amino-text); white-space: nowrap; }
.hm-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.hm-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0 0; border-top: 1px solid var(--amino-border); font-size: 14px; }
.hm-row .num { font-variant-numeric: tabular-nums; font-family: var(--z-font-mono); font-size: 13px; color: var(--amino-text); text-align: right; }
.hm-bar { position: relative; height: 8px; border-radius: 99px; background: var(--amino-surface-sunk); margin: -4px 0 0; }
.hm-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--z-s1); }
.hm-bar b { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--amino-text); opacity: .55; }
.hm-sub { font-size: 12.5px; margin-top: -6px; }
.hm-links { display: flex; gap: 16px; flex-wrap: wrap; }
.hm-figs-head { display: flex; align-items: baseline; gap: 10px; margin: 28px 0 12px; }
.hm-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hm-fig {
  display: flex; flex-direction: column; gap: 4px; text-align: left; min-width: 0; cursor: pointer;
  background: var(--amino-surface); border: 0; border-radius: var(--amino-radius-lg); box-shadow: var(--z-paper-shadow);
  padding: 16px; color: inherit; font: inherit; transition: transform .15s ease;
}
.hm-fig:hover { transform: translateY(-2px); }
.hm-fig-v { font-family: var(--amino-font-display); font-size: 26px; font-weight: 700; color: var(--amino-text); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-fig-d { font-size: 12.5px; color: var(--amino-text-muted); }
.hm-fig-d.up { color: var(--z-good); }
.hm-fig-d.down { color: var(--z-bad); }

/* --- Month-End Close ------------------------------------------------------------ */
.cl-months { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cl-chip-state { font-size: 11px; font-weight: 600; margin-left: 6px; opacity: .75; }
.cl-chip-state.ok { color: var(--z-good); }
.z-chip[aria-pressed="true"] .cl-chip-state { color: inherit; }
.cl-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cl-step {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: var(--amino-surface); border: 1px solid var(--amino-border); border-radius: 12px; padding: 10px 12px;
  color: var(--amino-text); font: inherit; font-size: 14px; font-weight: 600;
}
.cl-step.on { border-color: var(--z-accent); box-shadow: 0 0 0 3px var(--z-accent-soft); }
.cl-step-k {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--z-font-mono); font-size: 12px; background: var(--amino-surface-sunk); color: var(--amino-text-muted);
}
.cl-step.done .cl-step-k { background: var(--z-good-bg); color: var(--z-good); }
.cl-body { display: flex; flex-direction: column; gap: 16px; }
.cl-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl-save { justify-content: flex-end; }
.cl-asof { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cl-wallets { display: flex; flex-direction: column; }
.cl-wallet {
  display: grid; grid-template-columns: minmax(0, 1fr) 160px 130px; gap: 12px; align-items: center;
  padding: 9px 0; border-top: 1px solid var(--amino-border); font-size: 14px;
}
.cl-wallet label { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cl-hint { font-size: 12px; }
.cl-wallet input { width: 100%; text-align: right; font-family: var(--z-font-mono); font-variant-numeric: tabular-nums; }
.cl-wallet .num { text-align: right; font-family: var(--z-font-mono); font-variant-numeric: tabular-nums; font-size: 13px; }
.cl-wallet-head { border-top: 0; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--amino-text-muted); font-weight: 600; }
.cl-wallet-head .num { font-family: inherit; font-size: inherit; }
.cl-last { color: var(--amino-text-muted); }
.cl-total { font-weight: 700; border-top: 1px solid var(--amino-text); }
.cl-saved-note { margin: -6px 0 0; font-size: 12.5px; }
.cl-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cl-figs > div { background: var(--amino-surface-sunk); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cl-figs > div.ok { background: var(--z-good-bg); }
.cl-figs > div.off { background: var(--z-warn-bg); }
.cl-figs b { font-size: 15px; font-weight: 600; color: var(--amino-text); font-family: var(--z-font-mono); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cl-items { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.cl-item { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 150px 28px; gap: 8px; align-items: center; }
.cl-item input[type="number"] { text-align: right; font-family: var(--z-font-mono); }
.cl-item .num { text-align: right; }
.cl-note { display: flex; flex-direction: column; gap: 6px; }
.cl-note textarea { min-height: 3.5em; width: 100%; }
.cl-closed { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl-review td.neg { color: var(--z-bad); }

@media (max-width: 980px) {
  .hm-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hm-task { grid-template-columns: 4px minmax(0, 1fr) auto; row-gap: 8px; }
  .hm-acts { grid-column: 2 / -1; justify-content: flex-start; }
  .hm-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hm-fig { padding: 12px; }
  .hm-fig-v { font-size: 20px; }
  .cl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-step { font-size: 13px; padding: 9px 10px; }
  .cl-wallet { grid-template-columns: minmax(0, 1fr) 128px; }
  .cl-wallet .cl-last { display: none; }
  .cl-hint { display: none; }
  .cl-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-item { grid-template-columns: minmax(0, 1fr) 110px 24px; }
  .cl-hide-sm { display: none; }
  .cl-undated input[type="date"] { width: 9.5em; }
}
.hm-link { all: unset; cursor: pointer; color: var(--z-accent); font-weight: 600; font-size: 13.5px; }
.hm-link:hover { text-decoration: underline; }
.hm-link:focus-visible { outline: 2px solid var(--z-accent); outline-offset: 2px; border-radius: 3px; }
.hm-fig .eyebrow .z-meaning { text-transform: inherit; letter-spacing: inherit; }
.hm-fig .eyebrow, .cl-figs .eyebrow, .cl-note .eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--amino-text-muted); }
.cl-date { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* Paste from the reconciliation (Bank Balances step) */
.cl-head-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cl-paste { display: grid; gap: 8px; margin: 4px 0 14px; padding: 12px; border: 1px solid var(--amino-border); border-radius: 12px; background: var(--amino-surface-sunk); }
.cl-paste label { font-size: 13px; color: var(--amino-text-muted); }
.cl-paste textarea { width: 100%; min-height: 120px; font-family: var(--amino-font-mono, ui-monospace, monospace); font-size: 12.5px; line-height: 1.45; resize: vertical; box-sizing: border-box; }
.cl-paste-found { display: grid; gap: 4px; font-size: 13px; }
.cl-paste-warn { color: var(--amino-warning); font-weight: 600; }
.cl-paste-acts { display: flex; justify-content: flex-end; gap: 8px; }
/* Your Returns (a login linked to a shareholder) */
.hm-mine { margin-top: var(--amino-space-5); }
.hm-mine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 10px 0 4px; }
.hm-mine-grid > div { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: var(--amino-surface-sunk); min-width: 0; }
.hm-mine-grid b { font-family: var(--amino-font-display); font-size: 20px; font-variant-numeric: tabular-nums; color: var(--amino-text); }
.hm-mine-grid .muted { font-size: 12px; }
@media (max-width: 640px) { .hm-mine-grid { grid-template-columns: 1fr 1fr; } .hm-mine-grid b { font-size: 17px; } }

/* Items to Review fixes (round 9): category not in Settings, typed twice. */
.cl-fix li { grid-template-columns: minmax(0, 1fr) auto; }
.cl-fix select { width: auto; max-width: 14em; }
.cl-dups { list-style: none; margin: 0; padding: 0; display: grid; }
.cl-dups li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--amino-border); }
.cl-dups li:first-child { border-top: 0; }
.cl-dup-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cl-dup-what .muted, .cl-dup-dates { font-size: 12.5px; }
.cl-locked { font-size: 12.5px; white-space: nowrap; cursor: help; }
@media (max-width: 640px) {
  .cl-dups li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .cl-dups li .btn { justify-self: start; }
  .cl-fix select { max-width: none; flex: 1 1 auto; min-width: 0; }
  .cl-fix .cl-date { display: flex; flex-wrap: nowrap; }
  .cl-fix .cl-or { flex: 1 1 auto; width: auto; min-width: 0; }
}
.cl-or { width: 8.5em; }
