/* The money page: balance recap, band money box, entry list, entry detail and history. */
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.positive { color: var(--positive); }
.negative { color: var(--negative); }
.zero { color: var(--muted); }

.recap {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.25rem 1.5rem; margin-bottom: 2rem;
}
.balances { width: 100%; border-collapse: collapse; }
.balances th, .balances td { padding: 0.45rem 0; border-bottom: 1px solid var(--line); text-align: left; }
.balances th { width: 30%; }
.balances td.amount { width: 25%; font-weight: 700; font-size: 1.1rem; }
.settle { margin: 0.75rem 0 0; }

/* Deliberately unlike the member rows: band money is not a person. */
.band-money {
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  margin-top: 1.25rem; padding: 1rem 1.25rem;
  background: var(--band); border: 1px dashed var(--band-line); border-radius: 10px;
}
.band-money h3 { margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem; }
.band-money p { margin: 0; max-width: 34rem; }
.band-figure { display: grid; justify-items: end; align-content: center; text-align: right; }
.band-figure .amount { font-size: 1.6rem; font-weight: 700; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.section-head h2 { margin: 0; }

/* Segmented control: quick switch between entry kinds. */
.kind-filter {
  display: inline-flex; flex-wrap: wrap; margin-bottom: 0.75rem;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface);
}
.kind-filter a { padding: 0.35rem 0.9rem; color: var(--text); text-decoration: none; font-size: 0.92rem; }
.kind-filter a + a { border-left: 1px solid var(--line); }
.kind-filter a.active { background: var(--accent); color: #fff; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.tag {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.85rem;
}
.tag.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag.small { font-size: 0.75rem; padding: 0.05rem 0.5rem; margin-right: 0.25rem; }

.entry-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.entry-list li + li { border-top: 1px solid var(--line); }
.entry-row {
  display: grid; grid-template-columns: 7.5rem 1fr auto; gap: 1rem; align-items: baseline;
  padding: 0.7rem 1rem; color: inherit; text-decoration: none; border-left: 4px solid transparent;
}
.entry-row:hover { background: #fafaf8; }
.entry-row .date { color: var(--muted); font-size: 0.9rem; }
.entry-row .what { display: grid; gap: 0.1rem; }
.entry-row .title { display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; align-items: baseline; }
.entry-row .who { color: var(--muted); font-size: 0.82rem; }
.entry-row .amount { font-weight: 600; }
.kind-expense { border-left-color: #c9c6bf; }
.kind-income { border-left-color: var(--positive); }
.kind-income .amount { color: var(--positive); }
.kind-transfer { border-left-color: var(--accent); }
.kind-transfer .amount { color: var(--muted); }

@media (max-width: 560px) {
  .entry-row { grid-template-columns: 1fr auto; }
  .entry-row .date { grid-column: 1 / -1; }
}

.kind-label { margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border: 0; }
.big-amount { font-size: 1.8rem; font-weight: 700; margin: 0 0 1rem; }
.details { display: grid; grid-template-columns: 8rem 1fr; gap: 0.4rem 1rem; margin: 0 0 1.25rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.details .notes p { margin: 0 0 0.4rem; }

.history ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.history p { margin: 0; }
.history .changes { margin: 0.25rem 0 0; padding-left: 1.2rem; font-size: 0.92rem; }
.history del { color: var(--negative); }
.history ins { color: var(--positive); text-decoration: none; }
