/* 清单批量选型（纯浏览器版），沿用 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)); } }
