:root{color-scheme:light;--paper:#f5f6f1;--white:#fff;--ink:#172b25;--muted:#52665d;--faint:#6c7c74;--line:#dce1d9;--deep:#12372c;--teal:#12634b;--greenwash:#e4f1e8;--orange:#936019;--pad:clamp(17px,3vw,48px);font-family:"Leelawadee UI","Thonburi","Noto Sans Thai","Tahoma",system-ui,sans-serif;font-size:15px;line-height:1.55;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}
body,h1,h2,h3,p,ul{margin:0}
body{min-width:280px}
h1,h2,h3,b,strong{font-weight:650}
h1{font-size:clamp(1.75rem,3.6vw,2.65rem);line-height:1.25;letter-spacing:-.035em}
h2{font-size:1.04rem;line-height:1.5;letter-spacing:-.013em}
small,.muted{color:var(--muted)}
a{color:var(--teal);text-underline-offset:.22em}
a:hover{text-decoration-thickness:2px}
input,select,button{font:inherit}
input,select{min-width:0;width:100%;max-width:100%;border:1px solid #bac9bf;background:white;border-radius:7px;padding:.53rem .68rem;line-height:1.45;color:var(--ink)}
input[type=file]{font-size:.84rem}
input[type=file]::file-selector-button{margin-inline-end:.65rem;padding:.3rem .5rem}
:focus-visible{outline:3px solid #d78c31;outline-offset:3px}
button,.button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:40px;padding:.48rem .88rem;border:1px solid var(--teal);border-radius:7px;background:var(--teal);color:#fff;font-weight:600;font-size:.87rem;text-decoration:none;cursor:pointer;white-space:nowrap}
button:hover,.button:hover{background:#0e4d3c;text-decoration:none}
.quiet{background:white;color:var(--ink);border-color:#b4c1b8}
.quiet:hover{background:#edf3ee}
.skip{position:absolute;left:-100vw;z-index:5;background:white;padding:.5rem}
.skip:focus{left:0}
.sr-only{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden;white-space:nowrap}
.rail{background:var(--deep);color:#f4f7ef;padding:14px var(--pad) 0}
.brand{display:inline-flex;align-items:center;gap:.6rem;color:inherit;font-family:"Avenir Next","Segoe UI",system-ui,sans-serif;font-size:1.14rem;font-weight:650;letter-spacing:-.045em;text-decoration:none}
.brand:hover{text-decoration:none}
.brandmark{display:inline-flex;align-items:flex-end;justify-content:center;gap:2px;height:28px;width:28px;border-radius:7px;padding:6px 4px;background:#c6e7a0}
.brandmark i{width:3.6px;background:#254e39;border-radius:2px}
.brandmark i:nth-child(1){height:44%}.brandmark i:nth-child(2){height:72%}.brandmark i:nth-child(3){height:96%}
nav{display:flex;gap:3px;overflow:auto;margin:.57rem calc(-1 * var(--pad)) 0;padding:0 var(--pad);scrollbar-width:thin}
nav a{display:flex;align-items:center;gap:.55rem;text-decoration:none;color:#d6e7db;font-size:.85rem;padding:.6rem .55rem;white-space:nowrap;border-bottom:2px solid transparent}
nav a:hover{color:white;text-decoration:none}
nav a[aria-current]{color:white;border-color:#c6e7a0}
.navicon{display:none}
.profile{display:none}
.main{min-width:0;padding:22px var(--pad) 36px}
.page{max-width:1300px;margin:0 auto}
.page-head,.section-head,.message-head,.export-strip,.net-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.page-head{flex-wrap:wrap;margin-bottom:18px}
.eyebrow{font-size:.78rem;font-weight:600;color:var(--muted);margin-bottom:.12rem}
.period{display:flex;gap:5px;align-items:center}
.period input{width:9.5rem;padding:.45rem .55rem;font-size:.88rem;height:39px}
.period button{min-height:39px}
.metrics,.two-column,.settings-grid{display:grid;gap:14px}
.panel,.export-strip{background:var(--white);border:1px solid var(--line);border-radius:12px;padding:18px}
.panel,.net,.export-strip{min-width:0}
.net{padding:21px;border-radius:13px;background:#153c31;color:white;position:relative;overflow:hidden}
.net-heading h2{color:#f4f8f3;font-size:.97rem}
.net-heading>span{font-size:.78rem;color:#c6dacb;font-variant-numeric:tabular-nums}
.headline{display:flex;align-items:baseline;gap:.22em;font-family:"Avenir Next","Segoe UI",system-ui,sans-serif;font-variant-numeric:tabular-nums;font-weight:550;letter-spacing:-.058em;line-height:1.25;margin:10px 0 16px;font-size:clamp(1.85rem,4.6vw,3.65rem);overflow-wrap:anywhere}
.headline>span{font-size:.53em;font-weight:400;color:#d5e7d6}
.cash-bars meter{display:block;appearance:none;width:100%;height:5px;border:none;border-radius:10px;background:#f0b77e}
.cash-bars meter::-webkit-meter-bar{height:5px;border:0;box-shadow:none;border-radius:10px;background:#f0b77e}
.cash-bars meter::-webkit-meter-optimum-value{background:#b9e49b;border-radius:10px}
.cash-bars meter::-moz-meter-bar{background:#b9e49b;border-radius:10px}
.no-bars{height:1px;background:#44705a}
.flow{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding-top:14px}
.flow small,.flow strong,.account small,.owed small,.name strong,.balance-row span,.balance-row small,.simple-list small{display:block}
.flow small{display:flex;align-items:center;gap:6px;color:#d6e6d9;font-size:.77rem}
.flow strong{font-family:"Avenir Next",system-ui,sans-serif;font-variant-numeric:tabular-nums;font-size:clamp(.96rem,2vw,1.28rem);letter-spacing:-.03em;overflow-wrap:anywhere}
.dot{display:inline-block;height:7px;width:7px;border-radius:50%}
.dot.in{background:#b9e49b}.dot.out{background:#f0b77e}
.balances h2{margin-bottom:7px}
.balance-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;column-gap:8px;padding:.55rem 0;border-top:1px solid var(--line)}
.balance-row span{font-size:.85rem;color:var(--muted)}
.balance-row strong,.account-val strong,.owed strong,.entry-value{font-family:"Avenir Next","Segoe UI",system-ui,sans-serif;font-variant-numeric:tabular-nums;font-size:1.03rem;letter-spacing:-.02em}
.balance-row small{grid-column:1/-1;font-size:.73rem}
.two-column,.export-strip,.upload,.settings-grid+.panel{margin-top:14px}
.section-head{padding-bottom:9px;border-bottom:1px solid var(--line)}
.count{color:var(--muted);font-size:.73rem;font-weight:550;background:#f1f4ed;border-radius:20px;padding:.16rem .55rem;white-space:nowrap}
.account,.owed{display:flex;align-items:center;gap:9px;padding:.67rem 0}
.account+.account,.owed+.owed,.simple-list p+p{border-top:1px solid var(--line)}
.account:last-child,.owed:last-child{padding-bottom:0}
.bank-icon,.person,.avatar{height:31px;width:31px;flex:0 0 31px;display:inline-grid;place-items:center;background:#e9eee4;border-radius:8px;font-family:system-ui,sans-serif;font-weight:600;font-size:.7rem;color:#365845}
.name{flex:1;min-width:0}.name strong{overflow-wrap:anywhere;font-size:.9rem}
.account small{font-size:.7rem}
.account-val{text-align:right}
.good{color:#1e6846}.warn{color:#895813}
.person{border-radius:50%;background:#edf0e5}
.p-2{background:#f8eada;color:#815323}.p-3{background:#e3edef;color:#35586a}.p-4{background:#f0e9f2;color:#674e70}
.owed{font-size:.9rem}.owed strong{margin-left:auto}
.export-strip{display:flex;align-items:center;flex-wrap:wrap;gap:12px}
.export-strip small{font-size:.77rem}
.actions{display:flex;gap:6px;flex-wrap:wrap}
.empty{color:var(--muted);padding:20px 0;font-size:.9rem}
.empty a{margin-left:.35em}
details>summary{cursor:pointer;color:var(--teal);font-size:.87rem;font-weight:650}
details[open]>summary{margin-bottom:.8rem}
.upload:first-child,.panel.upload:first-of-type{margin-top:0}
.panel.upload+.records,.records+.panel.upload,.export-strip+.panel.upload{margin-top:14px}
.form-grid,.settings-grid{display:grid;gap:12px}
.form-grid{grid-template-columns:repeat(auto-fit,minmax(min(155px,100%),1fr));align-items:end}
.form-grid label{font-size:.8rem;font-weight:550;color:var(--muted)}
.form-grid input,.form-grid select{display:block;margin-top:4px;color:var(--ink);font-size:.88rem;font-weight:400}
.form-grid .form-actions,.wide{grid-column:1/-1}
.form-actions{display:flex;gap:8px;flex-wrap:wrap}
.settings-grid .panel>h2{margin-bottom:12px}
.settings-grid details+details,.settings-grid .simple-list+details{border-top:1px solid var(--line);padding-top:10px;margin-top:10px}
.simple-list p{display:flex;justify-content:space-between;align-items:baseline;gap:8px;padding:.42rem 0;font-size:.85rem}
.simple-list small{font-size:.76rem}
.records{padding:0 17px}
.records article+article{border-top:1px solid var(--line)}
.ledger-row{display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:2px 12px;padding:13px 0}
.stamp,.message-head time{color:var(--muted);font-size:.77rem;font-variant-numeric:tabular-nums}
.stamp{grid-column:1/-1}
.entry h2{font-size:.94rem;overflow-wrap:anywhere}
.entry p{font-size:.76rem;color:var(--muted)}
.edit{grid-column:1/-1}
.edit summary{font-size:.76rem}.edit[open]{padding:7px 0}
.search{display:flex;gap:8px;margin-bottom:12px}
.message,.review-row{padding:15px 0}
.message p,.review-row p{white-space:pre-line;overflow-wrap:anywhere;font-size:.9rem;margin:.4rem 0}
.message a,.text-link{font-size:.84rem;font-weight:600}
.review-row .section-head{border:0;padding:0}
.notice{padding:10px 13px;background:var(--greenwash);border-radius:7px;margin-bottom:14px}
.notice.error{background:#f8e6dd;color:#873e2a}
.login{min-height:100svh;display:grid;place-items:center;padding:16px;background:var(--paper)}
.login-box{max-width:420px;padding:34px;background:white;border:1px solid var(--line);border-radius:14px}
.login-box .brand{margin-bottom:36px}
.login-box h1{font-size:2.3rem}
.login-box p{color:var(--muted);margin:12px 0 24px}
.line-login{display:flex}
@media(min-width:660px){.metrics{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)}.two-column,.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.net,.panel,.export-strip{padding:21px}.records{padding:0 21px}.balances .balance-row{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:0 5px}.balance-row small{width:100%}.ledger-row{grid-template-columns:96px 1fr auto;gap:4px 16px}.stamp{grid-column:auto}.edit{grid-column:2/-1}.login-box{padding:40px}}
@media(min-width:930px){.shell{display:grid;grid-template-columns:205px minmax(0,1fr);min-height:100vh}.rail{position:sticky;top:0;display:flex;flex-direction:column;height:100vh;padding:28px 16px;overflow:auto}.rail .brand{padding:0 4px}.brandmark{height:31px;width:31px}nav{display:flex;flex-direction:column;gap:5px;margin:35px 0 0;padding:0;overflow:visible}nav a{gap:.87rem;padding:.72rem .78rem;border:0;border-radius:7px;font-size:.93rem}nav a:hover{background:#21483b}nav a[aria-current]{background:#2e5645;color:#f3fff0}nav a[aria-current] .navicon{color:#c5e6a4}.navicon{display:inline-grid;position:relative;width:16px;height:16px;color:#b4ccbd;place-items:center;flex:none}.i-dashboard:before{content:"";width:6px;height:6px;border-radius:1px;background:currentColor;transform:translate(-4px,-4px);box-shadow:8px 0 currentColor,0 8px currentColor,8px 8px currentColor}.i-ledger:before,.i-review:before,.i-history:before{content:"";width:13px;height:14px;border:1.5px solid currentColor;border-radius:2px}.i-ledger:after,.i-review:after,.i-history:after{content:"";position:absolute;height:1px;width:7px;top:5px;background:currentColor;box-shadow:0 3px currentColor}.i-review:before{border-radius:5px}.i-history:before{height:11px;border-radius:6px}.i-settings:before{content:"";width:15px;height:1px;background:currentColor;box-shadow:0 6px currentColor;transform:translateY(-3px)}.i-settings:after{content:"";position:absolute;top:2px;left:3px;width:4px;height:5px;background:currentColor;box-shadow:6px 6px currentColor}.profile{display:flex;align-items:center;gap:9px;padding:17px 4px 0;margin-top:auto;border-top:1px solid #3a5c4c}.profile small,.profile b{display:block}.profile small{color:#c2d3c6;font-size:.75rem}.avatar{background:#c6e7a0;font-size:.85rem;border-radius:50%}.main{padding-top:33px}.page-head{margin-bottom:24px}.metrics,.two-column,.settings-grid{gap:18px}.two-column,.export-strip,.export-strip+.panel.upload{margin-top:18px}.net{padding:24px 27px}.net-heading{margin-bottom:10px}.net .headline{margin-bottom:17px}.flow{padding-top:18px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}

.review-detail{margin-top:10px}.review-detail>p{white-space:pre-line;overflow-wrap:anywhere;margin:.8rem 0}.review-detail form{margin-top:16px}.preview-table{max-width:100%;overflow:auto;margin-top:12px}.preview-table table{border-collapse:collapse;width:100%;font-size:.87rem}.preview-table th,.preview-table td{padding:7px 4px;border-bottom:1px solid var(--line);text-align:left}.preview-table th:last-child,.preview-table td:last-child{text-align:right;white-space:nowrap}

.chart-lines{display:grid;gap:.55rem}.chart-row{display:grid;grid-template-columns:7em 1fr;gap:.8rem;font-variant-numeric:tabular-nums}.chart-row label{display:flex;align-items:center;gap:.6rem}.chart-row meter{width:40%;height:.65rem}.chart-row label+label meter::-webkit-meter-optimum-value{background:#c17d53}.chart-row time{font-size:.85rem}
.profile form{margin-left:auto}.profile .signout{min-height:2rem;width:2rem;padding:0;background:transparent;color:inherit;border:1px solid #bacbc1;border-radius:.5rem}
