/* Spending & audit page: approvals, decision trail, settlement and Nessie payouts. Uses theme.css + overview.css. */
.appr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; margin-bottom: 24px; align-items: start; }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-row .sec-h { margin: 0; }
.chip { font-size: var(--fs-xs); font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); background: var(--primary-soft); color: var(--primary); white-space: nowrap; }
.chip.wait { background: #FFF1DE; color: var(--s-backup-ink); }
.chip.ok { background: #E3F5EE; color: #1D6B4F; }
.chip.no { background: #FBE6E7; color: var(--s-off-ink); }
.chip.agent { background: var(--soft); color: var(--muted); }

.req { border: 1px solid rgba(232, 131, 58, 0.35); background: linear-gradient(180deg, #FFF8F0, #fff); border-radius: var(--r-md); padding: 16px 18px; }
.req .tag { color: var(--s-backup-ink); }
.req h4 { margin: 6px 0 2px; font-size: var(--fs-lg); color: var(--ink); letter-spacing: -0.01em; }
.req .amt { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.req ul { margin: 10px 0 14px; padding-left: 18px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.req ul b { color: var(--ink); font-weight: 600; }
.req .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn.ghost { background: transparent; color: var(--primary); }
.empty { border: 1px dashed var(--rule); border-radius: var(--r-md); padding: 18px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
.empty b { color: var(--ink); }

.limit { margin-top: 14px; font-size: var(--fs-xs); color: var(--muted); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.limit-row input { width: 80px; font: 700 var(--fs-sm) var(--font); color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: 3px 6px; background: var(--surface); }
.linkbtn { font: 600 var(--fs-xs) var(--font); color: var(--primary); background: none; border: 0; padding: 0 2px; cursor: pointer; text-decoration: underline; }
.budget2 { height: 8px; border-radius: var(--r-pill); background: var(--rule); overflow: hidden; margin: 6px 0 4px; display: flex; }
.budget2 i { display: block; height: 100%; background: var(--primary); }
.budget2 i.p { background: repeating-linear-gradient(45deg, var(--s-backup) 0 6px, #F2B488 6px 12px); }

.tablewrap { overflow-x: auto; max-height: 420px; overflow-y: auto; }
table.au { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.au th { text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); padding: 0 8px 8px; border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; background: var(--glass-strong); }
table.au td { padding: 10px 8px; border-bottom: 1px solid var(--rule); color: var(--ink); vertical-align: top; }
table.au td.num, table.au th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.au .sm { display: block; font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
table.au code { font-size: 11px; color: var(--muted); background: var(--soft); padding: 2px 6px; border-radius: 6px; white-space: nowrap; }
table.au tr.muted td { color: var(--muted); }
.tx-ok { color: #1D6B4F; font-weight: 600; }
.tx-wait { color: var(--s-backup-ink); font-weight: 600; }
.tx-bad { color: var(--s-off-ink); font-weight: 600; }
.foot-note { margin-top: 12px; font-size: var(--fs-xs); color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-note a { color: var(--primary); }

.settle { margin-bottom: 24px; }
.sumrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sumrow div { background: var(--soft); border-radius: var(--r-md); padding: 10px 12px; }
.sumrow b { display: block; font-size: 20px; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sumrow span { font-size: var(--fs-xs); color: var(--muted); }
.memo { white-space: pre-wrap; font-size: var(--fs-xs); color: var(--muted); background: var(--soft); border-radius: var(--r-md); padding: 12px; margin: 10px 0 0; }

@media (max-width: 960px) {
  .appr-grid { grid-template-columns: 1fr; }
  .sumrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
