.preflight-review {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(82, 224, 173, .34);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(17, 53, 56, .52), rgba(4, 13, 23, .78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.preflight-review[hidden] { display: none; }

.preflight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.preflight-head > div { display: grid; gap: 4px; }
.preflight-head b { color: #dffcf1; font-size: 11px; }
.preflight-head span { color: #7898a5; font-size: 9px; line-height: 1.5; }
.preflight-head strong {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #f7be55;
  border: 1px solid rgba(247, 190, 85, .35);
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: .08em;
}

.preflight-status {
  padding: 10px 11px;
  color: #9fc0ca;
  border-left: 2px solid #52e0ad;
  background: rgba(82, 224, 173, .055);
  font-size: 9px;
  line-height: 1.65;
}

.preflight-overlay {
  min-height: 210px;
  max-height: 340px;
  border: 1px solid rgba(148, 184, 210, .18);
  border-radius: 11px;
  background: #06101b;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.preflight-overlay .trace-media { max-height: 340px; }
.preflight-overlay img { width: 100%; height: 100%; object-fit: contain; opacity: .72; }
.preflight-overlay svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.preflight-overlay .preflight-before {
  fill: none;
  stroke: #f7be55;
  stroke-width: 3;
  stroke-dasharray: 10 7;
  opacity: .78;
  vector-effect: non-scaling-stroke;
}
.preflight-overlay.hide-before .preflight-before { display: none; }
.preflight-overlay .preflight-final {
  fill: rgba(82, 224, 173, .08);
  stroke: #52e0ad;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(82, 224, 173, .5));
  vector-effect: non-scaling-stroke;
}
.preflight-overlay .preflight-final.linear { fill: none; }

.preflight-toggle,
.preflight-confirm {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #8ba7b5;
  font-size: 9px;
  line-height: 1.55;
}
.preflight-toggle input,
.preflight-confirm input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: #36d399; }
.preflight-confirm {
  padding: 11px;
  color: #cfe7e5;
  border: 1px solid rgba(82, 224, 173, .22);
  border-radius: 10px;
  background: rgba(82, 224, 173, .055);
}

.preview-box.cad-fitted { padding: 16px; }
.preview-box .cad-preview-svg {
  display: block;
  width: min(100%, 960px);
  height: auto;
  max-height: 600px;
  position: relative;
  z-index: 1;
}

@media (max-width: 720px) {
  .preflight-head { flex-direction: column; }
  .preflight-overlay { min-height: 180px; }
  .preview-box.cad-fitted { padding: 8px; }
}
