:root{
  --bg:#080d18;
  --bg2:#0c1424;
  --panel:rgba(255,255,255,.045);
  --panelSolid:#101a2c;
  --border:rgba(255,255,255,.09);
  --borderSoft:rgba(255,255,255,.055);
  --text:#f2f6fb;
  --muted:#93a4bd;
  --dim:#6b7d95;
  --accent:#10b981;
  --accentSoft:rgba(16,185,129,.14);
  --blue:#3b82f6;
  --amber:#f59e0b;
  --red:#ef4444;
  --radius:18px;
  --radiusSm:12px;
  --shadow:0 18px 44px rgba(2,6,16,.5);
  --font:"Noto Sans Arabic",system-ui,Tahoma,sans-serif;
  --display:"Noto Naskh Arabic","Noto Sans Arabic",serif;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:var(--font);
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(16,185,129,.13), transparent 62%),
    radial-gradient(900px 560px at 6% 4%, rgba(59,130,246,.13), transparent 60%),
    linear-gradient(180deg,var(--bg),#060a12 62%);
  color:var(--text);
  min-height:100vh;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
.bgGlow{position:fixed;inset:auto 0 -20% 0;height:44vh;pointer-events:none;
  background:radial-gradient(600px 240px at 50% 100%, rgba(16,185,129,.10), transparent 70%);}
.wrap{max-width:1080px;margin:0 auto;padding:0 18px 34px;display:flex;flex-direction:column;gap:16px}

/* NAV */
.topbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 18px;margin-bottom:16px;
  background:rgba(8,13,24,.72);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--borderSoft);}
