
@font-face {
  font-family: 'Nunito';
  src: url('fonts/Nunito-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito';
  src: url('fonts/Nunito-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Grün: #5b8b03*/
/* Rot: #970747 */
/* Violett: #49038b*/
/* Gelb: #FFCC00, dann muss Schrift immer Schwarz sein */

/* HCA CSS-Styles */

:root {
--primary-color: #28a745;
--primary-contrast: #ffffff;
--button-radius: 12px;
}

/* Hilfsklasse für nur-visuell-versteckte Elemente (Barrierefreiheit) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

  /* Desktop-Layout */
 
/* Basis-Layout */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}

body {
font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
padding: 2em;
padding-bottom: 0.5em; /* Abstand zum unteren Fensterrand */
min-height:100vh;
display: flex;
flex-direction: column;
}

h2 {
padding-left: none;
padding-bottom: 15px;
color: var(--primary-color);
}

h3 {
padding-top: 30px;
padding-left: 5px;
padding-bottom: 15px;
}

h4 {
padding-top: 30px;
padding-left: 5px;
padding-bottom: 15px;
}

p {
padding-top: 0x;
padding-bottom: 25px;
}

li {
margin-left: 25px;
}

/* form-grid für Neuen Termin */

.form-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 12px;
align-items: center;
margin-top: 10px;
}

.input-feld {
width: 100%;
box-sizing: border-box;
}


.input-label {
font-size:0.9em;
color:grey;
margin-top:20px;
}

/* Message-Box */
#message-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(30, 30, 30, 0.6);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999; /* wichtig, damit es über allem liegt */
}

.message-box {
background: white;
padding: 25px 30px;
border-radius: 8px;
box-shadow: 0 10px 20px rgba(0,0,0,0.2);
max-width: 400px;
width: 90%;
text-align: center;
}

.message-box h3 {
margin-top: 0;
}

#message-overlay .button-row.message-single {
  justify-content: center;
}

@media (max-width: 1024px) {
  #message-overlay .button-row.message-single {
    flex-direction: column;
    align-items: stretch;
  }

  #message-overlay .button-row.message-single .button {
    width: 100%;
  }
}

.overlay { /* für overlay-manager */
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 4vw;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.overlay--top {
  align-items: flex-start;
}

.overlay--center {
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.overlay--lower {
  align-items: flex-start;
  padding-top: 10vh;
}

.overlay-content { /* für overlay-manager */
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.3em;
  box-sizing: border-box;
  width: min(90vw, 720px);
  max-height: 90vh;
  min-width: min(320px, 90vw);
  overflow-y: auto;
}

.overlay--size-compact .overlay-content {
  width: min(90vw, 520px);
}

.overlay--size-medium .overlay-content {
  width: min(90vw, 720px);
}

.overlay--size-wide .overlay-content {
  width: min(92vw, 920px);
}

.overlay--layout-sheet .overlay-content {
  display: block;
  position: relative;
  min-height: 68vh;
  max-height: 68vh;
}

.overlay-headline {
  margin: 0 0 1.3em 0;
  padding-right: 2.6em;
  font-size: 0.92em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(17, 24, 39, 0.75);
  line-height: 1.3;
  display: inline-block;
}

.overlay-headline strong {
  font-weight: inherit;
}

#overlay-observation_add_menue .overlay-content {
  position: relative;
}

#overlay-observation_add_menue .overlay-sheet-close {
  position: absolute;
  top: 1.3em;
  right: 1.3em;
}

#overlay-observation_add_menue .close-btn {
  position: static;
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

#overlay-observation_add_menue .close-btn img {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
}

#overlay-observation_add_menue #observation_add_menue-body {
  margin-top: 0;
}

.obs-stopwatch-btn {
  min-width: 4.8em;
  padding: 0 16px !important;
  height: 53px;
  min-height: 53px;
  align-self: center;
  margin-bottom: 0;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.obs-field-sub {
  margin-bottom: 1.6em;
}

.obs-field-title {
  text-transform: uppercase;
  font-weight: normal;
  margin: 0 0 0.2em;
}

#overlay-observation_daily #obs-daily-fields.obs-grid-b01 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85em 0.95em;
  align-items: start;
}

@media (min-width: 992px) {
  #overlay-observation_daily #obs-daily-fields.obs-grid-a04 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2em 1.6em;
  }
}

#overlay-observation_daily .obs-field-sub {
  margin-bottom: 0.8em;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

