/* UPC/GTIN 校验与编码助手 · 工具局部样式 */

.upc-legal { margin-top: 0; }
.upc-block { margin-bottom: 20px; }
.upc-block-title { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.upc-single-row { display: flex; gap: 10px; align-items: stretch; }
.upc-single-row .fpt-input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.upc-single-row .fpt-btn { flex: 0 0 auto; }

.upc-result { margin-top: 14px; }
.upc-verdict { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.upc-verdict-ok { color: var(--fpt-success); }
.upc-verdict-computed { color: var(--fpt-accent-strong); }
.upc-verdict-error { color: var(--fpt-danger); }
.upc-levels { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.upc-levels li { display: flex; gap: 10px; }
.upc-levels strong { flex: 0 0 130px; color: var(--fpt-ink-2); }
.upc-levels span { color: var(--fpt-ink-3); }
.upc-levels .upc-level-yes { color: var(--fpt-success); }
.upc-levels .upc-level-no { color: var(--fpt-danger); }

.upc-barcode { margin-top: 10px; }
.upc-barcode-preview {
  display: inline-block;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--fpt-line);
  border-radius: 10px;
  margin-bottom: 10px;
  max-width: 100%;
  overflow-x: auto;
}
.upc-barcode-preview svg { display: block; max-width: 100%; height: auto; }

.upc-table td { white-space: normal; word-break: break-all; }
.upc-table .upc-status { font-weight: 600; font-size: 12px; }
.upc-status-ok { color: var(--fpt-success); }
.upc-status-computed { color: var(--fpt-accent-strong); }
.upc-status-error { color: var(--fpt-danger); }
tr.upc-row-error td { background: var(--fpt-danger-soft); }

@media (max-width: 768px) {
  .upc-single-row { flex-direction: column; }
  .upc-levels strong { flex-basis: 110px; }
}
