/* ===================== 响应式：员工详情弹窗 ===================== */
@media (max-width: 900px) {
  .emp-modal-body { flex-direction: column; height: auto; max-height: 82vh; }
  .emp-nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border, #E5E7EB);
    padding: 8px 6px;
    -webkit-overflow-scrolling: touch;
  }
  .emp-nav-item {
    width: auto;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 8px 12px;
  }
  .emp-nav-item.active { border-left: none; border-bottom-color: var(--primary); }
  .emp-content { padding: 14px 12px 24px; }
  .emp-section { padding: 14px 12px 16px; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .attach-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .modal-lg { width: 100%; margin: 0; max-height: 100vh; border-radius: 0; }
  .emp-modal-body { max-height: 100vh; }
  .form-grid { grid-template-columns: 1fr; }
  .emp-section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .emp-section-actions { width: 100%; }
  .emp-section-actions .btn-sm { flex: 1 1 auto; justify-content: center; }
  .emp-quick-actions { margin: 0 0 8px; width: 100%; }
}

/* ===================== 部门管理页 ===================== */
.dept-page {
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 16px 20px 20px;
  overflow: auto;
  background: #F3F4F6;
}
#view-org-dept .toolbar-right .dept-date {
  display: none;
  /* 已隐藏：原"数据日期：今天"提示按用户要求移除 */
}
/* 列宽「自适应内容」：table-layout:auto + width:max-content
   —— 表格宽度 = 各列内容宽之和，覆盖 .data-table 的 width:100%（否则多余宽度会被灌进某些列，
      造成「部门全称」等列大片留白）；
   —— 每一列的宽度都由自身「表头 + 单元格」内容决定（nowrap），紧凑贴合；
   —— 内容超出容器时由 .table-wrap 的 overflow-x:auto 横向滚动。 */
.dept-table { table-layout: auto; width: max-content; min-width: max-content; max-width: none; }

.dept-table .company-name { font-weight: 700; color: var(--text-strong); font-size: 14px; }

/* 层级底色区分（参考职位管理），左侧色条标识层级。公司与一级拉开对比，一级用更浅更偏青的蓝 */
/* 选中态优先覆盖层级底色 */
.dept-table tr.dept-row.selected > td { background: var(--primary-soft) !important; }
.dept-table tr.dept-row.selected > td.col-name { box-shadow: inset 3px 0 0 var(--primary) !important; }
/* 部门简称列：表格已改成 table-layout:auto + width:max-content（见上方 .dept-table），
   每一列都按内容自适应，故此处不声明宽度；只负责「不换行 + 左侧冻结定位」。
   ⚠️ 勿给本列写 width:max-content —— 对表格单元格是无效兜底（实测惰性、删掉零变化）；
   真正决定该列够不够宽的是 .dept-name 里各 flex 项的**显式 width**
   （见下方 .tg-* 的 width 铁律：Chromium 算 max-content 只认 width 不认 flex-basis）。
   左侧并排冻结的第二列偏移（left）由 JS 依「部门ID」列实测宽写入 --dept-id-w，两列恒紧贴。 */
