:root {
  /* 「纸墨」主题：暖纸画布 + 纯白浮层 + 墨色反白导航 */
  --canvas: #f4f2ec;
  --canvas-soft: #eae7df;
  --panel: #ffffff;
  --ink: #1c1917;
  --ink-secondary: #6f6b63;
  --ink-muted: #a8a29a;
  --hairline: #e2ded4;
  --primary: #1c1917;
  --primary-bright: #33302b;
  --primary-muted: #eae7df;
  --accent: #d97706;
  --accent-muted: #fffbeb;
  --success: #16a34a;
  --warning: #ca8a04;
  --destructive: #dc2626;
  --ink-on-dark: #fafaf9; /* = paper-ink-on-dark（DESIGN.md colors 已登记） */
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --font: "DM Sans", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --display: "DM Sans", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; min-height: 100dvh;
  font-family: var(--font); color: var(--ink); background: var(--canvas);
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }

/* ===== 全局焦点策略（负责人反馈 msg 7512442887365662000：「应用到节点与 Agent」呈蓝色 = UA 默认焦点环）=====
   键盘焦点统一琥珀环（与 .bell/.mode-nav 既有 focus-visible 同款），鼠标点按不出环；
   输入类焦点用边框加深表达（既有更高特异性的自定义 :focus 规则不受影响）。 */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink-muted); }

/* ===== Layout 系统（DESIGN.md）=====
   统一骨架：canvas 底 + 页面统一 padding + 卡片浮在画布上。
   --page-pad 页面级 padding；--gap-block 区块间；--gap-in 组件内；
   --card 卡片外观（panel 底 + hairline + radius-lg + shadow-soft）。
   超宽屏上限 1440px（媒体查询），所有模式容器统一引用。 */
:root {
  --page-pad: 24px 28px;
  --gap-block: 16px;
  --gap-in: 12px;
  --shadow-soft: 0 1px 2px rgba(28, 25, 23, 0.05), 0 2px 6px rgba(28, 25, 23, 0.04);
  --shadow-lift: 0 2px 6px rgba(28, 25, 23, 0.06), 0 12px 32px rgba(28, 25, 23, 0.1);
}
/* 超宽屏（≥1600px）统一收 1440px 居中：全页一致（含 agents/nodes），让居中是刻意的 */
@media (min-width: 1600px) {
  .catalog-shell, .detail-shell, .full, .nodes-shell {
    max-width: 1440px; width: 100%; margin-inline: auto;
  }
}

.shell { display: flex; height: 100%; min-height: 100dvh; }
#app.shell { min-height: 100dvh; }
/* ===== 左轨：暖纸浅色导航（owner 选 A · msg 7511608410456374000，墨色反白退役），选中态琥珀竖条 + 白浮层 ===== */
.rail {
  width: 220px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--canvas-soft); color: var(--ink); padding: 20px 12px;
  gap: 20px; border-right: 1px solid var(--hairline);
}
.rail-brand {
  font-family: var(--font); font-weight: 600; font-size: 16px;
  letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px;
  padding: 0 10px; color: var(--ink); text-decoration: none;
}
.rail-brand:hover .mark, .gate-brand:hover .mark { opacity: 0.8; }
.mark {
  width: 22px; height: 22px; flex-shrink: 0;
}
.mode-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-prim { flex: 1; }
.shell-bar {
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0; height: 52px; padding: 0 28px;
  background: var(--canvas-soft); border-bottom: 1px solid var(--hairline);
}
.shell-crumb { font-size: 12px; color: var(--ink-muted); }
.bar-link {
  all: unset; cursor: pointer; padding: 8px 10px; border-radius: var(--radius-xs);
  color: var(--ink-secondary); font-size: 13px; font-weight: 500;
}
.bar-link:hover { color: var(--ink); background: var(--panel); }
.nav-sec {
  flex-direction: row; align-items: center; gap: 2px;
}
.oss-dd { position: relative; display: flex; align-items: center; }
.oss-dd-btn { display: flex; align-items: center; padding: 8px 10px; }
.oss-dd-btn svg { display: block; }
.oss-dd-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 140px;
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lift);
  padding: 6px; z-index: 40; display: flex; flex-direction: column; gap: 2px;
}
.oss-dd-menu a {
  padding: 8px 10px; border-radius: var(--radius-xs); text-decoration: none;
  color: var(--ink-secondary); font-size: 13px; font-weight: 500;
}
.oss-dd-menu a:hover { color: var(--ink); background: var(--canvas-soft); }
/* ── 顶栏通知铃铛(team-collab · DESIGN.md「Team Collab · 通知铃铛」;oss-dd 下拉判例同构) ── */
.bell-wrap { position: relative; display: flex; align-items: center; }
.bell {
  all: unset; cursor: pointer; position: relative; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs); color: var(--ink-secondary);
}
.bell:hover { background: var(--panel); color: var(--ink); }
.bell:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.bell svg { width: 16px; height: 16px; }
.bell-badge {
  position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: var(--panel);
  font-size: 11px; font-weight: 700; line-height: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums;
}
.bell-panel {
  position: absolute; top: calc(100% + 6px); right: 0; width: 360px;
  max-width: calc(100vw - 56px); background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lift);
  z-index: 40; overflow: hidden;
}
.bell-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--hairline);
}
.bell-head .zone-label { margin: 0; }
.bell-read-all { all: unset; cursor: pointer; font-size: 12px; color: var(--accent); }
.bell-read-all:hover { text-decoration: underline; }
.bell-list { max-height: 320px; overflow-y: auto; }
/* 通知行:容器退役 → .list-row(薄覆盖=宽内距+可点击,DESIGN.md 登记) */
.list-row.ntf { padding: 10px 14px; cursor: pointer; text-align: left; }
.ntf:hover { background: var(--canvas-soft); }
.ntf.is-unread { background: var(--accent-muted); }
.ntf.is-unread:hover { background: var(--accent-muted); }
.ntf-ico {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: var(--radius-xs);
  background: var(--primary-muted); display: inline-flex; align-items: center;
  justify-content: center; font-size: 12px;
}
.ntf.is-unread .ntf-ico { background: var(--panel); }
.ntf-body { flex: 1 1 auto; min-width: 0; }
.ntf-text { display: block; font-size: 13px; color: var(--ink); line-height: 1.5; }
.ntf-text b { font-weight: 600; }
.ntf-when {
  display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-muted);
  margin-top: 2px; font-variant-numeric: tabular-nums;
}
.ntf-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); margin-top: 7px; }
.ntf-empty { padding: 24px 14px; text-align: center; }
.ntf-empty p { margin: 0; font-size: 13px; color: var(--ink-secondary); }
.ntf-empty .ntf-empty-sub { margin-top: 6px; font-size: 12px; color: var(--ink-muted); }
.mode-nav button {
  all: unset; cursor: pointer; padding: 8px 10px; border-radius: var(--radius-xs);
  color: var(--ink-secondary); font-size: 13px; font-weight: 500;
}
.mode-nav button:hover:not(:disabled) { color: var(--ink); background: var(--panel); }
.mode-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mode-nav button:disabled { opacity: 0.4; cursor: not-allowed; }
.nav-prim button {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; line-height: 18px; padding: 9px 10px;
}
.nav-prim button svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-prim button[aria-current="true"] {
  color: var(--ink); background: var(--panel); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-prim button[aria-current="true"] svg { color: var(--accent); }
.nav-sec button[aria-current="true"] {
  color: var(--ink); background: var(--panel); font-weight: 600;
  border: 1px solid var(--hairline); box-shadow: var(--shadow-soft);
}
.rail-foot {
  position: relative; display: flex; flex-direction: column; padding: 0 4px; margin-top: auto;
}
.user-chip {
  all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  color: var(--ink-secondary); font-size: 13px;
}
.user-chip:hover { background: var(--panel); color: var(--ink); }
.avatar {
  width: 24px; height: 24px; border-radius: 999px; flex-shrink: 0;
  background: var(--accent); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.user-mail {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-menu {
  position: absolute; bottom: calc(100% + 6px); left: 4px; min-width: 180px;
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lift);
  padding: 6px; z-index: 40;
}
.user-menu-h {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-bottom: 1px solid var(--hairline); margin-bottom: 6px;
}
.user-menu-h strong { font-size: 13px; font-weight: 600; }
.user-menu-h .mono { font-size: 11px; color: var(--ink-muted); }
.user-menu-item {
  all: unset; cursor: pointer; display: block; width: 100%;
  padding: 8px 10px; border-radius: var(--radius-xs);
  font-size: 13px; font-weight: 500; color: var(--ink);
}
.user-menu-item:hover { background: var(--canvas-soft); }
.user-menu-item.danger { color: var(--destructive); }
.user-menu-item.danger:hover { background: rgba(220, 38, 38, 0.06); }

.main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--canvas); }
.brand { font-weight: 700; display: flex; align-items: center; gap: 8px; }

.seg {
  display: flex; background: var(--canvas-soft); border-radius: var(--radius-sm);
  padding: 3px; gap: 2px; border: 1px solid var(--hairline);
}
.seg button {
  all: unset; cursor: pointer; padding: 5px 12px; border-radius: var(--radius-xs);
  color: var(--ink-secondary); font-size: 13px;
}
.seg button[aria-current="true"] {
  background: var(--panel); color: var(--ink); font-weight: 700;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
}

.btn {
  border: 1px solid var(--hairline); background: var(--panel);
  border-radius: var(--radius-xs); padding: 6px 12px; cursor: pointer;
  font-size: 13px; font-weight: 600; height: 32px; color: var(--ink);
  white-space: nowrap; flex-shrink: 0; /* 窄容器不折行不压缩（「应用到节点与 Agent…」显示不全修正） */
  display: inline-flex; align-items: center; justify-content: center;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--ink-secondary); border-color: transparent; font-weight: 500;
}
.btn-primary {
  background: var(--primary); color: #ffffff; border-color: var(--primary); font-weight: 600;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-bright); border-color: var(--primary-bright); }

.catalog-shell {
  flex: 1; min-height: 0; overflow: auto; background: var(--canvas); padding: var(--page-pad);
  display: flex; flex-direction: column;
}
.catalog-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--gap-block); margin-bottom: 20px;
}
.catalog-title {
  margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.03em;
}
.catalog-sub { margin: 6px 0 0; font-size: 13px; color: var(--ink-secondary); }
.catalog-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.catalog-filters select {
  height: 32px; border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  background: var(--panel); padding: 0 12px; font-size: 13px; color: var(--ink);
}
.agent-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap-block);
  align-content: start;
}
.agent-grid .grid-filler { display: none; }
/* 目录卡（2026-09-21 v5 重设计，参照 Linear/Vercel/Stripe/PostHog 卡片模式：
   统一白底 + hairline（状态不刷底色，Linear「层级靠 surface 不靠 tint」）；
   40px 字标占 logo 位（集成卡惯例，无 logo 退化）；描述用 sans 非 mono；
   hover = 底色加深一档 + 边线加深（Vercel template-card hover 法） */
.agent-card {
  all: unset; cursor: pointer; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px;
  padding: 24px; text-align: left; background: var(--panel); color: inherit;
  border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.agent-card:hover { background: rgba(28, 25, 23, 0.03); border-color: var(--ink-muted); box-shadow: var(--shadow-lift); }
.agent-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
/* runtime 字标：40px 圆角块 + mono 双字母（集成卡 logo 位的无 logo 退化形态） */
.agent-mark {
  width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--canvas-soft); border-radius: var(--radius-xs);
  font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink);
}
.agent-card .name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.agent-card .desc { margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--ink-secondary); }
/* 规划中 runtime：字标虚线空壳 + 文字降级（能力清单，非真实实例；禁 hover 反馈） */
.agent-card.agent-card-planned { cursor: default; }
.agent-card.agent-card-planned:hover { background: var(--panel); border-color: var(--hairline); box-shadow: var(--shadow-soft); }
.agent-card.agent-card-planned .agent-mark { background: transparent; border: 1px dashed var(--ink-muted); color: var(--ink-muted); }
.agent-card.agent-card-planned .name { color: var(--ink-secondary); font-weight: 500; }
.agent-card.agent-card-planned .desc { color: var(--ink-muted); }
/* 创建卡（目录末尾）：与规划中卡同规范——dashed 虚线卡 + 不可点 */
.agent-card.agent-card-create { cursor: default; }
.agent-card.agent-card-create:hover { background: var(--panel); border-color: var(--hairline); box-shadow: var(--shadow-soft); }
.agent-card.agent-card-create .agent-mark { background: transparent; border: 1px dashed var(--ink-muted); color: var(--ink-muted); }
.agent-card.agent-card-create .name { color: var(--ink-secondary); font-weight: 500; }
.agent-card.agent-card-create .desc { color: var(--ink-muted); }
.pill-planned { color: var(--ink-muted); border-style: dashed; }
.pill-empty { color: var(--ink-secondary); }
.agent-grid .empty {
  grid-column: 1 / -1; background: var(--panel); padding: 40px 16px;
  text-align: center; color: var(--ink-secondary); font-size: 13px;
}
.pill {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--hairline); color: var(--ink-secondary); background: var(--panel);
}

