:root {
  --primary: #4a63f3;
  --accent: #6c9eff;
  --bg: #f4f6fa;
  --text: #222;
  --border-radius: 10px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ==============================================
   GRUNDLEGENDE STYLES
   ============================================== */

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 2rem;
}

.container {
  position: relative;  /* HinzufÃ¼gen fÃ¼r absolute Positionierung */
  max-width: 960px;
  margin: 0 auto;
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

h1, h2 {
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.3rem;
  margin-bottom: 1rem;
}

h3, h4 {
  color: #555;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  border-left: 4px solid var(--accent);
  padding-left: 0.5rem;
}

.hidden {
  display: none !important;
}

/* ==============================================
   FORM STYLES
   ============================================== */

.form-section {
  margin-bottom: 2rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-group {
  flex: 1 1 45%;
  margin-bottom: 1rem;
}

.form-group.full-width {
  flex: 1 1 100%;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  outline: none;
}

input:required:invalid,
select:required:invalid,
textarea:required:invalid {
  border: 2px solid #e53935 !important;
  background-color: #fff5f5;
}

input:required:valid,
select:required:valid,
textarea:required:valid {
  border: 1px solid #4caf50;
  background-color: #f6fff7;
}

/* ==============================================
   DSP SESSION BUTTON (EINHEITLICH)
   ============================================== */

.dsp-session-button {
  position: absolute;  /* Von fixed zu absolute */
  top: 20px;
  right: 20px;
  background-color: #dc3545 !important;
  color: white !important;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;  /* Reduziert, da nicht mehr global */
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
  white-space: nowrap;
  min-width: 180px;
}


.dsp-session-button:hover {
  background-color: #c82333 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.5);
}

.dsp-session-button:active {
  transform: translateY(0);
}

/* ==============================================
   BUTTONS
   ============================================== */

.center-button {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
}

.action-button {
  background-color: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.action-button:hover:not(:disabled) {
  background-color: #3450cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(74, 99, 243, 0.3);
}

.action-button:disabled {
  background-color: #a0a0a0;
  cursor: not-allowed;
  box-shadow: none;
}

.action-button.loading {
  position: relative;
  color: transparent !important;
}

.action-button.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

/* Form-Buttons Container */
.form-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

/* Einheitliche Button-Basis fÃ¼r alle Form-Buttons */
.form-buttons .button,
.form-buttons .action-button,
.form-buttons .button-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 160px;
}

/* SekundÃ¤r-Button Hover-Effekt */
.form-buttons .button-secondary:hover {
  background-color: #545b62;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.button-secondary {
  background-color: #6c757d;
  color: white;
}

.button-secondary:hover {
  background: #545b62;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* ==============================================
   LINK SENDING STYLES (NEU HINZUGEFÜGT)
   ============================================== */

.header-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.action-button.secondary {
  background: #6c757d;
  border-color: #6c757d;
}

.action-button.secondary:hover {
  background: #5a6268;
  border-color: #545b62;
}

.link-modal {
  max-width: 500px;
}

.qr-code-container {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 20px 0;
}

.qr-code {
  margin: 0 auto;
}

.link-info {
  background: #e3f2fd;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  border-left: 4px solid #2196F3;
}

.password-display {
  font-family: 'Courier New', monospace;
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  background: #fff;
  padding: 12px;
  border: 2px solid #007bff;
  border-radius: 6px;
  margin: 10px 0;
  color: #007bff;
}

.validity-info {
  color: #666;
  font-size: 0.9em;
  text-align: center;
  margin-top: 8px;
}

/* ========== STICKY HEADER ========== */
.welcome-section {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;  /* Abstand zum scrollenden Content */
}


.row-break {
  grid-column: 1 / -1;  /* Über alle Spalten */
  height: 0;            /* Keine Höhe */
}


/* ==============================================
   SUCHBEREICH UND CODE-FELDER
   ============================================== */

.search-options {
  display: flex;
  gap: 20px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-option {
  flex: 1;
  min-width: 300px;
  padding: 1.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f9f9f9;
  position: relative;
}

.search-option:hover {
  border-color: #2196f3;
  background: #f0f8ff;
}

.search-option.active {
  border-color: #2196f3;
  background: #e3f2fd;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.search-option h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.2rem;
}

.search-option p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Eingabefelder Layout */
.search-fields {
  display: none;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.search-fields.active {
  display: block;
}

.search-fields .form-group {
  margin-bottom: 1rem;
}

.search-fields .form-group:last-child {
  margin-bottom: 0;
}

.search-fields label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

/* Input-Felder entsprechend den übergeordneten Buttons */
#refcodeFields input {
  width: 100%;
  max-width: 300px; /* Entspricht der min-width der search-option */
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  text-align: left; /* Linksbündig für Referenzcode */
}

#dspFields input {
  width: 100%;
  max-width: 300px; /* Entspricht der min-width der search-option */
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  text-align: right; /* Rechtsbündig für DSP-ID */
}

.search-fields input:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Button unter dem Eingabefeld zentrieren */
.search-fields .center-button {
  text-align: center;
  margin-top: 1rem;
}

.search-fields .action-button {
  min-width: 200px;
  padding: 0.75rem 1.5rem;
}

.code-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.code-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.code-center {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 1rem;
}

.code-group label {
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.code-group input {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.code-group input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 99, 243, 0.1);
}

#referenzcode {
  text-align: right !important;
}

.ref-code-display {
  font-weight: bold;
  background-color: #f0f0f0 !important;
  border-color: #ddd !important;
  color: #555;
  text-align: right !important;
}

#searchButton {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  white-space: nowrap;
  height: calc(1rem + 1.5rem + 4px);
}

.search-results {
  margin: 1rem 0;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

.search-results ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-results li {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background-color: white;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-results li:hover {
  background-color: #f0f7ff;
  border-color: #4a63f3;
}

/* ==============================================
   KACHEL-CHECKBOXEN UND RADIO-BUTTONS
   ============================================== */


.kachel-checkbox {
  position: relative;
  margin-bottom: 1rem;
}

.kachel-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.kachel-checkbox label {
  display: block;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  padding: 1rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-weight: 500;
  background-color: #fff;
}


.kachel-checkbox label:hover {
  border-color: var(--primary);
  background-color: rgba(74, 99, 243, 0.03);
}

.kachel-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  height: auto;
}

.kachel-checkbox {
  position: relative;
  flex: 1;
  min-width: 80px;
  height: auto;
  display: block;
}

.status-label {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  font-weight: 500;
  background-color: #f8f8f8;
  color: #666;
}

.kachel-checkbox input[type="checkbox"]:checked + .status-label {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.status-active {
  font-weight: bold;
}

/* ===============================
   UNIVERSELLE KACHEL-STYLES (EINHEITLICH VOLLSTÄNDIG BLAU)
   =============================== */

/* Radio-Button Kacheln */
.radiooptiontile {
  position: relative;
  display: flex;
  flex-direction: column;
}

.radiooptiontile input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.radiooptiontile label {
  display: block;
  padding: 1rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  margin: 0;
}

.radiooptiontile input[type="radio"]:checked + label {
  background-color: var(--primary);  /* Vollständig blau */
  color: white;                      /* Weißer Text */
  border-color: var(--primary);
}

.radiooptiontile:hover label {
  border-color: var(--accent);
}

/* Checkbox-Kacheln einheitlich machen */
.kachel-checkbox input[type="checkbox"]:checked + label {
  background-color: var(--primary);  /* Vollständig blau */
  color: white;                      /* Weißer Text */
  border-color: var(--primary);
}



/* OS-Architektur-Gruppen: 3-spaltig */
.option-group-container {
  grid-column: 1 / -1; /* Volle Breite im äußeren Grid */
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Internes 3-Spalten-Grid für Radio-Buttons */
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Bei wenigen Optionen (2) nur nötige Spalten nutzen */
.option-group-container:has(.radiooptiontile:nth-child(2):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

/* OS-Container mit vertikalem Layout */
.osoptioncontainer {
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  padding: 1rem;
  background: white;
}

/* Architektur-Felder nebeneinander innerhalb der Container-Breite */
.architecture-fields {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 0.5rem;
}


.architecture-input label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
}

.arch-count-input {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}


.parameter-group {
  margin-bottom: 1.5rem;
}


/* ==============================================
   SUBFIELD-CONTAINER (für expandierbare Gruppen)
   ============================================== */
.subfield-container {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.subfield-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 120px;
}

.subfield-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
}

.subfield-input {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.subfield-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 99, 243, 0.1);
}


/* ==============================================
   OTHER-FIELD-CONTAINER
   ============================================== */
.other-field-container {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
}

.other-field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #495057;
}

.other-field-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.other-field-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 99, 243, 0.1);
}



