:root { color-scheme: light; font-family: system-ui, sans-serif; background: #f5f6ef; color: #1c2921; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1220px; margin: auto; padding: 36px 24px 64px; }
a { color: #245b45; text-underline-offset: .18em; }
h1 { font-family: Georgia, serif; font-weight: 500; font-size: clamp(2.1rem, 4vw, 3.6rem); margin: 0; }
h2 { font-size: 1.16rem; margin: 0 0 18px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px max(24px, calc((100vw - 1172px) / 2)); background: #fcfdf8; border-bottom: 1px solid #dce1d6; }
.brand { font-family: Georgia, serif; font-size: 1.45rem; color: #164a35; text-decoration: none; margin: 0; }
.page-title, .filters { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px; }
.page-title { margin-bottom: 25px; }
label { display: grid; gap: 6px; font-size: .86rem; }
input, select, button { font: inherit; border: 1px solid #b8c6bc; border-radius: 7px; background: #fff; color: #1c2921; padding: 9px 12px; }
input, select { max-width: 100%; }
button { background: #18503a; border-color: #18503a; color: white; cursor: pointer; }
button.quiet { background: transparent; border-color: #b8c6bc; color: #245b45; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.metric, .panel { background: #fff; border: 1px solid #dce1d6; border-radius: 13px; padding: 20px; }
.metric { display: grid; gap: 8px; }
.metric strong { font-size: clamp(1.2rem, 3vw, 2rem); font-variant-numeric: tabular-nums; }
.main-metric { background: #164a35; border-color: #164a35; color: #fff; }
.layout { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(0, 4fr); align-items: start; gap: 18px; }
.category-row { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid #edf0ea; }
progress { width: 100%; height: 7px; accent-color: #367c59; }
small { color: #55675e; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 6px; border-bottom: 1px solid #edf0ea; vertical-align: top; }
td small { display: block; margin-top: 3px; }
.amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
summary { font-size: .85rem; cursor: pointer; }
.notice { border: 1px solid #e7d5a9; background: #fff4dc; border-radius: 8px; margin: 0 0 16px; padding: 10px; }
.login main { margin: 12vh auto 0; max-width: 400px; }
.login form { display: grid; gap: 16px; margin-top: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 700px) {
  main { padding: 25px 12px 42px; }
  .layout { grid-template-columns: 1fr; }
  .metric { padding: 12px 8px; }
  .totals { gap: 6px; }
  .transactions { padding: 14px 8px; }
  th, td { padding-inline: 4px; }
}
