/* ============================================================================
   PAGES/AUTH.CSS — استایل صفحه‌های ورود (login / otp / terms_accept)
   ============================================================================
   مالک:      صفحات احراز هویت (auth group — گام ۱ نقشهٔ مهاجرت)
   مصرف‌کننده: web/auth/login.html · web/auth/otp.html · web/auth/terms_accept.html
   وابستگی:   dazzle.css (توکن‌ها + btn/alert/input/sr-only) — قبل از این فایل لود شود

   ساختار (ترتیب عمدی است — مثل ترتیب لود قبلیِ سراسری عمل می‌کند):
     §A  پایهٔ میراث foundation.css — فقط رول‌هایی که هنوز در آبشار زنده‌اند
     §B  بخش پذیرش قوانین در terms.css — عیناً (لایهٔ §C بیشتر مقدارهایش را
         بازنویسی می‌کند؛ فقط :focus روی preview از اینجا زنده است)
     §C  پورت کامل landing/auth.css (لایهٔ برندهٔ فعلی)

   · کلاس‌های مردهٔ قدیمی (.auth-submit-landing، .auth-alert-landing،
     .auth-login-note، .auth-help، .otp-input، .auth-card سبز و…) عمداً پورت
     نشده‌اند — هیچ قالبی استفاده‌شان نمی‌کند.
   · نسخه‌های تکراری‌ای که تماماً توسط لایهٔ بعدی بازنویسی می‌شدند هم حذف شده‌اند
     (کامنت «overridden» در نقشهٔ مهاجرت).
   ============================================================================ */


/* ============================================================================
   §A — پایهٔ میراث foundation.css (به همان ترتیب نسبی قبلی)
   ============================================================================ */

/* لیبل فیلد (OTP) — نسخهٔ سبزِ قدیمی (.auth-form label) توسط همین رول بازنویسی می‌شد */
.auth-field label {
  font-size: 12px;
  font-weight: 800;
  color: var(--landing-ink);
  letter-spacing: 0.01em;
}

/* فرم لندینگ (روی .auth-form پایه سوار می‌شود؛ آن پایه کاملاً بازنویسی می‌شد) */
.auth-form-landing {
  margin-top: 28px;
  display: grid;
  gap: 20px;
  text-align: start;
}

/* فیلد */
.auth-field {
  display: grid;
  gap: var(--space-2);
}

/* اینپوت با آیکون */
.auth-input-wrap {
  position: relative;
}
.auth-input-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--landing-purple);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s;
}
.auth-input-landing {
  width: 100%;
  height: 52px;
  border: 1.5px solid rgba(var(--purple-rgb), 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--landing-ink);
  padding: 0 14px 0 44px;
  font-size: 15px;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.lang-fa .auth-input-landing {
  padding: 0 44px 0 14px;
}
.auth-input-landing:focus {
  border-color: var(--landing-purple);
  background: var(--gray-0);
  box-shadow: 0 0 0 4px rgba(var(--purple-rgb), 0.10);
}
.auth-input-landing:focus ~ .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
  opacity: 1;
}
.auth-input-landing::placeholder {
  color: var(--purple-soft);
  font-size: 14px;
}

/* زیرعنوان OTP (چینش شماره موبایل) */
.auth-subtitle-otp {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
/* نسخهٔ foundation — فقط letter-spacing و direction از اینجا زنده می‌ماند؛
   بقیه توسط نسخهٔ §C بازنویسی می‌شود (ترتیب حفظ شده) */
.auth-phone-number {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(var(--purple-rgb), 0.06);
  color: var(--landing-purple);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  direction: ltr;
}

/* اینپوت OTP — پایهٔ foundation؛ لایهٔ §C اندازه/فاصله‌گذاری را بازنویسی می‌کند */
.auth-otp-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--landing-purple);
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.2s;
}
.auth-otp-input {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 26px;
  letter-spacing: 0.35em;
  padding: 0 14px;
  height: 58px;
  direction: ltr;
}
.auth-otp-input::placeholder {
  color: var(--purple-200);
  letter-spacing: 0.35em;
  font-size: 26px;
}
.auth-otp-input:focus {
  letter-spacing: 0.4em;
}

