/* HR 智能工作台一期 · 薪资对账 原型样式
   仅用于业务确认，非最终视觉设计。依据材料 11（一期范围）与 12（验收口径）。 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: #f2f4f7; color: #1f2937; font-size: 14px; line-height: 1.6;
}
a { color: #1d5fbf; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- 顶栏 ---- */
.topbar {
  background: #23395d; color: #fff; padding: 0 24px; height: 56px;
  display: flex; align-items: center; gap: 20px;
}
.topbar .logo { font-size: 16px; font-weight: bold; letter-spacing: .5px; }
.topbar .phase {
  font-size: 11px; background: #3f5a8a; padding: 2px 8px; border-radius: 3px;
}
.topbar .who { margin-left: auto; font-size: 12px; color: #cbd5e1; }
.topbar .env {
  font-size: 11px; border: 1px solid #5b7bb0; padding: 2px 8px; border-radius: 3px;
}

/* ---- 左侧菜单 ---- */
.sidebar {
  position: fixed; left: 0; top: 56px; bottom: 0; width: 240px;
  background: #f7f8fa; border-right: 1px solid #e2e6ec; overflow-y: auto; z-index: 10;
}
.sidebar .menu-title {
  font-size: 11px; color: #6b7280; font-weight: bold; padding: 16px 16px 8px;
  text-transform: uppercase; letter-spacing: .5px;
}
.sidebar .menu-item {
  display: block; padding: 10px 16px; color: #374151; font-size: 13px;
  text-decoration: none; border-left: 3px solid transparent;
  transition: all .15s;
}
.sidebar .menu-item:hover { background: #eef0f4; text-decoration: none; }
.sidebar .menu-item.active {
  background: #fff; border-left-color: #23395d; color: #23395d; font-weight: bold;
}
.sidebar .menu-item .badge {
  float: right; font-size: 9.5px; padding: 1px 6px; border-radius: 3px;
  background: #e2e6ec; color: #6b7280; margin-top: 2px;
}
.sidebar .menu-item.active .badge { background: #eaf6ee; color: #24693f; }
.sidebar .menu-item.preview .badge { background: #fff8e1; color: #8a6100; }
.sidebar .menu-item.pool { color: #9aa5b4; }
.sidebar .menu-item.pool:hover { background: #f7f8fa; }

/* ---- 布局 ---- */
.wrap { max-width: 1180px; margin: 0 auto 0 240px; padding: 20px 24px 60px; }
.page-title { font-size: 19px; font-weight: bold; margin-bottom: 4px; }
.page-sub { color: #6b7280; font-size: 12.5px; margin-bottom: 18px; }
.card {
  background: #fff; border: 1px solid #e2e6ec; border-radius: 6px;
  padding: 20px; margin-bottom: 16px;
}
.card > h3 {
  font-size: 15px; margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid #eef0f4; display: flex; align-items: center; gap: 8px;
}
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.col { flex: 1; min-width: 300px; }
.muted { color: #6b7280; }
.small { font-size: 12px; }
.mono { font-family: Consolas, "Courier New", monospace; }

/* ---- 步骤条 ---- */
.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.steps .s {
  display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #e2e6ec;
  padding: 7px 14px; border-radius: 20px; font-size: 12.5px; color: #6b7280;
}
.steps .s b {
  width: 18px; height: 18px; border-radius: 50%; background: #d7dbe2; color: #fff;
  font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: normal;
}
.steps .s.on { border-color: #23395d; color: #23395d; font-weight: bold; }
.steps .s.on b { background: #23395d; }
.steps .s.done { color: #2f7a4d; border-color: #bfe0cc; }
.steps .s.done b { background: #2f7a4d; }
.steps .sep { color: #cbd5e1; }

/* ---- 上传区 ---- */
.drop {
  border: 2px dashed #c8cfda; border-radius: 6px; padding: 26px 20px; text-align: center;
  background: #fafbfc;
}
.drop.filled { border-style: solid; border-color: #bfe0cc; background: #f4faf6; text-align: left; }
.drop .ic { font-size: 26px; color: #9aa5b4; }
.drop .t { font-weight: bold; margin: 6px 0 3px; }
.drop .h { font-size: 12px; color: #6b7280; }
.filemeta { display: flex; align-items: center; gap: 10px; }
.filemeta .nm { font-weight: bold; }
.filemeta dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12.5px; margin-top: 8px; }
.filemeta dt { color: #6b7280; }

/* ---- 按钮 ---- */
.btn {
  display: inline-block; padding: 8px 18px; border-radius: 4px; border: 1px solid #c8cfda;
  background: #fff; color: #374151; cursor: pointer; font-size: 13px; font-family: inherit;
}
.btn:hover { background: #f4f6f9; text-decoration: none; }
.btn.primary { background: #23395d; border-color: #23395d; color: #fff; }
.btn.primary:hover { background: #2d4874; }
.btn.disabled { background: #f0f2f5; color: #9aa5b4; border-color: #e2e6ec; cursor: not-allowed; }
.btn.sm { padding: 4px 11px; font-size: 12px; }
.btnbar { display: flex; gap: 10px; align-items: center; margin-top: 4px; }

/* ---- 徽标 ---- */
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 3px; font-size: 11.5px;
  border: 1px solid transparent; white-space: nowrap;
}
.tag.ok   { background: #eaf6ee; color: #24693f; border-color: #bfe0cc; }
.tag.bad  { background: #fdecec; color: #a3282a; border-color: #f2c2c2; }
.tag.sonly{ background: #fff4e2; color: #955c11; border-color: #f0d3a4; }
.tag.bonly{ background: #eef1fd; color: #35459b; border-color: #c9d0f2; }
.tag.wait { background: #f3f4f6; color: #6b7280; border-color: #d7dbe2; }
.tag.ro   { background: #eef4fb; color: #1d5fbf; border-color: #c5d8f0; }

/* ---- 待确认标记（未确认口径，均引用清单 Q 编号） ---- */
.todo {
  display: inline-flex; align-items: center; gap: 4px; background: #fff8e1; color: #8a6100;
  border: 1px dashed #e0c26a; border-radius: 3px; padding: 0 6px; font-size: 11px;
  cursor: help; vertical-align: middle;
}
.todo::before { content: "?"; font-weight: bold; }
.cfg {
  display: inline-flex; align-items: center; gap: 4px; background: #eef4fb; color: #1d5fbf;
  border: 1px dashed #a9c6ea; border-radius: 3px; padding: 0 6px; font-size: 11px;
  cursor: help; vertical-align: middle;
}
.cfg::before { content: "⚙"; font-weight: bold; }
.note {
  background: #fff8e1; border: 1px solid #f0dfa8; border-left: 3px solid #d8a92a;
  padding: 10px 14px; border-radius: 4px; font-size: 12.5px; color: #6b5417; margin: 12px 0;
}
.note b { color: #8a6100; }
.warn {
  background: #fdecec; border: 1px solid #f2c2c2; border-left: 3px solid #c0392b;
  padding: 10px 14px; border-radius: 4px; font-size: 12.5px; color: #7d2b28; margin: 12px 0;
}
.info {
  background: #eef4fb; border: 1px solid #cfe0f5; border-left: 3px solid #1d5fbf;
  padding: 10px 14px; border-radius: 4px; font-size: 12.5px; color: #244a7a; margin: 12px 0;
}

/* ---- 统计卡 ---- */
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 150px; background: #fff; border: 1px solid #e2e6ec;
  border-radius: 6px; padding: 14px 16px; border-top: 3px solid #d7dbe2;
}
.stat .k { font-size: 12.5px; color: #6b7280; }
.stat .v { font-size: 26px; font-weight: bold; letter-spacing: -.5px; margin: 2px 0; }
.stat .u { font-size: 12px; color: #9aa5b4; font-weight: normal; }
.stat.ok    { border-top-color: #2f7a4d; }
.stat.ok    .v { color: #24693f; }
.stat.bad   { border-top-color: #c0392b; }
.stat.bad   .v { color: #a3282a; }
.stat.sonly { border-top-color: #d8a92a; }
.stat.sonly .v { color: #955c11; }
.stat.bonly { border-top-color: #4358c9; }
.stat.bonly .v { color: #35459b; }
.stat a { font-size: 12px; }

/* ---- 表格 ---- */
.tbl-wrap { overflow-x: auto; border: 1px solid #e2e6ec; border-radius: 6px; background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { padding: 8px 12px; border-bottom: 1px solid #eef0f4; text-align: left; }
table.tbl thead th {
  background: #f7f8fa; color: #4b5563; font-weight: bold; font-size: 12.5px;
  position: sticky; top: 0; white-space: nowrap; border-bottom: 1px solid #e2e6ec;
}
table.tbl tbody tr:hover { background: #fafbfc; }
table.tbl td.num { text-align: right; font-family: Consolas, "Courier New", monospace; }
table.tbl td.c, table.tbl th.c { text-align: center; }
table.tbl tr.r-bad   td { background: #fff8f8; }
table.tbl tr.r-sonly td { background: #fffcf5; }
table.tbl tr.r-bonly td { background: #fafbff; }
table.tbl tr.r-bad:hover td, table.tbl tr.r-sonly:hover td, table.tbl tr.r-bonly:hover td { background: #f4f6f9; }
table.tbl td.d-neg { color: #a3282a; font-weight: bold; }
table.tbl td.d-pos { color: #955c11; font-weight: bold; }
table.tbl tfoot td { background: #f7f8fa; font-weight: bold; border-top: 1px solid #e2e6ec; }

/* ---- 筛选条 ---- */
.filters {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid #e2e6ec; border-radius: 6px; padding: 12px 16px; margin-bottom: 12px;
}
.filters .lb { font-size: 12.5px; color: #6b7280; }
.chip {
  padding: 4px 12px; border: 1px solid #d7dbe2; border-radius: 14px; background: #fff;
  font-size: 12.5px; cursor: pointer; color: #4b5563; font-family: inherit;
}
.chip:hover { border-color: #9aa5b4; }
.chip.on { background: #23395d; border-color: #23395d; color: #fff; font-weight: bold; }
.filters input[type=text], .filters select {
  padding: 5px 10px; border: 1px solid #d7dbe2; border-radius: 4px; font-size: 12.5px;
  font-family: inherit; color: #374151;
}
.filters .rt { margin-left: auto; font-size: 12.5px; color: #6b7280; }

/* ---- 弹窗（下载 / 详情） ---- */
.mask {
  position: fixed; inset: 0; background: rgba(20,28,45,.45); display: none;
  align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 8px; width: 560px; max-width: 100%;
  max-height: 90vh; overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.modal .hd {
  padding: 14px 20px; border-bottom: 1px solid #eef0f4; font-weight: bold; font-size: 15px;
  display: flex; align-items: center;
}
.modal .hd .x { margin-left: auto; cursor: pointer; color: #9aa5b4; font-size: 18px; }
.modal .bd { padding: 18px 20px; }
.modal .ft { padding: 12px 20px; border-top: 1px solid #eef0f4; display: flex; gap: 10px; justify-content: flex-end; }
.opt { display: flex; gap: 10px; padding: 10px; border: 1px solid #e2e6ec; border-radius: 5px; margin-bottom: 8px; cursor: pointer; }
.opt:hover { background: #fafbfc; }
.opt .tt { font-weight: bold; font-size: 13px; }
.opt .dd { font-size: 12px; color: #6b7280; }

/* ---- 定义列表 / 字段映射 ---- */
table.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kv th, table.kv td { padding: 7px 10px; border-bottom: 1px solid #eef0f4; text-align: left; }
table.kv th { color: #6b7280; font-weight: normal; width: 34%; }
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: none; }

/* ---- 图例 / 页脚 ---- */
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: #6b7280; }
.foot {
  margin-top: 22px; padding-top: 14px; border-top: 1px solid #e2e6ec;
  font-size: 11.5px; color: #9aa5b4; line-height: 1.8;
}
.srcref { font-size: 11.5px; color: #9aa5b4; }
.srcref b { color: #6b7280; font-weight: normal; }

/* ---- 原型导航首页 ---- */
.navgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 12px; }
.navcard {
  background: #fff; border: 1px solid #e2e6ec; border-radius: 6px; padding: 15px 16px;
  display: block; color: inherit;
}
.navcard:hover { border-color: #23395d; text-decoration: none; box-shadow: 0 2px 8px rgba(35,57,93,.08); }
.navcard .n { font-size: 11px; color: #9aa5b4; font-family: Consolas, monospace; }
.navcard .t { font-weight: bold; font-size: 14px; margin: 3px 0 5px; }
.navcard .d { font-size: 12px; color: #6b7280; line-height: 1.55; }
.navcard .m { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }

@media print {
  .topbar nav, .btnbar, .filters .chip { display: none; }
  body { background: #fff; }
  .card { break-inside: avoid; }
}

/* ---- 处理器菜单（顶栏下拉 + 独立总览页共用） ---- */
.procmenu { position: relative; }
.procmenu > .trigger {
  color: #cbd5e1; padding: 6px 14px; border-radius: 4px; font-size: 13px;
  cursor: pointer; background: none; border: none; font-family: inherit; display: flex; align-items: center; gap: 5px;
}
.procmenu > .trigger:hover { background: #33496f; color: #fff; }
.procmenu > .trigger::after { content: "▾"; font-size: 10px; }
.procmenu .panel {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 6px; z-index: 40;
  background: #fff; color: #1f2937; border: 1px solid #e2e6ec; border-radius: 6px;
  box-shadow: 0 10px 30px rgba(20,28,45,.18); width: 640px; padding: 14px; max-height: 76vh; overflow-y: auto;
}
.procmenu.open .panel { display: block; }
.procmenu .panel-hd { font-size: 12px; color: #6b7280; margin-bottom: 10px; line-height: 1.6; }
.procmenu .panel-hd b { color: #374151; }
.proc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.proc-cat { break-inside: avoid; }
.proc-cat .cat-t {
  font-size: 11.5px; font-weight: bold; color: #23395d; margin-bottom: 6px;
  padding-bottom: 4px; border-bottom: 1px solid #eef0f4; display: flex; align-items: center; gap: 6px;
}
.proc-cat .cat-t .cnt { color: #9aa5b4; font-weight: normal; font-size: 10.5px; }
.proc-item {
  display: block; padding: 7px 9px; border-radius: 4px; margin-bottom: 3px; text-decoration: none;
  color: inherit; font-size: 12.5px;
}
.proc-item .nm { display: flex; align-items: center; gap: 6px; }
.proc-item .clue { font-size: 11px; color: #9aa5b4; margin-top: 2px; line-height: 1.5; }
.proc-item.active { background: #eaf6ee; }
.proc-item.active:hover { background: #d9efe0; }
.proc-item.preview { background: #fff8e1; }
.proc-item.preview:hover { background: #fbeec3; }
.proc-item.pool { cursor: default; color: #9aa5b4; }
.proc-item.pool .nm { color: #6b7280; }
.proc-item.pool:hover { background: #f7f8fa; }
.badge-mini {
  display: inline-block; font-size: 9.5px; padding: 0 5px; border-radius: 3px; line-height: 1.5;
  border: 1px solid transparent; font-weight: normal;
}
.badge-mini.active { background: #24693f; color: #fff; }
.badge-mini.preview { background: #d8a92a; color: #fff; }
.badge-mini.pool { background: #f0f2f5; color: #9aa5b4; border-color: #d7dbe2; }
.procmenu .panel-ft {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid #eef0f4; font-size: 11px; color: #9aa5b4;
}

/* ---- 全部场景总览页 ---- */
.proc-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.proc-card {
  background: #fff; border: 1px solid #e2e6ec; border-radius: 6px; padding: 13px 15px;
}
.proc-card.active { border-color: #bfe0cc; background: #f4faf6; }
.proc-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.proc-card .id { font-size: 10.5px; color: #9aa5b4; font-family: Consolas, monospace; }
.proc-card .nm { font-weight: bold; font-size: 13.5px; margin: 4px 0 5px; }
.proc-card .clue { font-size: 12px; color: #6b7280; line-height: 1.6; }
.proc-card .ref { font-size: 11px; color: #9aa5b4; margin-top: 6px; }
.proc-card .go { margin-top: 8px; }
@media (max-width: 720px) {
  .procmenu .panel { width: 90vw; }
  .proc-grid, .proc-board { grid-template-columns: 1fr; }
}

/* ---- 简易横向柱状图（人员成本分析用，纯 CSS，无第三方图表库） ---- */
.barchart { display: flex; flex-direction: column; gap: 10px; }
.barchart .row { display: grid; grid-template-columns: 120px 1fr 90px; align-items: center; gap: 10px; }
.barchart .lb { font-size: 12.5px; color: #374151; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barchart .track { background: #f0f2f5; border-radius: 4px; height: 20px; overflow: hidden; }
.barchart .fill { background: #23395d; height: 100%; border-radius: 4px 0 0 4px; transition: width .3s; }
.barchart .val { font-size: 12px; color: #6b7280; font-family: Consolas, "Courier New", monospace; }
