:root {
  --c1: #d9ed92;
  --c2: #b5e48c;
  --c3: #99d98c;
  --c4: #76c893;
  --c5: #52b69a;
  --c6: #34a0a4;
  --c7: #168aad;
  --c8: #1a759f;
  --c9: #1e6091;
  --c10: #184e77;
  --c11: #ff0000;
  --c12: #caf0f8;
  --bg: #f7faf7;
  --ink: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --border: #e2e8f0;
  --focus: #1a759f;
  --trans: rgba(217, 237, 146, 0.3);
  --foot: rgba(183, 194, 161, 0.3);
  --primary-color: var(--c5);
  --secondary-color: var(--c8);
  --success-color: var(--c4);
  --warning-color: #fbbf24;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font: 14px/1.55 system-ui, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body.modal-open {
  overflow: hidden !important;
}

header {
  position: sticky;
  top: 0;
  background: linear-gradient(90deg, var(--card), var(--c2));
  color: var(--c8);
  padding: 14px 16px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(181, 228, 140, 0.32);
}

.header-center {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.header-logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.header-logo {
  height: 80px !important;
  width: auto;
}

.header-text {
  text-align: center;
  flex: 1;
}

.header-text h1,
.header-text p {
  margin: 0;
  font-size: 22px;
  color: var(--c8);
  font-family: comic sans ms;
}

header h1 {
  margin: 0;
  font-size: 27px;
}

header p {
  margin: 4px 0 0 0;
  opacity: .95;
}

.header-nav {
  display: flex;
  align-items: center;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--c7), var(--c8));
  color: #ffffff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(22, 138, 173, 0.3);
}

.header-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(22, 138, 173, 0.5);
  background: linear-gradient(135deg, var(--c8), var(--c9));
}

.header-link:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(22, 138, 173, 0.3);
}

main {
  max-width: 1200px;
  margin: 20px auto 96px;
  padding: 0 16px;
}

nav.steps {
  position: sticky;
  top: 30px;
  background: var(--trans);
  border: 1px solid var(--border);
  backdrop-filter: blur(1px);
  border-radius: 999px;
  box-shadow: 1px 3px 6px #888888;
  padding: 8px;
  display: flex;
  gap: 29px;
  flex-wrap: wrap;
  z-index: 5;
}

.stepchip {
  padding: 6px 12px;
  margin-left: 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: 1px 2px 6px var(--c3);
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease-in-out;
}

.stepchip:hover {
  transform: translateY(-2px);
  background-color: var(--c1);
  box-shadow: 1px 4px 8px var(--c3);
}

.stepchip.active {
  background: var(--c2);
  border-color: var(--c3);
  font-weight: 700;
}

.container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 14px;
  margin-bottom: 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

h2 {
  margin: 0 0 8px;
}

fieldset {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px;
  margin: 0 0 12px;
}

legend {
  padding: 0 6px;
  font-weight: 700;
  font-size: 1.2rem;
  color: #1975A0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  cursor: pointer;
}

.toggle-icon {
  font-size: 1rem;
  transition: transform 0.3s ease;
  margin-left: auto;
  padding-left: 1rem;
}

fieldset.collapsed .toggle-icon {
  transform: rotate(-90deg);
}

fieldset.collapsed>*:not(legend) {
  display: none;
}

label {
  display: block;
  margin: .75rem 0 .4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
input[type="datetime-local"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background-color: var(--bg);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 1em;
}

input[type="text"]:hover,
input[type="number"]:hover,
input[type="datetime-local"]:hover,
input[type="date"]:hover,
select:hover,
textarea:hover {
  border-color: var(--c7);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.row {
  display: flex;
  gap: 50px;
  flex-wrap: wrap;
}

.row>* {
  flex: 1 1 240px;
}

.hint {
  font-size: .9rem;
  color: var(--muted);
  margin-top: 2px;
}

.chipset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
}

.chip input {
  accent-color: var(--c7);
}

.toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  background: var(--foot);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(6px);
  padding: 10px 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 20;
}

