/* =====================================================================
   AvaPay — طراحی جدید (مطابق ماک‌آپ):
     ۱) نوار تب‌های داشبورد (تبادل ارزی | قیمت ارز | تحلیل هوشمند | هشدارها)
     ۲) کارت «الان آگهی فعالی در بازار نیست» با کیف پول سه‌بعدی
     ۳) بنر «حسابداری شخصی و مدیریت مالی شخصی» با تقویم و سکه
   هر دو تم: روشن (سفید/یاسی) و تیره (بنفش تیره) — کنتراست متن‌ها ≥ 4.5:1
   این فایل آخر از همه لود می‌شود؛ انتخابگرها عمداً با #mainDashboard قوی شده‌اند.
   ===================================================================== */

#mainDashboard{
  --mx-p:#6D28D9; --mx-p2:#7C3AED; --mx-p3:#A78BFA;
  --mx-card:#FFFFFF; --mx-card2:#F3EEFF; --mx-line:rgba(109,40,217,.14);
  --mx-txt:#1A1033; --mx-mut:#4B4468;
  --mx-buy-bg:#E3F7EA; --mx-buy-bd:#B7E8C8; --mx-buy-tx:#15803D;
  --mx-sell-bg:#FDE7EC; --mx-sell-bd:#F8C2CE; --mx-sell-tx:#BE123C;
  --mx-ring:rgba(124,58,237,.16); --mx-sw:rgba(124,58,237,.55); --mx-sw2:rgba(167,139,250,.35);
  --mx-shadow:0 18px 40px -22px rgba(76,29,149,.45),0 2px 6px -2px rgba(76,29,149,.10);
}
html[data-theme="dark"] #mainDashboard{
  --mx-card:#1B1438; --mx-card2:#2A1C55; --mx-line:rgba(167,139,250,.22);
  --mx-txt:#FFFFFF; --mx-mut:#CFC8EE;
  --mx-buy-bg:rgba(34,197,94,.14); --mx-buy-bd:rgba(74,222,128,.38); --mx-buy-tx:#6EE7A0;
  --mx-sell-bg:rgba(244,63,94,.14); --mx-sell-bd:rgba(251,113,133,.40); --mx-sell-tx:#FDA4B4;
  --mx-ring:rgba(196,181,253,.20); --mx-sw:rgba(139,92,246,.55); --mx-sw2:rgba(167,139,250,.22);
  --mx-shadow:0 20px 44px -22px rgba(0,0,0,.75),inset 0 1px 0 rgba(255,255,255,.06);
}

/* ---------- ۱) نوار تب‌ها ---------- */
html[data-theme] #mainDashboard .avt-bar-wrap{border-radius:999px;background:var(--mx-card);border:1px solid var(--mx-line);
  box-shadow:var(--mx-shadow);-webkit-backdrop-filter:none;backdrop-filter:none}
html[data-theme="dark"] #mainDashboard .avt-bar-wrap{background:rgba(27,20,56,.92);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
html[data-theme] #mainDashboard .avt-bar{padding:6px;border-radius:999px;gap:0}
html[data-theme] #mainDashboard .avt-ink{top:6px;bottom:6px;border-radius:999px;
  background:linear-gradient(135deg,#8B5CF6,#5B21B6);box-shadow:0 10px 22px -8px rgba(91,33,182,.75),inset 0 1px 0 rgba(255,255,255,.3)}
html[data-theme] #mainDashboard .avt-tab{flex:1 0 auto;min-height:46px;padding:0 9px;gap:5px;border-radius:999px;font-weight:800;font-size:12px}
html[data-theme] #mainDashboard .avt-tab i{font-size:13.5px}
@media (max-width:374px){html[data-theme] #mainDashboard .avt-tab{padding:0 7px;font-size:11px;gap:4px}html[data-theme] #mainDashboard .avt-tab i{font-size:12px}}
@media (min-width:768px){html[data-theme] #mainDashboard .avt-tab{padding:0 18px;font-size:13.5px}}
html[data-theme="light"] #mainDashboard .avt-tab:not(.on){color:#3B3360}
html[data-theme="light"] #mainDashboard .avt-tab:not(.on) i{color:#5B21B6}
html[data-theme="dark"] #mainDashboard .avt-tab:not(.on){color:#DDD6FE}
html[data-theme] #mainDashboard .avt-tab.on,html[data-theme] #mainDashboard .avt-tab.on :is(i,span){color:#fff}
/* جداکننده‌ی باریک بین تب‌های غیرفعال */
#mainDashboard .avt-tab + .avt-tab::before{content:"";position:absolute;inset-inline-end:100%;top:50%;width:1px;height:22px;
  transform:translateY(-50%);background:var(--mx-line);transition:opacity .3s}
#mainDashboard .avt-tab.on::before,#mainDashboard .avt-tab.on + .avt-tab::before{opacity:0}

/* ---------- عنصر تزئینی مشترک: موج‌های بنفش ---------- */
#mainDashboard .avx-swoosh{position:absolute;pointer-events:none;z-index:0;border-radius:50%}
#mainDashboard .avx-swoosh-a{width:260px;height:150px;top:-70px;inset-inline-end:-90px;
  background:radial-gradient(closest-side,transparent 62%,var(--mx-sw) 64%,var(--mx-sw2) 80%,transparent 82%);transform:rotate(-18deg);opacity:.9}
#mainDashboard .avx-swoosh-b{width:230px;height:140px;bottom:-78px;inset-inline-start:-70px;
  background:radial-gradient(closest-side,transparent 60%,var(--mx-sw2) 63%,var(--mx-sw) 76%,transparent 79%);transform:rotate(-24deg);opacity:.85}
