h1:focus {
  outline: none;
}

.valid.modified:not([type=checkbox]) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid #e50000;
}

.validation-message {
  color: #e50000;
}

.blazor-error-boundary {
  background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
  padding: 1rem 1rem 1rem 3.7rem;
  color: white;
}

  .blazor-error-boundary::after {
    content: "An error has occurred."
  }

.darker-border-checkbox.form-check-input {
  border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* --- QuestionnaireView spezifisch --- */

.question-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 2rem;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  background: #fff;
}

.question-title {
  margin-bottom: 1.2rem;
  font-size: 1.15rem;
}

.yesno-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.yesno-status {
  font-weight: 500;
  min-width: 2.5rem;
  text-align: left;
  color: #0d6efd;
}

.card-body {
  padding: 2rem 1.5rem;
}

.form-control-lg {
  margin-bottom: 0.5rem;
}

.btn-lg {
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
}

/* Antworten-Grid: gleiche H�he f�r alle Buttons in einer Zeile */
.question-card .row.g-2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0;
}

.question-card .row.g-2 > [class^="col-"] {
  display: flex;
  align-items: stretch;
}

.question-card .btn-lg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  /* Optional: f�r mehrzeiligen Text */
  text-align: center;
  width: 100%;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .question-card {
    min-height: 160px;
    padding: 1rem 0.5rem;
  }

  .card-body {
    padding: 1rem 0.5rem;
  }

  .yesno-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

.answer-signal-none,
.list-group-item.answer-signal-none {
  background-color: #ffffff;
  color: inherit;
}

.answer-signal-red,
.list-group-item.answer-signal-red {
  background-color: #dc3545;
  color: #ffffff;
}

.answer-signal-orange,
.list-group-item.answer-signal-orange {
  background-color: #fd7e14;
  color: #ffffff;
}

.answer-signal-yellow,
.list-group-item.answer-signal-yellow {
  background-color: #ffc107;
  color: #212529;
}

.answer-signal-light-green,
.list-group-item.answer-signal-light-green {
  background-color: #8bc34a;
  color: #212529;
}

.answer-signal-green,
.list-group-item.answer-signal-green {
  background-color: #198754;
  color: #ffffff;
}

.answer-score-signal-red {
  color: #dc3545;
}

.answer-score-signal-orange {
  color: #fd7e14;
}

.answer-score-signal-yellow {
  color: #b8860b;
}

.answer-score-signal-light-green {
  color: #6ea030;
}

.answer-score-signal-green {
  color: #198754;
}

.answer-signal-picker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.answer-signal-picker-label {
  font-size: 0.875rem;
  margin-right: 0.25rem;
  white-space: nowrap;
}

.answer-signal-swatch {
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid #dee2e6;
  border-radius: 0.25rem;
  padding: 0;
  cursor: pointer;
}

.answer-signal-swatch.selected {
  border-color: #212529;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #212529;
}

.answer-signal-swatch-none {
  background-color: #ffffff;
}

.answer-editor {
  background-color: #f8f9fa;
}

.answer-editor-main {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.answer-editor-label {
  display: block;
  font-size: 0.875rem;
}

.answer-editor-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.answer-editor-labels,
.answer-editor-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem auto;
  column-gap: 0.75rem;
}

.answer-editor-labels--no-points,
.answer-editor-inputs--no-points {
  grid-template-columns: minmax(0, 1fr) auto;
}

.answer-editor-inputs {
  align-items: stretch;
}

