/* ==========================================================================
   app.css — 结构布局与组件样式
   ========================================================================== */

/* ---------------------------------------------------------------- 启动遮罩 */
#boot {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px;
  background: linear-gradient(160deg, #F4F6FB 0%, #E9EEFA 100%);
}
.boot__logo {
  width: 56px; height: 56px; border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid rgba(31, 41, 55, .08);
  box-shadow: 0 10px 24px rgba(79, 107, 237, .22);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  animation: bootPulse 1.6s var(--ease) infinite;
}
.boot__logo img { width: 78%; height: 78%; display: block; }
@keyframes bootPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.boot__text { color: var(--text-3); font-size: 13px; letter-spacing: .04em; }
/* 深色模式下的启动遮罩（html 标记在首帧前写入，无闪白） */
[data-theme="dark"] #boot { background: linear-gradient(160deg, #0E1218 0%, #0A0D12 100%); }

/* -------------------------------------------------------------------- 登录 */
/* ★ 蓝白配色 · 表单直接呈现在网页上：顶部蓝色品牌栏 + 纯白页面，无浮卡弹层 */
.login-wrap {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; flex-direction: column;
  background:
    radial-gradient(820px 480px at 88% -6%, rgba(79,107,237,.09) 0%, rgba(79,107,237,0) 62%),
    radial-gradient(680px 420px at -6% 104%, rgba(79,107,237,.07) 0%, rgba(79,107,237,0) 60%),
    linear-gradient(180deg, #FFFFFF 0%, #F6F8FE 100%);
}
/* ★ 登录页固定「蓝白配色」：深色模式下整页仍是白底，必须把这批浅色令牌就地还原——
   否则标题（--text=#E7EBF3）等近白文字落在白底上几乎不可见（浏览器偏好深色时尤为明显）。 */
:root[data-theme="dark"] .login-wrap {
  --text: #171C26; --text-2: #4A5364; --text-3: #8B93A5;
  --border: #E7EAF1; --border-strong: #D8DDE8;
  --primary: #4F6BED; --primary-600: #3D57D6; --primary-700: #3146B0;
  --primary-100: #DFE5FE; --primary-50: #EEF1FE;
  --amber: #F79009; --amber-50: #FEF4E6;
  --green: #12B76A; --green-600: #0E9F5B; --green-50: #E7F8F0;
  --red: #F04438; --red-600: #D92D20; --red-50: #FEECEA;
  --warn-text: #9A5B00; --warn-border: #F7D9A6;
  --err-text: #D92D20;  --err-border: #F8C9C4;
  --ok-text: #0E9F5B;   --ok-border: #B7E8CD;
}
/* 顶部品牌栏下的渐变装饰线 */
.login-bg::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #3D57D6 0%, #6E86F5 34%, #BFD0FF 62%, #6E86F5 82%, #3D57D6 100%);
  z-index: 2;
}
/* 淡蓝装饰圆环，右下角若隐若现 */
.login-bg::after {
  content: ""; position: absolute; right: -180px; bottom: -180px;
  width: 460px; height: 460px; border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(79, 107, 237, .10);
  box-shadow: 0 0 0 70px rgba(79, 107, 237, .03);
}

/* ---- 顶部蓝色品牌栏 ---- */
.login-topbar {
  position: relative; z-index: 1; flex: none;
  height: 66px; padding: 0 clamp(20px, 6vw, 56px);
  display: flex; align-items: center;
  background:
    radial-gradient(520px 120px at 12% 120%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(100deg, var(--primary-700) 0%, var(--primary-600) 44%, var(--primary) 100%);
  box-shadow: 0 2px 14px rgba(49, 70, 176, .20);
}
.login-topbar__brand { display: flex; align-items: center; gap: 12px; }
.login-brand__mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}
.login-brand__mark img { width: 82%; height: 82%; display: block; }
.login-brand__name { font-size: 15px; font-weight: 600; letter-spacing: .03em; color: #FFFFFF; }
.login-brand__sub { font-size: 10.5px; color: rgba(255, 255, 255, .74); letter-spacing: .18em; text-transform: uppercase; }

/* ---- 主体：表单直接铺在页面上 ---- */
.login-panel {
  position: relative; z-index: 1; flex: 1;
  width: 100%; display: flex; align-items: center; justify-content: center;
  padding: 44px 24px 30px;
}
.login-form { width: 100%; max-width: 392px; }
/* 眉标：小号蓝色分隔标识，替代原卡片边框 */
.login-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .2em; color: var(--primary-600);
}
.login-eyebrow::before {
  content: ""; width: 26px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, #93A7F7 100%);
}
.login-card__title { font-size: 26px; font-weight: 650; letter-spacing: -.02em; color: var(--text); margin-bottom: 8px; }
.login-card__hint { color: var(--text-3); font-size: 13px; margin-bottom: 28px; line-height: 1.6; }