.detail-shell {
  flex: 1; min-height: 0; overflow: auto; background: var(--canvas); padding: var(--page-pad);
}
.back-link {
  all: unset; cursor: pointer; color: var(--ink-secondary); font-size: 13px; font-weight: 500;
  margin-bottom: var(--gap-in); display: inline-block;
}
.back-link:hover { color: var(--ink); }
.insp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--gap-block); }
.handoff-row select {
  height: 32px; border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  background: var(--panel); padding: 0 12px; font-size: 13px;
}
/* 交接说明输入（agent-handoff-context；按钮排布：说明优先占宽；console-ui-kit：flex 移给 .field wrapping label） */
.handoff-row input {
  height: 32px; font-size: 13px; min-width: 0;
}
.handoff-row .handoff-f-note { flex: 1.4; }
.handoff-row .handoff-f-target { flex: 1; }
/* 交接弹窗（session-flow-ia：面板迁弹窗，源 Agent 锁定展示） */
.handoff-modal-hint { margin: 0 0 10px; font-size: 13px; color: var(--ink-secondary); line-height: 1.55; }
.handoff-modal-from { font-size: 13px; color: var(--ink-secondary); margin-bottom: 10px; }
.handoff-modal-from strong { color: var(--ink); font-weight: 600; }
/* 会话行级交接钮（index 表第 5 列，Agent 链接之后） */
/* 交接钮在独立「操作」列，不再与 Agent 名同格挤一行 */
.sess-handoff-btn, .sess-resume-btn { margin: 0; }
.sess-resume-btn + .sess-handoff-btn { margin-left: 10px; }

/* 收到的交接（agent-handoff-context；原型 v1 变体 A：分离式卡片行 + 全清单） */
.handoff-in-list { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; }
/* console-ui-kit：收到的交接卡片行容器规格并入 .card-row（data 钩子与子部件保留） */
.handoff-in-head { display: flex; align-items: baseline; gap: 8px; }
.handoff-in-from { font-size: 13px; font-weight: 600; }
.handoff-in-when {
  font-family: var(--mono); font-size: 11px; color: var(--ink-muted);
  margin-left: auto; font-variant-numeric: tabular-nums;
}
.handoff-in-note-text { font-size: 13px; color: var(--ink-secondary); line-height: 1.5; }
.handoff-in-ctx {
  display: flex; flex-direction: column; border: 1px solid var(--hairline);
  border-radius: var(--radius-xs); background: var(--panel); overflow: hidden;
}
.handoff-ctx-row {
  display: flex; align-items: baseline; gap: 10px; padding: 6px 10px;
  border-bottom: 1px solid var(--hairline);
}
.handoff-ctx-row:last-child { border-bottom: none; }
.handoff-ctx-kind {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-muted);
  width: 34px; flex: none;
}
.handoff-ctx-name {
  font-size: 12px; font-weight: 500; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.handoff-ctx-path {
  font-family: var(--mono); font-size: 11px; color: var(--ink-muted); flex: 1;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.handoff-in-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.handoff-in-actions .hint { margin-left: auto; }
.handoff-ctx-head {
  font-size: 11px; color: var(--ink-muted); letter-spacing: 0.04em;
  padding: 6px 10px; border-bottom: 1px solid var(--hairline);
}

.work-page {
  max-width: none; width: 100%;
  display: flex; flex-direction: column; gap: var(--gap-block);
}
.work-card {
  flex: 0 0 auto; min-width: 0;
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; overflow: hidden;
}
.work-card-grow { flex: 1 1 auto; min-height: 0; }
.work-card-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap-in); padding: 16px 20px; flex: 0 0 auto;
  border-bottom: 1px solid var(--hairline); background: var(--canvas);
}
.work-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--gap-block); flex-wrap: wrap; flex: 0 0 auto;
}
.work-filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--gap-in) var(--gap-block);
}
.work-tab { display: none; flex: 1 1 auto; min-height: 0; }
.work-tab-open { display: flex; }
/* 后续预告条（如会话详情）：跟随表卡之下，静音不抢主路径 */
.work-soon { flex: 0 0 auto; margin: var(--gap-block) 0 0; }
/* ===== 会话转录详情（session-transcript-detail · DESIGN.md「Transcript」规范行）=====
   面包屑 → 详情卡：头区（h1 + 只读 chip）→ 元数据行 → 消息序列（.tr-msg）/ 待回传 / 空态。
   「像归档记录，不像 chat」：发言者侧栏 + hairline 分线，不左右冒泡。 */
.tr-crumbs { display: flex; align-items: center; gap: var(--gap-in); flex: 0 0 auto; }
.tr-head {
  padding: 20px; border-bottom: 1px solid var(--hairline);
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--gap-in) 20px; flex-wrap: wrap;
}
.tr-head h1 {
  margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.25; overflow-wrap: anywhere;
}
.tr-sub { margin: 6px 0 0; font-size: 13px; color: var(--ink-secondary); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tr-sub .mono { font-size: 12px; }
.tr-meta {
  padding: 12px 20px; border-bottom: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: 6px 20px;
}
.tr-meta-item { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
.tr-meta-label {
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600; flex: 0 0 auto;
}
.tr-meta-value { font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.tr-meta-value.mono { font-size: 12px; color: var(--ink-secondary); }
/* 消息行:容器退役 → .list-row(transcript/IM 消息共用薄覆盖=宽内距+顶对齐,DESIGN.md 登记) */
.list-row.tr-msg, .list-row.msg-item { gap: 16px; padding: 12px 20px; align-items: flex-start; }
.tr-who { width: 60px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.tr-who .name { font-size: 12px; font-weight: 500; }
.tr-who .role { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }
.tr-msg.is-user .tr-who .name { color: var(--ink); }
.tr-msg.is-assistant .tr-who .name { color: var(--ink-secondary); }
.tr-body { flex: 1 1 auto; min-width: 0; }
.tr-text {
  margin: 0; font-size: 13px; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6;
}
/* 会话回放 Markdown（marked+DOMPurify；块级不再靠 pre-wrap） */
.tr-text.tr-md { white-space: normal; }
.tr-md > :first-child { margin-top: 0; }
.tr-md > :last-child { margin-bottom: 0; }
.tr-md p { margin: 0 0 0.65em; }
.tr-md h1, .tr-md h2, .tr-md h3, .tr-md h4, .tr-md h5, .tr-md h6 {
  margin: 0.9em 0 0.4em; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); line-height: 1.35;
}
.tr-md h1 { font-size: 18px; }
.tr-md h2 { font-size: 16px; }
.tr-md h3 { font-size: 14px; }
.tr-md h4, .tr-md h5, .tr-md h6 { font-size: 13px; }
.tr-md ul, .tr-md ol { margin: 0 0 0.65em; padding-left: 1.35em; }
.tr-md li { margin: 0.15em 0; }
.tr-md blockquote {
  margin: 0 0 0.65em; padding: 0 0 0 12px; border-left: 2px solid var(--hairline);
  color: var(--ink-secondary);
}
.tr-md hr { border: 0; border-top: 1px solid var(--hairline); margin: 0.85em 0; }
.tr-md table { border-collapse: collapse; margin: 0 0 0.75em; font-size: 12px; width: 100%; }
.tr-md th, .tr-md td { border: 1px solid var(--hairline); padding: 6px 8px; text-align: left; }
.tr-md th { background: var(--canvas-soft); font-weight: 600; }
.tr-md strong { font-weight: 600; }
.tr-md em { font-style: italic; }
.tr-md a { color: var(--accent); text-decoration: underline; }
.tr-md code {
  font-family: var(--mono); font-size: 12px; background: var(--canvas-soft);
  border: 1px solid var(--hairline); border-radius: var(--radius-xs); padding: 1px 5px;
}
.tr-md pre {
  margin: 0 0 0.75em; padding: 10px 12px; overflow-x: auto;
  background: var(--canvas-soft); border: 1px solid var(--hairline); border-radius: var(--radius-xs);
}
.tr-md pre code {
  padding: 0; border: 0; background: transparent; font-size: 12px; line-height: 1.5;
  white-space: pre; display: block;
}
.tr-when {
  font-family: var(--mono); font-size: 11px; color: var(--ink-muted);
  font-variant-numeric: tabular-nums; flex: 0 0 auto; padding-top: 3px;
}
.tr-cut {
  padding: 10px 20px; text-align: center; font-family: var(--mono);
  font-size: 12px; color: var(--ink-muted); border-bottom: 1px solid var(--hairline);
}
.tr-pending {
  margin: 16px 20px; padding: 10px 12px; background: var(--primary-muted);
  border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  font-size: 13px; color: var(--ink-secondary); line-height: 1.6;
}
.tr-empty {
  min-height: 200px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; padding: 40px 24px; text-align: center;
}
.tr-empty-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.tr-empty-sub { margin: 0; font-size: 13px; color: var(--ink-secondary); }
#indexSessionTable tbody tr[data-session-id] { cursor: pointer; }
#mode-transcript tr[data-id] { cursor: default; }
@media (max-width: 800px) {
  #mode-transcript .full-inner, #mode-transcript { padding: 16px; }
  .tr-head, .tr-meta, .tr-msg, .tr-pending, .tr-cut { padding-left: 16px; padding-right: 16px; }
  .tr-msg { flex-wrap: wrap; row-gap: 4px; }
  .tr-who { width: auto; flex-direction: row; align-items: baseline; gap: 8px; }
  .tr-when { margin-left: auto; padding-top: 0; }
}
.work-tab .work-card { flex: 1 1 auto; min-height: 0; }
.work-tab .index-table-wrap { flex: 1 1 auto; min-height: 0; }
/* 分页器组件（console-ui-kit · 收敛旧一次性 pager 类；渲染只走 renderPager） */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--gap-in); flex: 0 0 auto; padding: 10px 20px;
  border-top: 1px solid var(--hairline); background: var(--panel);
}
.work-card-h .pager { border-top: 0; background: transparent; padding: 0; }
.pager:empty { padding: 0; border-top: 0; }
.pager-info { font-size: 12px; color: var(--ink-secondary); font-family: var(--mono); }
.pager-btns { display: flex; gap: 8px; }
.pager-btn {
  border: 1px solid var(--hairline); background: var(--panel); color: var(--ink-secondary);
  border-radius: var(--radius-xs); padding: 4px 10px; font-size: 12px; font-weight: 500;
  cursor: pointer; height: 26px;
}
.pager-btn:hover:not(:disabled) { color: var(--ink); background: var(--canvas); }
.pager-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.body { flex: 1; display: grid; grid-template-columns: 260px 1fr; min-height: 0; background: var(--panel); }
.list {
  border-right: 1px solid var(--hairline); background: var(--canvas);
  overflow: auto; display: flex; flex-direction: column;
}
.list-h {
  padding: 12px 14px; font-size: 12px; color: var(--ink-secondary);
  border-bottom: 1px solid var(--hairline); font-family: var(--mono);
}
.agent {
  all: unset; cursor: pointer; display: block; padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}
.agent:hover, .agent[aria-current="true"] { background: var(--panel); }
.agent[aria-current="true"] { box-shadow: inset 2px 0 0 var(--accent); }
.agent .name { font-weight: 700; font-size: 13px; }
.empty { padding: 28px 14px; font-size: 13px; color: var(--ink-secondary); }
.agent .meta {
  font-size: 12px; color: var(--ink-secondary); margin-top: 4px;
  display: flex; gap: 8px; align-items: center;
}
.dot { width: 6px; height: 6px; border-radius: 999px; display: inline-block; }
.dot-ok { background: var(--success); }
.dot-warn { background: var(--warning); }
.dot-bad { background: var(--destructive); }
.dot-mute { background: var(--ink-secondary); }

.insp { overflow: auto; display: flex; flex-direction: column; }
/* 实例/runtime 详情页头：hairline 退役（卡片自带边框已自成分区）；
   侧动作底行对齐（config-head / collab「按钮太靠上」同款判例，不贴 h1 顶） */
.detail-shell .insp-h {
  padding: 0 0 var(--gap-block);
  border-bottom: 0;
  align-items: flex-end;
}
.detail-shell .insp-b { padding: var(--gap-block) 0 0; gap: var(--gap-block); }
.insp-h {
  padding: 16px 20px; border-bottom: 1px solid var(--hairline);
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--gap-in);
}
.insp-h h1 {
  margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.03em;
  font-family: var(--font);
}
.insp-h p { margin: 4px 0 0; color: var(--ink-secondary); font-size: 13px; }
.insp-b { padding: 16px 20px; display: flex; flex-direction: column; gap: var(--gap-block); }
.block {
  border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--panel); box-shadow: var(--shadow-soft);
}
.block-h {
  padding: 10px 16px; border-bottom: 1px solid var(--hairline);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-secondary);
  background: var(--canvas);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
/* ── console-ui-kit 组件规格（SSOT = DESIGN.md「Console UI 组件规范」章）──────────
   表格唯一规格：所有表格必须挂 .data-table，裸 table 元素选择器零样式。
   表头声音（v4 原型定稿）升格为全表格规格：大写宽字距 + canvas-soft 一档下沉。 ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td {
  text-align: left; padding: 11px 20px; border-bottom: 1px solid var(--hairline);
}
.data-table th {
  color: var(--ink-secondary); font-weight: 600; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--canvas-soft); position: sticky; top: 0; z-index: 1;
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--canvas); }
/* 空态占位行不参与 hover 变色（详情 MCP/Skill/会话、runtime 实例空表等同口径） */
.data-table tbody tr.empty-row:hover td { background: transparent; }
/* runtime 详情实例表（负责人反馈 2026-10-05）：①页头 insp-h 下 hairline 分割线退役
   （卡片自带边框已自成分区，分割线冗余——与新页 page-head 无分割线口径一致）；
   ②空态占位行 hover 已升格为全局 .empty-row 规则；实例数据行保留 kit 标准 hover
   （负责人裁决 2026-10-05「谁让你改实例行了」：数据行 hover 属正常反馈，
   pointer 光标为仓里既有规则保留） */