.answer-editor-inputs .form-control,
.answer-editor-inputs .answer-editor-delete-btn {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.answer-editor-inputs .answer-editor-delete-btn {
  height: 100%;
  min-width: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.375rem 0.5rem;
}

.answer-editor-divider {
  border-top: 1px solid #f1f3f5;
}

.answer-editor-reorder {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.answer-editor-reorder .btn {
  min-width: 2rem;
  padding: 0.15rem;
}

.answer-editor-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.answer-editor-type.answer-editor-divider,
.answer-editor-main.answer-editor-divider,
.answer-editor-actions.answer-editor-divider,
.answer-editor-options.answer-editor-divider,
.answer-editor-signal.answer-editor-divider,
.answer-editor-followup.answer-editor-divider {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f3f5;
}

.answer-editor-actions {
  display: flex;
  justify-content: flex-end;
}

.answer-editor-type-label {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.answer-type-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.answer-type-selector .btn {
  min-width: 4.75rem;
}

.answer-editor-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  align-items: center;
}

.answer-editor-option {
  margin: 0;
  min-height: 1.5rem;
}

.answer-yesno-color-formatting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.answer-yesno-red-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 1.5rem;
}

.answer-yesno-red-label,
.answer-yesno-red-side {
  font-size: inherit;
  white-space: nowrap;
  line-height: 1.5;
}

.answer-yesno-red-side {
  font-weight: 500;
}

.answer-yesno-red-toggle.form-switch {
  display: flex;
  align-items: center;
  min-height: auto;
  padding-left: 2.5em;
  margin-bottom: 0;
}

.answer-yesno-red-toggle.form-switch .form-check-input {
  width: 2.5em;
  height: 1.25em;
  margin-top: 0;
  margin-left: -2.5em;
  cursor: pointer;
}

.answer-editor-signal {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.answer-editor-followup {
  margin-top: 0.75rem;
}

:root {
  --staff-bg: #f4f5f7;
  --staff-surface: #ffffff;
  --staff-border: #e2e5ea;
  --staff-text: #1f2933;
  --staff-text-muted: #647084;
  --staff-accent: #2f5f8f;
  --staff-accent-hover: #244a70;
  --staff-sidebar-bg: #ffffff;
  --staff-sidebar-width: 15rem;
  --staff-header-height: 3.25rem;
  --staff-radius: 0.5rem;
  --staff-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

body {
  background-color: var(--staff-bg);
  color: var(--staff-text);
}

.staff-app-shell {
  display: flex;
  min-height: calc(100vh - var(--staff-header-height));
}

.staff-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
}

.staff-sidebar {
  width: var(--staff-sidebar-width);
  flex-shrink: 0;
  background: var(--staff-sidebar-bg);
  border-right: 1px solid var(--staff-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--staff-header-height);
  height: calc(100vh - var(--staff-header-height));
  overflow-y: auto;
}

.staff-sidebar-brand {
  padding: 1rem 1rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--staff-text-muted);
}

.staff-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--staff-text);
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.9375rem;
  border-left: 3px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.staff-nav-item:hover {
  background: #f8f9fb;
}

.staff-nav-item.active {
  background: #eef3f8;
  border-left-color: var(--staff-accent);
  color: var(--staff-accent);
  font-weight: 600;
}

.staff-nav-item i {
  font-size: 1.05rem;
  opacity: 0.85;
}

.staff-header {
  background: var(--staff-surface);
  border-bottom: 1px solid var(--staff-border);
  min-height: var(--staff-header-height);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  box-shadow: var(--staff-shadow);
}

.staff-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.staff-logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--staff-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

.staff-logo-link:hover {
  color: var(--staff-accent);
}

.staff-logo-icon {
  height: 1.6rem;
  width: 1.6rem;
  object-fit: contain;
}

.staff-version {
  font-size: 0.75rem;
  color: var(--staff-text-muted);
}

.staff-page {
  padding: 1.25rem 1.5rem 2rem;
}

.staff-card {
  background: var(--staff-surface);
  border: 1px solid var(--staff-border);
  border-radius: var(--staff-radius);
  box-shadow: var(--staff-shadow);
}

.staff-card-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--staff-border);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--staff-text);
  background: #fafbfc;
}

.staff-card-body {
  padding: 1rem;
}

.staff-card-body.compact {
  padding: 0;
}

.staff-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--staff-surface);
  border: 1px solid var(--staff-border);
  border-radius: var(--staff-radius);
}

.staff-toolbar-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.staff-btn-primary {
  background: var(--staff-accent);
  border-color: var(--staff-accent);
  color: #fff;
}

.staff-btn-primary:hover,
.staff-btn-primary:focus {
  background: var(--staff-accent-hover);
  border-color: var(--staff-accent-hover);
  color: #fff;
}

.staff-btn-ghost {
  background: transparent;
  border: 1px solid var(--staff-border);
  color: var(--staff-text);
}

.staff-btn-ghost:hover {
  background: #f3f5f8;
  border-color: #cfd5df;
  color: var(--staff-text);
}

.staff-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--staff-border);
  background: #fafbfc;
}

.staff-context-actions-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.staff-context-actions-delete {
  margin-left: auto;
}

.staff-btn-delete {
  background: transparent;
  border: 1px solid #c98989;
  color: #8b1a1a;
  font-weight: 500;
}

.staff-btn-delete:hover,
.staff-btn-delete:focus {
  background: #fdf2f2;
  border-color: #b06666;
  color: #6f1414;
}

