/* ===== 注册 / 登录页 样式（复用 style.css 变量与按钮）===== */

.auth-main {
  min-height: 100dvh;
  padding: 120px 24px 60px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(79, 124, 255, 0.12), transparent),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 30% at 50% 0%, rgba(79,124,255,0.1), transparent);
  pointer-events: none;
}

.auth-head { text-align: center; margin-bottom: 32px; position: relative; z-index: 1; }
.auth-head h1 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.auth-head p { font-size: 14px; color: var(--text-dim); }

.auth-form { position: relative; z-index: 1; }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 600;
}
.field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
}
.field input::placeholder { color: var(--text-faint); }
.field input.error { border-color: #f87171; }

/* 验证码行 */
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 14px;
}
.code-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
  margin-top: 8px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-dim);
}
.auth-switch a { color: #b8ccff; font-weight: 600; }
.auth-switch a:hover { color: #fff; }

.auth-note {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

/* 表单错误提示 */
.field-error {
  font-size: 12px;
  color: #f87171;
  margin-top: 6px;
  display: none;
}
.field-error.show { display: block; }

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