#runtimePage .insp-h { border-bottom: 0; }
#rtInstBody tr[data-id] { cursor: pointer; }
#agentSessionBody tr.is-clickable { cursor: pointer; }
#agentSessionTable td.exec-when {
  white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-secondary);
}
#agentSessionTable td.exec-acts {
  white-space: nowrap; width: 1%;
}
#agentSessionTable td.exec-acts .link-btn + .link-btn { margin-left: 10px; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
/* 紧凑数据行：台账/列表行单一同构（flow/atpl 等一次性容器退役并入） */
.list-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--hairline); font-size: 12px; }
.list-row:last-child { border-bottom: 0; }
/* 卡片行：分离式卡片行（mcp/rule/收到的交接等一次性容器退役并入） */
.card-row {
  border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--canvas);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto;
}
.card-row:hover { border-color: var(--ink-muted); }
/* 表单字段：可见 label + 控件 + .hint/.err 槽（C 裁决全补；wrapping label 场景全局 label 样式供字体） */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label { font-size: 12px; color: var(--ink-secondary); font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; }
.mono { font-family: var(--mono); font-size: 12px; color: var(--ink-secondary); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hint, .insp-h p, .agent-card .desc, td { overflow-wrap: anywhere; }
.muted-cell { color: var(--ink-secondary); text-align: center; }
.tag {
  font-size: 11px; padding: 2px 6px; border-radius: var(--radius-xs);
  border: 1px solid var(--hairline); color: var(--ink-secondary);
}
.tag-bad { border-color: var(--destructive); color: var(--destructive); }
.hidden { display: none !important; }

.full {
  flex: 1; min-height: 0; overflow: auto;
  background: var(--canvas); padding: var(--page-pad);
  display: flex; flex-direction: column;
}
.stack { display: flex; flex-direction: column; gap: var(--gap-block); width: 100%; flex: 1; min-height: 0; }
.page-panel {
  max-width: none; width: 100%; flex: 1; padding: 0;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.page-head { margin-bottom: var(--gap-block); max-width: none; }
.page-head h1 {
  margin: 0; font-family: var(--font); font-size: 28px; font-weight: 600;
  letter-spacing: -0.03em; color: var(--ink);
}
.page-head p { margin: 6px 0 0; font-size: 13px; color: var(--ink-secondary); }

.config-shell { overflow: auto; gap: var(--gap-block); }
.config-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--gap-block); flex-wrap: wrap; margin-bottom: 0; flex: 0 0 auto;
}
.config-actions {
  display: flex; align-items: center; gap: var(--gap-in); margin-left: auto;
}
.config-actions .err { margin: 0; min-height: 0; }
.config-grid {
  flex: 1; min-height: 0; display: grid; align-content: start;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--gap-block);
  max-width: none; width: 100%;
}
.config-nav {
  display: flex; align-items: center; gap: 2px; flex: 0 0 auto;
  border-bottom: 1px solid var(--hairline); margin-bottom: calc(var(--gap-block) - 1px);
  padding-bottom: 0;
}
.config-nav-btn {
  appearance: none; border: none; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; margin-bottom: -1px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--ink-secondary);
  border-bottom: 2px solid transparent;
}
.config-nav-btn:hover { color: var(--ink); }
.config-nav-btn[aria-current="true"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.config-nav-btn .tag { padding: 1px 8px; font-size: 11px; }
/* 工作台 tab 行 + 内容工具行：tab 左、导出右；搜索/筛选独立成行且只作用于会话/记忆两 tab
   （负责人反馈 msg 7512442887365662000 重组：原同行混排工具组退役） */
.work-nav { display: flex; justify-content: flex-start; flex-wrap: wrap; align-items: center; gap: var(--gap-in) var(--gap-block); }
.work-nav-tabs { display: flex; gap: 2px; }
.work-nav-tabs button {
  all: unset; cursor: pointer; padding: 7px 12px; border-radius: var(--radius-xs);
  color: var(--ink-secondary); font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.work-nav-tabs button:hover { color: var(--ink); background: var(--canvas-soft); }
.work-nav-tabs button[aria-current="true"] {
  color: var(--ink); background: var(--panel); font-weight: 600; box-shadow: var(--shadow-soft);
}
.work-toolbar { display: flex; align-items: center; gap: var(--gap-in); flex-wrap: wrap; }
.work-nav .index-actions { margin-left: auto; flex: 0 0 auto; }
.work-nav .index-actions .btn { height: 32px; }
.work-filter-select {
  height: 32px; border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  background: var(--panel); padding: 0 8px; font-size: 12px; color: var(--ink);
  max-width: 180px; flex: 0 0 auto; align-self: center;
}
/* 搜索框组件（console-ui-kit · 单形态；容器宽度由语境薄覆盖决定） */
.search-box { position: relative; display: flex; align-items: center; }
.work-toolbar .search-box { width: 220px; flex: 0 0 auto; }
.search-box .search-icon {
  position: absolute; left: 10px; color: var(--ink-muted); pointer-events: none;
}
.search-box input {
  width: 100%; height: 32px;
  border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  background: var(--panel); color: var(--ink);
  padding: 0 28px 0 30px; font-size: 13px;
}
.search-box input::placeholder { color: var(--ink-muted); }
.search-box input:focus {
  outline: none; border-color: var(--ink-muted);
  box-shadow: 0 0 0 3px var(--primary-muted);
}
.search-clear {
  all: unset; cursor: pointer; position: absolute; right: 6px;
  width: 18px; height: 18px; line-height: 16px; text-align: center;
  color: var(--ink-secondary); font-size: 14px; border-radius: 50%;
}
.search-clear:hover { color: var(--ink); background: var(--canvas-soft); }
.work-card-count { font-size: 12px; color: var(--ink-secondary); flex: 0 0 auto; }
.config-nav-hint {
  font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); padding: 1px 6px;
  border: 1px solid var(--hairline); border-radius: 999px;
}
/* 特异性须压过 .config-card 的 display:flex（同为 0-1-0 时后写者胜） */
.config-card.config-tab { display: none; }
.config-card.config-tab-open { display: flex; }
.config-card {
  display: flex; flex-direction: column; min-width: 0; flex: 0 0 auto;
  padding: 0; background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.config-card-h {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--gap-in); padding: 10px 16px; flex: 0 0 auto;
  border-bottom: 1px solid var(--hairline); background: var(--canvas);
}
.config-card-t h2 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.config-card-t p { margin: 4px 0 0; font-size: 12px; color: var(--ink-secondary); }
.config-card-h .btn-ghost { flex: 0 0 auto; height: 28px; padding: 0 10px; font-size: 12px; }
.config-rows {
  padding: 12px; display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; min-height: 320px; max-height: 100%;
}
.config-add {
  align-self: stretch; justify-content: center;
  flex: 0 0 auto; height: 34px; font-size: 13px;
  border: 1px dashed var(--hairline); border-radius: var(--radius-xs);
}
.config-empty-center {
  margin: 0; flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted); font-size: 13px;
}
.config-x {
  flex: 0 0 auto; width: 28px; height: 28px; display: inline-flex;
  align-items: center; justify-content: center;
  border: none; border-radius: var(--radius-xs); background: transparent;
  color: var(--ink-muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.config-x:hover { background: var(--canvas-soft); color: var(--destructive); }
.config-empty {
  margin: 0; padding: 22px 12px; font-size: 12px; color: var(--ink-muted);
  text-align: center; border: 1px dashed var(--hairline); border-radius: var(--radius-xs);
}
.config-about { gap: 0; }
.config-about p { margin: 0; padding: 8px 10px; font-size: 13px; color: var(--ink-secondary); line-height: 1.6; }
.audit-block { margin-top: 8px; }
label { font-size: 12px; color: var(--ink-secondary); font-weight: 600; }
input, textarea {
  border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  padding: 8px 10px; width: 100%; background: var(--panel);
}
textarea { min-height: 120px; font-family: var(--mono); font-size: 12px; }
.diff {
  font-family: var(--mono); font-size: 12px; background: var(--canvas);
  border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  padding: 12px; white-space: pre-wrap;
}
.add { color: var(--success); }
.del { color: var(--destructive); }
.keep { color: var(--ink-secondary); }
.callout {
  padding: 10px 12px; background: var(--primary-muted);
  border: 1px solid var(--hairline); border-radius: var(--radius-xs); font-size: 13px;
}

.gate {
  width: 100%; max-width: 440px; padding: 32px;
  border: 1px solid var(--hairline); border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
}
.gate-frame {
  min-height: 100%; min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start; overflow: auto;
  padding: 24px 16px;
  background: var(--canvas);
}
.gate-brand {
  margin-top: auto; margin-bottom: 20px; font-size: 18px; font-family: var(--font);
  letter-spacing: -0.03em; color: var(--ink); font-weight: 600; text-decoration: none;
}
.gate h1 {
  margin: 0; font-family: var(--font); font-size: 18px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--ink);
}
.gate > p { margin: 8px 0 0; color: var(--ink-secondary); font-size: 13px; }
.gate-seg { margin: 20px 0 16px; width: 100%; }
.gate-seg button { flex: 1; text-align: center; }
.gate-panel { display: flex; flex-direction: column; gap: 12px; }
.gate-home {
  margin: 24px 0 auto; text-align: center; font-size: 13px;
  color: var(--ink-muted); text-decoration: none;
}
.gate-home:hover { color: var(--ink); }
.gate-panel label { display: block; }
.gate .btn-primary { height: 40px; }
.err { color: var(--destructive); font-size: 12px; min-height: 22px; }
.row { display: flex; gap: 8px; align-items: center; }

.index-field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; font-size: 12px; color: var(--ink-secondary); }
.index-field.grow { flex: 1; min-width: 180px; }
.index-field input, .index-field select {
  border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  padding: 8px 10px; background: var(--panel); height: 36px; color: var(--ink);
}
.index-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.index-actions .hint { margin: 0; font-size: 12px; color: var(--ink-secondary); }
/* console-ui-kit：index-table-wrap 降为纯定位容器——表格规格 = .data-table 组件（表头声音 v4 已升格并入） */
/* 路径整列直出：mono 全路径，超长省略 + title 悬浮（v4 原型定稿） */
.index-table-wrap td.index-path {
  font-size: 12px; color: var(--ink-secondary);
  max-width: 460px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 空态：独立空态块（v4 原型定稿），不再用表内 320px 行 */
.work-empty {
  flex: 1 1 auto; min-height: 320px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 48px 24px; text-align: center;
}
.work-empty-title { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.work-empty-sub { font-size: 13px; color: var(--ink-secondary); margin: 0; }
/* 空态：整行高块、提示双向居中（置于通用 td 规则之后以覆盖 padding/border） */
.empty-row td {
  height: 320px; vertical-align: middle; text-align: center;
  color: var(--ink-secondary); font-size: 13px;
  border-bottom: 0; cursor: default;
}
/* 空态主 CTA（runtime 详情 0 实例「去接入」）：居中竖排，按钮为主路径动作 */
.empty-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-cta-title { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.empty-cta .btn { margin-top: 6px; height: 36px; padding: 0 16px; }

.nodes-shell {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  grid-template-rows: 1fr;
  gap: var(--gap-block); padding: var(--page-pad);
  background: var(--canvas); overflow: auto;
}
.nodes-card, .nodes-insp {
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; min-height: 0;
}
.nodes-head { padding: 16px 20px 0; }
.nodes-head h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.nodes-head p { margin: 6px 0 0; font-size: 13px; color: var(--ink-secondary); }
.nodes-insp { border-left: 0; background: var(--panel); overflow: auto; }
.nodes-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--gap-in) 20px; padding: 16px 20px; border-bottom: 1px solid var(--hairline);
}
.nodes-toolbar-left { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--gap-in) var(--gap-block); }
.plan-label { margin: 4px 0 0; font-size: 12px; color: var(--ink-secondary); line-height: 1.5; }
.plan-label strong { color: var(--ink); font-weight: 700; }
.node-meter { min-width: 140px; max-width: 200px; }
.node-meter-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px;
}
.node-meter-top .label { font-size: 12px; color: var(--ink-secondary); }
.node-meter-top .count {
  font-family: var(--mono); font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums;
}
.node-track {
  height: 4px; border-radius: 999px; background: var(--canvas-soft);
  border: 1px solid var(--hairline); overflow: hidden;
}
.node-fill { height: 100%; border-radius: 999px; background: var(--primary); width: 0%; }
.node-fill.is-full { background: var(--warning); }
.align-hint { margin: 0; font-size: 12px; line-height: 1.5; color: var(--ink-secondary); }
.align-hint .mono {
  font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink);
}
.align-hint.is-full { color: var(--warning); }
.align-hint.is-full .mono { color: var(--warning); }
.banner {
  margin: 12px 20px 0; padding: 10px 12px;
  background: var(--canvas); border: 1px solid var(--hairline);
  border-radius: var(--radius-xs); font-size: 13px; line-height: 1.5; color: var(--ink-secondary);
}
.banner.warn strong { color: var(--warning); font-weight: 700; }
.banner.hidden { display: none; }
.target-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 4px 10px; border: 1px solid var(--hairline);
  border-radius: var(--radius-xs); background: var(--canvas); color: var(--ink-secondary);
}
.target-chip strong { color: var(--ink); font-weight: 700; }
.link-btn {
  all: unset; cursor: pointer; font-size: 13px; color: var(--accent); white-space: nowrap; font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }
