/* 沉思波统一控制台 · 常规后台观感（2026-10-10 重做：层次/密度/一致的类型与间距）
   与官网同源色板（深空黑 / 主蓝 #1677ff），但补齐**投影、半径档位、尺寸令牌**——
   常规后台的「像样」主要来自这四件：① 卡片有层次 ② 表头有设计 ③ 侧栏有图标与强激活态 ④ 一致的间距与字阶 */

:root {
  /* 深空黑 #0e1218 是**对外口径**：console/index.html 的 <meta name="theme-color">、theme.js 与
     scripts/assert-console-theme.mjs:218 都按它比对。改色必须四处同步，否则断言红（10-10 踩过）。 */
  --bg: #0e1218;
  --bg-2: #12171f;
  --panel: #151b24;
  --panel-2: #1a212c;
  --panel-3: #1f2833;
  --line: #232b36;
  --line-2: #2c3542;
  --text: #e6edf3;
  --muted: #8b98a9;
  --muted-2: #6b7787;
  --brand: #1677ff;
  --brand-2: #3f92ff;
  --ok: #3fb950;
  --warn: #d29922;
  --danger: #f85149;
  /* 半径档位 */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --radius: 12px;
  /* 投影（层次感来源） */
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.18);
  --sh-2: 0 6px 18px rgba(0, 0, 0, 0.30);
  /* 布局尺寸 */
  --sidebar-w: 236px;
  --topbar-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
/* hidden 属性必须生效：多处容器设了 display:flex，会盖掉浏览器默认的 display:none（2026-10-10 修） */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
button { font-family: inherit; }
.boot { padding: 48px; color: var(--muted); }

/* ---------- 登录 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(900px 420px at 20% -10%, rgba(22, 119, 255, 0.16), transparent 60%),
    radial-gradient(700px 380px at 90% 110%, rgba(63, 146, 255, 0.10), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 30px 26px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #6aa9ff);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: 0.5px;
}
.auth-card h1 { font-size: 19px; margin: 0; font-weight: 650; letter-spacing: 0.5px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 6px 0 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.field input {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 8px; font-size: 14px; outline: none;
}
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.18); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font-size: 13px; cursor: pointer;
  white-space: nowrap; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--panel-3); border-color: var(--muted-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-danger { background: transparent; border-color: rgba(248, 81, 73, 0.5); color: #ff7b74; }
.btn-danger:hover { background: rgba(248, 81, 73, 0.12); }
.btn-block { width: 100%; height: 42px; font-size: 14.5px; margin-top: 6px; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: var(--r-sm); }
.auth-error {
  display: none; margin-bottom: 14px; padding: 9px 12px;
  background: rgba(248, 81, 73, 0.1); border: 1px solid rgba(248, 81, 73, 0.4);
  color: #ff9d97; border-radius: 8px; font-size: 13px;
}
.auth-error.show { display: block; }
.auth-note { margin-top: 16px; color: var(--muted-2); font-size: 12.5px; text-align: center; }

/* ---------- 应用壳 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: var(--bg-2);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  height: var(--topbar-h); padding: 0 16px; border-bottom: 1px solid var(--line);
}
.side-brand .auth-logo { width: 28px; height: 28px; font-size: 12.5px; border-radius: var(--r-md); }
.side-brand b { font-size: 14px; font-weight: 650; letter-spacing: .2px; display: block; line-height: 1.3; }
.side-brand span { display: block; color: var(--muted-2); font-size: 11px; font-weight: 400; letter-spacing: 0; line-height: 1.3; }
.nav { padding: 10px 10px 14px; flex: 1; overflow-y: auto; }
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.nav-group { color: var(--muted-2); font-size: 11.5px; letter-spacing: 1px; padding: 12px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 9px; position: relative;
  padding: 0 10px; height: 36px; margin-bottom: 2px; border-radius: var(--r-md);
  color: var(--muted); font-size: 13.5px; transition: background .12s, color .12s;
}
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a.active { background: rgba(22, 119, 255, 0.15); color: #cfe4ff; font-weight: 600; }
.nav a.active::before {
  content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav a svg { width: 16px; height: 16px; flex: 0 0 16px; opacity: .92; }
.nav a > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a .tag { font-size: 11px; color: var(--muted-2); }

/* 侧栏重做（2026-10-10）：菜单筛选 + 分组可折叠 + 待办角标 */
.nav-filter { padding: 0 2px 10px; }
.nav-filter input {
  width: 100%; padding: 7px 10px; border-radius: 8px; box-sizing: border-box;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font-size: 12.5px;
}
.nav-filter input:focus { outline: none; border-color: var(--brand); }
.navg { margin-bottom: 4px; }
.navg-h {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px 10px;
  background: none; border: 0; cursor: pointer; color: var(--muted-2);
  font-size: 11.5px; letter-spacing: 1px; font-family: inherit; text-align: left;
}
.navg-h:hover { color: var(--text); }
.navg-h::before { content: '▾'; font-size: 9px; opacity: .8; transition: transform .15s; }
.navg.is-closed .navg-h::before { transform: rotate(-90deg); }
.navg-h .navg-c { margin-left: auto; font-size: 10.5px; opacity: .6; letter-spacing: 0; }
.navg-b { padding-bottom: 2px; }
.navg.is-closed .navg-b { display: none; }
.nav a .tag.is-badge {
  min-width: 18px; text-align: center; padding: 1px 6px; border-radius: 999px;
  background: rgba(22, 119, 255, 0.18); color: #9dc6ff; font-size: 11px; font-weight: 600;
}