/* ==============================================
   INLINE FORM GROUPS (BETREUER-FELDER)
   ============================================== */

.input-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.form-group-inline {
  flex: 1 1 calc(33.333% - 1rem);
  display: flex;
  flex-direction: column;
}

.form-group-inline label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group-inline input,
.form-group-inline select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.form-group-inline input:focus,
.form-group-inline select:focus {
  border-color: var(--primary);
  outline: none;
}

/*##############################################################################
// ========== CSS STYLING FÜR LÖSCHEN-BUTTON ==========

/**
 * Fügt CSS-Styles für Löschen-Button hinzu
 */
/* ========== LÖSCHEN-BUTTON STYLING ========== */
.button-delete {
  background-color: #dc3545 !important;
  color: white !important;
  border: 1px solid #dc3545 !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: var(--border-radius, 10px) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  min-width: 140px !important;
  text-align: center !important;
}

.button-delete:hover:not(:disabled) {
  background-color: #c82333 !important;
  border-color: #bd2130 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;
}

.button-delete:active:not(:disabled) {
  transform: translateY(0) !important;
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3) !important;
}

.button-delete:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  transform: none !important;
}



/* ===============================
   PARAMETER-FIELD STYLES
   Für das neue parameter-* System
   =============================== */
.parameter-dependent {
  grid-column: span 1; /* Normale Breite */
}