/* ---- 输入框：图标 + 描边 + 聚焦高亮 ---- */
.login-field { margin-bottom: 18px; }
.login-field__label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.login-field__box {
  position: relative; display: flex; align-items: center; height: 46px;
  border: 1px solid #D3DCF2; border-radius: var(--r-md); background: #FFFFFF;
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.login-field__box:hover { border-color: #B9C6EC; }
.login-field__box:focus-within {
  border-color: var(--primary); background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(79, 107, 237, .13);
}
.login-field__icon {
  width: 17px; height: 17px; flex: none; margin: 0 10px 0 13px;
  color: #97A3BC; transition: color var(--dur);
}
.login-field__box:focus-within .login-field__icon { color: var(--primary); }
/* 输入框本体：去掉自带高度与边框，交给外层 box 承载视觉 */
.login-field__box .input {
  flex: 1; height: 100%; border: 0; background: transparent; padding: 0; box-shadow: none;
  font-size: 14px;
}
.login-field__box .input:focus { border: 0; box-shadow: none; }
.login-field__eye {
  flex: none; width: 42px; height: 100%; border: 0; background: transparent; cursor: pointer;
  color: #97A3BC; display: flex; align-items: center; justify-content: center;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.login-field__eye:hover { color: var(--primary); }
.login-field__eye svg { width: 17px; height: 17px; }
.login-field__eye.is-on { color: var(--primary); }
/* 邮箱验证码「发送 / 重发」按钮：文字型（区别于图标型 eye）——按内容宽度、不换行，倒计时也不会折行 */
.login-field__eye.login-field__send {
  width: auto; padding: 0 13px; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.login-field__eye.login-field__send:disabled { color: #97A3BC; cursor: default; }

.login-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.login-check input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.login-btn {
  width: 100%; height: 44px; border: 0; border-radius: var(--r-md); cursor: pointer;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .04em;
  box-shadow: 0 8px 20px rgba(79, 107, 237, .30);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), filter var(--dur);
}
.login-btn:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(79, 107, 237, .38); }
.login-btn:active { transform: translateY(1px); }
.login-btn[disabled] { opacity: .6; cursor: not-allowed; box-shadow: none; }
.login-alert {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 13px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 18px;
  background: var(--amber-50); color: var(--warn-text); border: 1px solid var(--warn-border); line-height: 1.6;
}
/* ★ 提示条内的图标必须有固定尺寸，否则 SVG 会撑满整行 */
.login-alert svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.login-alert--err { background: var(--red-50); color: var(--err-text); border-color: var(--err-border); }
.login-alert--ok { background: var(--green-50); color: var(--ok-text); border-color: var(--ok-border); }

/* ---- 底部信息条 ---- */
.login-foot {
  position: relative; z-index: 1; flex: none;
  padding: 16px 0 20px; text-align: center;
  font-size: 11.5px; color: var(--text-3); letter-spacing: .04em;
}
.login-foot::before {
  content: ""; display: block; width: 56px; height: 1px; margin: 0 auto 14px;
  background: linear-gradient(90deg, rgba(79,107,237,0) 0%, rgba(79,107,237,.28) 50%, rgba(79,107,237,0) 100%);
}
/* ★ ICP 备案号（2026-10-28）：按备案要求悬挂在登录页底部，点击跳转工信部备案查询系统。
   与上方信息行同字号但再淡一档，避免抢走表单视觉重心；深色模式下由 .login-wrap 的
   浅色令牌还原兜底（--text-3 已被就地改回深灰），无需二次适配。 */
.login-foot__icp {
  display: inline-block; margin-top: 7px;
  font-size: 11.5px; letter-spacing: .04em;
  color: var(--text-3); text-decoration: none;
  transition: color .16s ease;
}
.login-foot__icp:hover { color: var(--primary-600); text-decoration: underline; }
/* ★ 公安联网备案（2026-10-29）：徽标 + 备案号，按公安备案要求悬挂在 ICP 备案号之后。
   徽标 36×40 缩到高约 14px 与文字基线对齐；同字号同灰阶，视觉上作为第二枚备案标识不抢焦点。 */
.login-foot__ga {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 14px;
  font-size: 11.5px; letter-spacing: .04em;
  color: var(--text-3); text-decoration: none;
  transition: color .16s ease;
  vertical-align: middle;
}
.login-foot__ga img { width: auto; height: 14px; display: block; }
.login-foot__ga:hover { color: var(--primary-600); text-decoration: underline; }

/* ------------------------------------------------- 登录第二步：小程序扫码 */
.scan-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.scan-step {
  font-size: 11.5px; padding: 3px 10px; border-radius: var(--r-full);
  background: #EEF2FC; color: var(--text-3); border: 1px solid #E0E6F5;
  white-space: nowrap;
}
.scan-step--done { background: var(--green-50); color: var(--green-600); border-color: #B7E8CD; }
.scan-step--active { background: var(--primary-50); color: var(--primary-600); border-color: var(--primary-100); font-weight: 600; }

.scan-box { display: flex; flex-direction: column; align-items: center; }
.scan-frame {
  position: relative; width: 208px; height: 208px;
  background: #FFFFFF; border: 1px solid #DCE4F7; border-radius: var(--r-lg);
  padding: 12px; box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(49, 70, 176, .09), 0 0 0 6px rgba(79, 107, 237, .04);
}
/* 四角蓝色描角，强化「扫描框」识别度 */
.scan-corner { position: absolute; width: 18px; height: 18px; border: 2.5px solid var(--primary); }
.scan-corner--tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.scan-corner--tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.scan-corner--bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.scan-corner--br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.scan-qr { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: var(--r-sm); }
.scan-veil {
  position: absolute; inset: 0; border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .93);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(1.5px);
}
.scan-veil__text { font-size: 13px; color: var(--text-2); text-align: center; line-height: 1.7; padding: 0 16px; }
.scan-tip { margin-top: 13px; font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.7; }
.scan-tip b { color: var(--primary-600); font-weight: 600; }

.scan-status {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 16px; font-size: 13px; color: var(--text-2); font-weight: 500;
}
.scan-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex: none;
  animation: scan-pulse 1.3s ease-in-out infinite;
}
.scan-status--scanned .scan-dot { background: var(--primary); animation: none; }
.scan-status--ok .scan-dot { background: var(--green); animation: none; }
.scan-status--err .scan-dot { background: var(--red); animation: none; }
.scan-status--ok { color: var(--green-600); }
.scan-status--err { color: var(--red-600); }
@keyframes scan-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .28; } }

