:root {
  /* 🌞 LIGHT MODE (NEU STANDARD) */
  --bg: #eef2f7;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --border: #dbe2ea;
  --text: #0f172a;
  --muted: #64748b;

  --accent: #3f97cb;
  --accent-2: #537EFF24;
  --danger: #ef4444;

  --shadow: 0 6px 20px rgba(0,0,0,0.08);
  --radius: 18px;
  --hover: rgba(0,0,0,0.05);

  --success: #22c55e;
}

body.dark {
  --bg: #0b1220;
  --panel: #111a2b;
  --panel-2: #0f1726;
  --border: #24324a;
  --text: #e7edf7;
  --muted: #93a4bd;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}



/****************************************************************************************
*****************************************************************************************
****************************************************************************************/

.user-create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 20px;
}

.user-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px 80px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #f9fafb;
  margin-bottom: 8px;
}

.user-row:hover {
  background: #f1f5f9;
}

.user-create-grid input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.user-create-grid button {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: #3b82f6;
  color: white;
  cursor: pointer;
  white-space: nowrap;
}

.user-create-grid button:hover {
  background: #2563eb;
}

.user-create-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 12px;
  margin-top: 10px;
}

.card {
  padding: 20px 25px;
}

.card h3 {
  margin-bottom: 15px;
}

@media (max-width: 600px) {
  .user-create-grid {
    grid-template-columns: 1fr;
  }

  .user-create-grid button {
    width: 100%;
  }
}

.divider {
  height: 1px;
  background: #e5e7eb;
  margin: 20px 0;
}

.user-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #f9fafb;
  margin-bottom: 10px;
}

.admin-warning {
  margin-left: 8px;
  color: #ef4444;
  font-size: 18px;   /* 👈 größer */
  display: inline-block;
}
@keyframes pulse-warning {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.admin-warning {
  margin-left: 8px;
  color: #ef4444;
  font-size: 18px;
  display: inline-block;
  text-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
  animation: pulse-warning 1.5s ease-in-out infinite;
}

.icon-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

@media (max-width: 600px) {
  .user-row {
    grid-template-columns: 1fr;
  }
}

.toggle-btn {
  border: none;
  padding: 6px 12px;
  border-radius: 20px; /* 🔥 rund wie bei Prefix */
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background: #e0f2fe;
  color: #0369a1;
}

.toggle-btn.inactive {
  background: #f3f4f6;
  color: #6b7280;
}

.toggle-btn {
  border: none;
  padding: 6px 12px;
  border-radius: 20px; /* 🔥 rund wie bei Prefix */
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background: #e0f2fe;
  color: #0369a1;
}

.toggle-btn.inactive {
  background: #f3f4f6;
  color: #6b7280;
}

.danger-btn {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  padding: 8px 14px;        /* 🔥 größer */
  border-radius: 999px;     /* 🔥 pill perfekt */
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.danger-btn:hover {
  background: #fecaca;
  transform: scale(1.05);
}

.user-row {
  align-items: center;
}

.user-row button {
  justify-self: end; /* 🔥 sorgt für saubere Position */
}

.modal-actions {
  display: flex;
  justify-content: flex-end;  /* 🔥 alles nach rechts */
  gap: 10px;
  margin-top: 15px;
}

button.primary {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

button.primary:hover {
  background: #2563eb;
}

button.secondary {
  background: #f3f4f6;
  color: #374151;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

button.secondary:hover {
  background: #e5e7eb;
}

.switch {
  position: relative;
  display: inline-block;
  width: 90px;   /* 🔥 länger */
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background-color: #e5e7eb;
  border-radius: 999px;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 500;
}

/* Kugel */
.slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
  z-index: 2;
}

/* Aktiv Zustand */
.switch input:checked + .slider {
  background-color: #3b82f6;
  color: white;
}

.switch input:checked + .slider::before {
  transform: translateX(62px); /* 🔥 an Länge angepasst */
}

.switch-label {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  transition: 0.2s;
}

/* beide erstmal verstecken */
.switch-label.on,
.switch-label.off {
  opacity: 0;
}

/* Aktiv */
.switch input:checked + .slider .on {
  opacity: 1;
}

/* Inaktiv */
.switch input:not(:checked) + .slider .off {
  opacity: 1;
}

.switch-label.on {
  text-align: left;
  padding-left: 18px;
}

.switch-label.off {
  text-align: right;
  padding-right: 30px;
}


.user-detail-card {
  margin-top: 15px;
  animation: fadeIn 0.2s ease;
}

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

.user-row.active {
  border: 2px solid #3b82f6;
  background: #eff6ff;
}

.multi-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.multi-select-list.hidden {
  display: none;
}

.role-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--chip-bg, #e0edff);
  color: var(--chip-text, #1f2937);
  font-size: 12px;
  margin: 2px;
}

.role-chip.selectable {
  cursor: pointer;
}

.role-chip.selectable:hover {
  background: #dbeafe;
}

.multi-select-display:hover {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

.dropdown-icon {
  margin-left: 10px;
  color: #6b7280;
  font-size: 12px;
}

.multi-select-content {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}


.multi-select-dropdown:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
}

.user-row {
  cursor: pointer;
}

.user-row:hover {
  background: #f3f4f6;
}

:root {
  --chip-bg: #e0edff;
  --chip-text: #1f2937;
}

.dark {
  --chip-bg: #1e3a8a;
  --chip-text: #ffffff;
}

/* 🔥 Passwortfelder */
.form-grid {
  display: grid;
  grid-template-columns: 25% 25%;
  gap: 12px;
  margin-bottom: 16px;
}

.form-grid input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

/* 🔥 Rollen Bereich */
.form-group {
  margin-top: 10px;
  margin-bottom: 20px;
}

.form-role {
  width: 50%;
}

.form-label {
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

/* 🔥 Button */
.form-actions {
  display: flex;
  justify-content: flex-end;
}

.multi-select {
  position: relative;
  width: 100%;
}

.multi-select-display {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  background: white;
  display: flex;
  justify-content: space-between;
}

.multi-select-dropdown {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  z-index: 10;
}

.multi-select-dropdown label {
  display: block;
  padding: 4px;
}

.hidden {
  display: none;
}

.arrow {
  font-size: 12px;
  color: #888;
}


.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-content input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}