.staff-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.staff-modal-dialog {
  width: 100%;
  max-width: 28rem;
  background: var(--staff-surface);
  border: 1px solid var(--staff-border);
  border-radius: var(--staff-radius);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.staff-modal-header {
  padding: 1rem 1rem 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--staff-text);
}

.staff-modal-body {
  padding: 0.5rem 1rem 1rem;
  color: var(--staff-text-muted);
  line-height: 1.5;
}

.staff-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}

.staff-context-actions .btn.active {
  background: var(--staff-accent);
  border-color: var(--staff-accent);
  color: #fff;
}

.staff-context-meta {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--staff-border);
  background: var(--staff-surface);
}

.staff-context-meta-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

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

.staff-table thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--staff-text-muted);
  background: #fafbfc;
  border-bottom: 1px solid var(--staff-border);
}

.staff-table {
  table-layout: fixed;
  width: 100%;
}

.staff-table-col-name {
  width: 42%;
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-table-col-patient {
  width: 24%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-table-col-datetime {
  width: 34%;
  min-width: 9.5rem;
  white-space: nowrap;
}

.staff-table tbody tr {
  cursor: pointer;
}

.staff-table tbody tr.table-active {
  background: #eef3f8 !important;
}

.staff-badge-neutral {
  background: #eef1f5;
  color: var(--staff-text-muted);
  font-weight: 500;
}

.staff-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 14rem;
  padding: 2rem;
  color: var(--staff-text-muted);
  text-align: center;
}

.staff-empty-state i {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  opacity: 0.55;
}

.staff-toast {
  position: fixed;
  top: calc(var(--staff-header-height) + 0.75rem);
  right: 1rem;
  z-index: 1055;
  min-width: 280px;
  max-width: 420px;
}

.master-detail-layout {
  display: flex;
  gap: 1rem;
  align-items: stretch;
  min-height: calc(100vh - 11rem);
}

.master-detail-master {
  flex: 0 0 26.5rem;
  max-width: 26.5rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.master-detail-master .staff-card,
.master-detail-detail .staff-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.master-detail-master .staff-card-body,
.master-detail-detail-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.master-detail-detail {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.master-detail-layout .staff-card-header,
.master-detail-layout .staff-context-actions {
  min-height: 3.375rem;
  padding-block: 0.75rem;
  box-sizing: border-box;
}

.master-detail-layout .staff-card-header {
  display: flex;
  align-items: center;
}

.evaluation-question-item.evaluation-question-nesting-1 {
  margin-left: 1.25rem;
  border-left: 2px solid #cfd5df;
  padding-left: 0.75rem;
}

.evaluation-question-item.evaluation-question-nesting-2 {
  margin-left: 2.5rem;
  border-left: 2px solid #b8c0cc;
  padding-left: 0.75rem;
}

.evaluation-question-item.evaluation-question-nesting-3 {
  margin-left: 3.75rem;
  border-left: 2px solid #a3adbb;
  padding-left: 0.75rem;
}

.compare-table th {
  background-color: #fafbfc;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.875rem;
}

.compare-table td {
  vertical-align: middle;
  font-size: 0.875rem;
}

.compare-row-different {
  background-color: #fff9eb;
}

.compare-row-same {
  background-color: #fafbfc;
}

.compare-row-group-header {
  background-color: #f3f5f8;
}

.compare-row-subitem td {
  border-top: none;
}

.compare-answer-changed {
  color: #9a5b00;
  font-weight: 500;
}

.compare-answer-same {
  color: #3d5a45;
}

.evaluation-answer-freetext-value {
  color: var(--staff-text);
  white-space: pre-wrap;
}

.staff-panel-heading-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--staff-text);
}

.staff-patient-id-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: var(--staff-surface);
  border: 1px solid var(--staff-border);
  border-radius: var(--staff-radius);
}

.staff-patient-id-label {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.staff-patient-id-input {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 24rem;
  margin: 0;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--staff-border);
  border-radius: var(--staff-radius);
  background: var(--staff-surface);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--staff-text);
}

.staff-patient-id-input::placeholder {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--staff-text-muted);
  opacity: 1;
}

.staff-patient-id-input:focus {
  outline: none;
  border-color: var(--staff-text-muted);
  box-shadow: 0 0 0 0.15rem rgba(31, 41, 51, 0.08);
}

.staff-new-session-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;
}

.staff-new-session-questionnaires {
  flex: 1 1 16rem;
  min-width: 0;
}

.staff-new-session-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-self: flex-end;
  margin-left: auto;
}

.staff-workspace-expander {
  margin-bottom: 1rem;
  background: var(--staff-surface);
  border: 1px solid var(--staff-border);
  border-radius: var(--staff-radius);
}