#overlay-observation_daily #obs-daily-fields.obs-grid-b01 .obs-field-sub {
  gap: 0.18em;
}

#overlay-observation_daily #obs-daily-fields.obs-grid-a04 .obs-field-sub {
  margin-bottom: 0.9em;
}

#overlay-observation_daily #obs-daily-fields.obs-grid-a04 .obs-field-sub .input-feld {
  height: 53px !important;
  min-height: 53px;
  line-height: 53px;
  padding: 0 16px;
}

#overlay-observation_daily .obs-numeric-3field .input-feld {
  text-align: center;
}

#overlay-observation_daily .obs-body-graphic {
  margin-top: 0.6em;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2em;
  flex-wrap: nowrap;
}

#overlay-observation_daily .obs-composite-group-list {
  display: flex;
  flex-direction: column;
  gap: 1.4em;
  margin-top: 0.5em;
}

#overlay-observation_daily .obs-composite-group-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75em;
  flex-wrap: wrap;
  margin-bottom: 1.1em;
}

#overlay-observation_daily .obs-group-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  flex: 1 1 auto;
}

#overlay-observation_daily .obs-group-button-row .button {
  min-width: 7em;
}

#overlay-observation_daily .obs-composite-group {
  border: 1px solid #dde1e7;
  border-radius: 10px;
  padding: 1.1em 1.2em 1.3em;
  background: #f9fbff;
}

#overlay-observation_daily .obs-composite-group legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05em;
  font-weight: 600;
  margin-bottom: 0.85em;
  padding: 0 0.4em;
}

#overlay-observation_daily .obs-composite-group legend button {
  margin-left: 0.75em;
}

#overlay-observation_daily .obs-composite-group__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8em 1em;
}

#overlay-observation_daily .obs-composite-group__fields[data-has-sections="1"] {
  display: block;
}

#overlay-observation_daily .obs-section-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  margin-bottom: 1.1em;
}

#overlay-observation_daily .obs-section-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7em;
  text-align: center;
}

#overlay-observation_daily .obs-section-panels {
  border: 1px solid #c6d2eb;
  border-radius: 16px;
  background: #ffffff;
  padding: 1.2em 1.4em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#overlay-observation_daily .obs-section-panel[hidden] {
  display: none;
}

#overlay-observation_daily .obs-section-panel {
  animation: obsSectionFade 0.18s ease;
}

@keyframes obsSectionFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#overlay-observation_daily .obs-composite-group-actions {
  margin-top: 1.5em;
  text-align: left;
}

#overlay-observation_daily .obs-body-graphic__figure {
  position: relative;
  flex: 0 0 auto;
  cursor: crosshair;
}

#overlay-observation_daily .obs-body-graphic__img {
  width: auto;
  max-width: 220px;
  height: 260px;
  max-height: 260px;
  display: block;
  object-fit: contain;
  filter: contrast(0.85);
}

#overlay-observation_daily .obs-body-graphic__marker {
  position: absolute;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 50%;
  background: rgba(214, 49, 49, 0.9);
  box-shadow: 0 0 0 3px rgba(214, 49, 49, 0.25);
  pointer-events: none;
}

#overlay-observation_daily .obs-body-graphic__marker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  margin-top: -2px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.9;
}

#overlay-observation_daily .obs-body-graphic__marker[hidden] {
  display: none;
}

@media (max-width: 520px) {
  #overlay-observation_daily .obs-body-graphic {
    flex-wrap: wrap;
  }
}

#overlay-observation_daily .obs-choice-group {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

#overlay-observation_daily .obs-choice-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

#overlay-observation_daily #obs-daily-fields.obs-grid-b01 .obs-choice-btn-row {
  gap: 0.35em;
}

#overlay-observation_daily .obs-choice-btn {
  flex: 1 1 calc(50% - 0.5em);
  max-width: calc(50% - 0.5em);
  min-width: 140px;
  padding: 0.75em 1em;
  border-radius: var(--button-radius);
  border: 3px solid var(--primary-color);
  background: #dddddd;
  color: rgb(3, 3, 3);
  font-size: 0.95em;
  font-weight: 500;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  hyphens: auto;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

#overlay-observation_daily #obs-daily-fields.obs-grid-b01 .obs-choice-btn {
  flex: 1 1 calc(33.33% - 0.4em);
  max-width: calc(33.33% - 0.4em);
  min-width: 118px;
  padding: 0.55em 0.7em;
  font-size: 0.97em;
  line-height: 1.25;
  min-height: 46px;
  width: auto;
}

