/* ==========================================================================
   GYNEX — صفحات احراز هویت (ورود، ثبت‌نام، بازیابی رمز)
   مستقل از styles.css قالب اصلی (۲۳هزار خط) تا صفحه‌ی ورود سبک و سریع بماند.
   طراحی: کارت تیره + درخشش رنگی پایین کارت؛ آبی = ورود، بنفش = ساخت حساب.
   ساختار: tokens → پایه → کارت → فیلد → دکمه‌ها → پیام‌ها → موبایل → حرکت.
   ========================================================================== */

@font-face {
  font-family: IRANSans; font-style: normal; font-weight: 400; font-display: swap;
  src: url('./font/woff2/IRANSansWeb(FaNum).woff2') format('woff2'),
       url('./font/woff/IRANSansWeb(FaNum).woff') format('woff');
}
@font-face {
  font-family: IRANSans; font-style: normal; font-weight: 500; font-display: swap;
  src: url('./font/woff2/IRANSansWeb(FaNum)_Medium.woff2') format('woff2'),
       url('./font/woff/IRANSansWeb(FaNum)_Medium.woff') format('woff');
}
@font-face {
  font-family: IRANSans; font-style: normal; font-weight: 700; font-display: swap;
  src: url('./font/woff2/IRANSansWeb(FaNum)_Bold.woff2') format('woff2'),
       url('./font/woff/IRANSansWeb(FaNum)_Bold.woff') format('woff');
}

/* ---------------------------------------------------------------- tokens */
.gx-auth {
  /* سطح‌ها */
  --gx-page: #0c0c0e;
  --gx-card: #08080a;
  --gx-field: rgba(255, 255, 255, .035);
  --gx-field-hover: rgba(255, 255, 255, .055);
  --gx-field-autofill: #131316;
  --gx-line: rgba(255, 255, 255, .08);
  --gx-line-strong: rgba(255, 255, 255, .14);
  /* متن — همه روی #08080a کنتراست ≥ ۴.۵:۱ دارند */
  --gx-text: #fafafa;
  --gx-text-2: #c8c8d0;
  --gx-text-3: #8f8f99;
  --gx-danger: #ff7a7a;
  --gx-danger-bg: rgba(255, 122, 122, .08);
  --gx-danger-line: rgba(255, 122, 122, .32);
  --gx-success: #5ee29a;
  --gx-success-bg: rgba(94, 226, 154, .08);
  --gx-success-line: rgba(94, 226, 154, .30);
  --gx-warn: #ffc56b;
  /* لهجه‌ی رنگی (پیش‌فرض: آبیِ ورود) */
  --gx-glow: 59, 91, 255;          /* rgb بدون rgb() تا در rgba ترکیب شود */
  --gx-accent-ink: #2a45e0;        /* متن دکمه‌ی سفید — روی سفید ۶.۶:۱ */
  --gx-accent-soft: #8fa3ff;       /* لینک روی زمینه‌ی تیره — ۷.۸:۱ */
  /* شکل و حرکت */
  --gx-radius-card: 28px;
  --gx-radius-pill: 999px;
  --gx-field-h: 56px;
  --gx-ease-out: cubic-bezier(.16, 1, .3, 1);
  --gx-fast: 160ms;
  --gx-mid: 240ms;
}
.gx-auth--violet {
  --gx-glow: 124, 58, 237;
  --gx-accent-ink: #6d28d9;        /* روی سفید ۷.۱:۱ */
  --gx-accent-soft: #c4a4ff;
}

/* ---------------------------------------------------------------- پایه */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.gx-auth {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: IRANSans, Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--gx-text);
  background-color: var(--gx-page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* :where() = specificity صفر، تا کلاس‌های کامپوننت (.gx-btn, .gx-link) رنگ خود را نگه دارند */
:where(.gx-auth) a { color: inherit; }
:where(.gx-auth) button, :where(.gx-auth) input { font: inherit; color: inherit; }
/* نور محیطی صفحه — لایه‌ی fixed جدا به‌جای background-attachment:fixed (کند روی موبایل،
   و در صفحه‌ی بلندتر از viewport درست رندر نمی‌شود) */
body.gx-auth::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 88% -12%, rgba(255, 255, 255, .09), transparent 60%),
    radial-gradient(760px 560px at 6% 112%, rgba(var(--gx-glow), .16), transparent 62%);
}
.gx-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.gx-skip {
  position: absolute; top: 12px; right: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 12px;
  background: #fff; color: #111; font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform var(--gx-fast) ease;
}
.gx-skip:focus-visible { transform: translateY(0); }

