/* Contextual record reading and editing; existing forms remain the save owner. */
.record-view {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line, #e2e9e5);
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--ink, #20332e);
}
.record-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line, #e2e9e5);
}
.record-section-header h2,
.record-section-header h3 { margin: 0; font-size: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.record-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; max-width: 100%; gap: 8px; }
.record-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 8px 0 0; }
.record-value { min-width: 0; padding: 16px 0; border-bottom: 1px solid #e2e9e580; }
.record-value-wide { grid-column: 1 / -1; }
.record-value dt { margin-bottom: 5px; font-size: 12px; color: var(--muted, #64756e); font-weight: 600; }
.record-value dd { margin: 0; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.record-value dd.record-value-empty { color: var(--muted, #64756e); }
.record-group-title { margin: 24px 0 0; padding-bottom: 8px; font-size: 15px; color: var(--accent-dark, #105a47); border-bottom: 1px solid var(--line, #e2e9e5); }
.record-attachments { margin-top: 24px; padding: 18px; border: 1px solid var(--line, #e2e9e5); border-radius: 10px; }
.record-attachments .record-section-header { padding-bottom: 12px; }
.record-attachments h3 { font-size: 15px; }
.record-empty { color: var(--muted, #64756e); margin: 16px 0 0; }
.record-file-list { list-style: none; padding: 0; margin: 0; }
.record-file { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line, #e2e9e5); }
.record-file:last-child { border-bottom: 0; padding-bottom: 0; }
.record-file-name { min-width: 0; overflow-wrap: anywhere; }
.record-file .button { flex-shrink: 0; }
.record-edit-bar { margin-bottom: 20px; }
.record-edit-bar .record-section-header { padding-bottom: 16px; }
.record-view .button:focus-visible,
.record-edit-bar .button:focus-visible { outline: 3px solid #299478; outline-offset: 3px; }
@media (max-width: 600px) {
  .record-view { padding: 16px; }
  .record-values { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .record-section-header { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .record-section-header h2 { font-size: 17px; }
  .record-actions { margin-left: auto; }
  .record-attachments { padding: 14px; }
  .record-value { padding: 12px 0; }
}
