/*
 * 管理控制台样式（票 20 · B2）。形态照打样样稿，按设计标准 §五 重写为 token 三态。
 *
 * 主题 token 三态齐备（§五.2，任何 token 不得在深色态失效）：
 *   ① 裸 `:root` 亮色全集；② `prefers-color-scheme: dark` 守卫重定义；
 *   ③ `[data-theme]` 双向覆盖（手动切换在两个方向都赢过系统设置）。
 *
 * §十.5：位置/尺寸这类量**只在本文件定义一次**，脚本只切状态、不复述数值——
 * 抽屉的收起位置一度在 CSS 写 -1000px、JS 写死 -480px，加宽后关上的抽屉仍有
 * 480px 留在屏上拦截点击，而它 aria-hidden="true"，从属性上看不出来。
 */

/* ── ① 亮色全集 ─────────────────────────────────────────────── */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --line: #d9dde3;
  --line-soft: #e8ebef;
  --text: #1f2329;
  --muted: #6b7280;
  --accent: #1668dc;
  --accent-soft: #e6f0fd;
  --ok: #237804;
  --ok-soft: #f0f9e8;
  --warn: #ad6800;
  --warn-soft: #fffbe6;
  --hit: #ffe58f;                                /* 检索命中处的底（地图十三走查：浅警示底 #fffbe6 压白底看不出），字照用正文色 */
  --danger: #cf1322;
  --danger-soft: #fff1f0;
  --focus: #1668dc;
  --shadow: 0 2px 8px rgba(0, 0, 0, .08);
  /* 改版公共骨架：品牌绿、内网绿、被拒琥珀、两种辅色，与图表序列色（深色态各有一份，§五.2） */
  --brand: #2f6f4f;
  --internal: #2f6f4f;
  --internal-soft: #e8f3ec;
  --deny: #d48806;
  --purple: #7a4fc4;
  --purple-soft: #f1ebfa;
  --orange: #b0540a;
  --orange-soft: #fdf0e3;
  --c1: #1668dc;
  --c2: #2f6f4f;
  --c3: #7a4fc4;
  --c4: #d48806;
  --c5: #13a8a8;
  --c6: #c41d7f;
  /* 尺寸量的单点定义（§十.5） */
  --nav-w: 216px;
  --nav-w-min: 60px;                             /* 侧栏收起后的窄栏宽：图标在上、两个字在下 */
  --drawer-w: 960px;
  --drawer-narrow: 520px;
  --radius: 6px;
  /* 网页智能助手侧边栏（地图八票 120：由浮窗改成停靠侧边栏；尺寸只在这里定义）。
     宽屏（≥ 960px）停在右侧：打开时宽 --ai-side-w、收起后留 --ai-rail-w 宽的把手；窄屏（< 960px）停在底部：打开时高 --ai-sheet-h、收起后 --ai-rail-h 高的一条。
     --ai-dock-r／--ai-dock-b 是助手此刻占掉的右侧宽／底部高（没挂助手时为 0）：壳、抽屉、遮罩与接管边框都按它让位，互不遮挡 */
  --ai-side-w: clamp(340px, 28vw, 420px);
  --ai-rail-w: 44px;
  --ai-sheet-h: min(52vh, 480px);
  --ai-rail-h: 44px;
  --ai-dock-r: 0px;
  --ai-dock-b: 0px;
  --ai-input-max: 11em;                          /* 助手输入框随内容增高的上限（约八行，地图十一票 15）；再多出滚动条，窄屏减半 */
  --ai-frame: 5px;                               /* 助手接管期间主内容区四周那一圈边框的粗细（票 120 由 3px 加粗：用户走查「不太明显」） */
}

/* ── ② 系统深色（未手动指定主题时生效）───────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16181d;
    --surface: #1e2127;
    --surface-2: #262a31;
    --line: #3a4049;          /* 深色态不透明化：否则边框整个消失（§五.2） */
    --line-soft: #2e333b;
    --text: #e6e8ea;
    --muted: #9aa3ae;
    --accent: #4f9bff;
    --accent-soft: #16304f;
    --ok: #6abe39;
    --ok-soft: #1d2a15;
    --warn: #e8b339;
    --warn-soft: #2e2513;
    --hit: #6a5414;
    --danger: #ff6b6b;
    --danger-soft: #35191a;
    --focus: #4f9bff;
    --shadow: 0 2px 10px rgba(0, 0, 0, .5);
    --brand: #2f6f4f;
    --internal: #5fb88a;
    --internal-soft: #17291f;
    --deny: #e8a33d;
    --purple: #a98be6;
    --purple-soft: #2a2140;
    --orange: #f0a060;
    --orange-soft: #33230f;
    --c1: #4f9bff;
    --c2: #5fb88a;
    --c3: #a98be6;
    --c4: #e8b339;
    --c5: #36cfc9;
    --c6: #f16fb5;
  }
}

/* ── ③ 手动切换：两个方向都覆盖 ─────────────────────────────── */
:root[data-theme="dark"] {
  --bg: #16181d;
  --surface: #1e2127;
  --surface-2: #262a31;
  --line: #3a4049;
  --line-soft: #2e333b;
  --text: #e6e8ea;
  --muted: #9aa3ae;
  --accent: #4f9bff;
  --accent-soft: #16304f;
  --ok: #6abe39;
  --ok-soft: #1d2a15;
  --warn: #e8b339;
  --warn-soft: #2e2513;
  --hit: #6a5414;
  --danger: #ff6b6b;
  --danger-soft: #35191a;
  --focus: #4f9bff;
  --shadow: 0 2px 10px rgba(0, 0, 0, .5);
  --brand: #2f6f4f;
  --internal: #5fb88a;
  --internal-soft: #17291f;
  --deny: #e8a33d;
  --purple: #a98be6;
  --purple-soft: #2a2140;
  --orange: #f0a060;
  --orange-soft: #33230f;
  --c1: #4f9bff;
  --c2: #5fb88a;
  --c3: #a98be6;
  --c4: #e8b339;
  --c5: #36cfc9;
  --c6: #f16fb5;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

/* §五.4：动效尊重系统设置 */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* §五.1：焦点可见 */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── 骨架 ──────────────────────────────────────────────────── */
/* 票 40：整页不滚——侧栏与身份栏定住，内容区自己滚（2026-09-08 用户指出「左侧跟随滚动、分页要滚到底才看得见」） */
/* 地图八票 120：助手侧边栏停靠时壳让出它占的那一条（右侧宽或底部高），主内容区随之挤窄，不被盖住 */
.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; height: calc(100vh - var(--ai-dock-b)); margin-right: var(--ai-dock-r); }

.side {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 16px 12px; display: flex; flex-direction: column; gap: 2px;
  min-height: 0; overflow-y: auto;                 /* 侧栏自己滚，不跟内容走 */
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 12px; flex: 1 1 auto; min-width: 0; }
.brand-mark { flex: none; display: block; border-radius: 7px; }   /* 品牌标志（改版公共骨架）：随包 SVG 或装机配置那一份，不随主题换色 */
.brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.brand-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { color: var(--muted); font-size: 12px; white-space: nowrap; }   /* 「管理控制台」自成一行，不与品牌名拼成一行折在「控／制」之间 */
/* 侧栏可收起（2026-09-17 用户：给页面主体更多可视宽度）：壳按 data-nav 切列宽；收起后只留窄栏——展开钮＋各页头两个字（attr(data-abbr)），
   组名变成一条细线、品牌与主题选择不画；脚本只切状态，宽度只在这里定义（§十.5） */
.side-head { display: flex; align-items: flex-start; gap: 4px; }
.nav-toggle {
  flex: none; width: 24px; height: 24px; padding: 0; margin-top: 6px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); font: inherit; font-size: 16px; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.side-foot { margin-top: auto; padding-top: 12px; }
.side-ver { padding: 8px 8px 0; color: var(--muted); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }   /* 地图十六票 23：产品版本号一行小字（§十一.311） */
.shell[data-nav="collapsed"] { grid-template-columns: var(--nav-w-min) 1fr; }
.shell[data-nav="collapsed"] .side { padding: 14px 5px; overflow-x: hidden; }
.shell[data-nav="collapsed"] .side-head { justify-content: center; margin-bottom: 8px; }
.shell[data-nav="collapsed"] .brand, .shell[data-nav="collapsed"] .nav-txt,
.shell[data-nav="collapsed"] .tag2, .shell[data-nav="collapsed"] .side-foot { display: none; }
.shell[data-nav="collapsed"] .nav-label { height: 0; padding: 0; margin: 6px 4px; font-size: 0; border-top: 1px solid var(--line-soft); overflow: hidden; }
.shell[data-nav="collapsed"] .side-head + .nav-label { display: none; }
.shell[data-nav="collapsed"] .nav { flex-direction: column; justify-content: center; gap: 2px; min-height: 44px; padding: 5px 0; }
.shell[data-nav="collapsed"] .nav::before { content: attr(data-abbr); font-size: 11px; line-height: 1.2; order: 2; }
.nav-label { color: var(--muted); font-size: 12px; padding: 14px 10px 4px; }
/* 侧栏项（改版公共骨架）：线性图标＋名字，36px 高；当前页浅强调底 */
.nav {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px;
  background: none; border: 0; border-radius: var(--radius);
  color: var(--text); font: inherit; text-align: left; padding: 6px 10px; cursor: pointer;
}
.nav .icon { flex: none; color: var(--muted); }
.nav[aria-current="page"] .icon { color: currentColor; }
.nav:hover { background: var(--surface-2); }
.nav[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav:disabled { color: var(--muted); cursor: not-allowed; }
.tag2 {
  margin-left: auto; font-size: 11px; padding: 0 5px; border-radius: 3px;
  background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn);
}

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
/* 身份栏：右上角是退出（票 38/40）；不随内容滚 */
.topbar {
  flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  padding: 8px 22px; border-bottom: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 12px;
}
/* 页头账号菜单：页头只放显示名＋产品角色角标，其余进菜单（2026-09-16 用户） */
.acct { position: relative; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent; border-radius: var(--radius); padding: 4px 8px; cursor: pointer; font: inherit; color: var(--text); font-size: 13px; }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { border-color: var(--line); background: var(--surface-2); }
.acct-btn .caret { color: var(--muted); font-size: 11px; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 12; min-width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; color: var(--text); font-size: 13px; }
.acct-menu dl.kv dd { max-width: 360px; }
.acct-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
/* 内容区：唯一会滚的东西；检索栏与分页栏在它里面吸顶／吸底 */
.content { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 22px 24px; }
.crumb { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
/* 登录卡（没登录、转去登录、登录没成）：标志、品牌名、一句话、「登录」钮，居中一张卡 */
.login-wrap { display: flex; justify-content: center; padding-top: 12vh; }
.login-card { width: min(420px, 100%); padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-name { font-weight: 700; font-size: 20px; line-height: 1.3; }
.login-line { margin: 0; color: var(--muted); }
.login-btn { align-self: flex-start; padding: 7px 22px; }
.crumb button { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
h1 { font-size: 19px; margin: 0 0 2px; }
.sub { color: var(--muted); margin: 0 0 14px; font-size: 13px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
}

/* ── 表格（§三）─────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; }                 /* §十.3：窄容器里横向滚动，不把表格挤成竖排 */
/* 表头里的「?」气泡出来时暂时放开裁剪：overflow-x:auto 会连带把纵向也裁掉，气泡被夹在表格里冒出一根竖滚动条（2026-09-17 用户） */
.tablewrap:has(.help:hover), .tablewrap:has(.help:focus-within), .tablewrap:has(.help.open) { overflow: visible; }
.tablewrap:has([data-code-tip]:hover), .tablewrap:has([data-code-tip]:focus-visible) { overflow: visible; }
table { border-collapse: collapse; width: 100%; min-width: 620px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
/* 计数小表（人事同步差异计数、格式说明）：不撑满、不设最小宽，表头与数字同右对齐 */
table.counts { width: auto; min-width: 0; }
table.counts td, table.counts th { padding: 6px 14px 6px 0; }
table.counts td.num, table.counts th.num { padding-left: 18px; }
tr.revoked { opacity: .55; }                     /* §三.5：已吊销行降透明 */
tr.baseline-bad > td { background: var(--danger-soft); }  /* 基线核验单里不符的项：整行提亮要人看见，不借「已吊销」的降透明 */
tr.sel > td { background: var(--surface-2); }     /* 地址上选中的那一行（#/reg/<资产>、#/skills/<名>） */
tr.expand > td { border-top: 0; padding-top: 4px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.linklike:hover { color: var(--accent); }
.acts { display: flex; flex-wrap: wrap; gap: 6px; }  /* §十.3：按钮多时换行，不排成一长条 */
.inline-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }  /* 一行多控件（入参行、键值行）：控件不撑满整行 */
.inline-row > input, .inline-row > select { width: auto; min-width: 0; }

/* ── 徽标（§三.3 同一语义只有一种颜色）──────────────────────── */
.badge { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 10px; border: 1px solid; white-space: nowrap; }
.b-ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok); }
.b-bad { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.b-warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn); }
.b-kind { color: var(--muted); background: transparent; border-color: var(--line); }
.b-info { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }

.id { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); }
/* 机器标识（节点／岗位／组／人的标识、上游主体号、竹云编码一类自动生成的编号）缺省不显示；页头账号菜单的「显示内部编号」把 data-ids=show 写在 html 上才画。人给的标识（数据源、资产）不挂这个类，照常显示 */
.uid { display: none; }
/* 组织树行上的来源字形（手工 ✎／人事同步 ⇄／迁入 ⇥ ⇢）：借「?」说明的气泡（即时出、键盘可达），按钮本身不画圈、只画字形 */
.help-btn.src { width: auto; height: auto; min-width: 18px; border: 0; background: none; border-radius: var(--radius); font-size: 13px; line-height: 18px; padding: 0 3px; color: var(--muted); }
.help-btn.src:hover, .help.src:focus-within .help-btn, .help.src.open .help-btn { color: var(--accent); background: var(--surface-2); }
html[data-ids="show"] .uid { display: inline; }

