/* ============ 页面专用样式 ============ */

/* KPI 图标 */
.kpi-icon {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.kpi-icon.blue { background: var(--brand-soft); }
.kpi-icon.cyan { background: var(--cyan-soft); }
.kpi-icon.red { background: var(--red-soft); }
.kpi-icon.purple { background: var(--purple-soft); }
.kpi-icon.blue span, .kpi-icon.cyan span { }

/* 待办 */
.todo-item {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 18px;
  border-bottom: 1px solid #f2f4f7;
  cursor: pointer; transition: background .1s;
}
.todo-item:last-child { border-bottom: none; }
.todo-item:hover { background: #f7f9fc; }
.todo-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.todo-dot.high { background: var(--red); }
.todo-dot.mid { background: var(--amber); }
.todo-dot.low { background: var(--blue); }
.todo-dot.low { background: var(--brand); }

/* 横向条形 */
.hbar-row {
  display: flex; align-items: center; gap: 11px;
  padding: 6px 0; font-size: 13px;
}
.hbar-label { width: 92px; flex-shrink: 0; color: var(--text-2); }
.hbar-track { flex: 1; height: 8px; background: #eef0f4; border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--brand); border-radius: 4px; transition: width .4s; }
.hbar-val {
  width: 72px; text-align: right; flex-shrink: 0;
  font-variant-numeric: tabular-nums; font-weight: 500;
  font-size: 12.5px;
}

/* 趋势图 */
.trend-chart {
  display: flex; gap: 10px; align-items: flex-end;
  height: 168px; padding-bottom: 4px; position: relative;
}
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.trend-bars {
  display: flex; gap: 4px; align-items: flex-end;
  height: 132px; width: 100%; justify-content: center;
}
.trend-bar {
  width: 17px; border-radius: 4px 4px 0 0;
  position: relative; min-height: 2px;
  display: flex; align-items: flex-start; justify-content: center;
  transition: height .4s;
}
.trend-bar.in { background: var(--brand); }
.trend-bar.out { background: var(--red); opacity: .8; }
.trend-bar span {
  font-size: 10.5px; color: var(--text-2);
  position: absolute; top: -15px; font-variant-numeric: tabular-nums;
}
.trend-label { font-size: 11.5px; color: var(--text-3); margin-top: 7px; white-space: nowrap; }
.trend-legend {
  position: absolute; top: -4px; right: 0;
  display: flex; gap: 12px; font-size: 11.5px; color: var(--text-3);
}
.trend-legend span { display: flex; align-items: center; gap: 5px; }
.trend-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* 组织树 */
.tree-node { border-bottom: 1px solid #f2f4f7; }
.tree-node:last-child { border-bottom: none; }
.tree-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 18px; cursor: pointer;
  transition: background .1s;
}
.tree-row:hover { background: #f7f9fc; }
.tree-caret {
  width: 14px; flex-shrink: 0; color: var(--text-3);
  font-size: 10px; transition: transform .15s;
}
.tree-caret.open { transform: rotate(90deg); }
.tree-icon { color: var(--brand); font-size: 13px; }
.tree-name { font-size: 13.5px; font-weight: 500; }
.tree-children { padding-left: 26px; background: #fcfcfd; }
.tree-members {
  padding: 8px 18px 13px 46px;
  display: flex; flex-wrap: wrap; gap: 7px;
  background: #fcfcfd;
}
.member-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer; max-width: 190px;
  transition: border-color .13s, box-shadow .13s;
}
.member-chip:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid #f2f4f7;
  cursor: pointer;
}
.member-row:last-child { border-bottom: none; }
.member-row:hover { background: #f7f9fc; }

/* 看板 */
.kanban {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; align-items: start;
}
.kanban-col {
  background: #eef0f4; border-radius: var(--radius-lg);
  padding: 11px; min-height: 300px;
}
.kanban-head {
  display: flex; align-items: center; gap: 7px;
  padding: 2px 4px 11px;
  font-size: 13px; font-weight: 600;
}
.kdot { width: 7px; height: 7px; border-radius: 50%; }
.kdot.gray { background: #b4b2a9; }
.kdot.amber { background: var(--amber); }
.kdot.green { background: var(--green); }
.kdot.red { background: var(--red); }
.kdot.blue { background: var(--brand); }
.kcount {
  margin-left: auto; background: rgba(0,0,0,.07);
  border-radius: 9px; padding: 0 7px;
  font-size: 11.5px; font-weight: 500; color: var(--text-2);
}
.kanban-body { display: flex; flex-direction: column; gap: 9px; }

.kcard {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .13s, transform .13s;
}
.kcard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.kcard-top { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; }
.kcard-emp { display: flex; align-items: center; gap: 8px; }
.kcard-desc {
  color: var(--text-2); font-size: 12.5px; margin-top: 8px;
  line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.kcard-foot {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-3); font-size: 11.5px;
  margin-top: 9px; padding-top: 8px;
  border-top: 1px solid #f2f4f7;
}

/* 文件行 */
.file-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 7px;
}
.file-ico { font-size: 15px; }

/* 时间线 */
.timeline-item {
  display: flex; gap: 11px;
  padding: 10px 0;
  position: relative;
}
.timeline-item:not(:last-child)::before {
  content: ''; position: absolute;
  left: 4px; top: 26px; bottom: -4px;
  width: 1px; background: var(--border);
}
.tl-dot {
  width: 9px; height: 9px; border-radius: 50%;
  margin-top: 6px; flex-shrink: 0; z-index: 1;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
.tl-dot.green { background: var(--green); }
.tl-dot.amber { background: var(--amber); }
.tl-dot.red { background: var(--red); }
.tl-dot.gray { background: #c8ccd4; }
.tl-dot.blue { background: var(--brand); }

/* 上传框 */
.upload-box {
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 22px; text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color .13s, background .13s;
}
.upload-box:hover { border-color: var(--brand); background: var(--brand-soft); }

/* 新人行 */
.nc-row {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 18px;
  border-bottom: 1px solid #f2f4f7;
  cursor: pointer; transition: background .1s;
}
.nc-row:last-child { border-bottom: none; }
.nc-row:hover { background: #f7f9fc; }

/* 流程行 */
.flow-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  margin-bottom: 8px;
  cursor: pointer; transition: border-color .13s, background .13s;
}
.flow-row:hover { border-color: var(--brand); background: #f7f9fc; }

/* 配置项 */
.cfg-item {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid #f2f4f7;
}
.cfg-item:last-child { border-bottom: none; }
.cfg-num {
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}

/* 代码 */
code {
  background: rgba(20,28,45,.06);
  padding: 1px 5px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr !important; }
  .kanban { grid-template-columns: repeat(2, 1fr); }
}
/* ============ 人员流动 ============ */
.net-row {
  display: flex; gap: 20px; align-items: stretch;
  padding: 4px 0 8px;
}
.net-item { flex: 1; min-width: 0; }

.kpi-icon.green { background: var(--green-soft); }
.kpi-icon.red { background: var(--red-soft); }
.kpi-icon.amber { background: var(--amber-soft); }

@media (max-width: 1180px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .net-row { flex-direction: column; }
  .net-row > div[style*="width:1px"] { display: none; }
}

/* ============ 待入职管理 ============ */
.pipe { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pipe-step { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 8px; }
.pipe-step.green { background: var(--green-soft); }
.pipe-step.blue { background: var(--brand-soft); }
.pipe-step.amber { background: var(--amber-soft); }
.pipe-step.gray { background: #f1f2f5; }
.pipe-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.pipe-step.green .pipe-dot { background: var(--green); }
.pipe-step.blue .pipe-dot { background: var(--brand); }
.pipe-step.amber .pipe-dot { background: var(--amber); }
.pipe-step.gray .pipe-dot { background: #b4b2a9; }
.pipe-arrow { color: var(--text-3); font-size: 15px; }

.pipe-mini { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.pm {
  font-size: 11px; padding: 2px 6px; border-radius: 5px;
  background: #f1f2f5; color: var(--text-3); white-space: nowrap;
}
.pm.on { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.pipe-mini i { color: var(--text-3); font-style: normal; font-size: 10px; }

/* 字段映射预览 */
.map-table {
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; max-height: 300px; overflow-y: auto;
}
.map-row {
  display: grid; grid-template-columns: 92px 1fr 22px 1fr;
  gap: 8px; align-items: center;
  padding: 8px 12px; font-size: 12.5px;
  border-bottom: 1px solid #f2f4f7;
}
.map-row:last-child { border-bottom: none; }
.map-row:nth-child(odd) { background: var(--surface-2); }
.map-field { color: var(--text-3); font-weight: 500; }
.map-src { color: var(--text-3); word-break: break-all; }
.map-arrow { color: var(--text-3); text-align: center; }
.map-dst { color: var(--text); font-weight: 500; word-break: break-all; }

/* 首页待入职区块 */
.pending-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 18px; border-bottom: 1px solid #f2f4f7;
  cursor: pointer; transition: background .1s;
}
.pending-item:last-child { border-bottom: none; }
.pending-item:hover { background: #f7f9fc; }

/* ============ 备案信息条 ============
   公安联网备案号必须展示在网站底部（公安部要求） */
.beian-bar {
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 10.5px;
  line-height: 1.7;
  color: #7d879b;
  text-align: center;
  flex-shrink: 0;
}
.beian-bar a { color: #9aa4b5; text-decoration: none; }
.beian-bar a:hover { color: #c3cad8; text-decoration: underline; }
.beian-bar img { vertical-align: -2px; border-radius: 2px; }
.beian-sep { margin: 0 6px; opacity: .5; }

/* 内容区底部备案条 */
.beian-foot {
  margin-top: 22px;
  padding: 14px 10px 6px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.9;
}
.beian-foot a { color: var(--text-2); text-decoration: none; }
.beian-foot a:hover { color: var(--brand); text-decoration: underline; }
.beian-foot img { vertical-align: -2px; margin-right: 4px; }
