.testing-record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 38px;
  margin: 4px 0 12px;
}

.testing-change-history {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line, rgba(148, 163, 184, 0.2));
}

.testing-change-history h3 {
  margin: 0;
  font-size: 15px;
}

.testing-change-history article {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--panel-soft, rgba(148, 163, 184, 0.08));
}

.testing-change-history article span,
.testing-change-history article p {
  color: var(--muted);
  font-size: 12px;
}

.testing-change-history article p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.testing-editor-modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 8, 23, 0.62);
}

.testing-editor-dialog {
  display: grid;
  gap: 18px;
  width: min(760px, 100%);
  max-height: min(760px, 90vh);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.24));
  border-radius: 8px;
  background: var(--panel, #fff);
  color: var(--text, #172033);
  box-shadow: 0 24px 70px rgba(2, 8, 23, 0.3);
}

.testing-editor-dialog header,
.testing-editor-dialog footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.testing-editor-dialog header h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.testing-editor-dialog header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.testing-editor-dialog form {
  display: grid;
  gap: 14px;
}

.testing-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.testing-editor-field {
  display: grid;
  gap: 6px;
}

.testing-editor-field > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.testing-editor-field input,
.testing-editor-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid var(--line, #d7dee9);
  border-radius: 6px;
  background: var(--input, #fff);
  color: var(--text, #172033);
  font: inherit;
}

.testing-editor-field textarea {
  resize: vertical;
}

.testing-editor-dialog footer {
  align-items: center;
}

.testing-editor-dialog footer > div {
  display: flex;
  gap: 8px;
}

@media (max-width: 640px) {
  .testing-editor-modal {
    padding: 10px;
  }

  .testing-editor-dialog {
    padding: 16px;
  }

  .testing-editor-grid {
    grid-template-columns: 1fr;
  }

  .testing-editor-dialog footer {
    align-items: stretch;
    flex-direction: column;
  }

  .testing-editor-dialog footer > div {
    justify-content: flex-end;
  }
}