/* 最近活动：绝对时刻，tabular 对齐 */
#indexSessionTable td.index-when {
  white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-secondary);
}
/* 节点列略加宽，少折行 */
#indexSessionTable td.index-node {
  min-width: 168px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Agent 名禁止 nowrap 溢出盖住相邻「操作」列（否则点「交接」会误触 Agent 链） */
#indexSessionTable td:nth-child(5) {
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#indexSessionTable td:nth-child(6) { white-space: nowrap; width: 1%; }
/* Agent = 墨色链；操作「交接」保留 .link-btn 琥珀，两列不撞色 */
#indexSessionTable .index-agent-link {
  font-size: 13px; color: var(--ink); font-weight: 500; cursor: pointer; background: none; border: 0; padding: 0;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom;
}
#indexSessionTable .index-agent-link:hover { text-decoration: underline; color: var(--ink); }
/* 接入节点弹窗：两复制按钮一行（原节点页右上双复制 link-btn 收敛，msg 7512442887365662000） */
.join-acts { display: flex; align-items: center; gap: var(--gap-in); flex-wrap: wrap; }
/* AI 接入提示：与手动命令区分的第二路径 */
.join-ai {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.join-ai .hint { margin: 0; }
/* ===== 节点卡片行(.card-row 分离式卡片 · DESIGN.md 组件规范节;与 mcp-item 同族) ===== */
.node-list {
  flex: 1; overflow: auto; padding: var(--gap-block) 20px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.card-row.node-item { cursor: pointer; }
.node-item[aria-selected="true"] {
  background: var(--panel); border-color: var(--ink-muted);
  box-shadow: inset 2px 0 0 var(--accent);
}
.ni-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ni-name { font-weight: 600; font-size: 13px; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-id { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-status { flex: 0 0 auto; font-size: 12px; color: var(--ink-secondary); }
.ni-foot { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ni-host { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-agents { font-size: 12px; color: var(--ink-secondary); flex: 0 0 auto; }
.ni-hb { font-family: var(--mono); font-size: 11px; color: var(--ink-secondary); font-variant-numeric: tabular-nums; margin-left: auto; flex: 0 0 auto; }
.ni-cursor { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.ni-cursor::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.9; }
.ckb-ok { color: var(--success); border-color: var(--success); }
.ckb-wait { color: #b26a00; border-color: #e0a64a; }
.ckb-bad { color: var(--destructive); border-color: var(--destructive); }
.ckb-mute { color: var(--ink-secondary); }
#nodeCursor.ckb-ok { color: var(--success); }
#nodeCursor.ckb-wait { color: #b26a00; }
#nodeCursor.ckb-bad { color: var(--destructive); }
.ni-tag { flex: 0 0 auto; }
.node-empty {
  flex: 1 1 auto; min-height: 320px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 48px 24px; text-align: center;
}
.node-empty-title { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.node-empty-sub { margin: 0; font-size: 13px; color: var(--ink-secondary); }
.node-empty .btn-primary { margin-top: 10px; height: 36px; padding: 0 16px; }
.tag-target {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-muted); font-weight: 600;
}
.tag-revoked { color: var(--ink-secondary); }
.nodes-insp .insp-h { padding: 20px 20px 16px; border-bottom: 1px solid var(--hairline); }
.nodes-insp .insp-h h1 { font-size: 16px; }
.nodes-insp .insp-b { padding: 20px; gap: var(--gap-block); }
.kv { display: grid; grid-template-columns: 72px 1fr; gap: 12px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--ink-secondary); font-size: 12px; }
.kv dd { margin: 0; word-break: break-all; }
.hint { margin: 0; font-size: 12px; color: var(--ink-secondary); line-height: 1.5; }
.node-actions { display: flex; flex-direction: column; gap: 8px; }
.node-actions .btn { width: 100%; height: 36px; }
.node-insp-empty {
  margin: 0; padding: 24px 8px; text-align: center;
  font-size: 13px; color: var(--ink-secondary); line-height: 1.6;
}
.row-danger {
  all: unset; cursor: pointer; font-size: 13px; color: var(--destructive);
}
.row-danger:hover { text-decoration: underline; }
.team-top { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: var(--gap-block); align-items: start; }
/* ===== 团队页（DESIGN.md「Team · 成员卡片行」/ prototype/v1 映射） ===== */
.team-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--gap-in) 20px; flex-wrap: wrap; margin-bottom: 0;
}
.team-head-right { display: flex; align-items: flex-end; gap: var(--gap-block); }
.readonly-chip {
  display: inline-flex; align-items: center; font-size: 11px; letter-spacing: 0.04em;
  padding: 3px 8px; border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  color: var(--ink-secondary); white-space: nowrap;
}
/* 分区卡:容器退役 → .card-row(薄覆盖=panel 底+大圆角+软影+分区级内距;静态分区 hover 失效;DESIGN.md 登记) */
.card-row.team-card {
  background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
  padding: 16px 20px 20px; gap: var(--gap-in);
}
.card-row.team-card:hover { border-color: var(--hairline); }
.invite-row { margin: 0; }
.invite-row input { flex: 1; min-width: 0; height: 36px; font-family: var(--mono); font-size: 12px; }
#inviteCopy { flex: 0 0 auto; }
.team-card .invite-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--ink-secondary); }
.team-card .err { margin: 0; min-height: 0; }
.member-list { display: flex; flex-direction: column; gap: 10px; }
/* 死类删除:成员卡片行 = .card-row.member-card(member-avatar/member-mail 子部件仍为其消费) */
.member-avatar {
  width: 32px; height: 32px; border-radius: 999px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--canvas-soft); border: 1px solid var(--hairline);
  font-size: 13px; font-weight: 600; color: var(--ink-secondary);
  text-transform: uppercase;
}
.member-mail {
  font-size: 13px; font-weight: 500; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto;
}
.tag-owner { border-color: var(--accent); color: var(--accent); background: var(--accent-muted); font-weight: 600; }
/* 移出：行内危险动作降权（hover 才升红；一次点击 → 行内确认态，AC-3） */
.remove-member {
  all: unset; cursor: pointer; font-size: 12px; color: var(--ink-muted);
  flex: 0 0 auto; white-space: nowrap;
}
.remove-member:hover { color: var(--destructive); }
.remove-member.is-arming { color: var(--destructive); font-weight: 600; }
.member-empty {
  min-height: 200px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; padding: 40px 24px; text-align: center;
}
.member-empty-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.member-empty-sub { margin: 0; font-size: 13px; color: var(--ink-secondary); }
.member-empty .btn-primary { margin-top: 10px; height: 36px; padding: 0 16px; }
/* ── 团队工作台（team-collab 切片 4 · prototype v1 134-151 同构映射）：
   成员卡片 grid（角色 tag + 近期动态计数）+「@我 · 指派给我」汇总区 ── */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--gap-in); }
.card-row.member-card { background: var(--panel); padding: 14px; }
.card-row.member-card:hover { border-color: var(--hairline); }
.member-top { display: flex; align-items: center; gap: 10px; }
.member-top .member-avatar { width: 36px; height: 36px; }
.member-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.member-idwrap { min-width: 0; }
.member-card .member-mail { flex: 0 1 auto; font-size: 11px; font-weight: 400; color: var(--ink-muted); }
.role-tag { display: inline-flex; align-items: center; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--ink-secondary); white-space: nowrap; }
.member-top .role-tag { margin-left: auto; }
.role-tag.is-owner { border-color: var(--accent); color: var(--accent); background: var(--accent-muted); }
.member-stats { display: flex; gap: 14px; font-size: 12px; color: var(--ink-secondary); }
.member-stats .mono { font-size: 12px; }
.member-card .remove-member { align-self: flex-end; }
/* 审计时间线行（Vercel ex-data-table-cell 既译：主体 + mono 动作 + mono 右贴时间） */
.audit-list { display: flex; flex-direction: column; }
.list-row.audit-item { align-items: baseline; }
.audit-actor { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.audit-action {
  font-family: var(--mono); font-size: 11px; color: var(--ink-secondary);
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.audit-when {
  font-family: var(--mono); font-size: 11px; color: var(--ink-muted);
  font-variant-numeric: tabular-nums; flex: 0 0 auto;
}
.audit-empty { margin: 0; padding: 16px 0 8px; text-align: center; font-size: 13px; color: var(--ink-secondary); }
.team-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--gap-in) 20px;
}
.seat-meter { min-width: 160px; max-width: 220px; }
.seat-meter-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px;
}
.seat-meter-top .label { font-size: 12px; color: var(--ink-secondary); }
.seat-meter-top .count {
  font-family: var(--mono); font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums;
}
/* 运营汇总条（ops-usage-view）：数字格横排，复用 seat-meter 字号阶梯 */
.ops-meters {
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  margin: 0 0 var(--gap-block);
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--panel);
}
.ops-meter { display: flex; flex-direction: column; gap: 4px; min-width: 88px; }
.ops-meter .label { font-size: 12px; color: var(--ink-secondary); }
.ops-meter .count {
  font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
#mode-ops .ink-muted { color: var(--ink-muted); font-size: 11px; }
.seat-track {
  height: 4px; border-radius: 999px; background: var(--canvas-soft);
  border: 1px solid var(--hairline); overflow: hidden;
}
.seat-fill { height: 100%; border-radius: 999px; background: var(--primary); width: 0%; }
.seat-fill.is-full { background: var(--warning); }
.seat-hint { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-secondary); }
.invite-block { margin: 0; }
.invite-block .row { max-width: 640px; }
.invite-block label {
  display: block; font-size: 12px; color: var(--ink-secondary); margin-bottom: 6px;
}
.invite-note { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-secondary); }
/* ===== 节点详情分区（DESIGN.md「Nodes · 节点卡片行」/ 危险区规范） ===== */
/* 分区标签：11px uppercase（Vercel 表头 / 区段标签模式；字重表内 600） */
.zone-label {
  margin: 0 0 8px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-secondary);
}
.node-actions-main { display: flex; flex-direction: column; }
/* 危险区：border-top 分隔 + 弱化描边按钮（Linear/Raycast 降权模式——默认 hairline 灰描边，
   hover 才升 destructive 红描边，不可逆操作离高频操作一步） */
.node-actions-danger {
  margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--hairline);
  display: flex; flex-direction: column;
}
.node-actions-danger .btn { width: 100%; height: 36px; }
.danger-hint {
  margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-secondary);
}
.btn-danger { border-color: var(--hairline); color: var(--destructive); background: var(--panel); }
.btn-danger:not(:disabled):hover { border-color: var(--destructive); }
.btn-danger:disabled { opacity: 0.55; }
/* 凭证区：与危险区同语法（border-top 分隔），标签下移 12px */
.cred-block { padding-top: 16px; border-top: 1px solid var(--hairline); display: flex; flex-direction: column; }
.nodes-root-label { margin-top: 12px; font-size: 12px; color: var(--ink-secondary); }
.row input { flex: 1; }

/* ===== MCP 结构化输入（mcp-config-input，原型 v1 定稿）===== */
/* 工具行：+ 添加 + 市场入口（MCP 无全局应用/预设；Skill 保留应用 + 提升下拉） */
.mcp-toolbar {
  display: flex; align-items: center; gap: var(--gap-in); flex-wrap: wrap;
  flex: 0 0 auto;
}
.mcp-toolbar .config-add { align-self: auto; width: auto; padding: 0 14px; }
/* 预设/提升下拉：原生 select（Skill「从本机提升」；MCP 工具行预设已退役） */
.mcp-preset-wrap { position: relative; display: inline-flex; margin-left: auto; }
.mcp-preset {
  appearance: none; height: 34px; padding: 0 30px 0 12px; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  background: var(--panel); color: var(--ink); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-soft);
}
.mcp-preset:hover { border-color: var(--ink-muted); }
.mcp-preset:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-muted); }
.mcp-preset-wrap::after {
  content: "▾"; position: absolute; right: 10px; top: 0; bottom: 0;
  display: flex; align-items: center; pointer-events: none;
  color: var(--ink-muted); font-size: 11px;
}
/* 单条 MCP / Skill / 规则：容器规格并入 .card-row；MCP 另有单行变体 */
.mcp-item:focus-within { border-color: var(--ink-muted); }
.mcp-item-top { display: flex; align-items: center; gap: 10px; }
.mcp-item-kind-label { font-size: 11px; color: var(--ink-muted); font-weight: 500; flex: 0 0 auto; }
.mcp-item-top .mcp-item-apply { margin-left: auto; height: 28px; padding: 0 10px; font-size: 12px; }
/* Skill/规则仍用字段网格；MCP 单行变体见下 */
.mcp-fields { display: grid; grid-template-columns: 200px 1fr; gap: 8px; }
.mcp-field input {
  border: none; border-radius: var(--radius-xs);
  padding: 8px 10px; background: var(--panel); height: 34px; font-size: 12px;
  box-shadow: inset 0 0 0 1px var(--hairline); width: 100%;
  font-family: var(--mono);
  text-overflow: ellipsis;
}
.mcp-field input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent); }
.mcp-field input::placeholder { color: var(--ink-muted); }
.mcp-field .err { margin: 0; }
.mcp-item-foot { display: flex; align-items: center; gap: 8px; }
.hint.mcp-hint { color: var(--ink-muted); flex: 1 1 auto; }
.mcp-hint code {
  font-family: var(--mono); font-size: 11px; color: var(--ink-secondary);
  background: var(--canvas-soft); border-radius: var(--radius-xs); padding: 1px 5px;
}
.mcp-item-top .config-x { margin-left: auto; }
.mcp-item-top .mcp-item-apply + .config-x { margin-left: 0; }
#skillRows .mcp-fields { grid-template-columns: 1fr; }

