/* 通用组件样式 */
.wbr-table th {
  background: #f8f9fb;
  font-size: 0.78rem;
  color: #5a6472;
  white-space: nowrap;
}
.wbr-table td {
  font-size: 0.85rem;
  /* 报表是横向滚动看多列，单元格一律单行；长文本一折行会把整行撑得很高，
     型号库存的诊断摘要列就是这样把第一屏行高拉变形的 */
  white-space: nowrap;
  vertical-align: middle;
}
.wbr-table .wbr-cell-clip {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.wbr-dropzone {
  border: 2px dashed #c4cbd6;
  border-radius: 0.5rem;
  padding: 1.5rem 1rem;
  text-align: center;
  color: #5a6472;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fbfcfe;
}
.wbr-dropzone:hover,
.wbr-dropzone.dragover {
  border-color: #0d6efd;
  background: #eef4ff;
  color: #0d6efd;
}

/* KPI 卡 */
.wbr-kpi .value {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}
.wbr-kpi .label {
  font-size: 0.78rem;
  color: #6b7280;
}

/* 状态统计卡（库存健康度） */
.wbr-status-card {
  cursor: pointer;
  border-width: 1px;
  transition: transform 0.1s, box-shadow 0.1s;
}
.wbr-status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(16, 24, 40, 0.08);
}
.wbr-status-card.selected {
  outline: 2px solid #0d6efd;
}
.wbr-status-card .count {
  font-size: 1.5rem;
  font-weight: 700;
}

/* 流水线时间线 */
.wbr-timeline {
  display: flex;
  gap: 0;
  overflow-x: auto;
}
.wbr-timeline .step {
  flex: 1;
  min-width: 120px;
  text-align: center;
  position: relative;
  padding-top: 0.25rem;
}
.wbr-timeline .step::before {
  content: "";
  position: absolute;
  top: 17px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: #dee2e6;
}
.wbr-timeline .step:first-child::before {
  display: none;
}
.wbr-timeline .dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  position: relative;
  z-index: 1;
}

/* 上传文件行进度条 */
.wbr-file-row .progress {
  height: 6px;
}

/* AI 摘要正文 */
.wbr-ai-summary {
  white-space: pre-wrap;
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ---- 筛选器（filter-bar） ---- */
.wbr-fb-item {
  min-width: 0;
}
.wbr-fb-item .form-label a {
  text-decoration: none;
  line-height: 1;
}
.wbr-enum-btn {
  min-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wbr-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #eef2f7;
  border: 1px solid #d8dfe9;
  border-radius: 999px;
  padding: 0.1rem 0.3rem 0.1rem 0.6rem;
  font-size: 0.78rem;
  color: #3c4657;
}
.wbr-filter-chip a {
  color: #6b7280;
  text-decoration: none;
  line-height: 1;
}
.wbr-filter-chip a:hover {
  color: #dc3545;
}
.wbr-quick-chip {
  --bs-btn-padding-y: 0.1rem;
  --bs-btn-font-size: 0.78rem;
  border-radius: 999px;
}
/* 有未应用改动时，「查询」按钮高亮提示 */
.wbr-btn-dirty {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.35);
}

/* ---- 表格增强（data-table v2） ---- */
.wbr-table th {
  position: relative;
}
.wbr-table .wbr-col-grip {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
}
.wbr-table .wbr-col-grip:hover {
  background: rgba(13, 110, 253, 0.25);
}
/* 列排序：不排序的列没有任何提示，可排序的列悬停时才点亮箭头，当前排序列常亮 */
.wbr-table th.wbr-th-sort {
  cursor: pointer;
  user-select: none;
}
.wbr-table th .wbr-sort-ind {
  margin-left: 0.25rem;
  font-size: 0.62em;
  letter-spacing: -0.12em;
  color: #b6bdc8;
  opacity: 0;
  transition: opacity 0.1s;
}
.wbr-table th.wbr-th-sort:hover .wbr-sort-ind {
  opacity: 1;
}
.wbr-table th.wbr-th-sorted {
  color: #0d6efd;
}
.wbr-table th.wbr-th-sorted .wbr-sort-ind {
  opacity: 1;
  color: #0d6efd;
  letter-spacing: normal;
  font-size: 0.72em;
}
/* 键列冻结 */
.wbr-table th.wbr-sticky,
.wbr-table td.wbr-sticky {
  position: sticky;
  z-index: 1;
  background: var(--bs-body-bg);
}
.wbr-table th.wbr-sticky {
  z-index: 3;
  background: #f8f9fb;
}
.wbr-table .wbr-sticky-last {
  box-shadow: 4px 0 6px -4px rgba(16, 24, 40, 0.25);
}
/* 紧凑密度 */
.wbr-table-compact th,
.wbr-table-compact td {
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
  font-size: 0.78rem;
}

/* ---- 字段选择器（field-picker） ---- */
.wbr-fp-item {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
}
.wbr-fp-item.on {
  border-color: #0d6efd;
  background: #eef4ff;
}
.wbr-fp-item.locked {
  background: #f1f3f5;
  color: #6b7280;
}
.wbr-fp-order {
  padding: 0.15rem 0.35rem;
  border-bottom: 1px solid #f1f3f5;
  font-size: 0.82rem;
}
.wbr-fp-order a {
  text-decoration: none;
}
.wbr-fp-orderpane {
  background: #fbfcfe;
}
