/* ===========================================================
   投标管理系统 · 样式表
   设计基调：深色侧栏 + 浅色内容区，红=涨/危险，绿=跌/正常（中国市场惯例）
   =========================================================== */

:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --side: #F0F7FF;
  --side-hover: #e3edfa;
  --line: #e3e8ef;
  --text: #1c2635;
  --text-2: #5a6779;
  --text-3: #8b96a5;

  --brand: #1f6feb;
  --brand-d: #1a5cc4;
  --grn: #17924f;
  --red: #d92d20;
  --org: #e07b12;
  --gold: #b8860b;
  --pur: #7c4dff;
  --teal: #0d8f8f;

  --r: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- 布局 ---------------- */

.app {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  background: var(--side);
  color: #55647a;
  padding: 18px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.side-brand {
  padding: 0 18px 18px;
  border-bottom: 1px solid rgba(28,38,53,.08);
  margin-bottom: 12px;
}

.side-brand h1 {
  font-size: 15px;
  margin: 0 0 4px;
  color: #1c2635;
  font-weight: 600;
  letter-spacing: .3px;
}

.side-brand p {
  margin: 0;
  font-size: 11px;
  color: #8b96a5;
}

.nav { list-style: none; margin: 0; padding: 0; }

.nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  color: #44536a;
  font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: background .12s;
}

.nav a:hover {
  background: var(--side-hover);
  text-decoration: none;
}

.nav a.active {
  background: #ffffff;
  border-left-color: var(--brand);
  color: var(--brand);
  font-weight: 500;
}

.nav .ic { width: 16px; text-align: center; opacity: .85; }

.nav-sep {
  padding: 14px 18px 6px;
  font-size: 10.5px;
  letter-spacing: 1px;
  color: #93a1b3;
  text-transform: uppercase;
}

.side-user {
  margin-top: 18px;
  padding: 14px 18px 0;
  border-top: 1px solid rgba(28,38,53,.08);
  font-size: 12.5px;
}

