/* Match the dental record tools, history cards and document filters. */
.records-workspace { grid-template-columns: 280px minmax(0,1fr); align-items:start; gap:16px; }
.records-workspace .note-history { padding:16px;display:block; }
.records-workspace .note-history h3 { margin:0 0 16px;font-size:16px;line-height:24px;font-weight:600; }
.records-workspace .record-search input { min-width:0;width:100%;padding-inline-start:38px; }
.record-search-hint { margin:8px 0 16px;font-size:13px;line-height:18px;color:var(--muted,#64748b); }
.records-workspace .note-link { padding:12px;gap:4px;min-width:0;max-width:none; margin-bottom:8px;border:1px solid #e2e8f0;border-radius:12px;line-height:24px; }
.records-workspace .note-link strong {font-size:15px;line-height:22.4px;font-weight:500;}
.records-workspace .note-link span:not(.pill),.records-workspace .note-link small {font-size:15px;line-height:22.4px;}
.record-creation-tools {display:flex;flex-wrap:wrap;gap:8px;margin:16px 0;padding:12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;}
.record-creation-tools button {display:inline-flex;align-items:center;gap:8px;font-size:14px;line-height:20px;}
.record-amendment-notice {padding:12px 16px;border:1px solid #bbf7d0;border-radius:12px;background:#f0fdf4;color:#166534;}
.record-history-details {margin-top:20px;border:1px solid #bbf7d0;border-radius:12px;background:#f0fdf4;}
.record-history-details>summary {padding:12px 16px;display:flex;align-items:center;gap:8px;font-weight:600;cursor:pointer;}
.record-history-body {padding:16px 20px;}
.record-version-timeline {list-style:none;padding:0;margin:0;}
.record-version-timeline>li {position:relative;padding:0 0 20px 24px;border-inline-start:2px solid #a7f3d0;}
[dir=rtl] .record-version-timeline>li {padding:0 24px 20px 0;}
.record-version-timeline>li:last-child {padding-bottom:0;}
.record-version-dot {position:absolute;inset-inline-start:-7px;top:6px;width:12px;height:12px;border-radius:50%;border:2px solid #fff;background:#10b981;}
.record-version-timeline summary {cursor:pointer;line-height:24px;}
.record-version-timeline summary>strong {display:block;font-size:16px;line-height:24px;color:#052e16;}
.record-version-timeline summary>span {font-size:15px;line-height:22.4px;color:#047857;}
.record-version-changes {margin-top:12px;display:grid;gap:12px;}
.record-change {padding:16px;border:1px solid #d1fae5;border-radius:10px;background:#fff;}
.record-change h4 {margin:0 0 12px;font-size:15px;line-height:22.4px;}
.record-change>div {display:grid;grid-template-columns:70px minmax(0,1fr);gap:12px;margin:8px 0;}
.record-change>div>span {color:#64748b;}
.record-change p {margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:22.4px;}
.record-empty {padding:16px 8px;color:#64748b;font-size:15px;line-height:22.4px;}
.record-performed {margin:8px 0 16px;}
.record-retained-fields {padding:16px;border:1px solid #ddd6fe;border-radius:12px;background:#faf8ff;}
.record-retained-fields>summary {font-weight:600;cursor:pointer;}
.record-retained-fields label {display:block;margin:16px 0;}
.record-builder-dialog {width:min(1180px,calc(100vw - 32px));max-width:1180px;max-height:calc(100dvh - 32px);padding:24px;}
.record-builder-layout {display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr);gap:24px;margin:20px 0;align-items:start;}
.record-builder-section {padding:12px;margin-bottom:12px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;}
.record-builder-heading {display:flex;align-items:center;gap:8px;margin-bottom:12px;}
.record-builder-heading>input {flex:1;min-width:0;font-weight:600;}
.record-builder-heading>button {width:40px;min-width:40px;padding:0;}
.record-builder-section textarea {min-height:96px;}
.record-builder-required {display:flex;align-items:center;gap:8px;padding-top:24px;}
.record-builder-required input {width:20px;height:20px;min-height:0;}
.record-builder-layout aside {position:sticky;top:0;padding:16px;border:1px solid #ddd6fe;border-radius:12px;background:#f5f3ff;}
.record-builder-layout aside h3 {display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:16px;line-height:24px;}
#record-builder-preview {padding:16px;max-height:52vh;overflow:auto;background:#fff;border-radius:12px;}
#record-builder-preview section+section {margin-top:16px;}
#record-builder-preview h4 {margin:0 0 4px;font-size:15px;line-height:22.4px;}
#record-builder-preview p {margin:0;white-space:pre-wrap;font-size:15px;line-height:22.4px;color:#475569;}
.record-catalog-dialog {width:min(820px,calc(100vw - 32px));max-width:820px;}
.record-catalog-controls {display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:20px 0;}
.record-catalog-controls>.search-field {flex:1;min-width:250px;}
.record-template-catalog {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.record-template-catalog article {border:1px solid #e2e8f0;border-radius:12px;background:#fff;padding:12px;}
.record-template-choice {display:block;width:100%;text-align:start;border:0;background:transparent;padding:0;white-space:normal;}
.record-template-choice strong,.record-template-choice span,.record-template-choice small {display:block;}
.record-template-choice strong {font-size:15px;line-height:22.4px;}
.record-template-choice span {font-size:13px;line-height:18px;color:#64748b;margin-top:4px;}
.record-template-choice small {font-size:13px;line-height:18px;color:#64748b;margin-top:4px;}
.record-template-actions {display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
.record-template-actions button {font-size:13px;line-height:18px;padding:6px 10px;}
.record-document-filters {display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:16px 0;}
.record-document-filters .search-field {flex:1;min-width:250px;}
.record-document-filters select,.record-document-filters input {height:42px;font-size:15px;line-height:22px;}
.record-document-actions {display:flex;flex-wrap:wrap;gap:8px;}
.records-workspace,.record-builder-dialog,.record-catalog-dialog {font-family:inherit;font-size:15px;line-height:22.4px;}
.records-workspace input,.records-workspace textarea,.records-workspace select,.record-builder-dialog input,.record-builder-dialog textarea,.record-builder-dialog select {font-size:15px;line-height:22px;}
.records-workspace .note-fields label>span {font-size:14px;line-height:20px;font-weight:500;}
.records-workspace .note-reading h2 {font-size:20px;line-height:28px;}
.records-workspace .note-reading h3 {font-size:20px;line-height:28px;}
.records-workspace .document-text {font-size:15px;line-height:22.4px;}
.records-workspace .note-footer button,.record-document-actions button,.record-document-actions .button {font-size:14px;line-height:20px;}
.records-workspace .note-footer .muted {font-size:13px;line-height:18px;}
.records-workspace .facts-table table {font-size:15px;line-height:22.4px;}
.records-workspace .facts-table th {font-size:13px;line-height:18px;}
@media(max-width:1100px){.record-builder-layout {grid-template-columns:1fr;}.record-builder-layout aside {position:static;}}
@media(max-width:1023px){.records-workspace {grid-template-columns:1fr;}.records-workspace .note-history {position:static;}}
@media(max-width:760px){.records-workspace {grid-template-columns:1fr;}.records-workspace .note-history {max-height:390px;overflow:auto;}.record-template-catalog {grid-template-columns:1fr;}.record-builder-dialog {padding:16px;}.record-builder-heading {flex-wrap:wrap;}.record-builder-heading>input {flex-basis:calc(100% - 40px);}.record-document-actions {width:100%;}.record-change>div {grid-template-columns:1fr;gap:4px;}.record-builder-required {padding-top:0;}}