.dept-table .col-name { white-space: nowrap; text-align: left; position: sticky; left: 0; z-index: 2; background: #fff; }
/* 表头简称列：底色必须跟表头蓝底一致（勿写 #fff，否则与 color:#fff 组成白字白底） */
.dept-table thead th.col-name { background: var(--primary); z-index: 3; text-align: center; }
.dept-table tbody td.col-name { background: #fff; }
.dept-table th.col-name,
.dept-table td.col-name { padding-left: 4px; padding-right: 0; }
.dept-table .col-manager { padding-left: 0; }
/* 编制 / 在职 等数值列：同按内容自适应（去掉原固定 width:78px 的留白），仅居中 + 不换行 */
.dept-table .col-headcount,
.dept-table .col-plan,
.dept-table .col-occupy { text-align: center; white-space: nowrap; }
/* 部门树拖拽改上级 */
.dept-row[draggable="true"] { cursor: grab; }
.dept-row[draggable="true"]:active { cursor: grabbing; }
.dept-row.dept-dragging { opacity: 0.4; background: rgba(99,102,241,0.08); }
.dept-row.dept-drop-target,
.dept-row.dept-drop-target > .col-name {
  background: rgba(34,197,94,0.14);
  box-shadow: inset 3px 0 0 #22c55e;
}
.dept-row.dept-drop-target .dept-name { font-weight: 600; }

/* 引导线需要「出血」到单元格上下 padding 区，才能让纵向线在行与行之间不断线。
   该值须与「引导线所在列」——部门简称 `.col-name` 的竖向 padding（4px）对齐。
   注：数值列竖向为 7px 但引导线仅绘于简称列，故取 4px 即可让纵向线出血到该行
   padding 区、相邻行自然接续；此变量只影响引导线出血量，不改变行高。 */
#deptTable { --dept-cell-pad-y: 4px; }

.dept-name {
  display: flex;
  align-items: stretch;
  gap: 0;                     /* 引导线各列必须紧贴：有 gap 会让肘形横线接不上竖线 */
  font-weight: 400;
  padding-left: 0;
  min-width: max-content;     /* 兜底（实测惰性）：容器不因列窄而收缩，宁可溢出也不压字。
                                 注意：列宽是否够宽由下面 .tg-* 的显式 width 决定，不是靠这一行 */
}
.dept-name .dn,
.dept-name .dept-toggle,
.dept-name .dept-quota,
.dept-name .badge { align-self: center; }
/* 名称不截断：flex:0 0 auto + nowrap，名称占自身真实宽度、不收缩。
   简称列的列宽由「.tg-*/.dept-toggle/.dept-leaf 显式 width + .dn 文本宽」共同决定
   （Chromium 算 max-content 只认 width 不认 flex-basis，故 .tg-* 必须写 width，见其注释）。 */
.dept-name .dn { flex: 0 0 auto; white-space: nowrap; }
.dept-name.lvl-2 { color: #374151; font-weight: 400; }
.dept-name.lvl-3 { color: #4B5563; font-weight: 400; font-size: 12px; }
.dept-toggle {
  display: inline-flex;
  width: 10px;
  height: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #9CA3AF;
  font-size: 9px;
  flex-shrink: 0;
  margin-right: 5px;          /* 原 gap:3px 取消后由此保持图标与名称的间距 */
}
.dept-toggle::before { content: '▶'; }
.dept-toggle.expanded::before { content: '▼'; }
.dept-toggle.dept-loadable::before { content: '＋'; color: #1A73E8; font-weight: 700; }
.dept-toggle.dept-loading::before { content: '⟳'; color: #1A73E8; animation: dept-spin 0.8s linear infinite; }
@keyframes dept-spin { to { transform: rotate(360deg); } }
.dept-leaf {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  margin-right: 5px;
}

/* 部门树分支引导线（左侧纵向连接线 + 横向肘形连接，飞书式缩进）
   —— 纵向线：靠 align-self:stretch 撑满 .dept-name，再用上下负 margin 出血到
      单元格 padding 区，使线条高度 = 整行高，相邻行之间自然接续、不断线。
   —— 横向肘形：用绝对定位的 ::before/::after 画，统一落在「行的垂直中线」，
      ├ 竖线通到行底，└ 竖线只到中线，两者横线高度一致。 */
.tg-v, .tg-empty, .tg-elbow-mid, .tg-elbow-last {
  flex: 0 0 14px;
  /* ★★ 必须同时显式声明 width（铁律，勿删）：
     Chromium 计算表格单元格 / flex 容器的 max-content 贡献时**只认 width、不认 flex-basis**
     （.dept-toggle/.dept-leaf 一直有 width:10px 所以被正确计入，引导线只有 flex:0 0 14px
      → 每级缩进的 14px 被漏算，导致「部门简称」列被算窄 14px×缩进层数，
      长名称（如「外贸市场营销中心」）文字溢出列右侧、还会盖住右邻「级别」列）。
     加 width 后渲染尺寸不变（仍是 14px），只修正列宽计算。实测 163px → 190px，溢出归零。 */
  width: 14px;
  box-sizing: border-box;
  align-self: stretch;
  position: relative;
  margin-top: calc(var(--dept-cell-pad-y, 7px) * -1);
  margin-bottom: calc(var(--dept-cell-pad-y, 7px) * -1);
}
/* 祖先级纵向连接线（该祖先还有后续兄弟时才有线） */
.tg-v { border-left: 1px solid #d0d5dd; }
/* 该祖先已是末子：此列不画线，仅占位保持缩进对齐 */
.tg-empty { border-left: 0; }
/* ├：竖线贯穿整行 + 横线在行垂直中线 */
.tg-elbow-mid { border-left: 1px solid #d0d5dd; }
.tg-elbow-mid::after {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 100%; height: 1px; background: #d0d5dd;
}
/* └：竖线仅上半段（到中线为止）+ 横线在行垂直中线（与 ├ 同高） */
.tg-elbow-last { border-left: 0; }
.tg-elbow-last::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 50%;
  width: 1px; background: #d0d5dd;
}
.tg-elbow-last::after {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 100%; height: 1px; background: #d0d5dd;
}
.dept-empty {
  text-align: center;
  padding: 48px;
  color: var(--text-faint, #9AA0A6);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}


/* 职级/职类编码胶囊（按族着色，复用 .jf-code） */
.jf-code { display: inline-block; padding: 1px 6px; border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.jf-code.ch-T { background: #EDE9FE; color: #6D28D9; }
.jf-code.ch-P { background: #E0F2FE; color: #0369A1; }
.jf-code.ch-E { background: #ECFDF5; color: #047857; }
.jf-code.ch-S { background: #FEF3C7; color: #B45309; }
.jf-code.ch-O { background: #E0F7FA; color: #0E7490; }
.jf-code.ch-F { background: #FCE7F3; color: #BE185D; }
.jf-code.ch-M { background: #DBEAFE; color: #1E40AF; }

/* 全局职级档 B1-B12 徽章 / 单元格 / 管理行高亮（P1b：职位体系全部板块统一 band 轴） */
.jf-band-badge { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 10px; background: #E8F0FE; color: #1A56C4; font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.jf-band-cell { font-weight: 600; color: #1A56C4; white-space: nowrap; }
#jfMatrixWrap table.jf-matrix tbody tr.jf-row-mgmt > td.row-head { background: #F1F5FF; color: #1E40AF; }
#jfMatrixWrap table.jf-matrix tbody tr.jf-row-mgmt > td { background: rgba(241,245,255,.5); }
.cmp-band { margin-left: 6px; padding: 0 6px; border-radius: 10px; background: #E8F0FE; color: #1A56C4; font-size: 11px; font-weight: 700; white-space: nowrap; }

/* 薪酬带宽 / 证书 / 任职资格 */
.jf-band { white-space: nowrap; color: var(--text-secondary, #3c4043); font-size: 11px; }
.jf-cert { display: inline-block; padding: 1px 6px; border-radius: 4px; background: #F1F3F4; color: #5f6368; font-size: 11px; }



@media (max-width: 760px) {
  .dept-toolbar { flex-direction: column; align-items: flex-start; }
  .dept-search input { width: 100%; }

}

/* ===================== 部门弹窗与选择器 ===================== */
.modal-lg { max-width: 720px; }
/* 2026-10-31：全局分节统一为考勤配置 .att2-fsec 口径 ——
   框起来（1px 边框 + 8px 圆角 + 卡片底）+ 编号徽标标题（18px 方块 + 13px/600）。
   覆盖所有还在用旧「灰底 + 左色条」的 form-section（职位/职级等）。 */
.form-section { margin-bottom: 12px; }
.form-grid > .form-section.full { grid-column: 1 / -1; }
.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--card-bg);
  padding: 12px 16px 16px;
}
.form-section-title {
  display: flex; align-items: center; gap: 8px;
  background: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  border-left: none;
  margin-bottom: 12px;
}
.form-section-title .sec-n {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--primary-soft, #E8F0FE); color: var(--primary);
  font-size: 10.5px; font-weight: 700;
}
.form-section-title .sec-sub { font-size: 11.5px; font-weight: 400; color: var(--text-faint); }
.form-section-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 16px;
}
.form-section-body label.full { grid-column: 1 / -1; }

.form-section-body div.full { grid-column: 1 / -1; }
.required { color: #DC2626; margin-left: 2px; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.toggle-row input[type="checkbox"] {
  appearance: none;
  width: 40px;
  height: 22px;
  background: #D1D5DB;
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background .2s;
}
.toggle-row input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.toggle-row input[type="checkbox"]:checked { background: var(--primary); }
.toggle-row input[type="checkbox"]:checked::after { transform: translateX(18px); }

.dept-parent-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
}
.dept-parent-wrap input {
  flex: 1;
  background: #fff;
  cursor: pointer;
}
.dept-parent-wrap .btn { white-space: nowrap; }

.emp-picker { position: relative; }
.emp-picker input { width: 100%; }
.emp-picker-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  z-index: 100;
  margin: 4px 0 0;
  padding: 4px 0;
  list-style: none;
}
.emp-picker-list li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.emp-picker-list li:hover { background: #F3F4F6; }
.emp-picker-list li small { color: #9CA3AF; }

.dept-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; grid-column: 1 / -1; margin-bottom: 4px; }
.dcard { background: #F8FAFC; border: 1px solid #E5E7EB; border-radius: 10px; padding: 14px 12px; text-align: center; }
.dcard-num { font-size: 22px; font-weight: 700; color: #111827; }
.dcard-label { font-size: 12px; color: #9CA3AF; margin-top: 4px; }
.dept-timeline { padding: 10px 18px 14px; }
.dept-timeline-empty { color: var(--text-faint); padding: 16px 0; font-size: 13px; text-align: center; }
#deptQuotaSummaryCard > div[style*="font-size:12px"] { padding: 0 18px 14px; color: var(--text-faint); font-size: 12px; line-height: 1.5; }

/* 子部门表格卡片内间距 */
.dept-detail-pane .card:nth-of-type(4) .table-wrap { border-radius: 0 0 13px 13px; }
.dept-detail-pane .card:nth-of-type(5) .dept-timeline { border-radius: 0 0 13px 13px; }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ''; position: absolute; left: 14px; top: 4px; bottom: 4px; width: 2px; background: #E5E7EB; }
.tl-item { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.tl-icon { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #F1F5F9; border: 1px solid #E5E7EB; display: flex; align-items: center; justify-content: center; font-size: 15px; z-index: 1; }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: baseline; gap: 10px; }
.tl-type { font-weight: 600; color: #111827; font-size: 13px; }
.tl-time { font-size: 12px; color: #9CA3AF; }
.tl-summary { font-size: 13px; color: #374151; margin-top: 2px; }
.tl-op { font-size: 12px; color: #9CA3AF; margin-top: 2px; }
.tl-diffs { margin-top: 6px; background: #F8FAFC; border: 1px solid #E5E7EB; border-radius: 8px; padding: 6px 8px; }
.tl-diff-row { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 0; flex-wrap: wrap; }
.tl-k { color: #9CA3AF; }
.tl-b { color: #DC2626; text-decoration: line-through; }
.tl-arrow { color: #9CA3AF; }
.tl-a { color: #16A34A; font-weight: 600; }
.btn-ghost { background: #fff; border: 1px solid #E5E7EB; color: #374151; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 13px; }
.btn-ghost:hover { background: #F8FAFC; }
.btn-ghost.btn-sm { padding: 5px 12px; font-size: 13px; }
.link-danger { color: #DC2626; }

/* 上级部门选择弹窗 */
.dept-picker-search { margin-bottom: 8px; }
.dept-picker-search input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 6px;
  font-size: 12px;
}
.dept-picker-tree {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 6px;
  padding: 6px;
}
.dept-picker-list { list-style: none; margin: 0; padding: 0 0 0 12px; }
.dept-picker-item { position: relative; margin: 0; }
.dept-picker-row {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 20px;            /* 固定行高：树形连接线的定位（50% 中线）依赖它，勿随意改动 */
  padding: 0 6px;
  border-radius: 3px;
  transition: background .15s;
  position: relative;
}
/* 悬停/选中高亮改为蓝色调 */
.dept-picker-row:hover { background: #E8F0FE; }
.dept-picker-row:hover .dept-picker-name { color: #1A73E8; }
.dept-picker-toggle,
.dept-picker-spacer {
  width: 14px;
  text-align: center;
  color: #9CA3AF;
  cursor: pointer;
  font-size: 10px;
  flex-shrink: 0;
}
.dept-picker-name { flex: 1; font-size: 12px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 选择器内按钮：压到 18px，避免 .btn 的 30px 高度把行撑高 */
.dept-picker-select {
  opacity: 0;
  transition: opacity .15s;
  flex-shrink: 0;
  height: 18px;
  padding: 0 7px;
  font-size: 11px;
  line-height: 16px;
  border-radius: 4px;
}
.dept-picker-row:hover .dept-picker-select { opacity: 1; }
/* 失效部门（已撤销 / 已冻结 / 筹建中）：只作为层级路径或当前值回显保留，不可选 */
.dept-picker-item--inactive > .dept-picker-row { cursor: default; }
.dept-picker-item--inactive .dept-picker-name { color: #9CA3AF; }
.dept-picker-item--inactive > .dept-picker-row:hover { background: transparent; }
.dept-picker-item--inactive > .dept-picker-row:hover .dept-picker-name { color: #9CA3AF; }
/* rootPickable:false 的场景（如「所属事业部(BG)」）：公司根可见但不可选 */
.dept-picker-item--nolink > .dept-picker-row { cursor: default; }
.dept-picker-badge {
  flex-shrink: 0;
  margin-left: 2px;
  padding: 0 6px;
  height: 15px;
  line-height: 15px;
  border-radius: 8px;
  background: #F3F4F6;
  color: #9CA3AF;
  font-size: 10px;
  white-space: nowrap;
}

/* ── 树形连接线（左侧横竖线）── */
/* 顶层列表：根节点也带短横线 */
.dept-picker-list > .dept-picker-item > .dept-picker-row::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: #D1D5DB;
  pointer-events: none;
}
/* 嵌套子列表：左缩进 + 竖线 */
.dept-picker-list.nested {
  margin-left: 18px;
  padding-left: 13px;
  border-left: 1px solid #D1D5DB;
}
/* 横向连接线：从竖线到行内容 */
.dept-picker-list.nested > .dept-picker-item > .dept-picker-row::before {
  content: '';
  position: absolute;
  left: -13px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: #D1D5DB;
  pointer-events: none;
}
/* 最后一个子项：只遮住本行中线以下的竖线，形成 └ 收尾
   ⚠ 必须从行中线（行高 20px → 10px）开始、且只覆盖竖线那 2px 宽度，
   否则会连本行的横向短线一起盖掉（历史 bug：末项没有横线） */
.dept-picker-list.nested > .dept-picker-item:last-child::after {
  content: '';
  position: absolute;
  left: -15px;
  top: 10px;
  bottom: 0;
  width: 2px;
  background: var(--card-bg, #fff);   /* 跟随日/夜间模式，避免夜间出现白色竖条 */
  pointer-events: none;
}

.dept-picker-children { /* 缩进由 .nested 的 margin-left 控制 */ }
.dept-picker-loading,
.dept-picker-empty { text-align: center; padding: 24px; color: #9CA3AF; font-size: 12px; }

@media (max-width: 760px) {
  .modal-lg { max-width: 96vw; }
  .form-section-body { grid-template-columns: 1fr; }
  .dept-picker-select { opacity: 1; }
}

/* ===================== 编制管理 ===================== */
.year-select { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.year-select select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; }

/* 编制管理页工具栏：搜索框不撑满 */
#view-org-staffing .toolbar-left #stfDeptFilter { max-width: 280px; flex: 0 1 auto; }

/* 编制管理页：高度自适应内容，不撑满视口，但保持自身边界不溢出 */
#view-org-staffing {
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
}
#view-org-staffing > .card {
  flex: none !important;
  overflow: auto !important;
  max-height: 60vh;
}

/* 职务管理：表单卡片不拉伸，列表卡片拉伸 */
#view-org-title > .card:first-child {
  flex: 0 0 auto !important;
}
#view-org-title > .card:last-child {
  flex: 1 1 auto !important;
  min-height: 0;
}
/* 职务管理表单：标签与控件水平排列，保存按钮与备注同行 */
#view-org-title .form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 16px;
  align-items: end;
}
#view-org-title .form-grid label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 0;
}
#view-org-title .form-grid label .field-label {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
#view-org-title .form-grid label input,
#view-org-title .form-grid label select {
  width: 100%;
  box-sizing: border-box;
}
#view-org-title .form-grid label .field-input {
  display: flex;
  align-items: center;
  gap: 8px;
}
#view-org-title .form-grid label .field-input input {
  flex: 1 1 auto;
  min-width: 0;
}
#view-org-title .form-grid label .field-input button {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 编制管理 Tab 栏（对齐培训管理 .recruit-pagetabs/.rpt 下划线式样式） */
#view-org-staffing > .tabs.subtabs {
  padding: 0;
  border-bottom: 1px solid var(--border, #eee);
  margin-bottom: 4px;
  gap: 4px;
  flex-wrap: wrap;
}
#view-org-staffing > .tabs.subtabs .subtab {
  padding: 13px 18px 6px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-faint);
  background: none;
  border-radius: 0;
  border: none;
  border-bottom: 2px solid transparent;
  user-select: none;
  transition: color .15s, border-color .15s;
}
#view-org-staffing > .tabs.subtabs .subtab:hover {
  color: var(--primary);
  background: none;
}
#view-org-staffing > .tabs.subtabs .subtab.active {
  color: var(--primary);
  background: none;
  border-bottom-color: var(--primary);
  font-weight: 600;
  box-shadow: none;
}

/* 汇总卡片：6 张 → 3 列 2 行，紧凑排列 */
.quota-summary { margin: 0 0 4px 0; }
.quota-summary:empty { display: none; }
/* 招聘管理：统计行与上方工具栏、下方列表的间距收紧 */
#view-org-recruit .toolbar { margin-bottom: 2px; }
#recruitSummary { margin: 0 0 2px 0; }
#recruitSummary .qs-cards { margin: 0; }
/* 内联汇总行（一行显示，|| 分隔） */
.qs-inline { display: flex; align-items: center; gap: 0; flex-wrap: wrap; padding: 1px 0; font-size: 13px; }
.qs-item { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.qs-item .qs-label { color: var(--text-muted, #80868B); font-size: 12.5px; }
.qs-item .qs-num { font-weight: 700; font-size: 15px; color: var(--text-strong, #16181A); }
.qs-sep { color: var(--border, #D1D5DB); margin: 0 12px; font-size: 12px; user-select: none; }
.qs-value.over { color: var(--danger, #DC2626); }
.qs-value.warn { color: #D97706; }
.qs-card.qs-warn { background: linear-gradient(135deg, #fff8f0 0%, #fff 100%); border-color: #FED7AA; }
.qs-card.qs-rate { background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%); border-color: #BFDBFE; }
/* 待入职中转区汇总卡片（基础样式，覆盖 qs-good/qs-bad 变体） */
.qs-card {
  background: var(--card-bg, #fff); border: 1px solid var(--border, #E5E7EB);
  border-radius: 10px; padding: 10px 12px; text-align: center; min-width: 0;
}
.qs-card .qs-num { font-size: 20px; font-weight: 700; color: var(--text-strong, #16181A); line-height: 1.2; }
.qs-card .qs-label { font-size: 12px; color: var(--text-muted, #80868B); margin-top: 2px; }
.qs-card.qs-good { background: linear-gradient(135deg, #eafaf0 0%, #fff 100%); border-color: #BBF7D0; }
.qs-card.qs-good .qs-num { color: #1a9e57; }
.qs-card.qs-bad { background: linear-gradient(135deg, #fdeeee 0%, #fff 100%); border-color: #FBCACA; }
.qs-card.qs-bad .qs-num { color: #DC2626; }
/* 待入职管理统一数据表顶部统计卡容器 */
.qs-cards { display: flex; flex-wrap: wrap; gap: 12px; margin: 2px 0 10px; }
.qs-cards .qs-card { flex: 1 1 0; min-width: 120px; cursor: default; }
/* 招聘需求统计：卡片内数据与文字同行 */
.qs-inline-card { display: inline-flex !important; align-items: center; justify-content: flex-start; gap: 8px; text-align: left !important; padding: 3px 14px !important; flex: 0 0 auto !important; min-width: 0 !important; width: auto !important; border-radius: 4px !important; }
.qs-inline-card .qs-num { font-size: 16px; }
.qs-inline-card .qs-label { margin-top: 0 !important; white-space: nowrap; font-size: 12px; }
.ph-att-list { display: flex; flex-direction: column; gap: 6px; }
.ph-att-item {
  font-size: 13px; color: var(--text); background: var(--bg, #F7F8FA);
  border: 1px solid var(--border, #E5E7EB); border-radius: 8px; padding: 7px 10px;
}
.quota-matrix-table th, .quota-matrix-table td { font-size: 13px; text-align: center; }
.quota-matrix-table th:first-child, .quota-matrix-table td:first-child { text-align: left; }
.quota-matrix-table td.col-op .link { margin-right: 10px; }
.rate-bar { display: inline-block; width: 70px; height: 8px; background: #EEF1F5; border-radius: 6px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.rate-fill { height: 100%; border-radius: 6px; }
.rate-fill.normal { background: #1A73E8; }
.rate-fill.warn { background: #F59E0B; }
.rate-fill.over { background: #DC2626; }
.rate-txt { font-size: 12px; color: var(--text-muted); }
.rate-txt.warn { color: #D97706; }
.rate-txt.over { color: var(--danger, #DC2626); font-weight: 600; }
.rate-fill.danger { background: #FA8C16; }
.rate-txt.danger { color: #FA8C16; }
.qs-value.danger { color: #FA8C16; }
.qs-num.danger { color: #FA8C16; }
.stf-deptcap { font-size: 11px; margin-top: 2px; color: var(--text-muted); }
.stf-deptcap.danger { color: #FA8C16; }
.stf-deptcap.over { color: var(--danger, #DC2626); font-weight: 600; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; line-height: 1.6; vertical-align: middle; margin-left: 4px; }
.tag-strong { background: #FEE2E2; color: #B91C1C; }
.tag-weak { background: #E0F2FE; color: #0369A1; }
.stf-card-foot { margin-top: 8px; display: flex; justify-content: flex-end; }
.stf-cap-btn { font-size: 12px; line-height: 1; padding: 4px 10px; border: 1px solid #E5E7EB; background: #fff; color: #1A73E8; border-radius: 4px; cursor: pointer; }
.stf-cap-btn:hover { background: #1A73E8; color: #fff; border-color: #1A73E8; }
.stf-cap-tag { display: inline-block; margin-left: 6px; font-size: 11px; color: var(--text-muted); background: #F2F4F7; border: 1px solid #E5E7EB; border-radius: 10px; padding: 1px 8px; vertical-align: middle; }
.stf-cap-tag.over { color: var(--danger, #DC2626); background: #FFF1F0; border-color: #FFCCC7; font-weight: 600; }
.stf-dept-over > td.col-name { background: #FFF5F5; }
.form-grid label.chk { display: flex; align-items: center; gap: 6px; }
.badge { display: inline-block; padding: 1px 6px; border-radius: 10px; font-size: 12px; line-height: 1.25; }
.badge-ok { background: #E7F4EC; color: #1A7F45; }
.badge-warn { background: #FEF3C7; color: #B45309; }
.badge-off { background: #F3F4F6; color: #6B7280; }
.badge-muted { background: #EEF1F5; color: #6B7280; }
.badge-danger { background: rgba(234,67,53,.08); color: #C53030; font-weight: 400; }
.badge-danger::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #EA4335; margin-right: 5px; vertical-align: middle; }
.badge-info { background: #E7F0FE; color: #1A56C4; }

/* 同步到物理表（谨慎模式） */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace; font-size: 12.5px; }
.sync-warn { background: #FFF4F4; border: 1px solid #F3C2C2; color: #B42318; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.sync-warn code { background: rgba(180,35,24,.08); padding: 1px 6px; border-radius: 5px; font-weight: 600; }
.sync-empty { background: #EAF7EE; border: 1px solid #BFE3C9; color: #1A7F45; padding: 14px; border-radius: 10px; font-size: 13px; }
.sync-tip { font-size: 13px; color: var(--text-faint, #6B7280); margin-bottom: 10px; }
.sync-info { background: #EAF2FE; border: 1px solid #C9DCF7; color: #1A56C4; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.sync-info code, .sync-info b { font-weight: 600; }
.sync-sql { color: #4B5563; word-break: break-all; font-size: 12px; max-width: 320px; }
.sync-bk { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 12px 14px; background: #FFF9E6; border: 1px solid #F0D89A; border-radius: 10px; font-size: 13px; color: #8A5A00; cursor: pointer; }
.sync-bk input { width: 16px; height: 16px; }
.sync-orphan { margin-top: 12px; padding: 12px 14px; background: #F7F8FA; border: 1px dashed #D5D9E0; border-radius: 10px; font-size: 12.5px; color: #6B7280; }
.sync-orphan-h { margin-bottom: 8px; color: #8A5A00; }
.sync-orphan-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sync-orphan-item { background: #fff; border: 1px solid #E5E7EB; border-radius: 6px; padding: 2px 8px; font-size: 12px; }
.sync-orphan-item code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #374151; }
.sync-orphan-item em { color: #9CA3AF; font-style: normal; }
.data-table td.ctr { text-align: center; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; filter: none; box-shadow: none; }
.btn-ghost:disabled { opacity: .5; cursor: progress; }

.quota-matrix-table td.neg { color: var(--danger, #DC2626); font-weight: 600; }
@media (max-width: 1200px) {
  .qs-inline { gap: 4px; padding: 2px 0; }
  .qs-sep { margin: 0 6px; }
}

/* 编制调整单 / 调整日志弹窗：更宽，避免横向滚动 */
#quotaAdjustListModal .modal {
  width: min(1200px, 96vw);
  max-width: none;
}
#quotaAdjustListModal .modal-body { padding: 0; display: flex; flex-direction: column; }

/* 调整日志搜索栏 */
.qa-list-toolbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
}
.qa-list-toolbar .chk-inline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text); cursor: pointer;
  user-select: none;
}
.qa-list-toolbar .chk-inline input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1px solid var(--border, #D1D5DB); border-radius: 4px;
  background: #fff; cursor: pointer; position: relative;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.qa-list-toolbar .chk-inline input[type="checkbox"]:checked {
  background: var(--primary); border-color: var(--primary);
}
.qa-list-toolbar .chk-inline input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px; border: solid #fff;
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.qa-list-toolbar .chk-inline input[type="checkbox"]:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,.10);
}

/* 调整日志搜索栏：多条件一行排列 */
.qa-search-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.qa-kw-search { min-width: 240px; }
.qa-search-row .filter-select { min-width: 120px; }
/* 日期筛选框：外层仅作为定高/宽度/布局容器（完全透明、无边框），
   可见边框与背景全部交给内层 input 自身，避免“外层框 + 内层框”的重叠感，
   同时不隐藏原生日历指示器，保留点击弹出日期选择器的功能。 */
.filter-search.filter-date {
  position: relative;
  display: flex;
  align-items: center;
  width: 150px;
  height: var(--ctrl-h);
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.filter-search.filter-date > input[type="date"],
.filter-search.filter-date > input[type="month"],
.filter-search.filter-date > input[type="datetime-local"] {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 30px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  line-height: var(--ctrl-h);
  box-sizing: border-box;
  outline: none;
  /* 恢复为原生日期控件外观，确保点击右侧日历图标能弹出日期选择器 */
  -webkit-appearance: auto;
  appearance: auto;
}
.filter-search.filter-date > input[type="date"]:focus,
.filter-search.filter-date > input[type="month"]:focus,
.filter-search.filter-date > input[type="datetime-local"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}
/* 保持原生日历图标正常显示与点击 */
.filter-search.filter-date > input[type="date"]::-webkit-calendar-picker-indicator,
.filter-search.filter-date > input[type="month"]::-webkit-calendar-picker-indicator,
.filter-search.filter-date > input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
}
.filter-search.filter-date > input[type="date"]::-webkit-inner-spin-button,
.filter-search.filter-date > input[type="month"]::-webkit-inner-spin-button,
.filter-search.filter-date > input[type="datetime-local"]::-webkit-inner-spin-button { display: none; }
.filter-search.filter-date > input[type="date"]::-webkit-datetime-edit,
.filter-search.filter-date > input[type="month"]::-webkit-datetime-edit,
.filter-search.filter-date > input[type="datetime-local"]::-webkit-datetime-edit,
.filter-search.filter-date > input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.filter-search.filter-date > input[type="month"]::-webkit-datetime-edit-fields-wrapper,
.filter-search.filter-date > input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
  margin: 0;
  background: transparent;
}
.filter-input-date {
  padding: 7px 10px; height: 36px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; background: #fff; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.filter-input-date:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.10); }
.date-sep { color: var(--text-faint); }
.btn-list-reset {
  height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--text-muted); font-size: 13px;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.btn-list-reset:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft, #F5F9FF); }

/* 调整日志表格 */
.qa-list-wrap {
  flex: 1; min-height: 0;
  overflow: auto;
  padding: 0 20px 20px;
}
.qa-list-table { width: 100%; table-layout: fixed; }
.qa-list-table th,
.qa-list-table td {
  font-size: 13px; padding: 12px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qa-list-table th {
  background: #fff; color: var(--text-muted); font-weight: 600;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1;
}
.qa-list-table tbody tr:hover { background: #F8FAFC; }
.qa-list-table td { border-bottom: 1px solid #F1F5F9; }
.qa-col-no    { width: 155px; }
.qa-col-dept  { width: 170px; }
.qa-col-pos   { width: auto; }
.qa-col-type  { width: 70px; }
.qa-col-change{ width: 115px; }
.qa-col-status{ width: 80px; }
.qa-col-action{ width: 90px; text-align: center; }
.qa-list-table td.qa-col-action .link { margin-right: 8px; }
.qa-list-table td.qa-col-action .link:last-child { margin-right: 0; }

/* ===================== 职位管理 ===================== */
.filter-select {
  padding: 7px 28px 7px 10px; height: 36px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px;
  color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }

/* 模糊搜索框（部门/职位） */
.fuzzy-search { position: relative; min-width: 240px; }
#view-org-job .fuzzy-search { min-width: 280px; }
#view-org-job .card { padding: 6px 10px !important; }
#view-org-job .quota-summary { margin: 2px 0 6px !important; }
#view-org-job .pt-row { padding: 4px 10px !important; font-size: 12px !important; }
#view-org-job .pt-colheader { padding: 4px 10px !important; font-size: 12px !important; }
#view-org-job .pt-children { padding-left: 10px !important; }
#view-org-job .pt-arrow { width: 12px !important; font-size: 9px !important; }
#view-org-job .pt-icon { width: 14px !important; height: 14px !important; }
.fuzzy-search .filter-input { padding-left: 32px; } /* 给左侧搜索图标留出空间 */
.filter-input {
  width: 100%; padding: 7px 30px 7px 10px; height: 36px;
  border: 1px solid var(--border, #E5E9F0); border-radius: 8px;
  font-size: 13px; background: #fff; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.filter-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.10); }

/* 可搜索下拉框（职位族/序列/职级） */
.pos-combo { position: relative; min-width: 130px; }
.pos-combo .combo-input {
  width: 100%; height: 36px; padding: 7px 28px 7px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px;
  color: var(--text); outline: none;
  appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.pos-combo .combo-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.combo-input { padding-right: 26px; cursor: text; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
.combo-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 100%; width: max-content; max-width: 320px;
  z-index: 200; max-height: 260px; overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff; border: 1px solid var(--border, #E5E9F0);
  border-radius: var(--radius, 8px); box-shadow: var(--shadow-hover, 0 2px 6px rgba(60,64,67,.12));
  list-style: none; margin: 0; padding: 4px;
}
.combo-dropdown.show { display: block; }
/* 选项：紧凑行高 + 圆角块；已选项＝浅蓝加粗打勾，悬停＝品牌蓝实底 */
.combo-dropdown li {
  position: relative; padding: 7px 26px 7px 10px;
  font-size: 13px; line-height: 1.3; border-radius: 6px; cursor: pointer;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .12s, color .12s;
}
.combo-dropdown li.active { background: var(--primary-soft, #E8F0FE); color: var(--primary); font-weight: 600; }
.combo-dropdown li.active::after {
  content: '✓'; position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-size: 12px; line-height: 1; font-weight: 400;
}
.combo-dropdown li:hover { background: var(--primary); color: #fff; }
.combo-dropdown li.empty-hint {
  color: var(--text-faint, #80868B); cursor: default; font-style: normal;
  text-align: center; padding: 12px 10px;
}
.filter-input::placeholder { color: var(--text-faint, #B5BCC7); }
.fuzzy-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  z-index: 200; max-height: 260px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border, #E5E9F0);
  border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.08);
  list-style: none; margin: 0; padding: 4px 0;
}
.fuzzy-dropdown li {
  padding: 8px 14px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background .12s; white-space: nowrap;
}
.fuzzy-dropdown li:hover,
.fuzzy-dropdown li.active { background: #F5F9FF; color: var(--primary); }
.fuzzy-dropdown .fd-type {
  font-size: 11px; padding: 1px 6px; border-radius: 4px;
  background: #F0F2F5; color: var(--text-muted, #8892A0);
  flex-shrink: 0; font-weight: 400;
}
.fuzzy-dropdown .fd-name { overflow: hidden; text-overflow: ellipsis; }
.fuzzy-dropdown .fd-path { font-size: 11.5px; color: var(--text-faint, #B5BCC7); margin-left: auto; flex-shrink: 0; }
.fuzzy-dropdown .fd-empty { justify-content: center; color: var(--text-faint, #B5BCC7); cursor: default; font-size: 12.5px; }
.chk-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.pos-code { font-size: 11px; color: var(--text-faint); }
.neg { color: var(--danger, #DC2626); font-weight: 600; }
.muted { color: var(--text-faint); font-size: 13px; }
.position-table th, .position-table td { text-align: center; }
.position-table td { font-size: 13px; }
.position-table td.col-code { font-size: 12px; color: var(--text-faint); white-space: nowrap; }

.cat-tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.cat-tag.cat-m { background: #E0E7FF; color: #1E40AF; }
.cat-tag.cat-t { background: #D1FAE5; color: #059669; }
.cat-tag.cat-p { background: #EDE9FE; color: #7C3AED; }
.cat-tag.cat-s { background: #FEF3C7; color: #B45309; }
.cat-tag.cat-w { background: #CFFAFE; color: #0E7490; }
.cat-tag.cat-x { background: #F1F5F9; color: #64748B; }
.cat-tag.cat-cluster { background: #FDF4FF; color: #A21CAF; font-size: 11px; }

.subtabs .subtab {
  padding: 8px 16px;
  border-radius: 0 !important;
  border: none !important;
  background: transparent !important;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.subtabs .subtab:hover {
  color: var(--text);
  background: transparent !important;
}
.subtabs .subtab.active {
  color: var(--primary) !important;
  font-weight: 600;
  border-bottom: 2px solid var(--primary) !important;
  background: transparent !important;
}
.cfg-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.cfg-add input { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.cfg-add input[type=text] { min-width: 120px; }
.cfg-add select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; color: inherit; min-width: 120px; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M1 3l4 4 4-4' fill='none' stroke='%23909399' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 8px center; padding-right: 24px; }
.cfg-add select:focus { outline: none; }


/* 编制管理 · 特批流程状态徽标 */
.stf-badge { display:inline-block; padding:2px 9px; border-radius:10px; font-size:12px; line-height:1.6; font-weight:400; }
.stf-badge.st0 { background:#f0f0f0; color:#909399; }
.stf-badge.st1 { background:#e8f3ff; color:#2f7de0; }
.stf-badge.st2 { background:#e8f8ec; color:#1f9d4d; }
.stf-badge.st3 { background:#fdeaea; color:#e05252; }
.stf-badge.st4 { background:#f4f4f5; color:#909399; }
.stf-badge.st5 { background:#e6f0ff; color:#1a5cbf; }

/* 编制矩阵表格 */
#stfTable { border-collapse: separate; border-spacing: 0; }
#stfTable thead th {
  background: var(--card-bg, #fff);
  font-weight: 600;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 2;
}
tr.stf-dept > td {
  background: linear-gradient(90deg, #f0f4ff 0%, #fafbff 100%);
  font-weight: 600;
  font-size: 13px;
}
tr.stf-dept > td .dn { color: var(--primary); }
tr.stf-dept > td.col-name { cursor: pointer; }
tr.stf-dept:hover > td { background: linear-gradient(90deg, #eaf0ff 0%, #f4f7ff 100%); }
tr.stf-plan:hover > td { background: rgba(26,115,232,.03); }
tr.stf-plan > td { transition: background .12s; }
/* 编制矩阵部门树折叠箭头（复用部门树的 ▶/▼ 视觉） */
.stf-tree-toggle {
  position: relative;
  display: inline-flex; width: 11px; height: 11px; align-items: center; justify-content: center;
  cursor: pointer; color: #94A3B8; font-size: 9px; flex-shrink: 0; margin-right: 6px; vertical-align: middle;
}
.stf-tree-toggle::before { content: '▶'; }
.stf-tree-toggle.expanded::before { content: '▼'; }
/* 扩大箭头点击热区（11px→约15×19px），仅向左/上下扩展、不向右碰部门名，避免点偏或误触名字 */
.stf-tree-toggle::after { content: ''; position: absolute; left: -4px; top: -4px; bottom: -4px; right: 0; }
.stf-tree-toggle:hover { color: var(--primary, #1A73E8); }
/* 收起的部门行淡化岗位数提示，表示子行被折叠 */
tr.stf-dept.folded > td .muted { opacity: .7; }
/* 岗位行树形引导线——完全复用部门树 .dept-name + .tg-* 机制：
   flex 容器 align-items:stretch + 引导线负 margin 出血到单元格 padding（4px），
   竖线高度=整行高，相邻行自然接续、不出现断线；单个肘形避免双竖线。 */
#stfTable { --dept-cell-pad-y: 4px; }
.stf-node-name { display: flex; align-items: stretch; gap: 0; min-width: max-content; }
.stf-node-name > .tg-elbow-mid, .stf-node-name > .tg-elbow-last { flex: 0 0 14px; width: 14px; }
.stf-node-name > .dn { align-self: center; flex: 0 0 auto; white-space: nowrap; }
.stf-node-name > .muted { align-self: center; margin-left: 5px; }
/* 部门行是跨 3 列的树根：左对齐 + 伪元素占位 60px（=部门列宽）缩进到「岗位」列起点，
   使 ▶ 箭头与岗位行的 ├/└ 竖线同一垂直线、部门名与岗位名左对齐，形成连贯树形。
   注意：不能用 padding-left，会被 #app .data-table td 的 padding !important 覆盖。 */
tr.stf-dept > td.col-name { text-align: left; }
/* 部门行与岗位行统一为「空部门列 td + 岗位列 td(colspan=2)」结构，引导线都在岗位列 td 内，
   两者内容起点相同 → 直属岗位与二级部门肘形落在同一竖线，隶属关系一眼可辨。
   ⚠️ 不再用伪元素硬编码占位（旧 68px 假设基于部门列宽 60px，加日期列后部门列被压到 43px，
   导致部门行引导线 x=292 与岗位行 x=267 错开 25px，二级部门看着不同级、看不出挂在父部门下）。 */
tr.stf-dept .stf-tree-toggle { margin-right: 3px; align-self: center; }
/* 子部门行(有引导线)比顶层部门略降一级视觉权重：部门名不加粗差异，仅箭头保留可点 */
tr.stf-dept > td.col-name .stf-dept-node > .dn { align-self: center; }
tr.stf-dept > td.col-name .stf-dept-node > .muted,
tr.stf-dept > td.col-name .stf-dept-node > .stf-cap-tag,
tr.stf-dept > td.col-name .stf-dept-node > .tag { align-self: center; }
/* 折叠隐藏的岗位行 */
tr.stf-plan.stf-fold-hidden { display: none; }
/* "全部收起/展开"按钮工具栏空间紧，禁止文字换行 */
#stfFoldAllBtn { white-space: nowrap; }
/* 编制矩阵日期列（开始/结束/创建/修改）：居中、紧凑、不换行，避免撑宽表格 */
#stfTable td.stf-date { text-align: center; white-space: nowrap; font-size: 11px; color: var(--text-muted, #64748b); font-variant-numeric: tabular-nums; }

/* 特批流程表格 */
#stfApprTable thead th { background: var(--card-bg, #fff); font-weight: 600; font-size: 13px; position: sticky; top: 0; z-index: 2; }
#stfApprTable tbody tr:hover > td { background: rgba(26,115,232,.03); }

/* 编制管理面板间距 */
#stfMatrixPanel, #stfApprovalPanel { animation: stfFadeIn .2s ease; }
@keyframes stfFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.col-memo { max-width:240px; white-space:normal; color:var(--text-faint); }

/* 详情抽屉 */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.38); display: none; align-items: stretch; justify-content: flex-end; z-index: 200; }
.drawer { width: min(580px, 94vw); background: #fff; height: 100%; display: flex; flex-direction: column; box-shadow: -6px 0 28px rgba(0,0,0,.14); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.drawer-head .title { font-size: 16px; font-weight: 600; }

/* ===== 职位详情抽屉头部 ===== */
.pos-head { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; gap: 0; border-bottom: none; }
.pos-head-main { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 12px; }
.pos-head .title { font-size: 17px; font-weight: 700; }
.pos-head .modal-close { position: static; flex: 0 0 auto; }

/* 锚点导航药丸条 */
.pos-anchor-nav {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: thin;
  padding: 0 20px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FBFCFF, #fff);
}
.pos-anchor-nav::-webkit-scrollbar { height: 4px; }
.pos-anchor-nav::-webkit-scrollbar-thumb { background: #D8DEE8; border-radius: 4px; }
.pos-anchor {
  flex: 0 0 auto;
  font-size: 12.5px; color: #5B6678; text-decoration: none;
  padding: 5px 13px; border-radius: 20px;
  background: #F1F4F9; border: 1px solid transparent;
  transition: all .15s; white-space: nowrap;
}
.pos-anchor:hover { color: var(--primary); background: rgba(26,115,232,.08); }
.pos-anchor.active {
  color: #fff; background: linear-gradient(135deg, #4A7CF7, #1A73E8);
  font-weight: 600; box-shadow: 0 2px 8px rgba(26,115,232,.28);
}

/* 职位详情滚动区域 */
.pos-drawer-body {
  position: relative;
  overflow-y: auto; scroll-behavior: smooth;
  padding: 16px 18px 8px;
}
.pos-drawer-body .pos-section { display: block !important; }
.pos-drawer-body .pos-section > div[id^="posSec"] {
  scroll-margin-top: 12px;
}
.drawer-tabs { padding: 0 12px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.dtab-panel { animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 候选人详情：操作按钮行（参考职位详情头部） */
.cand-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 20px 12px; }
.cand-actions .btn-secondary, .cand-actions .btn-primary { font-size: 12.5px; padding: 6px 13px; }
.cand-drawer-body .pos-section > div[id^="candSec"] { scroll-margin-top: 12px; }

/* ===== 职位详情卡片 ===== */
.pos-detail { display: flex; flex-direction: column; gap: 0; }
.pos-card {
  background: #fff; border: 1px solid #E8ECF2;
  border-radius: 8px; overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 4px 14px rgba(26,115,232,.04);
}
.pos-card:last-child { margin-bottom: 0; }
.pos-card .card-title {
  font-size: 13px; font-weight: 700; color: #555;
  padding: 12px 18px; margin: 0;
  background: #F7F9FC;
  border-bottom: 1px solid #EEF1F5;
  letter-spacing: .5px;
  display: flex; align-items: center; gap: 8px;
}
.pos-card .card-title::before {
  content: ''; width: 3px; height: 14px;
  background: var(--primary); border-radius: 2px;
}
.pos-card .card-body { padding: 16px 18px 18px; }

/* 基本信息 hero 卡片 */
.pos-hero {
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 6px 20px rgba(26,115,232,.07);
}
.pos-hero > .card-title {
  background: linear-gradient(135deg, #4A7CF7, #1A73E8);
  color: #fff; font-size: 15px; letter-spacing: normal;
  padding: 16px 20px; border-bottom: none;
}
.pos-hero > .card-title::before { display: none; }

.info-block { margin-bottom: 16px; }
.info-block:last-child { margin-bottom: 0; }
.info-block h4 { font-size: 12.5px; color: var(--text-muted); margin: 0 0 8px; font-weight: 600; letter-spacing: .3px; }
.info-row { display: flex; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed #EDF0F5; }
.info-row:last-child { border-bottom: none; }
.info-k { width: 110px; flex: 0 0 110px; color: #9AA0B0; font-size: 13px; }
.info-v { flex: 1; font-size: 13.5px; color: #333; word-break: break-all; }
.info-text { font-size: 13.5px; line-height: 1.8; color: #555; }

.occ-summary { display: flex; gap: 12px; margin-bottom: 16px; }
.occ-cell {
  flex: 1; background: linear-gradient(145deg, #ffffff, #F8FAFE);
  border: 1px solid #E8ECF4; border-radius: 12px; padding: 16px 12px;
  text-align: center; position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}
.occ-cell::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0; transition: opacity .18s;
}
.occ-cell:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(26,115,232,.10); }
.occ-cell:hover::after { opacity: 1; }
.occ-summary span { display: block; font-size: 12px; color: #9AA0B0; margin-bottom: 6px; font-weight: 400; }
.occ-summary b { font-size: 26px; font-weight: 800; color: #222; line-height: 1.1; }
.occ-summary b.neg { color: #DC2626; }

/* 职位详情 · 概览统计卡（对齐部门详情配额卡 .sc-card 风格） */
.pos-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px 18px; }
.pos-overview .sc-card { background: #F8FAFC; }
.pos-overview .sc-value { font-size: 24px; }
@media (max-width: 680px) { .pos-overview { grid-template-columns: repeat(2, 1fr); } }

/* 抽屉标题：职位名 + 编码 */
.pos-dt-name { font-weight: 700; }
.pos-dt-code { font-size: 12px; color: #9AA0B0; font-weight: 400; margin-left: 3px; }

.salary-band {
  display: inline-block; font-size: 20px; font-weight: 800; color: #1A73E8;
  background: linear-gradient(135deg, rgba(26,115,232,.08), rgba(26,115,232,.03));
  border: 1px solid rgba(26,115,232,.15); border-radius: 10px;
  padding: 10px 16px; letter-spacing: .5px;
}

/* 卡片内表格 */
.pos-card .data-table { border-collapse: separate; border-spacing: 0; }
.pos-card .data-table thead th {
  background: var(--card-bg, #fff); color: var(--text-strong);
  font-weight: 600; border-bottom: 1px solid var(--border);
}
.pos-card .data-table tbody td { border-bottom: 1px solid #F3F5F8;
  transition: background .12s;
}
.pos-card .data-table tbody tr:hover td { background: #FBFCFE; }
.pos-card .data-table tbody tr:last-child td { border-bottom: none; }

/* 表格横向滚动容器（职位详情抽屉内员工明细） */
.table-wrap { width: 100%; overflow-x: auto; }
.pos-emp-table-wrap .data-table { min-width: max-content; }
.pos-emp-table-wrap .data-table th,
.pos-emp-table-wrap .data-table td { white-space: nowrap; }
.pos-emp-table-wrap .data-table td.dept { white-space: normal; max-width: 160px; line-height: 1.4; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 12px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); margin-top: 4px; flex: 0 0 9px; z-index: 1; }
.tl-title { font-size: 13px; font-weight: 600; }
.tl-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ===================== 职位图谱（职位管理 → 查看职位图谱） ===================== */
#posMapView { overflow: auto; }
.pos-map-tree { flex: 1; overflow-y: auto; min-height: 0; }

/* 视图切换：二级分段控件（与工具栏控件同一视觉语言） */
.map-tabs {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  background: #F1F4F9; border: 1px solid var(--border); border-radius: 9px;
  margin-bottom: 14px;
}
.map-tab {
  font-family: inherit; font-size: 13px; line-height: 1; padding: 7px 16px;
  border: none; background: transparent; color: var(--text-muted);
  border-radius: 7px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.map-tab:hover { color: var(--text); background: rgba(255,255,255,.8); }
.map-tab.active {
  background: var(--card-bg, #fff); color: var(--primary); font-weight: 600;
  box-shadow: 0 1px 3px rgba(60,64,67,.16);
}

/* ---------- 矩阵图 / 热力图：职位族 × 职级 网格 ---------- */
/* .pmm-wrap 只做外层容器；横向滚动交给 .pmm-scroll，
   这样图例/提示条不会被带着一起左右滚动。 */
.pmm-wrap { min-width: 0; }
.pmm-scroll { overflow-x: auto; padding-bottom: 2px; }
.pmm-grid {
  /* 实际列数由 JS 内联注入（124px 职位族列 + N 个职级列）；
     这里的 9 列仅为兜底，grid-auto-columns 保证列数超出模板时仍排在同一行、绝不折行 */
  display: inline-grid; grid-auto-flow: row;
  grid-template-columns: 124px repeat(9, minmax(100px, 1fr));
  grid-auto-columns: minmax(100px, 1fr);
  min-width: 1024px; background: var(--card-bg, #fff);
  border: 1px solid var(--border); border-radius: 10px;
}
.pmm-head { display: contents; }
.pmm-corner {
  position: sticky; left: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 9px 8px; background: #F7F9FC;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  border-top-left-radius: 9px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
}
.pmm-corner i { font-style: normal; font-size: 10px; color: var(--text-faint); }
.pmm-corner span { font-weight: 400; color: var(--text-faint); }
.pmm-col {
  padding: 9px 4px; text-align: center; background: #F7F9FC;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: .4px;
}
.pmm-col:last-child { border-right: none; border-top-right-radius: 9px; }
.pmm-row { display: contents; }
.pmm-rowhead {
  position: sticky; left: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 8px 10px; min-height: 60px; background: var(--card-bg, #fff);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.pmm-rname { font-size: 13px; font-weight: 600; color: var(--text-strong); }
.pmm-rcode { font-size: 10.5px; color: var(--text-faint); letter-spacing: .6px; }
.pmm-cell {
  display: flex; flex-wrap: wrap; gap: 4px; align-content: center; align-items: center; justify-content: center;
  padding: 7px 6px; min-height: 60px; background: var(--fam-tint, #fff);
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.pmm-cell:last-child { border-right: none; }
.pmm-row:last-child .pmm-cell, .pmm-row:last-child .pmm-rowhead { border-bottom: none; }
.pmm-row:last-child .pmm-cell:last-child { border-bottom-right-radius: 9px; }
.pmm-row:last-child .pmm-rowhead { border-bottom-left-radius: 9px; }
.pmm-dash { color: #C3CCD9; font-size: 12px; line-height: 1; }

/* 职位 chip */
.pmm-chip {
  display: inline-flex; align-items: center; gap: 1px; max-width: 100%;
  padding: 3px 3px 3px 7px; background: var(--card-bg, #fff);
  border: 1px solid rgba(15,23,42,.08); border-radius: 6px;
  font-size: 11.5px; line-height: 1.35; color: var(--text); white-space: nowrap;
  box-shadow: 0 1px 1px rgba(15,23,42,.04);
  transition: box-shadow .12s, border-color .12s, transform .12s;
}
.pmm-chip:hover { border-color: var(--primary); box-shadow: 0 2px 6px rgba(26,115,232,.18); transform: translateY(-1px); }
.pmm-chip.off { opacity: .55; }
.pmm-chip.off .pmm-chip-name { text-decoration: line-through; }
.pmm-chip.key .pmm-chip-name { font-weight: 600; }
.pmm-chip-name { cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.pmm-chip-info {
  flex: 0 0 auto; cursor: pointer; color: var(--text-faint); font-size: 11px; line-height: 1;
  padding: 1px 3px; border-radius: 4px; transition: background .12s, color .12s;
}
.pmm-chip-info:hover { background: var(--primary-soft, #E8F0FE); color: var(--primary); }

/* 热力单元格 */
.pmm-heat-cell { cursor: pointer; transition: filter .12s, box-shadow .12s; }
.pmm-heat-cell:hover { filter: brightness(.97); box-shadow: inset 0 0 0 2px rgba(15,23,42,.16); }
.pmm-heat-rate { width: 100%; text-align: center; font-size: 13.5px; font-weight: 700; letter-spacing: .2px; }
.pmm-heat-names { font-size: 10px; text-align: center; line-height: 1.35; opacity: .85; }

/* 图例 / 提示条 */
.pmm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.pmm-legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px; background: var(--card-bg, #fff);
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 12px; color: var(--text-muted);
}
.pmm-legend-item i { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pmm-legend-item i.pmm-empty-box { width: 8px; height: 8px; border-radius: 2px; background: #fff; border: 1px solid #C3CCD9; }
.pmm-tip {
  display: inline-block; margin-top: 12px; padding: 6px 12px;
  background: #F5F7FA; border-radius: 8px; font-size: 12px; color: var(--text-muted);
}

/* ---------- 路径图：职位族 → 职级 → 职位 ---------- */
.pmp-family { margin-bottom: 20px; }
.pmp-family-name {
  display: inline-flex; align-items: center; gap: 8px;
  padding-bottom: 6px; margin-bottom: 10px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; color: var(--text-strong);
}
.pmp-family-name::before { content: ''; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--fam-bd, #94A3B8); }
.pmp-family-name small { font-size: 11px; font-weight: 400; color: var(--text-faint); letter-spacing: .5px; }
.pmp-path-body { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 2px 0 6px; }
.pmp-node {
  flex: 0 0 auto; min-width: 124px; max-width: 200px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 8px 10px; background: var(--card-bg, #fff);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 2px rgba(60,64,67,.06);
}
.pmp-grade {
  padding: 3px 0; border-radius: 6px; text-align: center; white-space: nowrap;
  background: var(--fam-tint, #F5F7FA);
  font-size: 11.5px; font-weight: 700; color: var(--text-strong); letter-spacing: .3px;
}
.pmp-grade small { margin-left: 4px; font-size: 10px; font-weight: 400; color: var(--text-faint); }
.pmp-positions { display: flex; flex-direction: column; gap: 4px; }
.pmp-pos {
  position: relative; display: inline-flex; align-items: center; gap: 2px;
  padding: 3px 4px 3px 8px; border-radius: 6px;
  background: var(--fam-tint, #F5F7FA); border: 1px solid rgba(15,23,42,.05);
  font-size: 11.5px; color: var(--text); white-space: nowrap; overflow: hidden;
  cursor: default; transition: background .15s, border-color .15s;
}
.pmp-pos:hover { background: var(--primary-soft, #E8F0FE); border-color: rgba(26,115,232,.25); }
.pmp-pos.disabled { opacity: .55; }
.pmp-pos-name { cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.pmp-pos.disabled .pmp-pos-name { text-decoration: line-through; }
.pmp-pos-info {
  flex: 0 0 auto; cursor: pointer; color: var(--text-faint); font-size: 11px; line-height: 1;
  padding: 1px 3px; border-radius: 4px; transition: background .12s, color .12s;
}
.pmp-pos-info:hover { background: #fff; color: var(--primary); }
.pmp-key {
  margin-left: 4px; padding: 0 4px; border-radius: 4px; vertical-align: middle;
  background: #FEF3C7; color: #B45309; font-size: 9px; font-style: normal;
}
.pmp-arrow {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  min-width: 26px; padding: 0 4px; color: #C3CCD9; font-size: 15px; user-select: none;
}

/* ---------- 晋升模拟 ---------- */
.pos-map-promote { padding: 2px 0; }
.pmo-head { margin-bottom: 12px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.pmo-form { margin-bottom: 16px; }
.pmo-search { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.pmo-input {
  width: 280px; max-width: 70vw; height: var(--ctrl-h, 30px); padding: 0 12px;
  background: var(--card-bg, #fff); border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 13.5px; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.pmo-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.12); }
.pmo-btn {
  height: var(--ctrl-h, 30px); padding: 0 16px; border: none; border-radius: 8px;
  background: var(--primary); color: #fff; font-family: inherit; font-size: 13.5px;
  cursor: pointer; white-space: nowrap; transition: background .15s;
}
.pmo-btn:hover { background: #1666c9; }
.pmo-suggest {
  position: absolute; top: 38px; left: 0; z-index: 30; min-width: 280px; max-height: 260px; overflow: auto;
  margin: 0; padding: 4px; list-style: none; background: var(--card-bg, #fff);
  border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.pmo-suggest li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.pmo-suggest li:hover { background: var(--primary-soft, #E8F0FE); }
.pmo-suggest li.empty { justify-content: center; color: var(--text-faint); cursor: default; }
.pmo-suggest li .meta { color: var(--text-faint); font-size: 12px; }
.pmo-result { min-height: 60px; }
.pmo-placeholder { padding: 24px 0; font-size: 13px; color: var(--text-faint); }
.pmo-card { padding: 16px 18px; background: var(--card-bg, #fff); border: 1px solid var(--border); border-radius: 12px; }
.pmo-emp { margin-bottom: 14px; font-size: 15px; font-weight: 600; color: var(--text); }
.pmo-ladder { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; margin-bottom: 14px; }
.pmo-step {
  flex: 1 1 120px; min-width: 110px; display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; background: #F8FAFC; border: 1px solid var(--border); border-radius: 10px;
}
.pmo-step.past { opacity: .6; }
.pmo-step.cur { background: #E8F5EC; border-color: #34A853; box-shadow: 0 0 0 2px rgba(52,168,83,.15); }
.pmo-step.future { background: #FEF3C7; border-color: #F59E0B; }
.pmo-grade { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.pmo-step.cur .pmo-grade { color: #1B7A3E; }
.pmo-step.future .pmo-grade { color: #B45309; }
.pmo-pname { font-size: 13px; color: var(--text); }
.pmo-arrow { display: flex; align-items: center; padding: 0 6px; color: var(--text-faint); font-size: 16px; }
.pmo-rec { padding: 12px 14px; background: #E8F0FE; border-left: 4px solid var(--primary); border-radius: 8px; font-size: 14px; color: var(--text); line-height: 1.6; }
.pmo-rec-warn { background: #FFFBEB; border-left-color: #F59E0B; }
.pmo-warn { color: #B45309; font-size: 14px; }

/* 人岗匹配分析 */
.drawer-wide { width: 880px; max-width: 96vw; }
.match-req { font-size: 13px; color: var(--text-muted); margin: 4px 0 12px; }
.match-req b { color: var(--text); }
.match-stat { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.match-stat-item { background: #F7F9FC; border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; min-width: 92px; text-align: center; }
.match-stat-item span { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.match-stat-item b { font-size: 18px; font-weight: 700; color: var(--text); }
.match-stat-item b.good { color: #1a9e57; }
.match-stat-item b.low { color: #e6a23c; }
.match-stat-item b.risk { color: #e54545; }
.match-table td .match-note { font-size: 11px; color: var(--text-faint); }
.rate-bar.sm { width: 56px; height: 7px; }
.rate-bar.sm span { display: block; height: 100%; border-radius: 6px; }
.risk-badge { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 9px; font-weight: 600; }
.risk-badge.good { background: #E6F7EE; color: #1a9e57; }
.risk-badge.low { background: #FEF6E7; color: #B7791F; }
.risk-badge.risk { background: #FDECEC; color: #D14343; }
.risk-badge.unknown { background: #EEF1F5; color: var(--text-muted); }
.risk-badge.primary { background: #E8F0FE; color: #2b6cff; }
.match-summary { margin-bottom: 14px; }
.match-summary .qs-inline { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; }
.match-summary .qs-num-risk { color: #e54545; font-weight: 700; }
.match-summary .qs-num-low { color: #e6a23c; font-weight: 700; }
.match-summary .qs-num-good { color: #1a9e57; font-weight: 700; }
#posMatchTable th, #posMatchTable td { text-align: center; }
.row-risk { background: rgba(229,69,69,.04); }
.row-risk:hover { background: rgba(229,69,69,.08); }
.link-pos { color: var(--primary); cursor: pointer; text-decoration: none; }
.link-pos:hover { text-decoration: underline; }
.match-tip { margin-top: 12px; font-size: 12px; line-height: 1.6; }

/* 招聘管理 */
/* 招聘需求统计卡片 */
.quota-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  min-width: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.05);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  align-items: center;
  gap: 16px;
}
.quota-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
}
.quota-card .qc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.quota-card .qc-body {
  flex: 1;
  min-width: 0;
}
.quota-card .qc-val {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.quota-card .qc-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 400;
}
.form-readonly { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; }
.fr-item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.fr-item > span { color: var(--text-muted); font-size: 13px; flex-shrink: 0; width: 80px; }
.fr-item > b { font-weight: 600; text-align: left; }
.form-divider { grid-column: 1 / -1; height: 1px; background: var(--border); margin: 6px 0; position: relative; }
.form-divider > span { position: absolute; left: 0; top: -9px; background: #fff; padding-right: 10px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.check-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.check-inline input { width: auto; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.risk-badge.normal { background: #EEF1F5; color: var(--text-muted); }
.risk-badge.over { background: #FDECEC; color: #D14343; }

/* 顶部公司切换器 */
.company-switch { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 10px; height: 30px; box-sizing: border-box; padding: 0 12px; color: var(--text); }
.company-switch svg { color: var(--text-muted); flex: none; }
.company-switch select { border: none; background: transparent; font-size: 14px; font-weight: 600; color: var(--text); outline: none; cursor: pointer; max-width: 160px; }
.company-switch select:focus { box-shadow: none; }
.company-manage-btn { border: none; background: transparent; cursor: pointer; font-size: 15px; line-height: 1; color: var(--text-muted); padding: 2px 4px; border-radius: 6px; }
.company-manage-btn:hover { background: var(--bg); color: var(--primary); }

/* 公司管理弹窗 */
.form-hint { margin: 0 0 16px; padding: 10px 14px; background: #F3F6FB; border-radius: 8px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.cm-row { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.cm-row:last-child { margin-bottom: 0; }
.cm-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.cm-fields { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.cm-fields label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 12px; color: var(--text-muted); }
.cm-fields label span { line-height: 1; }
.cm-type, .cm-remark { height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; background: var(--card-bg); color: var(--text); }
.cm-type { width: 110px; }
.cm-remark { width: 260px; max-width: 100%; }
.cm-save { height: 34px; padding: 0 16px; font-size: 13px; border-radius: 6px; }
@media (max-width: 620px) {
  .cm-fields { flex-direction: column; align-items: stretch; }
  .cm-type, .cm-remark { width: 100%; }
  .cm-save { width: 100%; }
}
.risk-badge.warn { background: #FEF6E7; color: #B7791F; }

/* 薪酬管理 */
.money { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.money.strong { font-weight: 700; color: var(--text-strong); }
.row-sub { font-weight: 600; background: var(--bg-soft); }
.row-sub td { border-top: 1px solid var(--border); }
.row-total { font-weight: 700; background: #F0F4F8; }
.row-total td { border-top: 2px solid var(--border); color: var(--text-strong); }
.row-total .money { font-weight: 700; }
.payroll-preview { margin-top: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.pp-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 4px 0; }
.pp-row > span { color: var(--text-muted); }
.pp-row.total { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 8px; font-size: 15px; font-weight: 700; }
.pp-row.total > b { color: var(--green); }
.indicator-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.indicator-row { display: flex; gap: 8px; align-items: center; }
.indicator-row input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; }
@media (max-width: 760px) {
  .form-readonly { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .drawer { width: 100vw; }
  .pmp-path-body { flex-direction: column; }
  .pmp-arrow { transform: rotate(90deg); padding: 4px 0; }
}

/* ===================== 部门管理：左树右墙 ===================== */
.dept-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; align-items: stretch; flex: 1; min-height: 0; }
.dept-tree-pane { min-width: 0; max-width: none; display: flex; flex-direction: column; min-height: 0; background: transparent; border: none; border-radius: 0; }
.dept-tree-pane .table-wrap { flex: 1; min-height: 0; }
.dept-detail-pane { min-width: 0; min-height: 0; overflow-y: auto; padding-right: 4px; }

/* 右侧详情面板 — 整体卡片 */
.dept-detail-pane .card {
  background: #fff; border: 1px solid #E8ECF2;
  border-radius: 8px; overflow: hidden;
  margin-bottom: 10px;
}
.dept-detail-pane .card:last-child { margin-bottom: 0; }
.dept-detail-pane .card-title {
  font-size: 13px; font-weight: 700; color: #555;
  padding: 11px 18px; margin: 0;
  background: #F7F9FC;
  border-bottom: 1px solid #EEF1F5;
  letter-spacing: .5px;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.dept-detail-pane .card-title::before {
  content: ''; width: 3px; height: 14px;
  background: #94A3B8; border-radius: 2px;
}
.dept-detail-pane .card-title .badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: #fff; background: var(--primary);
  padding: 1px 8px; border-radius: 8px;
  text-transform: none; letter-spacing: 0;
}

.dept-detail-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 360px; color: #B0B8C6; background: var(--card-bg, #fff);
  border: 1px solid var(--border, #E8ECF4); border-radius: var(--radius); padding: 40px;
  box-shadow: var(--shadow-card, 0 2px 8px rgba(27, 43, 80, 0.05));
}
.dept-empty-illo { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.dept-detail { display: flex; flex-direction: column; gap: 10px; }

/* ===== 基础信息卡片（与其他区域统一卡片样式）===== */
.dept-base-card { overflow: hidden; }
.di-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; padding: 18px 20px 16px; }
.di-item { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; font-size: 13px; }
.di-item:not(:last-child) { border-bottom: 1px solid #F3F4F8; }
.di-item.title { grid-column: 1 / -1; padding: 12px 0 14px; margin-bottom: 6px; border-bottom: 1px solid #EBEDF2 !important; }
.di-item.title .di-v { font-size: 18px; font-weight: 800; color: #334155; }
.di-item.sub { opacity: .72; }
.di-k { flex: 0 0 80px; color: #9AA0B0; font-size: 12.5px; }
.di-v { flex: 1; color: #333; word-break: break-all; font-weight: 400; font-size: 13.5px; }
.di-v .muted { font-weight: 400; opacity: .58; font-size: 12px; }
.di-v a.link { color: var(--primary); }
.di-duty { margin-top: 8px; border-top: 1px solid #F0F2F6; padding: 12px 20px 16px; background: #FAFBFE; }
.di-duty-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #9AA0B0; margin-bottom: 6px; }
.di-duty-body { font-size: 13px; line-height: 1.75; color: #555; background: #fff; border-radius: 10px; padding: 14px 16px; white-space: pre-wrap; border: 1px solid #EEEFF3; box-shadow: inset 0 1px 2px rgba(0,0,0,.02); }

/* ===== 编制汇总卡片 ===== */
#deptQuotaSummaryCard > .card-title { background: #F7F9FC; }
.dept-summary-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 18px 18px; }
.sc-card {
  background: #F8FAFC;
  border: 1px solid #EAEFF5; border-radius: 12px;
  padding: 16px 12px; text-align: center;
  transition: box-shadow .18s;
}
.sc-card::after { display: none; }
.sc-card:hover { box-shadow: 0 2px 8px rgba(15,23,42,.06); }
.sc-label { font-size: 11.5px; color: #9AA0B0; margin-bottom: 6px; font-weight: 400; letter-spacing: .3px; }
.sc-value { font-size: 26px; font-weight: 800; color: #334155; line-height: 1.1; }
.sc-sub { font-size: 11px; color: #B0B8C6; margin-top: 4px; font-weight: 400; }
.sc-card.ok .sc-value { color: #475569; }
.sc-card.danger .sc-value { color: #DC2626; }
.sc-card.danger { border-color: #EAD9D9; background: #FBF6F6; }

/* 编制提示文字 */
#deptQuotaSummaryCard > div[style*="font-size:12px"] {
  padding: 0 18px 14px; color: #B0B8C6; font-size: 11.5px;
  line-height: 1.5; border-top: 1px solid #F0F2F6; padding-top: 10px;
}

/* ===== 直属子部门表格 ===== */
.dept-detail-pane .data-table { border-collapse: separate; border-spacing: 0; }
.dept-detail-pane .data-table thead th {
  background: var(--card-bg, #fff); color: var(--text-strong);
  font-weight: 600; border-bottom: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: .3px;
}
.dept-detail-pane .data-table tbody td { border-bottom: 1px solid #F3F5F8;
  transition: background .12s;
}
.dept-detail-pane .data-table tbody tr:hover td { background: #FBFCFE; }
.dept-detail-pane .data-table tbody tr:last-child td { border-bottom: none; }
.dept-detail-pane .data-table tbody td a.link { text-decoration: none; }

/* 站点概览条 */
.dept-site-bar { background: #F8FAFC; border: 1px solid #EAEFF5; border-left: 3px solid #94A3B8; border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--text); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.site-cd.danger { color: var(--danger); font-weight: 600; }
.warn-tag { color: var(--warning); font-weight: 600; }
.warn-tag.danger { color: var(--danger); }

/* 树节点导航层增强 */
.dept-ico, .dept-status { display: none; }
.dept-ico { font-size: 12px; margin-right: 1px; line-height: 1; }
.dept-status { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin: 0 2px; vertical-align: middle; flex-shrink: 0; }
.dept-status.on { background: #34A853; box-shadow: 0 0 0 1px rgba(52,168,83,.18); }
.dept-status.off { background: #BDBDBD; }
.dept-quota { font-size: 10px; color: var(--text-faint); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 0 4px; margin-left: 2px; line-height: 1.4; }
.dept-quota.over { color: var(--danger); border-color: rgba(234,67,53,.4); }
.dept-row.selected { background: var(--primary-soft) !important; }
.dept-row.selected .dept-name { color: var(--primary); font-weight: 600; }

/* 子部门表格 badge */
.badge { display: inline-block; min-width: 18px; text-align: center; background: var(--primary-soft); color: var(--primary); font-size: 12px; border-radius: 10px; padding: 1px 7px; margin-left: 4px; }

@media (max-width: 980px) {
  .dept-layout { flex-direction: column; overflow-y: auto; }
  .dept-tree-pane { flex: 0 0 auto; width: 100%; max-width: none; max-height: 48vh; }
  .dept-detail-pane { overflow-y: visible; padding-right: 0; }
  .dept-summary-cards { grid-template-columns: repeat(2, 1fr); }
  .di-grid { grid-template-columns: 1fr; }
}


/* ===== 标准职级矩阵 11级×三通道（salary_band_matrix，工程E已并入专业P） ===== */
table.sm-matrix { border-collapse: separate; border-spacing: 0; min-width: 1360px; width: max-content; font-size: 12px; background: #fff; }
table.sm-matrix th, table.sm-matrix td { border: 1px solid var(--border, #e5e7eb); box-sizing: border-box; }
table.sm-matrix thead th { background: #1f3a5f; color: #fff; font-weight: 600; text-align: center; padding: 6px 4px; line-height: 1.3; white-space: nowrap; position: sticky; top: 0; z-index: 3; }
table.sm-matrix thead tr:first-child th.sm-ch { background: #2b4c7e; letter-spacing: .5px; }
table.sm-matrix thead th.sm-sub { background: #eef2f7; color: #334155; z-index: 3; top: 33px; }
table.sm-matrix td.sm-level { background: #f5f7fa; color: #1f2937; font-weight: 700; text-align: center; position: sticky; left: 0; z-index: 2; width: 52px; vertical-align: middle; }
table.sm-matrix thead th:first-child { left: 0; z-index: 4; }
table.sm-matrix td.sm-cell { padding: 0; background: #fff; }
table.sm-matrix td.sm-cell input { width: 100%; height: 30px; border: 0; outline: 0; background: transparent; color: #1f2937; font-size: 12px; padding: 0 6px; text-align: left; font-family: inherit; }
table.sm-matrix td.sm-num input, table.sm-matrix td.sm-span input { text-align: right; font-variant-numeric: tabular-nums; }
table.sm-matrix td.sm-cell input:focus { background: #f0f6ff; box-shadow: inset 0 0 0 1px #4285f4; }
table.sm-matrix td.sm-cell input.sm-dirty { background: #fff7e6; }
table.sm-matrix tbody tr:hover td.sm-cell { background: #fafbfc; }
table.sm-matrix tbody tr:hover td.sm-cell input { background: transparent; }

/* 职级管理通道标签（三通道：专业/技能/管理） */
.tag-purple{background:rgba(139,92,246,.14);color:#a78bfa;border:1px solid rgba(139,92,246,.3);border-radius:10px;padding:1px 8px;font-size:12px;}
.tag-blue{background:rgba(59,130,246,.14);color:#60a5fa;border:1px solid rgba(59,130,246,.3);border-radius:10px;padding:1px 8px;font-size:12px;}
.tag-cyan{background:rgba(34,211,238,.14);color:#22d3ee;border:1px solid rgba(34,211,238,.3);border-radius:10px;padding:1px 8px;font-size:12px;}
.tag-green{background:rgba(74,222,128,.14);color:#4ade80;border:1px solid rgba(74,222,128,.3);border-radius:10px;padding:1px 8px;font-size:12px;}
.tag-gray{background:rgba(148,163,184,.14);color:#94a3b8;border:1px solid rgba(148,163,184,.3);border-radius:10px;padding:1px 8px;font-size:12px;}


/* ===================== 职位表单重排（pe- = Position Editor，浮窗克隆安全） ===================== */
/* 参考「新建职位标准」单页形态：notice + 粘性操作栏 + 左表单/右上下文，字段 name/id 不变 */
.pe-editor.modal-lg { max-width: 1000px; }
.pe-editor .pe-body {
  display: flex; flex-direction: column;
  padding: 0; overflow: hidden;
  background: var(--bg, #F7F8FC);
}
/* 顶部边界提示 */
.pe-editor .pe-notice {
  flex: 0 0 auto; margin: 0; padding: 10px 18px;
  background: var(--primary-soft, #E8F0FE); color: #1d4ed8;
  font-size: 12.5px; line-height: 1.7;
  border-bottom: 1px solid #eef4fe;
}
.pe-editor .pe-notice b { font-weight: 600; }
/* 粘性操作栏（浮窗内不随滚动） */
.pe-editor .pe-sticky {
  flex: 0 0 auto;
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 18px;
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--border, #C7CFDB);
}
.pe-editor .pe-sticky-h { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.pe-editor .pe-h { font-size: 15px; font-weight: 600; color: var(--text-strong, #16181A); white-space: nowrap; }
.pe-editor .pe-sub { font-size: 11.5px; color: var(--text-faint, #80868B); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-editor .pe-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
/* 两栏主体：左表单可滚动，右面板固定 */
.pe-editor .pe-layout {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 268px;
  gap: 14px; padding: 14px 16px 18px;
  overflow-y: auto; align-content: start;
}
.pe-editor .pe-main { min-width: 0; }
.pe-editor .pe-aside { min-width: 0; }
@media (max-width: 860px) {
  .pe-editor .pe-layout { grid-template-columns: 1fr; }
}
/* 卡片 */
.pe-editor .pe-card {
  background: var(--card-bg, #fff);
  border: none;
  border-radius: 4px;
  padding: 14px 16px 16px;
  margin-bottom: 14px;
  box-shadow: none;
}
.pe-editor .pe-card > h2 {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-strong, #16181A);
  margin: 0 0 12px; padding: 0 0 4px;
  border-bottom: 1px solid #F0F2F5;
}
.pe-editor .pe-card > h2::before {
  content: ""; width: 3px; height: 14px; flex: 0 0 auto;
  background: var(--primary, #1A73E8); border-radius: 2px;
}
.pe-editor .pe-sec-sub { font-size: 11.5px; font-weight: 400; color: var(--text-faint, #80868B); }
/* 两列表单栅格：上下式（标签在上、控件在下） */
.pe-editor .pe-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.pe-editor .pe-grid > label,
.pe-editor .pe-grid > .pe-full {
  display: block;
  min-width: 0; font-size: 12.5px; color: var(--text-muted, #4A4E52);
}
.pe-editor .pe-grid .pe-full { grid-column: 1 / -1; }
.pe-editor .pe-grid label input:not([type=hidden]),
.pe-editor .pe-grid label select,
.pe-editor .pe-grid label textarea {
  display: block; flex: none; width: 100%; box-sizing: border-box; margin-top: 5px;
  height: 34px; padding: 0 10px;
  border: 1px solid var(--border, #C7CFDB); border-radius: 6px;
  background: var(--card-bg, #fff); color: var(--text, #2B2F33);
  font-size: 13px; outline: none;
}
.pe-editor .pe-grid label textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; line-height: 1.6; }
/* 统一聚焦反馈：原生输入框(文本/数字/文本域)聚焦时显示蓝色边框，与下拉/日期一致。
   仅用 label > 直接子元素，避开被包装的 .wb-combo-input / .dp-input（它们各有自己的聚焦规则）。
   只改边框色、不叠加外发光（全站 input:focus 已 box-shadow:none!important）。 */
.pe-editor .pe-grid label > input:not([type=hidden]):focus,
.pe-editor .pe-grid label > textarea:focus {
  border-color: var(--primary, #1A73E8);
  outline: none;
}
/* 下拉(.wb-combo)与日期(.date-picker)的可见框：上面的 .pe-grid label input 高特异规则
   把全局 .wb-combo-input:focus / .date-picker:has(...) 的蓝色边框盖掉了，这里用同等更高的
   pe-editor 作用域特异性补回，确保两类包装控件聚焦也变蓝（同样只改边框色、不加外发光）。 */
.pe-editor .pe-grid label > .wb-combo .wb-combo-input:focus,
.pe-editor .pe-grid label > .wb-combo:focus-within .wb-combo-input {
  border-color: var(--primary, #1A73E8);
}
.pe-editor .pe-grid label > .date-picker:has(.dp-input:focus),
.pe-editor .pe-grid label > .date-picker:focus-within {
  border-color: var(--primary, #1A73E8);
}
.pe-editor .pe-grid label input[readonly] { background: var(--bg, #F7F8FC); color: var(--text-faint, #80868B); }
.pe-editor .pe-hint { display: block; margin-top: 4px; font-size: 11px; color: var(--text-faint, #80868B); line-height: 1.5; }
/* 主管职位开关 */
.pe-editor .pe-sw-label { position: relative; }
.pe-editor .pe-sw-wrap { display: inline-flex; align-items: center; gap: 8px; height: 34px; margin-top: 5px; vertical-align: middle; }
.pe-editor .pe-hidden-sel { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* 全局 enhanceFormSelects 会把隐藏的 select 再包一层可见 .wb-combo（104px），导致下拉+开关并存；这里一并隐藏该包装层 */
.pe-editor .pe-sw-wrap > .wb-combo { display: none !important; }
.pe-editor .pe-switch {
  position: relative; display: inline-block; width: 36px; height: 20px; flex: 0 0 auto;
  border-radius: 999px; background: #c9ced6; cursor: pointer; transition: background .16s;
}
.pe-editor .pe-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: left .16s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.pe-editor .pe-switch.on { background: var(--primary, #1A73E8); }
.pe-editor .pe-switch.on::after { left: 18px; }
.pe-editor .pe-sw-text { font-size: 12px; color: var(--text-muted, #4A4E52); }
/* 标签输入（只读示意） */
.pe-editor .pe-tagbox {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 5px;
  min-height: 34px; padding: 5px 8px;
  border: 1px solid var(--border, #C7CFDB); border-radius: 6px;
  background: var(--card-bg, #fff);
}
.pe-editor .pe-tagbox-ro { background: var(--bg, #F7F8FC); }
.pe-editor .pe-tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 4px;
  background: var(--primary-soft, #E8F0FE); color: var(--primary, #1A73E8); font-size: 11.5px;
}
.pe-editor .pe-tag i { font-style: normal; opacity: .6; cursor: pointer; }
/* 价值评估底部行 */
.pe-editor .pe-eval-foot {
  display: flex; align-items: center; gap: 14px;
  padding-top: 4px; font-size: 12.5px; color: var(--text-muted, #4A4E52);
}
.pe-editor .pe-eval-foot b { color: var(--primary, #1A73E8); font-size: 15px; }
/* 右侧上下文面板 */
.pe-editor .pe-preview > h2 { font-size: 13px; margin-bottom: 10px; }
.pe-editor .pe-summary { font-size: 12.5px; color: var(--text-muted, #4A4E52); line-height: 1.5; }
.pe-editor .pe-summary > div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--border, #E8EAED); }
.pe-editor .pe-summary > div:last-child { border-bottom: none; }
.pe-editor .pe-summary span { color: var(--text-faint, #80868B); flex: 0 0 auto; }
.pe-editor .pe-summary b { font-weight: 500; text-align: right; word-break: break-all; }
.pe-editor .pe-stat { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border, #E8EAED); }
.pe-editor .pe-stat span { color: var(--text-faint, #80868B); }
.pe-editor .pe-stat b { font-weight: 500; color: var(--text-muted, #4A4E52); }
.pe-editor .pe-preview .pe-tagbox { margin-top: 8px; }
/* 底部固定操作栏（三按钮：取消 / 保存草稿 / 保存并发布） */
.pe-editor .pe-foot {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 10px 18px;
  background: var(--card-bg, #fff);
  border-top: 1px solid #F0F2F5;
}
.pe-editor .pe-foot button { height: 32px; padding: 0 15px; font-size: 12.5px; border-radius: 6px; }
.pe-editor .pe-foot .btn-ghost { background: var(--bg, #F2F3F5); border-color: transparent; color: var(--text-muted, #4A4E52); }
/* 组件包装层铺满列宽：select→.wb-combo（默认 104px）、date→.date-picker（默认 299px）。
   上面的通用 label input 规则命中了内部 .wb-combo-input/.dp-input，但对包装层无效，需单独覆盖。 */
.pe-editor .pe-grid label > .wb-combo {
  display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; margin-top: 5px;
}
.pe-editor .pe-grid label > .wb-combo .wb-combo-input {
  width: 100%; height: 34px; margin-top: 0; box-sizing: border-box;
}
.pe-editor .pe-grid label > .wb-combo .wb-combo-list { min-width: 100%; }
/* 日期框：铺满列宽，沿用全局 .date-picker 外层边框（内部 .dp-input 无边框，避免双框）。
   占位文案由 HTML date input 的 placeholder 提供。 */
.pe-editor .pe-grid label > .date-picker {
  display: flex; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; margin-top: 5px;
  height: 34px; border-radius: 6px;
}
.pe-editor .pe-grid label > .date-picker .dp-input-container { height: 100%; box-sizing: border-box; }
.pe-editor .pe-grid label > .date-picker .dp-input {
  flex: 1 1 0%; min-width: 0; width: auto; height: 100%; margin-top: 0; padding: 0;
  border: none; background: transparent; box-shadow: none !important;
}


/* ===== 职位详情：顶部信息头 + 左右分区（参考职位详情布局） ===== */
#posDrawer .drawer { width: min(1180px, 96vw); }
#posDrawer .pos-head-main { align-items: flex-start; }
#posDrawer #posDrawerTitle { flex: 1 1 auto; min-width: 0; font-size: inherit; font-weight: inherit; }
.pd-hero { display: flex; flex-direction: column; gap: 9px; }
.pd-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pd-hero-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pd-hero-name .pos-dt-name { font-size: 18px; font-weight: 700; color: var(--text, #1f2329); }
.pd-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 9px; border-radius: 10px; font-size: 11px; font-weight: 500; line-height: 1; }
.pd-badge-ok { background: #E8FFEA; color: #00B42A; }
.pd-badge-off { background: #F2F3F5; color: #8A919F; }
.pd-badge-warn { background: #FFF7E8; color: #FF7D00; }
.pd-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-chip { display: inline-flex; align-items: center; height: 23px; padding: 0 9px; border-radius: 4px; background: #F2F3F5; color: #4E5969; font-size: 12px; }
.pd-chip.blue { background: #E8F0FF; color: #1A73E8; }
.pd-hero-meta { font-size: 12px; color: #8A919F; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pd-sep { color: #C9CDD4; }

/* 两栏：左主内容 + 右上下文栏 */
.pos-detail.pd-two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.pd-main { min-width: 0; }
.pd-aside { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pd-side-card { margin-bottom: 0; }
.pd-meta-list { padding: 4px 18px 12px; }
.pd-meta-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; padding: 8px 0; border-bottom: 1px dashed #EEF0F2; }
.pd-meta-row:last-child { border-bottom: none; }
.pd-meta-k { flex: 0 0 auto; color: #8A919F; }
.pd-meta-v { flex: 1 1 auto; text-align: right; color: var(--text, #1f2329); word-break: break-word; }
.pd-stat-list { padding: 4px 18px 10px; }
.pd-stat { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 9px 0; border-bottom: 1px dashed #EEF0F2; }
.pd-stat:last-child { border-bottom: none; }
.pd-stat span { color: #4E5969; }
.pd-stat b { font-size: 16px; color: var(--text, #1f2329); }
.pd-stat b.warn { color: #FF7D00; }

@media (max-width: 980px) {
  .pos-detail.pd-two-col { grid-template-columns: 1fr; }
  .pd-aside { order: -1; }
}

/* ===== 职位详情：Tab 切换（替代锚点，参考职位详情布局） ===== */
#posDrawer .pos-dtabs {
  display: flex; align-items: stretch; gap: 2px;
  padding: 0 20px; border-bottom: 1px solid #E8ECF2; background: #fff;
  overflow-x: auto; scrollbar-width: none;
}
#posDrawer .pos-dtabs::-webkit-scrollbar { display: none; }
#posDrawer .dtab {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 auto; position: relative; border: 0; background: transparent; cursor: pointer;
  padding: 11px 16px 10px; font-size: 14px; line-height: 20px; color: #4E5969; font-weight: 400;
  white-space: nowrap;
}
#posDrawer .dtab:hover { color: #1A73E8; }
#posDrawer .dtab.active { color: #1A73E8; font-weight: 600; }
#posDrawer .dtab.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 2px; border-radius: 2px 2px 0 0; background: #1A73E8;
}
#posDrawer .dtab-count {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  padding: 0 5px; margin-left: 4px; border-radius: 9px;
  background: #F2F3F5; color: #8A919F; font-size: 11px; text-align: center; font-weight: 400;
  vertical-align: 1px;
}
#posDrawer .dtab.active .dtab-count { background: #E8F0FF; color: #1A73E8; }
#posDrawer .dtab-panel { display: none; }
#posDrawer .dtab-panel.active { display: block; }
#posDrawer .pd-main > .dtab-panel > .pos-card + .pos-card { margin-top: 14px; }

/* ===== 职位详情：浅灰底 + 白卡 + 小圆角（仅抽屉作用域，对齐参考图层次） ===== */
/* 抽屉内容区浅灰底，与白色卡片形成对比 */
#posDrawer .pos-drawer-body { background: #F5F6F8; }
/* 卡片：白色、无边框、小圆角、极淡阴影 */
#posDrawer .pos-card,
#posDrawer .pd-side-card {
  background: #fff;
  border: none;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
/* 标题栏：白底 + 细分隔线（对齐参考图），无色块 */
#posDrawer .pos-card .card-title {
  background: transparent;
  border-bottom: 1px solid #EEF1F5;
}
/* 统计小卡：去灰底/边框/圆角（卡片内部保持干净） */
#posDrawer .sc-card,
#posDrawer .pos-overview .sc-card,
#posDrawer .sc-card.danger {
  background: transparent;
  border: none;
  border-radius: 4px;
  box-shadow: none;
}
/* 职位目的/职责块：去灰底与边框 */
#posDrawer .di-duty { background: transparent; border-top: none; }
#posDrawer .di-duty-body {
  background: transparent; border: none; box-shadow: none;
  padding-left: 0; padding-right: 0;
}

/* ===== 职位详情：关联岗位 tab（参考职位详情原型） ===== */
#posDrawer .pd-jobs-head {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
}
#posDrawer .pd-jobs-head > .pd-btn-primary { margin-left: auto; }
#posDrawer .pd-btn-primary {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  height: 30px; padding: 0 14px; border-radius: 4px;
  border: 1px solid #1A73E8; background: #1A73E8; color: #fff;
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
#posDrawer .pd-btn-primary:hover { background: #1669D6; border-color: #1669D6; }
#posDrawer .pd-jobs-table-wrap { width: 100%; overflow-x: auto; }
#posDrawer .pd-jobs-table { width: 100%; border-collapse: collapse; font-size: 12px; }
#posDrawer .pd-jobs-table th {
  text-align: left; padding: 9px 10px; background: #F7F8FA;
  color: #4E5969; font-weight: 500; white-space: nowrap;
}
#posDrawer .pd-jobs-table td {
  padding: 10px; border-bottom: 1px solid #EFF0F2; color: #1F2329; white-space: nowrap;
}
#posDrawer .pd-jobs-table tbody tr:last-child td { border-bottom: none; }
#posDrawer .pd-jobs-table tbody tr:hover td { background: #FAFBFC; }
#posDrawer .pd-jobs-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
#posDrawer .pd-jobs-table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)) { text-align: right; }
#posDrawer .pd-jobs-table th:last-child,
#posDrawer .pd-jobs-table td:last-child { text-align: center; }
#posDrawer .pd-job-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #4E5969; }
#posDrawer .pd-job-dept { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
#posDrawer .pd-job-link { color: #1A73E8; text-decoration: none; }
#posDrawer .pd-job-link:hover { text-decoration: underline; }
#posDrawer .pd-job-empty { text-align: center; color: #8A919F; padding: 22px 10px; }
#posDrawer .pd-st {
  display: inline-flex; align-items: center; height: 20px; padding: 0 9px;
  border-radius: 10px; font-size: 11px; line-height: 1; font-weight: 500;
}
#posDrawer .pd-st-ok { background: #E8FFEA; color: #00B42A; }
#posDrawer .pd-st-blue { background: #E8F0FF; color: #1A73E8; }
#posDrawer .pd-st-warn { background: #FFF7E8; color: #FF7D00; }
#posDrawer .pd-st-gray,
#posDrawer .pd-st-vacant { background: #F2F3F5; color: #8A919F; }
#posDrawer .pd-st-off { background: #FFF1F0; color: #F53F3F; }
#posDrawer .pd-jobs-foot { margin-top: 14px; }
#posDrawer .pd-jobs-summary {
  font-size: 12px; color: #8A919F; padding: 10px 0;
  border-top: 1px dashed #EFF0F2;
}
#posDrawer .pd-jobs-summary b { color: #1F2329; font-weight: 600; }
#posDrawer .pd-emp-sub { font-size: 13px; font-weight: 600; color: #4E5969; margin: 10px 0 6px; }
