/**
 * GEO 文章生成工作台 · 前端样式
 * =================================
 * 视觉参照 SaaS 后台布局（参考图）：
 *   左侧固定导航（可展开子项）+ 可折叠二级栏 + 顶部栏 + 面包屑 + 卡片式内容区
 *   选中态：黑色药丸高亮（对齐参考图）
 *
 * ⚠️ 本文件只管布局与视觉，不含业务逻辑。
 * ⚠️ 禁用表述（§10.6）：界面不得出现「符合国家标准 / 合规认证 / 官方认可」等字样。
 */

:root {
  --nav-w: 278px;          /* 一级导航宽（容纳 46px LOGO + 15px 两行系统名） */
  --nav-w-collapsed: 64px; /* 折叠后 */
  --top-h: 56px;           /* 顶部栏高 */
  --crumb-h: 44px;         /* 面包屑高 */

  /* ══ v3.0 视觉基线：纸感中性 + 森林绿 ══════════════════════════
     中性阶统一为 sage 系（带绿调），品牌色为森林绿。
     三条硬规则：不用纯白/纯黑、边框一律发丝级、阴影一律向墨绿偏色。
     ═════════════════════════════════════════════════════════════ */
  --bg: #f4f6f2;           /* 页面底（v3.0.3 提亮，降低灰感）*/
  --surface: #ffffff;      /* 卡片：纯白（可读性优先，靠边框分层）*/
  --bg-1: #f3f5f1;         /* 内嵌块：代码、说明 */
  --bg-2: #f7f8f5;         /* 更浅：表单/条目容器 */
  --accent: #2f6b4f;       /* 品牌：森林绿 */
  --accent-2: #c08a3e;     /* 次要：琥珀铜 */
  --line: rgba(20,32,26,.10);
  --line-soft: rgba(20,32,26,.06);
  --txt: #0f1a14;          /* ink-1（v3.0.3 加深）*/
  --txt-2: #2b3a32;        /* ink-2 正文（加深）*/
  --txt-3: #45564c;        /* ink-3 标签（v3.0.3 加深到 ≈7:1）*/

  --sel: #234e3a;          /* 主按钮/选中（比 accent 深一档，避免按钮与链接同色）*/
  --sel-txt: #ffffff;

  /* 语义色：与品牌绿分离，互不抢识别 */
  --block: #c0453c;  --block-bg: #fbf2f1; --block-line: rgba(192,69,60,.22);
  --ok: #2c7a8c;     --ok-bg: #eef6f7;    --ok-line: rgba(44,122,140,.22);
  --warn: #a9740f;   --warn-bg: #fbf5e6;  --warn-line: rgba(169,116,15,.22);
  --manual: #446a83; --manual-bg: #eef3f7; --manual-line: rgba(68,106,131,.20);
  --sug: #6f5c99;    --sug-bg: #f5f2fa;   --sug-line: rgba(111,92,153,.20);

  --r: 16px;        /* 卡片 */
  --r-sm: 10px;     /* 控件 */

  /* ── v2.3.0 视觉基线（参考图风格）────────────────────────────
     深色侧栏专用变量 —— **不改动全局文字色**，
     避免 17 个路由的业务页面全部返工。
     ───────────────────────────────────────────────────────── */
  /* ── 侧栏：墨绿炭（v3.0 去掉蓝紫渐变）─────────────────────────
     侧栏是品牌的第一屏，用「近黑墨绿」而不是蓝黑；
     选中态改为半透明底 + 左侧 2px 品牌竖条（editorial 手法，不用药丸）。
     ───────────────────────────────────────────────────────── */
  --nav-bg: linear-gradient(180deg, #141f1a 0%, #18241d 60%, #1b2a22 100%);
  --nav-bg-solid: #16211b;
  --nav-line: rgba(255,255,255,.07);
  --nav-txt: #9fb0a6;
  --nav-txt-hover: #e8efe9;
  --nav-txt-on: #ffffff;
  --nav-group: #6d8177;
  --nav-hover: rgba(255,255,255,.06);
  --nav-sel: rgba(255,255,255,.10);
  --nav-shadow: 0 1px 0 rgba(255,255,255,.04) inset;

  /* 统计卡（v3.0：不再使用多色渐变，统一为深绿实色 + 白色卡）*/
  --grad-blue: #234e3a;
  --grad-blue-2: #1d4433;
  --grad-cyan: #235a4a;
  --grad-purple: #3a4a3f;
  --grad-teal: #2f6b4f;

  /* 卡片浮起感（v3.0：阴影向墨绿偏色，不用纯黑）*/
  --card-shadow: 0 1px 2px rgba(20,32,26,.04), 0 10px 26px -18px rgba(20,32,26,.28);

  /* v2.3.2：侧栏页脚与主区页脚的**统一高度**（两侧顶边对齐成一条线） */
  --foot-h: 78px;
  --card-shadow-hover: 0 2px 6px rgba(20,32,26,.05), 0 16px 34px -20px rgba(20,32,26,.34);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--txt); background: var(--bg);
  /* v3.0.3：移除 -webkit-font-smoothing: antialiased —— Windows/Chrome 下会让中文笔画变细、发灰 */
  text-rendering: optimizeLegibility;
}
body { overflow: hidden; }

/* ══════════ 布局骨架 ══════════ */
.app {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  height: 100vh;
  transition: grid-template-columns .2s ease;
}
.app.nav-collapsed { grid-template-columns: var(--nav-w-collapsed) 1fr; }

/* ══════════ 左侧导航 ══════════ */
.nav {
  /* v2.3.0：深色侧栏（参考图风格）—— 渐变底 + 右侧投影分层 */
  background: var(--nav-bg);
  background-color: var(--nav-bg-solid);
  border-right: none;
  box-shadow: var(--nav-shadow);
  display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
  color: var(--nav-txt);
}
.nav-head {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 11px;
  padding: 13px 13px;
  border-bottom: 1px solid var(--nav-line);
  min-width: 0;
}
/* LOGO：原 500×500 正方形，缩放到 46px 保持清晰 */
.nav-logo-img {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(255,255,255,.96);
  box-shadow: 0 3px 10px rgba(0,0,0,.28);
}
.nav-brand { min-width: 0; flex: 1; }
/* 系统全名：分两行、字号放大到 15px（原 13.5px） */
.nav-title {
  font-size: 14.5px; font-weight: 700; line-height: 1.32;
  color: #fff; letter-spacing: -.1px;         /* v2.3.0：深底上用白字 */
  white-space: nowrap;
}
.nav-scroll { flex: 1; overflow-y: auto; padding: 8px 10px 14px; }
/* v2.3.2：侧栏滚动条**同色** ——
   全局滚动条是浅灰（#d5d9de），在深色侧栏上非常扎眼（东哥反馈）。
   这里单独给深色侧栏一套：半透明白滑块 + 透明轨道。 */
.nav-scroll { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
.nav-scroll::-webkit-scrollbar { width: 8px; }
.nav-scroll::-webkit-scrollbar-track { background: transparent; }
.nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.20);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.nav-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.34);
  background-clip: content-box;
}
.nav-group-label {
  /* v2.3.0：分组标签在深底上用弱化蓝灰，并加字距强化"分组"感 */
  font-size: 11.5px; color: var(--nav-group);
  letter-spacing: .8px; font-weight: 600;
  padding: 14px 9px 6px; white-space: nowrap;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--nav-txt); cursor: pointer; user-select: none;
  font-size: 13px; white-space: nowrap;
  border: none; background: none; width: 100%; text-align: left;
  font-family: inherit;
  transition: background .14s ease, color .14s ease, transform .14s ease;
}
/* v2.3.0：深底上的 hover 用半透明白（不能用 --line-soft，那是浅灰） */
.nav-item:hover { background: var(--nav-hover); color: var(--nav-txt-hover); }
/* 选中：亮蓝渐变药丸（参考图的核心视觉） */
.nav-item.active {
  background: var(--nav-sel); color: var(--nav-txt-on);
  font-weight: 550;
  box-shadow: 0 3px 10px rgba(47,107,255,.32);
}
.nav-item.active .nav-ico { opacity: 1; }
/* v2.4.0：.nav-ico 的完整定义已移到文件末尾「统一图标规范」区
   （那里含尺寸槽位/状态色/折叠态对比度），此处不再重复定义。 */
/* v2.3.0：**父分组里有选中项**时父项也亮（层级感）——
   用淡蓝底 + 白字，不与子项的实心药丸混淆。 */
.nav-item.has-active {
  background: rgba(47,107,255,.16);
  color: #dce6ff;
  font-weight: 550;
}
.nav-item.has-active .nav-ico { opacity: 1; color: #7ea6ff; }
.nav-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; }
/* ── 侧边栏分组展开箭头（v2.1.3 优化）──────────────────────────
   原为文字字符「▶」（9px、opacity .55）→ 视觉上发虚、与文字基线不齐。
   改为 CSS 绘制的 chevron：尺寸可控、居中精准、悬停更清晰。
   ──────────────────────────────────────────────────────────────── */
.nav-caret {
  /* v2.4.0：原这里内联了一份**重复的 SVG data-URI**（stroke-width=3，与图标库
     1.75 不一致）→ 改为直接用图标库的 chevronRight（HTML 里是
     <span class="nav-caret" data-ic="chevronRight"></span>），
     颜色自动跟随 currentColor，旋转/展开逻辑不变。 */
  flex-shrink: 0; margin-left: auto;
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: .55;
  transition: transform .22s cubic-bezier(.4,0,.2,1), opacity .15s ease;
}
.nav-caret > svg { display: block; width: 14px; height: 14px; }
/* v2.4.0：图标库 chevronRight 本身朝右 → 未展开 rotate(0) 朝右 ▶、展开转 90° 朝下 ▼ */
.nav-item:hover .nav-caret { opacity: .85; }
/* 分组展开时箭头转向下（配合 .nav-sub 的 max-height 过渡）
   ⚠️ v2.4.0：图标库里的 chevronRight **本身就朝右**（原 data-URI 版朝左要转 180°）
      → 现在收起时 0°、展开时转 90° 朝下 */
.nav-item.open .nav-caret,
.nav-item[aria-expanded="true"] .nav-caret {
  transform: rotate(90deg);
  opacity: .8;
}
.nav-sub {
  overflow: hidden; max-height: 0;
  transition: max-height .2s ease;
}
.nav-sub.open { max-height: 260px; }
.nav-sub .nav-item { padding-left: 27px; font-size: 12.5px; }
/* v2.3.0：子项在深底上略微左缩进对齐 + 竖线引导 */
.nav-sub { position: relative; }
.nav-sub::before {
  content: ''; position: absolute; left: 17px; top: 3px; bottom: 3px;
  width: 1px; background: var(--nav-line);
}

