/* VITC SSO - 极简控制台
   语言：monochrome 表面 + 单一松绿强调色、1px 发丝边框、几乎无阴影。
   反馈组件统一为「信号轨」：状态色只出现在左侧竖轨、状态图标与状态词上，
   底色一律用面板色。暗色模式只换令牌，组件规则不动。 */
:root {
  color-scheme: light;

  /* 表面与文字 */
  --bg: #FAFAFA;
  --panel: #FFFFFF;
  --fill-1: #F5F5F5;        /* 次级表面：代码块、头像底、悬停 */
  --fill-2: #FAFAFA;        /* 三级表面：表头、行悬停 */
  --fill-hover: #F0F0F0;    /* 选中态 */
  --ink: #0A0A0A;
  --ink-2: #2E2E2E;
  --muted: #525252;
  --faint: #717171;         /* 4.7:1 on --bg —— 小字元信息可读的最低灰度 */
  --line: #E5E5E5;
  --line-soft: #F0F0F0;
  --line-strong: #D4D4D4;

  /* 实心控件 */
  --ink-hover: #262626;
  --on-solid: #FFFFFF;
  --on-avatar: #FFFFFF;

  /* 强调：accent 只做图形（竖轨、圆点、进度条），文字与实心按钮一律用 accent-deep，
     否则 #0E9F76 上的白字只有 3.4:1，小字按钮读不清 */
  --accent: #0E9F76;
  --accent-deep: #0A7357;
  --accent-deep-hover: #085C43;
  --accent-soft: #E9F7F1;
  --on-accent: #FFFFFF;

  /* 状态：文字 / 淡底 / 描边 / 实心按钮 */
  --success: #0C7F4B;
  --success-bg: #F2FAF6;
  --success-line: #D6EFE3;
  --danger: #C4322A;
  --danger-strong: #A92B24;
  --danger-bg: #FEF3F2;
  --danger-line: #F3C9C5;
  --danger-solid: #D92D20;
  --warn: #9A6208;
  --warn-bg: #FFFBF2;
  --warn-line: #F3E5C8;

  /* 第三方品牌色：只用于那一个按钮，不参与全站强调。
     借品牌蓝做描边与文字，比画一个走形的企鹅标更诚实。
     文字色比品牌蓝压深两档：#12B7F5 当正文只有 2.2:1，悬停底 #F5F5F6 上要过 4.5 才合格 */
  --qq: #12B7F5;
  --qq-ink: #0A6E92;
  /* GitHub 不用品牌色：描边走 ink，和全站中性体系一致，也不与 QQ 蓝抢注意力 */
  --gh: var(--ink-2);
  --gh-ink: var(--ink);

  /* 焦点、遮罩与层级阴影 */
  --focus-ring: rgba(10, 10, 10, .06);
  --danger-ring: rgba(240, 68, 56, .10);
  --scrim: rgba(10, 10, 10, .32);

  --font: "Inter", "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  /* 等宽只承担状态码、令牌、密钥这类技术信息，不做正文 */
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --shadow-1: 0 1px 2px rgba(10, 10, 10, .04);
  --shadow-2: 0 8px 24px rgba(10, 10, 10, .07);
  --shadow-3: 0 24px 64px rgba(10, 10, 10, .16);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* 暗色只覆盖语义令牌：所有组件规则在明暗两套下完全一致 */
[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0B0B0C;
  --panel: #141416;
  --fill-1: #1B1B1E;
  --fill-2: #17171A;
  --fill-hover: #222226;
  --ink: #F5F5F6;
  --ink-2: #D6D6DA;
  --muted: #A0A0A7;
  --faint: #7E7E86;
  --line: #26262B;
  --line-soft: #1E1E22;
  --line-strong: #3A3A41;

  --ink-hover: #E7E7EA;
  --on-solid: #0B0B0C;
  --on-avatar: #FFFFFF;

  --accent: #2FBD90;
  --accent-deep: #59D6AE;
  --accent-deep-hover: #7BE6C4;
  --accent-soft: rgba(47, 189, 144, .12);
  --on-accent: #06231B;

  --success: #3ECF8E;
  --success-bg: rgba(62, 207, 142, .10);
  --success-line: rgba(62, 207, 142, .26);
  --danger: #F97066;
  --danger-strong: #FDA29B;
  --danger-bg: rgba(249, 112, 102, .10);
  --danger-line: rgba(249, 112, 102, .28);
  --danger-solid: #E5484D;
  --warn: #F0B44A;
  --warn-bg: rgba(240, 180, 74, .10);
  --warn-line: rgba(240, 180, 74, .26);

  /* 品牌蓝在深底上要提亮，否则描边几乎看不见（暗色只换令牌，规则不动） */
  --qq: #2FC6FF;
  --qq-ink: #7AD4F7;

  --focus-ring: rgba(245, 245, 246, .12);
  --danger-ring: rgba(249, 112, 102, .20);
  --scrim: rgba(0, 0, 0, .62);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .55);
  --shadow-3: 0 24px 64px rgba(0, 0, 0, .62);
}

* { box-sizing: border-box; }
/* 组件规则里的 display 会压过浏览器默认的 [hidden]{display:none}；统一钉死，
   登录两步切换、确认框的空备注、密钥原文这几处才能靠 hidden 属性可靠隐藏 */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
/* html 也吃背景色：暗色下滚动越界区域不会露出白底 */
html { background: var(--bg); }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  letter-spacing: -.006em;
}
/* 链接走 accent-deep：#0E9F76 在白底只有 3.4:1，正文字号读不清 */
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin-top: 0; }
svg { display: block; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

/* ---------- 共用组件 ---------- */
.logo-mark { display: inline-flex; flex: none; }
.brand-word { font-size: 15.5px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--faint); border-left: 1px solid var(--line); padding-left: 10px; margin-left: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  background: var(--panel); color: var(--ink-2); text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn-primary { background: var(--ink); color: var(--on-solid); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); color: var(--on-solid); }
/* 实心强调按钮同样改用深松绿：白字在 #0E9F76 上不达标 */
.btn-accent { background: var(--accent-deep); color: var(--on-accent); border-color: var(--accent-deep); }
.btn-accent:hover { background: var(--accent-deep-hover); border-color: var(--accent-deep-hover); color: var(--on-accent); }
.btn-outline { background: var(--panel); border-color: var(--line); color: var(--ink-2); }
.btn-outline:hover { background: var(--fill-2); border-color: var(--line-strong); color: var(--ink); }
.btn-danger { background: var(--panel); border-color: var(--danger-line); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger-strong); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--fill-1); color: var(--ink); }
/* 第三方登录：只用品牌色描边与文字，实心底会跟主按钮抢注意力，
   而这个入口本来就是次要路径（账号密码才是本站的默认方式） */