/* MCP 单行清单：列头一次 + 每条一行（类型 | 名称 | 命令/地址 | 操作） */
.mcp-colhead,
#mcpRows .mcp-item-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 160px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.mcp-colhead {
  padding: 0 14px 2px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--ink-muted); text-transform: uppercase;
}
.mcp-colhead span:last-child { text-align: right; }
#mcpRows .mcp-item-row {
  padding: 8px 14px;
  gap: 10px;
}
#mcpRows .mcp-field-inline {
  display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0;
}
#mcpRows .mcp-field-inline input { min-width: 0; }
#mcpRows .mcp-field-inline .err {
  position: absolute; left: 0; top: 100%; margin: 2px 0 0; font-size: 11px; white-space: nowrap;
}
#mcpRows .mcp-field-inline { position: relative; }
#mcpRows .mcp-val-slot { min-width: 0; }
#mcpRows .mcp-val-slot .mcp-field-inline { width: 100%; }
#mcpRows .mcp-inline-tag { flex: 0 0 auto; font-size: 11px; padding: 1px 6px; }
#mcpRows .mcp-item-actions {
  display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end;
}
#mcpRows .mcp-item-apply {
  margin-left: 0; height: 28px; padding: 0 10px; font-size: 12px;
}
#mcpRows .mcp-item-row .config-x { margin-left: 0; }

/* Skill 单行清单：列头 + 名称 | 操作（手填/提升入口已退役，主路径 SkillHub） */
.skill-colhead,
#skillRows .skill-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.skill-colhead {
  padding: 0 14px 2px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--ink-muted); text-transform: uppercase;
}
.skill-colhead span:last-child { text-align: right; }
#skillRows .skill-item-row { padding: 8px 14px; }
#skillRows .mcp-field-inline {
  display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; position: relative;
}
#skillRows .mcp-field-inline input { min-width: 0; }
#skillRows .mcp-field-inline .err {
  position: absolute; left: 0; top: 100%; margin: 2px 0 0; font-size: 11px; white-space: nowrap;
}
#skillRows .mcp-item-actions {
  display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end;
}
#skillRows .mcp-item-apply { height: 28px; padding: 0 10px; font-size: 12px; }
#skillRows .skill-item-row .config-x { margin-left: 0; }
/* ===== 规则 tab（rules-desired-config：期望态编辑卡片行复用 .mcp-item/.mcp-fields 结构，无专用样式） ===== */
/* 校验错误态：输入框/正文域 inset 描边换破坏色（单层错误，不加背景 tint） */
.mcp-field input.is-error,
.mcp-field textarea.is-error,
.mcp-field input.is-error:focus,
.mcp-field textarea.is-error:focus { box-shadow: inset 0 0 0 1px var(--destructive); }
/* ===== 模态浮层（DESIGN.md「表面层级」modal 规范；结构性黑遮罩） ===== */
.modal-scrim {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal {
  width: 680px; max-width: 100%; max-height: 90vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column;
}
.modal.modal-wide { width: 920px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 16px 16px 12px;
}
.modal-title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.modal-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-actions { display: flex; align-items: center; gap: var(--gap-in); justify-content: flex-end; }
/* 对齐对比：左本机 / 右期望 / 动作 */
.align-compare {
  border: 1px solid var(--hairline); border-radius: var(--radius-md);
  overflow: hidden; background: var(--panel);
}
.align-compare-h,
.align-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px;
  gap: 0;
}
.align-compare-h {
  background: var(--canvas-soft);
  border-bottom: 1px solid var(--hairline);
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-secondary);
}
.align-compare-h > span,
.align-cell,
.align-action {
  padding: 10px 12px;
  border-right: 1px solid var(--hairline);
  min-width: 0;
}
.align-compare-h > span:last-child,
.align-action { border-right: 0; }
.align-compare-body { max-height: min(52vh, 420px); overflow: auto; }
.align-row { border-bottom: 1px solid var(--hairline); align-items: stretch; }
.align-row:last-child { border-bottom: 0; }
.align-cell {
  font-size: 13px; color: var(--ink);
  display: flex; flex-direction: column; gap: 4px; justify-content: center;
}
.align-cell .k {
  font-family: var(--mono); font-size: 11px; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.align-cell .v { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.align-cell.is-empty { color: var(--ink-muted); font-size: 12px; }
.align-action {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; text-align: center;
}
.align-row.is-add .align-action { color: var(--success); }
.align-row.is-update .align-action { color: var(--warning); }
.align-row.is-keep .align-action { color: var(--ink-secondary); }
.align-row.is-keep_live .align-action { color: var(--ink-secondary); }
.align-row.is-add .align-cell.desired { background: color-mix(in srgb, var(--success) 8%, transparent); }
.align-row.is-update .align-cell.desired { background: color-mix(in srgb, var(--warning) 10%, transparent); }
.align-empty {
  padding: 28px 16px; text-align: center; color: var(--ink-secondary); font-size: 13px;
}
@media (max-width: 800px) {
  .align-compare-h,
  .align-row { grid-template-columns: 1fr; }
  .align-compare-h > span:nth-child(2),
  .align-compare-h > span:nth-child(3) { display: none; }
  .align-cell,
  .align-action { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .align-action { justify-content: flex-start; }
}
/* 弹窗内范围选择：维度 label + seg（全部/选择）+ chip 清单 */
.apply-scope { display: flex; flex-direction: column; gap: 10px; }
.apply-scope-row { display: flex; align-items: center; gap: var(--gap-in); flex-wrap: wrap; }
.scope-label { flex: 0 0 auto; width: 44px; font-size: 12px; font-weight: 600; color: var(--ink-secondary); }
.pick-list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pick {
  all: unset; cursor: pointer; flex: 0 0 auto;
  font-size: 12px; padding: 4px 10px; border-radius: var(--radius-xs);
  border: 1px solid var(--hairline); background: var(--panel); color: var(--ink-secondary);
}
.pick:hover { color: var(--ink); border-color: var(--ink-muted); }
.pick[aria-pressed="true"] {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-muted); font-weight: 600;
}
/* ===== 复选框（DESIGN.md「表面层级」checkbox 规范；行内勾选参与应用） ===== */
.mcp-check {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  min-height: 28px; padding: 0 2px; margin: 0;
  font-size: 13px; color: var(--ink-secondary); font-weight: 500;
  flex: 0 0 auto; user-select: none;
}
.mcp-check:hover { color: var(--ink); }
.mcp-check input {
  appearance: none; margin: 0; cursor: pointer;
  width: 16px; height: 16px; border-radius: 6px;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--hairline);
  display: inline-flex; align-items: center; justify-content: center;
  color: #ffffff;
}
.mcp-check input:checked { background: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mcp-check input:checked::after { content: "✓"; font-size: 11px; line-height: 1; }
@media (max-width: 800px) {
  .mcp-fields { grid-template-columns: 1fr; }
  .mcp-preset-wrap { margin-left: 0; }
  .scope-label { width: auto; }
}

@media (max-width: 1100px) {
  .detail-cols { grid-template-columns: 1fr; }
  .nodes-shell { grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); }
}

@media (max-width: 800px) {
  .work-nav { flex-wrap: wrap; }
  .work-toolbar { width: 100%; }
  .work-toolbar .search-box { width: 100%; }
  .work-filter-select { max-width: 45%; }
  .work-nav .index-actions { width: 100%; justify-content: flex-end; }
  .shell { flex-direction: column; }
  .rail {
    width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: 12px; gap: 12px;
  }
  .nav-prim { flex-direction: row; flex: 0; margin: 0; }
  .shell-bar { padding: 0 12px; }
  .mode-nav { flex-direction: row; overflow-x: auto; }
  .mode-nav button { white-space: nowrap; }
  .nav-prim button[aria-current="true"] { box-shadow: inset 0 -2px 0 var(--accent); }
  .rail-foot { flex-direction: row; align-items: center; width: 100%; margin-top: 0; }
  .user-menu { bottom: calc(100% + 6px); left: auto; right: 0; }
  .detail-cols { grid-template-columns: 1fr; }
  .team-top { grid-template-columns: 1fr; }
  .team-head {
    flex-direction: column; align-items: flex-start;
  }
  .team-head-right { width: 100%; flex-wrap: wrap; gap: var(--gap-in); }
  .invite-row { flex-wrap: wrap; }
  .invite-row input { flex: 1 1 100%; }
  #inviteCopy, #createInvite { width: 100%; }
  /* 窄幅：email 换行整词展示（覆盖桌面态 nowrap + ellipsis），不截断不溢出 */
  .member-mail { flex-basis: 100%; order: 1; white-space: normal; text-overflow: clip; overflow-wrap: anywhere; }
  .remove-member { margin-left: auto; }
  .audit-item { flex-wrap: wrap; row-gap: 2px; }
  .audit-when { margin-left: auto; }
  /* 窄幅：交接行内元素纵排，路径整词换行不截断（同 .member-mail 模式） */
  .handoff-row { flex-wrap: wrap; }
  .handoff-row .field { flex: 1 1 100%; }
  .handoff-row input, .handoff-row select { height: 36px; }
  .handoff-in-head { flex-wrap: wrap; row-gap: 2px; }
  .handoff-in-when { margin-left: 0; }
  .handoff-ctx-row { flex-wrap: wrap; row-gap: 2px; }
  .handoff-ctx-path { flex-basis: 100%; white-space: normal; text-overflow: clip; overflow-wrap: anywhere; }
  .handoff-in-actions .hint { margin-left: 0; flex-basis: 100%; }
  .catalog-shell, .detail-shell { padding: 16px; }
  .agent-grid { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: 1fr; }
  .full { padding: 16px; }
  .body { grid-template-columns: 1fr; }
  .list { max-height: 200px; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .index-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  .nodes-shell { grid-template-columns: 1fr; grid-template-rows: none; padding: 16px; gap: var(--gap-block); overflow: auto; }
  .nodes-card { border-right: 0; }
  .node-list { padding: 12px; }
  .ni-top { flex-wrap: wrap; gap: 8px; }
  .ni-name { flex: 0 1 auto; max-width: 100%; }
  .ni-foot { flex-wrap: wrap; gap: 8px; }
  .ni-host { flex: 1 1 auto; }
  .nodes-toolbar { padding: 12px; }
}

/* ===== Billing · 套餐卡 / 收银区 / 订单行（DESIGN.md Billing 规范 · billing-checkout） ===== */
.billing-head-right { display: flex; align-items: center; gap: var(--gap-in); flex-wrap: wrap; }
.billing-days { font-family: var(--mono); font-size: 12px; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.billing-days.is-warn { color: var(--warning); font-weight: 600; }

/* 套餐对照两卡：浮卡语法，两卡同构并排（≤800px 纵排单列） */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-block); }
.plan-card {
  background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); padding: 20px; display: flex; flex-direction: column; gap: var(--gap-in);
}
.plan-name { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.plan-price { display: flex; align-items: baseline; gap: 4px; }
.plan-price .amount {
  font-family: var(--mono); font-size: 28px; font-weight: 500;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.plan-price .unit { font-size: 12px; color: var(--ink-secondary); }
/* 权益行组 = .audit-item 紧凑数据行语法 */
.perk-list { display: flex; flex-direction: column; }
.perk-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 8px 2px; border-bottom: 1px solid var(--hairline); font-size: 12px;
}
.perk-row:last-child { border-bottom: 0; }
.perk-row .k { color: var(--ink-secondary); }
.perk-row .v { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.plan-note { margin: 0; font-size: 11px; color: var(--ink-muted); line-height: 1.6; }
.plan-cta { margin-top: auto; }
.plan-cta .btn-primary { width: 100%; height: 36px; }
/* 当前档 = 禁用态次按钮（白底 + hairline + ink-muted 字） */
.btn-disabled {
  all: unset; display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: var(--radius-xs);
  border: 1px solid var(--hairline); background: var(--panel); color: var(--ink-muted);
  font-size: 13px; font-weight: 500; width: 100%; cursor: not-allowed;
}
/* 推荐档极性反转：ink 底 + ink-on-dark，结构与 .plan-card 完全同构，一页至多 1 张 */
.plan-card-featured { background: var(--ink); border-color: var(--ink); color: var(--ink-on-dark); }
.plan-card-featured .plan-price .unit { color: rgba(255, 255, 255, 0.66); }
.plan-card-featured .perk-row { border-bottom-color: rgba(255, 255, 255, 0.12); }
.plan-card-featured .perk-row .k { color: rgba(255, 255, 255, 0.66); }
.plan-card-featured .perk-row .v { color: var(--ink-on-dark); }
.plan-card-featured .plan-note { color: rgba(255, 255, 255, 0.5); }
.plan-card-featured .btn-primary { background: var(--panel); color: var(--ink); border-color: var(--panel); }
.plan-card-featured .btn-primary:hover:not(:disabled) { background: var(--canvas-soft); border-color: var(--canvas-soft); }
.featured-flag { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

/* 收银区 .pay-box：浮卡内三段横排（≤800px 纵排） */
.pay-box { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.pay-channels { display: flex; flex-direction: column; gap: 10px; min-width: 160px; }
.pay-channel {
  all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: var(--panel); font-size: 13px; font-weight: 500; color: var(--ink-secondary);
}
.pay-channel:hover { border-color: var(--ink-muted); }
/* 选中 = accent 描边 + ink 字 600（描边表选择，不用填充底色——状态与选择不混淆） */
.pay-channel.is-selected { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.pay-channel .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--ink-muted); display: inline-block; }
.pay-channel.is-selected .dot { background: var(--accent); }
/* 未配置凭据渠道：照常可选可下单（负责人裁定「没有配置也可以操作 只是失败而已」），「未配置」小标诚实提示 */
.pay-channel .ch-note { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--ink-muted); }
/* 二维码框 180×180：canvas-soft 底 + hairline + rounded-md；内容为渠道回传码图 SVG */
.pay-qr {
  width: 180px; height: 180px; flex: 0 0 auto; background: var(--canvas-soft);
  border: 1px solid var(--hairline); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
}
.pay-qr span { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); line-height: 1.7; }
.pay-qr svg { display: block; width: 100%; height: auto; }
.pay-status { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pay-status .err { margin: 0; min-height: 0; }
.pay-amount { display: flex; align-items: baseline; gap: 6px; }
.pay-amount .v { font-family: var(--mono); font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pay-amount .k { font-size: 12px; color: var(--ink-secondary); }
/* 状态行 = callout 语法（.callout 基础样式在通用区） */
#mode-billing .callout { color: var(--ink-secondary); line-height: 1.6; }
#mode-billing .callout .dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; margin-right: 6px; background: var(--success); }
#mode-billing .callout.is-paid { color: var(--ink); }
.pay-ttl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12px; color: var(--ink-muted); }
.pay-ttl .mono { font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }

/* 订单记录行:紧凑数据行(.list-row 基线对齐薄覆盖)+ is-arming 行内退款 */
.order-list { display: flex; flex-direction: column; }
.list-row.order-item { align-items: baseline; }
.order-no {
  font-family: var(--mono); font-size: 11px; color: var(--ink-secondary); font-variant-numeric: tabular-nums;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto;
}
.order-channel { flex: 0 0 auto; color: var(--ink-secondary); }
.order-amount { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.order-state { flex: 0 0 auto; font-size: 12px; }
.order-state.is-paid { color: var(--success); }
.order-state.is-pending, .order-state.is-closed { color: var(--ink-muted); }
.order-state.is-refunded { color: var(--ink-secondary); }
.order-when {
  font-family: var(--mono); font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums;
  flex: 1 1 auto; text-align: right; white-space: nowrap;
}
/* 退款 = is-arming 行内降权语法:hover 升红,行内确认计时回退(成员移出同语法) */
.order-refund {
  all: unset; cursor: pointer; font-size: 12px; color: var(--ink-muted);
  flex: 0 0 auto; white-space: nowrap;
}
.order-refund:hover { color: var(--destructive); }
.order-refund.is-arming { color: var(--destructive); font-weight: 600; }
.order-empty { margin: 0; padding: 16px 0 8px; text-align: center; font-size: 13px; color: var(--ink-secondary); }
#mode-billing .team-card .err { margin: 0; min-height: 0; }

@media (max-width: 800px) {
  .plans { grid-template-columns: 1fr; }
  .pay-box { flex-direction: column; align-items: stretch; }
  .pay-channels { flex-direction: row; flex-wrap: wrap; }
  .pay-qr { align-self: center; }
  .order-item { flex-wrap: wrap; row-gap: 2px; }
  .order-when { flex-basis: 100%; text-align: left; }
  .billing-head { flex-direction: column; align-items: flex-start; }
}

/* 消息侧边栏入口 + 右侧抽屉 */
.msg-open-btn { gap: 7px; }
.msg-open-btn svg { flex: 0 0 auto; }
.msg-open-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.drawer-open { overflow: hidden; }
.drawer-scrim {
  position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: flex-end;
  background: rgba(0, 0, 0, 0.35); animation: drawer-fade-in 160ms ease-out;
}
.drawer-scrim.hidden { display: none; }
.msg-drawer {
  width: min(460px, calc(100vw - 28px)); height: 100%; min-height: 0;
  display: flex; flex-direction: column; background: var(--panel);
  border-left: 1px solid var(--hairline); box-shadow: var(--shadow-lift);
  animation: drawer-slide-in 180ms ease-out;
}
.drawer-head {
  flex: 0 0 auto; min-height: 58px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--hairline); background: var(--panel);
}
.msg-drawer-h-l, .msg-drawer-h-r { display: flex; align-items: center; gap: 10px; min-width: 0; }
.drawer-title { margin: 0; font-size: 16px; font-weight: 600; }
.msg-drawer .msg-node-state { white-space: nowrap; }
.msg-drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.msg-drawer-body .tr-empty { margin: 20px 16px; }
.msg-drawer .pager { flex: 0 0 auto; padding: 8px 14px; border-top: 1px solid var(--hairline); }
.msg-drawer-composer { flex: 0 0 auto; border-top: 1px solid var(--hairline); background: var(--panel); }
.msg-drawer-composer .msg-composer { padding: 12px 14px 14px; border-bottom: 0; }
.msg-drawer-composer .msg-composer textarea { min-height: 88px; max-height: 24vh; resize: vertical; }
.msg-drawer-composer .msg-composer-hint { display: none; }
.msg-drawer-composer .msg-composer-row { gap: 8px; }
.msg-drawer-composer .tpl-chip-slot { min-width: 0; }
@keyframes drawer-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-slide-in { from { transform: translateX(24px); opacity: .8; } to { transform: translateX(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .drawer-scrim, .msg-drawer { animation-duration: 1ms; }
}

/* ─── Messaging · 消息列表（agent-messaging · .tr-msg 同构归档行）─── */
.msg-node-state {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--ink-secondary);
}
.dot-accent { background: var(--accent); }
.pill.is-running { color: var(--ink); }

.msg-composer { padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
.msg-composer textarea {
  box-sizing: border-box; width: 100%; min-height: 72px; resize: vertical;
  font-family: var(--font); font-size: 13px; line-height: 1.6; color: var(--ink);
  background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  padding: 8px 10px;
}
.msg-composer textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.msg-composer .callout { margin: 0; }
.msg-composer .err { margin-top: 6px; }
.msg-composer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.msg-composer-hint { font-size: 12px; color: var(--ink-muted); }
.msg-resume-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 8px; padding: 8px 10px;
  background: var(--canvas-soft); border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  font-size: 12px; color: var(--ink-secondary);
}
.exec-resume-btn { margin-left: 8px; vertical-align: middle; }
.msg-send { height: 32px; padding: 0 16px; flex: 0 0 auto; }

/* 消息行:容器退役 → .list-row(薄覆盖与 transcript 行合并在消息行处登记) */
.msg-item .tr-who .name { color: var(--ink); }
.msg-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.msg-status-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-offline-hint { font-size: 12px; color: var(--ink-muted); }

.msg-result {
  background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--radius-xs);
  padding: 10px 12px;
}
.msg-result-text {
  margin: 0; font-size: 13px; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6;
}
.msg-result-err { font-size: 12px; color: var(--destructive); margin-bottom: 6px; overflow-wrap: anywhere; }
.msg-result-meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink-muted);
  font-variant-numeric: tabular-nums; margin-top: 6px;
}