#overlay-observation_daily #obs-daily-fields.obs-grid-b01 .obs-choice-btn:hover,
#overlay-observation_daily #obs-daily-fields.obs-grid-b01 .obs-choice-btn:focus {
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.12);
}

#overlay-observation_daily #obs-daily-fields.obs-grid-b01 .obs-file-upload input[type="file"] {
  padding: 0.45em 0.75em;
  font-size: 0.9em;
}

#overlay-observation_daily #obs-daily-fields.obs-grid-b01 textarea {
  min-height: 70px;
  font-size: 0.92em;
}

#overlay-observation_daily .obs-choice-btn:hover,
#overlay-observation_daily .obs-choice-btn:focus {
  border-color: var(--primary-color);
  background: #d4d4d4;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.08);
}

#overlay-observation_daily .obs-choice-btn.is-active,
#overlay-observation_daily .obs-choice-btn.active,
#overlay-observation_daily .obs-choice-btn[aria-pressed="true"] {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: var(--primary-contrast);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

#overlay-observation_daily .obs-choice-btn:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  #overlay-observation_daily .obs-choice-btn {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }
}

.color-choice-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}

.color-choice-btn:hover,
.color-choice-btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.color-choice-btn.is-active {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0,0,0,0.25);
}

.color-choice-btn.is-disabled {
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.12);
}

.color-choice-btn.is-disabled:hover,
.color-choice-btn.is-disabled:focus {
  transform: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.12);
}

.color-choice-icon {
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  filter: invert(1);
}

.color-choice-ban {
  width: 30px;
  height: 30px;
}

.color-choice-check {
  width: 22px;
  height: 22px;
  top: auto;
  left: auto;
  bottom: 6px;
  right: 6px;
  transform: none;
}

.stopwatch-volume-control input[type="range"] {
  --volume-track-color: #1f7a8c;
  --volume-track-bg: rgba(0, 0, 0, 0.16);
  --volume-track-height: 8px;
  --volume-thumb-size: 18px;
  --volume-progress: 50%;
  width: 100%;
  min-width: 160px;
  appearance: none;
  -webkit-appearance: none;
  height: var(--volume-track-height);
  background:
    linear-gradient(var(--volume-track-color), var(--volume-track-color)) left center / var(--volume-progress) var(--volume-track-height) no-repeat,
    var(--volume-track-bg);
  border-radius: var(--volume-track-height);
  outline: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.stopwatch-volume-control input[type="range"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

.stopwatch-volume-control input[type="range"]::-webkit-slider-runnable-track {
  height: var(--volume-track-height);
  background: transparent;
  border-radius: var(--volume-track-height);
}

.stopwatch-volume-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  background-color: #000;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  width: var(--volume-thumb-size);
  height: var(--volume-thumb-size);
  margin-top: calc((var(--volume-thumb-size) - var(--volume-track-height)) / -2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.stopwatch-volume-control input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.06);
}

.stopwatch-volume-control input[type="range"]::-moz-range-track {
  height: var(--volume-track-height);
  background: var(--volume-track-bg);
  border-radius: var(--volume-track-height);
}

.stopwatch-volume-control input[type="range"]::-moz-range-progress {
  background: var(--volume-track-color);
  height: var(--volume-track-height);
  border-radius: var(--volume-track-height);
}

.stopwatch-volume-control input[type="range"]::-moz-range-thumb {
  background-color: #000;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  width: var(--volume-thumb-size);
  height: var(--volume-thumb-size);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.stopwatch-volume-control input[type="range"]::-moz-range-thumb:active {
  transform: scale(1.06);
}

.stopwatch-volume-control input[type="range"]::-ms-track {
  width: 100%;
  height: var(--volume-track-height);
  background: transparent;
  border-color: transparent;
  color: transparent;
}

.stopwatch-volume-control input[type="range"]::-ms-fill-lower {
  background: var(--volume-track-color);
  border-radius: var(--volume-track-height);
}

.stopwatch-volume-control input[type="range"]::-ms-fill-upper {
  background: var(--volume-track-bg);
  border-radius: var(--volume-track-height);
}

.stopwatch-volume-control input[type="range"]::-ms-thumb {
  background-color: #000;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  width: var(--volume-thumb-size);
  height: var(--volume-thumb-size);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.stopwatch-volume-control input[type="range"]::-moz-focus-outer {
  border: 0;
}

#overlay-observation_daily .obs-stopwatch-field {
  display: flex;
  align-items: center;
  gap: 0.35em;
  width: 100%;
}

#overlay-observation_daily .obs-stopwatch-field .obs-stopwatch-input {
  text-align: center;
  line-height: 53px;
  position: relative;
  top: -1px;
  appearance: textfield;
  -moz-appearance: textfield;
}

#overlay-observation_daily .obs-stopwatch-input::-webkit-outer-spin-button,
#overlay-observation_daily .obs-stopwatch-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#overlay-observation_daily .obs-time-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
}