.btn-qq { background: var(--panel); border-color: var(--qq); color: var(--qq-ink); font-weight: 500; }
.btn-qq:hover { background: var(--fill-1); border-color: var(--qq-ink); color: var(--qq-ink); }
.btn-github { background: var(--panel); border-color: var(--gh); color: var(--gh-ink); font-weight: 500; }
.btn-github:hover { background: var(--fill-1); border-color: var(--gh-ink); color: var(--gh-ink); }
.btn-block { width: 100%; height: 44px; font-size: 14px; }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled, .btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
/* 提交中的按钮：保留可读性，用转圈表示正在等待响应 */
.btn.is-loading { opacity: .82; cursor: progress; pointer-events: none; }
.btn-spinner {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: btn-spin .7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 1.8s; }
}
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.text-link { font-size: 13px; font-weight: 500; }
/* 复制成功后按钮短暂转为成功态，与轻提示同步 */
.btn.is-copied { color: var(--success); border-color: var(--success-line); background: var(--panel); }

/* 主题切换：控制台顶栏常驻。图标随当前主题互换，点击后写入 localStorage */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none; padding: 0;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  color: var(--muted); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.theme-toggle:hover { background: var(--fill-1); color: var(--ink); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.field { margin-bottom: 17px; }
.field > label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 7px; }
.field-hint { font-size: 12px; color: var(--faint); margin-top: 6px; line-height: 1.6; }
/* 字段错误：图标 + 文案，占满一行不挤压标签；只在这里出现小号状态色 */
.field-error {
  display: flex; align-items: flex-start; gap: 6px;
  margin-top: 7px; font-size: 12px; line-height: 1.6; color: var(--danger);
}
.field-error svg { width: 13px; height: 13px; margin-top: 2px; flex: none; }

/* ---------- 一次性验证码：六格分栏（登录第二步 / 个人中心绑定） ----------
   六个格子只是展示层；真正的输入始终是压在格子上的那个原生 input：
   点击、粘贴、系统自动填充、读屏报读全都还是原生行为，脚本只把值摊进格子并画一根光标。
   脚本未就绪时不加 .is-enhanced —— 格子隐藏、input 保持普通输入框，功能一点都不掉。 */
/* 后台卡片比登录页宽得多，不设上限的话每格会被拉成长条；340px 下六格接近正方形 */
.otp { position: relative; max-width: 340px; }
.otp-cells { display: none; }
.otp.is-enhanced .otp-cells {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px;
}
.otp-cell {
  position: relative; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--ink);
  font-family: var(--mono); font-size: 20px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: border-color .16s ease-out, box-shadow .16s ease-out;
  animation: otp-cell-in .34s var(--ease) both;
}
/* 六格错峰入场：一格 30ms，整套 150ms 内到位，作为这一屏唯一的编排时刻 */
.otp-cell:nth-child(2) { animation-delay: 30ms; }
.otp-cell:nth-child(3) { animation-delay: 60ms; }
.otp-cell:nth-child(4) { animation-delay: 90ms; }
.otp-cell:nth-child(5) { animation-delay: 120ms; }
.otp-cell:nth-child(6) { animation-delay: 150ms; }
@keyframes otp-cell-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}
.otp-cell.is-filled { border-color: var(--line-strong); }
.otp-cell.is-active { border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus-ring); }
.otp.is-invalid .otp-cell { border-color: var(--danger-line); }
.otp.is-invalid .otp-cell.is-active { box-shadow: 0 0 0 3px var(--danger-ring); }

/* 光标：2×22 的松绿细针。原生 caret 已被设成透明，这根针替代它做插入点提示；
   闪烁用 1.06s 硬切而不是渐变，才像一个真正的文字光标，而不是在发光的装饰。 */
.otp-caret {
  position: absolute; left: 50%; top: 50%;
  width: 2px; height: 22px; margin: -11px 0 0 -1px;
  border-radius: 1px; background: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: otp-caret-blink 1.06s linear infinite;
}
@keyframes otp-caret-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* 透明输入框铺满整块：点哪里都能聚焦，触摸目标自然达到 50px */
.otp.is-enhanced .otp-native {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; padding: 0; margin: 0;
  border: 0; background: transparent;
  color: transparent; caret-color: transparent;
  font-size: 16px;              /* ≥16px：iOS 聚焦时不会把整页放大 */
  text-indent: 0; letter-spacing: 0;
  user-select: none; -webkit-user-select: none;
}
/* 焦点样式由格子承担，否则透明输入框会在整排外面画一个大矩形 */
.otp.is-enhanced .otp-native:focus { box-shadow: none; }
.input {
  width: 100%; height: 43px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--ink); font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--focus-ring); }
.input:disabled, .input[readonly] { background: var(--fill-2); color: var(--muted); cursor: not-allowed; }
.input.is-invalid { border-color: var(--danger-line); }
.input.is-invalid:focus { box-shadow: 0 0 0 3px var(--danger-ring); }
textarea.input { height: auto; min-height: 92px; padding: 11px 13px; resize: vertical; line-height: 1.6; }
select.input { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 4.5 3.5 3 3.5-3' fill='none' stroke='%23525252' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent; border: 0; color: var(--faint); cursor: pointer;
  padding: 0; border-radius: 6px;
}
.input-toggle svg { width: 18px; height: 18px; }
/* 默认显示「眼睛」，切换为明文后显示「眼睛斜线」 */
.input-toggle .eye-off { display: none; }
.input-toggle.is-visible .eye-on { display: none; }
.input-toggle.is-visible .eye-off { display: block; }
.input-toggle:hover { color: var(--ink-2); background: var(--fill-1); }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.check-row input { margin: 3px 0 0; width: 15px; height: 15px; accent-color: var(--ink); flex: none; }

/* ============================================================
   反馈组件：信号轨（Signal Rail）
   全站的状态色只出现在三个位置——左侧 3px 竖轨、16px 状态图标、状态词。
   底色固定为面板色，不铺淡彩；明暗两套主题共用同一组规则。
   ============================================================ */
.ui-alert {
  --tone: var(--line-strong);
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 14px 12px 16px;
  margin-bottom: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
}
/* 竖轨：状态色的唯一载体，高度随内容自适应 */
.ui-alert::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--tone);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.ui-alert-icon { width: 16px; height: 16px; margin-top: 2px; color: var(--tone); }
.ui-alert-body { min-width: 0; }
.ui-alert-title { margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--ink); }
.ui-alert-text { margin: 0; }
/* 提示内容常带段落与链接，统一压掉浏览器默认边距，避免条内出现空洞 */
.ui-alert p { margin: 0; }
.ui-alert p + p { margin-top: 6px; }
.ui-alert strong { color: var(--ink); font-weight: 600; }
.ui-alert a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ui-alert code {
  font-family: var(--mono); font-size: 12px; padding: 1px 5px;
  background: var(--fill-1); border: 1px solid var(--line); border-radius: 4px;
}
.ui-alert.is-success { --tone: var(--success); }
.ui-alert.is-error   { --tone: var(--danger); }
.ui-alert.is-warning { --tone: var(--warn); }
.ui-alert.is-info    { --tone: var(--faint); }
/* 结果条：同一套结构放大，用于页面完成态（验证成功等）——说明与操作成组出现 */
.ui-alert.is-lg { padding: 16px 18px 16px 20px; font-size: 13.5px; line-height: 1.75; }

