/* ============================================================
   测试通 TestTong 登录 / 注册页样式
   主题色 #2970C0 | 辅助色 #DFF8FC
   ============================================================ */

.auth-body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: #fff;
  position: relative;
  padding: 0;
}

/* ---------- 背景装饰（扁平化：仅保留纯色背景） ---------- */
.auth-bg { display: none; }

/* ---------- 顶部 Logo ---------- */
.auth-header {
  padding: 28px 40px 0;
  position: relative; z-index: 2;
}
.auth-header .logo { gap: 10px; }
.auth-header .logo-icon { width: 36px; height: 36px; }
.auth-header .logo-text { font-size: 20px; }

/* ---------- 主容器 ---------- */
.auth-wrap {
  position: relative; z-index: 1;
  flex: 1; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  animation: authIn .6s cubic-bezier(.22,.8,.36,1) both;

}
@keyframes authIn {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 左侧品牌区 ---------- */
.auth-brand {
  position: relative; padding: 52px 44px;
  background:
    radial-gradient(ellipse 90% 60% at 110% -10%, rgba(223,248,252,.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at -20% 110%, rgba(223,248,252,.14) 0%, transparent 55%),
    linear-gradient(150deg, #2970C0 0%, #1B4F8F 60%, #123A6B 100%);
  color: #fff; display: flex; flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}
.auth-brand::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
}
.auth-logo { margin-bottom: 44px; position: relative; }
.auth-logo .logo-icon { width: 40px; height: 40px; }

.auth-slogan {
  font-size: 34px; font-weight: 800; line-height: 1.35; letter-spacing: 1px;
  margin-bottom: 16px; position: relative;
}
.auth-slogan-sub {
  font-size: 14px; color: rgba(255,255,255,.78); line-height: 1.8;
  margin-bottom: 36px; position: relative;
}

.auth-points { display: flex; flex-direction: column; gap: 14px; position: relative; }
.auth-points li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; color: rgba(255,255,255,.88);
}
.auth-points svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

.auth-brand-stats {
  margin-top: auto; padding-top: 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  position: relative;
}
.auth-brand-stats div {
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px; padding: 14px 8px; text-align: center;
  backdrop-filter: blur(4px);
}
.auth-brand-stats b { display: block; font-size: 20px; font-weight: 800; color: var(--accent); }
.auth-brand-stats span { font-size: 11.5px; color: rgba(255,255,255,.72); }

/* ---------- 表单区域（扁平无卡片） ---------- */
.auth-card {
  width: 100%; max-width: 460px;

  display: flex; flex-direction: column;
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 24px;
}
.auth-card-head { margin-bottom: 28px; }
.auth-card-head.center { text-align: center; }
.auth-card-head h2 { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.auth-card-head p { margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
.auth-card-head a { color: var(--primary); font-weight: 600; }
.auth-card-head a:hover { text-decoration: underline; }

/* ---------- Tab（隐藏 Tab 按钮，通过下方文字链接切换） ---------- */
.auth-tabs { display: none; }

/* ---------- 面板 ---------- */
.auth-panel { display: none; }
.auth-panel.active { display: block; animation: panelIn .35s ease both; }
@keyframes panelIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- 二维码 ---------- */
.qr-box {
  position: relative; width: 280px; height: 320px; margin: 8px auto 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border-radius: 0;
  border: none;
}
.qr-img-wrap {
  position: relative;
  width: 260px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#wxLoginContainer {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#wxLoginContainer iframe {
  border: none !important;
  border-radius: 8px;
}
#qrCodeContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
}
#qrCodeContainer img {
  border-radius: 4px;
  width: 180px !important;
  height: 180px !important;
  display: block !important;
}
#qrCodeContainer canvas {
  display: none !important;
}
.qr-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255,255,255,.95);
  border-radius: 6px;
  z-index: 2;
}
.qr-loading p { font-size: 13px; color: var(--ink-3); }
.qr-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: qrSpin 0.8s linear infinite;
}
@keyframes qrSpin {
  to { transform: rotate(360deg); }
}
.qr-corner { position: absolute; width: 20px; height: 20px; border-color: var(--primary); border-style: solid; border-width: 0; }
.qr-corner.tl { top: -8px; left: -8px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; }
.qr-corner.tr { top: -8px; right: -8px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 6px; }
.qr-corner.bl { bottom: -8px; left: -8px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 6px; }
.qr-corner.br { bottom: -8px; right: -8px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; }

.qr-mask {
  position: absolute; inset: 0; border-radius: 6px;
  background: rgba(255,255,255,.95);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  z-index: 2;
}
.qr-mask p { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.qr-refresh {
  padding: 8px 22px; border-radius: 4px; font-size: 13px; font-weight: 600;
  color: #fff; background: var(--primary);
  transition: background .2s;
}
.qr-refresh:hover { background: var(--primary-dark); }

.qr-countdown {
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 6px;
  height: 18px;
  line-height: 18px;
}

.qr-tip {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 22px; font-size: 14.5px; color: var(--ink-2);
}
.qr-tip b { color: var(--primary); font-weight: 800; }
.qr-sub { text-align: center; margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }

/* 切换登录方式链接 */
.auth-switch {
  margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--ink-3);
}
.auth-switch .sep { margin: 0 10px; color: var(--line); }
.auth-switch .link-text { color: var(--primary); }
.auth-switch .link-text:hover { text-decoration: underline; }