/* ---------------------------------------------------------------- کارت */
.gx-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 26px;
  border-radius: var(--gx-radius-card);
  border: 1px solid var(--gx-line);
  background: linear-gradient(180deg, #0d0d10 0%, var(--gx-card) 55%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .05) inset,
    0 30px 80px -20px rgba(0, 0, 0, .75),
    0 0 0 1px rgba(0, 0, 0, .4);
  overflow: hidden;
  animation: gx-card-in 520ms var(--gx-ease-out) both;
}
/* درخشش پایین کارت — لایه‌ی جدا تا «تنفس» آرامش فقط opacity را تغییر دهد */
.gx-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 48% at 50% 112%,
      rgba(var(--gx-glow), .95) 0%,
      rgba(var(--gx-glow), .62) 30%,
      rgba(var(--gx-glow), .18) 58%,
      rgba(var(--gx-glow), 0) 78%);
  animation: gx-breathe 8s ease-in-out infinite;
}
/* رگه‌ی نور ظریف روی لبه‌ی بالایی */
.gx-card::after {
  content: "";
  position: absolute;
  top: 0; left: 18%; right: 18%;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
}

.gx-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.gx-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: var(--gx-radius-pill);
  border: 1px solid var(--gx-line);
  background: rgba(255, 255, 255, .03);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gx-text-2);
  text-decoration: none;
  direction: ltr;
  transition: border-color var(--gx-fast) ease, color var(--gx-fast) ease;
}
.gx-brand__mark:hover { border-color: var(--gx-line-strong); color: var(--gx-text); }
.gx-brand__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgb(var(--gx-glow));
  box-shadow: 0 0 12px rgba(var(--gx-glow), .9);
}

.gx-title {
  margin: 0;
  text-align: center;
  font-size: 26px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--gx-text);
}
.gx-subtitle {
  margin: 6px auto 0;
  max-width: 40ch;
  text-wrap: balance;
  text-align: center;
  font-size: 13.5px;
  color: var(--gx-text-3);
}
.gx-header { margin-bottom: 24px; }

/* ---------------------------------------------------------------- ورود اجتماعی */
.gx-social {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 12px;
}
.gx-social__slot { position: relative; min-width: 0; }
.gx-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border-radius: var(--gx-radius-pill);
  border: 1px solid var(--gx-line-strong);
  background: rgba(255, 255, 255, .02);
  color: var(--gx-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--gx-fast) ease, border-color var(--gx-fast) ease,
              transform var(--gx-fast) var(--gx-ease-out);
}
.gx-social__btn svg { width: 20px; height: 20px; flex: none; }
.gx-social__btn:hover,
.gx-social__slot:hover .gx-social__btn {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .24);
}
.gx-social__btn:active { transform: scale(.97); }
.gx-social__btn[aria-busy="true"] { opacity: .6; pointer-events: none; }
/* دکمه‌ی واقعی گوگل (iframe رسمی GSI) نامرئی روی دکمه‌ی ما — کلیک مستقیم به گوگل می‌رسد */
.gx-google-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--gx-radius-pill);
  opacity: .011;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gx-google-overlay > div { transform: scale(1.25); transform-origin: center; }

.gx-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--gx-text-3);
}
.gx-divider::before,
.gx-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gx-line-strong), transparent);
}

/* ---------------------------------------------------------------- فیلد */
.gx-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.gx-group { display: flex; flex-direction: column; gap: 6px; }

.gx-field {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--gx-field-h);
  border-radius: var(--gx-radius-pill);
  border: 1px solid var(--gx-line);
  background: var(--gx-field);
  transition: border-color var(--gx-fast) ease, background-color var(--gx-fast) ease,
              box-shadow var(--gx-fast) ease;
}
.gx-field:hover { background: var(--gx-field-hover); border-color: var(--gx-line-strong); }
.gx-field:focus-within {
  border-color: rgba(var(--gx-glow), .85);
  background: var(--gx-field-hover);
  box-shadow: 0 0 0 4px rgba(var(--gx-glow), .22);
}
.gx-field.is-invalid { border-color: var(--gx-danger-line); }
.gx-field.is-invalid:focus-within { box-shadow: 0 0 0 4px rgba(255, 122, 122, .16); border-color: var(--gx-danger); }
.gx-field.is-valid .gx-field__icon { color: var(--gx-success); }

