/* ============================================================
 * b30 · 生物样本与外送台账样式
 * 配套：js/v117-b30.js
 * ============================================================ */

.sp-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.sp-title { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.sp-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  background: #eef2ff; color: #4338ca; font-size: 12px; font-weight: 500;
}
.sp-actions { display: flex; gap: 8px; }
.sp-btn {
  border: 1px solid #d1d5db; background: #fff; color: #374151;
  padding: 7px 14px; border-radius: 6px; cursor: pointer; font-size: 13px;
  transition: .15s;
}
.sp-btn:hover { border-color: #9ca3af; background: #f9fafb; }
.sp-btn:disabled { opacity: .55; cursor: not-allowed; }
.sp-btn-primary { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.sp-btn-primary:hover { background: #4338ca; border-color: #4338ca; }
.sp-notice {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  padding: 10px 14px; border-radius: 6px; font-size: 13px; line-height: 1.7;
  margin-bottom: 12px;
}
.sp-notice b { color: #b45309; }

.sp-four {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 6px; font-size: 13px;
}
.sp-four-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.sp-four-bad { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.sp-four-items { display: flex; gap: 12px; flex-wrap: wrap; }
.sp-four-item.ok { color: #047857; }
.sp-four-item.no { color: #b91c1c; font-weight: 600; }

.sp-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; }
.sp-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.sp-grid th {
  text-align: left; padding: 10px 12px; background: #f9fafb; color: #6b7280;
  font-weight: 600; border-bottom: 1px solid #e5e7eb; white-space: nowrap;
}
.sp-grid td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; vertical-align: top; }
.sp-grid tr:last-child td { border-bottom: none; }
.sp-grid tr:hover td { background: #fafbff; }
.sp-muted { color: #9ca3af; font-size: 12px; }
.sp-empty { padding: 32px 16px; text-align: center; color: #9ca3af; font-size: 13px; }
.sp-link {
  border: none; background: none; color: #4f46e5; cursor: pointer;
  padding: 0; font-size: 13px;
}
.sp-link:hover { text-decoration: underline; }

.sp-st { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 12px; white-space: nowrap; }
.sp-st-green { background: #dcfce7; color: #166534; }
.sp-st-blue { background: #dbeafe; color: #1e40af; }
.sp-st-red { background: #fee2e2; color: #991b1b; }
.sp-st-gray { background: #f3f4f6; color: #4b5563; }
.sp-photo-ok { color: #059669; font-size: 12px; white-space: nowrap; }
.sp-photo-no { color: #dc2626; font-size: 12px; white-space: nowrap; }

.sp-modal-mask {
  position: fixed; inset: 0; background: rgba(17,24,39,.5); z-index: 100000;
  display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 40px 16px;
}
.sp-modal {
  background: #fff; border-radius: 10px; width: min(720px, 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.sp-modal-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #e5e7eb; font-size: 16px;
}
.sp-modal-close { cursor: pointer; font-size: 22px; color: #9ca3af; line-height: 1; }
.sp-modal-close:hover { color: #374151; }
.sp-modal-bd { padding: 18px 20px; }
.sp-modal-ft, .sp-modal-ft-inline {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px; border-top: 1px solid #e5e7eb;
}
.sp-modal-ft-inline { border-top: none; padding: 12px 0 0; }
.sp-tip-mini {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  padding: 8px 12px; border-radius: 6px; font-size: 12px; margin-bottom: 14px;
}
.sp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.sp-form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #4b5563; }
.sp-form-grid label i { color: #dc2626; font-style: normal; }
.sp-form-grid .sp-span2 { grid-column: 1 / -1; }
.sp-form-grid input, .sp-form-grid select, .sp-form-grid textarea,
.sp-upload-row input {
  border: 1px solid #d1d5db; border-radius: 6px; padding: 7px 10px;
  font-size: 13px; color: #111827; background: #fff; font-family: inherit;
}
.sp-form-grid input:focus, .sp-form-grid select:focus, .sp-form-grid textarea:focus {
  outline: none; border-color: #6366f1; box-shadow: 0 0 0 2px #e0e7ff;
}

.sp-detail { margin-top: 18px; }
.sp-detail-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: #f8fafc; border: 1px solid #e5e7eb;
  border-bottom: none; border-radius: 8px 8px 0 0; font-size: 15px;
}
.sp-detail-hd span { font-size: 13px; color: #6b7280; display: flex; align-items: center; gap: 8px; }
.sp-detail-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: #e5e7eb; border: 1px solid #e5e7eb; border-radius: 0 0 8px 8px; overflow: hidden;
}
.sp-detail-grid > div { background: #fff; padding: 10px 14px; font-size: 13px; color: #111827; }
.sp-detail-grid span { display: block; color: #9ca3af; font-size: 12px; margin-bottom: 3px; }

.sp-sec {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 16px 18px; margin-top: 12px;
}
.sp-sec-hd { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.sp-photos { display: flex; gap: 12px; flex-wrap: wrap; }
.sp-photo-item { width: 130px; text-align: center; }
.sp-photo-thumb {
  width: 130px; height: 96px; border: 1px dashed #c7d2fe; background: #eef2ff;
  border-radius: 6px; cursor: pointer; font-size: 30px; color: #6366f1;
}
.sp-photo-thumb:hover { border-color: #6366f1; }
.sp-photo-cap { font-size: 12px; margin-top: 5px; color: #374151; word-break: break-all; }
.sp-photo-meta { font-size: 11px; color: #9ca3af; }
.sp-upload-row { display: flex; gap: 8px; margin-top: 14px; align-items: center; flex-wrap: wrap; }
.sp-upload-row input[type="file"] { font-size: 12px; }

.sp-timeline { border-left: 2px solid #e5e7eb; margin-left: 8px; padding-left: 18px; }
.sp-tl-item { position: relative; padding: 6px 0; font-size: 13px; color: #374151; }
.sp-tl-dot {
  position: absolute; left: -25px; top: 10px; width: 10px; height: 10px;
  border-radius: 50%; background: #10b981; border: 2px solid #fff; box-shadow: 0 0 0 1px #10b981;
}
.sp-tl-dot.blue { background: #3b82f6; box-shadow: 0 0 0 1px #3b82f6; }
.sp-tl-dot.gray { background: #9ca3af; box-shadow: 0 0 0 1px #9ca3af; }

@media (max-width: 720px) {
  .sp-form-grid { grid-template-columns: 1fr; }
  .sp-detail-grid { grid-template-columns: 1fr 1fr; }
}
