:root{font-family:system-ui,"Yu Gothic",sans-serif;color:#223d35;background:#f4f6f2;font-size:15px}*{box-sizing:border-box}body{margin:0}main{max-width:1160px;margin:auto;padding:48px 28px}header,.toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px}header{margin-bottom:36px}.eyebrow{font-size:11px;letter-spacing:2px;color:#658274}h1{font-size:32px;margin:8px 0}h1 span{display:block;font-size:14px;font-weight:400;color:#6e7d73;margin-top:12px}h2{font-size:18px;margin:0 0 12px}p{line-height:1.7}.badge{border:1px solid #cbd8cd;border-radius:24px;padding:8px 14px;font-size:12px;white-space:nowrap}section{background:#fff;border:1px solid #e1e8df;border-radius:16px;padding:24px;margin:24px 0}.import{border-left:4px solid #39775e}.import p,.note,footer{color:#718075;font-size:13px}button{background:#28664e;color:white;border:0;border-radius:8px;padding:11px 18px;cursor:pointer}button:disabled{opacity:.5;cursor:wait}button.secondary{background:#edf2ee;color:#315342}input,select{font:inherit;border:1px solid #ccd8ce;border-radius:7px;padding:8px;background:white;color:#30483b}input[type=file]{max-width:100%;margin:8px 12px 8px 0}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:16px}.cards article{padding:22px 26px;border-radius:14px;background:white;border:1px solid #e1e8df}.cards p{font-size:13px;margin:0 0 12px;color:#6d7e73}.cards strong{font-size:30px;font-variant-numeric:tabular-nums}.cards .net{background:#244e3f;color:white}.net p{color:#ceded2}.scroll{overflow:auto;max-height:480px}table{width:100%;border-collapse:collapse;white-space:nowrap;text-align:left;font-size:13px}th{color:#758276;font-weight:500;background:#f7f9f6}td,th{padding:13px 12px;border-bottom:1px solid #edf0e9}td.num{text-align:right;font-variant-numeric:tabular-nums}.break{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #edf0e9}footer{text-align:center;margin-top:32px}#message{color:#315c45}#confirmation{margin-top:16px}#confirmation button{margin:15px 8px 0 0}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #a0c9b2}@media(max-width:650px){main{padding:24px 14px}.cards{grid-template-columns:1fr;gap:8px}.cards article{padding:16px}.cards strong{font-size:26px}.toolbar{flex-wrap:wrap}h1{font-size:26px}section{padding:18px}.badge{display:none}}

/* Keep category editing reachable even with long bank descriptions. */
#rows .description{white-space:normal;overflow-wrap:anywhere;min-width:140px;max-width:320px}#rows select{min-width:112px}#categoryMessage{color:#315c45;font-size:14px;min-height:1.5em}
@media(max-width:650px){input,select{font-size:16px;max-width:100%}button{min-height:44px}header{flex-wrap:wrap}#categoryForm{display:flex;flex-wrap:wrap;gap:10px}#categoryForm input{min-width:0;flex:1}#search{width:100%}.note,footer{overflow-wrap:anywhere}#aiRows td:nth-child(2){white-space:normal;min-width:140px;max-width:240px}}
/* Monthly analysis, rendered locally without external libraries. */
.chart-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.55fr);gap:20px}.chart-panel{min-width:0;margin:8px 0}.chart-panel .toolbar{gap:10px;flex-wrap:wrap}.chart-panel .eyebrow{margin:0 0 8px}.chart-panel h2{font-size:21px}.chart-key{display:flex;gap:20px;font-size:13px}.income-key{color:#28765c}.expense-key{color:#a85f29}#donut{max-width:280px;margin:auto}#donut svg,#trend svg{display:block;width:100%;height:auto}#trend{margin:18px -8px 0}.donut-caption{fill:#718075;font-size:12px}.donut-total{fill:#223d35;font-size:23px;font-weight:700}.chart-axis{fill:#66786c;font-size:12px}.chart-missing{fill:#86948a;font-size:12px}.chart-gridline{stroke:#e9eee8;stroke-width:1}.chart-baseline{stroke:#bac9bf;stroke-width:1}.month-bars{cursor:pointer;outline:none}.month-bars:hover .bar-hit,.month-bars:focus .bar-hit,.month-bars.chosen .bar-hit{fill:#edf2ee}.month-bars:focus .bar-hit{stroke:#28765c;stroke-width:2}.chart-detail{padding:12px;background:#f3f7f3;border-radius:10px;font-size:13px;min-height:66px}.chart-panel summary{cursor:pointer;font-size:13px;color:#315342;padding:10px 0}.break{gap:12px;font-size:13px}.break span{display:flex;align-items:center;gap:9px;overflow-wrap:anywhere}.break svg{flex-shrink:0}.break strong{white-space:nowrap;font-variant-numeric:tabular-nums}.cards small{display:block;margin-top:12px;font-size:12px;color:#6d7e73}.cards .net small{color:#ceded2}.month-navigation{display:flex;align-items:center;gap:8px}.month-navigation button{font-size:22px;padding:5px 15px}.chart-empty{padding:50px 12px;text-align:center;color:#718075;font-size:14px}
@media(max-width:850px){.chart-grid{grid-template-columns:1fr}.chart-panel{margin:0}.cards strong{font-size:25px}}
@media(max-width:650px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.cards .net{grid-column:1/-1}.cards strong{font-size:23px}.cards article{padding:16px 12px}.month-navigation{width:100%;justify-content:space-between}.month-navigation label{font-size:13px}.chart-grid{gap:16px;margin-top:20px}.chart-detail{font-size:12px}.chart-panel h2{font-size:20px}}

#trend{overflow-x:auto}#trend .annual-chart{min-width:540px}#trend .half-year-chart{min-width:320px}.cards strong{overflow-wrap:anywhere}.donut-total{font-size:21px}
.analysis-panel{border-top:4px solid #28765c}.summary-text{white-space:pre-wrap;line-height:1.95;padding:20px;background:#f3f7f3;border-radius:12px;overflow-wrap:anywhere}.category-controls{display:flex;gap:14px;flex-wrap:wrap}.category-trend-row{display:grid;grid-template-columns:70px minmax(40px,1fr) 120px;gap:16px;align-items:center;margin:18px 0;font-size:13px}.category-trend-row svg{width:100%;height:24px}.category-trend-row strong{text-align:right;font-variant-numeric:tabular-nums}#summaryStatus{font-size:13px;color:#315342}@media(max-width:650px){.category-trend-row{grid-template-columns:62px minmax(30px,1fr) 94px;gap:8px;font-size:12px}.category-controls{gap:10px}.summary-text{padding:14px}}

.auth{max-width:520px}.auth input{display:block;width:100%;margin:10px 0 20px}.auth button{width:100%}