#overlay-observation_daily .obs-time-input {
  width: auto !important;
  max-width: 10em;
  flex: 0 0 auto;
  height: 53px !important;
  min-height: 53px;
  text-align: center;
  line-height: 53px;
}

#overlay-observation_daily .obs-time-input::-webkit-date-and-time-value {
  height: 100%;
  display: flex;
  align-items: center;
}

#overlay-observation_daily .obs-time-input::-webkit-datetime-edit {
  padding: 0;
}

#overlay-observation_daily .obs-time-label {
  color: #888;
  white-space: nowrap;
}

#overlay-observation_daily .obs-footer-row {
  margin-top: 1.6em;
  padding-top: 1em;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}

#overlay-observation_daily .obs-daily-actions {
  display: flex;
  justify-content: flex-end;
}

#overlay-observation_daily .obs-daily-actions .button {
  margin-bottom: 0;
}

#overlay-observation_daily .obs-daily-actions .button.obs-save-btn {
  width: auto;
}

@media (max-width: 599px) {
  #overlay-observation_daily .obs-daily-actions {
    width: 100%;
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6em;
  }

  #overlay-observation_daily .obs-daily-actions .button.obs-save-btn {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
  }
}

#overlay-observation_daily .obs-stopwatch-icon {
  width: 24px;
  height: 24px;
  display: block;
  pointer-events: none;
  filter: invert(1);
}

.close-btn { /* für overlay-manager */
float: right; font-size: 24px; cursor: pointer;
}

/* Hauptinhalt */
main {
flex: 1 0 auto;
display: grid;
grid-template-columns: 2fr 2fr 1fr;
grid-template-rows: 2fr 3fr;
gap: 20px;
margin-top: 20px;
align-items: stretch;
height: auto;
}

/* Allgemeiner Style für alle Dashboard-Boxen */
.dashboard-block {
background: #dbdbdb;
padding: 20px;
border-radius: 12px;
flex: 1;

}

/* Linke Spalte: tasks über volle Höhe */
#block-tasks {
grid-column: 1 / 2;
grid-row: 1 / 3;
height: 100%;
}

/* Zweite Spalte: AI oben, Planning unten */
#block-ai {
grid-column: 2 / 3;
grid-row: 1 / 2;
height: 100%;
}
#block-planing {
grid-column: 2 / 3;
grid-row: 2 / 3;
height: 100%;
}

/* Dritte Spalte: Patients oben, Settings unten */
#block-patients {
grid-column: 3 / 4;
grid-row: 1 / 2;
height: 100%;
}
#block-settings {
grid-column: 3 / 4;
grid-row: 2 / 3;
height: 100%;
}


.button-grid {
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: flex-start;
}

.modal-tasks-container {
  direction: ltr;
}

.modal-tasks-container.modal-tasks--rtl {
  direction: rtl;
  text-align: right;
}

.modal-tasks-container.modal-tasks--rtl .modal-section-wrapper,
.modal-tasks-container.modal-tasks--rtl .modal-card {
  text-align: right;
}

.modal-tasks-container.modal-tasks--rtl .button-grid {
  direction: rtl;
  justify-content: flex-start;
}

.modal-tasks-container.modal-tasks--rtl .button {
  text-align: right;
  justify-content: flex-end;
  margin-right: 0;
  margin-left: 5px;
}

.modal-tasks-container.modal-tasks--rtl .button-with-icon .button-icon {
  margin-right: 0;
  margin-left: 8px;
}

.planning-primary-button {
margin-bottom: 10px;
}

.planning-primary-button .button {
width: 100%;
min-width: 0;
margin: 0;
display: flex;
}

#block-planing .button-grid .button,
.task-action-grid .button,
.settings-grid .button {
flex: 1 1 calc(33.333% - 10px);
min-width: 200px;
margin: 0;
}

.patienten {
display: flex;
flex-direction: column;
height: 100%;
}

.patienten .patient-action-area {
display: flex;
flex-direction: column;
flex: 1 1 auto;
min-height: 0;
gap: 10px;
}

