/* 信源引擎 v3.1 · 规则库合并 / 审核三分派 / 空库引导 / 导航可见性 */

/* ---------- 1. 侧栏滚动条常显 ---------- */
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: #b9c6d8 transparent;
  padding-bottom: 18px;
}
.sidebar::-webkit-scrollbar {
  width: 9px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #b9c6d8;
  border-radius: 5px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: #93a6c0;
  background-clip: content-box;
}
.nav-group {
  margin-bottom: 4px;
}
.nav-item {
  padding-top: 7px;
  padding-bottom: 7px;
}
@media (max-height: 780px) {
  .sidebar .brand {
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .nav-group {
    margin-bottom: 2px;
  }
  .nav-group-title {
    padding-top: 6px;
    padding-bottom: 2px;
    font-size: 11px;
  }
  .nav-item {
    padding-top: 5px;
    padding-bottom: 5px;
  }
}

/* ---------- 2. 规则库：来源编号 / 判定方式 / 严重级别 ---------- */
.src-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
}
.src-tag {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid #d5dde9;
  border-radius: 3px;
  background: #f5f8fc;
  color: #5b667a;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  line-height: 17px;
}
.src-tag.primary {
  border-color: #c3d3e8;
  background: #eef4fb;
  color: #2f5d8a;
}
.method-code { background: #e8f5ee; color: #1f7a4d; border: 1px solid #bfe3cf; }
.method-model { background: #eef1fb; color: #4656a8; border: 1px solid #ccd3f0; }
.method-manual { background: #fdf3e3; color: #9a6414; border: 1px solid #efd9b4; }
.badge-method {
  display: inline-block;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
}
.sev-hard { background: #fdecec; color: #c23b3b; border: 1px solid #f3c9c9; }
.sev-soft { background: #f1f3f6; color: #5b667a; border: 1px solid #dbe1ea; }

/* ---------- 3. 空规则库 ---------- */
.rule-empty {
  padding: 44px 20px;
  text-align: center;
  color: #5b667a;
}
.rule-empty .rule-empty-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 1px dashed #c3cede;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a97ab;
}
.rule-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #2c3444;
  margin-bottom: 6px;
}
.rule-empty-desc {
  font-size: 12px;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 16px;
}
.rule-empty-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 4. 合并记录 ---------- */
.merge-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.merge-row {
  border: 1px solid #e3e8f0;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fbfcfe;
}
.merge-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.merge-row-body {
  font-size: 12px;
  color: #5b667a;
  line-height: 1.7;
}
.merge-kept {
  color: #1f7a4d;
  font-weight: 600;
}
.merge-gone {
  color: #9a6414;
}

/* ---------- 5. 审核页：按判定方式分组 ---------- */
.judge-group {
  border-top: 1px solid #edf0f5;
}
.judge-group:first-child {
  border-top: 0;
}
.judge-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #f7f9fc;
  border-bottom: 1px solid #edf0f5;
}
.judge-group-head .jg-title {
  font-weight: 600;
  color: #2c3444;
  font-size: 13px;
}
.judge-group-head .jg-desc {
  font-size: 11px;
  color: #7a8798;
}
.judge-group-head .jg-count {
  margin-left: auto;
  font-size: 11px;
  color: #5b667a;
}
.judge-group.code .jg-title { color: #1f7a4d; }
.judge-group.model .jg-title { color: #4656a8; }
.judge-group.manual .jg-title { color: #9a6414; }
.auto-value {
  margin-top: 4px;
  font-size: 12px;
  color: #5b667a;
}
.auto-value b {
  color: #2c3444;
}
.auto-value .pass { color: #1f7a4d; font-weight: 600; }
.auto-value .fail { color: #c23b3b; font-weight: 600; }
.method-note {
  margin-top: 4px;
  font-size: 12px;
  color: #4656a8;
}
.method-note.manual {
  color: #9a6414;
}
.dual-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border: 1px solid #dbe6f5;
  background: #f4f8fe;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #3c4a5e;
  line-height: 1.7;
}
.dual-notice b { color: #2c3444; }

/* ---------- 6. 冲突校验范围提示 ---------- */
.val-scope {
  margin-bottom: 8px;
  font-size: 12px;
  color: #5b667a;
}