/* صفحه همیشه RTL است، ولی مقدار فیلدها (ایمیل، تلفن، رمز) LTR تایپ می‌شود؛
   پس فاصله‌ها فیزیکی‌اند (right/left) نه منطقی، تا با dir="ltr" ورودی جابه‌جا نشوند. */
.gx-field__icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--gx-text-3);
  pointer-events: none;
  transition: color var(--gx-fast) ease;
}
.gx-field__icon svg { width: 19px; height: 19px; }
.gx-field:focus-within .gx-field__icon { color: rgb(var(--gx-glow)); filter: brightness(1.45); }
.gx-field.is-invalid .gx-field__icon { color: var(--gx-danger); filter: none; }

.gx-field__input {
  width: 100%;
  height: 100%;
  padding: 20px 50px 4px 18px;
  border: 0;
  border-radius: inherit;
  outline: none;
  background: transparent;
  color: var(--gx-text);
  font-size: 15px;
  text-align: right;
  caret-color: rgb(var(--gx-glow));
}
.gx-field__input::placeholder { color: transparent; }
.gx-field--action .gx-field__input { padding-left: 52px; }
.gx-field__input:-webkit-autofill,
.gx-field__input:-webkit-autofill:hover,
.gx-field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--gx-text);
  -webkit-box-shadow: 0 0 0 100px var(--gx-field-autofill) inset;
  box-shadow: 0 0 0 100px var(--gx-field-autofill) inset;
  transition: background-color 9999s ease 0s;
}

.gx-field__label {
  position: absolute;
  right: 50px;
  top: 50%;
  max-width: calc(100% - 110px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14.5px;
  color: var(--gx-text-3);
  pointer-events: none;
  transform: translateY(-50%);
  transform-origin: right center;
  transition: transform var(--gx-mid) var(--gx-ease-out), color var(--gx-fast) ease;
}
.gx-field__req { color: var(--gx-danger); margin-inline-start: 2px; }
.gx-field__input:focus + .gx-field__label,
.gx-field__input:not(:placeholder-shown) + .gx-field__label,
.gx-field__input:-webkit-autofill + .gx-field__label {
  transform: translateY(calc(-50% - 11px)) scale(.78);
  color: var(--gx-text-2);
}
.gx-field__input:focus + .gx-field__label { color: var(--gx-accent-soft); }
.gx-field.is-invalid .gx-field__label { color: var(--gx-danger); }

.gx-field__action {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gx-text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--gx-fast) ease, background-color var(--gx-fast) ease;
}
.gx-field__action svg { width: 19px; height: 19px; }
.gx-field__action:hover { color: var(--gx-text); background: rgba(255, 255, 255, .06); }
.gx-field__action:focus-visible { outline: 2px solid rgba(var(--gx-glow), .9); outline-offset: 0; color: var(--gx-text); }
.gx-field__action .gx-ic-eye-off { display: none; }
.gx-field__action[aria-pressed="true"] .gx-ic-eye { display: none; }
.gx-field__action[aria-pressed="true"] .gx-ic-eye-off { display: block; }

