/* Mitarbeiterbild (06.10.2026): Avatare mit Bild, Abschnitt in „Mein Konto“/Benutzer-Editor, Zuschnitt-Dialog (Cropper.js), Website-Team-Übernahme.
   Tokens der .wm-Bausteine (workspace-modules.css); Dark Mode über html[data-workspace-theme="dark"]. */
@media screen {
  .avatar.has-photo { padding:0; overflow:hidden; background:var(--wm-tint,#f2ecf6); }
  .avatar.has-photo img.user-photo-avatar { display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }

  .user-photo-section { gap:10px; margin-top:16px; padding:14px 16px; border:1px solid var(--wm-border,#dccfe4); border-radius:12px; background:var(--wm-surface,#fff); }
  .user-photo-section header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
  .user-photo-section header strong { display:block; font-size:14px; color:var(--wm-text,#28212e); }
  .user-photo-section header span { display:block; font-size:12.5px; color:var(--wm-muted,#6e6576); line-height:1.45; }
  .user-photo-section header small { color:var(--wm-muted,#6e6576); white-space:nowrap; }
  .user-photo-row { display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
  .user-photo-current { width:96px; height:96px; flex:0 0 auto; border-radius:50%; overflow:hidden; border:2px solid var(--wm-border,#dccfe4); background:var(--wm-tint,#f2ecf6); display:grid; place-items:center; }
  .user-photo-current img { width:100%; height:100%; object-fit:cover; display:block; }
  .user-photo-current.empty span { display:grid; justify-items:center; gap:2px; color:var(--wm-muted,#6e6576); font-size:11px; }
  .user-photo-current.empty svg { width:26px; height:26px; color:var(--wm-accent,#643182); opacity:.8; }
  .user-photo-actions { display:grid; gap:8px; justify-items:start; min-width:0; flex:1 1 220px; }
  .user-photo-actions small { font-size:12px; line-height:1.45; }
  #user-form .form-grid .user-photo-section { grid-column:1 / -1; margin-top:4px; }

  .user-photo-pick { grid-column:1 / -1; display:flex; gap:8px; align-items:flex-end; flex-wrap:wrap; margin-top:8px; padding-top:8px; border-top:1px dashed var(--wm-border,#dccfe4); }
  .user-photo-pick label { display:grid; gap:4px; flex:1 1 200px; min-width:0; }
  .user-photo-pick label span { font-size:12px; color:var(--wm-muted,#6e6576); }

  /* Zuschnitt-Dialog */
  .user-photo-editor { width:min(960px, calc(100vw - 32px)); max-width:none; padding:0; border:1px solid var(--wm-border,#dccfe4); border-radius:16px; background:var(--wm-surface,#fff); color:var(--wm-text,#28212e); box-shadow:0 24px 60px rgba(43,36,50,.28); }
  .user-photo-editor::backdrop { background:rgba(43,36,50,.55); }
  .user-photo-editor header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:18px 20px 12px; border-bottom:1px solid var(--wm-line,#e3dce8); }
  .user-photo-editor header h2 { margin:0 0 4px; font:600 18px/1.2 Cardo, Georgia, serif; color:var(--wm-accent,#643182); }
  .user-photo-editor header p { margin:0; font-size:12.5px; color:var(--wm-muted,#6e6576); }
  .user-photo-layout { display:grid; grid-template-columns:minmax(0,1fr) 240px; gap:16px; padding:16px 20px; }
  .user-photo-stage { position:relative; min-height:320px; max-height:min(60vh, 520px); border-radius:12px; overflow:hidden; background:var(--wm-soft,#f4f1f6); outline:none; }
  .user-photo-stage:focus-visible { box-shadow:0 0 0 3px var(--wm-tint,#f2ecf6), 0 0 0 5px var(--wm-accent,#643182); }
  .user-photo-stage img { display:block; max-width:100%; }
  .user-photo-side { display:grid; gap:14px; align-content:start; }
  .user-photo-ratio { display:grid; gap:6px; }
  .user-photo-ratio label { display:flex; gap:8px; align-items:center; font-size:13px; }
  .user-photo-zoom { display:grid; gap:6px; font-size:12.5px; color:var(--wm-muted,#6e6576); }
  .user-photo-zoom input { width:100%; accent-color:var(--wm-accent,#643182); }
  .user-photo-previews { display:flex; gap:14px; }
  .user-photo-previews figure { margin:0; display:grid; gap:4px; justify-items:center; }
  .user-photo-previews figcaption { font-size:11.5px; color:var(--wm-muted,#6e6576); }
  .user-photo-preview { width:88px; height:88px; overflow:hidden; background:var(--wm-tint,#f2ecf6); border:1px solid var(--wm-border,#dccfe4); }
  .user-photo-preview.round { border-radius:50%; }
  .user-photo-preview.rounded { border-radius:18%; }
  .user-photo-preview.square { border-radius:6px; }
  .user-photo-hint { font-size:12px; }
  .user-photo-status { margin:0; min-height:1em; font-size:12px; color:var(--wm-danger,#9a2c22); }
  .user-photo-editor footer { display:flex; justify-content:flex-end; gap:8px; padding:12px 20px 16px; border-top:1px solid var(--wm-line,#e3dce8); }
  .user-photo-editor .cropper-view-box, .user-photo-editor .cropper-face { border-radius:0; }

  html[data-workspace-theme="dark"] .user-photo-editor { box-shadow:none; }

  /* 08.10.2026: Drehen, Hinweise zu Sperre/Sichtung, Verwaltungsabschnitt, Einstellung „erst nach Freigabe“, kleine Bild-Avatare in Kanban/Überführung */
  .user-photo-rotate { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
  .user-photo-rotate .button.small { padding:4px 10px; }
  .user-photo-angle { margin-left:auto; font-size:12px; color:var(--wm-muted,#6e6576); min-width:34px; text-align:right; }
  .user-photo-editor.too-small .user-photo-stage { opacity:.45; }
  .user-photo-editor.too-small .user-photo-status { font-weight:600; }
  .user-photo-notice { display:flex; gap:10px; align-items:flex-start; margin:0; padding:10px 12px; border-radius:10px; font-size:12.5px; line-height:1.45; }
  .user-photo-notice svg { width:16px; height:16px; flex:0 0 auto; margin-top:2px; }
  .user-photo-notice.locked { background:var(--wm-danger-soft,#fbeae8); color:var(--wm-danger,#9a2c22); border:1px solid rgba(154,44,34,.25); }
  .user-photo-notice.pending { background:var(--wm-tint,#f2ecf6); color:var(--wm-accent,#643182); border:1px solid var(--wm-border,#dccfe4); }
  .user-photo-current.hidden-photo { position:relative; border-style:dashed; }
  .user-photo-current.hidden-photo img { filter:grayscale(1); opacity:.7; }
  .user-photo-badge { position:absolute; right:-2px; bottom:-2px; width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:var(--wm-surface,#fff); border:1px solid var(--wm-border,#dccfe4); color:var(--wm-danger,#9a2c22); }
  .user-photo-badge svg { width:14px; height:14px; }
  .user-photo-flag { display:inline-block; margin-top:2px; padding:1px 7px; border-radius:999px; font-size:11px; font-weight:600; }
  .user-photo-flag[data-kind="locked"] { background:var(--wm-danger-soft,#fbeae8); color:var(--wm-danger,#9a2c22); }
  .user-photo-flag[data-kind="pending"] { background:var(--wm-tint,#f2ecf6); color:var(--wm-accent,#643182); }
  .user-photo-policy { display:grid; gap:10px; margin:0 0 16px; padding:14px 16px; border:1px solid var(--wm-border,#dccfe4); border-radius:12px; background:var(--wm-surface,#fff); }
  .user-photo-policy header strong { display:block; font-size:14px; color:var(--wm-text,#28212e); }
  .user-photo-policy header span { display:block; font-size:12.5px; color:var(--wm-muted,#6e6576); line-height:1.45; }
  .user-photo-policy-toggle { display:flex; justify-content:space-between; align-items:center; gap:12px; }
  .user-photo-policy-toggle > span { display:grid; gap:2px; min-width:0; }
  .user-photo-policy-toggle small { font-size:12px; color:var(--wm-muted,#6e6576); line-height:1.4; }
  .user-photo-policy-list { display:flex; gap:8px 14px; align-items:center; flex-wrap:wrap; font-size:12.5px; }
  .user-photo-policy-list > strong { flex:0 0 100%; font-size:12px; color:var(--wm-muted,#6e6576); }
  .user-photo-policy-item { display:inline-flex; gap:8px; align-items:center; padding:4px 6px 4px 4px; border:1px solid var(--wm-border,#dccfe4); border-radius:999px; }
  .user-photo-policy-item .avatar { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; font-size:11px; overflow:hidden; background:var(--wm-tint,#f2ecf6); }
  .user-photo-policy-item .avatar img { width:100%; height:100%; object-fit:cover; display:block; }
  .avatar.user-photo-inline { display:inline-grid; place-items:center; width:22px; height:22px; border-radius:50%; overflow:hidden; vertical-align:middle; }
  .tk-avatar.has-photo { overflow:hidden; padding:0; }
  .tk-avatar.has-photo img.user-photo-avatar { display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }

  @media (max-width: 760px) {
    .user-photo-layout { grid-template-columns:1fr; padding:12px 16px; }
    .user-photo-rotate .button.small { flex:1 1 auto; }
    .user-photo-policy-toggle { flex-wrap:wrap; }
    .user-photo-stage { min-height:240px; max-height:50vh; }
    .user-photo-editor header, .user-photo-editor footer { padding-left:16px; padding-right:16px; }
    .user-photo-editor footer { flex-wrap:wrap; }
    .user-photo-previews { justify-content:center; }
  }
}