.staff-workspace-expander summary {
  list-style: none;
  cursor: pointer;
  padding: 0.85rem 1rem;
}

.staff-workspace-expander summary::-webkit-details-marker {
  display: none;
}

.staff-workspace-expander summary::before {
  content: "\F282";
  font-family: "bootstrap-icons";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.15s ease;
}

.staff-workspace-expander[open] summary::before {
  transform: rotate(90deg);
}

.staff-workspace-expander-body {
  padding: 0 1rem 1rem;
}

@media (max-width: 991.98px) {
  .staff-app-shell {
    flex-direction: column;
  }

  .staff-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--staff-border);
  }

  .staff-sidebar-brand {
    display: none;
  }

  .staff-nav-item {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .staff-nav-item.active {
    border-left: none;
    border-bottom-color: var(--staff-accent);
  }
}

.master-detail-detail-header {
  flex-shrink: 0;
}

.master-detail-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 16rem;
  padding: 2rem;
  color: var(--bs-secondary-color);
  text-align: center;
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background-color: var(--bs-light);
}

.master-detail-detail-empty i {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}

.master-detail-master .table {
  font-size: 0.875rem;
}

.master-detail-master .table td,
.master-detail-master .table th {
  white-space: nowrap;
}

.master-detail-master .table td:nth-child(2) {
  white-space: normal;
  max-width: 10rem;
}

.staff-table-col-count {
  width: 22%;
  text-align: right;
  white-space: nowrap;
}

.questionnaire-creator-name-input {
  max-width: 28rem;
}

.questionnaire-creator-layout {
  --creator-col-templates: 13rem;
  --creator-questions-list: 15rem;
  --creator-pane-transition-duration: 0.38s;
  --creator-pane-transition-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.questionnaire-creator-layout .master-detail-master {
  flex: 0 0 var(--creator-col-templates);
  max-width: var(--creator-col-templates);
  min-width: 0;
  overflow: hidden;
  transition:
    flex-basis var(--creator-pane-transition-duration) var(--creator-pane-transition-ease),
    max-width var(--creator-pane-transition-duration) var(--creator-pane-transition-ease);
}

.questionnaire-creator-layout.focus-templates {
  --creator-col-templates: 24rem;
  --creator-questions-list: 13rem;
}

.questionnaire-creator-layout.focus-questions {
  --creator-col-templates: 11rem;
  --creator-questions-list: 26rem;
}

.questionnaire-creator-layout.focus-answers {
  --creator-col-templates: 10rem;
  --creator-questions-list: 19rem;
}

.questionnaire-creator-templates-header {
  min-width: 0;
  overflow: hidden;
}

.questionnaire-creator-templates-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.questionnaire-creator-templates-icon {
  flex-shrink: 0;
}

.questionnaire-creator-templates-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.questionnaire-creator-new-template-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  overflow: hidden;
}

.questionnaire-creator-new-template-label {
  overflow: hidden;
  white-space: nowrap;
  max-width: 9rem;
  opacity: 1;
  transition:
    max-width var(--creator-pane-transition-duration) var(--creator-pane-transition-ease),
    opacity calc(var(--creator-pane-transition-duration) * 0.85) var(--creator-pane-transition-ease);
}

.questionnaire-creator-layout.focus-questions .questionnaire-creator-new-template-label,
.questionnaire-creator-layout.focus-answers .questionnaire-creator-new-template-label {
  max-width: 0;
  opacity: 0;
}

.questionnaire-creator-pane {
  position: relative;
  min-height: 0;
}

.questionnaire-creator-pane-header {
  cursor: pointer;
  user-select: none;
}

.questionnaire-creator-pane-header:hover {
  background: #f6f8fa;
}

.questionnaire-creator-pane-active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--staff-accent);
  z-index: 2;
  pointer-events: none;
}

.questionnaire-creator-layout .master-detail-master.questionnaire-creator-pane-active::before {
  right: 0;
}

.questionnaire-question-list-panel.questionnaire-creator-pane-active::before {
  right: 0;
}

.questionnaire-creator-question-detail.questionnaire-creator-pane-active::before {
  left: 0;
}

.questionnaire-creator-feedback {
  padding: 0.75rem 1rem 0;
}

.questionnaire-creator-editor {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.questionnaire-creator-editor-header {
  flex-shrink: 0;
}

.questionnaire-creator-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--staff-border);
  background: var(--staff-surface);
}

.questionnaire-creator-tab-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.questionnaire-creator-tab-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}

