/* ===================== 全站数据列表统一行高/字体（单一来源，禁止在各视图内单独设置 padding/font-size/line-height） ===================== */
#app .data-table th, #app .data-table td,
#app .pos-flat-table th, #app .pos-flat-table td,
#app .dept-table th, #app .dept-table td {
  padding: 4px 8px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  vertical-align: middle !important;
}
/* 兼容挂载在 #app 之外的浮层/弹窗表格（无对应视图前缀规则时由此兜底，保证全站统一） */
.data-table th, .data-table td,
.pos-flat-table th, .pos-flat-table td,
.dept-table th, .dept-table td {
  padding: 4px 8px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  vertical-align: middle !important;
}
/* 全站数据表行选中高亮：点击数据行即高亮，同表单选（JS 给 tr 加 .row-selected） */
/* #app 前缀 + !important 以压过冻结列白底 / 职族行底色等局部背景 */
#app .data-table tbody tr.row-selected > td { background: var(--primary-soft) !important; }
.data-table tbody tr.row-selected > td { background: var(--primary-soft) !important; }

/* 全站数据列表统一外观（单一来源，置于末尾压制各视图前缀规则） */
/* 表头：蓝底白字 */
#app .data-table thead th,
#app .pos-flat-table thead th,
#app .dept-table thead th {
  background: var(--primary) !important;
  color: #fff !important;
  border-bottom-color: rgba(255,255,255,.35) !important;
}
.data-table thead th,
.pos-flat-table thead th,
.dept-table thead th {
  background: var(--primary) !important;
  color: #fff !important;
  border-bottom-color: rgba(255,255,255,.35) !important;
}
/* 数据底色：白（覆盖职族行 #F8FAFC 等局部底色，保持全站一致） */
#app .data-table tbody td,
#app .pos-flat-table tbody td,
#app .dept-table tbody td { background: #fff; }
.data-table tbody td,
.pos-flat-table tbody td,
.dept-table tbody td { background: #fff; }
/* 悬停：单元格级淡蓝，置于白底之上仍可见（取代原先 tr 级悬停） */
#app .data-table tbody tr:hover > td { background: rgba(26,115,232,.06) !important; }
.data-table tbody tr:hover > td { background: rgba(26,115,232,.06) !important; }
/* 选中：单元格级主色淡蓝，置于悬停之后以优先（与 JS 行选中配合） */
#app .data-table tbody tr.row-selected > td { background: var(--primary-soft) !important; }
.data-table tbody tr.row-selected > td { background: var(--primary-soft) !important; }
/* 暗色主题：上面 41~46 行是硬编码 #fff，暗色下会变成「白底浅字」整张表看不见。
   这里用同前缀 + [data-theme] 提高特异性覆盖，只换底色、不动布局。 */
[data-theme="dark"] #app .data-table tbody td,
[data-theme="dark"] #app .pos-flat-table tbody td,
[data-theme="dark"] #app .dept-table tbody td,
[data-theme="dark"] .data-table tbody td,
[data-theme="dark"] .pos-flat-table tbody td,
[data-theme="dark"] .dept-table tbody td { background: var(--card-bg); }
[data-theme="dark"] #app .data-table tbody tr:nth-child(even) > td,
[data-theme="dark"] .data-table tbody tr:nth-child(even) > td { background: #252B42; }
[data-theme="dark"] #app .data-table tbody tr:hover > td,
[data-theme="dark"] .data-table tbody tr:hover > td { background: rgba(91,149,255,.10); }
[data-theme="dark"] #app .data-table tbody tr.row-selected > td { background: var(--primary-soft) !important; }


/* ===== 跨族类职级对比 · 数据列表视图（默认） ===== */
.cmp-head { display: flex; align-items: baseline; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.cmp-head-title { font-size: 14px; font-weight: 600; color: var(--text-strong, #202124); }
.cmp-head .muted { font-size: 12px; }
#view-org-jobframework .jf-pane[data-pane="compare"] > .card > .cmp-altview { flex: 1 1 0; min-height: 0; overflow: auto; padding: 14px 16px; }
#view-org-jobframework .jf-pane[data-pane="compare"] .cmp-list-table { min-width: 1160px; }
#view-org-jobframework .jf-pane[data-pane="compare"] .cmp-list-table thead th { text-align: left; }
#view-org-jobframework .jf-pane[data-pane="compare"] .cmp-list-table td { padding: 7px 10px; }
#view-org-jobframework .jf-pane[data-pane="compare"] .cmp-list-table td.cmp-td-left { text-align: left; }
#view-org-jobframework .jf-pane[data-pane="compare"] .cmp-list-table td.cmp-td-bar { text-align: left; }
#view-org-jobframework .jf-pane[data-pane="compare"] .cmp-list-table td.cmp-td-name { text-align: left; font-weight: 600; color: var(--text-strong, #202124); }
#view-org-jobframework .jf-pane[data-pane="compare"] .cmp-list-table td.cmp-td-score { font-weight: 700; color: var(--text-strong, #202124); font-variant-numeric: tabular-nums; }
#view-org-jobframework .jf-pane[data-pane="compare"] .cmp-list-table td.cmp-td-peer { font-variant-numeric: tabular-nums; }
#view-org-jobframework .jf-pane[data-pane="compare"] .cmp-list-table tbody tr.cmp-anom > td { background: #FEF6F5; }
.cmp-rank-badge { display: inline-block; min-width: 40px; padding: 1px 7px; border-radius: 10px; background: #EEF2F8; color: #44505f; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.cmp-rank-badge.cmp-rank-top { background: #FDF1E2; color: #B45309; }
.cmp-inline-track { display: inline-block; width: 120px; height: 8px; border-radius: 5px; background: #EEF1F6; overflow: hidden; vertical-align: middle; }
.cmp-inline-track > i { display: block; height: 100%; border-radius: 5px; background: var(--primary); opacity: .9; }
.cmp-inline-track > i.ch-M { background: #1E40AF; }
.cmp-inline-track > i.ch-T { background: #7C3AED; }
.cmp-inline-track > i.ch-P { background: #1A73E8; }
.cmp-inline-track > i.ch-E { background: #1A7F4B; }
.cmp-inline-track > i.ch-S { background: #B45309; }
.cmp-inline-track > i.ch-O { background: #0E7490; }
.cmp-inline-track > i.ch-F { background: #6D28D9; }
.cmp-dev-up { color: #B45309; font-variant-numeric: tabular-nums; }
.cmp-dev-down { color: #0369A1; font-variant-numeric: tabular-nums; }
.cmp-dev-flat { color: var(--text-faint, #9aa0a6); font-variant-numeric: tabular-nums; }
.cmp-ok { color: var(--text-faint, #9aa0a6); font-size: 12px; }


/* ===== 编制看板 / 周期版本（P2）===== */
.seg { display:inline-flex; border:1px solid var(--border, #e5e9f0); border-radius:6px; overflow:hidden; }
.seg-btn { border:0; background:#fff; padding:5px 10px; cursor:pointer; font-size:12px; color:var(--text-muted, #64748b); }
.seg-btn.active { background:var(--brand, #2f6fed); color:#fff; }
.stf-board-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:12px; padding:4px; }
.stf-card { border:1px solid var(--border, #e5e9f0); border-radius:8px; padding:12px 14px; background:#fff; }
.stf-card-h { font-weight:600; margin-bottom:8px; color:var(--text, #334155); }
.stf-gauge { height:8px; background:#eef1f6; border-radius:6px; overflow:hidden; margin-bottom:6px; }
.stf-gauge-fill { height:100%; background:var(--brand, #2f6fed); }
.stf-card-ok .stf-gauge-fill { background:#22a06b; }
.stf-card-warn .stf-gauge-fill { background:#e0a800; }
.stf-card-danger .stf-gauge-fill, .stf-card-red .stf-gauge-fill { background:#dc2626; }
.stf-card-num { font-size:18px; font-weight:700; }
.stf-cap-line { font-size:12px; color:var(--text-muted, #64748b); margin-top:4px; }
.stf-card-danger, .stf-card-red { border-color:#f3c2c2; }

/* 岗位管理：部门树 + 批量调编 + 制造业字段（P0/P1/P2） */
.pos-list-body { display: flex; min-height: 0; overflow: hidden; }
.badge-multi { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; border-radius: 10px; padding: 0 6px; font-size: 11px; }
.pos-inc-info { font-size: 12px; background: #f8fafc; border: 1px solid #eef2f7; padding: 6px 10px; margin: 6px 0; border-radius: 6px; }
.jd-incumbents .jd-inc { font-size: 12px; padding: 2px 0; }
.jd-changelog table { width: 100%; margin-top: 4px; }
.batch-tip { font-size: 12px; color: var(--text-muted, #888); padding: 6px 2px; }
.batch-paste { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
.batch-paste textarea { flex: 1; }
.batch-table-wrap { max-height: 340px; overflow: auto; border: 1px solid var(--border, #e5e7eb); border-radius: 6px; }

/* 岗位管理：详情「岗位配置」2 列布局（与部门管理浮窗同款） */
.jd-kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; margin: 4px 0 2px; }
.jd-kv-grid .jd-kv { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; }
.jd-kv-grid .jd-k { flex: 0 0 96px; color: var(--text-muted, #64748b); font-size: 12px; }
.jd-kv-grid .jd-v { flex: 1 1 auto; font-size: 13px; color: var(--text, #334155); word-break: break-word; }

/* 花名册弹窗：原生下拉升级为可输入筛选 combobox 后，让其在表单网格 / 级联内铺满列宽 */
#empBaseForm .form-grid .wb-combo,
#empBaseForm .emp-cascade .wb-combo { width: 100%; flex-shrink: 1; }
#empBaseForm .form-grid .wb-combo-input,
#empBaseForm .emp-cascade .wb-combo-input { width: 100%; }
#empBaseForm .form-grid .wb-combo-list,
#empBaseForm .emp-cascade .wb-combo-list { min-width: 100%; }

/* 身份证有效期占两列空间（2026-09-24） */
.emp-section .form-grid label.id-validity { grid-column: span 2 !important; }
/* 性别只由身份证自动识别：拦截鼠标交互（键盘由 tabindex=-1 + onkeydown 拦截） */
.emp-section .form-grid select[name="gender"] { pointer-events: none; }

/* ===== 学历信息等子表卡片：下拉框同宽 + 单行输入框统一高度（09-24） ===== */
/* 卡片内 select 与文本输入框同宽：!important 抵消 .sub-table[data-sub-table] 的 width:auto（特异度更高） */
.sub-card-field > select.sub-input { width: 100% !important; }
/* 卡片内单行输入框统一 30px：原生 date/month 控件默认更高，显式压平（垂直内边距归零、内容居中） */
.sub-card-field > input.sub-input,
.sub-card-field > select.sub-input {
  height: 30px; box-sizing: border-box;
  padding-top: 0; padding-bottom: 0;
}
.sub-card-field > input.sub-input[type="date"],
.sub-card-field > input.sub-input[type="month"] { padding: 0 24px 0 6px; }

/* 性别输入框观感对齐年龄等只读框（09-24）：白底同款、去下拉箭头、默认光标，仅由身份证号识别写入 */
.emp-section .form-grid select[name="gender"] {
  background-image: none !important;
  cursor: default !important;
  padding-right: 10px;
}
/* 不可聚焦：拦截点击/键盘后的蓝色聚焦光晕，保持常外观感 */
.emp-section .form-grid select[name="gender"]:focus {
  border-color: var(--border); box-shadow: none; outline: none;
}
/* 空值时灰字提示（与 placeholder 观感一致）；身份证识别写入男/女后恢复正文色 */
.emp-section .form-grid select[name="gender"]:has(option[value=""]:checked) { color: #9AA0A6; }

/* ===== 花名册新增/编辑弹窗：所有单行输入框统一高度 32px（09-24） ===== */
#empBaseForm .form-grid input,
#empBaseForm .form-grid select,
#empBaseForm .form-grid input[type="date"],
#empBaseForm .form-grid input[type="month"],
#empBaseForm .form-grid input[type="datetime-local"],
#empBaseForm .form-grid .wb-combo-input {
  height: 32px !important;
  box-sizing: border-box !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 30px !important;
}
/* 子表卡片内单行输入框同样统一 32px（含升级后的 combobox；覆盖默认 28px / .sub-card-field 30px） */
.sub-card-field > input.sub-input,
.sub-card-field > select.sub-input,
.sub-card-field .wb-combo {
  height: 32px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
}
.sub-card-field .wb-combo-input {
  height: 32px !important;
  box-sizing: border-box !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 30px !important;
}

/* 2026-09-29 导航/主题：侧边栏更深蓝 #15355B（比数据表头 #1E4B82 更深）；顶栏恢复白色；数据列表表头深蓝 #1E4B82（与侧边栏一致）。仅覆盖导航与表头，不动业务组件。 */
.sidebar { background: #15355B; }
.brand .name { color: #fff; }
.nav-search { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); }
.nav-search svg { color: rgba(255,255,255,.7); }
.nav-search input { color: #fff; }
.nav-search input::placeholder { color: rgba(255,255,255,.55); }
.nav-group-label { color: rgba(255,255,255,.6); }
.nav-item { color: rgba(255,255,255,.85); }
.nav-item .chev { color: rgba(255,255,255,.55); }
.nav-item:hover { background: rgba(255,255,255,.10); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.18); color: #fff; box-shadow: inset 3px 0 0 #fff; }
.nav-item.active:hover { background: rgba(255,255,255,.24); color: #fff; }
.sub-nav .sub-item { color: rgba(255,255,255,.8); }
.sub-nav .sub-item:hover { background: rgba(255,255,255,.10); color: #fff; }
.sub-nav .sub-item.active { background: rgba(255,255,255,.2); color: #fff; box-shadow: inset 3px 0 0 #fff; }
.sub-nav .sub-group { color: rgba(255,255,255,.6); }
.user { border-top-color: rgba(255,255,255,.12); }
.user .meta .uname { color: #fff; }
.user .meta .urole { color: rgba(255,255,255,.65); }

/* 2026-09-29 数据列表表头深蓝：与侧边栏 #1E4B82 一致（覆盖原 var(--primary) 蓝头） */
#app .data-table thead th,
#app .pos-flat-table thead th,
#app .dept-table thead th,
.data-table thead th,
.pos-flat-table thead th,
.dept-table thead th,
.dept-table thead th.col-name,
.jf-matrix thead th,
#deptTable thead th,
.dept-frozen-table thead th,
#view-org-jobframework .jf-pane .data-table thead th {
  background: #1E4B82 !important;
  color: #fff !important;
  border-bottom-color: rgba(255,255,255,.35) !important;
}

/* 2026-09-29 社保公积金缴费明细布局修正：只修工具栏横向 + 表格滚动，不强制 pane 高度以免在 .employee-page(flex column) 下塌缩 */
#ssDetailPane .ss-toolbar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 12px !important;
}
#ssDetailPane .ss-toolbar .ss-input,
#ssDetailPane .ss-toolbar .btn,
#ssDetailPane .ss-toolbar .btn-primary {
  margin: 0 !important;
}
#ssDetailPane #ssContent { padding: 0 !important; }
#ssDetailPane .ss-table-wrap {
  max-height: calc(100vh - 240px);
  overflow: auto;
  min-width: 0;
}
#ssDetailPane .ss-summary { margin-top: 8px; }


/* 部门弹窗：wb-combo 内部输入框高度与外部 input 一致 */
#deptForm .form-section-body label > .wb-combo .wb-combo-input {
  height: 32px;
  box-sizing: border-box;
}

/* 岗位弹窗：升级为 combobox 的下拉铺满列宽（覆盖 .wb-combo 工作台筛选栏 104px 定宽，
   与部门弹窗 label>.wb-combo 同口径）；auto-fit 网格下随弹窗宽度自适应 */
.pos-modal .form-grid label > .wb-combo {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.pos-modal .form-grid label > .wb-combo .wb-combo-input { width: 100%; }
.pos-modal .form-grid label > .wb-combo .wb-combo-list { min-width: 100%; }

/* ===== 弹窗尺寸统一档位（2026-10-08 规范：S480 / M720 / L960 / XL1180） =====
   用 .modal.modal-X（特异性 0-2-0）确保压过 css_hr_modules.css / css_base.css 里的基础 .modal 宽度规则，
   不受加载顺序影响。 */
.modal.modal-s, .modal.modal-sm { width: min(480px, 100%); }
.modal.modal-m, .modal.modal-md { width: min(720px, 100%); }
.modal.modal-l, .modal.modal-lg { width: min(960px, 100%); }
.modal.modal-xl { width: min(1180px, 100%); }
.modal.modal-narrow { width: min(520px, 100%); }
/* 内容自适应档（2026-10-21）：宽度由内容撑开，避免内容少的弹窗被定宽撑宽。
   表单强制 2 列（minmax 220~内容宽），高度随内容、超高封顶滚动；浮窗化时取显示态宽度故自适应保留 */
.modal.modal-auto { width: max-content; max-width: min(96vw, 1000px); min-width: 320px; }
.modal.modal-auto > .modal-body { width: max-content; max-width: min(96vw, 1000px); }
.modal.modal-auto .form-grid,
.float-win__body > .modal.modal-auto .form-grid { grid-template-columns: repeat(2, minmax(220px, max-content)); width: max-content; }
.modal.modal-xs { width: min(360px, 96vw); }


/* 花名册子版块：合同管理/异动管理 管理台（#empMgmtPane 内）布局修正，覆盖 .employee-page 固定高度+overflow:hidden */
.emp-mgmt-pane .employee-page {
  display: block;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  flex: none !important;
}
.emp-mgmt-pane { flex: 1 1 auto; min-height: 0; overflow: auto; width: 100% !important; }


/* 异动管理 5 个子模块已提升为花名册一级子 tab：隐藏异动聚合页内部的子标签行，避免与花名册子tab重复 */
.emp-mgmt-pane #view-emp-transfer .recruit-pagetabs { display: none !important; }

/* 异动/合同管理台嵌入花名册时不使用独立页的 margin-top:-24px（#view-emp-transfer 的 id 规则） */
.emp-mgmt-pane .employee-page { margin-top: 0 !important; }

/* 花名册子 tab 栏：收窄标签文字与顶部工具条 / 底部激活下划线的间距（2026-10-08） */
#empSubTabs { margin: -2px 0 0 !important; }
#empSubTabs .subtab { padding: 4px 16px; }

/* API_EMP_TOOLBAR_GAP 花名册：统计条上下间距二次收窄（2026-10-09）
   间距构成：
     工具栏 padding-bottom 0 + 工具栏 margin-bottom 2 + 统计条 margin-top 2 = 4px
        ← 工具栏 ↔ 统计条
     统计条 margin-bottom 2 + 列表卡 1px 上边框 = 3px
        ← 统计条 ↔ 数据列表表头
   仅作用于花名册主面板的直接子元素，不触及 #empSubtablePane 与 #empMgmtPane
   （合同管理/异动管理）内部各自的工具栏与统计条。 */
#view-emp-list > .toolbar { padding-bottom: 0; margin-bottom: 2px; }
#view-emp-list > .emp-stat-cards { margin: 4px 0 8px; }
/* 花名册子版块（银行卡/家庭/紧急联系人/教育/证书/合同/异动）统计卡片：挂在对应 pane 顶部 */
#empSubtablePane > .emp-stat-cards, #empMgmtPane > .emp-stat-cards { margin: 4px 0 10px; }
/* 待入职管理自身统计条（#ebStats）复用大卡网格，与花名册其它子版块一致；
   仅作用于 .emp-stat-item 卡片（招聘 #recruitSummary 用的是 .qs-card，不受影响） */
#ebStats.emp-stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 10px; margin: 4px 0 8px; }

/* API_EMP_DETAIL_NAV_WIDTH 详情页右侧竖向导航栏加宽（2026-10-09）
   原 flex-basis 76px，扣除边框/内边距后可用文本宽约 51px，放不下 5 个汉字（约 60px），
   导致「紧急联系人 / 社保公积金 / 银行卡信息 / 党组织关系 / 全生命周期」折成两行。
   改为按最长标签自适应（max-content），min-width 104px 兜底（其中额外预留约 10px 给竖向滚动条，
   24 个标签必然出现滚动条，不预留会把可用文本宽挤回 59px），max-width 防止挤压正文。 */
.emp-detail-nav { flex: 0 0 auto; width: max-content; min-width: 104px; max-width: 150px; }
.emp-detail-nav-item { white-space: nowrap; }

/* 数据列表隔行底色（2026-10-09，便于区分每一行）
   必须用 #app 前缀，否则特异性打不过全局「#app .data-table tbody td { background:#fff }」；
   悬停/选中态为 !important，激活时会自然覆盖斑马纹，符合预期 */
#app .data-table tbody tr:nth-child(even) > td { background: #f6f8fb; }
#empTable tbody tr.emp-tr-selected > td { background: var(--primary-soft, #eef4ff) !important; }
/* 日期下拉面板关闭态不占布局：visibility:hidden 的 absolute 面板仍会撑大 scrollHeight，
   导致高度贴内容的弹窗（如花名册子表）出现无内容的滚动条。打开时 openDropdown 先加 dp-open
   再 positionDropdown 测量，display:none 不影响定位。 */
.date-picker:not(.dp-open) .dp-dropdown { display: none; }


/* 2026-10-13 修复：候选人/面试弹窗表单与统一样式对齐 + 子表弹窗最小宽度
   2026-10-30：随全局 .form-grid 改上下式（标签上、输入框下） */
#candForm .form-grid label { display:flex; flex-direction:column; align-items:stretch; gap:5px; }
#candForm .form-grid label > .field-label { flex:0 0 auto; text-align:left; white-space:normal; }
#candForm .form-grid label > input,
#candForm .form-grid label > select,
#candForm .form-grid label > textarea,
#candForm .form-grid label > .emp-picker,
#candForm .form-grid label > .wb-combo,
#candForm .form-grid label > .resume-uploader { flex:none; width:100%; min-width:0; box-sizing:border-box; }
#candForm .form-grid label.check-inline { display:flex; flex-direction:row; align-items:center; gap:8px; align-self:start; height:auto; min-height:32px; }
/* 复选框本体固定 16px，禁止被上方 width:100% 规则拉伸成整列 */
#candForm .form-grid label.check-inline input[type="checkbox"] { flex:0 0 16px; width:16px; height:16px; min-width:16px; margin:0; padding:0; accent-color:var(--primary); cursor:pointer; }
/* 文本域：统一 72px 起步、可纵向拉伸（与 att2 弹窗口径一致） */
#candForm .form-grid label > textarea { height:auto; min-height:72px; padding:7px 9px; line-height:1.6; resize:vertical; }
#candForm .form-section-body,
.float-win__body > .modal #candForm .form-section-body { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
/* 招聘子模块弹窗字段少时避免末行留白：强制 2 列自适应 */
#ivForm .form-grid,
.float-win__body > .modal #ivForm .form-grid,
#ivEvalForm .form-grid,
.float-win__body > .modal #ivEvalForm .form-grid,
#ofForm .form-grid,
.float-win__body > .modal #ofForm .form-grid,
#ofRespForm .form-grid,
.float-win__body > .modal #ofRespForm .form-grid,
#chForm .form-grid,
.float-win__body > .modal #chForm .form-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
#ivModal .modal-body, #candModal .modal-body, #ofModal .modal-body, #ofRespModal .modal-body, #chModal .modal-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
/* empModal 宽度统一由上方 #empModal .modal.modal-lg 规则控制，此处保留占位避免旧缓存 */
/* #empModal .modal.modal-lg { min-width: ... } */
/* ===== AI 助手（2026-10-13 · ai_assistant.js） ===== */
/* AI 助手入口：放左下角用户区上方，避免遮挡左下角 .user 用户卡片。
   bottom/left 由 ai_assistant.js::placeFab() 按用户区实际位置动态计算，此处为 fallback。 */
#aiFab {
  position: fixed; left: 12px; bottom: 90px; z-index: 6000;
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px; border: none; border-radius: 20px;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
#aiFab:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .24); }
#aiFab svg { flex-shrink: 0; }

/* 浮窗聊天：.float-win 挂 body 下，类选择器禁加 #app 前缀 */
.float-win__body > .ai-chat { height: 100%; }
.ai-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ai-chat__head {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.ai-chat__model {
  flex: 1 1 0; min-width: 120px; width: 100%; max-width: 100%; height: 28px; padding: 0 6px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--card-bg); color: var(--text); font-size: 12px;
}
.ai-chat__clear {
  flex-shrink: 0; height: 28px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--text-muted); font-size: 12px; cursor: pointer;
}
.ai-chat__clear:hover { color: var(--danger); border-color: var(--danger); }
/* AI 助手顶栏：模型下拉经全局 combo 升级为 .wb-combo（写死 104px），此处撑满弹窗剩余宽度并统一 28px 高 */
.ai-chat__head .wb-combo { flex: 1 1 0; width: auto; min-width: 120px; }
.ai-chat__head .wb-combo-input { height: 28px; line-height: 26px; }
.ai-chat__msgs {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px; padding: 12px 2px;
}
.ai-msg {
  max-width: 88%; padding: 8px 10px; border-radius: 10px;
  font-size: 13px; line-height: 1.6; word-break: break-word; white-space: pre-wrap;
}
.ai-msg--user {
  align-self: flex-end; background: var(--primary); color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg--bot {
  align-self: flex-start; background: rgba(127, 139, 163, .12); color: var(--text);
  border-bottom-left-radius: 4px;
}
.ai-msg--err {
  align-self: flex-start; color: var(--danger);
  border: 1px solid var(--danger); border-bottom-left-radius: 4px;
}
.ai-msg--typing { color: var(--text-muted); }
.ai-code {
  background: rgba(127, 139, 163, .18); border-radius: 4px;
  padding: 0 4px; font-family: var(--font-mono, monospace); font-size: 12px;
}
.ai-chat__input {
  flex-shrink: 0; display: flex; gap: 8px; align-items: flex-end;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.ai-chat__input textarea {
  flex: 1; resize: none; height: 46px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--card-bg); color: var(--text); font-size: 13px; line-height: 1.5;
  font-family: inherit;
}
.ai-chat__input textarea:focus { outline: none; border-color: var(--primary); }
.ai-chat__send {
  flex-shrink: 0; height: 46px; padding: 0 16px; border: none; border-radius: 8px;
  background: var(--primary); color: #fff; font-size: 13px; cursor: pointer;
}
.ai-chat__send:disabled { opacity: .6; cursor: not-allowed; }
/* ===== AI 助手 · 查数数据卡与快捷示例（2026-10-13 P1） ===== */
.ai-msg--data {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 10px 12px;
  max-width: 100%;
}
.ai-data__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.ai-data__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ai-data__table th,
.ai-data__table td {
  padding: 5px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.ai-data__table th {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.ai-data__table td { color: var(--text); }
.ai-data__table tbody tr:last-child td { border-bottom: none; }
.ai-data__note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}
.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ai-chip {
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.ai-chip:hover { color: var(--primary); border-color: var(--primary); }

/* ============================================================
   AI 助手 · 知识库 / 文书生成（2026-10-13）
   浮窗挂 body 下，禁加 #app 前缀（见项目铁律）
   ============================================================ */
.ai-chat__body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.ai-chat__kbrow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 6px;
  flex-shrink: 0; padding: 0 2px 12px;
}
.ai-kb-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-muted, #8a94a6);
  cursor: pointer; user-select: none;
  padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px;
  transition: color .15s, border-color .15s, background .15s;
}
.ai-kb-toggle input { accent-color: var(--primary); margin: 0; cursor: pointer; }
.ai-kb-toggle:hover { color: var(--text); border-color: var(--primary); }
.ai-kb-toggle:has(input:checked) {
  color: var(--primary); border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}
.ai-chat__docgen {
  font-size: 12px; color: var(--text-muted, #8a94a6);
  padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.ai-chat__docgen:hover { color: var(--primary); border-color: var(--primary); }
.ai-chat__kb {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 8px;
  font-size: 12px; color: var(--text-muted, #8a94a6);
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--card-bg); cursor: pointer; flex-shrink: 0;
  transition: color .15s, border-color .15s;
}
.ai-chat__kb:hover { color: var(--primary); border-color: var(--primary); }

/* ---- 知识库 / 生成视图公共 ---- */
.ai-kb, .ai-docgen { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 10px; }
.ai-kb__bar {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text);
}
.ai-kb__bar b { font-size: 13px; }
.ai-kb__tip { font-size: 11px; color: var(--text-muted, #8a94a6); }
.ai-kb__back {
  margin-left: auto; font-size: 12px; color: var(--text-muted, #8a94a6);
  padding: 3px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: transparent; cursor: pointer;
}
.ai-kb__back:hover { color: var(--primary); border-color: var(--primary); }
.ai-kb__form { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.ai-kb__input, .ai-kb__textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--card-bg); color: var(--text);
  font-size: 12px; font-family: inherit;
}
.ai-kb__input { height: 30px; padding: 0 8px; }
.ai-kb__textarea { min-height: 110px; padding: 6px 8px; resize: vertical; line-height: 1.5; }
.ai-kb__row { display: flex; gap: 8px; }
.ai-kb__btn {
  font-size: 12px; color: var(--text);
  padding: 5px 14px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--card-bg); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.ai-kb__btn:hover { color: var(--primary); border-color: var(--primary); }
.ai-kb__btn--file { position: relative; overflow: hidden; }
.ai-kb__btn--primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.ai-kb__btn--primary:hover { opacity: .88; color: #fff; }
.ai-kb__hint { font-size: 11px; color: var(--text-muted, #8a94a6); line-height: 1.5; }
.ai-kb__list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.ai-kb__empty { font-size: 12px; color: var(--text-muted, #8a94a6); padding: 16px 0; text-align: center; }
.ai-kb__item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card-bg);
}
.ai-kb__meta { flex: 1; min-width: 0; font-size: 12px; color: var(--text); line-height: 1.6; }
.ai-kb__meta b { font-weight: 600; }
.ai-kb__tag {
  display: inline-block; margin-left: 6px; padding: 0 6px;
  font-size: 11px; color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent);
  border-radius: 999px;
}
.ai-kb__num, .ai-kb__file { margin-left: 6px; font-size: 11px; color: var(--text-muted, #8a94a6); }
.ai-kb__del {
  flex-shrink: 0; font-size: 11px; color: var(--text-muted, #8a94a6);
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: transparent; cursor: pointer;
}
.ai-kb__del:hover { color: #e5484d; border-color: #e5484d; }

/* ---- 文书生成 ---- */
.ai-docgen__types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; flex-shrink: 0; }
.ai-docgen__type {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card-bg); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ai-docgen__type b { font-size: 12px; color: var(--text); font-weight: 600; }
.ai-docgen__type span { font-size: 11px; color: var(--text-muted, #8a94a6); }
.ai-docgen__type:hover { border-color: var(--primary); }
.ai-docgen__type.is-active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--card-bg)); }
.ai-docgen__fields { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.ai-docgen__field { display: flex; flex-direction: column; gap: 3px; }
.ai-docgen__label { font-size: 12px; color: var(--text-muted, #8a94a6); }
.ai-docgen__row { flex-shrink: 0; }
.ai-docgen__title { font-size: 12px; font-weight: 600; color: var(--primary); padding-bottom: 6px; }
.ai-docgen__body {
  font-size: 13px; line-height: 1.7; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card-bg);
}
.ai-docgen__body .ai-h { display: block; font-size: 13px; margin: 2px 0; }
.ai-docgen__actions { display: flex; gap: 8px; padding-top: 8px; }
.ai-docgen__btn {
  font-size: 12px; color: var(--text-muted, #8a94a6);
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: transparent; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.ai-docgen__btn:hover { color: var(--primary); border-color: var(--primary); }

/* ---- 知识库问答气泡 / 引用 ---- */
.ai-msg--rag { max-width: 100%; }
.ai-rag__answer { font-size: 13px; line-height: 1.7; }
.ai-rag__answer .ai-h { display: block; font-size: 13px; margin: 2px 0; }
.ai-refs { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 8px; }
.ai-ref {
  font-size: 11px; color: var(--text-muted, #8a94a6);
  padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card-bg);
}

/* AI 补丁中心（P2 · 2026-10-14） */
.ai-patch { padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 14px; }
.ai-patch__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-patch__head b { font-size: 15px; }
.ai-patch__sub { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); max-width: 720px; line-height: 1.6; }
.ai-patch__refresh { height: 28px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); color: var(--text); font-size: 12px; cursor: pointer; }
.ai-patch__refresh:hover { border-color: var(--primary); color: var(--primary); }
.ai-patch__stats { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-patch__stat { min-width: 108px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); }
.ai-patch__statn { display: block; font-size: 20px; font-weight: 500; }
.ai-patch__statl { display: block; margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.ai-patch__stat--pending .ai-patch__statn { color: #BA7517; }
.ai-patch__stat--approved .ai-patch__statn { color: #185FA5; }
.ai-patch__stat--applied .ai-patch__statn { color: #0F6E56; }
.ai-patch__stat--merged .ai-patch__statn { color: #3B6D11; }
.ai-patch__stat--sbx .ai-patch__statn { font-size: 14px; color: var(--text-muted); }
.ai-patch__filters { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-patch__filter { height: 26px; padding: 0 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--card-bg); color: var(--text-muted); font-size: 12px; cursor: pointer; }
.ai-patch__filter.on { border-color: var(--primary); color: var(--primary); background: rgba(24, 95, 165, 0.08); }
.ai-patch__tablewrap { border: 1px solid var(--border); border-radius: 8px; overflow: auto; background: var(--card-bg); }
#view-ai-patches .ai-patch__tablewrap { flex: 0 0 auto; } /* 禁 flex 压缩：否则表格被压扁触发表内小滚动条，页面级滚动失效（与治理中心行为统一） */
.ai-patch__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ai-patch__table th { text-align: left; padding: 8px 12px; font-size: 12px; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ai-patch__table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ai-patch__table tbody tr { cursor: pointer; }
.ai-patch__table tbody tr:hover { background: var(--bg-secondary, #f7f8fa); }
.ai-patch__table tbody tr.on { background: rgba(24, 95, 165, 0.06); }
.ai-patch__table tbody tr:last-child td { border-bottom: none; }
.ai-patch__no { font-family: var(--font-mono, monospace); font-size: 12px; white-space: nowrap; }
.ai-patch__title { font-weight: 500; }
.ai-patch__sum { margin-top: 2px; font-size: 12px; color: var(--text-muted); max-width: 420px; }
.ai-patch__empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 12px; }
.ai-patch__risk { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.ai-patch__risk--low { color: #3B6D11; background: #EAF3DE; }
.ai-patch__risk--mid { color: #854F0B; background: #FAEEDA; }
.ai-patch__risk--high { color: #A32D2D; background: #FCEBEB; }
.ai-patch__st { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.ai-patch__st--pending { color: #854F0B; background: #FAEEDA; }
.ai-patch__st--approved { color: #185FA5; background: #E6F1FB; }
.ai-patch__st--applied { color: #0F6E56; background: #E1F5EE; }
.ai-patch__st--merged { color: #3B6D11; background: #EAF3DE; }
.ai-patch__st--rejected, .ai-patch__st--rolled_back { color: #5F5E5A; background: #F1EFE8; }
.ai-patch__st--failed { color: #A32D2D; background: #FCEBEB; }
.ai-patch__detail { border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); padding: 16px; }
.ai-patch__dloading { padding: 20px; text-align: center; color: var(--text-muted); font-size: 12px; }
.ai-patch__dhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-patch__dno { font-family: var(--font-mono, monospace); font-size: 13px; font-weight: 500; }
.ai-patch__dtime { font-size: 12px; color: var(--text-muted); }
.ai-patch__dtitle { margin-top: 8px; font-size: 15px; font-weight: 500; }
.ai-patch__dsum { margin-top: 4px; font-size: 13px; color: var(--text-secondary, #444); line-height: 1.7; }
.ai-patch__dreq { margin-top: 10px; padding: 8px 12px; border-radius: 6px; background: var(--bg-secondary, #f7f8fa); font-size: 12px; color: var(--text-secondary, #444); line-height: 1.7; }
.ai-patch__derr { margin-top: 10px; padding: 8px 12px; border-radius: 6px; background: #FCEBEB; color: #A32D2D; font-size: 12px; line-height: 1.6; }
.ai-patch__dwarn { margin-top: 10px; padding: 8px 12px; border-radius: 6px; background: #FAEEDA; color: #854F0B; font-size: 12px; line-height: 1.7; }
.ai-patch__dwarn ul { margin: 4px 0 0; padding-left: 18px; }
.ai-patch__dfile { margin-top: 14px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.ai-patch__dfname { padding: 8px 12px; font-size: 12px; font-weight: 500; background: var(--bg-secondary, #f7f8fa); border-bottom: 1px solid var(--border); font-family: var(--font-mono, monospace); }
.ai-patch__edit { padding: 10px 12px; }
.ai-patch__edit + .ai-patch__edit { border-top: 1px dashed var(--border); }
.ai-patch__elabel { font-size: 11px; color: var(--text-muted); margin: 4px 0; }
.ai-patch__pre { margin: 0; padding: 8px 10px; border-radius: 6px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; font-family: var(--font-mono, monospace); max-height: 220px; overflow: auto; }
.ai-patch__pre--del { background: #FCEBEB; color: #791F1F; }
.ai-patch__pre--add { background: #EAF3DE; color: #27500A; }
.ai-patch__dnotes { margin-top: 12px; font-size: 12px; color: var(--text-secondary, #444); line-height: 1.7; }
.ai-patch__acts { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.ai-patch__btn { height: 30px; padding: 0 14px; border-radius: 6px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); background: var(--card-bg); color: var(--text); }
.ai-patch__btn--primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.ai-patch__btn--danger { border-color: #A32D2D; background: #A32D2D; color: #fff; }
.ai-patch__btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.ai-patch__dlogs { margin-top: 16px; font-size: 12px; }
.ai-patch__logtable { width: 100%; border-collapse: collapse; margin-top: 6px; }
.ai-patch__logtable th { text-align: left; padding: 6px 8px; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); }
.ai-patch__logtable td { padding: 6px 8px; border-bottom: 1px solid var(--border); color: var(--text-secondary, #444); }
.ai-patch__deny { padding: 60px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* 聊天窗 · 补丁卡片（P2） */
.ai-msg--patch { border-left: 3px solid #185FA5; }
.ai-patchcard__no { font-family: var(--font-mono, monospace); font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.ai-patchcard__risk { padding: 0 8px; border-radius: 9px; font-size: 11px; }
.ai-patchcard__risk.risk-low { color: #3B6D11; background: #EAF3DE; }
.ai-patchcard__risk.risk-mid { color: #854F0B; background: #FAEEDA; }
.ai-patchcard__risk.risk-high { color: #A32D2D; background: #FCEBEB; }
.ai-patchcard__title { margin-top: 4px; font-weight: 500; }
.ai-patchcard__sum { margin-top: 2px; font-size: 12px; color: var(--text-secondary, #444); line-height: 1.6; }
.ai-patchcard__tip { margin-top: 6px; font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.ai-patchcard__btn { margin-top: 8px; height: 26px; padding: 0 12px; border: 1px solid #185FA5; border-radius: 6px; background: transparent; color: #185FA5; font-size: 12px; cursor: pointer; }
.ai-patchcard__btn:hover { background: rgba(24, 95, 165, 0.08); }


/* ============================================================
 * AI 治理中心（P3 · 审计 / 成本 / 批量操作）
 * ============================================================ */
.ai-gov { padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 14px; }
/* AI 补丁中心/治理中心挂在 .employee-page（固定视口高 + overflow:hidden）下，根 div 必须自成滚动容器，否则超出内容被裁切且无法下拉 */
#view-ai-patches .ai-patch, #view-ai-governance .ai-gov { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.ai-gov__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-gov__head b { font-size: 15px; }
.ai-gov__sub { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); max-width: 760px; line-height: 1.6; }
.ai-gov__refresh { height: 28px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); color: var(--text); font-size: 12px; cursor: pointer; }
.ai-gov__refresh:hover { border-color: var(--primary); color: var(--primary); }
.ai-gov__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ai-gov__stat { padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); }
.ai-gov__statn { display: block; font-size: 22px; font-weight: 500; }
.ai-gov__unit { margin-left: 4px; font-size: 11px; font-style: normal; color: var(--text-muted); }
.ai-gov__statl { display: block; margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.ai-gov__stat--ag-calls .ai-gov__statn { color: #185FA5; }
.ai-gov__stat--ag-tokens .ai-gov__statn { color: #0F6E56; }
.ai-gov__stat--ag-cost .ai-gov__statn { color: #854F0B; }
.ai-gov__stat--ag-err .ai-gov__statn { color: #A32D2D; }
.ai-gov__stat--ag-okrate .ai-gov__statn { color: #3B6D11; }
.ai-gov__charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 1100px) { .ai-gov__charts { grid-template-columns: 1fr; } }
.ai-gov__panel { border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); padding: 14px 16px; }
.ai-gov__ptitle { font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.ai-gov__ptip { margin-left: 8px; font-size: 11px; font-weight: 400; color: var(--text-muted); }
.ai-gov__chart { height: 240px; }
.ai-gov__pricing { border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); padding: 10px 16px; font-size: 12px; color: var(--text-secondary, #444); }
.ai-gov__pricing summary { cursor: pointer; }
.ai-gov__ptable { margin-top: 8px; }
.ai-gov__ptable-in { border-collapse: collapse; }
.ai-gov__ptable-in th, .ai-gov__ptable-in td { padding: 4px 18px 4px 0; text-align: left; font-size: 12px; }
.ai-gov__ptable-in th { color: var(--text-muted); font-weight: 500; }
.ai-gov__batchbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ai-gov__chk { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.ai-gov__selcount { font-size: 12px; color: var(--text-muted); }
.ai-gov__btn { height: 28px; padding: 0 12px; border-radius: 6px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); background: var(--card-bg); color: var(--text); }
.ai-gov__btn--primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.ai-gov__btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.ai-gov__btn:disabled { opacity: .5; cursor: not-allowed; }
.ai-gov__filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ai-gov__sel, .ai-gov__date, .ai-gov__input { height: 28px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); color: var(--text); font-size: 12px; padding: 0 8px; }
.ai-gov__input { width: 140px; }
.ai-gov__sep { font-size: 12px; color: var(--text-muted); }
.ai-gov__tablewrap { border: 1px solid var(--border); border-radius: 8px; overflow: auto; background: var(--card-bg); }
.ai-gov__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ai-gov__table th { text-align: left; padding: 8px 12px; font-size: 12px; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ai-gov__table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ai-gov__table tbody tr:hover { background: var(--bg-secondary, #f7f8fa); }
.ai-gov__table tbody tr:last-child td { border-bottom: none; }
.ai-gov__empty { padding: 22px; text-align: center; color: var(--text-muted); font-size: 12px; }
.ai-gov__mono { font-family: var(--font-mono, monospace); font-size: 12px; white-space: nowrap; }
.ai-gov__ttitle { font-weight: 500; }
.ai-gov__tsum { margin-top: 2px; font-size: 12px; color: var(--text-muted); max-width: 420px; }
.ai-gov__risk { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.ai-gov__risk--low { color: #3B6D11; background: #EAF3DE; }
.ai-gov__risk--mid { color: #854F0B; background: #FAEEDA; }
.ai-gov__risk--high { color: #A32D2D; background: #FCEBEB; }
.ai-gov__st { display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.ai-gov__st--ok { color: #0F6E56; background: #E1F5EE; }
.ai-gov__st--err { color: #A32D2D; background: #FCEBEB; }
.ai-gov__calls { margin-left: 4px; font-size: 10px; font-style: normal; color: var(--text-muted); }
.ai-gov__pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.ai-gov__deny { padding: 60px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ===== 站点项目全景（projects 关联站点列点击） ===== */
.pano-link { color: var(--primary, #1A73E8); text-decoration: none; cursor: pointer; }
.pano-link:hover { text-decoration: underline; }
.pano-head-info { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 12px; color: var(--text-strong, #1f2937); }
.pano-type { font-size: 11px; padding: 1px 8px; border-radius: 9px; background: var(--secondary, #f1f3f4); color: var(--muted-foreground, #6b7280); }
.pano-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.pano-card { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 9px 12px; background: var(--card-bg, #fff); }
.pano-card-k { font-size: 11px; color: var(--muted-foreground, #6b7280); margin-bottom: 4px; }
.pano-card-v { font-size: 13px; color: var(--text-strong, #1f2937); }
.pano-timeline-title { font-size: 13px; font-weight: 600; margin: 6px 0 8px; color: var(--text-strong, #1f2937); }
.pano-phase-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pano-phase-stat { font-size: 12px; color: var(--muted-foreground, #6b7280); }
.pano-phase-filter { display: flex; gap: 4px; flex-wrap: wrap; }
.pano-phase-btn { border: 1px solid var(--border, #e5e7eb); background: var(--card-bg, #fff); color: var(--muted-foreground, #6b7280); border-radius: 12px; padding: 2px 9px; font-size: 12px; cursor: pointer; }
.pano-phase-btn.active { background: var(--secondary, #f3f4f6); color: var(--foreground, #1f2937); }
.pano-events { max-height: 160px; overflow: auto; border: 1px solid var(--border, #e5e7eb); border-radius: 6px; margin-bottom: 12px; }
.pano-event { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border, #e5e7eb); font-size: 12px; }
.pano-event:last-child { border-bottom: none; }
.pano-event-date { color: var(--muted-foreground, #6b7280); min-width: 82px; }
.pano-event-name { color: var(--foreground, #1f2937); flex: 1; }
.pano-event-note { color: var(--muted-foreground, #6b7280); }
.pano-table-wrap { max-height: 380px; overflow: auto; border: 1px solid var(--border, #e5e7eb); border-radius: 6px; }
.pano-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.pano-table th, .pano-table td { border-bottom: 1px solid var(--border, #e5e7eb); border-right: 1px solid var(--border, #e5e7eb); padding: 6px 8px; text-align: center; }
.pano-table thead th { position: sticky; top: 0; background: var(--secondary, #f5f6f8); z-index: 2; }
.pano-chain { margin-top: 3px; display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.pano-tag { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: var(--secondary, #f1f3f4); color: var(--muted-foreground, #6b7280); }

.trace-meta { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px 16px; padding: 12px 14px; background: var(--secondary, #f5f6f8); border-radius: 8px; margin-bottom: 16px; }
.trace-meta > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.trace-meta span { font-size: 11px; color: var(--muted-foreground, #6b7280); }
.trace-meta b { font-size: 13px; color: var(--foreground, #1f2937); font-weight: 500; word-break: break-all; }
.trace-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--foreground, #1f2937); }
.trace-list { position: relative; padding-left: 4px; max-height: 340px; overflow: auto; }
.trace-item { display: grid; grid-template-columns: 88px 16px 1fr; align-items: start; gap: 8px; min-height: 46px; }
.trace-date { font-size: 12px; color: var(--muted-foreground, #6b7280); padding-top: 2px; }
.trace-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--status-info, #1677ff); margin: 6px auto 0; position: relative; }
.trace-dot::after { content: ''; position: absolute; left: 3px; top: 12px; width: 1px; height: 34px; background: var(--border, #e5e7eb); }
.trace-item:last-child .trace-dot::after { display: none; }
.trace-dot.stop { background: var(--status-danger, #ff4d4f); }
.trace-content { font-size: 13px; color: var(--foreground, #1f2937); padding-bottom: 10px; }
.trace-content b { font-weight: 500; }
.trace-detail { font-size: 12px; color: var(--muted-foreground, #6b7280); margin-top: 3px; }
/* 项目弹窗：派生字段只读预览（与列表列一一对应，低饱和左色条提示） */
.pj-derived-preview { display: none; align-items: center; flex-wrap: wrap; gap: 4px 16px; padding: 8px 12px; margin-bottom: 12px; background: rgba(26,115,232,.05); border-left: 3px solid var(--primary, #1A73E8); border-radius: 4px; font-size: 12px; color: var(--muted-foreground, #6b7280); }
.pj-derived-preview b { font-weight: 600; color: var(--foreground, #1f2937); }
