/* 客户库存页独立作用域，避免改变内部仓库工作台。 */
body.app-mode[data-page="customer-inventory"] #metrics:empty { display: none; }
.customer-inventory { display: grid; gap: 18px; }
.customer-stock-intro { display: flex; align-items: center; gap: 14px; }
.customer-stock-intro p { margin: 0; color: #475569; }
.customer-stock-search { display: flex; align-items: end; gap: 12px; padding: 18px; flex-wrap: wrap; }
.customer-stock-search label:first-child { flex: 1 1 280px; }
.customer-stock-search label { display: grid; gap: 7px; min-width: 0; }
.customer-stock-search input, .customer-stock-search select { width: 100%; }
.customer-inventory button { min-height: 38px; border: 1px solid #1769d2; border-radius: 6px; padding: 8px 14px; background: #1769d2; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.customer-inventory button.secondary { background: #fff; border-color: #cbd5e1; color: #334155; }
.customer-inventory button:disabled { opacity: .45; cursor: default; }
.customer-inventory button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.customer-stock-batch { margin: 0 18px 18px; border-top: 1px solid #e2e8f0; padding-top: 14px; }
.customer-stock-batch summary { cursor: pointer; color: #334155; font-weight: 600; }
.customer-stock-batch form { display: grid; gap: 12px; margin-top: 14px; justify-items: start; }
.customer-stock-batch label { display: grid; gap: 8px; width: 100%; }
.customer-stock-batch textarea { width: 100%; box-sizing: border-box; }
body.app-mode .customer-inventory .table-wrap table { min-width: 0; width: 100%; table-layout: fixed; }
.customer-inventory th:nth-child(1) { width: 19%; }
.customer-inventory th:nth-child(2) { width: 39%; }
.customer-inventory th:nth-child(3), .customer-inventory th:nth-child(4) { width: 21%; }
body.app-mode .customer-inventory td { overflow-wrap: anywhere; white-space: normal; }
.customer-inventory th:nth-child(n+3), .customer-inventory td:nth-child(n+3) { text-align: right; }
.customer-stock-sku { color: #1e3a5f; font-variant-numeric: tabular-nums; }
.customer-stock-state { display: inline-block; font-size: 12px; line-height: 1.5; font-weight: 600; border-radius: 5px; padding: 3px 6px; }
.customer-stock-state.positive { color: #087f5b; background: #ecfdf5; }
.customer-stock-state.incoming { color: #1d4ed8; background: #eff6ff; }
.customer-stock-state.none { color: #64748b; background: #f1f5f9; }
.customer-stock-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 18px; border-top: 1px solid #e2e8f0; }
.customer-stock-pagination > span { color: #64748b; }
.customer-stock-pagination > div { display: flex; gap: 8px; }
.customer-inventory .customer-stock-note { color: #64748b; line-height: 1.7; margin: 0; padding: 0; border: 0; background: transparent; font-size: 13px; }
.customer-preview-notice { margin: 0; }
@media (max-width: 640px) {
  .customer-stock-intro { align-items: start; flex-direction: column; gap: 8px; }
  .customer-stock-search label { flex: 1 1 100%; }
  .customer-stock-search > button { flex: 1; }
  body.app-mode .customer-inventory th, body.app-mode .customer-inventory td { padding: 10px 7px; font-size: 12px; }
  body.app-mode .customer-inventory th { font-size: 10px; overflow-wrap: normal; text-transform: none; letter-spacing: 0; }
  .customer-inventory th:nth-child(1) { width: 24%; }
  .customer-inventory th:nth-child(2) { width: 28%; }
  .customer-inventory th:nth-child(3), .customer-inventory th:nth-child(4) { width: 24%; }
  .customer-stock-state { font-size: 11px; padding: 2px 3px; }
}