/* فوتر لینک‌ها — کانتینر */
.auth-footer-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  font-size: 14px;
  color: #148d59; /* legacy سبزِ قدیمی — عملاً دیده نمی‌شود؛ لینک‌ها رنگ خودشان را دارند؛ در فاز ۵ حذف */
}
.auth-footer-links a:hover {
  text-decoration: underline;
}

/* هشدار خطای auth (اسکوپ کارت) — رنگ‌ها دقیقاً همان توکن‌های semantic اند */
.auth-alert {
  border-radius: 12px;
  padding: 11px 13px;
  margin: 16px 0;
  text-align: start;
  font-size: 14px;
  line-height: 1.7;
}
.auth-card-landing .auth-alert-error {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--color-error-border);
  background: var(--color-error-light);
  color: var(--color-error);
  font-size: 12px;
  line-height: 1.7;
  text-align: start;
  animation: authAlertIn 0.3s ease both;
}
.auth-card-landing .auth-alert-error svg {
  flex-shrink: 0;
}
@keyframes authAlertIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* برند هدر کارت — نسخهٔ foundation (gap:11px زنده می‌ماند؛ لینک terms_accept
   بین آیکون و متن «Dazzle» از همین gap استفاده می‌کند) */
.auth-brand-landing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 26px;
  text-decoration: none;
}

/* لینک‌های فوتر صفحهٔ login (خانه / زبان) */
.auth-footer-home,
.auth-footer-lang {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--purple-400);
  text-decoration: none;
  transition: color 0.2s;
  min-height: 36px;
  padding: 4px 2px;
}
.auth-footer-home:hover,
.auth-footer-lang:hover {
  color: var(--landing-purple);
}
.auth-footer-home svg,
.auth-footer-lang svg {
  opacity: 0.6;
}

/* یادداشت قوانین زیر فرم login */
.auth-terms-note {
  margin: 18px 0 0;
  font-size: 11px;
  line-height: 1.8;
  color: var(--purple-wash);
  text-align: start;
}
.auth-terms-note a {
  color: var(--landing-purple);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-terms-note a:hover {
  color: var(--landing-purple-dark);
}

/* زیرعنوان فارسی — فقط در foundation تعریف شده بود (landing نداشت) */
.lang-fa .auth-card-landing .auth-subtitle {
  font-size: 12px;
  line-height: 2;
}


/* ============================================================================
   §B — پذیرش قوانین؛ پورت عیناً از terms.css (سبزِ میراث)
   بیشتر مقدارهای این بخش توسط §C بازنویسی می‌شوند؛ ترتیب برای وفاداری
   آبشار حفظ شده. فقط «.terms-consent-preview:focus» (فوکوس ماوس) از اینجا
   زنده است — §C فقط :focus-visible دارد.
   ============================================================================ */

.terms-consent-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
}
.terms-consent-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #edf8f2;
  color: #187554;
}
.terms-consent-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.terms-consent-kicker {
  display: block;
  color: #18825b;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 3px;
}
.terms-consent-heading h1 {
  font-size: 23px;
  text-align: start;
}
.terms-consent-heading p {
  margin: 6px 0 0;
  color: #6e7d78;
  font-size: 12.5px;
  line-height: 1.85;
}
.terms-consent-version {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #e0e9e5;
  border-radius: 12px;
  background: #f8fbfa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.terms-consent-version div {
  min-width: 0;
}
.terms-consent-version small {
  display: block;
  color: #84918c;
  font-size: 9.5px;
  font-weight: 800;
  margin-bottom: 3px;
}
.terms-consent-version strong {
  display: block;
  color: #2a4147;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.terms-consent-version > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 7px;
  background: #eaf5ef;
  color: #187554;
  font-size: 10.5px;
  font-weight: 900;
}
.terms-consent-preview {
  max-height: 270px;
  overflow: auto;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #e0e8e5;
  border-radius: 12px;
  background: #fff;
  outline: none;
  scrollbar-width: thin;
}
.terms-consent-preview:focus {
  border-color: #83c7a8;
  box-shadow: 0 0 0 3px rgba(46, 224, 129, 0.10);
}
.terms-consent-preview h2 {
  font-size: 13px;
  color: #30484f;
  margin: 15px 0 5px;
}
.terms-consent-preview h2:first-child {
  margin-top: 0;
}
.terms-consent-preview h3 {
  font-size: 12px;
  color: #30484f;
  margin: 13px 0 4px;
}
.terms-consent-preview p,
.terms-consent-preview li {
  font-size: 10.8px;
  line-height: 1.95;
  color: #71807b;
}
.terms-consent-preview p {
  margin: 0 0 7px;
}
.terms-consent-preview ul,
.terms-consent-preview ol {
  padding-inline-start: 20px;
  margin: 6px 0 10px;
}
.terms-consent-preview a {
  color: #177653;
  text-decoration: underline;
}
.terms-consent-form {
  display: grid;
  gap: 13px;
  margin-top: 15px;
}
.terms-consent-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 12px 13px;
  border-radius: 11px;
  background: #f5faf7;
  border: 1px solid #dce9e3;
  color: #586a63;
  font-size: 11.5px;
  line-height: 1.9;
  cursor: pointer;
}
.terms-consent-check input {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: #22b96d;
}
.terms-consent-check a {
  color: #177653;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.terms-consent-note {
  text-align: center;
  color: #8a9691;
  font-size: 10px;
  line-height: 1.8;
  margin: 11px 0 0;
}
@media (max-width: 520px) {
  .terms-consent-heading {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .terms-consent-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }
  .terms-consent-heading h1 {
    font-size: 20px;
  }
  .terms-consent-preview {
    max-height: 34dvh;
  }
}


