/* اجزای صفحه‌های آکادمی هنربخش */

.section { margin-top: 52px; }
.section-head {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px;
}
.section-head h2 { margin: 0; }
.section-head a { margin-inline-start: auto; font-size: .93rem; }

.side-title { font-size: 1.1rem; margin: 30px 0 14px; }

.lead { font-size: 1.08rem; color: var(--ink-soft); }
.prose { color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.muted { color: var(--ink-mute); }

/* ── قهرمان صفحهٔ خانه ────────────────────────────────────────────
   موبایل‌اول: ارتفاع از محتوا می‌آید، نه از عدد ثابت — پس متن فارسی هر
   قدر هم بلند شود، بیرون نمی‌زند و روی عکس له نمی‌شود.

   عکس یک <picture> واقعی است، نه background-image، تا مرورگر بتواند
   نسخهٔ کوچک موبایل را انتخاب کند و lazy/priority را درست بفهمد.
*/
.hero {
  position: relative;
  isolation: isolate;
  margin-block-start: -40px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: #1c140c;   /* تا پیش از آمدن عکس، متن سفید ناخوانا نشود */
}

.hero-media {
  position: absolute; inset: 0; z-index: -2;
  display: block;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* روی دسکتاپ میکروفون سمت چپ می‌ماند و متن سمت راست جا باز می‌کند */
  object-position: 22% center;
}

/* پردهٔ دو لایه: یکی افقی برای دسکتاپ، یکی عمودی که فقط روی موبایل
   وزن می‌گیرد. رنگ قهوه‌ای‌گرم است نه خاکستری، تا با نارنجی برند بجنگد نه. */
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to left,
      rgba(24, 16, 9, .92) 0%, rgba(24, 16, 9, .80) 38%,
      rgba(24, 16, 9, .40) 68%, rgba(24, 16, 9, .12) 100%);
}

.hero-inner {
  position: relative;
  padding-block: clamp(56px, 9vw, 104px);
  max-width: min(var(--maxw), 100%);
}

.hero-eyebrow {
  margin: 0 0 14px;
  font-size: .92rem; font-weight: 550; letter-spacing: .02em;
  color: var(--brand-light);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}

.hero-title {
  margin: 0 0 .5em;
  max-width: 15ch;                       /* خط‌ها کوتاه و خوانا بمانند */
  font-size: clamp(1.9rem, 5.4vw, 3.4rem);
  font-weight: 1000;
  line-height: 1.32;
  color: #fff;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .5);
}

.hero-lead {
  margin: 0 0 2em;
  max-width: 44ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.9;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .45);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .icon { width: 1.45em; height: 1.45em; }

/* دکمهٔ دوم روی عکس: شیشه‌ای با لبهٔ روشن — روی هر جای عکس خوانا می‌ماند */
.btn-ghost {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-color: rgba(255, 255, 255, .55);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .22);
  border-color: #fff;
  color: #fff;
}

/* ── موبایل: عکس پس‌زمینه نمی‌ماند، یک نوار بالای متن می‌شود ───────
   روی صفحهٔ باریک، عکسِ تمام‌قد زیر متن یعنی یا متن ناخواناست یا عکس
   دیده نمی‌شود. اینجا عکس ارتفاع ثابتِ خودش را بالا می‌گیرد و متن روی
   زمینهٔ تیرهٔ تمیز زیرش می‌نشیند. */
