/* ===========================
   login.css - 云舟智渡登录 / 注册页面
   ==========================
   配套 login.html 使用
   ========================== */

/* 登录页全局：覆盖 body 网格背景 */
.login-page-body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% 20%, var(--halo-bg), transparent 50%),
    radial-gradient(circle at 85% 80%, var(--halo-border), transparent 50%),
    var(--dark-bg);
  background-attachment: fixed;
}

/* iOS Safari 上 background-attachment: fixed 会引发重绘闪烁/性能问题，
   仅在 iOS WebKit 上退化为 scroll。桌面端保留 fixed 视觉。 */
@supports (-webkit-touch-callout: none) {
  .login-page-body {
    background-attachment: scroll;
  }
}

.login-page-body::before {
  /* 关掉全站网格背景，登录页用渐变光晕 */
  display: none;
}

/* ===========================
   整体布局：单列居中
   标题(masthead) → 登录卡片(shell) → 备案号(footnote)
   默认顶部对齐，备案号始终可见；
   视口非常高时才垂直居中，提升视觉呼吸感
   ========================== */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--nav-h) + 24px) 24px 32px;
  display: flex;
  align-items: flex-start;        /* 默认顶部对齐：保证备案号可见 */
  justify-content: center;
}

/* 视口非常高（>= 980px）时才垂直居中 */
@media (min-height: 980px) {
  .login-page {
    align-items: center;
    padding-top: calc(var(--nav-h) + 48px);
  }
}

/* 视口偏矮时整体更紧凑 */
@media (max-height: 760px) {
  .login-page {
    padding-top: calc(var(--nav-h) + 12px);
    padding-bottom: 16px;
  }

  .login-panel {
    padding: 24px 30px 22px;
  }

  .login-footnote {
    margin-top: 14px;
  }
}

.login-stack {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ===========================
   登录卡片
   ========================== */
.login-shell {
  width: 100%;
  /* 磨砂玻璃：半透明深色底 + 极弱顶部高光渐变，让背后 radial-gradient 光晕透出来 */
  background: rgba(8, 18, 36, 0.55);
  background-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0) 50%
  );
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
  position: relative;
}

/* 卡片顶部弱分隔线 */
.login-shell::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  pointer-events: none;
  z-index: 1;
}

.login-panel {
  padding: 26px 30px 22px;
  display: flex;
  flex-direction: column;
}

/* ===========================
   备案号（登录框下方）
   ========================== */
.login-footnote {
  text-align: center;
  margin-top: 20px;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  letter-spacing: 0.02em;
  line-height: 1.7;
}

.login-footnote .dot {
  margin: 0 8px;
  opacity: 0.6;
}

.login-footnote-icp {
  line-height: 1.7;
  display: flex;              /* 桌面端：两个备案号 + ｜ 同行（flex row，align baseline 视觉对齐） */
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
}

.login-footnote-icp a {
  display: inline-block;      /* flex item：宽度自适应内容，不内换行 */
  white-space: nowrap;        /* ICP 链接 / 公网安备链接 不内换行 */
  word-break: keep-all;
  overflow-wrap: normal;
  font-size: inherit;         /* 显式继承父元素字号,跟公司行完全一致 */
  color: inherit;
}

/* 桌面端：两个备案号中间的 ｜ 分隔符（移动端隐藏，行 1 直接 3 行垂直堆叠） */
.login-footnote-sep {
  display: inline-block;      /* flex item：作为 ｜ 分隔符占位 */
  margin: 0 6px;
  color: var(--text-muted);
  opacity: 0.4;
  user-select: none;
  pointer-events: none;
}

.login-footnote-company {
  margin-top: 2px;
  font-size: var(--fs-caption);   /* 与 .login-footnote 父元素同值,确保三行字号一致 */
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;        /* 公司名不内换行 */
  overflow-wrap: normal;
  word-break: keep-all;
}

/* 主 Tab */
.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--card-border);
  position: relative;
}