.questionnaire-creator-questions-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 0;
}

.questionnaire-question-list-panel {
  flex: 0 0 var(--creator-questions-list, 15rem);
  max-width: var(--creator-questions-list, 15rem);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--staff-border);
  background: #fafbfc;
  overflow: hidden;
  transition:
    flex-basis var(--creator-pane-transition-duration, 0.38s) var(--creator-pane-transition-ease, cubic-bezier(0.4, 0, 0.2, 1)),
    max-width var(--creator-pane-transition-duration, 0.38s) var(--creator-pane-transition-ease, cubic-bezier(0.4, 0, 0.2, 1));
}

.questionnaire-question-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--staff-border);
  flex-shrink: 0;
}

.questionnaire-question-list-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--staff-text-muted);
}

.questionnaire-question-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.questionnaire-question-list-empty {
  padding: 1rem 0.75rem;
  font-size: 0.875rem;
  color: var(--staff-text-muted);
  line-height: 1.45;
}

.questionnaire-question-list-item {
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}

.questionnaire-question-list-item.selected .questionnaire-question-list-select {
  background: #eef3f8;
  border-color: #c5d3e3;
}

.questionnaire-question-list-select {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--bs-border-radius);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.questionnaire-question-list-select:hover {
  background: #f3f5f8;
}

.questionnaire-question-list-number {
  flex-shrink: 0;
  width: 1.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--staff-text-muted);
  text-align: center;
}

.questionnaire-question-list-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
}

.questionnaire-question-list-count {
  flex-shrink: 0;
}

.questionnaire-question-list-actions {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex-shrink: 0;
}

.questionnaire-question-list-actions .btn {
  padding: 0.15rem 0.35rem;
  line-height: 1;
}

.questionnaire-creator-question-detail {
  flex: 1 1 50%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  position: relative;
}

.question-answers-panel {
  display: block;
}

.questionnaire-creator-question-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  padding: 2rem;
  color: var(--staff-text-muted);
  text-align: center;
}

.questionnaire-creator-question-empty i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.55;
}

.questionnaire-creator-detail-body {
  padding-top: 1rem;
}

.questionnaire-creator-section + .questionnaire-creator-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--staff-border);
}

.questionnaire-creator-section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.question-card-header {
  gap: 0.75rem;
}

.question-card-reorder .btn {
  padding-inline: 0.45rem;
}

.question-card-text {
  min-width: 0;
}

.question-card-expand {
  white-space: nowrap;
}

.score-range-item {
  margin-bottom: 1rem;
}

.score-range-fields {
  display: grid;
  grid-template-columns: 7rem 7rem minmax(0, 1fr) auto;
  grid-template-areas:
    "label-from label-to label-text ."
    "input-from input-to text action";
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  align-items: start;
}

.score-range-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.score-range-label-from { grid-area: label-from; }
.score-range-label-to { grid-area: label-to; }
.score-range-label-text { grid-area: label-text; }

.score-range-input-from { grid-area: input-from; }
.score-range-input-to { grid-area: input-to; }

.score-range-text {
  grid-area: text;
  min-width: 0;
}

.score-range-action {
  grid-area: action;
}

@media (max-width: 1199.98px) {
  .questionnaire-creator-layout.focus-templates {
    --creator-col-templates: min(24rem, 34vw);
  }

  .questionnaire-creator-layout.focus-questions {
    --creator-questions-list: min(26rem, 30vw);
  }

  .questionnaire-creator-layout.focus-answers {
    --creator-questions-list: min(19rem, 24vw);
  }
}

@media (max-width: 991.98px) {
  .master-detail-layout {
    flex-direction: column;
    min-height: auto;
  }

  .master-detail-master {
    flex: none;
    max-width: none;
    width: 100%;
    max-height: 40vh;
  }

  .questionnaire-creator-layout .master-detail-master {
    flex: none;
    max-width: none;
    width: 100%;
    max-height: 40vh;
  }

  .questionnaire-creator-layout.focus-templates {
    --creator-col-templates: 100%;
  }

  .questionnaire-creator-layout.focus-questions,
  .questionnaire-creator-layout.focus-answers {
    --creator-questions-list: 100%;
  }

  .questionnaire-creator-questions-layout {
    flex-direction: column;
  }

  .questionnaire-question-list-panel {
    flex: none;
    max-width: none;
    width: 100%;
    max-height: 32vh;
    border-right: none;
    border-bottom: 1px solid var(--staff-border);
  }

  .questionnaire-creator-question-detail {
    flex: 1;
    min-height: 16rem;
  }
}
