/**
 * 样品库（外来样）列表与表单
 * 与 standard-page / erp-card 配合使用。
 * Playbook W1：缩略图列、状态徽章、单位只读（designs/sample-library-ship-split-v1/01-02）
 */
.inc-samp-page .standard-header {
  flex-wrap: wrap;
  gap: 12px;
}

.inc-samp-page .standard-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inc-samp-page .standard-filters {
  margin-bottom: 12px;
}

/* ========== F1 表单页：紧凑密度（对齐 demand_dev_requirement） ========== */
.inc-samp-form-page.standard-page > .standard-container {
  padding: 8px 12px;
}

.inc-samp-form-page .inc-samp-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 10px 14px 8px;
  margin-bottom: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.inc-samp-top-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.inc-samp-top-strip-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
}

.inc-samp-top-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 600;
}

.inc-samp-top-code {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.inc-samp-top-placeholder {
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  color: #6b7280;
}

.inc-samp-top-strip-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.inc-samp-top-strip-actions a.standard-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none !important;
}

.inc-samp-save-msg {
  margin: 4px 0 0;
  min-height: 18px;
  font-size: 12px;
  color: #6b7280;
}

.inc-samp-section-card {
  padding: 12px 14px !important;
  margin-bottom: 8px;
}

.inc-samp-card-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
}

.inc-samp-form-page .form-label.small {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.inc-samp-form-page .form-control-sm,
.inc-samp-form-page .form-select-sm {
  min-height: 30px;
  font-size: 14px;
  line-height: 1.4;
}

.inc-samp-form-page textarea.form-control-sm {
  min-height: 4.25rem;
}

.inc-samp-unit-box {
  display: flex;
  align-items: center;
}

.inc-samp-photo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.inc-samp-photo-actions #inc-samp-file {
  max-width: 320px;
}

.inc-samp-photo-tile--pending {
  border-style: dashed;
}

.inc-samp-photo-pending-tag {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 0 4px;
  font-size: 11px;
  line-height: 1.4;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.92);
  color: #fff;
}

.inc-samp-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.inc-samp-photo-tile {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.inc-samp-photo-del {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
}

.inc-samp-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inc-samp-label-stage .pkg-label-surface--screen {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  margin: 0 auto;
  background: #fff;
}

.inc-samp-num {
  text-align: right;
}

.inc-samp-kw-input {
  max-width: 280px;
}

.inc-samp-col-thumb {
  width: 64px;
  min-width: 64px;
  max-width: 72px;
  vertical-align: middle;
}

/* 列表缩略图：固定 48×48，禁止原图撑开表格行；点击见 lightbox */
.inc-samp-thumb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: zoom-in;
  overflow: hidden;
  vertical-align: middle;
}

.inc-samp-thumb-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.inc-samp-thumb {
  display: block;
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  vertical-align: middle;
}

.inc-samp-thumb--empty {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px dashed #d1d5db;
  background: #f9fafb;
  color: #9ca3af;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inc-samp-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.88);
  cursor: zoom-out;
}

.inc-samp-lightbox.is-open {
  display: flex;
}

.inc-samp-lightbox__img {
  max-width: min(960px, 96vw);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  cursor: default;
}

.inc-samp-lightbox__close {
  position: fixed;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.inc-samp-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.inc-samp-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.inc-samp-badge--in {
  background: #ecfdf5;
  color: #047857;
}

.inc-samp-badge--out {
  background: #f3f4f6;
  color: #6b7280;
}

.inc-samp-unit-readonly {
  height: 30px;
  line-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: 14px;
}

.inc-samp-field-hint {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: #6b7280;
}

.inc-samp-barcode-panel {
  margin-top: 16px;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.inc-samp-barcode-panel__title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px;
}

.inc-samp-barcode-wrap {
  text-align: center;
  padding: 8px 0;
}

.inc-samp-barcode-code {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.inc-samp-purchase-banner {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background-color: #eff6ff;
  color: #1e40af;
  font-size: 14px;
}