.login-tab {
  background: none;
  border: none;
  padding: 10px 0;
  margin-right: 28px;
  font-size: var(--fs-h4);
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.login-tab.is-active {
  color: var(--text-primary);
}

.login-tab.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.login-tab:hover:not(.is-active) {
  color: var(--text-secondary);
}

/* 子 Tab */
.login-subtabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
  align-self: flex-start;
}

.login-subtab {
  background: none;
  border: none;
  padding: 7px 16px;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.login-subtab.is-active {
  background: var(--primary);
  color: var(--text-on-primary);
  font-weight: 600;
}

.login-subtab:hover:not(.is-active) {
  color: var(--text-primary);
}

/* 表单 */
.login-pane {
  display: none;
  flex: 1;
  flex-direction: column;
}

.login-pane.is-active {
  display: flex;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-form[hidden] {
  display: none;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.login-form label {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  font-weight: 500;
}

.login-form label .muted {
  color: var(--text-muted);
  font-weight: 400;
  font-size: var(--fs-caption);
}

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="tel"],
.login-form input[type="password"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: var(--fs-small);
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none;
}

.login-form input::placeholder {
  color: var(--text-muted);
}

.login-form input:hover {
  border-color: var(--border-hover);
}

.login-form input:focus {
  border-color: var(--input-border-focus);
  background: var(--halo-bg);
  /* P1-01 · 双层 box-shadow：外发光 + 内 1px 微弱提示，强化"被引导"感 */
  box-shadow:
    0 0 0 3px var(--halo-border),
    inset 0 0 0 1px rgba(0, 212, 255, 0.20);
}

.login-form input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: #FF5252;
}

/* 输入框右侧动作按钮（显示密码 / 获取验证码） */
.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action input {
  padding-right: 110px;
}

.input-action {
  position: absolute;
  right: 6px;
  height: 32px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: var(--fs-small);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.input-action .icon-svg {
  width: 16px;
  height: 16px;
}

.input-action:hover {
  color: var(--primary);
  border-color: var(--border-hover);
}

.input-action.primary {
  background: var(--halo-border);
  border-color: var(--border-hover);
  color: var(--primary);
}

.input-action.primary:hover {
  background: var(--halo-border);
}

.input-action[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* checkbox */
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.agreement {
  align-items: flex-start;
  line-height: 1.6;
}

.agreement input {
  margin-top: 2px;
}

/* 协议未勾选时的气泡提示 */
.agreement-wrap {
  position: relative;
}

.agree-bubble {
  position: absolute;
  left: 0;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(40, 8, 16, 0.96);
  border: 1px solid rgba(255, 82, 82, 0.5);
  border-radius: 8px;
  color: #FFB4B4;
  font-size: var(--fs-caption);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* 默认朝下：气泡在 checkbox 下方，尖角朝上 */
.agree-bubble {
  top: calc(100% + 4px);
  animation: agreeBubbleInDown 0.2s ease-out;
}

.agree-bubble::after {
  content: '';
  position: absolute;
  left: 8px;
  top: -6px;
  width: 10px;
  height: 10px;
  background: rgba(40, 8, 16, 0.96);
  border-left: 1px solid rgba(255, 82, 82, 0.5);
  border-top: 1px solid rgba(255, 82, 82, 0.5);
  transform: rotate(45deg);
}

/* 翻向上方：空间不足时由 JS 添加 */
.agree-bubble--above {
  top: auto;
  bottom: calc(100% + 8px);
  animation: agreeBubbleInUp 0.2s ease-out;
}

.agree-bubble--above::after {
  top: auto;
  left: 8px;
  bottom: -6px;
  border-left: none;
  border-top: none;
  border-right: 1px solid rgba(255, 82, 82, 0.5);
  border-bottom: 1px solid rgba(255, 82, 82, 0.5);
}

.agree-bubble-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FF5252;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

@keyframes agreeBubbleInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes agreeBubbleInUp {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

[data-theme="light"] .agree-bubble {
  background: #FFF5F5;
  color: #B5302A;
  border-color: rgba(255, 82, 82, 0.55);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

[data-theme="light"] .agree-bubble::after {
  background: #FFF5F5;
  border-color: rgba(255, 82, 82, 0.55);
}

[data-theme="light"] .agree-bubble--above::after {
  border-color: rgba(255, 82, 82, 0.55);
}

/* 链接 */
.link-muted {
  font-size: var(--fs-small);
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.link-muted:hover {
  color: var(--primary);
}

.link-accent {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.link-accent:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* 提交按钮 */
.btn-submit {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
  border-radius: 10px;
  font-size: var(--fs-body);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.05s;
  font-family: inherit;
  letter-spacing: 0.04em;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

.btn-submit:active {
  transform: translateY(1px);
}

.btn-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 分割线 */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 12px;
  color: var(--text-muted);
  font-size: var(--fs-caption);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

/* 第三方登录 */
.oauth-row {
  display: flex;
  gap: 12px;
}

.oauth-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: var(--fs-small);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}

.oauth-btn:hover {
  border-color: var(--border-hover);
  background: var(--halo-bg);
}

.oauth-btn.wide {
  width: 100%;
  flex: 0 0 auto;          /* 不参与 .login-form 的纵向 flex 拉伸（修复高度被撑高） */
  height: 46px;            /* 与 .btn-submit 同高，视觉更协调 */
  font-size: var(--fs-small);
  font-weight: 600;
}

.oauth-btn.wechat:hover {
  border-color: var(--border-hover);
  background: rgba(26, 173, 25, 0.06);
}

.oauth-btn.enterprise svg {
  color: var(--primary);
}

.login-foot-tip {
  text-align: center;
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-top: 14px;
}

/* ===========================
   微信扫码弹层
   ========================== */
.wechat-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wechat-modal[hidden] {
  display: none;
}

.wechat-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s;
}

.wechat-modal-card {
  position: relative;
  width: min(380px, calc(100vw - 32px));
  background: var(--dark-bg2);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px 28px 24px;
  text-align: center;
  animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.wechat-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: var(--fs-h4);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.wechat-modal-close:hover {
  background: var(--card-bg);
  color: var(--text-primary);
}

.wechat-modal-title {
  font-size: var(--fs-h4);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.wechat-modal-sub {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.wechat-qr-wrap {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 12px;
}

.wechat-qr-wrap img {
  width: 180px;
  height: 180px;
  display: block;
}

.wechat-qr-stage {
  position: relative;
  width: 180px;
  height: 180px;
}

.wechat-qr-stage img {
  filter: blur(6px);
  transition: filter 0.2s;
}

.wechat-qr-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  pointer-events: none;
}

.wechat-qr-overlay-text {
  color: #1f7c34;
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  padding: 0 12px;
}

.wechat-qr-hint {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  margin-top: 4px;
}

.wechat-modal-foot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 18px;
  background: rgba(26, 173, 25, 0.06);
  border: 1px solid rgba(26, 173, 25, 0.2);
  border-radius: 100px;
  color: var(--text-secondary);
  font-size: var(--fs-small);
}

/* ===========================
   全局提示 toast
   ========================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5000;
  max-width: 360px;
  padding: 14px 22px;
  background: rgba(6, 18, 36, 0.95);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: var(--fs-small);
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast[hidden] {
  display: none;
}

.toast.toast-success {
  border-color: rgba(0, 255, 176, 0.4);
}

.toast.toast-error {
  border-color: rgba(255, 82, 82, 0.4);
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ===========================
   找回口令弹层
   ========================== */
.forgot-modal {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forgot-modal[hidden] {
  display: none;
}

.forgot-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s;
}

.forgot-modal-card {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--dark-bg2);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px 28px 24px;
  text-align: left;
  animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.forgot-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: var(--fs-h4);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.forgot-modal-close:hover {
  background: var(--card-bg);
  color: var(--text-primary);
}

/* 步骤指示器 */
.forgot-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 22px;
}

.forgot-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: var(--fs-small);
  transition: color 0.2s;
}

.forgot-step.is-active {
  color: var(--primary);
}

.forgot-step.is-done {
  color: var(--accent2);
}

.forgot-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-caption);
  font-weight: 700;
  color: inherit;
  transition: all 0.2s;
}

.forgot-step.is-active .forgot-step-num {
  background: var(--primary);
  color: var(--text-on-primary);
  border-color: var(--border-active);
}

.forgot-step.is-done .forgot-step-num {
  background: var(--accent2);
  color: var(--text-on-accent2);
  border-color: var(--border-active);
}

.forgot-step-line {
  flex: 0 0 40px;
  height: 1px;
  background: var(--card-border);
  margin: 0 10px;
  position: relative;
}

.forgot-step-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.forgot-step-line.is-done::after {
  transform: scaleX(1);
}

/* 标题 */
.forgot-modal-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-align: center;
}

.forgot-modal-sub {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-bottom: 22px;
  text-align: center;
}

/* 表单 */
.forgot-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.forgot-form[hidden] {
  display: none;
}

/* P1-04 · 找回密码步骤横向 slide（2026-06-26 优化）
   - 仅 .is-entering 触发，初始 form 默认无动画（避免首次打开就 slide）
   - login.js 的 goForgotStep 在切换时移除 class → 强制 reflow → 重加 class
   - 320ms cubic-bezier(0.16, 1, 0.3, 1) 横向 + opacity 入场
*/
.forgot-form.is-entering {
  animation: forgotFormIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes forgotFormIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 已验证手机号提示 */
.forgot-phone-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(0, 255, 176, 0.06);
  border: 1px solid rgba(0, 255, 176, 0.2);
  border-radius: 8px;
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.forgot-phone-hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent2);
  color: var(--text-on-accent2);
  font-size: var(--fs-caption);
  font-weight: 700;
  flex-shrink: 0;
}

.forgot-phone-hint-icon .icon-svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.forgot-phone-hint strong {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.forgot-phone-hint .link-muted {
  margin-left: auto;
}

/* 密码强度条 */
.pwd-strength {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  min-height: 14px;
}

.pwd-strength-bar {
  flex: 1;
  height: 3px;
  background: var(--card-border);
  border-radius: 2px;
  transition: background 0.2s;
}

.pwd-strength[data-level="1"] .pwd-strength-bar[data-level="1"],
.pwd-strength[data-level="2"] .pwd-strength-bar[data-level="1"],
.pwd-strength[data-level="2"] .pwd-strength-bar[data-level="2"],
.pwd-strength[data-level="3"] .pwd-strength-bar {
  background: var(--primary);
}

.pwd-strength[data-level="3"] .pwd-strength-bar[data-level="1"],
.pwd-strength[data-level="3"] .pwd-strength-bar[data-level="2"] {
  background: var(--accent2);
}

.pwd-strength-text {
  font-size: var(--fs-caption);
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 36px;
  text-align: right;
}

.pwd-strength[data-level="1"] .pwd-strength-text { color: #FF8A65; }
.pwd-strength[data-level="2"] .pwd-strength-text { color: var(--primary); }
.pwd-strength[data-level="3"] .pwd-strength-text { color: var(--accent2); }

/* ===========================
   浅色主题覆盖（修复浅色模式下的视觉割裂）
   - 默认样式按深色玻璃效果设计；浅色主题需要更轻的
     表面色 + 更柔和的阴影 + 浅色蒙层
   =========================== */
[data-theme="light"] .login-page-body {
  background:
    radial-gradient(circle at 15% 20%, var(--halo-bg), transparent 50%),
    radial-gradient(circle at 85% 80%, var(--halo-border), transparent 50%),
    var(--dark-bg);
}

/* 登录卡片：浅色主题用白色磨砂玻璃（alpha 降低，让光晕透出来） */
[data-theme="light"] .login-shell {
  background: rgba(255, 255, 255, 0.55);
  background-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10),
    rgba(255, 255, 255, 0) 50%
  );
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow:
    0 32px 60px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .login-shell::before {
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.18), transparent);
}

/* 子 Tab 容器 */
[data-theme="light"] .login-subtabs {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .login-subtab.is-active {
  background: var(--primary);
  color: #fff;                                /* 浅色主题 --primary 是深青色，文字用白色 */
}

/* 表单输入：浅色用 var(--input-bg) 已自动变白底；只覆盖残留的固定白 */
[data-theme="light"] .login-form input[type="text"],
[data-theme="light"] .login-form input[type="email"],
[data-theme="light"] .login-form input[type="tel"],
[data-theme="light"] .login-form input[type="password"] {
  background: var(--input-bg);
  border-color: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .login-form input:hover {
  border-color: var(--border-hover);
}

[data-theme="light"] .login-form input:focus {
  background: var(--input-bg-focus);
  /* P1-01 · 浅色版同步：外发光 + 内 1px 提示（深青替代蓝绿） */
  box-shadow:
    0 0 0 3px rgba(0, 145, 179, 0.08),
    inset 0 0 0 1px rgba(0, 107, 133, 0.22);
}

/* 输入框右侧动作按钮 */
[data-theme="light"] .input-action {
  border-color: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .input-action.primary {
  background: rgba(0, 145, 179, 0.08);
  border-color: var(--border-hover);
  color: var(--primary);
}

[data-theme="light"] .input-action.primary:hover {
  background: rgba(0, 145, 179, 0.15);
}

/* 第三方登录按钮 */
[data-theme="light"] .oauth-btn {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .oauth-btn:hover {
  background: rgba(0, 145, 179, 0.06);
  border-color: var(--border-hover);
}

[data-theme="light"] .oauth-btn.enterprise svg {
  color: var(--primary);
}

/* 弹层蒙层：浅色用更轻的半透明深色蒙层 */
[data-theme="light"] .wechat-modal-mask,
[data-theme="light"] .forgot-modal-mask {
  background: rgba(15, 23, 42, 0.45);
}

/* 弹层卡片：浅色用纯白 */
[data-theme="light"] .wechat-modal-card,
[data-theme="light"] .forgot-modal-card {
  background: var(--bg-elev);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

/* Toast */
[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  border-color: rgba(15, 23, 42, 0.1);
}

/* 步骤指示器圆点 */
[data-theme="light"] .forgot-step-num {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.1);
}

/* 底部 */
.forgot-modal-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--card-border);
  text-align: center;
  font-size: var(--fs-small);
  color: var(--text-muted);
}

/* ===========================
   响应式
   ========================== */
@media (max-width: 900px) {
  .login-stack {
    max-width: 460px;
  }

  .login-panel {
    padding: 28px 26px 24px;
  }
}

/* 移动端（≤767px）：备案号回到 3 行垂直布局（与图示一致）
   - flex 改 column 让 a1 / a2 各占一行
   - 隐藏 ｜ 分隔符 */
@media (max-width: 767px) {
  .login-footnote-icp {
    flex-direction: column;
    align-items: center;
  }

  .login-footnote-sep {
    display: none;
  }
}

@media (max-width: 480px) {
  .login-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .login-stack {
    max-width: 100%;
  }

  .login-panel {
    padding: 24px 22px 22px;
  }

  .login-tab {
    font-size: var(--fs-body);
    margin-right: 20px;
  }

  .oauth-row {
    flex-direction: column;
  }

  .login-footnote {
    margin-top: 16px;
    font-size: var(--fs-caption);
  }
}

/* ===========================
   演示模式警示横幅（仅 debug=true 时显示）
   ========================== */
.demo-banner {
  background: linear-gradient(90deg, #B8860B 0%, #D4A017 100%);
  color: #1a1a1a;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  font-size: var(--fs-small);
  line-height: 1.5;
  position: relative;
  z-index: 9999;
}

.demo-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-banner-icon {
  font-size: var(--fs-h4);
  flex-shrink: 0;
}

.demo-banner-text {
  flex: 1;
}

.demo-banner-text strong {
  font-weight: 700;
  margin-right: 4px;
}

.demo-banner-text code {
  background: rgba(0, 0, 0, 0.12);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono, 'SF Mono', Menlo, monospace);
  font-size: var(--fs-caption);
}

@media (max-width: 640px) {
  .demo-banner-inner {
    padding: 8px 16px;
    font-size: var(--fs-caption);
  }
}
