.complete-lab-tabs,.complete-lab-filters {display:flex;flex-wrap:wrap;gap:10px;margin:12px 0;align-items:end;}
.complete-lab-tabs .btn {flex:1;min-width:140px;min-height:44px;}
.complete-lab-filters label {flex:1 1 140px;min-width:0;}
.complete-lab-scroll {overflow:auto;max-width:100%;margin-top:16px;}
.complete-lab-table {width:100%;min-width:800px;border-collapse:collapse;font-size:14px;text-align:left;}
.complete-lab-table th,.complete-lab-table td {padding:10px;border-bottom:1px solid #cbd5dd;vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere;}
.complete-lab-table thead th {background:#e8f0f3;color:#213c4c;}
.complete-lab-table tbody th {font-weight:600;}
.complete-lab-table th:first-child,.complete-lab-table td:first-child {min-width:110px;white-space:nowrap;}
.complete-lab-matrix-scroll {max-height:65vh;isolation:isolate;}
.complete-lab-matrix {border-collapse:separate;border-spacing:0;min-width:100%;width:max-content;table-layout:fixed;}
.complete-lab-matrix th,.complete-lab-matrix td {min-width:220px;width:220px;max-width:220px;white-space:pre-wrap;}
.complete-lab-matrix th:first-child,.complete-lab-matrix td:first-child {min-width:160px;width:160px;max-width:160px;white-space:pre-wrap;}
.complete-lab-matrix thead th {position:sticky;top:0;z-index:2;}
.complete-lab-matrix tbody th {position:sticky;left:0;z-index:1;background:#f3f6f7;border-right:1px solid #cbd5dd;}
.complete-lab-matrix thead th:first-child {left:0;z-index:3;}
.complete-lab-unit {display:block;font-weight:400;font-size:12px;color:#42535c;}
.complete-lab-observation + .complete-lab-observation {border-top:1px dashed #9eafb8;margin-top:10px;padding-top:10px;}
.complete-lab-provenance,.complete-lab-reference {font-size:12px;line-height:1.5;color:#42535c;white-space:pre-wrap;overflow-wrap:anywhere;}
.complete-lab-reports {min-width:0;}
.complete-lab-group {margin:12px 0;border-top:1px solid #cbd5dd;}
.complete-lab-group > summary {font-weight:700;font-size:16px;padding:12px 0;cursor:pointer;}
.complete-lab-report > summary {cursor:pointer;min-height:44px;font-size:15px;line-height:1.4;}
.complete-lab-report > summary span {display:block;font-size:13px;color:#42535c;margin-top:4px;}
.complete-lab-report .complete-lab-table {min-width:0;table-layout:auto;font-size:13px;}
.complete-lab-report .complete-lab-table td {padding:5px;min-width:0;white-space:normal;}
.complete-lab-report .micro-report-line {font-size:14px;line-height:1.4;}
.complete-lab-report {border-top:2px solid #9eafb8;padding:16px 0;margin-top:16px;}
.complete-lab-report h3 {font-size:17px;margin:0 0 8px;overflow-wrap:anywhere;}
.complete-lab-report p {margin:4px 0;}
.complete-lab-report dl {margin:12px 0 0;}
.complete-lab-report-result {display:grid;grid-template-columns:minmax(0,180px) minmax(0,1fr);gap:12px;padding:10px 0;border-top:1px solid #cbd5dd;}
.complete-lab-report dt {font-weight:600;overflow-wrap:anywhere;}
.complete-lab-report dd {margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;}
@media (max-width:600px) {
  .complete-lab-report-result {grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:8px;font-size:14px;}
  .complete-lab-report-result:has(table) {grid-template-columns:minmax(0,1fr);}
}
.modal .complete-lab-tabs .btn,.modal .complete-lab-filters .btn {min-height:44px;font-size:14px;}
.complete-lab-print {font:11pt Arial,sans-serif;color:#202a35;padding:12px;}
.complete-lab-print h1 {font-size:18pt;}
.btn.complete-results-launch,.shell.phone-view .btn.complete-results-launch {display:block;width:100%;min-height:54px;padding:14px 20px;font-size:18px;font-weight:700;background:#315f8c;color:#fff;border:2px solid #244a70;margin-top:16px;}
.import-record-card > summary {cursor:pointer;min-height:44px;padding:12px 0;font-weight:700;font-size:16px;}
.import-source-episode {margin:8px 0;border-top:1px solid #c5d2dc;}
.import-source-episode > summary {cursor:pointer;padding:12px 0;min-height:44px;overflow-wrap:anywhere;}
.import-confirm-all {display:flex !important;align-items:flex-start;gap:12px;padding:14px;background:#e6f0f6;border:1px solid #9cb8cd;margin-top:16px;}
.import-confirm-all input[type="checkbox"] {flex:0 0 22px !important;width:22px !important;height:22px !important;min-width:22px !important;margin:2px 0;}
.import-confirm-all span {min-width:0;flex:1;line-height:1.4;}
.import-month-field[hidden] {display:none !important;}
.nhls-import-form,.import-review-section {min-width:0;grid-template-columns:minmax(0,1fr);}
details.import-record-card {display:block;min-width:0;max-width:100%;}
.import-source-episode {min-width:0;max-width:100%;}
.nhls-import-form .form-save-bottom > .btn {min-width:0;white-space:normal;}
.shell.phone-view .nhls-import-form .import-overview {grid-template-columns:repeat(2,minmax(0,1fr));}
.nhls-import-form .import-overview > div {min-width:0;overflow-wrap:anywhere;}
@media print {
  @page {size:A4 landscape;margin:12mm;}
  .complete-lab-print {padding:0;}
  .complete-lab-scroll {overflow:visible;}
  .complete-lab-table {min-width:0;table-layout:fixed;font-size:9pt;}
  .complete-lab-table th,.complete-lab-table td {padding:5px;}
  .complete-lab-table thead {display:table-header-group;}
  .complete-lab-table tr {break-inside:avoid;}
  .complete-lab-matrix-scroll {max-height:none;}
  .complete-lab-matrix {width:100%;min-width:0;}
  .complete-lab-matrix th,.complete-lab-matrix td,.complete-lab-matrix th:first-child,.complete-lab-matrix td:first-child {position:static;min-width:0;max-width:none;width:auto;white-space:pre-wrap;}
  .complete-lab-matrix th:first-child {width:15%;}
  .complete-lab-date-page + .complete-lab-date-page {break-before:page;}
  .complete-lab-date-page h2 {font-size:12pt;}
  .complete-lab-report h3,.complete-lab-report dt {break-after:avoid;}
  .complete-lab-report-result {display:block;}
  .complete-lab-report dd {margin-top:6px;}
}
.micro-matrix-value {white-space:pre-wrap;overflow-wrap:anywhere;}
.shell.phone-view .complete-lab-matrix {min-width:100%;}
.complete-lab-matrix-scroll {scroll-padding-left:180px;}
@media (max-width:600px) {
  .complete-lab-matrix th:first-child,.complete-lab-matrix td:first-child {min-width:120px;width:120px;max-width:120px;}
  .complete-lab-matrix-scroll {scroll-padding-left:140px;}
}
.lab-result-abnormal { color: #b42332; }