/* ---------- 表单字段 ---------- */
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 8px;
}
.field-input {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 6px; padding: 0 16px; height: 48px;
  transition: border-color .2s ease;
}
.field-input:focus-within {
  border-color: var(--primary);
}
.field-input.error { border-color: #E5484D; background: #FFF7F7; }
.field-input > svg { width: 18px; height: 18px; color: var(--ink-3); flex-shrink: 0; transition: color .2s; }
.field-input:focus-within > svg { color: var(--primary); }
.field-input input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; color: var(--ink); height: 100%; min-width: 0;
}
.field-input input::placeholder { color: #A8B2C1; }

.field-err { font-size: 12.5px; color: #E5484D; margin-top: 6px; min-height: 16px; display: none; }
.field.has-error .field-err { display: block; }

/* 密码可见切换 */
.pwd-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 6px; transition: background .2s, color .2s;
  cursor: pointer;
}
.pwd-toggle:hover { background: rgba(41, 112, 192, 0.08); }
.pwd-toggle svg { width: 18px; height: 18px; color: var(--ink-3); transition: color .2s; }
.pwd-toggle:hover svg { color: var(--primary); }
.pwd-toggle .eye-open { display: block; }
.pwd-toggle .eye-closed { display: none; }
.pwd-toggle.is-visible .eye-open { display: none; }
.pwd-toggle.is-visible .eye-closed { display: block; }

/* 验证码按钮 */
.field-input.with-btn { padding-right: 8px; }
.code-btn {
  flex-shrink: 0; padding: 8px 16px; border-radius: 4px;
  font-size: 13px; font-weight: 600; color: var(--primary);
  background: var(--accent); transition: background .2s;
  white-space: nowrap;
}
.code-btn:hover:not(:disabled) { background: var(--accent-deep); }
.code-btn:disabled { color: var(--ink-3); background: var(--line); cursor: not-allowed; }

/* 密码强度 */
.pwd-strength { display: flex; gap: 8px; margin-top: 10px; }
.pwd-strength .bar {
  flex: 1; display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--ink-3);
}
.pwd-strength .bar i {
  flex: 1; height: 4px; border-radius: 2px; background: var(--line);
  transition: background .3s;
}
.pwd-strength .bar.on[data-level="1"] i { background: #E5484D; }
.pwd-strength .bar.on[data-level="2"] i { background: #F5A623; }
.pwd-strength .bar.on[data-level="3"] i { background: #2FA36B; }
.pwd-strength .bar.on { color: var(--ink-2); }

/* 行内选项 */
.field-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 8px;
}
.checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none;
}
.checkbox input { display: none; }
.checkbox-box {
  width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0;
  border: 1.5px solid #C3CCD9; background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.checkbox-box svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(.5); transition: all .2s; }
.checkbox input:checked + .checkbox-box { background: var(--primary); border-color: var(--primary); }
.checkbox input:checked + .checkbox-box svg { opacity: 1; transform: scale(1); }
.checkbox a { color: var(--primary); }

.link-text { font-size: 13px; color: var(--primary); }
.link-text:hover { text-decoration: underline; }

/* 提交按钮（覆盖全局 btn-primary 的渐变与阴影） */
.auth-submit {
  height: 48px; font-size: 16px; letter-spacing: 6px;
  background: var(--primary) !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  transition: background .2s;
}
.auth-submit:hover {
  background: var(--primary-dark) !important;
  transform: none !important;
  box-shadow: none !important;
}
.auth-submit:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

.auth-debug-btn {
  margin-top: 20px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff; color: var(--primary);
  border: 1px dashed var(--primary);
  font-size: 13px; letter-spacing: 1px;
  border-radius: 6px; cursor: pointer;
  transition: background .2s;
}
.auth-debug-btn:hover { background: var(--accent); }
.auth-debug-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- 分隔与其它方式 ---------- */
.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 28px 0 18px; color: var(--ink-3); font-size: 12.5px;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.auth-others { display: flex; justify-content: center; gap: 16px; }
.oauth-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.oauth-btn:hover { border-color: var(--primary); background: var(--accent); }

.auth-agreement {
  margin-top: 24px; text-align: center; font-size: 12.5px; color: var(--ink-3);
}
.auth-agreement a { color: var(--primary); }
.auth-agreement a:hover { text-decoration: underline; }

/* ---------- 返回首页 ---------- */
.auth-back {
  position: fixed; top: 24px; right: 24px; z-index: 10;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2); transition: all .2s;
}
.auth-back:hover { color: var(--primary); border-color: var(--primary); background: var(--accent); }

/* ---------- 底部版权 ---------- */
.auth-footer {
  text-align: center; padding: 24px 20px 32px;
  font-size: 12.5px; color: var(--ink-3); line-height: 2;
  position: relative; z-index: 2;
}
.auth-footer p:first-child { font-weight: 600; color: var(--ink-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 28px; left: 50%; z-index: 999;
  transform: translateX(-50%) translateY(-16px);
  background: var(--ink); color: #fff;
  padding: 10px 22px; border-radius: 6px;
  font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .3s ease;
  max-width: 86vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #2FA36B; }
.toast.error { background: #E5484D; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .auth-header { padding: 20px 24px 0; }
  .auth-card { padding: 36px 32px; }
}

@media (max-width: 520px) {
  .auth-header { padding: 16px 18px 0; }
  .auth-header .logo-icon { width: 30px; height: 30px; }
  .auth-header .logo-text { font-size: 17px; }
  .auth-card { padding: 28px 22px; margin: 16px; }
  .auth-card-head h2 { font-size: 20px; }
  .qr-box { width: 260px; height: 300px; }
  .auth-footer { font-size: 11.5px; padding: 16px 16px 24px; }
}