* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --brand: #1a73e8; --brand-dark: #1557b0; --brand-light: #e8f0fe;
  --bg: #f5f6f8; --card: #ffffff;
  --text: #1f2329; --text-2: #646a73; --text-3: #8f959e;
  --border: #e5e6eb; --border-2: #f0f1f3;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.10);
  --radius: 12px;
  --wechat: #07c160; --qq: #12b7f5; --danger: #e5413e;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text); background: linear-gradient(135deg, #f5f6f8 0%, #e8f0fe 100%);
  line-height: 1.6; min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

/* ============ 顶栏 (与首页一致) ============ */
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  height: 56px; display: flex; align-items: center; padding: 0 20px;
}
.topbar .brand {
  font-size: 20px; font-weight: 700; color: var(--text);
  margin-right: 24px; letter-spacing: -.2px;
  display: inline-flex; align-items: baseline;
}
.topbar .brand .brand-emph {
  font-size: 24px; font-weight: 800; color: var(--brand);
  margin-right: 1px; letter-spacing: 0;
}
.topbar .nav-links { display: flex; gap: 20px; }
.topbar .nav-links a { font-size: 14px; color: var(--text-2); }
.topbar .nav-links a:hover { color: var(--brand); }
.topbar .right { margin-left: auto; font-size: 13px; color: var(--text-3); }
.topbar .right a { color: var(--brand); font-weight: 600; margin-left: 4px; }
.topbar .right a:hover { color: var(--brand-dark); }

/* ============ 主体 ============ */
.auth-wrap {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--card); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 36px 32px 28px;
}
.auth-mark {
  font-size: 28px; font-weight: 700; color: var(--text);
  margin: 0 auto 16px; letter-spacing: -.3px;
  display: flex; align-items: baseline; justify-content: center;
}
.auth-mark .mark-emph {
  font-size: 34px; font-weight: 800; color: var(--brand);
  margin-right: 2px; letter-spacing: 0;
}
.auth-card h1 { font-size: 22px; font-weight: 700; text-align: center; letter-spacing: -.3px; }
.auth-card .subtitle {
  font-size: 13px; color: var(--text-3); text-align: center;
  margin-top: 4px; margin-bottom: 22px;
}

