@font-face{font-family:'Vazirmatn';src:url(/fonts/vazirmatn.woff2) format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:'Noto Kufi Arabic';src:url(/fonts/noto-kufi-brand.woff) format('woff');font-weight:800;font-style:normal;font-display:swap}

/* Layout: phone-first single column (max 480px), dark summary card on home, fixed bottom tab bar; persons' balances use بدهکار=red / بستانکار=blue */
:root{ color-scheme:light;
  --bg:#F3F2EE; --surface:#FFFFFF; --sunk:#E8E6DF; --ink:#17191F; --muted:#5C6070; --line:#E3E1DA;
  --gold:#8A6414; --gold-soft:#F5EDDA; --gold-ink:#5A420E; --on-gold:#FFFFFF;
  --deb:#B42318; --deb-soft:#FDECEA; --cred:#1D56A3; --cred-soft:#E6EEF8;
  --ok:#1F6B3A; --ok-soft:#E7F2EA; --warn:#7A4E00; --warn-soft:#FFF3D6;
  --hero:#FAF5E9; --hero-tile:#FFFFFF; --hero-line:#EADFC4; --hero-ink:#17191F; --hero-muted:#5C6070; --hero-acc:#6B4D0F; --hero-pos:#1D56A3; --hero-neg:#B42318;
  --btn:#17191F; --on-btn:#FFFFFF; --unrec:#FFFBF2; --brand:#17191F; --brand-gold:#8A6414; --edge:0 0 0 1px rgba(23,25,31,.07), 0 1px 3px rgba(23,25,31,.05);
  --font:'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){
  --bg:#121317; --surface:#1C1E24; --sunk:#2A2C33; --ink:#ECEAE4; --muted:#A3A6B0; --line:#2E3038;
  --gold:#D9B36A; --gold-soft:#2E2716; --gold-ink:#E9D9AE; --on-gold:#17191F;
  --deb:#F28B82; --deb-soft:#3A1F1D; --cred:#8AB4F8; --cred-soft:#1B2A40;
  --ok:#7FD39B; --ok-soft:#17301F; --warn:#F2C46B; --warn-soft:#33280F;
  --hero:#2A2D36; --hero-tile:#353845; --hero-line:#5A4A26; --hero-ink:#FFFFFF; --hero-muted:#B9BCC6; --hero-acc:#E9D9AE; --hero-pos:#8AB4F8; --hero-neg:#F28B82;
  --btn:#ECEAE4; --on-btn:#17191F; --unrec:#26231A; --brand:#ECEAE4; --brand-gold:#D9B36A; --edge:0 0 0 1px rgba(255,255,255,.06); color-scheme:dark; } }
:root[data-theme="dark"]{
  --bg:#121317; --surface:#1C1E24; --sunk:#2A2C33; --ink:#ECEAE4; --muted:#A3A6B0; --line:#2E3038;
  --gold:#D9B36A; --gold-soft:#2E2716; --gold-ink:#E9D9AE; --on-gold:#17191F;
  --deb:#F28B82; --deb-soft:#3A1F1D; --cred:#8AB4F8; --cred-soft:#1B2A40;
  --ok:#7FD39B; --ok-soft:#17301F; --warn:#F2C46B; --warn-soft:#33280F;
  --hero:#2A2D36; --hero-tile:#353845; --hero-line:#5A4A26; --hero-ink:#FFFFFF; --hero-muted:#B9BCC6; --hero-acc:#E9D9AE; --hero-pos:#8AB4F8; --hero-neg:#F28B82;
  --btn:#ECEAE4; --on-btn:#17191F; --unrec:#26231A; --brand:#ECEAE4; --brand-gold:#D9B36A; --edge:0 0 0 1px rgba(255,255,255,.06); color-scheme:dark; }

*{box-sizing:border-box}
html,body{background:var(--bg); overflow-x:hidden}
.topbar .grow h1, .topbar .grow span{overflow-wrap:anywhere}
.balbox{background:var(--surface); border-radius:14px; padding:4px 14px; display:flex; flex-direction:column}
.balbox .brow{display:flex; justify-content:space-between; align-items:center; gap:10px; min-height:52px; flex-wrap:wrap}
.balbox .brow + .brow{border-top:1px solid var(--line)}
.balbox .bl{font-size:14px; color:var(--muted); font-weight:600}
.balbox .bv{font-size:17px; font-weight:700}
.balbox .bv b{font-size:13px; font-weight:700; margin-inline-start:4px}
.balbox .brow.zero{min-height:44px; font-size:14px; color:var(--muted)}
.balbox.settled{flex-direction:row; align-items:center; gap:8px; padding:14px 16px; color:var(--muted); font-size:14px; font-weight:600}
.balbox .ok-ic svg{width:18px; height:18px; stroke:var(--ok); display:block}
.pempty{display:flex; flex-direction:column; align-items:center; gap:14px; padding:28px 8px 8px; text-align:center}
.pempty p{margin:0; color:var(--muted); font-size:14px}
.tel{color:inherit; font:inherit; background:none; border:none; padding:0; cursor:pointer; border-bottom:1px dotted var(--muted)}
body{color:var(--ink); font-family:var(--font); direction:rtl; font-size:15px; line-height:1.6; -webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit; font-size:inherit; color:inherit}
b,strong{font-weight:700}
.app{max-width:480px; margin:0 auto; padding-inline:16px; padding-block:16px 120px; display:flex; flex-direction:column; gap:14px}
.num{font-variant-numeric:tabular-nums; font-feature-settings:'tnum'}
h1{margin:0; font-size:24px; font-weight:800; text-wrap:balance}
h2{margin:0; font-size:17px; font-weight:700}
.muted{color:var(--muted)}
.small{font-size:13px}
:focus-visible{outline:2px solid var(--gold); outline-offset:2px}
::placeholder{color:color-mix(in srgb, var(--muted) 85%, var(--surface)); opacity:1}
.card, .balbox, .stmt, .voucher, .plist, .tile-btn, .pvdet, .check, .plan{box-shadow:var(--edge)}

.topbar{display:flex; align-items:center; gap:12px}
.topbar .grow{flex:1; display:flex; flex-direction:column; min-width:0}
.iconbtn{width:44px; height:44px; flex-shrink:0; border-radius:14px; border:1px solid color-mix(in srgb, var(--ink) 32%, var(--surface)); background:var(--surface); display:flex; align-items:center; justify-content:center; cursor:pointer}
.iconbtn svg{stroke:var(--ink)}
.nav svg, .iconbtn svg, .btn svg{stroke-width:1.9}

/* سامانه‌ی دکمه‌ها: همه هم‌قد و هم‌گوشه.
   اصلی = btn-gold (پر طلایی) · معمولی = btn (خط‌دور تیره) · حساس = btn is-danger (خط‌دور، نوشته‌ی قرمز) · تأیید حساس = btn-danger (پر قرمز) · متنی = btn-text · کوچک = btn-sm */
.btn{height:50px; border-radius:14px; border:1px solid color-mix(in srgb, var(--ink) 32%, var(--surface)); background:var(--surface); color:var(--ink); padding:0 16px; font:inherit; font-size:15px; font-weight:700; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; white-space:nowrap}
.btn svg{width:18px; height:18px; flex:none; stroke:currentColor}
.btn:active{background:var(--sunk)}
.btn.is-danger{color:var(--deb)}
.btn-dark{}
.btn-text{background:transparent; border-color:transparent; font-weight:700}
.btn-text:active{background:transparent; opacity:.7}
.btn-text.is-danger{color:var(--deb)}
.btn[disabled]{opacity:.45; cursor:not-allowed}
.btn-gold{background:var(--gold); color:var(--on-gold); border-color:var(--gold); width:100%; font-size:16px}
.btn-gold:active{background:var(--gold); filter:brightness(.92)}
.btn-gold[disabled], .btn-danger[disabled]{opacity:1; background:var(--sunk); border-color:var(--sunk); color:var(--muted); cursor:not-allowed; box-shadow:none}
.btn-danger{background:var(--deb); color:#fff; border-color:var(--deb)}
.btn-danger:active{background:var(--deb); filter:brightness(.92)}
.btn-ogold{background:transparent; color:var(--gold); border:1.5px solid var(--gold); height:56px; border-radius:20px; font-size:17px; width:100%}
.btn-ogold svg{stroke:currentColor}
.btn-ogold:active{background:var(--gold-soft)}
.btn-gold.btn-sm{width:auto}
.btn-sm{height:38px; font-size:13.5px; padding:0 14px; border-radius:12px; gap:6px}
.btn-sm svg{width:16px; height:16px}
.row2{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px}

.hero{border:1px solid var(--hero-line); background:var(--hero); color:var(--hero-ink); border-radius:20px; padding:18px; display:flex; flex-direction:column; gap:12px}
.hero .t{font-size:14px; font-weight:600; color:var(--hero-acc)}
.hero .tile{background:var(--hero-tile); box-shadow:var(--edge); border-radius:14px; padding:12px; display:flex; flex-direction:column; gap:2px; min-width:0; border:none; font:inherit; color:inherit; text-align:start; cursor:pointer; position:relative}
.hero .tile::after{content:""; position:absolute; top:14px; inset-inline-end:12px; width:7px; height:7px; border-left:2px solid var(--hero-muted); border-bottom:2px solid var(--hero-muted); transform:rotate(45deg); opacity:.6}
.hero .tile:active{filter:brightness(.96)}
.hero .tile .l{font-size:13px; color:var(--hero-muted)}
.hero .tile .v{font-size:17px; font-weight:700}
.hero .pos{color:var(--hero-pos)} .hero .neg{color:var(--hero-neg)}
.hero .hdeb{color:var(--hero-neg)} .hero .hcred{color:var(--hero-pos)}
.hero .hsec{font-size:13px; color:var(--hero-muted); font-weight:700; margin-bottom:-4px}
.hero .tile .l b{display:block; color:var(--hero-ink); font-weight:700; font-size:14px}
.hero .tile .l small{display:block; font-size:12px}
.hero .tile .v{margin-top:6px}
.hero .tile .v .n{white-space:nowrap}
.hero .tile .v small{font-size:12px; font-weight:600}
.hero .fxrow{display:flex; justify-content:space-between; gap:8px; font-size:13px; border-top:1px solid var(--hero-line); padding-top:10px; flex-wrap:wrap}

.fab.btn-gold{position:fixed; left:max(16px, calc(50% - 224px)); bottom:calc(84px + env(safe-area-inset-bottom,0px)); width:auto; height:52px; padding:0 22px; border-radius:26px; z-index:5; box-shadow:0 8px 22px rgba(0,0,0,.22)}
.nav{position:fixed; left:0; right:0; bottom:0; background:var(--surface); border-top:1px solid var(--line); padding-bottom:env(safe-area-inset-bottom,0px); z-index:6}
.nav .in{max-width:480px; margin:0 auto; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); height:68px}
.nav .nav-cta{position:relative; color:var(--gold); font-weight:700; justify-content:flex-end; padding-bottom:9px}
.nav .nav-cta .ring{position:absolute; top:-22px; left:50%; transform:translateX(-50%); width:58px; height:58px; border-radius:50%; background:var(--gold); display:grid; place-items:center; box-shadow:0 0 0 5px var(--surface), 0 8px 18px rgba(138,100,20,.35); transition:transform .15s}
.nav .nav-cta .ring svg{stroke:var(--on-gold); width:26px; height:26px; stroke-width:2.4}
.nav .nav-cta:active .ring{transform:translateX(-50%) scale(.94)}
.nav .nav-cta:focus-visible{outline:none}
.nav .nav-cta:focus-visible .ring{box-shadow:0 0 0 5px var(--surface), 0 0 0 8px var(--ink)}
.nav button{background:none; border:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; font-size:12.5px; white-space:nowrap; padding:0 2px; color:var(--muted); cursor:pointer}
.nav button svg{stroke:var(--muted)}
.nav button[aria-current="page"]{color:var(--ink); font-weight:800}
.nav button[aria-current="page"] svg{stroke:var(--gold-ink)}
.nav .pill-ic{display:grid; place-items:center; width:60px; height:30px; border-radius:999px; transition:background .15s}
.nav button[aria-current="page"] .pill-ic{background:var(--gold-soft); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent)}
.me-wrap{position:relative; display:inline-flex; flex:none}
.me-dot{position:absolute; top:0; inset-inline-start:0; width:13px; height:13px; border-radius:50%; background:var(--deb); border:2px solid var(--bg)}
.me-btn{width:42px; height:42px; border-radius:50%; border:1px solid var(--line); background:var(--sunk); display:grid; place-items:center; cursor:pointer; flex:none; overflow:hidden; padding:0}
.me-btn svg{width:100%; height:100%; fill:var(--muted); stroke:none; display:block}
.me-btn:active{transform:scale(.95)}

.card{background:var(--surface); border-radius:14px; padding:14px 16px; display:flex; flex-direction:column; gap:8px}
.empty{background:var(--surface); border:1px dashed var(--line); border-radius:20px; padding:22px 18px; display:flex; flex-direction:column; gap:10px; align-items:flex-start}
.empty h2{font-size:17px}

.field{display:flex; flex-direction:column; gap:6px}
.field > .lbl{font-size:13px; font-weight:600; color:var(--muted)}
.inp{height:48px; border-radius:14px; border:1px solid color-mix(in srgb, var(--ink) 46%, var(--surface)); background:var(--surface); padding:0 14px; display:flex; align-items:center; gap:8px}
.inp:focus-within{border-color:var(--ink); box-shadow:0 0 0 1px var(--ink)}
.inp input, .inp select{border:none; outline:none; background:transparent; flex:1; min-width:0; height:100%; font-size:16px; font-weight:400}
.inp select{font-size:15px; font-weight:600; color:var(--ink); background:transparent}
.inp select option{background-color:var(--surface); color:var(--ink); font-weight:400}
.inp select option:checked{background-color:var(--gold-soft); color:var(--ink)}
.inp select option.opt-new{color:var(--gold); font-weight:700; background-color:var(--gold-soft)}
.inp select optgroup{color:var(--muted); font-weight:600; font-style:normal; background-color:var(--surface)}
.inp .unit{font-size:13px; color:var(--muted); white-space:nowrap}
.hint{font-size:13px; color:var(--muted); min-height:18px}
input[data-pw], input[data-lgpass]{letter-spacing:.5em; font-size:20px}
.pin{position:relative; width:max-content}
.pin input{position:absolute; inset:0; width:100%; height:100%; opacity:0; font-size:16px; caret-color:transparent; z-index:1; border:none; padding:0}
.pin-bs{display:flex; gap:10px}
.pin-b{width:56px; height:56px; border-radius:14px; border:1px solid color-mix(in srgb, var(--ink) 46%, var(--surface)); background:var(--surface); display:flex; align-items:center; justify-content:center; font-size:24px; font-weight:700; color:var(--ink)}
.pin-b.fill{border-color:var(--ink)}
.pin:focus-within .pin-b.cur{border-color:var(--ink); box-shadow:0 0 0 1.5px var(--ink)}
.linkbtn.pin-show{align-self:flex-start; gap:6px; color:var(--muted); font-weight:600}
.pin-show svg{width:18px; height:18px}
.pw-sheet{gap:16px}
.pr-head{flex-direction:row; align-items:center; gap:14px}
.pr-head .btn-sm{align-self:flex-start}
textarea.sup-text{width:100%; min-height:130px; border-radius:14px; border:1px solid var(--line); background:var(--surface); padding:10px 12px; font-size:15px; line-height:1.8; resize:vertical}
textarea.sup-text:focus{outline:none; border-color:var(--ink)}
.acc .btn svg{width:18px; height:18px}
.sheet-handle{align-self:center; width:40px; height:4px; border-radius:2px; background:var(--line); margin-top:-8px}
.pw-acts{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:4px}
.pw-acts .btn{height:52px; width:100%; font-size:15px; border-radius:14px}
.linkbtn.pw-del{align-self:center; color:var(--deb); font-weight:600}
.pw-eye{background:none; border:none; padding:0; width:40px; height:40px; margin-inline-end:-8px; display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0}

.seg{background:var(--sunk); border:1px solid var(--line); border-radius:14px; padding:4px; display:grid; gap:4px}
.seg button{height:40px; border-radius:11px; border:none; background:transparent; color:var(--muted); cursor:pointer; font-size:14px; white-space:nowrap; padding:0 4px}
.seg button[aria-pressed="true"]{background:var(--surface); color:var(--ink); font-weight:700; box-shadow:inset 0 0 0 1.5px var(--ink)}
.seg.unset{background:transparent; border:1.5px dashed var(--muted)}
.seg.unset button{color:var(--ink)}
.req{color:var(--deb); font-weight:700}
.hint:empty{display:none}
.row3e{display:grid; grid-template-columns:0.8fr 1.2fr 1fr; gap:8px}
.row3e > *, .row2 > *{min-width:0}
.row3e .inp{padding:0 10px}
.row3e .inp input, .row2 .inp input{width:100%; min-width:0}
.row3e .lbl{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.row3e .inp .unit{font-size:12px}
.fbar{position:fixed; left:0; right:0; bottom:0; z-index:6; background:var(--surface); border-top:1px solid var(--line); padding:10px 16px calc(12px + env(safe-area-inset-bottom,0px)); box-shadow:0 -6px 18px rgba(0,0,0,.08)}
.fbar-in{max-width:448px; margin:0 auto; display:flex; flex-direction:column; gap:8px}
.fb-line{font-size:13px; display:flex; flex-direction:column; gap:4px; min-height:20px}
.fb-t{font-size:12px; color:var(--muted); font-weight:600}
.fb-i{display:flex; justify-content:space-between; align-items:center; gap:10px}
.fb-i .k{color:var(--muted)}
.fb-i b{font-size:15px; font-weight:800; white-space:nowrap}
.fb-i b small{font-size:12px; font-weight:400; color:var(--muted)}
.fb-i .fv.deb{color:var(--deb)} .fb-i .fv.cred{color:var(--cred)}
.fb-err{color:var(--deb); font-weight:600}
.fbar .btn-gold{height:52px}
.fbar-space{height:120px}
.pvdet{background:var(--surface); border-radius:14px; padding:4px 14px}
.pvdet summary{min-height:44px; display:flex; align-items:center; font-size:14px; font-weight:700; cursor:pointer; list-style:none}
.pvdet summary::-webkit-details-marker{display:none}
.pvdet summary::after{content:'▾'; margin-inline-start:auto; color:var(--muted)}
.pvdet[open] summary::after{content:'▴'}
.pvdet .calc, .pvdet .sum{margin-bottom:10px}
.voucher{background:var(--surface); border-radius:20px; padding:16px; display:flex; flex-direction:column; gap:12px}
.voucher.is-void .vc-rows, .voucher.is-void .vc-total{opacity:.55}
.vc-head{display:flex; align-items:center; gap:12px}
.vc-ttl{flex:1; display:flex; flex-direction:column; min-width:0}
.vc-ttl b{font-size:17px; font-weight:700}
.vc-party{display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); font-size:14px}
.vbox{background:var(--sunk); border-radius:14px; padding:12px 14px; display:flex; flex-direction:column; gap:8px}
.vbox.soft{background:transparent; border:1px solid var(--line)}
.vb-t{font-size:12.5px; font-weight:600; color:var(--muted)}
.vb-r{display:flex; justify-content:space-between; align-items:baseline; gap:10px; font-size:14px}
.vb-r > span{color:var(--muted)}
.vb-r b{font-size:16px; font-weight:800; white-space:nowrap}
.vb-r b small{font-size:12.5px; font-weight:700; margin-inline-start:2px}
.linkbtn.vc-link{color:var(--ink); font-weight:700; min-height:0; padding:0; text-align:end; text-decoration:underline dotted var(--muted); text-underline-offset:4px}
.vc-rows{margin:0; display:flex; flex-direction:column}
.vc-rows > div{display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:7px 0; font-size:14px}
.vc-rows dt{color:var(--muted); white-space:nowrap}
.vc-rows dd{margin:0; text-align:end; min-width:0; overflow-wrap:anywhere}
.vc-total{background:var(--sunk); border-radius:14px; padding:12px 14px; display:flex; flex-direction:column; gap:4px; font-size:13px; font-weight:600; color:var(--muted)}
.vc-eff{display:flex; flex-direction:column; gap:2px; font-size:17px; font-weight:700; color:var(--ink)}
.vc-eff > span{white-space:nowrap}
.vc-bal{margin-top:-4px}
.vc-calc summary{font-size:13px; font-weight:700; color:var(--muted); cursor:pointer; min-height:36px; display:flex; align-items:center; list-style:none}
.vc-calc summary::-webkit-details-marker{display:none}
.vc-calc summary::after{content:'▾'; margin-inline-start:6px}
.vc-calc[open] summary::after{content:'▴'}
.rec-toggle{width:100%}
.rec-toggle.on{border-color:var(--ok); color:var(--ok)}
.rec-toggle .cbox{width:22px; height:22px; border-radius:6px; border:1.5px solid var(--muted); display:inline-flex; align-items:center; justify-content:center; font-size:14px; margin:0; color:var(--surface)}
.rec-toggle .cbox.on{background:var(--ok); border-color:var(--ok); color:var(--surface)}
.vc-row{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px}
.vc-row .rec-toggle{justify-content:center}
.vc-actions{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px}
.vc-actions.one{grid-template-columns:1fr}
.vc-void{color:var(--deb)}
.tx-card{gap:6px}
.tx-top{display:flex; justify-content:flex-start}
.tx-big{font-size:24px; font-weight:700; line-height:1.4; margin-top:2px}
.tx-sub{font-size:13px; color:var(--muted)}
.tx-effs{display:flex; flex-direction:column; gap:2px; margin-top:8px; padding-top:10px; border-top:1px solid var(--line)}
.tx-eff{font-size:15px; font-weight:600}
.tx-eff b{font-weight:700}
.tx-rows{display:flex; flex-direction:column; margin-top:8px}
.tx-row{display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:44px; border-top:1px solid var(--line); font-size:14px}
.tx-row > .muted{white-space:nowrap}
.tx-v{text-align:end; min-width:0; overflow-wrap:anywhere}
.linkbtn.tx-link{color:var(--ink); font-weight:600; min-height:0; padding:0; text-align:end; text-decoration:underline dotted var(--muted); text-underline-offset:4px}
.tx-brk{display:flex; flex-direction:column; gap:2px; margin-bottom:6px}
.chips{display:flex; gap:8px; overflow-x:auto; padding-bottom:2px}
.chip{height:36px; padding:0 14px; border-radius:20px; border:1px solid var(--line); background:var(--surface); white-space:nowrap; cursor:pointer; font-size:13px}
.chip[aria-pressed="true"]{background:var(--surface); color:var(--ink); border-color:var(--ink); box-shadow:inset 0 0 0 .5px var(--ink); font-weight:700}
.check{background:var(--surface); border-radius:14px; padding:0 14px; min-height:48px; display:flex; align-items:center; gap:10px; font-size:14px; cursor:pointer}
.check input{appearance:none; -webkit-appearance:none; margin:0; flex-shrink:0; width:22px; height:22px; border-radius:6px; border:1.5px solid color-mix(in srgb, var(--ink) 46%, var(--surface)); background:var(--surface); display:grid; place-content:center; cursor:pointer}
.check input::after{content:''; width:6px; height:11px; border:solid var(--on-gold); border-width:0 2.5px 2.5px 0; transform:rotate(45deg) translate(-1px,-1px); opacity:0}
.check input:checked{background:var(--gold); border-color:var(--gold)}
.check input:checked::after{opacity:1}

.grp{display:flex; flex-direction:column; gap:8px}
.grp h3{margin:0; font-size:14px; color:var(--ink); font-weight:700}
.tiles{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px}
.tiles.one{grid-template-columns:1fr}
.tile-btn{background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:12px; text-align:start; cursor:pointer; display:flex; flex-direction:row; align-items:center; gap:10px; min-height:64px; color:var(--ink)}
.tile-btn .tx{display:flex; flex-direction:column; gap:2px; min-width:0}
.tile-btn b{font-size:15px; font-weight:700}
.tile-btn .tx span{font-size:12px; color:var(--muted); line-height:1.6}
.tic{width:40px; height:40px; flex-shrink:0; border-radius:12px; display:flex; align-items:center; justify-content:center; background:color-mix(in srgb, var(--gold) 20%, var(--surface)); color:var(--gold)}
.tile-btn:active{border-color:var(--gold)}
.inp select.is-empty{color:var(--muted); font-weight:400}
.inp select.is-empty option{color:var(--ink)}

.pv{display:flex; flex-direction:column; gap:10px}
.pv-empty{background:var(--surface); border-radius:14px; padding:14px 16px; color:var(--muted); font-size:14px}
.big{display:flex; justify-content:space-between; align-items:baseline; gap:10px; flex-wrap:wrap}
.big .v{font-size:24px; font-weight:700; color:var(--gold)}
.calc{background:var(--sunk); border-radius:14px; padding:8px 12px; font-size:13px; line-height:2}
.calc div{overflow-wrap:anywhere}
.sum{background:var(--hero); color:var(--hero-ink); border-radius:14px; padding:14px 16px; display:flex; flex-direction:column; gap:4px}
.sum .h{font-size:13px; color:var(--hero-acc); font-weight:600}
.sum .r{font-size:15px; line-height:2}
.sum .r b{font-size:15px}
.sum .deb{color:var(--hero-neg)} .sum .cred{color:var(--hero-pos)} .sum .zero{color:var(--hero-muted)}
.profit{background:var(--ok-soft); border-radius:14px; padding:14px 16px; display:flex; flex-direction:column; gap:2px}
.profit .l{font-size:13px; font-weight:700; color:var(--ok)}
.profit .v{font-size:24px; font-weight:700; color:var(--ok)}
.warn{background:var(--warn-soft); color:var(--warn); border-radius:14px; padding:10px 12px; font-size:13px}
.note-gold{background:var(--gold-soft); color:var(--gold-ink); border-radius:14px; padding:12px 14px; font-size:13px; line-height:1.8}

.bal{font-size:13px} .bal b{font-weight:700}
.deb{color:var(--deb)} .cred{color:var(--cred)} .zero{color:var(--muted)}
.legend{display:flex; gap:14px; flex-wrap:wrap; font-size:13px; color:var(--muted)}

.plist{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; background:var(--surface); border-radius:14px; overflow:hidden}
.plist li + li .prow{border-top:1px solid var(--line)}
.plist .bal.deb, .plist .bal.cred{color:var(--ink)}
.plist .bal.deb b{color:var(--deb)} .plist .bal.cred b{color:var(--cred)}
.plist .bal .a{font-weight:700}
.prow{width:100%; background:var(--surface); border:none; border-radius:14px; padding:12px 14px; display:flex; gap:12px; align-items:flex-start; text-align:start; cursor:pointer}
.plist .prow{border-radius:0}
.av{width:40px; height:40px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; background:var(--sunk); color:var(--muted)}
.av svg{width:22px; height:22px; fill:currentColor}
.prow .body{flex:1; display:flex; flex-direction:column; gap:2px; min-width:0}
.prow .nm{display:flex; justify-content:space-between; align-items:center; gap:8px}
.prow .nm b{font-size:15px}
.tag{font-size:12px; color:var(--muted); background:var(--bg); padding:2px 8px; border-radius:8px; white-space:nowrap}
.foot{display:flex; justify-content:space-between; gap:8px; font-size:12px; color:var(--muted); margin-top:2px}
.unrec-txt{color:var(--muted); font-weight:600}
.psearch{display:flex; gap:8px; align-items:stretch}
.psearch .inp{flex:1; min-width:0}
.addrow{align-items:center}
.paybox{display:flex; flex-direction:column; gap:6px; padding:12px 14px; border:1px dashed color-mix(in srgb, var(--gold) 55%, transparent); border-radius:14px; background:var(--gold-soft)}
.paycard{display:flex; align-items:center; justify-content:space-between; gap:10px}
.paycard b{font-size:20px; font-weight:800; letter-spacing:.04em}
.sreq{display:flex; flex-direction:column; gap:8px; padding:12px 0; border-top:1px solid var(--line)}
.plist .add-li{padding:6px}
.plist .add-li + li .prow{border-top:1px solid var(--line)}
.dd{position:relative}
.dd-btn{width:100%; cursor:pointer; font:inherit; text-align:start; color:var(--ink)}
.dd-btn .v{flex:1; min-width:0; font-size:15px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.dd-btn.is-empty .v{color:var(--muted); font-weight:400}
.dd-btn small, .dd-opt small{color:var(--muted); font-weight:400; font-size:13px}
.dd.open .dd-btn{border-color:var(--ink); box-shadow:0 0 0 1px var(--ink)}
.dd-list{position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:15; list-style:none; margin:0; padding:6px; background:var(--surface); border:1px solid var(--line); border-radius:16px; box-shadow:0 14px 34px rgba(0,0,0,.18); max-height:min(320px,55vh); overflow-y:auto}
.dd-add{width:100%; display:flex; align-items:center; gap:8px; padding:12px; border:none; border-radius:12px; background:var(--gold-soft); color:var(--gold-ink); font:inherit; font-weight:700; font-size:15px; cursor:pointer; text-align:start}
.dd-add svg{width:20px; height:20px; stroke:var(--gold); stroke-width:2.4; flex:none}
.dd-grp{padding:12px 12px 4px; font-size:12.5px; color:var(--muted); font-weight:600}
.dd-opt{width:100%; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:11px 12px; border:none; border-radius:12px; background:none; color:var(--ink); font:inherit; font-size:15px; cursor:pointer; text-align:start}
.dd-opt:hover{background:var(--sunk)}
.dd-opt[aria-selected="true"]{background:var(--sunk); font-weight:700}
.dd-opt svg{width:18px; height:18px; stroke:var(--gold); flex:none}
.addrow .body b{font-size:15px; color:var(--gold)}
.av.add{background:transparent; border:1.5px dashed var(--gold); color:var(--gold)}
.av.add svg{width:20px; height:20px; stroke:var(--gold); stroke-width:2.2}
.addp-sq{width:48px; height:48px; flex:none; border-radius:14px; border:1.5px solid var(--gold); background:transparent; color:var(--gold); display:grid; place-items:center; cursor:pointer}
.addp-sq svg{stroke:currentColor; width:22px; height:22px; stroke-width:2.2}
.addp-sq:active{background:var(--gold-soft)}
.nm-s{justify-content:flex-start !important}
.nm-s .tp{font-size:12px; color:var(--muted)}
.nm-s .tp::before{content:'·'; margin-inline-end:6px}
.udot{width:8px; height:8px; border-radius:50%; background:var(--gold); flex:none; margin-inline-start:auto}

.balcards{display:flex; flex-direction:column; gap:8px}
.balcard{border-radius:14px; padding:14px 16px; display:flex; flex-direction:column; gap:2px; background:var(--surface)}
.balcard.deb{background:var(--deb-soft)} .balcard.cred{background:var(--cred-soft)}
.balcard .hd{display:flex; justify-content:space-between; font-size:13px; font-weight:700}
.balcard .v{font-size:20px; font-weight:700}
.balcard.zero .v{font-size:17px; color:var(--muted)}

.stmt{background:var(--surface); border-radius:20px; padding:14px 0 0; display:flex; flex-direction:column}
.stmt .hd{padding:0 16px 10px; display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap}
.stmt{overflow:hidden}
.stmt .hd-acts{display:flex; gap:6px}
.hd-btn{border:1px solid var(--line); gap:4px; font-weight:600; padding:0 10px}
.hd-btn svg{width:16px; height:16px}
.stmt .hd{padding-inline:14px}
.iconbtn.sm{width:38px; height:38px; border-radius:12px; color:var(--ink)}
.iconbtn.sm svg{stroke:currentColor}
.sfil{padding:0 16px 10px}
.smon{padding:14px 14px 4px; font-size:12px; font-weight:700; color:var(--muted); border-top:1px solid var(--line)}
.hd-acts2{display:grid; grid-template-columns:repeat(auto-fit,minmax(0,1fr)); gap:8px; padding:0 14px 12px}
.aic{display:inline-grid; place-items:center; width:20px; height:20px; border-radius:6px; flex:none; vertical-align:-5px}
.aic svg{width:15px; height:15px}
.aic-g{background:color-mix(in srgb, var(--gold) 18%, var(--surface)); color:var(--gold)} .aic-g svg{fill:var(--gold)}
.aic-m{background:color-mix(in srgb, #2E7D5B 15%, var(--surface)); color:#2E7D5B}
.aic-fx{background:color-mix(in srgb, #3A6EA5 15%, var(--surface)); color:#3A6EA5}
.aic-fx b{font-size:12px; font-weight:800; line-height:1; font-family:system-ui, sans-serif}
:root[data-theme="dark"] .aic-m{color:#5FBF92} :root[data-theme="dark"] .aic-fx{color:#7FA8D8}
.alab{display:inline-flex; align-items:center; gap:6px}
.se3 .n{display:inline-flex; align-items:center; gap:5px; white-space:nowrap}
.se3 .aic{width:18px; height:18px}
.hd-acts2 .btn svg{flex:none} .se3 .aic svg{width:13px; height:13px}
.bal .aic{width:18px; height:18px} .bal .aic svg{width:13px; height:13px}
.srow3{display:flex; align-items:center; gap:12px; padding:14px; border-top:1px solid var(--line); cursor:pointer}
.srow3:active{background:var(--sunk)}
.srow3.picked{background:var(--gold-soft)}
.srow3.is-void{opacity:.55} .srow3.is-void .s3-t{text-decoration:line-through}
.srow3 .ic-wrap{position:relative; flex:none}
.srow3 .cbox{flex:none}
.srow3 .tic{width:38px; height:38px; border-radius:12px} .srow3 .tic svg{width:19px; height:19px}
.tic-recv, .tic-pay{background:color-mix(in srgb, #2E7D5B 14%, var(--surface)); color:#2E7D5B}
.tic-close{background:color-mix(in srgb, #6A55A8 14%, var(--surface)); color:#6A55A8}
.ubadge{position:absolute; top:-2px; inset-inline-end:-2px; width:7px; height:7px; border-radius:50%; background:color-mix(in srgb, var(--gold) 70%, var(--surface)); box-shadow:0 0 0 1.5px var(--surface)}
.s3-main{flex:1 0 auto; min-width:118px; display:flex; flex-direction:column; gap:3px}
.s3-t{font-size:15px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.s3-d{font-size:12.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.s3-eff{flex:0 1 auto; min-width:0; display:flex; flex-direction:column; align-items:flex-end; gap:4px; text-align:end}
.se3{display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:baseline; column-gap:5px; line-height:1.4}
.se3 b{font-size:14.5px; font-weight:800; white-space:nowrap}
.se3 small{font-size:12.5px; font-weight:700}
.se3 b{color:var(--ink)} .se3.deb small{color:var(--deb)} .se3.cred small{color:var(--cred)}
.se3.none{font-size:12.5px; color:var(--muted)}
.srow2{display:flex; align-items:center; gap:8px; padding:12px 14px; border-top:1px solid var(--line); cursor:pointer}
.smon + .srow2{border-top:none}
.srow2 .tic{width:32px; height:32px; border-radius:10px} .srow2 .tic svg{width:18px; height:18px}
.srow2 .s-main{flex:1 1 auto; display:flex; flex-direction:column; gap:2px; min-width:72px}
.srow2 .s-main b{font-size:15px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:flex; align-items:center; gap:6px}
.srow2 .s-main > span{white-space:nowrap; font-size:12.5px}
.srow2 .s-main{flex:1 1 auto !important; min-width:0 !important; gap:4px !important}
.srow2 .s-top, .srow2 .s-bot{display:flex; align-items:baseline; justify-content:space-between; gap:10px}
.srow2 .s-date{font-size:12px; color:var(--muted); white-space:nowrap; flex:none}
.srow2 .s-bot .s-eff{flex-direction:row !important; flex-wrap:wrap; justify-content:flex-end; gap:2px 12px !important}
.srow2 .s-bot .se{white-space:nowrap}
.srow2 .s-eff b{display:inline; font-size:inherit; font-weight:700; overflow:visible}
.srow2 .s-eff{flex:0 1 auto; min-width:0}
.srow2 .rbox, .srow2 .cbox{flex-shrink:0}
.srow2 .s-eff{display:flex; flex-direction:column; align-items:flex-end; gap:0; text-align:end}
.srow2 .se{font-size:13px; font-weight:700}
.srow2 .sb{font-size:12px; color:var(--muted)}
.srow2.is-void{opacity:.55} .srow2.is-void .s-main b{text-decoration:line-through}
.srow2.picked{background:var(--gold-soft)}
.rbox{width:26px; height:26px; flex-shrink:0; border-radius:7px; border:1.5px solid var(--muted); background:transparent; color:var(--surface); font-size:14px; font-weight:700; display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0}
.rbox.on{background:var(--ok); border-color:var(--ok)}
.balbox .bl small{display:block; font-size:12px; font-weight:400; color:var(--muted)}
.srow{border-top:1px solid var(--line); padding:12px 16px; display:flex; flex-direction:column; gap:4px; cursor:pointer}
.srow.unrec{background:transparent}
.srow .udot{margin-inline-start:4px; align-self:center}
.srow.is-void{opacity:.55}
.srow.is-void .st{text-decoration:line-through}
.srow .top{display:flex; justify-content:space-between; align-items:center; gap:8px}
.srow .st{font-size:14px; font-weight:700; min-width:0}
.recbtn{min-height:36px; padding:0 12px; border-radius:14px; border:1px solid var(--gold); background:var(--surface); font-size:13px; font-weight:700; cursor:pointer; white-space:nowrap; display:inline-flex; align-items:center; gap:4px; color:var(--gold)}
.recbtn[aria-pressed="true"]{color:var(--muted); border-color:var(--line); font-weight:400}
.rstat{font-weight:700; color:var(--gold)} .rstat.ok{color:var(--ok)}
.sgrid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 8px; font-size:13px}
.sgrid span.deb,.sgrid span.cred{font-size:15px; font-weight:700}
.sgrid span.muted{font-size:13px}
.vtag{font-size:12px; color:var(--deb); border:1px solid var(--deb); border-radius:8px; padding:0 6px; margin-inline-start:6px}

.pr-info .inp input, .pr-info .inp select{font-weight:400}
.pr-info .chip{font-weight:400} .pr-info .chip[aria-pressed="true"]{font-weight:600}
.acc{gap:0}
.acc h2{margin-bottom:6px}
.acc-row{display:flex; justify-content:space-between; align-items:center; gap:10px; min-height:48px; padding:0; background:none; border:none; border-top:1px solid var(--line); font:inherit; font-size:15px; color:var(--ink); text-align:start; width:100%}
button.acc-row{cursor:pointer}
.acc-row b{font-weight:600}
.acc-v{display:inline-flex; align-items:center; gap:4px; font-size:14px}
.linkbtn.logout{align-self:flex-start; gap:6px; color:var(--muted); font-weight:600; font-size:14px; padding:0 4px}
.btn-out-danger{background:transparent; color:var(--deb); border:1.5px solid var(--deb)}
.kv{display:grid; grid-template-columns:auto 1fr; gap:6px 14px; font-size:14px}
.kv dt{color:var(--muted)} .kv dd{margin:0; font-weight:600; min-width:0; overflow-wrap:anywhere}
.linkbtn{background:none; border:none; padding:0 2px; min-height:36px; display:inline-flex; align-items:center; color:var(--gold); font-weight:700; cursor:pointer; text-decoration:none}
textarea.copy{width:100%; min-height:140px; border-radius:14px; border:1px solid var(--line); background:var(--surface); padding:10px; font-size:13px; direction:rtl}
.toast{position:fixed; top:calc(16px + env(safe-area-inset-top,0px)); left:50%; transform:translateX(-50%); background:var(--btn); color:var(--on-btn); padding:10px 18px; border-radius:14px; font-weight:700; z-index:10; box-shadow:0 6px 20px rgba(0,0,0,.18)}
.banner{background:var(--warn-soft); color:var(--warn); border-radius:14px; padding:10px 12px; font-size:13px}
/* receive/pay gold row */
.row3g{display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:8px}
.row3g .inp input{font-size:15px}
/* invoice */
.srow.picked{background:var(--gold-soft)}
.cbox{display:inline-flex; width:22px; height:22px; border-radius:8px; border:2px solid var(--line); align-items:center; justify-content:center; font-size:13px; font-weight:700; margin-inline-end:8px; vertical-align:middle; color:var(--on-gold)}
.cbox.on{background:var(--gold); border-color:var(--gold)}
.selbar{position:fixed; left:50%; transform:translateX(-50%); bottom:calc(96px + env(safe-area-inset-bottom,0px)); width:min(448px, calc(100% - 32px)); z-index:7; background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:8px 10px 8px 8px; display:flex; align-items:center; gap:8px; box-shadow:0 8px 24px rgba(0,0,0,.15)}
.selbar span{flex:1; font-size:14px; padding-inline-start:6px}
.paper{background:var(--surface); border:1px solid var(--line); border-radius:20px; padding:18px 16px; display:flex; flex-direction:column; gap:14px}
.ihead{display:flex; justify-content:space-between; align-items:center; gap:10px; padding-bottom:12px; border-bottom:2px solid var(--brand-gold)}
.ino{display:flex; flex-direction:column; align-items:flex-end; font-size:13px; gap:2px}
.ino b{font-size:15px}
.iparty{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px}
.iparty > div{display:flex; flex-direction:column; gap:2px; min-width:0; border-inline-start:3px solid var(--brand-gold); padding:2px 10px}
.itable{display:flex; flex-direction:column; font-size:13px}
.ith,.itr,.itf{display:grid; grid-template-columns:minmax(0,1fr) 5.6em 7.2em; gap:8px; padding:8px 0; align-items:start}
.ith{font-size:12px; color:var(--muted); font-weight:700; border-bottom:1px solid var(--line)}
.itr{border-bottom:1px dashed var(--line)}
.itr > span:first-child{display:flex; flex-direction:column; gap:2px; min-width:0}
.itr small{color:var(--muted); font-size:12px; line-height:1.7}
.itr span.num small,.itf span.num small{display:block; font-size:12px; font-weight:700; color:inherit}
.itr span:not(:first-child), .ith span:not(:first-child), .itf span:not(:first-child){text-align:left}
.itr.is-void{opacity:.5; text-decoration:line-through}
.itf{font-weight:700; border-top:2px solid var(--ink)}
.ibox{background:transparent; border-top:1px solid var(--line); border-radius:0; padding:12px 0 0; display:flex; flex-direction:column; gap:4px}
.irow{display:flex; justify-content:space-between; gap:8px; font-size:14px}
.ifoot{display:flex; align-items:center; justify-content:center; gap:6px; font-size:12px; color:var(--muted); padding-top:4px}
/* reports */
.pnav{display:flex; align-items:center; justify-content:space-between; gap:8px; background:var(--surface); border-radius:14px; padding:6px}
.pnav b{flex:1; font-size:14px}
.row3{display:grid; grid-template-columns:1fr 1.4fr 1.2fr; gap:6px}
.row3 .inp{height:46px; padding:0 8px}
.stat{gap:2px}
.stat .v{font-size:20px; font-weight:700}
.mvrow{display:grid; grid-template-columns:3.5em minmax(0,1fr) minmax(0,1fr); gap:8px; font-size:13px; padding:6px 0; border-top:1px solid var(--line)}
.mvrow span:first-child{font-weight:700}
.dayhead{display:block; font-size:13px; font-weight:700; color:var(--gold); padding-top:10px}
/* brand */
.brand{display:flex; align-items:center; gap:10px}
.brand .name{font-family:'Noto Kufi Arabic', var(--font); font-weight:800; font-size:24px; color:var(--brand); line-height:1.3}
.brand-hero{display:flex; flex-direction:column; align-items:center; gap:6px}
.brand-hero .name{font-family:'Noto Kufi Arabic', var(--font); font-weight:800; font-size:34px; color:var(--brand); line-height:1.3}
.foot-brand{display:flex; justify-content:center; align-items:center; gap:6px; font-size:13px; color:var(--muted); padding-top:4px}
/* subscription */
.pill{font-size:13px; font-weight:700; padding:3px 10px; border-radius:14px; background:var(--sunk); color:var(--muted); white-space:nowrap}
.pill.ok{background:var(--ok-soft); color:var(--ok)}
.plans{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:16px}
.plan{position:relative; border:1px solid var(--line); border-radius:14px; padding:14px 12px 12px; display:flex; flex-direction:column; gap:4px; background:var(--surface)}
.plan.hl{border:2px solid var(--gold)}
.plan .pspace{flex:1; min-height:6px}
.plan .pprice{font-size:16px; font-weight:700; white-space:nowrap; color:var(--ink)}
.plan .pwas{font-size:13px; color:var(--muted)}
.plan .btn{height:40px; margin-top:auto; font-size:14px; border-radius:14px; width:100%}
.pbadge{position:absolute; top:-10px; inset-inline-start:12px; background:var(--gold); color:var(--on-gold); font-size:12px; font-weight:700; padding:2px 8px; border-radius:8px; white-space:nowrap}
.feat{margin:0; padding-inline-start:18px; font-size:13px; line-height:2}
/* confirm sheet */
.backdrop{position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:20}
.sheet{position:fixed; left:50%; transform:translateX(-50%); bottom:0; width:min(480px,100%); background:var(--surface); border-radius:20px 20px 0 0; padding:20px 16px calc(20px + env(safe-area-inset-bottom,0px)); z-index:21; display:flex; flex-direction:column; gap:12px; max-height:90dvh; overflow:auto; box-shadow:0 -8px 30px rgba(0,0,0,.2)}
.sheet:focus{outline:none}
/* onboarding */
.onb{min-height:calc(100dvh - 48px); display:flex; flex-direction:column; gap:18px}
.onb .bar{display:flex; justify-content:space-between; align-items:center; min-height:44px}
.onb .ill{background:var(--surface); border-radius:20px; padding:22px 18px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; min-height:250px}
.onb h1{font-size:24px}
.onb p{margin:0; color:var(--muted); line-height:1.9}
.onb .grow{flex:1}
.dots{display:flex; gap:6px; justify-content:center}
.dots span{width:8px; height:8px; border-radius:8px; background:var(--line)}
.dots span.on{width:24px; background:var(--gold)}
.scraps{display:flex; flex-wrap:wrap; gap:8px; justify-content:center}
.scrap{background:var(--bg); border:1px dashed var(--line); color:var(--muted); padding:8px 12px; border-radius:14px; font-size:13px; text-decoration:line-through; text-decoration-color:var(--deb)}
.scrap:nth-child(1){transform:rotate(-3deg)} .scrap:nth-child(2){transform:rotate(2deg)} .scrap:nth-child(3){transform:rotate(-1deg)}
.mini{background:var(--hero); color:var(--hero-ink); border-radius:14px; padding:12px 14px; width:100%; max-width:280px; display:flex; flex-direction:column; gap:8px}
.mini .t{font-size:13px; color:var(--hero-acc); font-weight:600}
.mini .tl{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; font-size:13px}
.mini .tl span{background:var(--hero-tile); border-radius:14px; padding:6px 8px}
.quiz{display:flex; flex-direction:column; gap:8px; width:100%}
.quiz .q{font-size:14px; line-height:1.9; font-weight:600}
.quiz .opts{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px}
.quiz .opts button{height:48px; border-radius:14px; border:1px solid var(--line); background:var(--bg); font-weight:700; cursor:pointer}
.quiz .opts button.right{background:var(--cred-soft); border-color:var(--cred); color:var(--cred)}
.quiz .opts button.wrong{background:var(--deb-soft); border-color:var(--deb); color:var(--deb)}
.quiz .fb{font-size:13px; line-height:1.9; border-radius:14px; padding:10px 12px; background:var(--bg)}
.tip{background:var(--gold-soft); color:var(--gold-ink); border-radius:14px; padding:12px 14px; font-size:13px; line-height:1.9; display:flex; flex-direction:column; gap:6px}
.tip b{font-size:13px}
.tip button{align-self:flex-end; background:none; border:none; color:var(--gold); font-weight:700; cursor:pointer; padding:4px 0}
.steps{display:flex; flex-direction:column; gap:8px}
.stepi{display:flex; align-items:center; gap:12px; background:var(--bg); border:none; border-radius:14px; padding:10px 12px; text-align:start; cursor:pointer; width:100%}
.stepi .dot{width:28px; height:28px; border-radius:50%; border:2px solid var(--line); display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:13px; font-weight:700; color:var(--muted)}
.stepi.ok .dot{background:var(--ok); border-color:var(--ok); color:var(--surface)}
.stepi.ok .txt{color:var(--muted); text-decoration:line-through}
.stepi .txt{flex:1; display:flex; flex-direction:column; font-size:14px; font-weight:700}
.stepi .txt small{font-weight:400; color:var(--muted); font-size:13px; text-decoration:none}
.subact{background:var(--sunk); border-radius:14px; padding:14px; display:flex; flex-direction:column; gap:12px}
.sa-top{display:flex; justify-content:space-between; align-items:center; gap:10px}
.sa-plan{display:flex; flex-direction:column; gap:4px; min-width:0}
.sa-plan b{font-size:16px}
.sa-days{display:flex; flex-direction:column; align-items:center; line-height:1.1; flex:none}
.sa-days b{font-size:26px; color:var(--ink)}
.sa-days span{font-size:12px; color:var(--muted)}
.sa-days.deb b{color:var(--deb)}
.sa-hist summary{cursor:pointer; color:var(--muted); font-size:13px; font-weight:600}
.subact .progress{background:color-mix(in srgb,var(--ink) 10%,transparent)}
.sa-hist>div{display:flex; flex-direction:column; gap:4px; margin-top:8px}
.vh{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
.tut{display:flex; align-items:center; gap:4px; background:var(--gold-soft); border:1px solid color-mix(in srgb,var(--gold) 28%,transparent); border-radius:18px; padding:6px 6px 6px 4px}
.tut-go{flex:1; min-width:0; display:flex; align-items:center; gap:12px; background:none; border:0; padding:8px 8px; text-align:start; cursor:pointer; color:var(--ink); font:inherit}
.tut-ic{width:46px; height:46px; flex:none; border-radius:50%; background:var(--gold); color:var(--on-gold); display:flex; align-items:center; justify-content:center; box-shadow:0 4px 12px color-mix(in srgb,var(--gold) 35%,transparent)}
.tut-ic svg{margin-inline-start:-3px}
.tut-tx{display:flex; flex-direction:column; gap:2px; min-width:0}
.tut-tx b{font-size:15px; font-weight:800}
.tut-tx small{font-size:12.5px; color:var(--muted)}
.tut-x{width:40px; height:40px; flex:none; border:0; background:none; color:var(--muted); border-radius:12px; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:20px}
.tut-x:focus-visible,.tut-go:focus-visible{outline:2px solid var(--gold); outline-offset:2px}
.tut-ov{position:fixed; inset:0; z-index:50; background:#000; display:flex; align-items:center; justify-content:center; padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)}
.tut-ov video{width:100%; height:100%; max-width:480px; object-fit:contain; background:#000}
.tut-close{position:absolute; top:calc(12px + env(safe-area-inset-top,0px)); left:12px; z-index:2; width:44px; height:44px; border-radius:50%; border:0; background:rgba(255,255,255,.16); color:#fff; font-size:22px; display:flex; align-items:center; justify-content:center; cursor:pointer}
.tut-close svg{stroke:#fff}
.pr2{align-items:flex-start; gap:12px; padding:13px 14px}
.pr2 .av{width:44px; height:44px; font-size:18px; font-weight:700}
.av.ini{font-weight:700; font-size:18px; line-height:1}
.av.emo{font-size:24px; line-height:1}
.av.sm{width:34px; height:34px; font-size:15px} .av.emo.sm{font-size:19px}
.av.xs{width:26px; height:26px; font-size:12px} .av.emo.xs{font-size:15px}
.av.lg{width:64px; height:64px; font-size:26px} .av.emo.lg{font-size:36px}
.av.md{width:52px; height:52px; font-size:21px} .av.emo.md{font-size:29px}
.name-row{display:flex; align-items:center; gap:12px}
.avset{position:relative; flex:none; width:52px; height:52px; cursor:pointer}
.avset .av{pointer-events:none}
.avin{position:absolute; inset:0; width:100%; height:100%; opacity:0; font-size:16px; border:0; padding:0; margin:0; border-radius:50%; caret-color:transparent; color:transparent; background:transparent; cursor:pointer; z-index:1}
.avbadge{position:absolute; bottom:-2px; inset-inline-start:-2px; width:22px; height:22px; border-radius:50%; background:var(--gold); color:var(--on-gold); display:flex; align-items:center; justify-content:center; border:2px solid var(--bg); pointer-events:none; z-index:2}
.avbadge svg{width:13px; height:13px; stroke:currentColor; stroke-width:3}
.avclr{display:none; position:absolute; top:-4px; inset-inline-start:-4px; width:22px; height:22px; border-radius:50%; background:var(--surface); color:var(--muted); border:1px solid var(--line); padding:0; align-items:center; justify-content:center; cursor:pointer; z-index:3}
.avclr svg{width:12px; height:12px}
.avset.has .avclr{display:flex}
.avset:focus-within .av{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--gold)}
.pr2 .pn{flex:1; min-width:0; display:flex; flex-direction:column; gap:6px}
.pr2 .pnl{display:flex; align-items:baseline; gap:8px; min-width:0}
.pr2 .pnl b{font-size:15px; font-weight:700; color:var(--ink); line-height:1.45; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0}
.pr2 .pnl small{font-size:12.5px; color:var(--muted); font-weight:400; flex:none}
.pr2 .pbs{display:grid; grid-template-columns:auto auto auto; justify-content:end; align-items:center; column-gap:7px; row-gap:4px}
.pr2 .pbs .pbl{display:contents}
.pr2 .pbs .pbl .u{justify-self:start}
.pbl{display:flex; align-items:center; gap:7px; line-height:1.3; white-space:nowrap}
.pbl .num{font-size:14px; font-weight:600}
.pbl .u{font-size:12.5px; color:var(--muted)}
.pbl.deb .num{color:var(--deb)} .pbl.cred .num{color:var(--cred)}
.pz{font-size:12.5px; color:var(--muted); align-self:flex-start}
.ph-t{display:flex; align-items:center; gap:10px; min-width:0; font-size:19px; font-weight:800; line-height:1.4}
.ph-t>.av{flex:none}
.ph-t>span:last-child{min-width:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere}
.dd-p{display:inline-flex; align-items:center; gap:10px; min-width:0}
/* پیشنهاد b: دو ستون، مانده‌ها سمت چپ */
.vb{align-items:center}
.vb .pn{flex:1; min-width:0; display:flex; flex-direction:column; gap:2px}
.vb .pn b{font-size:15px; font-weight:700}
.vb .pn small{font-size:12.5px; color:var(--muted)}
.vb-bs{display:flex; flex-direction:column; align-items:flex-end; gap:3px; flex:none}
.vb-l{display:flex; align-items:center; gap:6px; white-space:nowrap; flex-direction:row-reverse}
.vb-l .num{font-size:14px; font-weight:700}
.vb-l small{font-size:12px; color:var(--muted)}
.vb-l.deb .num{color:var(--deb)} .vb-l.cred .num{color:var(--cred)}
.vb-w{display:none}
/* پیشنهاد c: خانه‌های کوچک کنار هم */
.vc .pn{gap:8px}
.vc-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(0,1fr)); gap:6px}
.vc-c{background:var(--sunk); border-radius:10px; padding:7px 9px; display:flex; flex-direction:column; gap:1px; min-width:0}
.vc-h{display:flex; align-items:center; gap:5px; font-size:11.5px; color:var(--muted)}
.vc-h .aic{width:16px; height:16px} .vc-h .aic svg{width:11px; height:11px}
.vc-c .num{font-size:13.5px; font-weight:700; overflow-wrap:anywhere; line-height:1.35}
.vc-c small{font-size:11px; color:var(--muted)}
.vc-c.deb .num{color:var(--deb)} .vc-c.cred .num{color:var(--cred)}
/* پیشنهاد d: برچسب‌های رنگی */
.vd-chips{display:flex; flex-wrap:wrap; gap:6px}
.vd-ch{display:inline-flex; align-items:center; gap:5px; border-radius:999px; padding:3px 9px 3px 4px; white-space:nowrap}
.vd-ch .aic{width:18px; height:18px; border-radius:50%} .vd-ch .aic svg{width:12px; height:12px}
.vd-ch .num{font-size:13px; font-weight:700}
.vd-ch small{font-size:11.5px; opacity:.8}
.vd-ch.deb{background:var(--deb-soft); color:var(--deb)} .vd-ch.cred{background:var(--cred-soft); color:var(--cred)}
.srow3{align-items:flex-start}
.srow3 .s3-main{flex:1; min-width:0; display:flex; flex-direction:column; gap:6px}
.s3-top{display:flex; align-items:baseline; justify-content:space-between; gap:10px; min-width:0}
.s3-top .s3-t{min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14.5px}
.s3-top .s3-d{flex:none; font-size:12px; color:var(--muted)}
.s3b{display:grid; grid-template-columns:auto auto auto; justify-content:end; align-items:center; column-gap:7px; row-gap:4px}
.s3b .pbl{display:contents}
.drbar{display:flex; align-items:center; gap:10px; padding:0 14px 12px}
.drbtn{display:inline-flex; align-items:center; gap:8px; height:38px; padding:0 14px; border-radius:999px; border:1px solid color-mix(in srgb,var(--ink) 22%,transparent); background:var(--surface); color:var(--ink); font:inherit; font-size:14px; font-weight:600; cursor:pointer}
.drbtn svg{color:var(--muted)}
.drbtn.on{border-color:var(--gold); background:var(--gold-soft); color:var(--gold-ink)}
.drbtn.on svg{color:var(--gold)}
.drbar .iconbtn.sm{width:32px; height:32px; margin-inline-start:auto}
.drlist{display:flex; flex-direction:column; gap:6px}
.drop{display:flex; justify-content:space-between; align-items:center; gap:8px; padding:12px 14px; border-radius:12px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font:inherit; font-size:15px; text-align:start; cursor:pointer}
.drop.on{border:2px solid var(--gold); background:var(--gold-soft); padding:11px 13px}
.drop small{font-size:12px}
.pp-top{margin-bottom:-4px}
.pp-hero{background:var(--surface); border-radius:20px; box-shadow:var(--edge); padding:16px}
.pp-id{display:flex; align-items:center; gap:14px}
.pp-id .av{flex:none}
.pp-nm{min-width:0; display:flex; flex-direction:column; gap:3px}
.pp-nm h1{font-size:19px; font-weight:800; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; text-wrap:initial}
.pp-sub{font-size:13px; color:var(--muted)}
.pp-bal{margin-top:14px; border-top:1px solid var(--line)}
.pp-row{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 0}
.pp-row + .pp-row{border-top:1px solid var(--line)}
.pp-l{font-size:14px; color:var(--muted); display:inline-flex; align-items:center; gap:8px}
.pp-v{display:inline-flex; align-items:baseline; gap:6px; white-space:nowrap}
.pp-v b{font-size:18px; font-weight:800}
.pp-v small{font-size:12.5px; color:var(--muted)}
.pp-row.deb .pp-v b{color:var(--deb)} .pp-row.cred .pp-v b{color:var(--cred)}
.pp-z{font-size:13px; color:var(--muted)}
.pp-ok{display:flex; align-items:center; gap:8px; padding-top:12px; font-size:14px; color:var(--ok)}
.st-hd{display:flex; justify-content:space-between; align-items:center; gap:8px; padding:2px 14px 12px}
.st-hd h2{margin:0}
.st-acts{display:flex; gap:6px}
.st-acts .btn-sm{height:34px; padding:0 12px; font-size:13.5px; gap:6px; width:auto}
.st-acts .btn-sm svg{width:16px; height:16px}
.drwrap{display:flex; align-items:center; gap:8px; padding:0 14px 12px}
.drfield{flex:1; min-width:0; display:flex; align-items:center; gap:10px; height:44px; padding:0 14px; border-radius:14px; border:1px solid var(--line); background:var(--bg); color:var(--ink); font:inherit; font-size:14px; cursor:pointer; text-align:start}
.drfield svg{color:var(--muted); flex:none}
.drfield .drl{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.drfield .drn{font-size:12.5px; color:var(--muted); flex:none}
.drfield.on{border-color:var(--gold); background:var(--gold-soft)}
.drfield.on svg:first-child{color:var(--gold)}
.drwrap .iconbtn.sm{width:44px; height:44px; flex:none}
.me-hero{position:relative}
.me-hero .me-edit{position:absolute; top:12px; inset-inline-end:12px; width:36px; height:36px}
.me-hero .pp-nm{gap:5px}
.me-hero:has(.me-edit) .pp-nm{padding-inline-end:40px}
.me-add{display:inline-flex; align-items:center; gap:6px; background:none; border:0; padding:0; font:inherit; font-size:17px; font-weight:800; color:var(--gold); cursor:pointer}
.me-add svg{width:18px; height:18px; stroke:currentColor}
.ubars{display:flex; flex-direction:column; gap:10px}
.ubar{display:flex; flex-direction:column; gap:6px}
.umeter{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.um{background:var(--sunk); border-radius:14px; padding:10px 12px; display:flex; flex-direction:column; gap:8px}
.um-t{display:flex; justify-content:space-between; align-items:baseline; font-size:13px; color:var(--muted)}
.um-t b{font-size:17px; color:var(--ink); font-weight:800}
.um-t b small{font-size:12px; color:var(--muted); font-weight:500}
.um-bar{height:5px; border-radius:3px; background:color-mix(in srgb,var(--ink) 10%,transparent); overflow:hidden}
.um-bar span{display:block; height:100%; border-radius:3px; background:var(--gold)}
.um.full .um-t b{color:var(--deb)} .um.full .um-bar span{background:var(--deb)}
.plist2{display:flex; flex-direction:column; gap:8px; margin-top:4px}
.pl2{display:flex; align-items:center; gap:12px; padding:14px; border-radius:16px; border:1px solid var(--line); background:var(--surface); color:var(--ink); font:inherit; text-align:start; cursor:pointer}
.pl2.on{border:2px solid var(--gold); background:var(--gold-soft); padding:13px}
.pl2-r{width:20px; height:20px; border-radius:50%; border:2px solid color-mix(in srgb,var(--ink) 25%,transparent); flex:none; position:relative}
.pl2.on .pl2-r{border-color:var(--gold)}
.pl2.on .pl2-r::after{content:""; position:absolute; inset:3px; border-radius:50%; background:var(--gold)}
.pl2-n{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; align-items:flex-start}
.pl2-n b{font-size:15px; font-weight:800}
.pl2-n small{font-size:12px; color:var(--muted)}
.pl2-b{font-size:12px; font-weight:500; color:var(--gold)}
.pl2-p{display:flex; flex-direction:column; align-items:flex-end; gap:1px; flex:none}
.pl2-p b{font-size:15px; font-weight:500; white-space:nowrap}
.pl2-p s{font-size:12px; color:var(--muted)}
.feat2{list-style:none; margin:2px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; font-size:13.5px}
.feat2 li{display:flex; align-items:center; gap:8px}
.feat2 svg{color:var(--ok); flex:none}
.vbn small{color:var(--muted); font-weight:400}
.progress{height:6px; background:var(--sunk); border-radius:3px; overflow:hidden}
.progress span{display:block; height:100%; background:var(--ok); border-radius:3px}
.done-mark{width:56px; height:56px; border-radius:20px; background:var(--ok-soft); display:flex; align-items:center; justify-content:center}
@media (prefers-reduced-motion: reduce){*{transition:none!important; animation:none!important}}
