/* 清单批量选型（纯浏览器版），沿用 demo.css 的配色变量 */
.demo-topbar-right { display: flex; align-items: center; gap: 16px; }
.lang-switch { padding: 6px 12px; color: var(--green); border: 1px solid var(--green); border-radius: 16px; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.lang-switch:hover { color: #fff; background: var(--green); }
.batch-section { margin-top: 34px; }
.batch-panel { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 18px 3px 18px 3px; box-shadow: var(--shadow); }
.batch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.batch-upload { position: relative; cursor: pointer; }
.batch-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.batch-download { color: var(--green); font-size: 13px; font-weight: 700; }
.batch-hint { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
#batchResult { margin-top: 18px; }
.batch-file { color: var(--muted); font-size: 12px; }
.batch-summary { margin-top: 12px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.batch-summary article { padding: 14px; background: #f5f7f5; border: 1px solid #e0e5e1; }
.batch-summary span { display: block; color: var(--muted); font-size: 11px; }
.batch-summary strong { display: block; margin-top: 4px; font: 600 24px Georgia, serif; }
.batch-summary .qualified strong { color: var(--green); }
.batch-summary .rejected strong { color: var(--red); }
.batch-summary .pending strong, .batch-summary .needs strong { color: var(--amber); }
.batch-filter { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.batch-filter button { min-height: 36px; padding: 0 14px; color: var(--green); background: #fff; border: 1px solid var(--line); border-radius: 18px; font-size: 12px; font-weight: 700; }
.batch-filter button.active { color: #fff; background: var(--green); border-color: var(--green); }
.batch-table-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); }
.batch-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 12px; }
.batch-table th { padding: 10px; color: var(--muted); background: #f5f7f5; font-size: 11px; font-weight: 700; text-align: left; white-space: nowrap; }
.batch-table td { padding: 12px 10px; border-top: 1px solid #e8ece9; vertical-align: top; line-height: 1.55; }
.batch-table td small { display: block; color: var(--muted); }
.batch-table td:nth-child(2) strong { white-space: nowrap; }
.batch-table tr.needs-info td { background: #fffaf0; }
.batch-table tr.needs-info td:first-child { box-shadow: inset 4px 0 0 var(--amber); }
.batch-status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.batch-status.qualified { color: var(--green); background: var(--green-soft); }
.batch-status.rejected { color: var(--red); background: var(--red-soft); }
.batch-status.pending_confirmation { color: var(--amber); background: var(--amber-soft); }
.batch-model + .batch-model { margin-top: 8px; }
.batch-model strong { font-family: Consolas, monospace; font-size: 11px; }
.stock { display: inline-block; margin-top: 3px; font-size: 11px; font-weight: 700; color: var(--green); }
.stock.low_stock { color: var(--amber); }
.stock.out_of_stock { color: var(--red); }
.tag { display: inline-block; margin: 0 6px 6px 0; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.tag.missing { color: var(--amber); background: var(--amber-soft); }
.tag.unknown { color: var(--red); background: var(--red-soft); }
.batch-reasons ul { margin: 0; padding-left: 16px; }
.batch-muted { color: #9aa49f; }
.batch-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.batch-error { padding: 14px 16px; color: var(--red); background: var(--red-soft); border-radius: 8px; font-size: 13px; }
.batch-loading { color: var(--muted); font-size: 13px; }

@media (max-width: 680px) {
  .batch-panel { padding: 18px; }
  .batch-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .batch-actions { flex-direction: column; align-items: stretch; }
}

/* 项目 BOM 审核案例（纯浏览器版） */
.bom-case-intro { margin: 0 0 14px; font-size: 13px; line-height: 1.7; }
.bom-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bom-summary small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.bom-summary small.ok { color: var(--green); }
.bom-summary small.bad { color: var(--red); }
.bom-findings { margin-top: 14px; padding: 16px 18px; background: #fbfcfb; border: 1px solid var(--line); border-left: 4px solid var(--amber); }
.bom-findings h3 { margin: 0 0 10px; font-size: 14px; }
.bom-findings ul { margin: 0; padding: 0; list-style: none; }
.bom-findings li { padding: 6px 0; font-size: 12px; line-height: 1.6; border-top: 1px dashed #e3e8e4; }
.bom-findings li:first-child { border-top: 0; }
.bom-findings li span { display: inline-block; min-width: 64px; margin-right: 8px; color: var(--muted); font-weight: 700; }
.bom-findings li.rejected { color: var(--red); }
.bom-table { min-width: 960px; }
.bom-table td:nth-child(2) strong { white-space: nowrap; }
.bom-spec { max-width: 320px; }
.bom-table td:last-child { min-width: 260px; }
.bom-chip { display: inline-block; margin: 0 4px 4px 0; padding: 1px 7px; background: #f1f4f2; border: 1px solid #e0e5e1; border-radius: 9px; font-size: 11px; }
.bom-decoded { margin-top: 4px; font-size: 11px; font-family: Consolas, monospace; }
.bom-decoded span { font-family: inherit; color: var(--muted); }
.bom-unparsed { margin-top: 4px; color: var(--red); font-size: 11px; }
.bom-issues { margin: 0; padding-left: 16px; }
.bom-issues li { margin-bottom: 4px; }
.bom-issues li b { font-family: Consolas, monospace; font-size: 10px; color: var(--muted); }
.bom-issues li.rejected { color: var(--red); }
.bom-issues li.service { color: var(--muted); list-style: circle; }
@media (max-width: 680px) { .bom-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
label.batch-upload { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#bomResult .batch-file { margin-top: 2px; }
.batch-panel .bom-case-intro + .batch-actions label.secondary-action { min-height: 44px; height: 44px; }

/* 买家 / 销售视图切换与销售视图（纯浏览器版） */
.batch-view-switch { margin-top: 16px; display: inline-flex; padding: 3px; background: #eef2ef; border-radius: 20px; }
.batch-view-switch button { min-height: 34px; padding: 0 16px; color: var(--muted); background: transparent; border: 0; border-radius: 17px; font-size: 12px; font-weight: 800; cursor: pointer; }
.batch-view-switch button.active { color: #fff; background: var(--green); }
.batch-view-switch button[data-view="sales"].active { background: #1f3a33; }
.batch-code { display: block; margin-top: 3px; font-family: Consolas, monospace; font-size: 11px; color: var(--green); }
#salesView { margin-top: 14px; }
.sales-intro { margin: 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.sales-erp { display: inline-block; margin-top: 8px; padding: 3px 10px; color: #1f3a33; background: #e8eeeb; border-radius: 10px; font-size: 11px; font-weight: 700; }
.sales-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sales-summary small { color: var(--muted); font-size: 11px; }
.sales-table { min-width: 900px; }
.sales-table td > div + div { margin-top: 6px; }
.sales-code { font-family: Consolas, monospace; font-size: 11px; white-space: nowrap; }
.sales-note { display: block; margin-top: 4px; color: var(--amber); }
.sales-table tr.sales-muted td { color: #9aa49f; background: #fafbfa; }
.sales-sync { margin-top: 16px; padding: 16px 18px; background: #f5f8f6; border: 1px solid var(--line); }
.sales-sync p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.sales-sync button[disabled] { opacity: .45; cursor: not-allowed; }
.sales-synced { margin-top: 12px; color: var(--green); font-size: 12px; font-weight: 700; }
.sales-synced details { margin-top: 6px; font-weight: 400; color: var(--ink, #1b2420); }
.sales-synced pre { max-height: 260px; overflow: auto; padding: 10px; background: #fff; border: 1px solid var(--line); font-size: 11px; }
@media (max-width: 680px) { .sales-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 气动蝶阀产品族（纯浏览器版） */
.pbv-scenarios { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pbv-scenarios button { min-height: 36px; padding: 0 14px; color: var(--green); background: #fff; border: 1px solid var(--line); border-radius: 18px; font-size: 12px; font-weight: 700; cursor: pointer; }
.pbv-scenarios button:hover { border-color: var(--green); }
#pbvResult { margin-top: 18px; }
.pbv-known { display: flex; flex-wrap: wrap; gap: 6px; }
.pbv-chip { padding: 4px 10px; background: var(--green-soft); border-radius: 12px; font-size: 12px; font-weight: 700; color: var(--green); }
.pbv-chip small { margin-right: 6px; color: var(--muted); font-weight: 400; }
.pbv-meter { margin-top: 12px; display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); }
.pbv-meter strong { font: 600 26px Georgia, serif; color: var(--ink, #1b2420); }
.pbv-ask { margin-top: 12px; padding: 16px 18px; background: #fffaf0; border: 1px solid #f0dfb8; border-left: 4px solid var(--amber); }
.pbv-ask p { margin: 0 0 10px; font-size: 14px; }
.pbv-ask p b { margin-right: 10px; color: var(--amber); font-size: 12px; }
.pbv-ask small { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; }
.pbv-options { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pbv-options button { min-height: 34px; padding: 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 17px; font-size: 12px; font-weight: 700; cursor: pointer; }
.pbv-options button:hover { color: #fff; background: var(--green); border-color: var(--green); }
.pbv-num { display: inline-flex; gap: 6px; }
.pbv-num input { width: 110px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 17px; font-size: 12px; }
.pbv-verdict { margin-top: 12px; padding: 12px 16px; font-size: 13px; font-weight: 700; border-radius: 8px; }
.pbv-verdict.ok { color: var(--green); background: var(--green-soft); }
.pbv-verdict.bad { color: var(--red); background: var(--red-soft); }
.pbv-cards { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pbv-card { padding: 14px 16px; background: #fbfcfb; border: 1px solid var(--line); }
.pbv-card.qualified { border-top: 3px solid var(--green); }
.pbv-card.pending_confirmation { border-top: 3px solid var(--amber); }
.pbv-card.rejected { border-top: 3px solid var(--red); opacity: .85; }
.pbv-card header { display: flex; flex-direction: column; gap: 6px; }
.pbv-card header strong { font-size: 13px; }
.pbv-code { margin-top: 8px; font-size: 11px; color: var(--muted); }
.pbv-code b { display: block; font-family: Consolas, monospace; font-size: 12px; color: var(--green); word-break: break-all; }
.pbv-card ul { margin: 10px 0 0; padding: 0; list-style: none; }
.pbv-card li { padding: 4px 0; font-size: 11px; line-height: 1.55; border-top: 1px dashed #e3e8e4; }
.pbv-card li i { display: inline-block; width: 16px; font-style: normal; font-weight: 800; }
.pbv-card li.pass i { color: var(--green); }
.pbv-card li.pending i, .pbv-card li.pending { color: var(--amber); }
.pbv-card li.fail i, .pbv-card li.fail { color: var(--red); }
@media (max-width: 900px) { .pbv-cards { grid-template-columns: 1fr; } }
.family-label { margin: 18px 0 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.scenario-grid.pbv { grid-template-columns: repeat(2, 1fr); }
.scenario-grid.pbv .scenario-card { min-height: 160px; }
#demoCanvas .pbv-known { margin-top: 10px; }
#demoCanvas .pbv-options { margin-top: 12px; }
@media (max-width: 680px) { .scenario-grid.pbv { grid-template-columns: 1fr; } }

/* 对话选型（纯浏览器版）：一个对话框承载询盘、清单、BOM */
.chat-section { margin-top: 34px; }
.chat-layout { min-height: 720px; }
.chat-families { margin: 26px 12px 0; color: #9db8ac; font-size: 11px; line-height: 1.9; }
.chat-families b { color: #e4f2ec; }
.chat { min-width: 0; display: flex; flex-direction: column; background: #f8f9f6; }
.chat-thread { flex: 1; min-height: 520px; max-height: 1100px; overflow-y: auto; padding: 26px 28px 10px; display: flex; flex-direction: column; gap: 16px; }
.chat-msg { display: flex; gap: 10px; align-items: flex-start; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.user .chat-bubble { max-width: 75%; padding: 11px 15px; color: #fff; background: var(--green); border-radius: 14px 3px 14px 14px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.chat-avatar { flex: none; width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: var(--green-dark); border-radius: 9px 2px 9px 2px; font: 700 14px Georgia, serif; }
.chat-msg.bot .chat-bubble { max-width: 78%; min-width: 0; }
.chat-msg.bot.wide .chat-bubble { flex: 1; max-width: none; }
.chat-text { margin: 4px 0 0; padding: 11px 15px; display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 3px 14px 14px 14px; font-size: 13px; line-height: 1.7; }
.chat-text a { color: var(--green); font-weight: 700; }
.chat-bubble > .demo-canvas, .chat-bubble > .chat-frozen.demo-canvas { margin-top: 10px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.chat-bubble > #batchResult, .chat-bubble > #bomResult, .chat-bubble > .chat-frozen { margin-top: 10px; }
.chat-bubble > #batchResult, .chat-bubble > #bomResult { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.chat-frozen { opacity: .78; }
.chat-frozen button { cursor: default; }
.chat .canvas-empty { display: none; }
.chat .demo-loading { min-height: 140px; }
.chat-choices { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.chat-choices button, .chat-chips button { min-height: 34px; padding: 0 14px; color: var(--green); background: #fff; border: 1px solid var(--line); border-radius: 17px; font-size: 12px; font-weight: 700; cursor: pointer; }
.chat-choices button:hover:not(:disabled), .chat-chips button:hover { border-color: var(--green); }
.chat-choices button:disabled { opacity: .5; cursor: default; }
.chat-chips { padding: 10px 28px 0; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); }
.chat-composer { padding: 12px 28px 22px; display: flex; align-items: flex-end; gap: 10px; }
.chat-composer textarea { flex: 1; min-height: 46px; max-height: 160px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 13px; resize: vertical; background: #fff; }
.chat-composer textarea:focus { outline: 2px solid var(--green-soft); border-color: var(--green); }
.chat-attach { position: relative; width: 46px; height: 46px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 18px; cursor: pointer; }
.chat-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chat-composer .primary-action { min-width: 0; height: 46px; }
@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-layout .stage-nav { display: none; }
  .chat-thread, .chat-chips, .chat-composer { padding-left: 14px; padding-right: 14px; }
  .chat-msg.bot .chat-bubble, .chat-msg.user .chat-bubble { max-width: 92%; }
}
@media (max-width: 1280px) { .chat-layout { grid-template-columns: 200px minmax(0, 1fr); } .chat-layout .stage-nav { padding: 24px 12px; } }

/* 业务帮助下方的联系邮箱 */
.value-contact { margin: 22px 0 0; font-size: 15px; color: var(--ink, #10231c); }
.value-contact a { color: var(--green, #0b6b4b); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