.parameter-dependent.full-width {
  grid-column: 1 / -1;
}


/* Container für Parameter-Felder */
.parameter-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  gap: 0.5rem;
}

/* Parameter-Labels */
.parameter-field label,
.parameter-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.parameter-label.required::after,
.parameter-field label.required::after {
  content: ' *';
  color: #ff6b6b;
}

/* Basis Input-Styles für alle Eingabefelder */
.parameter-field input[type="text"],
.parameter-field input[type="email"], 
.parameter-field input[type="tel"],
.parameter-field input[type="number"],
.parameter-field textarea,
.parameter-field select,
.parameter-input {
  width: 100%;
  padding: 1rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  box-sizing: border-box;
  cursor: text;
  margin-bottom: 1rem;
}

/* Focus-States */
.parameter-field input:focus,
.parameter-field select:focus,
.parameter-field textarea:focus,
.parameter-input:focus {
  outline: none;
  border-color: #4a90e2;
  background-color: rgba(74, 144, 226, 0.05);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Hover-States */
.parameter-field input:hover,
.parameter-field select:hover,
.parameter-field textarea:hover,
.parameter-input:hover {
  border-color: #b0b0b0;
}

/* Placeholder-Styles */
.parameter-field input::placeholder,
.parameter-field textarea::placeholder,
.parameter-input::placeholder {
  color: #999;
  opacity: 1;
}

/* Select-Dropdown spezifische Styles */
/*.parameter-field select,*/
select.parameter-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  box-sizing: border-box;
  cursor: pointer;
}

select.parameter-input:focus {
  outline: none;
  border-color: #4a90e2;
}

