:root{--bg:#f7f8f2;--surface:#fff;--ink:#21251e;--muted:#7b8176;--line:#e5e8df;--lime:#d5ec7d;--lime-light:#f0f6de;--green:#47764d;--red:#bd6953;--pink:#fbf0f0;--side:236px;--radius:16px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg);font-size:14px;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #91ac42;outline-offset:3px}.app-shell{display:flex;min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--side);background:#fbfcf7;border-right:1px solid var(--line);padding:32px 20px 20px;display:flex;flex-direction:column;z-index:30}.brand{display:flex;align-items:center;gap:12px;font-size:31px;font-weight:650;letter-spacing:-1.7px;text-decoration:none!important;padding-left:8px}.brand-mark{display:grid;place-items:center;background:var(--ink);color:var(--lime);width:39px;height:39px;border-radius:11px;font-family:Georgia,serif;font-size:34px;font-style:italic;letter-spacing:-4px;padding-right:6px}.brand small{display:block;letter-spacing:1.5px;font-size:8px;font-weight:600;margin-top:1px;color:var(--muted)}.workspace{display:flex;align-items:center;gap:9px;margin:40px 0 26px;padding:13px 7px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:12px;font-weight:600}.workspace small{display:block;font-size:10px;color:var(--muted);font-weight:400;margin-top:5px}.avatar{display:grid;place-items:center;border-radius:50%;background:#e7e9df;width:31px;height:31px;font-size:10px;color:#555e48}.workspace .local-dot{margin-left:auto}.nav-label{font-size:9px;letter-spacing:1.8px;color:#92988a;padding-left:13px;margin:3px 0 12px}.nav-item{display:flex;align-items:center;gap:12px;width:100%;border:0;background:transparent;color:#6e7567;text-align:left;padding:13px 14px;margin:3px 0;border-radius:8px;font-size:12px}.nav-item:hover{background:#eef1e7}.nav-item.active{background:var(--lime);color:#28311e;font-weight:650}.nav-item svg{width:17px;height:17px;stroke-width:1.5}.nav-item .count{margin-left:auto;font-size:9px;min-width:20px;text-align:center;padding:2px 5px;border-radius:4px;background:#ffffff85}.sidebar-bottom{margin-top:auto;padding-top:30px}.local-box{font-size:10px;padding:13px 12px 15px;color:#59664b}.local-box small{display:block;color:#8e9487;font-size:9px;line-height:1.7;margin:7px 0 0 12px}.local-dot{display:inline-block;width:6px;height:6px;background:#7c9866;border-radius:50%;flex-shrink:0}.version{display:block;color:#a1a797;font-size:8px;letter-spacing:1px;margin:18px 14px 3px}.main-shell{margin-left:var(--side);width:calc(100% - var(--side));display:flex;flex-direction:column;min-width:0}.topbar{height:78px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 42px;gap:14px}.breadcrumb{font-size:11px;color:var(--muted)}.breadcrumb span{margin:0 12px;color:#b7bdaf}.breadcrumb b{font-weight:500;color:#4a5243}.topbar-right{display:flex;align-items:center;gap:26px}.local-status{font-size:10px;color:#7d8573}.local-status .local-dot{margin-right:6px}.year-picker{display:flex;align-items:center;gap:9px;font-size:10px;color:#858d7a}.year-picker select{border:1px solid var(--line);border-radius:7px;padding:8px 27px 8px 10px;font-size:11px;background:#fff;color:#3c4534}.mobile-menu{display:none!important}main{padding:35px 42px 24px;max-width:1700px;width:100%;margin:0 auto;flex:1}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:29px}.eyebrow{font-size:9px;font-weight:600;letter-spacing:1.9px;color:#8d957e;display:block;margin-bottom:10px}h1{font-size:32px;letter-spacing:-1.5px;line-height:1.15;font-weight:550;margin:0 0 10px}h2{font-weight:550;font-size:18px;letter-spacing:-.4px;margin:0}h3{font-size:13px;font-weight:600;margin:0}p{line-height:1.6}.page-description{font-size:11px;color:#848b7b;margin:0}.heading-actions{display:flex;gap:8px;padding-bottom:3px;flex-wrap:wrap}.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:10px 14px;border:1px solid transparent;border-radius:7px;font-size:11px;font-weight:500;text-decoration:none!important;background:transparent;color:var(--ink);white-space:nowrap}.button svg{width:14px;height:14px}.primary{background:var(--ink);color:#fff}.primary:hover{background:#3e4933}.secondary{background:#fff;border-color:var(--line)}.secondary:hover{background:#f3f6ec}.lime{background:var(--lime);color:#28331b}.danger-quiet{color:#af5b4b}.icon-button{display:inline-grid;place-items:center;background:transparent;border:1px solid transparent;border-radius:6px;color:var(--muted);height:30px;width:30px}.icon-button:hover{background:#edf0e6}.icon-button svg{width:15px;height:15px}.review-banner{display:flex;align-items:center;gap:12px;padding:13px 16px;border:1px solid #e6dfc2;background:#fbf9ed;border-radius:9px;margin-bottom:23px;color:#7c7150;font-size:11px;line-height:1.6}.review-banner svg{width:17px;height:17px;flex-shrink:0}.review-banner strong{font-weight:600}.review-banner .text-link{margin-left:auto;white-space:nowrap}.text-link{background:transparent;border:0;padding:0;font-size:11px;color:#627344;text-decoration:underline;text-underline-offset:3px}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:24px}.metric{border:1px solid var(--line);background:#fff;border-radius:12px;padding:18px 19px;min-height:135px}.metric.highlight{background:var(--lime);border-color:var(--lime)}.metric-top{display:flex;align-items:center;justify-content:space-between;color:#818a74;font-size:10px}.metric-top svg{width:15px;height:15px}.metric-value{display:block;font-weight:500;letter-spacing:-1.25px;font-size:28px;margin:19px 0 8px;line-height:1;white-space:nowrap}.metric small{color:#929a85;font-size:9px;line-height:1.5;display:block}.highlight .metric-top,.highlight small{color:#596943}.highlight .metric-value{color:#26331b}.main-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(265px,1fr);gap:20px;margin-bottom:24px}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px 23px 12px}.panel-head p{font-size:10px;color:var(--muted);margin:7px 0 0}.panel-head h2{font-size:14px;letter-spacing:-.2px}.subtle-tag{font-size:9px;color:#8a937b;background:#f4f6ef;padding:6px 9px;border-radius:5px;white-space:nowrap}.chart-wrap{padding:13px 17px 5px;position:relative}.chart-svg{display:block;width:100%;height:auto;min-height:180px}.chart-svg text{font-size:9px;fill:#939b87}.chart-svg .grid{stroke:#edf0e6;stroke-width:1;stroke-dasharray:3 4}.chart-svg .chart-label{font-size:9px}.chart-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:17px;padding:8px 15px 19px;color:#8c947f;font-size:9px}.legend-dot{width:7px;height:7px;border-radius:2px;display:inline-block;margin-right:6px}.chart-note{font-size:9px;color:#9ba28f;padding:0 23px 16px;margin:0}.pending-list{padding:7px 23px 13px}.pending-row{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #edf0e7;padding:15px 0;font-size:10px}.pending-row:last-child{border:0}.pending-row small{display:block;margin-top:5px;color:#a0a794;font-size:9px}.pending-row b{font-weight:550;font-size:15px;letter-spacing:-.5px}.pending-row .line-icon{width:29px;height:29px;border-radius:8px;background:#f3f6ec;display:grid;place-items:center;color:#82916b;margin-right:10px}.line-icon svg{width:13px;height:13px}.pending-row>div{display:flex;align-items:center}.pending-total{margin:0 23px 20px;background:#f2f6e7;border-radius:8px;padding:12px;display:flex;justify-content:space-between;font-size:10px;color:#6e7f53}.bottom-grid{display:grid;grid-template-columns:1.7fr 1fr;gap:20px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;text-align:left;white-space:nowrap}th{font-size:9px;font-weight:500;color:#8b947d;letter-spacing:.2px;border-bottom:1px solid var(--line);padding:13px 17px;background:#fbfcf8}td{font-size:11px;padding:16px 17px;border-bottom:1px solid #eef0e8}tr:last-child td{border-bottom:0}tbody tr.clickable{cursor:pointer}tbody tr.clickable:hover{background:#fafcf5}tbody tr.forecast{background:#fffafa}.cell-title{font-weight:550;color:#414c36;max-width:250px;overflow:hidden;text-overflow:ellipsis}.cell-title small{font-weight:400;font-size:9px;color:#959c89;display:block;margin-top:5px;overflow:hidden;text-overflow:ellipsis;max-width:235px}.amount{text-align:right;font-variant-numeric:tabular-nums;font-weight:500}.amount.income{color:#53805a}.amount.expense{color:#b77864}.muted{color:var(--muted)}.badge{font-size:8px;font-weight:500;display:inline-block;padding:5px 7px;border-radius:5px;white-space:nowrap}.badge.green{background:#edf5e9;color:#69825a}.badge.orange{background:#fcf2e6;color:#a38b63}.badge.pink{background:#f9eded;color:#b68080}.badge.gray{background:#f0f2eb;color:#88907b}.badge.blue{background:#edf0f7;color:#7785a7}.mini-status{width:5px;height:5px;display:inline-block;vertical-align:middle;border-radius:50%;background:currentColor;margin-right:5px}.panel-foot{padding:13px 22px;border-top:1px solid var(--line);font-size:9px;color:#99a18b;display:flex;justify-content:space-between}.insight{padding:20px 23px}.insight .large{font-size:30px;letter-spacing:-1px;margin:9px 0 5px;display:block}.insight p{font-size:10px;color:#919a82;margin:6px 0;line-height:1.7}.insight-list{margin-top:18px}.insight-list>div{display:flex;justify-content:space-between;font-size:10px;padding:10px 0;border-bottom:1px solid #edf0e6}.insight-list b{font-weight:500}.insight-bottom{background:#f4f7ea;padding:13px;border-radius:8px;font-size:9px;line-height:1.7;color:#819063;margin-top:17px}.empty{padding:48px 25px;text-align:center;color:#9aa28e;font-size:11px}.empty strong{display:block;font-weight:500;color:#687459;font-size:13px;margin-bottom:8px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.filter-select{background:#fff;border:1px solid var(--line);border-radius:7px;padding:9px 28px 9px 10px;color:#727d64;font-size:10px;min-height:35px}.search{position:relative;min-width:210px}.search svg{position:absolute;width:13px;height:13px;left:11px;top:11px;color:#8f9981}.search input{width:100%;border:1px solid var(--line);border-radius:7px;padding:10px 10px 10px 32px;background:#fff;font-size:10px}.table-summary{font-size:10px;color:#8d967f;white-space:nowrap}.record-table td:first-child,.record-table th:first-child{padding-left:23px}.record-table td:last-child{padding-right:20px}.date-cell{font-size:10px;color:#8c957d}.record-cards{margin-top:20px}.detail-note{font-size:10px;line-height:1.8;color:#929b84;margin:15px 4px}.section-divider{margin:28px 0 17px;display:flex;align-items:baseline;justify-content:space-between}.section-divider span{font-size:10px;color:#939b87}.tax-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:20px 0}.tax-card{border:1px solid var(--line);border-radius:12px;padding:21px;background:#fff}.tax-card strong{font-size:27px;letter-spacing:-1px;font-weight:500;display:block;margin:16px 0 8px}.tax-card small{font-size:10px;color:#8e987f}.notice{padding:18px 21px;border:1px solid #dfe5cf;border-radius:10px;background:#f1f5e7;font-size:11px;color:#73845b;line-height:1.8}.notice b{font-weight:600}.notice.warning{background:#fbf7e9;border-color:#e8ddbd;color:#8e7a4d}.notice .button{margin-top:10px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}.settings-panel{padding:25px}.settings-panel h2{font-size:15px;margin-bottom:8px}.settings-panel p{font-size:10px;color:#8d967e;margin:8px 0 20px;line-height:1.8}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px 15px}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field label,.field-label{font-size:10px;color:#7b866d;font-weight:500}.field input,.field select,.field textarea{width:100%;border:1px solid #dfe5d5;background:#fff;border-radius:6px;padding:10px 11px;font-size:12px;color:#39462e;min-height:37px}.field input:disabled,.field select:disabled{background:#f4f6ef;color:#9ca58e}.field textarea{resize:vertical;min-height:69px;line-height:1.6}.field small{font-size:9px;line-height:1.6;color:#929c80}.span-2{grid-column:1/-1}.checkbox-line{display:flex;align-items:flex-start;gap:9px;font-size:11px;color:#758263;line-height:1.7}.checkbox-line input{margin:4px 0 0;accent-color:#6f833f;width:14px;height:14px;flex-shrink:0}.form-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding-top:20px;margin:23px 0 16px}.form-section-title h3{font-size:12px}.settings-actions{display:flex;gap:10px;margin-top:22px;align-items:center}.band-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.backup-actions{display:flex;gap:8px;flex-wrap:wrap}.subscription-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:17px}.subscription{padding:23px;background:#fff;border:1px solid var(--line);border-radius:12px;display:flex;flex-direction:column;min-height:180px}.subscription-top{display:flex;gap:12px;align-items:center}.subscription-logo{display:grid;place-items:center;background:#f0f4e5;width:36px;height:36px;border-radius:10px;font-family:Georgia,serif;font-size:20px;color:#70834c}.subscription strong{display:block;font-size:24px;font-weight:500;letter-spacing:-.7px;margin:22px 0 0}.subscription strong small{font-size:10px;letter-spacing:0;color:#8b967b;font-weight:400}.subscription footer{display:flex;justify-content:space-between;margin-top:18px;font-size:10px;color:#939d81}.main-footer{display:flex;justify-content:space-between;padding:24px 43px;font-size:9px;color:#a1a995;border-top:1px solid var(--line);margin-top:20px}.main-footer>span:last-child{font-size:14px;font-weight:550;letter-spacing:-.5px;color:#8b977c}.main-footer b{font-weight:400;margin-left:10px}.loading{padding:90px;text-align:center;color:#7f8c6e;font-size:12px}.spinner{display:inline-block;width:12px;height:12px;border:2px solid #dce5cd;border-top-color:#7f945b;border-radius:50%;animation:spin 1s linear infinite;vertical-align:middle;margin-right:7px}@keyframes spin{to{transform:rotate(360deg)}}#toast{position:fixed;bottom:25px;left:calc(50% + 100px);transform:translateX(-50%) translateY(20px);background:#26331f;color:#fff;border-radius:9px;box-shadow:0 10px 40px #24331c20;padding:14px 20px;font-size:12px;opacity:0;pointer-events:none;transition:.2s;z-index:100;max-width:calc(100vw - 35px);line-height:1.5}#toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}#toast.error{background:#8e5142}dialog{width:min(790px,calc(100vw - 30px));max-height:92vh;border:1px solid var(--line);border-radius:16px;padding:0;color:var(--ink);box-shadow:0 25px 100px #27301f30}dialog::backdrop{background:#27301f65;backdrop-filter:blur(3px)}.dialog-header{display:flex;justify-content:space-between;align-items:center;padding:24px 28px 20px;border-bottom:1px solid var(--line);background:#fafcf6}.dialog-header h2{font-size:23px;letter-spacing:-.8px}.dialog-header .eyebrow{margin-bottom:8px;font-size:8px}.dialog-body{padding:23px 28px}.dialog-footer{display:flex;justify-content:space-between;gap:10px;padding:18px 28px;border-top:1px solid var(--line);background:#fafcf6;position:sticky;bottom:0}.dialog-footer>div{display:flex;gap:8px}.pdf-drop{display:flex;align-items:center;gap:13px;border:1px dashed #cbd8b5;border-radius:8px;padding:15px;background:#f7faef;font-size:10px;color:#85986a;margin-bottom:20px}.pdf-drop svg{width:22px;height:22px;flex-shrink:0}.pdf-drop strong{display:block;font-size:11px;font-weight:500;color:#657c45;margin-bottom:5px}.pdf-drop .button{margin-left:auto}.pdf-extract{font-size:10px;background:#f8f9f3;border:1px solid var(--line);padding:12px;border-radius:6px;line-height:1.8;margin:12px 0}.pdf-extract pre{white-space:pre-wrap;max-height:140px;overflow:auto;font-size:10px;color:#899579;margin:10px 0 0}.totals-preview{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:15px;background:#f2f6e8;border-radius:8px;margin-top:20px;font-size:9px;color:#81906b}.totals-preview b{font-size:16px;color:#4c6133;font-weight:500;display:block;margin-top:7px}.payment-row{display:grid;grid-template-columns:1fr 1fr 32px;gap:9px;align-items:end;margin-top:10px}.payment-row .field input{padding:8px}.payment-sum{display:flex;justify-content:space-between;font-size:11px;margin-top:15px;color:#7d8a6b}.form-error{padding:12px;border-radius:6px;background:#fcf0eb;color:#ad7159;font-size:11px;line-height:1.7;margin:14px 0}.hidden{display:none!important}.table-banner{padding:13px 23px;background:#fbfaf2;border-bottom:1px solid #ece7d4;font-size:10px;color:#9a8a64;line-height:1.6}.rate-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.modal-tip{font-size:9px;line-height:1.8;color:#939f82;margin:12px 0}.source-links{display:flex;gap:16px;margin-top:15px;font-size:10px;color:#7b8c60}.section-title-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.small-check{font-size:10px;color:#83936b;display:flex;align-items:center;gap:6px}.small-check input{accent-color:#83936b}.inline-note{color:#9a8d69;font-size:9px;line-height:1.7;margin-top:7px}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(min-width:1500px){main{padding:40px 50px}.metric-value{font-size:34px}.metric{min-height:149px}.chart-wrap{padding-top:18px}}@media(max-width:1150px){:root{--side:208px}.sidebar{padding-left:14px;padding-right:14px}main{padding:29px 26px}.topbar{padding:0 26px}.metrics{gap:10px}.metric{padding:17px 14px}.metric-value{font-size:24px}.main-grid{grid-template-columns:minmax(0,1.5fr) minmax(245px,1fr);gap:15px}.bottom-grid{grid-template-columns:1fr}.subscription-grid{grid-template-columns:repeat(2,1fr)}.page-heading{align-items:flex-start}h1{font-size:29px}.heading-actions{max-width:280px;justify-content:flex-end}.main-footer{padding:23px 26px}.local-status{display:none}}@media(max-width:900px){.main-grid{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(2,1fr)}.metric-value{font-size:30px}.settings-grid{grid-template-columns:1fr}.tax-grid{grid-template-columns:1fr 1fr}.toolbar{align-items:flex-start;flex-direction:column}.table-summary{margin-left:auto}.pending-list{display:grid;grid-template-columns:1fr 1fr;gap:0 25px}.pending-row:nth-child(3){border:0}.pending-total{margin-top:5px}.chart-svg{max-height:290px}.page-heading{flex-direction:column}.heading-actions{max-width:none;justify-content:flex-start}.review-banner{align-items:flex-start;flex-wrap:wrap}.review-banner .text-link{margin-left:29px}}@media(max-width:650px){:root{--side:0px}.sidebar{transform:translateX(-100%);width:236px;transition:transform .2s;box-shadow:10px 0 80px #27301f20}.sidebar.open{transform:translateX(0)}.main-shell{width:100%;margin:0}.mobile-menu{display:inline-grid!important}.topbar{height:62px;padding:0 18px}.breadcrumb{font-size:10px;flex:1}.breadcrumb span{margin:0 6px}.year-picker span{display:none}.topbar-right{gap:8px}main{padding:26px 18px 15px}h1{font-size:30px}.page-description{line-height:1.7;font-size:10px}.metrics{gap:10px}.metric{padding:15px;min-height:127px}.metric-value{font-size:26px}.metric-top{font-size:9px}.metric small{font-size:8px}.main-grid{gap:15px}.panel-head{padding:19px 18px 10px}.chart-wrap{padding:10px}.pending-list{display:block;padding:6px 18px}.pending-row:nth-child(3){border-bottom:1px solid #edf0e7}.pending-total{margin:9px 18px 18px}.bottom-grid{gap:15px}.subscription-grid{grid-template-columns:1fr}.tax-grid{grid-template-columns:1fr}.settings-panel{padding:21px}.form-grid{gap:14px}.filters{width:100%}.search{width:100%}.filter-select{flex:1;min-width:100px}.main-footer{padding:20px 18px;font-size:8px}.dialog-header{padding:20px}.dialog-body{padding:19px}.dialog-footer{padding:13px 15px;align-items:center}.dialog-footer .button{padding:9px 10px;font-size:10px}.form-grid,.rate-grid{grid-template-columns:1fr 1fr}.rate-grid .field:last-child{grid-column:1/-1}.totals-preview{grid-template-columns:repeat(2,1fr)}.pdf-drop{flex-wrap:wrap}.pdf-drop .button{margin-left:35px}.review-banner{font-size:10px}#toast{left:50%}.table-banner{padding:12px 17px}.heading-actions .button{font-size:10px}.source-links{flex-wrap:wrap}}
.panel-head > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke-width: 1.5;
}