.side-user .who { color: #1c2635; font-weight: 500; }
.side-user .role { color: #8b96a5; font-size: 11px; }
.side-user button {
  margin-top: 10px;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(28,38,53,.18);
  color: #55647a;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.side-user button:hover { background: rgba(28,38,53,.06); }

.main { padding: 24px 28px 60px; max-width: 1500px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-head h2 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 600;
}

.page-head p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}

/* ---------------- 企业形象横幅 ---------------- */

.hero-banner {
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
  line-height: 0;
  background: #dfe6ee;
}

.hero-banner img {
  display: block;
  width: 100%;
  height: 232px;
  object-fit: cover;
  object-position: center 42%;
}

@media (max-width: 900px) {
  .hero-banner img { height: 150px; object-position: center 40%; }
}

/* ---------------- 卡片 ---------------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h3 .sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
}

/* ---------------- 指标卡 ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.stat .k { font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.stat .v { font-size: 24px; font-weight: 600; line-height: 1.15; }
.stat .x { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

.stat.s-blue .v { color: var(--brand); }
.stat.s-red .v { color: var(--red); }
.stat.s-grn .v { color: var(--grn); }
.stat.s-org .v { color: var(--org); }
.stat.s-gold .v { color: var(--gold); }

/* ---------------- 表格 ---------------- */

.tw { overflow-x: auto; }

/* 固定表宽 + 列宽可控：启用拖动调宽后由 JS 写死 table 宽度，避免列宽被内容挤压 */
table.tb.fixed { table-layout: fixed; }
table.tb.fixed td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.tb.fixed td.wrap { white-space: normal; }

/* 台账汇总栏（2026-10-15 用户指令新增）
   黏底 + 加粗 + 浅底色，滚动长列表时汇总始终可见；z-index 低于表头避免遮挡 */
/* class 在 <tr class="sum-row"> 上，不在 <tfoot> 上 —— 选择器要带 tfoot > tr */
table.tb tfoot > tr.sum-row th,
table.tb tfoot > tr.sum-row td {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #f4f6fa;
  border-top: 2px solid var(--line);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* 悬停高亮（table.tb tr:hover td）会盖掉汇总底色，这里压回去 */
table.tb tfoot > tr.sum-row:hover td { background: #f4f6fa; }
table.tb tfoot > tr.sum-row td:first-child {
  color: var(--text-3);
  font-weight: 500;
}

table.tb {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.tb th {
  text-align: left;
  padding: 9px 10px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  color: var(--text-2);
  font-size: 12px;
  white-space: nowrap;
}

/* 表头可拖动调宽 */
table.tb th.col-resizable { position: relative; padding-right: 16px; }
table.tb th .col-resizer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 7px;
  cursor: col-resize;
  user-select: none;
}
table.tb th .col-resizer::after {
  content: '';
  position: absolute;
  top: 22%; bottom: 22%; right: 3px;
  width: 1px;
  background: #cfd8e3;
  transition: background .15s;
}
table.tb th.col-resizable:hover .col-resizer::after { background: var(--brand); }
body.col-dragging { cursor: col-resize; user-select: none; }
body.col-dragging * { cursor: col-resize !important; }

/* 列管理面板 */
.colpanel {
  width: 372px; max-width: calc(100vw - 30px);
  padding: 0;
  display: flex; flex-direction: column;
  max-height: min(560px, calc(100vh - 120px));
}
.colpanel .cp-head {
  display: flex; align-items: baseline; gap: 10px;
  padding: 12px 14px 0;
  font-size: 14px;
}
.colpanel .cp-head .muted { font-size: 11.5px; }
.colpanel .cp-body {
  overflow-y: auto;
  padding: 4px 10px 8px;
  flex: 1 1 auto;
}
.colpanel .cp-group { margin-top: 8px; }
.colpanel .cp-group + .cp-group { border-top: 1px dashed var(--line); padding-top: 4px; }
.colpanel .cp-group-head {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 4px 2px;
}
.colpanel .cp-group-name {
  font-size: 12px; font-weight: 600; color: var(--text);
}
.colpanel .cp-group-hint { font-size: 11px; flex: 1; }
.colpanel .cp-mini {
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  border-radius: 5px; font-size: 11px; line-height: 1;
  padding: 3px 6px; cursor: pointer;
}
.colpanel .cp-mini:hover { border-color: var(--brand); color: var(--brand); }
.colpanel .cp-item {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 4px; font-size: 13px;
  border-radius: 6px;
}
.colpanel .cp-item:hover { background: #f5f8fc; }
.colpanel .cp-item.cp-drag { background: #eef4ff; }
.colpanel .cp-item .cp-name { flex: 1; cursor: move; }
.colpanel .cp-item .cp-btns { display: flex; gap: 4px; }
.colpanel .cp-btn {
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  border-radius: 5px; width: 24px; height: 22px; line-height: 1;
  font-size: 12px; cursor: pointer; padding: 0;
}
.colpanel .cp-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.colpanel .cp-btn:disabled { opacity: .35; cursor: not-allowed; }
.colpanel .cp-foot {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--line);
  background: #fafbfd; border-radius: 0 0 var(--r) var(--r);
}

table.tb td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.tb tr:hover td { background: #fafbfd; }
table.tb tr:last-child td { border-bottom: none; }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mid, th.mid { text-align: center; }

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: 13px;
}

/* ---------------- 标签 ---------------- */

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  line-height: 1.6;
  white-space: nowrap;
  font-weight: 500;
}

.t-gray { background: #eef1f6; color: #55637a; }
.t-blue { background: #e7f0ff; color: #1a5cc4; }
.t-grn  { background: #e4f6ec; color: #0f7a42; }
.t-red  { background: #fdecea; color: #c02418; }
.t-org  { background: #fdf1e2; color: #b5620c; }
.t-gold { background: #faf3dd; color: #92700a; }
.t-pur  { background: #f1ebff; color: #5b32c9; }
.t-teal { background: #e2f5f5; color: #0a7373; }

.d-over { background: #eef1f6 !important; color: #8b96a5 !important; }
.d-red  { background: #fdecea !important; color: #c02418 !important; font-weight: 600; }
.d-org  { background: #fdf1e2 !important; color: #b5620c !important; font-weight: 500; }
.d-grn  { background: #e4f6ec !important; color: #0f7a42 !important; }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
}

.btn:hover { background: #f7f9fc; border-color: #d3dae5; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
}
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }

.btn-ghost { background: #f7f9fc; }

.btn-danger { color: var(--red); border-color: #f5cdc9; }
.btn-danger:hover { background: #fdecea; }

.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-block { width: 100%; }

/* 文字按钮：用在表单里做「就地新增」这类轻量入口（2026-10-14 新增） */
.linkbtn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.linkbtn:hover { color: var(--brand-d); }

/* ---------------- 表单 ---------------- */

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 5px;
  font-weight: 500;
}

.field .hint { color: var(--text-3); font-weight: 400; }

input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=date], input[type=number], select, textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #d5dce6;
  border-radius: 7px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31,111,235,.1);
}

textarea { resize: vertical; min-height: 68px; }

.field-error { color: var(--red); font-size: 12px; margin-top: 4px; min-height: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
/* .grid3 此前只在窄屏媒体查询里出现过，没有基础规则 —— 用它的容器一律竖排。
   2026-10-23 补齐：新建项目表单的省市区、负责人三联、代理机构三联都依赖它。 */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }

.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row .btn { flex-shrink: 0; }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 13px;
}
.check-row input { width: auto; }

/* ---------------- 登录页 ---------------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(140deg, #1b2432 0%, #24354d 100%);
}

.auth-card {
  background: #fff;
  border-radius: 14px;
  padding: 30px 32px 26px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-logo {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: linear-gradient(135deg, #1f6feb, #0d8f8f);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px;
  flex-shrink: 0;
}

.auth-brand h1 { font-size: 17px; margin: 0; font-weight: 600; }
.auth-brand p { margin: 2px 0 0; font-size: 12px; color: var(--text-3); }

.auth-tabs {
  display: flex;
  gap: 4px;
  background: #f1f4f9;
  padding: 3px;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* 2026-11-08 新增：登录页有两组 tab（登录/注册 + 密码/验证码），
   用分组标题把「登录方式」和「注册」区分开，避免用户分不清。 */
.auth-group {
  font-size: 12px;
  color: var(--text-2);
  margin: 0 0 6px;
  letter-spacing: .3px;
}

/* 「登录/注册」那组在密码模式下只剩一个按钮，宽度收窄不显得空 */
.auth-tabs[data-mode-group] {
  margin-bottom: 14px;
}
.auth-tabs[data-mode-group] .auth-tab:only-child {
  flex: 0 0 auto;
  min-width: 96px;
}

.auth-tab {
  flex: 1;
  padding: 7px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-2);
  cursor: pointer;
}

.auth-tab.active {
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.07);
}

.auth-msg {
  font-size: 12.5px;
  padding: 0;
  margin-bottom: 12px;
  min-height: 0;
}

.auth-msg.err { color: var(--red); background: #fdecea; padding: 8px 11px; border-radius: 7px; }
.auth-msg.ok  { color: var(--grn); background: #e4f6ec; padding: 8px 11px; border-radius: 7px; }

.auth-foot {
  margin: 16px 0 0;
  font-size: 11.5px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.7;
}

/* ---------------- 弹层 ---------------- */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(16,24,40,.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
  overflow-y: auto;
  z-index: 100;
}

.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }

.modal-head .x {
  border: none; background: none; font-size: 22px; line-height: 1;
  color: var(--text-3); cursor: pointer; padding: 0 4px;
}
.modal-head .x:hover { color: var(--text); }

.modal-body { padding: 20px 22px; max-height: calc(100vh - 200px); overflow-y: auto; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
  border-radius: 0 0 12px 12px;
}

/* ---------------- 其他 ---------------- */

.section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: .3px;
  margin: 18px 0 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}
.section-title:first-child { margin-top: 0; }

.filemark {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #e7f0ff;
  color: #1a5cc4;
  font-size: 11px;
  cursor: pointer;
  vertical-align: middle;
}
.filemark:hover { background: #d6e6ff; }

.warn {
  background: #fdf6e8;
  border: 1px solid #f0dcb0;
  border-left: 3px solid var(--org);
  padding: 11px 14px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 14px;
}

.info {
  background: #eef5ff;
  border: 1px solid #cfe0fa;
  border-left: 3px solid var(--brand);
  padding: 11px 14px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 14px;
}

.ok {
  background: #eaf7f0;
  border: 1px solid #bfe6d1;
  border-left: 3px solid var(--grn);
  padding: 11px 14px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 14px;
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.toolbar input[type=text] { max-width: 260px; }
.toolbar select { max-width: 170px; }
.toolbar .spacer { flex: 1; }

/* ---- 项目台账 · 高级搜索（字段 + 运算符 + 值） ---- */
.adv-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 300px;
}
.adv-search .rule-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.adv-search .rule-row select { max-width: 140px; }
.adv-search .rule-row input[type=text] { max-width: 180px; flex: 0 1 auto; }
.rule-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rule-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #eaf1f8;
  border: 1px solid #cfdeed;
  color: #2c4a68;
  border-radius: 999px;
  padding: 2px 6px 2px 10px;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: nowrap;
}
.rule-chip button {
  border: none;
  background: none;
  cursor: pointer;
  color: #7b8ea3;
  font-size: 12px;
  padding: 0 4px;
  line-height: 1;
  border-radius: 50%;
}
.rule-chip button:hover { color: #c0392b; background: #e8edf3; }

.loading { text-align: center; padding: 50px; color: var(--text-3); }

.spin {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid #d5dce6;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: sp .7s linear infinite;
  vertical-align: -3px;
}

@keyframes sp { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  z-index: 200;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.err { background: var(--red); }

.muted { color: var(--text-3); font-size: 12.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.mb0 { margin-bottom: 0; }

.row-actions { display: flex; gap: 6px; white-space: nowrap; }

@media (max-width: 1180px) {
  .grid4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; }
  .nav { display: flex; flex-wrap: wrap; }
  .nav a { border-left: none; border-bottom: 3px solid transparent; }
  .nav a.active { border-left: none; border-bottom-color: var(--brand); }
  .nav-sep { display: none; }
  .main { padding: 18px 14px 50px; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
}

/* ---------- 待审批页 ---------- */

.pending-body { text-align: center; padding: 6px 0 2px; }

.pending-icon {
  width: 62px; height: 62px; margin: 4px auto 14px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; line-height: 1;
}
.pending-icon.wait { background: #fff4e0; color: var(--org); }
.pending-icon.bad  { background: #fdecea; color: var(--red); }

.pending-title { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.pending-desc { font-size: 13px; color: var(--text-2); margin: 0 0 18px; line-height: 1.7; }

.pending-info {
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 13px; margin-bottom: 18px; text-align: left;
}
.pending-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; padding: 4px 0;
}
.pending-row span { color: var(--text-3); }
.pending-row b { color: var(--text); font-weight: 600; text-align: right; }

.pending-actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }

/* ---- 项目台账 · 两部分切换（跟踪和正在执行 / 历史项目 / 全部） ---- */
.group-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.group-tabs .gtab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13.5px;
  padding: 8px 14px;
  margin-bottom: -1px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background .12s, color .12s, border-color .12s;
}
.group-tabs .gtab:hover { background: #eef2f8; color: var(--text); }
.group-tabs .gtab b {
  font-weight: 600;
  font-size: 12px;
  background: #e7ecf3;
  color: var(--text-2);
  border-radius: 20px;
  padding: 1px 8px;
  line-height: 1.6;
}
.group-tabs .gtab.on {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}
.group-tabs .gtab.on b { background: var(--brand); color: #fff; }

/* ── 看板「项目阶段分布」：四组横向排开（≤1180px 两列，≤900px 单列） ── */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.stage-col { min-width: 0; }
.stage-col-head { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.stage-col-head b { color: var(--text); }
.stage-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.stage-chip {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 96px;
}
.stage-chip .lbl { font-size: 11.5px; color: var(--text-2); }
.stage-chip .num { font-size: 19px; font-weight: 600; }
@media (max-width: 1180px) {
  .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .stage-grid { grid-template-columns: 1fr; }
}

/* ── 档案表「序号」列：窄列、弱化、等宽数字（采购单位 / 竞对与渠道） ── */
table.tb th.col-seq,
table.tb td.col-seq {
  width: 58px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── 批量导入明细列表：限高滚动 + 表头吸顶（长列表逐条核对时用） ── */
.tw-scroll { max-height: 560px; overflow: auto; }
.tw-scroll thead th {
  position: sticky;
  top: 0;
  background: #f7f9fc;
  z-index: 2;
  box-shadow: inset 0 -1px 0 var(--line);
}
