/* ============================================================
   LifeFolder — Profil (Avatar-Button oben rechts)
   ============================================================ */
.profile { display: block; max-width: 820px; }
.profile__actions { display: inline-flex; align-items: center; gap: 12px; }
.profile-status { font-size: 13px; font-weight: 600; color: var(--color-muted-2); }
.profile-status--dirty { color: var(--status-review-fg); }

.profile-card { margin-top: 16px; }
.profile-card__title { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--color-ink); margin: 0 0 14px; }
.profile-card__title--danger { color: var(--status-urgent-fg); }
.profile-card__sub { font-size: 13.5px; color: var(--color-muted); margin: -8px 0 14px; }

/* Feld-Helfer + optional-Suffix (field__opt kommt aus 09_people.css) */
.field__help { font-size: 12px; color: var(--color-muted-2); }

/* Profilfoto */
.profile-photo { display: flex; align-items: center; gap: 18px; }
.profile-photo__avatar { position: relative; flex: none; width: 72px; height: 72px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-family: var(--font-head); font-weight: 800; font-size: 24px; }
.profile-photo__img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo__body { flex: 1; min-width: 0; }
.profile-photo__title { font-size: 14.5px; font-weight: 700; color: var(--color-ink); }
.profile-photo__hint { font-size: 12.5px; color: var(--color-muted-2); margin: 2px 0 12px; }
.profile-photo__actions { display: inline-flex; align-items: center; gap: 14px; }
.profile-photo__remove { border: none; background: transparent; color: var(--color-muted); font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 0; }
.profile-photo__remove:hover { color: var(--status-urgent-fg); }
.profile-photo__file { display: none; }

/* People & household */
.profile-household { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.profile-household__avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.profile-household__add { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--color-line); color: var(--color-selected); font-size: 13px; font-weight: 600; }
.profile-household__add:hover { border-color: var(--color-selected); }

.profile-link { display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 600; color: var(--color-selected); }
.profile-link:hover { text-decoration: underline; }

/* Notifications */
.profile-notif { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--color-line-soft); }
.profile-notif:first-of-type { border-top: none; padding-top: 0; }
.profile-notif__name { font-size: 14.5px; font-weight: 600; color: var(--color-ink); }
.profile-notif__sub { font-size: 12.5px; color: var(--color-muted); margin-top: 2px; }

/* Toggle-Switch (Green-Rule: „on" = ink-navy, nicht grün) */
.toggle { position: relative; flex: none; display: inline-flex; }
.toggle__input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track { display: block; width: 44px; height: 26px; border-radius: 999px; background: var(--color-line); transition: background .18s; position: relative; }
.toggle__knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--color-surface); box-shadow: var(--shadow-1); transition: transform .18s; }
.toggle__input:checked ~ .toggle__track { background: var(--color-selected); }
.toggle__input:checked ~ .toggle__track .toggle__knob { transform: translateX(18px); }
.toggle__input:focus-visible ~ .toggle__track { outline: 2px solid var(--color-selected); outline-offset: 2px; }

/* Avatar-Button in der Topbar (→ Profil) */
.avatar { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; transition: border-color .15s; }
.avatar__img { width: 100%; height: 100%; object-fit: cover; }
.avatar__initials { font-size: 13px; font-weight: 700; font-family: var(--font-head); color: var(--color-muted); }
.avatar:hover { border-color: var(--color-selected); }

/* Avatar-Konto-Menü (Dropdown) */
.avatar-menu { position: relative; }
.avatar-menu .avatar { padding: 0; }
.avatar-menu__menu { min-width: 210px; z-index: 90; }
.avatar-menu__head { display: block; padding: 8px 11px; margin-bottom: 4px; border-bottom: 1px solid var(--color-line-soft); border-radius: 8px; text-decoration: none; }
.avatar-menu__head:hover { background: var(--color-surface-2, var(--color-bg)); }
.avatar-menu__name { display: block; font-size: 14px; font-weight: 700; color: var(--color-ink); }
.avatar-menu__email { display: block; font-size: 12px; color: var(--color-muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-menu__menu form { margin: 0; width: 100%; }

@media (max-width: 640px) {
  .profile__actions { width: 100%; flex-wrap: wrap; }
  .profile__actions .btn { flex: 1; }
}