/* 有效期进度条：随时间收缩，直观提示剩余时间 */
.scan-progress {
  margin: 14px auto 0; width: 100%; max-width: 300px; height: 4px;
  border-radius: var(--r-full); background: #E7ECF9; overflow: hidden;
}
.scan-progress__bar {
  height: 100%; width: 100%; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--primary) 0%, #7E93F6 100%);
  transition: width 1s linear;
}
.scan-countdown { margin-top: 9px; text-align: center; font-size: 12px; color: var(--text-3); }
.scan-countdown b { color: var(--primary-700); font-variant-numeric: tabular-nums; font-weight: 600; }

.scan-warn {
  margin-top: 12px; padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--amber-50); border: 1px solid #F7D9A6; color: #9A5B00;
  font-size: 12px; line-height: 1.65; text-align: left;
}
.scan-back { margin-top: 14px; text-align: center; }
.scan-back a { font-size: 12.5px; color: var(--text-3); cursor: pointer; }
.scan-back a:hover { color: var(--primary-600); }

/* 登录方式切换（微信扫码登录 / 邮箱登录，2026-10）：两个明确入口 */
.login-modes { display: flex; gap: 8px; margin-bottom: 18px; }
.login-mode {
  flex: 1; height: 40px; border: 1px solid var(--border); border-radius: var(--r-sm, 10px);
  background: #FFFFFF; color: var(--text-2); font-size: 13.5px; font-family: inherit;
  cursor: pointer; transition: all .15s ease;
}
.login-mode:hover { border-color: #B9C6EC; color: var(--primary-600); }
.login-mode.is-active {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-50); font-weight: 600;
}
/* 登录卡片内的文字链（如「返回上一步」）：此前该类无任何样式，纯文字易被忽略 */
.login-card__toggle { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--text-3); cursor: pointer; }
.login-card__toggle:hover { color: var(--primary-600); }

.login-btn--ghost {
  background: #FFFFFF; color: var(--primary-600);
  box-shadow: none; border: 1px solid var(--primary-100);
  height: 38px; font-size: 13.5px;
}
.login-btn--ghost:hover { background: var(--primary-50); box-shadow: none; }
.login-btn + .login-btn { margin-top: 10px; }

/* -------------------------------------------------------------------- 布局 */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: none; position: fixed; inset: 0 auto 0 0; z-index: 60;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; transition: width var(--dur) var(--ease);
}
.sidebar__brand {
  height: var(--header-h); flex: none; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid var(--border);
}
.sidebar__mark {
  width: 32px; height: 32px; flex: none; border-radius: 9px;
  background: #FFFFFF;
  border: 1px solid rgba(31, 41, 55, .08);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(24, 33, 66, .08);
}
.sidebar__mark img { width: 82%; height: 82%; display: block; }
.sidebar__title { min-width: 0; }
.sidebar__title b { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: .01em; }
.sidebar__title span { display: block; font-size: 10.5px; color: var(--text-3); letter-spacing: .1em; }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.nav-group { margin-bottom: 4px; }
.nav-group__label {
  font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: .08em;
  padding: 14px 10px 7px; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  cursor: pointer; user-select: none; border-radius: var(--r-xs);
}
.nav-group__label:hover { color: var(--text-2); }
.nav-group__chev { width: 12px; height: 12px; opacity: .7; transition: transform var(--dur) var(--ease); }
.nav-group.is-folded .nav-group__chev { transform: rotate(-90deg); }
.nav-group.is-folded .nav-item { display: none; }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px;
  border-radius: var(--r-sm); cursor: pointer; color: var(--text-2);
  font-size: 13.5px; position: relative; user-select: none;
  transition: background var(--dur), color var(--dur);
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.is-active { background: var(--primary-50); color: var(--primary-700); font-weight: 600; }
.nav-item.is-active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav-item__icon { width: 17px; height: 17px; flex: none; opacity: .92; }
.nav-item__text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item__badge {
  flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full);
  background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.sidebar__foot {
  flex: none; padding: 10px; border-top: 1px solid var(--border);
}
.sidebar__collapse {
  width: 100%; height: 34px; border: 1px solid var(--border); background: var(--surface-2);
  border-radius: var(--r-sm); cursor: pointer; color: var(--text-3);
  display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px;
}
.sidebar__collapse:hover { background: var(--surface-3); color: var(--text-2); }
.sidebar__collapse svg { width: 14px; height: 14px; }

