/* ---------- پایه ---------- */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-wght.woff2') format('woff2-variations'), url('../fonts/Vazirmatn-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #fbf7fa;
  --surface: #ffffff;
  --surface-2: #f5edf3;
  --ink: #221433;
  --muted: #6b5d74;
  --line: #ecdfe8;
  --brand: #d61f69;
  --brand-strong: #b0164f;
  --brand-soft: #fde8f1;
  --accent: #ff5a36;
  --accent-soft: #fff0eb;
  --lime: #c6f432;
  --plum: #3a1d5c;
  --energy: linear-gradient(100deg, #d61f69 0%, #ff5a36 100%);
  --success: #15803d;
  --success-soft: #e8f6ec;
  --warn: #a15c07;
  --warn-soft: #fdf3e2;
  --danger: #b91c1c;
  --danger-soft: #fdecec;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(29,35,48,.05), 0 6px 24px rgba(29,35,48,.06);
  --focus: 0 0 0 3px rgba(214,31,105,.32);
  --max: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Vazirmatn', Tahoma, sans-serif; font-size: 16px; line-height: 1.8;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.skip-link { position: absolute; right: 1rem; top: -60px; background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 1rem; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }

/* ---------- سربرگ ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { font-weight: 900; font-size: 1.15rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.brand-mark svg { width: 20px; height: 20px; }
.nav { display: flex; gap: .25rem; margin-inline-start: auto; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: .45rem .8rem; border-radius: 8px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); }
.nav a.btn, .nav a.btn:hover { color: #fff; background: var(--brand); }
.nav a.btn:hover { background: var(--brand-strong); }
.nav form { margin: 0; }
.nav-toggle svg { width: 22px; height: 22px; display: block; }
.nav-toggle { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; font: inherit; cursor: pointer; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; right: 0; left: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: .5rem 16px 1rem; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav .btn { justify-content: center; }
}

/* ---------- دکمه و فرم ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .45rem; justify-content: center;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2;
  padding: .7rem 1.15rem; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; text-decoration: none; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-strong); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-accent { background: var(--energy); box-shadow: 0 6px 18px rgba(214,31,105,.28); }
.btn-accent:hover { background: linear-gradient(100deg, #b0164f 0%, #e8481f 100%); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #991b1b; }
.btn-sm { padding: .4rem .7rem; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--brand); padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label, .label { font-weight: 600; font-size: .92rem; }
.hint { font-size: .82rem; color: var(--muted); }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  font: inherit; width: 100%; padding: .65rem .8rem; border: 1px solid #dccbd7; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input.ltr-input { direction: ltr; text-align: right; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .8rem; font-size: .93rem; }
.check input { margin-top: .4rem; width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.otp-input { font-size: 1.6rem !important; letter-spacing: .6em; text-align: center; direction: ltr; font-variant-numeric: tabular-nums; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- پیام‌ها ---------- */
.flash { padding: .8rem 1rem; border-radius: var(--radius-sm); margin: 1rem 0; border: 1px solid; font-size: .95rem; }
.flash-success { background: var(--success-soft); border-color: #b9e2c5; color: #14532d; }
.flash-error { background: var(--danger-soft); border-color: #f3c0c0; color: #7f1d1d; }
.flash-info { background: var(--brand-soft); border-color: #f6c3d8; color: #7d1142; }
.flash-warn { background: var(--warn-soft); border-color: #f1d7a8; color: #713f12; }

/* ---------- کارت و بخش ---------- */
main { min-height: 60vh; }
.section { padding-block: 3rem; }
.section-sm { padding-block: 1.75rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 1.5rem; }
@media (max-width: 640px) { .card-pad { padding: 1.1rem; } }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-brand { background: var(--brand-soft); color: var(--brand-strong); }
.badge-accent { background: var(--accent-soft); color: #b3321a; }
.badge-lime { background: var(--lime); color: var(--ink); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- صفحه اصلی ---------- */
.hero { padding-block: 3.5rem 3.5rem; background: radial-gradient(90% 120% at 100% 0%, #fde8f1 0%, var(--bg) 60%); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .45rem; background: var(--ink); color: #fff; padding: .3rem .8rem .3rem .45rem; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.hero .eyebrow i { width: 22px; height: 22px; border-radius: 50%; background: var(--lime); display: inline-block; }
.hero h1 em { font-style: normal; background: var(--energy); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.hero .lead { font-size: 1.12rem; color: var(--muted); max-width: 36ch; }
.hero-visual { aspect-ratio: 4/4.4; max-width: 100%; position: relative; }
.hero-visual .ring { position: absolute; inset: 6% 4% 0 10%; border-radius: 48% 48% 28px 28px; background: var(--energy); }
.hero-visual .ring::before { content: ''; position: absolute; width: 38%; aspect-ratio: 1; border-radius: 50%; border: 14px solid var(--lime); top: -7%; right: -8%; }
.hero-visual .photo { position: absolute; inset: 11% 9% 0 15%; border-radius: 46% 46% 22px 22px; overflow: hidden; background: linear-gradient(160deg, var(--plum), var(--brand)); }
.hero-visual .photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-card { position: absolute; background: var(--surface); border-radius: 14px; box-shadow: 0 12px 34px rgba(34,20,51,.18); padding: .7rem .9rem; font-size: .85rem; display: flex; align-items: center; gap: .6rem; }
.hero-card b { display: block; font-size: .95rem; }
.hero-card .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.hero-card .dot svg { width: 18px; height: 18px; }
.hero-card.c1 { bottom: 12%; left: 0; }
.hero-card.c2 { top: 16%; right: 0; background: var(--ink); color: #fff; }
.hero-card.c2 .dot { background: var(--lime); color: var(--ink); }
.hero-card progress { width: 110px; margin-top: .3rem; }
.hero-points { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; color: var(--muted); font-size: .92rem; }
.hero-points span { display: inline-flex; gap: .4rem; align-items: center; }
.hero-points svg { width: 18px; height: 18px; color: var(--brand); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; } .hero-visual { width: 100%; max-width: 380px; margin-inline: auto; } }

.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.goal { display: block; padding: 1.25rem; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; position: relative; overflow: hidden; }
.goal::before { content: ''; position: absolute; top: 0; right: 0; left: 0; height: 5px; background: var(--brand); }
.goal:nth-child(4n+2)::before { background: var(--accent); }
.goal:nth-child(4n+3)::before { background: var(--plum); }
.goal:nth-child(4n+4)::before { background: var(--lime); }
.goal .goal-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: .75rem; }
.goal:nth-child(4n+2) .goal-ic { background: var(--accent-soft); color: var(--accent); }
.goal:nth-child(4n+3) .goal-ic { background: #efe6f8; color: var(--plum); }
.goal:nth-child(4n+4) .goal-ic { background: #f1fbd6; color: #4d6b00; }
.goal .goal-ic svg { width: 24px; height: 24px; }
.goal:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-2px); }
.goal h3 { margin-bottom: .25rem; }
.goal p { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: step; }
.step { padding: 1.25rem; }
.step::before { counter-increment: step; content: counter(step, persian); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--lime); font-weight: 800; margin-bottom: .75rem; }
.step h3 { font-size: 1rem; }
.step p { font-size: .9rem; color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- کارت دوره ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.course-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.course-card:hover { transform: translateY(-3px); color: var(--ink); box-shadow: 0 10px 30px rgba(29,35,48,.1); }
.cover { aspect-ratio: 16/9; background: var(--surface-2); position: relative; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--plum) 0%, var(--brand) 100%); color: rgba(255,255,255,.9); }
.cover-placeholder svg { width: 56px; height: 56px; }
.course-card .body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.course-card h3 { margin: 0; font-size: 1.08rem; }
.course-card .summary { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.course-meta { display: flex; gap: .9rem; flex-wrap: wrap; color: var(--muted); font-size: .84rem; }
.course-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.course-meta svg { width: 15px; height: 15px; }
.price { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
.price-free { color: var(--success); }

.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.25rem 0 1.75rem; }
.chip { padding: .4rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 500; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- صفحه دوره ---------- */
.course-hero { background: radial-gradient(120% 140% at 0% 100%, #5b1f5e 0%, var(--ink) 55%); color: #fff; padding: 2.5rem 0; position: relative; overflow: hidden; }
.course-hero::after { content: ''; position: absolute; left: -60px; top: -40px; width: 260px; height: 260px; border-radius: 50%; border: 18px solid var(--lime); opacity: .18; }
.course-hero > .container { position: relative; z-index: 1; }
.course-hero a { color: #ffb3d1; }
.course-hero .muted { color: #c9bcd6; }
.course-hero .course-meta { color: #d9cde4; }
.course-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
.course-aside { position: sticky; top: 84px; margin-top: -120px; }
@media (max-width: 960px) { .course-layout { grid-template-columns: 1fr; } .course-aside { position: static; margin-top: 0; order: -1; } }
.buy-box .cover { border-radius: var(--radius) var(--radius) 0 0; }
.buy-box .price { font-size: 1.6rem; }
.facts { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; font-size: .92rem; }
.facts li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: .5rem; }
.facts li span:first-child { color: var(--muted); }
.prose { font-size: 1rem; }
.prose p { white-space: pre-line; }

.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-item { display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.lesson-item:last-child { border-bottom: 0; }
.lesson-item .idx { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); font-weight: 700; font-size: .85rem; }
.lesson-item .info { flex: 1; min-width: 0; }
.lesson-item .t { font-weight: 600; display: block; }
.lesson-item a.t { color: var(--ink); text-decoration: none; }
.lesson-item a.t:hover { color: var(--brand); }
.lesson-item .d { font-size: .82rem; color: var(--muted); }
.lesson-item.state-completed .idx { background: var(--lime); color: var(--ink); }
.lesson-item.state-available .idx { background: var(--brand); color: #fff; }
.lesson-item.state-locked { color: var(--muted); }
.lesson-item.state-locked .t { color: var(--muted); }
.lesson-item.current { background: var(--brand-soft); }
.lesson-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.progress { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; border: 0; background: var(--surface-2); border-radius: 999px; overflow: hidden; color: var(--brand); }
.progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.progress::-webkit-progress-value { background: var(--energy); border-radius: 999px; transition: width .4s; }
.progress::-moz-progress-bar { background: var(--energy); border-radius: 999px; }
.site-footer .brand + p { margin-top: .75rem; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; }
.center { text-align: center; }

/* ---------- پخش جلسه ---------- */
.learn-layout { display: grid; grid-template-columns: 1fr 330px; gap: 1.5rem; align-items: start; padding: 1.5rem 0 3rem; }
@media (max-width: 960px) { .learn-layout { grid-template-columns: 1fr; } }
.player { aspect-ratio: 16/9; background: #0d1117; border-radius: var(--radius); overflow: hidden; position: relative; }
.player video, .player iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player-msg { position: absolute; inset: 0; display: grid; place-items: center; color: #cbd5e1; text-align: center; padding: 1rem; }
.player-watermark { position: absolute; font-size: .75rem; color: rgba(255,255,255,.35); pointer-events: none; transition: top 1s, left 1s; direction: ltr; user-select: none; }
.watch-status { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.watch-status .progress { flex: 1; min-width: 160px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; flex-wrap: wrap; }
.sidebar-outline { max-height: calc(100vh - 120px); overflow: auto; position: sticky; top: 84px; }

/* ---------- جدول ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .7rem .8rem; text-align: right; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 700; color: var(--muted); font-size: .82rem; background: var(--surface-2); white-space: nowrap; }
tbody tr:hover { background: #fdf9fc; }
td.actions { white-space: nowrap; }
td form { display: inline; margin: 0; }

/* ---------- پاورقی ---------- */
.site-footer { margin-top: 4rem; background: var(--surface); border-top: 1px solid var(--line); padding: 2.5rem 0 1.5rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { font-size: .95rem; margin-bottom: .6rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--brand); }
.trust { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.trust img { max-height: 90px; width: auto; }
.copyright { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- احراز هویت ---------- */
.auth-wrap { max-width: 440px; margin: 3rem auto; padding: 0 16px; }
.auth-wrap h1 { font-size: 1.5rem; }
.auth-foot { text-align: center; margin-top: 1rem; font-size: .92rem; }

/* ---------- حساب ---------- */
.account-nav { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; overflow-x: auto; }
.account-nav a { padding: .7rem 1rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
.account-nav a[aria-current="page"] { color: var(--ink); border-color: var(--brand); }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty svg { width: 48px; height: 48px; margin: 0 auto 1rem; color: var(--line); }

/* ---------- پنل مدیریت ---------- */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-side { background: linear-gradient(180deg, var(--ink) 0%, #2d1640 100%); color: #cbd5e1; padding: 1.25rem .75rem; position: sticky; top: 0; height: 100vh; overflow: auto; }
.admin-side .brand { color: #fff; margin: 0 .5rem 1.5rem; }
.admin-side nav a { display: flex; align-items: center; gap: .6rem; color: #cbd5e1; text-decoration: none; padding: .6rem .75rem; border-radius: 8px; font-size: .93rem; font-weight: 500; }
.admin-side nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side nav a[aria-current="page"] { background: rgba(214,31,105,.28); color: #fff; box-shadow: inset -3px 0 0 var(--lime); }
.admin-side nav svg { width: 18px; height: 18px; opacity: .85; }
.admin-side .side-foot { margin-top: 2rem; padding: 0 .75rem; font-size: .82rem; }
.admin-side .side-foot a, .admin-side .side-foot button { color: #94a3b8; }
.admin-main { padding: 1.5rem 2rem 3rem; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.admin-top h1 { font-size: 1.5rem; margin: 0; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; padding: .75rem; }
  .admin-side nav { display: flex; flex-wrap: wrap; gap: .25rem; }
  .admin-side .brand { margin-bottom: .75rem; }
  .admin-side .side-foot { margin-top: .75rem; }
  .admin-main { padding: 1.25rem 16px 3rem; }
}
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 1.1rem 1.2rem; }
.kpi .k { color: var(--muted); font-size: .85rem; }
.kpi .v { font-size: 1.45rem; font-weight: 800; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: .8rem; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.25rem; }
@media (max-width: 1100px) { .admin-grid { grid-template-columns: 1fr; } }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 1rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; min-width: 0; }
.bars .bar span.fill { width: 100%; max-width: 38px; background: var(--brand); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bars .bar.current span.fill { background: var(--accent); }
.bars .bar small { font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); gap: 1rem; flex-wrap: wrap; }
.card-head h2 { font-size: 1.05rem; margin: 0; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.filters .field { margin: 0; min-width: 150px; }
.filters input, .filters select { padding: .45rem .6rem; }
.pager { display: flex; gap: .4rem; padding: 1rem; justify-content: center; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: .4rem 1rem; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; direction: ltr; unicode-bidi: embed; }
details.box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem 1rem; background: var(--surface); }
details.box summary { cursor: pointer; font-weight: 700; }
.course-hero .course-layout > div:empty { display: none; }

/* ---------- تصویر و مربی ---------- */
.cover img { transition: transform .5s ease; }
.course-card:hover .cover img { transform: scale(1.04); }
.cover .cover-placeholder { z-index: 0; }
.cover img { position: relative; z-index: 1; }
.coach { display: grid; grid-template-columns: 320px 1fr; gap: 2rem; align-items: center; }
.coach-photo { aspect-ratio: 4/5; border-radius: 24px; overflow: hidden; background: var(--energy); position: relative; max-width: 100%; }
.coach-photo img { width: 100%; height: 100%; object-fit: cover; }
.coach-photo::after { content: ''; position: absolute; inset: auto 0 0 0; height: 8px; background: var(--lime); }
@media (max-width: 760px) { .coach { grid-template-columns: 1fr; } .coach-photo { max-width: 320px; } }
.player .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(1.1); }
@media (prefers-reduced-motion: reduce) { .cover img, .course-card, .goal { transition: none; } }

/* ---------- پرداخت کارت‌به‌کارت ---------- */
.h3 { font-size: 1.15rem; }
.btn svg { width: 1.1em; height: 1.1em; }
.pay-wrap { max-width: 760px; margin: 0 auto; }
.pay-card { padding: 1.4rem; }
.pay-head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pay-head > div { flex: 1; min-width: 12rem; }
.pay-head h1 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
.pay-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--energy); color: #fff; display: grid; place-items: center; flex: none; }
.pay-ic svg { width: 28px; height: 28px; }
.pay-notice { background: linear-gradient(135deg, #fff3f8, #fff6ef); border: 1px solid #f6c3d8; border-inline-start: 5px solid var(--brand); border-radius: var(--radius-sm); padding: 1rem 1.1rem; line-height: 2; color: var(--ink); }
.pay-notice p { margin: 0 0 .4rem; }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1rem; }
.pay-item { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem; background: var(--surface); }
.pay-item .k { font-size: .82rem; color: var(--muted); }
.pay-item .v { font-weight: 800; font-size: 1.15rem; }
.pay-amount { background: var(--plum); border-color: var(--plum); color: #fff; }
.pay-amount .k { color: #d9c9ef; }
.pay-amount .v { font-size: 1.35rem; color: var(--lime); }
.card-no, .member-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; direction: ltr; unicode-bidi: isolate; }
.member-code { color: var(--brand); font-size: 1.4rem !important; }
.copy-btn { margin-top: auto; }
.copy-btn.copied { border-color: var(--success); color: var(--success); }
.messengers { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.msg-btn { display: flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1rem; border-radius: 12px; color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 6px 16px rgba(0,0,0,.12); transition: transform .08s, filter .15s; }
.msg-btn:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); }
.msg-ic { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; }
.msg-ic svg { width: 19px; height: 19px; }
.msg-telegram { background: #229ed9; }
.msg-whatsapp { background: #1fae54; }
.msg-bale { background: #11a684; }
.card-inline { white-space: nowrap; font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 0 .2rem; }
.pay-steps { list-style: persian; margin: 1.1rem 0 0; padding-inline-start: 1.2rem; line-height: 2; color: var(--muted); }
.pay-foot { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pending-box { border: 1px dashed #f1d7a8; background: var(--warn-soft); border-radius: var(--radius-sm); padding: .8rem; margin-top: .8rem; }
@media (max-width: 640px) {
  .pay-card { padding: 1rem; }
  .pay-grid { grid-template-columns: 1fr; }
  .messengers { grid-template-columns: 1fr; }
}
.fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; margin: 0 0 1rem; }
.fieldset legend { font-weight: 800; padding: 0 .4rem; }
.confirm-form { display: flex; flex-direction: column; gap: .3rem; align-items: stretch; margin-bottom: .3rem; }
td.actions { min-width: 10rem; }
.input-sm { width: 100% !important; padding: .35rem .5rem !important; font-size: .82rem; }

/* ---------- افزوده‌های نسخه React ---------- */
.field-error { display: block; color: var(--danger); font-size: .82rem; margin-top: .25rem; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }
button.btn:disabled { opacity: .6; cursor: progress; }
