@font-face {
  font-family: "Vazirmatn";
  src: url("YekanBakh-VF.woff2");
}

:root {
  --bg: #080808;
  --bg-elevated: #141414;
  --card: #161616;
  --card-border: #2a2a2a;
  --input-bg: #111111;
  --input-border: #2e2e2e;
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --text-soft: #6e6e6e;
  --accent: #00cc85;
  --accent-hover: #00b875;
  --accent-dark: #0a1f14;
  --nav-height: 64px;
  --radius: 16px;
  --radius-sm: 12px;
  --font: "Vazirmatn", Tahoma, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

/* ── Header ── */
.header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header__right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo__img {
  display: block;
  width: 40px;
  height: 32px;
  object-fit: contain;
}

.logo__mark {
  width: 32px;
  height: 32px;
  display: block;
}

.logo__text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--text);
}

.header__left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* ── Main ── */
.main {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--nav-height) + 40px) 40px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.auth-layout {
  width: 100%;
  max-width: 1160px;
  display: grid;
  grid-template-columns: minmax(512px, 560px) 1fr;
  gap: 48px;
  align-items: center;
  justify-content: center;
}

/* ── Promo (visual) ── */
.promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.promo__image-wrap {
  width: 384px;
  height: 368px;
  margin-bottom: 28px;
  position: relative;
}

.promo__image-wrap::after {
  content: "";
  position: absolute;
  inset: 40% -10% -15%;
  background: radial-gradient(ellipse at center, rgba(0, 204, 133, 0.18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.promo__image {
  width: 384px;
  height: 368px;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 20px 40px rgba(0, 204, 133, 0.15));
}

.promo__image--mobile {
  display: none;
}

.promo__title {
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

/* keep auth layout from stretching when SEO is outside */
.main {
  width: 100%;
}

.promo__subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Auth card ── */
.auth-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  width: 512px;
  max-width: 512px;
  margin-inline: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.auth-tabs {
  display: flex;
  gap: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--card-border);
}

.auth-tab {
  position: relative;
  padding: 0 0 14px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}

.auth-tab:hover:not(.is-disabled):not(:disabled) {
  color: var(--text);
}

.auth-tab.is-active {
  color: var(--text);
}

.auth-tab.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  inset-inline: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.auth-tab.is-disabled,
.auth-tab:disabled {
  color: var(--text-soft);
  cursor: not-allowed;
  opacity: 0.55;
}

.auth-panel {
  display: none;
}

.auth-panel.is-active {
  display: block;
}

.auth-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.6;
  font-weight: 500;
}

.auth-alert--danger {
  background: rgba(220, 53, 69, 0.12);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #ff6b7a;
}

.auth-alert.hide {
  display: none !important;
}

.form-group {
  margin-bottom: 14px;
}

.form-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input::placeholder {
  color: var(--text-soft);
}

.form-input:focus {
  border-color: rgba(0, 204, 133, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 204, 133, 0.08);
}

.form-input-wrap {
  position: relative;
}

.form-input-wrap .form-input {
  padding-inline-end: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 8px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #8a8a8a;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
  color: #01bb7a;
  background: rgba(1, 187, 122, 0.08);
}

.password-toggle:focus-visible {
  outline: none;
  color: #01bb7a;
  background: rgba(1, 187, 122, 0.12);
}

.password-toggle.is-visible {
  color: #01bb7a;
}

.password-toggle__icons {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto;
}

.password-toggle__icon {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.password-toggle__icon.is-eye {
  opacity: 1;
  visibility: visible;
}

.password-toggle__icon.is-eye-off {
  opacity: 0;
  visibility: hidden;
}

.password-toggle.is-visible .password-toggle__icon.is-eye {
  opacity: 0;
  visibility: hidden;
}

.password-toggle.is-visible .password-toggle__icon.is-eye-off {
  opacity: 1;
  visibility: visible;
}

.forgot-link {
  display: block;
  width: fit-content;
  margin-top: 6px;
  margin-bottom: 22px;
  margin-inline-start: auto;
  font-size: 0.85rem;
  color: #01bb7a;
  font-weight: 500;
  transition: opacity 0.2s;
}

.forgot-link:hover {
  opacity: 0.85;
}

.btn-primary {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #0a0a0a;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.985);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary.is-loading {
  opacity: 1;
  pointer-events: none;
  position: relative;
}

.btn-primary.is-loading .btn-primary__text {
  visibility: hidden;
}

.btn-primary__loader {
  display: none;
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(10, 10, 10, 0.2);
  border-top-color: #0a0a0a;
  border-radius: 50%;
  animation: otp-spin 0.75s linear infinite;
  position: absolute;
  inset: 0;
  margin: auto;
}

.btn-primary.is-loading .btn-primary__loader {
  display: block;
}

/* ── Auth footer (login) ── */
.auth-footer {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-footer__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.auth-footer__item--link {
  transition: opacity 0.2s;
}

.auth-footer__item--link:hover {
  opacity: 0.85;
}

.auth-footer__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #ffffff;
}

.auth-footer__text {
  flex: 1;
}

.auth-footer__text strong {
  color: #ffffff;
  font-weight: 700;
}

.auth-footer__chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #ffffff;
  margin-inline-start: auto;
}

/* ── Email OTP verify ── */
.verify-card {
  width: 560px;
  max-width: 560px;
  padding: 32px 32px 28px;
}

.otp-group + .otp-group {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--card-border);
}

