:root {
  --auth-primary: #ff5c8a;
  --auth-primary-hover: #f04f7d;
  --auth-text: #232323;
  --auth-muted: #757575;
  --auth-border: #dedede;
  --auth-input-border: #c7c7c7;
  --auth-link: #16b99a;
  --auth-disabled: #e0e0e0;
  --auth-disabled-text: #9e9e9e;
  --auth-error: #d32f2f;
  --auth-font: IRANSans, "Vazirmatn", ui-sans-serif, system-ui, sans-serif;
}

.auth-page-body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  font-family: var(--auth-font);
  color: var(--auth-text);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  position: relative;
  width: min(720px, calc(100% - 32px));
  border: 1px solid var(--auth-border);
  border-radius: 18px;
  background: #ffffff;
  padding: 48px 32px 40px;
  box-sizing: border-box;
}

.auth-back {
  position: absolute;
  top: 20px;
  inset-inline-start: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--auth-text);
  cursor: pointer;
}

.auth-back:hover {
  opacity: 0.7;
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.auth-brand-text {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  color: var(--auth-primary);
  letter-spacing: -0.02em;
}

.auth-card > [data-auth-step] {
  display: none !important;
  flex-direction: column;
  align-items: stretch;
}

.auth-card > [data-auth-step].is-active {
  display: flex !important;
}

.auth-title {
  margin: 0 0 8px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--auth-text);
  line-height: 1.5;
}

.auth-subtitle {
  margin: 0 0 32px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--auth-muted);
}

.auth-field-wrap {
  position: relative;
  margin-bottom: 20px;
}

.auth-float-label {
  position: absolute;
  top: -9px;
  inset-inline-start: 16px;
  padding: 0 6px;
  background: #fff;
  font-size: 0.75rem;
  color: var(--auth-muted);
  z-index: 1;
}

.auth-input {
  width: 100%;
  height: 60px;
  padding: 0 16px;
  border: 1px solid var(--auth-input-border);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--auth-text);
  background: #fff;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.auth-input:focus {
  border-color: var(--auth-text);
}

.auth-input::placeholder {
  color: #bdbdbd;
}

.auth-otp-input {
  width: 100%;
  height: 64px;
  margin-bottom: 12px;
  padding: 0 16px;
  border: 2px solid var(--auth-text);
  border-radius: 10px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.45em;
  text-align: center;
  font-family: inherit;
  color: var(--auth-text);
  background: #fff;
  outline: none;
  box-sizing: border-box;
}

.auth-otp-input:focus {
  border-color: var(--auth-primary);
}

.auth-submit {
  width: 100%;
  height: 60px;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--auth-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.auth-submit:hover:not(:disabled) {
  background: var(--auth-primary-hover);
}

.auth-submit:disabled {
  background: var(--auth-disabled);
  color: var(--auth-disabled-text);
  cursor: not-allowed;
}

.auth-terms {
  margin: 24px 0 0;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--auth-muted);
}

.auth-terms a {
  color: var(--auth-link);
  text-decoration: none;
  font-weight: 600;
}

.auth-terms a:hover {
  text-decoration: underline;
}

.auth-error {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--auth-error);
}

.auth-error[hidden] {
  display: none;
}

.auth-error.is-success {
  color: var(--auth-link);
}

.auth-countdown {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--auth-muted);
}

.auth-countdown[hidden] {
  display: none;
}

.auth-resend {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--auth-link);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}

.auth-resend[hidden] {
  display: none;
}

.auth-gender-block {
  margin-bottom: 20px;
}

.auth-gender-label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--auth-text);
}

.auth-gender-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-gender-btn {
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--auth-input-border);
  border-radius: 10px;
  background: #fff;
  color: var(--auth-text);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.auth-gender-btn.is-active {
  border-color: var(--auth-primary);
  background: rgba(255, 92, 138, 0.08);
  color: var(--auth-primary);
}

@media (max-width: 640px) {
  .auth-card {
    padding: 44px 20px 32px;
  }

  .auth-title {
    font-size: 1.1rem;
  }
}