#mainDashboard .avx-swoosh-c{width:300px;height:170px;bottom:-96px;inset-inline-start:-40px;
  background:radial-gradient(closest-side,transparent 62%,var(--mx-sw2) 65%,transparent 85%);transform:rotate(-12deg);opacity:.9}

/* ---------- ۲) کارت خالیِ آگهی‌های فعال ---------- */
html[data-theme] #mainDashboard #avaActiveAdsCard.avx-is-empty{
  background:linear-gradient(160deg,var(--mx-card) 0%,var(--mx-card) 45%,var(--mx-card2) 100%) !important;
  border:1px solid var(--mx-line) !important;border-radius:28px !important;box-shadow:var(--mx-shadow) !important;
  padding:0 !important;overflow:hidden;isolation:isolate}
html[data-theme] #mainDashboard #avaActiveAdsCard.avx-is-empty::before,
html[data-theme] #mainDashboard #avaActiveAdsCard.avx-is-empty::after{display:none !important}
/* وقتی آگهی نیست، سرتیتر و دکمه‌ی + تکراری‌اند (همان کار را دکمه‌های پایین می‌کنند) */
#mainDashboard #avaActiveAdsCard.avx-is-empty > .ava-sec-head{display:none !important}
/* در ریل افقی ارتفاع کارت ثابت است ⇒ محتوا وسط‌چین و فشرده */
#mainDashboard #avaAdsGrid > #avaActiveAdsCard.avx-is-empty{height:auto !important;max-height:none !important;min-height:380px !important}

#mainDashboard .avx-empty{position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:6px;text-align:center;padding:18px 18px 22px !important;min-height:340px}
#mainDashboard .avx-empty > *{position:relative;z-index:1}
#mainDashboard .avx-empty > .avx-swoosh{position:absolute;z-index:0}
#mainDashboard .avx-wallet{width:min(220px,64%);aspect-ratio:220/170;margin:0 0 4px}
#mainDashboard .avx-wallet svg{width:100%;height:100%;display:block;overflow:visible;animation:avxFloat 5s ease-in-out infinite}
#mainDashboard .avx-ring{fill:none;stroke:var(--mx-ring);stroke-width:1.4}
@keyframes avxFloat{50%{transform:translateY(-5px)}}

html[data-theme] #mainDashboard .avx-empty b.avx-title{font-size:1.08rem;font-weight:900;line-height:1.6;color:var(--mx-txt) !important;margin:0}
html[data-theme] #mainDashboard .avx-empty span.avx-sub{font-size:.8rem;font-weight:500;line-height:1.9;color:var(--mx-mut) !important;max-width:290px}

html[data-theme] #mainDashboard .avx-acts{display:flex;gap:12px;margin-top:14px;width:100%;max-width:340px}
html[data-theme] #mainDashboard .avx-acts a{flex:1;height:50px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  font-size:.86rem;font-weight:900;text-decoration:none;transition:transform .15s ease,box-shadow .2s ease}
html[data-theme] #mainDashboard .avx-acts a i{font-size:.95rem}
html[data-theme] #mainDashboard .avx-acts a.buy{background:var(--mx-buy-bg) !important;border:1px solid var(--mx-buy-bd) !important;color:var(--mx-buy-tx) !important;
  box-shadow:0 8px 18px -12px rgba(22,163,74,.6),inset 0 1px 0 rgba(255,255,255,.55)}
html[data-theme] #mainDashboard .avx-acts a.sell{background:var(--mx-sell-bg) !important;border:1px solid var(--mx-sell-bd) !important;color:var(--mx-sell-tx) !important;
  box-shadow:0 8px 18px -12px rgba(225,29,72,.6),inset 0 1px 0 rgba(255,255,255,.55)}
html[data-theme="dark"] #mainDashboard .avx-acts a{box-shadow:none !important}
html[data-theme] #mainDashboard .avx-acts a :is(i,span){color:inherit !important}
#mainDashboard .avx-acts a:active{transform:scale(.97)}