/* ============ Tab 切换 ============ */
.tabs {
  display: flex; background: var(--bg); border-radius: 10px;
  padding: 4px; margin-bottom: 22px;
}
.tab {
  flex: 1; padding: 9px 0; font-size: 14px; font-weight: 600;
  color: var(--text-3); border-radius: 8px; transition: .15s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.tab.active {
  background: var(--card); color: var(--brand);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.tab .coming {
  font-size: 10px; font-weight: 500; color: #fff;
  background: var(--text-3); padding: 1px 6px; border-radius: 8px;
  line-height: 1.5; letter-spacing: 0;
}
.tab.active .coming { background: var(--brand); }

/* 提示横幅 */
.hint-block {
  font-size: 12px; color: #b5651d; background: #fef3e0;
  border: 1px solid #f5d9a6; border-radius: 8px;
  padding: 8px 12px; margin-bottom: 14px; line-height: 1.5;
}

/* 字段禁用态 */
.field.disabled { opacity: .55; pointer-events: none; background: var(--border-2); }

/* ============ 表单字段 ============ */
.field {
  position: relative; margin-bottom: 14px;
  display: flex; align-items: center;
  border: 1px solid rgba(255,255,255,.10); border-radius: 10px;
  background: rgba(255,255,255,.05); transition: border-color .18s, background .18s, box-shadow .18s;
}
.field:hover {
  border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.07);
}
.field:focus-within {
  border-color: var(--brand); background: rgba(26,115,232,.08);
  box-shadow: 0 0 0 3px rgba(26,115,232,.18);
}
.field .icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; color: var(--text-3); flex-shrink: 0;
}
.field .icon svg { width: 18px; height: 18px; }
.field:focus-within .icon { color: var(--brand); }
.field input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font-size: 14px; color: var(--text); padding: 12px 12px 12px 0; height: 46px;
}
.field input::placeholder { color: var(--text-3); }
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 999px #1e2a40 inset;
  -webkit-text-fill-color: #f0f2f7;
  caret-color: #f0f2f7;
  text-decoration: none;
  transition: background-color 9999s ease;
}
.field:has(input:-webkit-autofill) {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26,115,232,.18);
}
.field:has(input:-webkit-autofill) .icon { color: var(--brand); }
.field .toggle-pwd {
  width: 38px; height: 38px; margin-right: 4px; flex-shrink: 0;
  color: var(--text-3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s, background .15s;
}
.field .toggle-pwd:hover { color: var(--text-2); background: rgba(255,255,255,.08); }
.field .toggle-pwd:active { background: rgba(255,255,255,.12); }
.field .toggle-pwd svg { width: 20px; height: 20px; }
.field .toggle-pwd .eye-closed { display: none; }
.field .toggle-pwd[data-shown="1"] { color: var(--brand); }
.field .toggle-pwd[data-shown="1"] .eye-open { display: none; }
.field .toggle-pwd[data-shown="1"] .eye-closed { display: inline; }
/* 验证码字段右侧按钮 */
.field .suffix-btn {
  font-size: 13px; color: var(--brand); font-weight: 600;
  padding: 0 14px; height: 46px; flex-shrink: 0; white-space: nowrap;
  border-left: 1px solid var(--border); transition: color .15s;
}
.field .suffix-btn:hover { color: var(--brand-dark); }
.field .suffix-btn:disabled { color: var(--text-3); cursor: not-allowed; }

/* 字段行内提示 */
.field-tip {
  font-size: 12px; color: var(--danger);
  margin: -8px 2px 10px; line-height: 1.5;
}
.field-tip.ok { color: #2ba471; }

/* 密码强度 */
.strength {
  display: flex; gap: 4px; margin: -6px 0 14px 2px;
}
.strength span {
  flex: 1; height: 3px; border-radius: 2px; background: var(--border-2); transition: .2s;
}
.strength.s1 span:nth-child(1) { background: var(--danger); }
.strength.s2 span:nth-child(-n+2) { background: #f5a623; }
.strength.s3 span { background: #2ba471; }
.strength-label { font-size: 11px; color: var(--text-3); margin: -10px 0 14px 2px; }

/* 协议 */
.agree {
  font-size: 12px; color: var(--text-3); margin-bottom: 18px;
  display: flex; align-items: flex-start; gap: 6px; line-height: 1.5;
}
.agree input { accent-color: var(--brand); margin-top: 2px; flex-shrink: 0; }
.agree a { color: var(--brand); }
.agree a:hover { color: var(--brand-dark); }

/* 主按钮 */
.btn-primary {
  width: 100%; height: 46px; border-radius: 10px;
  background: var(--brand); color: #fff;
  font-size: 15px; font-weight: 600;
  transition: .15s; box-shadow: 0 4px 12px rgba(26,115,232,.3);
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: var(--text-3); box-shadow: none; cursor: not-allowed; }

/* 后续绑定提示 */
.bind-hint {
  font-size: 12px; color: var(--text-3); text-align: center;
  margin-top: 12px; line-height: 1.5;
}

/* 表单错误提示 */
.form-msg {
  font-size: 12px; color: var(--danger); background: #fdecea;
  border: 1px solid #fadbd8; border-radius: 8px;
  padding: 7px 12px; margin-bottom: 12px; line-height: 1.5;
}

/* 分隔线 */
.divider {
  display: flex; align-items: center; margin: 22px 0 18px;
  color: var(--text-3); font-size: 12px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.divider span { padding: 0 12px; }

/* 第三方登录 */
.oauth { display: flex; gap: 14px; justify-content: center; }
.oauth-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: transform .15s, box-shadow .15s;
}
.oauth-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.oauth-btn.wechat { background: var(--wechat); }
.oauth-btn.qq { background: var(--qq); }
.oauth-btn svg { width: 24px; height: 24px; fill: #fff; }

/* 底部切换 */
.switch { text-align: center; font-size: 13px; color: var(--text-3); margin-top: 24px; }
.switch a { color: var(--brand); font-weight: 600; margin-left: 4px; }
.switch a:hover { color: var(--brand-dark); }

/* ============ H5 适配 ============ */
body.h5 .topbar { padding: 0 14px; height: 50px; }
body.h5 .topbar .brand { font-size: 18px; margin-right: 14px; }
body.h5 .topbar .brand .brand-emph { font-size: 21px; }
body.h5 .topbar .nav-links { display: none; }
body.h5 .auth-wrap { padding: 20px 16px; }
body.h5 .auth-card { padding: 28px 20px 22px; border-radius: 14px; }
body.h5 .auth-mark { font-size: 24px; margin-bottom: 12px; }
body.h5 .auth-mark .mark-emph { font-size: 30px; }
body.h5 .auth-card h1 { font-size: 20px; }
