/* Miisaaniyad — a single, mobile-first visual system. */
:root{color-scheme:light;--paper:#f4f6f8;--card:#fff;--ink:#17252b;--muted:#7c8991;--line:#e9eef0;--green:#187b65;--green-light:#eaf5ef;--shadow:0 4px 20px #142f3a04;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-synthesis:none;-webkit-text-size-adjust:100%}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-size:14px;line-height:1.5}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #8cc7b8;outline-offset:3px}.hidden{display:none!important}.icon{display:inline-block;width:21px;height:21px;flex-shrink:0;vertical-align:middle}.shell{width:min(100%,1060px);margin:auto;padding:0 30px 105px}.topbar{height:88px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:16px}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);font-weight:750;font-size:18px;letter-spacing:-.5px}.brand-mark{width:39px;height:39px;background:var(--green);color:white;display:grid;place-items:center;border-radius:13px}.brand small{display:block;font-size:8px;letter-spacing:1.7px;color:var(--muted);font-weight:600;margin-top:2px}.account{display:flex;align-items:center;gap:12px}.connection{font-size:11px;color:var(--muted)}.plain{background:transparent;border:0;color:var(--green);font-size:12px;font-weight:600;min-height:36px;padding:6px;display:inline-flex;align-items:center;justify-content:center;gap:6px}.intro{padding:32px 0 24px;display:flex;align-items:center;justify-content:space-between;gap:20px}.eyebrow{font-size:9px;font-weight:750;letter-spacing:1.6px;color:var(--green);margin:0 0 8px}.intro h1{font-size:34px;letter-spacing:-1.5px;line-height:1.15;margin:0;font-weight:750}.subhead{font-size:13px;color:var(--muted);margin:10px 0 0}.primary,.secondary{border:0;border-radius:12px;min-height:44px;padding:11px 17px;font-size:12px;font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:7px}.primary{background:var(--green);color:white;box-shadow:0 4px 10px #187b6515}.secondary{background:var(--green-light);color:var(--green)}.primary:active,.secondary:active{transform:scale(.98)}.month-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.month-nav{display:flex;align-items:center;gap:8px}.arrow{width:36px;height:36px;border:1px solid var(--line);background:white;border-radius:10px;font-size:23px;color:var(--ink)}#monthInput{min-height:40px;width:177px;border:0;background:transparent;color:var(--ink);font-size:15px;font-weight:650;padding:4px 6px;min-width:0}#monthLabel{font-size:11px;color:var(--muted)}.balance-card{position:relative;border-radius:24px;background:#153f39;color:white;padding:25px 28px 18px;overflow:hidden;margin-bottom:16px;box-shadow:0 12px 22px #153f3910}.balance-card::after{content:'';position:absolute;width:225px;height:225px;border:1px solid #ffffff0d;border-radius:50%;right:-60px;top:-80px;pointer-events:none;box-shadow:0 0 0 38px #ffffff03,0 0 0 78px #ffffff02}.balance-top{display:flex;align-items:center;justify-content:space-between;color:#bad7cc;font-size:12px;position:relative;z-index:1}.balance-mark{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:#ffffff0d;color:#d4eadf}.balance-card>strong{display:block;font-size:42px;font-weight:650;letter-spacing:-1.8px;line-height:1.2;margin-top:10px;font-variant-numeric:tabular-nums}.balance-card>p{font-size:10px;color:#a6c9ba;margin:6px 0 20px}.balance-bottom{border-top:1px solid #ffffff12;padding-top:14px;display:flex;align-items:center;justify-content:space-between;color:#bad7cc;font-size:10px}.balance-bottom b{color:#fff;font-size:12px;margin-left:8px}.currency-pill{font-size:9px;letter-spacing:1px;background:#ffffff0e;padding:4px 9px;border-radius:6px}.summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.sum-card{padding:18px;border:1px solid var(--line);border-radius:17px;background:var(--card);box-shadow:var(--shadow);min-width:0}.metric-icon{height:33px;width:33px;display:grid;place-items:center;border-radius:10px;margin-bottom:12px}.metric-icon .icon{width:18px;height:18px}.green{background:#e8f5ee;color:#31906e}.blue{background:#edf2ff;color:#6587d0}.purple{background:#f2edfc;color:#9b7cce}.amber{background:#fff4e7;color:#c68e44}.sum-card p{font-size:11px;color:#738088;margin:0 0 5px}.sum-card strong{font-weight:700;font-size:22px;letter-spacing:-.7px;font-variant-numeric:tabular-nums}.sum-card small{display:block;font-size:9px;color:#9aa4a8;margin-top:4px}.savings-strip{display:flex;align-items:center;gap:12px;margin-top:14px;padding:15px 18px;background:#fff;border:1px solid var(--line);border-radius:16px}.savings-strip .metric-icon{margin:0}.savings-strip>div{display:flex;gap:20px;flex:1;align-items:center;font-size:12px}.savings-strip strong{font-size:17px;letter-spacing:-.5px}.strip-note{font-size:10px;color:var(--muted)}.income-settings{margin-top:16px}.income-settings>summary{list-style:none;display:flex;align-items:center;gap:9px;color:#7a898e;font-size:11px;cursor:pointer;min-height:42px}.income-settings>summary::-webkit-details-marker{display:none}.income-settings summary .icon{width:16px;height:16px}.income-settings summary>span:last-child{margin-left:auto}.income-row{display:flex;align-items:end;flex-wrap:wrap;gap:10px;background:white;padding:16px;border-radius:14px}.income-row label{font-size:11px}.income-row input{display:block;border:1px solid var(--line);border-radius:9px;padding:9px;width:150px;margin-top:6px;font-size:16px}.income-row .plain{min-height:44px}.hint{font-size:10px;color:#8a989e;margin:0 0 15px;line-height:1.7}.tabs{display:flex;gap:6px;align-items:center;border-bottom:1px solid var(--line);padding:12px 0;margin:12px 0 0}.tabs button{display:flex;align-items:center;gap:8px;border:0;background:transparent;color:#8a969c;min-height:42px;padding:10px 16px;border-radius:11px;font-size:12px;font-weight:600}.tabs .selected{background:#e6efeb;color:var(--green)}.tabs .icon{width:18px;height:18px}.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:24px 0 16px}.toolbar>div:first-child{flex:1 1 260px}.toolbar h3{font-size:17px;letter-spacing:-.5px;margin:0;font-weight:700}.toolbar p{font-size:11px;color:var(--muted);margin:5px 0 0}.filters{display:flex;align-items:center;gap:10px}.filter-wrap{font-size:0}.filter-wrap select{border:1px solid var(--line);background:white;padding:11px;max-width:220px;border-radius:11px;font-size:12px;color:#64747b;min-height:42px}.search-box{background:white;border:1px solid var(--line);border-radius:11px;display:flex;align-items:center;padding:0 10px;width:180px;gap:7px;color:#a1adb2}.search-box .icon{width:16px;height:16px}.search-box input{border:0;background:none;outline:none;width:100%;min-width:0;font-size:12px;height:41px;color:var(--ink)}.expense-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}.finance-row{padding:18px;background:white;border:1px solid var(--line);border-radius:17px;min-width:0;box-shadow:var(--shadow)}.item-heading{display:flex;align-items:center;gap:11px}.item-heading>div:nth-child(2){min-width:0;flex:1}.category-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;flex-shrink:0;background:#edf2f6;color:#668393}.category-car{background:#edf2ff;color:#6687ce}.category-home{background:#fff0e5;color:#cc986d}.category-heart{background:#fcecf0;color:#c78094}.category-phone{background:#eaf5f9;color:#72a3b6}.category-spark{background:#f0edfb;color:#9c89cf}.category-user{background:#f5f0e7;color:#b8a077}.category-card{background:#eaf0f6;color:#7492ad}.category-savings{background:#e8f5ee;color:#31906e}.category-coffee{background:#fff0e8;color:#c98f6d}.finance-row h4{font-size:13px;line-height:1.45;letter-spacing:-.2px;margin:0;font-weight:650;overflow-wrap:anywhere}.finance-row p{color:var(--muted);font-size:10px;margin:4px 0;line-height:1.65;overflow-wrap:anywhere}.item-total{text-align:right;flex-shrink:0}.item-total strong{display:block;font-size:16px;letter-spacing:-.5px}.item-total small{font-size:9px;color:#a0a9ad}.numbers{display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between;margin-top:17px;padding-top:12px;border-top:1px solid #f1f4f5;font-size:9px;color:#8c989d}.numbers strong{font-weight:650;color:#52646d;margin-left:3px;font-size:10px}.numbers .amount-due strong{color:#bb8b4b}.numbers .amount-clear strong{color:#599c80}.row-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:13px}.row-actions .secondary{padding:8px 10px;min-height:37px;font-size:10px;background:#f0f6f3}.row-actions .secondary .icon{width:14px;height:14px}.row-actions .plain{font-size:10px;color:#94a29e}.finance-row .carryover{display:flex;align-items:center;gap:5px;color:#b98e57;margin-top:8px;font-size:9px}.carryover .icon{width:12px;height:12px}.undecided{color:#a494b7!important;font-size:9px!important}.fund-heading{display:flex;align-items:center;gap:12px}.fund-detail{margin-top:18px}.fund-balance{display:block;margin-top:10px;font-size:32px;font-weight:650;letter-spacing:-1px;color:var(--green)}.plan-details{font-size:11px;margin-top:8px;color:var(--muted)}.plan-details summary{cursor:pointer}.tag{display:inline-block;font-size:9px;background:#f0f5f2;color:#6d9685;padding:4px 8px;border-radius:6px;margin-top:7px}.ledger-row{display:flex;gap:12px;justify-content:space-between;align-items:center}.ledger-amount{font-size:17px;font-weight:650;white-space:nowrap}.empty{grid-column:1/-1;text-align:center;padding:50px 25px;border:1px dashed #dce5e7;border-radius:20px;background:#ffffff80}.empty h2{font-size:23px;letter-spacing:-.7px}.empty h3{font-size:15px}.empty p{font-size:12px;color:var(--muted);max-width:320px;margin:12px auto 20px}.welcome-icon{display:grid;place-items:center;width:54px;height:54px;background:#e6f0eb;border-radius:17px;color:var(--green);margin:auto}.welcome-icon .icon{width:26px;height:26px}footer{display:flex;justify-content:space-between;gap:12px;font-size:9px;color:#a6afb3;margin-top:24px}dialog{background:white;color:var(--ink);width:min(490px,calc(100% - 24px));max-height:90dvh;padding:0;border:0;border-radius:24px;box-shadow:0 25px 90px #14262f30;overscroll-behavior:contain}dialog::backdrop{background:#14282e66;backdrop-filter:blur(5px)}.dialog-head{display:flex;justify-content:space-between;gap:12px;padding:26px 24px 14px}.dialog-head h2{font-size:23px;letter-spacing:-.8px;margin:0}.dialog-head p:not(.eyebrow){font-size:12px;color:var(--muted);margin:8px 0 0}.close{width:32px;height:32px;background:#f1f4f5;border:0;border-radius:50%;font-size:23px;color:#8b999e;flex-shrink:0}.dialog-body{display:flex;flex-direction:column;gap:16px;padding:10px 24px 26px}.dialog-body label{font-size:11px;font-weight:600;display:flex;flex-direction:column;gap:7px;color:#63747c}.dialog-body input,.dialog-body select,.dialog-body textarea{width:100%;min-height:46px;background:#f9fafb;border:1px solid #e5ebed;border-radius:11px;padding:12px;font-size:16px;color:var(--ink);min-width:0;outline:none}.dialog-body input:focus,.dialog-body select:focus,.dialog-body textarea:focus{border-color:#75af9c;box-shadow:0 0 0 3px #187b6510}.dialog-body textarea{resize:vertical}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.dialog-body .hint{margin:0;padding:11px;border-radius:10px;background:#f3f7f5;font-weight:400}.dialog-body .checkbox-label{flex-direction:row;align-items:center;gap:10px;line-height:1.5}.checkbox-label input{width:20px;min-height:20px;accent-color:var(--green)}.auth-links{display:flex;align-items:center;justify-content:space-between;gap:10px}.error{color:#c16d67;font-size:11px}#pageError:not(:empty){background:#fff1ee;border-radius:12px;padding:14px}.negative{color:#eeb9a5!important}.toast{position:fixed;z-index:30;bottom:110px;left:50%;transform:translate(-50%,20px);max-width:calc(100% - 28px);background:#183f36;color:white;border-radius:12px;padding:12px 18px;font-size:12px;opacity:0;pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(min-width:801px){.balance-card{padding:28px 30px}.balance-card>strong{font-size:46px}.balance-top{max-width:100%}.tabs{position:sticky;top:0;background:var(--paper);z-index:5}.expense-list[data-view="ledger"]{grid-template-columns:1fr}.expense-list[data-view="funds"]{grid-template-columns:repeat(3,minmax(0,1fr))}.expense-list[data-view="funds"] .row-actions{flex-wrap:wrap}.expense-list[data-view="funds"] .row-actions .plain{width:100%;justify-content:flex-start}}
@media(max-width:800px){.shell{max-width:580px;padding:0 20px calc(112px + env(safe-area-inset-bottom))}.topbar{height:79px;border-bottom:0;padding-top:env(safe-area-inset-top)}.brand{font-size:17px}.brand-mark{width:36px;height:36px;border-radius:12px}.account{gap:5px}.connection{display:none}.account .plain{font-size:11px}.intro{padding:17px 0 22px;align-items:flex-start}.intro h1{font-size:29px;letter-spacing:-1px}.eyebrow{font-size:8px;letter-spacing:1.35px}.subhead{font-size:11px;line-height:1.7;max-width:260px;margin-top:8px}.intro>.primary{position:fixed;right:22px;bottom:calc(94px + env(safe-area-inset-bottom));height:50px;width:50px;min-height:50px;padding:0;border-radius:17px;box-shadow:0 5px 15px #187b6530;z-index:12}.intro>.primary>span:last-child{position:absolute;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden}.intro>.primary .icon{width:24px;height:24px}.month-row{margin-bottom:14px}.month-nav{gap:3px}.arrow{width:30px;height:32px;border-radius:9px;font-size:20px}#monthInput{width:157px;font-size:14px}#monthLabel{display:none}.balance-card{border-radius:22px;padding:22px 22px 17px}.balance-card>strong{font-size:38px;margin-top:12px}.balance-card>p{font-size:9px;max-width:240px;margin-bottom:19px}.balance-top{font-size:11px}.balance-bottom{font-size:9px}.balance-bottom b{font-size:11px}.summary{grid-template-columns:1fr 1fr;gap:10px}.sum-card{display:flex;gap:11px;padding:15px 13px;border-radius:16px;align-items:flex-start}.sum-card .metric-icon{width:29px;height:29px;border-radius:9px;margin:1px 0 0;flex-shrink:0}.sum-card .metric-icon .icon{width:16px;height:16px}.sum-card p{font-size:9px;margin:0 0 4px}.sum-card strong{font-size:20px;letter-spacing:-.7px}.sum-card small{font-size:8px;line-height:1.5}.savings-strip{border-radius:15px;padding:13px;margin-top:10px;gap:10px}.savings-strip>div{justify-content:space-between;font-size:11px;gap:8px}.savings-strip strong{font-size:17px}.strip-note{display:none}.income-settings{margin-top:10px}.hint{font-size:9px;margin-bottom:0}.tabs{position:fixed;z-index:15;bottom:0;left:0;right:0;margin:0;border:0;border-top:1px solid #e8edf1;background:#ffffffed;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);padding:10px 18px calc(10px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(4,1fr);gap:2px;box-shadow:0 -4px 24px #142f3a03}.tabs button{flex-direction:column;gap:5px;padding:6px 3px;min-height:46px;border-radius:12px;font-size:9px;letter-spacing:.1px}.tabs .icon{width:21px;height:21px}.tabs .selected{background:transparent;color:var(--green)}.tabs .selected .icon{stroke-width:2.2}.toolbar{padding-top:26px;gap:12px}.toolbar>div:first-child{flex:1 1 100%}.toolbar h3{font-size:17px}.toolbar p{font-size:10px;max-width:320px}.search-box{width:auto;flex:1;min-width:90px;height:42px}.search-box input{font-size:16px;width:100px}.filters{flex:0 1 auto;gap:6px;max-width:55%}.filter-wrap select{max-width:135px;font-size:10px;height:42px}.filters .secondary{width:40px;min-height:40px;padding:8px;font-size:0;gap:0;border-radius:11px;flex-shrink:0}.filters .secondary .icon{width:18px;height:18px}.expense-list{grid-template-columns:1fr;gap:10px}.finance-row{padding:16px;border-radius:17px}.item-heading{gap:10px}.finance-row h4{font-size:12px}.finance-row p{font-size:9px}.item-total strong{font-size:15px}.item-total small{font-size:8px}.category-icon{width:37px;height:37px;border-radius:12px}.category-icon .icon{width:19px;height:19px}.numbers{font-size:8px;gap:6px;margin-top:14px}.numbers strong{font-size:10px;margin-left:2px}.row-actions{margin-top:11px}.row-actions .secondary{min-height:38px;padding:8px 10px;font-size:10px}.row-actions .plain{min-height:38px}.fund-balance{font-size:32px}.ledger-row{padding:17px}.ledger-amount{font-size:15px}.empty{padding:35px 20px}.empty h2{font-size:22px}footer{font-size:8px;flex-wrap:wrap;justify-content:center;margin-top:25px}footer span:last-child{display:none}dialog{width:100%;max-width:580px;margin:auto auto 0;border-radius:25px 25px 0 0;max-height:92dvh;padding-bottom:env(safe-area-inset-bottom)}.dialog-head{padding:23px 22px 12px}.dialog-body{padding:10px 22px 25px}.dialog-body .primary{min-height:49px;border-radius:13px}.income-row{align-items:center}.income-row .plain{width:100%;justify-content:flex-start}.toast{bottom:calc(155px + env(safe-area-inset-bottom))}}
@media(max-width:360px){.shell{padding-left:14px;padding-right:14px}.sum-card{padding:13px 10px;gap:7px}.sum-card strong{font-size:18px}.sum-card .metric-icon{width:25px;height:25px}.numbers{gap:5px;font-size:8px}.numbers strong{font-size:9px}.finance-row{padding:14px}.item-total strong{font-size:14px}.filters{max-width:58%}.filter-wrap select{max-width:117px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
@media(max-width:800px){.tabs{grid-template-columns:repeat(5,1fr)}.tabs button:nth-child(3){grid-column:4}.tabs button:nth-child(4){grid-column:5}.intro>.primary{left:50%;right:auto;bottom:calc(14px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:20;border-radius:16px}.tabs button{font-size:9px}.intro>.primary:disabled{display:none}}
@media(max-width:800px){.arrow{width:40px;height:40px}.close{width:44px;height:44px}.row-actions .secondary,.row-actions .plain{min-height:44px}.finance-row h4{font-size:13px}.finance-row p{font-size:10px}.sum-card p{font-size:10px}.sum-card small{font-size:9px}.numbers{font-size:9px}.numbers strong{font-size:11px}.row-actions .plain{font-size:10px}}
