/* Bildwerkzeug (bildwerkzeug.js). Die Farben kommen aus dem Mandanten. */
.bw-dialog { --karte: var(--weiss); --schrift: var(--text); --rand: var(--linie); --haupt: var(--rot); --haupt-schrift: var(--auf-marke); --warn: var(--rot-dunkel); }
.bw-dialog { width: min(980px, 96vw); max-height: 96vh; overflow: auto; border: 0; border-radius: 14px; padding: 16px 18px; background: var(--karte, #fff); color: var(--schrift, #1f242b); box-shadow: 0 18px 60px rgba(0, 0, 0, .35); }
.bw-dialog::backdrop { background: rgba(20, 22, 26, .55); }
.bw-kopf { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 10px; overflow-wrap: anywhere; }
.bw-leise { color: var(--leise, #6b7078); }
.bw-flaeche { position: relative; display: flex; justify-content: center; align-items: flex-start; background: #24262b; border-radius: 8px; padding: 10px; min-height: 200px; touch-action: none; user-select: none; }
.bw-flaeche canvas { display: block; max-width: 100%; }
.bw-rahmen { position: absolute; box-sizing: border-box; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); cursor: move; touch-action: none; }
.bw-flaeche { overflow: hidden; }
.bw-rahmen i { position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 3px; touch-action: none; }
.bw-rahmen i[data-ecke="nw"] { left: -9px; top: -9px; cursor: nwse-resize; }
.bw-rahmen i[data-ecke="no"] { right: -9px; top: -9px; cursor: nesw-resize; }
.bw-rahmen i[data-ecke="sw"] { left: -9px; bottom: -9px; cursor: nesw-resize; }
.bw-rahmen i[data-ecke="so"] { right: -9px; bottom: -9px; cursor: nwse-resize; }
.bw-drittel { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, transparent 33.2%, rgba(255, 255, 255, .45) 33.2%, rgba(255, 255, 255, .45) 33.5%, transparent 33.5%, transparent 66.5%, rgba(255, 255, 255, .45) 66.5%, rgba(255, 255, 255, .45) 66.8%, transparent 66.8%), linear-gradient(to bottom, transparent 33.2%, rgba(255, 255, 255, .45) 33.2%, rgba(255, 255, 255, .45) 33.5%, transparent 33.5%, transparent 66.5%, rgba(255, 255, 255, .45) 66.5%, rgba(255, 255, 255, .45) 66.8%, transparent 66.8%); }
.bw-leiste { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bw-k { font: inherit; font-size: 14px; padding: 7px 11px; border: 1px solid var(--rand, #d7d4cd); border-radius: 8px; background: var(--karte, #fff); color: inherit; cursor: pointer; }
.bw-k.bw-leise { border-color: transparent; background: transparent; }
.bw-format.an { background: var(--haupt, #c9a227); border-color: var(--haupt, #c9a227); color: var(--haupt-schrift, #16181c); font-weight: 600; }
.bw-haupt { background: var(--schrift, #1f242b); border-color: var(--schrift, #1f242b); color: var(--karte, #fff); font-weight: 600; }
.bw-k:disabled { opacity: .6; cursor: default; }
.bw-regler { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px 16px; margin-top: 10px; }
.bw-regler label { display: block; font-size: 13px; }
.bw-regler output { float: right; color: var(--leise, #6b7078); }
.bw-regler input[type="range"] { display: block; width: 100%; padding: 0; border: 0; background: none; accent-color: var(--haupt, #c9a227); }
.bw-hinweis { margin: 8px 0 0; font-size: 13px; color: var(--warn, #9a5b00); }
.bw-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.bw-luecke { flex: 1; }

/* KI-Bildprüfung */
.bp-liste { display: grid; gap: 10px; }
.bp-zeile { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; padding-left: 10px; border-left: 3px solid var(--linie); }
.bp-zeile img { width: 96px; height: 64px; object-fit: cover; border-radius: 5px; }
.bp-gut { border-left-color: var(--gruen); }
.bp-nein { border-left-color: var(--rot); }
/* Automatisch verbessern (seit 07.11.2026, aus dem Planer) */
.bw-k.an { background: var(--haupt, #c9a227); border-color: var(--haupt, #c9a227); color: var(--haupt-schrift, #16181c); font-weight: 600; }
#bw-auto-info { font-size: 13px; }
