/* ============================================================
   登录 / 注册页
   沿用工作台的设计语言：近白底 / 白卡片 / 粉色强调
   ============================================================ */

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 24px;
  background:
    radial-gradient(760px 380px at 50% -8%, #FDF0F4 0%, rgba(253, 240, 244, 0) 62%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 428px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: 0 10px 40px rgba(26, 26, 26, .05);
  padding: 34px 34px 26px;
}

/* ---------- 品牌 ---------- */
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-logo {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 40px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.auth-brand-name { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.auth-brand-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------- 分段切换 ---------- */
.auth-tabs {
  display: flex; gap: 4px; margin: 24px 0 20px;
  background: var(--bg); border-radius: var(--r-md); padding: 4px;
}
.auth-tab {
  flex: 1; height: 34px; border-radius: 8px;
  font-size: 13px; font-weight: 400; color: var(--ink-3);
  transition: all .15s;
}
.auth-tab:hover { color: var(--ink-2); }
.auth-tab.active {
  background: var(--card); color: var(--accent); font-weight: 500;
  box-shadow: 0 1px 3px rgba(26, 26, 26, .07);
}

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field-label {
  display: block; font-size: 12.5px; color: var(--ink-3);
  margin-bottom: 7px; font-weight: 400;
}
.field-box {
  display: flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}
.field-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 84, 124, .10);
}
.field-box.err { border-color: #DE5B5B; background: #FEF6F6; }
.field-box svg { flex: 0 0 16px; color: var(--ink-4); }
.field-box:focus-within svg { color: var(--accent); }
.field-box input {
  flex: 1; min-width: 0; height: 100%;
  border: none; background: transparent;
  font-size: 14px; color: var(--ink);
}
.field-box input::placeholder { color: var(--ink-5); }

.eye-btn {
  flex: 0 0 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-4);
}
.eye-btn:hover { background: var(--bg); color: var(--ink-2); }