/* ============================================================================
   §C — لایهٔ برنده: پورت کامل landing/auth.css (توکنیزه‌شده)
   ============================================================================ */

/* ----- صفحه‌ی کلی (پس‌زمینه و موقعیت‌یابی) ----- */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--space-6) var(--space-4);
}
.auth-page-landing {
  position: relative;
  background: linear-gradient(160deg, var(--landing-surface) 0%, var(--lavender-50) 40%, var(--landing-surface) 100%);
  overflow: hidden;
}

/* ----- المان‌های تزئینی (حلقه‌ها و اورب‌ها) ----- */
.auth-rings,
.auth-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(var(--purple-rgb), 0.07);
}
.auth-ring-1 {
  width: 540px;
  height: 540px;
  top: -160px;
  inset-inline-end: -140px;
  animation: authRingSpin 38s linear infinite;
}
.auth-ring-2 {
  width: 380px;
  height: 380px;
  bottom: -100px;
  inset-inline-start: -90px;
  border-color: rgba(var(--lime-rgb), 0.08);
  animation: authRingSpin 26s linear infinite reverse;
}
@keyframes authRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
}
.auth-orb-1 { width: 280px; height: 280px; background: var(--landing-purple); top: -80px; inset-inline-start: -60px; }
.auth-orb-2 { width: 200px; height: 200px; background: var(--landing-lime); bottom: 10%; inset-inline-end: -40px; opacity: 0.25; }
.auth-orb-3 { width: 160px; height: 160px; background: var(--landing-purple-deep); bottom: -50px; inset-inline-start: 20%; opacity: 0.2; }

/* ----- کارت اصلی (auth-card-landing) ----- */
.auth-card-landing {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(var(--purple-rgb), 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-7) var(--space-6) var(--space-6);
  box-shadow: 0 24px 64px rgba(var(--purple-rgb), 0.1), 0 4px 16px rgba(var(--ink-rgb), 0.04);
  text-align: center;
  animation: authCardIn var(--duration-complex) cubic-bezier(0.16, 1, 0.3, 1) both;
}
.auth-card-landing.auth-card-wide {
  width: min(100%, 680px);
  text-align: start;
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ----- برند (auth-brand-landing) — gap و margin از §A/این بخش ترکیب می‌شود ----- */
.auth-brand-landing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  text-decoration: none;
}
.auth-card-wide .auth-brand-landing {
  justify-content: flex-start;
}
.auth-brand-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: transparent;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-purple);
  transition: transform var(--duration-page) var(--ease-standard), box-shadow var(--duration-page) var(--ease-standard);
}
.auth-brand-landing:hover .auth-brand-icon {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 28px rgba(var(--purple-rgb), 0.35);
}
.auth-brand-icon img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}
.auth-brand-text {
  font: 800 26px/1 var(--font-display);
  color: var(--landing-purple-dark);
}