.patienten .patient-button-grid {
width: 100%;
}

.patienten .patient-mobile-last-row {
display: none;
}

.patienten .patient-button-grid .patient-switch-form {
display: flex;
flex: 1 1 120px;
min-width: 0;
}

.patienten .patient-button-grid .patient-switch-form .button {
width: 100%;
margin-right: 0;
margin-bottom: 0;
}

.patienten .patient-button:not(.active) {
border-color: #7a7a7a;
color: #7a7a7a;
}

.patienten .patient-logout-container {
margin-top: auto;
display: flex;
justify-content: flex-end;
}

.patienten .patient-logout-container .logout-button {
display: flex;
align-items: center;
justify-content: center;
flex: 0 0 clamp(48px, 12vw, 60px);
width: clamp(48px, 12vw, 60px);
height: 53px;
min-height: 53px;
padding: 0;
margin-right: 0;
margin-bottom: 0;
}

.patienten .patient-logout-container .logout-button img {
width: 55%;
height: auto;
}

/* Standard: Dropdown für Planung ausblenden, nur mobil einblenden */
.planning-dropdown { display: none; }
.mobile-planning-buttons { display: none; }
.settings-dropdown { display: none; }


footer {
flex-shrink: 0;
background: #dbdbdb;
color: #000000;
text-align: center;
padding: 10px;
margin-top: 20px;
margin-bottom: 20px;
border-radius: 12px;
}

/* Popup-Fenster */

.modal {
position: fixed;
z-index: 999;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
position: relative;
width: 90vw;
height: 90vh;
margin: 5vh auto;
border-radius: 12px;
background-color: white;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
display: flex;
flex-direction: column;
overflow: hidden;
}

.modal-body {
flex: 1;
overflow-y: auto;
overflow-x: hidden; /* verhindern von horizontalem Scrollen im Modal */
padding: 20px;
}

#chatAntwort {
margin-top: 1em;
font-size: 18px;
color: black;
/* Lange Wörter/URLs umbrechen, um horizontales Scrollen zu vermeiden */
overflow-wrap: anywhere;
word-break: break-word;
}

.modal-section-wrapper {
flex: 1;
order: 3;
background: #dbdbdb;
padding: 20px;
border-radius: 12px;
}

.modal-card {
background:white;
padding:10px;
border-radius:12px;
margin-bottom:15px;
/* Sicherheitshalber auch innerhalb der Karten umbrechen */
overflow-wrap: anywhere;
word-break: break-word;
}

.barcode-scanner-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.barcode-scanner-hint {
  margin: 0;
  font-size: 0.95em;
  color: #333;
}

.barcode-scanner-video {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
}

.barcode-scanner-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.barcode-scanner-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  text-align: center;
  padding: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.barcode-scanner-status {
  margin: 0;
  font-size: 0.95em;
  color: #555;
}

.barcode-scanner-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.barcode-scanner-controls .button {
  flex: 1 1 180px;
}

.barcode-scanner-output {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 1.05em;
}

.barcode-scanner-output label {
  font-weight: 600;
}

