/* ژیورا | ورود و ثبت‌نام — پس از zhiura-responsive.css بارگذاری شود. */
@property --zhiura-auth-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* ۱. لینک‌های تغییر فرم؛ تمام رویدادهای قبلی دکمه‌ها حفظ می‌شوند. */
.auth-page .auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-block-start: 24px;
}
.auth-page .auth-links :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 108px;
  min-height: 44px;
  height: auto;
  padding: 10px 18px;
  border: 1px solid #c9a24a55;
  border-radius: 14px;
  background: linear-gradient(145deg, #145149, #093b35);
  color: #efd58b;
  font: inherit;
  font-weight: 600;
  line-height: 1.8;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: 4px 5px 12px #001d1a66, -2px -2px 7px #ffffff09,
    inset 1px 1px 1px #ffffff14;
  transition: transform .18s ease, box-shadow .18s ease,
    border-color .18s ease, color .18s ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .auth-page .auth-links :is(button, a):hover {
    transform: translateY(-2px);
    color: #ffe8aa;
    border-color: #dfc474;
    box-shadow: 5px 7px 16px #001d1a77, -2px -2px 8px #ffffff0b,
      inset 1px 1px 1px #ffffff20;
  }
}
.auth-page .auth-links :is(button, a):active {
  transform: translateY(0);
  box-shadow: inset 3px 3px 7px #001d1a66,
    inset -2px -2px 5px #ffffff09;
}
.auth-page .auth-links :is(button, a):focus-visible {
  outline: 2px solid #efd58b;
  outline-offset: 4px;
}
.auth-page .auth-links button:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

/* ۲. نوار طلایی دائمی؛ فقط پس‌زمینه بوردر حرکت می‌کند، خود فیلد نمی‌چرخد.
   phone-field قاب مشترک کد کشور و شماره است؛ داخلش قاب دوم نمی‌سازیم. */
.auth-page :is(.auth-text-input, .otp-input, .phone-field) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  border: 1px solid transparent;
  background:
    linear-gradient(135deg, #10483f, #073b35) padding-box,
    conic-gradient(from var(--zhiura-auth-angle, 0deg),
      #c9a24a24 0deg 245deg,
      #c9a24a75 275deg,
      #ffe29a 305deg,
      #c9a24a 330deg,
      #c9a24a24 360deg) border-box;
  animation: zhiura-auth-border-orbit 4s linear infinite;
}
.auth-page :is(.auth-text-input, .otp-input):focus-visible,
.auth-page .phone-field:focus-within {
  border-color: transparent;
  outline: 2px solid #dfc47488;
  outline-offset: 3px;
}
/* قاب موبایل همان یک قاب بیرونی است. */
.auth-page .phone-field input {
  background: transparent;
  border: 0;
  min-width: 0;
}
@keyframes zhiura-auth-border-orbit {
  to { --zhiura-auth-angle: 360deg; }
}

/* ۳. عرض‌های باریک؛ هیچ عرض ثابت بزرگی به لینک‌ها تحمیل نمی‌شود. */
@media (max-width: 480px) {
  .auth-page .auth-links { gap: 10px; }
  .auth-page .auth-links :is(button, a) {
    padding: 10px 14px;
    font-size: 12px;
  }
}
/* برای کاربری که کاهش حرکت را در سیستم انتخاب کرده، قاب طلایی ثابت است. */
@media (prefers-reduced-motion: reduce) {
  .auth-page :is(.auth-text-input, .otp-input, .phone-field) {
    animation: none;
    --zhiura-auth-angle: 305deg;
  }
  .auth-page .auth-links :is(button, a) { transition: none; transform: none; }
}



/* قاب اینپوت‌های ورود، ثبت‌نام و تغییر رمز */
.auth-page .auth-input-frame {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    border-radius: 14px;
    isolation: isolate;
}

    /* فقط خط دور کادر حرکت می‌کند */
    .auth-page .auth-input-frame::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 2;
        padding: 1px;
        border-radius: inherit;
        pointer-events: none;
        background: conic-gradient( from var(--zhiura-auth-angle, 0deg), #c9a24a24 0deg 245deg, #c9a24a75 275deg, #ffe29a 305deg, #c9a24a 330deg, #c9a24a24 360deg );
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        mask-composite: exclude;
        animation: zhiura-auth-border-orbit 4s linear infinite;
    }

    /* حذف بوردر و حلقه ثابت هنگام کلیک و فوکوس */
    .auth-page .auth-input-frame .auth-text-input,
    .auth-page .auth-input-frame .auth-text-input:focus,
    .auth-page .auth-input-frame .auth-text-input:focus-visible {
        display: block;
        width: 100%;
        margin: 0;
        border: 1px solid #173f36 !important;
        border-radius: inherit;
        outline: none !important;
        background: linear-gradient(135deg, #10483f, #073b35);
        animation: none;
        box-shadow: inset 3px 3px 8px #001e1b66 !important;
    }

/* حذف حلقه ثابت شماره موبایل ثبت‌نام و کد تأیید */
.auth-page .phone-field:focus-within,
.auth-page .otp-input:focus,
.auth-page .otp-input:focus-visible {
    border-color: transparent !important;
    outline: none !important;
    box-shadow: inset 3px 3px 8px #001e1b66 !important;
}

/* حفظ رنگ داخل فیلد در حالت پرشدن خودکار مرورگر */
.auth-page .auth-input-frame .auth-text-input:-webkit-autofill {
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    -webkit-box-shadow: inset 0 0 0 1000px #0b4039 !important;
    box-shadow: inset 0 0 0 1000px #0b4039 !important;
}

@media (prefers-reduced-motion: reduce) {
    .auth-page .auth-input-frame::after {
        animation: none;
    }
}