/* ----- عنوان و زیرعنوان ----- */
.auth-card-landing h1 {
  margin: 0;
  color: var(--landing-ink);
  font-size: var(--text-h3);
  font-weight: 900;
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}
.lang-fa .auth-card-landing h1 {
  letter-spacing: 0;
  line-height: 1.55;
}
.auth-card-landing .auth-subtitle {
  color: var(--purple-600);
  font-size: var(--text-body);
  line-height: 1.7;
  margin: var(--space-2) auto 0;
  max-width: 340px;
}
.auth-card-wide .auth-subtitle {
  margin-inline: 0;
  max-width: none;
}
.auth-phone-number {
  display: inline-block;
  margin-top: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: rgba(var(--purple-rgb), 0.08);
  color: var(--landing-purple-dark);
  font-size: var(--text-body-sm);
  font-weight: 700;
}

/* ----- لینک‌های پایین (auth-footer) ----- */
.auth-footer-landing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(var(--purple-rgb), 0.08);
}
.auth-footer-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-body-sm);
  font-weight: 700;
  color: var(--purple-400);
  text-decoration: none;
  transition: color var(--duration-page) var(--ease-standard);
  min-height: var(--touch-target-min);
  padding: var(--space-1) var(--space-1);
}
.auth-footer-link:hover {
  color: var(--landing-purple);
}
.auth-footer-link svg {
  opacity: 0.65;
}
.auth-footer-link:focus-visible {
  outline: var(--focus-ring-width) solid var(--landing-purple);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}
.auth-footer-link[disabled] {
  color: var(--gray-400);
  cursor: not-allowed;
}

/* ----- OTP مخصوص (کد ورودی و دکمه‌ی ارسال مجدد) ----- */
.auth-otp-input {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 28px;
  letter-spacing: 0.4em;
  padding-inline-start: calc(var(--space-4) + 0.4em);
}
.lang-fa .auth-otp-input {
  padding-inline-start: var(--space-4);
  padding-inline-end: calc(var(--space-4) + 0.4em);
}
.auth-otp-icon {
  opacity: 0.55;
}
.auth-otp-resend-form {
  margin: 0;
  width: 100%;
}
.auth-footer-resend {
  border: 1.5px dashed rgba(var(--purple-rgb), 0.20);
}
.auth-footer-resend:hover:not(:disabled) {
  border-color: rgba(var(--purple-rgb), 0.40);
}
.auth-otp-countdown {
  font-size: 11px;
  font-weight: 800;
  color: var(--landing-purple);
  direction: ltr;
}
.auth-footer-otp {
  flex-direction: column;
  gap: var(--space-3);
}

/* ----- Altcha ----- */
.auth-field-altcha {
  gap: var(--space-2);
}
.auth-field-altcha .auth-security-label {
  font-size: var(--text-caption);
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}
.auth-card-landing altcha-widget {
  --altcha-max-width: 100%;
  width: 100%;
}

/* ----- پذیرش قوانین (terms) — لایهٔ بنفش، برندهٔ نهایی ----- */
.terms-consent-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  margin-top: var(--space-2);
}
.terms-consent-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: var(--landing-purple-light);
  color: var(--landing-purple);
}
.terms-consent-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.terms-consent-kicker {
  display: block;
  color: var(--landing-purple);
  font-size: var(--text-caption);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}