.msg-cancel { all: unset; cursor: pointer; font-size: 12px; color: var(--ink-muted); flex: 0 0 auto; white-space: nowrap; }
.msg-cancel:hover { color: var(--destructive); }
.msg-cancel.is-arming { color: var(--destructive); font-weight: 600; }
.list-row.msg-item { cursor: pointer; }
.list-row.msg-item:hover { background: var(--canvas); }
.msg-item .msg-cancel { cursor: pointer; }

/* 消息执行记录详情弹窗（状态阶段条已退役——副标一行状态词足够） */
.msg-detail-block {
  border: 1px solid var(--hairline); border-radius: var(--radius-md);
  overflow: hidden; background: var(--panel);
}
.msg-detail-label {
  padding: 8px 12px; font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-secondary); background: var(--canvas-soft);
  border-bottom: 1px solid var(--hairline);
}
.msg-detail-pre {
  margin: 0; padding: 12px 14px; max-height: min(36vh, 320px); overflow: auto;
  font-family: var(--mono); font-size: 12px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink);
  background: var(--canvas);
}
.msg-detail-pre.is-empty { color: var(--ink-muted); }
.msg-detail-pre.is-err { color: var(--destructive); }

@media (max-width: 800px) {
  .msg-item { flex-wrap: wrap; row-gap: 4px; padding-left: 16px; padding-right: 16px; }
  .msg-item .tr-who { width: auto; flex-direction: row; align-items: baseline; gap: 8px; }
  .msg-item .tr-when { margin-left: auto; padding-top: 0; }
}

/* ─── IM Channels · IM 渠道页（im-bot-channels · DESIGN.md「IM Channels · IM 渠道页」规范 · prototype/v1 映射）─── */
.im-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--gap-in) 20px; flex-wrap: wrap;
}
.im-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 2px 8px; border-radius: var(--radius-xs); border: 1px solid var(--hairline); color: var(--ink-secondary); flex: 0 0 auto; white-space: nowrap; }
.im-tag .mono { font-size: 12px; color: var(--ink); }

/* 渠道状态四卡网格：浮卡语法（panel+hairline+radius-lg+shadow-soft），状态点非底色块（.node-state 同语法） */
.im-channels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap-block); }
.im-channel-card { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.im-channel-name { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.im-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-secondary); }
.im-state .dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; background: var(--ink-muted); }
.im-state.is-on .dot { background: var(--success); }
.im-state.is-off { color: var(--warning); }
.im-state.is-off .dot { background: var(--warning); }
.im-state.is-none { color: var(--ink-muted); }
.im-channel-note { margin: 0; font-size: 11px; color: var(--ink-muted); line-height: 1.6; }
.im-channel-card .callout { font-size: 12px; padding: 8px 10px; }

