:root{--ink:#17362e;--muted:#6d7c77;--green:#184e3f;--cream:#f6f3ec;--line:#d9ddd7;--paper:#fffefb}*{box-sizing:border-box}html{background:var(--cream);scroll-behavior:smooth}body{margin:0;color:var(--ink);background:var(--cream);font-family:Arial,Helvetica,sans-serif}button,input,select,textarea{font:inherit}button,select{cursor:pointer}button{border:0;background:none;color:var(--ink)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #adc9bb;outline-offset:2px}
.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 5vw;background:rgba(255,254,251,.92);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10;backdrop-filter:blur(12px)}.brand{display:flex;align-items:center;gap:11px;color:var(--ink);text-decoration:none;font-family:Georgia,serif;font-size:25px;font-weight:bold}.brandMark{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:var(--green);color:#fff;font-size:20px;transform:rotate(-4deg)}.headerActions{display:flex;gap:12px;align-items:center}.textButton{padding:10px 12px;font-weight:700}.primaryButton{padding:12px 18px;border-radius:4px;background:var(--green);color:#fff;font-weight:700;box-shadow:0 2px 0 rgba(0,0,0,.12)}.primaryButton:hover{background:#0e3e31;transform:translateY(-1px)}
.workspace{max-width:1390px;margin:0 auto;padding:52px 5vw 70px}.intro{display:flex;justify-content:space-between;gap:30px;align-items:flex-end;margin-bottom:42px}.eyebrow{margin:0 0 12px;font-size:11px;letter-spacing:2px;font-weight:800;color:#4f7467}h1,h2{font-family:Georgia,"Times New Roman",serif;font-weight:500;letter-spacing:-1.5px}h1{margin:0;font-size:54px;line-height:1}.subhead{margin:14px 0 0;color:var(--muted);font-family:Georgia,serif;font-style:italic;font-size:18px}.summary{min-width:190px;border-left:1px solid #b8c3bd;padding-left:25px;display:grid;gap:3px}.summary span{font-size:10px;letter-spacing:1.5px;font-weight:bold;color:var(--muted)}.summary strong{font-family:Georgia,serif;font-size:28px;font-weight:500}.summary small{color:var(--muted)}
.backupBar{margin-bottom:18px;padding:13px 15px;display:flex;align-items:center;justify-content:space-between;gap:20px;border:1px solid #d6dbd7;border-radius:5px;background:rgba(255,254,251,.7)}.backupBar>div:first-child{display:grid;gap:3px}.backupBar strong{font-family:Georgia,serif;font-size:15px}.backupBar span{color:var(--muted);font-size:12px}.backupActions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.fileButton,.downloadButton{min-height:36px;display:inline-flex;align-items:center;padding:8px 11px;border:1px solid #c9d2cc;border-radius:4px;background:#fff;color:#365a50;font-size:12px;font-weight:700;cursor:pointer}.fileButton:hover,.downloadButton:hover{background:#edf2ee}.fileButton:disabled{cursor:not-allowed;opacity:.45;background:#f4f4f1}.fileButton input{position:absolute;width:1px;height:1px;opacity:0}
.toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;margin-bottom:15px}.search{flex:1;max-width:440px;position:relative}.search>span{position:absolute;top:11px;left:13px;color:#71817b;font-size:20px}.search input{width:100%;padding-left:42px}.filters{display:flex;gap:12px}label{display:grid;gap:7px;font-size:12px;font-weight:700;color:#365a50}label i{color:#86938f;font-weight:normal;font-style:normal}select,input,textarea{border:1px solid #cfd6d1;border-radius:4px;background:#fff;color:var(--ink);padding:11px 12px;min-height:42px}.filters label{display:flex;align-items:center;gap:8px}.filters label>span{color:var(--muted);font-size:11px}
.ledgerWrap{background:var(--paper);border:1px solid #d6dbd7;box-shadow:0 8px 30px rgba(30,55,46,.05);overflow:hidden}.ledger{width:100%;border-collapse:collapse;table-layout:fixed}.ledger th{background:#edf1ed;padding:13px 16px;text-align:left;font-size:10px;color:#597069;letter-spacing:1.25px;text-transform:uppercase;border-bottom:1px solid #ccd5cf}.ledger td{padding:17px 16px;border-bottom:1px solid #e5e7e3;color:#445d56;font-size:14px}.ledger tbody tr:hover{background:#fbfcf8}.ledger th:nth-child(1){width:14%}.ledger th:nth-child(2){width:21%}.ledger th:nth-child(3){width:15%}.ledger th:nth-child(4){width:27%}.ledger th:nth-child(5){width:14%}.ledger th:nth-child(6){width:9%}.purchaseName{color:var(--ink)!important;font-weight:700}.date,.description{color:#71807b!important}.ledger .amount{text-align:right;color:var(--ink);font-family:monospace;font-weight:600}.tag{display:inline-block;padding:6px 10px;border-radius:999px;background:#e5eee8;color:#315f51;font-size:11px;font-weight:700}.rowActions{display:flex;justify-content:flex-end;gap:4px;opacity:.45}.ledger tr:hover .rowActions{opacity:1}.rowActions button{width:30px;height:30px;border-radius:4px;font-size:16px}.rowActions button:hover{background:#eef3ef}.rowActions .delete:hover{color:#9d322d;background:#faece9}.ledgerFooter{padding:14px 16px;background:#fafaf6;display:flex;justify-content:space-between;color:#7b8883;font-size:12px}.ledgerFooter button{color:#65766f;text-decoration:underline}.empty{padding:70px 20px;text-align:center;color:var(--muted)}.empty[hidden]{display:none}.empty>div{font-size:32px}.empty h2{margin:8px 0;color:var(--ink);font-size:28px}.empty p{margin:0 0 22px}
dialog.modal{width:min(610px,calc(100% - 40px));max-height:calc(100vh - 40px);overflow:auto;background:var(--paper);border:0;border-radius:6px;padding:36px 38px 30px;box-shadow:0 30px 80px rgba(10,38,29,.28);color:var(--ink)}dialog.modal::backdrop{background:rgba(17,42,34,.48);backdrop-filter:blur(3px)}.modal h2{font-size:38px;margin:0 0 8px}.modalIntro{margin:0 0 28px;color:var(--muted)}.close{position:absolute;top:16px;right:18px;width:34px;height:34px;border-radius:50%;font-size:23px;color:#71807a}.close:hover{background:#edf1ed}.modal form,.modal form>label{display:grid;gap:18px}.formGrid{display:grid;grid-template-columns:1.3fr .8fr;gap:16px}.modal textarea{min-height:88px;resize:vertical}.moneyField{position:relative}.moneyField b{position:absolute;left:12px;top:13px;color:#70817a}.moneyField input{width:100%;padding-left:26px}.modalActions{margin-top:6px;padding-top:20px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px}.cancelButton{padding:11px 17px;border:1px solid #cdd5d0;border-radius:4px;background:#fff;font-weight:700}
.categoryList{display:grid;border:1px solid var(--line);border-radius:5px;margin-bottom:24px;max-height:260px;overflow:auto}.categoryList[hidden]{display:none}.categoryRow{min-height:58px;padding:9px 12px;display:flex;align-items:center;gap:8px;border-bottom:1px solid #e5e7e3}.categoryRow:last-child{border-bottom:0}.categoryRow>div{display:grid;gap:2px;margin-right:auto}.categoryRow small{color:var(--muted)}.categoryRow button{padding:7px 9px;border-radius:4px;color:#526a62;font-size:12px;font-weight:700}.categoryRow button:hover{background:#edf2ee}.categoryRow .categoryDelete{color:#a14942}.categoryRow .categoryDelete:disabled{color:#aab2af;cursor:not-allowed;background:transparent}.categoryForm{gap:0!important}
@media(max-width:780px){.topbar{padding:0 18px}.textButton{font-size:0}.textButton::after{content:"Categories";font-size:13px}.workspace{padding:35px 18px 50px}.summary{display:none}h1{font-size:43px}.backupBar,.toolbar{align-items:stretch;flex-direction:column}.backupActions{width:100%}.fileButton,.downloadButton{flex:1;justify-content:center}.search{max-width:none}.filters{display:grid;grid-template-columns:1fr 1fr}.filters label{display:grid}.filters select{width:100%}.tableScroll{overflow-x:auto}.ledger{min-width:880px}.modal{padding:32px 22px 24px}.formGrid{grid-template-columns:1fr}.rowActions{opacity:1}}@media(max-width:460px){.brand{font-size:22px}.primaryButton{padding:11px 13px}.headerActions{gap:2px}.filters{grid-template-columns:1fr}.backupActions{flex-direction:column}}
