:root {
    color-scheme: light;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172525;
    background: #f1f4f1;
    --ink: #172525;
    --muted: #52645f;
    --line: #d6dfda;
    --forest: #104439;
    --paper: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.access { display: grid; place-items: center; padding: 1.25rem; background: linear-gradient(135deg, #112f29, #205144); }
.signin { width: min(100%, 430px); padding: clamp(1.5rem, 6vw, 3rem); background: var(--paper); border-radius: 1rem; box-shadow: 0 25px 80px #081f1945; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 650; line-height: 1.2; }
.mark { width: 2.25rem; height: 2.25rem; flex: 0 0 auto; display: grid; place-items: center; border-radius: .65rem; background: #d9e9d9; color: #104439; font-family: Georgia, serif; font-size: 1.4rem; font-weight: 700; }
h1 { letter-spacing: -.055em; margin: 0 0 .25rem; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1; }
.signin h1 { margin: 2rem 0 1.4rem; }
.signin form { display: grid; gap: .55rem; }
.signin input + label { margin-top: .6rem; }
.signin button { margin-top: .75rem; }
label { font-weight: 600; font-size: .9rem; }
input, button { font: inherit; border-radius: .5rem; min-height: 2.7rem; padding: .5rem .75rem; }
input { min-width: 0; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
button { border: 1px solid var(--forest); background: var(--forest); color: #fff; font-weight: 650; cursor: pointer; }
.secondary { color: var(--forest); background: transparent; border-color: #aabeb4; }
:focus-visible { outline: 3px solid #c26e32; outline-offset: 3px; }
.error { color: #a22927; }
.top { color: #f4faf5; background: #123a32; padding: 1rem max(1.25rem, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top .secondary { color: inherit; border-color: #819d90; white-space: nowrap; }
.content { width: min(calc(100% - 2.5rem), 1120px); margin: 2rem auto 4rem; }
.toolbar { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
nav { display: flex; align-items: center; gap: .25rem; }
nav a { color: var(--forest); display: block; text-decoration: none; padding: .7rem .9rem; font-weight: 650; border-radius: .5rem; }
nav a[aria-current] { background: #dce9df; }
.period { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.intro { margin: 2rem 0 1.5rem; }
.intro p, .empty { color: var(--muted); }
.metrics, .panels { display: grid; gap: 1rem; }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panels { grid-template-columns: 1.25fr 1fr; margin-top: 1rem; }
.card, .panel { padding: 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: .8rem; }
.card span, small { color: var(--muted); }
.card strong { display: block; font-size: clamp(1.25rem, 3vw, 1.9rem); font-variant-numeric: tabular-nums; margin-top: .45rem; overflow-wrap: anywhere; }
h2 { margin: 0; letter-spacing: -.03em; font-size: 1.15rem; }
.rows { margin: .6rem 0 0; padding: 0; list-style: none; }
.rows li { display: flex; align-items: start; justify-content: space-between; gap: .75rem; padding: .8rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.rows li > strong { flex-shrink: 0; }
small { display: block; margin-top: .15rem; }
.empty { margin: 1.1rem 0 .15rem; }
@media (max-width: 700px) {
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panels { grid-template-columns: 1fr; }
}
nav { flex-wrap: wrap; }
.budget-intro { display: flex; align-items: start; gap: 1rem; justify-content: space-between; flex-wrap: wrap; }
.button-link { display: inline-block; padding: .6rem .85rem; border: 1px solid #aabeb4; border-radius: .5rem; text-decoration: none; font-weight: 650; }
.budget-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.budget-panel { margin-top: 1rem; }
.budget-scroll { overflow-x: auto; }
.budget-table { width: 100%; margin-top: .75rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.budget-table th, .budget-table td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); }
.budget-table th:first-child { padding-left: 0; }
.budget-table th[scope="col"] { color: var(--muted); font-size: .87rem; }
.budget-table td { white-space: nowrap; }
.budget-table tbody tr:last-child > * { border: 0; }
.budget-amount { width: min(100%, 8rem); min-width: 5rem; }
.budget-check { display: flex; margin-top: .6rem; align-items: center; gap: .5rem; }
.budget-check input { min-height: auto; accent-color: var(--forest); }
.budget-status { color: var(--forest); font-weight: 650; }
@media (max-width: 600px) {
    .budget-metrics { grid-template-columns: 1fr; gap: .55rem; }
    .budget-table th, .budget-table td { padding-right: .35rem; padding-left: .35rem; }
}
.bill-list { margin: .7rem 0 0; list-style: none; padding: 0; }
.bill-list:empty { display: none; }
.bill-list > li { padding: .85rem 0; border-top: 1px solid var(--line); }
.bill-row { display: flex; justify-content: space-between; gap: 1rem; }
.bill-row > div + div { text-align: right; }
.bill-form { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; margin: .9rem 0 .25rem; }
.bill-form label { display: grid; align-items: center; gap: .3rem; min-width: 0; }
.bill-form input { width: 100%; }
.bill-form .bill-check { grid-template-columns: auto 1fr; align-self: center; }
.bill-check input { width: auto; min-height: auto; accent-color: var(--forest); }
.bill-list details { margin: .6rem 0 0; }
.bill-list summary { color: var(--forest); cursor: pointer; font-size: .9rem; font-weight: 600; }