.barcode-scanner-output output {
  background: #f4f4f4;
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 38px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.barcode-scanner-card[data-detected="1"] .barcode-scanner-output output,
.barcode-scanner-card[data-locked="1"] .barcode-scanner-output output {
  background: #e6f4ea;
  color: #11643a;
}

.barcode-scanner-error,
.barcode-scanner-unsupported {
  margin: 0;
  font-size: 0.9em;
  color: #a00000;
}

.barcode-scanner-card[data-detected="1"] .barcode-scanner-placeholder {
  display: none !important;
}


/* Chat-Ansicht: WhatsApp-ähnliche Blasen links/rechts */
.modal-card.chat-item {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.chat-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-meta {
  font-size: 0.9em;
  color: #555;
  margin: 2px 6px 0 6px;
}

.chat-bubble {
  display: inline-block;
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Wenn Blase in einem rechten Block (.chat-ai-block) steckt, nicht erneut auf 78% limitieren */
.chat-ai-block .chat-bubble {
  max-width: 100%;
  width: 100%;
}

.chat-bubble-user {
  align-self: flex-start;
  background: var(--primary-color);
  color: var(--primary-contrast);
}

.chat-bubble-ai {
  align-self: flex-end;
  background: #f1f1f1;
  color: #000;
  border: 1px solid rgba(0,0,0,0.15);
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Kompakte Aktions-Auswahl (nur mobil sichtbar) */
.chat-actions-compact {
  display: none;
  margin-top: 4px;
}

/* Linke Aktionszeile bündig unter der AI-Blase */
.chat-briefing {
  /* wird in PHP zusätzlich mit align-self:flex-end; max-width:78% gesetzt */
  margin-top: 2px;
}


/* Container für das Schließen-Icon */
.close-button {
background: none;
border: none;
padding: 0;
cursor: pointer;
}

.close-button img {
width: 28px;
height: 28px;
display: block;
}

/* ICD-/ICF-/Allergie-Suchfeld */
#icd-search,
#icf-search,
#allergy-search,
#implant-search {
width: 100%;
padding: 12px;
font-size: 1.2em;
border: 3px solid var(--primary-color);
border-radius: 8px;
margin-bottom: 8px;
}

/* Indeterminierter Fortschrittsbalken für KI-Antworten */
#progress-bar {
  position: relative;
  height: 10px;
  background: #ddd;
  border-radius: 5px;
  overflow: hidden;
}

#progress-bar > div {
  position: absolute;
  top: 0;
  left: -25%;
  height: 100%;
  width: 25%;
  background: var(--primary-color);
  animation: hca-progress-indeterminate 3.2s linear infinite;
  will-change: transform;
}

.rtl-ui #progress-bar > div {
  left: auto;
  right: -25%;
  animation: hca-progress-indeterminate-rtl 3.2s linear infinite;
}

@keyframes hca-progress-indeterminate {
  0%   { transform: translateX(0); }
  100% { transform: translateX(500%); }
}

@keyframes hca-progress-indeterminate-rtl {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-500%); }
}

#icd-suggestions,
#icf-suggestions,
#allergy-suggestions,
#implant-suggestions {
list-style: none;
padding: 0;
margin: 0;
max-height: 250px;
overflow-y: auto;
border-radius: 12px;
background-color: #fff;
}

.suggestion-item {
padding: 10px 16px;
border-bottom: 1px solid #ddd;
cursor: pointer;
}

.suggestion-item:hover,
.suggestion-item:focus {
background-color: var(--primary-color);
color: white;
outline: none;
}

/* Formularfeld-Gestaltung */

/* Globale Vorgaben für <select>-Elemente
   Ziel: 100% Breite, 2.5em Höhe, schwarze Schrift (auch iOS)
   und kein Überlaufen in Containern. */
select,
select.input-feld,
.input-feld select {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: 2.5em !important;
  display: block;
  box-sizing: border-box;
  margin: 0;
  padding: 0 16px; /* horizontales Padding, Höhe per height */
  line-height: normal;

  /* Einheitliche Optik */
  background-color: #fff;
  border: 3px solid var(--primary-color);
  border-radius: var(--button-radius);
  background-clip: padding-box;

  /* Schriftfarbe konsistent, inkl. iOS Safari */
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;

  /* Native Darstellungen reduzieren, damit Größe wirklich greift */
  appearance: none;
  -webkit-appearance: none;
}

/* Gleiche Vorgaben für Datums-/Zeitfelder wie für <select> */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input.input-feld[type="date"],
input.input-feld[type="time"],
input.input-feld[type="datetime-local"],
input.input-feld[type="month"],
input.input-feld[type="week"] {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  height: 2.5em !important;
  display: block;
  box-sizing: border-box;
  margin: 0;
  padding: 0 16px; /* horizontales Padding, Höhe per height */
  line-height: normal;

  background-color: #fff;
  border: 3px solid var(--primary-color);
  border-radius: var(--button-radius);
  background-clip: padding-box;

  color: #000 !important;
  -webkit-text-fill-color: #000 !important; /* iOS Safari */

  /* appearance NICHT entfernen, um native Picker-Symbole zu behalten */
}

.button {
font-size: 1.1em;
padding: 13px 16px;
border: 3px solid var(--primary-color);
border-radius: var(--button-radius);
background-color: #dddddd;
color: rgb(3, 3, 3);
cursor: pointer;
margin-right:5px;
margin-bottom: 10px;
display: inline-flex;
align-items: center;
justify-content: flex-start;
text-align: left;
min-height: 53px;
box-sizing: border-box;
}

.button-with-icon {
  justify-content: flex-start;
}

.button-with-icon .button-icon {
  display: inline-flex;
  align-items: center;
  color: inherit;
  margin-right: 8px;
}

