/* ============================================================
 * 登录 / 注册 / 个人中心 + 首页用户入口（2026-11-05 跨站登录）
 * ------------------------------------------------------------
 * 依赖 css/style.css 的 :root 令牌（--brand-1 / --txt-* / --line …），
 * 本文件只做「表单与账号入口」的增补，不重定义主题颜色。
 * 浅色由 theme-light.css 覆盖 body 变量后自动生效，这里不要写死颜色。
 * ============================================================ */

/* ===== 首页顶部提示条（未登录时出现） ===== */
.sso-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px auto 0;
  max-width: min(var(--container, 720px), calc(100% - 32px));
  padding: 9px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--txt-2);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 10px;
}
.sso-tip strong { color: var(--txt-1); font-weight: 500; }
.sso-tip .sso-tip-go { margin-left: auto; color: var(--link); white-space: nowrap; }

/* ===== 顶部账号按钮（已登录时替换「登录」入口） ===== */
.sso-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  color: var(--txt-2);
  font-size: 12.5px;
  max-width: 46vw;
  overflow: hidden;
}
.sso-user .sso-ava {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  overflow: hidden;
}
.sso-user .sso-ava img { width: 100%; height: 100%; object-fit: cover; }
.sso-user .sso-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sso-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border: none;
  white-space: nowrap;
}

/* 子页顶栏用的极简形态：只留头像，宽度与 .header-right 对齐 */
.sso-user-mini {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.sso-user-mini .sso-name { display: none; }
.sso-user-mini .sso-ava { width: 26px; height: 26px; flex: 0 0 26px; }

/* ===== 登录 / 注册 页面 ===== */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
}
.auth-wrap { width: 100%; max-width: 380px; }
.auth-back {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--txt-3);
}
.auth-back:hover { color: var(--txt-2); }
.auth-card {
  padding: 26px 22px 22px;
  border-radius: 16px;
  background: var(--surface, rgba(255, 255, 255, .04));
  border: 1px solid var(--line-strong);
}
.auth-brand {
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--brand-1);
  margin-bottom: 10px;
}
.auth-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--txt-1);
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 12.5px;
  color: var(--txt-3);
  line-height: 1.6;
  margin-bottom: 18px;
}
.auth-err {
  margin-bottom: 14px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #fecaca;
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .3);
}
.auth-field { display: block; margin-bottom: 14px; }
.auth-field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--txt-3);
}
.auth-field > input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--txt-1);
  background: rgba(0, 0, 0, .18);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color .15s ease;
}
.auth-field > input:focus { border-color: var(--brand-1); }
.auth-btn {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}
.auth-btn:disabled { opacity: .55; }
.auth-alt {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--txt-3);
  text-align: center;
}
.auth-alt a { color: var(--link); }
.auth-foot {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--txt-3);
  text-align: center;
}

/* ===== 个人中心 ===== */
.acct-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.acct-row:last-of-type { border-bottom: none; }
.acct-row .k { color: var(--txt-3); flex: 0 0 auto; }
.acct-row .v {
  color: var(--txt-1);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-out {
  display: block;
  margin-top: 18px;
  padding: 11px;
  text-align: center;
  font-size: 13px;
  border-radius: 10px;
  color: var(--txt-2);
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
}
.acct-tip {
  margin-top: 14px;
  padding: 11px 13px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--txt-3);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 10px;
}

@media (max-width: 420px) {
  .sso-user { max-width: 40vw; }
  .auth-card { padding: 22px 18px 18px; }
}