.cash-note { margin-bottom: 22px; font-size: 10px; }
.expense-section + .expense-section { border-top: 1px solid var(--line); }
.expense-section-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 23px 18px; background: #fafcf6; }
.expense-section-head h2 { font-size: 15px; }
.expense-section-head p { font-size: 10px; color: var(--muted); margin: 7px 0 0; }
.expense-section-totals { display: flex; flex-wrap: wrap; gap: 12px 22px; font-size: 9px; color: var(--muted); }
.expense-section-totals b { display: block; margin-top: 5px; color: var(--ink); font-size: 13px; font-weight: 550; }
.payment-date-note { display: block; font-size: 9px; color: var(--muted); margin-top: 6px; white-space: normal; max-width: 130px; }
.payment-row { grid-template-columns: 1.2fr .85fr 1fr 32px; }
.payment-row small { min-height: 14px; }
@media(max-width:650px) {
  .expense-section-head { align-items: flex-start; flex-direction: column; padding: 20px 18px; gap: 14px; }
  .expense-section-totals { width: 100%; justify-content: space-between; gap: 12px; }
  .payment-row { grid-template-columns: 1fr 1fr 32px; }
  .payment-row .field:first-child { grid-column: 1 / -1; }
  .table-summary { white-space: normal; line-height: 1.6; }
}