/* ---------- 密码规则 ---------- */
.pw-rules {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 8px; font-size: 12px; color: var(--ink-3);
}
.pw-rule { display: flex; align-items: center; gap: 5px; }
.pw-rule .tick {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.pw-rule .tick svg { width: 9px; height: 9px; opacity: 0; }
.pw-rule.ok { color: var(--green); }
.pw-rule.ok .tick { border-color: var(--green); background: var(--green); }
.pw-rule.ok .tick svg { opacity: 1; color: #FFF; }

.field-hint { font-size: 12px; color: var(--ink-3); margin-top: 7px; }
.field-hint.warn { color: var(--amber); }

/* ---------- 提交 ---------- */
.auth-submit {
  width: 100%; height: 46px; margin-top: 6px;
  border-radius: var(--r-md);
  background: var(--accent); color: #FFF;
  font-size: 14.5px; font-weight: 500; letter-spacing: .3px;
  transition: background .15s, transform .1s;
}
.auth-submit:hover { background: #D9476E; }
.auth-submit:active { transform: translateY(1px); }
.auth-submit[disabled] { background: var(--ink-5); cursor: not-allowed; transform: none; }

/* ---------- 提示条 ---------- */
.auth-alert {
  display: none; align-items: flex-start; gap: 8px;
  margin-bottom: 16px; padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 12.5px; line-height: 1.5;
  background: #FCEBEB; color: #A32D2D;
  border: 1px solid #F3D2D2;
}
.auth-alert.show { display: flex; }
.auth-alert.ok { background: var(--green-bg); color: #1F7A4D; border-color: #CDE8DA; }

/* ---------- 底部 ---------- */
.auth-foot {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--ink-3);
  display: flex; align-items: center; gap: 7px;
}

@media (max-width: 480px) {
  .auth-card { padding: 26px 22px 20px; }
  .auth-body { padding: 22px 14px; }
}

/* ---------- 登录页免责声明（2026-09-16 加） ---------- */
/* 卡片垂直居中，说明紧跟其下、整体仍居中（auth-body 已改 column） */
.auth-disclaimer {
  max-width: 420px; margin: 22px auto 0; padding: 0 4px;
  font-size: 11.5px; line-height: 1.75; color: #8A8A85;
}
.auth-disclaimer b {
  display: block; font-size: 11.5px; font-weight: 600;
  color: #A89478; margin-bottom: 5px;
}
.auth-disclaimer p { margin: 0; }
.auth-disclaimer p b { display: inline; color: #7A6A50; font-weight: 600; }

/* ============================================================
   推荐链接落地（2026-09-16 加）
   ============================================================ */

/* ---------- 带 ?ref= 进来时的横幅 ---------- */
.ref-banner {
  display: flex; align-items: center; gap: 11px;
  margin: 0 26px 14px; padding: 11px 14px;
  background: linear-gradient(135deg, #FDF0F4 0%, #FFF7EA 100%);
  border: 1px solid var(--accent-line, #F0D3DC);
  border-radius: var(--r-md, 10px);
}
.rb-gift {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 50%; background: #FFF;
  border: 1px solid var(--accent-line, #F0D3DC);
  color: var(--accent, #E8547C);
  display: flex; align-items: center; justify-content: center;
}
.rb-text { min-width: 0; }
.rb-text b {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--accent, #E8547C); margin-bottom: 2px;
}
.rb-text span { font-size: 12px; color: #8A7A6A; line-height: 1.5; }
.rb-text em { font-style: normal; font-weight: 700; color: var(--accent, #E8547C); }
.rb-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; font-weight: 700; letter-spacing: .6px;
  color: var(--accent, #E8547C);
}

/* ---------- 推荐码输入项 ---------- */
.fl-opt {
  font-style: normal; font-size: 11px; font-weight: 500;
  color: #A8A8A3; background: #F4F4F0;
  border-radius: 999px; padding: 1px 7px; margin-left: 5px;
  vertical-align: 1px;
}
.fl-opt.on { color: #2FA36B; background: #EDF7F1; }
.ref-clear {
  flex-shrink: 0; width: 20px; height: 20px; margin-right: 10px;
  border-radius: 50%; background: #EFEFEB; color: #8A8A85;
  font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: .15s;
}
.ref-clear:hover { background: #E4E4DF; color: #4A4A45; }
#field-ref .field-hint.ok { color: #2FA36B; }
#field-ref .field-hint.warn { color: #D8912F; }

@media (max-width: 480px) {
  .ref-banner { margin: 0 18px 12px; padding: 10px 12px; }
}

/* ============================================================
   密保问题 + 忘记密码（2026-09-16 加）
   ============================================================ */

/* ---------- 注册：密保问题区 ---------- */
.sec-hint {
  font-size: 11.5px; line-height: 1.7; color: var(--ink-3, #8A8A85);
  margin: -2px 0 10px;
}
.sec-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 6px; }
.sec-row { display: flex; gap: 8px; }
.sec-q-select {
  flex: 0 1 58%; height: 38px; padding: 0 10px;
  border: 1px solid var(--line-strong, #E0E0DB); border-radius: var(--r-sm, 7px);
  background: #FFF; font-size: 12.5px; color: var(--ink-2, #4A4A45);
  transition: .15s; min-width: 0;
}
.sec-q-select:focus, .sec-q-ans:focus { border-color: var(--accent, #E8547C); outline: none; }
.sec-q-ans {
  flex: 1; min-width: 0; height: 38px; padding: 0 11px;
  border: 1px solid var(--line-strong, #E0E0DB); border-radius: var(--r-sm, 7px);
  font-size: 12.5px;
}
@media (max-width: 480px) {
  .sec-row { flex-direction: column; gap: 6px; }
  .sec-q-select { flex: 1 1 auto; width: 100%; }
}

/* ---------- 忘记密码链接 ---------- */
.auth-forgot-line {
  text-align: right; margin: -4px 4px 0 0;
}
.auth-forgot-line a {
  font-size: 12px; color: var(--ink-3, #8A8A85);
  transition: .15s; padding: 3px 5px; border-radius: 5px;
}
.auth-forgot-line a:hover { color: var(--accent, #E8547C); background: var(--accent-bg, #FDF0F4); }

/* ---------- 忘记密码弹窗 ---------- */
.fm-card { max-width: 400px; }
.fm-body { padding: 16px 20px 20px; overflow-y: auto; }
.fm-body .field { margin-bottom: 12px; }
.fm-body .auth-submit { width: 100%; margin-top: 4px; }
.fm-step .field-hint { font-size: 11px; }
.fm-qa { max-height: 300px; overflow-y: auto; }

/* ---------- 协议同意（仅注册显示） ---------- */
.agree-row {
  display: flex; align-items: flex-start; gap: 9px;
  cursor: pointer; user-select: none;
  padding: 1px 0 2px;
}
.agree-row input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.agree-box {
  flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px;
  border: 1.5px solid var(--line-strong, #D5D5CF); border-radius: 5px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  transition: .16s; color: transparent;
}
.agree-box svg { width: 11px; height: 11px; }
.agree-row:hover .agree-box { border-color: var(--accent, #E8547C); }
.agree-row input:checked + .agree-box {
  background: var(--accent, #E8547C); border-color: var(--accent, #E8547C);
  color: #fff;
}
.agree-row input:focus-visible + .agree-box {
  box-shadow: 0 0 0 3px var(--accent-bg, #FDF0F4);
}
.agree-txt {
  font-size: 12.5px; line-height: 1.7; color: var(--ink-2, #5C5C57);
}
.agree-txt a {
  color: var(--accent, #E8547C); font-weight: 500;
  border-bottom: 1px solid transparent; transition: .15s;
  /* 书名号不能被拆行（否则「《退款规」+「则》」断成两行，很难看） */
  white-space: nowrap;
}
.agree-txt a:hover { border-bottom-color: currentColor; }
/* 未勾选时提交被拦 → 行整体抖动一次 */
.agree-row.shake { animation: agree-shake .38s; }
@keyframes agree-shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-5px); }
  44% { transform: translateX(5px); }
  66% { transform: translateX(-3px); }
  88% { transform: translateX(2px); }
}

/* ---------- 页脚协议入口 ---------- */
.auth-legal {
  display: flex; align-items: center; justify-content: center;
  gap: 7px; margin-top: 12px; flex-wrap: wrap;
}
.auth-legal a, .auth-legal span {
  font-size: 11.5px; color: var(--ink-3, #9A9A94);
}
.auth-legal a { transition: .15s; }
.auth-legal a:hover { color: var(--accent, #E8547C); }

/* ---------- 邀请码预填锁定（站级统一码，无需用户改） ---------- */
.field-tag {
  display: inline-block;
  margin-left: 8px; padding: 2px 8px;
  background: var(--accent-bg, #FDF0F4); color: var(--accent, #E8547C);
  font-size: 11px; font-weight: 500;
  border-radius: 10px; vertical-align: middle;
}
.field-box-locked {
  background: #F6F6F1; border-color: var(--line, #E6E6E1);
}
.field-box-locked input {
  color: #7A7A75; cursor: default; user-select: none;
  -webkit-user-select: none;
}
.field-box-locked input::selection {
  background: transparent;
}
.field-box-locked svg:first-of-type { color: #9A9A94; }
.field-box-locked .lock-suffix { color: var(--ink-3, #9A9A94); flex: 0 0 auto; }
