/* 新版「我的数据 / BD 数据」页面样式；共用的指标卡在 components/bd-panel.css；颜色只用 ds.css 变量 */
.bs .bs-body { display: grid; gap: 16px; }
.bs .bs-body[hidden] { display: none; }
.bs .bs-loading { display: grid; gap: 12px; }
.bs .bs-loading .skeleton { height: 120px; }
.bs .bs-error { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; text-align: center; color: var(--destructive); }
.bs .bs-error p { margin: 0; }
.bs .bs-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); }
.bs .bs-pick select { width: auto; min-width: 140px; }

.bs .bs-pair { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.bs .bs-pair > .card { min-width: 0; }

/* 我的漏斗 */
.bs .bs-funnel { display: grid; gap: 14px; }
.bs .bs-step { display: grid; grid-template-columns: 64px minmax(0, 1fr) 150px; align-items: center; gap: 12px; font-size: 13px; }
.bs .bs-step > span:first-child { color: var(--foreground-2); }
.bs .bs-bar { position: relative; height: 22px; border-radius: 4px; background: var(--muted); overflow: visible; }
.bs .bs-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--brand); }
.bs .bs-bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--foreground); opacity: .55; }
.bs .bs-val { text-align: right; font-variant-numeric: tabular-nums; }
.bs .bs-val small { margin-left: 4px; color: var(--muted-foreground); }

.bs .bs-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--muted-foreground); }
.bs .bs-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.bs .bs-sw-me { background: var(--brand); }
.bs .bs-sw-team { width: 2px !important; background: var(--foreground); opacity: .55; }
.bs .bs-sw-bar { background: var(--muted); }
.bs .bs-sw-dash { width: 14px !important; height: 0 !important; border-top: 2px dashed var(--muted-foreground); border-radius: 0 !important; }

/* 我的回复速度 */
.bs .bs-speed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bs .bs-speed > div { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.bs .bs-speed span { font-size: 12px; color: var(--muted-foreground); }
.bs .bs-speed b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bs .bs-speed small { font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.bs .bs-speed-note { display: block; margin-top: 12px; line-height: 1.6; }

/* 全员视图：各 BD 对比（点一行下钻）；回复速度攒满一周前的说明 */
.bs .bs-wait { font-size: 13px; color: var(--muted-foreground); }
.bs tr.bs-pickrow { cursor: pointer; }
.bs tr.bs-pickrow:hover td { background: var(--soft); }
.bs tr.bs-pickrow:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
#bs-back svg { width: 14px; height: 14px; }

/* 拆分效果 */
.bs .bs-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.bs .bs-table th, .bs .bs-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; text-align: left; }
.bs .bs-table th { font-weight: 500; color: var(--muted-foreground); background: var(--soft); }
.bs .bs-table .num-cell { text-align: right; }
.bs .bs-table tbody tr:last-child td { border-bottom: 0; }
.bs .bs-table tr.bs-sub td { color: var(--muted-foreground); }
.bs .bs-name { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.bs .bs-owner { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 定制邮件固定在模板第一行，下面空一行再接普通模板 */
.bs .bs-table tr.bs-cm td { background: var(--soft); font-weight: 600; }
.bs .bs-cm-name { display: inline-flex; align-items: center; gap: 8px; }
.bs .bs-table tr.bs-gap td { padding: 0; height: 6px; border-bottom: 1px solid var(--border); }
.bs .bs-vs { margin-left: 4px; font-size: 11px; }
.bs .bs-empty { padding: 28px; text-align: center; color: var(--muted-foreground); }

/* 近 8 周趋势 */
.bs .bs-chart-wrap { overflow-x: auto; }
.bs #bs-chart { display: block; width: 100%; min-width: 520px; height: auto; }
.bs #bs-chart text { fill: var(--muted-foreground); font-size: 11px; }
.bs #bs-chart .bs-grid { stroke: var(--border); }
.bs #bs-chart .bs-col { fill: var(--muted); }
.bs #bs-chart .bs-my-line { fill: none; stroke: var(--brand); stroke-width: 2.5; }
.bs #bs-chart .bs-team-line { fill: none; stroke: var(--muted-foreground); stroke-width: 1.5; stroke-dasharray: 4 4; }
.bs #bs-chart .bs-dot { fill: var(--brand); }

@media (max-width: 900px) {
  .bs .bs-pair { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .bs .bs-step { grid-template-columns: 52px minmax(0, 1fr) 100px; }
  .bs .bs-speed { grid-template-columns: 1fr; }
}

/* 项目 / 关键词维度的推断、样本不足标记 */
.bs-flag { margin-left: 6px; }

/* 「我的数据」五张指标卡（新触达在前，2026-11-16）；概览首屏仍是四张 */
.bs .bdp-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .bs .bdp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bs .bdp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