.otp-group__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.otp-group .verify-desc {
  margin-bottom: 16px;
}

.otp-group .otp-hint {
  margin-bottom: 8px;
}

.otp-group:last-of-type .otp-hint {
  margin-bottom: 24px;
}

.otp-timer-text {
  display: inline-flex;
  align-items: center;
}

.verify-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.verify-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--text);
  flex-shrink: 0;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.verify-back:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.verify-back svg {
  width: 20px;
  height: 20px;
}

.verify-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.verify-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  line-height: 1.7;
}

.verify-desc strong {
  color: var(--text);
  font-weight: 700;
}

.otp-inputs {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

@keyframes otp-spin {
  to {
    transform: rotate(360deg);
  }
}

.otp-input {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  max-width: 64px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text);
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  outline: none;
  caret-color: #01bb7a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.otp-input:focus {
  border-color: rgba(1, 187, 122, 0.55);
  box-shadow: 0 0 0 3px rgba(1, 187, 122, 0.1);
}

.otp-input.is-filled {
  border-color: #2e2e2e;
}

.otp-meta {
  display: flex;
  justify-content: flex-start;
  direction: ltr;
  margin-bottom: 18px;
}

.otp-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #01bb7a;
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.otp-timer svg {
  width: 16px;
  height: 16px;
}

.otp-timer.is-expired {
  color: var(--text-muted);
}

.otp-resend {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: #01bb7a;
  cursor: pointer;
  font-weight: 600;
}

.otp-resend:hover {
  opacity: 0.85;
}

.otp-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.otp-hint__dot {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: #f5c542;
  flex-shrink: 0;
}

/* ── Support FAB ── */
.support-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 204, 133, 0.35);
  z-index: 90;
  transition: transform 0.2s, background 0.2s;
}

.support-fab:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.support-fab svg {
  width: 24px;
  height: 24px;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .main {
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(var(--nav-height) + 18px) 16px 40px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 512px;
    align-items: stretch;
  }

  .auth-card {
    width: 100%;
    max-width: 512px;
  }

  .promo {
    order: -1;
    width: 100%;
    margin: 0 0 4px;
  }

  .promo__image-wrap {
    width: calc(100% - 24px);
    max-width: none;
    height: auto;
    margin: 0 auto;
  }

  .promo__image-wrap::after {
    display: none;
  }

  .promo__image--desktop {
    display: none;
  }

  .promo__image--mobile {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    margin: 0 auto;
    aspect-ratio: auto;
    filter: none;
    border: 1px solid #323232;
    border-radius: 16px;
    object-fit: cover;
  }

  .promo__title,
  .promo__subtitle {
    display: none;
  }

  .nav {
    display: none;
  }

  .header {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .main {
    padding: calc(var(--nav-height) + 16px) 12px 40px;
  }

  .auth-card {
    padding: 22px 18px 20px;
  }

  .promo__image-wrap {
    width: calc(100% - 16px);
  }

  .promo__image--mobile {
    border-radius: 14px;
  }

  .auth-footer__item {
    font-size: 0.72rem;
  }

  .verify-card {
    width: 100%;
    max-width: 560px;
  }

  .otp-inputs {
    gap: 8px;
  }

  .otp-input {
    width: 48px;
    height: 52px;
    font-size: 1.15rem;
  }
}



#overlay {
  position: fixed;
  display: block;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 999999;
  }
  
  #overlay-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0 auto;
  }
  
  .lds-spinner,
  .lds-spinner div,
  .lds-spinner div:after {
  box-sizing: border-box;
  }
  
  .lds-spinner {
  color: white;
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  }
  
  .lds-spinner div {
  transform-origin: 40px 40px;
  animation: lds-spinner 1.2s linear infinite;
  }
  
  .lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 3.2px;
  left: 36.8px;
  width: 6.4px;
  height: 17.6px;
  border-radius: 20%;
  background: currentColor;
  }
  
  .lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
  }
  
  .lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
  }
  
  .lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
  }
  
  .lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
  }
  
  .lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
  }
  
  .lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
  }
  
  .lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
  }
  
  .lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
  }
  
  .lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
  }
  
  .lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
  }
  
  .lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
  }
  
  .lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
  }
  
  @keyframes lds-spinner {
  0% {
    opacity: 1;
  }
  
  100% {
    opacity: 0;
  }
  }
  
  
  
  .hide{
  display: none !important;
  }
