.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(74, 63, 75, 0.38);
  backdrop-filter: blur(6px);
}

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

.auth-dialog {
  width: 100%;
  max-width: 440px;
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 80px rgba(196, 69, 105, 0.25);
  animation: dialog-rise 0.3s ease;
}

@keyframes dialog-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-dialog .auth-body {
  padding: 0 32px 24px;
}

.auth-dialog .code-input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid rgba(255, 163, 181, 0.2);
  border-radius: 16px;
  outline: none;
  background: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #4a3f4b;
  box-sizing: border-box;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.auth-dialog .code-input::placeholder {
  font-family: 'Quicksand', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  color: #c4b8c8;
}

.auth-dialog .code-input:hover {
  border-color: rgba(255, 107, 138, 0.3);
}

.auth-dialog .code-input:focus {
  border-color: #ff6b8a;
  box-shadow: 0 0 0 4px rgba(255, 107, 138, 0.1);
}

.auth-dialog .input-hint {
  display: flex;
  align-items: center;
  margin-top: 12px;
  font-size: 0.85rem;
  color: #9a8b9e;
}

.auth-dialog .input-hint.warning {
  color: #f59e0b;
}

.auth-dialog .input-hint.error {
  color: #ef4444;
}

.auth-dialog .input-hint.success {
  color: #22c55e;
}

.auth-dialog .dialog-footer {
  padding: 0 32px 32px;
}

.toast-stack {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast {
  max-width: min(86vw, 420px);
  padding: 12px 20px;
  border-radius: 14px;
  background: rgba(74, 63, 75, 0.92);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 12px 32px rgba(74, 63, 75, 0.24);
  animation: toast-in 0.25s ease;
}

.toast.success {
  background: rgba(34, 197, 94, 0.95);
}

.toast.warning {
  background: rgba(245, 158, 11, 0.95);
}

.toast.error {
  background: rgba(239, 68, 68, 0.95);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