.gx-msg {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0 18px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--gx-text-3);
}
.gx-msg svg { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.gx-msg--error { color: var(--gx-danger); }
.gx-msg--warn { color: var(--gx-warn); }
.gx-msg[hidden] { display: none; }

/* نوار قدرت رمز — رنگ + متن (نه فقط رنگ) */
.gx-strength { display: flex; align-items: center; gap: 10px; padding: 0 18px; }
.gx-strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: 1; }
.gx-strength__bars span {
  height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08);
  transition: background-color var(--gx-mid) ease;
}
.gx-strength__text { font-size: 12px; color: var(--gx-text-3); min-width: 4.5em; text-align: left; }
.gx-strength[data-level="1"] .gx-strength__bars span:nth-child(-n+1) { background: #ff7a7a; }
.gx-strength[data-level="2"] .gx-strength__bars span:nth-child(-n+2) { background: #ffc56b; }
.gx-strength[data-level="3"] .gx-strength__bars span:nth-child(-n+3) { background: #8fd3ff; }
.gx-strength[data-level="4"] .gx-strength__bars span:nth-child(-n+4) { background: #5ee29a; }

.gx-row-link { display: flex; justify-content: center; margin: -2px 0 2px; }
.gx-link {
  color: var(--gx-accent-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  padding: 4px 6px;
  transition: color var(--gx-fast) ease;
}
.gx-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.gx-link:focus-visible { outline: 2px solid rgba(var(--gx-glow), .9); outline-offset: 2px; }

/* ---------------------------------------------------------------- دکمه‌ی اصلی */
.gx-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  margin-top: 6px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--gx-radius-pill);
  background: #fff;
  color: var(--gx-accent-ink);
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 10px 30px -10px rgba(0, 0, 0, .6);
  transition: transform var(--gx-fast) var(--gx-ease-out), box-shadow var(--gx-mid) ease,
              background-color var(--gx-fast) ease;
}
.gx-btn:hover {
  background: #f5f6ff;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 16px 36px -12px rgba(var(--gx-glow), .75);
}
.gx-btn:active { transform: translateY(0) scale(.985); }
.gx-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--gx-card), 0 0 0 5px rgba(255, 255, 255, .9);
}
.gx-btn[disabled], .gx-btn.is-loading { cursor: progress; }
.gx-btn.is-loading { color: transparent; pointer-events: none; }
.gx-btn.is-loading::after {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(var(--gx-glow), .25);
  border-top-color: var(--gx-accent-ink);
  animation: gx-spin .7s linear infinite;
}
.gx-btn svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- پایین کارت */
.gx-footer { margin-top: 20px; text-align: center; }
.gx-switch { margin: 0; font-size: 13.5px; color: var(--gx-text-2); }
.gx-switch a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  padding: 2px 4px;
}
.gx-switch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gx-switch a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gx-legal {
  margin: 14px auto 0;
  max-width: 44ch;
  text-wrap: balance;
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .78);
}
.gx-legal a { color: #fff; font-weight: 500; text-decoration: none; white-space: nowrap; }
.gx-legal a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gx-legal a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.gx-hint-tg { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--gx-text-3); }

