/* بازنگری رابط صفحه‌های عمومی و حساب (نسخه‌ی ۰.۱۷): نوار بالا، زبانه‌های موبایل، کارت‌های انتخاب، راه‌انداز و مرکز راهنما. */

/* نوار بالا: فاصله‌ی امن از دو لبه، چون padding خود navbar فاصله‌ی container را از بین می‌برد. */
.site-header .navbar.container-xl {
  padding-inline: max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-left));
}
@media (max-width: 991.98px) {
  .site-header .navbar { flex-wrap: nowrap; justify-content: space-between; gap: .75rem; }
  .site-header .navbar-brand { min-width: 0; }
  .site-header__bell { margin-inline-start: 0; flex: 0 0 auto; }
}

/* زبانه‌های حساب: در موبایل نوار پنج‌ستونی با آیکن بالای عنوان کوتاه. */
.account-tabs__short { display: none; }
@media (max-width: 767.98px) {
  .account-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .15rem; padding: .25rem; }
  .account-tabs__item { flex-direction: column; gap: .25rem; min-height: 3.5rem; padding: .45rem .1rem; font-size: .72rem; font-weight: 600; }
  .account-tabs__item i { font-size: 1.05rem; }
  .account-tabs__full { display: none; }
  .account-tabs__short { display: inline; }
}

/* کارت‌های انتخاب به‌جای select: هر گزینه دایره‌ی انتخاب دارد تا روشن باشد که قابل انتخاب است. */
.choice-cards { position: relative; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.choice-cards--subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .choice-cards--subjects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.choice-cards input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice-cards label {
  display: flex; align-items: center; gap: .55rem; min-width: 0; min-height: 3.1rem; margin: 0; padding: .6rem .75rem; cursor: pointer;
  color: var(--text); background: var(--surface); border: 1.5px solid var(--input-border); border-radius: var(--radius-sm);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.choice-cards label > i { flex: 0 0 auto; color: var(--text-muted); }
.choice-cards label > span:last-child { display: grid; min-width: 0; line-height: 1.5; }
.choice-cards label strong { font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.choice-cards label small { color: var(--text-muted); font-size: .78rem; }
.choice-cards__mark { position: relative; flex: 0 0 auto; width: 1.15rem; height: 1.15rem; border: 2px solid var(--input-border); border-radius: 50%; background: var(--surface); }
.choice-cards label:hover { border-color: var(--brand-blue); box-shadow: 0 2px 10px rgba(26, 111, 209, .14); }
.choice-cards input:focus-visible + label { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.choice-cards input:checked + label { border-color: var(--brand-blue); background: rgba(26, 111, 209, .10); }
.choice-cards input:checked + label > i, .choice-cards input:checked + label strong { color: var(--brand-blue); }
.choice-cards input:checked + label strong { font-weight: 800; }
.choice-cards input:checked + label .choice-cards__mark { border-color: var(--brand-blue); }
.choice-cards input:checked + label .choice-cards__mark::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--brand-blue); }
[data-bs-theme="dark"] .choice-cards input:checked + label > i, [data-bs-theme="dark"] .choice-cards input:checked + label strong { color: #8bbcff; }

/* فرم تیکت: سه بخش با جداکننده‌ی نرم و فاصله‌ی یکسان. */
.ticket-form { display: grid; min-width: 0; }
.ticket-form__part { min-width: 0; padding-block: 1.25rem; }
.ticket-form__part:first-of-type { padding-top: 0; }
.ticket-form__part + .ticket-form__part { border-top: 1px solid var(--border); border-image: linear-gradient(90deg, transparent, var(--border) 15%, var(--border) 85%, transparent) 1; }
.ticket-form__submit { display: flex; justify-content: flex-end; padding-top: .25rem; }
@media (max-width: 575.98px) { .ticket-form__submit .btn { width: 100%; } }

/* راه‌انداز: عرض خوانا، نوار پیشرفت افقی و دکمه‌های اندازه‌ی طبیعی. */
.setup-shell { max-width: 58rem; }
.setup-panel { min-width: 0; }
/* راهنمای زیر فیلد با نشانی و کد درون متن: جریان عادی متن تا هر تکه ستون جدا نشود. */
.setup-panel .form-hint { display: block; line-height: 1.9; }
.setup-panel .form-hint > i { margin-inline-end: .35rem; }
.setup-form { display: grid; gap: 1.1rem; min-width: 0; }
.setup-form fieldset { min-width: 0; }
.setup-form .form-control { max-width: 34rem; }
.setup-form .row .form-control { max-width: none; }
.setup-subpanel { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-muted); }
.setup-subpanel[hidden] { display: none; }
.setup-subpanel__title { float: none; width: auto; margin: 0 0 .25rem; font-size: .95rem; font-weight: 800; color: var(--brand-blue); }
.setup-subpanel__title i { margin-inline-end: .35rem; }
.setup-help__steps { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .3rem; font-size: .88rem; line-height: 1.9; color: var(--text-muted); }
.setup-steps { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .35rem; scrollbar-width: thin; }
.setup-steps li { flex: 0 0 auto; }
.setup-steps a { white-space: nowrap; }
.setup-steps .is-active a { background: rgba(26, 111, 209, .10); }
@media (min-width: 1200px) {
  .setup-steps { justify-content: space-between; overflow: visible; }
  .setup-steps a { padding: .35rem .6rem; font-size: .82rem; }
}
.setup-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.setup-actions .btn { white-space: nowrap; min-width: 7.5rem; }
.setup-actions--end { margin-top: .5rem; }
.setup-inline-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.setup-2fa { display: grid; gap: 1.25rem; align-items: center; justify-items: center; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.setup-2fa__qr { background: #fff; padding: .5rem; border-radius: 10px; max-width: 100%; height: auto; }
.setup-2fa__body { display: grid; gap: .65rem; width: 100%; max-width: 22rem; min-width: 0; }
.setup-2fa__body .form-hint { overflow-wrap: anywhere; }
@media (min-width: 768px) { .setup-2fa { grid-template-columns: auto minmax(0, 1fr); justify-items: start; } }
.setup-verify { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.setup-verify > li { display: grid; gap: .6rem; padding: .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 0; }
.setup-verify__form { display: grid; gap: .6rem; max-width: 22rem; min-width: 0; }
@media (max-width: 374.98px) { .setup-actions .btn { min-width: 0; padding-inline: .7rem; } }

/* مرکز راهنما (/guide) */
.guide-index { display: grid; gap: 2rem; }
.guide-index__title { margin: 0 0 .8rem; font-size: 1.15rem; font-weight: 800; }
.guide-cards { display: grid; gap: .85rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .guide-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guide-card { display: flex; flex-direction: column; gap: .4rem; min-width: 0; padding: 1rem 1.1rem; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s ease, box-shadow .15s ease; }
.guide-card:hover { color: var(--text); border-color: var(--brand-blue); box-shadow: 0 8px 24px rgba(26, 111, 209, .12); }
.guide-card__icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 12px; background: rgba(26, 111, 209, .12); color: var(--brand-blue); font-size: 1.05rem; }
.guide-card strong { line-height: 1.7; }
.guide-card small { color: var(--text-muted); font-size: .85rem; line-height: 1.8; }
.guide-card__meta { margin-top: auto; color: var(--text-muted); font-size: .76rem; }
.guide-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .6rem; font-size: .85rem; }
.guide-meta { margin: .4rem 0 0; font-size: .82rem; opacity: .85; }
