/* 认证页共享样式：参考主流登录/注册/忘记密码页风格 */
:root {
  --auth-primary: #14b8a6;        /* 青绿色主色 */
  --auth-primary-dark: #0d9488;   /* hover */
  --auth-primary-soft: #f0fdfa;   /* 淡青背景 */
  --auth-accent: #2563eb;         /* 蓝色高亮（Tab 切换） */
  --auth-accent-dark: #1d4ed8;
  --auth-accent-soft: #eff6ff;
  --auth-bg: #f8fafc;
  --auth-surface: #ffffff;
  --auth-text: #111827;
  --auth-muted: #6b7280;
  --auth-border: #e5e7eb;
  --auth-radius: 14px;
  --auth-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--auth-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--auth-text);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--auth-surface);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  padding: 36px 32px 32px;
}

/* 步骤指示器（注册页） */
.auth-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}
.auth-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  background: #e5e7eb;
  color: #9ca3af;
}
.auth-step.active {
  background: var(--auth-primary);
  color: #fff;
}
.auth-step-line {
  width: 48px;
  height: 2px;
  background: #e5e7eb;
}

/* 登录 / 注册 Tab 切换（蓝色高亮） */
.auth-tabs {
  display: flex;
  background: #eef2f7;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 11px 0;
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
  border-radius: 9px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}
.auth-tab:hover:not(.active) {
  color: #475569;
}
.auth-tab.active {
  background: var(--auth-accent);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.30);
}
.auth-tab.active:hover {
  color: #fff;
}

.auth-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-sub {
  font-size: 14px;
  color: var(--auth-muted);
  margin-bottom: 28px;
}
.auth-sub a {
  color: var(--auth-primary);
  font-weight: 500;
}
.auth-sub a:hover {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

/* 表单 */
.auth-field {
  margin-bottom: 18px;
}
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.auth-input-wrap:focus-within {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
}

.auth-prefix {
  padding: 0 12px;
  font-size: 14px;
  color: #374151;
  border-right: 1px solid var(--auth-border);
  height: 44px;
  display: flex;
  align-items: center;
  background: #f9fafb;
}

.auth-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 14px;
  height: 44px;
  font-size: 15px;
  color: var(--auth-text);
  background: transparent;
}
.auth-input::placeholder {
  color: #9ca3af;
}

/* 验证码行 */
.auth-code-row {
  display: flex;
  gap: 10px;
}
.auth-code-row .auth-input-wrap {
  flex: 1;
}
.auth-code-btn {
  width: 112px;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--auth-primary-soft);
  color: var(--auth-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.auth-code-btn:hover:not(:disabled) {
  background: #ccfbf1;
}
.auth-code-btn:disabled,
.auth-code-btn.counting {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* 选项行 */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 22px;
  font-size: 13px;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  cursor: pointer;
}
.auth-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-primary);
}
.auth-forgot {
  color: var(--auth-primary);
  font-weight: 500;
}
.auth-forgot:hover {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

/* 主按钮（蓝色，与 Tab 高亮统一） */
.auth-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: var(--auth-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.auth-submit:hover:not(:disabled) {
  background: var(--auth-accent-dark);
}
.auth-submit:active:not(:disabled) {
  transform: scale(0.99);
}
.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 切换登录方式 */
.auth-toggle {
  text-align: center;
  margin-top: 22px;
  font-size: 14px;
  color: var(--auth-primary);
  font-weight: 500;
  cursor: pointer;
}
.auth-toggle:hover {
  text-decoration: underline;
}

/* 消息提示 */
.msg {
  min-height: 20px;
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--auth-muted);
}
.msg.err { color: #ef4444; }
.msg.ok { color: #10b981; }

/* 返回首页 */
.auth-back {
  position: fixed;
  top: 70px;
  left: 70%;
  transform: translateX(-50%);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 22px;
  background: rgba(255,255,255,.14);
  transition: .18s;
  white-space: nowrap;
}
.auth-back:hover {
  background: rgba(255,255,255,.30);
  border-color: #fff;
}

/* 隐藏切换（Tab / 卡片显隐） */
.hidden {
  display: none !important;
}

/* 密码显示切换 */
.auth-eye {
  padding: 0 12px;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.auth-eye:hover {
  color: #6b7280;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 22px;
  }
  .auth-title {
    font-size: 22px;
  }
}
