body.auth-modal-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10020;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal--open {
  opacity: 1;
  visibility: visible;
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 320px 1fr;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(2, 6, 23, 0.38);
}

.auth-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  z-index: 5;
}

.auth-modal__aside {
  padding: 38px 30px;
  background: linear-gradient(160deg, #0f172a 0%, #1d4ed8 62%, #60a5fa 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.auth-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-modal__aside h3 {
  font-family: var(--ff);
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
}

.auth-modal__aside p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.82);
}

.auth-modal__chips {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-modal__chips span {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 600;
}

.auth-modal__content {
  padding: 42px 40px 34px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.auth-modal__status {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
  margin-bottom: 10px;
}

.auth-modal__content h2 {
  font-family: var(--ff);
  font-size: 30px;
  line-height: 1.2;
  color: #0f172a;
  margin-bottom: 26px;
  font-weight: 800;
  max-width: 420px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-copy {
  font-size: 14px;
  color: #64748b;
  line-height: 1.75;
  margin: -8px 0 24px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field span {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.auth-field input {
  height: 54px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  padding: 0 16px;
  font-size: 14px;
  color: #0f172a;
  transition: all var(--tr);
  box-shadow: 0 8px 26px rgba(148, 163, 184, 0.08);
}

.auth-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.auth-field .iti {
  width: 100%;
}

.auth-continue {
  height: 54px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #f97316, #fb7185);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.26);
  transition: all var(--tr);
}

.auth-continue:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(249, 115, 22, 0.32);
}

.auth-continue:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
}

.auth-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: #334155;
  line-height: 1.6;
}

.auth-check input {
  margin-top: 3px;
}

.auth-help {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  margin-top: -4px;
}

.auth-legal {
  font-size: 12px;
  color: #64748b;
  line-height: 1.8;
}

.auth-legal a {
  color: #1d4ed8;
  font-weight: 700;
  margin: 0 2px;
}

.auth-referral-toggle,
.auth-link-btn {
  padding: 0;
  background: none;
  border: none;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.auth-referral-toggle strong {
  color: #f97316;
}

.auth-field--referral {
  display: none;
}

.auth-field--referral.auth-field--visible {
  display: flex;
}

.auth-step {
  display: none;
}

.auth-step--active {
  display: block;
}

.auth-otp__text {
  font-size: 14px;
  color: #64748b;
  line-height: 1.8;
  margin: -8px 0 24px;
}

.auth-otp-panel {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.auth-otp-field {
  margin-bottom: 18px;
}

.auth-otp-field span {
  color: #0f172a;
}

.auth-otp__single-input {
  height: 64px;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.45em;
  color: #0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 30px rgba(148, 163, 184, 0.14);
}

.auth-otp__single-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.auth-otp__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 860px) {
  .auth-modal__dialog {
    grid-template-columns: 1fr;
  }

  .auth-modal__aside {
    padding: 30px 24px;
  }

  .auth-modal__content {
    padding: 30px 24px 24px;
  }
}

@media (max-width: 560px) {
  .auth-modal {
    padding: 12px;
  }

  .auth-modal__content h2 {
    font-size: 24px;
  }

  .auth-modal__aside h3 {
    font-size: 24px;
  }

  .auth-otp-panel {
    padding: 18px;
  }

  .auth-otp__single-input {
    height: 56px;
    font-size: 20px;
    letter-spacing: 0.3em;
  }

  .auth-otp__actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
