@font-face{font-family:Vazirmatn;src:url('./assets/arabic.woff2') format('woff2');font-style:normal;font-weight:400 900;font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFF}
:root{color-scheme:light;--bg:#edf2f6;--ink:#172d43;--muted:#52667a;--line:#dce5ed;--mint:#d7f1e6;--mint-ink:#215c48;--apricot:#ffe5d1;--apricot-ink:#834a29;--accent:#13334c;--white:#fff;--shadow:0 3px 10px #182e4410;--radius:18px;font-family:Vazirmatn,system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:290px}button,input{font:inherit;color:inherit}button{cursor:pointer;border:0;background:none;min-height:44px;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{opacity:.55;cursor:default}button:active:not(:disabled){transform:scale(.98)}button,input{transition:background-color .15s,transform .15s,box-shadow .15s}button:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid #277c7c;outline-offset:3px}h1,h2,p{margin:0}svg{width:22px;height:22px;flex:none;vertical-align:middle}bdi,.numeral{font-family:system-ui,-apple-system,sans-serif;font-variant-numeric:tabular-nums}small{font-size:.82rem;color:var(--muted)}[hidden]{display:none!important}
.shell{width:min(100%,720px);margin:auto;padding:calc(24px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) calc(116px + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}.loading{padding:24px}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;gap:12px}.brand{display:flex;align-items:center;gap:12px}.brand-mark,.icon-button{display:grid;place-items:center;width:46px;height:46px;border-radius:15px}.brand-mark{color:#fff;background:var(--accent);box-shadow:0 4px 10px #213b552b}.brand-mark svg{width:26px;height:26px}.brand h1{font-size:1.8rem;font-weight:800;line-height:1.12}.brand p{font-size:.9rem;color:var(--muted);margin-top:4px}.icon-button{background:white;border:1px solid var(--line);box-shadow:var(--shadow)}.icon-button:hover,.row-open:hover,.settings-item:hover{background:#f7fafc}
.summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.summary-card{border-radius:var(--radius);padding:15px 14px 16px;border:1px solid #20364a12;min-width:0;box-shadow:var(--shadow)}.in{--tone:var(--mint);--tone-ink:var(--mint-ink);--tile:#e9f6f0}.out{--tone:var(--apricot);--tone-ink:var(--apricot-ink);--tile:#fff0e6}.summary-card{background:var(--tone);color:var(--tone-ink)}.summary-label{display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:1.13rem;font-weight:800}.direction-icon{display:grid;place-items:center;width:32px;height:32px;background:#ffffff81;border-radius:11px}.direction-icon svg{width:18px;height:18px}.summary-money{margin-top:9px;color:var(--ink);font-size:clamp(1rem,5.3vw,1.9rem);font-weight:800;overflow-wrap:anywhere}.summary-caption{margin-top:6px;font-size:.84rem}.money{display:inline-flex;align-items:baseline;gap:.3em;flex-wrap:wrap}.money bdi{max-width:100%;overflow-wrap:anywhere}.currency{font-size:.65em;white-space:nowrap;font-weight:700}.net{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px;padding:11px 9px;border:1px solid #d8e3eb;border-radius:13px;background:#e3ebf2;font-weight:700;min-height:43px}.net svg{width:16px;height:16px;color:#506f86}.net .money{font-size:.96rem}.net .currency,.impact .currency{font-size:.9em}
.accounts{margin-top:28px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.section-head h2,.history h2{font-size:1.33rem;font-weight:800}.count{color:var(--muted);background:#e1eaf2;border-radius:999px;padding:4px 10px;font-size:.83rem;white-space:nowrap}.tools{display:grid;gap:10px;margin-bottom:12px}.search{display:flex;align-items:center;gap:9px;background:white;border:1px solid var(--line);border-radius:13px;padding-inline:12px;color:var(--muted)}.search:focus-within{border-color:#277c7c}.search input{min-width:0;width:100%;border:0;background:none;outline:none!important;min-height:46px;padding:7px 0}.search svg{width:18px;height:18px}.seg{display:flex;gap:4px;padding:4px;border-radius:13px;background:#e1e9f1}.seg button{flex:1;min-width:0;border-radius:10px;font-size:.92rem;color:var(--muted);font-weight:700}.seg button[aria-pressed=true]{background:white;color:var(--ink);box-shadow:0 1px 4px #152e4817}.account-list{display:grid;gap:9px}.row{display:flex;position:relative;background:white;border:1px solid var(--line);border-inline-start:3px solid var(--tone);border-radius:16px;box-shadow:var(--shadow);overflow:hidden;align-items:center;padding-inline-start:10px}.emoji{width:44px;height:44px;border-radius:13px;background:var(--tile,#edf2f6);display:grid;place-items:center;flex:none;font-family:system-ui,-apple-system,sans-serif;font-size:1.32rem;line-height:1}.emoji.static{width:53px;height:53px}.row-open{flex:1;display:flex;align-items:center;gap:8px;text-align:start;padding:12px 8px 12px 10px;min-width:0;min-height:76px}.name-block{flex:1;min-width:0}.name-block strong,.name-block small{display:block;overflow-wrap:anywhere}.name-block strong{font-size:1rem;font-weight:800;line-height:1.2}.name-block small{margin-top:5px;color:var(--tone-ink)}.row-balance{min-width:0;max-width:48%;text-align:end;flex:none}.row-balance small{display:block;margin-bottom:2px}.row-balance strong{font-size:clamp(.9rem,4vw,1.22rem);font-weight:800}.row-open>svg{width:15px;height:15px;color:#5f7487}.empty{display:grid;justify-items:center;text-align:center;gap:7px;background:#ffffff9e;border:1px dashed #bdccda;border-radius:var(--radius);padding:25px 13px}.empty-mark{width:47px;height:47px;display:grid;place-items:center;border-radius:15px;background:#e2ebf4;color:#3e5e78;margin-bottom:3px}.empty strong{font-size:1.06rem}.empty p{color:var(--muted);font-size:.9rem}.settled{margin-top:16px;background:#f5f8fa;border:1px solid var(--line);border-radius:14px;padding:0 10px}.settled summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;min-height:49px;padding:4px 2px;font-weight:700}.settled summary::-webkit-details-marker{display:none}.settled summary span:first-of-type{flex:1}.settled summary svg{width:17px;height:17px;color:var(--muted)}.settled[open] summary svg:last-child{transform:rotate(180deg)}.settled .account-list{padding-bottom:9px}
.dock{position:fixed;bottom:0;inset-inline:0;z-index:2;background:#edf2f6f5;border-top:1px solid #dce5ed;backdrop-filter:blur(12px);padding:9px 0 calc(10px + env(safe-area-inset-bottom))}.dock-inner{width:min(100%,720px);margin:auto;padding-inline:18px;display:flex;gap:9px}.primary,.secondary,.danger{display:flex;align-items:center;justify-content:center;gap:8px;border-radius:13px;padding:9px 13px;min-height:49px;font-weight:800;text-align:center}.primary{background:var(--accent);color:white;box-shadow:0 3px 8px #1435502a}.primary:hover{background:#214b67}.secondary{background:white;border:1px solid #cbd8e3}.danger{background:#9b302e;color:white}.dock-inner button{flex:1}.dock svg,.primary svg,.secondary svg{width:19px;height:19px}
.detail-head{justify-content:flex-start}.detail-head .name-block{flex:1}.detail-head h1{font-size:1.55rem;overflow-wrap:anywhere}.detail-head p{font-size:.9rem;color:var(--muted);margin-top:4px;overflow-wrap:anywhere}.balance-hero{background:var(--tone);text-align:center;padding:21px 15px 17px;border-radius:var(--radius);border:1px solid #20364a12;box-shadow:var(--shadow)}.balance-hero>p{font-weight:800;color:var(--tone-ink)}.balance-hero>strong{display:block;font-size:clamp(1.65rem,8vw,2.65rem);font-weight:800;margin:3px 0}.balance-hero>small{color:var(--tone-ink);font-weight:700}.detail-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-top:12px;text-align:center}.detail-totals>div{padding:10px 4px;background:white}.detail-totals span:not(.money,.currency){display:block;font-size:.85rem;color:var(--muted);margin-bottom:4px}.detail-totals strong{font-size:.92rem;overflow-wrap:anywhere}.history{margin-top:24px}.history ol{padding:0;margin:10px 0;list-style:none;display:grid;gap:8px}.entry{background:white;border:1px solid var(--line);border-radius:14px;padding:10px;display:flex;align-items:center;gap:8px}.entry-mark{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#e6eef5;color:#2d506c;flex:none}.entry-mark svg{width:17px;height:17px}.entry.payment .entry-mark{background:var(--mint);color:var(--mint-ink)}.entry .name-block div{color:var(--muted);font-size:.84rem;margin-top:4px;overflow-wrap:anywhere}.entry-values{display:grid;gap:3px;justify-items:end;text-align:end;max-width:43%}.entry-values small{font-size:.78rem}.entry .icon-button{width:39px;min-width:39px;height:44px;box-shadow:none;border:0;background:#f5f8fb}.entry .icon-button svg{width:18px}
dialog{width:min(100%,500px);max-width:100%;max-height:calc(100% - env(safe-area-inset-top) - 12px);margin:auto auto 0;padding:0;border:1px solid var(--line);border-radius:23px 23px 0 0;color:var(--ink);background:white;box-shadow:0 -10px 45px #17324930;overflow:auto;overscroll-behavior:contain}dialog::backdrop{background:#132a4760}body:has(dialog[open]){overflow:hidden}.sheet-content{padding:14px 18px calc(16px + env(safe-area-inset-bottom))}.handle{height:4px;width:36px;background:#ccd8e2;margin:0 auto 7px;border-radius:99px}.sheet-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}.sheet-head h2{font-size:1.33rem;font-weight:800}.sheet-head .icon-button{width:44px;height:44px;box-shadow:none}.sheet-head svg{width:18px}.form{display:grid;gap:10px}.field{display:grid;gap:3px;font-size:.92rem;font-weight:700}.field input,.emoji-custom{width:100%;min-width:0;background:#f7fafc;padding:9px 10px;min-height:44px;border:1px solid #cedae4;border-radius:11px;font-size:16px;font-weight:500}.field input::placeholder,input::placeholder{color:#63798c}.field small{font-weight:500}.optional{display:grid;grid-template-columns:1fr auto;align-items:end;gap:8px}.optional .emoji{margin-bottom:0}.amount-field{display:grid;grid-template-columns:1fr auto;align-items:end;gap:8px}.amount-field .secondary{min-height:44px;font-size:.88rem}.impact{padding:9px 10px;background:#eaf3fa;border-radius:10px;font-weight:700}.error{color:#982d2d;font-size:.88rem;font-weight:700;min-height:0}.error:empty{display:none}.date-extra summary{cursor:pointer;min-height:44px;padding:11px 2px;font-size:.9rem;color:var(--muted);font-weight:700}.emoji-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.emoji-grid button{width:100%;background:#edf3f8}.emoji-grid button[aria-pressed=true]{outline:2px solid #277c7c}.settings-list{display:grid;gap:8px}.settings-item{display:flex;align-items:center;gap:8px;text-align:start;min-height:49px;background:#f0f5f9;border-radius:11px;padding:8px 10px;font-weight:800}.settings-item svg{width:19px}.note{font-size:.92rem;color:var(--muted);line-height:1.5;margin:4px 0 9px}.preview-list{display:grid;gap:5px;max-height:32vh;overflow:auto;margin:6px 0 10px;padding:0;list-style:none}.preview-list li{display:flex;justify-content:space-between;gap:8px;background:#edf3f8;border-radius:9px;padding:8px;font-size:.88rem;overflow-wrap:anywhere}.toast{position:fixed;z-index:4;bottom:calc(82px + env(safe-area-inset-bottom));inset-inline:12px;margin:auto;width:max-content;max-width:calc(100% - 24px);padding:6px 12px;border-radius:12px;background:#152f46;color:white;display:flex;align-items:center;gap:9px;min-height:44px;box-shadow:0 5px 15px #18324b40}.toast button{color:#c4f5db;font-weight:800;padding:0 5px}
.pulse{animation:pulse .27s ease-out}@keyframes pulse{50%{transform:translateY(-2px);opacity:.72}}@media(min-width:560px){.shell{padding-top:34px}.summary-card{padding:17px 19px}.tools{grid-template-columns:1fr minmax(230px,.8fr)}.header{margin-bottom:25px}dialog{margin:auto;border-radius:23px}.sheet-content{padding:15px 20px 19px}.handle{display:none}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

:root{line-height:1.42}
@media(max-width:559px){.shell{padding-top:calc(18px + env(safe-area-inset-top))}.header{margin-bottom:17px}.summary-card{padding:12px 13px 13px}.summary-money{margin-top:7px}.summary-caption{margin-top:4px}.accounts{margin-top:21px}.section-head{margin-bottom:9px}.row-open{min-height:70px;padding-block:9px}.row-balance strong{font-size:clamp(.95rem,4.4vw,1.22rem)}}
.home-dock .primary{flex:1.36}
.home-dock .secondary{flex:1}
.report .summary-label{font-size:1rem}
.report .summary-money{margin-top:5px}
.year-select{display:flex;align-items:center;gap:7px;color:var(--muted);font-weight:700;font-size:.9rem}
.year-select select{font:inherit;color:var(--ink);font-family:system-ui,-apple-system,sans-serif;min-height:44px;border:1px solid var(--line);border-radius:10px;background:white;padding:4px 8px}
.report-list{margin-top:10px}
.report-row .name-block small:last-child{color:var(--muted)}
.account-status-action{margin-top:12px;font-size:.88rem}
@media(max-width:340px){.home-dock button{font-size:.83rem;padding-inline:7px}.report .seg button{font-size:.78rem}}
