@font-face {
  font-family: "Vazirmatn";
  src: url("vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #f4f5fb; --card: #fff; --ink: #1e1b3a; --muted: #6e6b86; --line: #e7e6f2;
  --primary: #4f46e5; --primary-2: #7c3aed; --primary-soft: #eeedfd;
  --good: #12a150; --mid: #e08a00; --low: #e5484d;
  --good-bg: #e7f7ee; --mid-bg: #fff4df; --low-bg: #fdecec;
  --shadow: 0 1px 2px rgba(30, 27, 58, .05), 0 6px 20px rgba(30, 27, 58, .06);
  --r: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Vazirmatn, Tahoma, sans-serif; line-height: 1.85; font-size: 15.5px; }
a { color: var(--primary); text-decoration: none; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 16px; padding-bottom: 40px; }
h1 { font-size: 1.4rem; margin: .2em 0; line-height: 1.5; }
h2 { font-size: 1.1rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); font-size: .9rem; margin: .3em 0; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

/* ---------- نوار بالا و منو ---------- */
.appbar { background: linear-gradient(120deg, var(--primary), var(--primary-2)); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 4px 18px rgba(79, 70, 229, .25); }
.appin { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; margin-inline-end: auto; }
.brand .logo { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.brand .logo .ic { width: 24px; height: 24px; }
.brand b { display: block; font-size: 1.05rem; line-height: 1.3; }
.brand small { display: block; font-size: .75rem; opacity: .85; line-height: 1.3; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--primary); display: grid; place-items: center; font-weight: 800; }
.nb { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.topnav { display: flex; gap: 6px; }
.topnav .nb { color: #fff; padding: 7px 14px; border-radius: 12px; background: rgba(255, 255, 255, .12); font-size: .92rem; transition: background .15s; }
.topnav .nb:hover { background: rgba(255, 255, 255, .22); }
.topnav .nb.on { background: #fff; color: var(--primary); font-weight: 700; }
.pill { background: var(--low); color: #fff; border-radius: 10px; padding: 0 7px; font-size: .72rem; line-height: 1.6; }
.tabbar { display: none; }

@media (max-width: 700px) {
  .topnav { display: none; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(30, 27, 58, .08); }
  .tabbar .nb { flex: 1; flex-direction: column; gap: 0; color: var(--muted); font-size: .72rem; padding: 4px 0; border-radius: 12px; }
  .tabbar .nb .ic { width: 24px; height: 24px; margin-bottom: 1px; }
  .tabbar .nb.on { color: var(--primary); background: var(--primary-soft); font-weight: 700; }
  .tabbar .pill { position: absolute; top: 0; left: calc(50% - 22px); }
  main.wrap { padding-bottom: 96px; }
}

/* ---------- اجزای عمومی ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: linear-gradient(120deg, var(--primary), var(--primary-2)); color: #fff; border: 0; border-radius: 12px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(79, 70, 229, .25); transition: transform .1s; }
.btn:active { transform: scale(.97); }
.btn.big { padding: 13px 24px; font-size: 1.02rem; width: 100%; margin-top: 12px; }
.btn.ghost { background: var(--card); color: var(--primary); border: 1.5px solid #d5d2f7; box-shadow: none; }
.btn.white { background: #fff; color: var(--primary); box-shadow: 0 4px 14px rgba(0, 0, 0, .12); white-space: nowrap; }
.btn.small { padding: 5px 12px; font-size: .82rem; border-radius: 10px; box-shadow: none; }
.btn.danger { background: var(--card); color: var(--low); border: 1.5px solid #f3c2c3; box-shadow: none; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-soft); color: var(--primary); border-radius: 20px; padding: 1px 12px; font-size: .8rem; font-weight: 500; }
.chip.on { background: var(--primary); color: #fff; }
.chip.day { background: #fff4df; color: #b26b00; }
.error { background: var(--low-bg); color: var(--low); border-radius: 12px; padding: 9px 14px; }
.okmsg { background: var(--good-bg); color: var(--good); border-radius: 12px; padding: 9px 14px; }
.sechead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 26px 0 10px; }
.sechead .ic { color: var(--primary); }

/* ---------- صفحهٔ اصلی ---------- */
.welcome { display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.welcome .wtext { flex: 1; min-width: 0; }
.hello { margin: 0; color: var(--primary); font-weight: 700; }
.welcome .sub { margin: 0; color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 6px; }
.ring { position: relative; width: 84px; height: 84px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .rbg { stroke: var(--primary-soft); }
.ring .rfg { stroke: var(--primary); stroke-linecap: round; }
.ring .rtxt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring .rtxt b { font-size: 1.35rem; }
.ring .rtxt small { font-size: .7rem; color: var(--muted); }

.today { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0; padding: 18px; border-radius: 20px; color: #fff;
  background: linear-gradient(120deg, #f59e0b, #f97316); box-shadow: 0 8px 22px rgba(249, 115, 22, .28); }
.today.rest { background: linear-gradient(120deg, #6366f1, #8b5cf6); box-shadow: 0 8px 22px rgba(99, 102, 241, .28); }
.today .ticon { width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.today .ticon .ic { width: 30px; height: 30px; }
.today .tbody { flex: 1; min-width: 170px; display: grid; line-height: 1.6; }
.today .tbody b { font-size: 1.02rem; }
.today .tbody small { opacity: .92; }
.today .btn.white { color: #c2410c; }
.today.rest .btn.white { color: var(--primary); }
.today form { margin: 0; }
@media (max-width: 520px) { .today .btn, .today form { width: 100%; } .today form .btn { width: 100%; } }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.tile b { display: block; font-size: 1.2rem; line-height: 1.3; }
.tile small { color: var(--muted); font-size: .76rem; display: block; line-height: 1.4; }
.ti { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ti .ic { width: 22px; height: 22px; }
.ti.green { background: var(--good-bg); color: var(--good); }
.ti.blue { background: var(--primary-soft); color: var(--primary); }
.ti.red { background: var(--low-bg); color: var(--low); }
.ti.gray { background: #f0f0f5; color: var(--muted); }
@media (max-width: 520px) {
  .tiles { gap: 8px; }
  .tile { flex-direction: column; text-align: center; padding: 10px 6px; gap: 4px; }
  .ti { width: 34px; height: 34px; }
}

.legend { font-size: .75rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-start: 6px; }
.lg.good { background: var(--good); } .lg.mid { background: var(--mid); } .lg.low { background: var(--low); }

.weeks { display: grid; gap: 10px; }
.week { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px 12px; box-shadow: var(--shadow); }
.week.current { border: 2px solid var(--primary); }
.week.future { opacity: .7; box-shadow: none; }
.whead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: .88rem; }
.whead small { color: var(--muted); background: #f3f3f8; border-radius: 10px; padding: 0 8px; }
.wdays { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border-radius: 12px; padding: 6px 2px; min-height: 74px; text-align: center; line-height: 1.35; background: #f6f6fb; color: var(--ink); border: 1.5px solid transparent; }
.day .wd { font-size: .68rem; color: var(--muted); }
.day b { font-size: 1.05rem; }
.day .sc { font-size: .7rem; font-weight: 600; }
.day .ic { width: 14px; height: 14px; color: #a9a7bd; }
.day.empty { visibility: hidden; }
.day.locked { background: #f6f6fb; color: #a9a7bd; }
.day.today { background: var(--primary); color: #fff; box-shadow: 0 6px 14px rgba(79, 70, 229, .35); }
.day.today .wd { color: #e0deff; }
.day.missed { background: #fff; border-color: #f3c2c3; }
.day.missed .sc { color: var(--low); }
.day.done.good { background: var(--good-bg); border-color: #b7e6cb; } .day.done.good .sc { color: var(--good); }
.day.done.mid { background: var(--mid-bg); border-color: #f7dca9; } .day.done.mid .sc { color: var(--mid); }
.day.done.low { background: var(--low-bg); border-color: #f3c2c3; } .day.done.low .sc { color: var(--low); }
a.day:hover { border-color: var(--primary); }
@media (max-width: 420px) { .wdays { gap: 4px; } .day { min-height: 66px; border-radius: 10px; } .day .sc { font-size: .62rem; } .day .wd { font-size: .62rem; } }

.tlist { padding: 6px 14px; }
.trow { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr 44px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.trow:last-child { border-bottom: 0; }
.trow small { color: var(--muted); font-size: .72rem; display: block; line-height: 1.3; }
.trow .tp { font-weight: 700; text-align: left; font-size: .9rem; }
.bar { display: block; height: 9px; background: #efeff6; border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; }
.bar i.good { background: var(--good); } .bar i.mid { background: var(--mid); } .bar i.low { background: var(--low); }

/* ---------- آزمون ---------- */
.timerbar { position: sticky; top: 62px; z-index: 10; display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 16px; font-weight: 700; box-shadow: var(--shadow); }
.timer { font-size: 1.3rem; direction: ltr; color: var(--primary); background: var(--primary-soft); border-radius: 10px; padding: 0 12px; }
.timer.warn { color: #fff; background: var(--low); }
.q .qhead { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.num { background: linear-gradient(120deg, var(--primary), var(--primary-2)); color: #fff; border-radius: 10px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; font-weight: 700; }
.clear { margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 2px 10px; font: inherit; font-size: .78rem; color: var(--muted); cursor: pointer; }
.qtext { font-size: 1.04rem; margin: 6px 0 12px; }
.m { display: inline-block; unicode-bidi: isolate; white-space: nowrap; }
.opts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 600px) { .opts { grid-template-columns: 1fr 1fr; } }
.opts label { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.opts label:hover { border-color: #c9c5f5; }
.opts label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.opts input { width: 18px; height: 18px; accent-color: var(--primary); }
.opts.review li { border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.opts.review li.correct { border-color: #9fdcb9; background: var(--good-bg); }
.opts.review li.chosen { border-color: #f3b3b5; background: var(--low-bg); }
.q.right { border-inline-start: 4px solid var(--good); }
.q.wrong { border-inline-start: 4px solid var(--low); }
.q.blank { border-inline-start: 4px solid #c7c6d6; }
.badge { margin-inline-start: auto; border-radius: 20px; padding: 0 12px; font-size: .8rem; font-weight: 600; }
.badge.right { background: var(--good-bg); color: var(--good); }
.badge.wrong { background: var(--low-bg); color: var(--low); }
.badge.blank { background: #f0f0f5; color: var(--muted); }
.sol { margin-top: 12px; background: #f7f7fc; border: 1px dashed #d9d7ef; border-radius: 12px; padding: 8px 14px; }
.sol h4 { margin: 2px 0; font-size: .92rem; color: var(--primary); }
.sol ol { margin: 0; padding-inline-start: 22px; }

/* ---------- نتیجه ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 14px 0; }
.stat { background: #f7f7fc; border-radius: 14px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 1.4rem; }
.stat span { color: var(--muted); font-size: .82rem; }
.stat.right b { color: var(--good); }
.stat.wrongs b { color: var(--low); }
.result { text-align: center; }
.result .score { font-size: 3rem; font-weight: 800; }
.result.good .score { color: var(--good); } .result.mid .score { color: var(--mid); } .result.low .score { color: var(--low); }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.intro ul { padding-inline-start: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.filters .chip { padding: 5px 14px; font-size: .85rem; }

/* ---------- ورود، ثبت‌نام و مدیر ---------- */
.auth { max-width: 460px; margin: 20px auto; }
.auth form { display: grid; gap: 12px; }
.auth label { display: grid; gap: 4px; font-size: .9rem; font-weight: 500; }
.auth input { font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfbfe; width: 100%; }
.auth input:focus { outline: 3px solid #e0defb; border-color: var(--primary); background: #fff; }
form.inline-act { display: inline; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
td.acts { margin: 0; }
.ureq { display: grid; gap: 2px; }
.tablewrap { overflow-x: auto; }
table.topics { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.topics th, .topics td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; font-size: .9rem; }
.topics th { background: #f5f4fc; font-weight: 600; }
.users td { vertical-align: top; }
.tl { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); }
h1 .ic { color: var(--primary); }
h2.sechead { justify-content: flex-start; }

/* فیش و پیامک */
.center { text-align: center; }
.bigicon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 8px; }
.bigicon .ic { width: 40px; height: 40px; }
.bigicon.good { background: var(--good-bg); color: var(--good); }
.paybox { background: linear-gradient(120deg, #eef0ff, #f5eeff); border: 1px solid #dcd8fb; border-radius: 14px; padding: 12px 14px; margin: 10px 0 14px; }
.payamount { display: flex; justify-content: space-between; align-items: center; }
.payamount b { font-size: 1.25rem; color: var(--primary); }
.payinfo { margin-top: 6px; padding-top: 8px; border-top: 1px dashed #cfcaf5; font-size: .92rem; }
.auth textarea { font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfbfe; width: 100%; resize: vertical; }
label.file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.file { position: relative; }
.filebox { display: flex; align-items: center; gap: 8px; border: 2px dashed #c9c5f5; border-radius: 12px; padding: 14px; color: var(--primary); background: #fafaff; cursor: pointer; font-size: .9rem; }
label.file.has .filebox { border-style: solid; border-color: var(--good); color: var(--good); background: var(--good-bg); }
label.file input:focus + .filebox { outline: 3px solid #e0defb; }
.mono { font-family: Vazirmatn, monospace; letter-spacing: .5px; }
.rq { display: flex; gap: 14px; flex-wrap: wrap; }
.rqinfo { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.rmob { text-align: right; font-weight: 700; }
.rqimg { flex: none; }
.rthumb img { width: 150px; max-height: 210px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }
.smscard { border-inline-start: 4px solid var(--mid); }
.smstext { white-space: pre-wrap; font-family: inherit; background: #f7f7fc; border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: .92rem; }

/* کارت پرداخت در صفحهٔ ثبت‌نام */
.paycard { position: relative; overflow: hidden; color: #fff; border-radius: 20px; padding: 18px 20px; margin: 20px 0 4px;
  background: linear-gradient(135deg, #312e81, #6d28d9 60%, #a21caf); box-shadow: 0 10px 26px rgba(76, 29, 149, .32); }
.paycard::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08); left: -70px; top: -90px; }
.pchead { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; opacity: .9; }
.pchead span { display: inline-flex; align-items: center; gap: 6px; }
.pbank { background: rgba(255, 255, 255, .16); border-radius: 20px; padding: 0 10px; }
.pcamount { font-size: 1.7rem; font-weight: 800; margin: 4px 0 10px; }
.pclabel { font-size: .78rem; opacity: .8; }
.pcnum { font-size: 1.45rem; font-weight: 700; letter-spacing: 2px; text-align: center; background: rgba(255, 255, 255, .12); border-radius: 12px; padding: 6px 8px; margin: 4px 0 10px; white-space: nowrap; }
.pcfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .92rem; }
.pccopy { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .82rem; color: #4c1d95; background: #fff; border: 0; border-radius: 10px; padding: 5px 12px; cursor: pointer; position: relative; z-index: 1; }
@media (max-width: 380px) { .pcnum { font-size: 1.2rem; letter-spacing: 1px; } }
.fprev { display: block; max-width: 100%; max-height: 260px; margin: 8px auto 0; border-radius: 12px; border: 1px solid var(--line); }
.fprev[hidden] { display: none; }
.field { display: grid; gap: 6px; }
.flabel { font-size: .9rem; font-weight: 500; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pickrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--primary); background: #fafaff; border: 2px dashed #c9c5f5; border-radius: 14px; padding: 14px 6px; cursor: pointer; }
.pick .ic { width: 28px; height: 28px; }
.pick:active { background: var(--primary-soft); }
.pickhint { font-size: .78rem; margin: 0; }
.picked { display: grid; gap: 6px; justify-items: center; background: var(--good-bg); border: 1.5px solid #9fdcb9; border-radius: 14px; padding: 10px; color: var(--good); font-weight: 600; font-size: .9rem; }
.picked[hidden] { display: none; }
.picked .fprev { margin: 0; }
.picked span { display: inline-flex; align-items: center; gap: 6px; }
.pickbox { position: relative; display: block; border: 2.5px dashed #c9c5f5; border-radius: 16px; background: #fafaff; padding: 22px 12px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.pickbox:active, .pickbox:hover { background: var(--primary-soft); border-color: var(--primary); }
.pickbox.has { border-style: solid; border-color: #9fdcb9; background: var(--good-bg); padding: 12px; }
.pbempty { display: grid; justify-items: center; gap: 2px; color: var(--primary); }
.pbempty .ic { width: 38px; height: 38px; margin-bottom: 4px; }
.pbempty b { font-size: 1.02rem; }
.pbempty small { color: var(--muted); }
.pbfull { display: grid; justify-items: center; gap: 6px; color: var(--good); font-weight: 600; }
.pbfull[hidden], .pbempty[hidden] { display: none; }
.pbfull small { display: inline-flex; align-items: center; gap: 6px; }
.pbfull .fprev { margin: 0; }

/* روز رایگان و پرداخت */
.freebadge { display: flex; gap: 10px; align-items: center; background: var(--good-bg); color: #0e7a3e; border: 1px solid #b7e6cb; border-radius: 14px; padding: 10px 12px; margin: 8px 0 12px; font-size: .92rem; line-height: 1.7; }
.freebadge .ic { width: 28px; height: 28px; flex: none; }
.credbox { display: grid; gap: 8px; background: #f7f7fc; border: 1.5px dashed #c9c5f5; border-radius: 14px; padding: 12px; margin: 10px 0; justify-items: center; }
.credbox div { display: grid; gap: 0; }
.credbox small { color: var(--muted); }
.credbox b { font-size: 1.2rem; }
.bigpass { font-size: 2rem !important; letter-spacing: 4px; color: var(--primary); }
.bigicon.wait { background: var(--mid-bg); color: var(--mid); }
.paybanner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0; padding: 14px 16px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #312e81, #7c3aed); box-shadow: 0 8px 22px rgba(76, 29, 149, .28); }
.paybanner.wait { background: linear-gradient(120deg, #b45309, #f59e0b); }
.paybanner .pbi { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex: none; }
.paybanner .pbi .ic { width: 24px; height: 24px; }
.paybanner .pbt { flex: 1; min-width: 180px; display: grid; line-height: 1.6; }
.paybanner .pbt small { opacity: .9; }
.paybanner .btn.white { color: #5b21b6; }
.day.paylock { background: #f3f0ff; color: #8b7fd6; border-color: #e2dcff; }
.day.paylock .ic { color: #8b7fd6; }
.badge.mid { background: var(--mid-bg); color: var(--mid); }

/* دکمه‌های آیکونی جدول کاربران */
td.iacts { white-space: nowrap; }
.iacts .inline-act { display: inline-block; }
.ibtn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; border: 1.5px solid #d5d2f7; background: var(--card); color: var(--primary); cursor: pointer; padding: 0; margin: 1px; }
.ibtn .ic { width: 18px; height: 18px; }
.ibtn:hover { background: var(--primary-soft); }
.ibtn.good { color: var(--good); border-color: #9fdcb9; }
.ibtn.good:hover { background: var(--good-bg); }
.ibtn.warn { color: var(--mid); border-color: #f7dca9; }
.ibtn.warn:hover { background: var(--mid-bg); }
.ibtn.danger { color: var(--low); border-color: #f3c2c3; }
.ibtn.danger:hover { background: var(--low-bg); }
.ilegend { font-size: .78rem; }
.ilegend .ic { width: 15px; height: 15px; }
.badge { white-space: nowrap; display: inline-block; }
@media (max-width: 700px) {
  table.users, table.users tbody { display: block; border: 0; box-shadow: none; background: none; }
  table.users tr:first-child { display: none; }
  table.users tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
  table.users td { border: 0; padding: 0; font-size: .88rem; }
  table.users td:nth-child(1) { font-weight: 700; }
  table.users td:nth-child(2) { grid-column: 1; grid-row: 2; color: var(--muted); text-align: right; }
  table.users td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: left; }
  table.users td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: left; }
  table.users td:nth-child(5) { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; }
  table.users td:nth-child(5) .muted { display: inline; margin-inline-start: 6px; }
  table.users td.iacts { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px; }
  .ibtn { width: 40px; height: 40px; }
}

/* پشتیبانی و چت */
.chat { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; height: calc(100vh - 130px); height: calc(100dvh - 130px); min-height: 380px; }
.chathead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: linear-gradient(120deg, var(--primary), var(--primary-2)); color: #fff; }
.chathead b { display: block; line-height: 1.4; }
.chathead small { opacity: .85; font-size: .78rem; }
.chav { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.chav .ic { width: 22px; height: 22px; }
.chatbody { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f7f7fc; }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg .bub { padding: 8px 12px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; line-height: 1.75; font-size: .94rem; }
.msg small { font-size: .68rem; color: var(--muted); margin-top: 2px; padding: 0 6px; }
.msg.me { align-self: flex-start; align-items: flex-start; }
.msg.me .bub { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.them, .msg.a { align-self: flex-end; align-items: flex-end; }
.msg.them .bub, .msg.a .bub { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.hellomsg .bub { background: var(--primary-soft); border-color: #dcd8fb; }
.chatform { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); background: var(--card); }
.chatform textarea { flex: 1; font: inherit; resize: none; border: 1.5px solid var(--line); border-radius: 14px; padding: 9px 12px; background: #fbfbfe; max-height: 120px; line-height: 1.6; }
.chatform textarea:focus { outline: 3px solid #e0defb; border-color: var(--primary); }
.chatsend { width: 46px; height: 46px; border-radius: 50%; border: 0; background: linear-gradient(120deg, var(--primary), var(--primary-2)); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.chatsend .ic { width: 22px; height: 22px; transform: scaleX(-1); }
@media (max-width: 700px) { .chat { height: calc(100dvh - 190px); border-radius: 16px; } }
.backlink { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: .9rem; }
.backlink .ic { transform: scaleX(-1); }
.threads { padding: 4px 0; }
.thread { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.thread:last-child { border-bottom: 0; }
.thread:hover { background: #fafaff; }
.thread.new { background: #f5f3ff; }
.thread.new b { color: var(--primary); }
.tav { width: 42px; height: 42px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; flex: none; }
.thread .tbody { flex: 1; min-width: 0; display: grid; line-height: 1.6; }
.thread .tbody small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmeta { display: grid; justify-items: end; gap: 4px; flex: none; }
.tmeta small { color: var(--muted); font-size: .72rem; }
a.ibtn { text-decoration: none; }

/* پیشنهاد نصب روی گوشی */
.installbar { position: fixed; left: 12px; right: 12px; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 0 auto;
  background: var(--card); border: 1px solid #dcd8fb; border-radius: 18px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(30, 27, 58, .18); animation: ibup .35s ease-out; }
.installbar[hidden] { display: none; }
.installbar img { border-radius: 12px; flex: none; }
.ibtext { flex: 1; min-width: 0; display: grid; line-height: 1.5; }
.ibtext b { font-size: .92rem; }
.ibtext small { font-size: .74rem; color: var(--muted); }
.ibclose { background: none; border: 0; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 4px 6px; }
@keyframes ibup { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 700px) { .installbar { bottom: calc(76px + env(safe-area-inset-bottom)); } body.has-installbar main.wrap { padding-bottom: 170px; } }
.iosguide { position: fixed; inset: 0; z-index: 50; background: rgba(20, 18, 40, .55); display: grid; place-items: end center; padding: 16px; }
.iosguide[hidden] { display: none; }
.iosguide .card { width: 100%; max-width: 460px; margin: 0; }
.iosguide h3 { margin: 0 0 6px; }
.iosguide ol { padding-inline-start: 20px; margin: 0 0 6px; }

/* رنگ کاربران بر اساس پرداخت */
table.users tr.row-sent td { background: #fff7e6; }
table.users tr.row-sent td:first-child { box-shadow: inset -4px 0 0 var(--mid); }
table.users tr.row-paid td { background: #ecf9f1; }
table.users tr.row-paid td:first-child { box-shadow: inset -4px 0 0 var(--good); }
.regdate { font-size: .72rem; font-weight: 400; }
.rowlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); margin: -4px 0 10px; }
.rowlegend span { display: inline-flex; align-items: center; gap: 6px; }
.lg.sent { background: #f7c46b; } .lg.paidc { background: #6fd09a; } .lg.freec { background: #fff; border: 1px solid #ccc; }
h2.sechead small { font-size: .78rem; font-weight: 400; }
@media (max-width: 700px) {
  table.users tr.row-sent { background: #fff7e6; border-color: #f7c46b; border-inline-start: 5px solid var(--mid); }
  table.users tr.row-paid { background: #ecf9f1; border-color: #9fdcb9; border-inline-start: 5px solid var(--good); }
  table.users tr.row-sent td, table.users tr.row-paid td { background: none; box-shadow: none; }
  table.users td:nth-child(1) .regdate { display: block; }
}
@media (max-width: 700px) { table.users tr.row-sent td:first-child, table.users tr.row-paid td:first-child { box-shadow: none; } }