.button-with-icon .button-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.button.button-icon-only {
display: inline-flex;
align-items: center;
justify-content: center;
vertical-align: bottom;
}

.button-icon-only__icon {
display: flex;
align-items: center;
justify-content: center;
}

.button-icon-only__icon svg {
width: 20px;
height: 20px;
display: block;
}

.button.active {
background-color: var(--primary-color);
color: white;
}

.button-danger {
background-color: #b51a00;
border-color: #b51a00;
color: #ffffff;
}

.button-danger:hover,
.button-danger:focus {
background-color: #8d1500;
border-color: #8d1500;
color: #ffffff;
}

.checkbox-row {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
gap: 10px 20px;
margin-top: 10px;
margin-bottom: 5px;
box-sizing: border-box;
}

.checkbox-item {
display: flex;
align-items: center;
gap: 6px;
min-width: 80px;
white-space: nowrap;
box-sizing: border-box;
}

.custom-checkbox {
appearance: none;
width: 30px;
height: 30px;
border: 3px solid var(--primary-color);
border-radius: 4px;
background-color: white;
cursor: pointer;
position: relative;
transition: background-color 0.2s ease;
}

.custom-checkbox:checked {
background-color: #c8c9c5ff; 
}

.custom-checkbox:checked::after {
    content: "X";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px; /* ggf. anpassen */
    color: black; /* oder eine andere Farbe */
}

#overlay-medication {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.6);
display: none; /* initial */
justify-content: center;
align-items: center;
z-index: 9999;
}

.schedule-mode-select {
  padding: 8px;
  font-size: 1em;
  margin-bottom: 10px;
}

/* Blockschema-Eingaben & variable Tagesphasen */
.schema-block-grid {
  display: grid;
  gap: 12px;
}

.schema-block-grid--meta {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  align-items: end;
}

.schema-block-grid--doses {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  margin-top: 10px;
}

.variable-phase-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 10px;
}