/* Textarea-spezifische Styles */
.parameter-field textarea,
textarea.parameter-input {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* Number-Input Styles */
.parameter-field input[type="number"],
input[type="number"].parameter-input {
  text-align: left;
}

/* Date-Input Styles */
.parameter-field input[type="date"] {
  cursor: pointer;
}

/* Required Field Styles */
.parameter-field input:required,
.parameter-field select:required,
.parameter-field textarea:required {
  border-left: 4px solid #ff6b6b;
}

.parameter-field input:required:valid,
.parameter-field select:required:valid,
.parameter-field textarea:required:valid {
  border-left: 4px solid #28a745;
}

/* Disabled/Readonly States */
.parameter-field input:disabled,
.parameter-field select:disabled,
.parameter-field textarea:disabled,
.parameter-field input[readonly],
.parameter-field select[readonly],
.parameter-field textarea[readonly] {
  background-color: #f5f5f5;
  color: #666;
  cursor: not-allowed;
  border-color: #ddd;
}

/* Jede Section bekommt ein eigenes Grid */
.parameter-section {
  display: block; /* Kein Grid auf Section-Ebene */
  margin-bottom: 40px;
}

/* Section-Header bleibt normal */
.parameter-section h4 {
  margin-bottom: 15px;
}

/* Grid-Container innerhalb jeder Section */
.parameter-section .section-parameters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Breite Elemente */
.parameter-group.full-width {
  grid-column: 1 / -1;
}

/* Textarea und andere breite Elemente über volle Breite */
.parameter-group:has(textarea),
.parameter-group:has(.option-group-container),
.parameter-group:has(.subfield-container) {
  grid-column: 1 / -1; /* Spannt über alle 3 Spalten */
}



/* Parameter-Rows für Grid-Layout */
.parameter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.parameter-row .parameter-field {
  margin-bottom: 0;
}

/* Responsive Parameter-Rows */
.parameter-row:has(.parameter-field:only-child) {
  grid-template-columns: 1fr;
}

.parameter-row:has(.parameter-field:nth-child(2):last-child) {
  grid-template-columns: 1fr 1fr;
}

/* Radio-Button Groups */
.parameter-field-radio .option-group-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Option-Groups (OS-Architektur, etc.) */
.parameter-field-os_architecture_group .option-group-container {
  border: 2px solid #f0f0f0;
  border-radius: 8px;
  padding: 1rem;
  background: #fafafa;
}

/* Error States */
.parameter-field.error input,
.parameter-field.error select,
.parameter-field.error textarea {
  border-color: #ff6b6b;
  background-color: #fff5f5;
}

/* Success States */
.parameter-field.success input,
.parameter-field.success select,
.parameter-field.success textarea {
  border-color: #28a745;
  background-color: #f8fff8;
}


.group-heading {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #555;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.5rem;
}


.bool-value-field {
  display: none;
}

/* ==============================================
   INSTALLATIONSKARTEN
   ============================================== */

.installation-card {
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  background-color: #fff;
  transition: box-shadow 0.3s ease;
}

.installation-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.installation-header h3 {
  margin-top: 0;
}

.installation-details ul {
  padding-left: 1.5rem;
}


.delete-button {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.delete-button:hover {
  background-color: #d32f2f;
}

.installation-badge {
  display: inline-block;
  font-size: 0.8em;
  background-color: #e0f7fa;
  color: #00838f;
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.installation-subtitle {
  font-size: 0.9em;
  color: #666;
  margin-top: -0.5em;
  margin-bottom: 0.5em;
}

/* ==============================================
   DSP-PRAXIS-AUSWAHL UND WORKFLOW
   ============================================== */

.dsp-success-message {
  background-color: #e8f5e8;
  border: 1px solid #4caf50;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  color: #2e7d2e;
}

.dsp-success-message h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #2e7d2e;
  border: none;
  padding: 0;
}

.dsp-praxis-selection {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.dsp-praxis-selection h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.5rem;
}

.dsp-praxis-selection p {
  margin-bottom: 1rem;
  color: #6c757d;
}

.praxis-list-scrollable {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  background-color: white;
  margin-bottom: 1rem;
}

.praxis-selection-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.praxis-list-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: white;
}

.praxis-list-item:last-child {
  border-bottom: none;
}

.praxis-list-item:hover {
  background-color: rgba(74, 99, 243, 0.05);
  border-left: 4px solid var(--primary);
  padding-left: calc(1rem - 4px);
}

.praxis-list-item:active {
  background-color: rgba(74, 99, 243, 0.1);
}

.praxis-list-item strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.praxis-list-item small {
  color: #6c757d;
  font-size: 0.85rem;
}

.praxis-selection-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.praxis-selection-buttons .action-button {
  min-width: 180px;
}


/* ==============================================
   PRAXIS-ÃœBERSICHT
   ============================================== */

.overview-section {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.section-header h3 {
  margin: 0;
  color: var(--primary);
  font-size: 1.3rem;
}

.hardware-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.hardware-stat {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center;              /* Wieder zentriert */
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;             /* Wieder zentriert */
  gap: 0.5rem;
}

.hardware-stat:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(74, 99, 243, 0.15);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.stat-content {
  text-align: center;              /* Wieder zentriert */
  min-width: 0;
}

.stat-label {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: bold;
  line-height: 1.2;
}

.stat-number {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.25rem;
  line-height: 1.3;
  word-break: break-word;
}

/* Installationen-Layout: Immer 2 Spalten, egal wie viele */
.installations-list {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Neue Installation Sektion klar darunter */
.new-installation-section {
  clear: both;
  width: 100%;
  margin-top: 2rem;
}



.installation-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 1rem;
  transition: all 0.3s ease;
}

.installation-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(74, 99, 243, 0.15);
  transform: translateX(4px);
}

.installation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.installation-type {
  font-weight: bold;
  color: var(--primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.installation-icon {
  font-size: 1.2rem;
}

.installation-date {
  font-size: 0.8rem;        /* Kleinere Schrift */
  color: #666;
  background: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-align: right;        /* RechtsbÃ¼ndig */
  margin-left: auto;        /* DrÃ¼ckt Element nach rechts */
}

.installation-details {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.installation-details strong {
  color: var(--text);
  font-weight: 600;
}

.no-data-message {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
  background: white;
  border-radius: var(--border-radius);
  border: 2px dashed #e9ecef;
}

.no-data-message p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.navigation-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  min-width: 200px;
}

.nav-button:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(74, 99, 243, 0.15);
  text-decoration: none;
  color: var(--primary);
  transform: translateY(-2px);
}

.nav-button-icon {
  font-size: 2rem;
}

.nav-button-text {
  font-weight: 600;
  text-align: center;
}

.nav-button-desc {
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

/* ==============================================
   CSS FÜR INSTALLATIONEN-BEARBEITUNG
   ============================================== */

/* Lösch-Button im Edit-Modus */
.cancel-edit-small.delete-mode {
  background-color: #dc3545 !important;
  color: white !important;
  border: 1px solid #dc3545 !important;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cancel-edit-small.delete-mode:hover {
  background-color: #c82333 !important;
  border-color: #bd2130 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.cancel-edit-small.delete-mode:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(220, 53, 69, 0.3);
}

/* Info-Badge Anpassung für bessere Sichtbarkeit des Lösch-Buttons */
.editing-info .info-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.editing-info .info-badge .cancel-edit-small {
  flex-shrink: 0;
  min-width: 100px;
  text-align: center;
}

/* Visueller Hinweis für Lösch-Aktion */
.editing-info.delete-mode {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border-color: #ffc107;
}

.editing-info.delete-mode .info-badge {
  color: #856404;
}


/* Bearbeiten-Button */
.edit-button {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  margin-right: 0.5rem;
}

.edit-button:hover {
  background-color: #45a049;
}


/* Bearbeitungs-Hinweis */
.editing-notice {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border: 2px solid #2196f3;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.notice-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1565c0;
  font-weight: 600;
}

.cancel-edit-button {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s;
}

.cancel-edit-button:hover {
  background-color: #d32f2f;
}

/* Zurück zur Übersicht Button */
.back-to-overview-button {
  background-color: #2196f3;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.back-to-overview-button:hover {
  background-color: #1976d2;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
  text-decoration: none;
  color: white;
}

/* Erweiterte Hardware-Übersicht Styles */
.hardware-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  grid-auto-rows: auto;
}

/* Breite Kacheln für Kontaktdaten */
.hardware-stat-wide {
  grid-column: span 1; /* Jede breite Kachel nimmt eine Spalte ein */
}

/* Spezielle Zeile nur für die letzten beiden Kacheln */
.hardware-stat-wide:nth-last-child(2) {
  grid-column: 1 / 2; /* Erste Hälfte der Zeile */
}

.hardware-stat-wide:nth-last-child(1) {
  grid-column: 2 / 3; /* Zweite Hälfte der Zeile */
}

/* Standard Hardware-Stat Styles (erweitert) */
.hardware-stat {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  text-align: center; /* Zentriert für einheitliche Anordnung */
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column; /* Alle Kacheln: Icon oben, Text unten */
  align-items: center;
  gap: 0.5rem;
}

.hardware-stat:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(74, 99, 243, 0.15);
  transform: translateY(-2px);
}


.dicom-import-section {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #e8f5e8;
  border: 1px solid #4caf50;
  border-radius: 4px;
}

.import-button {
  background: #4caf50;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

#praxisInfo {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

#praxisInfo h2 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

#praxisDetails {
  color: #666;
  font-size: 1rem;
  line-height: 1.5;
}

/* ==============================================
   ERROR MESSAGES
   ============================================== */

.error-message {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  color: #742a2a;
}

.error-message h3 {
  color: #c53030;
  margin-bottom: 1rem;
}

.success-message {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: var(--border-radius);
  padding: 1rem;
  text-align: center;
  color: #276749;
  margin: 1rem 0;
}

/* ==============================================
   DSP-MODUS ANPASSUNGEN
   ============================================== */

.dsp-active .installation-type.active {
  border-color: #4caf50;
  background-color: rgba(76, 175, 80, 0.05);
}

.dsp-active .installation-card {
  border-color: #a5d6a7;
  background-color: rgba(76, 175, 80, 0.03);
}

.dsp-active .installation-header h3 {
  color: #2e7d32;
}

.dsp-active .dataoptiongroup-group {
  border-color: #a5d6a7;
  background-color: rgba(76, 175, 80, 0.03);
}

.dsp-active .group-heading {
  color: #2e7d32;
  border-bottom-color: #a5d6a7;
}

.dsp-active .kachel-checkbox input[type="checkbox"]:checked + .status-label {
  background-color: #4caf50;
  border-color: #4caf50;
}

.dsp-active .tri-state-button.btn-true.active {
  background-color: #4caf50;
  border-color: #4caf50;
}

.dsp-active .tri-state-button.btn-false.active {
  background-color: #e53935;
  border-color: #e53935;
}

/* ==============================================
   WEITERE UTILITY CLASSES
   ============================================== */

.initially-hidden {
  display: none !important;
}

.praxis-created input {
  background-color: #f0f0f0;
  border-color: #ccc;
  color: #555;
}

.text-error {
  color: #e53935;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

/* Bearbeitungs-Info */
.editing-info {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.info-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #856404;
}

.info-icon {
  margin-right: 0.5rem;
}

.cancel-edit-small {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.cancel-edit-small:hover {
  background: #c82333;
}

/* Typ-Auswahl */
.type-selection h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--primary);
  border-left: 4px solid var(--accent);
  padding-left: 0.5rem;
}

.available-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.type-option {
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.type-option:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(74, 99, 243, 0.15);
  transform: translateY(-2px);
}

.type-option.selected {
  border-color: var(--primary);
  background: rgba(74, 99, 243, 0.05);
}

.type-option h4 {
  margin: 0 0 0.5rem 0;
  color: var(--primary);
  font-size: 1.1rem;
}

.type-option p {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}


/* Tri-State Boolean */
.tri-state-group {
  display: flex;
  gap: 0.25rem;
}

.tri-state-button {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  background: #f8f8f8;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.tri-state-button:hover {
  background: #f0f0f0;
  border-color: #aaa;
}

.tri-state-button.active {
  font-weight: 600;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.tri-state-button.btn-none.active {
  background: #e0e0e0;
  border-color: #999;
  color: #555;
}

.tri-state-button.btn-true.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.tri-state-button.btn-false.active {
  background: #f44336;
  color: white;
  border-color: #f44336;
}


.section-divider {
  border-top: 1px solid #e9ecef;
  margin: 2rem 0 1rem 0;
}

.param-line {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.param-line strong {
  font-weight: 600;
  text-align: left;
  flex: 1;
  margin-right: 1rem;
}


/* Spezifischer Selektor nur für Installationen-Liste */
#installationenSummary.installations-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Neue Installation Sektion klar darunter */
#newInstallationsPlaceholder {
  clear: both;
  width: 100%;
  margin-top: 2rem;
}



/* ==============================================
   PASSWORT-AUTHENTIFIZIERUNG MODAL
   ============================================== */

.password-auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  visibility: visible !important;  /* DIESE ZEILE HINZUFÜGEN */
}

.password-auth-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.password-auth-content h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  border: none;
  padding: 0;
}