/* ---------------------------------------------------------------- پیام‌ها (Django messages) */
.gx-alerts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.gx-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 8px 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--gx-line-strong);
  background: rgba(255, 255, 255, .04);
  color: var(--gx-text-2);
  font-size: 13.5px;
  line-height: 1.65;
  animation: gx-fade-in var(--gx-mid) var(--gx-ease-out) both;
}
.gx-alert__icon { display: flex; margin-top: 2px; }
.gx-alert__icon svg { width: 18px; height: 18px; }
.gx-alert__text { flex: 1; }
.gx-alert__close {
  flex: none;
  width: 36px; height: 36px;
  margin: -6px 0 -6px -2px;
  border: 0; border-radius: 50%;
  background: transparent; color: inherit; opacity: .7;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.gx-alert__close:hover { opacity: 1; background: rgba(255, 255, 255, .06); }
.gx-alert__close:focus-visible { outline: 2px solid currentColor; opacity: 1; }
.gx-alert__close svg { width: 16px; height: 16px; }
.gx-alert--error { background: var(--gx-danger-bg); border-color: var(--gx-danger-line); color: #ffd0d0; }
.gx-alert--error .gx-alert__icon { color: var(--gx-danger); }
.gx-alert--success { background: var(--gx-success-bg); border-color: var(--gx-success-line); color: #cbf5dc; }
.gx-alert--success .gx-alert__icon { color: var(--gx-success); }
.gx-alert--warning { border-color: rgba(255, 197, 107, .32); background: rgba(255, 197, 107, .07); color: #ffe6bf; }
.gx-alert--warning .gx-alert__icon { color: var(--gx-warn); }

/* وضعیت (ایمیل ارسال شد / لینک نامعتبر) */
.gx-status { display: flex; justify-content: center; margin-bottom: 16px; }
.gx-status__icon {
  width: 60px; height: 60px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gx-line-strong);
  background: rgba(var(--gx-glow), .12);
  color: var(--gx-accent-soft);
}
.gx-status__icon svg { width: 28px; height: 28px; }
.gx-status__icon--danger { background: var(--gx-danger-bg); border-color: var(--gx-danger-line); color: var(--gx-danger); }

/* ---------------------------------------------------------------- موبایل / وب‌اپ */
@media (max-width: 560px) {
  body.gx-auth {
    padding: 0;
    align-items: stretch;
  }
  body.gx-auth::before { display: none; }
  .gx-card {
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(env(safe-area-inset-top, 0px) + 28px) 20px calc(env(safe-area-inset-bottom, 0px) + 22px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    animation: gx-fade-in 360ms var(--gx-ease-out) both;
  }
  .gx-card::before {
    background:
      radial-gradient(150% 42% at 50% 108%,
        rgba(var(--gx-glow), .95) 0%,
        rgba(var(--gx-glow), .58) 32%,
        rgba(var(--gx-glow), .14) 62%,
        rgba(var(--gx-glow), 0) 82%);
  }
  .gx-card::after { display: none; }
  /* محتوا وسط صفحه، پایین کارت همیشه ته صفحه روی درخشش (فضای خالی بین دو margin خودکار تقسیم می‌شود) */
  .gx-main { width: 100%; max-width: 440px; margin: auto auto 0; }
  .gx-footer { margin: auto auto 0; padding-top: 28px; width: 100%; max-width: 440px; }
  .gx-title { font-size: 24px; }
  /* ۱۶px: iOS روی فیلد کوچک‌تر از این zoom می‌کند */
  .gx-field__input { font-size: 16px; }
  .gx-social__btn { height: 52px; }
  .gx-btn { height: 54px; font-size: 16px; }
}
@media (max-width: 360px) {
  .gx-social__label { display: none; }   /* فقط آیکون، aria-label دکمه باقی است */
  .gx-card { padding-inline: 16px; }
}
/* گوشی افقی یا صفحه‌ی کوتاه: فشرده‌تر و قابل اسکرول */
@media (max-height: 640px) {
  body.gx-auth { align-items: flex-start; }
  .gx-card { justify-content: flex-start; padding-top: calc(env(safe-area-inset-top, 0px) + 20px); }
  .gx-main { margin-top: 0; }
  .gx-header { margin-bottom: 18px; }
  .gx-divider { margin: 16px 0; }
  .gx-brand { margin-bottom: 12px; }
}
/* دسکتاپ بزرگ: کارت کمی بزرگ‌تر */
@media (min-width: 1440px) {
  .gx-card { max-width: 440px; padding: 40px 36px 28px; }
}

/* ---------------------------------------------------------------- حرکت */
@keyframes gx-card-in {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes gx-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gx-breathe { 0%, 100% { opacity: .9; } 50% { opacity: 1; } }
@keyframes gx-spin { to { transform: rotate(360deg); } }
@keyframes gx-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}
.gx-field.is-shaking { animation: gx-shake 360ms ease both; }

@media (prefers-reduced-motion: reduce) {
  .gx-card, .gx-card::before, .gx-alert, .gx-field.is-shaking { animation: none !important; }
  .gx-auth *, .gx-auth *::before, .gx-auth *::after { transition-duration: 1ms !important; }
  .gx-btn.is-loading::after { animation-duration: 1.6s; }
}
/* حالت کنتراست بالا ویندوز */
@media (forced-colors: active) {
  .gx-field, .gx-social__btn, .gx-btn { border: 1px solid CanvasText; }
  .gx-card::before { display: none; }
}

/* ---------------------------------------------------------------- هویت تاییدشده (مرحله‌ی شماره بعد از گوگل) */
.gx-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 1px solid var(--gx-line-strong);
  background: rgba(255, 255, 255, .03);
}
.gx-identity__icon {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .06);
}
.gx-identity__icon svg { width: 20px; height: 20px; }
.gx-identity__text { display: flex; flex-direction: column; min-width: 0; }
.gx-identity__label { font-size: 12px; color: var(--gx-text-3); }
.gx-identity__email {
  font-size: 14px; font-weight: 500; color: var(--gx-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right;
}