@media (min-width: 600px) {
  .variable-phase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.variable-phase-option {
  border: 1px solid #999;
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 3em;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background-color: #fff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.variable-phase-option:hover {
  border-color: var(--primary-color, #444);
}

.variable-phase-option .custom-checkbox {
  margin: 0;
  flex: 0 0 auto;
}

.variable-phase-option span {
  font-size: 1em;
  font-weight: 600;
  color: #333;
  user-select: none;
}

.variable-phase-option input:checked + span {
  color: var(--primary-color, #1e5c9a);
}

@media (max-width: 599px) {
  .schema-block-grid--meta,
  .schema-block-grid--doses {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 600px) and (max-width: 1024px) {
  .schema-block-grid--meta,
  .schema-block-grid--doses {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.label {
font-size: 1.4em;
/* seniorengerechte Schriftgröße */
font-weight: bold;
padding: 12px 16px;
/* großzügiger Innenabstand */
width: 100%;
/* volle Breite im Container */
box-sizing: border-box;
/* padding + border bleiben im Rahmen */
outline: none;
/* standardmäßigen Browser-Ring entfernen */
transition: border-color 0.2s;
}

.input-feld {
font-size: 1.1em;
/* seniorengerechte Schriftgröße */
font-weight: bold;
padding: 12px 16px;
/* großzügiger Innenabstand */
border: 3px solid var(--primary-color);
/* gut sichtbarer grüner Rahmen */
border-radius: var(--button-radius);
/* weiche Ecken */
width: 100%;
/* volle Breite im Container */
box-sizing: border-box;
/* padding + border bleiben im Rahmen */
outline: none;
/* standardmäßigen Browser-Ring entfernen */
transition: border-color 0.2s;
}

.hca-list-textarea {
padding-left: 4.6em !important;
line-height: 1.65;
background-attachment: local;
background-repeat: no-repeat;
background-origin: padding-box;
caret-color: inherit;
}

.input-feld:focus {
border-color: #3d6002;
/* dunkleres Grün beim Fokus */
background-color: #f6fff2;
/* sanfter Hellgrün-Hintergrund beim Fokus */
}

.form-field {
display: flex;
flex-direction: column;
margin-bottom: 10px;
}

.form-field label {
margin-bottom: 5px;
font-weight: bold;
}

textarea.input-field {
resize: vertical;
min-width: 200px;
max-width: 300px;
}


.custom-file-upload {
display: inline-block;
background-color: var(--primary-color);
color: white;
border-radius: 12px;
font-size: 1.2em;
padding: 16px 24px;
cursor: pointer;
margin-right: 10px;
}

.custom-file-upload:hover {
background-color: #0056b3;
}

.button-row {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
margin-top: 10px;
gap:10px;
}

.daytimes-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 12px 18px;
grid-gap: 12px 18px;
column-gap: 18px;
row-gap: 12px;
align-items: start;
margin-top: 12px;
width: 100%;
max-width: 100%;
}

.daytime-field {
display: flex;
flex-direction: column;
gap: 6px;
}

.daytime-label {
display: block;
min-height: 2.6em;
line-height: 1.2;
}

.daytime-field input[type="time"],
.daytime-field input[type="date"],
.daytime-field select {
width: 100% !important;
max-width: 100%;
min-width: 0;
box-sizing: border-box;
display: block;
}

/* Medikamentenplan-Tabelle */

.medication-table {
width: 100%;
}
.medication-table th, .medication-table td {
border-bottom: 1px solid var(--primary-color);
padding: 4px;
text-align: center;
font-size:1.2em;
}
.medication-table tbody tr:last-child th,
.medication-table tbody tr:last-child td {
border-bottom: none;
}

.medication-ai-query-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  margin: 0;
  border: 3px solid var(--primary-color);
  border-radius: var(--button-radius);
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  min-height: 3.5em;
}

.medication-ai-query-button:hover,
.medication-ai-query-button:focus-visible {
  border-color: #3d6002;
  background-color: #f6fff2;
  outline: none;
}

.medication-ai-query-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.medication-ai-button-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.medication-ai-button-primary {
  font-weight: 600;
  color: #222;
}

.medication-ai-button-primary em {
  font-weight: 400;
  color: #555;
}

.medication-ai-button-secondary {
  font-size: 0.9em;
  color: #555;
}

.medication-ai-button-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.medication-ai-button-icon img {
  display: block;
  width: 28px;
  height: 28px;
}

.medication-notes-input {
  min-height: 3.5em;
  flex: 1;
}

.medication-notes-input-wrapper {
  display: flex;
  width: 100%;
}

/* Upload von Dateien z.B. Bildern */

.upload-row {
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
flex-wrap: wrap; /* Zeilenumbruch bei kleinen Bildschirmen */
text-align: center;
margin-top: 10px;
}

.arrow-icon {
height: 40px;
}

/* Kopfzeile Hauptseite */

.site-header {
position: sticky;
top: 0;
z-index: 900;
background: #ffffff;
width: 100%;
flex: 0 0 auto;
}

.header-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px;
/* background: white; */
border-radius: 12px;
border: 3px solid var(--primary-color);
margin-bottom: none;
}

.header-left h1 {
font-size:1.8rem;
margin: 0;
color: var(--primary-color);
}

.header-title {
margin: 0;
}

.header-title-button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0;
border: none;
background: transparent;
color: inherit;
font: inherit;
letter-spacing: inherit;
cursor: pointer;
text-transform: inherit;
}

.header-title-button:focus-visible {
outline: 3px solid var(--primary-color);
outline-offset: 4px;
}

.header-title-text {
display: inline;
}

.header-title-text--short {
display: none;
}

.header-right {
display: flex;
align-items: flex-start; /* oben ausrichten */
gap: 10px;
}

/* Kopfzeile Modals */

.modal-header-bar {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 10px 20px;
box-sizing: border-box;
}

.modal-header-left h1 {
border: 3px solid var(--primary-color);
border-radius: 12px;
padding: 20px 20px;
margin-top: 20px;
margin-bottom: none;
font-size:1.2rem;
color: var(--primary-color);
}

.logo--top { /* Logo wird auf großen Bildschirmen angezeigt */
display: inline-flex;
align-items: center;
justify-content: center;
line-height: 0;
color: var(--primary-color);
flex-shrink: 0;
border: none;
background: transparent;
padding: 0;
cursor: pointer;
font: inherit;
}

.logo--top svg {
display: block;
height: 48px;
width: auto;
color: var(--primary-color);
fill: currentColor;
}

.logo--top:focus-visible {
outline: 3px solid var(--primary-color);
outline-offset: 4px;
}

.logo--top img {
display: block;
height: 48px;
width: auto;
}

/* Responsive Anpassungen */
/* Veränderungen im Basislayout, wenn Tablet- und Smartphone-Ansicht */

#mobile-patienten-duplicate { display: none; }
.calendar-table { display: table; width: 100%; }
.event-list { display: none; }
.tasks-header-mobile { display: none; }
.tasks-header-desktop { display: flex; }
