.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(8px);
}

.auth-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 32px 80px rgba(17, 24, 39, 0.22);
  overflow: hidden;
}

.auth-modal__dialog::before {
  display: none;
}

.auth-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 24px;
  line-height: 1;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.auth-modal__close:hover {
  background: var(--surface-soft);
  transform: translateY(-1px);
}

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

.auth-modal__tab {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.auth-modal__tab--active {
  border-color: rgba(134, 84, 204, 0.24);
  background: var(--surface-accent-soft);
  color: var(--link-color);
}

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

.auth-modal__title {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(30px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.1;
}

.auth-modal__description {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.auth-modal__footer {
  margin: 20px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-modal__switch {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--link-color);
  font-size: 14px;
  font-weight: 700;
}

.auth-modal__switch:hover {
  color: var(--link-hover);
}

.auth-modal-fade-enter-active,
.auth-modal-fade-leave-active {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-modal-fade-enter-from,
.auth-modal-fade-leave-to {
  opacity: 0;
}

.auth-modal-fade-enter-from .auth-modal__dialog,
.auth-modal-fade-leave-to .auth-modal__dialog {
  transform: translateY(10px) scale(0.98);
}

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

  .auth-modal__dialog {
    border-radius: 24px;
  }

  .auth-modal__tabs {
    padding: 18px 18px 0;
  }

  .auth-modal__content {
    padding: 22px 18px 24px;
  }
}