.brand{display:flex;align-items:center;gap:11px;min-width:0}
.logo{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;flex:0 0 auto;
  background:linear-gradient(145deg,rgba(16,185,129,.28),rgba(16,185,129,.06));
  border:1px solid rgba(16,185,129,.35);color:#7ff0c8}
.logo svg{width:22px;height:22px;stroke-width:1.8}
.brand h1{margin:0;font-family:var(--display);font-size:20px;font-weight:700;letter-spacing:.2px}
.brand p{margin:0;font-size:12px;color:var(--muted)}
.topActions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.pill{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;
  border:1px solid var(--border);background:rgba(255,255,255,.04);font-size:12.5px;color:var(--muted)}
.pill svg{width:14px;height:14px;stroke-width:1.8}
.pill.soft{background:var(--accentSoft);border-color:rgba(16,185,129,.32);color:#8ff2ce;font-weight:700}

/* BUTTONS */
.btn{font:inherit;font-size:14px;font-weight:600;border-radius:var(--radiusSm);padding:11px 16px;
  display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;
  border:1px solid transparent;transition:transform .18s ease,box-shadow .18s ease,background .18s ease,border-color .18s}
.btn svg{width:17px;height:17px;stroke-width:1.9}
.btn.primary{background:linear-gradient(150deg,#12c78a,#0a9c6c);color:#04231a;box-shadow:0 8px 22px rgba(16,185,129,.26)}
.btn.primary:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(16,185,129,.34)}
.btn.ghost{background:rgba(255,255,255,.045);border-color:var(--border);color:var(--text)}
.btn.ghost:hover{background:rgba(255,255,255,.085);transform:translateY(-2px);border-color:rgba(255,255,255,.18)}
.btn.sm{padding:8px 12px;font-size:13px}
.iconBtn{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;cursor:pointer;
  background:rgba(255,255,255,.05);border:1px solid var(--border);color:var(--text);transition:all .18s ease}
.iconBtn svg{width:18px;height:18px}
.iconBtn:hover{background:rgba(255,255,255,.1);transform:translateY(-1px)}
.iconBtn:disabled{opacity:.32;cursor:not-allowed;transform:none}
.linkBtn{font:inherit;font-size:12.5px;background:none;border:0;color:var(--muted);cursor:pointer;
  text-decoration:underline;text-underline-offset:3px;padding:2px}
.linkBtn:hover{color:#d8e4f2}
:focus-visible{outline:2px solid #34d399;outline-offset:2px}

/* PANELS */
.panel{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);
  padding:20px;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  box-shadow:var(--shadow);animation:fadeUp .5s ease both}
.panelHead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;flex-wrap:wrap}
.panelHead h2{margin:0;font-family:var(--display);font-size:18px;font-weight:700;display:flex;align-items:center;gap:8px}
.panelHead h2 svg{width:19px;height:19px;color:#63e6b8;stroke-width:1.8}
.muted{color:var(--muted)}
.small{font-size:12px}
.hidden{display:none!important}
label{display:block;font-size:12.5px;color:var(--muted);font-weight:600;line-height:1.5}
input{width:100%;margin-top:7px;padding:11px 13px;border-radius:var(--radiusSm);font:inherit;font-size:15px;
  background:rgba(255,255,255,.05);border:1px solid var(--border);color:var(--text);transition:all .18s ease}
input::placeholder{color:var(--dim)}
input:focus{outline:none;border-color:rgba(16,185,129,.55);background:rgba(16,185,129,.07);
  box-shadow:0 0 0 3px rgba(16,185,129,.12)}
.grid3{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.calcRow{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.calcChip{display:flex;flex-direction:column;gap:1px;padding:10px 14px;border-radius:var(--radiusSm);
  background:rgba(255,255,255,.04);border:1px solid var(--borderSoft);min-width:132px}
.calcChip span{font-size:11.5px;color:var(--dim)}
.calcChip b{font-size:16px;font-weight:700;color:#e9f4ff}
.calcChip.hi{background:var(--accentSoft);border-color:rgba(16,185,129,.32)}
.calcChip.hi b{color:#8ff2ce}

/* HERO */
.hero{position:relative;overflow:hidden;padding:22px;border-color:rgba(16,185,129,.22)}
.hero::after{content:"";position:absolute;inset:-40% -10% auto auto;width:340px;height:340px;border-radius:50%;
  background:radial-gradient(circle,rgba(16,185,129,.16),transparent 68%);pointer-events:none}
.heroTop{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;position:relative}
.kicker{font-size:12.5px;color:#7ff0c8;letter-spacing:.3px}
.heroTop h2{margin:4px 0 0;font-family:var(--display);font-size:19px;font-weight:600;color:#dfe9f5}
.weekNav{display:flex;gap:6px;flex:0 0 auto}
.heroBody{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:16px 0 14px;flex-wrap:wrap}
.bigNum{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.bigNum span{font-family:var(--display);font-size:clamp(38px,7vw,56px);font-weight:700;line-height:1;
  letter-spacing:-.5px;color:#fff;text-shadow:0 0 22px rgba(16,185,129,.28);transition:color .3s ease}
.bigNum small{font-size:13px;color:var(--muted)}
.stats{display:flex;gap:18px;flex-wrap:wrap}
.stats > div{display:flex;flex-direction:column;gap:2px}
.stats b{font-size:17px;font-weight:700;color:#e6f0fb}
.lbl{font-size:11.5px;color:var(--dim);font-weight:600}
.bar{height:10px;border-radius:999px;background:rgba(255,255,255,.075);overflow:hidden}
.barFill{height:100%;width:0%;border-radius:999px;transition:width .5s cubic-bezier(.4,0,.2,1),background .3s ease;
  background:linear-gradient(90deg,#12c78a,#34d399)}
.barFill.warn{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.barFill.over{background:linear-gradient(90deg,#ef4444,#f87171)}
.barMeta{display:flex;justify-content:space-between;gap:10px;margin-top:8px;font-size:12px;color:var(--dim)}
.alert{margin-top:14px;padding:12px 14px;border-radius:var(--radiusSm);font-size:13.5px;font-weight:600;
  display:flex;align-items:flex-start;gap:8px;line-height:1.6}
.alert svg{width:17px;height:17px;flex:0 0 auto;margin-top:2px}
.alert.warn{background:rgba(245,158,11,.13);border:1px solid rgba(245,158,11,.35);color:#fcd581}
.alert.over{background:rgba(239,68,68,.13);border:1px solid rgba(239,68,68,.38);color:#fca5a5}
.alert.ok{background:var(--accentSoft);border:1px solid rgba(16,185,129,.32);color:#8ff2ce}
.heroActions{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px;position:relative}

/* EXPENSE FORM */
.expForm{display:grid;grid-template-columns:150px 1fr;gap:10px;align-items:start}
.amountField{position:relative}
.amountField input{margin:0;font-size:20px;font-weight:700;text-align:center;padding-inline-end:36px;letter-spacing:.5px}
.amountField span{position:absolute;inset-inline-end:12px;top:50%;transform:translateY(-50%);
  font-size:12.5px;color:var(--dim);pointer-events:none}
.cats{display:flex;flex-wrap:wrap;gap:7px}
.cat{display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border-radius:999px;cursor:pointer;
  font:inherit;font-size:13px;font-weight:600;color:var(--muted);
  background:rgba(255,255,255,.04);border:1px solid var(--border);transition:all .18s ease}
.cat svg{width:15px;height:15px;stroke-width:1.8}
.cat:hover{border-color:rgba(255,255,255,.22);color:#e3edf8;transform:translateY(-1px)}
.cat.on{background:var(--accentSoft);border-color:rgba(16,185,129,.45);color:#8ff2ce}
.expForm > input#note{grid-column:1/-1;margin:0}
.expForm > button{grid-column:1/-1;justify-self:start;min-width:158px;padding-inline:26px}

.listHead{display:flex;align-items:center;justify-content:space-between;margin:18px 0 6px;
  padding-top:14px;border-top:1px solid var(--borderSoft)}
.expList{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px;max-height:310px;overflow-y:auto}
.expList li{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:var(--radiusSm);
  background:rgba(255,255,255,.032);border:1px solid var(--borderSoft);animation:slideIn .28s ease both}
.expIco{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;flex:0 0 auto;
  background:rgba(59,130,246,.14);color:#8ab7fb}
.expIco svg{width:15px;height:15px;stroke-width:1.9}
.expMain{flex:1;min-width:0}
.expMain b{display:block;font-size:13.5px;font-weight:600;color:#e8f1fa}
.expMain span{font-size:11px;color:var(--dim)}
.expAmt{font-size:14px;font-weight:700;color:#fff;white-space:nowrap}
.expDel{background:none;border:0;color:var(--dim);cursor:pointer;padding:4px;border-radius:7px;transition:all .18s}
.expDel svg{width:15px;height:15px}
.expDel:hover{color:#fca5a5;background:rgba(239,68,68,.12)}
.empty{text-align:center;padding:22px 10px;color:var(--dim);font-size:13.5px;border:1px dashed var(--border);
  border-radius:var(--radiusSm)}

/* WEEKS */
.weeks{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.wk{padding:13px 14px;border-radius:var(--radiusSm);background:rgba(255,255,255,.032);
  border:1px solid var(--borderSoft);cursor:pointer;transition:all .2s ease;text-align:start;font:inherit;color:inherit}
.wk:hover{border-color:rgba(255,255,255,.2);transform:translateY(-2px)}
.wk.on{border-color:rgba(16,185,129,.5);background:var(--accentSoft)}
.wkTop{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:4px}
.wkTop b{font-size:13px;font-weight:700;color:#e6f0fa}
.wkTop em{font-size:10.5px;font-style:normal;padding:2px 7px;border-radius:999px;
  background:rgba(255,255,255,.07);color:var(--muted)}
.wk.on .wkTop em{background:rgba(16,185,129,.22);color:#9df3d4}
.wkCash{font-size:18px;font-weight:700;color:#fff;font-family:var(--display)}
.wkSub{font-size:11px;color:var(--dim);margin-top:2px}
.wkBar{height:4px;border-radius:999px;background:rgba(255,255,255,.08);margin-top:8px;overflow:hidden}
.wkBar i{display:block;height:100%;border-radius:999px;background:#34d399;transition:width .4s ease}
.wkBar i.warn{background:#fbbf24}
.wkBar i.over{background:#f87171}

/* PLAN */
.planPanel{border-color:rgba(59,130,246,.2)}
.planList{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.planList li{display:flex;align-items:flex-start;gap:11px;padding:12px 14px;border-radius:var(--radiusSm);
  background:rgba(255,255,255,.032);border:1px solid var(--borderSoft);transition:all .2s ease}
.planList li.done{background:rgba(16,185,129,.09);border-color:rgba(16,185,129,.3)}
.planBox{width:22px;height:22px;border-radius:7px;flex:0 0 auto;margin-top:2px;cursor:pointer;
  border:1.5px solid rgba(255,255,255,.28);background:rgba(255,255,255,.04);display:grid;place-items:center;
  color:#04231a;transition:all .2s ease}
.planBox svg{width:14px;height:14px;stroke-width:3;opacity:0;transition:opacity .18s}
.planList li.done .planBox{background:#12c78a;border-color:#12c78a}
.planList li.done .planBox svg{opacity:1}
.planTxt{flex:1;min-width:0}
.planTxt b{display:block;font-size:13.5px;font-weight:600;color:#e8f1fa}
.planTxt span{font-size:12.5px;color:var(--muted)}
.planList li.done .planTxt b{color:#8ff2ce}
.nextWeek{margin-top:14px;padding:14px;border-radius:var(--radiusSm);display:flex;align-items:center;
  justify-content:space-between;gap:12px;flex-wrap:wrap;
  background:linear-gradient(140deg,rgba(59,130,246,.14),rgba(16,185,129,.09));
  border:1px solid rgba(59,130,246,.26)}
.nextWeek b{font-size:15px;color:#fff;display:block}
.nextWeek span{font-size:12px;color:var(--muted)}

/* FOOTER + TOAST */
.foot{max-width:1080px;margin:0 auto;padding:18px;display:flex;align-items:center;justify-content:space-between;
  gap:10px;flex-wrap:wrap;font-size:12px;color:var(--dim);border-top:1px solid var(--borderSoft)}
.toast{position:fixed;inset-inline-start:50%;bottom:26px;transform:translate(-50%,26px);z-index:60;
  padding:11px 18px;border-radius:999px;font-size:13.5px;font-weight:600;color:#04231a;
  background:linear-gradient(150deg,#12c78a,#0a9c6c);box-shadow:0 12px 30px rgba(16,185,129,.36);
  opacity:0;pointer-events:none;transition:all .3s cubic-bezier(.4,0,.2,1)}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.err{background:linear-gradient(150deg,#f87171,#dc2626);color:#fff;box-shadow:0 12px 30px rgba(239,68,68,.32)}

@keyframes fadeUp{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes slideIn{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:none}}

@media (max-width:640px){
  .topbar{padding:10px 14px}
  .brand p{display:none}
  .brand h1{font-size:17px}
  .wrap{padding:0 13px 26px}
  .panel{padding:16px;border-radius:16px}
  .expForm{grid-template-columns:1fr}
  .expForm > button{justify-self:stretch;min-width:0}
  .heroBody{gap:12px}
  .stats{gap:14px;justify-content:space-between;width:100%}
  .stats b{font-size:15px}
  .pill#todayPill{display:none}
  .heroActions .btn{flex:1}
}
@media (min-width:641px) and (max-width:860px){
  .expForm{grid-template-columns:130px 1fr}
}
@media (prefers-reduced-motion:reduce){
  *{animation:none!important;transition:none!important}
}

/* ---------- TABS (new) ---------- */
.tabs{display:flex;gap:6px;padding:5px;border-radius:14px;background:rgba(255,255,255,.035);
  border:1px solid var(--borderSoft);position:sticky;top:79px;z-index:25;
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.tab{flex:1;font:inherit;font-size:13.5px;font-weight:700;color:var(--muted);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:10px 8px;
  border-radius:10px;border:1px solid transparent;background:none;transition:all .2s ease}
.tab svg{width:16px;height:16px;stroke-width:1.9}
.tab:hover{color:#dce8f5}
.tab.on{background:var(--accentSoft);border-color:rgba(16,185,129,.4);color:#8ff2ce}
.viewStack{display:flex;flex-direction:column;gap:16px}

/* ---------- PERIODS ---------- */
.periods{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}
.period{font:inherit;font-size:12.5px;font-weight:600;padding:7px 13px;border-radius:999px;cursor:pointer;
  color:var(--muted);background:rgba(255,255,255,.04);border:1px solid var(--border);transition:all .18s}
.period:hover{color:#e3edf8;border-color:rgba(255,255,255,.2);transform:translateY(-1px)}
.period.on{background:rgba(59,130,246,.16);border-color:rgba(59,130,246,.45);color:#a9c8fd}

/* ---------- KPIs ---------- */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:9px}
.kpi{padding:12px 14px;border-radius:var(--radiusSm);background:rgba(255,255,255,.035);
  border:1px solid var(--borderSoft);display:flex;flex-direction:column;gap:3px}
.kpi span{font-size:11.5px;color:var(--dim);font-weight:600}
.kpi b{font-size:19px;font-weight:700;color:#eaf3fd;font-family:var(--display);line-height:1.25}
.kpi em{font-size:11px;font-style:normal;color:var(--muted)}
.kpi.hi{background:var(--accentSoft);border-color:rgba(16,185,129,.3)}
.kpi.hi b{color:#8ff2ce}
.kpi.bad{background:rgba(239,68,68,.11);border-color:rgba(239,68,68,.34)}
.kpi.bad b{color:#fca5a5}
.kpi.warn{background:rgba(245,158,11,.11);border-color:rgba(245,158,11,.32)}
.kpi.warn b{color:#fcd581}

/* ---------- INSIGHTS ---------- */
.insights{display:flex;flex-direction:column;gap:7px;margin-top:12px}
.insightLine{display:flex;align-items:flex-start;gap:8px;font-size:13px;color:#dbe7f4;
  padding:9px 12px;border-radius:10px;background:rgba(255,255,255,.03);border:1px solid var(--borderSoft)}
.insightLine svg{width:15px;height:15px;flex:0 0 auto;margin-top:3px;color:#63e6b8;stroke-width:1.9}
.insightLine b{color:#fff;font-weight:700}

/* ---------- CATEGORY BARS ---------- */
.catBars{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:11px}
.catBars li{display:grid;grid-template-columns:92px 1fr auto;align-items:center;gap:10px}
.catName{display:flex;align-items:center;gap:6px;font-size:12.5px;color:#dce8f5;font-weight:600}
.catName svg{width:14px;height:14px;stroke-width:1.9;color:#8ab7fb}
.catTrack{height:9px;border-radius:999px;background:rgba(255,255,255,.07);overflow:hidden}
.catTrack i{display:block;height:100%;border-radius:999px;transition:width .5s cubic-bezier(.4,0,.2,1)}
.catVal{font-size:12.5px;font-weight:700;color:#fff;white-space:nowrap;text-align:end}
.catVal small{display:block;font-size:10.5px;color:var(--dim);font-weight:500}

/* ---------- DAY BARS ---------- */
.dayScroll{overflow-x:auto;padding-bottom:4px}
.dayBars{display:flex;align-items:flex-end;gap:5px;height:132px;min-width:100%}
.dayCol{flex:1 0 18px;display:flex;flex-direction:column;align-items:center;gap:0;cursor:pointer;
  background:none;border:0;padding:0;font:inherit;height:100%;justify-content:flex-end;border-radius:6px;transition:background .18s}
.dayCol:hover{background:rgba(255,255,255,.05)}
.dayCol i{display:block;width:100%;max-width:22px;border-radius:5px 5px 3px 3px;
  background:linear-gradient(180deg,#34d399,#0e9c70);min-height:3px;transition:height .45s cubic-bezier(.4,0,.2,1),background .2s}
.dayCol.peak i{background:linear-gradient(180deg,#fbbf24,#d97706)}
.dayCol.on i{background:linear-gradient(180deg,#60a5fa,#2563eb)}
.dayCol.zero i{background:rgba(255,255,255,.1)}
.dayNum{font-size:9.5px;color:var(--dim);margin-top:5px;line-height:1}
.dayCol.on .dayNum{color:#a9c8fd;font-weight:700}
.dayLegend{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
  margin-top:10px;font-size:11.5px;color:var(--dim)}

/* ---------- FILTERS ---------- */
.filters{display:grid;grid-template-columns:1fr 168px;gap:9px;margin-bottom:10px}
.filters input{margin:0}
select{width:100%;margin-top:0;padding:11px 12px;border-radius:var(--radiusSm);font:inherit;font-size:14px;
  background:rgba(255,255,255,.05);border:1px solid var(--border);color:var(--text);cursor:pointer;
  appearance:none;-webkit-appearance:none}
select:focus{outline:none;border-color:rgba(16,185,129,.55);box-shadow:0 0 0 3px rgba(16,185,129,.12)}
select option{background:#101a2c;color:#f2f6fb}
.catFilters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.catFilters .cat{padding:6px 11px;font-size:12px}

/* ---------- LEDGER ---------- */
.ledger{display:flex;flex-direction:column;gap:6px;max-height:420px;overflow-y:auto}
.lrow{display:grid;grid-template-columns:64px 30px 1fr auto 30px;align-items:center;gap:9px;
  padding:9px 11px;border-radius:10px;background:rgba(255,255,255,.03);border:1px solid var(--borderSoft);
  animation:slideIn .24s ease both}
.lrow:hover{background:rgba(255,255,255,.055)}
.ldate{font-size:10.5px;color:var(--dim);text-align:center;line-height:1.35}
.ldate b{display:block;font-size:12.5px;color:#cfdceb;font-weight:700}
.lmain{min-width:0}
.lmain b{display:block;font-size:13px;font-weight:600;color:#e8f1fa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lmain span{font-size:10.5px;color:var(--dim)}
.lamt{font-size:13.5px;font-weight:700;color:#fff;white-space:nowrap}
.trackActions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}

/* ---------- BACKDATE FORM ---------- */
.backForm{display:grid;grid-template-columns:130px 150px 150px 1fr auto;gap:9px;align-items:center}
.backForm input,.backForm select{margin:0}
.backForm .amountField input{font-size:17px}
.backForm > button{justify-self:start;padding-inline:20px}
.hint{margin:12px 0 0;font-size:11.5px;color:var(--dim);line-height:1.7}
.hint b{color:#8ff2ce}

@media (max-width:760px){
  .filters{grid-template-columns:1fr}
  .backForm{grid-template-columns:1fr 1fr}
  .backForm > input#bNote,.backForm > button{grid-column:1/-1}
  .backForm > button{justify-self:stretch}
  .lrow{grid-template-columns:52px 26px 1fr auto 26px;gap:7px;padding:8px 9px}
  .ldate b{font-size:11.5px}
  .catBars li{grid-template-columns:78px 1fr auto;gap:7px}
}
@media (max-width:640px){
  .tabs{top:62px}
  .tab{font-size:12px;padding:9px 6px}
  .tab svg{width:14px;height:14px}
  .kpis{grid-template-columns:1fr 1fr;gap:8px}
  .kpi b{font-size:16px}
  .periods .period{font-size:11.5px;padding:6px 11px}
}

/* ---------- MODAL (new) ---------- */
.modal{position:fixed;inset:0;z-index:70;display:grid;place-items:center;padding:20px;
  background:rgba(4,8,16,.72);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);animation:fadeUp .2s ease both}
.modalCard{width:100%;max-width:360px;padding:20px;border-radius:16px;text-align:center;
  background:linear-gradient(160deg,#13203a,#0d1729);border:1px solid rgba(255,255,255,.14);
  box-shadow:0 24px 60px rgba(0,0,0,.55)}
.modalCard h3{margin:0 0 16px;font-size:14.5px;font-weight:600;color:#eaf3fd;line-height:1.7}
.modalActions{display:flex;gap:9px;justify-content:center}
.btn.danger{background:linear-gradient(150deg,#f87171,#dc2626);color:#fff;box-shadow:0 8px 20px rgba(239,68,68,.28)}
.btn.danger:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(239,68,68,.36)}

/* ---------- PRICE TAB (new) ---------- */
.tabBadge{min-width:17px;height:17px;padding:0 5px;border-radius:999px;display:inline-grid;place-items:center;
  font-size:10.5px;font-weight:800;background:var(--red);color:#fff;line-height:1}
.bannerPanel{border-color:rgba(245,158,11,.4);background:linear-gradient(150deg,rgba(245,158,11,.14),rgba(245,158,11,.04))}
.bannerInner{display:flex;align-items:center;gap:12px}
.bannerIco{width:38px;height:38px;flex:0 0 auto;border-radius:11px;display:grid;place-items:center;
  background:rgba(245,158,11,.18);border:1px solid rgba(245,158,11,.4);color:#fcd581}
.bannerIco svg{width:19px;height:19px}
.bannerTxt{flex:1;min-width:0}
.bannerTxt b{font-size:14px;color:#fff}
.bannerTxt p{margin:1px 0 0;font-size:12.5px;color:#f6dfb4;line-height:1.6}
.filters3{display:grid;grid-template-columns:1fr 150px 168px;gap:9px;margin-bottom:10px}
.filters3 input,.filters3 select{margin:0}
.sortSel{max-width:172px;margin:0}
.catFilters .cat.on{background:rgba(239,68,68,.14);border-color:rgba(239,68,68,.42);color:#fca5a5}
.shopAddRow{display:grid;grid-template-columns:1fr auto;gap:9px;align-items:center;margin-bottom:12px}
.shopAddRow input{margin:0}
.shopChips{display:flex;flex-wrap:wrap;gap:7px}
.shopChip{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:999px;
  background:rgba(255,255,255,.045);border:1px solid var(--border);font-size:12.5px;font-weight:600;color:#e4eefa}
.shopChip em{font-style:normal;font-size:10.5px;color:var(--dim);font-weight:500}
.chipDel{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;cursor:pointer;
  background:rgba(255,255,255,.07);border:0;color:var(--muted);padding:0}
.chipDel:hover{background:rgba(239,68,68,.25);color:#fecaca}
.chipDel svg{width:12px;height:12px}

/* alerts list */
.riseList{display:flex;flex-direction:column;gap:7px;margin-top:12px;max-height:330px;overflow-y:auto}
.riseCard{display:grid;grid-template-columns:30px 1fr auto auto;align-items:center;gap:9px;
  padding:10px 12px;border-radius:11px;background:rgba(255,255,255,.03);border:1px solid var(--borderSoft)}
.riseCard.up{background:rgba(239,68,68,.10);border-color:rgba(239,68,68,.3)}
.riseCard.watch{background:rgba(245,158,11,.09);border-color:rgba(245,158,11,.28)}
.riseCard.down{background:rgba(16,185,129,.09);border-color:rgba(16,185,129,.28)}
.riseIco{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;
  background:rgba(255,255,255,.06);color:#cfe0f2}
.riseIco svg{width:15px;height:15px}
.riseCard.up .riseIco{background:rgba(239,68,68,.2);color:#fca5a5}
.riseCard.watch .riseIco{background:rgba(245,158,11,.2);color:#fcd581}
.riseCard.down .riseIco{background:rgba(16,185,129,.2);color:#8ff2ce}
.riseMain{min-width:0}
.riseMain b{display:block;font-size:13.5px;font-weight:700;color:#eaf3fd}
.riseMain span{font-size:11px;color:var(--dim)}
.riseNums{text-align:end;line-height:1.35}
.riseNums b{display:block;font-size:12.5px;color:#dce8f5;white-space:nowrap}
.riseNums span{font-size:10px;color:var(--dim)}
.chg{font-size:12px;font-weight:800;padding:3px 8px;border-radius:8px;white-space:nowrap;text-align:center}
.chg.up{background:rgba(239,68,68,.2);color:#fca5a5}
.chg.watch{background:rgba(245,158,11,.18);color:#fcd581}
.chg.down{background:rgba(16,185,129,.18);color:#8ff2ce}
.chg.flat{background:rgba(255,255,255,.07);color:var(--muted);font-weight:600}

/* price form */
.priceForm{display:grid;grid-template-columns:repeat(auto-fit,minmax(148px,1fr));gap:10px}
.priceForm label{margin:0}
.priceFormFoot{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.checkLine{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:#dbe7f4;cursor:pointer;font-weight:500}
.checkLine input{width:17px;height:17px;margin:0;accent-color:#10b981;cursor:pointer}

/* purchase lines inside expense form */
.linesWrap{margin-top:12px;border:1px dashed var(--border);border-radius:12px;padding:10px 12px}
.linesToggle{display:flex;align-items:center;gap:8px;width:100%;background:none;border:0;padding:0;
  font:inherit;font-size:13px;font-weight:700;color:#bfe9d8;cursor:pointer;text-align:start;flex-wrap:wrap}
.linesToggle svg{width:16px;height:16px;stroke-width:1.9;flex:0 0 auto}
.linesToggle em{font-style:normal;font-size:11px;font-weight:500;color:var(--dim)}
.linesToggle.open{color:#8ff2ce}
.linesBody{margin-top:11px}
.lineHead{display:grid;grid-template-columns:1fr 84px 92px 108px 30px;gap:7px;
  font-size:10.5px;color:var(--dim);padding:0 2px 6px}
.lineRow{display:grid;grid-template-columns:1fr 84px 92px 108px 30px;gap:7px;align-items:center;margin-bottom:7px}
.lineRow input,.lineRow select{margin:0;padding:9px 10px;font-size:13px}
.lineEmpty{font-size:12px;color:var(--dim);padding:6px 2px 10px;line-height:1.7}
.linesFoot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:4px;flex-wrap:wrap}
.linesTotal{font-size:12.5px;font-weight:700;color:#8ff2ce}
.shopPick{display:block;margin-top:10px}

/* price table */
.priceTable{display:flex;flex-direction:column;gap:6px;max-height:460px;overflow-y:auto}
.prowWrap{border-radius:11px;background:rgba(255,255,255,.03);border:1px solid var(--borderSoft);overflow:hidden}
.prowWrap.open{border-color:rgba(16,185,129,.35);background:rgba(16,185,129,.05)}
.prow{display:grid;grid-template-columns:30px 1fr 92px 60px 62px;align-items:center;gap:9px;width:100%;
  padding:9px 11px;background:none;border:0;font:inherit;text-align:start;cursor:pointer;color:inherit;transition:background .16s}
.prow:hover{background:rgba(255,255,255,.045)}
.pIco{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;
  background:rgba(255,255,255,.06);color:#9fc4ea}
.pIco svg{width:15px;height:15px;stroke-width:1.9}
.pMain{min-width:0}
.pMain b{display:block;font-size:13px;font-weight:600;color:#e8f1fa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pMain span.pMeta{display:flex;align-items:center;gap:5px;font-size:10.5px;color:var(--dim);min-width:0;margin-top:1px}
.pMetaTxt{font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.pPrice{text-align:end;line-height:1.3}
.pPrice b{display:block;font-size:13px;font-weight:700;color:#fff}
.pPrice span{font-size:10px;color:var(--dim)}
.pSpark{display:grid;place-items:center}
.sparkEmpty{font-size:11px;color:var(--dim)}
.pHist{padding:4px 11px 11px;border-top:1px solid var(--borderSoft);margin-top:2px}
.hHead{font-size:10.5px;color:var(--dim);padding:7px 2px 5px}
.hrow{display:grid;grid-template-columns:1fr 66px 74px 70px 24px;align-items:center;gap:8px;
  font-size:11.5px;color:#cfdceb;padding:5px 2px;border-bottom:1px dashed rgba(255,255,255,.05)}
.hrow:last-child{border-bottom:0}
.hrow .hDel{width:24px;height:24px}
.reportBox{width:100%;resize:vertical;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11.5px;
  line-height:1.75;direction:rtl;text-align:start;padding:12px;border-radius:12px;
  background:rgba(0,0,0,.28);border:1px solid var(--border);color:#d7e6f5;white-space:pre-wrap}
@media (max-width:760px){
  .filters3{grid-template-columns:1fr 1fr}
  .filters3 input{grid-column:1/-1}
  .priceForm{grid-template-columns:1fr 1fr}
  .priceFormFoot{flex-direction:column;align-items:stretch}
  .priceFormFoot .btn{width:100%}
  .lineHead{display:none}
  .lineRow{grid-template-columns:1fr 68px;gap:6px;padding:9px;border:1px solid var(--borderSoft);border-radius:10px;margin-bottom:8px}
  .lineRow .lName{grid-column:1/-1}
  .lineRow .lDel{grid-column:2;justify-self:end}
  .prow{grid-template-columns:26px 1fr auto 52px;gap:7px;padding:8px 9px}
  .pSpark{display:none}
  .pPrice{min-width:64px}
  .bannerInner{flex-wrap:wrap}
  .bannerTxt{flex:1 0 100%;order:3}
}
@media (max-width:420px){
  .priceForm{grid-template-columns:1fr}
  .riseCard{grid-template-columns:26px 1fr auto;row-gap:4px}
  .riseNums{grid-column:2;text-align:start}
  .chg{grid-row:1;grid-column:3}
}

@media (max-width:430px){
  .tabs{overflow-x:auto;scrollbar-width:none}
  .tabs::-webkit-scrollbar{display:none}
  .tab{flex:0 0 auto;padding:9px 10px;font-size:11.5px;gap:5px}
  .hHead{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
}

/* ---------- سقف التسوق ---------- */
.shopPanel{border-color:rgba(34,211,238,.22);background:linear-gradient(160deg,rgba(34,211,238,.07),rgba(255,255,255,.035) 55%)}
.shopPanel .panelHead h2 svg{color:#67e8f9}
.shopTop{display:grid;grid-template-columns:1.15fr 1fr;gap:14px;align-items:center}
.shopBig{display:flex;flex-direction:column;gap:2px}
.shopBig .lbl{font-size:12px;color:var(--muted);font-weight:600}
.shopBig b{font-family:var(--display);font-size:clamp(26px,5vw,34px);line-height:1.15;color:#e8fbff}
.shopBig b.cut{color:#fca5a5}
.shopBig em{font-style:normal;font-size:12px;color:var(--dim)}
.shopNums{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.shopNums>div{padding:9px 11px;border-radius:11px;background:rgba(255,255,255,.04);border:1px solid var(--borderSoft)}
.shopNums span{display:block;font-size:11px;color:var(--dim);font-weight:600}
.shopNums b{font-size:15px;font-family:var(--display);color:#eaf3fd;white-space:nowrap}
.shopPanel .bar{margin-top:14px}
.shopSplit{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.shopSplit .spItem{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:999px;
  background:rgba(255,255,255,.04);border:1px solid var(--borderSoft);font-size:12.5px;color:#dbe7f4;font-weight:600}
.shopSplit .spItem svg{width:14px;height:14px;stroke-width:1.9}
.shopSplit .spItem b{color:#fff}
.cardStrip{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--borderSoft)}
.cardChip{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:12px;
  background:rgba(255,255,255,.035);border:1px solid var(--borderSoft);font-size:12.5px;color:var(--muted)}
.cardChip svg{width:15px;height:15px;stroke-width:1.8;color:#93c5fd}
.cardChip b{color:#fff;font-weight:700;font-size:12.5px}
.cardChip .ccRem{color:#8ff2ce;font-weight:700}
.cardChip.bad{border-color:rgba(239,68,68,.4);background:rgba(239,68,68,.1)}
.cardChip.bad .ccRem{color:#fca5a5}
.cardChip.warn{border-color:rgba(245,158,11,.38);background:rgba(245,158,11,.1)}
.cardChip.warn .ccRem{color:#fcd581}

/* الدفع من */
.payRow{grid-column:1/-1;display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:9px 12px;border-radius:var(--radiusSm);background:rgba(59,130,246,.07);border:1px solid rgba(59,130,246,.22)}
.payLbl{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:700;color:#a9c8fb}
.payLbl svg{width:15px;height:15px;stroke-width:1.9}
.payRow select{margin:0;flex:1;min-width:160px;padding:8px 11px;font-size:13.5px;border-radius:10px}

/* ---------- تبويب التسوق والبطاقات ---------- */
.ceilRow{display:grid;grid-template-columns:180px 1fr auto;gap:12px;align-items:end}
.ceilRow input{margin-top:6px}
.ceilInfo{display:flex;flex-direction:column;gap:1px;padding:8px 12px;border-radius:11px;
  background:rgba(255,255,255,.035);border:1px solid var(--borderSoft)}
.ceilInfo .lbl{font-size:11px;color:var(--dim);font-weight:600}
.ceilInfo b{font-size:14px;color:#eaf3fd}
.ceilInfo em{font-style:normal;font-size:11.5px;color:var(--muted)}
.splitGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:9px;margin-top:14px}
.splitCard{padding:12px 14px;border-radius:var(--radiusSm);background:rgba(255,255,255,.035);
  border:1px solid var(--borderSoft);display:flex;flex-direction:column;gap:4px}
.splitCard .scHead{display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:700;color:#dbe7f4}
.splitCard .scHead svg{width:15px;height:15px;stroke-width:1.9}
.splitCard b{font-family:var(--display);font-size:20px;color:#fff}
.splitCard .scBar{height:6px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden;margin-top:3px}
.splitCard .scBar i{display:block;height:100%;border-radius:999px}
.splitCard em{font-style:normal;font-size:11px;color:var(--muted)}

.cardForm{display:grid;grid-template-columns:1fr 150px auto auto;gap:9px;align-items:center}
.cardForm input[type=text],.cardForm input[type=number]{margin:0}
.cardForm .checkLine{white-space:nowrap;font-size:12.5px}
.cardTable{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.cardRow{display:grid;grid-template-columns:1.4fr 96px 96px 1fr auto;gap:10px;align-items:center;
  padding:11px 13px;border-radius:var(--radiusSm);background:rgba(255,255,255,.032);
  border:1px solid var(--borderSoft)}
.cardRow .crName{display:flex;align-items:center;gap:8px;font-size:13.5px;font-weight:700;color:#eaf3fd;min-width:0}
.cardRow .crName svg{width:16px;height:16px;stroke-width:1.9;color:#93c5fd;flex:0 0 auto}
.cardRow .crName span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cardRow .crName .salaryTag{font-size:10.5px;font-weight:700;color:#8ff2ce;background:var(--accentSoft);
  border:1px solid rgba(16,185,129,.32);border-radius:999px;padding:1px 7px;flex:0 0 auto}
.cardRow .crNum{font-size:13px;color:#dbe7f4;font-weight:600;text-align:center}
.cardRow .crNum span{display:block;font-size:10px;color:var(--dim);font-weight:600}
.cardRow .crBar{height:7px;border-radius:999px;background:rgba(255,255,255,.08);overflow:hidden}
.cardRow .crBar i{display:block;height:100%;border-radius:999px}
.cardRow .crDel{background:none;border:0;color:var(--dim);cursor:pointer;padding:4px;border-radius:8px}
.cardRow .crDel:hover{color:#fca5a5;background:rgba(239,68,68,.12)}
.swList{max-height:360px}
.swTag{font-size:10.5px;font-weight:700;border-radius:999px;padding:2px 8px;border:1px solid var(--border);
  background:rgba(255,255,255,.05);color:var(--muted);white-space:nowrap}
@media (max-width:720px){
  .shopTop{grid-template-columns:1fr}
  .ceilRow{grid-template-columns:1fr 1fr;align-items:stretch}
  .ceilRow .btn{grid-column:1/-1}
  .cardForm{grid-template-columns:1fr 1fr}
  .cardForm .btn{grid-column:1/-1}
  .cardRow{grid-template-columns:1fr auto;row-gap:8px}
  .cardRow .crNum{text-align:right}
  .cardRow .crBar{grid-column:1/2}
}

.cardRow .crNum.lim{cursor:pointer;border-radius:9px;transition:background .15s ease}
.cardRow .crNum.lim:hover{background:rgba(59,130,246,.14)}
.limEdit{margin:0!important;padding:5px 8px!important;font-size:12.5px!important;width:88px;border-radius:9px!important}
.pCard{display:inline-flex;flex:0 0 auto;align-items:center;gap:3px;font-style:normal;font-size:9.5px;font-weight:700;
  color:#bfe0ff;background:rgba(96,165,250,.12);border:1px solid rgba(96,165,250,.28);
  border-radius:6px;padding:0 5px;margin:0;white-space:nowrap;vertical-align:1px}
.pCard svg{width:10px;height:10px;stroke-width:2}
.pCard.cash{color:#c9d6e4;background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12)}
.pCard.cash svg{color:#9fb3c8}
.hrow .pCard{margin:0}