button {
  border: 1px solid var(--border);
  background: linear-gradient(#fff, #f7faf7);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

button.primary {
  background: linear-gradient(var(--c3), var(--c2));
  border-color: var(--c3);
}

.danger {
  color: #b91c1c;
}

.ok {
  color: #0f766e;
  font-weight: 600;
}

.pill {
  display: inline-block;
  background: var(--c1);
  border: 1px solid var(--c3);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .85rem;
}

.hidden {
  display: none !important;
}

.required::after {
  content: " *";
  color: #b91c1c;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.item .title {
  font-weight: 700;
}

.item .meta {
  color: var(--muted);
  font-size: .9rem;
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  margin-right: 6px;
}

.preview {
  background: linear-gradient(180deg, #fff, #f8fffb);
  border: 1px solid var(--c3);
  border-radius: 12px;
  padding: 12px;
}

.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0 6px;
}

.notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 10px;
  border-radius: 10px;
}

#toTopBtn {
  display: none;
  position: fixed;
  bottom: 60px;
  right: 30px;
  z-index: 99;
  font-size: 18px;
  outline: none;
  background: var(--c7);
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  box-shadow: 1px 2px 6px var(--c3);
}

#toTopBtn:hover {
  background: var(--c8);
}

@media print {

  nav.steps,
  .toolbar {
    display: none;
  }

  body {
    background: #fff;
  }

  .card {
    box-shadow: none;
    break-inside: avoid;
  }
}

:focus {
  outline: none;
}

button:focus-visible,
a:focus-visible {
  box-shadow: 0 0 0 3px rgba(26, 117, 159, 0.4);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: var(--c8);
  background-color: var(--card);
  box-shadow: 0 0 0 3px rgba(26, 117, 159, 0.2);
  outline: none;
}

