:root {
  --bg: #F5F6F8;
  --panel: #FFFFFF;
  --border: #E6E8EC;
  --border-soft: #EFF1F4;
  --text: #191C1F;
  --text-2: #646A73;
  --text-3: #9BA1A9;
  --brand: #ff2e4d;
  --brand-soft: #FFF0F3;
  --ok: #16A34A;
  --warn: #D97706;
  --radius: 10px;
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#app { display: flex; height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;                 /* 垂直 padding 归零，用 min-height 撑高 */
  min-height: 64px;                /* 与 .topbar 实际高度对齐，border-bottom 在同一水平线 */
  border-bottom: 1px solid var(--border-soft);
}

.brand-mark {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

.brand-name { font-size: 14px; font-weight: 600; letter-spacing: .2px; }
.brand-sub  { font-size: 11px; color: var(--text-3); letter-spacing: .3px; }

.nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  margin-bottom: 2px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  cursor: pointer;
  color: var(--text-2);
  transition: background .12s, color .12s;
  user-select: none;
}
.nav-item:hover { background: #F4F5F7; color: var(--text); }
.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  border-left-color: transparent;
  font-weight: 500;
}

.nav-icon { display: flex; width: 18px; height: 18px; flex: 0 0 18px; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-label { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.sidebar-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
  font-size: 11.5px;
  color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: 0 0 6px; }
.foot-ver { margin-left: auto; }

/* ---------- 内容区 ---------- */
.content { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  padding: 12px 28px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  height: 64px;                     /* 与 .brand min-height 一致，border-bottom 同位 */
  box-sizing: border-box;
  overflow: hidden;                 /* 内容不溢出：标题换行/缩放时 border 始终保持 86px 在同一水平线 */
}
.topbar-main { flex: 1 1 auto; min-width: 0; }  /* 允许收缩，标题不换行 → 放大/缩小时不再漂移 */
.topbar h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar p  { margin: 2px 0 0; font-size: 12.5px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-side { font-size: 12px; color: var(--text-3); white-space: nowrap; flex: 0 0 auto; }

/* ---------- 笔记创作（xhs_ecommerce/compose） ---------- */
/* 四卡尺寸恒定（2026-09-17）：卡片内不罗列已选项（只在按钮文案体现「已选资源（N 项）」），
   底注固定两行高 → 选择项增减、创作方式切换都不会让卡片高度上下跳。 */
.cp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cp-card {
  padding: 12px 13px 11px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  display: flex; flex-direction: column;
}
.cp-card-title { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.cp-card-title .seq { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 5px; background: var(--brand-soft, #EFF5FF); color: var(--brand); font-size: 11px; font-weight: 700; flex: 0 0 17px; }
.cp-card-title .hint { margin-left: auto; font-weight: 400; color: var(--text-3); font-size: 11px; max-width: 52%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-card-sep { height: 1px; background: var(--border); margin: 9px 0 10px; }
.cp-card .xhs-input { width: 100%; box-sizing: border-box; }
/* ①② 的选择按钮：通栏等宽；已选时按钮自身呈现选中态（尺寸不变，只换文案与配色） */
.cp-pick { width: 100%; box-sizing: border-box; }
.cp-pick.has-sel { border-color: var(--brand); background: var(--brand-soft, #EEF3FF); font-weight: 600; }

/* ① 资源选择：弹窗多选 + ima 二级内容树 */
/* 资源弹窗（方案B，2026-09-23）：加宽到 1240 容纳右侧「已选资源」竖栏。
   只作用于 #cp-res-modal —— 笔记弹窗仍用 .cp-np-box 默认的 1040。 */
#cp-res-modal .xhs-cm-box.cp-np-box { width: 1240px; }
/* .cp-res-seg 行内：分段按钮靠左，搜索（输入框+按钮）靠右对齐到弹窗右内边距 */
.cp-res-seg { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
/* 主体左右两栏：左栏自适应（分段 / 表格 / 翻页栏），右栏固定 280 */
.cp-res-body { flex: 1 1 auto; min-height: 0; display: flex; gap: 12px; }
/* min-height:0 必须给：否则窄屏（column 布局）下左栏的自动最小高度会撑破弹窗，
   翻页栏被底栏盖住（2026-09-23 实测：左栏 538 > 主体 507，翻页按钮点不到） */
.cp-res-main { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.cp-res-picked {
  flex: 0 0 280px; width: 280px; display: flex; flex-direction: column;
  min-height: 0; overflow: hidden;
  border: 1px solid #85B7EB; border-radius: 8px; background: var(--brand-soft, #EFF5FF);
}
.cp-res-picked-h {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-bottom: 1px solid #B5D4F4;
  font-size: 12.5px; font-weight: 600; color: var(--brand);
}
.cp-res-picked-acts { margin-left: auto; }
.cp-res-linkbtn {
  border: 0; background: transparent; color: var(--brand); cursor: pointer;
  font-size: 12px; padding: 2px 4px; font-weight: 400;
}
.cp-res-linkbtn:hover { text-decoration: underline; }
.cp-res-picked-list {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 8px; display: flex; flex-direction: column; gap: 6px;
}
.cp-pick-card {
  flex: 0 0 auto; background: var(--panel); border: 1px solid #B5D4F4;
  border-radius: 6px; padding: 6px 8px;
}
.cp-pick-top { display: flex; align-items: center; gap: 6px; }
.cp-pick-type { font-size: 11px; color: var(--brand); flex: 1 1 auto; }
.cp-pick-x {
  flex: 0 0 auto; border: 0; background: transparent; color: var(--brand);
  cursor: pointer; font-size: 12px; line-height: 1; padding: 0 2px;
}
.cp-pick-x:hover { color: #A32D2D; }
.cp-pick-name {
  font-size: 12.5px; color: var(--text); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cp-pick-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.cp-pick-kb {
  margin-top: 5px; font-size: 11.5px; color: var(--brand);
  cursor: pointer; user-select: none;
}
.cp-pick-files { margin-top: 3px; display: flex; flex-direction: column; gap: 2px; }
.cp-pick-file {
  font-size: 11.5px; color: var(--text-2); padding-left: 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cp-pick-empty { padding: 22px 8px; text-align: center; font-size: 12px; color: var(--text-3); }
/* 窄屏降级：视口不足 1320 时右栏翻到表格下方，变成方案A 的底部面板（限高 + 内部滚动） */
@media (max-width: 1320px) {
  #cp-res-modal .xhs-cm-box.cp-np-box { width: 1040px; }
  .cp-res-body { flex-direction: column; }
  .cp-res-picked { flex: 0 0 auto; width: auto; max-height: 148px; }
  .cp-res-picked-list { flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
  .cp-pick-card { min-width: 190px; max-width: 260px; }
}
.cp-res-search { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
/* .xhs-cm-box input 会 width:100%，这里显式收窄（复合选择器特异性更高） */
.cp-res-search .xhs-input { width: 190px; flex: 0 0 auto; }
.cp-res-search button { padding: 6px 14px; font-size: 12.5px; white-space: nowrap; }
.cp-seg {
  padding: 5px 12px; font-size: 12.5px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text-2); border-radius: 7px; cursor: pointer;
}
.cp-seg:hover { border-color: var(--brand); color: var(--brand); }
.cp-seg.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cp-res-content {
  border: 1px solid var(--border); background: var(--panel); color: var(--brand);
  border-radius: 6px; padding: 3px 9px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.cp-res-content:hover { border-color: var(--brand); background: var(--brand-soft, #EEF3FF); }
/* 「读取范围」按钮与「选择内容」同款小尺寸描边样式（否则落通用大按钮样式） */
.cp-res-scope {
  border: 1px solid var(--border); background: var(--panel); color: var(--brand);
  border-radius: 6px; padding: 3px 9px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.cp-res-scope:hover { border-color: var(--brand); background: var(--brand-soft, #EEF3FF); }
.cp-res-name { font-size: 13px; color: var(--text); }
.cp-res-act { text-align: center; }
.cp-res-row.on { background: var(--brand-soft, #EEF3FF); }
/* ── 资源选择弹窗 ▸「我的资源」分段：文件夹导航（2026-09-30 v47）──
   与「资源中心 ▸ 我的资源」同款：文件夹仅作导航、只有文件可勾选；
   面包屑在分段内常驻（根层只显示「全部资源」）。 */
.cp-md-crumb { display: flex; align-items: center; gap: 6px; margin: 8px 0 6px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-2); }
.cp-md-crumb[hidden] { display: none; }
.cp-md-crumb .cp-md-bc { color: var(--brand); cursor: pointer; }
.cp-md-crumb .cp-md-bc:hover { text-decoration: underline; }
.cp-md-crumb .cp-md-cur { color: var(--text); font-weight: 600; }
.cp-md-crumb .cp-md-sep { color: var(--text-3); }
.cp-md-crumb .cp-md-hint { margin-left: auto; color: var(--text-3); }
.cp-md-folder { cursor: pointer; }
.cp-md-folder .cp-res-name { display: flex; align-items: center; gap: 6px; }
.cp-md-folder .cp-md-ic { font-size: 14px; line-height: 1; flex: 0 0 auto; }
.cp-md-folder:hover { background: var(--brand-soft, #EEF3FF); }
.cp-warn { color: #d48806; font-size: 11px; }
.cp-muted { color: var(--text-3); font-size: 11px; }
/* ima 内嵌树 */
/* 「我的资源」文档查看弹窗（2026-09-23）：就地展开改为独立弹窗，正文样式与资源中心「查看」一致 */
/* 单类选择器与 .xhs-cat-mask 同特异性会被后面的规则盖掉，必须用复合选择器提权 */
.xhs-cat-mask.cp-mv-mask { z-index: 120; }   /* 高于资源弹窗 .xhs-cat-mask(z=90) */
.cp-mydoc-body { max-height: 56vh; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font-size: 13px; line-height: 1.7; color: var(--text); background: #FAFBFC;
  border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 0; }
/* 资源弹窗底部翻页栏（「我的资源」分页，与资源中心同款） */
.cp-res-pagebar { display: flex; align-items: center; gap: 10px; margin-top: 10px;
  font-size: 12.5px; color: var(--text-2); }
.cp-res-pagebar:empty { display: none; }   /* 不分页的分段不占位 */
.cp-res-pagebar .pg-flex { flex: 1; }
.cp-res-pagebar .pg-num { min-width: 28px; height: 28px; padding: 0 8px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--panel); color: var(--text); font-size: 12.5px; cursor: pointer; }
.cp-res-pagebar .pg-num:hover:not([disabled]) { border-color: var(--brand); color: var(--brand); }
.cp-res-pagebar .pg-num.cur { background: var(--brand); border-color: var(--brand); color: #fff; cursor: default; }
.cp-res-pagebar .pg-num[disabled] { color: var(--text-3); cursor: not-allowed; }
.cp-res-pagebar .pg-size { display: inline-block; min-width: 34px; text-align: center; height: 28px;
  line-height: 28px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); }
/* ima 内嵌树 */
.cp-ima-inline > td { background: #FBFCFF; padding: 0 !important; }
.cp-ima-tree { display: flex; border-top: 1px dashed var(--border); min-height: 220px; }
.cp-ima-side { width: 240px; flex: 0 0 auto; border-right: 1px solid var(--border); background: #FAFBFC; padding: 8px; overflow-y: auto; }
.cp-ima-side-h { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.cp-ima-grp { font-size: 11.5px; color: var(--text-3); font-weight: 600; margin: 8px 0 3px; }
.cp-ima-kb { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--text); }
.cp-ima-kb:hover { background: #EEF0F3; }
.cp-ima-kb.active { background: var(--brand-soft, #EEF3FF); color: var(--brand); font-weight: 600; }
.cp-ima-kb.disabled { color: var(--text-3); cursor: not-allowed; opacity: .6; }
.cp-ima-kbchk { flex: 0 0 auto; width: 13px; height: 13px; margin: 0; pointer-events: none; }  /* 库级对钩：只作状态指示，不可点击 */
.cp-ima-kbname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-ima-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-ima-toolbar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.cp-ima-back { width: 26px; height: 26px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.cp-ima-back:hover { background: #F2F4F7; color: var(--brand); }
.cp-ima-crumb { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-left: 6px; }
.cp-ima-crumb .cp-ima-root, .cp-ima-crumb .cp-ima-bc { color: var(--text-3); cursor: pointer; }
.cp-ima-crumb .cp-ima-bc:hover, .cp-ima-crumb .cp-ima-root:hover { color: var(--brand); }
.cp-ima-crumb .cp-ima-cur { color: var(--text); font-weight: 600; }
.cp-ima-q { flex: 0 0 140px; height: 28px; padding: 3px 8px; }
.cp-ima-go { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.cp-ima-go:hover { background: #F2F4F7; color: var(--brand); }
.cp-ima-items { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 8px; }
.cp-ima-it { display: flex; align-items: center; gap: 7px; padding: 6px 6px; border-radius: 6px; font-size: 13px; color: var(--text); }
.cp-ima-it:hover { background: #F2F4F7; }
.cp-ima-folder { cursor: pointer; }
.cp-ima-it input { flex: 0 0 auto; }
.cp-ima-ic { flex: 0 0 auto; }
/* 文件名：单行省略号，避免长名换行把条目撑高或横向溢出 */
.cp-ima-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-ima-empty, .cp-ima-loading { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }
/* 条目级置灰：库内他人创建的笔记（当前账号非创建者）ima 拒读正文，不可勾选 */
.cp-ima-it-dis { opacity: .55; cursor: not-allowed; }
.cp-ima-it-dis .cp-ima-name { color: var(--text-3); }
.cp-ima-no { flex: 0 0 auto; font-size: 11px; color: var(--text-3); border: 1px solid var(--border);
  border-radius: 4px; padding: 0 4px; }
.cp-ima-ind { pointer-events: none; cursor: default; flex: 0 0 auto; width: auto; height: auto; margin: 0; padding: 0; }

/* ⑤ 是否回传 + 创作主题：同一行左右两列 */
.cp-tc-row { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; align-items: stretch; }
.cp-cb-col { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.cp-topic-col { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.cp-topic-col label { font-size: 13px; color: var(--text); white-space: nowrap; flex: 0 0 auto; }
.cp-topic-col .xhs-input { flex: 1 1 auto; min-width: 0; }
.cp-topic-col button { flex: 0 0 auto; white-space: nowrap; }

/* ⑤ 是否回传 */
.cp-cb-title { font-size: 13px; font-weight: 600; color: var(--text); }
.cp-cb-sub { margin-top: 2px; font-size: 11.5px; color: var(--text-3); }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 42px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: #CBD5E1; border-radius: 999px; transition: .2s; }
.switch .slider::before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* 指令预览（创作方式卡已移除，2026-09-25） */
.cp-preview { margin-top: 16px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }

/* 技能选择弹窗（多选 + 顶部方式菜单） */
.xhs-cm-box.cp-skill-box { width: 560px; max-width: 94vw; height: 560px; max-height: 90vh; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; }
.cp-sk-mode { margin: 6px 0 12px; }
.cp-sk-seg { display: flex; gap: 8px; }
.cp-sk-seg-btn {
  flex: 1; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--panel); cursor: pointer; font-size: 13px; color: var(--text); transition: border-color .15s, background .15s;
}
.cp-sk-seg-btn:hover { border-color: #C7D6FF; }
.cp-sk-seg-btn.active { border-color: var(--brand); background: var(--brand-soft, #EFF5FF); font-weight: 600; }
.cp-sk-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 10px; border: 1px solid var(--border); border-radius: 8px; }
.cp-sk-it {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer;
  border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text);
}
.cp-sk-it:last-child { border-bottom: 0; }
.cp-sk-it:hover { background: var(--bg-soft, #F6F7F8); }
.cp-sk-it.on { background: var(--brand-soft, #EFF5FF); }
.cp-sk-it input[type=checkbox] { width: 16px; height: 16px; flex: 0 0 auto; }
.cp-sk-name { flex: 1; }
.cp-sk-badge { font-size: 11px; color: var(--text-2); }
.cp-sk-empty { padding: 24px; text-align: center; color: var(--text-2); font-size: 13px; }

.cp-preview { margin-top: 16px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cp-preview-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg-soft, #F6F7F8);
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.cp-preview-title { flex: 1 1 auto; min-width: 0; line-height: 1.5; }
.cp-preview-sub { font-weight: 400; color: var(--muted, #8a9099); margin-left: 2px; }
.cp-head-right { display: flex; align-items: center; gap: 12px; font-weight: 400; flex: 0 0 auto; }
.cp-preview textarea {
  display: block; width: 100%; border: 0; padding: 14px; box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 12.5px; line-height: 1.7; color: var(--text);
  resize: vertical; outline: none;
}

/* 笔记选择弹窗 */
/* 复合选择器特异性高于 .xhs-cm-box，确保覆盖其 overflow/max-height */
.xhs-cm-box.cp-np-box {
  width: 1040px; max-width: 94vw;
  height: 624px;            /* 横向长方形：ima 知识库左右两栏更舒展 */
  max-height: 86vh;         /* 小屏保护：超高时仍不超过视口 */
  display: flex; flex-direction: column;
  overflow: hidden;         /* 仅列表内部滚动，弹窗本身不再滚动 */
}
/* 标题 / 筛选条 / 底栏固定不伸缩，表格独占剩余高度 */
.cp-np-box .panel-title,
.cp-np-box .cp-np-filter,
.cp-np-box .cp-np-foot { flex: 0 0 auto; }

.cp-np-filter { display: flex; gap: 8px; margin: 12px 0; }
.cp-np-filter .xhs-input { flex: 1; }
.cp-np-catsel { flex: 0 0 150px; }

/* 笔记表格：表头菜单项 = 复选框 / 对标笔记 / 点赞 / 收藏 / 笔记类别 */
.cp-np-table {
  flex: 1 1 auto; min-height: 0;          /* 填满弹窗剩余高度 */
  overflow: auto;                          /* 滚动条只在这里 */
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--panel);
}
.cp-np-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cp-np-tbl th {
  position: sticky; top: 0; z-index: 2;
  padding: 9px 8px; font-size: 12.5px; font-weight: 500;
  color: var(--text-2); background: #F7F8FA; text-align: left;
  border-bottom: 1px solid var(--border);
}
.cp-np-tbl th.c, .cp-np-tbl td.c { text-align: center; }
.cp-np-tbl th.r, .cp-np-tbl td.r { text-align: right; }
/* 资源选择弹窗：操作列表头与正文按钮对齐（正文 .cp-res-act 为居中），并让操作列离右边框更远
   仅作用于资源弹窗 #cp-res-modal，不影响笔记弹窗 */
#cp-res-modal .cp-np-tbl th.cp-res-act-h { text-align: center; padding-right: 16px; }
#cp-res-modal .cp-np-tbl td.cp-res-act { padding-right: 16px; }
.cp-np-tbl td {
  padding: 8px; font-size: 12.5px; color: var(--text-2);
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.cp-np-tbl tbody tr:last-child td { border-bottom: 0; }
.cp-np-row { cursor: pointer; }
.cp-np-row:hover { background: var(--bg-soft, #F6F7F8); }
.cp-np-row.on { background: #EFF5FF; }
/* 对标笔记列：封面 + 标题 / 作者 */
.cp-np-note { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cp-np-note .xhs-thumb { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 4px; }
.cp-np-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cp-np-title {
  font-size: 13px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cp-np-meta { font-size: 11.5px; color: var(--text-3); }
/* 时间列（发布时间 / 入库时间）：弱化为次要信息，等宽数字让日期对齐更整齐 */
.cp-np-time { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 笔记弹窗数字列（点赞 / 收藏 / 评论）：右对齐 + 加大右内边距 → 三个数字整体左移，
   更贴近「对标笔记」列；同时评论列右侧留白变大，与「发布时间」拉开间距 */
#cp-note-modal .cp-np-tbl th.r, #cp-note-modal .cp-np-tbl td.r { padding-right: 18px; }
/* 「发布时间」列加大左内边距：与前一列「评论」之间再拉开一档（总间距 = 评论右 18 + 发布左 24） */
#cp-note-modal .cp-np-tbl th.cp-np-pub, #cp-note-modal .cp-np-tbl td.cp-np-pub { padding-left: 24px; }
/* 笔记类别列：分类名小标签 */
.cp-np-tag {
  display: inline-block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 8px; border-radius: 10px;
  background: #F2F4F7; color: var(--text-2); font-size: 12px;
}
.cp-np-row.on .cp-np-tag { background: #E3EDFF; color: var(--brand); }
.cp-np-empty { padding: 28px; text-align: center; font-size: 13px; color: var(--text-3); }
.cp-np-empty.err { color: #C0392B; }
.cp-np-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.cp-np-actions { display: flex; gap: 8px; }

/* ---------- 多标签页导航栏（topbar 下方） ---------- */
.tabbar {
  display: flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
/* 左/右滚动箭头 + 刷新按钮：统一为清晰的小幽灵按钮（白底/浅边框/圆角/悬停品牌色） */
.tabbar-arrow, .tabbar-refresh {
  flex: 0 0 auto;
  height: 26px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff; color: var(--text-2);
  font-size: 12.5px; line-height: 1; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.tabbar-arrow { width: 26px; padding: 0; }
.tabbar-arrow svg, .tabbar-refresh svg { width: 14px; height: 14px; display: block; }
.tabbar-refresh { margin-left: 2px; }   /* 与右箭头拉开一点，看得更清晰 */
.tabbar-arrow:hover:not(.disabled),
.tabbar-refresh:hover:not(:disabled) {
  border-color: var(--brand); color: var(--brand); background: #F5F8FF;
}
.tabbar-arrow:active:not(.disabled),
.tabbar-refresh:active:not(:disabled) { background: #EAF1FF; }
.tabbar-arrow.disabled { opacity: .35; cursor: default; pointer-events: none; }
.tabbar-refresh:disabled { opacity: .4; cursor: default; pointer-events: none; }
.tabbar-refresh.loading svg { animation: wb-spin .6s linear infinite; }
@keyframes wb-spin { to { transform: rotate(360deg); } }
.tabbar-scroll {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding: 5px 2px;
}
.tabbar-scroll::-webkit-scrollbar { display: none; }
.tb-tab {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #EFEFEF; color: var(--text-2);
  font-size: 12.5px; cursor: pointer;
  user-select: none; white-space: nowrap;
}
.tb-tab:hover { border-color: var(--brand); color: var(--brand); }
.tb-tab.active {
  background: #fff; color: var(--brand);
  border-color: var(--brand); font-weight: 600;
  box-shadow: inset 0 2px 0 var(--brand);
}
.tb-tab-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 3px;
  font-size: 12px; line-height: 1;
  color: var(--text-3);
}
.tb-tab-x:hover { background: #FCEBE9; color: #C0392B; }

/* 多标签改造（2026-09-07）：滚动容器从 .mount 下放到每个 .tab-page ——
   各页签滚动位置独立保留（.mount 只做定位上下文，不再滚动） */
.mount { flex: 1; min-height: 0; overflow: hidden; position: relative; }
.tab-page { height: 100%; overflow-y: auto; padding: 0 0 40px; }
/* 笔记搜索 / 解析页：把滚动下放到「结果区内部」，让顶部 4 个区块（菜单/条件/结果菜单/列表表头）固定不滚 */
.tab-page:has(.xhs-search-shell) {
  overflow: hidden;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}
.tab-page:has(.xhs-search-shell) > .xhs-search-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* ima 已连接页：顶部状态条固定 + 内容卡双栏各自滚动（同笔记搜索页做法，下放到 .ima-main 内的左右两栏） */
.tab-page:has(.ima-connected) {
  overflow: hidden;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}
.tab-page:has(.ima-connected) > .xhs-det-wrap {
  flex: 1;
  min-height: 0;
  padding-top: 10px;
  padding-bottom: 10px;
}
.xhs-search-shell > .panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
/* A / B 两个子面板都走 flex 列布局（占满 shell 剩余高度），顶部区块不收缩 */
.xhs-search-shell .panel-a,
.xhs-search-shell .panel-b {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.xhs-panel-hidden { display: none !important; }
.xhs-search-shell .xhs-topbar,
.xhs-search-shell .xhs-searchbar,
.xhs-search-shell .msg,
.xhs-search-shell .xhs-result-head {
  flex: 0 0 auto;
}
/* 结果区本身撑满、A/B 区独立滚动 */
.xhs-result-zone {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.xhs-result-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
/* 列表表头在 body 内 sticky 顶部，滚动时跟随 */
.xhs-result-body .xhs-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #F7F8FA;
  box-shadow: inset 0 -1px 0 var(--border);
}

/* 对标笔记：顶部两行常驻不动 —— ① 功能区按钮排 ② 笔记表头（封面/标题/点赞…）
   滚动条只负责下面的笔记区域。
   为什么不用 sticky：sticky 是「先跟着滚，滚到贴顶才钉住」，按钮会往上窜一小段再停，
   观感就是「卡了一下」。改成与笔记搜索页同一套做法：把滚动从 .tab-page 下放到内容区内部，
   整页根本不滚动，头部自然永远不动。 */
.tab-page:has(.xhs-lib-shell) {
  overflow: hidden;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}
.tab-page:has(.xhs-lib-shell) > .xhs-lib-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
/* 顶部按钮排：不参与收缩 */
.xhs-lib-shell > .xhs-lib-toolbar {
  flex: 0 0 auto;
  margin-bottom: 12px;
}
/* 笔记区域：占满剩余高度但自身不滚（表头永远不动），
   真正滚动的只有 .xhs-lib-rows —— 滚动条只出现在表头之下的行区域。 */
.xhs-lib-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.xhs-lib-rows {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
/* 表头 / 行拆成两张 table（render 里用同一 colgroup），fixed 布局保证两表列对齐 */
.xhs-lib-body .xhs-table {
  table-layout: fixed;
  width: 100%;
}
.xhs-lib-body .xhs-table--head {
  flex: 0 0 auto;
  border-bottom: none;              /* 分隔线由 th 自带 border-bottom 提供 */
  border-radius: var(--radius) var(--radius) 0 0;
}
.xhs-lib-body .xhs-table--rows {
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}
/* 待发笔记（drafts）：与「对标笔记」同一套做法 —— 整页不滚动，
   顶部 tab / 按钮工具条常驻，滚动条只出现在下方 .xhs-drafts-body 列表区。 */
.tab-page:has(.xhs-drafts-shell) {
  overflow: hidden;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}
.tab-page:has(.xhs-drafts-shell) > .xhs-drafts-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.xhs-drafts-shell > .xhs-drafts-toolbar { flex: 0 0 auto; }
.xhs-drafts-shell > .xhs-drafts-colhead { flex: 0 0 auto; overflow: hidden; scrollbar-gutter: stable; }
.xhs-drafts-shell > .xhs-drafts-body { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
/* 空态占位行：表头常驻（2026-09-15），空列表用一行居中提示把表格补完整，
   不留"表格凭空消失"的观感。高度给足，视觉上等同原 .empty 空态块。 */
.xhs-empty-cell {
  text-align: center;
  padding: 52px 0;
  color: var(--text-3);
  font-size: 13px;
  border-bottom: none;
}

/* ---------- 通用面板 / 卡片 ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.panel-title { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.panel-desc  { font-size: 12.5px; color: var(--text-2); margin: 0 0 14px; }

/* 统计卡 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat-label { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 600; line-height: 1.2; }
.stat-unit  { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 3px; }
.stat-hint  { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* 空状态 */
.empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  color: var(--text-3);
  background: #FBFCFD;
  font-size: 13px;
}

/* 规划清单 */
.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-item {
  display: flex; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.plan-item:last-child { border-bottom: none; }
.plan-tag {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 4px;
  background: #F0F2F5;
  color: var(--text-2);
  height: 20px; line-height: 18px;
  margin-top: 1px;
}
.plan-tag.assume { background: #FFF4E5; color: var(--warn); }
.plan-tag.todo   { background: var(--brand-soft); color: var(--brand); }
.plan-tag.done   { background: #E6F7ED; color: #16A34A; }
.plan-text { flex: 1; color: var(--text); }
.plan-note { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* 模块入口卡（仪表盘） */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.mod-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color .12s, transform .12s;
}
.mod-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.mod-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.mod-card-head .nav-icon { color: var(--brand); }
.mod-card-name { font-size: 13.5px; font-weight: 600; }
.mod-card-desc { font-size: 12.5px; color: var(--text-2); margin: 0; }

/* 键值表 */
.kv { display: grid; grid-template-columns: 92px 1fr; gap: 8px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }

/* ---------- 表单与通用元件 ---------- */
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

input[type="text"], input[type="number"], select {
  border: 1px solid #D6D9DE;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus { border-color: var(--brand); }

button {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}
button.ghost { background: #fff; color: var(--brand); }
button:disabled { opacity: .5; cursor: not-allowed; }

/* tab 切换按钮（需求1：选中/未选中明确区分）。
   根因：.tab 原本无样式，两按钮都渲染成实心蓝，.active 看不出差别。
   选中=实心蓝白字；未选中=白底线框蓝字。 */
button.tab {
  background: #fff; color: var(--brand);
  border: 1px solid var(--border); font-weight: 500;
}
button.tab:hover { border-color: var(--brand); }
button.tab.active {
  background: var(--brand); color: #fff;
  border-color: var(--brand); font-weight: 600;
}

/* 对标笔记顶部「未创作 / 已创作」二态切换（2026-09-08 取代原「全部状态」下拉） */
.xhs-lib-tabs { display: inline-flex; gap: 6px; flex: 0 0 auto; }

/* MCP 配置页：客户端切换菜单（WorkBuddy / 豆包 等，横向排布） */
.mcp-tabs {
  display: flex; align-items: center; gap: 8px;
  /* 顶部条 = 「真·固定头」（不在滚动容器内，见下方 .tab-page:has(.mcp-tabs) 规则） */
  margin: 0 0 16px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

/* MCP 配置页（2026-09-29）：把滚动从整页下放到内容区 .mcp-body ——
   顶部条（客户端页签 + 重新生成token）**不参与滚动**，右侧滚动条只约束下方内容区
   （轨道从顶部条下沿才开始）。与「待发笔记 / 对标笔记 / 知识库」同一套做法。 */
.tab-page:has(.mcp-tabs) {
  overflow: hidden;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}
.tab-page:has(.mcp-tabs) > .panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.tab-page:has(.mcp-tabs) > .panel > .mcp-tabs { flex: 0 0 auto; }
.tab-page:has(.mcp-tabs) > .panel > .mcp-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;   /* 滚动条出现/消失时内容不左右抖动 */
  padding-bottom: 40px;       /* 原先由 .tab-page 承担的底部留白挪到这里 */
}

/* MCP 配置页：配置卡片标题行（标题 + 一键复制按钮同水平） */
.mcp-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.mcp-card-head .xhs-card-title { margin-bottom: 0; }

/* MCP 配置页：mcp.json 展示 + 一键复制 */
.mcp-copy-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.mcp-copy-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.mcp-json-box {
  margin: 0; padding: 12px 14px;
  background: #F6F7F8;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 12.5px; line-height: 1.6;
  white-space: pre; overflow-x: auto;
  color: var(--text);
}

/* MCP 配置页：客户端下的二级子菜单（文字 + 下划线高亮，与一级实心按钮区分） */
.mcp-subtabs {
  display: flex; align-items: center; gap: 22px;
  margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.mcp-subtab {
  position: relative; background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-2); padding: 4px 2px;
}
.mcp-subtab:hover { color: var(--brand); }
.mcp-subtab.active { color: var(--brand); font-weight: 600; }
.mcp-subtab.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -11px;
  height: 2px; background: var(--brand);
}

/* MCP 配置页：配置引导步骤列表 */
.mcp-guide-list { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.9; color: var(--text); }
.mcp-guide-list li { margin-bottom: 8px; display: flex; align-items: flex-start; gap: 8px; }
.mcp-step-no { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%; background: #ff2e4d; color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.mcp-guide-list code { font-size: 12px; }

/* MCP 配置页：验证话术行（话术文本 + 复制按钮） */
.mcp-sc {
  flex: 1 1 auto; min-width: 0;
  background: #F6F7F8; border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; font-size: 12.5px; line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  color: var(--text); white-space: pre-wrap; word-break: break-all;
}
.mcp-copy-row > button { flex: 0 0 auto; }
.mcp-sc-hint { font-size: 12.5px; color: var(--text-2); margin: 12px 0 6px; }
.mcp-sc-hint:first-child { margin-top: 0; }

/* MCP 配置页：部署方式切换（本机 / 云端） */
.mcp-deploy-toggle {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 10px 12px;
  background: #F6F7F8; border: 1px solid var(--border); border-radius: 8px;
}
.mcp-deploy-label { font-size: 13px; font-weight: 600; color: var(--text); }
.mcp-deploy-btn {
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  font-size: 13px; padding: 5px 14px; border-radius: 6px; cursor: pointer;
  transition: all .15s ease;
}
.mcp-deploy-btn:hover { color: var(--brand); border-color: var(--brand); }
.mcp-deploy-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.mcp-deploy-hint { font-size: 12px; color: var(--text-2); margin-left: auto; }

/* 指令库（系统配置 ▸ 指令库） */
.pr-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pr-title { font-size: 14px; font-weight: 600; }
.pr-list { display: grid; gap: 12px; }
.pr-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
}
.pr-item-head { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.pr-item-head .pr-chev { flex: 0 0 auto; color: #86909c; transition: transform .15s ease; }
.pr-item.open .pr-item-head .pr-chev { transform: rotate(90deg); }
.pr-item-title { font-size: 14px; font-weight: 600; color: var(--text); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.pr-item-actions button { padding: 4px 10px; font-size: 12.5px; }
.pr-item-actions .pr-del { color: #C0392B; border-color: #E7C4C4; }
.pr-item-content {
  display: none;
  margin: 10px 0 0; padding: 10px 12px;
  background: #F6F7F8;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 12.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
  max-height: 260px; overflow-y: auto;
  color: var(--text);
}
.pr-item.open .pr-item-content { display: block; }
.pr-empty { padding: 40px 0; text-align: center; color: var(--text-3); font-size: 13px; }
.pr-msg { margin-top: 10px; font-size: 12.5px; color: #C0392B; min-height: 16px; }

/* 结果功能区（需求4：整合进主面板、固定显示；菜单在结果区顶部，空时占位） */
.xhs-result-zone {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--border);
}
.xhs-result-head { gap: 12px; margin-bottom: 12px; }
.xhs-result-title { font-size: 14px; font-weight: 600; }
/* 「全部清除」文字按钮：无线框，红色文字链（区别于主操作按钮） */
.xhs-clear-link { color: #c0392b; font-size: 13px; cursor: pointer; user-select: none; }
.xhs-clear-link:hover { text-decoration: underline; }
.xhs-result-empty { padding: 30px 0; text-align: center; line-height: 1.8; }

/* 关键词本地历史联想下拉（需求2） */
.xhs-kw-wrap { position: relative; display: inline-block; min-width: 0; }

/* 顶部 tab 行：笔记搜索/笔记解析 + 关键词输入框 */
.xhs-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.xhs-kw-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: #475569;
  margin-left: 12px;
  flex: 0 0 auto;
}
.xhs-kw-label .xhs-kw-wrap { min-width: 0; }
.xhs-kw-label .xhs-kw-wrap .xhs-input { width: 200px; }

/* 笔记搜索 · 顶部条件行（单行内联，宽松分布；自定义日期浮层不挤列宽） */
.xhs-searchbar {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.xhs-searchbar label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: #475569;
  flex: 0 0 auto;
}
.xhs-search-label {
  font-size: 13px; color: #475569;
  font-weight: 600;
  flex: 0 0 auto;
}
.xhs-searchbar label select,
.xhs-searchbar label input {
  box-sizing: border-box;
  min-width: 0;
}
.xhs-searchbar label input[type="number"] { width: 56px; }
/* 自定义日期：绝对定位浮在 select 下方，不占行宽 → 后面所有列不会漂移 */
.xhs-searchbar .xhs-cell-pub { position: relative; }
.xhs-searchbar .xhs-pubafter {
  position: absolute;
  top: calc(100% + 4px); left: 0;
  z-index: 5;
  width: 150px;
  display: none;
}
.xhs-searchbar .xhs-pubafter.is-show { display: block; }
.xhs-collect-btn {
  padding: 5px 14px;
  font-size: 13px;
  flex: 0 0 auto;
}
.xhs-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  min-width: 220px; max-width: 340px; max-height: 260px; overflow: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}
.xhs-suggest-item {
  padding: 8px 12px; font-size: 13px; cursor: pointer; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xhs-suggest-item:hover { background: var(--brand-soft); color: var(--brand); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #F2F3F5; border-radius: 14px;
  padding: 3px 10px; font-size: 12px; color: var(--text-2);
}

.muted { color: var(--text-3); font-size: 12px; }
.msg { font-size: 12px; color: var(--ok); min-height: 16px; }
.err { font-size: 12px; color: #DC2626; min-height: 16px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal {
  background: #fff; border-radius: 12px; width: 720px; max-width: 92vw;
  max-height: 86vh; overflow: auto; padding: 20px;
}
.modal pre {
  white-space: pre-wrap; word-break: break-all; background: #F7F8FA;
  border-radius: 8px; padding: 12px; font-size: 13px; line-height: 1.6;
}
.modal .close { float: right; cursor: pointer; color: var(--text-3); }

/* 对标笔记内嵌确认框：仅盖住「功能区」(#mod-mount)，不铺满全屏、不钉在顶部
   根因：原生 confirm() 浏览器强制居中且无法 CSS 定位，用户要求确认框出现在功能区内。
   做法：mask 绝对定位于 .mount（position:relative），只遮功能区域，对话框居中于可见区。 */
.xhs-confirm-mask {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .12);
  display: flex; align-items: center; justify-content: center;
  z-index: 60;
}
.xhs-confirm-box {
  position: relative;       /* 让右上角 X 绝对定位锚点 */
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .18);
  padding: 20px 22px; width: calc(100% - 48px); max-width: 420px;
}
/* 确认框右上角关闭按钮（×）：点非弹窗区不关闭，只能点 × / 取消 / 确认 */
.xhs-confirm-x {
  position: absolute; top: 12px; right: 14px;
  cursor: pointer; color: var(--text-3); font-size: 16px; line-height: 1;
  user-select: none;
}
.xhs-confirm-x:hover { color: var(--text); }
.xhs-confirm-box .msg { font-size: 15px; line-height: 1.6; color: var(--text); margin: 2px 0 18px; padding-right: 20px; }
.xhs-confirm-box .row { display: flex; gap: 10px; justify-content: flex-end; }
.xhs-confirm-box button.danger { background: #e5484d; border-color: #e5484d; color: #fff; }

/* 「选择入库分类」弹窗：分类按钮列表 */
.xhs-cat-mask {
  /* 区别于详情弹窗的深色 .note-detail-mask（黑屏），分类选择是轻量操作，用浅遮罩 */
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .18);
  display: flex; align-items: center; justify-content: center;
  z-index: 90;  /* 比详情弹窗 .note-detail-mask(z=100) 低一级 */
}
.xhs-cat-modal-box {
  /* 沿用 .modal 的宽/边距，仅微调让"确认/取消"区看起来更协调 */
  padding: 22px 24px 18px;
}
/* 轻量弹窗卡片（校招信息表 · 飞书配置弹窗等共用 .xhs-cm-box） */
.xhs-cm-box {
  position: relative;       /* 让右上角 X 绝对定位锚点 */
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .06);
  width: 560px; max-width: 92vw;
  max-height: 86vh;
  overflow: auto;
  padding: 24px 28px 20px;
}
.xhs-cm-x {
  /* X 加大点击区域，避免点不到要连点几次；绝对定位右上角，避免挤标题 */
  position: absolute; top: 12px; right: 12px;
  display: inline-block;
  width: 32px; height: 32px; line-height: 30px; text-align: center;
  border-radius: 50%; transition: background .15s;
  user-select: none; cursor: pointer;
  color: var(--text-3);
  font-size: 16px;
}
.xhs-cm-x:hover { background: #F3F4F6; color: var(--text); }

/* 资源中心新建/添加弹窗内的表单控件 */
.xhs-cm-box input, .xhs-cm-box select, .xhs-cm-box textarea {
  width: 100%; padding: 8px 10px; margin: 2px 0 4px;
  border: 1px solid var(--border-soft, #E5E7EB); border-radius: 8px; font-size: 14px;
  box-sizing: border-box;
}
/* ⚠️ 上面这条只想服务表单文本框，但 `.xhs-cm-box input` 会把 checkbox 一并命中：
   复选框在 .cp-ima-it 这类 flex 行里被 width:100% 拉成整行宽（实测 344px），原生方块
   在超宽盒子里居中渲染 → 视觉上只剩一个孤立小方块，后面的图标/文字被挤出可视区。
   这里把弹窗内的 checkbox / radio 复位为原生尺寸（项目未对二者做任何自定义外观）。 */
.xhs-cm-box input[type="checkbox"], .xhs-cm-box input[type="radio"] {
  width: auto; height: auto; min-width: 0;
  padding: 0; margin: 0; border: 0; border-radius: 0;
  box-sizing: content-box; flex: 0 0 auto; vertical-align: middle;
}
.xhs-field-label { display: block; font-size: 13px; color: var(--text-2); margin-top: 10px; }

/* 资源中心（虚拟产品货盘） */
.xhs-prod-head { justify-content: space-between; align-items: center; margin-bottom: 10px; }
.xhs-prod-card { background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.xhs-prod-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xhs-prod-name { font-size: 15px; font-weight: 600; color: var(--text); }
.xhs-prod-items-head { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.xhs-prod-ops { white-space: nowrap; }
.xhs-prod-ops button { margin-right: 4px; }
.xhs-code { background: #0f172a; color: #e2e8f0; padding: 8px 10px; border-radius: 8px; font-family: monospace; font-size: 12px; margin: 4px 0; white-space: pre-wrap; }
.xhs-prod-toast { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 95; max-width: 320px; }
.xhs-danger { background: #e5484d; border-color: #e5484d; color: #fff; }
.xhs-danger:hover { background: #d23c41; }
.xhs-danger-text { color: #e5484d; }
.xhs-danger-text:hover { background: #FEF2F2; }

/* 产品详情：标签 / 关键字段高亮 / 选中条 */
.xhs-tag { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); margin-left: 8px; }
.xhs-key-col { background: #FFF7ED; color: #C2410C; }
.xhs-key-cell { background: #FFF7ED; font-weight: 600; color: #9A3412; }
.xhs-selbar { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; padding: 8px 14px; background: var(--brand-soft); border: 1px solid var(--brand); border-radius: 8px; }
.xhs-selbar .muted { color: var(--brand); font-weight: 600; }

/* 内嵌 toast：取代原生 alert()。锚在功能区右上角，3 秒自动消失。
   type 决定配色（info/success/warn/error），多次触发从上往下排列不互相覆盖。 */
.xhs-toast-stack {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 70;  /* 高于功能区 50 / in-panel confirm 60，但低于全屏弹窗 */
  pointer-events: none;
}
.xhs-toast {
  pointer-events: auto;
  min-width: 180px; max-width: 360px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 13px; line-height: 1.45;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .10);
  background: #fff; color: var(--text);
  border-left: 3px solid var(--brand);
  animation: xhs-toast-in .22s ease-out;
}
.xhs-toast-info    { border-left-color: var(--brand); }
.xhs-toast-success { border-left-color: #10B981; }
.xhs-toast-warn    { border-left-color: #F59E0B; }
.xhs-toast-error   { border-left-color: #EF4444; }
.xhs-toast-out { opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
@keyframes xhs-toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.xhs-cm-list {
  display: flex; flex-direction: column; gap: 6px;
  margin: 12px 0 0;
  max-height: 50vh; overflow: auto;
}
.xhs-cm-row {
  display: block; width: 100%;
  text-align: left; padding: 10px 14px;
  border: 1px solid #E5E7EB; border-radius: 8px;
  background: #F9FAFB; cursor: pointer; font-size: 14px;
  transition: background .12s, border-color .12s, color .12s;
  color: var(--text);  /* 覆盖全局 button color:#fff，否则白底上看不见字 */
}
.xhs-cm-row:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.xhs-cm-row.selected {
  background: var(--brand-soft); border-color: var(--brand); color: var(--brand);
  font-weight: 600;
}
.xhs-cm-row .muted { font-size: 12px; margin-left: 4px; }
button.primary:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 二级菜单（子菜单） ---------- */
/* 行尾区：展开箭头 + 动作按钮统一靠右（2026-09-14 加） */
.nav-tail { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav-tail .nav-caret { margin-left: 0; }

.nav-actions { display: flex; align-items: center; gap: 2px; }
.nav-action {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0;
  border: none; border-radius: 6px;
  background: transparent; color: inherit;
  opacity: .5; cursor: pointer;
  transition: background .12s, opacity .12s, color .12s;
}
.nav-action svg { width: 15px; height: 15px; }
.nav-action:hover { opacity: 1; background: rgba(0, 0, 0, .06); color: var(--brand); }
.nav-action:active { background: rgba(0, 0, 0, .1); }

.nav-caret {
  margin-left: auto;
  width: 14px; height: 14px; flex: 0 0 14px;
  display: flex; opacity: .55;
  transition: transform .15s ease;
}
.nav-caret svg { width: 14px; height: 14px; }
.nav-caret.open { transform: rotate(90deg); opacity: .9; }

.nav-sub { padding: 2px 0 6px; }
/* 空容器模块的占位提示（如资源中心还没添加任何资源时展开） */
.nav-empty { padding: 6px 10px 6px 36px; font-size: 12.5px; color: var(--text-3); }
.nav-sub-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 36px;
  margin-bottom: 2px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  cursor: pointer; color: var(--text-2); font-size: 13px;
  transition: background .12s, color .12s;
  user-select: none;
}
.nav-sub-item:hover { background: #F4F5F7; color: var(--text); }
.nav-sub-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  border-left-color: transparent;
  font-weight: 500;
}

/* 三级菜单缩进（2026-09-06 加）——例如「对标笔记 ▸ 分类」中的分类项 */
.nav-sub--deep { padding: 0; }
/* 三级分组展开但无子项时的占位提示（如「对标笔记」还没建分类，2026-09-15 加） */
.nav-empty--deep { padding-left: 54px; }
.nav-sub-item--deep {
  padding-left: 54px;
  font-size: 12.5px;
}

/* 子菜单项「⋯」更多操作按钮（2026-09-14 加）：资源中心资源重命名/删除入口，靠右对齐 */
.nav-more {
  margin-left: auto;
  width: 22px; height: 22px; flex: 0 0 22px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px; background: transparent; color: inherit;
  opacity: .45; cursor: pointer;
  transition: background .12s, opacity .12s, color .12s;
  padding: 0;
}
.nav-sub-item:hover .nav-more { opacity: .8; }
.nav-more:hover { opacity: 1; background: rgba(0, 0, 0, .06); color: var(--brand); }
.nav-more svg { width: 16px; height: 16px; }

/* 浮层菜单（挂到 body，避免侧边栏 overflow 裁切） */
.nav-menu {
  position: fixed; z-index: 80; min-width: 132px;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 5px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .16);
}
.nav-menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 7px; cursor: pointer;
  font-size: 13px; color: var(--text);
}
.nav-menu-item:hover { background: #F4F5F7; }
.nav-menu-item.danger { color: #d93636; }
.nav-menu-item.danger:hover { background: #fff5f5; }

/* 重命名弹窗（与「添加资源」弹窗风格一致） */
.nav-rename-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center; z-index: 70; }
.nav-rename-box { background: #fff; border-radius: 14px; width: 420px; max-width: 92vw; padding: 22px; }
.nav-rename-head { display: flex; align-items: center; justify-content: space-between; }
.nav-rename-head h3 { margin: 0 0 4px; font-size: 17px; }
.nav-rename-x { background: none; border: none; font-size: 18px; line-height: 1;
  color: #999; cursor: pointer; padding: 0 4px; border-radius: 6px; }
.nav-rename-x:hover { background: #f1f2f4; color: #333; }
.nav-rename-field { margin: 14px 0 6px; }
.nav-rename-field label { display: block; font-size: 13px; margin-bottom: 5px; color: #444; }
.nav-rename-field input { width: 100%; box-sizing: border-box; padding: 9px 11px;
  border: 1px solid #e2e2e8; border-radius: 8px; font-size: 14px; font-family: inherit; }
.nav-rename-field input:focus { border-color: #ff2e4d; outline: none; }
.nav-rename-msg { font-size: 13px; margin: 6px 0; min-height: 16px; }
.nav-rename-msg.ok { color: #10a37f; } .nav-rename-msg.err { color: #d93636; }
.nav-rename-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
button.xhs-primary { background: #ff2e4d; color: #fff; border: none; border-radius: 8px; padding: 9px 16px; cursor: pointer; font-size: 14px; }
button.xhs-ghost { background: #fff; color: #444; border: 1px solid #ddd; border-radius: 8px; padding: 9px 16px; cursor: pointer; font-size: 14px; }
button.xhs-ghost:hover { border-color: #ff2e4d; color: #ff2e4d; }

/* ---------- 笔记筛选 / 对标笔记 ---------- */
.xhs-textarea {
  width: 100%;
  min-height: 52px;
  max-height: 220px;
  border: 1px solid #D6D9DE;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.7;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  outline: none;
  resize: vertical;
  color: var(--text);
  background: #fff;
}
.xhs-textarea:focus { border-color: var(--brand); }
/* 输入行：文本框 + 解析按钮同一行，按钮靠右；压缩顶部占用，结果区交给 flex 撑满 */
.xhs-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 6px;
}
.xhs-input-row .xhs-textarea { flex: 1; min-width: 0; }
.xhs-parse-btn {
  flex: 0 0 auto;
  align-self: stretch;
  min-width: 76px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
}
.xhs-msg-row { min-height: 18px; margin-bottom: 8px; }

.xhs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.xhs-table th, .xhs-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.xhs-table thead th {
  background: #F7F8FA;
  color: var(--text-2);
  font-weight: 600;
  font-size: 12.5px;
}
/* 可排序表头 */
.xhs-table th.xhs-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.xhs-table th.xhs-sortable:hover { color: var(--brand); background: #F0F1F3; }
.xhs-table th.xhs-sortable--on { color: var(--brand); }
.xhs-table .xhs-sort-arrow {
  display: inline-block;
  margin-left: 3px;
  font-size: 10px;
  color: var(--text-3);
  vertical-align: middle;
}
.xhs-table th.xhs-sortable--on .xhs-sort-arrow { color: var(--brand); }
.xhs-table tbody tr:last-child td { border-bottom: none; }
.xhs-table tbody tr:hover { background: #FAFBFC; }
.xhs-table.xhs-table--lib th:nth-child(1),
.xhs-table.xhs-table--lib td:nth-child(1) { width: 38px; text-align: center; padding-left: 4px; padding-right: 4px; }
.xhs-table.xhs-table--lib th:nth-child(2),
.xhs-table.xhs-table--lib td:nth-child(2) { width: 64px; }
.xhs-chk { width: 15px; height: 15px; cursor: pointer; vertical-align: middle; }
/* 搜索/解析结果区的复选框列：与对标笔记对齐——首列窄且居中 */
.xhs-table:not(.xhs-table--lib) th.xhs-chk-th,
.xhs-table:not(.xhs-table--lib) td.xhs-chk-td {
  width: 38px; min-width: 38px; max-width: 38px;
  text-align: center; padding-left: 4px; padding-right: 4px;
}

.xhs-thumb {
  width: 48px; height: 48px; border-radius: 6px; object-fit: cover;
  background: #F0F1F3; display: block; flex: 0 0 48px;
}
.xhs-thumb--empty { border: 1px dashed var(--border); }

.xhs-title { max-width: 360px; }
.xhs-num { white-space: nowrap; color: var(--text-2); font-size: 12.5px; line-height: 1.7; }
.xhs-fail { color: var(--text-3); }
.xhs-fail .err { color: #DC2626; }
.xhs-done { opacity: .45; }
/* 行内「入库」小按钮：紧凑版 ghost */
.xhs-save-row { padding: 4px 12px; font-size: 12.5px; }
.xhs-save-row:disabled { opacity: .7; cursor: default; }

/* 笔记详情预览弹窗（左图右文，复刻小红书详情页布局） */
.note-detail-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.note-detail {
  background: #fff; border-radius: 12px;
  width: 880px; max-width: 94vw; height: 84vh; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
  position: relative;
}
.note-detail-close {
  position: absolute; top: 10px; right: 14px;
  width: 28px; height: 28px; line-height: 26px; text-align: center;
  border-radius: 50%; cursor: pointer; color: var(--text-3);
  font-size: 22px; user-select: none; z-index: 2;
  background: rgba(255,255,255,.85); transition: background .15s;
}
.note-detail-close:hover { background: #f1f1f1; color: var(--text); }
.note-detail-body {
  display: flex; flex: 1 1 auto; min-height: 0;
}
.note-detail-img {
  flex: 0 0 360px; max-width: 360px;
  background: #fff; display: flex; flex-direction: column;
  padding: 8px 0; box-sizing: border-box;  /* 上下边沿留少量间隙 */
  border-right: 1px solid var(--border-soft);
}
/* 主图功能区：固定尺寸（弹窗固定84vh − 缩略图区 − 间隙后铺满中间区域）。
   图片只在区内等比缩放居中——长图自动同比例缩小，任何比例都不会漂移或出区。 */
.note-detail-img-stage {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.note-detail-img-stage img {
  max-width: 100%; max-height: 100%; display: block;
}
.note-detail-img-fallback {
  color: #aaa; font-size: 13px; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 200px;
}
.note-detail-type-badge {
  position: absolute; left: 10px; top: 10px;
  background: rgba(0,0,0,.6); color: #fff; font-size: 11px;
  padding: 2px 8px; border-radius: 4px; line-height: 1.5;
}
/* 缩略图功能区：固定尺寸（72px 高），位置恒定不随主图比例漂移 */
.note-detail-thumbs {
  height: 72px; flex: 0 0 72px; box-sizing: border-box;
  display: flex; gap: 6px; padding: 8px; overflow-x: auto;
  background: #fff; border-top: 1px solid var(--border-soft);
  align-items: center;
  scrollbar-width: thin;
}
.note-detail-thumb {
  width: 48px; height: 48px; object-fit: cover; border-radius: 4px;
  cursor: pointer; border: 2px solid transparent; flex: 0 0 auto;
  opacity: .75; transition: opacity .15s;
}
.note-detail-thumb:hover { opacity: 1; }
.note-detail-thumb--on { border-color: #FF2442; opacity: 1; }
.note-detail-info {
  flex: 1 1 auto; min-width: 0; min-height: 0; padding: 22px 22px 18px;
  display: flex; flex-direction: column;
}
/* 固定头部：标题/作者/原文按钮 始终可见，不随内容滚动 */
.note-detail-head {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 10px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border-soft);
}
/* 滚动区：正文/标签/数据/评论，弹窗固定高度后在这里上下滚动 */
.note-detail-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  padding-top: 12px; scrollbar-width: thin;
}
/* 标题右侧预留空间，避免与右上角「在新标签打开原文」按钮重叠 */
.note-detail-title {
  font-size: 18px; font-weight: 600; line-height: 1.45; color: var(--text);
  padding-right: 180px;
}
.note-detail-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  color: var(--text-2); font-size: 12.5px;
}
.note-detail-desc {
  font-size: 14px; line-height: 1.75; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.note-detail-desc--empty { color: var(--text-3); font-style: italic; }
.note-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.note-detail-tag {
  background: #F2F3F5; color: var(--brand);
  padding: 3px 10px; border-radius: 999px; font-size: 12px;
}
.xhs-tag-pill {
  background: #FFF0F3; color: #ff2e4d;
  padding: 4px 12px; border-radius: 6px; font-size: 13px;
  cursor: default;
}
.note-detail-stats {
  display: flex; gap: 18px;
  color: var(--text-2); font-size: 13px;
  padding-top: 8px; border-top: 1px solid var(--border-soft);
}
.note-detail-actions {
  margin-top: auto; padding-top: 12px;
  display: flex; align-items: center; justify-content: flex-end;
  gap: 12px; flex-wrap: wrap;
}
/* 原文按钮固定在弹窗右上角（关闭×左侧），不随内容滚动 */
.note-detail-original {
  position: absolute; top: 12px; right: 52px; z-index: 3;
  color: var(--brand); text-decoration: none; font-size: 13px;
  padding: 5px 14px; border: 1px solid var(--brand); border-radius: 6px;
  background: rgba(255,255,255,.92); transition: background .15s;
  white-space: nowrap;
}
.note-detail-original:hover { background: rgba(255,36,66,.06); }

/* 评论区（方案A：弹窗渲染入库快照，秒开免调接口） */
.note-detail-comments {
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  margin-top: 4px;
}
.note-detail-comments-title {
  font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 12px;
}
.note-detail-comments-list {
  display: flex; flex-direction: column; gap: 14px;
}
.note-detail-comment {
  display: flex; gap: 10px; align-items: flex-start;
}
.note-detail-comment-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  flex: 0 0 28px; background: #f0f0f0; object-fit: cover;
}
.note-detail-comment-avatar--empty { display: block; }
.note-detail-comment-body {
  flex: 1 1 auto; min-width: 0;
}
.note-detail-comment-head {
  display: flex; gap: 10px; align-items: center;
  font-size: 12.5px; color: var(--text-2); margin-bottom: 3px;
}
.note-detail-comment-author {
  color: var(--text); font-weight: 500;
}
.note-detail-comment-content {
  font-size: 13.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
  color: var(--text);
}
.note-detail-sub-comments {
  margin-top: 8px; padding-left: 8px;
  border-left: 2px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 10px;
}
.note-detail-comments-empty {
  text-align: center; padding: 20px 12px;
  color: var(--text-3); font-size: 13px; line-height: 1.7;
}
.note-detail-comments-empty .muted { font-size: 12px; }
.note-detail-comments-foot {
  font-size: 11.5px; text-align: right; margin-top: 8px;
}
/* 响应式窄屏：图墙改上、信息改下 */
@media (max-width: 720px) {
  .note-detail-body { flex-direction: column; }
  .note-detail-img { flex: 0 0 auto; max-width: none; height: 280px; }
}

.xhs-status {
  display: inline-block; padding: 2px 9px; border-radius: 12px;
  font-size: 12px; background: #F0F2F5; color: var(--text-2);
}
.xhs-status--pending   { background: #FFF4E5; color: var(--warn); }
.xhs-status--analyzed  { background: #E6F7ED; color: var(--ok); }
.xhs-status--created   { background: var(--brand-soft); color: var(--brand); }
.xhs-status--published { background: #EDE9FE; color: #6D28D9; }
.xhs-status--dropped   { background: #F1F2F4; color: var(--text-3); }

.xhs-ops { white-space: nowrap; }
.xhs-mini {
  border: 1px solid var(--border); background: #fff; color: var(--brand);
  border-radius: 6px; padding: 4px 10px; font-size: 12.5px; cursor: pointer;
  margin-right: 6px; text-decoration: none; display: inline-block;
}
.xhs-mini:hover { border-color: var(--brand); }
.xhs-mini--link { color: var(--text-2); }
.xhs-mini--del { color: #DC2626; border-color: #f0c0c0; }
.xhs-mini--del:hover { background: #FEF2F2; border-color: #DC2626; }
/* 「打开」按钮：原文列较窄，禁止文字换行成上下结构 */
.xhs-open-row { white-space: nowrap; }
/* 入库分类下拉（动态子菜单） */
.xhs-cat-sel { font-size: 12.5px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); max-width: 150px; }
/* 分类管理模态里的分类行 */
.xhs-cat-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }

/* 占位页卡片（资源中心 / MCP配置） */
.xhs-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.xhs-card-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; color: var(--text); }
.xhs-card-list { margin: 0; padding-left: 18px; line-height: 1.9; font-size: 13.5px; color: var(--text-2); }
.xhs-card-list code { background: #F3F4F6; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; color: var(--brand); }
.xhs-tip { font-size: 13px; color: var(--text-3); background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 10px 14px; border-radius: 6px; }
.xhs-tip code { background: rgba(255,255,255,.6); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.xhs-warn { font-size: 13px; color: #8a4b00; background: #FFF4E5; border-left: 3px solid #F59E0B; padding: 10px 14px; border-radius: 6px; line-height: 1.6; }
.xhs-warn b { color: #B45309; }
.xhs-placeholder { margin-top: 22px; padding: 48px 20px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; background: #FBFBFC; }
.xhs-placeholder-icon { font-size: 40px; line-height: 1; }
.xhs-placeholder-text { margin-top: 12px; font-size: 15px; font-weight: 600; color: var(--text-2); }

/* ── 账号管理：小红书账号卡片 ── */
.xhs-acct-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px;
}
.xhs-acct-head { display: flex; align-items: center; gap: 14px; }
.xhs-acct-logo {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, #FF2442, #FF6A8A); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.xhs-acct-meta { flex: 1 1 auto; min-width: 0; }
.xhs-acct-name { font-size: 15px; font-weight: 600; color: var(--text); }
.xhs-acct-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.xhs-acct-badge {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 600; padding: 5px 11px;
  border-radius: 999px; white-space: nowrap;
}
.xhs-acct-badge.is-on  { background: #E7F6EC; color: #1E7E34; }
.xhs-acct-badge.is-off { background: #FDECEC; color: #C0392B; }
.xhs-acct-actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto; flex-shrink: 0;
}
.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn-disabled { opacity: 0.55; cursor: default; }
.xhs-acct-msg { font-size: 13px; margin-top: 12px; min-height: 0; line-height: 1.6; }
.xhs-acct-msg--info  { color: var(--brand); }
.xhs-acct-msg--warn  { color: #B26A00; }
.xhs-acct-msg--error { color: #C0392B; }
.xhs-acct-msg:empty { display: none; }
/* 清除登录态：armed 状态（二次确认）高亮警示 */
button.ghost.danger-link { color: #C0392B; border-color: #E7C4C4; }
button.ghost.danger-link.armed { background: #C0392B; color: #fff; border-color: #C0392B; font-weight: 600; }

/* ── 账号管理：平台分类标签 ── */
.platform-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.platform-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
  white-space: nowrap;
}
.platform-tab:hover { color: var(--text); }
.platform-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

/* 校招信息表：飞书配置弹窗表单 */
.xhs-cm-box .xhs-cr-form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.xhs-cm-box .xhs-cr-form label { font-size: 13px; color: var(--text-2); margin-top: 4px; font-weight: 500; display: block; }
.xhs-cm-box .xhs-cr-form .xhs-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; margin: 0; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: #fff; color: var(--text);
  transition: border-color .15s;
}
.xhs-cm-box .xhs-cr-form .xhs-input::placeholder { color: #94A3B8; }
.xhs-cm-box .xhs-cr-form .xhs-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 46, 77, .12); }
.xhs-cr-cfg-msg { color: #C0392B; font-size: 13px; margin-top: 4px; min-height: 16px; }
/* 多维表格链接输入框 + 「解析」按钮横排（解析按钮贴右，高度与输入框对齐） */
.xhs-cr-url-row { display: flex; align-items: stretch; gap: 8px; }
.xhs-cr-url-row .xhs-cr-input-wrap { flex: 1; min-width: 0; }
.xhs-cr-parse-btn { flex: 0 0 auto; align-self: stretch; padding: 0 18px; white-space: nowrap; line-height: 1; }

/* 输入框尾部的「清除 ✕」按钮（嵌入输入框右内侧，点击清空该框内容） */
.xhs-cr-field, .xhs-cr-input-wrap { position: relative; }
.xhs-cr-field .xhs-input, .xhs-cr-input-wrap .xhs-input { padding-right: 38px; }
.xhs-cr-input-wrap { display: flex; }
.xhs-cr-input-wrap .xhs-input { width: 100%; flex: 1; }
.xhs-cr-clear {
  position: absolute; top: 0; right: 6px; bottom: 0; width: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: #94A3B8; cursor: pointer;
  font-size: 14px; line-height: 1; border-radius: 6px; padding: 0;
}
.xhs-cr-clear:hover { color: #E5484D; background: #FFF0F0; }

/* ── 校招信息表（资源中心子菜单，定制模块） ── */
.xhs-cr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.xhs-cr-title { font-size: 19px; font-weight: 700; color: var(--text); }
.xhs-cr-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.xhs-cr-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.xhs-cr-key { color: #B26A00; font-weight: 600; }   /* 关键字段（公司/岗位/截止日期）橙色突出 */
.xhs-cr-urgent { background: #FDECEC !important; }   /* 临近截止整行标红提醒 */
.xhs-cr-urgent td.xhs-cr-key { color: #C0392B; }
.xhs-cr-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 4px; }
.xhs-cr-pager .muted { font-size: 13px; }
.xhs-cr-selected {
  position: sticky; bottom: 12px; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 14px; padding: 11px 16px;
  background: var(--brand); color: #fff; border-radius: 10px; box-shadow: 0 6px 18px rgba(255, 46, 77, .28);
}
.xhs-cr-selected #xhs-cr-selected-text { font-size: 14px; font-weight: 600; }
.xhs-cr-selected .primary { background: #fff; color: var(--brand); border-color: #fff; }
.xhs-cr-material {
  width: 100%; min-height: 180px; margin-top: 10px; padding: 12px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical;
}

/* 校招网申信息 · 上功能区双卡布局 */
.xhs-cr-top { display: flex; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.xhs-cr-card {
  flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column;
}
.xhs-cr-card-title { font-size: 14px; font-weight: 500; color: var(--brand); }
.xhs-cr-card-sep { height: 1px; background: var(--border-soft); margin: 10px 0 14px; }
.xhs-cr-card-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 飞书多维表格按钮与前面的「配置+状态徽标」拉开间距，形成功能分组（类选择器，兼容实例命名空间） */
.xhs-cr-open-fs { margin-left: 16px; }
.xhs-cr-card-foot { margin-top: auto; padding-top: 12px; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.xhs-cr-label { font-size: 13px; color: var(--text-2); }
.xhs-cr-badge {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 15px; font-size: 12px; font-weight: 500;
}
.xhs-cr-badge.ok { background: #E7F6EC; color: var(--ok); }
.xhs-cr-badge.no { background: #F1EFE8; color: #5F5E5A; }
.xhs-cr-badge.invalid { background: #FCEBE9; color: #C0392B; }
.xhs-cr-badge.warn { background: #FFF4E5; color: var(--warn); }
.xhs-select {
  height: 34px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px;
  font-size: 13px; background: #fff; color: var(--text);
}

/* 校招网申信息 · 数据说明卡片（方案 A：不入库不展示） */
.xhs-cr-note {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; margin-top: 4px;
}
.xhs-cr-note p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--text-2); }
.xhs-cr-note-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.xhs-cr-card-row .ok { color: var(--ok); font-size: 13px; }
.xhs-cr-card-row .err { color: #C0392B; font-size: 13px; }
.xhs-cr-card-row .warn { color: var(--warn); font-size: 13px; }
@media (max-width: 880px) {
  .xhs-cr-top { flex-direction: column; }
}

/* ============ 全局账号系统（2026-09-15） ============
   强调色沿用平台主操作色 #ff2e4d（与 xhs-primary / 输入框聚焦一致） */
:root { --wb-accent: #ff2e4d; }

.topbar-side { display: flex; align-items: center; gap: 14px; }

/* 右上角：未登录的「登录/注册」文字按钮 */
.wb-auth-slot { display: inline-flex; align-items: center; }
.wb-login-btn {
  background: var(--wb-accent); color: #fff; border: none;
  border-radius: 8px; padding: 7px 16px; font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: filter .15s;
}
.wb-login-btn:hover { filter: brightness(.94); }

/* 右上角：已登录的账号区 */
.wb-account {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 8px; cursor: pointer; color: var(--text);
}
.wb-account:hover { background: var(--border-soft); }
.wb-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--wb-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.wb-nick { font-size: 13.5px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-caret { font-size: 10px; color: var(--text-3); }

/* 账号下拉菜单 */
.wb-acct-menu {
  position: fixed; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.12);
  padding: 6px; min-width: 140px; z-index: 120;
}
.wb-acct-item {
  padding: 9px 12px; border-radius: 7px; font-size: 13.5px;
  cursor: pointer; color: var(--text);
}
.wb-acct-item:hover { background: var(--border-soft); }
.wb-acct-item.danger { color: #C0392B; }
.wb-acct-item.danger:hover { background: #FDECEC; }

/* 登录/注册 与 修改密码 弹窗 */
.wb-auth-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.wb-auth-box {
  position: relative; background: #fff; border-radius: 14px;
  width: 400px; max-width: 92vw; padding: 24px 26px 26px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.wb-auth-box--sm { width: 380px; }
.wb-auth-x {
  position: absolute; top: 14px; right: 14px; background: none; border: none;
  font-size: 18px; line-height: 1; color: #999; cursor: pointer;
  padding: 4px 6px; border-radius: 6px;
}
.wb-auth-x:hover { background: var(--border-soft); color: #333; }
.wb-auth-head { text-align: center; margin-bottom: 16px; }
.wb-auth-title { font-size: 20px; font-weight: 600; }
.wb-auth-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }

/* 登录/注册 分段切换（选中=红底白字，未选中=红字描边，明确区分） */
.wb-seg {
  display: flex; gap: 0; background: var(--border-soft);
  border-radius: 10px; padding: 4px; margin-bottom: 18px;
}
.wb-seg-btn {
  flex: 1; border: none; background: transparent; padding: 9px 0;
  font-size: 14.5px; border-radius: 7px; cursor: pointer;
  color: var(--text-2); font-weight: 500; transition: all .15s;
}
.wb-seg-btn.active {
  background: var(--wb-accent); color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(255,46,77,.3);
}

.wb-form { display: flex; flex-direction: column; }
.wb-field { margin-bottom: 12px; }
.wb-field label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--text-2); }
.wb-input-wrap { position: relative; display: flex; align-items: center; }
.wb-input-wrap input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; padding-right: 40px;
  border: 1px solid var(--border); border-radius: 9px; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--text);
}
.wb-input-wrap input:focus {
  border-color: var(--wb-accent); outline: none;
  box-shadow: 0 0 0 3px rgba(255,46,77,.12);
}
.wb-eye {
  position: absolute; right: 8px; background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 6px; display: flex; align-items: center; justify-content: center;
}
.wb-eye svg { width: 18px; height: 18px; }
.wb-eye.on { color: var(--wb-accent); }
.wb-err { display: none; color: #C0392B; font-size: 12px; margin-top: 5px; }
.wb-msg { font-size: 13px; min-height: 18px; margin: 2px 0 10px; color: var(--text-3); }
.wb-msg.err { color: #C0392B; }
.wb-submit {
  background: var(--wb-accent); color: #fff; border: none; border-radius: 9px;
  padding: 11px 0; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 4px;
}
.wb-submit:hover { filter: brightness(.95); }

/* 卡密激活：右上角文字按钮 + 弹窗（2026-09-21） */
.wb-cardkey-btn {
  background: none; border: none; padding: 7px 4px;
  font-size: 13.5px; color: var(--text-2); cursor: pointer;
  transition: color .15s;
}
.wb-cardkey-btn:hover { color: var(--wb-accent); }

.wb-ck-box { width: 560px; text-align: left; }
.wb-ck-head { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.wb-ck-notice {
  background: #FFF7F1; border-radius: 10px; padding: 13px 16px;
}
.wb-ck-notice-t { font-size: 14px; font-weight: 600; color: var(--text); }
.wb-ck-notice-s { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.wb-ck-row { display: flex; gap: 10px; margin-top: 14px; }
.wb-ck-row input {
  flex: 1; min-width: 0; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 9px; font-size: 14px;
  font-family: inherit; background: #fff; color: var(--text);
}
.wb-ck-row input:focus {
  border-color: var(--wb-accent); outline: none;
  box-shadow: 0 0 0 3px rgba(255,46,77,.12);
}
.wb-ck-go {
  background: var(--wb-accent); color: #fff; border: none; border-radius: 9px;
  padding: 0 22px; font-size: 14.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: filter .15s;
}
.wb-ck-go:hover { filter: brightness(.94); }
.wb-ck-go:disabled { opacity: .55; cursor: default; }
.wb-ck-hint { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.wb-ck-msg { font-size: 13px; min-height: 18px; margin-top: 4px; color: var(--text-3); }
.wb-ck-msg.err { color: #C0392B; }
.wb-ck-msg.ok { color: #1E9E62; }
.wb-ck-sec { border-top: 1px solid var(--border-soft); margin-top: 10px; padding-top: 14px; }
.wb-ck-sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.wb-ck-sec-t { font-size: 15px; font-weight: 600; }
.wb-ck-sec-n { font-size: 12.5px; color: var(--text-3); }
.wb-ck-sec-s { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.wb-ck-records { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.wb-ck-empty {
  border: 1px dashed var(--border); border-radius: 10px; background: #FAFAFA;
  padding: 26px 0; text-align: center;
}
.wb-ck-empty-t { font-size: 14px; font-weight: 600; color: var(--text); }
.wb-ck-empty-s { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.wb-ck-item {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 14px;
}
.wb-ck-item-p { font-size: 13.5px; font-weight: 600; color: var(--text); }
.wb-ck-item-d {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  background: #FFF0F3; color: var(--wb-accent); border-radius: 20px;
  font-size: 11.5px; font-weight: 500;
}
.wb-ck-item-c { font-size: 12px; color: var(--text-3); margin-top: 2px; letter-spacing: .5px; }
.wb-ck-item-t { font-size: 12px; color: var(--text-3); white-space: nowrap; margin-left: 12px; }

/* 功能管理：不可用的功能置灰（禁用 / 需会员）。2026-09-20
   置灰只做视觉提示，真正的门禁在后端接口层，两者缺一不可。 */
.nav-item.nav-locked,
.nav-sub-item.nav-locked { opacity: .42; cursor: not-allowed; }
.nav-item.nav-locked:hover,
.nav-sub-item.nav-locked:hover { background: transparent; }