@media (max-width: 700px) {
  .hero { margin-block-start: -26px; }

  .hero-media {
    position: relative;
    height: 190px;
  }
  .hero-media img { object-position: 30% 42%; }

  /* پرده فقط پایین عکس را به زمینهٔ متن وصل می‌کند */
  .hero::before {
    background: linear-gradient(to bottom,
      rgba(24, 16, 9, .30) 0%, rgba(24, 16, 9, .55) 46%,
      #1c140c 190px, #1c140c 100%);
  }

  .hero-inner { padding-block: 26px 34px; }
  .hero-eyebrow { margin-bottom: 10px; font-size: .85rem; }
  .hero-title { max-width: none; line-height: 1.4; }
  .hero-lead { margin-bottom: 1.6em; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* ── کارت دوره ───────────────────────────────────────────────────
   پوستر قهرمان کارت است، نه تزئین: کامل و بی‌برش دیده می‌شود، داخل یک
   حاشیهٔ سفید مثل پاسپارتوی قاب عکس. زیرش یک برچسب گالری‌مانند با شمارهٔ
   ردیف، عنوان و عوامل.

   کلید کار: تصویر `height: auto` دارد و هیچ نسبت اجباری‌ای رویش نیست، پس
   هر پوستری با هر ابعادی کامل جا می‌شود و کارت خودش را با آن تطبیق می‌دهد
   — نه برعکس. ارتفاع نامساوی کارت‌ها اینجا عیب نیست، شکلِ طبیعی یک دیوارِ
   پوستر است.
*/
.course-card {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;                 /* تا در ردیف با بلندترین کارت هم‌قد شود */
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.course-card:hover {
  border-color: var(--brand-line);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* پاسپارتو: حاشیهٔ سفیدِ دور پوستر، همان کاری که در قاب‌کردن اثر می‌کنند */
.cc-frame {
  position: relative;
  padding: 12px 12px 0;
  background: var(--surface);
}
.cc-frame img {
  display: block;
  width: 100%; height: auto;        /* هیچ کراپی، هیچ نسبت اجباری */
  border-radius: 6px;
  background: var(--brand-soft);    /* پیش از آمدن تصویر، جای خالی سفیدِ لخت نباشد */
  box-shadow: 0 1px 3px rgba(43, 36, 29, .13),
              0 6px 18px rgba(43, 36, 29, .09);
}

.cc-noposter {
  display: grid; place-items: center;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  background: linear-gradient(150deg, var(--brand-soft), #f2e5d6);
  color: var(--brand-dark); font-weight: 700; font-size: .9rem;
}

/* مُهر «برگزار شده» روی گوشهٔ پوستر */
.cc-stamp {
  position: absolute; top: 22px; inset-inline-start: 22px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(28, 20, 12, .82);
  color: #fff;
  font-size: .74rem; font-weight: 550;
  backdrop-filter: blur(4px);
}

/* برچسب زیر قاب — مثل پلاک کنار اثر در گالری */
.cc-label {
  display: flex; flex-direction: column;
  flex: 1;                      /* فضای اضافهٔ هم‌قدسازی اینجا می‌نشیند */
  padding: 14px 16px 16px;
}

.cc-label-top {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 9px;
}
.cc-no {
  font-size: .75rem; font-weight: 700;
  color: var(--brand-darker); letter-spacing: .06em;
}
.cc-rule { flex: 1; height: 1px; background: var(--brand-line); }
.cc-mode { font-size: .73rem; font-weight: 550; color: var(--ink-mute); }

.course-card h3 {
  margin: 0 0 7px;
  font-size: 1rem; font-weight: 700; line-height: 1.6;
}
.course-card h3 a { color: var(--ink); }
.course-card h3 a:hover { color: var(--brand-darker); text-decoration: none; }
.course-card h3 a::after { content: ''; position: absolute; inset: 0; }

.cc-credits {
  margin: auto 0 0;             /* همیشه ته کارت، هر قدر هم عنوان بلند باشد */
  padding-top: 8px;
  font-size: .8rem; line-height: 1.7; color: var(--ink-mute);
}
.cc-tutor { color: var(--ink-soft); font-weight: 550; }
.cc-dot { margin: 0 6px; opacity: .6; }

/* آرشیو: آرام‌تر، ولی پوستر همچنان کامل و خوانا */
.is-archived .cc-frame img { filter: saturate(.82); }
.is-archived:hover .cc-frame img { filter: none; }
.is-archived .cc-no { color: var(--ink-mute); }
.is-archived .cc-rule { background: var(--line); }

.archive-note { margin: -8px 0 22px; color: var(--ink-mute); font-size: .94rem; }

@media (max-width: 480px) {
  .cc-frame { padding: 10px 10px 0; }
  .cc-label { padding: 12px 13px 14px; }
  .cc-stamp { top: 18px; inset-inline-start: 18px; }
}

/* ── صفحهٔ دوره ──────────────────────────────────────────────────
   ساختار: سربرگ (عنوان + چکیده + پوستر) → بدنه (شرح و مربیان | گروه‌ها).
   پوستر عمداً کوچک و کنار عنوان است، نه عریضِ بالای صفحه — وگرنه کاربر
   باید اسکرول کند تا بفهمد اصلاً به چه صفحه‌ای آمده. */

.course-header {
  display: grid;
  /* پوستر اول در DOM است، پس در RTL سمت راست می‌افتد و متن سمت چپ */
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  padding-bottom: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.course-header h1 { margin-bottom: .3em; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.course-header .lead { margin-bottom: 1.3em; font-size: 1rem; }

.crumbs { margin-bottom: 14px; font-size: .85rem; color: var(--ink-mute); }
.crumbs a { color: var(--ink-mute); }
.crumbs a:hover { color: var(--brand-darker); }
.crumbs span { margin: 0 6px; }

/* اطلاعات کلیدی — چیزهایی که کاربر پیش از هر چیز می‌پرسد */
.course-facts {
  display: flex; flex-wrap: wrap; gap: 10px;
  list-style: none; margin: 0 0 22px; padding: 0;
}
.course-facts li {
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  line-height: 1.5;
}
.fact-label { display: block; color: var(--ink-mute); font-size: .78rem; }
.fact-value { font-weight: 550; }

.course-poster { margin: 0; position: relative; }
.course-poster img {
  width: 100%; height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.course-poster figcaption { position: absolute; top: 10px; inset-inline-start: 10px; }

.course-body {
  display: grid; gap: 32px;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  align-items: start;
}

/* پنل‌های محتوا — به‌جای متن لخت روی زمینه */
.panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.panel-title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}

.course-side { position: static; }
.side-title { margin: 0 0 14px; font-size: 1.05rem; }

.side-support {
  margin: 16px 0 0; padding: 14px 16px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
  font-size: .88rem; text-align: center; color: var(--ink-soft);
}

/* ── کارت گروه ──────────────────────────────────────────────────── */
.group-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  /* نوار نازک آرام در لبه — همان رنگی که در حالت غیرفعال خوش‌نشست */
  border-inline-start: 3px solid var(--line);
}
.group-card.is-closed { background: #fbf9f7; }

.group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.group-head h3 { margin: 0; font-size: 1.02rem; }
.group-head .badge { margin-inline-start: auto; flex-shrink: 0; }

/* قیمت جای برجستهٔ خودش را دارد، نه یک ردیف گمشده در جدول */
.group-price-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 12px 14px; margin-bottom: 16px;
  background: var(--brand-soft);
  border-radius: var(--radius-sm);
}
.group-price-label { font-size: .86rem; color: var(--ink-soft); }
.group-price-value {
  margin-inline-start: auto;
  font-size: 1.25rem; font-weight: 700; color: var(--brand-darker);
}
.group-price-value small { font-size: .72rem; font-weight: 400; color: var(--ink-mute); }
.is-closed .group-price-row { background: var(--bg); }
.is-closed .group-price-value { color: var(--ink-soft); }

.group-meta { margin: 0; font-size: .89rem; }
.group-meta > div {
  display: flex; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.group-meta > div:last-child { border-bottom: none; }
.group-meta dt { color: var(--ink-mute); flex-shrink: 0; min-width: 86px; }
.group-meta dd { margin: 0; flex: 1; }

.group-flag {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 0; padding: 9px 12px;
  background: #f3f7fb; border: 1px solid #dbe7f2; border-radius: var(--radius-sm);
  font-size: .85rem; color: #1f5f9e;
}
.group-flag svg { width: 17px; height: 17px; flex-shrink: 0; }

.seats-free { color: var(--ok); font-weight: 550; }
.seats-full { color: var(--bad); font-weight: 550; }

.address-full { color: var(--ink); }
.address-note {
  display: block; margin-top: 4px;
  font-size: .82rem; color: var(--ink-mute); font-style: italic;
}

.group-action { margin-top: 18px; }
.group-action .alert { margin-bottom: 10px; font-size: .88rem; }
.group-action .btn + .btn { margin-top: 8px; }
.action-note {
  margin: 10px 0 0; font-size: .83rem; line-height: 1.75;
  color: var(--ink-mute); text-align: center;
}

/* ── مربیان ──────────────────────────────────────────────────────── */
.instructors { display: grid; gap: 22px; }
/* وقتی مربی معرفی ندارد، متن کوتاه است و کنار عکسِ ۶۴ پیکسلی بالانشین
   می‌شود. center آن را با عکس هم‌تراز می‌کند. */
.instructor { display: flex; gap: 14px; align-items: center; }
.instructor:has(.instructor-bio) { align-items: flex-start; }
/* عکس مربی بدون قاب و سایه — یک زمینهٔ ملایم پشتش کافی است تا لبه‌اش
   روی کارت سفید گم نشود. */
.instructor img, .instructor-initial {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-soft);
  border: none;
  box-shadow: none;
}
.instructor img { object-fit: cover; }
.instructor-initial {
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 1.5rem; font-weight: 700;
}
.instructor-text h3 {
  margin: 0 0 2px; font-size: .98rem;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.instructor-title { margin: 0; font-size: .86rem; color: var(--ink-mute); }
.instructor-bio { margin: 8px 0 0; font-size: .89rem; color: var(--ink-soft); }

@media (max-width: 980px) {
  .course-header { grid-template-columns: 1fr; gap: 24px; }
  /* پوستر زیر متن، و باریک — تا صفحه را نبلعد */
  .course-poster { max-width: 300px; }
  .course-body { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .course-header { padding-bottom: 22px; margin-bottom: 22px; }
  .course-poster { max-width: 100%; }
  .course-facts { gap: 8px; }
  .course-facts li { padding: 7px 11px; font-size: .8rem; }
  .panel { padding: 18px 16px; }
  .group-card { padding: 16px; }
  .group-meta > div { flex-direction: column; gap: 2px; }
  .group-meta dt { min-width: 0; }
}

/* ── ورود ────────────────────────────────────────────────────────── */
.auth-box { max-width: 430px; margin: 34px auto; }
.auth-box h1 { font-size: 1.5rem; }
.auth-note { color: var(--ink-soft); font-size: .94rem; margin-bottom: 1.6em; }
.auth-fineprint {
  margin: 18px 0 0; text-align: center;
  font-size: .86rem; color: var(--ink-mute);
}
.otp-input {
  text-align: center;
  font-size: 1.7rem; font-weight: 700;
  letter-spacing: .5em; padding-inline-start: .5em;  /* جبران فاصلهٔ آخر */
  direction: ltr;
}

/* ── تست ─────────────────────────────────────────────────────────── */
.exam-page { max-width: 720px; margin-inline: auto; }
.exam-page .page-title .badge { margin-bottom: 10px; }
.exam-intro { margin-bottom: 22px; background: var(--brand-soft); border-color: var(--brand-line); }
.exam-submit { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ── پرداخت ──────────────────────────────────────────────────────── */
.checkout-page { max-width: 660px; margin-inline: auto; }
/* تایمر رزرو — زمانش از سرور می‌آید، پس رفرش آن را ریست نمی‌کند */
.hold-notice {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 14px 18px; margin-bottom: 18px;
  background: var(--warn-bg);
  border: 1px solid #f0dcb4;
  border-radius: var(--radius-sm);
  color: #8a5a0b;
  font-size: .93rem;
}
.hold-notice .hold-icon { display: grid; place-items: center; flex-shrink: 0; padding-top: 2px; }
.hold-body { min-width: 0; }
.hold-text { margin: 0; }
.hold-fine {
  margin: 6px 0 0;
  font-size: .84rem; line-height: 1.8; opacity: .82;
}
.hold-notice .icon { width: 18px; height: 18px; }
.hold-notice strong {
  font-variant-numeric: tabular-nums;
  font-size: 1.05em;
}
.hold-notice.is-urgent {
  background: var(--bad-bg); border-color: #f0c4bf; color: #922b21;
}
.hold-notice.is-expired {
  background: var(--bg); border-color: var(--line); color: var(--ink-mute);
}

.summary-card { margin-bottom: 24px; }
.summary-row { display: flex; align-items: center; gap: 14px; }
.summary-row span { color: var(--ink-soft); }
.summary-amount { margin-inline-start: auto; font-size: 1.5rem; color: var(--brand-darker); }
.summary-amount small { font-size: .8rem; font-weight: 400; color: var(--ink-mute); }

.pay-methods { display: grid; gap: 14px; }
.pay-option {
  display: flex; align-items: center; gap: 18px;
  width: 100%; padding: 20px 22px;
  text-align: start;
  font: inherit; color: inherit;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.pay-option:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: var(--shadow);
}
.pay-icon { font-size: 1.9rem; flex-shrink: 0; }
.pay-text strong { display: block; margin-bottom: 3px; font-size: 1.02rem; }
.pay-text small { color: var(--ink-mute); font-size: .88rem; line-height: 1.6; }

.cards-list { display: grid; gap: 12px; }
.bank-card .card-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bank-number {
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: .06em; direction: ltr;
  cursor: pointer; color: var(--ink);
}
.bank-meta { display: flex; flex-direction: column; font-size: .88rem; color: var(--ink-soft); }
.bank-name { color: var(--ink-mute); font-size: .82rem; }
.bank-card .copy-btn { margin-inline-start: auto; }

.receipt-form { margin-top: 14px; }

.result-page { max-width: 520px; margin: 40px auto; text-align: center; }
.result-page .card-body { padding: 44px 30px; }
.result-icon {
  width: 74px; height: 74px; margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 50%; font-size: 2.2rem; font-weight: 700;
}
.result-icon.ok  { background: var(--ok-bg);  color: var(--ok); }
.result-icon.bad { background: var(--bad-bg); color: var(--bad); }
.result-meta { margin: 24px 0 28px; font-size: .94rem; }
.result-meta > div {
  display: flex; gap: 12px; padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.result-meta dt { color: var(--ink-mute); }
.result-meta dd { margin: 0; margin-inline-start: auto; font-weight: 550; }
.result-page .btn + .btn { margin-inline-start: 8px; }

/* ── پنل کاربری ──────────────────────────────────────────────────── */
/* سربرگ پنل: تصویر و نام و شماره در یک نوار گرم، تا پنل با یک صفحهٔ
   فهرست خشک شروع نشود. */
.profile-banner {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 22px 24px; margin-bottom: 30px;
  background:
    radial-gradient(600px 180px at 88% -30%, rgba(232,137,29,.13), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.pb-avatar { flex-shrink: 0; }
.pb-avatar img, .pb-initial {
  width: 86px; height: 86px;
  border-radius: 50%;
  border: 2px solid var(--brand-line);
}
.pb-avatar img { object-fit: cover; }
.pb-initial {
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 2rem; font-weight: 700;
}
.pb-text { min-width: 0; }
.pb-text h1 { margin: 0 0 4px; font-size: 1.35rem; }
.pb-mobile { margin: 0; color: var(--ink-soft); font-size: .95rem; letter-spacing: .03em; }
.pb-nudge {
  display: inline-block; margin: 8px 0 0;
  padding: 3px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-darker);
  font-size: .8rem; font-weight: 550;
}
.pb-edit { margin-inline-start: auto; flex-shrink: 0; }

/* حالت خالی: متن و دکمه نباید بچسبند */
.empty-cta p { margin: 0 0 20px; }
.empty-cta .btn { margin-top: 0; }

@media (max-width: 560px) {
  .profile-banner { padding: 18px; gap: 14px; }
  .pb-avatar img, .pb-initial { width: 68px; height: 68px; font-size: 1.6rem; }
  .pb-text h1 { font-size: 1.15rem; }
  .pb-edit { margin-inline-start: 0; width: 100%; }
}

.status-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.status-head h3 { margin: 0; font-size: 1.03rem; }
.status-head .badge { margin-inline-start: auto; flex-shrink: 0; }
.status-group { font-size: .88rem; color: var(--ink-mute); margin-bottom: 12px; }
.status-body { font-size: .93rem; color: var(--ink-soft); }

/* نشان وضعیت بالای کارت کافی است؛ نوار رنگی لبه، تکرار همان اطلاعات
   بود و کارت را شلوغ می‌کرد. */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .92rem;
}
.data-table th, .data-table td {
  padding: 13px 16px; text-align: start;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table th { background: var(--bg); font-weight: 550; color: var(--ink-soft); }
.data-table tr:last-child td { border-bottom: none; }

@media (max-width: 900px) {
  .course-detail { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .support { margin-top: 44px; padding-bottom: 36px; }
  .section { margin-top: 38px; }
  .group-meta > div { flex-direction: column; gap: 2px; }
  .group-meta dt { min-width: 0; }
  .bank-card .copy-btn { margin-inline-start: 0; width: 100%; }
  .bank-number { font-size: 1.15rem; }
  .result-page .btn + .btn { margin-inline-start: 0; margin-top: 8px; }
}

/* ── سکشن پشتیبانی (پیش از پابرگ) ────────────────────────────────── */
.support {
  margin-top: 72px;
  padding-bottom: 52px;
  background: linear-gradient(180deg, transparent, var(--brand-soft) 26%);
  border-top: 1px solid var(--line);
}
.support-inner {
  display: flex; align-items: center; gap: 48px;
  padding-block: 46px 0;
}
/* در RTL اولین آیتم سمت راست می‌نشیند؛ پس متن اول می‌آید و تصویر
   خودبه‌خود سمت چپ می‌افتد — بدون نیاز به order. */
.support-text { flex: 1 1 auto; max-width: 620px; }
.support-text .badge { margin-bottom: 12px; }
.support-text h2 { margin-bottom: .5em; }
.support-text p { color: var(--ink-soft); }

.support-art { flex: 0 0 auto; align-self: flex-end; }
.support-art img {
  width: clamp(180px, 24vw, 290px); height: auto;
  filter: drop-shadow(0 14px 34px rgba(43, 36, 29, .22));
}

.support-handle { margin: 16px 0 0; font-size: .93rem; color: var(--ink-mute); }
.support-handle .handle {
  display: inline-block;
  font-weight: 550; color: var(--brand-darker);
  background: var(--surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
  padding: 2px 10px; margin-inline-start: 4px;
}
.support-handle .handle:hover { background: var(--brand-soft); text-decoration: none; }

@media (max-width: 820px) {
  .support-inner { flex-direction: column; align-items: stretch; gap: 24px; padding-block: 36px 0; }
  .support-art { align-self: center; }
  .support-art img { width: clamp(150px, 44vw, 220px); }
}

/* ── بخش‌های صفحهٔ تست ─────────────────────────────────────────────
   هر ورودی کادر سفید خودش را دارد، چون ممکن است هشت پرسش کوتاه کنار یک
   آپلود فایل باشد و اگر همه در یک کادر باشند، هنرجو گم می‌شود. */
.exam-block { margin-bottom: 16px; }
.block-title { margin: 0 0 12px; font-size: 1.05rem; }

.exam-instructions { background: var(--surface); border-color: var(--brand-line); }
.exam-instructions .block-title { color: var(--brand-darker); }

.exam-intro { background: var(--brand-soft); border-color: var(--brand-line); }

.exam-downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.exam-field-block .field { margin-bottom: 0; }
.exam-field-block.has-error { border-color: var(--bad); }

.field-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.field-head .block-title { margin: 0; }
.field-number {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-darker);
  font-size: .82rem; font-weight: 700;
}
.field-help { margin: 0 0 14px; font-size: .89rem; color: var(--ink-mute); }

/* ── قوانین دوره در صفحهٔ پرداخت ──────────────────────────────────── */
.terms-card { margin-bottom: 18px; }
.terms-body {
  max-height: 420px; overflow-y: auto;
  padding: 14px 16px; margin-bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .93rem;
}
.terms-accept {
  display: flex; align-items: flex-start; gap: 10px;
  font-weight: 550; cursor: pointer;
}
.terms-accept input { width: 18px; height: 18px; margin-top: 5px; flex-shrink: 0; accent-color: var(--brand); }

.pay-option:disabled { opacity: .45; cursor: not-allowed; }
.pay-option:disabled:hover { border-color: var(--line); background: var(--surface); box-shadow: none; }

/* ── پیام پس از ثبت‌نام ───────────────────────────────────────────── */
.after-note, .enroll-note {
  text-align: start;
  padding: 14px 18px;
  margin: 20px 0;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
  font-size: .93rem; color: var(--ink);
}
.after-note p:last-child, .enroll-note p:last-child { margin-bottom: 0; }


/* ── واریز بانکی: حساب سه‌شناسه‌ای و دو مرحله ─────────────────────── */
.summary-sub { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .9rem; }
.summary-sub span:first-child { color: var(--ink-mute); }
.paid-amount { margin-inline-start: auto; color: var(--ok); font-weight: 550; }
.due-amount  { margin-inline-start: auto; color: var(--bad); font-size: 1.05rem; }

.two-stage-note {
  margin-bottom: 20px;
  background: #f3f7fb; border-color: #dbe7f2;
}
.two-stage-note .block-title { color: #1f5f9e; }
.two-stage-note p { font-size: .92rem; color: var(--ink-soft); }
.two-stage-note .fineprint { margin-bottom: 0; font-size: .85rem; color: var(--ink-mute); }

.step-title { margin-top: 34px; }
.step-second { margin-top: 40px; }

.accounts-list { display: grid; gap: 12px; margin-bottom: 8px; }

.account-head {
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.account-head .bank-name { font-size: .85rem; color: var(--ink-mute); }

.account-rows { display: grid; gap: 8px; }
/* هر سه شناسه یک شکل: برچسب بالا، عدد در خط خودش. شبا بلند است و
   ناچار به خط دوم می‌رفت؛ یکسان‌کردن بقیه از ناهماهنگی جلوگیری می‌کند. */
.account-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: 'label copy' 'value copy';
  gap: 2px 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.row-label { grid-area: label; font-size: .8rem; color: var(--ink-mute); }
.row-value {
  grid-area: value;
  font-size: 1.02rem; font-weight: 550; letter-spacing: .04em;
  direction: ltr; text-align: start;
  word-break: break-all; line-height: 1.6;
}
/* شبا یک رشتهٔ پیوسته است؛ خط فاصله میانش خواندنش را سخت می‌کرد و
   «IR» با ارقام فارسی در یک خط ننشسته بود. */
.sheba-value {
  letter-spacing: .02em;
  word-break: break-all;
  line-height: 1.6;
}
.copy-btn {
  grid-area: copy;
  align-self: center;
  padding: 5px 13px;
  font: inherit; font-size: .81rem; font-weight: 550;
  color: var(--brand-darker);
  background: var(--surface);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.copy-btn:hover { background: var(--brand-soft); border-color: var(--brand); }
.copy-btn.copied { background: var(--ok-bg); color: var(--ok); border-color: #bfe3cd; }

@media (max-width: 560px) {
  .row-value { font-size: .93rem; }
}

/* ── تصویر پروفایل و پنجرهٔ برش ───────────────────────────────────── */
.avatar-block {
  display: flex; align-items: center; gap: 18px;
  padding-bottom: 22px; margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.avatar-current { flex-shrink: 0; }
.avatar-current img, .avatar-initial {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 2px solid var(--brand-line);
}
.avatar-current img { object-fit: cover; }
.avatar-initial {
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 2.2rem; font-weight: 700;
}
.avatar-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.inline-form { display: inline; }

.btn-link-danger {
  padding: 0; font: inherit; font-size: .87rem;
  color: var(--bad); background: none; border: none;
  cursor: pointer; text-decoration: none;
}
.btn-link-danger:hover { text-decoration: underline; color: var(--bad); }

.panel-logout {
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.crop-modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(28, 20, 12, .62);
  backdrop-filter: blur(3px);
}
.crop-modal[hidden] { display: none; }

.crop-dialog {
  width: min(380px, 100%);
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.crop-dialog h2 { margin: 0 0 6px; font-size: 1.1rem; }
.crop-hint { margin: 0 0 18px; font-size: .85rem; color: var(--ink-mute); line-height: 1.7; }

.crop-stage {
  position: relative;
  width: 320px; max-width: 100%;
  margin: 0 auto 18px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ece5dd;
  touch-action: none;   /* تا کشیدنِ برش با اسکرول صفحه قاطی نشود */
}
.crop-stage canvas { display: block; width: 100%; height: auto; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }

/* حلقهٔ راهنما: بیرونش تیره می‌شود تا معلوم باشد چه چیزی برش می‌خورد */
.crop-ring {
  position: absolute; inset: 0;
  pointer-events: none;
  box-shadow: 0 0 0 999px rgba(28, 20, 12, .45);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .85);
}

.crop-zoom {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
  font-size: .85rem; color: var(--ink-soft);
}
.crop-zoom input { flex: 1; accent-color: var(--brand); }

.crop-actions { display: flex; gap: 10px; }
.crop-actions .btn { flex: 1; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* فیلد پرشوندهٔ خودکار در فرم تست */
.auto-hint { display: block; margin-top: 7px; color: var(--ink-mute); font-size: .82rem; }
.exam-field-block .field-locked { position: relative; }
.exam-field-block .field-locked input { padding-inline-end: 42px; }

/* ── آپلود مستقل هر فیلد ─────────────────────────────────────────── */
.uploader { position: relative; }

.upload-progress { padding: 4px 2px; }
.upload-bar {
  height: 8px;
  background: var(--brand-soft);
  border-radius: 999px;
  overflow: hidden;
}
.upload-bar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 999px;
  transition: width .25s ease-out;
}
.upload-status {
  display: flex; align-items: center; gap: 12px;
  margin-top: 9px;
  font-size: .85rem; color: var(--ink-soft);
}
.upload-cancel {
  margin-inline-start: auto;
  padding: 0; font: inherit; font-size: .82rem;
  color: var(--bad); background: none; border: none; cursor: pointer;
}
.upload-cancel:hover { text-decoration: underline; }

/* فایل آپلودشده: کادر آرام با زمینهٔ خنثی. سبزِ پررنگ برای «کار تمام شد»
   بود، ولی اینجا وسط فرم است و مثل هشدار به چشم می‌آمد. */
.upload-done {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .88rem;
}
.done-mark {
  display: grid; place-items: center;
  width: 20px; height: 20px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--ok); color: #fff;
}
.done-mark .icon { width: 12px; height: 12px; }
.done-text { color: var(--ink); min-width: 0; word-break: break-word; }
.upload-replace {
  margin-inline-start: auto;
  padding: 5px 12px;
  font: inherit; font-size: .8rem; font-weight: 550;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.upload-replace:hover {
  color: var(--brand-darker);
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.upload-error {
  margin: 10px 0 0; padding: 10px 13px;
  background: var(--bad-bg); border: 1px solid #f0c4bf; border-radius: var(--radius-sm);
  font-size: .86rem; color: #922b21;
}

/* ── وضعیت ذخیرهٔ خودکار کنار هر فیلد ────────────────────────────── */
.field-head { position: relative; }
.save-state {
  margin-inline-start: auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .74rem; font-weight: 550;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.save-idle { background: var(--bg);     color: var(--ink-mute); }
.save-ok   { background: var(--ok-bg);  color: var(--ok); }
.save-bad  { background: var(--bad-bg); color: var(--bad); }

@media (max-width: 480px) {
  .save-state { font-size: .7rem; padding: 2px 8px; }
  .upload-done { gap: 8px; }
  .upload-replace { margin-inline-start: 0; }
}

/* ورودی آیدی تلگرام — @ ثابت کنار فیلد */
.tg-input { display: flex; align-items: stretch; direction: ltr; }
.tg-at {
  display: grid; place-items: center;
  padding: 0 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-inline-end: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--ink-mute); font-weight: 550;
}
.tg-input input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-inline-start: none;
}
.tg-input:focus-within .tg-at { border-color: var(--brand); }

/* ── تست نیمه‌تمام در پنل ────────────────────────────────────────── */
.section-first { margin-top: 0; }

.draft-card { }

.draft-progress { margin: 14px 0 12px; }
.draft-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}
.draft-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 999px;
  transition: width .3s;
}
.draft-count {
  display: block; margin-top: 7px;
  font-size: .8rem; color: var(--ink-mute);
}

/* ── تاریخ تولد ───────────────────────────────────────────────────
   انتخابگر تقویم برای تاریخ تولد بد است — کاربر باید سال‌ها عقب برود.
   تایپ روز و سال با یک لیست برای ماه، سریع‌تر و کم‌خطاتر است.

   چیدمان گرید است نه flex: با flex، ورودی‌ها عرض ذاتی خودشان را نگه
   می‌داشتند و روی صفحهٔ باریک از کادر بیرون می‌زدند. اینجا سه ستون
   کسری‌اند، پس هر عرضی را بین خودشان تقسیم می‌کنند. */
.birth-row {
  display: grid;
  /* ماه بیشترین سهم را می‌گیرد چون «اردیبهشت» بلندترین نام است و باید
     با فلشِ select هم جا شود. روز و سال فقط دو و چهار رقم‌اند. */
  grid-template-columns: 0.95fr 2fr 1.15fr;
  gap: 8px;
}
.birth-row input,
.birth-row select {
  min-width: 0;            /* وگرنه گرید اجازهٔ کوچک‌شدن نمی‌دهد */
  width: 100%;
  padding-inline: 8px;     /* در عرض کم، پدینگ پیش‌فرض جا را می‌خورد */
  text-align: center;
}
.birth-row select { text-align: start; padding-inline-start: 10px; }
.birth-age { display: block; margin-top: 9px; color: var(--brand-darker); }

/* زیر ۳۴۰ پیکسل (گوشی‌های خیلی قدیمی) ماه خط خودش را می‌گیرد؛ بالاتر از
   آن هر سه در یک خط جا می‌شوند. */
@media (max-width: 340px) {
  .birth-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .birth-row select { grid-column: 1 / -1; order: -1; }
}

/* راهنمای فیلد قفل‌شده وقتی لینک ویرایش است */
a.auto-hint { color: var(--brand-dark); }
a.auto-hint:hover { color: var(--brand-darker); }


/* پیام بازیابی پیش‌نویس — فاصله از بخش بعدی */
.draft-restored { margin-bottom: 22px; }

/* راهنمای «نمی‌توانم کارت‌به‌کارت کنم» — بسته تا کاربر بپرسد */
.two-stage-note {
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.two-stage-note > summary {
  padding: 13px 16px;
  cursor: pointer;
  font-size: .9rem; font-weight: 550;
  color: var(--brand-darker);
  list-style: none;
  display: flex; align-items: center; gap: 9px;
}
.two-stage-note > summary::-webkit-details-marker { display: none; }
.two-stage-note > summary::before {
  content: '';
  width: 7px; height: 7px;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .2s;
  flex-shrink: 0;
}
.two-stage-note[open] > summary::before { transform: rotate(45deg); }
.two-stage-note > summary:hover { background: var(--brand-soft); }
.two-stage-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: .9rem; color: var(--ink-soft);
}
.two-stage-body p { margin-bottom: .8em; }
.two-stage-body .fineprint { margin-bottom: 0; font-size: .85rem; color: var(--ink-mute); }

/* مبلغ واریزی: بازتاب عدد به‌صورت خوانا زیر فیلد */
.amount-words {
  display: block; margin-top: 7px;
  font-size: .85rem; color: var(--brand-darker); font-weight: 550;
  min-height: 1.2em;
}

/* وقتی گروه فقط یک روش پرداخت دارد */
.only-method-note {
  margin-top: 6px;
  font-size: .88rem; color: var(--ink-mute);
}

/* ── پشتیبانی (تیکت‌ها) ─────────────────────────────────────────────── */
.support-head { display:flex; justify-content:space-between; align-items:center;
  gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.ticket-list { list-style:none; padding:0; margin:0; display:flex;
  flex-direction:column; gap:14px; }
.ticket-item { border:1px solid #e5e0d8; border-radius:12px; padding:14px 16px;
  background:#fff; }
/* نوارِ رنگیِ کنارِ تیکت برداشته شد: وضعیت با متنِ خودش
   («پاسخ داده شد» / «در انتظار پاسخ») گفته می‌شود. */
.ticket-row { display:flex; justify-content:space-between; gap:10px;
  align-items:center; margin-bottom:6px; }
.ticket-title { font-weight:700; }
.ticket-status { font-size:.82rem; color:#8a7c6a; white-space:nowrap; }
.ticket-item.is-answered .ticket-status { color:#2e7d32; }
.ticket-msg { margin:6px 0; color:#4a4038; white-space:pre-wrap; }
.ticket-answer { margin-top:10px; padding:10px 12px; background:#f4f7f4;
  border-radius:10px; }
.ticket-answer-label { font-weight:700; color:#1b5e20; display:block;
  margin-bottom:4px; }
.ticket-meta { margin-top:8px; font-size:.78rem; color:#a99e8d; }
.empty-hint { color:#8a7c6a; padding:18px 0; text-align:center; }
.pager { display:flex; gap:12px; align-items:center; justify-content:center;
  margin-top:18px; }
.pager-info { font-size:.85rem; color:#8a7c6a; }
.form-lead, .form-actions { margin:12px 0; }
.form-actions { display:flex; gap:10px; }


/* ── ظرفیت و لیست انتظار در صفحهٔ ثبت‌نام ── */
.capacity-card .capacity-count { font-size:1.05rem; margin:0 0 10px; }
.capacity-card .capacity-count strong { color:#2e7d32; }
.capacity-note { font-size:.9rem; line-height:2; color:#5a5248; margin:0 0 8px; }
.capacity-note-soft { color:#8a8078; font-size:.85rem; }
.capacity-full { color:#b3261e; font-weight:700; margin:0 0 12px; }
.waitlist-done strong { color:#c8710f; }
.waitlist-btn { margin-top:6px; }

/* ثبت‌نامی که هنوز باز نشده — تأکید آرام، نه هشدار */
.group-soon {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #d9cdb4;
  background: #fdf8ec;
  color: #6b5424;
  font-size: 14px;
  line-height: 1.9;
}
.badge:not(.badge-closed) { background: #2e7d32; color: #fff; }
/* نشانِ «به‌زودی» روی کارت دوره — سبز، برخلاف مهرِ خاکستریِ «برگزار شده» */
.cc-stamp--soon { background: #2e7d32; color: #fff; border-color: #2e7d32; }

/* ── ردیف حساب بانکی: برچسب و کپی بالا، عدد پایین ──
   شبا ۲۴ رقم است و در یک خط کنار برچسب و دکمه جا نمی‌شد. */
.account-row--stack { display: block; }
.account-row--stack .account-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.account-row--stack .row-value {
  display: block;
  width: 100%;
  direction: ltr;
  text-align: left;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}
.summary-card--spaced { margin-top: 18px; }
