/* ============================================================
   招采监控系统 · 极简清爽版
   设计原则：留白充足 / 层级分明 / 渐进披露 / 一屏看到数据
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --bg:            #f7f8fa;
  --surface:       #ffffff;
  --surface-2:     #fbfcfd;
  --border:        #e8ebf0;
  --border-strong: #d7dce4;

  --text:          #1a1d23;
  --text-2:        #5a6272;
  --text-3:        #8b94a5;

  --primary:       #2f6bff;
  --primary-hover: #1f56e0;
  --primary-soft:  #eef3ff;

  --success:       #12a150;
  --success-soft:  #e8f7ee;
  --warning:       #d98200;
  --warning-soft:  #fff5e5;
  --danger:        #d92d20;
  --danger-soft:   #fdecea;
  --info:          #0b7fd4;
  --info-soft:     #e8f4fd;

  --radius:    10px;
  --radius-sm:  7px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow:    0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

  --sidebar-w: 232px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: 1.3; }
p { margin: 0; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 3. 滚动条 ---------- */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfd5df; border-radius: 5px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b3bccb; background-clip: content-box; }

/* ---------- 4. 布局骨架 ---------- */
.app {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.sidebar-brand {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  flex-shrink: 0;
  line-height: 0;
}
.brand-logo svg { display: block; }

.brand-text { min-width: 0; }
.brand-name { font-size: 13.5px; font-weight: 650; color: var(--text); white-space: nowrap; letter-spacing: -.2px; }
.brand-sub  { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 16px;
}

.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: .4px;
  padding: 12px 8px 6px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: background .14s, color .14s;
  margin-bottom: 1px;
}
.nav-item:hover { background: #f2f4f8; color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.nav-icon {
  width: 17px; height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .85;
}
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.status-mini {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-3);
  padding: 4px 2px;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-3);
}
.dot.on   { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.dot.off  { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.dot.err  { background: var(--danger);  box-shadow: 0 0 0 3px var(--danger-soft); }

/* 主内容区 */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 5px;
  border-radius: 20px;
  background: #f2f4f8;
  font-size: 12.5px;
  color: var(--text-2);
  border: 0;
}
.user-chip:hover { background: #e9edf3; }
.user-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
}

.content {
  flex: 1;
  padding: 20px 24px 40px;
  min-width: 0;
}

.view { display: none; }
.view.active { display: block; }

/* ---------- 5. 页面标题 ---------- */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.page-head-main { min-width: 0; padding-top: 5px; }
.page-title { font-size: 19px; font-weight: 650; letter-spacing: -.2px; }
.page-desc { font-size: 13px; color: var(--text-3); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- 6. 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 14px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.card-title { font-size: 14px; font-weight: 600; }
.card-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }

/* ---------- 7. 指标卡 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }

.stat-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.stat-value {
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -.6px;
  margin-top: 5px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat-hint { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.stat-value.is-primary { color: var(--primary); }
.stat-value.is-success { color: var(--success); }
.stat-value.is-warning { color: var(--warning); }
.stat-value.is-danger  { color: var(--danger); }

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all .14s;
}
.btn:hover { background: #f6f8fb; color: var(--text); border-color: #c8cfda; }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }

.btn-ghost { border-color: transparent; background: transparent; color: var(--text-3); }
.btn-ghost:hover { background: #f2f4f8; border-color: transparent; color: var(--text); }

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

.btn-icon {
  width: 30px; height: 30px;
  padding: 0;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  border: 0;
  background: transparent;
  color: var(--text-3);
}
.btn-icon:hover { background: #f2f4f8; color: var(--text); }
.btn-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 9. 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.input, .select, .textarea {
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  transition: border-color .14s, box-shadow .14s;
  outline: none;
}
.textarea { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.5; }

.input:hover, .select:hover, .textarea:hover { border-color: #c2c9d5; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}
.input::placeholder { color: #aab2c0; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' stroke='%238b94a5' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

/* 搜索行 */
.search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap .input { padding-left: 34px; height: 36px; }
.search-input-wrap svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  stroke: var(--text-3); fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}

