#measurementsStage { min-width: 0; background: #fff; padding: 20px; }
#measurementsStage * { letter-spacing: 0; }
.mrHeader { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mrHeader h2, .mrHeader h3 { margin: 0; font-size: 20px; }
#mrSubtitle { display: block; color: #64748b; margin-top: 6px; font-size: 13px; }
.mrMessage { color: #087c72; min-height: 20px; white-space: pre-wrap; }
.mrError { color: #b42318; }
.mrFilters { display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap; }
.mrFilters input { flex: 1; min-width: 180px; }
.mrFilters select { width: auto; max-width: 100%; }
.mrTableWrap { width: 100%; min-width: 0; overflow-x: auto; margin: 16px 0; }
.mrTable { width: 100%; border-collapse: collapse; table-layout: auto; }
.mrTable th { background: #edf3f5; color: #526474; text-align: left; font-size: 12px; padding: 12px; white-space: normal; }
.mrTable td { border-bottom: 1px solid #dbe3ea; padding: 12px; font-size: 13px; vertical-align: top; }
.mrTable tbody tr:hover { background: #f5faf9; }
.mrTable strong, .mrTable small { display: block; }
.mrTable small { margin-top: 6px; color: #64748b; }
#measurementsStage .mrLink { color: #087c72; background: transparent; padding: 0; border: 0; text-align: left; font-weight: 600; white-space: normal; overflow-wrap: anywhere; box-shadow: none; }
.mrTabs { display: flex; border-bottom: 1px solid #dbe3ea; gap: 6px; margin: 16px 0 24px; flex-wrap: wrap; }
#measurementsStage .mrTabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; border-radius: 0; padding: 12px 16px; }
#measurementsStage .mrTabs button[aria-selected="true"] { border-bottom-color: #0a8077; color: #087c72; background: #f0f8f6; }
.mrGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mrGrid label, .mrInstrument label, .mrSourceUpload label, #mrSourceTools label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #526474; min-width: 0; }
.mrGrid textarea { min-height: 110px; resize: vertical; }
#mrPanel > h3 { margin-top: 24px; margin-bottom: 12px; }
.mrInstrument { display: grid; grid-template-columns: 1fr 1fr 2fr auto; align-items: end; gap: 12px; margin-bottom: 16px; }
.mrSourceUpload { display: grid; grid-template-columns: 1fr 2fr auto; align-items: end; gap: 16px; }
.mrResultSection { border-top: 1px solid #dbe3ea; padding: 24px 0; }
.mrResultSection .mrGrid { margin-top: 16px; }
.mrResultSection h3 { font-size: 17px; overflow-wrap: anywhere; }
.mrResults input:not([type="checkbox"]) { min-width: 100px; }
.mrResults td:nth-child(2) input { min-width: 160px; }
.mrResults select { min-width: 135px; }
.mrResults textarea { min-width: 180px; }
.mrResults td { padding: 8px; }
.mrGaps { color: #9f450d; line-height: 1.6; }
#mrSourceDialog { width: min(1440px, 96vw); max-width: 96vw; max-height: 94vh; padding: 24px; border-radius: 6px; }
.mrSourceGrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; margin-top: 20px; }
#mrSourcePreview { min-width: 0; }
#mrSourcePreview img { max-width: 100%; height: auto; }
#mrSourcePreview [data-pdf-viewport] { max-height: 70vh; overflow: auto; background: #e8eef1; }
#mrSourcePreview canvas { display: block; max-width: none; }
#mrSourceTools { min-width: 0; }
#mrSourceTools label { margin-bottom: 16px; }
#mrSourceTools .mrConsent label { display: block; line-height: 1.6; margin-top: 20px; }
.mrConsent input { width: auto; margin-right: 6px; }
.mrTranscript { white-space: pre-wrap; font-size: 12px; overflow-wrap: anywhere; max-height: 440px; overflow: auto; background: #f2f6f7; padding: 12px; }
@media (max-width: 760px) {
  #measurementsStage { padding: 12px; }
  .mrGrid, .mrInstrument, .mrSourceUpload, .mrSourceGrid { grid-template-columns: minmax(0, 1fr); }
  .mrTable:not(.mrResults) { min-width: 680px; }
  .mrHeader .actions { flex-wrap: wrap; }
  .mrTabs { gap: 0; }
  #measurementsStage .mrTabs button { padding: 10px; font-size: 13px; }
}