.nav-foot {
  border-top: 1px solid var(--nav-line);
  padding: 11px 12px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 6px;
  /* v2.3.2：与主区页脚**同高**（东哥要求两侧页脚高度统一） */
  min-height: var(--foot-h);
  justify-content: center;
}
.nav-foot-status {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--nav-group);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
/* 版权区：等宽小字 + 弱化色，与整体视觉协调 */
.nav-foot-cr {
  font-size: 11.5px; color: var(--txt-3); letter-spacing: .3px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.nav-foot-cr b { font-weight: 600; color: #7ea6ff; }
/* 署名高亮：加粗 + 主色 + 淡色高亮块，等宽小字环境下也能一眼看到 */
.nav-foot-cr .cr-name {
  display: inline-block;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--accent);
  background: linear-gradient(180deg, rgba(29, 78, 216, .16), rgba(124, 92, 255, .16));
  border: 1px solid rgba(29, 78, 216, .28);
  border-radius: 4px;
  padding: 0 4px;
  margin-left: 1px;
  box-shadow: 0 0 0 2px rgba(29, 78, 216, .05);
}
/* 版本号：紧跟版权行，更弱化 */
.nav-foot-ver {
  font-size: 11.5px; color: #9fb0a6; opacity: 1;   /* 侧栏深底：用亮灰而非透明度压暗 */
  font-family: ui-monospace, Menlo, Consolas, monospace;
  padding-left: 1px;
}
.nav-foot-ver b { font-weight: 500; color: #cfd8ee; }

/* 折叠态：保留 LOGO（缩小），隐藏全部文字 */
.nav-collapsed .nav-title,
.nav-collapsed .nav-txt,
.nav-collapsed .nav-caret,
.nav-collapsed .nav-group-label,
.nav-collapsed .nav-foot-status { display: none; }
.nav-collapsed .nav-brand { display: none; }
.nav-collapsed .nav-head { justify-content: center; padding: 11px 0; }
.nav-collapsed .nav-logo-img { width: 38px; height: 38px; border-radius: 9px; }
.nav-collapsed .nav-item { justify-content: center; padding: 9px 0; }
/* v2.4.0：折叠态的图标对比度规则已并入文件末尾「统一图标规范」区 → 此处不重复定义 */
.nav-collapsed .nav-sub { display: none !important; }
.nav-collapsed .nav-scroll { padding: 8px 8px; }
.nav-collapsed .nav-foot { align-items: center; padding: 8px 0 9px; }
.nav-collapsed .nav-foot-cr { font-size: 11.5px; letter-spacing: 0; text-align: center; line-height: 1.25; }
.nav-collapsed .nav-foot-cr .cr-name { padding: 0 3px; border-radius: 3px; margin-left: 0; }
.nav-collapsed .nav-foot-ver { display: none; }

/* 折叠按钮 */
/* ── 侧边栏折叠按钮（v2.1.3 重设计）──────────────────────────
   v2.1.2 及之前：position:absolute; left:var(--nav-w); top:13px
     → ① top:13px 正好压住顶栏「标准合规项」提示条
     → ② 侧边栏收起后 --nav-w 不变（折叠走的是 --nav-w-collapsed），
        按钮 left 仍是展开宽度 → **收起后停在原位**
   v2.1.3：改为 **topbar 内的普通 flex 项**
     → 由 flex 自然排布，永不遮挡；随侧边栏宽度自动跟随；
        折叠时用箭头旋转表达状态（.nav-collapsed .nav-toggle-ico）。
   ──────────────────────────────────────────────────────────────── */
.nav-toggle {
  flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; color: var(--txt-2);
  display: grid; place-items: center;
  box-shadow: 0 1px 2px rgba(31,35,40,.05);
  transition: background .15s ease, border-color .15s ease,
              color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.nav-toggle:hover {
  background: var(--line-soft);
  border-color: #d8dbdf;
  color: var(--txt);
  box-shadow: 0 2px 6px rgba(31,35,40,.09);
}
.nav-toggle:active { transform: scale(.94); }
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* 箭头：用 CSS 画（比字符更居中、更清晰） */
.nav-toggle-ico {
  /* v2.4.0：原这里内联了一份**重复的 SVG data-URI**（chevron，stroke-width=3，
     与图标库 1.75 不一致）→ 改为直接用图标库的 chevronRight，
     颜色自动跟随 currentColor。
     ⚠️ 旋转方向随之调整：图标库的 chevronRight **本身朝右**（原 data-URI 版朝左）
        → 展开态（侧栏在左）应朝左 ◀ = rotate(180deg)
        → 收起态（侧栏收窄）应朝右 ▶ = rotate(0) */
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px;
  transform: rotate(180deg);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.nav-toggle-ico > svg { display: block; width: 15px; height: 15px; }
/* 收起态：箭头朝右，指示「点击展开侧栏」 */
.nav-collapsed .nav-toggle-ico {
  transform: rotate(0deg);
}
.nav-collapsed ~ .nav-toggle { left: var(--nav-w-collapsed); }

/* ══════════ 右侧主体 ══════════ */
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.topbar {
  height: var(--top-h); flex-shrink: 0;
  background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
  /* v2.3.1：搜索/通知浮层的定位参照 */
  position: relative;
}
.topbar .spacer { flex: 1; }
.tagline {
  font-size: 12px; color: var(--txt-3);
  display: flex; align-items: center; gap: 6px;
}
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--txt-3); }

.crumb {
  height: var(--crumb-h); flex-shrink: 0;
  background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px; padding: 0 18px;
  font-size: 12.5px; color: var(--txt-3);
}
.crumb b { color: var(--txt); font-weight: 600; }
.crumb .sepc { opacity: .5; }

.view { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 18px 28px; }
.view-inner { max-width: 1560px; margin: 0 auto; }

/* 页头 */
.page-head { margin-bottom: 14px; }
.page-title { font-size: 18px; font-weight: 660; display: flex; align-items: center; gap: 9px; }
/* v2.4.0：页面标题图标统一 18px（与标题字号配平） */
.page-title .ic { width: 18px; height: 18px; color: var(--txt-2); }
.page-desc { font-size: 12.5px; color: var(--txt-2); margin-top: 3px; }

/* ══════════ 卡片 ══════════ */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 16px; margin-bottom: 14px;
}
.card-head {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 11px; flex-wrap: wrap;
}
.card-title { font-size: 13.5px; font-weight: 620; }
.card-desc { font-size: 12px; color: var(--txt-3); }
.card-head .spacer { flex: 1; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* 指标卡 */
.stat {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 15px; background: var(--surface);
}

/* ── 统计卡自适应网格（v2.4.7）──
   ⚠️ 原来用 .grid-4（CSS Grid）→ 卡片数不是列数的整数倍时，
      **最后一行只放 1-2 张卡，右侧留出一大片空白**
      （稿件库 7 张卡 → 宽屏排 5 列 → 5 + 2，第二行只有 2 张卡）。
   现在改用 flex 换行：每张卡 flex: 1 1 180px
   → 每行自动等分填满，**最后一行也不会留白**。
   ⚠️ 只给统计卡区用（.stat-grid），不动其它 .grid-4
      （表单栅格用 grid 才能对齐字段，flex 会打乱列宽）。 */
.stat-grid {
  display: flex; flex-wrap: wrap; gap: 14px;
}
/* ⚠️ v2.5.1：必须对**所有直接子元素**生效，不能只写 `.stat` ——
   首页的彩色卡是 `.home-stat`（不是 `.stat`）→ 之前没匹配上 flex 规则，
   在 flex 容器里按内容宽度排列（flex:0 1 auto）→ **右侧留一大片空白**。
   改成 `> *` → 无论卡片用什么 class，都会等分拉伸填满一行。 */
.stat-grid > * {
  flex: 1 1 180px;      /* 基准宽 180px，一行放得下几张就放几张 */
  min-width: 180px;
}
.stat-grid > .stat {
  min-height: 78px;     /* 各卡高度一致（原来按内容高度参差不齐） */
  display: flex; flex-direction: column; justify-content: center;
}
@media (max-width: 860px) {
  .stat-grid > .stat { flex: 1 1 100%; min-width: 0; }
}
.stat-label { font-size: 12px; color: var(--txt-3); }
.stat-value { font-size: 25px; font-weight: 660; margin-top: 5px; letter-spacing: -.5px; line-height: 1.15; }
.stat-foot { font-size: 11.5px; color: var(--txt-3); margin-top: 3px; }
.stat.ok .stat-value { color: var(--ok); }
.stat.block .stat-value { color: var(--block); }
.stat.warn .stat-value { color: var(--warn); }
.stat.manual .stat-value { color: var(--manual); }

/* ══════════ 表单 ══════════ */
label.f { display: block; font-size: 12px; color: var(--txt-2); margin: 9px 0 3px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 6px 9px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font: inherit; font-size: 13px; background: #fff; color: var(--txt);
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--manual);
  box-shadow: 0 0 0 3px rgba(9,105,218,.09);
}
textarea { resize: vertical; font-family: ui-monospace, Menlo, monospace; line-height: 1.65; }
.hint { font-size: 11.5px; color: var(--txt-3); margin-top: 3px; line-height: 1.55; }
.hint b { color: var(--txt-2); }

.btn {
  padding: 6px 13px; border: 1px solid var(--line);
  background: #fff; border-radius: var(--r-sm);
  cursor: pointer; font: inherit; font-size: 12.5px; color: var(--txt);
  transition: background .12s, border-color .12s;
  white-space: nowrap;
}
.btn:hover { background: var(--line-soft); }
.btn.primary { background: var(--sel); color: #fff; border-color: var(--sel); font-weight: 550; }
.btn.primary:hover { background: #333; }
/*禁用态：用「去色 + 虚线描边」表达"还没到可点的时候"，
   而不是单纯 opacity —— 深色 primary 加透明度会褪成灰底，
   跟旁边的白底次要按钮长得几乎一样，看起来像"两种不同样式的按钮"而非"同一个按钮的禁用态"。 */
.btn:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: .38;
  border-style: dashed;
  box-shadow: none;
}
.btn:disabled:hover { background: #fff; }
.btn.primary:disabled:hover { background: var(--sel); }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }

/* 分段选择 */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: 12.5px; padding: 4px 11px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line);
  color: var(--txt-2); cursor: pointer; user-select: none;
  transition: all .12s;
}
.chip:hover { border-color: var(--txt-3); }
.chip.on { background: var(--sel); color: #fff; border-color: var(--sel); font-weight: 550; }

/* ══════════ 徽标 / 状态 ══════════ */
.badge {
  font-size: 11.5px; padding: 2px 8px; border-radius: 20px;
  border: 1px solid; white-space: nowrap; display: inline-block;
}
.b-std { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.b-note { background: var(--sug-bg); color: var(--sug); border-color: var(--sug-line); }
.b-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.b-block { background: var(--block-bg); color: var(--block); border-color: var(--block-line); }
.b-manual { background: var(--manual-bg); color: var(--manual); border-color: var(--manual-line); }
.b-plain { background: var(--line-soft); color: var(--txt-2); border-color: var(--line); }

.tag {
  font-size: 11.5px; padding: 1px 7px; border-radius: 20px;
  background: var(--line-soft); color: var(--txt-2); white-space: nowrap; flex-shrink: 0;
}
.t-PASS, .t-OK { background: var(--ok-bg); color: var(--ok); }
.t-FAIL { background: var(--block-bg); color: var(--block); }
.t-REVIEW, .t-WARN { background: var(--warn-bg); color: var(--warn); }
.t-MANUAL { background: var(--manual-bg); color: var(--manual); }
.t-SUGGEST { background: var(--sug-bg); color: var(--sug); }
.t-SKIP { background: var(--line-soft); color: var(--txt-3); }

/* ══════════ 表格 ══════════ */
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tbl th, table.tbl td {
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 10px; text-align: left; vertical-align: top;
}
table.tbl th {
  font-weight: 600; color: var(--txt-2); font-size: 12px;
  background: #fafbfc; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1;
}
table.tbl tr:hover td { background: #fafbfc; }
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }

/* ══════════ 校验结论 ══════════ */
.verdict { border-radius: var(--r); padding: 12px 14px; margin-bottom: 12px; border: 1px solid; }
.v-PASS_STANDARD { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.v-FAIL_STANDARD { background: var(--block-bg); border-color: var(--block-line); color: var(--block); }
.v-PENDING_HUMAN { background: var(--manual-bg); border-color: var(--manual-line); color: var(--manual); }
.verdict .vt { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.verdict .vs { font-size: 12px; color: var(--txt-2); margin-top: 4px; font-weight: 400; line-height: 1.6; }

.item {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 11px; margin-bottom: 7px; background: var(--surface);
}
.item:last-child { margin-bottom: 0; }
.item-top { display: flex; align-items: flex-start; gap: 7px; }
.item-name { font-weight: 600; font-size: 12.5px; flex: 1; }
.item-reason { font-size: 12.5px; color: var(--txt-2); margin-top: 4px; }
.item-basis {
  font-size: 11.5px; color: var(--txt-3); margin-top: 3px;
  font-family: ui-monospace, Menlo, monospace;
}
.layer-head {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 9px; flex-wrap: wrap;
}
.layer-head:first-child { margin-top: 0; }
.layer-head b { font-size: 13px; }

/* 提示条 */
.notice {
  padding: 8px 11px; border-radius: var(--r-sm);
  font-size: 12.5px; margin-bottom: 8px; line-height: 1.6;
  border: 1px solid transparent;
}
.n-block { background: var(--block-bg); color: var(--block); border-color: var(--block-line); }
.n-manual { background: var(--manual-bg); color: var(--manual); border-color: var(--manual-line); }
.n-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.n-info { background: var(--line-soft); color: var(--txt-2); }
.n-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }

/* ══════════ 稿件列表项 ══════════ */
.art-item {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 11px; margin-bottom: 7px; cursor: pointer;
  background: var(--surface); transition: border-color .12s, background .12s;
}
.art-item:hover { border-color: var(--txt-3); background: #fafbfc; }
.art-item.on { border-color: var(--sel); background: #f7f8fa; box-shadow: inset 2px 0 0 var(--sel); }
.art-title { font-weight: 600; font-size: 12.5px; margin-bottom: 4px; }
.art-meta { font-size: 11.5px; color: var(--txt-3); display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.st-draft { color: var(--txt-3); }
.st-validated { color: var(--manual); }
.st-adopted { color: var(--ok); }
.st-published { color: var(--ok); font-weight: 700; }
.st-rejected { color: var(--block); }

/* ══════════ AI 助手 ══════════ */
.ai-box { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.msg { margin-bottom: 11px; padding-bottom: 11px; border-bottom: 1px dashed var(--line); }
.msg:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.msg-role { font-size: 11.5px; font-weight: 700; margin-bottom: 3px; }
.msg.u .msg-role { color: var(--manual); }
.msg.a .msg-role { color: var(--sug); }
.msg.s .msg-role { color: var(--txt-3); }
.msg-body { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; }
.msg-body code { background: var(--line-soft); padding: 1px 4px; border-radius: 3px; font-size: 12px; }

/* ══════════ 三栏工作台（编辑页） ══════════ */
.ws { display: grid; grid-template-columns: 1fr 360px; gap: 14px; align-items: start; }
.ws-editor { min-width: 0; }

/**
 * 右栏：独立滚动（v2.1.8）
 * ⚠️ 原为 position:sticky; top:0 —— 只是「粘住」，**本身不滚动**：
 *    右栏内容（稿件列表 + 版本与回滚 + 提交人工审核 + 状态流转）比视口高时，
 *    下半部分被视口裁掉，只能靠整页滚动才能看到，但整页滚动时它又不动 → 看不全。
 *    （东哥 2026-10-22 反馈）
 *
 * 改法：sticky 保留（跟随顶部），同时限高绑到视口、内部自己滚：
 *   max-height: calc(100vh - 页头/面包屑/边距) → 不超出可视区
 *   overflow-y: auto                   → 右栏内容独立滚动，鼠标悬停即可
 *   overscroll-behavior: contain       → 滚到头不带动整页（体验更稳）
 */
.ws-side {
  position: sticky;
  top: 0;
  /* 占用 = topbar(--top-h) + 面包屑(--crumb-h) + view上内边距(16) + 页脚(~70，留余量)
     用变量表达 → 以后改顶栏高度，右栏自动跟随 */
  max-height: calc(100vh - var(--top-h) - var(--crumb-h) - 16px - 70px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  /* 右栏滚动时的呼吸感 */
  padding-right: 4px;
  /* 细滚动条（webkit） */
  scrollbar-width: thin;
}
.ws-side::-webkit-scrollbar { width: 6px; }
.ws-side::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 3px;
}
.ws-side::-webkit-scrollbar-thumb:hover { background: #d8dbdf; }
.ws-side::-webkit-scrollbar-track { background: transparent; }
/* 窄屏：右栏不再 sticky（本来就是单列了），改为普通流 + 恢复整页滚动 */
@media (max-width: 1100px) {
  .ws { grid-template-columns: 1fr; }
  .ws-side {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
}

/* ══════════ 其他 ══════════ */
.spin {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid var(--line); border-top-color: var(--sel);
  border-radius: 50%; animation: sp .7s linear infinite;
  vertical-align: -2px;
}
@keyframes sp { to { transform: rotate(360deg); } }
.muted { color: var(--txt-3); font-size: 12px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; }
.empty { padding: 30px; text-align: center; color: var(--txt-3); font-size: 12.5px; }
.warnbox {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: var(--r-sm); padding: 9px 12px;
  font-size: 12px; color: var(--warn); margin-bottom: 11px; line-height: 1.6;
}

/* ══════════ 响应式 ══════════ */
@media (max-width: 1400px) {
  .ws { grid-template-columns: 1fr 320px; }
}
@media (max-width: 1180px) {
  .app { grid-template-columns: var(--nav-w-collapsed) 1fr; }
  .app .nav-brand, .app .nav-txt, .app .nav-caret,
  .app .nav-group-label, .app .nav-foot-status { display: none; }
  .app .nav-head { justify-content: center; padding: 11px 0; }
  .app .nav-logo-img { width: 38px; height: 38px; border-radius: 9px; }
  .app .nav-item { justify-content: center; padding: 9px 0; }
  .app .nav-sub { display: none !important; }
  .app .nav-foot { align-items: center; padding: 8px 0 9px; }
  .app .nav-foot-cr { font-size: 11.5px; letter-spacing: 0; text-align: center; line-height: 1.25; }
  .app .nav-foot-cr .cr-name { padding: 0 3px; border-radius: 3px; margin-left: 0; }
  .app .nav-foot-ver { display: none; }
  .ws { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ══════════ 助手：两级选择器（客户 → 文章） ══════════ */
.scroll-box {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fafbfc; padding: 5px; max-height: 200px; overflow-y: auto;
}
.grp { margin-bottom: 3px; }
.grp-head {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 8px; border-radius: var(--r-sm);
  cursor: pointer; font-size: 12.5px; user-select: none;
  transition: background .12s;
}
.grp-head:hover { background: var(--line-soft); }
.grp-head.on { background: var(--manual-bg); }
.grp-caret { font-size: 11.5px; color: var(--txt-3); flex-shrink: 0; width: 9px; }
.grp-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-cnt {
  font-size: 11.5px; color: var(--txt-3); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; flex-shrink: 0;
}
.grp-body { padding: 2px 0 5px 0; }
.art-row {
  padding: 6px 9px 6px 22px; border-radius: var(--r-sm);
  cursor: pointer; transition: background .12s;
  border-left: 2px solid transparent;
}
.art-row:hover { background: var(--line-soft); }
.art-row.on { background: var(--manual-bg); border-left-color: var(--sel); }
.ar-title {
  font-size: 12.5px; font-weight: 550; margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ar-meta { font-size: 11.5px; color: var(--txt-3); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ══════════ 状态流转（方案A：暂存 + 确认按钮） ══════════ */
.st-flow-head {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; margin-bottom: 11px;
  background: var(--manual-bg); border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.st-cur .st-draft, .st-cur .st-validated,
.st-cur .st-adopted, .st-cur .st-published, .st-cur .st-rejected {
  font-size: 14px; font-weight: 650;
}
.st-cur .st-published { color: var(--ok); }
.st-cur .st-adopted { color: var(--ok); }
.st-cur .st-rejected { color: var(--block); }
label .req { color: var(--block); font-weight: 700; margin-left: 2px; }
.btn.xs { padding: 2px 8px; font-size: 11.5px; line-height: 1.5; }

/* ══════════ 外部文章导入（需求1） ══════════ */
.im-src {
  border: 1px solid var(--line-soft); border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: 9px 12px; background: var(--bg-2);
  font-size: 12px;
}
.im-src-t { font-weight: 650; margin-bottom: 5px; color: var(--txt-2); }
.im-src-r { line-height: 1.8; color: var(--txt-2); }
.im-src-r b { display: inline-block; min-width: 86px; color: var(--txt-3); font-weight: 500; }
.im-src-r code { font-size: 11.5px; background: var(--bg-1); border-radius: 3px; padding: 1px 5px; }

/* ══════════ 大模型配置管理（需求3） ══════════ */
.md-item {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: 10px 12px; margin-bottom: 8px; background: var(--bg-2);
}
.md-off { opacity: .58; }
.md-main { flex: 1; min-width: 0; }
.md-name { font-size: 12.5px; font-weight: 650; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.md-sub { font-size: 11.5px; color: var(--txt-3); margin-top: 3px; word-break: break-all; }
.md-sub code { font-size: 11.5px; background: var(--bg-1); border-radius: 3px; padding: 1px 4px; }
.md-sub2 { font-size: 11.5px; color: var(--txt-3); margin-top: 3px; }
.md-ops { display: flex; align-items: center; gap: 5px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.md-ops .switch { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--txt-3); cursor: pointer; }
.md-ops .switch input { width: auto; }

.md-form {
  border: 1px solid var(--accent); border-radius: var(--r-sm);
  padding: 13px 15px; margin-bottom: 12px; background: var(--bg-2);
}
.md-form-t { font-size: 12.5px; font-weight: 650; margin-bottom: 10px; color: var(--accent); }

/* ══════════ 追溯台账：编辑与操作日志（需求2） ══════════ */
.led-ops { white-space: nowrap; }
/* 文章名称列：限宽 + 悬停看全文，避免长标题撑爆表格 */
.led-title {
  max-width: 200px; min-width: 130px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--txt); font-weight: 500;
}
.led-edit {
  border: 1px solid var(--accent); border-radius: var(--r-sm);
  padding: 13px 15px; margin-bottom: 12px; background: var(--bg-2);
}
.led-edit-t { font-size: 12.5px; font-weight: 650; margin-bottom: 10px; }
.led-edit-t code { font-size: 11.5px; background: var(--bg-1); border-radius: 3px; padding: 1px 5px; }

.led-ops-head {
  font-size: 12px; color: var(--txt-3); display: flex;
  align-items: center; gap: 8px; margin-bottom: 9px;
}
.led-ops-head code { font-size: 11.5px; }
.led-op {
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: 8px 11px; margin-bottom: 7px; background: var(--bg-2);
}
.led-op-t { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.led-op-d { font-size: 11.5px; color: var(--txt-3); margin-top: 4px; line-height: 1.6; }
.led-op-diff { margin-top: 5px; }
.led-diff-i {
  display: flex; align-items: center; gap: 7px; font-size: 11.5px;
  padding: 3px 0; border-bottom: 1px dashed var(--line-soft);
}
.led-diff-k { min-width: 116px; color: var(--txt-2); font-weight: 500; }
.led-diff-f { color: var(--block); text-decoration: line-through; opacity: .8; }
.led-diff-a { color: var(--txt-3); }
.led-diff-t { color: var(--ok); }

/* ══════════ 人工审核卡片 + 导出结果（问题1/问题2） ══════════ */
.rv-tip { margin-bottom: 4px; }
.rv-done {
  border: 1px solid var(--line-soft); border-left: 3px solid var(--ok);
  border-radius: var(--r-sm); padding: 10px 12px; background: var(--bg-2);
}
.rv-line { font-size: 12.5px; line-height: 1.8; }
.rv-muted { color: var(--txt-3); font-size: 11.5px; }
.rv-note {
  margin-top: 6px; font-size: 12px; color: var(--txt-2);
  background: var(--bg-1); border-radius: var(--r-sm); padding: 6px 9px; line-height: 1.6;
}
.rv-warn {
  margin-top: 7px; font-size: 12px; color: var(--warn);
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: var(--r-sm); padding: 6px 9px; line-height: 1.6;
}

.ex-res {
  border-radius: var(--r-sm); padding: 10px 12px; margin-top: 11px;
  font-size: 12.5px; line-height: 1.7;
}
.ex-ok { background: var(--ok-bg, #f0f9f2); border: 1px solid var(--ok-line, #b7e0c4); }
.ex-fail { background: var(--block-bg); border: 1px solid var(--block-line); }
/* AI 隐式标识写入状态（GB 45438）—— 写没写、写在载体哪里，必须让用户看见 */
.ex-ai {
  margin-top: 7px; padding: 7px 10px; border-radius: var(--r-sm);
  background: var(--bg-1); border-left: 3px solid var(--accent);
  font-size: 11.5px; line-height: 1.75; color: var(--txt-2);
}
.ex-ai code { font-size: 11.5px; background: var(--bg-2); border-radius: 3px; padding: 1px 5px; }
.ex-warn {
  margin-top: 7px; padding: 7px 10px; border-radius: var(--r-sm);
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  font-size: 11.5px; line-height: 1.7; color: var(--warn);
}
.ex-t { font-weight: 650; font-size: 12.5px; }
.ex-r { margin-top: 4px; color: var(--block); }
.ex-h { margin-top: 6px; font-size: 11.5px; color: var(--txt-3); line-height: 1.65; }
.ex-path { margin-top: 3px; font-size: 11.5px; color: var(--txt-2); }
.ex-path code {
  background: var(--bg-2); border-radius: 3px; padding: 1px 5px;
  font-size: 11.5px; word-break: break-all;
}
.ex-abs { user-select: all; }
.ex-list-head {
  margin-top: 12px; font-size: 11.5px; color: var(--txt-3);
  border-top: 1px solid var(--line-soft); padding-top: 9px;
}
.ex-list-head code { font-size: 11.5px; word-break: break-all; }
.ex-list { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.ex-item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: 5px 9px; font-size: 12px;
}
.ex-nm {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; color: var(--txt-2);
}
.ex-sz { color: var(--txt-3); font-size: 11.5px; flex-shrink: 0; }
.ex-tag {
  font-size: 11.5px; font-weight: 700; padding: 1px 5px; border-radius: 3px;
  background: var(--bg-2); color: var(--txt-3); flex-shrink: 0;
}
.ex-DOCX { background: #e8f0fe; color: #1a56b8; }
.ex-MD { background: #eef6ee; color: #2d6a2d; }
.ex-TXT { background: #f0f0f0; color: #666; }

/* ══════════ 删除稿件：危险操作区 ══════════ */
.danger-zone {
  border-color: var(--block-line);
  background: linear-gradient(0deg, var(--block-bg), transparent 60%);
}
.danger-zone .card-title { color: var(--block); }
.btn.danger {
  background: var(--block); color: #fff; border-color: var(--block);
}
.btn.danger:hover { filter: brightness(1.08); }
.btn.danger-ghost {
  background: transparent; color: var(--block);
  border: 1px solid var(--block-line);
  padding: 1px 5px; font-size: 11.5px; line-height: 1.4; border-radius: 5px;
}
.btn.danger-ghost:hover { background: var(--block-bg); border-color: var(--block); }
.art-del-wrap { margin-left: auto; display: inline-flex; align-items: center; }
.art-item .art-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ══════════ 问题6：校验修改指引卡片 ══════════ */
.fix-box {
  margin-top: 7px; padding: 9px 11px; border-radius: var(--r-sm);
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  font-size: 12px; line-height: 1.7;
}
.fix-loc { color: var(--txt); font-weight: 600; }
.fix-what { color: var(--warn); margin-top: 3px; }
.fix-preview { color: var(--txt-2); margin-top: 5px; word-break: break-word; }
.fix-preview code {
  font-family: ui-monospace, Menlo, monospace; font-size: 11.5px;
  background: rgba(255,255,255,.65); padding: 1px 4px; border-radius: 3px;
}
.fix-box .btn { margin-top: 7px; }
/* 追溯字段说明表 */
.fix-tbl {
  margin: 8px 0 4px; font-size: 11.5px; background: rgba(255,255,255,.5);
  border-radius: var(--r-sm);
}
.fix-tbl th {
  font-size: 11.5px; color: var(--txt-3); font-weight: 600;
  padding: 4px 7px; border-bottom: 1px solid var(--line);
  text-align: left;
}
.fix-tbl td { padding: 4px 7px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.fix-tbl tr:last-child td { border-bottom: none; }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #d5d9de; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9bec5; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* 打印 */
@media print {
  .nav, .topbar, .crumb, .nav-toggle { display: none; }
  .app { grid-template-columns: 1fr; }
}

/* ══════════════ 目录选择器（本地事实源目录）══════════════
   路径过长时截断显示（.path-input），完整路径靠 title 悬停 + 状态区全文展示。
   不用 input[type=text] 的原生 title 之外手段，保证任何浏览器都能看到完整路径。 */

/* 只读路径框：左对齐、单行截断、鼠标手型（点击可打开选择器） */
.path-input {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--txt);
  background: var(--bg-2);
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  direction: rtl;          /* 路径过长时从尾部截断，保留更有信息量的末段 */
  text-align: left;
}
.path-input::placeholder { color: var(--txt-3); font-family: inherit; }
.path-input:hover { border-color: var(--accent); }

/* ── 弹窗 ── */
.modal {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(31, 35, 40, .42);
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  width: min(680px, 100%);
  max-height: 84vh;
  display: flex; flex-direction: column;
  padding: 16px 18px 18px;
}
.modal-card .card-head { margin-bottom: 10px; }

/* 当前路径条：路径过长时中间省略，两端保留 */
.pick-path { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.pick-cur {
  flex: 1; min-width: 0;
  font-size: 12px; color: var(--txt);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 5px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  user-select: all;
}

/* 面包屑：可点任意一级跳转 */
.pick-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  font-size: 12px; margin-bottom: 8px;
  max-height: 54px; overflow: auto;
}
.crumb-item { cursor: pointer; padding: 2px 5px; border-radius: 4px; color: var(--txt-2); }
.crumb-item:hover { background: var(--line-soft); color: var(--txt); }
.crumb-item:last-child { color: var(--txt); font-weight: 600; }
.crumb-sep { color: var(--txt-3); font-size: 11.5px; }

.pick-shortcuts { margin-bottom: 9px; }

/* 目录列表 */
.pick-body {
  flex: 1; min-height: 190px; max-height: 46vh; overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--bg);
}
.dir-list { display: flex; flex-direction: column; }
.dir-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 11px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.dir-item:last-child { border-bottom: none; }
.dir-item:hover { background: var(--line-soft); }
.di-ico { font-size: 12.5px; flex-shrink: 0; }
.di-name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12.5px;
}
.di-go { font-size: 11.5px; color: var(--txt-3); flex-shrink: 0; }
.dir-item:hover .di-go { color: var(--accent); }

/* ══════════════ Markdown 预览（编辑器内）══════════════
   目标：去 # 号与 AI 味符号后，标题/加粗/段落仍要排版正确可读。 */
.md-preview {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: var(--surface);
  padding: 16px 20px;
  min-height: 300px;
  max-height: 62vh;
  overflow: auto;
}
.md-empty { color: var(--txt-3); font-size: 12.5px; text-align: center; padding: 40px 0; }
.md-body { font-size: 13.5px; line-height: 1.85; color: var(--txt); }
.md-body .md-p { margin: 0 0 12px; text-indent: 2em; }
.md-body .md-p:last-child { margin-bottom: 0; }
.md-h {
  margin: 20px 0 10px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--txt);
  text-indent: 0;
}
.md-body > .md-h:first-child { margin-top: 0; }
.md-h1 { font-size: 19px; padding-bottom: 7px; border-bottom: 1px solid var(--line-soft); }
.md-h2 { font-size: 16px; }
.md-h3 { font-size: 14.5px; }
.md-h4 { font-size: 13.5px; color: var(--txt-2); }
.md-body strong { font-weight: 700; color: var(--txt); }
.md-body em { font-style: italic; }
.md-body code {
  background: var(--bg-2); border: 1px solid var(--line-soft);
  border-radius: 3px; padding: 1px 4px; font-size: 12.5px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.md-body a { color: var(--accent); text-decoration: none; }
.md-body a:hover { text-decoration: underline; }
.md-list { margin: 0 0 12px; padding-left: 1.6em; }
.md-list li { margin-bottom: 5px; }
.md-quote {
  margin: 0 0 12px; padding: 8px 12px;
  border-left: 3px solid var(--line);
  background: var(--bg-2); color: var(--txt-2);
}
.md-hr { border: none; border-top: 1px solid var(--line-soft); margin: 18px 0; }
.md-table {
  width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 12.5px;
}
.md-table th, .md-table td {
  border: 1px solid var(--line-soft); padding: 6px 9px; text-align: left; text-indent: 0;
}
.md-table th { background: var(--bg-2); font-weight: 700; }
/* frontmatter 折叠区：元数据不是正文，单独收起避免干扰阅读 */
.md-fm {
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  margin-bottom: 14px; background: var(--bg-2); overflow: hidden;
}
.md-fm-head {
  padding: 7px 11px; font-size: 12.5px; color: var(--txt-2);
  cursor: pointer; display: flex; align-items: center; gap: 8px; user-select: none;
}
.md-fm-head:hover { background: var(--line-soft); }
.md-fm-head .muted { margin-left: auto; font-size: 11.5px; }
.md-fm-body { display: none; padding: 4px 11px 10px; border-top: 1px solid var(--line-soft); }
.md-fm.open .md-fm-body { display: block; }
.md-fm-row { display: flex; gap: 8px; font-size: 12px; padding: 3px 0; }
.md-fm-k { flex: 0 0 130px; color: var(--txt-3); font-family: ui-monospace, Menlo, monospace; }
.md-fm-v { flex: 1; color: var(--txt-2); word-break: break-all; }

/* ══════════════ 导出状态反馈（v1.11.4）══════════════
   加载态必须「可见」，否则点导出后界面毫无变化、用户以为没反应 */
.ex-res.ex-loading {
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
}
.ex-loading .ex-t {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--txt);
}
.ex-loading .ex-h { color: var(--txt-3); }

/* ══════════════ v2.0 登录页与账号管理 ══════════════ */
.login-page {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8edf3 100%);
}
.login-card {
  width: 380px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.10);
  padding: 30px 28px 24px;
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-logo { width: 40px; height: 40px; object-fit: contain; }
.login-title { font-size: 17px; font-weight: 700; color: var(--txt); }
.login-sub { font-size: 12.5px; color: var(--txt-3); margin-top: 3px; }
.login-msg {
  background: rgba(220,38,38,.07); border-left: 3px solid var(--block);
  color: var(--block); padding: 9px 12px; border-radius: 4px;
  font-size: 13px; margin-bottom: 14px;
}
.login-err { color: var(--block); font-size: 13px; margin-top: 10px; min-height: 18px; }
.login-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--txt-3); line-height: 1.7;
}
.auth-user { font-weight: 600; color: var(--txt); }

/* ══════════════════════════════════════════════════════════════
 * 账号列表操作列（v2.1.8）
 * ⚠️ 原为 flex-wrap:wrap + 表头 230px → 4 个按钮（重置密码/改角色/停用/删除）
 *    放不下就把「删除」挤到第二行，视觉上很散（东哥 2026-10-22）。
 *    改为：**不换行** + 列宽 320px + 按钮间距收紧。
 * ══════════════════════════════════════════════════════════════ */
.ac-ops {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;              /* 强制一行 */
  white-space: nowrap;
}
.ac-ops .btn {
  flex-shrink: 0;                /* 按钮本身不被压缩 */
  padding: 5px 9px;/* 收紧内边距，省出横向空间 */
  font-size: 12.5px;
}

/* ══════════════════════════════════════════════════════════════
 * 页脚（v2.1.3）
 * 合规提示与免责声明原先挤在顶栏，与折叠按钮重叠、且换行后很挤。
 * 现移到页脚：分两行（合规徽标 / 免责声明），行间用细分隔，宽度自适应。
 * ══════════════════════════════════════════════════════════════ */
.page-foot {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 10px 18px 12px;
  display: flex; flex-direction: column; gap: 7px;
  /* v2.3.2：与侧栏页脚**同高** —— 两侧页脚顶边对齐，视觉成一条线 */
  min-height: var(--foot-h);
  justify-content: center;
}
.page-foot-row {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;                 /* 窄屏自动换行，不横向溢出 */
  min-width: 0;
}
.page-foot-row .badge { font-size: 11.5px; }
.page-foot-note {
  font-size: 12px; color: var(--txt-3);
  gap: 7px;
}
/* v2.3.2：**两行都靠右**（东哥要求「页脚所有内容统一靠右」）
   ⚠️ 原来只把第二行靠右，第一行的三个合规徽标还是左对齐 → 两行不对齐很乱 */
.page-foot-note-r,
.page-foot-row-badges { justify-content: flex-end; }
.page-foot-note .badge { font-size: 11.5px; }
/* GB 45438 徽标：中性偏蓝（强制国标，但与「阻断项」区分开） */
.b-gb { background: var(--manual-bg); color: var(--manual); border-color: var(--manual-line); }

/* ══════════════════════════════════════════════════════════════
 * 一次性事实源凭证 UI（v2.2.0）
 * ⚠️ 警示必须**醒目** —— 东哥要求：明确标注「一次性、用完即删」，避免误用/重复使用。
 * ══════════════════════════════════════════════════════════════ */
.fs-src-block {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 11px 13px 12px;
  margin-top: 9px;
  background: var(--bg-2);
}
.fs-src-title {
  display: flex; align-items: center; gap: 8px;
  font-weight: 650; font-size: 13px; color: var(--txt);
  margin-bottom: 8px;
}
.tag-chip {
  font-size: 11.5px; font-weight: 600;
  padding: 1.5px 7px; border-radius: 20px;
  border: 1px solid; white-space: nowrap;
}
.tag-local { background: var(--line-soft); color: var(--txt-3); border-color: var(--line); }
.tag-once { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }

/* ── 一次性警示区（红橙底 + 左侧竖条，视觉上「跳出来」）── */
.once-warn {
  border: 1px solid var(--warn-line);
  border-left: 4px solid var(--warn);
  background: var(--warn-bg);
  border-radius: var(--r-sm);
  padding: 9px 12px 10px;
  margin-bottom: 4px;
}
.once-warn-title {
  font-weight: 700; font-size: 13px; color: var(--warn);
  margin-bottom: 5px; letter-spacing: .2px;
}
.once-warn-list {
  margin: 0; padding-left: 17px;
  font-size: 12.5px; line-height: 1.75; color: var(--txt-2);
}
.once-warn-list li { margin: 1px 0; }
.once-warn-list b { color: var(--warn); }

/* ── 已签发的凭证：绿底表示「现在可用」 ── */
.once-live {
  border: 1px solid var(--ok-line);
  background: var(--ok-bg);
  border-radius: var(--r-sm);
  padding: 8px 11px;
  font-size: 12.5px; line-height: 1.7; color: var(--txt-2);
}
.once-live b { color: var(--ok); }
.once-live-warn {
  display: block; margin-top: 3px;
  font-size: 12px; color: var(--warn);
}
/* ── 已删除：灰底 + 删除线感 ── */
.once-gone {
  display: inline-block;
  border: 1px dashed var(--line);
  background: var(--bg-1);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  font-size: 12.5px; color: var(--txt-3);
}
/* ══════════════════════════════════════════════════════════════
 * v2.3.0 · 首页工作台 + 卡片浮起感
 * ──────────────────────────────────────────────────────────────
 * 参照参考图的：渐变统计卡 / 宫格入口 / 待办列表 / SVG 折线 /
 *                分布条 / 问候区
 * ⚠️ 全部用 .home- 前缀，与既有类零冲突；业务页面不受影响。
 * ══════════════════════════════════════════════════════════════ */

/* ── 卡片浮起感（全局轻微增强，不改内边距）── */
.card {
  box-shadow: var(--card-shadow);
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--card-shadow-hover); }

/* ── 问候区 ── */
.home-head {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.home-greet { min-width: 0; }
.home-greet-line {
  display: flex; align-items: center; gap: 9px;
  font-size: 23px; font-weight: 700; letter-spacing: -.3px;
  color: var(--txt); line-height: 1.25;
}
.home-greet-icon { font-size: 22px; }
.home-greet .page-desc { margin-top: 3px; font-size: 12.5px; }
.home-meta {
  /* v2.3.0：胶囊内容**右对齐**（原先 align-items:flex-end 在单行时看着偏左） */
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  justify-content: flex-end; margin-left: auto;
  padding: 7px 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: var(--card-shadow);
}
.home-date { font-size: 12.5px; font-weight: 600; color: var(--txt-2); }
.home-tz { font-size: 11.5px; }

/* ── 快速开始 ── */
.home-quick { border-left: 3px solid var(--accent); }
.home-quick-body {
  display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
}
.home-quick-field { flex: 1; min-width: 190px; }
.home-quick-field .f { margin-bottom: 4px; }
.home-quick-ops { display: flex; gap: 8px; padding-bottom: 1px; }
.warn-hint {
  border: 1px solid var(--warn-line); background: var(--warn-bg);
  color: var(--warn); border-radius: var(--r-sm);
  padding: 8px 11px;
}

/* ── 统计卡（v3.0.5：删除渐变与装饰球 → 纸白卡；仅 .primary 可深色）──
   ⚠️ 旧版用 :nth-child(2/3/4) 分别着色，优先级高于通用 .home-stat 规则，
      导致「白卡」覆盖不掉 → 四张全变深色、深字压深底看不清（东哥截图反馈）。 */
.home-stats { margin-bottom: 14px; }
.home-stat {
  position: relative;
  border-radius: var(--r);
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--txt);
  box-shadow: 0 1px 2px rgba(20,32,26,.03);
  transition: border-color .18s ease, box-shadow .18s ease;
  min-height: 98px;
  display: flex; flex-direction: column; justify-content: space-between;
}
/* 明确覆盖按位置着色（否则旧的 nth-child 规则继续生效） */
.home-stat:nth-child(2),
.home-stat:nth-child(3),
.home-stat:nth-child(4),
.home-stat.warn {
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(20,32,26,.03);
}
.home-stat:hover { border-color: rgba(20,32,26,.20); box-shadow: 0 2px 8px rgba(20,32,26,.06); }
/* 去掉右下角装饰球（AI 渐变卡的典型符号） */
.home-stat::after { display: none; content: none; }
.home-stat-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12.5px; opacity: 1; position: relative; z-index: 1;
  color: var(--txt-2);            /* v3.0.5：白卡上用深色标签 */
}
/* 图标块：浅底深字（原来是为深色渐变卡设计的白色半透明） */
.home-stat-ico {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--bg-1); color: var(--txt-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; opacity: 1; flex-shrink: 0;
}
.home-stat-value {
  font-size: 27px; font-weight: 700; line-height: 1.15;
  margin: 7px 0 2px; letter-spacing: -.5px;
  position: relative; z-index: 1;
}
.home-stat-foot { font-size: 12px; opacity: 1; color: var(--txt-3); position: relative; z-index: 1; }

/* ── 快捷入口宫格 ── */
.home-shortcuts {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.home-sc {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-2); cursor: pointer; text-align: left;
  font-family: inherit; color: var(--txt);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.home-sc:hover {
  border-color: var(--accent); background: var(--surface);
  transform: translateY(-1px);
}
.home-sc-ico {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef3ff, #e5eaff);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.home-sc-txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.home-sc-txt b { font-size: 12.5px; font-weight: 600; }
.home-sc-txt .muted { font-size: 11.5px; }

/* ── 待办事项 ── */
.home-todo {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 2px;
  border-bottom: 1px dashed var(--line-soft);
}
.home-todo:last-child { border-bottom: none; }
.home-todo-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--txt-3);
}
.home-todo-dot.warn { background: var(--warn); }
.home-todo-dot.info { background: var(--manual); }
.home-todo-dot.ok { background: var(--ok); }
.home-todo-txt { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; flex: 1; }
.home-todo-txt b { font-size: 12.5px; font-weight: 600; }
.home-todo-txt .muted { font-size: 11.5px; }

/* ── SVG 折线图 ── */
.home-chart { width: 100%; height: 190px; display: block; overflow: visible; }
.home-chart-grid { stroke: var(--line-soft); stroke-width: 1; stroke-dasharray: 3 4; }
.home-chart-ylab { font-size: 11.5px; fill: var(--txt-3); }
.home-chart-xlab { font-size: 11.5px; fill: var(--txt-3); }
.home-chart-line {
  fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-linejoin: round; stroke-linecap: round;
}
.home-chart-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.home-chart-dot:hover { fill: var(--accent); }

/* ── 状态分布条 ── */
/* ── 环形图（v2.3.1 P2）── */
/* v3.0.6：删除底部横条（与饼图重复、单独一行不明显），圆环放大为主视觉 */
.home-dist-wrap {
  display: flex; align-items: center; gap: 26px; padding: 4px 0 2px;
}
.home-donut-box { flex-shrink: 0; width: 178px; }
.home-donut { width: 178px; height: 178px; display: block; }
.home-donut-seg { transition: opacity .15s ease, stroke-width .15s ease; cursor: default; }
.home-donut-seg:hover { opacity: .82; stroke-width: 19; }
.home-donut-num { font-size: 30px; font-weight: 720; fill: var(--txt); letter-spacing: -1px; }
.home-donut-lbl { font-size: 12.5px; fill: var(--txt-3); }

.home-dist-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 11px; }
.home-dist-item {
  display: flex; align-items: center; gap: 9px; font-size: 13px; line-height: 1.5;
}
.home-dist-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.home-dist-label { color: var(--txt-2); font-weight: 520; }
.home-dist-item b { font-weight: 680; font-variant-numeric: tabular-nums; margin-left: 2px; }
.home-dist-item .muted {
  font-size: 12px; min-width: 48px; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 窄屏：饼图缩小但不隐藏（横条已删除，不再降级） */
@media (max-width: 620px) {
  .home-dist-wrap { gap: 16px; }
  .home-donut-box, .home-donut { width: 132px; }
  .home-donut { height: 132px; }
  .home-donut-num { font-size: 23px; }
  .home-donut-lbl { font-size: 11.5px; }
  .home-dist-legend { gap: 8px; }
  .home-dist-item { font-size: 12.5px; }
}

/* ══════════════════════════════════════════════════════════════
 * v2.4.0 · 统一图标规范
 * ══════════════════════════════════════════════════════════════
 * 全局图标一律用 web/icons.js 的线性 SVG（currentColor 着色）。
 * 用法：<span class="ic" data-ic="home"></span>  或  icon('home')
 * ⚠️ 不再直接用 Unicode 字符 / emoji 当图标 —— 那些跨平台形态与颜色都不一致。
 * ────────────────────────────────────────────────────────────── */

/* 图标容器：inline-block + 基线对齐（与文字同行不跳行） */
.ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 0;              /* 消除 SVG 带来的行高间隙 */
  flex-shrink: 0;
  color: inherit;               /* 随主题变量继承 */
}
.ic > svg { display: block; }

/* 尺寸档位（统一入口，别再散落各处写 width/height） */
.ic-13 { width: 13px; height: 13px; }
.ic-14 { width: 14px; height: 14px; }
.ic-16 { width: 16px; height: 16px; }
.ic-18 { width: 18px; height: 18px; }
.ic-20 { width: 20px; height: 20px; }
.ic-24 { width: 24px; height: 24px; }

/* ── 侧边栏导航图标 ──
   规范：16×16 固定槽位，所有层级（含子项）完全一致 → 文字左缘对齐 */
.nav-ico {
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: inherit;
  opacity: .82;
  transition: opacity .14s ease, color .14s ease;
}
.nav-ico > svg { display: block; width: 16px; height: 16px; }
/* 悬停：图标提亮 */
.nav-item:hover .nav-ico { opacity: 1; color: var(--nav-txt-hover); }
/* 选中：图标全白 + 满不透明 */
.nav-item.active .nav-ico { opacity: 1; color: var(--nav-txt-on); }
/* 父分组含选中项：图标用品牌蓝（与淡蓝底呼应） */
.nav-item.has-active .nav-ico { opacity: 1; color: #7ea6ff; }
/* 折叠态：图标居中且足够亮（深底对比度） */
.nav-collapsed .nav-ico { opacity: 1; color: #c6d2ea; }
.nav-collapsed .nav-item:hover .nav-ico { color: #fff; }
.nav-collapsed .nav-item.active .nav-ico { color: #fff; }

/* ── 徽标内图标 ──
   v2.4.0：统一 13px（徽标文字 11px，图标略小一号） */
.badge .ic { width: 13px; height: 13px; opacity: .9; margin-right: 2px; }
.badge .ic:only-child { margin-right: 0; }

/* ── 按钮内图标 ──
   v2.4.0：统一 14px（按钮文字 12-13px，图标略小一号更协调） */
.btn .ic { width: 14px; height: 14px; opacity: .9; margin-right: 3px; }
.btn:hover .ic { opacity: 1; }
.btn .ic:only-child { margin-right: 0; }

/* ── 项目档案编号（v2.4.2）──
   系统自动生成、不可编辑 → 做成「只读徽标」样式（等宽字体 + 浅底） */
.cl-pid-box {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 6px 11px; margin-bottom: 10px;
  background: var(--bg-1); border: 1px dashed var(--line);
  border-radius: var(--r-sm);
}
.cl-pid-box .mono { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.cl-pid-box .muted { font-size: 11.5px; }
/* 服务提供方说明（v2.4.2）*/
.cl-pid-tip {
  font-size: 12px; line-height: 1.7; color: var(--txt-3);
  background: var(--bg-1); border-left: 2px solid var(--accent);
  padding: 7px 11px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: 10px;
}
.cl-pid-tip b { color: var(--txt-2); }

/* ══ AI 助手面板（v2.4.9 · 编辑器右栏）══ */
/* 结果卡片：建议（灰）/ 可应用（高亮）—— ⚠️ 建议卡**没有**「应用」按钮 */
/* 改写前后对比 */
/* 差异预览（行级） */
/* ── 台账「按客户名单筛选」下拉（v2.4.5）──
   ⚠️ v2.4.4 时这里是「名称输入框 + 下拉」并排（仍重复），v2.4.5 只留下拉。
   高度必须与其它格子的 input **完全一致**（35px = 13px×1.6 行高 + 12 padding + 2 border），
   否则这一格会比别的高 → 整行错位（v2.4.4 的原始问题）。 */
#ledFClientPick {
  height: 35px; padding: 6px 9px; font-size: 13px;
}

/* ══ 台账详情弹窗（v2.4.6）══ */
.led-detail-card {
  width: min(920px, 100%);
  max-height: 88vh;
}
.led-detail-meta {
  /* v2.7.1：flex-wrap 代替固定列宽 grid —— 长编号（PRJ-xxx-2026xxxx-001）不再被 190px 列宽挤到换行 */
  display: flex; flex-wrap: wrap;
  gap: 4px 18px; margin-bottom: 12px; padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.led-detail-meta > div { white-space: nowrap; }
.led-detail-meta .mono { font-size: 12.5px; }
.led-detail-body { overflow-y: auto; flex: 1 1 auto; padding-right: 3px; }

.ld-sec { margin-bottom: 20px; }
.ld-sec:last-child { margin-bottom: 4px; }
.ld-sec-t {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 650; color: var(--txt);
  padding-bottom: 7px; margin-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.ld-sec-t .muted { font-size: 12px; font-weight: 400; }

/* 基础字段：键值表 */
.ld-grp { margin-bottom: 11px; }
.ld-grp-t { font-size: 12px; color: var(--txt-2); margin-bottom: 5px; font-weight: 500; }
.ld-kv {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden;
}
.ld-kv-row {
  display: flex; gap: 10px; padding: 5px 10px;
  background: var(--surface); font-size: 12.5px; align-items: baseline;
}
.ld-k { color: var(--txt-3); flex: 0 0 108px; font-size: 12.5px; }
/* v2.7.1：默认允许换行（中文长文本如驳回意见/备注折行显示）；编号/时间类加 .mono 保持单行 */
.ld-v { color: var(--txt); white-space: normal; word-break: break-word; }
.ld-v.mono { white-space: nowrap; word-break: normal; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; }
.ld-kv-row.ld-ph .ld-v { color: var(--warn); }

/* 修改记录：变更前后对比 */
.ld-chg {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 12px; margin-bottom: 9px; background: var(--bg-1);
}
.ld-chg-t { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 7px; flex-wrap: wrap; }
.ld-diff { display: flex; gap: 10px; padding: 4px 0; font-size: 12.5px; align-items: baseline; }
.ld-diff-k { flex: 0 0 108px; color: var(--txt-3); font-size: 12.5px; }
.ld-diff-v { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ld-old {
  color: var(--block); text-decoration: line-through;
  background: rgba(214,69,69,.07); padding: 1px 6px; border-radius: 4px;
}
.ld-new {
  color: var(--ok); background: rgba(38,166,91,.09);
  padding: 1px 6px; border-radius: 4px; font-weight: 600;
}
.ld-arrow { color: var(--txt-3); }

/* 流转记录：时间线 */
.ld-timeline { position: relative; padding-left: 19px; }
.ld-timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 1px; background: var(--line);
}
.ld-tl { position: relative; padding-bottom: 13px; }
.ld-tl:last-child { padding-bottom: 0; }
.ld-tl-dot {
  position: absolute; left: -18px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line);
}
.ld-tl-self .ld-tl-dot { border-color: var(--accent); background: var(--accent); }
.ld-tl-t { display: flex; align-items: center; gap: 7px; font-size: 12.8px; flex-wrap: wrap; }
.ld-tl-at { margin-left: auto; font-size: 12px; }
.ld-tl-m { display: flex; gap: 14px; font-size: 11.8px; color: var(--txt-2); margin-top: 3px; flex-wrap: wrap; }
.ld-tl-kind { font-size: 11.5px; }
.ld-kind-version { color: var(--accent); }
.ld-kind-ledger { color: var(--txt-3); }

/* 表格行可点击 */
.led-row-clickable { cursor: pointer; }
.led-row-clickable:hover { background: var(--bg-1); }
.led-row-clickable:focus-visible {
  outline: 2px solid var(--accent); outline-offset: -2px;
}


/* ── 卡片标题图标 ──
   v2.4.0：统一 16px（与卡片标题 13.5px 视觉配平） */
.card-title .ic { width: 16px; height: 16px; color: var(--txt-2); margin-right: 3px; }

/* ── 状态色图标（跟随语义色）── */
.ic-ok { color: var(--ok); }
.ic-warn { color: var(--warn); }
.ic-block { color: var(--block); }
.ic-manual { color: var(--manual); }
.ic-sug { color: var(--sug); }
.ic-muted { color: var(--txt-3); }

/* ══════════════════════════════════════════════════════════════
 * v2.3.1 P2 · 顶栏工具（全局搜索 + 通知中心）
 * ══════════════════════════════════════════════════════════════
/* ── 搜索框 ── */
.top-search {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  width: 260px; height: 32px;
  padding: 0 11px;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color .15s ease, background .15s ease, width .18s ease;
}
.top-search:focus-within, .top-search.open {
  border-color: var(--accent); background: var(--surface); width: 320px;
}
.top-search-ico {
  /* v2.4.0：字符 ⌕ → 图标库 search（尺寸与其他图标统一 16px） */
  color: var(--txt-3); flex-shrink: 0;
  width: 16px; height: 16px;
}
.top-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-family: inherit; font-size: 12.5px; color: var(--txt);
}
.top-search input::placeholder { color: var(--txt-3); }
.top-search input::-webkit-search-cancel-button { cursor: pointer; }

/* ── 搜索结果面板 ── */
.search-panel {
  position: absolute; top: calc(var(--top-h) + 6px); left: 68px;
  width: 400px; max-width: calc(100vw - 100px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--card-shadow-hover);
  z-index: 60; overflow: hidden;
}
.search-panel-in { max-height: 340px; overflow-y: auto; padding: 5px; }
.search-hint { padding: 16px 12px; font-size: 12.5px; color: var(--txt-3); text-align: center; }
.search-group { margin-bottom: 4px; }
.search-group-t {
  padding: 7px 10px 4px; font-size: 11.5px; font-weight: 600;
  color: var(--txt-3); letter-spacing: .6px;
}
.search-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 10px; border: none; background: none; border-radius: var(--r-sm);
  cursor: pointer; text-align: left; font-family: inherit;
  transition: background .12s ease;
}
.search-item:hover { background: var(--bg-2); }
.search-item-main { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; flex: 1; }
.search-item-main b { font-size: 12.5px; font-weight: 600; }
.search-item-main .muted { font-size: 11.5px; }
.t-INFO { background: var(--manual-bg); color: var(--manual); }

/* ── 通知按钮 ── */
.top-ico-btn {
  position: relative;
  width: 32px; height: 32px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 9px;
  background: none; cursor: pointer; line-height: 1;
  color: var(--txt-2);
  transition: background .13s ease, border-color .13s ease, color .13s ease;
}
/* v2.4.0：图标统一 18px（顶栏按钮比菜单略大，符合层级） */
.top-ico-btn .ic { width: 18px; height: 18px; }
.top-ico-btn:hover { color: var(--txt); }
.top-ico-btn:hover, .top-ico-btn.open {
  background: var(--bg-1); border-color: var(--line);
}
.notify-dot-badge {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--block); border: 1.5px solid var(--surface);
}

/* ── 通知面板 ── */
.notify-panel {
  position: absolute; top: calc(var(--top-h) + 6px); right: 18px;
  width: 330px; max-width: calc(100vw - 40px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--card-shadow-hover);
  z-index: 60; overflow: hidden;
}
.notify-head {
  padding: 9px 13px; font-size: 12.5px; font-weight: 620;
  border-bottom: 1px solid var(--line-soft);
}
#notifyBody { max-height: 320px; overflow-y: auto; padding: 5px; }
.notify-item {
  display: flex; align-items: flex-start; gap: 9px; width: 100%;
  padding: 8px 10px; border: none; background: none; border-radius: var(--r-sm);
  cursor: pointer; text-align: left; font-family: inherit;
  transition: background .12s ease;
}
.notify-item:hover { background: var(--bg-2); }
.notify-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px;
  background: var(--txt-3);
}
.notify-item.warn .notify-dot { background: var(--warn); }
.notify-item.info .notify-dot { background: var(--manual); }
.notify-item.ok .notify-dot { background: var(--ok); }
.notify-main { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; flex: 1; }
.notify-main b { font-size: 12.5px; font-weight: 600; }
.notify-main .muted { font-size: 11.5px; }
.notify-go { font-size: 11.5px; color: var(--accent); flex-shrink: 0; align-self: center; }

/* ══ v2.6.0：台账详情「内容修改留痕」区 ══ */
.ld-rev { display: flex; flex-direction: column; gap: 8px; }
.ld-rev-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.ld-rev-hd { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 5px; }
.ld-rev-hd .spacer { flex: 1; }
.ld-rev-diff { display: flex; flex-direction: column; gap: 4px; }
.ld-rev-old, .ld-rev-new {
  font-size: 12.5px; line-height: 1.6; padding: 4px 7px; border-radius: 6px;
  white-space: pre-wrap; word-break: break-word;
}
.ld-rev-old { background: rgba(220, 60, 60, .08); border-left: 2px solid rgba(220, 60, 60, .45); }
.ld-rev-new { background: rgba(60, 160, 90, .10); border-left: 2px solid rgba(60, 160, 90, .5); }
.ld-rev-old .muted, .ld-rev-new .muted { display: inline-block; margin-right: 6px; font-size: 11.5px; }

/* ══════════════════════════════════════════════════════════════════
 * v3.0 视觉精修层（一期）
 * ------------------------------------------------------------------
 * 目标：去掉「AI 模板感」，建立 editorial 秩序——
 *   ① 排版有层级：4 级字号 + 数字等宽 + 标题字距收紧
 *   ② 材质有差异：卡片分主次，不是所有卡都长一样
 *   ③ 细节克制：发丝边框、极轻阴影、只有主按钮带光
 * 原则：不改结构、不改业务；本段全部为覆盖规则，可整段删除回滚。
 * ══════════════════════════════════════════════════════════════════ */

/* ── ① 排版基线 ── */
html, body {
  font: 13.5px/1.68 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  letter-spacing: .005em;
}
/* 所有数字等宽：表格、统计、时间戳不跳动 */
.mono, .stat-value, .num, table.tbl td, .crumb, .nav-foot-ver { font-variant-numeric: tabular-nums; }

/* 标题：字距略收，权重拉开 */
.page-title { font-size: 20px; font-weight: 680; letter-spacing: -.2px; }
.page-desc { font-size: 12.5px; color: var(--txt-3); line-height: 1.7; }
.card-title { font-size: 15px; font-weight: 660; letter-spacing: -.1px; }
.card-desc { font-size: 12.5px; color: var(--txt-3); }

/* ── ② 卡片：发丝边框 + 几乎不可见的阴影（材质靠边框，不靠投影） ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(20,32,26,.028);
  padding: 0;
}
.card:hover { box-shadow: var(--card-shadow); }
.card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
}
/* ⚠️ v3.0.4：容器内距必须写在 .card 上，不能写成「子元素 padding」——
   输入框/下拉本身有 padding，会覆盖掉容器内距，导致控件顶到卡片边（东哥截图反馈）。
   页头与表格用负 margin 通栏，其余子元素自然继承卡片内距。 */

/* 重点卡：唯一允许大面积深色的地方（每屏最多一处） */
.card.hero {
  background: linear-gradient(168deg, #22483a 0%, #1a3a2d 58%, #163025 100%);
  border-color: transparent; color: #eaf2ec;
}
.card.hero .card-title { color: #fff; }
.card.hero .muted, .card.hero .card-desc { color: #a9c2b3; }

/* ── ③ 表格：字号放大到 13，行距舒适，表头退到 inset 底 ── */
table.tbl { font-size: 13px; }
table.tbl th, table.tbl td { padding: 9px 12px; vertical-align: middle; }
table.tbl th {
  font-size: 12.5px; font-weight: 620; color: var(--txt-2);
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  letter-spacing: .02em;
}
table.tbl td { color: var(--txt); }
table.tbl tr:hover td { background: var(--bg-2); }
table.tbl tr:last-child td { border-bottom: none; }
.tbl-wrap { border-color: var(--line); border-radius: var(--r-sm); }

/* ── ④ 按钮：主按钮深绿带极轻光；次按钮发丝边；去掉厚重投影 ── */
.btn {
  font-size: 13px; font-weight: 580;
  padding: 8px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--txt);
  box-shadow: 0 1px 1px rgba(20,32,26,.03);
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, transform .1s ease;
}
.btn:hover { border-color: rgba(20,32,26,.22); background: #fff; }
.btn:active { transform: translateY(.5px); }
.btn.primary {
  background: var(--sel); border-color: var(--sel); color: var(--sel-txt);
  box-shadow: 0 1px 2px rgba(20,32,26,.16), 0 6px 16px -10px rgba(35,78,58,.55);
}
.btn.primary:hover { background: #1c4331; border-color: #1c4331; }
.btn.sm { font-size: 12.5px; padding: 6px 11px; border-radius: 8px; }
.btn:disabled, .btn[disabled] { opacity: .45; box-shadow: none; }

/* 焦点可见（键盘可用性） */
.btn:focus-visible, .nav-item:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(47,107,79,.18);
}

/* ── ⑤ 表单：内嵌浅底 + 明确的 focus 环 ── */
input, select, textarea {
  font-size: 13.5px; color: var(--txt);
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 11px;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
input:hover, select:hover, textarea:hover { border-color: rgba(20,32,26,.20); }
input:focus, select:focus, textarea:focus {
  outline: none; background: var(--surface);
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,107,79,.14);
}
label.f, .f > label { font-size: 12.5px; color: var(--txt-2); font-weight: 580; letter-spacing: .01em; }
.hint, .muted { font-size: 12.5px; color: var(--txt-3); line-height: 1.7; }

/* ── ⑥ 徽章：去掉硬边，改用柔和底色 ── */
.badge {
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  padding: 2px 9px; border-radius: 999px; border-width: 1px;
}

/* ── ⑦ 侧栏：选中态改「左侧竖条 + 半透明底」（去掉渐变药丸） ── */
.nav-item {
  font-size: 13px; padding: 8px 10px 8px 12px;
  border-radius: 8px; position: relative;
  letter-spacing: .01em;
}
.nav-item.active {
  background: var(--nav-sel);
  color: var(--nav-txt-on);
  font-weight: 600;
  box-shadow: var(--nav-shadow);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 2px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 15px; border-radius: 2px;
  background: #6fc79a;
}
.nav-item.has-active {
  background: rgba(255,255,255,.05);
  color: var(--nav-txt-hover);
  font-weight: 560;
}
.nav-item.has-active .nav-ico { color: #8fbfa4; }
.nav-group-label {
  font-size: 11.5px; letter-spacing: .14em; font-weight: 600;
  color: var(--nav-group); padding: 16px 11px 6px;
}
.nav-title { font-size: 14px; font-weight: 680; letter-spacing: -.1px; }

/* ── ⑧ 顶栏 / 面包屑：全部发丝线，去掉块状分隔 ── */
.topbar {
  background: color-mix(in srgb, var(--bg) 72%, var(--surface));
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: saturate(140%) blur(8px);
}
.crumb {
  background: transparent; border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--txt-3); letter-spacing: .01em;
}
.crumb b { color: var(--txt-2); font-weight: 600; }
.view { padding: 18px 20px 32px; }

/* ── ⑨ 统计卡：单色化（不再多色渐变），数字用等宽 ── */
.stat, .home-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(20,32,26,.028);
}
.stat-label { font-size: 12.5px; color: var(--txt-3); letter-spacing: .02em; }
.stat-value { font-size: 26px; font-weight: 720; letter-spacing: -.6px; line-height: 1.15; }
.stat-foot { font-size: 12px; color: var(--txt-3); }

/* ── ⑩ 滚动条：浅色区用 sage，不再冷灰 ── */
.view::-webkit-scrollbar, .tbl-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.view::-webkit-scrollbar-thumb, .tbl-wrap::-webkit-scrollbar-thumb {
  background: rgba(20,32,26,.16); border-radius: 6px; border: 3px solid transparent; background-clip: content-box;
}
.view::-webkit-scrollbar-thumb:hover, .tbl-wrap::-webkit-scrollbar-thumb:hover { background: rgba(20,32,26,.26); background-clip: content-box; }
.view::-webkit-scrollbar-track, .tbl-wrap::-webkit-scrollbar-track { background: transparent; }

/* ── ⑪ 结论条 / 提示块：去掉纯色大色块，改为左细线 + 淡底 ── */
.verdict { border-radius: var(--r-sm); border-left-width: 3px; padding: 11px 14px; }
.verdict .vt { font-size: 14px; font-weight: 660; letter-spacing: -.1px; }
.verdict .vs { font-size: 12.5px; line-height: 1.7; }

/* ── ⑫ v3.0 收尾修正 ── */
.btn:disabled:hover, .btn[disabled]:hover { background: var(--surface); border-color: var(--line); }
.chip { background: var(--surface); font-size: 12.5px; padding: 4px 10px; border-radius: 999px; }
.chip.on { background: var(--sel); border-color: var(--sel); color: var(--sel-txt); }
/* 折叠态不要左侧竖条（空间不足会压到图标） */
.nav-collapsed .nav-item.active::before { display: none; }
.nav-collapsed .nav-item { padding: 9px 0; }
/* 弹窗/浮层：微暖白 + 深一档阴影 */
.modal, .dialog, .popover { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }

/* ── ⑬ v3.0 二期：首页 KPI 主次版式 ── */
.stat-grid.home-stats {
  display: grid; grid-template-columns: 2.1fr 1fr 1fr 1fr;
  gap: 12px; margin-bottom: 14px;
}
.home-stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 17px; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 98px; box-shadow: 0 1px 2px rgba(20,32,26,.028);
}
.home-stat-top { display: flex; align-items: baseline; gap: 8px; }
.home-stat-label { font-size: 12.5px; color: var(--txt-3); letter-spacing: .02em; }
.home-stat-ico { margin-left: auto; font-size: 12.5px; color: var(--txt-3); opacity: .55; }
.home-stat-value {
  font-size: 27px; font-weight: 720; letter-spacing: -.7px; line-height: 1.1;
  color: var(--txt); font-variant-numeric: tabular-nums; margin-top: 6px;
}
.home-stat-foot { font-size: 12px; color: var(--txt-3); margin-top: 4px; }
.home-stat.warn .home-stat-value { color: var(--warn); }

/* 主卡：全页唯一的大面积深色 */
.home-stat.primary {
  background: linear-gradient(165deg, #22483a 0%, #1a3a2d 62%, #163025 100%);
  border-color: transparent; box-shadow: 0 10px 30px -20px rgba(22,48,37,.75);
}
.home-stat.primary .home-stat-label { color: #a9c2b3; }
.home-stat.primary .home-stat-ico { color: #cfe3d6; opacity: .7; }
.home-stat.primary .home-stat-value { color: #ffffff; font-size: 38px; letter-spacing: -1.1px; }
.home-stat.primary .home-stat-foot { color: #9fb8a8; }

@media (max-width: 1180px) {
  .stat-grid.home-stats { grid-template-columns: 1fr 1fr; }
  .home-stat.primary { grid-column: span 2; }
}

/* ── ⑭ v3.0 二期：空态与骨架屏（替代「加载中…」白块） ── */
.empty {
  padding: 34px 20px; text-align: center; color: var(--txt-3); font-size: 12.5px; line-height: 1.8;
}
.empty::before {
  content: ''; display: block; width: 36px; height: 36px; margin: 0 auto 10px;
  border-radius: 11px; background: var(--bg-1); border: 1px dashed rgba(20,32,26,.16);
}

/* 骨架屏：三行流动条，比转圈更稳，不跳动布局 */
.skeleton { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.sk-line {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-1) 25%, var(--bg-2) 37%, var(--bg-1) 63%);
  background-size: 400% 100%;
  animation: sk-shimmer 1.5s ease-in-out infinite;
}
.sk-line.w40 { width: 40%; }
.sk-line.w60 { width: 60%; }
.sk-line.w80 { width: 80%; }
@keyframes sk-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-line { animation: none; background: var(--bg-1); }
}

/* 加载中的通用替代：紧凑骨架 */
.sk-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--txt-3); font-size: 12.5px; }
.sk-inline::before {
  content: ''; width: 34px; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--bg-1) 25%, var(--bg-2) 37%, var(--bg-1) 63%);
  background-size: 400% 100%; animation: sk-shimmer 1.5s ease-in-out infinite;
}

/* ── ⑮ v3.0 二期：响应式收敛（3 档） ──
   1) >900：桌面双栏
   2) ≤900：侧栏改抽屉（点顶栏按钮开合），页面恢复可滚动
   3) ≤620：单列紧凑
   ⚠️ 只做布局调整，不改任何业务逻辑。 */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  html, body { overflow: auto; }
  body { overflow-x: hidden; }
  .nav {
    position: fixed; top: 0; left: 0; bottom: 0; width: 268px; z-index: 70;
    transform: translateX(-102%); transition: transform .22s ease;
  }
  .app.nav-open .nav { transform: none; }
  .app.nav-open::after {
    content: ''; position: fixed; inset: 0; z-index: 60;
    background: rgba(10,18,14,.42); backdrop-filter: blur(1px);
  }
  .main { min-width: 0; height: 100vh; overflow: hidden; }
  .view { padding: 14px 14px 30px; }
  .top-search { display: none; }
}

@media (max-width: 620px) {
  .stat-grid, .stat-grid.home-stats { grid-template-columns: 1fr 1fr; }
  .home-stat.primary, .stat.primary { grid-column: span 2; }
  .home-stat.primary .home-stat-value { font-size: 32px; }
  .page-title { font-size: 18px; }
  .page-desc { font-size: 12.5px; }
  .card-head { padding: 12px 14px; flex-wrap: wrap; gap: 6px; }
  .card > *:not(.card-head):not(table):not(.tbl-wrap) { padding-left: 14px; padding-right: 14px; }
  .btn { padding: 7px 12px; }
  .crumb { font-size: 12px; padding: 0 14px; }
}

/* ── ⑯ v3.0 三期：表格列宽与长文本 ── */
table.tbl td { word-break: break-word; line-height: 1.62; }
table.tbl td, table.tbl th { max-width: 440px; }
/* 说明性长文本列不撑破布局，超出两行省略（需要全文时用 title 或展开详情） */
table.tbl td .clamp2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 数字/时间列右对齐并禁止换行（等宽后视觉最整） */
table.tbl th.num, table.tbl td.num { text-align: right; white-space: nowrap; }
/* 操作列固定靠右，按钮不换行 */
table.tbl td.ops { text-align: right; white-space: nowrap; }
table.tbl td.ops .btn { margin-left: 6px; }

/* ── ⑰ v3.0 三期：打印样式（台账/稿件打印或另存 PDF） ── */
@media print {
  .nav, .topbar, .crumb, .nav-toggle, .btn, .top-search, .top-ico-btn,
  .preview-note, .search-panel, .notify-panel, .demo-bar { display: none !important; }

  html, body { background: #fff; overflow: visible; height: auto; }
  .app { display: block; height: auto; }
  .main { height: auto; overflow: visible; }
  .view { overflow: visible; height: auto; padding: 0; }
  .view-inner { max-width: none; }

  .card {
    border: 1px solid #d6dad4; box-shadow: none; border-radius: 8px;
    break-inside: avoid; page-break-inside: avoid; margin-bottom: 12px;
  }
  .card-head { background: #f5f6f3; }
  h1, .page-title { font-size: 16pt; }

  table.tbl { font-size: 10pt; }
  table.tbl thead { display: table-header-group; }
  table.tbl tr { break-inside: avoid; page-break-inside: avoid; }
  table.tbl th { background: #f2f4f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* 状态类徽章保留底色，便于纸面辨认 */
  .badge, .verdict { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href]::after { content: ''; }
}

/* ── ⑱ v3.0 三期：高密度页排版（校验项 / 台账字段） ── */
.item {
  padding: 11px 13px; margin-bottom: 8px;
  border-radius: 10px;
  transition: border-color .14s ease, background .14s ease;
}
.item:hover { border-color: rgba(20,32,26,.18); background: var(--surface); }
.item-name { font-size: 13px; font-weight: 620; letter-spacing: -.05px; }
.item-reason { font-size: 12.5px; color: var(--txt-2); margin-top: 5px; line-height: 1.72; }
.item-basis { font-size: 11.5px; color: var(--txt-3); margin-top: 4px; letter-spacing: .01em; }

/* 台账键值表：键列固定宽 + 行距放宽，扫读更快 */
.ld-kv-row { padding: 7px 12px; font-size: 13px; }
.ld-k { flex: 0 0 118px; font-size: 12.5px; letter-spacing: .01em; }
.ld-v { line-height: 1.62; }
.ld-v.mono { font-size: 12px; }
.ld-sec-t { font-size: 14px; letter-spacing: -.1px; }
.ld-grp-t { font-size: 12.5px; letter-spacing: .02em; }

/* 时间线：字号与圆点微调 */
.ld-tl-t { font-size: 13px; }
.ld-tl-m { font-size: 12.5px; line-height: 1.65; }
.ld-tl-at { font-size: 12px; }

/* 变更对比：色块更淡，避免像告警 */
.ld-old { background: rgba(192,69,60,.06); }
.ld-new { background: rgba(44,122,140,.10); color: var(--ok); }

/* ── ⑲ v3.0.3：可读性修正（东哥反馈「字发灰、看不清」）──
   原则：**标签用深色，只有真正的次要说明才降一档**。
   全站不再出现「浅灰小字 + 浅灰底」的灰蒙蒙组合。 */
.stat-label, .home-stat-label, .card-desc, .item-basis,
.ld-k, .ld-diff-k, .ld-grp-t, .tab-label {
  color: var(--txt-2);
}
.muted, .hint, .page-desc, .stat-foot, .home-stat-foot, .empty,
.tagline, .crumb, .card-head .muted {
  color: var(--txt-3);
  opacity: 1;                      /* 不再用透明度压字色（会加重灰感） */
}
/* 表头与关键标签再加一档字重，纸面上更清楚 */
table.tbl th { color: var(--txt-2); font-weight: 640; }
.ld-k { font-weight: 500; }
/* 徽章文字加深，避免浅底浅字 */
.badge { color: var(--txt-2); }
.badge.b-note { color: var(--ok); }
.badge.b-block { color: var(--block); }
.badge.b-manual { color: var(--manual); }
/* 输入框占位符也加深，不再是浅灰 */
::placeholder { color: #6b7a70; opacity: 1; }

/* ── ⑳ v3.0.4：卡片内距修正（控件不再顶边）──
   正确模型：内距写在容器上；页头/表格用负 margin 通栏。
   ❌ 旧写法 `.card > * { padding-left/right }` 会被 input/select 自身 padding 覆盖。 */
.card {
  padding: 18px;
}
.card > .card-head {
  margin: -18px -18px 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
}
/* 表格通栏（左右不留白，视觉上贴卡片边缘更有整体感） */
.card > table.tbl,
.card > .tbl-wrap {
  margin-left: -18px;
  margin-right: -18px;
  border-radius: 0;
}
.card > table.tbl:last-child,
.card > .tbl-wrap:last-child { margin-bottom: -18px; }
/* 表头/按钮行等相邻块之间的自然间距 */
.card > .btn-row:last-child { margin-bottom: 0; padding-bottom: 0; }
/* 卡片内最后一块不再叠加底部内距 */
.card > *:last-child { margin-bottom: 0; }

/* 窄屏同步收窄卡片内距 */
@media (max-width: 620px) {
  .card { padding: 14px; }
  .card > .card-head { margin: -14px -14px 12px; padding: 12px 14px; }
  .card > table.tbl, .card > .tbl-wrap { margin-left: -14px; margin-right: -14px; }
}

/* 卡片页头顶部圆角跟随卡片（负 margin 后避免直角溢出） */
.card > .card-head:first-child { border-radius: var(--r) var(--r) 0 0; }

/* v3.0.5：主卡（唯一深色）内部文字与图标回到浅色 */
.home-stat.primary { background: linear-gradient(165deg, #22483a 0%, #1a3a2d 62%, #163025 100%); border-color: transparent; }
.home-stat.primary .home-stat-top { color: #cfe3d6; }
.home-stat.primary .home-stat-label { color: #b9cfc1; }
.home-stat.primary .home-stat-ico { background: rgba(255,255,255,.14); color: #eaf3ec; }
.home-stat.primary .home-stat-value { color: #ffffff; }
.home-stat.primary .home-stat-foot { color: #a8c3b1; }

/* ── ㉑ v3.0.7：台账表格列策略 ──
   规则（东哥）：**文章名称允许换行，其余列标题与内容一律单行**。
   做法：整表 nowrap + 首列 normal；表格设最小宽度，窄屏横向滚动而不是挤压。 */
#ledTable {
  table-layout: auto;
  min-width: 1180px;
}
#ledTable th,
#ledTable td { white-space: nowrap; }
/* 首列：名称可换行，给足宽度 */
#ledTable th:first-child,
#ledTable td.led-title {
  white-space: normal;
  word-break: break-word;
  line-height: 1.6;
  min-width: 210px;
  max-width: 300px;
}
/* 时间列：等宽数字，单行 */
#ledTable td.led-time { font-variant-numeric: tabular-nums; }
/* 操作列：按钮不折行 */
#ledTable td.led-ops { white-space: nowrap; }
#ledTable td.led-ops .btn { margin-left: 4px; }
#ledTable td.led-ops .btn:first-child { margin-left: 0; }
/* 状态列保持单行不折断（中文短词） */
#ledTable td[class^="st-"] { white-space: nowrap; }

/* v3.0.7：编号类长字段省略显示（不换行、不撑破表格），悬停看全文 */
#ledTable .led-ell {
  display: inline-block;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* ── ㉒ v3.0.8：风格维度「全开/全关」独立成行 ── */
.dim-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.dim-actions {
  display: flex; gap: 8px; margin-top: 11px;
  padding-top: 11px; border-top: 1px dashed var(--line-soft);
}
.chip.act {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px 6px 11px;
  font-size: 12.5px; font-weight: 600;
  border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--txt-2);
  cursor: pointer; font-family: inherit;
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.chip.act svg { width: 16px; height: 16px; flex-shrink: 0; }
.chip.act:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--bg-1);
}
.chip.act:first-child:hover { border-color: var(--sel); color: var(--sel); }