.terms-consent-heading h1 {
  text-align: start;
}
.terms-consent-heading p {
  margin: var(--space-2) 0 0;
  color: var(--purple-600);
  font-size: var(--text-body-sm);
  line-height: 1.85;
}
.terms-consent-version {
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(var(--purple-rgb), 0.14);
  border-radius: var(--radius-md);
  background: var(--landing-purple-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.terms-consent-version div {
  min-width: 0;
}
.terms-consent-version small {
  display: block;
  color: var(--gray-500);
  font-size: var(--text-caption);
  font-weight: 800;
  margin-bottom: var(--space-1);
}
.terms-consent-version strong {
  display: block;
  color: var(--landing-ink);
  font-size: var(--text-body-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.terms-consent-version > span {
  flex: 0 0 auto;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  color: var(--landing-purple-dark);
  font-size: var(--text-caption);
  font-weight: 900;
}
.terms-consent-preview {
  max-height: 320px;
  overflow: auto;
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border: 1px solid rgba(var(--purple-rgb), 0.14);
  border-radius: var(--radius-md);
  background: var(--gray-0);
  outline: none;
  scrollbar-width: thin;
}
.terms-consent-preview:focus-visible {
  border-color: var(--landing-purple);
  box-shadow: 0 0 0 4px rgba(var(--purple-rgb), 0.12);
}
.terms-consent-preview h2 {
  font-size: var(--text-body);
  color: var(--landing-ink);
  margin: var(--space-4) 0 var(--space-2);
}
.terms-consent-preview h2:first-child {
  margin-top: 0;
}
.terms-consent-preview h3 {
  font-size: var(--text-body-sm);
  color: var(--landing-ink);
  margin: var(--space-3) 0 var(--space-1);
}
.terms-consent-preview p,
.terms-consent-preview li {
  font-size: var(--text-body-sm);
  line-height: 1.9;
  color: var(--purple-700);
}
.terms-consent-preview p {
  margin: 0 0 var(--space-2);
}
.terms-consent-preview ul,
.terms-consent-preview ol {
  padding-inline-start: var(--space-5);
  margin: var(--space-2) 0 var(--space-3);
}
.terms-consent-preview a {
  color: var(--landing-purple);
  font-weight: 700;
  text-decoration: underline;
}
.terms-consent-form {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.terms-consent-check {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--landing-purple-light);
  border: 1px solid rgba(var(--purple-rgb), 0.14);
  color: var(--landing-ink);
  font-size: var(--text-body-sm);
  line-height: 1.8;
  cursor: pointer;
  min-height: var(--touch-target-min);
}
.terms-consent-check input {
  width: 19px;
  height: 19px;
  margin-top: 3px;
  accent-color: var(--landing-purple);
}
.terms-consent-check a {
  color: var(--landing-purple);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.terms-consent-note {
  text-align: center;
  color: var(--gray-500);
  font-size: var(--text-caption);
  line-height: 1.8;
  margin: var(--space-3) 0 0;
}

/* ============================================================
   Responsive (فقط مختص auth)
   ============================================================ */
@media (max-width: 520px) {
  .auth-page-landing {
    padding: var(--space-4) var(--space-3);
  }
  .auth-card-landing {
    padding: var(--space-6) var(--space-5) var(--space-5);
    border-radius: var(--radius-lg);
  }
  .auth-card-landing h1 {
    font-size: 21px;
  }
  .auth-brand-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
  }
  .auth-brand-icon img {
    width: 28px;
    height: 28px;
  }
  .auth-brand-text {
    font-size: 22px;
  }
  .auth-otp-input {
    font-size: 22px;
    letter-spacing: 0.3em;
    height: 54px;
  }
  .auth-otp-input::placeholder {
    font-size: 22px;
    letter-spacing: 0.3em;
  }
  .auth-card-wide {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    padding: var(--space-5) var(--space-4);
  }
  .terms-consent-heading {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .terms-consent-icon {
    width: 40px;
    height: 40px;
  }
  .terms-consent-heading h1 {
    font-size: 20px;
  }
  .terms-consent-preview {
    max-height: 34dvh;
  }
}

@media (max-width: 360px) {
  .auth-card-landing {
    padding: var(--space-5) var(--space-4);
  }
  .auth-footer-landing {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card-landing,
  .auth-ring-1,
  .auth-ring-2 {
    animation: none;
  }
}


/* ============================================================================
   §APPEND — پایه‌های سبزِ کارت/فرم auth (گام ۸ از foundation.css)
   ============================================================================
   عمداً ۱:۱ پورت شد (همان ظاهری که در گام ۱ تأیید شد — pages/auth.css این پایه
   را بازنویسی نمی‌کرد و از foundation می‌آمد). حلقهٔ سبز focus و پس‌زمینه‌های
   سبزفام کاندید فاز ۵ هستند.
   ============================================================================ */

.auth-page { min-height: 100vh; min-height: 100dvh; }

.auth-card {
width:min(100%,440px);
background:#fff;
border:1px solid #e0e9e5;
border-radius:24px;
padding:34px;
box-shadow:0 24px 70px rgba(3,48,73,.10);
text-align:center;
}

.auth-card h1 {
margin:0;
color:var(--ink);
font-size:30px;
}

.auth-form {
text-align:start;
display:grid;
gap:12px;
}

.auth-form label,.auth-security-label {
font-size:14px;
font-weight:700;
color:#344d57;
}

.auth-input,.otp-input {
width:100%;
border:1.5px solid #d8e4df;
border-radius:12px;
background:#f5f8f7;
color:#16343f;
padding:13px 15px;
font:inherit;
outline:none;
transition:border-color .15s,box-shadow .15s;
}

.auth-input:focus,.otp-input:focus {
border-color:var(--green-dark);
box-shadow:0 0 0 4px rgba(46,224,129,.14);
}

.otp-input {
text-align:center;
font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
font-size:30px;
letter-spacing:.42em;
padding-inline-start:calc(15px + .42em);
}

.auth-card altcha-widget {
--altcha-max-width:100%;
width:100%;
}

@media(max-width:520px) {
.auth-card {
padding:27px 20px;
border-radius:18px;
}
}

@media(max-width:520px) {
.auth-card h1 {
font-size:26px;
}
}

.auth-card-landing {
position:relative;
z-index:2;
width:min(100%,430px);
background:rgba(255,255,255,.82);
backdrop-filter:blur(24px) saturate(1.3);
-webkit-backdrop-filter:blur(24px) saturate(1.3);
border:1px solid rgba(124,88,253,.10);
border-radius:28px;
padding:44px 38px 36px;
box-shadow:0 24px 64px rgba(124,88,253,.10),0 4px 16px rgba(26,16,40,.04);
text-align:center;
animation:authCardIn .5s cubic-bezier(.16,1,.3,1) both;
}

.auth-card-landing h1 {
margin:0;
color:var(--landing-ink);
font-size:24px;
font-weight:900;
line-height:1.35;
letter-spacing:-.02em;
}

.auth-card-landing .auth-subtitle {
color:#6a5a8a;
font-size:13px;
line-height:1.85;
margin:10px auto 0;
max-width:340px;
}

.auth-card-landing .auth-alert-error {
display:flex;
align-items:center;
gap:9px;
margin:20px 0 0;
padding:12px 14px;
border-radius:14px;
border:1px solid #f5c6c0;
background:#fef3f2;
color:#b3403a;
font-size:12px;
line-height:1.7;
text-align:start;
animation:authAlertIn .3s ease both;
}

.auth-card-landing .auth-alert-error svg {
flex-shrink:0;
}

.auth-input-wrap {
position:relative;
}

.auth-input-icon {
position:absolute;
inset-inline-start:14px;
top:50%;
transform:translateY(-50%);
color:var(--landing-purple);
opacity:.5;
pointer-events:none;
transition:opacity .2s;
}

.auth-input-landing {
width:100%;
height:52px;
border:1.5px solid rgba(124,88,253,.15);
border-radius:14px;
background:rgba(255,255,255,.9);
color:var(--landing-ink);
padding:0 14px 0 44px;
font-size:15px;
letter-spacing:.02em;
outline:none;
transition:border-color .2s,box-shadow .2s,background .2s;
}

.auth-input-landing:focus {
border-color:var(--landing-purple);
background:#fff;
box-shadow:0 0 0 4px rgba(124,88,253,.10);
}

.auth-input-landing:focus ~ .auth-input-icon, .auth-input-wrap:focus-within .auth-input-icon {
opacity:1;
}

.auth-input-landing::placeholder {
color:#b8aed4;
font-size:14px;
}

.auth-card-landing altcha-widget {
--altcha-max-width:100%;
width:100%;
}

.auth-field-otp .auth-otp-input-wrap:focus-within .auth-otp-icon {
opacity: 1;
}

.auth-card-landing {
padding:36px 24px 28px;
border-radius:22px;
}

.auth-card-landing h1 {
font-size:21px;
}

.auth-card-landing .auth-subtitle {
font-size:12px;
}

.auth-input-landing {
height:50px;
font-size:14px;
}

.auth-card h1 {
font-size:26px;
}


/* ============================================================================
   §APPEND (گام ۸) — پایه‌های کارت/فرم auth از foundation.css + mobile.css
   ============================================================================
   عمداً ۱:۱ پورت شد (همان ظاهر تأییدشدهٔ گام ۱ — pages/auth.css این پایه‌ها را
   بازنویسی نمی‌کرد و از فایل سراسری می‌آمدند). حلقهٔ سبز focus و پس‌زمینه‌های
   سبزفام کاندید فاز ۵ هستند.
   ============================================================================ */

.auth-page {
min-height: 100vh;
min-height: 100dvh;
}

.auth-card {
width:min(100%,440px);
background:#fff;
border:1px solid #e0e9e5;
border-radius:24px;
padding:34px;
box-shadow:0 24px 70px rgba(3,48,73,.10);
text-align:center;
}

.auth-card h1 {
margin:0;
color:var(--ink);
font-size:30px;
}

.auth-form {
text-align:start;
display:grid;
gap:12px;
}

.auth-form label,.auth-security-label {
font-size:14px;
font-weight:700;
color:#344d57;
}

.auth-input,.otp-input {
width:100%;
border:1.5px solid #d8e4df;
border-radius:12px;
background:#f5f8f7;
color:#16343f;
padding:13px 15px;
font:inherit;
outline:none;
transition:border-color .15s,box-shadow .15s;
}

.auth-input:focus,.otp-input:focus {
border-color:var(--green-dark);
box-shadow:0 0 0 4px rgba(46,224,129,.14);
}

.otp-input {
text-align:center;
font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
font-size:30px;
letter-spacing:.42em;
padding-inline-start:calc(15px + .42em);
}

.auth-card altcha-widget {
--altcha-max-width:100%;
width:100%;
}

@media(max-width:520px) {
.auth-card {
padding:27px 20px;
border-radius:18px;
}
}

@media(max-width:520px) {
.auth-card h1 {
font-size:26px;
}
}

.auth-card-landing {
position:relative;
z-index:2;
width:min(100%,430px);
background:rgba(255,255,255,.82);
backdrop-filter:blur(24px) saturate(1.3);
-webkit-backdrop-filter:blur(24px) saturate(1.3);
border:1px solid rgba(124,88,253,.10);
border-radius:28px;
padding:44px 38px 36px;
box-shadow:0 24px 64px rgba(124,88,253,.10),0 4px 16px rgba(26,16,40,.04);
text-align:center;
animation:authCardIn .5s cubic-bezier(.16,1,.3,1) both;
}

.auth-card-landing h1 {
margin:0;
color:var(--landing-ink);
font-size:24px;
font-weight:900;
line-height:1.35;
letter-spacing:-.02em;
}

.auth-card-landing .auth-subtitle {
color:#6a5a8a;
font-size:13px;
line-height:1.85;
margin:10px auto 0;
max-width:340px;
}

.auth-card-landing .auth-alert-error {
display:flex;
align-items:center;
gap:9px;
margin:20px 0 0;
padding:12px 14px;
border-radius:14px;
border:1px solid #f5c6c0;
background:#fef3f2;
color:#b3403a;
font-size:12px;
line-height:1.7;
text-align:start;
animation:authAlertIn .3s ease both;
}

.auth-card-landing .auth-alert-error svg {
flex-shrink:0;
}

.auth-form-landing {
margin-top:28px;
display:grid;
gap:20px;
text-align:start;
}

.auth-input-wrap {
position:relative;
}

.auth-input-icon {
position:absolute;
inset-inline-start:14px;
top:50%;
transform:translateY(-50%);
color:var(--landing-purple);
opacity:.5;
pointer-events:none;
transition:opacity .2s;
}

.auth-input-landing {
width:100%;
height:52px;
border:1.5px solid rgba(124,88,253,.15);
border-radius:14px;
background:rgba(255,255,255,.9);
color:var(--landing-ink);
padding:0 14px 0 44px;
font-size:15px;
letter-spacing:.02em;
outline:none;
transition:border-color .2s,box-shadow .2s,background .2s;
}

.auth-input-landing:focus {
border-color:var(--landing-purple);
background:#fff;
box-shadow:0 0 0 4px rgba(124,88,253,.10);
}

.auth-input-landing:focus ~ .auth-input-icon, .auth-input-wrap:focus-within .auth-input-icon {
opacity:1;
}

.auth-input-landing::placeholder {
color:#b8aed4;
font-size:14px;
}

.auth-card-landing altcha-widget {
--altcha-max-width:100%;
width:100%;
}

.auth-field-otp .auth-otp-input-wrap:focus-within .auth-otp-icon {
opacity: 1;
}

@media(max-width:520px) {
.auth-card-landing {
padding:36px 24px 28px;
border-radius:22px;
}
}

@media(max-width:520px) {
.auth-card-landing h1 {
font-size:21px;
}
}

@media(max-width:520px) {
.auth-card-landing .auth-subtitle {
font-size:12px;
}
}

@media(max-width:520px) {
.auth-input-landing {
height:50px;
font-size:14px;
}
}

@media(max-width:360px) {
.auth-card-landing {
padding:28px 18px 24px;
}
}

@media(prefers-reduced-motion:reduce) {
.auth-card-landing {
animation:none;
}
}

@media(max-width:520px) {
.auth-card {
padding:27px 20px;
border-radius:18px;
}
}

@media(max-width:520px) {
.auth-card h1 {
font-size:26px;
}
}

/* ============================================================================
   Segmented OTP control
   One real input preserves one-time-code autofill/paste/accessibility; the six
   visual slots are presentation only. Without JS the ordinary input remains.
   ============================================================================ */
.auth-otp-control {
  position: relative;
  width: 100%;
}

.auth-otp-slots {
  display: none;
}

.auth-otp-control.is-enhanced {
  max-width: 328px;
  margin-inline: auto;
}

.auth-otp-control.is-enhanced .auth-otp-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 16px;
  letter-spacing: 0;
  opacity: 0.01;
  cursor: text;
  box-shadow: none;
}

.auth-otp-control.is-enhanced .auth-otp-input:focus {
  box-shadow: none;
  outline: none;
  letter-spacing: 0;
}

.auth-otp-control.is-enhanced .auth-otp-slots {
  display: flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
  direction: ltr;
  pointer-events: none;
}

.auth-otp-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1.5px solid rgba(var(--purple-rgb), 0.16);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--landing-ink);
  font-family: var(--font-body-fa);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgba(var(--purple-rgb), 0.04);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.auth-otp-slot.is-filled {
  border-color: rgba(var(--purple-rgb), 0.30);
  background: var(--gray-0);
}

.auth-otp-slot.is-active {
  border-color: var(--landing-purple);
  background: var(--gray-0);
  box-shadow: 0 0 0 3px rgba(var(--purple-rgb), 0.10);
}

@media (max-width: 520px) {
  .auth-otp-control.is-enhanced {
    max-width: 286px;
  }

  .auth-otp-control.is-enhanced .auth-otp-slots {
    gap: 7px;
  }

  .auth-otp-slot {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 19px;
  }
}

@media (max-width: 340px) {
  .auth-otp-control.is-enhanced {
    max-width: 246px;
  }

  .auth-otp-control.is-enhanced .auth-otp-slots {
    gap: 6px;
  }

  .auth-otp-slot {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 17px;
  }
}
