/* 供应商感知台（2026-09-21）：话题线索 + 提问响应 + 合同 → 红黄绿 / 综合分 / 标签。样式沿用出单看板的骨架。 */
body { background: var(--canvas); }
.si-app { max-width: 1280px; margin: 0 auto; padding: 26px 18px 60px; }
.si-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.si-head h1 { margin: 0 0 4px; font-size: 22px; }
.si-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 760px; }
.si-head nav { display: flex; gap: 8px; flex-shrink: 0; }
.si-head nav a { color: var(--ink-2); font-size: 12px; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 5px 11px; }
[data-embedded="1"] .si-head nav a[href="/"] { display: none; }
.si-muted { color: var(--muted); font-size: 12px; }
.si-warn { color: var(--warning-fg); }
.si-spacer { flex: 1; }

.si-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 16px 0 14px; }
.si-controls input[type="date"], .si-controls input[type="search"] { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: #fff; font: inherit; font-size: 13px; }
.si-controls input[type="search"] { min-width: 180px; }
.si-tabs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.si-tabs button { border: 0; background: transparent; padding: 6px 13px; border-radius: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.si-tabs button.active { background: var(--green); color: var(--text-on-accent); }

.si-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
.si-stats article { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.si-stats span { font-size: 12px; color: var(--ink-2); }
.si-stats strong { display: block; font-size: 24px; color: var(--ink); margin: 2px 0; }
.si-stats article.red strong { color: var(--danger-fg); }
.si-stats article.yellow strong { color: var(--warning-fg); }
.si-stats article.green strong { color: var(--green); }
.si-stats small { color: var(--muted); font-size: 11px; }
@media (max-width: 900px) { .si-stats { grid-template-columns: repeat(3, 1fr); } }

.si-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.si-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; color: var(--ink-2); }
.si-chips button i { font-style: normal; color: var(--muted); margin-left: 3px; }
.si-chips button.active { background: var(--green); color: var(--text-on-accent); border-color: var(--green); }
.si-chips button.active i { color: var(--text-on-accent); }

/* 表头往下滚也一直在（2026-09-26 老板看工厂待办时提的，全站同一条）。
   sticky 在 overflow:hidden 的祖先里会失效——这里原来为了圆角给 .si-section 加了 overflow:hidden；
   圆角改由四角单元格自己画，border-collapse 必须是 separate，否则 sticky 的 th 丢边框。 */
.si-section { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.si-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.si-table th, .si-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.si-table th { color: var(--muted); font-weight: 500; font-size: 12px; background: var(--surface-sunken); position: sticky; top: 0; z-index: 2; }
.si-table th:first-child { border-top-left-radius: 11px; }
.si-table th:last-child, .si-app.has-detail .si-table th:nth-child(6) { border-top-right-radius: 11px; }
.si-table tbody tr:last-child td { border-bottom: 0; }
.si-table tbody tr:last-child td:first-child { border-bottom-left-radius: 11px; }
.si-table tbody tr:last-child td:last-child, .si-app.has-detail .si-table tbody tr:last-child td:nth-child(6) { border-bottom-right-radius: 11px; }
.si-table th.num, .si-table td.num { text-align: right; white-space: nowrap; }
.si-table td.lvl, .si-table th.lvl { width: 18px; padding-right: 0; }
.si-table tbody tr { cursor: pointer; }
.si-table tbody tr:hover { background: var(--surface-hover); }
.si-table td small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.si-table td.name b { font-size: 14px; }
.si-table td.name .si-reasons { color: var(--danger-fg); }
.si-table td.name .si-llm { color: var(--ink-2); font-style: italic; }
.si-table td.tags { max-width: 260px; }
.si-table td.last { max-width: 300px; }
.si-table td.last small { display: inline; margin-left: 6px; }

.si-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.si-dot.red { background: var(--danger-fg); }
.si-dot.yellow { background: var(--amber); }
.si-dot.big { width: 16px; height: 16px; margin-top: 4px; flex-shrink: 0; }
.si-score { font-size: 16px; color: var(--green); }
.si-score.mid { color: var(--warning-fg); }
.si-score.bad { color: var(--danger-fg); }

.si-tag { display: inline-block; border-radius: 6px; padding: 1px 7px; font-size: 11px; background: var(--canvas); color: var(--ink-2); white-space: nowrap; margin: 0 4px 3px 0; cursor: pointer; }
.si-tag.status { background: var(--warning-bg); color: var(--warning-fg); }
.si-tag.profile { background: var(--info-bg); color: var(--info-fg); }
.si-tag.manual { background: var(--accent-soft-bg); color: var(--green); }
.si-tag.off { text-decoration: line-through; }
.si-tag i { font-style: normal; margin-right: 2px; }
.si-type { display: inline-block; border-radius: 5px; padding: 0 6px; font-size: 11px; background: var(--canvas); color: var(--ink-2); white-space: nowrap; }
.si-type.danger { background: var(--danger-bg); color: var(--danger-fg); }
.si-type.warn { background: var(--warning-bg); color: var(--warning-fg); }
.si-type.info { background: var(--info-bg); color: var(--info-fg); }
.si-type.ok { background: var(--accent-soft-bg); color: var(--green); }

.si-foot { margin-top: 12px; line-height: 1.6; }
.list-hint { text-align: center; color: var(--muted); padding: 22px 0; font-size: 13px; }

/* ---- 右侧详情栏（2026-09-23 晚，原来是 <dialog> 弹窗） ----
   老板的两条意见：点下去要等一秒多才有反应（后端每次把全部供应商重算一遍，已改成走列表缓存）；
   看下一家得先关再点。现在：列表和详情并排，点一行右侧立刻出头部、内容随后填上，点别家直接切换。
   面板打开时列表收窄，藏掉标签 / 最近动态 / 静默三列（详情里都有），留灯、名字、分、订单、售后、未结。 */
.si-app.has-detail { display: flex; gap: 16px; align-items: flex-start; max-width: none; }
.si-app.has-detail .si-main { flex: 1 1 auto; min-width: 0; }
.si-panel { flex: 0 0 640px; width: 640px; box-sizing: border-box; position: sticky; top: 8px; z-index: 20; max-height: calc(100vh - 16px); overflow: auto;
/* z-index 20（2026-10-01）：往下滚时顶上会钉一条缩小的筛选条（shared/section-tabs.js，层级 10、铺满整页宽），面板要压在它上面，不然面板头被盖住 */
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); }
.si-panel[hidden] { display: none; }
.si-panel > div { padding: 0 20px 22px; }
.si-app.has-detail .si-table th:nth-child(n+7), .si-app.has-detail .si-table td:nth-child(n+7) { display: none; }
.si-app.has-detail .si-stats { grid-template-columns: repeat(3, 1fr); }
.si-table tbody tr.selected, .si-table tbody tr.selected:hover { background: var(--accent-soft-bg); box-shadow: inset 3px 0 0 var(--green); }
@media (max-width: 1360px) { .si-panel { flex-basis: 560px; width: 560px; } }
@media (max-width: 1100px) {   /* 窄屏：面板盖在列表上，列表列不藏 */
  .si-app.has-detail { display: block; }
  .si-panel { position: fixed; inset: 0; width: auto; max-height: none; border-radius: 0; z-index: 30; }
  .si-app.has-detail .si-table th:nth-child(n+7), .si-app.has-detail .si-table td:nth-child(n+7) { display: table-cell; }
  .si-app.has-detail .si-stats { grid-template-columns: repeat(3, 1fr); }
}
.si-dlg-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; position: sticky; top: 0; z-index: 2; background: #fff; padding: 14px 0 8px; border-bottom: 1px solid var(--line); }
.si-dlg-head h3 { margin: 0 0 3px; font-size: 17px; }
.si-dlg-head h3 small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.si-dlg-head p { margin: 0; }
.si-dlg-head .si-dlg-score { margin-left: auto; text-align: center; }
.si-dlg-head .si-dlg-score .si-score { font-size: 26px; display: block; }
.si-dlg-head .si-dlg-score small { color: var(--muted); font-size: 11px; }
.si-dlg-head .close { align-self: flex-start; }
/* 2026-10-01 头里加了整行的跳段按钮：头改成能折行，名字那栏从 0 起伸（不然长说明会把分数和按钮挤到下一行） */
.si-dlg-head { flex-wrap: wrap; row-gap: 6px; }
.si-dlg-name { flex: 1 1 0; min-width: 0; }
.si-jumps { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.si-jumps button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.si-jumps button:hover { border-color: var(--green); color: var(--green); }
.si-dlg-head .si-nav { display: inline-flex; gap: 4px; margin-right: 4px; }
.si-dlg-head .si-nav button { padding: 4px 8px; }
.si-dlg-actions { display: flex; gap: 8px; margin: 2px 0 6px; }
.si-dlg-actions a { font-size: 12px; text-decoration: none; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; }
.si-panel section { margin-top: 14px; }
.si-panel h4 { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.si-panel h4 small { font-weight: 400; color: var(--muted); }
.si-dlg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .si-dlg-grid { grid-template-columns: 1fr; } }
.si-llmbox { background: var(--surface-sunken); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 6px; }
.si-llmbox b { margin-right: 6px; }
.si-llmbox small { display: block; color: var(--muted); margin-top: 4px; }
.si-dims { display: grid; gap: 6px; }
.si-dim { display: grid; grid-template-columns: 64px 1fr 30px; gap: 8px; align-items: center; font-size: 12px; }
.si-dim.na { color: var(--muted); }
.si-dim .bar { height: 6px; background: var(--accent-soft-bg); border-radius: 3px; overflow: hidden; }
.si-dim .bar i { display: block; height: 100%; background: var(--green); }
.si-dim b { text-align: right; }
.si-tagrows { display: grid; gap: 4px; }
.si-tagrow { display: flex; align-items: center; gap: 8px; font-size: 12px; flex-wrap: wrap; }
.si-tagrow small { color: var(--muted); flex: 1; min-width: 120px; }
.si-tagrow.muted { opacity: .7; }
button.link { border: 0; background: transparent; color: var(--info-fg); cursor: pointer; font-size: 12px; padding: 0 2px; }
.si-addtag { display: flex; gap: 6px; margin-top: 8px; }
.si-addtag input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 12px; }
.si-spark { display: flex; align-items: flex-end; gap: 3px; height: 60px; border-bottom: 1px solid var(--line); }
.si-spark span { flex: 1; background: var(--green); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .85; }
.si-spark span.yellow { background: var(--amber); }
.si-spark span.red { background: var(--danger-fg); }
.si-topics { display: grid; gap: 8px; }
.si-topic { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.si-topic .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.si-topic .head small { color: var(--muted); margin-left: auto; }
.si-topic p { margin: 5px 0 3px; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.si-status { font-size: 11px; border-radius: 5px; padding: 0 6px; background: var(--warning-bg); color: var(--warning-fg); }
.si-status.done { background: var(--accent-soft-bg); color: var(--green); }
.si-risk { font-size: 11px; border-radius: 5px; padding: 0 6px; background: var(--warning-bg); color: var(--warning-fg); }
.si-risk.urgent { background: var(--danger-bg); color: var(--danger-fg); }
.si-evidence { margin-top: 6px; background: var(--surface-sunken); border-radius: 8px; padding: 8px 10px; font-size: 12px; display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.si-evidence div small { color: var(--muted); margin-right: 6px; }
.si-evidence div.ours { color: var(--info-fg); }
.si-evidence div.hit { background: var(--warning-bg); border-radius: 4px; padding: 1px 4px; }
.si-evidence div.gap { color: var(--muted); text-align: center; }
.si-tasks { margin: 4px 0 0; padding-left: 0; list-style: none; font-size: 12px; display: grid; gap: 3px; }
.si-tasks li span { color: var(--muted); margin-right: 6px; }
.si-tasks li small { color: var(--muted); }
.si-mini { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 6px; }
.si-mini th, .si-mini td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.si-mini th { color: var(--muted); font-weight: 500; }
.si-mini .num { text-align: right; white-space: nowrap; }

/* ---- 画像 / 主推产品 / 印象对比（2026-09-21） ---- */
.si-headline { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: 11px; background: var(--brand-soft-bg); color: var(--brand-soft-fg); border: 1px solid var(--brand-soft-border); font-style: normal; margin-right: 4px; }
.si-headline.rule { background: var(--canvas); color: var(--ink-2); border-color: var(--line); }
.si-headline.big { font-size: 14px; padding: 3px 12px; border-radius: 8px; }
.si-profile { background: var(--surface-sunken); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 6px; }
.si-profile-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.si-profile p { margin: 3px 0; }
.si-profile p b { color: var(--ink-2); font-weight: 500; margin-right: 4px; }
.si-profile small { display: block; color: var(--muted); margin-top: 4px; }
.si-quotes q { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; margin: 2px 4px 2px 0; font-size: 12px; color: var(--ink-2); quotes: "「" "」"; }
.si-products { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
@media (max-width: 760px) { .si-products { grid-template-columns: repeat(4, 1fr); } }
.si-product { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.si-product img, .si-product .noimg { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: var(--canvas); display: block; }
.si-product .noimg { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.si-product figcaption { padding: 4px 6px 6px; font-size: 11px; line-height: 1.35; }
.si-product figcaption b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-product figcaption span { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-impression textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 13px; resize: vertical; }
.si-impression .row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.si-check { margin-top: 8px; border-radius: 8px; padding: 8px 12px; font-size: 13px; background: var(--accent-soft-bg); }
.si-check.mid { background: var(--warning-bg); }
.si-check.bad { background: var(--danger-bg); }
.si-check b { margin-right: 6px; }
.si-check ul { margin: 4px 0 0; padding-left: 18px; }
.si-check li { margin: 2px 0; }

/* ---- 台账 / 订单表现 / 售后事件（2026-09-23 综合分新口径） ---- */
.si-table td.num small.si-ledger-sum { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; }
.si-bad { color: var(--danger-fg); }
.si-ledger tbody tr.add td:nth-child(2) b { color: var(--green); }
.si-ledger tbody tr.deduct td:nth-child(2) b { color: var(--danger-fg); }
.si-ledger tbody tr.adjust td:nth-child(2) b { color: var(--warning-fg); }
.si-ledger tfoot td { border-top: 2px solid var(--line); font-weight: 600; padding-top: 6px; }
.si-ledger tfoot td .si-muted, .si-ledger tfoot td.si-muted { font-weight: 400; }
.si-delta { font-size: 11px; border-radius: 5px; padding: 0 6px; }
.si-delta.up { background: var(--accent-soft-bg); color: var(--green); }
.si-delta.down { background: var(--danger-bg); color: var(--danger-fg); }
.si-incidents { display: grid; gap: 8px; }
.si-incident { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.si-incident.excluded { opacity: .7; }
.si-incident .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.si-incident .head small { color: var(--muted); margin-left: auto; }
.si-incident p { margin: 5px 0 3px; color: var(--ink-2); font-size: 12px; line-height: 1.55; }
.si-fault { font-size: 11px; border-radius: 5px; padding: 0 6px; background: var(--danger-bg); color: var(--danger-fg); white-space: nowrap; }
.si-fault.unknown { background: var(--warning-bg); color: var(--warning-fg); }
.si-fault.other { background: var(--canvas); color: var(--ink-2); }

/* ---- 产品缩略图 / 工厂型号 / 看大图（2026-09-23 晚：老板说「不然我反应不过来」） ---- */
.si-mini th.pic, .si-mini td.pic { width: 46px; padding: 3px 4px 3px 2px; }
.si-thumb { width: 42px; height: 42px; object-fit: contain; display: block; background: var(--canvas); border: 1px solid var(--line); border-radius: 6px; cursor: zoom-in; }
.si-thumb-none { width: 42px; height: 42px; box-sizing: border-box; border-radius: 6px; background: var(--canvas); color: var(--muted); font-size: 10px; display: flex; align-items: center; justify-content: center; }
.si-mini td.model b { font-weight: 600; }
.si-mini td.model .si-fsku { display: block; color: var(--muted); font-size: 11px; white-space: nowrap; }
.si-mini td.model .si-fsku.none { font-style: italic; }
.si-product img { cursor: zoom-in; }
.si-product figcaption span.fsku { color: var(--ink-2); }
.si-products.si-new { grid-template-columns: repeat(6, 1fr); margin-top: 6px; }
@media (max-width: 760px) { .si-products.si-new { grid-template-columns: repeat(3, 1fr); } }
.si-zoom { position: fixed; inset: 0; z-index: 60; background: var(--overlay); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: zoom-out; padding: 20px; box-sizing: border-box; }
.si-zoom[hidden] { display: none; }
.si-zoom img { max-width: min(92vw, 960px); max-height: 78vh; background: #fff; border-radius: 10px; padding: 8px; box-sizing: border-box; object-fit: contain; }
.si-zoom p { color: #fff; margin: 12px 0 0; font-size: 14px; text-align: center; max-width: 90vw; }

/* ---- 悬停提示（2026-09-23 老板：评判标准要能看到）：有 title 的判定处给问号光标，提示人这里能停一下 ---- */
.si-score[title], .si-dot[title], .si-fault[title], .si-status[title], .si-risk[title], .si-dim[title], .si-ledger tr[title], .si-stats article[title], .si-table th[title] { cursor: help; }
.si-ledger td.rule { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }

/* 2026-10-04 老板：可视化——数字卡（SquViz.kpis）、列表最左的红黄绿换成带字的状态牌、页头「说明」折叠 */
#si-stats .sqv-kpis { margin: 0 0 14px; }
.si-table td.lvl, .si-table th.lvl { width: 40px; }
.si-table td.lvl .sqv-pill { padding: 0 7px; }
.si-how { margin-top: 4px; font-size: 13px; color: var(--muted); }
.si-how summary { cursor: pointer; width: max-content; color: var(--ink-2); }
.si-how p { margin: 4px 0 0; }
@media (max-width: 640px) { .si-table td.lvl, .si-table th.lvl { width: 34px; } }
