/* ============================================================
   LEGACY — weiterhin von admin/users_and_groups/edit_user.html genutzt.
   Nicht entfernen, solange diese Seite die Klassen verwendet.
   ============================================================ */
.SettingsPageHeader {
    color: black;
    font-family: PlexCircular, Open Sans, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
    font-size: 30px;
}

.SettingsCategoryHeader {
    border-bottom: 2px solid rgba(0, 0, 0, .3);
    padding: 20px 0 20px;
}

.edit-field {
    border: none;
    background-color: transparent;
    width: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 20px;
    width: 100%;
}

.edit-field-password {
    width: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 20px;
    width: 100%;
    background-color: white;
    border: 1px solid #ccc;
}

.edit-field-hidden {
    border: 1px solid #ccc;
    background-color: transparent;
    width: auto;
    padding: 10px;
    margin-bottom: 10px;
    height: 20px;
}

.edit-field:focus {
    background-color: white;
    border: 1px solid #ccc;
}

.save-changes {
    margin-top: 10px;
}

.ownSettingsFormSetcion0 {
    border-bottom: 1px solid rgba(0, 0, 0, .3);
    position: relative;
    padding: 20px 0 25px;
}

.ownSettingsFormSetcion1 {
    display: flex;
    justify-content: space-between;
}

.ownSettingsFormSetcion2 {
    margin-top: 5px;
}

.ownSettingsFormSetcion3 {
    display: flex;
    flex-direction: column;
    display: none;
}

/* ============================================================
   Profilseite — modernes, mobil-responsives Design
   Selbst-enthaltend; ersetzt das alte "ownSettingsFormSetcion"-Layout.
   ============================================================ */

.pf-wrap {
  width: 100%;
  max-width: 780px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.pf-flash {
  margin-bottom: 1rem;
}

.pf-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

/* ── Kopfbereich mit Avatar ── */
.pf-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.75rem 1.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
}

.pf-avatar {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pf-header-info {
  min-width: 0;
}

.pf-name {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

.pf-username {
  font-size: 0.9rem;
  opacity: 0.85;
}

.pf-header-meta {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  opacity: 0.85;
  word-break: break-all;
}

/* ── Body / Sektionen ── */
.pf-body {
  padding: 0.5rem 1.75rem 1.75rem;
}

.pf-section {
  padding-top: 1.25rem;
}

.pf-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #764ba2;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(118, 75, 162, 0.15);
  margin-bottom: 0.25rem;
}

/* ── Zeile / Feld ── */
.pf-row {
  padding: 0.95rem 0;
  border-bottom: 1px solid #eceef1;
}
.pf-row:last-child {
  border-bottom: none;
}

.pf-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pf-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}
.pf-label i {
  color: #764ba2;
  font-size: 0.95rem;
}

.pf-value {
  margin-top: 0.35rem;
  font-size: 1.05rem;
  color: #111827;
  word-break: break-word;
}
.pf-value.pf-muted {
  color: #9ca3af;
  font-style: italic;
}

/* Bearbeiten-Link */
.pf-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #4b5563;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.pf-edit-link:hover {
  border-color: #764ba2;
  color: #764ba2;
  background: rgba(118, 75, 162, 0.06);
}

/* Editier-Bereich (initial versteckt) */
.pf-edit {
  display: none;
  margin-top: 0.75rem;
}
.pf-edit.open {
  display: block;
}

.pf-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  font-size: 1rem;
  color: #111827;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pf-input:focus {
  outline: none;
  border-color: #764ba2;
  box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.15);
  background: #ffffff;
}

.pf-input + .pf-input {
  margin-top: 0.6rem;
}

.pf-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin: 0.6rem 0 0.25rem;
}

.pf-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.pf-hint {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Buttons */
.pf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease, background 0.15s ease;
}
.pf-btn:active {
  transform: translateY(1px);
}
.pf-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
}
.pf-btn-primary:hover {
  opacity: 0.92;
  color: #ffffff;
}
.pf-btn-ghost {
  background: #f3f4f6;
  color: #4b5563;
}
.pf-btn-ghost:hover {
  background: #e5e7eb;
}
.pf-btn-danger {
  background: #fee2e2;
  color: #b91c1c;
}
.pf-btn-danger:hover {
  background: #fecaca;
}
.pf-btn-outline {
  background: transparent;
  border: 1px solid #764ba2;
  color: #764ba2;
}
.pf-btn-outline:hover {
  background: rgba(118, 75, 162, 0.08);
}

/* Badges (MFA-Status) */
.pf-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}
.pf-badge-ok {
  background: #dcfce7;
  color: #15803d;
}
.pf-badge-off {
  background: #f3f4f6;
  color: #6b7280;
}

/* MFA / Benachrichtigungs-Zeile: Status + Aktion nebeneinander */
.pf-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Toggle-Switch */
.pf-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.pf-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.pf-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease;
}
.pf-switch-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.pf-switch input:checked + .pf-switch-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.pf-switch input:checked + .pf-switch-slider::before {
  transform: translateX(20px);
}
.pf-switch input:disabled + .pf-switch-slider {
  opacity: 0.55;
  cursor: not-allowed;
}

.pf-switch-label {
  font-size: 0.95rem;
  color: #374151;
}

/* Passwortrichtlinien-Box innerhalb des Edit-Bereichs sauber einbetten */
.pf-edit .password-requirements,
.pf-edit #password-requirements {
  margin-top: 0.75rem;
}

/* ── Mobile ── */
@media (max-width: 560px) {
  .pf-wrap {
    margin: 1rem auto;
    padding: 0 0.6rem;
  }
  .pf-header {
    padding: 1.25rem 1.1rem;
    gap: 0.85rem;
  }
  .pf-avatar {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
  }
  .pf-name {
    font-size: 1.15rem;
  }
  .pf-body {
    padding: 0.25rem 1.1rem 1.4rem;
  }
  .pf-row-top {
    align-items: flex-start;
  }
  .pf-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