.metrics.three-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:900px){.metrics.three-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.metrics.three-metrics{grid-template-columns:1fr 1fr}.metrics.three-metrics .metric:last-child{grid-column:1/-1}}

/* Shibui: semantic colors, readable amounts and a calmer financial overview. */
:root {
  --bg: #f5f6f1;
  --ink: #263028;
  --muted: #717b70;
  --line: #e2e7df;
  --income: #267a5a;
  --income-soft: #edf6f0;
  --expense: #b65b40;
  --expense-soft: #fcf1ec;
  --invoice: #4a6b9a;
  --invoice-soft: #eff3fa;
  --forecast: #9a6b24;
  --forecast-soft: #fbf5e9;
}
body { -webkit-font-smoothing: antialiased; }
button, a, input, select, textarea { transition: background-color .15s, border-color .15s, box-shadow .15s; }
.metric-value, .amount, .pending-row b, .pending-total b, .large, .tax-card strong, .expense-section-totals b { font-variant-numeric: tabular-nums; }
.page-description { color: #6f786d; font-size: 12px; line-height: 1.65; }
.button { min-height: 38px; font-size: 12px; }
.nav-item { font-size: 12px; }
.nav-item .count { font-variant-numeric: tabular-nums; background: #edf0e9; color: #66725f; }
.nav-item.active .count { background: #f5f9df; color: #3d4e23; }
.panel { box-shadow: 0 2px 5px #27352803; }
.panel-head h2 { font-size: 16px; line-height: 1.35; }
.panel-head p { font-size: 11px; line-height: 1.65; color: #758071; }
.panel-kicker { display: block; color: #7a8672; font-size: 9px; letter-spacing: 1.5px; font-weight: 600; margin-bottom: 9px; }
.metric { min-width: 0; }
.metric[data-tone="income"] { border-color: #d8e8dc; background: var(--income-soft); }
.metric[data-tone="expense"] { border-color: #f0dfd6; background: var(--expense-soft); }
.metric[data-tone="invoice"] { border-color: #dde5f0; background: var(--invoice-soft); }
.metric[data-tone="forecast"] { border-color: #eee2c6; background: var(--forecast-soft); }
.metric[data-tone="extra"] { border-color: #dce8e3; background: #f0f7f4; }
.metric[data-tone="income"] .metric-value { color: var(--income); }
.metric[data-tone="expense"] .metric-value { color: var(--expense); }
.metric[data-tone="invoice"] .metric-value { color: var(--invoice); }
.metric[data-tone="forecast"] .metric-value { color: var(--forecast); }
.metric-top { font-size: 11px; color: #606f60; line-height: 1.4; gap: 8px; }
.metric small { font-size: 10px; color: #717e6b; line-height: 1.65; }
.amount.income { color: var(--income); }
.amount.expense { color: var(--expense); }
th { font-size: 10px; color: #74816d; padding-top: 14px; padding-bottom: 14px; }
td { font-size: 12px; padding-top: 17px; padding-bottom: 17px; }
.cell-title small, .date-cell, .payment-date-note { font-size: 10px; color: #7c8775; }
.badge { font-size: 9px; padding: 6px 8px; }
.badge.green { color: #38754c; background: #eaf4eb; }
.badge.orange { color: #8c6525; background: #fbf1db; }
.badge.blue { color: #44638b; background: #ecf1f9; }
.badge.gray { color: #6f7969; background: #f0f2ec; }
.badge.pink { color: #a15d50; background: #f9eeea; }
.detail-note, .table-banner { font-size: 11px; }
.table-summary { font-size: 11px; }
.field label, .field-label { font-size: 11px; }
.field small, .modal-tip, .inline-note { font-size: 10px; }
.review-banner { color: #81682c; background: #fbf7ea; border-color: #eae0c8; }
.review-banner .text-link { color: #796125; }
.text-link { font-size: 11px; color: #596f46; }
.expense-section-head { background: #f8faf5; }
.expense-section-totals { font-size: 10px; }
.expense-section-totals b { font-size: 14px; }

/* Overview hierarchy */
.overview-page { padding-top: 32px; }
.overview-page .page-heading { margin-bottom: 24px; }
.overview-page .eyebrow { color: #758369; }
.overview-page h1 { font-size: clamp(28px, 2.6vw, 36px); letter-spacing: -1.5px; }
.overview-metrics { gap: 15px; margin-bottom: 20px; }
.overview-metric { padding: 21px; min-height: 167px; border-radius: 14px; position: relative; }
.overview-metric .metric-top { color: #52654f; font-weight: 550; }
.metric-icon { width: 30px; height: 30px; border-radius: 9px; background: #ffffffad; display: grid; place-items: center; flex-shrink: 0; }
.metric-icon svg { width: 16px; height: 16px; }
.overview-metric .metric-value { font-size: clamp(25px, 2.4vw, 35px); letter-spacing: -1.2px; margin: 17px 0 12px; }
.overview-metric small { max-width: 235px; font-size: 10px; line-height: 1.65; }
.overview-metric[data-tone="balance"] { background: #29392d; border-color: #29392d; }
.overview-metric[data-tone="balance"] .metric-top { color: #e2eacb; }
.overview-metric[data-tone="balance"] .metric-icon { background: #ffffff12; color: #d5ec7d; }
.overview-metric[data-tone="balance"] .metric-value { color: #d5ec7d; }
.overview-metric[data-tone="balance"] small { color: #b7c6af; }
.overview-metric[data-negative="true"] .metric-value { color: #ffc5b3; }
.overview-metric[data-tone="income"] .metric-icon { color: var(--income); }
.overview-metric[data-tone="expense"] .metric-icon { color: var(--expense); }
.overview-metric[data-tone="invoice"] .metric-icon { color: var(--invoice); }
.overview-notices { margin: 0 0 24px; border: 1px solid #e9e2cf; border-radius: 10px; background: #fcfaf3; color: #7e6e44; }
.overview-notices > summary { display: flex; align-items: center; gap: 11px; padding: 13px 16px; cursor: pointer; list-style: none; font-size: 11px; }
.overview-notices > summary::-webkit-details-marker, .chart-data > summary::-webkit-details-marker { display: none; }
.notice-summary-icon { display: flex; color: #a58537; }
.notice-summary-icon svg { width: 16px; height: 16px; }
.notice-counts { color: #8c8063; font-size: 10px; }
.notice-counts b { font-weight: 600; }
.notice-expand { display: flex; align-items: center; gap: 7px; margin-left: auto; color: #7b6a3e; font-size: 10px; white-space: nowrap; }
.notice-expand svg { width: 12px; height: 12px; transition: transform .15s; }
.overview-notices[open] .notice-expand svg { transform: rotate(90deg); }
.notice-details { border-top: 1px solid #ece5d5; padding: 16px; }
.notice-details .review-banner { margin-bottom: 10px; }
.notice-details .cash-note { margin-bottom: 0; padding: 13px 15px; background: #fffefb; border-color: #e9e4d7; color: #7e775e; }
.overview-main-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(315px, 1fr); gap: 20px; margin-bottom: 20px; align-items: stretch; }
.overview-main-grid > *, .overview-bottom-grid > * { min-width: 0; }
.overview-page .panel-head { padding: 23px 23px 15px; }
.chart-panel-head { align-items: flex-start; }
.chart-mode { padding: 3px; display: inline-flex; flex-shrink: 0; gap: 2px; border: 1px solid #e4e8dd; border-radius: 8px; background: #f5f7f1; margin-top: 2px; }
.chart-mode button { border: 0; color: #798271; background: transparent; border-radius: 5px; padding: 7px 10px; font-size: 10px; line-height: 1.35; }
.chart-mode button[aria-pressed="true"] { background: #fff; color: #344832; box-shadow: 0 1px 4px #24381d12; font-weight: 600; }
.chart-mode button:hover { color: #2b422d; background: #fff; }
.cashflow-panel { display: flex; flex-direction: column; }
.cashflow-panel .chart-wrap { padding: 5px 14px 0 7px; min-width: 0; }
.finance-chart { aspect-ratio: 760/300; min-height: 225px; max-height: none; }
.finance-chart .grid { stroke: #e7ece4; stroke-dasharray: 3 5; }
.finance-chart .axis-label { fill: #7b8774; font-size: 10px; }
.finance-chart .chart-label { fill: #84907b; font-size: 9px; letter-spacing: .3px; }
.chart-line { stroke-linejoin: round; stroke-linecap: round; }
.chart-line, .chart-point, .chart-bar, .chart-area { pointer-events: none; }
.chart-hit { outline: none; cursor: crosshair; }
.chart-hit:hover, .chart-hit:focus-visible { fill: #78995d0c; stroke: #a2b68d; stroke-width: .8; stroke-dasharray: 3 4; }
.chart-tooltip { position: absolute; top: 10px; width: 234px; z-index: 5; pointer-events: none; border: 1px solid #dfe6d6; border-radius: 10px; background: #fffffff5; box-shadow: 0 8px 24px #26392616; padding: 13px 15px; backdrop-filter: blur(8px); }
.chart-tooltip[hidden] { display: none; }
.chart-tooltip > strong { display: block; margin-bottom: 10px; font-size: 11px; color: #3b4d32; }
.chart-tooltip > span { display: flex; align-items: center; font-size: 10px; gap: 7px; margin-top: 8px; color: #78826e; }
.chart-tooltip i { width: 6px; height: 6px; border-radius: 50%; }
.chart-tooltip b { margin-left: auto; color: #3e4e36; font-size: 11px; font-weight: 550; font-variant-numeric: tabular-nums; }
.cashflow-panel .chart-legend { color: #67775f; font-size: 10px; gap: 18px; padding: 8px 18px 17px; }
.chart-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.chart-swatch { width: 18px; height: 4px; border-radius: 2px; background: var(--series-color); display: inline-block; }
.chart-swatch.dashed { background: transparent; border-top: 2px dashed var(--series-color); height: 2px; border-radius: 0; }
.cashflow-panel .chart-note { display: flex; gap: 8px; align-items: flex-start; padding: 12px 18px; background: #f8faf4; border: 1px solid #edf0e7; border-radius: 8px; margin: auto 18px 14px; color: #7b876e; font-size: 10px; line-height: 1.65; }
.chart-note svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 2px; }
.chart-data { border-top: 1px solid var(--line); }
.chart-data > summary { font-size: 10px; padding: 13px 23px; color: #5b7350; cursor: pointer; list-style: none; }
.chart-data > summary::after { content: '+'; float: right; font-size: 13px; }
.chart-data[open] > summary::after { content: '−'; }
.chart-data td, .chart-data th { font-size: 10px; padding: 10px 18px; }
.pipeline-panel { display: flex; flex-direction: column; }
.pipeline-panel .pending-list { display: block; padding: 0 23px 9px; }
.pipeline-panel .pending-row { display: flex; width: 100%; border: 0; border-bottom: 1px solid #edf0e8; border-radius: 0; background: transparent; padding: 17px 0; text-align: left; gap: 9px; color: var(--ink); }
.pipeline-panel .pending-row:last-child { border-bottom: 0; }
.pipeline-panel .pending-row:hover { background: #fafbf7; }
.pending-row-label { display: flex; align-items: center; min-width: 0; flex: 1; gap: 11px; font-size: 11px; font-weight: 500; }
.pipeline-panel .line-icon { margin-right: 0; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; }
.pipeline-panel .pending-row small { color: #85917a; font-size: 10px; line-height: 1.5; font-weight: 400; }
.pipeline-panel .pending-row b { font-size: 16px; letter-spacing: -.3px; flex-shrink: 0; }
.pipeline-panel .pending-row > svg { width: 12px; height: 12px; flex: 0 0 12px; color: #9ca591; }
.pending-row[data-tone="invoice"] .line-icon { background: var(--invoice-soft); color: var(--invoice); }
.pending-row[data-tone="invoice"] b { color: var(--invoice); }
.pending-row[data-tone="expense"] .line-icon { background: var(--expense-soft); color: var(--expense); }
.pending-row[data-tone="expense"] b { color: var(--expense); }
.pending-row[data-tone="forecast"] .line-icon { background: var(--forecast-soft); color: var(--forecast); }
.pending-row[data-tone="forecast"] b { color: var(--forecast); }
.pipeline-panel .pending-total { margin: auto 18px 0; padding: 16px; align-items: center; gap: 12px; background: #f0f4e5; font-size: 10px; color: #566b3e; }
.pending-total small { display: block; font-size: 9px; color: #82916c; margin-top: 5px; line-height: 1.5; }
.pipeline-panel .pending-total b { font-size: 19px; letter-spacing: -.5px; flex-shrink: 0; font-weight: 550; }
.pipeline-note { font-size: 9px; color: #8a957f; line-height: 1.7; padding: 12px 22px 17px; margin: 0; }
.overview-bottom-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(315px,1fr); gap: 20px; }
.overview-bottom-grid .panel-head { align-items: flex-start; }
.overview-bottom-grid .panel-head > .text-link { margin-top: 5px; white-space: nowrap; }
.overview-bottom-grid .panel-foot { font-size: 10px; line-height: 1.7; color: #85917a; }
.extra-panel-icon { background: #edf4ed; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #5e8260; }
.extra-panel-icon svg { width: 17px; height: 17px; }
.extra-panel .insight { padding: 5px 23px 20px; }
.extra-balance-label { font-size: 10px; color: #7c8b72; }
.extra-panel .large { color: #3b684c; font-size: 31px; font-weight: 500; margin: 9px 0 18px; }
.extra-panel .insight-list { margin-top: 0; }
.extra-panel .insight-list > div { font-size: 11px; color: #7a8870; padding: 12px 0; }
.extra-panel .insight-list b { color: #4b6040; font-variant-numeric: tabular-nums; }
.color-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.color-dot.income { background: var(--income); }
.color-dot.expense { background: var(--expense); }
.extra-link { display: flex; margin-top: 20px; justify-content: space-between; font-size: 11px; }
.extra-panel .extra-caption { font-size: 9px; text-align: center; color: #8c9781; margin: 10px 0 0; }

@media(min-width:1500px) {
  .overview-page { padding-top: 35px; }
  .overview-metric { min-height: 178px; padding: 23px; }
  .overview-metric .metric-value { font-size: 36px; }
}
@media(max-width:1200px) {
  .overview-main-grid, .overview-bottom-grid { grid-template-columns: minmax(0,1.4fr) minmax(310px,1fr); gap: 16px; }
  .overview-metric { padding: 17px; }
  .overview-metric .metric-value { font-size: 27px; }
  .chart-panel-head { flex-wrap: wrap; }
  .notice-counts { max-width: 50%; line-height: 1.7; }
  .overview-page .panel-head { padding-left: 19px; padding-right: 19px; }
  .pipeline-panel .pending-list { padding-left: 18px; padding-right: 18px; }
  .pipeline-panel .pending-row b { font-size: 14px; }
  .pending-row-label { font-size: 10px; gap: 8px; }
  .overview-bottom-grid .panel-head { flex-wrap: wrap; }
}
@media(max-width:1050px) {
  .overview-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-main-grid, .overview-bottom-grid { grid-template-columns: minmax(0,1fr); }
  .overview-metric .metric-value { font-size: 32px; }
  .chart-panel-head { flex-wrap: nowrap; }
  .pipeline-panel .pending-list { display: block; }
  .pipeline-panel .pending-row:nth-child(3) { border-bottom: 1px solid #edf0e8; }
  .pipeline-panel .pending-row b { font-size: 16px; }
  .pending-row-label { font-size: 11px; }
  .pipeline-panel .pending-total { margin-top: 8px; }
}
@media(max-width:650px) {
  .overview-page { padding-top: 24px; }
  .overview-page h1 { font-size: 29px; }
  .page-description { font-size: 11px; }
  .overview-page .page-heading { gap: 16px; margin-bottom: 20px; }
  .overview-metrics { gap: 10px; margin-bottom: 15px; }
  .overview-metric { min-height: 165px; padding: 15px 13px; border-radius: 12px; }
  .overview-metric .metric-top { font-size: 10px; align-items: flex-start; min-height: 30px; }
  .metric-icon { width: 25px; height: 25px; border-radius: 7px; }
  .metric-icon svg { width: 14px; height: 14px; }
  .overview-metric .metric-value { font-size: clamp(20px,5.7vw,27px); letter-spacing: -.7px; margin: 16px 0 10px; }
  .overview-metric small { font-size: 9px; line-height: 1.65; }
  .overview-notices { margin-bottom: 17px; }
  .overview-notices > summary { padding: 13px; display: grid; grid-template-columns: 16px 1fr auto; gap: 7px 10px; }
  .notice-counts { grid-column: 2 / 4; grid-row: 2; max-width: none; font-size: 10px; }
  .notice-expand { font-size: 0; }
  .notice-expand svg { width: 13px; height: 13px; }
  .notice-details { padding: 10px; }
  .notice-details .review-banner { padding: 12px; font-size: 10px; }
  .notice-details .review-banner .text-link { margin-left: 28px; }
  .overview-main-grid, .overview-bottom-grid { gap: 15px; margin-bottom: 15px; }
  .overview-page .panel-head { padding: 20px 17px 13px; }
  .panel-kicker { font-size: 8px; letter-spacing: 1.4px; }
  .overview-page .panel-head h2 { font-size: 16px; }
  .overview-page .panel-head p { font-size: 10px; }
  .chart-panel-head { flex-wrap: wrap; gap: 14px; }
  .chart-mode { margin: 0; }
  .chart-mode button { padding: 8px 15px; font-size: 10px; min-height: 32px; }
  .cashflow-panel .chart-wrap { overflow-x: auto; padding: 0 8px; }
  .finance-chart { min-width: 0; min-height: 205px; aspect-ratio: 480/300; }
  .finance-chart .axis-label { font-size: 15px; }
  .finance-chart .chart-label { font-size: 13px; letter-spacing: 0; }
  .cashflow-panel .chart-legend { padding-top: 8px; padding-bottom: 14px; }
  .cashflow-panel .chart-note { margin: 0 12px 12px; padding: 12px; font-size: 10px; }
  .chart-data > summary { padding-left: 17px; padding-right: 17px; min-height: 42px; }
  .pipeline-panel .pending-list { display: block; padding-left: 17px; padding-right: 17px; }
  .pipeline-panel .pending-row { padding: 16px 0; }
  .pipeline-panel .pending-row:nth-child(3) { border-bottom: 1px solid #edf0e8; }
  .pending-row-label { font-size: 11px; gap: 9px; }
  .pipeline-panel .pending-row b { font-size: 15px; }
  .pipeline-panel .pending-row small { font-size: 9px; }
  .pipeline-panel .pending-total { padding: 14px; margin: 5px 12px 0; }
  .pipeline-panel .pending-total b { font-size: 18px; }
  .overview-bottom-grid .panel-head { gap: 11px; }
  .overview-bottom-grid td { padding-left: 15px; padding-right: 15px; font-size: 11px; }
  .overview-bottom-grid .cell-title { max-width: 125px; }
  .overview-bottom-grid .cell-title small { max-width: 125px; }
  .overview-bottom-grid .badge { white-space: normal; line-height: 1.5; }
  .overview-bottom-grid .panel-foot { padding: 12px 16px; }
  .extra-panel .insight { padding: 5px 17px 20px; }
  .extra-panel .large { font-size: 30px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation-duration: .01ms!important; transition-duration: .01ms!important; }
}

/* Consistent dropdown chevrons, with room for the selected label. */
select:not([multiple]) {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23738369' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
  padding-right: 36px;
}
select:not([multiple]):focus-visible { border-color: #8ba26f; }
@media(max-width:650px) {
  .metrics:not(.overview-metrics) .metric-value { font-size: clamp(20px,5.7vw,26px); letter-spacing: -.7px; }
}

/* Original subscription service marks; the files are embedded in app.js. */
.tax-payment-detail { min-width: 230px; max-width: 480px; white-space: normal; }
.tax-payment-detail > strong { display: block; font-size: 11px; font-weight: 550; }
.tax-payment-detail details { margin-top: 8px; font-size: 10px; line-height: 1.7; }
.tax-payment-detail summary { color: #627344; cursor: pointer; }
.tax-payment-detail p { white-space: pre-line; color: #79856e; }
.tax-payment-detail a { font-size: 10px; }
.tax-payments-panel .panel-foot { line-height: 1.7; }
.subscription-top { gap: 13px; }
.subscription-brand { width: 48px; height: 48px; flex: 0 0 48px; background: #fff; border: 1px solid #e4e9df; border-radius: 12px; overflow: hidden; }
.subscription-brand img { display: block; width: 36px; height: 36px; object-fit: contain; }
.subscription-brand.brand-prime { background: #087caa; border-color: #087caa; }
.subscription-brand.brand-prime img { width: 37px; height: 32px; }
.subscription-brand.brand-disney { background: #052b39; border-color: #052b39; }
.subscription-brand.brand-disney img { width: 48px; height: 48px; }
.subscription-brand.brand-icloud img { width: 44px; height: 44px; }
.subscription-brand.brand-applecare { background: #fff; border-color: #e4e9df; }
.subscription-brand.brand-applecare img { width: 40px; height: 36px; }
.subscription-brand.brand-wow img { width: 32px; height: 32px; }

/* Accesso all'archivio privato, anche da telefono. */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(100%, 440px); padding: 38px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 50px #27352808; }
.login-panel .brand { margin-bottom: 48px; }
.login-panel h1 { font-size: 29px; line-height: 1.2; margin: 12px 0; }
.login-panel .page-description { margin-bottom: 28px; }
.login-panel .field input { min-height: 46px; font-size: 16px; }
.login-panel .button { width: 100%; margin-top: 18px; min-height: 45px; }
.login-note { color: var(--muted); font-size: 11px; line-height: 1.7; margin: 25px 0 0; }
.login-panel .eyebrow { display: block; }
#logout-button { min-height: 32px; padding: 6px 10px; font-size: 11px; }
@media(max-width:650px) { .login-page { padding: 18px; } .login-panel { padding: 28px 22px; } .login-panel .brand { margin-bottom: 38px; } }