/* 绑定码卡：inviteCard 同构（.team-card 容器）+ TTL 右贴（.pay-ttl 平移） */
.im-bind-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.im-code { height: 32px; width: 200px; max-width: 100%; font-family: var(--mono); font-size: 14px; letter-spacing: 0.14em; color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-xs); padding: 0 12px; background: var(--panel); }
.im-code::placeholder { color: var(--ink-muted); letter-spacing: 0; font-family: var(--font); font-size: 12px; }
.im-bind-ttl { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.im-bind-note { margin: 0; font-size: 12px; color: var(--ink-secondary); line-height: 1.5; }

/* 紧凑数据行:.list-row 基线对齐薄覆盖(hairline 下分线/末行去线 = 组件默认) */
.im-row-list { display: flex; flex-direction: column; }
.list-row.im-binding-item { align-items: baseline; }
.im-b-channel { flex: 0 0 auto; color: var(--ink-secondary); }
.im-b-name { flex: 0 1 auto; font-weight: 500; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-b-member { flex: 0 1 auto; color: var(--ink-secondary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-b-unbind { all: unset; cursor: pointer; font-size: 12px; color: var(--ink-muted); flex: 0 0 auto; white-space: nowrap; }
.im-b-unbind:hover { color: var(--destructive); }
.im-b-unbind.is-arming { color: var(--destructive); font-weight: 600; }
.im-b-when { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; flex: 1 1 auto; text-align: right; white-space: nowrap; }

/* 会话定向行：select 32px + 未设默认 warning 提示 */
.im-convo-item { display: flex; align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--hairline); }
.im-row-list .im-convo-item:last-of-type { border-bottom: 0; }
.im-c-name { flex: 0 1 auto; font-size: 13px; font-weight: 500; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-c-type { flex: 0 0 auto; font-size: 12px; color: var(--ink-secondary); white-space: nowrap; }
.im-c-agent-f { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; }
.im-c-agent { flex: 1 1 auto; min-width: 0; height: 32px; border: 1px solid var(--hairline); border-radius: var(--radius-xs); background: var(--panel); padding: 0 12px; font-size: 13px; color: var(--ink); font-family: var(--font); }
.im-c-agent.is-unset { color: var(--ink-muted); }
.im-c-hint { flex: 0 0 auto; font-size: 12px; color: var(--warning); white-space: nowrap; }
.im-c-when { flex: 0 0 auto; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.im-convo-foot { margin: 0; font-size: 12px; color: var(--ink-muted); line-height: 1.5; }

/* 会话空态：.tr-empty 语法（原型 .im-empty 尺寸平移） */
#mode-im .tr-empty { min-height: 140px; padding: 32px 24px; }

@media (max-width: 1100px) {
  .im-channels { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .im-head { flex-direction: column; align-items: flex-start; }
  .im-channels { grid-template-columns: 1fr; }
  .im-binding-item { flex-wrap: wrap; row-gap: 4px; }
  .im-b-when { flex-basis: 100%; text-align: left; }
  .im-convo-item { flex-wrap: wrap; row-gap: 8px; }
  .im-c-agent-f { flex-basis: 100%; }
  .im-bind-ttl { margin-left: 0; flex-basis: 100%; }
}

/* ═══ GitHub Tasks（任务台）═══
   规范来源:DESIGN.md「GitHub Tasks」节;布局判例平移 .im-head/.order-item/.inviteCard。
   三区:页头计数 tag · 任务队列(状态分组+行内展开) · 仓库绑定(表单/台账/勾选即保存)。 */
.tasks-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--gap-in) 20px; flex-wrap: wrap;
}
.task-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 2px 8px; border-radius: var(--radius-xs); border: 1px solid var(--hairline); color: var(--ink-secondary); flex: 0 0 auto; white-space: nowrap; }
.task-tag .mono { font-size: 12px; color: var(--ink); }
/* 「我的|全部」视角 pill（team-collab 切片 4 · prototype v1 46-49 同构）：
   任务台页头 + 消息面板 block-h 两处共用（AC-6，读侧过滤纯 UI 开关）。 */
.tasks-head-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 协作台页头侧动作（负责人反馈 2026-10-05「按钮太靠上」）：侧按钮/计数 tag 随标题+描述块底行对齐
   （config-head flex-end 同款判例），不再顶对齐贴 h1 行 */
#mode-collab .tasks-head { align-items: flex-end; }
/* 任务台来源 tab（升格任务总台账）：GitHub 集成 / 协作流编排——work-nav 同款语法 */
.task-tab { display: none; }
.task-tab.task-tab-open { display: flex; flex-direction: column; gap: var(--gap-block); }
.t-state.is-queue .dot { background: var(--warning); }
/* 任务台·协作流 tab 台账行（.list-row.task-item 同族）：流名 + 任务 n · 标题 + Agent + 时刻；
   并行子任务副行（缩进弱化，不承载跳转/操作） */
.flow-task-item { display: flex; flex-direction: column; }
.flow-task-row { cursor: pointer; }
.flow-task-flow { flex: 0 1 auto; min-width: 0; max-width: 220px; font-size: 12px; color: var(--ink-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-task-sub { display: flex; align-items: baseline; gap: 10px; padding: 4px 12px 4px 30px; margin: 2px 0 2px 16px; border-left: 2px solid var(--hairline); }
.flow-task-sub .t-state { font-size: 11px; }
.flow-task-sub-title { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--ink-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-task-sub .t-agent .av { width: 16px; height: 16px; font-size: 11px; }
.block-h-side { display: inline-flex; align-items: center; gap: 8px; }
.view-pill { display: inline-flex; border: 1px solid var(--hairline); border-radius: var(--radius-xs); overflow: hidden; background: var(--panel); flex: 0 0 auto; }
.view-pill button { all: unset; cursor: pointer; padding: 5px 14px; font-size: 12px; font-weight: 500; color: var(--ink-secondary); }
.view-pill button.is-on { background: var(--primary); color: var(--ink-on-dark); font-weight: 600; }
.block-h .view-pill button { padding: 2px 10px; font-size: 11px; }
/* 段头行：zone-label + 右侧控件（视角 pill 等）同行（multi-agent-collab 切片 I · 协作台团队任务段头，
   pill 自任务台页头迁入段头；.task-group-head 同族语法，控件垂直居中）。 */
.zone-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; flex-wrap: wrap; }
.zone-row .zone-label { margin: 0; }

/* ── 任务队列:状态分组 ── */
.task-group { display: flex; flex-direction: column; }
.task-group + .task-group { margin-top: 20px; }
.task-group-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.task-group-head .zone-label { margin: 0; }
.task-group-head .count { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* ── 任务行(.list-row 零薄覆盖=组件默认完全同形:状态点/坐标 mono/标题/Agent/PR/时刻右贴) ── */
.task-item.is-open { background: transparent; }
.t-state { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-secondary); white-space: nowrap; }
.t-state .dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; background: var(--ink-muted); }
.t-state.is-run { color: var(--accent); }
.t-state.is-run .dot { background: var(--accent); }
.t-state.is-pr .dot, .t-state.is-done .dot { background: var(--success); }
.t-state.is-fail { color: var(--destructive); }
.t-state.is-fail .dot { background: var(--destructive); }
.t-state.is-late { color: var(--warning); }
.t-state.is-late .dot { background: var(--warning); }
.t-issue { flex: 0 0 auto; font-family: var(--mono); font-size: 12px; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.t-title { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.t-title:hover { color: var(--accent); }
.t-agent { flex: 0 1 auto; min-width: 0; color: var(--ink-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 指派下拉（任务级指派 2026-10-05）:queued 行 Agent 位就地选执行者(.repo-input 缩排同构) */
.t-assign-sel { flex: 0 1 auto; min-width: 0; max-width: 200px; height: 24px; font-size: 12px; font-family: var(--font); color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-xs); padding: 0 6px; background: var(--panel); }
.t-assign-sel:focus { outline: none; border-color: var(--accent); }
.t-pr { flex: 0 0 auto; font-size: 12px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.t-pr:hover { text-decoration: underline; }
.t-cancel { all: unset; cursor: pointer; font-size: 12px; color: var(--ink-muted); flex: 0 0 auto; white-space: nowrap; }
.t-cancel:hover { color: var(--destructive); }
.t-cancel.is-arming { color: var(--destructive); font-weight: 600; }
.t-when { flex: 0 0 auto; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── 行内展开详情(canvas-soft 底;产出行/失败原因/审计流) ── */
.task-detail { background: var(--canvas-soft); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.t-out { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.t-branch { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.t-reason { margin: 0; padding: 10px 12px; background: var(--primary-muted); border: 1px solid var(--hairline); border-radius: var(--radius-xs); font-size: 12px; color: var(--ink-secondary); line-height: 1.6; }
.list-row.audit-row { align-items: baseline; padding: 6px 2px; }
.a-when { flex: 0 0 auto; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.a-event { flex: 0 0 auto; font-size: 12px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.a-meta { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--ink-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 指派对象（.assignee/.av 两态——协作流分支行消费；团队任务表单段已随 collab-flow-v2 切片 Ⅱ 裁决退役） ── */
.t-state.is-open .dot { background: var(--accent); }
.assignee { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink-secondary); }
.av { width: 22px; height: 22px; border-radius: 999px; background: var(--primary-muted); color: var(--ink); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.av.is-agent { background: var(--accent-muted); color: var(--accent); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--ink-secondary); }
.detail-desc { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.6; white-space: pre-wrap; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── 协作流（collab-flow-v2 切片 Ⅱ · ADR-011 · prototype v1 confirmed 映射：横排管道步骤条 +
   并行组横排（各分支独立状态点）+ 新建弹窗 + 团队页两 tab；原型解说语法与演示串零映射（§9 红线）。 ── */
/* console-ui-kit：协作流行容器规格并入 .list-row（.f-* 子部件保留） */
.f-state { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-secondary); white-space: nowrap; }
.f-state .dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; background: var(--ink-muted); }
.f-state.is-run { color: var(--accent); }
.f-state.is-run .dot { background: var(--accent); }
.f-state.is-done .dot { background: var(--success); }
.f-state.is-paused .dot { background: var(--warning); }
.f-title { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.f-title:hover { color: var(--accent); }
/* 并行组数徽标（列表行）：⑃ 并行 ×n = 该流含 n 个多分支步（纯派生） */
.f-par { flex: 0 0 auto; font-size: 11px; padding: 1px 8px; border-radius: var(--radius-xs); border: 1px solid var(--warning); color: var(--warning); background: var(--accent-muted); white-space: nowrap; }
.f-prog { flex: 0 0 auto; font-family: var(--mono); font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.f-cur { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-cur .av { width: 18px; height: 18px; font-size: 11px; }
.f-when { flex: 0 0 auto; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 流详情展开：横排管道步骤条（卡 = 单 Agent 步 / 并行组步；→ 连接线纯 CSS，溢出横滚） */
.flow-detail { background: var(--canvas-soft); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.pipe { display: flex; flex-direction: row; align-items: stretch; gap: 24px; overflow-x: auto; padding: 10px 2px 6px; }
.pipe > * { position: relative; flex: 0 0 auto; }
.pipe > * + *::before { content: "→"; position: absolute; left: -20px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); font-size: 13px; }
.pipe-node { min-width: 120px; max-width: 220px; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--panel); }
.pipe-node.is-fail { border-color: var(--destructive); }
.pipe-node.is-run { border-color: var(--accent); }
.pipe-node.is-done { border-color: var(--success); }
.pipe-node.is-queue { border-color: var(--warning); }
.pipe-node.is-wait { border-style: dashed; }
.pn-dot { width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--primary-muted); color: var(--ink-secondary); flex: 0 0 auto; }
.pn-dot.is-done { background: var(--success); color: var(--ink-on-dark); }
.pn-dot.is-run { background: var(--accent); color: var(--ink-on-dark); }
.pn-dot.is-fail { background: var(--destructive); color: var(--ink-on-dark); }
.pn-dot.is-queue { background: var(--accent-muted); color: var(--warning); border: 1px dashed var(--warning); }
.pn-dot.is-wait { background: var(--panel); border: 1px dashed var(--ink-muted); color: var(--ink-muted); font-weight: 500; }
.pn-t { font-size: 13px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.pn-who { font-size: 12px; color: var(--ink-secondary); }
.pn-who .av { width: 18px; height: 18px; font-size: 11px; }
.pn-s { font-size: 11px; color: var(--ink-muted); white-space: nowrap; }
/* 并行组卡：琥珀左粗边 + badge + 分支 lane 列 + join 角标（全绿才进下一步） */
.pipe-par { min-width: 200px; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 10px; border: 1px solid var(--warning); border-left-width: 2px; border-radius: var(--radius-md); background: var(--panel); }
.pipe-par.is-fail { border-color: var(--destructive); border-left-color: var(--destructive); }
.pipe-par.is-wait { border-style: dashed; }
.par-badge { position: absolute; top: -9px; left: 10px; font-size: 11px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--warning); color: var(--warning); background: var(--accent-muted); white-space: nowrap; }
.par-badge.is-done { border-color: var(--success); color: var(--success); background: var(--panel); }
.par-badge.is-fail { border-color: var(--destructive); color: var(--destructive); background: var(--panel); }
.par-badge.is-wait { border-color: var(--ink-muted); color: var(--ink-muted); background: var(--panel); }
.par-lanes { display: flex; gap: 10px; }
.par-lane { display: flex; flex-direction: column; gap: 6px; min-width: 108px; max-width: 180px; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: var(--radius-xs); background: var(--canvas-soft); }
/* lane 标题 = 分支子任务标题（collab-flow-parallel Q2；未写标题回落「分支 A/B/C」字母名） */
.par-lane .pn-t { font-size: 12px; text-align: center; }
.join-badge { align-self: flex-end; font-family: var(--mono); font-size: 11px; color: var(--ink-muted); white-space: nowrap; }
/* 失败原因行 + 限速排队提示（诚实失败面 / 排队等待语义，ADR-011 决策 2） */
.fail-line { font-size: 11px; color: var(--destructive); overflow-wrap: anywhere; }
.queue-chip { font-size: 11px; color: var(--warning); display: inline-flex; align-items: center; gap: 4px; }
.flow-creator { font-size: 12px; color: var(--ink-secondary); }
/* 新建协作流弹窗（.modal 系复用 · applyModal 判例）+ 步骤卡片编辑器
   （collab-flow-parallel 原型 confirmed 布局：一步一卡，卡头灰底 = 序号 + 标题 +
   并行徽标 + 上移/下移/删除，卡体 = 说明 + 指派区） */
.flow-modal { width: min(640px, 100%); }
.flow-modal-add { display: flex; }
.step-editor { display: flex; flex-direction: column; gap: 12px; }
.step-card { border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--panel); display: flex; flex-direction: column; }
.step-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--hairline); background: var(--canvas-soft); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.step-no { width: 22px; height: 22px; border-radius: 999px; background: var(--primary-muted); color: var(--ink-secondary); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.step-head .step-title-f { flex: 1 1 auto; min-width: 0; }
.step-head input[type="text"].step-title { height: 32px; font-size: 13px; }
.f-par { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 1px 8px; border-radius: var(--radius-xs); background: var(--accent-muted); color: var(--accent); white-space: nowrap; }
.step-mv { all: unset; cursor: pointer; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-xs); color: var(--ink-muted); font-size: 12px; flex: 0 0 auto; }
.step-mv:hover { background: var(--primary-muted); color: var(--ink); }
.step-mv:disabled { opacity: 0.4; cursor: default; }
.step-zone { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.step-zone .step-body-f { flex: 1 1 100%; }
.step-zone textarea.step-body { min-height: 40px; font-family: var(--font); font-size: 12px; line-height: 1.5; }
.step-assign-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.step-assign-row .step-assign-f { flex: 0 1 220px; min-width: 0; }
.step-assign-row select { height: 32px; font-size: 13px; }
/* 并行组 = 分支子任务卡列（accent 左边线视觉锚，原型 confirmed；每个分支一个独立
   子任务卡：标题 + 正文两态 + 指派 + 带入 + 移除） */
.par-group { display: flex; flex-direction: column; gap: 8px; border-left: 2px solid var(--accent); padding-left: 12px; }
.par-head { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: var(--accent); flex-wrap: wrap; }
.branch-card { border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--panel); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.branch-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.branch-no { width: 22px; height: 22px; border-radius: var(--radius-xs); background: var(--accent-muted); color: var(--accent); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.branch-head .branch-title-f { flex: 1 1 160px; min-width: 0; }
.branch-head .branch-assign-f { flex: 0 1 160px; min-width: 0; }
.branch-head input[type="text"].branch-title { height: 32px; font-size: 13px; }
.branch-head select { height: 32px; font-size: 13px; }
/* 分支正文两态（Q3 裁决）：紧凑常显单行 input，聚焦/有内容 = textarea 展开态；
   切换在 flowEditorEl focusin/focusout 委托原位换元素（草稿在 flowDraft 不动） */
.branch-card .branch-body-c { height: 32px; font-size: 13px; width: 100%; }
.branch-card .branch-body-x { width: 100%; font-family: var(--font); font-size: 12px; line-height: 1.5; min-height: 56px; resize: vertical; }
/* 团队页两 tab（成员 | 活动 · ADR-011 决策 4：审计段自协作台迁入「活动」） */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hairline); margin-bottom: 12px; }
.tabs button { all: unset; cursor: pointer; padding: 8px 14px 13px; font-size: 13px; color: var(--ink-secondary); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.is-on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs button:hover { color: var(--accent); }

/* ── 仓库绑定区(.inviteCard 同构:表单行/台账行/区注;勾选列表已随任务级指派退役 2026-10-05) ── */
.repo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.repo-input { height: 32px; width: 240px; max-width: 100%; font-family: var(--mono); font-size: 14px; color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-xs); padding: 0 12px; background: var(--panel); }
.repo-input::placeholder { color: var(--ink-muted); font-family: var(--font); font-size: 12px; }
.repo-label-input { height: 32px; width: 140px; font-family: var(--mono); font-size: 12px; color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-xs); padding: 0 12px; background: var(--panel); }
.list-row.repo-bound-item { align-items: baseline; flex-wrap: wrap; }
.r-repo { font-family: var(--mono); font-size: 12px; color: var(--ink); font-weight: 500; }
.r-meta { color: var(--ink-secondary); white-space: nowrap; }
.r-unbind { all: unset; cursor: pointer; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.r-unbind:hover { color: var(--destructive); }
.r-unbind.is-arming { color: var(--destructive); font-weight: 600; }
/* GitHub 连接卡（github-app-auth 切片 Ⅲ）：提示行 = callout + 右关闭钮;三态区块纵向间距 */
.gh-notice { display: flex; align-items: baseline; gap: 8px; }
.gh-notice .r-unbind { margin-left: auto; }
#ghConnectZone .gh-notice + .callout, #ghConnectZone .gh-notice + .list-row { margin-top: 8px; }
.repo-note { margin: 0; font-size: 12px; color: var(--ink-secondary); line-height: 1.5; }
#mode-tasks .callout.is-sm { font-size: 12px; padding: 8px 10px; }

/* ── 队列空态/未绑定引导(.tr-empty 语法) ── */
.task-empty { min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 32px 24px; text-align: center; }
.task-empty-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.task-empty-sub { margin: 0; font-size: 13px; color: var(--ink-secondary); line-height: 1.6; }

@media (max-width: 800px) {
  .tasks-head { flex-direction: column; align-items: flex-start; }
  .task-item { flex-wrap: wrap; row-gap: 4px; }
  .t-title { flex-basis: 100%; order: -1; }
  .t-when { flex-basis: 100%; text-align: left; }
  .repo-input, .repo-label-input { flex-basis: 100%; width: auto; }
}

/* ── 资产库（asset-library 切片 Ⅱ · ADR-010 导航面 5+4→6+4）──────────────────
   段一指令模板：.atpl 紧凑数据行（8px/2px + hairline 分线,audit-row 语法）；工具条
   32px 输入 + 分类过滤 select；新建/编辑走统一弹窗（tplModalScrim，内嵌表单已退役，
   .tpl-form-row 行布局随迁弹窗复用）；
   删除 is-arming 4.5s 行内确认（t-cancel 判例）；Owner 治理角标琥珀（决策 3）。
   段二能力资产台已于 2026-10-04 全退役（负责人裁决 msg 7512348297249939000「a」）。
   规范 SSOT：DESIGN.md「Asset Library · 资产库导航 / 模板行 / 带入入口」。 ── */
.tpl-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.tpl-toolbar-spacer { flex: 1 1 auto; }
.inp { height: 32px; font-size: 13px; color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-xs); padding: 0 12px; background: var(--panel); }
.inp::placeholder { color: var(--ink-muted); }
select.inp { padding: 0 8px; }
.search-box.tpl-search { flex: 1 1 200px; min-width: 0; }
.inp-area { width: 100%; font-size: 13px; color: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-xs); padding: 8px 12px; background: var(--panel); min-height: 72px; resize: vertical; line-height: 1.6; font-family: inherit; }
.btn-sm { min-height: 28px; padding: 4px 12px; font-size: 12px; }
/* console-ui-kit：模板行容器规格并入 .list-row（.a-* 子部件保留） */
.a-title { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.a-title:hover { color: var(--accent); }
.use-count { flex: 0 0 auto; font-family: var(--mono); font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.use-count.is-hot { color: var(--accent); }
.a-author { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink-secondary); }
.a-acts { flex: 0 0 auto; display: inline-flex; gap: 4px; align-items: center; }
.a-act { all: unset; cursor: pointer; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-xs); color: var(--ink-muted); font-size: 13px; }
.a-act:hover { background: var(--primary-muted); color: var(--ink); }
.a-act.is-del:hover { color: var(--destructive); }
.a-act.is-del.is-arming { width: auto; padding: 0 8px; color: var(--destructive); font-weight: 600; }
.a-gov { display: inline-flex; align-items: center; font-size: 11px; padding: 1px 8px; border-radius: var(--radius-xs); background: var(--accent-muted); color: var(--accent); white-space: nowrap; }
.a-locked { flex: 0 0 auto; font-size: 11px; color: var(--ink-muted); white-space: nowrap; }
.tpl-form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tpl-form-row .tpl-title-f { flex: 1 1 240px; min-width: 0; }
.tpl-body { padding: 4px 2px 10px; border-bottom: 1px solid var(--hairline); }
.tpl-body p { margin: 0; font-size: 12px; color: var(--ink-secondary); line-height: 1.6; white-space: pre-wrap; }
#mode-assets .tr-empty { min-height: 140px; padding: 32px 24px; }
/* 聊天室占位（2026-10-05 负责人裁决）：与资产库占位空态同尺寸——都是「即将推出」纯静态页 */
#mode-chatroom .tr-empty { min-height: 140px; padding: 32px 24px; }

@media (max-width: 800px) {
  .list-row { flex-wrap: wrap; row-gap: 4px; }
  .a-title { flex-basis: 100%; order: -1; }
  .a-when { flex-basis: 100%; text-align: left; }
}

/* ── 记忆资产卡片（memory-asset-cards · 负责人裁决 2026-11-03「开发吧」）──────────────
   资产库第三 tab「记忆」：工具行复用 .seg / .search-box / work-filter-select 既有语法；
   卡片 = .card-row 薄覆盖（panel 底 + radius-lg + shadow-soft，.team-card 分离式同族判例）；
   网格 auto-fill ≥280px，窄屏自然单列。类型角标 = .tag 变体（琥珀 = 语义强调，a-gov 同族）；
   ×N 来源 = .tag 按钮薄覆盖。规范 SSOT：DESIGN.md「Memory Cards · 资产库记忆 tab」。 ── */
.mem-toolbar { margin-bottom: var(--gap-in); }
.search-box.mem-search { flex: 1 1 220px; min-width: 0; }
.mem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap-in); }
.card-row.mem-card { background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.card-row.mem-card:hover { border-color: var(--hairline); }
.mem-card-head { display: flex; align-items: center; gap: 8px; }
.tag.mem-type { flex: 0 0 auto; background: var(--accent-muted); color: var(--accent); border-color: var(--accent-muted); }
.mem-title {
  flex: 1 1 auto; min-width: 0; margin: 0; font-size: 13px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
button.tag.mem-src-count { flex: 0 0 auto; cursor: pointer; background: var(--primary-muted); color: var(--ink-secondary); }
button.tag.mem-src-count:hover { color: var(--ink); }
.mem-desc {
  margin: 0; font-size: 12px; line-height: 1.6; color: var(--ink-secondary);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mem-card-foot { display: flex; justify-content: flex-end; }
.mem-when { font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.mem-src-list { border-top: 1px solid var(--hairline); padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.mem-src { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--ink-muted); }
.mem-src-path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 消费点「⤓ 带入模板」（asset-library 切片 Ⅲ · AC-2）──────────────────────
   三处建活表单统一入口（btn-sm 28px）+ 模板选择浮层（下拉浮卡家族 z-40）+ 已选
   chip（11px accent 描边 accent-muted 底，DESIGN.md .tpl-chip 规范）。浮层绝对
   定位挂 .tpl-point-row / .step-assign-row / .branch-card（position:relative，
   collab-flow-parallel 布局重排随迁：步级挂指派行，分支级挂子任务卡），提交链零改动。 ── */
.tpl-point-row { position: relative; margin-top: 8px; }
.step-assign-row, .branch-card { position: relative; }
.tpl-chip-slot { display: inline-flex; align-items: center; }
.tpl-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 2px 8px; border-radius: var(--radius-xs); border: 1px solid var(--accent); background: var(--accent-muted); color: var(--accent); white-space: nowrap; }
.tpl-picker { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; width: min(380px, 100%); background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius-md); box-shadow: var(--shadow-lift); padding: 8px; }
.tpl-pick-head { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.tpl-pick-head .tpl-pick-q { flex: 1 1 auto; }
.tpl-pick-x { all: unset; cursor: pointer; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-xs); color: var(--ink-muted); font-size: 14px; flex: 0 0 auto; }
.tpl-pick-x:hover { background: var(--primary-muted); color: var(--ink); }
.tpl-pick-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.tpl-pick-row { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-xs); font-size: 13px; color: var(--ink); }
.tpl-pick-row:hover { background: var(--canvas-soft); }
.tp-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-pick-empty { margin: 0; padding: 12px 8px; font-size: 12px; color: var(--ink-muted); text-align: center; }
.step-tpl { flex: 0 0 auto; }

/* ===== SkillHub 集成（skillhub-integration）：市场弹窗（搜索/分类/排序 → 详情 → 选装）+ 详情页安装状态徽标 ===== */
.sh-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.sh-toolbar .sh-search { flex: 1 1 auto; }
.sh-toolbar .sh-cat, .sh-toolbar .sh-sort { flex: 0 0 auto; }
.sh-table-wrap { max-height: 360px; overflow-y: auto; border: 1px solid var(--hairline); border-radius: var(--radius-xs); }
.sh-row { cursor: pointer; }
.sh-cell-name { white-space: nowrap; }
.sh-cell-desc { max-width: 320px; color: var(--ink-secondary); font-size: 12px; }
.sh-detail-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.sh-detail-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-detail-name { font-size: 15px; font-weight: 600; }
.sh-detail-meta { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px 12px; margin: 0 0 12px; font-size: 12px; }
.sh-detail-meta dt { color: var(--ink-muted); }
.sh-detail-meta dd { margin: 0; color: var(--ink); }
/* agent-detail-mcp-skill-peek：详情表行可点开只读窥视 */
#mcpBody tr[data-peek],
#skillBody tr[data-peek] { cursor: pointer; }
#mcpBody tr[data-peek]:focus-visible,
#skillBody tr[data-peek]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sh-detail-sec { margin-bottom: 12px; }
.sh-sec-link { font-size: 12px; color: var(--accent); text-decoration: none; }
.sh-sec-link:hover { text-decoration: underline; }
.sh-detail-md { max-height: 280px; }
.sh-src-tag { margin-left: 8px; vertical-align: middle; }
/* 安装状态徽标（Agent 详情 Skill 列）：已安装=success / 待安装=muted（.tag 同形薄覆盖，本节登记） */
.sh-ok { border-color: var(--success); color: var(--success); }
.sh-wait { border-color: var(--ink-muted); color: var(--ink-secondary); }

/* ===== MCP Registry 集成（mcp-registry-integration）：市场弹窗（搜索 → 详情 → 选装配置面） =====
   布局复用 sh-*（同构交互判例）；本节只登记 mr-* 增量。值一律 DESIGN.md token（design-lint 门禁）。 */
.tag-warn { border-color: var(--warning); color: var(--warning); }
.mr-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.mr-presets-label { flex: 0 0 auto; }
.mr-preset-chip { padding: 2px 10px; font-size: 12px; }
.mr-pager { justify-content: center; }
.mr-version-sel { width: auto; display: inline-block; margin-left: 6px; }
.mr-config { border-top: 1px solid var(--hairline); padding-top: 10px; margin-top: 4px; }
.mr-kind-row { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.mr-kind { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--ink); cursor: pointer; }
.mr-cmd-preview { margin: 0 0 10px; padding: 6px 10px; background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--radius-xs); overflow-wrap: anywhere; }
.mr-cfg-sec { margin-bottom: 12px; }
.mr-cfg-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.mr-env-key { flex: 0 1 220px; }
.mr-val-preview { flex: 0 1 auto; font-size: 12px; color: var(--ink-secondary); background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--radius-xs); padding: 3px 8px; overflow-wrap: anywhere; }
.mr-plain { flex: 0 1 220px; }
.mr-plain-toggle { flex: 0 0 auto; padding: 2px 8px; font-size: 12px; }
.mr-env-meta { flex: 1 1 160px; min-width: 0; }
.mr-header-name { flex: 0 0 auto; font-size: 12px; color: var(--ink); }
.mr-add-env { padding: 2px 10px; font-size: 12px; }
.mcp-source-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