/* 拖放上传区（2026-10-10：文档收录支持拖文件进来） */
.dropzone {
  border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 22px 18px;
  text-align: center; background: rgba(22, 119, 255, 0.03);
  transition: border-color .15s, background .15s; margin: 12px 0;
}
.dropzone.is-over { border-color: var(--brand); background: rgba(22, 119, 255, 0.10); }
.dropzone .dz-ico { font-size: 22px; color: var(--brand); opacity: .85; line-height: 1; }
.dropzone .dz-t { font-size: 13.5px; color: var(--text); margin-top: 6px; font-weight: 600; }
.dropzone .dz-s { font-size: 12.5px; color: var(--muted-2); margin-top: 4px; }
.dropzone .dz-pick { color: var(--brand); cursor: pointer; text-decoration: underline; }
.dropzone.dz-inline { padding: 15px 14px; margin: 10px 0 14px; }
.dropzone.dz-inline .dz-t { font-size: 13px; }

/* 自定义字段区（表单内，管理后台思路） */
.fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.fieldset-h { font-size: 12.5px; color: var(--muted-2); margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; }
.fieldset-b { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; }
.fld-wide { grid-column: 1 / -1; }
.fld label { font-size: 12px; color: var(--muted-2); }
.fld .req { color: #ff7875; }
.fld input, .fld select, .fld textarea {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--text); font-size: 13px; font-family: inherit;
  box-sizing: border-box; width: 100%;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--brand); }