/* ── 控件 ─────────────────────────────────────────────────── */
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px 8px; width: 100%;
}
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); }
/* 勾选框与单选钮全站一个尺寸（16px，与网页助手浮层两处同；浏览器缺省约 13px，走查说太小难点），不吃上面输入框的 width: 100%：
   别处不再各自把宽度改回 auto（改回去就又是 13px），页面里也不写行内宽度 */
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; flex: 0 0 auto; padding: 0; accent-color: var(--accent); cursor: pointer; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: not-allowed; }
.btn {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 5px 12px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { opacity: .9; color: #fff; }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.chipx {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 1px 9px; font-size: 12px; cursor: pointer; white-space: nowrap;   /* 小片按钮不折行（2026-09-17 用户：窄列里「删除…」折成两行） */
}
/* 票 26：只读的对象片（不可点，与可点的 .chipx 分开，免得人对着它点半天）、勾选行、警示词 */
.chipx.plain { cursor: default; }
/* 2026-09-18 实机检查：`.chip` 是页面里只读、成串摆的片（人员明细「带截止日的覆盖」、组织页「解析不到的名字」、授权编辑器「按名字写的行」）——
   此前样式表里没有它，片与片连成一串；样子同只读片，行内块带右外边距 */
.chip { display: inline-block; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 1px 9px; font-size: 12px; margin: 2px 6px 2px 0; }
.chipx.plain.danger { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.checkline { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.checkline input { margin-top: 3px; }
.warnword { color: var(--warn); }

/* 地图八票 13：共享文件批量上传的拖放框——虚线框指明「能往这儿拖」，拖进来时高亮。
   两个选择按钮把 <input type=file> 藏在 <label> 里（原生文件框样子各浏览器不一，且没法同时摆「多选」与「选文件夹」两个） */
.dropzone {
  border: 1px dashed var(--line); border-radius: 8px; padding: 12px; text-align: center;
  font-size: 13px; color: var(--muted); background: var(--surface-2);
}
.dropzone.over { border-color: var(--accent); background: var(--accent-soft, var(--surface-2)); color: var(--text); }   /* 此前写的 --fg 从未定义（改版公共骨架的主题看护查出） */
.dropzone .acts { justify-content: center; }
/* 文件选择框藏在 <label> 后面：**不用 display:none**——那样的框在无头浏览器里塞不进文件（验收行当场红），
   且读屏软件也够不着。用「留在排版里但看不见」的老办法 */
.filepick { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.listbar {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
  position: sticky; top: -18px; z-index: 2; background: var(--surface); padding: 6px 0;   /* 吸顶：检索与动作随时够得着；-18px 抵掉 .content 的上内边距，贴住身份栏 */
}
.search { flex: 1 1 220px; min-width: 180px; }
/* 带标签的列表栏（人员页）：标签与控件同一字号档（标签 13px 正文色、控件 14px），控件同高、底边对齐；组织字段按内容伸展 */
.listbar.labeled { align-items: flex-end; gap: 10px 12px; }
.listbar .field { margin: 0; flex: 0 0 auto; min-width: 150px; }
.listbar .field label { font-weight: 500; font-size: 13px; color: var(--text); margin-bottom: 4px; white-space: nowrap; display: block; line-height: 18px; }
.listbar .field label .count, .listbar .field label .catline { margin-left: 6px; font-weight: 400; }
.listbar.labeled .search { flex: 1 1 220px; max-width: 360px; }
.listbar .field.grow { flex: 1 1 320px; min-width: 260px; max-width: 560px; }   /* 组织字段按剩余空间伸展、封顶；选中长路径在按钮里截断（按钮自己 overflow:hidden）。字段本身不许 overflow:hidden——弹出层在它里面，聚焦检索框时浏览器会把被裁掉的弹层滚进视口，弹层就跳到按钮上、列表被裁没（2026-09-16 用户实机看见） */
.listbar .field.grow > .picker { min-width: 0; }
.listbar.labeled input, .listbar.labeled select, .listbar.labeled .picker-btn, .listbar.labeled .btn { height: 34px; box-sizing: border-box; }

/* ── 登记表的查看方式与分组表（2026-09-17 用户：按数据源／按功能分组分层看）──────────────── */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.seg-btn { background: var(--surface); border: 0; border-left: 1px solid var(--line); padding: 6px 10px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg-btn:first-child { border-left: 0; }
.seg-btn[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
tr.grp > td { background: var(--surface-2); padding: 6px 10px; }                 /* 组头：一格跨全行，可收展 */
tr.grp .tog { font-weight: 600; }
tr.grp .tog .caret { display: inline-block; width: 1em; color: var(--muted); }
tr.grp.sub > td { background: transparent; padding-left: 26px; border-bottom: 1px dashed var(--line-soft); }   /* 二级组头（数据源下的查询执行通道） */
tr.grp.sub .tog { font-weight: 500; }
.chipx.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.grp-tag { margin-left: 8px; white-space: nowrap; }                                 /* 平铺／按数据源看时标识旁的功能分组 */

/* ── 组织节点选择器（§七.3 检索式，不是平面下拉）──────────────── */
.picker { position: relative; min-width: 0; max-width: 100%; }
.picker-cur > .picker-btn { min-width: 0; overflow: hidden; }
.picker-cur { display: flex; align-items: center; gap: 4px; }
.picker-btn { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; cursor: pointer; }
.picker-btn > b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* 名字优先占位、放不下才截；路径只在有余地时显示（完整文字在 title） */
.picker-btn > .catline { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-btn > .catline:first-child { font-size: inherit; }  /* 留空时的「组织：不限」与旁边的下拉同字号；跟在名字后面的路径才是小字 */
.picker-clear { padding: 5px 9px; line-height: 1; }
.picker-btn .caret { margin-left: auto; color: var(--muted); font-size: 11px; }
.picker-pop { position: absolute; z-index: 12; top: calc(100% + 4px); left: 0; min-width: 100%; width: max(100%, 380px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; }
.picker-q { width: 100%; margin-bottom: 6px; }
.picker-list { max-height: 320px; overflow: auto; display: flex; flex-direction: column; }
.picker-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; border-radius: var(--radius); padding: 5px 8px; cursor: pointer; }
.picker-item.active, .picker-item:hover { background: var(--surface-2); }
.picker-item[aria-selected="true"] > span:first-child::before { content: '✓ '; color: var(--accent); }
.picker-path { color: var(--muted); font-size: 12px; }
.picker-more { padding: 4px 8px; }

/* ── 主体选择器（检索＋下拉选人）：类别下拉按内容收窄，「具体是谁」占余下宽度 ── */
.subject-pick { display: flex; gap: 6px; align-items: center; flex: 1 1 auto; min-width: 0; }
.subject-pick > .subject-kind { flex: 0 0 auto; width: auto; }
.subject-pick > .picker, .subject-pick > .subject-raw { flex: 1 1 auto; min-width: 12em; }
/* 类别下拉与右边的值一样高、竖直居中（负责人走查 15-1-8：“选一类”与值大小不一、没对齐）：Safari 的原生下拉不认内边距与高度，
   去掉原生外观、自画下箭头；值按钮不再按内容撑高（选了人带 24px 头像时会高出一截），与 `.audit-person`、`.listbar.labeled` 同为 34px */
.subject-pick > .subject-kind { -webkit-appearance: none; appearance: none; height: 34px; box-sizing: border-box; padding: 0 26px 0 8px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 10px 6px; }
.subject-pick .picker-cur > .picker-btn, .subject-pick > .subject-raw { height: 34px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
.subject-id { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.subject-cur > .person, .subject-cur > .named { flex: 0 1 auto; min-width: 0; overflow: hidden; }   /* 名字按内容占位；只有小字与编号都让光了还放不下才截 */
.subject-cur .person-name, .subject-cur .named-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 名字不折行，地方不够先让标识 */
.subject-cur .person-sub, .subject-cur .named-sub { display: none; }   /* 当前值只占一行、与旁边输入框同高；单元自带的那行小字不画，区分用的小字另画在名字后面 */
.subject-cur .avatar, .subject-item .avatar { width: 24px; height: 24px; font-size: 11px; }   /* 下拉与当前值里的名片单元压小一号，与输入框同高 */
.subject-cur .tile, .subject-item .tile { width: 24px; height: 24px; }
.picker-search { width: 100%; margin-bottom: 6px; }
.picker-search > input.picker-q { width: auto; margin-bottom: 0; }
.subject-cur > .subject-id { flex: 1 1 0; max-width: max-content; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 截断次序：编号（缺省本来不画）→ 区分小字 → 名字。小字与编号起步宽度为 0、只分名字占完后的余地（小字先分、到它自己的宽度为止），
   所以地方不够时它们先没、名字最后才截 */
.subject-cur > .subject-hint { flex: 1000 1 0; max-width: max-content; }
/* 勾上「显示内部编号」时编号贴在行右端、紧挨下拉箭头（两处 margin-left: auto 会把余地对半分，编号就落在行中间） */
html[data-ids="show"] .subject-cur > .uid + .caret { margin-left: 4px; }
/* 没有名字可念（目录里查不到、念不出名字）时编号画在名字的位置，不论「显示内部编号」开关 */
.subject-cur > .subject-id-name { flex: 0 1 auto; max-width: none; margin-left: 0; font-size: 12px; }
/* 状态小标（已停用、已到期、目录里查不到、念不出名字）：与区分小字、编号同样起步宽度 0、只分名字占完后的余地，且排在它们前面分；
   最窄留左内边距＋圆点（全句在按钮的悬停里）。截断次序于是：编号 → 区分小字 → 小标的字 → 名字（审计人员筛选最窄 140px 时人名照样看得见） */
.subject-cur > .subject-state { display: inline-flex; align-items: center; gap: 4px; flex: 1000000 1 0; max-width: max-content; min-width: 22px; overflow: hidden; }
.subject-state-d { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.subject-state-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-list > .picker-err { color: var(--danger); }
.subject-raw-l { flex: 0 0 auto; align-self: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.picker-btn.bad { border-color: var(--danger); }
.subject-item .subject-main { display: flex; align-items: baseline; gap: 8px; width: 100%; }
.picker-item:disabled { opacity: .55; cursor: not-allowed; }
.subject-cond { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.subject-cond > .and { color: var(--muted); font-size: 12px; flex: 0 0 auto; width: 1.5em; text-align: center; }
.count { color: var(--muted); font-size: 12px; }
.pager {
  display: flex; gap: 4px; align-items: center; margin-top: 10px;
  position: sticky; bottom: -24px; z-index: 2; background: var(--surface); padding: 8px 0 2px; border-top: 1px solid var(--line);   /* 吸底：不用滚到底才找得到分页；-24px 抵掉 .content 的下内边距 */
}
.pager .pos { color: var(--muted); font-size: 12px; margin-left: 6px; }
.pager { justify-content: flex-end; }
.pager > .pos:first-child { margin: 0 auto 0 0; font-size: 13px; }
.pg { min-width: 32px; }
/* 改版公共骨架：当前页浅强调底描边（稿），「共 N 条」靠左、其余靠右 */
.pg[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ── 说明块（§十.4 机制性提示不挂全局开关）──────────────────── */
.note { display: flex; gap: 8px; padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); margin: 8px 0; font-size: 13px; }
.note.bad { border-color: var(--danger); background: var(--danger-soft); }
.note.warn { border-color: var(--warn); background: var(--warn-soft); }
.catline { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); padding: 24px; text-align: center; }

/* ── 页签 ─────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px 22px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 2px; cursor: pointer; color: var(--muted); font-size: 14px; }
.tab-n { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ── 表单 ─────────────────────────────────────────────────── */
.form { display: grid; gap: 12px; }
/* 数据源「上游认证」一格里嵌的认证编辑器：与字段标题、「配置／清掉」那一行隔开；内部各格与试打按钮靠 .form 的栅格间距隔开，按钮不贴着上方下拉 */
.auth-body { margin-top: 10px; }
.field label { display: block; font-size: 13px; margin-bottom: 4px; font-weight: 600; }
.field label.chk, label.chk { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; margin: 0; font-size: 13px; }  /* 勾选项：勾与文字同行，不继承字段标题的块级与粗体 */
/* 勾选项里的勾与单选钮压掉全站 input 的 width: 100%、不伸不缩：否则勾要占满整项，说明被挤成两三个字宽（登记第 ⑤ 步「对外出网」）；
   Safari 里还会被压成 0 宽，几项文字挤在一起（授权行「动作」一格） */
label.chk > input[type="checkbox"], label.chk > input[type="radio"] { flex: 0 0 auto; }
.req { color: var(--danger); }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.err { color: var(--danger); font-size: 12px; margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.chain {
  margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--accent);
  background: var(--accent-soft); border-radius: var(--radius); font-size: 12px;
}
/* 格名与值按首行基线对齐（地图十三走查 13-2-9：格名 12px、值里 22px 高的小标或 14px 的字，按格顶对就上下错开） */
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; align-items: baseline; }
dl.kv dt { color: var(--muted); font-size: 12px; }
dl.kv dd { margin: 0; }
/* 键值表里跟在编号后面的动作钮（审计详情「按此会话筛」「按这个号查」）：按钮样式、与编号隔开，不贴在一起（地图八票 123 走查、票 126） */
dl.kv dd .kv-act { margin-left: 10px; vertical-align: middle; }

/* ── 抽屉（§十.1 丙档；宽档 960px，位置量只在这里）──────────── */
/* 层级：列表栏吸顶带 z-index 2，抽屉与遮罩必须压在它上面——否则「检索…」会画到抽屉上（2026-09-11 用户实机看见） */
/* 地图八票 120：遮罩与抽屉都停在助手侧边栏（或把手）左侧（窄屏是上方）——抽屉与助手互不遮挡，抽屉底部的按钮任何时候看得见、点得到 */
.scrim { position: fixed; inset: 0 var(--ai-dock-r) var(--ai-dock-b) 0; background: rgba(0, 0, 0, .35); border: 0; padding: 0; z-index: 10; }
.drawer {
  position: fixed; top: 0; right: var(--ai-dock-r); bottom: var(--ai-dock-b); width: min(var(--drawer-w), calc(96vw - var(--ai-dock-r))); z-index: 11;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 16px 18px; overflow: auto; display: flex; flex-direction: column; gap: 10px;
}
.drawer.narrow { width: min(var(--drawer-narrow), calc(96vw - var(--ai-dock-r))); }
.drawer h2 { margin: 0; font-size: 16px; }
/* 改版公共骨架：头（标题＋右上角关闭）、体（自己滚）、底（靠右：取消／关闭在前、主按钮最右） */
.drawer { padding: 0; overflow: hidden; gap: 0; }
.drawer-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-x { flex: none; display: inline-flex; padding: 4px; border: 0; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; }
.drawer-x:hover { background: var(--surface-2); color: var(--text); }
.drawer-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.drawer .foot { flex: none; margin-top: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }

/* ── 授权行编辑器（登记页授权步与变更授权抽屉共用；§十一.127：行头摘要 ＋ 标签列网格，说明进「?」、每行不重复常驻说明）── */
.grant-edit { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px 10px; margin-bottom: 8px; }
.pickbox { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; margin-bottom: 8px; }  /* 按分组勾选表：多时滚动，不把抽屉撑长 */
.pickbox .pickgrp { margin: 2px 0 6px; }
.pickbox label.pickhead, .pickbox label.pickrow { display: flex; white-space: nowrap; gap: 6px; }  /* 压过 .field label.chk 的 inline-flex：一件一行，类别名不折成竖排 */
.pickbox label.pickrow { padding-left: 22px; }
.pickbox label input[type="checkbox"] { flex: 0 0 auto; margin: 0; }  /* 不吃 .field 里输入框撑满整行的规则：勾在左、名字紧跟 */
.grant-edit.all { border-color: var(--warn); }
.grant-edit.dup { border-color: var(--danger); }  /* 主体与前面某行相同：描红、拦提交 */
.help.act-only { margin-left: 0; vertical-align: baseline; }
.grant-act-only { cursor: help; border-bottom: 1px dotted var(--muted); }  /* 单动作类别写死的动作名：说明在站内悬停气泡（.help-tip）里，点线示意可悬停 */
.grant-edit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.grant-edit-no { color: var(--muted); font-size: 12px; min-width: 1.2em; }
.grant-edit-del { margin-left: auto; color: var(--danger); border-color: var(--danger); }
.grant-edit-del:hover { background: var(--danger-soft); }
.grant-edit-grid { display: grid; grid-template-columns: 4em 1fr; gap: 6px 8px; align-items: center; }  /* 标签列放得下「范围说明」四个字 */
.grant-edit-lab { color: var(--muted); }  /* 行标签与输入框同字号（2026-09-17 用户：标签比输入框小许多） */
.grant-edit .chk { white-space: nowrap; }  /* 动作勾选项「查询（query）」不折成两行 */
.grant-edit-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }  /* 登记页的部门与岗位两栏等高并排 */
.grant-edit-two > .gcell { display: flex; align-items: center; gap: 6px; min-width: 0; }  /* 小字标 ＋ 输入框：填了值占位符没了也知道这格是哪个（类名别叫 sub——那是页面副标题的全局样式，撞上会矮一号、多出底边距） */
.grant-edit-two > .gcell > .catline { white-space: nowrap; font-size: inherit; }
.grant-edit-two input { flex: 1 1 auto; width: auto; min-width: 0; }
.subject-row > .ss { flex: 0 1 auto; min-width: 8em; max-width: 18em; }  /* 岗位、组、个人三个检索式下拉（2026-11-17）：留空的“组：不限”与组织选择器同用淡色；个人名字长时截断，别撑满整行 */
.subject-add-row { margin-top: 6px; align-items: flex-start; }
.subject-add { flex: 1 1 20em; max-width: 28em; }  /* 编辑器底部“按名字找主体加一行”的检索框 */
.subject-add > .picker-search { margin-bottom: 0; }
/* 有录入／有选择的框边框换成强调色，一眼分出「这项在起作用」与留空不限（2026-09-17 用户建议）；命中 0 人的描黄是行内样式，压得过它 */
.grant-edit input:not([type="checkbox"]):not(:placeholder-shown), .grant-edit select.on, .grant-edit .picker-btn.on { border-color: var(--accent); }
@media (max-width: 640px) { .grant-edit-two { grid-template-columns: 1fr; } }

/* ── 分步表单（§十.1 乙档）──────────────────────────────────── */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.step { border: 1px solid var(--line); border-radius: 14px; padding: 3px 12px; font-size: 13px; color: var(--muted); }
.step[aria-current="step"] { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.step.done { border-color: var(--ok); color: var(--ok); }

/* ── 登记／变更页（接入图票 07）：步骤条可点回、回文样例、字段芯片 ── */
.steps button.step { background: var(--surface); cursor: pointer; font: inherit; }
.steps button.step:disabled { cursor: default; opacity: .7; }
.pre { white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; max-height: 320px; overflow: auto; background: var(--surface-2); padding: 8px; border-radius: var(--radius); margin: 6px 0 0; }

/* ── 筛选区（成熟控制台的形态：条件横排一行、控件定宽、常用条件在首屏、其余收进「更多条件」）── */
/* 判据：进页第一屏就看得见结果表的前几行——筛选区不许占掉半个内容区 */
.filters-card { padding: 12px 14px 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; }
.filters .field { flex: 0 0 auto; width: var(--filter-w, 220px); margin: 0; }
.filters .field label { font-weight: 500; font-size: 12px; color: var(--muted); margin-bottom: 3px; white-space: nowrap; }
.filters .field.wide { width: calc(var(--filter-w, 220px) * 2 + 14px); }
.filters .range { display: flex; gap: 6px; align-items: center; }
.filters .range input { min-width: 0; }
.filters .range .dash { color: var(--muted); flex: none; }
.filters .f-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 8px; align-items: center; width: auto; flex: 1 0 auto; margin-left: auto; padding-bottom: 1px; }  /* 动作区吃掉本行剩下的宽度、靠右、放不下就换行，不压到勾选项上（2026-09-17 用户：布局错乱） */
.filters .f-acts label.checkline { display: inline-flex; align-items: center; gap: 4px; flex: none; margin: 0 6px 0 0; font-size: 13px; color: var(--text); white-space: nowrap; }  /* 「只看变更」是勾选项，不是字段标题：不继承 .field label 的块级、灰色小字与可收缩 */
.filters .f-acts label.checkline input { margin: 0; }
.filters .f-acts .linklike { color: var(--accent); font-size: 12px; padding: 0 4px; white-space: nowrap; }
.pagehead { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.pagehead > div { flex: 1 1 auto; min-width: 0; }
.pagehead .sub { margin-bottom: 0; }
.pagehead .linklike { color: var(--accent); font-size: 12px; flex: none; margin-top: 6px; white-space: nowrap; }
.about { margin-top: 10px; }
.about > summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.about > .hint { margin-top: 6px; }

/* ── 字段说明的「?」：悬停／聚焦／点开才出，页面上不平铺说明 ── */
.help { position: relative; display: inline-block; vertical-align: middle; margin-left: 2px; }
.help-btn {
  width: 15px; height: 15px; padding: 0; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--muted); font-size: 10px; line-height: 13px; cursor: help; vertical-align: 1px;
}
.help-btn:hover, .help:focus-within .help-btn, .help.open .help-btn { border-color: var(--accent); color: var(--accent); }
.help-tip,
[data-code-tip]:hover::after,
[data-code-tip]:focus-visible::after {
  display: none; position: absolute; left: 0; top: 20px; z-index: 6; width: max-content; max-width: min(340px, 70vw);
  padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
  color: var(--text); font-size: 12px; font-weight: 400; line-height: 1.55; white-space: normal; text-align: left;
}
.help.flip .help-tip { left: auto; right: 0; }
.help:hover .help-tip, .help:focus-within .help-tip, .help.open .help-tip { display: block; }
/* 点开的再点一下或按 Esc 即收：压住悬停与聚焦，直到鼠标离开这一处（同特异度、写在后面） */
.help.shut:hover .help-tip, .help.shut:focus-within .help-tip { display: none; }
/* 「?」里的段与列表（§十一.300）：段与段、段与列表之间空约半行；列表小圆点、缩进一格；加粗半粗、不换色 */
.help-tip .help-p { display: block; }
.help-tip .help-ul { margin: 0; padding-left: 16px; list-style: disc; }
.help-tip .help-p + .help-p, .help-tip .help-p + .help-ul, .help-tip .help-ul + .help-p, .help-tip .help-ul + .help-ul { margin-top: 6px; }
.help-tip b { font-weight: 600; }

/* ── 错误码的我方提示（§十一.230）：码不进正文，挂在出错那一块的 data-code-tip 上；悬停或键盘聚焦即出，外观同上面的「?」气泡 ── */
[data-code-tip] { position: relative; }
[data-code-tip]:hover::after, [data-code-tip]:focus-visible::after { content: attr(data-code-tip); display: block; top: calc(100% + 4px); }
/* 量过位置的（页面脚本在悬停、聚焦时记下）按窗口定位：抽屉正文、表格外框这类滚动容器裁不掉；下方放不下时开在上方 */
[data-code-tip][data-code-tip-at]:hover::after, [data-code-tip][data-code-tip-at]:focus-visible::after { position: fixed; left: var(--code-tip-x, 0); top: var(--code-tip-y, 0); transform: translateY(var(--code-tip-shift, 0)); z-index: 60; }

/* ── 分页栏：页码省略、页容档、跳页；窄容器里各段换行，不溢出 ── */
.pager { flex-wrap: wrap; gap: 6px 10px; }
.pager .pgs { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pager .pgsize { width: auto; padding: 3px 6px; font-size: 12px; }
.pager .pg-gap { min-width: 22px; text-align: center; color: var(--muted); }
.pager .jump { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.pager .jump input { width: 56px; padding: 3px 6px; font-size: 12px; }
.pager .jump input::-webkit-outer-spin-button, .pager .jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* 审计结果表：行只放识别与定位所需的列，详情进抽屉 */
td.reason { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 票 43 第二批：块标题（标题＋「?」＋右侧动作位）、结果行的截断单元格 ── */
.sechead { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.sechead h3 { margin: 0; font-size: 14px; }
.sechead .sechead-acts { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.sechead + .tablewrap { margin-top: 0; }
td.desc { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
span.desc { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.oneline { white-space: nowrap; }
td.oneline .badge { vertical-align: middle; }

/* 票 43 第二批：表格里的折叠摘要（授权管理主列表）——缺省一行，点开逐条 */
.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary .fold-line { overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.fold > summary .catline::after { content: ' ▾'; }
.fold[open] > summary .catline::after { content: ' ▴'; }
.fold > .fold-body { margin-top: 6px; white-space: normal; }

tr.baseline-acked > td { color: var(--muted); }  /* 截尾回退已记核实：不再提亮、字转灰，核实人与事由照列（接入图票 33 B1） */
.nowrap { white-space: nowrap; }  /* 维度表操作列（注销不了、在用条数、「?」、看规则）、规则表的维度／有效期／登记列不折行 */
th.scope-subj { min-width: 14em; }  /* 规则表主体列：取值展开时不被挤成一字一行 */
.scope-values { max-height: 160px; margin-top: 4px; }  /* 规则表展开的全部取值：带滚动的盒子，不撑高整行 */

/* ── 改版公共骨架：公共组件（kit.js／charts.js／icons.js）─────────────────
   颜色只用上面的主题变量（深浅两套各一份）；尺寸照改版设计稿。各改版页一律用这一套，不各页另写。 */
.icon { flex: none; vertical-align: middle; }
.btn .icon { margin: -2px 6px 0 -2px; }
.btn.sm { padding: 2px 10px; font-size: 12px; }
a.btn { display: inline-block; text-decoration: none; color: inherit; }
a.btn.primary { color: #fff; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* 页头：标题＋一句副标题｜右侧更新于、刷新、主按钮；面包屑在上 */
.phead { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.phead-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; }
.phead-t { min-width: 0; }
.phead h1 { font-size: 22px; margin: 0; line-height: 1.35; }
.phead .sub { margin: 2px 0 0; font-size: 14px; }
.phead-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.updated { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; white-space: nowrap; }

/* 面包屑 */
.bcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; }
.bcrumb-i { display: inline-flex; align-items: center; gap: 4px; }
.bcrumb a, .bcrumb .linklike { color: var(--accent); text-decoration: none; }
.bcrumb [aria-current="page"], .bcrumb .icon { color: var(--muted); }

/* 卡片块 */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* 数字卡片 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat-l { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.stat-vrow { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.stat-v { font-size: 28px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-v.tone-ok { color: var(--ok); }
.stat-v.tone-warn { color: var(--warn); }
.stat-v.tone-bad { color: var(--danger); }
.stat-v.tone-info { color: var(--accent); }
.stat-u { color: var(--muted); font-size: 14px; }
.stat-f { color: var(--muted); font-size: 13px; }

/* 状态灯 */
.sdot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.sdot-d { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.sdot-ok .sdot-d { background: var(--ok); }
.sdot-warn .sdot-d { background: var(--deny); }
.sdot-bad .sdot-d { background: var(--danger); }
.sdot-info .sdot-d { background: var(--accent); }
.sdot-off .sdot-d { opacity: .6; }
.sdot-sub { color: var(--muted); }
.sdot-sub::before { content: '· '; }

/* 胶囊标签 */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.pill-ok { color: var(--ok); background: var(--ok-soft); }
.pill-warn { color: var(--warn); background: var(--warn-soft); }
.pill-bad { color: var(--danger); background: var(--danger-soft); }
.pill-info { color: var(--accent); background: var(--accent-soft); }
.pill-int { color: var(--internal); background: var(--internal-soft); }
.pill-kind { color: var(--muted); background: var(--surface-2); }

/* 分段按钮 */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 7px; background: var(--surface-2); }
.segmented button { height: 28px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; white-space: nowrap; }
.segmented button[aria-checked="true"] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.segmented.off { opacity: .55; }
.segmented button:disabled { cursor: not-allowed; }
.searchbox.off { opacity: .55; }
.searchbox input:disabled { cursor: not-allowed; }

/* 快速筛选胶囊 */
.qf { display: flex; flex-wrap: wrap; gap: 6px; }
.qf-btn { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); font-size: 13px; cursor: pointer; white-space: nowrap; }
.qf-btn:hover { border-color: var(--accent); }
.qf-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.qf-n { margin-left: 6px; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }

/* 检索框 */
.searchbox { display: inline-flex; align-items: center; gap: 8px; height: 34px; min-width: 200px; max-width: 100%; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.searchbox:focus-within { border-color: var(--accent); }
.searchbox > .icon { color: var(--muted); }
.searchbox input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; outline: 0; }
.searchbox input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.searchbox-x { display: inline-flex; padding: 2px; border: 0; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; }
.searchbox-x:hover { color: var(--text); background: var(--surface-2); }

/* 下拉：原生 select 套壳 */
.dd { position: relative; display: inline-flex; align-items: center; max-width: 100%; }
.dd select { -webkit-appearance: none; appearance: none; width: auto; max-width: 100%; height: 34px; padding: 0 30px 0 10px; font-size: 13px; cursor: pointer; }
.dd.dd-ic select { padding-left: 32px; }
.dd > .icon { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.dd > .dd-caret { left: auto; right: 10px; }

/* 个人名片单元 */
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; }
.person-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.person-name { font-weight: 600; }
.person-sub { overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.person.gone { opacity: .65; }
.person.gone .avatar { background: var(--surface-2); color: var(--muted); }
.person.gone .person-name { font-weight: 400; }

/* 带图标的名称单元 */
.named { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.tile { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.tile.tone-info { background: var(--accent-soft); color: var(--accent); }
.tile.tone-ok { background: var(--ok-soft); color: var(--ok); }
.tile.tone-warn { background: var(--warn-soft); color: var(--warn); }
.tile.tone-bad { background: var(--danger-soft); color: var(--danger); }
.tile.tone-int { background: var(--internal-soft); color: var(--internal); }
.tile.tone-purple { background: var(--purple-soft); color: var(--purple); }
.tile.tone-orange { background: var(--orange-soft); color: var(--orange); }
.named-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.named-name { font-weight: 600; }
.named-sub { overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }

/* 资产组三页（数据源、资产登记表、授权管理）：列表工具条、整行可点的表、明细页头、时间线、生效三步、待处理卡 */
table.rows td { vertical-align: middle; padding: 10px; }
table.rows tr.click { cursor: pointer; }
table.rows tr.click:hover > td { background: var(--surface-2); }
td.go { width: 36px; text-align: right; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; }
.iconbtn:hover { border-color: var(--line); color: var(--text); }
/* 读屏可读、屏上不占地方的字。钉在所在容器的左边（left: 0）：此前按它在宽表格里的原位定位，窗宽约 800px 时把整页撑出横向滚动条（地图十一票 15，收遗留 L-49） */
.sr { position: absolute; left: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.dhead { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 14px; }
.dhead-t { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dhead-t .tile { width: 46px; height: 46px; border-radius: 10px; }
.dhead h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 22px; }
.dhead .sub { margin: 2px 0 0; font-size: 13px; }
.dhead-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols2 > div { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 960px) { .cols2 { grid-template-columns: minmax(0, 1fr); } }
dl.grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 0; font-size: 13px; }
dl.grid dt { color: var(--muted); }
dl.grid dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.progress-row { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 0 0 18px; }
.timeline > li:not(:last-child)::before { content: ''; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--line-soft); }
.timeline .tile { width: 34px; height: 34px; }
.tl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tl-head b { font-size: 14px; }
.tl-meta { color: var(--muted); font-size: 12px; }
.tl-body { margin-top: 4px; font-size: 13px; min-width: 0; }
.tl-reason { margin-top: 4px; color: var(--muted); font-size: 13px; }
.tl-more > summary { cursor: pointer; color: var(--muted); font-size: 12px; margin-top: 4px; }
.steps3 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps3 > li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.steps3 .tile { width: 30px; height: 30px; border-radius: 7px; }
.steps3 b { display: block; font-size: 14px; }
.steps3 .catline { font-size: 12px; }
.todo3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.todo { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.todo-t { flex: 1 1 auto; min-width: 0; }
.todo-t b { font-size: 18px; }
.todo-t .catline { display: block; }
.cover { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cover .barlist { flex: 1 1 320px; }
.subj-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill .pill-n { margin-left: 2px; color: var(--muted); font-weight: 400; }
.todo-more { margin-bottom: 12px; }
.todo-more:not([open]) { display: none; }
details.try > summary { cursor: pointer; list-style: none; }
details.try > summary::-webkit-details-marker { display: none; }
details.try > summary h2 { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 15px; }
details.try > summary h2::before { content: '▸'; color: var(--muted); font-size: 12px; }
details.try[open] > summary h2::before { content: '▾'; }

/* 全局横幅：一行短句＋动作 */
.banner { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-size: 13px; }
.banner-icon { color: var(--accent); }
.banner-warn { border-color: var(--warn); background: var(--warn-soft); }
.banner-warn .banner-icon { color: var(--warn); }
.banner-bad { border-color: var(--danger); background: var(--danger-soft); }
.banner-bad .banner-icon { color: var(--danger); }
.banner-ok { border-color: var(--ok); background: var(--ok-soft); }
.banner-ok .banner-icon { color: var(--ok); }
.banner-line { flex: 1 1 auto; min-width: 0; }
.banner-title { font-weight: 600; }
.banner-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* 图表：横条、排行条、堆叠条、柱状、折线、趋势小线、环形、图例 */
.hbar { position: relative; flex: 1 1 auto; min-width: 40px; height: 8px; border-radius: 4px; background: var(--surface-2); }
.hbar-fill { height: 100%; border-radius: inherit; background: var(--c1); }
.hbar-fill.tone-ok { background: var(--ok); }
.hbar-fill.tone-warn { background: var(--deny); }
.hbar-fill.tone-bad { background: var(--danger); }
.hbar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); opacity: .55; }
.barlist { display: flex; flex-direction: column; gap: 12px; }
.barlist-row { display: grid; grid-template-columns: minmax(80px, 150px) 1fr 48px; align-items: center; gap: 10px; font-size: 13px; }
.barlist-n { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.stackbar { display: flex; height: 12px; overflow: hidden; border-radius: 3px; background: var(--surface-2); }
.stackbar-seg { height: 100%; }
.chart { display: block; max-width: 100%; height: auto; }
.chart .grid { stroke: var(--line-soft); }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart-empty { padding: 24px; color: var(--muted); font-size: 13px; text-align: center; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.legend-key { width: 10px; height: 10px; border-radius: 2px; }
.legend-key.line { width: 14px; height: 2px; border-radius: 1px; }
.spark { display: block; }
.donut { position: relative; flex: none; }
.donut svg { display: block; }
.donut-track { stroke: var(--surface-2); }
.donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.donut-v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.donut-sub { color: var(--muted); font-size: 12px; }

/* 事由输入：「常用」胶囊一行，「AI 起草」钮在标题右侧（给了起草函数才出现） */
/* 标题仍是 .field 的直接孩子（各页与看护都按「标题的父级里那个输入框」找事由框），「AI 起草」钮摆到右上角 */
.field.reason { position: relative; }
.field.reason > .reason-ai { position: absolute; top: -3px; right: 0; }
.reason-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.reason-drafted { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--accent); font-size: 12px; }
.reason-ai-why, .reason-ai-err { margin-top: 4px; font-size: 12px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }   /* 身份栏的头像字 */

/* ── 模型网关页（控制台改版）：页内布局，颜色只走主题变量 ── */
.mg-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
@media (max-width: 900px) { .mg-two { grid-template-columns: minmax(0, 1fr); } }
.mg-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.mg-bk { margin-bottom: 12px; }
.mg-bk-l { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.mg-bk-n { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.mg-h2 { font-size: 15px; margin: 8px 0 12px; }
.mg-backends { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.mg-backends .panel { margin-bottom: 0; }
.mg-backend-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mg-env { margin-left: 8px; color: var(--muted); font-size: 12px; }
.mg-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: 13px; }
.mg-kv dt { color: var(--muted); white-space: nowrap; }  /* 格名一行写完（「显式缓存标记」六个字不折行）；列宽随最长的格名 */
.mg-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mg-chip { display: inline-block; padding: 1px 8px; margin: 0 6px 4px 0; border-radius: 4px; background: var(--surface-2); font-size: 12px; }
.mg-more summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.mg-more .mg-kv { margin-top: 8px; }
.mg-policy { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.mg-pol { display: flex; align-items: flex-start; gap: 10px; }
.mg-pol > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.mg-pol-sub { font-size: 12px; }
.mg-pol-sub.tone-warn { color: var(--warn); }
.mg-pol-sub.tone-bad { color: var(--danger); }
.mg-count { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 9px; background: var(--surface-2); text-align: center; font-size: 12px; }
table.mg-t { min-width: 0; font-size: 13px; }
table.mg-t th { color: var(--muted); font-weight: 500; text-align: left; padding: 0 10px 8px; border-bottom: 1px solid var(--line); }
table.mg-t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
table.mg-t .num { text-align: right; font-variant-numeric: tabular-nums; }
.mg-sub-gap { margin-top: 16px; }
.mg-acts { display: inline-flex; align-items: center; gap: 8px; }
.mg-effect { margin-top: 4px; color: var(--danger); font-size: 12px; }
.mg-confirm { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--danger); }
.mg-lock { display: inline-flex; align-items: center; gap: 6px; }
.mg-add { display: flex; gap: 8px; margin: 12px 0; }
.mg-add input { flex: 1; min-width: 0; }
.mg-preview { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13px; margin-bottom: 12px; }
.mg-edit label, .mg-confirm { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mg-edit input[type="checkbox"] { flex: 0 0 auto; margin: 0; }
.mg-edit td:last-child, .mg-edit th:last-child { width: 1%; white-space: nowrap; }
.mg-trend { max-width: 640px; }
/* 地图十五票 03：「安全前言」一块——原文照段落显示（保留换行、长串折行），编辑框下的字数计数 */
.mg-preface { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.mg-preface-edit { width: 100%; min-height: 160px; box-sizing: border-box; font: inherit; line-height: 1.6; }
.mg-preface-count { margin: 4px 0 12px; font-size: 12px; color: var(--muted); text-align: right; }
.mg-preface-count.over { color: var(--danger); }

/* 模型用量页与成员明细页（改版）：工具栏、宽表、模型色块、费用占比、选列 */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.toolbar-gap { flex: 1 1 auto; }
.list-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.list-foot .pager { margin: 0; }
.tbl-wrap { overflow-x: auto; min-width: 0; }
table.grid { width: 100%; min-width: 0; font-size: 14px; }
table.grid th { font-weight: 500; font-size: 13px; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
table.grid td { padding: 12px; vertical-align: middle; }
table.grid.wide th, table.grid.wide td { white-space: nowrap; }
table.grid td.strong { font-weight: 600; }
table.grid .th-note { font-weight: 400; }
table.grid th.share, table.grid td.share { width: 26%; min-width: 160px; }
table.grid td.trend { width: 100px; }
.th-sort { color: inherit; font-weight: inherit; white-space: nowrap; }
.th-sort.on { color: var(--text); font-weight: 600; }
.muted { color: var(--muted); }
.mdl { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.swatch { flex: none; width: 10px; height: 10px; border-radius: 2px; }
.share-cell { display: flex; align-items: center; gap: 10px; }
.share-n { min-width: 36px; color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
/* 按模型那一行底下的细分行（按后端、兜底来的）：底色浅一档、字小一号、名字缩进——它的数已含在上面那一行里 */
table.grid tr.usage-sub > td { background: var(--surface-2); padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
.usage-sub-name { display: inline-flex; align-items: baseline; gap: 6px; padding-left: 18px; }
/* 组织视图按层展开（展开钮与组织页同一枚 `.org-tw`）：名字按层级缩进；「本级直属」一行底色浅一档、字小一号 */
.usage-tree { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
/* 地图十六票 27：使用情况“按组织”表——行名一行、下面灰字（并进几个组织、其余是哪几类人）；下级每深一级缩进 22px（行内样式） */
.usage-org { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.usage-org-name, .usage-org > .catline { white-space: nowrap; }                        /* 窄屏不把组织名一字一行地折开，表格自己横向滚 */
td.usage-top { min-width: 12em; }                                                   /* 用得最多的 Skill：三个名字以“、”连，可折行 */
.usage-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.usage-empty > b { color: var(--text); }
table.grid tr.usage-direct > td { background: var(--surface-2); font-size: 13px; }
.btn.icon-btn { padding: 0; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; }
.btn.icon-btn .icon { margin: 0; }  /* 纯图标按钮靠居中摆正，不吃「图标＋文字」按钮的外边距（否则图标左偏 4px、上偏 1px） */
.colpick { position: relative; }
.colpick .btn { display: inline-flex; align-items: center; gap: 6px; }
/* 低于遮罩（10）与抽屉（11）：选列弹层开着时点姓名开抽屉，弹层不许盖在抽屉上 */
.colpick-pop { position: absolute; z-index: 9; top: calc(100% + 4px); right: 0; min-width: 180px; max-height: 360px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.colpick-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: var(--radius); font-size: 13px; cursor: pointer; white-space: nowrap; }
.colpick-item:hover { background: var(--surface-2); }
.colpick-item input { margin: 0; }
.drawer-person { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.drawer-h { margin: 16px 0 8px; font-size: 14px; }

/* ── 内容组两页（共享文件、Skill 库）改版版式 ─────────────────────────────── */
.files-scope { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.files-table td { vertical-align: middle; }
.files-table .named-sub { font-size: 12px; }
/* Skill 库（地图十一票 22 改版，照改版稿）：左表右明细，窄屏上下叠；查看抽屉左文件树、右三页签；出新版抽屉；颜色一律取主题变量 */
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } }
.jobline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.jobline-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.split tr.sel > td { background: var(--accent-soft); }
.split tbody tr { cursor: pointer; }
.split td .badge { margin: 0 4px 4px 0; }
.split td.num .catline { white-space: nowrap; }
.skill-head { display: flex; align-items: flex-start; gap: 12px; }
.skill-head-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.skill-head h2 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.skill-detail { display: flex; flex-direction: column; gap: 14px; }
.skill-sec { display: flex; flex-direction: column; gap: 6px; }
.skill-lines { display: flex; flex-direction: column; gap: 2px; }
.skill-res { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line-soft); }
.skill-res .warnword { font-weight: 400; }
.skill-miss { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.skill-miss-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-head .tl-act { margin-left: auto; display: inline-flex; gap: 6px; }  /* 待复核的那一版「查看」「复核 vN」两颗并排 */
.tl-meta { color: var(--muted); font-size: 12px; }
.tl-body { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.tl-reason { color: var(--muted); font-size: 12px; }
.skill-ai-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--purple-soft); color: var(--purple); font-size: 12px; }
.skill-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
/* 查看抽屉 */
.sv-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sv-body { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 14px; align-items: start; }
.sv-body.tree-hidden { grid-template-columns: 36px minmax(0, 1fr); }
@media (max-width: 760px) { .sv-body, .sv-body.tree-hidden { grid-template-columns: minmax(0, 1fr); } }
.sv-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sv-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.sv-box-h { display: flex; align-items: center; gap: 6px; }
.sv-box-h .iconbtn { margin-left: auto; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); cursor: pointer; }
.iconbtn:hover { color: var(--text); background: var(--surface-2); }
.ftree { display: flex; flex-direction: column; }
.ftree-row { display: flex; align-items: center; gap: 5px; width: 100%; padding: 3px 6px; border: 0; border-radius: 6px; background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; font-size: 13px; }
.ftree-row:hover { background: var(--surface-2); }
.ftree-row.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ftree-row.gone { color: var(--muted); text-decoration: line-through; cursor: default; }
.ftree-row.bad { color: var(--danger); }
.ftree-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftree-size { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ftree-chg { font-size: 11px; white-space: nowrap; }
.ftree-chg.add { color: var(--ok); } .ftree-chg.mod { color: var(--accent); } .ftree-chg.del { color: var(--danger); }
.mk { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; padding: 0; border: 0; flex: none; cursor: pointer; }
.mk-rule { border-radius: 3px; background: var(--warn-soft); color: var(--warn); }
.mk-ai { border-radius: 999px; background: var(--purple-soft); color: var(--purple); }
.mk-exec { border-radius: 3px; background: var(--surface-2); color: var(--muted); cursor: default; }
.ftree-legend { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.ftree-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.sv-script { display: flex; flex-direction: column; gap: 1px; padding: 4px 0; border-top: 1px solid var(--line-soft); }
.sv-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sv-main .toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 比对与原文：行号列、增删底色、标记列 */
.dfile { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dfile-h { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dfile-n { margin-left: auto; font-size: 12px; }
.dfile-n .p { color: var(--ok); } .dfile-n .m { color: var(--danger); margin-left: 6px; }
.dcode { font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.6; overflow-x: auto; }
.dhunk { padding: 2px 10px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.drow { display: grid; grid-template-columns: 44px 44px 36px 14px minmax(0, 1fr); align-items: start; }
.drow.split4 { grid-template-columns: 44px minmax(0, 1fr) 44px 36px minmax(0, 1fr); }
.drow > span { padding: 0 6px; white-space: pre; }
.drow .ln { color: var(--muted); text-align: right; user-select: none; }
.drow .mks { display: inline-flex; gap: 2px; align-items: center; padding: 2px 2px 0; }
.drow.add .tx, .drow .tx.add { background: var(--ok-soft); }
.drow.del .tx, .drow .tx.del { background: var(--danger-soft); }
.drow .tx.none { background: var(--surface-2); }
.drow.focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.frow { display: grid; grid-template-columns: 44px 36px minmax(0, 1fr); align-items: start; }
.frow > span { padding: 0 6px; white-space: pre; }
.frow .ln { color: var(--muted); text-align: right; user-select: none; }
.frow.fm .tx { background: var(--surface-2); }
.frow.focus { outline: 2px solid var(--accent); outline-offset: -2px; }
/* 长行折行而不是被相邻格挡住（左右并排时每边只有半宽）：缩进照留，行号只标第一段 */
.drow > span.tx, .frow > span.tx { white-space: pre-wrap; overflow-wrap: anywhere; }
/* 文件开头的 BOM：不当字画，画一个灰色小标（复制正文时不带它） */
.bom-tag { display: inline-block; margin-right: 4px; padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-2); color: var(--muted); font-family: inherit; font-size: 10px; line-height: 14px; vertical-align: 1px; user-select: none; cursor: help; }
.fm-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.fm-box table { width: 100%; border-collapse: collapse; }
.fm-box td { padding: 3px 6px; border-top: 1px solid var(--line-soft); vertical-align: top; }
.md-preview h1 { font-size: 18px; margin: 4px 0; } .md-preview h3 { font-size: 15px; margin: 10px 0 4px; }
.md-preview p { margin: 4px 0; } .md-preview .li { display: flex; gap: 6px; margin: 2px 0; }
.md-preview code { font-family: ui-monospace, Menlo, monospace; background: var(--surface-2); padding: 0 4px; border-radius: 4px; }
/* 检查页签：规则检查（方角黄色盾牌）与 AI 辅助审核（圆角紫色星标）分两块 */
.chk-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.chk-block.ai { border-color: var(--purple); }
.chk-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chk-h .btn { margin-left: auto; }
.chk-ic-rule { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); }
.chk-ic-ai { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; background: var(--purple-soft); color: var(--purple); }
.chk-notice { color: var(--purple); font-size: 13px; }
.chk-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: start; width: 100%; padding: 6px 4px; border: 0; border-top: 1px solid var(--line-soft); background: none; color: var(--text); text-align: left; font: inherit; }
.chk-row.hit { cursor: pointer; } .chk-row.hit:hover { background: var(--surface-2); }
.chk-row.on { background: var(--warn-soft); } .chk-row.ai.on { background: var(--purple-soft); }
.chk-row .ok { color: var(--ok); } .chk-row .warn { color: var(--warn); }
/* 规则检查每一项：图标 ＋ 检查项标签 ＋ 本次结论句（地图十三走查 13-1-1）；不通过的那一项下面逐处列出挂在哪、点了跳过去 */
.chk-rule { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); padding: 6px 0 2px; }
.chk-rule-h { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: start; padding: 0 4px 4px; line-height: 1.55; }
.chk-rule-h > span:first-child { display: inline-flex; padding-top: 2px; }
.chk-rule-h .ok { color: var(--ok); } .chk-rule-h .warn { color: var(--warn); }
.chk-rule .chk-row { border-top: 0; padding: 4px; }
.chk-where { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; white-space: nowrap; }
.chk-jump { color: var(--accent); }
.chk-cat { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--purple-soft); color: var(--purple); font-size: 12px; }
.review-bar { flex: 1 1 100%; order: -1; display: flex; flex-direction: column; gap: 8px; }
.review-bar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.review-bar textarea { width: 100%; }
/* 出新版：图标选择、在线编辑 */
.icon-pick { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.icon-grid { display: grid; grid-template-columns: repeat(10, 30px); gap: 4px; }
.icon-grid button, .tone-row button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-grid button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tone-row { display: flex; gap: 4px; align-items: center; margin-top: 6px; }
.tone-row button { border-color: transparent; }
.tone-row button[aria-pressed="true"] { border-color: var(--accent); }
.tone-row .tile { width: 24px; height: 24px; border-radius: 6px; }
.chip-set { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-set .chipx { display: inline-flex; align-items: center; gap: 4px; }
.reach-note { display: flex; gap: 8px; align-items: flex-start; }
.se-files { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
.se-files-h { flex-wrap: wrap; row-gap: 4px; }   /* 出新版「文件」工具条：新建、上传文件、整包上传在 240px 的左栏里排不下一行，换行 */
@media (max-width: 760px) { .se-files { grid-template-columns: minmax(0, 1fr); } }
.se-path { display: flex; gap: 8px; align-items: center; }
.se-path input { flex: 1 1 auto; font-family: ui-monospace, Menlo, monospace; }
.se-editor { display: grid; grid-template-columns: 44px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: 60vh; }
.se-gutter { font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 20px; padding: 6px 6px 6px 0; text-align: right; color: var(--muted); background: var(--surface-2); user-select: none; }
.se-gutter .bad { color: var(--danger); font-weight: 700; background: var(--danger-soft); }
.se-editor textarea { border: 0; border-radius: 0; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 20px; padding: 6px 8px; white-space: pre; overflow-wrap: normal; min-height: 160px; }
/* ── 模型目录页（改版稿「模型目录」「编辑模型」）：左边模型表、右边「员工在工作台里看到」与「可用后端」两张卡 ── */
.cat-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cat-grid { grid-template-columns: minmax(0, 1fr); } }
.cat-side { display: flex; flex-direction: column; min-width: 0; }
.cat-scroll { overflow-x: auto; }
.cat-table { width: 100%; border-collapse: collapse; }
.cat-table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 0 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cat-table td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.cat-n { display: block; font-weight: 600; }
.cat-id { font-size: 12px; color: var(--muted); word-break: break-all; }
.cat-route { display: flex; flex-direction: column; gap: 6px; }
.cat-route-row { display: grid; grid-template-columns: 5em 14px auto; align-items: center; gap: 6px; justify-items: start; }
.cat-route-row > .icon { color: var(--muted); }
.cat-route-preview { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 6px; }
.cat-levels { display: flex; flex-wrap: wrap; gap: 4px; }
.cat-levels .chip { margin: 0; }
.chip.cat-default { border-color: var(--accent); font-weight: 600; }
.cat-picker { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.cat-picker-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.cat-picker-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line-soft); }
.cat-picker-item > .icon { margin-top: 3px; color: var(--accent); }
.cat-picker-t { display: flex; flex-direction: column; line-height: 1.4; }
.cat-picker-foot { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.cat-backend { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.cat-backend + .cat-backend { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.panel-acts .linklike { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 13px; }
.cat-retired { display: flex; flex-direction: column; gap: 6px; }
.cat-retired-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cat-problems { margin: -4px 0 10px; padding-left: 22px; color: var(--danger); font-size: 13px; }
.cat-map-row { margin-bottom: 10px; }
.cat-param { display: inline-flex; align-items: center; gap: 6px; }
.cat-param .mono { font-size: 12px; }
.cat-think { width: 100%; }
/* 模型目录「计价」页签（改版稿「编辑模型（分时段计价）」）：生效日期与币种一行、一天的色带、时段表、价格历史 */
.price-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.price-date { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.price-date input { width: 150px; }
.price-band { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.price-band-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.price-band-bar > span { flex: 1 1 0; }
.price-band-bar > span.gap { background: var(--danger-soft); }
.price-band-bar > span.clash { background: var(--danger); }
.price-band-ticks { position: relative; height: 16px; font-size: 11px; color: var(--muted); }
.price-band-ticks > span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.price-band-ticks > span:first-child { transform: none; }
.price-band-ticks > span:last-child { transform: translateX(-100%); }
.price-table { width: 100%; }
.price-table td { vertical-align: middle; }
.price-seg { display: flex; flex-direction: column; gap: 4px; }
.price-name { width: calc(10em + 22px); font-weight: 600; }  /* 占位「第 1 段（如 峰时）」约九个字宽，加粗另留一个字宽；22px 是左右内边距与边框再留一点余量 */
.price-time { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.price-cell { width: calc(5em + 22px); text-align: right; }  /* 放得下最长的占位「同缓存命中」：五个字宽；22px 是左右内边距与边框再留一点余量 */
.price-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 8px 0 14px; }
.price-hist { display: flex; flex-direction: column; margin-bottom: 8px; }
.price-hist-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.price-hist-row { display: grid; grid-template-columns: 14px 120px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.price-hist-row.on { background: var(--accent-soft); }
.price-hist-date { font-variant-numeric: tabular-nums; }
.price-dot { width: 10px; height: 10px; border-radius: 5px; background: var(--muted); }
.price-dot.ok { background: var(--ok); }
.price-dot.info { background: var(--accent); }
/* ── 模型限额页（三页签、单条抽屉）──────────────────────────── */
.quota-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1180px) { .quota-split { grid-template-columns: minmax(0, 1fr); } }
.quota-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.quota-bar > .grow { flex: 1 1 auto; }
.quota-t td { vertical-align: middle; }
.quota-t td.quota-acts { white-space: nowrap; text-align: right; }
.quota-t td.quota-acts .btn + .btn { margin-left: 6px; }
.quota-t tr.quota-sub > td { background: var(--surface-2); }
.quota-use { display: flex; flex-direction: column; gap: 4px; min-width: 180px; max-width: 360px; }
.quota-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.quota-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.quota-kv { row-gap: 10px; }
.quota-say-wrap { border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.quota-say-h { color: var(--muted); font-size: 13px; }
.quota-say { display: flex; gap: 8px; align-items: flex-start; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.7; }
.quota-say > .icon { flex: 0 0 auto; margin-top: 3px; color: var(--muted); }
.quota-preview { display: flex; gap: 8px; align-items: flex-start; background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.quota-preview > .icon { flex: 0 0 auto; margin-top: 3px; color: var(--accent); }
.quota-del { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
/* 适用模型勾选：一个模型一枚带框的勾选胶囊——勾选框不吃全局「输入框撑满整行」，与模型名同在一行 */
.qchips { display: flex; flex-wrap: wrap; gap: 8px; }
/* 写成 `.field label.qchip` 也认：抽屉里的字段标题规则（.field label 块级、粗体、下边距）不许压过它 */
.qchip, .field label.qchip { display: inline-flex; font-weight: 400; margin: 0; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 13px; }
.qchip.on { border-color: var(--accent); background: var(--accent-soft); }
.qchip input { margin: 0; flex: 0 0 auto; }
/* 下拉套壳放进表单字段里（抽屉里「超限后改用」那一格）：字段标题的块级规则（.field label）不许压过它，
   否则壳被撑满整行、下箭头跑到最右边、选中的字变粗 */
.field label.dd { display: inline-flex; font-weight: 400; margin: 0; }


/* ── 审计查询（改版）：筛选一行、记录来源状态灯、动作人话＋图标、详情原始记录折叠 ──────────── */
.audit-page .filters-card > .filters { align-items: center; gap: 8px; }
.audit-page .filters-card > .filters > * { flex: 0 0 auto; }
.audit-range { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); }
.audit-range input { width: 108px; height: 30px; padding: 0 2px; border: 0; background: transparent; color: var(--text); }
.audit-range .dash { font-size: 13px; }
.audit-person { width: auto; min-width: 0; display: inline-flex; align-items: center; gap: 2px; }
.audit-person-x { flex: none; }  /* 人员格选了人旁边那枚“×”：单清这一格（§十一.285） */
.audit-person .subject-pick > .picker { min-width: 140px; max-width: 200px; }
.audit-person select, .audit-person .picker-btn { height: 34px; box-sizing: border-box; }
.audit-page .filters-card .searchbox { min-width: 0; }
.audit-asset { width: 120px; }
.audit-id { width: 204px; }
.audit-page .filters-card > .filters > label.dd select { max-width: 150px; }
/* 检索式下拉（地图十一票 15）：与原先那格原生下拉同高、同宽上限；弹层照组织选择器 */
.audit-page .filters-card > .filters > .ss { width: 140px; }  /* 地图十四票 17：收到 140px，1440 宽下筛选一行放得下（号框下的小字不压第二行） */
.audit-page .filters-card > .filters > .ss .picker-btn { height: 34px; box-sizing: border-box; font-size: 13px; }
.ss .picker-btn > .icon { flex: none; color: var(--muted); }
.audit-page .filters-card .f-acts { width: auto; }
.audit-moment { margin-top: 6px; }
.audit-page .filters.audit-more { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); align-items: flex-end; }
.lanebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 16px; }
.lanebar-t { font-size: 13px; }
.lanebar-items { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.lanebar-i { padding: 2px 6px; border: 1px solid transparent; border-radius: var(--radius); background: none; color: inherit; font: inherit; cursor: pointer; }
.lanebar-i:hover { border-color: var(--line); }
.lanebar-i.on { border-color: var(--accent); background: var(--accent-soft); }
.lanebar-note { margin-left: auto; }
.audit-listhead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.audit-sysreads { margin: 6px 0 0; }  /* 地图二十二票 26（E1）：隐去系统自动调用那一条 */
.audit-table td { vertical-align: middle; }
.audit-table th.go, .audit-table td.go { width: 36px; text-align: right; }
.audit-time { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  /* 只写发生时刻，不溢进“记录来源”一格（§十一.285） */
.audit-lane { white-space: nowrap; }  /* 来源一格不折行（「资产网关」「Skill 集市」） */
tr.rowlink { cursor: pointer; }
tr.rowlink:hover td { background: var(--surface-2); }
/* 整行点选的列表（地图十一票 15，「资料信息整理」）：点行即切换勾选，悬停整行提亮，勾上的行底色常亮 */
tr.rowpick { cursor: pointer; }
tr.rowpick:hover td, tr.rowpick.on td { background: var(--surface-2); }
.rowgo { display: inline-flex; padding: 4px; border: 0; border-radius: var(--radius); background: none; color: var(--muted); cursor: pointer; }
.rowgo:hover { color: var(--accent); background: var(--accent-soft); }
.act .tile { width: 24px; height: 24px; border-radius: 6px; }
.act .named { gap: 8px; }
.act-deny .named-name, .act-error .named-name { color: var(--danger); }
.audit-unanswered { margin-top: 6px; }
/* ── 审计查询看得懂（地图十四票 17，设计稿包甲）：常见问题卡、提示条与描边、一句话的行、成组、说明浮层、空与读取中、抽屉三段 ── */
.audit-faq .faq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.faq-card { display: flex; align-items: flex-start; gap: 8px; min-height: 62px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.faq-card:hover, .faq-card:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.faq-card .faq-i { color: var(--accent); margin-top: 2px; flex: none; }
.faq-card .faq-t { display: flex; flex-direction: column; gap: 2px; }
.faq-card b { font-size: 13px; line-height: 1.45; font-weight: 600; text-wrap: pretty; }
.faq-open { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 13px; margin: -4px 0 12px; }
.audit-page .emph input, .audit-page .emph select, .audit-page .emph .picker-btn, .audit-page label.emph { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.audit-hint { margin-top: 6px; }  /* 号框描边时的那行小字（形如……、在哪复制）：放在筛选一行之下，不压折到第二行的「只看变更」 */
.banner .banner-sub { display: block; font-weight: 400; }
.audit-table { table-layout: fixed; width: 100%; }
.audit-table col.c-time { width: 124px; }
.audit-table col.c-lane { width: 104px; }
.audit-table col.c-go { width: 40px; }
.audit-table td { vertical-align: top; }
.audit-table td.go { padding: 4px; }
.audit-time .slot { display: inline-block; width: 16px; color: var(--muted); vertical-align: -2px; }
.lane-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
tr.audit-member > td { background: transparent; border-bottom: 1px dashed var(--line-soft); }
tr.audit-member > td:first-child { padding-left: 26px; }
.asent { display: flex; gap: 10px; min-width: 0; }
.asent .tile { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.asent-txt { min-width: 0; flex: 1 1 auto; }
.asent-line { line-height: 1.6; text-wrap: pretty; }
.asent.k-read .asent-line { color: var(--muted); }
.asent-p { vertical-align: baseline; margin-left: 0; }  /* 人名段与后面的字按基线对齐：不随说明件“?”的居中对齐（§十一.285） */
.asent-p b { font-weight: 600; white-space: nowrap; }
.asent-p .help-tip b { white-space: normal; }
.asent-o { white-space: nowrap; }
.asent-bad { color: var(--danger); }
.asent-sub { display: flex; flex-wrap: wrap; min-width: 0; }
.asent-reason { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asent-tail { white-space: normal; }
.asent-note { display: block; }
tr.skel td { padding: 12px 10px; }
.skel-bar { display: block; height: 12px; border-radius: 4px; background: var(--surface-2); width: 70%; }
.skel-bar.wide { width: 90%; }
.audit-empty-ok .audit-empty-acts { margin-top: 10px; display: flex; gap: 8px; justify-content: center; }
.audit-empty-ok .audit-empty-acts .btn { color: var(--text); }
.audit-empty-warn { padding: 8px 4px; }
.lanebar { position: relative; }
.lanebar-h { margin-left: 0; }
.lanebar-h .help-tip { top: 30px; }
.lanebar-end { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lanebar-end .lanebar-note { margin-left: 0; }
.lanebar-explain { color: var(--accent); font-size: 13px; }
.lane-explain { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(560px, calc(100vw - 32px)); padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); color: var(--text); font-size: 13px; line-height: 1.6; text-align: left; }
.lane-explain p { margin: 0 0 10px; }
.lane-explain-t { width: 100%; min-width: 0; font-size: 12px; margin-bottom: 10px; }
.lane-explain-t th, .lane-explain-t td { padding: 6px 8px; vertical-align: top; }
.lane-explain-t td:first-child, .lane-explain-t td:last-child { white-space: nowrap; }
.lane-legend-t { display: block; font-weight: 600; margin-bottom: 6px; }
.lane-legend { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; font-size: 12px; }
.audit-explain { margin: 0 0 12px; font-size: 14px; line-height: 1.75; }
.audit-kv { padding: 10px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
table.keyfields { min-width: 0; width: 100%; margin: 2px 0 14px; }
table.keyfields td { padding: 2px 8px 2px 0; font-size: 12px; vertical-align: top; }
table.keyfields td:first-child { width: 116px; white-space: nowrap; }
.follow { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.follow-btn { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 12px; text-align: left; }
.follow-btn .follow-l { flex: 1 1 auto; }
.follow-i > .catline { margin-top: 3px; }
.acct-ids { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 4px; }
details.raw { margin-top: 8px; }
details.raw > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.audit-taint-body { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-start; }
.audit-taint-chart { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.audit-taint-body > .tablewrap { flex: 1 1 360px; min-width: 0; }

/* ── 基线核验单（改版）：大号状态卡、三张卡、程序文件格子、最近开机 ──────────────────── */
.bl-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 16px; }
.bl-hero .tile { width: 46px; height: 46px; border-radius: 10px; }
.bl-hero-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bl-hero-t h2 { margin: 0; font-size: 19px; line-height: 1.35; }
.bl-hero-why { font-size: 13px; }
.bl-hero-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.bl-hero.bl-bad { border-color: var(--danger); }
.bl-hero.bl-warn { border-color: var(--warn); }
.bl-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.bl-two > .panel { margin-bottom: 0; }
.bl-two + .panel { margin-top: 16px; }
.bl-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px 24px; }
.bl-group-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; }
.bl-cells { display: flex; flex-wrap: wrap; gap: 4px; }
.bl-cell { width: 14px; height: 14px; border-radius: 3px; background: var(--muted); }
.bl-cell.bl-ok { background: var(--ok); }
.bl-cell.bl-bad { background: var(--danger); }
.bl-cell.bl-warn { background: var(--deny); }
.bl-boot-now { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.bl-fp { margin-top: 2px; }
.bl-sub { margin-top: 4px; }
.bl-selfcheck dd { margin-bottom: 8px; }
@media (max-width: 480px) { .bl-hero { flex-wrap: wrap; } .bl-two { grid-template-columns: 1fr; } }

/* ── 人员与组织四页（人员列表、个人明细、组织、人事同步）：只放这四页自己的排版，组件形态一律用上面的公共件 ── */
/* 人员列表：检索、状态快速筛选在左，组织与岗位筛在右；整行可点进明细 */
.pp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.pp-bar-r { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.pp-org { min-width: 180px; max-width: 280px; }
.pp-org .picker-btn { height: 34px; }
.pp-table td { vertical-align: middle; }
.pp-row { cursor: pointer; }
.pp-row:hover td { background: var(--surface-2); }
.pp-who { text-align: left; }
.pp-go { width: 32px; text-align: right; color: var(--muted); }
/* 个人明细：大头像字＋姓名行＋一行归属；右侧动作 */
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.pp-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin: 10px 0 16px; }
.pp-head-t { flex: 1 1 240px; min-width: 0; }
.pp-head-t h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 22px; }
.pp-head-t .sub { margin: 4px 0 0; }
.pp-head-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-notes { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: -8px 0 12px; }
.pp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.pp-kv { width: 100%; min-width: 0; border-collapse: collapse; font-size: 14px; }
.pp-kv th { width: 72px; padding: 10px 12px 10px 0; color: var(--muted); font-weight: 400; text-align: left; white-space: nowrap; }
.pp-kv td { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); }
.pp-kv tr:first-child th, .pp-kv tr:first-child td { padding-top: 4px; }
.pp-kv .pp-v { font-weight: 600; }
/* 人员与工号映射：人员页「上游工号与其他属性」卡片、数据源明细的缺映射清单 */
.pp-map { width: 100%; border-collapse: collapse; font-size: 14px; }
.pp-map th { color: var(--muted); font-weight: 400; text-align: left; padding: 6px 8px; white-space: nowrap; }
.pp-map td { padding: 8px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.pp-map .pp-map-acts { white-space: nowrap; text-align: right; }
.map-gaps { margin-top: 10px; display: grid; gap: 8px; }
.map-gaps-head { display: flex; align-items: baseline; gap: 4px; }
.map-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.map-preview b { margin-right: 4px; }
.pp-src { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.pp-src.tone-info { color: var(--accent); }
.pp-src.tone-warn { color: var(--warn); }
.pp-src.tone-ok { color: var(--ok); }
.pp-assets { margin: 0; padding: 0; list-style: none; }
.pp-assets li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.pp-assets li > .catline { text-align: right; }
/* 组织：左树右明细；岗位、组两个页签同一套版式 */
.org-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .org-cols { grid-template-columns: minmax(0, 1fr); } }
.org-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.org-bar .searchbox { flex: 1 1 200px; }
.org-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.org-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.org-legend-r { margin-left: auto; }
.org-rows { display: flex; flex-direction: column; }
.org-node { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 40px; padding: 4px 8px; border-radius: 6px; }
.org-node:hover { background: var(--surface-2); }
.org-node.on { background: var(--accent-soft); }
.org-node.on .org-name { color: var(--accent); font-weight: 600; }
.org-node.hit .org-name { text-decoration: underline; text-decoration-color: var(--accent); }
.org-tw { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.org-name { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-align: left; }
.org-name .icon { color: var(--muted); }
.org-cnts { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.org-cnt-slot { display: inline-flex; justify-content: flex-end; min-width: 52px; }
.org-cnt { display: inline-flex; align-items: center; gap: 3px; padding: 0 2px; border: 0; background: none; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
button.org-cnt { cursor: pointer; }
button.org-cnt:hover { color: var(--accent); }
.org-detail { position: sticky; top: 0; }
.org-empty { min-height: 160px; justify-content: center; }
.org-dh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.org-dh h2 { margin: 0; font-size: 18px; }
.org-x { margin-left: auto; }
.org-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.org-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); }
.org-tile b { font-size: 20px; font-variant-numeric: tabular-nums; }
.org-tile span { color: var(--muted); font-size: 12px; }
.org-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; }
.org-more { margin-left: auto; font-weight: 400; }
.org-people { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.org-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 2px; border: 0; border-radius: 15px; background: var(--surface-2); color: var(--text); font-size: 13px; cursor: pointer; }
span.org-chip { cursor: default; }
.org-chip .avatar.sm { width: 26px; height: 26px; }
.org-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line-soft); }
/* 人事同步：大号状态卡、左（变动比例、同步记录时间线）右（上次变动明细） */
.sync-hero { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.sync-hero-ic { width: 48px; height: 48px; border-radius: 10px; }
.sync-hero-t { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sync-hero-t h2 { margin: 0; font-size: 18px; }
.sync-hero-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.sync-line { margin: 0 0 10px; }
.sync-problems { margin: -4px 0 12px; padding-left: 18px; font-size: 13px; }
/* 地图二十一票 01：差异表冲突行上的工号复用确认（两个按钮；点了行内再确认一次） */
.sync-reuse { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.sync-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.sync-col { display: flex; flex-direction: column; min-width: 0; }
.sync-ratio { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.sync-ratio b { font-size: 26px; font-variant-numeric: tabular-nums; }
.sync-axis { position: relative; height: 18px; }
.sync-axis > span { position: absolute; top: 0; white-space: nowrap; }
.sync-axis > span:first-child { left: 0; }
.sync-axis > span:nth-child(2) { transform: translateX(-50%); }
.sync-axis > span:last-child { right: 0; }
.sync-tl, .sync-changes { margin: 0; padding: 0; list-style: none; }
.sync-tl li, .sync-changes li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.sync-tl li:first-child, .sync-changes li:first-child { border-top: 0; }
.sync-tl .sdot { min-width: 96px; }
.sync-tl-t { flex: 1 1 auto; min-width: 0; font-size: 13px; }
.sync-changes .pill { min-width: 52px; justify-content: center; }
.sync-who { min-width: 64px; font-weight: 600; }
.sync-changes li > .catline { flex: 1 1 auto; min-width: 0; }
.pp-kv td { overflow-wrap: anywhere; }
.pp-kv td.pp-when { white-space: nowrap; overflow-wrap: normal; }
.panel-acts .linklike, .org-more { color: var(--accent); }

/* ── 网页智能助手（地图八票 34；票 120 改停靠侧边栏）──────────────────────
 * 接管期间主内容区四周一圈边框：**不拦截鼠标**（pointer-events: none）——管理员随时能点、能改，一改助手就停。
 * 边框只围主内容区（侧边栏是助手自己，不围）；5px 实线＋内侧一道淡光，亮暗两态都用紫色 token（亮 #7a4fc4、暗 #a98be6，对底色都在 4.5:1 以上）。
 * 侧边栏停靠：文档根 `data-ai-side="open|rail"`（脚本只切状态）→ 这里定 --ai-dock-r／--ai-dock-b，壳、抽屉、遮罩、边框统一按它让位。
 * 断点 960px：宽屏停右侧（挤窄主内容区），窄屏停底部（挤矮主内容区）；两种都是「让位」而不是「盖上去」。 */
@media (min-width: 960px) {
  :root[data-ai-side="open"] { --ai-dock-r: var(--ai-side-w); }
  :root[data-ai-side="rail"] { --ai-dock-r: var(--ai-rail-w); }
}
@media (max-width: 959px) {
  :root[data-ai-side="open"] { --ai-dock-b: var(--ai-sheet-h); }
  :root[data-ai-side="rail"] { --ai-dock-b: var(--ai-rail-h); }
}
.ai-frame { position: fixed; inset: 0 var(--ai-dock-r) var(--ai-dock-b) 0; border: var(--ai-frame) solid var(--purple); border-radius: 8px; pointer-events: none; z-index: 900; box-shadow: inset 0 0 0 1px var(--purple-soft), inset 0 0 16px -6px var(--purple); }
/* 收起后的把手：宽屏是右侧一条竖栏（「智能助手」竖排＋运行状态，接管时下面多一颗「停止」），窄屏是底部一条横栏 */
.ai-rail { position: fixed; top: 0; right: 0; bottom: 0; width: var(--ai-rail-w); z-index: 950; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 0; background: var(--surface); border-left: 1px solid var(--line); overflow-y: auto; }   /* 窗口很矮时竖排字与「停止」放不下就在把手里滚，不溢出 */
.ai-toggle { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 34px; padding: 10px 0; border: 1px solid var(--purple); border-radius: 8px; background: var(--purple-soft); color: var(--purple); font: inherit; font-weight: 600; cursor: pointer; }
.ai-toggle:hover { background: var(--surface); }
.ai-toggle-txt, .ai-rail-run { writing-mode: vertical-rl; letter-spacing: 2px; }
.ai-rail-run { font-size: 12px; font-weight: 400; color: var(--muted); }
.ai-rail-run.st-running { color: var(--purple); }
.ai-rail-run.st-ask, .ai-rail-run.st-paused { color: var(--warn); }
.ai-rail-run.st-error { color: var(--danger); }
.ai-rail-stop { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 34px; padding: 8px 0; }
.ai-rail-stop > span { writing-mode: vertical-rl; }
/* 打开的侧边栏：贴右边、从顶到底，与主内容区之间一条分隔线 */
.ai-panel { position: fixed; top: 0; right: 0; bottom: 0; width: var(--ai-side-w); z-index: 950; display: flex; flex-direction: column; background: var(--surface); color: var(--text); border-left: 1px solid var(--line); box-shadow: -2px 0 8px rgba(0, 0, 0, .06); }
/* 顶栏两行：上行「智能助手」＋新会话＋收起，下行当前模式＋运行状态（一行塞不下时不再东折一个、西折一个） */
.ai-head { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 8px; border-bottom: 1px solid var(--line); }
.ai-head-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ai-head b { display: inline-flex; align-items: center; gap: 4px; color: var(--purple); }
.ai-head-sp { flex: 1 1 auto; }
.ai-mode { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 装机选了外部模型时面板顶上常显的告知（地图十一票 07）：贴着顶栏、不另占外边距 */
.ai-zone-note { margin: 0; font-size: 12px; align-items: flex-start; }
.ai-collapse { display: inline-flex; align-items: center; padding: 3px 6px; }
.ai-run { font-size: 12px; color: var(--muted); }
.ai-run.st-running { color: var(--purple); }
.ai-run.st-ask, .ai-run.st-paused { color: var(--warn); }
.ai-run.st-error { color: var(--danger); }
.ai-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ai-hint { line-height: 1.6; }
.ai-msg { padding: 8px 10px; border-radius: 8px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-user { align-self: flex-end; max-width: 88%; background: var(--accent-soft); }
.ai-assistant { align-self: flex-start; max-width: 96%; background: var(--surface-2); }
.ai-note { align-self: stretch; background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.ai-steps { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line-soft); border-radius: 8px; }
.ai-step + .ai-step { border-top: 1px solid var(--line-soft); }
.ai-step-line { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 6px 8px; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.ai-step-line:hover { background: var(--surface-2); }
.ai-step-ic { flex: 0 0 auto; display: inline-flex; margin-top: 2px; }
.st-run .ai-step-ic { color: var(--purple); }
.st-ok .ai-step-ic { color: var(--ok); }
.st-warn .ai-step-ic { color: var(--warn); }
.st-fail .ai-step-ic { color: var(--danger); }
.st-skip .ai-step-ic { color: var(--muted); }
.ai-step-detail { padding: 0 8px 8px 30px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
/* 成批提问卡（票 120 重排）：题目是卡里的一行字、不骑在框线上（legend 浮起即不再是「框线上的标题」）；
   选项一行两列——左列单选钮（压掉全站 input 的 width: 100%，那就是单选钮被推到远处的原因）、右列选项名＋推荐标、说明跟选项名左对齐；
   选中的那一项整行描紫边；补一句与「跳过本题」同一行 */
.ai-card { border: 1px solid var(--purple); border-radius: 8px; padding: 12px; background: var(--purple-soft); display: flex; flex-direction: column; gap: 10px; }
.ai-card-intro { font-weight: 600; line-height: 1.6; }
.ai-q { border: 1px solid var(--line-soft); border-radius: 6px; padding: 10px 12px; margin: 0; min-width: 0; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.ai-q.skipped { opacity: .6; }
.ai-q > legend.ai-q-title { float: left; width: 100%; margin: 0; padding: 0; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.ai-q-help { line-height: 1.55; }
.ai-q-problem { font-size: 12px; color: var(--danger); }
.ai-opts { display: flex; flex-direction: column; gap: 4px; }
.ai-opt { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 8px; align-items: start; padding: 6px 8px; border: 1px solid transparent; border-radius: 6px; font-size: 13px; line-height: 20px; cursor: pointer; }
.ai-opt:hover { background: var(--surface-2); }
.ai-opt:has(> .ai-opt-radio:checked) { border-color: var(--purple); background: var(--purple-soft); }
.ai-opt-radio { width: 16px; height: 16px; margin: 2px 0 0; padding: 0; border: 0; accent-color: var(--purple); cursor: pointer; }
/* 不可选（地图十一票 11）：不再整行降透明度（原因字对比度不足）——单选钮 disabled 变灰、「不可选」小标与禁用光标表示 */
.ai-opt.off { cursor: not-allowed; }
.ai-opt.off:hover { background: transparent; }
.ai-opt.off .ai-opt-radio { cursor: not-allowed; }
.ai-opt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ai-opt-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.ai-opt-name b { font-weight: 600; overflow-wrap: anywhere; }
.ai-opt.rec .ai-opt-name b { color: var(--purple); }
.ai-rec { flex: none; height: 18px; padding: 0 6px; font-size: 11px; }
.ai-opt-why { display: block; line-height: 1.6; overflow-wrap: anywhere; }
/* 选项说明每项一行、超出截断，右侧「说明」开关展开全文（地图十一票 11；多出第三列放开关，全文块横跨后两列） */
.ai-opt.has-more { grid-template-columns: 16px minmax(0, 1fr) auto; }
.ai-opt-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.ai-opt-more { display: inline-flex; align-items: center; gap: 2px; align-self: start; height: 20px; padding: 0 2px; color: var(--accent); font-size: 12px; white-space: nowrap; }
.ai-opt-full { grid-column: 2 / 4; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); font-size: 12px; line-height: 1.7; color: var(--text); overflow-wrap: anywhere; }
.ai-opt-full > span { display: block; }
.ai-opt-reason { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
.ai-opt-reason > span { display: block; }
.ai-q-title-row { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ai-q-why { padding: 4px 8px; border-left: 3px solid var(--purple); background: var(--surface-2); border-radius: 0 4px 4px 0; line-height: 1.6; }
.ai-q-foot { display: flex; align-items: center; gap: 6px; }
.ai-free { flex: 1 1 auto; min-width: 0; width: auto; }
.ai-skip { flex: none; padding: 4px 10px; }
/* 编程模式的变更概览卡（地图八票 35）：逐条一个勾＋改前改后小表；取消勾选的那一条变淡 */
.ai-mode-sw { flex: none; padding: 2px 8px; font-size: 12px; }
.ai-ov-reason { line-height: 1.6; overflow-wrap: anywhere; }
.ai-ov-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ai-ov-item { border: 1px solid var(--line-soft); border-radius: 6px; padding: 8px 10px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ai-ov-item.off { opacity: .55; }
.ai-ov-head { display: flex; align-items: center; gap: 8px; cursor: pointer; overflow-wrap: anywhere; }
.ai-ov-pick { width: 16px; height: 16px; margin: 0; padding: 0; flex: none; accent-color: var(--purple); }
/* 全站表格有 min-width: 620px（列表页用）；侧边栏里的小表压掉它，三列跟着侧边栏宽度走 */
.ai-ov-diff { width: 100%; min-width: 0; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.ai-ov-diff th, .ai-ov-diff td { padding: 3px 6px; border-top: 1px solid var(--line-soft); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.ai-ov-diff th { color: var(--muted); font-weight: normal; white-space: normal; }
.ai-ov-diff th:first-child, .ai-ov-diff td:first-child { width: 28%; color: var(--muted); }
.ai-ov-impact { line-height: 1.5; }
.ai-foot { flex: none; display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
/* 多行输入框（地图十一票 15）：一行起、随内容增高（页面按内容量高），到上限出滚动条；不给拖拽改尺寸 */
.ai-input { flex: 1 1 auto; min-width: 0; resize: none; line-height: 1.4; min-height: calc(1.4em + 14px); max-height: var(--ai-input-max); overflow-y: auto; }
.ai-mark { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-left: 6px; font-weight: normal; }
.ai-mark-btn { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border: 1px solid var(--purple); border-radius: 999px; background: var(--purple-soft); color: var(--purple); font: inherit; font-size: 11px; line-height: 18px; cursor: pointer; }
.ai-mark-why { font-size: 12px; color: var(--purple); }
[data-ai-focus] { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 4px; background: var(--purple-soft); transition: background .2s; }
/* 地图十一票 08：共享文件「资料信息整理」改版（控制台设计标准 §十一.176）——编辑抽屉 720px 只设在这一个抽屉上，不改组件库缺省 */
.drawer.meta-drawer { --drawer-w: 720px; }
.meta-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.meta-empty-up { display: inline-flex; align-items: center; gap: 4px; }
.meta-sugg-line { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; }
.meta-sugg-line > span { flex: 1 1 auto; min-width: 0; }
.meta-fileinfo { padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface-2); }
dl.kv.meta-kv { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); column-gap: 14px; }
.meta-sec { padding-top: 6px; }
.meta-sec2 { padding-top: 8px; }
.meta-field-head { display: flex; align-items: center; gap: 8px; min-height: 22px; margin-bottom: 4px; }
.meta-field-head label { margin: 0; }
.meta-field-sp { flex: 1 1 auto; }
.meta-sugg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.meta-use { color: var(--accent); font-size: 12px; }
.grid2.meta-row1 { grid-template-columns: minmax(0, 1fr); }
.meta-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.meta-change-line { position: sticky; bottom: -16px; margin: auto -20px -16px; padding: 10px 20px; background: var(--surface); border-top: 1px solid var(--line-soft); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.meta-ai-line { font-size: 13px; }
.checkbox-ok { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; }
.meta-rc-k { white-space: nowrap; color: var(--muted); }
.meta-rc-before { color: var(--muted); }
.meta-rc-arrow { width: 28px; color: var(--muted); }
.meta-rc-after { font-weight: 600; }
/* 批量起草卡：小表「项」一列不折行（400px 侧栏里「文档日期」不折成两行），现在、来源两列窄一些 */
.ai-ov-draft th.c-k, .ai-ov-draft td:first-child { width: 17%; white-space: nowrap; }
.ai-ov-draft th.c-now { width: 13%; }
.ai-ov-draft th.c-src { width: 21%; }
.ai-ov-where { margin-top: -4px; }
.ai-ov-warn { display: flex; gap: 6px; font-size: 12px; line-height: 1.55; }
.ai-ov-warn > svg { flex: none; margin-top: 2px; }
.ai-ov-acts { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ai-ov-none { margin-right: auto; }
.ai-ov-rc { display: flex; align-items: center; gap: 8px; }
.ai-ov-file { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ai-prefill { display: flex; flex-direction: column; gap: 6px; }
.ai-prefill .ai-hint { font-size: 13px; }
.ai-prefill-files { display: flex; flex-wrap: wrap; gap: 4px; }
.ai-prefill-files .chip { white-space: nowrap; }
/* 窄屏（< 960px）：侧边栏停在底部、把手是底部一条横栏（与上面 --ai-dock-b 同一断点） */
@media (max-width: 959px) {
  /* 顶边按 100vh 算（与壳的高度同一个参照）：页面出了横向滚动条时底边会被滚动条压住一点，但顶边与壳的底边始终对齐、不重叠 */
  .ai-rail { top: calc(100vh - var(--ai-rail-h)); left: 0; width: auto; flex-direction: row; justify-content: flex-end; padding: 0 12px; border-left: 0; border-top: 1px solid var(--line); }
  .ai-toggle { flex-direction: row; width: auto; padding: 5px 12px; }
  .ai-toggle-txt, .ai-rail-run, .ai-rail-stop > span { writing-mode: horizontal-tb; letter-spacing: 0; }
  .ai-rail-stop { flex-direction: row; width: auto; padding: 4px 10px; }
  .ai-panel { top: calc(100vh - var(--ai-sheet-h)); left: 0; width: auto; border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(0, 0, 0, .06); }
  .ai-input { max-height: calc(var(--ai-input-max) / 2); }
}

/* ── 地图十三票 07：共享文件页「目录」页签（目录多时看得全、翻得动）与检索式下拉的折行、命中高亮 ─────────────── */
/* 工具一行吸顶（同 .listbar 的做法：-18px 抵掉 .content 的上内边距）；表头吸在它下面，高度由页面量出来交给 --dirs-bar-h，不写死 */
.dirs-bar { position: sticky; top: -18px; z-index: 3; background: var(--surface); padding: 6px 0; }
.dirs-count { font-size: 13px; }
.dirs-table td { vertical-align: top; }
.dirs-table td:not(.dirs-c-name), .dirs-table th { white-space: nowrap; }   /* 数、小标、「不能 去授权」各占一行不折；剩下的宽度都给名字一列 */
.dirs-table .dirs-c-name { width: auto; min-width: 260px; }   /* 名字一列吃剩余宽度、不写死最大宽度，放不下才折 */
.dirs-name { display: flex; align-items: flex-start; gap: 6px; }
.dirs-ic { color: var(--orange); flex: none; display: inline-flex; margin-top: 2px; }
.dirs-link { font-weight: 600; text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.dirs-grant { font-size: 13px; color: var(--accent); margin-left: 4px; }
.dirs-skel { display: inline-block; height: 12px; border-radius: 6px; background: var(--surface-2); }
/* 宽屏表头吸顶：§十.3 的横向滚动框会把 th 的 sticky 关在框里，宽屏表放得下，去掉横向滚动、th 粘在工具一行下面；窄屏照旧横向滚动、表头不吸 */
@media (min-width: 1280px) {
  .dirs-tablewrap { overflow: visible; }
  .dirs-table thead th { position: sticky; top: calc(var(--dirs-bar-h, 0px) - 18px); z-index: 2; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); }
}
/* 命中处的底（目录表、检索式下拉共用；组织选择器、授权左列以后可同用）：自有色标 --hit，亮暗两态都与表格底拉得开（地图十三走查 13-1-7） */
mark { background: var(--hit); color: inherit; padding: 0 1px; border-radius: 2px; }
/* 检索式下拉：条目名字后可带小标（敏感目录那枚），名字长时折行不截 */
.ss .ss-main { display: flex; align-items: flex-start; gap: 6px; width: 100%; }
.ss-wrap .ss-name { overflow-wrap: anywhere; line-height: 1.45; text-align: left; }
/* 地图十三票 01／02：Skill 库「脚本运行」——明细段尾的「修改」靠右（§十一.204）；复核栏那一行句后接文字按钮「修改」（§十一.206） */
.skill-run-acts { display: flex; justify-content: flex-end; margin-top: 6px; }
.skill-run-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; line-height: 1.55; }
.skill-run-line .linklike { color: var(--accent); }
.skill-run-line .linklike:disabled { color: var(--muted); opacity: .6; cursor: not-allowed; }

/* ── 地图十四票 18：工作台权限（总表页、人员明细一块、授权抽屉；控制台设计标准 §十一.268～.272） ─────────────── */
.wbp-mid { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.wbp-no { color: var(--muted); }
td.wbp-right { width: 1%; white-space: nowrap; text-align: right; vertical-align: top; }
.wbp-acts { justify-content: flex-end; flex-wrap: nowrap; }
.wbp-acts-col { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.wbp-link, .wbp-add, .wbp-preview .linklike, td.oneline > .linklike { color: var(--accent); }
.wbp-link { font-size: 12px; }
.wbp-add { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin-top: 6px; }
.wbp-conds { gap: 8px; flex-wrap: nowrap; }
.wbp-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 56px 24px; }
.wbp-empty > b { color: var(--text); font-size: 15px; }
.wbp-roster { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.wbp-roster .org-chip { background: var(--surface); }
/* 地图十五票 21（§十一.299）：名单标题行右边「名单｜按部门」与「导出」，部门小胶囊带人数 */
.wbp-roster-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wbp-roster-find { flex-wrap: wrap; gap: 8px; }
.wbp-roster .org-chip.wbp-dept { padding: 0 10px; gap: 8px; }
.wbp-dept b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.wbp-form { gap: 18px; }
.wbp-date { width: 170px; }
.wbp-preview { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.wbp-preview .inline-row { align-items: baseline; gap: 12px; }
.wbp-people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; }
.wbp-all { display: flex; flex-direction: column; gap: 8px; }
.note > .wbp-ic { flex: none; margin-top: 2px; color: var(--accent); }
.note.warn > .wbp-ic { color: var(--warn); }
.note.bad > .wbp-ic { color: var(--danger); }

/* ── 地图十四票 18：审计结果表「完全权限 · 未经批准」小标跟在整句后面、不在中间折开（§十一.272） ─────────────── */
.asent-tag { white-space: nowrap; }
.asent-tag .badge { vertical-align: 1px; }

/* ── 地图十四票 13：没保存的编辑页里的对象链接在新标签页打开（§十一.275）；离开先问的确认框（§十一.276） ─────────────── */
a.objlink { text-decoration: none; }
a.objlink:hover { text-decoration: underline; }
a.objlink.btn:hover, a.objlink.chipx:hover { text-decoration: none; }
a.objlink.chipx { color: inherit; display: inline-block; }
.objlink-i { margin-left: 2px; vertical-align: -1px; opacity: .75; }
dialog.leave-ask { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); color: var(--text); padding: 18px 20px 14px; width: min(400px, calc(100vw - 32px)); }
dialog.leave-ask::backdrop { background: rgba(0, 0, 0, .35); }
dialog.leave-ask p { margin: 0 0 16px; font-size: 14px; line-height: 1.6; }
.leave-ask-acts { display: flex; gap: 8px; justify-content: flex-end; }

/* 地图十四票 14（§十一.278）：选数据源的检索式下拉——名称后右侧等宽小字标识（候选与按钮上都是），注一句跟在标识后 */
.ss .ss-tail { margin-left: auto; display: inline-flex; align-items: baseline; gap: 6px; flex: none; white-space: nowrap; }
.ss .ss-note { font-size: 12px; color: var(--muted); }
.ss .ss-note.warnword { color: var(--warn); }
.picker-btn > .ss-tail { margin-left: 6px; }

/* ── 地图十五票 05：「对谁」多选与粘贴名单（§十一.268 改、§十一.294）；工作台角色页（§十一.291～.297） ─────────────── */
.wbp-chips { flex-wrap: wrap; gap: 6px; margin: 2px 0 6px 2em; }
.wbp-chip { display: inline-flex; align-items: center; gap: 2px; padding-right: 2px; }
.wbp-chip .iconbtn { width: 18px; height: 18px; }
.wbp-paste { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px 2em; }
.wbp-paste textarea { width: 100%; font: inherit; }
.wbp-bad { color: var(--danger); font-size: 12px; }
.wbp-embed { display: flex; flex-direction: column; gap: 16px; }
.wr-table { table-layout: fixed; min-width: 1100px; } /* 七列定宽合计 962px，操作一格至少留一枚“以此为底新建”；窄窗口在表格容器里横滚 */
.wr-table th.wr-ck, .wr-table td.wr-ck { width: 36px; }
/* 列宽照设计稿 1-A（地图十五自查甲）：能力一格最宽、小标横排；操作占余下 */
.wr-table th.wr-c-role { width: 196px; }
.wr-table th.wr-c-base { width: 88px; white-space: nowrap; }
.wr-table th.wr-c-caps { width: 316px; }
.wr-table th.wr-c-people { width: 108px; }
.wr-table th.wr-c-ver { width: 134px; }
.wr-table th.wr-c-acts { white-space: nowrap; }
.wr-caps .chip { white-space: nowrap; margin: 0; }
.wr-desc { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-caps { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.wr-caps > .catline { flex-basis: 100%; }
.wr-caps > .wr-more { flex-basis: auto; text-decoration: underline dotted; cursor: default; }
.wr-cap.red, .wr-red { color: var(--danger); }
.wr-tag { font-size: 12px; }
.wr-title { gap: 8px; }
.wr-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
.wr-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wr-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.wr-group-t { font-weight: 600; }
.wr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.wr-capline { display: flex; gap: 8px; align-items: flex-start; }
.wr-capline > span { display: flex; flex-direction: column; gap: 2px; }
.wr-capline.dep { margin-left: 22px; padding-top: 6px; border-top: 1px dashed var(--line); }
.wr-capline.off { opacity: .5; }
.wr-limit { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.wr-limit-t { font-weight: 600; }
.wr-num input { width: 90px; }
.wr-radios { flex-wrap: wrap; gap: 4px 14px; }
.wr-pick { max-height: 152px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; margin: 6px 0; }
.wr-pick .chk { display: flex; gap: 6px; align-items: baseline; }
.wr-first { gap: 6px; }
.wr-first .linklike:disabled { color: var(--muted); opacity: .6; cursor: not-allowed; } /* 只读页“移除”置灰（§十一.293） */
.wr-foot { position: sticky; bottom: -24px; z-index: 2; display: flex; align-items: center; gap: 8px; background: var(--surface); padding: 10px 16px; border-top: 1px solid var(--line); margin-top: 16px; }  /* 左右留 16px：“没有改动”与“保存”不贴边（负责人走查 15-1-2） */
.wr-bases { display: flex; gap: 8px; }
.wr-picked { flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
/* 人员卡“能用的角色”“我的角色”两张小表（负责人走查 15-1-13：名字与“撤销”“停用”分在两头难对应）：按内容收宽，名字、依据、截止、操作同一行挨着；
   嵌在 `.pp-kv` 的格子里，那边的 th 定宽、td 大内边距要压回来（选择器多带一层 tr 才压得过 `.pp-kv tr:first-child td`） */
.wr-mini { width: auto; min-width: 0; max-width: 100%; border-collapse: collapse; font-size: 13px; }  /* 全站 table 有 min-width: 620px，这里按内容收 */
.pp-kv .wr-mini tr th, .wr-mini th { width: auto; padding: 0 16px 4px 0; color: var(--muted); font-size: 12px; font-weight: 400; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.pp-kv .wr-mini tr td, .wr-mini td { padding: 5px 16px 5px 0; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.pp-kv .wr-mini tr .wr-mini-act, .wr-mini .wr-mini-act { padding-right: 0; white-space: nowrap; }
.wr-mini-name { white-space: nowrap; }
.wr-mini .linklike.danger { margin-left: 0; }
.wr-table .wr-name { font-weight: 600; color: var(--accent); }  /* 列表里角色名可点进明细（负责人走查 15-1-2） */
/* 地图十五票 10：角色编辑 Skill 块的首屏推荐（没写示例句的置灰）、「员工首屏会看到」预览、「看产品基础人设」折叠块 */
.wr-first.off > span:first-child, .wr-addchip.off { opacity: .5; }
.wr-firstadd { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.wr-addchip { cursor: pointer; font: inherit; font-size: 12px; color: inherit; }
.wr-addchip.off { cursor: not-allowed; }
.wr-cards { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.wr-card { flex: 1 1 160px; max-width: 240px; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; font-size: 12px; }
.wr-card > small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }
.wr-persona { margin-top: 8px; }
.wr-persona > summary { white-space: normal; }
.wr-persona-text { white-space: pre-wrap; font: inherit; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; margin: 0 0 4px; max-height: 280px; overflow-y: auto; }
/* 地图十五票 11：“默认角色”页签——按优先级分段的段名行、表上方那行灰字 */
.wrd-seg td { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; padding-top: 4px; padding-bottom: 4px; }
.wrd-note { flex: 1 1 360px; min-width: 0; }
.wrd-name { flex: none; white-space: nowrap; }
.wr-table th.wr-defcol { width: 96px; white-space: nowrap; }
/* 地图十五票 14（§十一.298）：“分派子任务”下缩进的“子智能体用哪个角色”一块；列表“专家团：……”一行 */
.wr-team-block { margin: 6px 0 4px 22px; padding: 8px 0 2px 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.wr-team-t { font-weight: 600; }
.wr-team-pick { max-height: 220px; }
/* 地图十六票 40（§十一.343）：专家团成员要用的 Skill 没发到能用本角色的人——横幅下逐份一行：名字与谁要用、缺哪些岗位、去补的入口 */
.wr-team-gap { display: flex; flex-direction: column; gap: 4px; }
.wr-team-gap-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 4px 0 4px 26px; }
.wr-team-gap-row + .wr-team-gap-row { border-top: 1px dashed var(--line); }
.wr-team-gap-name { display: inline-flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; min-width: 0; }
.wr-team-gap-row > .chipx { white-space: nowrap; justify-self: end; }
.wr-team-gap-miss { grid-column: 1 / -1; }
.wr-team-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wr-team-row.off { opacity: .5; }
.wr-team { cursor: default; }
.linklike.danger { color: var(--danger); margin-left: 8px; }
@media (max-width: 900px) { .wr-grid, .wr-two { grid-template-columns: minmax(0, 1fr); } }

/* ── 企业包（地图十六票 07，控制台设计标准 §十一.312～316）：只用令牌，深浅两套同一份 ── */
.ep-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 24px; }
.ep-empty b { color: var(--text); font-size: 15px; }
.ep-empty > div { max-width: 520px; font-size: 13px; line-height: 1.7; }
tr.ep-off > td, tr.ep-off { color: var(--muted); }
tr.ep-bad > td { background: var(--danger-soft); }
tr.ep-warn > td { background: var(--warn-soft); }
tr.ep-grp > td { background: var(--surface-2); padding: 6px 10px; }
.ep-count { border-bottom: 1px dotted var(--muted); }
.ep-count-tip { margin: 0; }
.ep-changed { color: var(--warn); font-weight: 600; }
.ep-link { color: var(--accent); font-size: 13px; }
.ep-mark { display: inline-block; width: 1.5em; font-weight: 700; }
.ep-mark.ok { color: var(--ok); }
.ep-mark.bad { color: var(--danger); }
.ep-mark.skip { color: var(--muted); font-weight: 400; }
.ep-bad, .ep-fail { color: var(--danger); }
.ep-warnword { color: var(--warn); }
label.ep-drop { display: block; cursor: pointer; position: relative; }
.ep-drop-t { color: var(--text); }
.ep-file { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; margin: 10px 0; }
dl.ep-verify { gap: 12px 20px; font-size: 13px; margin-top: 4px; }
dl.ep-verify dt { color: var(--text); font-size: 13px; white-space: nowrap; }
dl.ep-verify dt.ep-rest { opacity: .7; }
.ep-items { display: grid; grid-template-columns: max-content max-content auto; gap: 4px 10px; margin-top: 4px; align-items: baseline; }
.ep-details summary { cursor: pointer; }
.ep-details > div { padding-left: 4px; }
.ep-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.ep-gap { flex: 1; min-width: 0; }
.ep-why { font-size: 13px; color: var(--muted); }
.ep-why.warn { color: var(--warn); }
.ep-why.bad { color: var(--danger); }
.ep-footwhy { align-self: center; margin-right: 8px; }
.ep-lead { margin: 0 0 12px; font-size: 13px; }
th.ep-left { width: 42%; }
th.ep-seg { width: 170px; }
.ep-pick { max-width: 420px; }
.ep-lib { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.ep-indent { margin-left: 22px; }
.ep-written { margin: -6px 0 8px; }
.ep-tog { font-weight: 600; }
/* 版本历史（地图十六票 42）：版本、动作、时间、操作人四列不折行（1440 宽下“升级”“栾砚舟”曾被挤成竖排），事由一列留够宽度 */
td.ep-histwhy { min-width: 16em; }
.ep-tog .caret { display: inline-block; width: 1em; color: var(--muted); }
td.ep-expand { padding-left: 40px; }
.ep-sub { border: 1px solid var(--line-soft); border-radius: var(--radius); }
table.ep-subt { min-width: 0; }
.ep-ddl { font-size: 13px; margin-top: 8px; }
.ep-note { align-items: center; }
.ep-note > .icon { flex: none; }
.ep-sum { font-size: 15px; }
.ep-counts { gap: 6px 14px; font-size: 13px; color: var(--muted); margin: 6px 0; }
.ep-all { font-size: 14px; margin-top: 8px; }
.ep-done { color: var(--ok); font-weight: 700; font-size: 16px; }
.ep-done.warn { color: var(--warn); }
table.ep-receipt { min-width: 0; margin: 10px 0; }
td.ep-markcol { width: 28px; }
td.ep-segname { width: 110px; }
.ep-exit { font-size: 13px; margin: 10px 0; }
.ep-acts { gap: 8px; margin-top: 12px; }
.ep-ver { font-size: 15px; font-weight: 400; color: var(--muted); }
.ep-lines { display: flex; flex-direction: column; gap: 2px; }
.ep-objgo { display: inline-flex; }
.ep-objgo:hover .named-name { color: var(--accent); text-decoration: underline; }
td.ep-more { padding-left: 26px; }
.ep-card { margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ep-list { margin: 0; padding-left: 18px; }
.ep-people { gap: 8px; margin: 10px 0; font-size: 13px; }
.ep-nowrap { white-space: nowrap; }
/* 地图十六票 09：升级向导第 ③ 步“差异与冲突”与包明细升级补件（§十一.317～321） */
.ep-mark.warn { color: var(--warn); }
table.ep-diff { min-width: 1080px; }
table.ep-diff td.ep-col { font-size: 13px; min-width: 150px; }
table.ep-diff td.ep-differ { background: var(--accent-soft); }
table.ep-diff td.ep-how { min-width: 300px; }
.ep-howrow { gap: 8px; flex-wrap: wrap; }
.ep-unpicked { font-size: 12px; }
.ep-manual { font-size: 12px; margin-top: 4px; }
.ep-fixpill { cursor: pointer; border: 0; margin-top: 4px; font-family: inherit; }
.ep-difftools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ep-affected { margin-bottom: 8px; }
.ep-rows { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ep-rowline { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ep-confirm { font-size: 13px; margin-top: 4px; }
.ep-ddlrow { align-items: center; gap: 10px; }
.ep-unreviewed { color: var(--warn); font-size: 12px; }
.ep-newver { font-weight: 600; }
.ep-rbk { gap: 6px; align-items: center; }
table.ep-kept td.ep-notecell { width: 40%; }
.ep-noterow { gap: 8px; align-items: center; }
input.ep-note-input { width: 100%; min-width: 180px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.ep-restore { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* 地图十六票 26：调阅对话正文（控制台设计标准 §十一.328～329）——钉住的“调阅中”横幅、抬头、按对话顺序的正文、图片与附件的灰框 */
.transcript-pin { position: sticky; top: -16px; z-index: 2; margin: -16px -20px 0; padding: 12px 20px 2px; background: var(--surface); }
.transcript-pin .banner { margin: 0; }
.transcript-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.transcript-head-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.transcript-body { display: flex; flex-direction: column; gap: 14px; padding: 6px 0 12px; }
.transcript-msg { display: flex; flex-direction: column; gap: 4px; }
.transcript-msg.is-user { align-items: flex-end; }
.transcript-msg.is-agent { align-items: flex-start; }
.transcript-ph { width: 360px; max-width: 100%; height: 150px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); }
.transcript-reason textarea { width: 100%; resize: vertical; }

/* 地图十七票 10：员工提名的三道分签（§十一.347～.350）——提名明细的小标题、整份 SKILL.md、签的抽屉底栏、AI 优化建议逐条、人工用时的数字框 */
.skill-sec .sec-t { font-size: 14px; margin: 0; display: flex; align-items: center; gap: 6px; }
.nomination-md { white-space: pre-wrap; word-break: break-word; font-family: var(--mono, ui-monospace, monospace); font-size: 13px; line-height: 1.6; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 12px; max-height: 50vh; overflow: auto; }
.review-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ai-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-items > li { border-top: 1px solid var(--line-soft); padding-top: 6px; line-height: 1.55; }
.num-in { width: 6em; }
td.acts { white-space: nowrap; }
td.acts > * + * { margin-left: 6px; }
/* 地图十八票 20（收 M17-L-113）：Skill 明细右栏是窄栏，里面的表不吃全站 620px 下限、表头可折行，装得进就不横滚；
   操作格仍是表格单元（全站 `.acts` 是弹性盒，套在 td 上会让没按钮的行分割线错位），按钮多了在格内换行 */
.skill-detail table { min-width: 0; }
.skill-detail th { white-space: normal; }
.skill-detail td.acts { display: table-cell; white-space: normal; }

/* 地图十七票 06：工作节奏（控制台设计标准 §十一.351～.353）——交办话一行截断悬停出全文；“其中 N 人关掉了”与操作三钮不折行；空表一态；抽屉里周几、几号的小钮 */
.wrh-table td.wrh-what { max-width: 280px; }
.wrh-ins { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrh-table td.wrh-who { min-width: 120px; }
.wrh-table .acts { flex-wrap: nowrap; white-space: nowrap; }
.wrh-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wrh-empty b { color: var(--text); }
.wrh-tier { margin-left: 8px; font-size: 12px; }
.wrh-form textarea { width: 100%; resize: vertical; }
.wrh-modes { display: flex; flex-direction: column; gap: 6px; }
.wrh-freq { display: flex; flex-direction: column; gap: 8px; }
.wrh-days { flex-wrap: wrap; gap: 6px; }
.wrh-days .chipx { min-width: 34px; justify-content: center; }
/* 地图十七票 07：员工端升级页（控制台设计标准 §十一.357～.359）——签名一格核过绿字、没核过红字；进度细条；明细按版本分格 */
.du-versions .sdot-ok { color: var(--ok); }
.du-versions .sdot-bad { color: var(--danger); }
.du-why { margin-top: 2px; max-width: 420px; white-space: normal; }
.du-progress { white-space: nowrap; }
.du-bar { margin-top: 4px; width: 140px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.du-bar > span { display: block; height: 100%; background: var(--ok); }
.du-detail { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; }
.du-counts { gap: 6px; flex-wrap: wrap; }
.du-count { cursor: default; }
.du-people td, .du-people th { font-size: 13px; }

/* 地图十八票 24：Skill 详情与员工推荐详情改成整页（控制台设计标准 §十一.368～.370）——摘要一行三格（两格是链接）、概况两栏、
   页头“更多”下拉、申请表定宽不横滚（“为什么”至多两行）、批准与不批抽屉顶上的申请原文、批准抽屉里现有各条与新加的一条 */
.skill-page { gap: 12px; }
.skill-page .dhead { margin-bottom: 0; }
.skill-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.skill-sum-c { display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: left; text-decoration: none; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
.skill-sum-c b { font-size: 16px; font-weight: 600; }
.skill-sum-c > .catline:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.skill-sum-c.link { cursor: pointer; }
.skill-sum-c.link:hover, .skill-sum-c.link:focus-visible { border-color: var(--accent); }
.skill-sum-go { color: var(--accent); }
@media (max-width: 900px) { .skill-sum { grid-template-columns: minmax(0, 1fr); } }
.skill-ov { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.skill-ov-side { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1100px) { .skill-ov { grid-template-columns: minmax(0, 1fr); } }
.skill-tabpanel { display: flex; flex-direction: column; gap: 16px; }
.skill-pub-line { font-size: 13px; }
.menu-wrap { position: relative; display: inline-flex; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 12; min-width: 180px; display: flex; flex-direction: column; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.menu-i { min-height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.menu-i:hover:not(:disabled), .menu-i:focus-visible { background: var(--surface-2); }
.menu-i.danger { color: var(--danger); }
.menu-i:disabled { color: var(--muted); cursor: not-allowed; }
.menu-why { padding: 0 10px 6px; max-width: 260px; white-space: normal; }
.apply-table { table-layout: fixed; width: 100%; }
.apply-table col.c-who { width: 200px; }
.apply-table col.c-day { width: 84px; }
.apply-table col.c-state { width: 150px; }
.apply-table col.c-acts { width: 176px; }
.apply-table .acts { flex-wrap: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.quote-line { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.grant-edit-ro { background: var(--surface-2); }
.grant-edit-ro .grant-edit-head { margin-bottom: 0; justify-content: space-between; }
.grant-edit-new { border-color: var(--accent); }
/* 地图十八票 11：分享与导出页（设置三行）、调阅接着问出来的对话里分享来的几条 */
.sh-kv dd.sh-row { display: flex; align-items: center; gap: 12px; }
.sh-kv .sh-v { min-width: 120px; }
.sh-kv .sh-note { flex: 1 1 auto; }
.transcript-shared { background: var(--surface-2); border-radius: var(--radius); padding: 6px 8px; display: flex; flex-direction: column; gap: 6px; }
/* 地图十九票 13：调阅抽屉抬头之下“开头带着长期记忆”一行 */
.transcript-memory { background: var(--surface-2); border-radius: var(--radius); padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.transcript-memory-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.transcript-memory-head .linklike { color: var(--accent); white-space: nowrap; }
.transcript-memory-list { margin: 0; padding: 6px 10px 6px 28px; background: var(--surface); border-radius: var(--radius); display: flex; flex-direction: column; gap: 2px; }
/* 地图十八票 06：企业模板页（左表右明细、类型小标、上传抽屉的检查与清洗、PPT 版式小样；小样本身白底） */
.tpl-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .tpl-split { grid-template-columns: minmax(0, 1fr); } }
.tpl-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tpl-detail .panel { margin: 0; }
.tpl-type { display: inline-block; font-size: 11px; font-weight: 600; line-height: 18px; padding: 0 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.tpl-type-xlsx { background: var(--ok-soft); color: var(--ok); }
.tpl-type-ppt { background: var(--orange-soft); color: var(--orange); }
.tpl-off td { color: var(--muted); }
.tpl-pack { color: var(--muted); vertical-align: middle; }
.tpl-dhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tpl-dhead h2 { margin: 0; font-size: 16px; }
.tpl-dhead .grow, .tpl-clean-row .grow { flex: 1 1 auto; }
.tpl-kv dd { overflow-wrap: anywhere; }
.tpl-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: middle; border: 1px solid var(--line); }
.tpl-logo { max-height: 36px; max-width: 120px; vertical-align: middle; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.tpl-record, .tpl-versions, .tpl-history, .tpl-checks, .tpl-clean, .tpl-values { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tpl-versions li .linklike { margin-left: 8px; }
.tpl-actions { display: flex; gap: 8px; }
.tpl-ph code { font-size: 12px; }
.tpl-ph input { width: 100%; min-width: 140px; }
.tpl-gone td { color: var(--muted); text-decoration: line-through; }
.tpl-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.tpl-checking { padding: 24px; text-align: center; }
.tpl-picked { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tpl-h3 { font-size: 13px; margin: 12px 0 6px; }
.tpl-checks li { display: grid; grid-template-columns: 18px 56px 1fr; gap: 8px; align-items: baseline; }
.tpl-checks li.ok .tpl-mark { color: var(--ok); }
.tpl-checks li.bad .tpl-mark, .tpl-checks li.bad span:last-child { color: var(--danger); }
.tpl-clean li { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 6px 8px; }
.tpl-clean-row { display: flex; gap: 8px; align-items: baseline; width: 100%; background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; flex-wrap: wrap; }
.tpl-verb { color: var(--muted); font-size: 12px; }
.tpl-values { max-height: 220px; overflow: auto; font-size: 12px; }
.tpl-confirm { display: flex; gap: 6px; align-items: center; margin-top: 12px; font-weight: 600; }
.tpl-ph-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.tpl-ph-preview { border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px; }
.tpl-ppt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .tpl-ppt, .tpl-ph-split { grid-template-columns: minmax(0, 1fr); } }
.tpl-colors { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tpl-color { width: 22px; height: 22px; border-radius: 4px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.tpl-color.on { border-color: var(--text); }
.tpl-color-own { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; }
.tpl-slides { display: flex; flex-direction: column; gap: 10px; }
.tpl-slide { position: relative; aspect-ratio: 16 / 9; background: #fff; color: #1f2329; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; font-size: 11px; }
.tpl-slide-logo { position: absolute; left: 8px; top: 8px; max-height: 18px; max-width: 60px; }
.tpl-slide-cover { position: absolute; left: 12%; top: 38%; padding-left: 10px; }
.tpl-slide-title { font-size: 16px; font-weight: 700; }
.tpl-slide-sub { color: #5b6370; margin-top: 4px; }
.tpl-slide-bar { color: #fff; padding: 6px 10px; font-weight: 600; }
.tpl-slide-bars { position: absolute; left: 12%; right: 12%; top: 30%; bottom: 18%; display: flex; align-items: flex-end; gap: 10%; }
.tpl-slide-bars span { flex: 1 1 0; border-radius: 2px 2px 0 0; }
.tpl-slide-foot { position: absolute; left: 10px; right: 10px; bottom: 4px; display: flex; justify-content: space-between; color: #5b6370; font-size: 10px; }

/* 从模板新建（地图十九票 14，连接器设计屏二 A）：选模板的卡；一张也只占三分之一宽 */
.tpl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dircard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.dircard.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.dircard-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dircard-name { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; }
.tpl-line { font-size: 13px; }
.tpl-table { flex: none; }  /* 抽屉体是竖排弹性盒，内容超高时带滚动的表格会被压没 */
.tpl-try { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tpl-ok { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--ok); font-size: 13px; font-weight: 600; }
.tpl-bad { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; min-width: 0; flex: 1 1 0; }
.tpl-bad-line { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--danger); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.tpl-bad-line svg { flex: none; margin-top: 2px; }
.tpl-bad-hint { padding-left: 21px; }
.tpl-warn-icon { color: var(--warn); display: inline-flex; }
.tpl-lock { margin-left: 0; }
.tpl-lock .help-tip { left: auto; right: -8px; top: 24px; }
.tpl-lock-icon { color: var(--muted); display: inline-flex; }
.tpl-lock input[type="checkbox"] { margin: 0; }

/* 按手机号对一次（地图十九票 15，连接器设计屏二 B）：姓名不一样的行标黄；悬停与键盘聚焦都出提示 */
.pm-entry { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pm-lead { font-size: 13px; }
.pm-go { display: flex; align-items: center; gap: 12px; }
.pm-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pm-table { flex: none; }  /* 抽屉体是竖排弹性盒，内容超高时带滚动的表格会被压没 */
.pm-check { width: 36px; }
.pm-diff > td { background: var(--warn-soft); }
.pm-tip { margin-left: 0; }
.pm-tip .help-tip { top: 26px; }
.pm-tip-text { border-bottom: 1px dashed var(--muted); }
.pm-tip.pm-warn .pm-tip-text { display: inline-flex; align-items: center; gap: 6px; border-bottom: 0; color: var(--warn); font-weight: 600; }
.pm-phone { display: flex; align-items: center; gap: 12px; }
/* “IM 提醒”页（地图十九票 16，§十一.396～.399） */
.im-card { display: grid; }
.im-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 16px; }
.im-two > .panel { margin-bottom: 0; }
@media (max-width: 1100px) { .im-two { grid-template-columns: minmax(0, 1fr); } }
dl.kv.im-kv { row-gap: 10px; }
.im-link { color: var(--accent); }
.im-ok, .im-bad { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.im-ok { color: var(--ok); }
.im-bad { color: var(--danger); }
.im-week { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.im-week b { font-size: 22px; font-variant-numeric: tabular-nums; }
.im-sep { color: var(--muted); }
.im-week-bad { color: var(--danger); white-space: nowrap; }
.im-reasons { display: flex; flex-direction: column; gap: 4px; }
table.counts.im-counts { width: 100%; }
td.im-n-bad { color: var(--danger); font-weight: 600; }
.im-tight { margin-top: -6px; }
.im-grants .wbp-embed > .panel { border: 0; background: none; padding: 0; margin: 0; }
.im-grants .wbp-embed > .stats:empty { display: none; }
th.im-when-h { width: 240px; }
th.im-when { font-weight: 400; color: var(--text); font-size: 14px; white-space: nowrap; }
.im-line { font-size: 13px; }
.im-daily { width: 120px; }
.im-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 88px 24px; text-align: center; }
.im-empty-tile { width: 48px; height: 48px; border-radius: 10px; }
.im-empty-t { font-size: 15px; }