.password-input-group {
  margin: 1.5rem 0;
}

.password-input-group input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-sizing: border-box;
}

.password-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 99, 243, 0.1);
}

.password-attempts {
  color: #dc3545;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.password-error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: #c53030;
  padding: 0.75rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.password-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.password-buttons .button-secondary,
.password-buttons .action-button {
  min-width: 120px;
  padding: 0.75rem 1.5rem;
}




.parameter-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.parameter-label.required::after {
  content: ' *';
  color: #ff6b6b;
}

/* Radio-Button-Gruppen */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}



/* ===============================
   UNIVERSELLE OPTION-KACHELN (RADIO & CHECKBOX)
   =============================== */

.radiooptiontile,
.checkboxoptiontile {
  position: relative;
  display: flex;
  flex-direction: column;
}

.radiooptiontile input[type="radio"],
.checkboxoptiontile input[type="checkbox"] {
  position: absolute;
  opacity: 0;
}

.radiooptiontile label,
.checkboxoptiontile label {
  display: block;
  padding: 1rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  margin: 0;
}


.radiooptiontile:hover label,
.checkboxoptiontile:hover label {
  border-color: var(--accent);
}


/* ===============================
   RADIO-BUTTONS WIE KACHEL-CHECKBOXEN
   =============================== */