/* 徽标：与提示条同源的竖条，状态不只靠颜色区分 */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 11.5px; font-weight: 500; white-space: nowrap; border: 1px solid var(--line); background: var(--fill-1); color: var(--muted); }
.badge::before { content: ""; width: 3px; height: 10px; border-radius: 1px; background: currentColor; opacity: .85; }
.badge-neutral { background: var(--fill-1); color: var(--muted); border-color: var(--line); }
.badge-green { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.badge-red { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge-orange { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge-blue { background: var(--fill-1); color: var(--ink-2); border-color: var(--line); }

/* 空状态：几何线框代表「空容器」，不用插画、不用表情 */
.ui-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 46px 24px 50px; }
/* 空状态的线框要「在场但不喧哗」：faint 再压一半透明度，明暗两套都不抢正文 */
.ui-empty-mark { width: 58px; height: 42px; margin-bottom: 16px; color: var(--faint); opacity: .45; }
.ui-empty-title { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.ui-empty-desc { margin: 0; max-width: 36em; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.ui-empty-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ui-empty.is-compact { padding: 30px 20px 32px; }
.ui-empty.is-compact .ui-empty-mark { width: 44px; height: 32px; margin-bottom: 12px; }

/* 轻提示：只用于「操作已生效」这类不需要打断的即时反馈 */
.ui-toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.ui-toast {
  position: relative; display: flex; align-items: flex-start; gap: 9px;
  min-width: 190px; max-width: min(360px, calc(100vw - 32px));
  padding: 10px 13px 10px 15px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2); font-size: 12.5px; color: var(--ink-2);
  pointer-events: auto; animation: ui-toast-in .22s var(--ease) both;
}
.ui-toast::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--success); border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.ui-toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; }
.ui-toast svg { width: 15px; height: 15px; color: var(--success); margin-top: 1px; flex: none; }
@keyframes ui-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ui-toast.is-error::before { background: var(--danger); }
.ui-toast.is-error svg { color: var(--danger); }

/* 操作确认：原生 dialog，危险动作的确认键才用实心红。
   竖轨用 border-left 实现，不额外制造定位上下文——dialog 的模态定位必须留给浏览器。
   这是全站唯一一处把信号色铺到边框上的组件：确认框是阻断性的。 */
.ui-confirm {
  width: min(430px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-left: 3px solid var(--tone, var(--danger));
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-3);
}
.ui-confirm::backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
.ui-confirm[open] { animation: ui-confirm-in .2s var(--ease) both; }
@keyframes ui-confirm-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.ui-confirm-inner { padding: 20px 22px 16px 20px; }
.ui-confirm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ui-confirm-head svg { width: 16px; height: 16px; color: var(--tone, var(--danger)); flex: none; }
.ui-confirm-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.ui-confirm-text { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.ui-confirm-note { margin: 12px 0 0; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--faint); }
.ui-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; }
.ui-confirm .btn-danger-solid { background: var(--danger-solid); border-color: var(--danger-solid); color: #FFFFFF; }
.ui-confirm .btn-danger-solid:hover { background: var(--danger-strong); border-color: var(--danger-strong); color: #FFFFFF; }

/* 提交进度：页面级不确定进度条，比按钮转圈更能说明「整页正在等待」 */
.ui-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 300; pointer-events: none; overflow: hidden; }
.ui-progress::before { content: ""; position: absolute; top: 0; bottom: 0; width: 38%; background: var(--accent); animation: ui-progress-slide 1.1s var(--ease) infinite; }
@keyframes ui-progress-slide { from { left: -38%; } to { left: 100%; } }

/* 提示条内的一次性数据（密钥、调试链接）：等宽、可换行、紧跟复制按钮 */
.ui-alert-code {
  display: block; margin: 9px 0 10px; padding: 9px 11px;
  background: var(--fill-1); border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--mono); font-size: 12px; line-height: 1.7;
  color: var(--ink-2); white-space: pre-line; word-break: break-all;
}

/* 两步验证二维码：白底硬边，暗色主题下也必须保持可扫的黑白对比。
   内联 SVG 自带静区（quiet zone），这里只补一点内边距与描边。 */
.qr-frame {
  display: block; width: fit-content; max-width: 100%;
  padding: 12px; background: #ffffff;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  line-height: 0;
}
.qr-svg { display: block; max-width: 100%; height: auto; }

/* 设置期：扫码与手动密钥并排一行，二维码本体收在原生 dialog 里，点按钮才出现 */
.qr-setup-row {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 14px; margin: 0 0 20px;
}
.qr-setup-col {
  min-width: 0; padding: 14px;
  background: var(--fill-1); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.qr-setup-label { font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; }
.qr-setup-col .ui-alert-code { margin: 0; }
.qr-setup-scan .btn { width: 100%; }
@media (max-width: 700px) {
  .qr-setup-row { grid-template-columns: 1fr; }
}

.qr-dialog {
  width: min(92vw, 380px); max-width: none; padding: 0;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}
.qr-dialog::backdrop { background: rgba(0, 0, 0, .58); }
/* 不支持 showModal 的老浏览器：退化成普通内联卡片，二维码照样看得见 */
.qr-dialog.is-inline { position: static; display: block; width: 100%; margin: 0 0 18px; box-shadow: none; }
.qr-dialog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--line-soft);
}
.qr-dialog-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.qr-dialog-x {
  width: 30px; height: 30px; flex: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer;
}
.qr-dialog-x:hover { background: var(--fill-1); color: var(--ink); }
.qr-dialog-x svg { width: 18px; height: 18px; }
.qr-dialog-body { padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-dialog-body .field-hint { margin: 0; text-align: center; }
.qr-dialog-actions { padding: 0 16px 16px; display: flex; justify-content: flex-end; }

/* ---------- 认证页：居中卡片 ---------- */
/* dvh 跟随移动端地址栏变化，避免 100vh 高于可视区域把整页撑出滚动条 */
.page-auth { min-height: 100vh; min-height: -webkit-fill-available; min-height: 100dvh; background: var(--bg); overflow-x: hidden; }
.auth-shell { max-width: 440px; margin: 0 auto; padding: 56px 20px 28px; min-height: 100vh; min-height: -webkit-fill-available; min-height: 100dvh; display: flex; flex-direction: column; }
.auth-brandbar { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 32px; box-shadow: var(--shadow-1); }
.auth-title { font-size: 24px; font-weight: 600; letter-spacing: -.025em; margin: 0 0 6px; }
.auth-subtitle { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 0 0 26px; }
.auth-card .btn-block { margin-top: 4px; }
/* 第三方登录：一条发丝线把「或」压在中间，只在自己身上留出间距，
   不另起一个色块，避免把登录卡切成两半 */
.auth-alt { margin-top: 20px; }
.auth-alt-sep { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--faint); font-size: 12px; }
.auth-alt-sep::before, .auth-alt-sep::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
/* 两个第三方入口等宽并排：btn-block 的 width:100% 在 grid 单元内自然等分，
   不必再给按钮单独设宽度。只开一个平台时 is-single 让它占满整行，不留半列空白 */