.layout.is-collapsed .sidebar { width: var(--sidebar-w-min); }
.layout.is-collapsed .sidebar__title,
.layout.is-collapsed .nav-item__text,
.layout.is-collapsed .nav-group__label,
.layout.is-collapsed .sidebar__collapse span { display: none; }
.layout.is-collapsed .nav-item { justify-content: center; padding: 0; }
.layout.is-collapsed .nav-item__badge { position: absolute; top: 2px; right: 6px; }
.layout.is-collapsed .sidebar__brand { justify-content: center; padding: 0; }
.layout.is-collapsed .main { margin-left: var(--sidebar-w-min); }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; transition: margin-left var(--dur) var(--ease); }

/* ------------------------------------------------------------------- 顶栏 */
.topbar {
  height: var(--header-h); flex: none; position: sticky; top: 0; z-index: 50;
  background: var(--topbar-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
}
.topbar__crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); min-width: 0; }
.topbar__crumb b { color: var(--text); font-weight: 600; font-size: 14px; }
.topbar__crumb svg { width: 14px; height: 14px; opacity: .5; }
.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: transparent; cursor: pointer; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; position: relative;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--border); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn__dot {
  position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--surface);
}
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 5px;
  border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: border-color var(--dur), box-shadow var(--dur);
}
.user-chip:hover { border-color: var(--border-strong); box-shadow: var(--sh-1); }
.user-chip__avatar {
  width: 27px; height: 27px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.user-chip__meta { line-height: 1.2; }
.user-chip__meta b { display: block; font-size: 12.5px; font-weight: 600; }
.user-chip__meta span { display: block; font-size: 10.5px; color: var(--text-3); }

/* ---------------------------------------------------------------- 内容容器 */
.content { flex: 1; padding: 20px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head__title { font-size: 19px; font-weight: 650; letter-spacing: -.015em; }
.page-head__desc { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.page-head__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* -------------------------------------------------------------------- 卡片 */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.card__head {
  display: flex; align-items: center; gap: 10px; padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card__title { font-size: 14.5px; font-weight: 600; }
.card__sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.card__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card__body { padding: 20px; }
.card__body--flush { padding: 0; }

/* 弹窗内的可折叠原文（如「查看完整原始记录」） */
.modal__body details > summary,
.drawer__body details > summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: 12.5px; color: var(--text-3);
}
.modal__body details > summary::-webkit-details-marker,
.drawer__body details > summary::-webkit-details-marker { display: none; }
.modal__body details > summary::before,
.drawer__body details > summary::before { content: "▸ "; }
.modal__body details[open] > summary::before,
.drawer__body details[open] > summary::before { content: "▾ "; }
.modal__body details > summary:hover,
.drawer__body details > summary:hover { color: var(--primary); }

/* 统计卡 */
/* ★ auto-fit：某行只有 4~5 张卡时也能撑满整行，不会在右侧留一个空槽 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 18px 18px 16px; box-shadow: var(--sh-1);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur);
}
.stat:hover { box-shadow: var(--sh-2); transform: translateY(-1px); border-color: var(--border-strong); }
.stat::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--stat-accent, var(--primary)); opacity: .85;
}
.stat__top { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.stat__icon {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--stat-wash, var(--primary-50)); color: var(--stat-accent, var(--primary));
}
.stat__icon svg { width: 15px; height: 15px; }
.stat__label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.stat__value { font-size: 26px; font-weight: 680; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat__value small { font-size: 12.5px; font-weight: 500; color: var(--text-3); margin-left: 5px; }
.stat__foot {
  margin-top: 7px; font-size: 11.5px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px; min-width: 0;
  /* ★ 避免中文短语被从中间截断（「近 7 天活 / 跃」这种很难看的换行） */
  word-break: keep-all; overflow-wrap: anywhere; line-height: 1.5;
}
.stat__delta { font-weight: 600; }
.stat__delta--up { color: var(--green-600); }
.stat__delta--down { color: var(--red-600); }

/* -------------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background var(--dur), border-color var(--dur), box-shadow var(--dur), color var(--dur), transform var(--dur);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 14px; height: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn--primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  box-shadow: 0 2px 8px rgba(79, 107, 237, .24);
}
.btn--primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%); }
.btn--danger { border-color: var(--err-border); color: var(--red-600); background: var(--surface); }
.btn--danger:hover { background: var(--red-50); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: var(--r-xs); }
.btn--sm svg { width: 12px; height: 12px; }
.btn--lg { height: 40px; padding: 0 18px; font-size: 14px; }
.btn--link { border: 0; background: transparent; height: auto; padding: 0 2px; color: var(--primary); font-weight: 500; }
.btn--link:hover { background: transparent; text-decoration: underline; }
.btn--link.btn--danger { color: var(--red-600); }

/* ------------------------------------------------------------------ 表单 */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field__hint { font-size: 11.5px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 34px; padding: 0 11px; border-radius: var(--r-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  outline: none; transition: border-color var(--dur), box-shadow var(--dur);
}
.textarea { height: auto; min-height: 78px; padding: 9px 11px; line-height: 1.65; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #A9B2C3; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: var(--sh-focus); }
/* 隐藏 Edge/IE 在 password 输入框内原生的小眼睛（页面已有自定义切换按钮，避免出现两个） */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear { display: none; }
.select { appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A94A6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 13px;
}
.search-box { position: relative; min-width: 218px; }
.search-box .input { padding-left: 32px; }
.search-box svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--text-3); pointer-events: none;
}
.switch { position: relative; display: inline-block; width: 38px; height: 21px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__slider {
  position: absolute; cursor: pointer; inset: 0; border-radius: var(--r-full);
  background: var(--border-strong); transition: background var(--dur);
}
.switch__slider::before {
  content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.24);
  transition: transform var(--dur) var(--ease);
}
.switch input:checked + .switch__slider { background: var(--primary); }
.switch input:checked + .switch__slider::before { transform: translateX(17px); }

/* 筛选条 */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.filter-bar .field { flex-direction: row; align-items: center; gap: 7px; }
.filter-bar .select, .filter-bar .input { height: 32px; }
.filter-bar__spacer { flex: 1; }
.seg {
  display: inline-flex; background: var(--surface-3); border-radius: var(--r-sm); padding: 2px; gap: 2px;
  border: 1px solid var(--border);
}
.seg button {
  border: 0; background: transparent; cursor: pointer; height: 26px; padding: 0 11px;
  border-radius: var(--r-xs); font-size: 12.5px; color: var(--text-2); white-space: nowrap;
  transition: background var(--dur), color var(--dur), box-shadow var(--dur);
}
.seg button:hover { color: var(--text); }
.seg button.is-active { background: var(--surface); color: var(--primary-700); font-weight: 600; box-shadow: var(--sh-1); }

/* ------------------------------------------------------------------ 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data th {
  position: sticky; top: 0; z-index: 2;
  text-align: left; font-weight: 600; font-size: 12px; color: var(--text-2);
  background: var(--surface-2); padding: 10px 14px; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
table.data th.is-sortable { cursor: pointer; user-select: none; }
table.data th.is-sortable:hover { color: var(--primary); }
table.data th .sort-ind { display: inline-block; margin-left: 4px; color: #B9C2D2; font-size: 10px; }
table.data th.is-sorted .sort-ind { color: var(--primary); }
table.data td {
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle; color: var(--text);
}
table.data tbody tr { transition: background var(--dur); }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr.is-selected { background: var(--primary-50); }
table.data td.cell--actions { white-space: nowrap; text-align: right; }
table.data th.cell--num, table.data td.cell--num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.cell--mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
table.data input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }

.cell-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cell-user__av {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #E3E8F8 0%, #CFD8F4 100%);
  color: var(--primary-700); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.cell-user__av img { width: 100%; height: 100%; object-fit: cover; }
[data-theme="dark"] .cell-user__av {
  background: linear-gradient(135deg, rgba(113,137,243,.26) 0%, rgba(113,137,243,.14) 100%);
  color: var(--primary-700);
}
.cell-user__meta { min-width: 0; }
.cell-user__name { font-weight: 500; }
.cell-user__sub { font-size: 11.5px; color: var(--text-3); font-family: var(--font-mono); }

/* --------------------------------------------------- 账号管理 · 编号 / 用户名 */
/* 账号编号：按等级生成（SA/OP/AU/OG/VW + 序号），等宽字体 + 浅底标签，方便纵向对齐 */
.acc-code {
  display: inline-flex; align-items: center; height: 21px; padding: 0 7px;
  border-radius: var(--r-xs); font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  background: var(--primary-50); color: var(--primary-700); border: 1px solid var(--primary-100);
  letter-spacing: .3px;
}
/* 用户名：标蓝 + 可点（弹出账号信息弹窗），不换行、过长省略 */
.acc-name { font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.acc-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.acc-meta__reason { font-size: 11.5px; color: var(--red-600); max-width: 220px; }

/* --------------------------------------------------------------- 徽章标签 */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px;
  border-radius: var(--r-full); font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid transparent;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge--plain::before { display: none; }
.badge--green  { background: var(--green-50);  color: var(--green-600); }
.badge--red    { background: var(--red-50);    color: var(--red-600); }
.badge--amber  { background: var(--amber-50);  color: #9A5B00; }
.badge--blue   { background: var(--primary-50);color: var(--primary-700); }
.badge--violet { background: var(--violet-50); color: #5B3FD6; }
.badge--cyan   { background: var(--cyan-50);   color: #0A7C97; }
.badge--pink   { background: var(--pink-50);   color: #B8327F; }
.badge--gold   { background: var(--gold-50);   color: var(--gold-deep); border-color: var(--gold-100); }
.badge--gray   { background: var(--surface-3); color: var(--text-3); }

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-xs);
  font-size: 11.5px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border);
}

/* ------------------------------------------------------------------ 分页 */
.pagination {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; flex-wrap: wrap;
  border-top: 1px solid var(--border); background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.pagination__info { font-size: 12.5px; color: var(--text-3); }
.pagination__spacer { flex: 1; }
.pagination__pages { display: flex; gap: 4px; align-items: center; }
.pagination__pages button {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--r-xs);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  cursor: pointer; font-size: 12.5px; transition: all var(--dur);
}
.pagination__pages button:hover:not([disabled]) { border-color: var(--primary); color: var(--primary); }
.pagination__pages button.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pagination__pages button[disabled] { opacity: .45; cursor: not-allowed; }

/* ------------------------------------------------------- 抽屉 / 弹窗 / toast */
.drawer-mask, .modal-mask {
  position: fixed; inset: 0; z-index: 300; background: var(--mask);
  backdrop-filter: blur(2px); opacity: 0; transition: opacity var(--dur) var(--ease);
}
.drawer-mask.is-open, .modal-mask.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 301;
  width: min(560px, 94vw); background: var(--surface); box-shadow: var(--sh-4);
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform .24s var(--ease);
}
.drawer.is-open { transform: translateX(0); }
.drawer--wide { width: min(860px, 96vw); }
.drawer__head {
  flex: none; height: 58px; padding: 0 18px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.drawer__title { font-size: 15px; font-weight: 650; }
.drawer__sub { font-size: 12px; color: var(--text-3); }
.drawer__close { margin-left: auto; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer__foot {
  flex: none; padding: 12px 18px; border-top: 1px solid var(--border);
  display: flex; gap: 9px; justify-content: flex-end; background: var(--surface-2);
}

.modal {
  position: fixed; z-index: 301; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.97);
  width: min(520px, 94vw); max-height: 88vh; background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-4); display: flex; flex-direction: column; opacity: 0;
  transition: opacity var(--dur) var(--ease), transform .22s var(--ease);
}
.modal.is-open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal--wide { width: min(760px, 96vw); }
.modal__head { flex: none; padding: 17px 20px 0; display: flex; align-items: flex-start; gap: 12px; }
.modal__title { font-size: 17px; font-weight: 650; }
.modal__desc { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.modal__close { margin-left: auto; }
.modal__body { flex: 1; overflow-y: auto; padding: 17px 20px; }
.modal__foot {
  flex: none; padding: 13px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 9px; justify-content: flex-end;
}

.toast-host {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px; padding: 10px 15px; border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--sh-3); border: 1px solid var(--border);
  font-size: 13px; max-width: 440px; pointer-events: auto;
  animation: toastIn .22s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.toast.is-out { animation: toastOut .18s var(--ease) forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }
.toast__icon { width: 17px; height: 17px; flex: none; }
.toast--ok .toast__icon { color: var(--green); }
.toast--err .toast__icon { color: var(--red); }
.toast--info .toast__icon { color: var(--primary); }

/* ------------------------------------------------------------ 图表 / 进度 */
.chart { width: 100%; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.chart-legend__item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.chart-legend__dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.chart-legend__val { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

.dist-list { display: flex; flex-direction: column; gap: 11px; }
.dist-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.dist-row__label { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-row__val { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dist-row__bar { grid-column: 1 / -1; height: 6px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.dist-row__fill { height: 100%; border-radius: var(--r-full); background: linear-gradient(90deg, var(--primary) 0%, var(--primary-600) 100%); }

/* --------------------------------------------------------------- 描述列表 */
.desc { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.desc__item { background: var(--surface); padding: 11px 14px; min-width: 0; }
.desc__item--full { grid-column: 1 / -1; }
.desc__k { font-size: 11.5px; color: var(--text-3); margin-bottom: 3px; }
.desc__v { font-size: 13px; word-break: break-all; }
.desc__v.mono { font-family: var(--font-mono); font-size: 12px; }

/* ------------------------------------------------------------------ 空/载 */
.empty { padding: 56px 20px; text-align: center; color: var(--text-3); }
.empty__icon { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--empty-icon); }
.empty__icon svg { width: 100%; height: 100%; }
.empty__title { font-size: 14px; color: var(--text-2); font-weight: 500; }
.empty__desc { font-size: 12.5px; margin-top: 5px; }

.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--r-xs); }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid rgba(79, 107, 237, .25); border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
.spinner--light { border-color: rgba(255,255,255,.4); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 34px; color: var(--text-3); font-size: 13px; }

/* ------------------------------------------------------------- Tabs / 其他 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 18px; overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; cursor: pointer; padding: 12px 13px;
  font-size: 13.5px; color: var(--text-2); position: relative; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--dur);
}
.tabs button:hover { color: var(--text); }
.tabs button.is-active { color: var(--primary-700); font-weight: 600; border-bottom-color: var(--primary); }
.tabs button .tabs__count {
  margin-left: 6px; font-size: 11px; padding: 1px 6px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-3);
}
.tabs button.is-active .tabs__count { background: var(--primary-50); color: var(--primary-700); }

.timeline { display: flex; flex-direction: column; }
.timeline__item { display: grid; grid-template-columns: 24px 1fr; gap: 10px; position: relative; padding-bottom: 15px; }
.timeline__item:not(:last-child)::before {
  content: ""; position: absolute; left: 11px; top: 20px; bottom: 0; width: 1px; background: var(--border);
}
.timeline__dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--text-3); border: 1px solid var(--border);
}
.timeline__dot svg { width: 11px; height: 11px; }
.timeline__dot--ok { background: var(--green-50); color: var(--green-600); border-color: #B7E8CD; }
.timeline__dot--err { background: var(--red-50); color: var(--red-600); border-color: #F8C9C4; }
.timeline__body { min-width: 0; }
.timeline__title { font-size: 13px; font-weight: 500; }
.timeline__meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; font-family: var(--font-mono); }

.kv-inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1.35fr .95fr; gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

/* 单选/多选组（创建管理员、导出范围等表单） */
.radio-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.radio-col { display: flex; flex-direction: column; gap: 8px; }
.radio {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 13px; color: var(--text); user-select: none;
}
.radio input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; flex: none; margin: 0; }
.radio > span { line-height: 1.4; }
.radio:hover > span { color: var(--primary); }
.req { color: var(--red-600, #D92D20); font-weight: 700; }
.table--mini td, .table--mini th { padding: 6px 10px; font-size: 12px; }

/* 权限点勾选面板 */
.perm-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; }
.perm-group { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface-2, var(--surface)); }
.perm-group__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.perm-group__title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.perm-group__items { display: flex; flex-direction: column; gap: 6px; }
.perm-group .radio { font-size: 12.5px; color: var(--text-2); }
.role-card {
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 13px;
  cursor: pointer; transition: border-color .16s, background .16s;
}
.role-card:hover { border-color: var(--primary-300, var(--primary)); }
.role-card.is-active { border-color: var(--primary); background: var(--primary-50); }
.role-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.role-card__name { font-size: 13.5px; font-weight: 700; color: var(--text); }
.role-card__desc { font-size: 11.5px; color: var(--text-3); line-height: 1.55; }
.role-list { display: flex; flex-direction: column; gap: 9px; }
@media (max-width: 1180px) {
  .perm-panel { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
.row { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.bold { font-weight: 600; }
.center { text-align: center; }
.right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.code-block {
  background: #0F172A; color: #CBD5E1; border-radius: var(--r-md); padding: 13px 15px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.7; overflow-x: auto;
  white-space: pre-wrap; word-break: break-all; max-height: 300px;
}
.json-view { background: var(--surface-inset); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; font-family: var(--font-mono); font-size: 12px; line-height: 1.75; white-space: pre-wrap; word-break: break-all; max-height: 340px; overflow: auto; color: var(--text-2); }
.chip-list { display: flex; gap: 6px; flex-wrap: wrap; }
.avatar-lg {
  width: 52px; height: 52px; border-radius: 15px; flex: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ 徽章 */
/* badge 文字色原本按浅色底取深色字；深色主题下换成同色系亮字 */
[data-theme="dark"] .badge--green  { color: var(--green-600); }
[data-theme="dark"] .badge--red    { color: var(--red-600); }
[data-theme="dark"] .badge--amber  { color: var(--warn-text); }
[data-theme="dark"] .badge--blue   { color: var(--primary-700); }
[data-theme="dark"] .badge--violet { color: #C3B7FD; }
[data-theme="dark"] .badge--cyan   { color: #6FD4E8; }
[data-theme="dark"] .badge--pink   { color: #F9A3DC; }
[data-theme="dark"] .badge--gold   { color: var(--gold-deep); }
[data-theme="dark"] .badge--gray   { color: var(--text-3); }

/* ------------------------------------------------------------ 图标按钮组 */
/* 主题切换按钮：svg 由 JS 按当前主题写入（太阳/月亮） */
#btn-theme svg { width: 17px; height: 17px; }

/* ---------------------------------------------------------- 顶栏全局搜索 */
/* 视觉上是一个「假输入框」，点击/⌘K 唤起命令面板 */
.topbar__search {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 8px 0 12px; min-width: 232px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text-3);
  cursor: pointer; font-size: 12.5px;
  transition: border-color var(--dur), box-shadow var(--dur), color var(--dur);
}
.topbar__search:hover { border-color: var(--border-strong); color: var(--text-2); box-shadow: var(--sh-1); }
.topbar__search svg { width: 14px; height: 14px; flex: none; }
.topbar__search kbd { margin-left: auto; }
@media (max-width: 1180px) {
  .topbar__search { min-width: 0; width: 34px; padding: 0; justify-content: center; }
  .topbar__search span, .topbar__search kbd { display: none; }
}

/* ------------------------------------------------------------ 命令面板 */
.cmdk-mask {
  position: fixed; inset: 0; z-index: 600; background: var(--mask);
  backdrop-filter: blur(2px); opacity: 0; transition: opacity .16s var(--ease);
}
.cmdk-mask.is-open { opacity: 1; }
.cmdk {
  position: fixed; z-index: 601; left: 50%; top: 13vh;
  transform: translate(-50%, -10px) scale(.985);
  width: min(640px, 94vw); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--sh-4);
  opacity: 0; transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.cmdk.is-open { opacity: 1; transform: translate(-50%, 0) scale(1); }
.cmdk__row { display: flex; align-items: center; gap: 10px; padding: 15px 16px; border-bottom: 1px solid var(--border); }
.cmdk__row > svg { width: 17px; height: 17px; color: var(--text-3); flex: none; }
.cmdk__input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); }
.cmdk__input::placeholder { color: var(--text-3); }
.cmdk__list { max-height: 48vh; overflow-y: auto; padding: 6px; }
.cmdk__group {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  letter-spacing: .07em; padding: 9px 10px 4px;
}
.cmdk__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-sm);
  cursor: pointer; font-size: 13.5px; color: var(--text-2); user-select: none;
}
.cmdk__item > svg { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.cmdk__item .cmdk__meta { margin-left: auto; font-size: 11px; color: var(--text-3); }
.cmdk__item.is-cursor { background: var(--primary-50); color: var(--primary-700); font-weight: 500; }
.cmdk__item.is-cursor > svg { color: var(--primary); }
.cmdk__empty { padding: 30px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.cmdk__foot {
  display: flex; gap: 14px; align-items: center;
  padding: 9px 14px; border-top: 1px solid var(--border);
  background: var(--surface-2); font-size: 11px; color: var(--text-3);
}
.cmdk__foot span { display: inline-flex; align-items: center; gap: 5px; }

/* --------------------------------------------------- 统计卡内嵌迷你趋势 */
.stat__spark { margin-top: 9px; }
.stat__spark svg { display: block; width: 100%; height: 30px; }

/* ------------------------------------------- 创作抽屉：左表单 + 右预览 */
.editor-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 20px; align-items: start;
}
@media (max-width: 860px) { .editor-grid { grid-template-columns: 1fr; } }
.editor-preview { position: sticky; top: 4px; }
.editor-preview__label {
  font-size: 11.5px; font-weight: 600; color: var(--text-3);
  letter-spacing: .06em; margin-bottom: 8px;
}
/* 手机预览壳：刻意固定浅色 —— 模拟的是小程序客户端的真实观感，不随管理端主题变 */
.phone {
  border: 1px solid var(--border-strong); border-radius: 26px;
  padding: 12px 10px; background: var(--surface-2); box-shadow: var(--sh-2);
}
.phone__notch {
  width: 74px; height: 5px; border-radius: 999px; background: var(--border-strong);
  margin: 0 auto 10px;
}
.phone__screen { background: #F6F7FB; border-radius: 18px; padding: 12px 10px; min-height: 320px; }
.wxmsg-card {
  background: #FFFFFF; border: 1px solid #EBEEF5; border-radius: 12px;
  padding: 12px; box-shadow: 0 2px 8px rgba(16, 24, 40, .06);
}
.wxmsg-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.wxmsg-dot {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: linear-gradient(140deg, #4F6BED, #6E86F5);
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.wxmsg-title { font-size: 13px; font-weight: 600; color: #101828; word-break: break-all; line-height: 1.5; }
.wxmsg-body { font-size: 12.5px; color: #475467; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.wxmsg-time { margin-top: 8px; font-size: 10.5px; color: #98A2B3; }
.wxmsg-q { background: #F7F8FC; border: 1px solid #EBEEF5; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.wxmsg-q__t { font-size: 12px; font-weight: 600; color: #101828; line-height: 1.5; }
.wxmsg-q__o { font-size: 11.5px; color: #475467; margin-top: 4px; line-height: 1.6; white-space: pre-wrap; }
.wxmsg-hint { margin-top: 10px; text-align: center; font-size: 10.5px; color: #98A2B3; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
  .grid-2 { grid-template-columns: 1fr; }
  .split-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .login-topbar { height: 56px; padding: 0 18px; }
  .login-panel { padding: 30px 20px 24px; }
  .login-card__title { font-size: 23px; }
  .scan-frame { width: 188px; height: 188px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s var(--ease); }
  .layout.is-nav-open .sidebar { transform: none; }
  .layout .main { margin-left: 0 !important; }
  .split-2, .split-3 { grid-template-columns: 1fr; }
  .topbar__crumb { display: none; }
  .nav-toggle { display: flex !important; }
}
.nav-toggle { display: none; }

/* ------------------------------------------------- 反馈中心 · 图片附件 */
/* ★ 2026-10-02：反馈图片原以 cloud:// fileID 文本展示，无法查看；
   现经 file.urls 换临时链接后按网格渲染，点击新窗口看原图。 */
.fb-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}
.fb-img-item {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-inset);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.fb-img-item:hover { border-color: var(--primary); transform: translateY(-1px); }
.fb-img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-img-miss {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: var(--surface-inset);
  padding: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center; overflow: hidden;
}

/* ------------------------------------- ★ 2026-10-03 工作台 / 账号管理 卡片布局 */
/* main.js 会给 #view 挂 view--<路由> 类；两页专属的布局微调都收在这里，不影响其它页面 */
/* 工作台：右侧栏（分布/构成）与趋势图高度大体相当，视觉更平衡；
   待办/动态移到底部成对出现；统计卡留白加大 */
.view--dashboard .stat__top { margin-bottom: 12px; }
.view--dashboard .stat__value { font-size: 27px; }
.view--dashboard .stat__foot { margin-top: auto; padding-top: 9px; }
.view--dashboard .card__body { padding: 20px 22px; }
/* ★ 2026-10-06 工作台统计卡布局：6 张卡改为固定 3 列 × 2 行（不再是 auto-fit 挤成一行），
   窄屏依次降为 2 列 / 1 列；卡片用 flex 纵向排布，趋势线与脚注贴底对齐 → 6 张卡高度一致、基线整齐 */
.view--dashboard .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.view--dashboard .stat { min-height: 138px; display: flex; flex-direction: column; }
.view--dashboard .stat__spark { margin-top: auto; }
@media (max-width: 1200px) { .view--dashboard .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .view--dashboard .stats { grid-template-columns: 1fr; } }
/* 账号管理：卡片内区块统一留白 */
.mt-18 { margin-top: 18px; }
/* 工作台·系统动态改为 flush 卡后，时间线自带内边距（表格式 flush 卡由 table-wrap 自理） */
.view--dashboard #audits { padding: 18px 20px; }