/* Radio-Optionen wie Server-OS-Kacheln */
.radio-option {
  position: relative;
  display: flex;
  flex-direction: column;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.radio-option label {
  display: block;
  padding: 1rem;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  margin: 0;
}

.radio-option input[type="radio"]:checked + label {
  border-color: var(--primary);
  background-color: rgba(74, 99, 243, 0.05);
  box-shadow: 0 0 0 2px var(--primary);
}

.radio-option:hover label {
  border-color: var(--accent);
}



/* Checkbox-Styles */
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-field input[type="checkbox"] {
  width: auto;
  margin: 0;
  margin-top: 0.125rem;
}

.checkbox-field label {
  font-weight: normal;
  margin: 0;
  cursor: pointer;
}




/* ✅ Konfliktvermeidung: Spezifische Selektoren für praxisDetails spans */
#praxisDetails span {
  display: inline; /* Explizit setzen um Konflikte zu vermeiden */
}

#praxisDetails br {
  line-height: 1.4; /* Konsistenter Zeilenabstand */
}



/* ==============================================
   SUBFIELD-CONTAINER (für expandierbare Gruppen)
   ============================================== */
.subfield-container {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.subfield-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 120px;
}

.subfield-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
}

.subfield-input {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.subfield-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 99, 243, 0.1);
}