.msel { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 5px 0; }
.msel-i { font-size: 12.5px; color: var(--text); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.side-foot { border-top: 1px solid var(--line); padding: 12px; flex: 0 0 auto; }
.who {
  display: flex; align-items: center; gap: 9px; margin-bottom: 8px;
  padding: 7px 8px; border-radius: var(--r-md); background: var(--panel);
}
.who .ava {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px;
  background: linear-gradient(135deg, var(--brand), #6aa9ff); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.who .nm { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .rl { color: var(--muted-2); font-size: 11px; }
.side-foot .btn { width: 100%; height: 32px; font-size: 12.5px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
  height: var(--topbar-h); flex: 0 0 var(--topbar-h);
  border-bottom: 1px solid var(--line); background: var(--bg);
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 22px;
}
.topbar h2 { font-size: 16px; margin: 0; font-weight: 650; letter-spacing: .2px; }
.topbar .crumb { color: var(--muted-2); font-size: 12px; margin-top: 1px; }
.topbar-r { display: flex; align-items: center; gap: 8px; }
.content { padding: 20px 22px 56px; width: 100%; max-width: 1440px; }

/* ---------- 通用组件 ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 18px;
  box-shadow: var(--sh-1); overflow: hidden;
}
.panel-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.panel-hd h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: .2px; }
.panel-hd .sub { color: var(--muted-2); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.panel-hd-ops { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.panel-bd { padding: 16px 18px; }
/* 卡片头（文档收录等模块用）：与 panel-hd 同观感 */
.card-hd {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.card-hd b { font-weight: 650; letter-spacing: .2px; }
.card-hd .badge { margin-left: auto; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; }
.stat .k { color: var(--muted); font-size: 12.5px; }
.stat .v { font-size: 26px; font-weight: 680; letter-spacing: 0.5px; margin-top: 4px; }
.stat .d { color: var(--muted-2); font-size: 11.5px; margin-top: 3px; }
.stat.accent .v { color: var(--brand-2); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.toolbar input[type="search"], .toolbar select {
  height: 34px; padding: 0 11px; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-md); font-size: 13px; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.toolbar input[type="search"] { min-width: 230px; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.16); }
.toolbar .spacer { flex: 1; }
.hint { color: var(--muted-2); font-size: 12.5px; }

table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th {
  text-align: left; font-size: 11.5px; color: var(--muted-2); font-weight: 600;
  letter-spacing: .06em; padding: 11px 14px; background: var(--bg-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.028); }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .clink { cursor: pointer; }
.tbl .clink:hover .nm { color: var(--brand-2); }
.nm { font-weight: 600; }
.sub2 { color: var(--muted-2); font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
/* 行内小动作按钮 */
.tbl .ops { white-space: nowrap; }
.tbl .ops .btn { margin: 0 6px 4px 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px;
  background: rgba(22, 119, 255, 0.14); border: 1px solid rgba(22, 119, 255, 0.35); color: #bcd8ff;
}
.chip.role-student { background: rgba(63, 185, 80, 0.12); border-color: rgba(63, 185, 80, 0.35); color: #9fe0ad; }
.chip.role-teacher { background: rgba(210, 153, 34, 0.12); border-color: rgba(210, 153, 34, 0.35); color: #f0cf8f; }
.chip.role-admin { background: rgba(248, 81, 73, 0.12); border-color: rgba(248, 81, 73, 0.4); color: #ffb3ae; }
.chip.flat { background: transparent; border-color: var(--line-2); color: var(--muted); }
/* 站点总览的筛选片（可点选）：未选中=暗淡，选中=品牌蓝高亮 */
.chip[data-sgroup], .chip[data-sonly] { cursor: pointer; background: transparent; border-color: var(--line-2); color: var(--muted); }
.chip[data-sgroup].active, .chip[data-sonly].active { background: rgba(22, 119, 255, 0.16); border-color: rgba(22, 119, 255, 0.45); color: #cfe4ff; font-weight: 600; }
/* 角色卡上的「撤卡」小叉 + 挂卡行（2026-10-10 用户详情可挂/撤角色卡） */
.chip .chip-x {
  margin-left: 3px; width: 15px; height: 15px; padding: 0; line-height: 1;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.15);
  color: inherit; font-size: 11px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.chip .chip-x:hover { background: rgba(248, 81, 73, 0.85); color: #fff; }
.roleadd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.roleadd select {
  height: 30px; padding: 0 10px; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-md); font-size: 12.5px; outline: none;
}
.roleadd select:focus { border-color: var(--brand); }

.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; border: 1px solid transparent; }
.badge.on { background: rgba(63, 185, 80, 0.12); border-color: rgba(63, 185, 80, 0.35); color: #9fe0ad; }
.badge.off { background: rgba(210, 153, 34, 0.14); border-color: rgba(210, 153, 34, 0.4); color: #f0cf8f; }
/* UGC 审核：已拒绝（先审后发 · 2026-10-07） */
.badge.danger { background: rgba(248, 81, 73, 0.14); border-color: rgba(248, 81, 73, 0.4); color: #ff9b95; }
/* 操作列多按钮时的间距（过审 / 拒绝 / 下架并排） */
.tbl .ops .btn { margin: 0 4px 4px 0; }
/* 操作列走「文字链」而非大按钮（常规后台表格惯例，2026-10-10）
 * 含 .btn-primary：主操作已上移到卡片头（如文档收录的「+ 新建文档」），
 * 行内按钮一律降为文字链，避免每行一个实心蓝块把表格压得很重。 */
.tbl .ops .btn,
.tbl .ops .btn-sm {
  height: 26px; padding: 0 8px; background: transparent; border-color: transparent;
  color: var(--brand-2); font-size: 13px; border-radius: var(--r-sm);
}
.tbl .ops .btn:hover { background: rgba(22, 119, 255, 0.13); border-color: transparent; color: var(--brand-2); }
.tbl .ops .btn-primary { color: var(--brand-2); font-weight: 600; }
.tbl .ops .btn-primary:hover { background: rgba(22, 119, 255, 0.13); color: var(--brand-2); }
.tbl .ops .btn-danger { color: #ff7b74; }
.tbl .ops .btn-danger:hover { background: rgba(248, 81, 73, 0.14); color: #ff9d97; }

.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty .t { font-size: 15px; color: var(--text); margin-bottom: 6px; font-weight: 650; }
.empty .d { font-size: 13px; color: var(--muted-2); max-width: 560px; margin: 0 auto; }
.empty .btn { margin-top: 14px; }

/* ---------- 团队待办看板（管理面 · 内部工具，仅管理员；2026-10-07） ---------- */
.taskform { display: flex; flex-direction: column; gap: 8px; padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.taskform .tf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.taskform input, .taskform select, .taskform textarea {
  height: 34px; padding: 0 10px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 7px; font-size: 13px; outline: none; font-family: inherit;
}
.taskform .tf-row input { flex: 1; min-width: 150px; }
.taskform textarea { height: auto; min-height: 54px; padding: 8px 10px; resize: vertical; }
.taskform input:focus, .taskform select:focus, .taskform textarea:focus { border-color: var(--brand); }
.tboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px 18px; }
@media (max-width: 980px) { .tboard { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tboard { grid-template-columns: 1fr; } }
.tcol { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 110px; }
.tcol-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 9px; font-weight: 600; font-size: 13px; }
.tcol-body { display: flex; flex-direction: column; gap: 8px; }
.tcard { background: var(--panel); border: 1px solid var(--line-2); border-left: 3px solid var(--muted-2); border-radius: 9px; padding: 9px 11px; }
.tcard.pri-urgent { border-left-color: var(--danger); }
.tcard.pri-high { border-left-color: var(--warn); }
.tcard.pri-normal { border-left-color: var(--brand); }
.tcard.pri-low { border-left-color: var(--muted-2); }
.tcard-top { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
.ttitle { font-weight: 600; margin: 3px 0; font-size: 13.5px; word-break: break-word; }
.tdetail { font-size: 12.5px; color: var(--muted); white-space: pre-wrap; }
.tmeta { font-size: 12px; color: var(--muted-2); margin-top: 5px; }
.tops { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tops .btn { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 6px; }
.tempty { color: var(--muted-2); text-align: center; padding: 12px 0; }

.pager { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.deny { max-width: 460px; margin: 70px auto; text-align: center; }
.deny .code { font-size: 46px; font-weight: 700; color: var(--brand-2); letter-spacing: 2px; }
.deny h3 { margin: 6px 0 8px; font-size: 17px; }
.deny p { color: var(--muted); font-size: 13.5px; }

.grid2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
@media (max-width: 980px) { .grid2 { grid-template-columns: 1fr; } }

.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 52px; align-items: center; gap: 12px; font-size: 13px; }
.bar-track { height: 8px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand), #58a0ff); border-radius: 999px; min-width: 2px; }
.bar-row .n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.kv .item .k { color: var(--muted-2); font-size: 12px; }
.kv .item .v { font-size: 15px; margin-top: 3px; word-break: break-all; }

.profile { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.profile .ava-big {
  width: 64px; height: 64px; border-radius: 16px; flex: 0 0 64px;
  background: linear-gradient(135deg, #1d3a63, #1677ff);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 650;
}
.profile .meta h3 { margin: 0 0 4px; font-size: 18px; }
.profile .meta .line { color: var(--muted); font-size: 13px; }
.profile .meta .chips { margin-top: 9px; }

/* ==========================================================================
   专属卡卡面（2026-10-11 老板令「要有种限量版的黑卡的感觉，当然需要准备不同的卡型，
   然后这些卡是用来区分用户的，然后管理员要可以在用户页面进行设置」）。
   结构只有一套 .csb-card；四种卡型**只改配色与光泽**（.tier-standard / gold / black / founder）
   —— 加卡型 = 加一个 .tier-x 配色块，不动 JS。
   比例按实体卡 85.6×54mm（1.586:1）：窄屏整宽，宽屏限 420px。
   ========================================================================== */
.cardwrap { padding: 16px 18px; }
.csb-cardwrap { max-width: 420px; }
.csb-card {
  position: relative;
  aspect-ratio: 1.586 / 1;
  border-radius: 14px;
  overflow: hidden;
  color: #fff;
  background: #232a35;                       /* 兜底：未知卡型也不至于透明 */
  box-shadow: var(--sh-2), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: transform 0.18s ease;
}
.csb-card:hover { transform: translateY(-2px); }
/* 斜向高光：黑卡靠它出「金属哑光」的层次，不然一片死黑看不出质感 */
.csb-card-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 34%,
    rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, 0.1) 100%);
}
.csb-card-body {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.csb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.csb-card-brand { font-size: 14px; font-weight: 700; letter-spacing: 0.12em; }
.csb-card-tier {
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.csb-card-no {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.csb-card-bot { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
.csb-card-f { display: flex; flex-direction: column; gap: 2px; }
.csb-card-f span { font-size: 10px; letter-spacing: 0.1em; opacity: 0.66; }
.csb-card-f b { font-size: 13px; font-weight: 600; }
.csb-card-state { margin-left: auto; font-size: 10px; letter-spacing: 0.16em; font-weight: 700; opacity: 0.75; }
.csb-card-cap { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

/* ---- 四种卡型：只改配色与光泽，结构不动 ---- */
/* 标准卡：银灰（注册即得，不张扬） */
.tier-standard { background: linear-gradient(135deg, #2b333f 0%, #3d4855 55%, #2a323d 100%); }
/* 金卡：暖金 */
.tier-gold { background: linear-gradient(135deg, #6b4f16 0%, #c9a227 48%, #8a6a1c 100%); }
.tier-gold .csb-card-no { text-shadow: 0 1px 3px rgba(60, 40, 0, 0.55); }
/* 黑卡 · 限量版：哑光黑 + 极细银线（老板要的「限量版黑卡」） */
.tier-black {
  background: radial-gradient(120% 100% at 12% 0%, #2a3038 0%, #14171c 55%, #0a0c0f 100%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.tier-black .csb-card-sheen {
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0) 68%, rgba(255, 255, 255, 0.13) 100%);
}
.tier-black .csb-card-tier { border-color: rgba(255, 255, 255, 0.42); background: rgba(255, 255, 255, 0.06); }
/* 创始卡 · 黑金：黑底 + 金线（最高一档） */
.tier-founder {
  background: radial-gradient(120% 100% at 12% 0%, #2b2416 0%, #17150f 55%, #0b0a08 100%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(212, 175, 55, 0.38);
}
.tier-founder .csb-card-brand { color: #e8c766; }
.tier-founder .csb-card-tier { border-color: rgba(212, 175, 55, 0.55); color: #f0d68a; }
.tier-founder .csb-card-no { color: #f3e2a8; }
.tier-founder .csb-card-state { color: #e8c766; opacity: 0.95; }
/* 还没卡：虚线空态（不假装有卡） */
.csb-card.is-empty { aspect-ratio: auto; background: transparent; box-shadow: none; border: 1.5px dashed var(--line-2); }
.csb-card.is-empty .csb-card-no { color: var(--muted); font-family: inherit; font-size: 15px; }
.csb-card.is-empty .csb-card-cap { margin-top: 6px; }

@media (max-width: 640px) {
  .cardwrap { padding: 14px; }
  .csb-card-body { padding: 14px; }
  .csb-card-no { font-size: 16px; }
  .csb-card-bot { gap: 14px; }
  .csb-card-f b { font-size: 12px; }
}

.tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: none; color: var(--muted); font-size: 13.5px;
  padding: 12px 14px; cursor: pointer; border-bottom: 2px solid transparent;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); border-bottom-color: var(--brand); font-weight: 600; }

.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--brand);
  padding: 11px 16px; border-radius: 8px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { border-left-color: var(--danger); }

.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.backlink:hover { color: var(--text); }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .content { padding: 18px 14px 40px; }
  .topbar { padding: 0 16px; }
}

/* ---------- 用户面子页：消息 / 积分商城 / 活动报名（2026-10-04 补路由） ---------- */
.num { font-variant-numeric: tabular-nums; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 14px 16px; }
.card-item { display: flex; flex-direction: column; gap: 6px; padding: 14px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.card-item .nm { font-weight: 640; }
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-ft { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.cost { font-weight: 700; color: var(--warn); }
.notif-list { display: flex; flex-direction: column; }
.notif { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.notif:first-child { border-top: none; }
.notif:hover { background: var(--panel-2); }
.notif .dot { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: transparent; }
.notif.unread .dot { background: var(--brand-2); }
.notif-bd { min-width: 0; }
.notif-hd { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.goto { color: var(--brand-2); }
.stat-link { display: block; color: inherit; text-decoration: none; }
.stat-link:hover .stat { border-color: var(--line-2); }
.rowlink { color: inherit; text-decoration: none; }
.rowlink:hover { color: var(--brand-2); text-decoration: underline; }

/* ---------- 品牌件（批1 · 老板 10/4 令：logo/icon 换沉思波定版，与官网视觉同源） ---------- */
.auth-logo-img, .side-logo { display: block; object-fit: contain; flex: none; border-radius: 7px; }
.auth-logo-img { width: 44px; height: 44px; }
.side-logo { width: 30px; height: 30px; }
.auth-org { color: var(--muted-2); font-size: 12px; letter-spacing: 1.5px; margin-top: 3px; }
.auth-card {
  position: relative; overflow: hidden;
}
.auth-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(120deg, #0958d9 0%, #1677ff 55%, #4096ff 100%);
}
.topbar-r { display: flex; align-items: center; gap: 10px; }

/* ---------- 平台总览卡（批1 · 全平台总览） ---------- */
.plat-intro .t { font-size: 14px; font-weight: 650; margin-bottom: 5px; }
.plat-intro .d { color: var(--muted); font-size: 13px; }
.plat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px; padding: 16px 18px 18px;
}
.plat {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 15px 13px;
  transition: border-color 0.15s, transform 0.15s;
}
.plat:hover { border-color: #35435a; transform: translateY(-1px); }
.plat-top { display: flex; align-items: center; gap: 10px; }
.plat-glyph {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.28), rgba(64, 150, 255, 0.14));
  border: 1px solid rgba(22, 119, 255, 0.35);
  color: #cfe4ff; font-size: 15px; font-weight: 650;
}
.plat-id { flex: 1; min-width: 0; }
.plat-name { font-size: 14.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plat-url { color: var(--muted-2); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plat-desc { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; min-height: 39px; }
.plat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.plat-acts { display: flex; align-items: center; gap: 8px; }
.plat-link { color: var(--muted); font-size: 12.5px; }
.plat-link:hover { color: var(--brand-2); }
.plat-note {
  border-top: 1px dashed var(--line); padding-top: 8px;
  font-size: 11.5px; line-height: 1.5; color: var(--muted-2);
}
.plat-src { padding: 4px 2px 0; line-height: 1.6; }

.sso {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  font-size: 11.5px; border: 1px solid transparent; white-space: nowrap;
}
.sso-same, .sso-ticket { background: rgba(63, 185, 80, 0.12); border-color: rgba(63, 185, 80, 0.35); color: #9fe0ad; }
.sso-pending { background: rgba(210, 153, 34, 0.14); border-color: rgba(210, 153, 34, 0.4); color: #f0cf8f; }
.sso-none { background: transparent; border-color: var(--line-2); color: var(--muted-2); }

.badge.plan { background: rgba(22, 119, 255, 0.12); border-color: rgba(22, 119, 255, 0.35); color: #bcd8ff; }
.badge.beta { background: rgba(140, 120, 255, 0.14); border-color: rgba(140, 120, 255, 0.4); color: #cfc6ff; }
.badge.flat { background: transparent; border-color: var(--line-2); color: var(--muted); }

@media (max-width: 860px) {
  .plat-grid { grid-template-columns: 1fr; padding: 14px; }
  .topbar-r .hint { display: none; }
}
.stat.sm .v { font-size: 19px; letter-spacing: 0; }

/* ---------- 通行密钥（批3 · 设备绑定 → 批3.1 · 免账号 hero）
   老板 10/8 令「最好不要输入账号，效果搞帅一点」：登录页把通行密钥提到首位、不用填邮箱；
   视觉只用内联 SVG + CSS（零外链、零 emoji）：指纹图形 + 呼吸光环（就绪）/ 脉冲光环 + 扫描线（等待）
   + 绿色扫光（成功）。动效克制，并统一在 prefers-reduced-motion 下关闭。 ---------- */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: var(--muted-2); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.pk-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 20px 18px 15px; margin-bottom: 18px;
  border: 1px solid rgba(22, 119, 255, 0.34); border-radius: 12px;
  background:
    radial-gradient(120% 130% at 50% -30%, rgba(22, 119, 255, 0.20), transparent 68%),
    var(--panel-2);
}
.pk-hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(22, 119, 255, 0.85), transparent);
}
.pk-ring {
  position: absolute; top: 20px; left: 50%; width: 44px; height: 44px; margin-left: -22px;
  border: 1px solid rgba(22, 119, 255, 0.55); border-radius: 50%;
  opacity: 0; pointer-events: none;
}
.pk-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 1px; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--brand-2), transparent);
}
.pk-fp { display: block; width: 44px; height: 44px; margin: 0 auto 10px; color: var(--brand-2); }
.pk-hero.is-ready .pk-ring { opacity: 0.5; animation: pk-breathe 3.2s ease-in-out infinite; }
.pk-hero.is-waiting .pk-ring { opacity: 1; animation: pk-pulse 1.5s ease-out infinite; }
.pk-hero.is-waiting .pk-scan { opacity: 0.85; animation: pk-scan 1.7s linear infinite; }
.pk-hero.is-err { border-color: rgba(248, 81, 73, 0.45); }
.pk-hero.is-err .pk-fp { color: var(--danger); }
.pk-hero.is-err .btn-passkey { animation: pk-shake 0.42s ease; }
.pk-hero.is-ok .pk-fp { color: var(--ok); }
.pk-hero.is-ok::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 32%, rgba(63, 185, 80, 0.22) 50%, transparent 68%);
  animation: pk-sweep 0.85s ease-out 1 both;
}
.pk-txt { position: relative; margin-bottom: 14px; }
.pk-txt b { display: block; font-size: 15.5px; font-weight: 650; letter-spacing: 0.2px; }
.pk-txt span { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }

.btn-passkey {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; font-size: 14.5px; font-weight: 650; color: #fff;
  border-color: rgba(22, 119, 255, 0.65);
  background: linear-gradient(135deg, #0d63e0 0%, #1a7bff 100%);
  box-shadow: 0 8px 22px rgba(22, 119, 255, 0.26);
}
.btn-passkey:hover { background: linear-gradient(135deg, #1069ec 0%, #3f92ff 100%); border-color: var(--brand); }
.btn-passkey:disabled { opacity: 0.6; }
.btn-passkey .pk-ico { width: 18px; height: 18px; flex: none; }
.pk-hero.is-waiting .pk-ico { animation: pk-tap 1.4s ease-in-out infinite; }
.pk-hero.is-ok .btn-passkey {
  border-color: rgba(63, 185, 80, 0.6);
  background: linear-gradient(135deg, #1f8a3b 0%, #3fb950 100%);
  box-shadow: 0 8px 22px rgba(63, 185, 80, 0.24);
}
.pk-hero.is-off { border-color: var(--line-2); background: var(--panel-2); }
.pk-hero.is-off::before { background: var(--line-2); }
.pk-hero.is-off .pk-fp { color: var(--muted-2); }
.pk-hero.is-off .btn-passkey {
  color: var(--muted); border-color: var(--line-2); background: var(--panel); box-shadow: none;
}
.pk-foot {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 10px; min-height: 18px; color: var(--muted-2); font-size: 12px;
}
.pk-cancel {
  display: none; padding: 0; border: none; background: none;
  color: var(--brand-2); font-size: 12px; cursor: pointer;
}
.pk-cancel.show { display: inline; }
/* 成功那一拍：整张卡泛绿一圈（.is-passkey-ok 由 console.js 在跳转前挂上，重进登录页即摘掉） */
.is-passkey-ok .auth-card {
  border-color: rgba(63, 185, 80, 0.5);
  box-shadow: 0 0 0 1px rgba(63, 185, 80, 0.22), 0 18px 50px rgba(0, 0, 0, 0.45);
  transition: border-color 0.3s, box-shadow 0.3s;
}

@keyframes pk-breathe {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.16); }
}
@keyframes pk-pulse {
  0% { opacity: 0.85; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.55); }
}
@keyframes pk-scan {
  0% { transform: translateY(22px); }
  100% { transform: translateY(150px); }
}
@keyframes pk-tap {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes pk-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
@keyframes pk-sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .pk-ring, .pk-scan, .pk-ico, .btn-passkey, .pk-hero.is-ok::after { animation: none !important; }
  .pk-scan { opacity: 0 !important; }
}
@media (max-width: 480px) {
  .pk-hero { padding: 18px 14px 13px; }
  .pk-txt span { font-size: 12px; }
}

#pkPanel .panel-hd { align-items: center; }

/* 移动端两级页签（2026-10-11 老板令「这个需要优化，移动端的体验不好」重做）。
   此前（2026-10-04）是**把全部 19 个页签平铺成一条横滑带**：小屏要滑很久才找到项，
   滑走之后也看不到自己在哪一组；且下面那句 `a .tag{display:none}` 让小屏**完全看不到待办数**。
   现在：第一行=分组（最多 6 个，一屏放得下），第二行=该组下的项（2–4 个，不用滑）；
   分组随当前页**自动选中**，点分组只换第二行**不跳页**；两级角标都显示（组上显示组内合计）。 */
.nav-strip { display: none; }

@media (max-width: 860px) {
  .nav-strip {
    display: block;
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding-top: 8px;
  }
  .strip-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 14px 8px;
    scrollbar-width: none;              /* 两级都基本不用滑；真溢出也不显滚动条 */
  }
  .strip-row::-webkit-scrollbar { display: none; }
  .strip-row-sub { border-top: 1px dashed var(--line); padding-top: 8px; }
  /* 触摸目标 ≥32px 高（原来内边距 6px 太窄，拇指不好按） */
  .nav-strip .strip-g,
  .nav-strip a {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
  }
  .nav-strip .strip-g { border-color: transparent; background: var(--panel-2); cursor: pointer; }
  .nav-strip .strip-g.is-on,
  .nav-strip a.active {
    background: rgba(22, 119, 255, 0.16);
    border-color: var(--brand);
    color: #cfe4ff;
    font-weight: 600;
  }
  /* 角标：两级都显示（与侧栏 .nav a .tag.is-badge 同款外观，口径一致） */
  .nav-strip .tag.is-badge {
    min-width: 18px;
    text-align: center;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(22, 119, 255, 0.18);
    color: #9dc6ff;
    font-size: 11px;
    font-weight: 600;
  }
}

/* ==========================================================================
   移动端全站底部栏（2026-10-05 老板令：修「控制台进个人主页后底部栏消失」）。
   与官网 MobileTabBar 同口径五格（2026-10-06 换分类：首页 / 产品矩阵 / 客户案例 /
   关于我们 / 更多），控制台是独立 SPA 不走官网主题，底栏由本文件自带；
   仅 ≤768px 显示，桌面仍靠侧栏导航。面板开关在 console.js 里走文档级委托。
   ========================================================================== */
.mtab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: none;
}

@media (max-width: 768px) {
  .mtab-bar {
    display: flex;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(14, 18, 24, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    animation: mtab-in 0.35s ease both;
  }
  .content {
    padding-bottom: 72px;
  }
}

@keyframes mtab-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mtab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 6px;
  min-height: 52px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.12s ease;
}

.mtab:active {
  transform: scale(0.92);
}

.mtab.is-active {
  color: var(--brand-2);
  font-weight: 700;
}

.mtab svg {
  width: 22px;
  height: 22px;
}

/* ---------- 监控大盘（批1 · 老板 10/6 令：管理员第一屏=全资产健康总览） ---------- */
.st-st {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  font-size: 11.5px; border: 1px solid transparent; white-space: nowrap;
}
.st-ok { background: rgba(63, 185, 80, 0.12); border-color: rgba(63, 185, 80, 0.35); color: #9fe0ad; }
.st-gate { background: rgba(22, 119, 255, 0.12); border-color: rgba(22, 119, 255, 0.35); color: #bcd8ff; }
.st-warn { background: rgba(210, 153, 34, 0.14); border-color: rgba(210, 153, 34, 0.4); color: #f0cf8f; }
.st-down { background: rgba(248, 81, 73, 0.14); border-color: rgba(248, 81, 73, 0.4); color: #ffb3ae; }

.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(292px, 1fr)); gap: 14px; }
.srv { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); padding: 14px 15px 13px; }
.srv.is-down { border-color: rgba(248, 81, 73, 0.35); background: rgba(248, 81, 73, 0.05); }
.srv-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.srv-hd b { font-size: 14px; font-weight: 650; }
.srv-role { color: var(--muted-2); font-size: 12px; margin: 4px 0 11px; line-height: 1.5; min-height: 36px; }
.metrics { display: flex; flex-direction: column; gap: 9px; }
.metric .mk { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.metric .mv { color: var(--text); font-variant-numeric: tabular-nums; }
.meter { height: 7px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--brand), #58a0ff); border-radius: 999px; transition: width 0.3s; }
.meter-fill.warn { background: linear-gradient(90deg, #d29922, #f0c14b); }
.meter-fill.danger { background: linear-gradient(90deg, #f85149, #ff8b84); }
.srv-err {
  font-size: 12px; color: #ffb3ae; background: rgba(248, 81, 73, 0.08);
  border: 1px solid rgba(248, 81, 73, 0.25); border-radius: 8px;
  padding: 7px 9px; margin-top: 10px; word-break: break-all; line-height: 1.5;
}
.srv-err.soft { color: var(--f0cf8f, #f0cf8f); background: rgba(210, 153, 34, 0.08); border-color: rgba(210, 153, 34, 0.28); }
.srv-ft {
  display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted); margin-top: 10px;
  border-top: 1px dashed var(--line); padding-top: 8px;
}
.srv-ft.dim { color: var(--muted-2); border-top: none; margin-top: 5px; padding-top: 0; }
.panel.problem { border-color: rgba(248, 81, 73, 0.3); }
.plist { margin: 0; padding-left: 18px; }
.plist li { color: var(--muted); font-size: 13px; margin: 6px 0; word-break: break-all; }
.panel-bd .t { font-weight: 640; margin-bottom: 4px; }

/* ── 会员体系（#/lab）· 2026-10-08 老板令：把会员管理体系融合进管理后台 ──
   待拍四项的输入框在 .taskform 之外，这里补一套与 .field input 同款的样式；
   本页表格列多，窄屏靠横向滚动兜住（与站点总览同口径）。 */
.lab-in {
  width: 100%;
  background: var(--panel-2, #141a24);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}
.lab-in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.18); outline: none; }
.panel-bd .taskform { margin-top: 6px; }
/* 编号 / 日期 / 金额这类短字段不折行（否则 GL-2026-0001 会被挤成两行），长文本列照旧可换行 */
.lab-page .tbl td.mono, .lab-page .tbl th, .lab-page .tbl td.num { white-space: nowrap; }
.lab-page .tbl td.sub2:last-child { white-space: normal; }

/* 窄屏（≤620px）顶栏右侧两个外链按钮会被挤成竖排——移动端这些外链在「更多」面板里都有，收掉更干净 */
@media (max-width: 620px) {
  .topbar-r { display: none; }
  .topbar { padding-right: 14px; }
}

@media (max-width: 860px) {
  .srv-grid { grid-template-columns: 1fr; }
  .srv-role { min-height: 0; }
}

/* ── 访问统计（#/traffic）· 自研统计探针 · 2026-10-08 老板令：51la 之外上自家探针 ──
   趋势条用最朴素的 flex 行（day / bar / PV / UV·bot），不引图表库；窄屏把 UV 列收掉，只留 PV。 */
.px-page .panel { margin-bottom: 18px; }
.px-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.px-day { flex: none; width: 48px; color: var(--muted-2); font-size: 12px; }
.px-bar { flex: 1 1 auto; height: 10px; min-width: 80px; background: var(--bg-2, rgba(255, 255, 255, 0.06)); border-radius: 999px; overflow: hidden; }
.px-bar > i { display: block; height: 100%; min-width: 2px; background: linear-gradient(90deg, var(--brand), #58a0ff); border-radius: 999px; }
.px-num { flex: none; width: 64px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.px-sub { flex: none; width: 128px; font-size: 11.5px; color: var(--muted-2); }
.px-3col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 18px; }
.px-code {
  margin: 6px 0 12px; padding: 10px 12px; background: var(--panel-2, #141a24);
  border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  white-space: pre-wrap; word-break: break-all;
}
@media (max-width: 760px) {
  .px-sub { display: none; }
  .px-num { width: 52px; }
}

/* ── 档案库（#/docs）· 查看态 / 编辑态分离 + 收录表单折叠（2026-10-10 老板令） ──
   1) .panel-bd.taskform：面板正文既要 panel-bd 的留白，又要 taskform 的输入框样式，
      但不要 taskform 自带的内边距 / 底边线 / 灰底（那是列表页表单头用的）。
   2) details.more：收录表单只露两个必填项，其余收进折叠；展开后输入框仍占满整行
      （textarea 不在 flex 容器里就不会被 stretch，必须显式 width:100%）。 */
.panel-bd.taskform { padding: 16px 18px; border-bottom: 0; background: transparent; }
.taskform details.more { border: 1px dashed var(--line-2); border-radius: 10px; padding: 9px 12px; }
.taskform details.more > summary { cursor: pointer; color: var(--muted); font-size: 12.5px; list-style: none; }
.taskform details.more > summary::-webkit-details-marker { display: none; }
.taskform details.more > summary::before { content: '\25B8'; margin-right: 6px; color: var(--muted-2); }
.taskform details.more[open] > summary::before { content: '\25BE'; }
.taskform details.more > * + * { margin-top: 8px; }
.taskform details.more input, .taskform details.more select, .taskform details.more textarea { box-sizing: border-box; width: 100%; }
.taskform details.more .fieldset { margin: 0; }

/* 档案详情查看态：字段用 .kv 网格，长文本单独分区；正文可滚动，避免整页被正文撑爆 */
.doc-sec { margin-top: 16px; }
.doc-sec > .k { color: var(--muted-2); font-size: 12px; margin-bottom: 5px; }
.doc-text { font-size: 13.5px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.doc-body {
  font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; max-height: 60vh; overflow: auto;
}

/* ── 档案详情：卡片头快捷控件 + 附件预览框（2026-10-10 老板报「无法删除 / 状态无法编辑 / PDF 预览很丑陋」） ──
   1) .hd-sel：状态快捷下拉落在 .card-hd 里，不在 .taskform 作用域内，
      必须自己给一套与 .taskform select 同观的样式（否则就是浏览器原生裸控件）。
   2) #dvPrev / .doc-prev：预览区收成一张独立小卡（自带描边与圆角），
      iframe 白底不贴边——PDF 阅读器是白底，深色主题下白框直接怼在灰底上最丑。 */
.panel-hd-ops .hd-sel {
  height: 30px; padding: 0 8px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 7px; font-size: 12.5px;
  font-family: inherit; outline: none; cursor: pointer;
}
.panel-hd-ops .hd-sel:focus { border-color: var(--brand); }
.panel-hd-ops .hd-sel:disabled { opacity: .6; cursor: default; }
#dvPrev { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.doc-prev { display: flex; flex-direction: column; gap: 10px; }
.doc-prev iframe {
  width: 100%; height: 72vh; border: 1px solid var(--line-2); border-radius: 10px;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
/* 密码小眼睛：默认密文，点击显隐（老板 10/10 追加令） */
.field .pwd-wrap { position: relative; }
.field .pwd-wrap input { padding-right: 40px; }
.pwd-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: none; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.pwd-eye:hover { color: var(--text); background: rgba(127, 145, 175, 0.16); }
.pwd-eye.is-on { color: var(--brand); }
.pwd-eye:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ══════════════════════════════════════════════════════════════════════════
   档案库 · 列表页「外面就能改」（2026-10-11 老板令）
   老板原话：在外面能看到版本 / 名称 / 编号，但分类选不了、负责人选不了、日期看不到、
   状态改不了、审核操作不了、分享操作不了，「只能打开，这很不方便」。
   → 列表单元格直接放控件：改完即存（POST /console/docs/:id，服务端本来就支持部分字段）。
   .mini 与 .taskform 里的控件同观（原生裸控件在深色主题下最丑）。
   ══════════════════════════════════════════════════════════════════════════ */
.tbl .mini {
  height: 28px; padding: 0 6px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 7px; font-size: 12.5px;
  font-family: inherit; outline: none; max-width: 100%;
}
.tbl select.mini { cursor: pointer; }
.tbl .mini:focus { border-color: var(--brand); }
.tbl .mini:disabled { opacity: .55; cursor: default; }
.tbl .mini.is-busy { border-color: var(--brand); }
.tbl td.cell-ed { vertical-align: top; padding-top: 10px; }
.tbl td.cell-ed .mini { width: 100%; }
.tbl td.cell-ed input.mini[type="date"] { min-width: 118px; }
/* 行内展开的「审核 / 分享」小面板：不弹模态，就地展开，改完收起 */
tr.row-edit > td { background: var(--panel-2); border-top: 1px dashed var(--line-2); }
tr.row-edit .re-in { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
tr.row-edit textarea, tr.row-edit input[type="search"], tr.row-edit select, tr.row-edit input[type="datetime-local"] {
  background: var(--panel); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 7px; font-family: inherit; font-size: 12.5px; padding: 6px 8px; outline: none;
}
tr.row-edit textarea { min-width: 300px; resize: vertical; }
tr.row-edit .re-hint { font-size: 12px; color: var(--muted-2); align-self: center; }
.ops-wrap { display: flex; gap: 6px; flex-wrap: wrap; }
.ops-wrap .btn { white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════════════════
   档案详情 · 「版本与文件」：把「看的地方」与「上传的地方」拆开
   老板原话：文件按编号 / 版本 / 版次摆好；看的地方是看的、上传的地方是上传的。
   ══════════════════════════════════════════════════════════════════════════ */
.fchips { display: flex; flex-direction: column; gap: 6px; }
.fchip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 8px;
  background: var(--panel); font-size: 12.5px;
}
.fchip .ft {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted-2);
}
.fchip .ft.pdf { color: #d4380d; border-color: #ffbb96; background: rgba(212, 56, 13, .08); }
.fchip .ft.doc { color: #1677ff; border-color: #91caff; background: rgba(22, 119, 255, .08); }
.fchip .ft.xls { color: #389e0d; border-color: #b7eb8f; background: rgba(56, 158, 13, .08); }
.fchip .ft.img { color: #722ed1; border-color: #d3adf7; background: rgba(114, 46, 209, .08); }
.fchip .fn { flex: 1 1 220px; word-break: break-all; }
.fchip .fs { flex: 0 0 auto; color: var(--muted-2); font-size: 11.5px; }
.fchip.is-cur { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(22, 119, 255, .10); }
.up-panel .dropzone { margin: 0; }

/* ══════════════════════════════════════════════════════════════════════════
   预览器：pdf.js 渲到 <canvas> / docx-preview 渲成 HTML（2026-10-11 老板令）
   老板原话：「PDF 我点击之后它直接给我下载了……底下确实有一个预览的地方，但就是没有
   预览效果。我怀疑你没有用比较好的开源库，你找一找解决方案吧。」
   → 渲染权不再交给浏览器自带 PDF 插件（被策略禁用就只剩下载），改由 pdf.js 自己画。
   库文件在 /vendor/pdfjs、/vendor/docx，来源与升级见 docs/public/vendor/README.md。
   ══════════════════════════════════════════════════════════════════════════ */
.pv-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 6px 8px; border: 1px solid var(--line-2); border-bottom: none;
  border-radius: 10px 10px 0 0; background: var(--panel-2);
}
.pv-bar .pv-gap { flex: 1 1 auto; }
.pv-bar .pv-num { font-size: 12.5px; color: var(--muted-2); display: flex; align-items: center; gap: 4px; }
.pv-bar .pv-num input {
  width: 54px; height: 26px; text-align: center; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 6px; font-family: inherit; font-size: 12.5px; outline: none;
}
.pv-bar .pv-pct { font-size: 12px; color: var(--muted-2); min-width: 56px; text-align: center; }
.pv-scroll {
  height: 74vh; overflow: auto; background: #525659; padding: 12px;
  border: 1px solid var(--line-2); border-radius: 0 0 10px 10px;
}
.pv-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pv-page { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); line-height: 0; }
.pv-page canvas { display: block; }
.pv-skel { width: 100%; min-width: 240px; height: 320px; background: #f3f4f6; }
.pv-hint { color: #d9dbe0; font-size: 12.5px; padding: 18px; text-align: center; }

.dx-scroll { height: 74vh; overflow: auto; background: #525659; padding: 12px; border: 1px solid var(--line-2); border-radius: 0 0 10px 10px; }
.dx-body .docx-wrapper { background: transparent; padding: 0; }
.dx-body .docx-wrapper > section.docx {
  background: #fff; color: #111; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  margin: 0 auto 12px; padding: 40px 48px; max-width: 100%; overflow: auto;
}
.dx-body .docx-wrapper > section.docx p { margin: 0 0 8px; }
.dx-body .docx-wrapper > section.docx table { border-collapse: collapse; }
.dx-body .docx-wrapper > section.docx td, .dx-body .docx-wrapper > section.docx th { border: 1px solid #bbb; padding: 4px 6px; }
/* 老浏览器（无 DecompressionStream / 无 pdf.js 所需特性）也要给出人话，不留白框 */
.pv-fallback, .dx-fallback { padding: 18px; text-align: center; color: var(--muted-2); font-size: 13px; }