.auth-alt-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.auth-alt-row.is-single { grid-template-columns: minmax(0, 1fr); }
/* 文案用「QQ 登录 / GitHub 登录」而非「使用…登录」：320px 容器里每列约 127px，
   图标 + 短文案才放得下；padding 收到 6px，把空间让给内容。 */
.auth-alt-row .btn-block { margin-top: 0; min-width: 0; padding: 0 6px; gap: 7px; }
/* 品牌图标走 currentColor，继承 QQ 蓝 / GitHub 墨色，不引入新颜色。
   flex:none 防止窄列里被压变形；15px 比 14px 文字略大一点，视觉上压得住。 */
.auth-brand-icon { width: 15px; height: 15px; flex: none; display: block; }
.form-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 18px; font-size: 12.5px; }
.form-meta label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; }
.form-meta input { width: 14px; height: 14px; accent-color: var(--ink); margin: 0; }
.auth-links { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); text-align: center; font-size: 13px; color: var(--muted); }
.auth-links a { font-weight: 500; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 18px; }
.auth-footer { margin-top: auto; padding-top: 28px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--faint); }
.auth-footer a { color: var(--muted); }
.sso-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--accent-soft); color: var(--accent-deep); padding: 6px 11px; border-radius: 6px; font-size: 12.5px; margin-bottom: 20px; }
.sso-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
/* 页内结果块：认证卡片里的整块结论（无法继续 / 需要处理）。
   居中版式下竖轨不成立，改用「状态色描边的方牌」承担同样的信号职责。 */