.installations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));  /* ← Cards mehrspaltig */
  gap: 1.5rem;
}

@media (max-width: 1200px) {
  .installations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .installations-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
   OTHER-FIELD-CONTAINER
   ============================================== */
.other-field-container {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: var(--border-radius);
}

.other-field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #495057;
}

.other-field-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.other-field-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 99, 243, 0.1);
}


.btn-signature {
  padding: 10px 20px;
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-signature:hover {
  background: #1976d2;
}

.btn-signature:active {
  background: #0d47a1;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  width: 90%;
  max-width: 500px;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  background: #2196f3;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 28px;
  text-align: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #eee;
  text-align: right;
}

.btn-secondary {
  padding: 10px 20px;
  background: #757575;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}

.btn-secondary:hover {
  background: #616161;
}

/* Installation Actions - Kacheldesign */
.installation-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.installation-action-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-height: 150px;
  justify-content: center;
}

.installation-action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: white;
}

.installation-action-card .action-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.installation-action-card .action-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
}

.installation-action-card .action-content p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
  color: white;
}

/* Verschiedene Farben für unterschiedliche Typen (optional) */
.installation-action-card:nth-child(1) {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.installation-action-card:nth-child(2) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.installation-action-card:nth-child(3) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}


/* Info-Message für "Alle Typen installiert" */
.info-message {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

/* Deaktivierter Speichern-Button */
.action-button:disabled {
  cursor: not-allowed !important;
  opacity: 0.6;
}

/* Installation-Card Lösch-Button */
.installation-card {
  position: relative;
}

.installation-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.installation-card:hover .installation-delete-btn {
  opacity: 1;
}

.installation-delete-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

/* Overview Components Grid Layout */
.overview-components {
  display: flex;
  flex-direction: column;  /* ← Alle Components untereinander */
  gap: 2rem;  /* Abstand zwischen den Sections */
}

.overview-component {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.overview-component:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.component-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.component-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #333;
}

.component-content {
  padding: 1.5rem;
}


/* ========================================
   DYNAMIC LIST STYLES
   ======================================== */

.dynamic-list-container {
  margin: 20px 0;
}

.dynamic-list-table-wrapper {
  overflow-x: auto;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.dynamic-list-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.dynamic-list-table thead {
  background: #f5f5f5;
  border-bottom: 2px solid #ddd;
}

.dynamic-list-table th {
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.dynamic-list-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

.dynamic-list-table .actions-column {
  width: 100px;
  text-align: center;
}

.dynamic-list-input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.dynamic-list-input:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.dynamic-list-input[readonly] {
  background-color: #f9f9f9;
  color: #666;
  cursor: not-allowed;
}

/* Zeilen-Typen */
.dynamic-list-row.preloaded-row {
  background-color: #f0f8ff;
}

.dynamic-list-row.manual-row {
  background-color: white;
}

.dynamic-list-row:hover {
  background-color: #fafafa;
}

/* Section Header */
.dynamic-list-table .section-header td {
  background: #e8f4f8;
  padding: 10px 12px;
  font-weight: 600;
  color: #2196F3;
  border-bottom: 2px solid #2196F3;
}

/* Leere Zeile */
.dynamic-list-table .empty-row td {
  padding: 30px;
  text-align: center;
  color: #999;
  font-style: italic;
}

/* NEU - Select nimmt 1 Spalte: */
select.parameter-input {
  width: 100%;
}


/* Badge */
.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
}

.badge-info {
  background: #2196F3;
  color: white;
}

/* Add Button */
.dynamic-list-add-btn {
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.dynamic-list-add-btn:hover {
  background: #45a049;
}

/* Delete Button */
.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.btn-danger:hover {
  background: #da190b;
}

/* Responsive */
@media (max-width: 768px) {
  .dynamic-list-table {
    font-size: 12px;
  }
  
  .dynamic-list-table th,
  .dynamic-list-table td {
    padding: 8px 6px;
  }
  
  .dynamic-list-input {
    font-size: 12px;
    padding: 4px 6px;
  }
}

/* ========================================
   BADGES (für Checkbox-Groups)
   ======================================== */

.badge {
  display: inline-block;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: normal;
}

.badge-measurement {
  background: #4CAF50;
  color: white;
}

.badge-os {
  background: #2196F3;
  color: white;
}

.badge-default {
  background: #9E9E9E;
  color: white;
}

/* ========================================
   CHECKBOX GROUP STYLES
   ======================================== */

.checkbox-group-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkbox-item:hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.checkbox-item label {
  flex: 1;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.checkbox-item .badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-os {
  background: #0d6efd;
  color: white;
}

.badge-measurement {
  background: #198754;
  color: white;
}

/* Checked State */
.checkbox-item input[type="checkbox"]:checked {
  accent-color: #0d6efd;
}

.checkbox-item:has(input[type="checkbox"]:checked) {
  background: #e7f1ff;
  border-color: #0d6efd;
}