/**
 * 打样 QC（/qc/sampling）· L1 列表 + F1 录入
 * 母版：personnel_list + base-settings-l1-page + l1_list_compact.css
 */

/* ==================== 列表页 ==================== */

.sampling-qc-list-page .sampling-qc-list-hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
}

.sampling-qc-list-page .sampling-qc-list-filters {
  padding-top: 4px;
  margin-bottom: 8px;
}

.sampling-qc-list-page .sampling-qc-filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.sampling-qc-list-page .sampling-qc-filter-label {
  font-size: 12px;
  color: #6b7280;
}

.sampling-qc-list-page .sampling-qc-filter-item .standard-select {
  min-width: 140px;
}

.sampling-qc-list-page .standard-table-wrap {
  margin-top: 0;
}

/* ERP Table：对齐 ui_tables .standard-table 全格线；本页仅覆盖对齐与密度 */
.sampling-qc-list-page .standard-table {
  min-width: 0;
}

.sampling-qc-list-page .standard-table thead th {
  text-align: left;
}

.sampling-qc-list-page .standard-table thead th.standard-table-col-num {
  text-align: right;
}

.sampling-qc-list-page .standard-table thead th.standard-table-col-ops {
  text-align: center;
}

.sampling-qc-list-page .standard-table tbody td {
  text-align: left;
  min-width: 0;
}

.sampling-qc-list-page .standard-table tbody td.standard-table-col-num {
  text-align: right;
}

.sampling-qc-list-page .standard-table tbody td.standard-table-col-ops {
  text-align: center;
}

.sampling-qc-list-page .standard-table tbody tr {
  min-height: 48px;
}

.sampling-qc-list-page .standard-table tbody tr:hover {
  background-color: #f9fafb;
}

.sampling-qc-list-page .standard-table-empty td {
  text-align: center;
  color: #6b7280;
  padding: 24px 12px;
}

/* ==================== 录入页（F1 单卡） ==================== */
.sampling-qc-form-page .sampling-qc-form-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sampling-qc-form-page .sampling-qc-form-header {
  position: sticky;
  top: 0;
  z-index: 6;
  margin-bottom: 0;
  padding-bottom: 8px;
  background: #ffffff;
  border-bottom: 1px solid #f3f4f6;
}

.sampling-qc-form-page .sampling-qc-form-title-wrap {
  min-width: 0;
  flex: 1 1 auto;
}

.sampling-qc-form-page .sampling-qc-form-meta {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
}

.sampling-qc-form-page .sampling-qc-form-actions {
  flex-shrink: 0;
  gap: 8px;
}

.sampling-qc-form-page .sampling-qc-form-section {
  padding-top: 12px;
}

.sampling-qc-form-page .sampling-qc-form-section + .sampling-qc-form-section {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

.sampling-qc-form-page .sampling-qc-section-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #111827;
}

.sampling-qc-form-page .sampling-qc-section-hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
}

.sampling-qc-form-page .sampling-qc-info-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 0;
}

.sampling-qc-form-page .sampling-qc-info-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  margin: 0;
}

.sampling-qc-form-page .sampling-qc-info-row dt {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.sampling-qc-form-page .sampling-qc-info-row dd {
  margin: 0;
  font-size: 14px;
  color: #374151;
  word-break: break-word;
}

.sampling-qc-form-page .standard-table-wrap {
  margin-top: 0;
}

.sampling-qc-form-page .sampling-qc-items-table {
  min-width: 0;
}

.sampling-qc-form-page .sampling-qc-items-table thead th {
  text-align: left;
  padding: 8px 10px;
  white-space: nowrap;
}

.sampling-qc-form-page .sampling-qc-items-table tbody td {
  vertical-align: middle;
  padding: 6px 10px;
}

.sampling-qc-form-page .sampling-qc-items-table tbody tr {
  min-height: 44px;
}

.sampling-qc-form-page .sampling-qc-items-table tbody tr:hover {
  background-color: #f9fafb;
}

.sampling-qc-form-page .sampling-qc-col-item {
  width: 14%;
  min-width: 96px;
  font-weight: 500;
}

.sampling-qc-form-page .sampling-qc-col-photos {
  width: 22%;
  min-width: 148px;
  vertical-align: middle;
}

.sampling-qc-form-page .sampling-qc-col-result {
  width: 24%;
}

.sampling-qc-form-page .sampling-qc-col-status {
  width: 16%;
  min-width: 120px;
}

.sampling-qc-form-page .sampling-qc-col-remarks {
  width: auto;
}

.sampling-qc-form-page .sampling-qc-items-table .form-control-sm,
.sampling-qc-form-page .sampling-qc-items-table .form-select-sm {
  min-height: 30px;
  height: 30px;
  font-size: 13px;
  line-height: 1.4;
  box-sizing: border-box;
}

.sampling-qc-form-page .sampling-qc-form-error {
  margin: 8px 0 0;
  font-size: 13px;
}

.sqc-photo-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sqc-photo-thumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.sqc-photo-thumb-wrap {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 40px;
}

.sqc-photo-thumb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: zoom-in;
  overflow: hidden;
}

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

.sqc-photo-thumb {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
}

.sqc-photo-thumb-del {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.sqc-photo-upload-label {
  font-size: 12px;
  cursor: pointer;
  margin: 0;
}

.sqc-photo-upload-label.is-disabled {
  color: #9ca3af;
  pointer-events: none;
  cursor: default;
}

.sqc-photo-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;
}

.sqc-photo-lightbox.is-open {
  display: flex;
}

.sqc-photo-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;
}

.sqc-photo-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;
}

.sqc-photo-lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.sqc-photo-lightbox__nav--prev {
  left: 16px;
}

.sqc-photo-lightbox__nav--next {
  right: 16px;
}

.sqc-photo-lightbox__counter {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
}

@media (max-width: 767px) {
  .sampling-qc-form-page .sampling-qc-info-dl {
    grid-template-columns: 1fr;
  }

  .sampling-qc-form-page .sampling-qc-form-header {
    flex-direction: column;
    align-items: stretch;
  }

  .sampling-qc-form-page .sampling-qc-form-actions {
    justify-content: flex-end;
  }
}