.ui-result { --tone: var(--warn); --tone-line: var(--warn-line); text-align: center; padding: 14px 2px 4px; }
.ui-result.is-error   { --tone: var(--danger);  --tone-line: var(--danger-line); }
.ui-result.is-success { --tone: var(--success); --tone-line: var(--success-line); }
.ui-result.is-info    { --tone: var(--faint);   --tone-line: var(--line-strong); }
.ui-result-mark {
  width: 46px; height: 46px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--tone-line); border-radius: 13px;
  background: var(--panel); color: var(--tone);
}
.ui-result-mark svg { width: 21px; height: 21px; }
.ui-result-title { margin: 0 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.ui-result-text { margin: 0 0 24px; color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.ui-result-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }

/* 授权被拒页：认证卡片里的「失败说明」。
   ui-result 是「一句结论 + 一个按钮」，这页要放下对照信息与归因，
   所以拆成 结论 → 对照 → 归因 → 登录状态 → 出口 五段。
   对照块沿用控制台的次级表面 + 左侧 2px 状态轨，不引入第二种颜色。 */
.page-auth-reject .auth-shell { max-width: 460px; }
/* 不覆盖 .auth-card 的内边距：≤560px 已有 22px 20px 20px 的移动端规则，
   更高优先级的 .page-auth-reject .auth-card 会把那条顶掉，只剩 285px 可用宽度。 */
.page-auth-reject .auth-title { font-size: 21px; }
.page-auth-reject .auth-subtitle { margin-bottom: 18px; }
.reject-body { margin-top: 4px; }
/* balance 而不是 pretty：中文没有空格，pretty 断行基本不生效，孤字照旧 */
.reject-lead { margin: 0 0 18px; font-size: 13.5px; line-height: 1.8; color: var(--muted); text-wrap: balance; }
.reject-lead strong { color: var(--ink); font-weight: 600; }
.reject-facts {
  margin: 0 0 16px; padding: 13px 15px;
  background: var(--fill-2); border: 1px solid var(--line-soft);
  border-left: 2px solid var(--danger-line); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.reject-fact { margin: 0; }
.reject-fact + .reject-fact { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
/* faint 在 --fill-2 上暗色主题只有 4.44，卡在 AA 门槛下；这两处是小字标签，
   改用 muted（明 7.8 / 暗 7.1），靠字号而不是灰度做层级 */
.reject-fact dt { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.reject-fact dd { margin: 5px 0 0; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
/* 地址走等宽：这是要拿去和后台逐字核对的技术串，不是正文 */
.reject-url { font-family: var(--mono); font-size: 12px; line-height: 1.7; word-break: break-all; }
.reject-scheme { color: var(--muted); }
.reject-host { color: var(--ink); font-weight: 500; }
.reject-path { color: var(--muted); }
/* faint 是「元信息的最低灰度」，撑不住三四行的归因段落，改用 muted（7.8:1） */
.reject-note { margin: 0 0 14px; font-size: 12.5px; line-height: 1.8; color: var(--muted); text-wrap: balance; }
/* 登录状态是这页最容易被误读的一段，单独给一块底，别再混进上面的说明里 */
.reject-session { margin: 0 0 20px; padding: 12px 14px; background: var(--fill-1); border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.8; color: var(--ink-2); text-wrap: balance; }
.reject-session strong { font-weight: 600; }
.reject-actions { display: flex; flex-direction: column; gap: 10px; }
.reject-actions .btn-block { margin-top: 0; }
.reject-actions form { margin: 0; }
.steps { background: var(--fill-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 20px; }
.steps p { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.steps p:last-child { margin-bottom: 0; }

/* ---------- 控制台骨架：浅色侧栏 + 细边框 ---------- */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30; }
.sidebar-brand { height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line-soft); }
/* 品牌名较长，窄侧栏内单行截断，不挤压 logo */
.sidebar-brand .brand-word { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { padding: 16px 10px; flex: 1; overflow-y: auto; }
.nav-group { margin-bottom: 20px; }
.nav-label { padding: 0 10px; margin-bottom: 6px; color: var(--faint); font-size: 11.5px; font-weight: 500; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-size: 13.5px; position: relative; text-decoration: none; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--fill-1); color: var(--ink); text-decoration: none; }
.nav-item.is-active { background: var(--fill-hover); color: var(--ink); font-weight: 500; }
.nav-item.is-active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; background: var(--accent); border-radius: 0 2px 2px 0; }
.nav-icon { width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; flex: none; }
.nav-icon svg { width: 17px; height: 17px; }
.nav-bottom { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.sidebar-foot { padding: 14px 18px; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: 11.5px; }
/* 退出登录走 POST + CSRF，按钮外观复刻导航项 */
.nav-logout { margin: 0; }
.nav-item-button { width: 100%; background: transparent; border: 0; cursor: pointer; text-align: left; }
.dropdown-logout { width: 100%; text-align: left; background: transparent; border: 0; padding: 9px 11px; border-radius: 6px; font-size: 13px; color: var(--danger); cursor: pointer; transition: background .15s; }
.dropdown-logout:hover { background: var(--danger-bg); }

.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; gap: 16px; position: sticky; top: 0; z-index: 20; }
.crumbs { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); min-width: 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumb-sep { color: var(--line-strong); }
.crumb-current { color: var(--ink); font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.user-menu { position: relative; }
.user-trigger { display: flex; align-items: center; gap: 9px; background: transparent; border: 0; cursor: pointer; padding: 5px 6px; border-radius: 7px; color: var(--ink-2); transition: background .15s; }
.user-trigger:hover { background: var(--fill-1); }
.user-name { font-size: 13px; font-weight: 500; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { width: 14px; height: 14px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--on-avatar); font-weight: 500; flex: none; }
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.avatar-lg { width: 54px; height: 54px; font-size: 20px; }
/* 图片头像复用同一套尺寸与圆角；槽位让 img 与首字母色块能互相顶替而不改外层布局 */
.avatar-slot { display: inline-flex; flex: none; vertical-align: middle; }
.avatar-img { object-fit: cover; background: var(--fill-2); }
/* 头像来源的单选行沿用 .check-row，不额外引入一套表单样式 */
.user-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 210px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 6px; z-index: 50; }
.user-menu.is-open .user-dropdown { display: block; }
.dropdown-head { padding: 10px 11px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 5px; display: flex; flex-direction: column; gap: 3px; }
.dropdown-head strong { font-size: 13px; font-weight: 600; }
.dropdown-head small { color: var(--faint); font-size: 11.5px; word-break: break-all; }
.user-dropdown a { display: block; padding: 9px 11px; border-radius: 6px; font-size: 13px; color: var(--ink-2); text-decoration: none; }
.user-dropdown a:hover { background: var(--fill-1); color: var(--ink); text-decoration: none; }
.icon-btn { display: none; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--panel); border-radius: 7px; cursor: pointer; color: var(--ink-2); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- 页面与卡片 ---------- */
.page { padding: 28px clamp(24px, 3vw, 48px) 56px; width: 100%; max-width: 1600px; margin-inline: auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0; }
.page-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.page-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* 页面没有右侧操作时不留空容器，标题独占整行 */
.page-head-actions:empty { display: none; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card-title { font-size: 14px; font-weight: 600; margin: 0; }
.card-desc { font-size: 12.5px; color: var(--muted); margin: 3px 0 0; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
/* card-grid 里左表单与右侧信息卡的内容量差得远，硬拉齐会在矮的一侧留下大片空白，
   所以默认保持各自内容高度；只有 insight-grid（两张可横向比较的数据卡）强制齐平。
   概览页的「最近登录活动 / 账号信息」需要底部齐平，用 is-equal 单独开启：
   只把卡片盒子拉到同一高度，内容仍从顶部开始。 */
.card-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.card-grid > .card { margin-bottom: 0; }
.card-grid.is-equal { align-items: stretch; }
.card-grid.is-equal > .card { display: flex; flex-direction: column; }
.card-grid.is-equal > .card > .card-body { flex: 1; }
.insight-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
/* 数据卡一律等高（grid 默认 stretch）：底部边框齐平，比较两列信息时视线不会被错位的边框打断。
   内容仍从顶部开始，差额留在卡片底部。 */
.insight-grid > .card { display: flex; flex-direction: column; margin-bottom: 0; }
.insight-grid > .card > .card-body { flex: 1; }
/* 趋势图柱高由数据决定，撑不满整张卡片，居中放置避免底部拖出一大片空白 */
.card-body.is-vcenter { display: flex; flex-direction: column; justify-content: center; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat-value { font-size: 32px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 6px; }
.stat-hint { font-size: 12px; color: var(--faint); }
.stat-bar { height: 2px; border-radius: 2px; background: var(--ink); margin-top: 14px; opacity: .85; }
.stat-bar.is-orange { background: var(--warn); }
.stat-bar.is-red { background: var(--danger); }
.stat-bar.is-blue { background: var(--faint); }

/* 表格：细线、无斑马纹 */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data th { text-align: left; padding: 11px 18px; background: var(--fill-2); color: var(--muted); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data td { padding: 13px 18px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); vertical-align: middle; }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr:hover { background: var(--fill-2); }
.data td.num { font-variant-numeric: tabular-nums; }
.cell-main { color: var(--ink); font-weight: 500; }
.cell-sub { color: var(--faint); font-size: 12px; margin-top: 3px; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.row-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.table-foot { padding: 13px 18px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12.5px; }
.pagination { display: flex; gap: 4px; flex-wrap: wrap; }
.page-btn { min-width: 32px; height: 31px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink-2); font-size: 12.5px; text-decoration: none; transition: background .15s, border-color .15s; }
.page-btn:hover { background: var(--fill-1); border-color: var(--line-strong); text-decoration: none; }
.page-btn.is-active { background: var(--ink); color: var(--on-solid); border-color: var(--ink); }
.page-btn.is-disabled { opacity: .4; pointer-events: none; }
/* 表格里的一行异常说明（如「地址仍为 HTTP」），与字段错误同色不同权重 */
.cell-warn { color: var(--danger); font-weight: 500; }

/* 表单与筛选 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.section-title { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.section-desc { color: var(--muted); font-size: 12.5px; margin: 0 0 20px; }
.form-actions { display: flex; gap: 10px; padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--line-soft); }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.filters .input { height: 36px; font-size: 13px; width: auto; min-width: 150px; }
.filters .input.grow { flex: 1; min-width: 190px; }
.filters select.input { min-width: 130px; padding-right: 30px; }
.filters .btn { height: 36px; }
.filters-label { font-size: 12.5px; color: var(--muted); }

.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0 16px; }
.kv dt { color: var(--muted); font-size: 13px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.kv dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); font-size: 13.5px; word-break: break-all; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
.profile-hero { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.profile-hero h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.profile-hero p { margin: 0; color: var(--muted); font-size: 12.5px; }
.profile-hero-id { min-width: 0; }

/* 头像显示方式：两个词的分段控件，贴在 hero 右侧。
   高度 28px 低于左侧头像（54px），不会把这一行撑高；选中态沿用全站的
   「面板色 + 内描边」，不新造一层阴影。真控件是 button，脚本被关掉也能提交。 */
.avatar-switch { margin-left: auto; flex: none; display: flex; }
.seg {
  display: inline-flex; gap: 2px; padding: 2px;
  background: var(--fill-1); border: 1px solid var(--line); border-radius: 999px;
}
.seg > button {
  appearance: none; margin: 0; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font: inherit; font-size: 12px; line-height: 1; white-space: nowrap;
  padding: 7px 11px; min-height: 28px; cursor: pointer;
  transition: background .15s, color .15s;
}
.seg > button:hover { color: var(--ink-2); }
.seg > button[aria-checked="true"] {
  background: var(--panel); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1);
}

/* 后台提交期间：控件不可再点，但不做成「禁用灰」——那会让人以为操作被拒绝 */
form.is-busy { opacity: .55; pointer-events: none; }

/* ---------- 账号安全：分区条（导航即体检结论） ----------
   三个条目既是这一页的目录，也是三项保护各自的现状。状态色只落在左侧竖轨与状态词上，
   与全站「信号轨」同一套语义；选中态用面板色 + 内描边，不新造一套阴影层级。
   刻意是 <a> 而不是 tablist：每次切换都是真正的页面请求，不假装可以原地切面板。 */
.sec-tabs {
  display: grid; grid-template-columns: repeat(var(--sec-cols, 3), minmax(0, 1fr));
  gap: 4px; padding: 4px; margin-bottom: 20px;
  background: var(--fill-1); border: 1px solid var(--line); border-radius: var(--radius);
}
.sec-tab {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  min-height: 60px; padding: 10px 12px 10px 16px;
  border-radius: 8px; color: var(--muted); text-decoration: none;
  transition: background .15s, color .15s;
}
.sec-tab:hover { background: var(--fill-hover); color: var(--ink-2); text-decoration: none; }
.sec-tab.is-active { background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); }
.sec-tab-rail { position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--line-strong); }
.sec-tab.is-active .sec-tab-rail { left: 5px; width: 3px; }
.sec-tab.is-ok .sec-tab-rail { background: var(--accent); }
.sec-tab.is-warn .sec-tab-rail { background: var(--warn); }
.sec-tab.is-na .sec-tab-rail { background: var(--line); }
.sec-tab-name { font-size: 13px; font-weight: 500; letter-spacing: -.01em; }
.sec-tab-state { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sec-tab.is-ok .sec-tab-state { color: var(--success); }
.sec-tab.is-warn .sec-tab-state { color: var(--warn); }

/* 开关行：一个原生 submit 按钮 + role=switch。没有脚本也能完成切换，
   确认框由全站的 data-confirm 提供，所以这里不写任何 JS。 */
.ui-switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 16px;
  background: var(--fill-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
}
.ui-switch-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ui-switch-title { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.ui-switch-desc { font-size: 12px; color: var(--muted); line-height: 1.6; }
.ui-switch {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  min-height: 44px; padding: 0; margin: 0;
  background: transparent; border: 0; cursor: pointer;
  color: var(--muted); font-size: 12.5px;
}
/* 轨道本身就是开关的边界：关闭态用 --faint 而不是发丝线，控件轮廓要够 3:1 */
.ui-switch-track {
  position: relative; width: 44px; height: 26px; flex: none;
  background: var(--faint); border-radius: 999px;
  transition: background .18s var(--ease);
}
.ui-switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--panel); box-shadow: 0 1px 2px rgba(10, 10, 10, .3);
  transition: transform .18s var(--ease);
}
.ui-switch[aria-checked="true"] .ui-switch-track { background: var(--accent-deep); }
.ui-switch[aria-checked="true"] .ui-switch-thumb { transform: translateX(18px); }
.ui-switch[aria-checked="true"] .ui-switch-state { color: var(--accent-deep); font-weight: 500; }
.ui-switch:hover .ui-switch-track { filter: brightness(.94); }
[data-theme="dark"] .ui-switch:hover .ui-switch-track { filter: brightness(1.1); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.timeline li:last-child { border-bottom: 0; }
.timeline-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--accent); }
.timeline-dot.is-red { background: var(--danger); }
.timeline-dot.is-orange { background: var(--warn); }
.timeline-dot.is-grey { background: var(--line-strong); }
.timeline-body { flex: 1; min-width: 0; }
.timeline-body small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 3px; }
.trend { display: flex; align-items: flex-end; gap: 10px; height: 132px; padding: 8px 4px 0; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.trend-bar { width: 100%; max-width: 40px; min-height: 3px; background: var(--line); border-radius: 4px 4px 2px 2px; transition: height .3s var(--ease), background .15s; }
.trend-col.is-today .trend-bar { background: var(--ink); }
.trend-col:hover .trend-bar { background: var(--muted); }
.trend-col.is-today:hover .trend-bar { background: var(--ink-hover); }
.trend-label { font-size: 11px; color: var(--faint); white-space: nowrap; }
.trend-value { font-size: 11px; color: var(--muted); }
.tip { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.tip strong { color: var(--ink-2); }
.app-line { display: flex; align-items: center; gap: 12px; }
.app-glyph { width: 34px; height: 34px; border-radius: 8px; background: var(--fill-1); border: 1px solid var(--line); color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex: none; }
.code-inline { background: var(--fill-1); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; font-size: 12.5px; color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.dim { color: var(--faint); }

/* ---------- 工单：可展开的历史记录 ----------
   用原生 details / summary，不写脚本也能展开；summary 只承担一行摘要，
   完整描述与管理员回复放在展开后的正文里，列表不至于被长文本撑满。 */
.ticket-filterbar {
  display: flex; gap: 4px; flex-wrap: wrap; width: fit-content; max-width: 100%;
  margin: 0 0 16px; padding: 4px;
  background: var(--fill-1); border: 1px solid var(--line); border-radius: 10px;
}
.ticket-filter {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 7px;
  color: var(--muted); font-size: 12.5px; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.ticket-filter:hover { background: var(--panel); color: var(--ink); text-decoration: none; }
.ticket-filter.is-active {
  background: var(--panel); border-color: var(--line); color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.ticket-filter-count {
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--fill-2); color: var(--muted);
  font-size: 11px; line-height: 1;
}
.ticket-filter.is-active .ticket-filter-count { background: var(--ink); color: var(--on-solid); }

/* 筛选/翻页取片段期间的占位：与表单提交的 is-busy 同一套视觉语言，
   整块降透明度比转圈更诚实——这里确实只是在等服务端把新的一段送回来。 */
#ticket-board.is-busy { opacity: .55; pointer-events: none; }

.ticket-list { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.ticket {
  border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: 10px; background: var(--panel); overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.ticket:last-child { border-bottom: 1px solid var(--line); }
.ticket:hover { border-color: var(--line-strong); }
.ticket-open { border-left-color: var(--warn); }
.ticket-processing { border-left-color: var(--accent); }
.ticket-resolved { border-left-color: var(--success); }
.ticket-closed { border-left-color: var(--faint); }
.ticket-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; cursor: pointer; list-style: none;
  transition: background .15s;
}
.ticket-summary::-webkit-details-marker { display: none; }
.ticket-summary:hover { background: var(--fill-2); }
.ticket[open] { border-color: var(--line-strong); box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.ticket[open] > .ticket-summary { background: var(--fill-1); border-bottom: 1px solid var(--line-soft); }
.ticket-sum { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.ticket-id { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.ticket-cat { font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.ticket-excerpt {
  font-size: 12.5px; color: var(--muted); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52ch;
}
.ticket-meta { display: flex; align-items: center; gap: 10px; flex: none; }
.ticket-msg-count { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.ticket-time { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.ticket-chev { width: 14px; height: 14px; color: var(--faint); transition: transform .15s var(--ease); }
.ticket[open] .ticket-chev { transform: rotate(180deg); }
.ticket-body { padding: 18px 20px 22px; }
.ticket-content {
  margin: 0 0 16px; font-size: 13.5px; color: var(--ink-2);
  line-height: 1.8; white-space: pre-wrap; word-break: break-word;
}
.ticket-reply {
  padding: 12px 16px; background: var(--fill-2);
  border-left: 2px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.ticket-reply h3 { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ticket-reply p { margin: 0; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }

/* ---------- 工单对话：用户右侧、管理员左侧 ---------- */
.ticket-thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.ticket-msg {
  max-width: min(78%, 620px);
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel);
}
.ticket-msg.is-user {
  align-self: flex-end;
  background: var(--accent-soft);
  border-color: var(--success-line);
}
.ticket-msg.is-admin { align-self: flex-start; background: var(--fill-2); }
/* 后台查看时视角反过来：管理员自己的消息靠右，用户消息靠左 */
.ticket-thread.is-admin-view .ticket-msg.is-user {
  align-self: flex-start;
  background: var(--fill-2);
  border-color: var(--line-soft);
}
.ticket-thread.is-admin-view .ticket-msg.is-admin {
  align-self: flex-end;
  background: var(--accent-soft);
  border-color: var(--success-line);
}
.ticket-msg-head {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 4px; font-size: 11.5px; color: var(--muted);
}
.ticket-msg p {
  margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
}
.ticket-compose {
  display: flex; gap: 10px; align-items: flex-start;
  border-top: 1px solid var(--line-soft); padding-top: 14px;
}
.ticket-compose-field { flex: 1; min-width: 0; }
.ticket-compose textarea { min-height: 70px; }
.ticket-compose .field-error { margin-top: 6px; }
.ticket-closed-hint { margin: 0; border-top: 1px solid var(--line-soft); padding-top: 12px; }

/* ---------- 后台工单工作台：对话 + 右侧属性栏 ---------- */
.ticket-workbench {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px; align-items: start;
}
.ticket-workbench-main, .ticket-workbench-side { min-width: 0; }
.ticket-workbench .card { margin-bottom: 0; }
.ticket-workbench-side {
  display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 84px;
}
.ticket-conversation-head { align-items: flex-start; }
.ticket-kicker {
  font-family: var(--mono); font-size: 11.5px; color: var(--faint);
  margin-bottom: 6px; letter-spacing: .01em;
}
.ticket-conversation-badges {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end;
}
.ticket-conversation .card-body { padding: 20px 20px 8px; }
.ticket-conversation .ticket-thread { margin-bottom: 12px; }
.ticket-composer {
  border-top: 1px solid var(--line-soft);
  padding: 16px 20px 18px;
  background: var(--fill-2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.ticket-composer-field { margin-bottom: 10px; }
.ticket-composer-field > label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--ink-2); margin-bottom: 7px;
}
.ticket-composer textarea { min-height: 96px; }
.ticket-composer-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.ticket-composer-actions .field-hint { margin: 0; }
.ticket-workbench-side .kv { grid-template-columns: 92px minmax(0, 1fr); }
.ticket-workbench-side .kv dt, .ticket-workbench-side .kv dd { padding: 8px 0; font-size: 12.5px; }
.ticket-side-divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.ticket-side-note { font-size: 12px; color: var(--muted); line-height: 1.75; }

/* ---------- 宽屏信息栏：与卡片同材质，不做深色破格 ---------- */
.ops-rail { grid-column: 1 / -1; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.rail-head { margin-bottom: 18px; }
.rail-kicker { font-size: 11.5px; color: var(--faint); margin-bottom: 4px; }
.rail-head h2 { font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -.015em; }
.rail-flow { list-style: none; margin: 0 0 20px; padding: 0; }
.rail-flow li { position: relative; padding: 0 0 14px 16px; border-left: 1px solid var(--line); }
.rail-flow li:last-child { border-left-color: transparent; padding-bottom: 0; }
.rail-flow li::before { content: ""; position: absolute; left: -3px; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.rail-flow strong { display: block; font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.rail-flow small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
/* 宽屏三列时信息栏会被拉到与卡片等高，运行状态因此贴住底边，不让底部悬空 */
.rail-block { border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: auto; }
.rail-kv { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px 12px; margin: 10px 0 18px; font-size: 12.5px; }
.rail-kv dt { color: var(--muted); }
.rail-kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.rail-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rail-links a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink-2); font-size: 12.5px; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.rail-links a:hover { background: var(--fill-2); border-color: var(--line-strong); text-decoration: none; }

/* ---------- 接入文档 ---------- */
.doc-h { font-size: 13px; font-weight: 600; margin: 22px 0 10px; }
.doc-h:first-child { margin-top: 0; }
.doc-p { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 0 0 16px; }
/* 步骤编号是信息结构，不是装饰 */
.doc-steps { list-style: none; margin: 0 0 22px; padding: 0; counter-reset: step; }
.doc-steps li { position: relative; margin-left: 12px; padding: 0 0 18px 26px; border-left: 1px solid var(--line); }
.doc-steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.doc-steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -12px; top: 0; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 50%;
  font-size: 11.5px; font-weight: 500; color: var(--ink-2);
}
.doc-steps strong { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.doc-steps p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.doc-code {
  margin: 0 0 18px; padding: 14px 16px; background: var(--fill-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.75; color: var(--ink-2);
}
.doc-code code { font: inherit; white-space: pre; }
.doc-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.doc-list li { margin-bottom: 8px; }
.doc-list li:last-child { margin-bottom: 0; }
.doc-list strong { color: var(--ink-2); }

.nav-scrim { display: none; }

/* ---------- 响应式 ---------- */
@media (min-width: 1600px) {
  .insight-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 300px; }
  .ops-rail { grid-column: auto; }
}
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid, .insight-grid { grid-template-columns: 1fr; }
  .ops-rail { grid-column: auto; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 240px; transform: translateX(-100%); transition: transform .2s var(--ease); z-index: 60; box-shadow: var(--shadow-2); }
  .sidebar.is-open { transform: translateX(0); }
  .nav-scrim.is-open { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 50; }
  .icon-btn { display: inline-flex; }
  .page { padding: 22px 18px 40px; }
  .topbar { padding: 0 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .page-head { flex-direction: column; }
  .ticket-workbench { grid-template-columns: 1fr; }
  .ticket-workbench-side { position: static; }
  .ticket-conversation-badges { justify-content: flex-start; }
}
@media (max-width: 560px) {
  /* 收紧纵向间距，让品牌栏、表单和版权一起落在首屏内 */
  .auth-shell { padding: 20px 14px 12px; }
  /* 品牌栏与版权各吃一半剩余空间，内容在首屏垂直居中，版权仍贴底 */
  .auth-brandbar { margin-top: auto; margin-bottom: 18px; }
  .auth-card { padding: 22px 20px 20px; }
  .auth-title { font-size: 22px; }
  .auth-subtitle { margin-bottom: 20px; }
  .sso-chip { margin-bottom: 14px; }
  .field { margin-bottom: 14px; }
  .form-meta { margin: -2px 0 14px; }
  .auth-footer { padding-top: 14px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 15px; }
  .stat-value { font-size: 26px; }
  .kv { grid-template-columns: 100px minmax(0, 1fr); }
  .user-name { display: none; }
  .insight-grid { gap: 14px; }
  .rail-links { grid-template-columns: 1fr; }
  /* 反馈组件：窄屏收紧留白，轻提示改为贴底通栏，避开 iOS 手势区 */
  .ui-empty { padding: 34px 18px 38px; }
  .ui-empty.is-compact { padding: 24px 16px 26px; }
  .ui-alert { padding: 11px 12px 11px 14px; }
  .ui-alert.is-lg { padding: 14px 14px 14px 17px; }
  .ui-toast-stack {
    right: 12px; left: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    align-items: stretch;
  }
  .ui-toast { width: 100%; max-width: none; }
  .ui-confirm-inner { padding: 18px 18px 14px; }
  .ui-confirm-actions { padding: 0 18px 18px; }
  .ui-confirm-actions .btn { flex: 1; }
  /* 账号安全：窄屏放不下四个分区（每个只剩 80px，「第三方登录」会折行），
     改成两列两行；桌面列数由 --sec-cols 决定，加分区不必再改这里 */
  .sec-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec-tab { min-height: 56px; padding: 9px 8px 9px 13px; }
  .sec-tab-rail { top: 10px; bottom: 10px; }
  .sec-tab-name { font-size: 12.5px; }
  .sec-tab-state { font-size: 11px; }
  .sec-tab-extra { display: none; }
  /* 开关行改成上下两段：标题独占一行，开关落到左边缘，拇指更好点 */
  .ui-switch-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 14px; }
  .ui-switch { justify-content: flex-start; }
  /* 头像切换：窄屏放不下「头像 + 姓名 + 分段控件」一行，让它换行靠右，
     同时把按钮抬到 34px —— 桌面可以只挨鼠标，触屏必须留出指尖面积 */
  .profile-hero { flex-wrap: wrap; row-gap: 10px; }
  .avatar-switch { margin-left: auto; }
  .seg > button { min-height: 34px; padding: 8px 12px; }
  /* 工单摘要：窄屏放不下一行，改成两行，时间让位给描述 */
  .ticket-filterbar { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .ticket-filter { flex: none; }
  .ticket-list { padding: 8px; }
  .ticket-summary { flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
  .ticket-excerpt { max-width: none; white-space: normal; }
  .ticket-time, .ticket-msg-count { display: none; }
  .ticket-body { padding: 14px 16px 18px; }
  .ticket-msg { max-width: 90%; }
  .ticket-compose { flex-direction: column; align-items: stretch; }
  .ticket-compose .btn { width: 100%; }
  .ticket-composer { padding: 14px 16px 16px; }
  .ticket-composer-actions { align-items: flex-start; }
  .ticket-composer-actions .btn { width: 100%; }
}
/* 矮屏（如 iPhone SE）再压一档，保证版权仍在首屏底部 */
@media (max-width: 560px) and (max-height: 640px) {
  .auth-shell { padding-top: 12px; }
  .auth-brandbar { margin-bottom: 12px; }
  .auth-card { padding: 18px 18px 16px; }
  .auth-subtitle { margin-bottom: 16px; }
  .field { margin-bottom: 12px; }
  .auth-footer { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- 登录页：与后台同一套 monochrome + 松绿组件语言 ----------
   这里只负责「裸居中版式」的布局覆盖；颜色、圆角、控件尺寸一律回落到 :root
   与后台组件规则，避免登录页演化成另一套设计系统。 */
/* 登录页只覆盖版式。色彩一律回落到 :root —— 链接色已是 accent-deep，
   不再需要页面级的对比度补偿，避免两套取色规则各自演化。 */
.page-auth-login { background: var(--bg); }
/* 内容区整体上移；底部版权 / 备案独立贴底，不随内容移动 */
.page-auth-login .auth-shell {
  max-width: 320px;
  padding: clamp(64px, 14vh, 132px) 20px 96px;
  justify-content: flex-start;
}
.page-auth-login .auth-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.page-auth-login .auth-hero { text-align: center; margin-bottom: 18px; }
.page-auth-login .auth-title {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0 0 14px;
}
/* 「正在为 XX 验证身份」置于标题正下方并居中，沿用后台 chip 的松绿语义 */
.page-auth-login .sso-chip {
  display: flex;
  width: fit-content;
  margin: 0 auto 24px;
}
.page-auth-login .auth-signup-hint {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 20px 0 0;
}
.page-auth-login .auth-signup-hint strong { color: var(--accent-deep); font-weight: 600; }
/* 相对视口而非 320px 的 auth-shell，宽度充足，版权与备案保持同一行不折行 */
.page-auth-login .auth-footer {
  position: fixed; left: 0; right: 0; bottom: 22px;
  margin: 0; padding: 0; justify-content: center; text-align: center;
  font-size: 12px; color: var(--faint);
  white-space: nowrap;
}
.page-auth-login .auth-footer a { color: var(--faint); }
/* H5（手机）不展示 ICP 备案，只保留版权，避免窄屏挤压 */
@media (max-width: 560px) {
  .auth-icp { display: none; }
}

/* ---------- 419 页面已过期：左对齐窄栏 + 令牌有效窗口刻度 ----------
   极简克制方向：整页 monochrome，唯一强调色只给刻度条最后一格。
   等宽字体承担状态码与技术信息的展示角色，与正文形成对比。 */
.page-expired {
  --expired: var(--danger);
  background: var(--bg);
}
.page-expired .expired-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: clamp(72px, 16vh, 168px) 24px 56px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.page-expired .expired-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--faint);
}
/* 状态码之后拉一条发丝线，把「技术信息」与「正文」在视觉上分开 */
.page-expired .expired-meta::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.page-expired .expired-title {
  font-size: clamp(26px, 4.2vw, 32px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin: 24px 0 14px;
}
.page-expired .expired-desc {
  margin: 0 0 40px;
  max-width: 34em;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}
.page-expired .expired-meter {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}
.page-expired .expired-meter span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}
/* 最后一格＝仍在跳动的过期令牌，用一个红点承担全部警示语义 */
.page-expired .expired-meter span:last-child {
  background: var(--expired);
  animation: expired-breathe 2.4s ease-in-out infinite;
}
@keyframes expired-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: .28; }
}
.page-expired .expired-meter-note {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--faint);
  margin-bottom: 40px;
}
.page-expired .expired-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.page-expired .expired-actions .btn {
  height: 44px;
  padding: 0 22px;
  font-size: 13.5px;
}
.page-expired .expired-link {
  font-size: 13px;
  color: var(--muted);
}
.page-expired .expired-link:hover { color: var(--ink); }
.page-expired .expired-hint {
  margin: 24px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--faint);
}
.page-expired .expired-footer {
  margin-top: auto;
  padding-top: 56px;
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 12px;
  color: var(--faint);
}
.page-expired .expired-footer a { color: var(--faint); }

/* 一次错峰入场，只动 opacity 与 transform；reduced-motion 由全局规则关闭 */
.page-expired .expired-shell > *:not(.expired-footer) {
  animation: expired-rise .5s var(--ease) both;
}
.page-expired .expired-title { animation-delay: 60ms; }
.page-expired .expired-desc { animation-delay: 110ms; }
.page-expired .expired-meter { animation-delay: 160ms; }
.page-expired .expired-meter-note { animation-delay: 190ms; }
.page-expired .expired-actions { animation-delay: 240ms; }
.page-expired .expired-hint { animation-delay: 280ms; }
@keyframes expired-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 560px) {
  .page-expired .expired-shell { padding: 56px 20px 40px; }
  .page-expired .expired-desc { margin-bottom: 32px; }
  .page-expired .expired-meter-note { margin-bottom: 32px; }
}



/* 打印：跳过导航与主题切换不参与打印 */
@media print {
  .skip-link, .theme-toggle { display: none; }
}