.abcde {
  background: linear-gradient(180deg, #fff, #f8fffb);
  border: 1px solid var(--c11);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#s1_airway,
#s1_ademfrequentie,
#s1_adempatroon,
#s1_ademdiepte,
#s1_huidskleur,
#s1_huidskleur,
#s1_circulation,
#s1_disability,
#s1_exposure {
  width: 240px;
  font-size: 11px;
}

.row-abcde {
  gap: 40px;
}

.row-abcde>* {
  flex-basis: auto;
  flex-grow: 0;
}

.alert {
  color: #b91c1c;
  font-style: italic;
  font-size: 11px;
}

.klachten {
  color: #34a0a4;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal[hidden] {
  display: none;
}

.modal-content {
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--c8);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: 30px;
  height: 30px;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-body label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.modal-body input,
.modal-body textarea,
.modal-body select {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
}

.modal-body textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-footer button {
  padding: 0.5rem 1rem;
}

.footer-content {
  width: 100%;
  margin-top: 10px;
  text-align: center;
  line-height: 1.4;
}

.footer-content a {
  color: #007cba;
  text-decoration: none;
  margin: 0 2px;
}

.footer-content a:hover {
  text-decoration: underline;
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Gradient achtergronden voor fieldsets in stap 1 */
.fieldset-client {
  background: linear-gradient(135deg, rgba(217, 237, 146, 0.15), rgba(181, 228, 140, 0.1));
  border-color: var(--c1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fieldset-client .row-client-context {
  gap: 10px;
  /* Smaller gap for this specific row */
}

.fieldset-impression {
  background: linear-gradient(135deg, rgba(26, 117, 159, 0.15), rgba(30, 96, 145, 0.1));
  border-color: var(--c2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fieldset-aanmelding {
  background: linear-gradient(135deg, rgba(153, 217, 140, 0.15), rgba(118, 200, 147, 0.1));
  border-color: var(--c3);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fieldset-baseline {
  background: linear-gradient(135deg, rgba(82, 182, 154, 0.15), rgba(52, 160, 164, 0.1));
  border-color: var(--c5);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fieldset-risicos {
  background: linear-gradient(135deg, rgba(22, 138, 173, 0.15), rgba(26, 117, 159, 0.1));
  border-color: var(--c7);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fieldset-betrokkenen {
  background: linear-gradient(135deg, rgba(30, 96, 145, 0.15), rgba(24, 78, 119, 0.1));
  border-color: var(--c9);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Gradient achtergronden voor fieldsets in stap 2 */
.fieldset-anamnese {
  background: linear-gradient(135deg, rgba(181, 228, 140, 0.15), rgba(153, 217, 140, 0.1));
  border-color: var(--c2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fieldset-vitale {
  background: linear-gradient(135deg, rgba(118, 200, 147, 0.15), rgba(82, 182, 154, 0.1));
  border-color: var(--c4);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fieldset-meetinstrumenten {
  background: linear-gradient(135deg, rgba(52, 160, 164, 0.15), rgba(22, 138, 173, 0.1));
  border-color: var(--c6);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fieldset-lab {
  background: linear-gradient(135deg, rgba(26, 117, 159, 0.15), rgba(30, 96, 145, 0.1));
  border-color: var(--c8);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Gradient achtergronden voor fieldsets in stap 3 */
.fieldset-diagnose {
  background: linear-gradient(135deg, rgba(153, 217, 140, 0.15), rgba(118, 200, 147, 0.1));
  border-color: var(--c3);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Gradient achtergronden voor fieldsets in stap 4 */
.fieldset-doelen {
  background: linear-gradient(135deg, rgba(82, 182, 154, 0.15), rgba(52, 160, 164, 0.1));
  border-color: var(--c5);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Gradient achtergronden voor fieldsets in stap 5 */
.fieldset-interventies {
  background: linear-gradient(135deg, rgba(22, 138, 173, 0.15), rgba(26, 117, 159, 0.1));
  border-color: var(--c7);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Gradient achtergronden voor fieldsets in stap 6 */
.fieldset-evaluatie {
  background: linear-gradient(135deg, rgba(30, 96, 145, 0.15), rgba(24, 78, 119, 0.1));
  border-color: var(--c9);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fieldset-sbar {
  background: linear-gradient(135deg, rgba(217, 237, 146, 0.1), rgba(181, 228, 140, 0.08));
  border-color: var(--c2);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fieldset-opmerkingen {
  background: linear-gradient(135deg, rgba(118, 200, 147, 0.1), rgba(82, 182, 154, 0.08));
  border-color: var(--c4);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Gender toggle switch styles */
.gender-toggle-container {
  flex: 0 0 auto;
  min-width: 150px;
}

.gender-toggle {
  position: relative;
  display: inline-flex;
  background: var(--border);
  border-radius: 20px;
  padding: 2px;
  width: 120px;
  height: 34px;
  margin-top: 4px;
}

.gender-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gender-toggle label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: color 0.3s;
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
}

.toggle-slider {
  position: absolute;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  background: white;
  border-radius: 18px;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#gender-vrouw:checked~.toggle-slider {
  transform: translateX(calc(100% + 2px));
}

#gender-man:checked~.toggle-label-man,
#gender-vrouw:checked~.toggle-label-vrouw {
  color: var(--c7);
  font-weight: 600;
}

/* Initialen container met titel prefix */
.initialen-container {
  display: flex;
  align-items: center;
  gap: 2px;
}

.titel-prefix {
  font-weight: 600;
  color: var(--c7);
  font-size: 13px;
  min-width: 60px;
}

.initialen-container input {
  flex: 1;
}

/* Compactere input velden voor specifieke elementen */
.compact-field {
  max-width: 200px;
}

.compact-field-small {
  max-width: 120px;
}

.compact-field-medium {
  max-width: 250px;
}

/* Specifieke veld breedtes en flex behavior */
#s1_leeftijd {
  max-width: 90px;
  font-size: 12px;
}

#s1_taal {
  max-width: 140px;
  font-size: 12px;
}

#s1_initialen {
  max-width: 200px;
  font-size: 12px;
}

#s1_setting {
  max-width: 170px;
}

#s1_datumtijd {
  max-width: 200px;
}

/* Aangepaste flex voor parent containers van compacte velden */
.field-compact {
  flex: 0 0 auto;
}

.field-compact-small {
  flex: 0 0 auto;
  min-width: 120px;
}

.field-compact-medium {
  flex: 0 0 auto;
  min-width: 280px;
}

.field-wide-select {
  flex: 0 0 auto;
  min-width: 280px;
}

/* Bibliotheek modal styles */
.modal-large .modal-content {
  max-width: 800px;
  width: 90vw;
}

.bibliotheek-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.casuslijst {
  max-height: 400px;
  overflow-y: auto;
}

.casus-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.casus-item:hover {
  background-color: var(--background-secondary);
  border-color: var(--primary-color);
}

.casus-item.empty {
  text-align: center;
  color: var(--text-muted);
  cursor: default;
  font-style: italic;
}

.casus-item.empty:hover {
  background-color: transparent;
  border-color: var(--border-color);
}

.casus-info {
  flex: 1;
}

.casus-titel {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.casus-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.casus-actions {
  display: flex;
  gap: 0.5rem;
}

.casus-actions button {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
  background: white;
  border-radius: 4px;
  cursor: pointer;
}

.casus-actions button:hover {
  background-color: var(--background-secondary);
}

.casus-actions .delete-btn {
  color: var(--danger-color);
  border-color: var(--danger-color);
}

.casus-actions .delete-btn:hover {
  background-color: var(--danger-color);
  color: white;
}

.casus-section-header {
  font-weight: bold;
  font-size: 0.9rem;
  color: var(--c8);
  margin: 1rem 0 0.5rem 0;
  padding: 0.5rem;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  border-radius: 6px;
  border-left: 4px solid var(--c7);
}

.casus-section-header:first-child {
  margin-top: 0;
}

.casus-item.predefined {
  border-left: 4px solid var(--c5);
  background: linear-gradient(135deg, var(--card), var(--c12));
}

.casus-item.predefined:hover {
  background: linear-gradient(135deg, var(--c12), var(--c2));
  border-left-color: var(--c7);
}

.casus-actions .open-btn {
  background-color: var(--c5);
  color: white;
  border-color: var(--c5);
}

.casus-actions .open-btn:hover {
  background-color: var(--c7);
  border-color: var(--c7);
}

.feedback-btn {
  background: linear-gradient(135deg, var(--c4), var(--c5));
  color: white;
  border: 1px solid var(--c5);
  font-weight: 600;
}

.feedback-btn:hover {
  background: linear-gradient(135deg, var(--c5), var(--c6));
  border-color: var(--c6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(82, 182, 154, 0.3);
}

.stats-btn {
  background: linear-gradient(135deg, var(--c7), var(--c8));
  color: white;
  border: 1px solid var(--c7);
  font-weight: 600;
}

.stats-btn:hover {
  background: linear-gradient(135deg, var(--c8), var(--c9));
  border-color: var(--c9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 117, 159, 0.3);
}

/* Suggestion styles */
.suggestions-container {
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: var(--background-secondary);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
}

.suggestion-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.suggestion-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.suggestion-item:last-child {
  margin-bottom: 0;
}

.suggestion-content {
  flex: 1;
  margin-right: 1rem;
}

.suggestion-content strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.25rem;
}

.suggestion-rationale {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.suggestion-confidence {
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--success-color);
}

.suggestion-add-btn {
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: bold;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.suggestion-add-btn:hover {
  background-color: var(--primary-hover);
}

/* Warning styles */
.warnings-container {
  margin-bottom: 1rem;
  padding: 1rem;
  background-color: #fff8f8;
  border: 1px solid var(--danger-color);
  border-radius: 8px;
}

.warning-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: white;
  border: 1px solid #ffcdd2;
  border-radius: 6px;
  gap: 0.75rem;
}

.warning-item:last-of-type {
  margin-bottom: 0;
}

.warning-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.warning-text {
  flex: 1;
  font-weight: bold;
  color: var(--danger-color);
}

.warning-value {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: normal;
}

.warning-hint {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
}

/* Feedback Admin Styles */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.admin-header {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--c7);
}

.admin-header h1 {
  margin: 0 0 0.5rem 0;
  color: var(--c8);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--c7);
  display: block;
}

.stat-label {
  color: var(--muted);
  margin-top: 0.5rem;
}

.feedback-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.feedback-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.satisfaction-score {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: bold;
  font-size: 0.8rem;
}

.satisfaction-1,
.satisfaction-2 {
  background: #fef3c7;
  color: #92400e;
}

.satisfaction-3 {
  background: #e5e7eb;
  color: #374151;
}

.satisfaction-4,
.satisfaction-5 {
  background: var(--c1);
  color: var(--c8);
}

.feedback-section {
  margin-bottom: 1rem;
}

.feedback-section h4 {
  margin: 0 0 0.5rem 0;
  color: var(--c8);
  font-size: 0.9rem;
}

.feedback-section p,
.feedback-section ul {
  margin: 0;
  color: var(--ink);
}

.feedback-section ul {
  padding-left: 1.2rem;
}

.no-feedback {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.actions {
  margin-bottom: 2rem;
}

.actions button {
  margin-right: 1rem;
}

/* ============================================
   AMBULYNT SPECIFIEKE STYLES
   ============================================ */

/* Bibliotheek Modal */
.bibliotheek-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  /* Standaard verborgen */
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.bibliotheek-modal:not(.hidden) {
  display: flex;
  /* Alleen flex wanneer NIET hidden */
}

.bibliotheek-content {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  max-width: 900px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.casuslijst {
  max-height: 400px;
  overflow-y: auto;
}

.casus-item {
  padding: 1rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.casus-item:hover {
  border-color: var(--primary-color);
  background: var(--c12);
}

.casus-item.predefined {
  border-left: 4px solid var(--c5);
}

.casus-titel {
  font-weight: bold;
  color: var(--c8);
  margin-bottom: 0.25rem;
}

.casus-meta {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ABCDE Grid */
.abcde-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.abcde-item {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: white;
  transition: all 0.2s ease;
}

.abcde-item:hover {
  border-color: var(--c5);
  box-shadow: 0 2px 8px rgba(82, 182, 154, 0.2);
}

.abcde-letter {
  font-size: 2rem;
  font-weight: 700;
  color: var(--c7);
  text-align: center;
  margin-bottom: 8px;
}

.abcde-label {
  font-size: 0.9rem;
  text-align: center;
  color: var(--muted);
  margin-bottom: 8px;
}

/* Vitale functies tabel */
.vitals-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.vitals-table th,
.vitals-table td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: left;
}

.vitals-table th {
  background: linear-gradient(90deg, var(--c1), var(--c2));
  color: var(--c8);
  font-weight: 600;
}

.vitals-table input {
  width: 100%;
  margin: 0;
}

/* NANDA/NIC/NOC sectie */
.nanda-section {
  background: linear-gradient(135deg, #fff, var(--c12));
  border: 2px solid var(--c5);
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
}

.nanda-title {
  font-weight: 700;
  color: var(--c8);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

/* Preview section */
.preview {
  background: linear-gradient(180deg, #fff, #f8fffb);
  border: 2px solid var(--c3);
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
  font-family: 'Courier New', monospace;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

.preview h3 {
  color: var(--c8);
  font-family: system-ui;
}

/* Alert boxes */
.alert {
  padding: 12px;
  border-radius: 10px;
  margin: 12px 0;
}

.alert-info {
  background: #e0f2fe;
  border: 1px solid #0284c7;
  color: #075985;
}

.alert-warning {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.alert-success {
  background: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

/* Loading spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  border: 3px solid var(--border);
  border-top-color: var(--c7);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

/* Responsive styles for AmbuLynt */
@media (max-width: 768px) {
  .abcde-grid {
    grid-template-columns: 1fr;
  }
}

/* Print styles for AmbuLynt */
@media print {

  header,
  nav.steps,
  .toolbar {
    display: none;
  }

  .card {
    break-inside: avoid;
  }
}

/* Custom Tooltip for Legends */
.tooltip-legend {
  position: relative;
  cursor: help;
}

.tooltip-legend::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--c7);
  /* Dark blue from palette */
  color: var(--card);
  /* White */
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 15px;
  /* Larger font */
  line-height: 1.5;
  white-space: normal;
  width: 300px;
  text-align: center;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%) translateY(10px);
  /* Start slightly lower */
}

/* Tooltip Arrow */
.tooltip-legend::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: var(--c7) transparent transparent transparent;

  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateX(-50%) translateY(10px);
}

/* Show on hover */
.tooltip-legend:hover::after,
.tooltip-legend:hover::before {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  /* Move to final position */
}

.abcde-section h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--c8);
  border-bottom: 2px solid var(--c2);
  padding-bottom: 0.25rem;
}

.field-full-width {
  flex-basis: 100%;
}

.row-abcde-detail {
  gap: 10px;
}

/* Specific narrower widths for ABCDE section */
.abcde-section .field-compact-medium {
  min-width: 200px;
}

.abcde-section .field-compact-small {
  min-width: 100px;
}