/* ---------- ۳) بنر حسابداری شخصی ---------- */
html[data-theme] #mainDashboard .ava-pf-banner.avx-pf{
  display:flex;align-items:stretch;gap:10px;padding:20px 20px 20px 14px;border-radius:28px;margin:16px 0 8px;
  background:linear-gradient(115deg,var(--mx-card) 0%,var(--mx-card2) 100%);border:1px solid var(--mx-line);box-shadow:var(--mx-shadow);
  color:var(--mx-txt);isolation:isolate;overflow:hidden;position:relative;min-height:190px}
html[data-theme="light"] #mainDashboard .ava-pf-banner.avx-pf{background:linear-gradient(115deg,#FBF9FF 0%,#F1EAFF 55%,#E9DEFF 100%)}
html[data-theme="dark"] #mainDashboard .ava-pf-banner.avx-pf{background:linear-gradient(115deg,#1B1438 0%,#2A1C55 60%,#36206E 100%)}
#mainDashboard .ava-pf-banner.avx-pf::after{display:none}
#mainDashboard .ava-pf-banner.avx-pf > .pfb-txt{position:relative;z-index:1;flex:1 1 auto;min-width:0;gap:8px;justify-content:center}
html[data-theme] #mainDashboard .ava-pf-banner.avx-pf .pfb-tag{align-self:flex-start;display:inline-flex;align-items:center;gap:6px;
  background:linear-gradient(135deg,#7C3AED,#5B21B6) !important;color:#fff !important;border-radius:999px;padding:4px 12px;font-size:12px;font-weight:800;
  box-shadow:0 6px 14px -6px rgba(91,33,182,.7)}
html[data-theme] #mainDashboard .ava-pf-banner.avx-pf .pfb-tag i{color:#fff !important;font-size:11px}
html[data-theme] #mainDashboard .ava-pf-banner.avx-pf b{font-size:17px;font-weight:900;line-height:1.55;color:var(--mx-txt) !important}
html[data-theme] #mainDashboard .ava-pf-banner.avx-pf small{font-size:12.5px;line-height:1.9;font-weight:500;color:var(--mx-mut) !important}
html[data-theme] #mainDashboard .ava-pf-banner.avx-pf .pfb-go{align-self:flex-start;margin-top:6px;display:inline-flex;align-items:center;gap:8px;
  background:linear-gradient(135deg,#7C3AED,#5B21B6) !important;color:#fff !important;font-size:14px;font-weight:900;
  border-radius:999px;padding:11px 22px;box-shadow:0 10px 22px -8px rgba(91,33,182,.75),inset 0 1px 0 rgba(255,255,255,.25)}
html[data-theme] #mainDashboard .ava-pf-banner.avx-pf .pfb-go i{color:#fff !important}

#mainDashboard .avx-pf-art{position:relative;z-index:1;flex:0 0 42%;max-width:190px;width:auto;display:flex;align-items:flex-end;justify-content:center}
#mainDashboard .avx-pf-art svg{position:static;width:100%;height:auto;max-height:150px;overflow:visible}
html[data-theme] #mainDashboard .avx-pf-art .pfb-ic{position:absolute;top:0;left:0;width:48px;height:48px;border-radius:16px;display:grid;place-items:center;font-size:20px;
  background:#fff;color:#4C1D95;box-shadow:0 8px 18px -8px rgba(76,29,149,.5);z-index:2}
html[data-theme="dark"] #mainDashboard .avx-pf-art .pfb-ic{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.18);box-shadow:none}
html[data-theme] #mainDashboard .avx-pf-art .pfb-ic i{color:inherit !important}
#mainDashboard .avx-candles path,#mainDashboard .avx-candles rect{stroke:var(--mx-p3);fill:var(--mx-p3);stroke-width:1.6;opacity:.32}
#mainDashboard .avx-candles .avx-trend{fill:none;stroke:#fff;stroke-width:2;opacity:.7}
html[data-theme="light"] #mainDashboard .avx-candles .avx-trend{stroke:#C4B5FD;opacity:.9}
html[data-theme="dark"] #mainDashboard .avx-candles path,html[data-theme="dark"] #mainDashboard .avx-candles rect{opacity:.28}
#mainDashboard .ava-pf-banner.avx-pf:active{transform:scale(.985)}

@media (max-width:380px){
  html[data-theme] #mainDashboard .ava-pf-banner.avx-pf b{font-size:15.5px}
  html[data-theme] #mainDashboard .avx-acts a{font-size:.8rem;height:46px}
  #mainDashboard .avx-pf-art{flex-basis:38%}
}
@media (prefers-reduced-motion:reduce){#mainDashboard .avx-wallet svg{animation:none}}
/* وقتی همه‌ی تب‌ها جا می‌شوند، محوشدگی لبه‌ها لازم نیست */
html[data-theme] #mainDashboard .avt-bar{-webkit-mask-image:none;mask-image:none}