/* 筛选网格 */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 11px;
}
.filter-grid .field-wide { grid-column: span 2; }

/* 高级筛选折叠区 */
.advanced-filters {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .28s ease, opacity .2s ease, margin .28s ease;
  margin-top: 0;
}
.advanced-filters.open {
  max-height: 1800px;
  opacity: 1;
  margin-top: 12px;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 12.5px;
  padding: 5px 8px;
  border-radius: 6px;
  margin-top: 10px;
}
.filter-toggle:hover { background: #f2f4f8; color: var(--text-2); }
.filter-toggle svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .22s;
}
.filter-toggle.open svg { transform: rotate(180deg); }

/* 已选筛选标签 */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}
.chip button {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: .6;
  display: grid;
  place-items: center;
  padding: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
}
.chip button:hover { opacity: 1; background: rgba(47,107,255,.14); }

/* 标签页 */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  overflow-x: auto;
}
.tab {
  padding: 9px 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-3);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ---------- 10. 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th {
  text-align: left;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
table.data td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f2f5;
  vertical-align: top;
  color: var(--text-2);
}
table.data tbody tr:hover { background: #fafbfd; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.strong { color: var(--text); font-weight: 550; }

.cell-title {
  color: var(--text);
  font-weight: 550;
  display: block;
  margin-bottom: 2px;
  line-height: 1.45;
}
.cell-sub { font-size: 11.5px; color: var(--text-3); }

/* 空状态 */
.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-3);
}
.empty svg { width: 34px; height: 34px; stroke: #cfd5df; fill: none; stroke-width: 1.4; margin-bottom: 10px; }
.empty-title { font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.empty-desc { font-size: 12.5px; margin-top: 3px; }

/* 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.pager-info { font-size: 12.5px; color: var(--text-3); }
.pager-btns { display: flex; gap: 5px; align-items: center; }
.pager-btn {
  min-width: 30px; height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  display: grid; place-items: center;
}
.pager-btn:hover:not(:disabled) { background: #f6f8fb; border-color: #c8cfda; }
.pager-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 11. 徽章 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 550;
  white-space: nowrap;
  background: #f2f4f8;
  color: var(--text-2);
}
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.danger  { background: var(--danger-soft);  color: var(--danger); }
.badge.info    { background: var(--info-soft);    color: var(--info); }

/* 分数 */
.score {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 23px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  background: #f2f4f8;
  color: var(--text-2);
}
.score.high { background: var(--danger-soft); color: var(--danger); }
.score.mid  { background: var(--warning-soft); color: var(--warning); }
.score.low  { background: var(--success-soft); color: var(--success); }

/* ---------- 12. 数据集卡片 ---------- */
.dataset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 11px;
}

.dataset-card {
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: all .15s;
  text-align: left;
  width: 100%;
  display: block;
}
.dataset-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.dataset-card.active {
  border-color: var(--primary);
  background: linear-gradient(180deg, #f7faff, #fff);
  box-shadow: 0 0 0 3px rgba(47,107,255,.09);
}

.dataset-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dataset-count {
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -.5px;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.dataset-card.active .dataset-count { color: var(--primary); }
.dataset-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ---------- 13. 详情面板 ---------- */
.detail-panel {
  position: fixed;
  top: 0; right: 0;
  width: 440px; max-width: 92vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(16,24,40,.10);
  transform: translateX(102%);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.detail-panel.open { transform: translateX(0); }

.detail-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.detail-body { flex: 1; overflow-y: auto; padding: 16px 18px 32px; }

.detail-section { margin-bottom: 20px; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section-title {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--text-3);
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 9px;
}

.kv-row {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f2f4f7;
  font-size: 13px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-key { flex: 0 0 92px; color: var(--text-3); font-size: 12.5px; }
.kv-val { flex: 1; min-width: 0; color: var(--text); word-break: break-word; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .32);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
  z-index: 55;
}
.overlay.show { opacity: 1; pointer-events: auto; }

/* ---------- 14. 趋势条 ---------- */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 56px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-label { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 7px; background: #f0f2f6; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width .4s ease; }
.bar-fill.warn { background: var(--warning); }
.bar-fill.danger { background: var(--danger); }
.bar-fill.success { background: var(--success); }
.bar-value { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 550; }

/* 迷你柱状图 */
.sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 76px;
  padding-top: 6px;
}
.spark-col {
  flex: 1;
  min-width: 4px;
  background: #dfe8fb;
  border-radius: 3px 3px 0 0;
  transition: background .15s;
  position: relative;
  min-height: 2px;
}
.spark-col:hover { background: var(--primary); }
.spark-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); margin-top: 5px; }

/* ---------- 15. 提示条 ---------- */
.notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.notice-bar svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.notice-bar.info    { background: var(--info-soft);    color: #0a6bab; }
.notice-bar.warning { background: var(--warning-soft); color: #95600a; }
.notice-bar.danger  { background: var(--danger-soft);  color: #b4271c; }
.notice-bar.success { background: var(--success-soft); color: #0d8043; }

/* ---------- 16. Toast ---------- */
.toast-host {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  padding: 10px 16px;
  border-radius: 8px;
  background: #1f2430;
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease;
  max-width: 420px;
}
.toast.success { background: #0f7539; }
.toast.error   { background: #b4271c; }
.toast.warn    { background: #8a5a06; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 17. 加载态 ---------- */
.skeleton {
  background: linear-gradient(90deg, #f0f2f6 25%, #f7f8fa 37%, #f0f2f6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: 5px;
}
@keyframes shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
}
.spinner.dark { border-color: rgba(0,0,0,.12); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 13px;
  padding: 32px;
  justify-content: center;
}

/* ---------- 18. 工具类 ---------- */
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.link-btn {
  border: 0; background: transparent; color: var(--primary);
  font-size: inherit; padding: 0; font-weight: 550;
}
.link-btn:hover { text-decoration: underline; }

/* ---------- 19. 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(47,107,255,.10), transparent 60%),
    radial-gradient(700px 380px at 92% 108%, rgba(18,161,80,.07), transparent 62%),
    var(--bg);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 372px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(16,24,40,.09);
  padding: 32px 30px 28px;
}

.login-logo,
.login-logo-img {
  display: block;
  width: 42px; height: 42px;
  margin-bottom: 16px;
}
.login-title { font-size: 19px; font-weight: 650; letter-spacing: -.2px; }
.login-sub { font-size: 13px; color: var(--text-3); margin-top: 4px; margin-bottom: 22px; }

.login-form { display: flex; flex-direction: column; gap: 13px; }
.login-form .input { height: 38px; }
.login-submit { height: 38px; margin-top: 5px; font-size: 13.5px; }

.login-error {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: #b4271c;
  font-size: 12.5px;
  display: none;
}
.login-error.show { display: block; }

.login-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-3);
  text-align: center;
}

/* ---------- 20. 响应式 ---------- */
@media (max-width: 1180px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .detail-panel { width: 100%; }
}

@media (max-width: 760px) {
  :root { --sidebar-w: 100%; }
  .app { flex-direction: column; }

  .sidebar {
    width: 100%;
    flex: none;
    height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-brand { padding: 13px 16px; }
  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 8px 10px;
    gap: 4px;
  }
  .nav-group-label { display: none; }
  .nav-item {
    width: auto;
    flex-shrink: 0;
    padding: 7px 12px;
    margin-bottom: 0;
  }
  .sidebar-foot { display: none; }

  .topbar { padding: 0 14px; height: 52px; }
  .content { padding: 14px 14px 32px; }

  .page-head { flex-direction: column; align-items: stretch; }
  .page-actions { justify-content: stretch; }
  .page-actions .btn { flex: 1; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .stat { padding: 12px 13px; }
  .stat-value { font-size: 21px; }

  .filter-grid { grid-template-columns: 1fr; }
  .filter-grid .field-wide { grid-column: span 1; }

  .dataset-grid { grid-template-columns: 1fr 1fr; gap: 9px; }

  .card-head { padding: 11px 13px; }
  .card-body { padding: 13px; }
  table.data th, table.data td { padding: 9px 11px; }

  .pager { padding: 10px 13px; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
  .dataset-grid { grid-template-columns: 1fr; }
}


/* ==================== 统一检索 ==================== */
.uni-group { margin-bottom: 14px; }
.uni-group-head {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.uni-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.uni-group-name { font-size: 13.5px; font-weight: 600; }
.uni-group-count { font-size: 12px; color: var(--text-3); font-weight: 400; }

.uni-item {
  padding: 11px 16px; border-bottom: 1px solid #f2f4f7;
  cursor: pointer; transition: background .13s;
  display: flex; align-items: center; gap: 12px;
}
.uni-item:last-child { border-bottom: 0; }
.uni-item:hover { background: #fafbfd; }
.uni-item-main { flex: 1; min-width: 0; }
.uni-item-title {
  font-size: 13.5px; font-weight: 550; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uni-item-sub {
  font-size: 12px; color: var(--text-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uni-item-tags { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.uni-item-go {
  color: var(--text-3); font-size: 12px; flex-shrink: 0;
  opacity: 0; transition: opacity .13s;
}
.uni-item:hover .uni-item-go { opacity: 1; }

/* ==================== 关系图谱 ==================== */
.graph-canvas {
  position: relative;
  width: 100%;
  height: 700px;
  background:
    radial-gradient(circle at 50% 45%, #fdfefe 0%, #fafbfd 70%, #f6f8fb 100%);
  overflow: hidden;
  user-select: none;
}
.graph-canvas svg { display: block; width: 100%; height: 100%; }





.graph-legend {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: 9px; padding: 10px 13px;
  font-size: 11.5px; backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
}

.graph-cand {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 12.5px; color: var(--text-2); cursor: pointer;
  margin: 0 7px 7px 0; transition: all .13s;
}
.graph-cand:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.graph-cand .uni-dot { width: 7px; height: 7px; }

@media (max-width: 760px) {
  .graph-canvas { height: 460px; }
  .uni-item { padding: 10px 13px; }
}


/* ==================== 未读徽章 / 置顶 ==================== */
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #d92d20;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.nav-item { position: relative; }

.pin-star {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 2px;
  color: #c9d0da;
  line-height: 0;
  border-radius: 4px;
  transition: color .13s, background .13s;
}
.pin-star:hover { color: #d98200; background: #fff5e5; }
.pin-star.active { color: #d98200; }
.pin-star svg { width: 15px; height: 15px; fill: currentColor; }

.pinned-card {
  border: 1px solid #f0d9a8;
  background: linear-gradient(180deg, #fffdf7, #fff);
}
.pinned-card .card-head { border-bottom-color: #f5e6c4; }
.pinned-title { display: flex; align-items: center; gap: 7px; }
.pinned-title svg { width: 14px; height: 14px; fill: #d98200; flex-shrink: 0; }

.row-pinned td { background: #fffdf7; }
.row-unread .cell-title { font-weight: 650; }
.row-unread .cell-title::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #d92d20;
  margin-right: 6px;
  vertical-align: middle;
}

/* 音量滑杆 */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), #9db9ff);
  outline: none;
  padding: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(16,24,40,.25);
}


/* ==================== 邮件监控 / 预览 ==================== */
.mail-preview-panel {
  position: fixed;
  top: 0; right: 0;
  width: 720px; max-width: 94vw;
  height: 100vh;
  background: #eef0f4;
  box-shadow: -8px 0 32px rgba(16,24,40,.14);
  transform: translateX(102%);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
  z-index: 70;
  display: flex;
  flex-direction: column;
}
.mail-preview-panel.open { transform: translateX(0); }
.mail-preview-panel .detail-head { background: #fff; }
.mail-preview-body { flex: 1; overflow: auto; padding: 16px; }
.mail-preview-body iframe {
  width: 100%; height: 100%; min-height: 900px;
  border: 0; border-radius: 10px; background: #fff;
  box-shadow: 0 2px 12px rgba(16,24,40,.08);
}

.monitor-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--surface);
  transition: border-color .15s;
}
.monitor-card.disabled { opacity: .6; background: #fafbfd; }
.monitor-card.editing { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,107,255,.09); }

.monitor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.monitor-name { font-size: 14px; font-weight: 650; color: var(--text); display: flex; align-items: center; gap: 8px; }
.monitor-stats { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.monitor-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }

.mail-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.mail-tpl-card {
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all .14s;
  background: #fff;
}
.mail-tpl-card:hover { border-color: var(--border-strong); }
.mail-tpl-card.active { border-color: var(--primary); background: var(--primary-soft); }
.mail-tpl-card .tpl-name { font-size: 13px; font-weight: 600; }
.mail-tpl-card .tpl-desc { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

@media (max-width: 760px) {
  .mail-preview-panel { width: 100%; }
  .mail-preview-body iframe { min-height: 600px; }
}


/* 价格高亮块 */
.price-highlight {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  padding: 13px 15px;
  border-radius: 9px;
  background: #fafbfd;
  border: 1px solid var(--border);
}
.price-highlight.hot {
  background: #fff8f7;
  border-color: #f5c6c2;
}
.price-highlight > div { display: flex; align-items: baseline; gap: 6px; }
.ph-label { font-size: 12px; color: var(--text-3); }
.ph-value { font-size: 17px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ph-value.budget { color: var(--text-2); font-weight: 600; }
.price-highlight.hot .ph-value:not(.budget) { color: #d92d20; }
.ph-warn { font-size: 12.5px; font-weight: 600; color: #d92d20; }


/* 内联状态图标（替代 emoji） */
.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
}
.status-inline .ico {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.status-inline.ok { color: #0d8043; }
.status-inline.warn { color: #95600a; }
.status-inline.err { color: #b4271c; }


/* ==================== AI 智能化监控 ==================== */
.ai-block {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f7faff, #fbfcff);
  border: 1px solid #dbe6ff;
}
.ai-block-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.ai-ico {
  width: 15px; height: 15px;
  stroke: #2f6bff; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.ai-block-title { font-size: 13.5px; font-weight: 650; color: #1a3a8f; }

.ai-test-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: 8px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid var(--border);
}
.ai-test-row.hit { border-color: #c3e9d3; background: #f6fdf9; }
.ai-test-dot {
  width: 7px; height: 7px; border-radius: 50%;
  margin-top: 6px; flex-shrink: 0; background: #c9d0da;
}
.ai-test-row.hit .ai-test-dot { background: #12a150; }
.ai-test-title { font-size: 12.5px; color: var(--text); line-height: 1.5; }
.ai-test-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }


/* ==================== 成交供应商 ==================== */
.award-chip {
  display: inline-block;
  max-width: 150px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #e8f7ee;
  color: #0d8043;
  font-size: 11.5px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.award-suppliers { display: flex; flex-direction: column; gap: 8px; }
.award-supplier-row {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f6fdf9;
  border: 1px solid #c3e9d3;
}
.award-ico {
  width: 16px; height: 16px;
  stroke: #12a150; fill: none;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0; margin-top: 2px;
}
.award-name { font-size: 13.5px; font-weight: 650; color: #0d4b2a; line-height: 1.45; }
.award-role { font-size: 11.5px; color: #3f8f63; margin-top: 2px; }

.award-items { display: flex; flex-direction: column; gap: 1px; }
.award-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid #f2f4f7;
}
.award-item:last-child { border-bottom: 0; }
.award-idx {
  flex-shrink: 0;
  width: 17px; height: 17px;
  border-radius: 4px;
  background: #f2f4f8;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 600;
  display: grid; place-items: center;
  margin-top: 1px;
}
.award-item-name { font-size: 12.5px; color: var(--text); line-height: 1.5; }
.award-item-model { font-size: 11.5px; color: var(--text-3); margin-top: 2px; font-family: var(--mono); }


/* ============================================================
   关系图谱 v2 —— 缩放/拖动/精致视觉
   ============================================================ */
.graph-canvas {
  position: relative;
  width: 100%;
  height: 700px;
  background:
    radial-gradient(circle at 50% 42%, #ffffff 0%, #fafcff 45%, #f4f7fc 100%);
  overflow: hidden;
  user-select: none;
  cursor: grab;
  touch-action: none;
}
.graph-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, #cdd8ea 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .38;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 78%);
}
.graph-canvas:active { cursor: grabbing; }
.graph-canvas svg { display: block; width: 100%; height: 100%; position: relative; z-index: 1; }

/* --- 连线 --- */
.g-link {
  stroke-linecap: round;
  transition: stroke-opacity .18s ease, stroke-width .18s ease;
}

/* --- 节点 --- */
.g-node { cursor: pointer; }
.g-node .n-body {
  fill: #ffffff;
  stroke: currentColor;
  stroke-width: 2;
  transition: stroke-width .16s ease, r .16s ease;
}
.g-node:hover .n-body { stroke-width: 3; }
.g-node.is-center .n-body {
  fill: currentColor;
  stroke: none;
}

.g-node .n-halo { pointer-events: none; }

.g-node .n-hot-ring {
  fill: none;
  stroke: #d92d20;
  stroke-width: 1.5;
  opacity: .45;
  animation: hotPulse 2.2s ease-in-out infinite;
}
@keyframes hotPulse {
  0%, 100% { opacity: .22; }
  50%      { opacity: .62; }
}

.g-node .n-char {
  font-size: 9px;
  font-weight: 700;
  fill: currentColor;
  pointer-events: none;
  letter-spacing: -.2px;
}

.g-node text {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  pointer-events: none;
}
.g-node .n-title {
  font-size: 10.5px;
  fill: #3d4759;
  font-weight: 500;
  opacity: var(--label-opacity, 1);
  transition: opacity .2s ease;
}
.g-node.is-center .n-title { font-size: 12px; font-weight: 650; fill: #1a1d23; }

.g-node .n-price {
  font-size: 9px;
  fill: #97a1b2;
  font-weight: 500;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  opacity: var(--label-opacity, 1);
  transition: opacity .2s ease;
}
.g-node .n-price.hot { fill: #d92d20; font-weight: 700; }
.g-node .n-price.cheap { fill: #12a150; }

/* --- 工具栏 --- */
.graph-toolbar {
  position: absolute;
  right: 14px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(16,24,40,.10);
  backdrop-filter: blur(8px);
  z-index: 5;
}
.gt-btn {
  width: 30px; height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.gt-btn:hover { background: #eef2f9; color: var(--primary); }
.gt-btn:active { transform: scale(.94); }
.gt-btn svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.gt-zoom {
  min-width: 42px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  padding: 0 3px;
}

/* --- 图例 --- */
.graph-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 11.5px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(16,24,40,.08);
  z-index: 5;
}
.gl-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.graph-legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2.5px 0;
  color: var(--text-2);
}
.graph-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9);
}
.gl-hint {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: #aab2c0;
}

/* --- 悬停提示 --- */
.graph-tip {
  position: absolute;
  pointer-events: none;
  background: rgba(26,29,35,.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.55;
  max-width: 300px;
  box-shadow: 0 8px 24px rgba(16,24,40,.26);
  transform: translate(-50%, calc(-100% - 14px));
  opacity: 0;
  transition: opacity .14s;
  z-index: 10;
  backdrop-filter: blur(4px);
}
.graph-tip.show { opacity: 1; }
.graph-tip b { font-weight: 600; }

@media (max-width: 760px) {
  .graph-canvas { height: 480px; }
  .graph-toolbar { right: 8px; top: 8px; }
  .graph-legend { left: 8px; bottom: 8px; padding: 9px 11px; }
}


/* ============================================================
   图谱 v3 —— vis-network + Neo4j GraSS 配色
   ============================================================ */
.graph-canvas {
  position: relative;
  width: 100%;
  height: 700px;
  background: #FAFBFC;
  overflow: hidden;
  user-select: none;
  border-radius: 0;
}
.graph-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #DCE3EC 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}
#graphVisBox {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* vis-network 自带的 tooltip 样式覆盖 */
div.vis-tooltip {
  position: absolute;
  padding: 11px 15px !important;
  border-radius: 9px !important;
  background: rgba(26,29,35,.96) !important;
  color: #F8FAFC !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: 0 10px 32px rgba(15,23,42,.28) !important;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif !important;
  font-size: 12.5px !important;
  line-height: 1.72 !important;
  max-width: 320px !important;
  backdrop-filter: blur(6px);
  z-index: 20 !important;
}

/* 工具栏 */
.graph-toolbar {
  position: absolute;
  right: 14px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: rgba(255,255,255,.96);
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(15,23,42,.09);
  z-index: 10;
}
.gt-btn {
  width: 30px; height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.gt-btn:hover { background: #F1F5F9; color: #1E293B; }
.gt-btn:active { transform: scale(.93); }
.gt-btn svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.gt-zoom {
  min-width: 44px;
  text-align: center;
  font-size: 11.5px;
  color: #64748B;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  padding: 0 4px;
}

/* 图例 */
.graph-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(255,255,255,.96);
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 11.5px;
  box-shadow: 0 4px 16px rgba(15,23,42,.08);
  z-index: 10;
}
.gl-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.graph-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  color: #475569;
}
.graph-legend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(15,23,42,.08);
}
.gl-hint {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #E2E8F0;
  font-size: 10.5px;
  color: #94A3B8;
  line-height: 1.7;
}

@media (max-width: 760px) {
  .graph-canvas { height: 480px; }
  .graph-toolbar { right: 8px; top: 8px; }
  .graph-legend { left: 8px; bottom: 8px; padding: 9px 11px; }
  div.vis-tooltip { max-width: 240px !important; font-size: 11.5px !important; }
}


/* ==================== 图谱自定义 HTML 提示框 ==================== */
.graph-html-tip {
  position: absolute;
  pointer-events: none;
  padding: 11px 15px;
  border-radius: 10px;
  background: rgba(26, 29, 35, 0.96);
  color: #F8FAFC;
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 12px 36px rgba(15,23,42,0.30);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12.5px;
  line-height: 1.75;
  max-width: 340px;
  z-index: 30;
  opacity: 0;
  transition: opacity .13s;
  backdrop-filter: blur(6px);
  white-space: normal;
  word-break: break-word;
}
.graph-html-tip.show { opacity: 1; }
.graph-html-tip b { font-weight: 650; color: #FFFFFF; }
.graph-html-tip span { display: inline; }

/* 彻底隐藏 vis-network 自带的 tooltip */
div.vis-tooltip { display: none !important; visibility: hidden !important; }


/* ==================== 成交记录页 ==================== */
.award-ref-price {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: 26px;
  padding: 6px 11px;
  border-radius: 7px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  font-size: 12px;
}
.award-ref-price.hot {
  background: #FFF7F6;
  border-color: #FBCFC9;
}
.award-ref-price.none {
  background: #FAFAFA;
  border-color: #EEF1F5;
}
.rp-tag {
  padding: 1px 6px;
  border-radius: 4px;
  background: #E8F4FD;
  color: #0A6BAB;
  font-size: 10.5px;
  font-weight: 600;
}
.rp-tag.none { background: #F1F3F6; color: #94A3B8; }
.rp-val { color: #0F172A; font-weight: 700; font-variant-numeric: tabular-nums; }
.award-ref-price.hot .rp-val { color: #D92D20; }
.rp-budget { color: #64748B; font-variant-numeric: tabular-nums; }
.rp-none { color: #94A3B8; }
.rp-code { margin-left: auto; color: #94A3B8; font-family: var(--mono); font-size: 11px; }

/* 成交记录表格行的 chip 样式复用 .award-chip */
