/* Agent „Planzeichnung“ (TP3): Rahmen, Arbeitsfläche, Chat, Kennzahlen, Vollbild-Overlays und die Zeichenfläche
   (plan-zeichnen.js). Nur Klassen mit Präfix .pz-, Farben und Maße aus den Tokens in :root. */

/* ── Startansicht ─────────────────────────────────────────── */
.pz-leise { color: var(--text-tertiary); font-size: 12px; }
.pz-pad { padding: 10px 2px; }
.pz-karte-leise .card-sub { margin-bottom: 12px; }
.pz-karte-leise .btn-secondary:disabled { opacity: .55; cursor: not-allowed; }
.pz-bemassen-ergebnis { margin-top: 10px; font-size: 12.5px; }
.pz-bemassen-ergebnis:empty { display: none; }
.pz-bemassen-ergebnis .pz-befunde { margin-top: 6px; }
.pz-card-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pz-liste { display: flex; flex-direction: column; background: var(--bg-surface); border-radius: var(--r-inner); overflow: hidden; }
.pz-liste-zeile { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--row-line);
  transition: background 120ms var(--ease); min-width: 0; }
.pz-liste-zeile:last-child { border-bottom: none; }
.pz-liste-eintrag { display: flex; align-items: center; border-bottom: 1px solid var(--row-line); min-width: 0; }
.pz-liste-eintrag:last-child { border-bottom: none; }
.pz-liste-eintrag .pz-liste-zeile { flex: 1; min-width: 0; border-bottom: none; }
.pz-liste-loeschen { flex-shrink: 0; margin-right: 6px; color: var(--text-tertiary); }
.pz-liste-loeschen:hover { color: var(--color-danger); }
.pz-liste-loeschen svg { width: 15px; height: 15px; }
.pz-liste-zeile:hover { background: var(--bg-hover); }
.pz-liste-icon { width: 32px; height: 32px; border-radius: var(--r-icon); background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pz-liste-icon svg { width: 15px; height: 15px; stroke-width: 1.5; }
.pz-liste-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pz-liste-text b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-liste-text span { font-size: 12px; color: var(--text-tertiary); }
.pz-liste-pfeil { width: 16px; height: 16px; color: var(--text-quaternary); }
.pz-neu { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.pz-neu-felder { display: flex; gap: 16px; flex-wrap: wrap; }
.pz-feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pz-feld > span { font-size: 11px; font-weight: 500; color: var(--text-tertiary); letter-spacing: .04em; text-transform: uppercase; }
.pz-feld input { width: 100%; height: 36px; padding: 0 10px; }
.pz-feld textarea { width: 100%; min-height: 36px; padding: 8px 10px; resize: vertical; font: inherit; line-height: 1.4; }

/* lucide macht aus <i> ein <svg>: Knöpfe im Agenten mit der Hausgröße 15 px */
.pz-start :is(.btn-primary, .btn-secondary) svg, .pz-vorgang :is(.btn-primary, .btn-secondary) svg,
.pz-dialog :is(.btn-primary, .btn-secondary) svg { width: 15px; height: 15px; stroke-width: 1.6; }

/* ── Segment-Umschalter (Werkzeuge, Produkt, Vorher/Nachher) ── */
.pz-seg { display: inline-flex; background: var(--bg-rail); border-radius: var(--r-ctl); padding: 2px; gap: 1px; }
.pz-seg button { height: 30px; min-width: 32px; padding: 0 7px; border: none; background: transparent; border-radius: var(--r-icon);
  color: var(--text-secondary); font: inherit; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center;
  justify-content: center; gap: 5px; transition: background 120ms var(--ease), color 120ms var(--ease); }
.pz-seg button:hover { color: var(--text-primary); }
.pz-seg button.an { background: var(--bg-surface); color: var(--accent); box-shadow: var(--sh-seg); }
.pz-seg button svg { width: 15px; height: 15px; stroke-width: 1.6; }
.pz-seg-text button { padding: 0 11px; }

/* ── Vorgangsansicht: Kopfzeile ───────────────────────────── */
.pz-vorgang { padding: 4px 0 8px; }
.pz-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bg-app); border-radius: var(--r-card);
  box-shadow: var(--sh-card); padding: 12px 14px; }
.pz-zurueck { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--bg-surface); box-shadow: var(--sh-sm); color: var(--text-secondary); flex-shrink: 0; }
.pz-zurueck:hover { color: var(--text-primary); background: var(--bg-hover); }
.pz-zurueck svg { width: 16px; height: 16px; stroke-width: 1.6; }
.pz-kopf-titel { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 220px; }
.pz-kopf-auftrag { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-kopf-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#content select.pz-select { height: 26px; padding: 0 24px 0 9px; font-size: 12px; font-weight: 500; border-radius: var(--r-pill); width: auto; }
.pz-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--bg-surface); box-shadow: var(--sh-sm); font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.pz-chip-arbeit { color: var(--accent); background: var(--accent-dim); box-shadow: none; }
.pz-kopf-knoepfe { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.pz-kopf-knoepfe .pf-mini:disabled { opacity: .5; cursor: not-allowed; }
.pz-kopf-knoepfe .btn-primary { height: 32px; padding: 0 14px; font-size: 12.5px; }
.pz-kurz { display: none; }
.pz-punkt { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-orange); display: inline-block; flex-shrink: 0;
  animation: pz-puls 1.2s var(--ease) infinite; }
@keyframes pz-puls { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

.pz-hinweis { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 8px 8px 8px 14px;
  border-radius: var(--r-ctl); font-size: 12.5px; background: var(--color-info-bg); color: var(--color-info); }
.pz-hinweis.fehler { background: var(--color-danger-bg); color: var(--color-danger); }
.pz-hinweis.ok { background: var(--color-success-bg); color: var(--color-success); }
.pz-hinweis .btn-ghost { color: inherit; }
.pz-hinweis .btn-ghost svg { width: 14px; height: 14px; }
.pz-hinweis a { color: inherit; font-weight: 600; text-decoration: underline; }
.pz-hinweis > span { min-width: 0; }
.pz-hinweis-liste { margin-top: 4px; }
.pz-hinweis-liste summary { cursor: pointer; font-weight: 500; }
.pz-hinweis-liste ul { margin: 4px 0 0 18px; max-height: 180px; overflow-y: auto; }
.pz-hinweis-liste li { margin: 2px 0; }
.pz-kopf-knoepfe .pz-belegt { position: relative; }
.pz-kopf-knoepfe .pz-belegt::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 1px;
  background: var(--brand-orange); animation: pz-puls 1.2s var(--ease) infinite; }

/* ── Bänder: neue Regelversion, Anmerkungen der Freigabe ──── */
.pz-band { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; padding: 8px 10px 8px 14px;
  border-radius: var(--r-ctl); font-size: 12.5px; background: var(--color-info-bg); color: var(--color-info); }
.pz-band > svg, .pz-freigabe-kopf > svg { width: 15px; height: 15px; flex-shrink: 0; }
.pz-band > span { flex: 1; min-width: 0; }
.pz-band .pf-mini { color: var(--text-primary); }
.pz-freigabe-band { flex-direction: column; flex-wrap: nowrap; align-items: stretch; background: var(--bg-app); color: var(--text-primary);
  box-shadow: inset 0 0 0 1.5px var(--color-warning-bg); }
.pz-freigabe-band > * { min-width: 0; }
.pz-freigabe-kopf { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--color-warning); }
.pz-freigabe-titel { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.pz-freigabe-titel svg { width: 15px; height: 15px; flex-shrink: 0; }
.pz-freigabe-kopf .btn-primary { height: 30px; padding: 0 12px; font-size: 12.5px; }
.pz-freigabe-kopf .btn-ghost { color: var(--text-secondary); }
.pz-freigabe-kopf .btn-ghost svg, .pz-freigabe-kopf .btn-primary svg { width: 14px; height: 14px; }
.pz-freigabe-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.pz-freigabe-marke { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 5px 10px; border: 0;
  border-radius: var(--r-icon); background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: 12px; cursor: pointer; text-align: left; }
.pz-freigabe-marke:hover:not(:disabled) { background: var(--bg-hover); }
.pz-freigabe-marke.aussen { opacity: .65; cursor: default; }
.pz-freigabe-marke span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pz-farbpunkt { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ── Schrittleiste ────────────────────────────────────────── */
.pz-schritte { display: flex; gap: 2px; margin: 12px 0; padding: 3px; background: var(--bg-rail); border-radius: var(--r-pill); max-width: 520px; }
.pz-schritt { flex: 1; height: 34px; border: none; background: transparent; border-radius: var(--r-pill); font: inherit; font-size: 13px;
  font-weight: 500; color: var(--text-secondary); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 140ms var(--ease), color 140ms var(--ease); }
.pz-schritt:hover { color: var(--text-primary); }
.pz-schritt.an { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--sh-seg); }
.pz-schritt-nr { width: 20px; height: 20px; border-radius: 50%; background: var(--bg-active); color: var(--text-tertiary); font-size: 11px;
  font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.pz-schritt.an .pz-schritt-nr { background: var(--accent); color: var(--text-on-brand); }

.pz-platzhalter { max-width: 720px; }
.pz-platzhalter .btn-secondary { margin-top: 14px; }
.pz-fakten { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px; background: var(--row-line);
  border-radius: var(--r-inner); overflow: hidden; margin-bottom: 12px; }
.pz-fakten > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; background: var(--bg-surface); font-size: 12.5px; }
.pz-fakten span { color: var(--text-secondary); }
.pz-fakten b { font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Arbeitsfläche ────────────────────────────────────────── */
.pz-flaeche { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 370px); gap: 12px;
  height: calc(100vh - var(--topbar-h) - 210px); height: calc(100dvh - var(--topbar-h) - 210px); min-height: 480px; }
.pz-plan { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-app);
  border-radius: var(--r-card); box-shadow: var(--sh-card); overflow: hidden; }
.pz-leiste { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border-bottom: 1px solid var(--row-line); }
.pz-leiste-fuell { flex: 1; }
.pz-leiste .pf-mini.icon { width: 32px; height: 32px; }
.pz-leiste .pf-mini svg { width: 15px; height: 15px; }
.pz-erzeugen { height: 32px; padding: 0 13px; font-size: 12.5px; }
.pz-ohne-flaeche #pz-werkzeuge, .pz-ohne-flaeche #pz-rueck { display: none; }
.pz-buehne { position: relative; flex: 1; min-height: 0; background: #FCFCFD; overflow: hidden; }
.pz-plan-leer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2;
  pointer-events: none; text-align: center; padding: 20px; }
.pz-plan-leer > div { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-tertiary); }
.pz-plan-leer b { color: var(--text-primary); font-weight: 500; font-size: 14px; }
.pz-plan-leer svg { width: 30px; height: 30px; stroke-width: 1.2; margin-bottom: 6px; }
.pz-plan-erzeugen { padding: 22px 26px; border-radius: var(--r-card); background: rgba(255,255,255,.92); box-shadow: var(--sh-overlay); }
.pz-plan-erzeugen .btn-primary { pointer-events: auto; margin-top: 10px; height: 40px; padding: 0 20px; font-size: 14px; }
.pz-plan-erzeugen .btn-primary svg { width: 16px; height: 16px; margin: 0; }
.pz-band.pz-band-fehler { background: var(--color-danger-bg); color: var(--color-danger); }
.pz-band.pz-band-fehler .btn-secondary { height: 30px; }
.pz-band .pz-aktualisieren { height: 30px; padding: 0 12px; font-size: 12.5px; }
.pz-band .pz-aktualisieren svg { width: 14px; height: 14px; }

/* Zeichenfläche (plan-zeichnen.js) */
.pz-zf { cursor: crosshair; user-select: none; -webkit-user-select: none; }
.pz-zf[data-werkzeug="ansicht"] { cursor: grab; }
.pz-zf[data-werkzeug="auswahl"] { cursor: default; }
.pz-zf.pz-zf-ziehen { cursor: grabbing; }
.pz-zf-canvas { position: absolute; inset: 0; display: block; }
.pz-zf-info { position: absolute; left: 10px; bottom: 10px; z-index: 2; padding: 3px 9px; border-radius: var(--r-pill);
  background: rgba(250,251,251,.92); box-shadow: var(--sh-sm); font-size: 11.5px; color: var(--text-secondary);
  font-variant-numeric: tabular-nums; pointer-events: none; opacity: 0; transition: opacity 120ms; }
.pz-zf-info.an { opacity: 1; }

/* Vorschlag */
.pz-vorschlag { position: absolute; top: 12px; left: 12px; right: 12px; width: fit-content; margin: 0 auto; z-index: 3; display: flex;
  align-items: center; gap: 14px; padding: 9px 10px 9px 15px; background: var(--bg-app); border-radius: var(--r-inner);
  box-shadow: var(--sh-overlay); }
.pz-vorschlag.veraltet { box-shadow: var(--sh-overlay), inset 3px 0 0 var(--color-warning); background: var(--color-warning-bg); }
.pz-vorschlag-text { display: flex; flex-direction: column; min-width: 0; font-size: 12px; color: var(--text-secondary); }
.pz-vorschlag-text b { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.pz-vorschlag-text > span { display: inline-flex; align-items: center; gap: 6px; }
.pz-vorschlag-knoepfe { display: flex; gap: 6px; flex-shrink: 0; }
.pz-vorschlag-knoepfe button { height: 32px; padding: 0 13px; font-size: 12.5px; }

/* ── Seitenspalte: Kennzahlen und Chat ────────────────────── */
.pz-seite { display: flex; flex-direction: column; gap: 12px; min-height: 0; min-width: 0; }
.pz-panel { display: flex; flex-direction: column; min-height: 0; background: var(--bg-app); border-radius: var(--r-card);
  box-shadow: var(--sh-card); overflow: hidden; }
.pz-panel-kennzahlen { flex: 0 1 auto; max-height: 56%; }
.pz-panel-chat { flex: 1 1 auto; }
.pz-panel.zu { flex: 0 0 auto; }
.pz-panel.zu .pz-panel-inhalt { display: none; }
.pz-panel-kopf { display: flex; align-items: center; gap: 8px; padding: 9px 8px 9px 14px; border-bottom: 1px solid var(--row-line); flex-shrink: 0; }
.pz-panel.zu .pz-panel-kopf { border-bottom: none; }
.pz-panel-titel { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-tertiary); }
.pz-panel-titel svg { width: 14px; height: 14px; stroke-width: 1.6; }
.pz-panel-zusatz { flex: 1; text-align: right; font-size: 11.5px; color: var(--text-quaternary); font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-panel-zu { width: 28px; height: 28px; border: none; background: transparent; border-radius: var(--r-icon); color: var(--text-tertiary);
  display: inline-flex; align-items: center; justify-content: center; }
.pz-panel-zu:hover { background: var(--bg-hover); color: var(--text-primary); }
.pz-panel-zu svg { width: 15px; height: 15px; transition: transform 160ms var(--ease); }
.pz-panel.zu .pz-panel-zu svg { transform: rotate(-90deg); }
.pz-panel-inhalt { flex: 1; min-height: 0; overflow-y: auto; }
#pz-kennzahlen { padding: 8px 14px 12px; }

.pz-tabelle { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pz-tabelle th { font-size: 11px; font-weight: 600; color: var(--text-tertiary); text-align: right; padding: 4px 6px; }
.pz-tabelle td { padding: 5px 6px; text-align: right; border-bottom: 1px solid var(--row-line); }
.pz-tabelle td:first-child, .pz-tabelle th:first-child { text-align: left; padding-left: 0; color: var(--text-secondary); }
.pz-tabelle tr:last-child td { border-bottom: none; }
.pz-tabelle td.besser { color: var(--color-success); font-weight: 600; }
.pz-tabelle td.schlechter { color: var(--color-danger); font-weight: 600; }
.pz-tabelle td.anders { color: var(--accent); font-weight: 600; }
.pz-befund-ok { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--color-success); }
.pz-befund-ok svg { width: 14px; height: 14px; }
.pz-befunde-titel { margin-top: 10px; font-size: 12px; font-weight: 600; }
.pz-befunde-titel.hart { color: var(--color-danger); }
.pz-befunde { list-style: none; margin-top: 4px; display: flex; flex-direction: column; gap: 3px; }
.pz-befunde li { font-size: 12px; padding: 5px 9px; border-radius: var(--r-icon); line-height: 1.45; }
.pz-befunde li.hart { background: var(--color-danger-bg); color: var(--color-danger); }
.pz-befunde li.weich { background: var(--bg-surface); color: var(--text-secondary); }
.pz-befunde-weich { margin-top: 10px; }
.pz-befunde-weich summary { font-size: 12px; color: var(--text-secondary); cursor: pointer; }

/* Chat */
.pz-chat { display: flex; flex-direction: column; overflow: hidden; }
.pz-chat-verlauf { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.pz-chat-leer { margin: auto 0; text-align: center; color: var(--text-tertiary); font-size: 12.5px; padding: 16px 8px; }
.pz-chat-hinweis { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-block);
  background: var(--color-warning-bg); color: var(--color-warning); font-size: 12px; line-height: 1.5; }
.pz-chat-hinweis svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.pz-chat-hinweis b { font-weight: 600; }
.pz-chat-fehler { padding: 8px 12px; border-radius: var(--r-ctl); background: var(--color-danger-bg); color: var(--color-danger); font-size: 12px; }
.pz-msg { max-width: 92%; padding: 8px 12px; border-radius: 14px; background: var(--bg-surface); font-size: 13px; line-height: 1.55;
  box-shadow: var(--sh-sm); overflow-wrap: anywhere; }
.pz-msg.planer { align-self: flex-end; background: var(--accent); color: var(--text-on-brand); border-bottom-right-radius: 5px; box-shadow: none; }
.pz-msg.claude { align-self: flex-start; border-bottom-left-radius: 5px; }
.pz-msg-text { white-space: pre-wrap; }
.pz-msg-meta { margin-top: 4px; font-size: 10.5px; color: var(--text-quaternary); font-variant-numeric: tabular-nums; }
.pz-msg.planer .pz-msg-meta { color: rgba(255,255,255,.7); text-align: right; }
.pz-marken-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 2px 8px; border: none;
  border-radius: var(--r-pill); background: rgba(255,255,255,.18); color: inherit; font: inherit; font-size: 11px; }
.pz-marken-chip:hover:not(:disabled) { background: rgba(255,255,255,.3); }
.pz-marken-chip.alt { opacity: .7; cursor: default; }
.pz-marken-chip svg { width: 12px; height: 12px; }
.pz-md p { margin: 3px 0; }
.pz-md ul, .pz-md ol { margin: 4px 0 4px 18px; }
.pz-md h4 { margin: 8px 0 2px; font-size: 13px; font-weight: 600; }
.pz-md code { background: var(--bg-hover); border-radius: 4px; padding: 0 4px; font-size: 12px; }
.pz-md pre { background: var(--bg-hover); border-radius: var(--r-icon); padding: 6px 8px; overflow-x: auto; font-size: 11.5px; }
.pz-schritte-liste { margin-top: 6px; font-size: 12px; color: var(--text-secondary); }
.pz-schritte-liste > summary { cursor: pointer; color: var(--text-tertiary); font-size: 11.5px; }
.pz-schritt-zeile { padding: 3px 0 3px 9px; margin: 4px 0; border-left: 2px solid var(--border-strong); }
.pz-schritt-zeile.fehler { border-left-color: var(--color-danger); color: var(--color-danger); }
.pz-schritt-zeile.gedanke { color: var(--text-tertiary); font-style: italic; }
.pz-tag { display: inline-block; min-width: 82px; margin-right: 6px; font-weight: 600; font-style: normal; color: var(--text-primary); }
.pz-schritt-zeile img { display: block; max-width: min(220px, 100%); margin-top: 5px; border-radius: var(--r-icon); box-shadow: var(--sh-sm); }
.pz-schritt-zeile details summary { cursor: pointer; font-size: 11px; color: var(--text-tertiary); }
.pz-schritt-zeile pre { white-space: pre-wrap; font-size: 11px; max-height: 240px; overflow: auto; background: var(--bg-app);
  padding: 6px 8px; border-radius: var(--r-icon); margin-top: 4px; }
.pz-warten { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-style: italic; }
.pz-warten .btn-ghost { font-style: normal; margin-left: 4px; }
.pz-chat-eingabe { padding: 10px 12px 12px; border-top: 1px solid var(--row-line); flex-shrink: 0; }
.pz-markierungen { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 4px 4px 4px 10px; border-radius: var(--r-ctl);
  background: rgba(208,0,192,.08); color: #9a0090; font-size: 11.5px; }
.pz-markierungen svg { width: 13px; height: 13px; flex-shrink: 0; }
.pz-markierungen span { flex: 1; min-width: 0; }
.pz-markierungen .btn-ghost { color: inherit; }
.pz-chat-zeile { display: flex; align-items: flex-end; gap: 8px; }
#content .pz-chat-zeile textarea { flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 160px; padding: 9px 11px; font-size: 13px; line-height: 1.45; }
.pz-senden { width: 40px; height: 40px; padding: 0; flex-shrink: 0; }
.pz-senden svg { width: 17px; height: 17px; }

/* ── Schritte 1 und 2: Eingang und Basis ─────────────────── */
.pz-basis { grid-template-columns: minmax(0, 1fr) minmax(320px, 390px); }
.pz-basis-seite { overflow-y: auto; padding-right: 2px; }
.pz-basis-seite > #pz-basis-panels { display: flex; flex-direction: column; gap: 12px; }
.pz-basis-seite .pz-panel { flex: none; }
.pz-basis-seite .pz-panel-chat { height: 440px; }
.pz-basis-panel .pz-panel-inhalt { overflow: visible; }
.pz-pad-panel { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.pz-dropzone { padding: 16px; }
.pz-zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pz-feld-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); flex-wrap: wrap; }
#content .pz-eingabe-kurz { width: 78px; height: 30px; padding: 0 8px; font-size: 12.5px; }
#content .pz-eingabe-mittel { width: 160px; height: 30px; padding: 0 8px; font-size: 12.5px; }
#content .pz-pad-panel select.pz-select, #content .pz-dd select.pz-select, #content .pz-dd-editor select.pz-select { height: 28px; border-radius: var(--r-icon); }
.pz-fakten-eng { grid-template-columns: 1fr; margin-bottom: 0; }
.pz-fakten-eng > div { padding: 6px 10px; }
.pz-fortschritt { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-secondary); }
.pz-fortschritt .spinner { width: 16px; height: 16px; border-width: 2px; }
.pz-unterkopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-tertiary); }
.pz-chip.ok { color: var(--color-success); background: var(--color-success-bg); box-shadow: none; text-transform: none; letter-spacing: 0; font-weight: 500; }
.pz-chip.offen { color: var(--color-warning); background: var(--color-warning-bg); box-shadow: none; text-transform: none; letter-spacing: 0; font-weight: 500; }
.pz-unterkopf .pz-chip { height: 22px; }
.pz-schrittliste { margin: 0 0 0 18px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.pz-schrittliste li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pz-schrittliste li::marker { color: var(--text-tertiary); }
.pz-knopf-klein { height: 32px; padding: 0 13px; font-size: 12.5px; align-self: flex-start; }
.pz-basis-panel .pf-mini.an, .pz-pad-panel .pf-mini.an { background: var(--accent-dim); color: var(--accent); }
.pz-basis-panel .pf-mini:disabled { opacity: .5; cursor: not-allowed; }
.pz-ebene-wahl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.pz-ebenen { list-style: none; display: flex; flex-direction: column; }
.pz-ebenen li { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: var(--r-icon); font-size: 12.5px; }
.pz-ebenen li.an { background: var(--accent-dim); }
.pz-ebenen li b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.pz-auge, .pz-ebene-name { border: none; background: transparent; font: inherit; color: inherit; display: inline-flex; align-items: center; gap: 7px; }
.pz-auge { width: 26px; height: 26px; justify-content: center; border-radius: var(--r-icon); color: var(--text-tertiary); }
.pz-auge:hover { background: var(--bg-hover); color: var(--text-primary); }
.pz-auge svg { width: 14px; height: 14px; }
.pz-ebene-name { padding: 3px 0; text-align: left; }
.pz-farbe { width: 12px; height: 12px; border-radius: 3px; display: inline-block; box-shadow: inset 0 0 0 2px currentColor; flex-shrink: 0; }
.pz-farbe-flaeche { color: #3a3a3a; } .pz-farbe-kontur { color: #000; } .pz-farbe-hindernis { color: #d9822b; background: #f6d2ad; }
.pz-farbe-brandwand { color: #8b0000; } .pz-farbe-gully { color: #1f5fbf; border-radius: 50%; } .pz-farbe-achse { color: #888; }
.pz-farbe-ep { color: #000; background: #000; } .pz-farbe-mea { color: #2f7d46; background: #2f7d46; } .pz-farbe-eingang { color: #8f99a3; }
.pz-tabelle-rahmen { max-height: 280px; overflow: auto; border-radius: var(--r-block); background: var(--bg-surface); }
.pz-tabelle-rahmen .pz-tabelle td, .pz-tabelle-rahmen .pz-tabelle th { padding-left: 8px; padding-right: 8px; }
.pz-tabelle-rahmen .pz-tabelle th { position: sticky; top: 0; background: var(--bg-surface); }
.pz-layer { table-layout: fixed; }
.pz-layer th:nth-child(2), .pz-layer td:nth-child(2) { width: 58px; }
.pz-layer th:nth-child(3), .pz-layer td:nth-child(3) { width: 118px; }
.pz-layer td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#content .pz-layer select.pz-select { width: 100%; padding-right: 18px; }
.pz-layer tr.aus td { color: var(--text-quaternary); }
.pz-kandidaten { position: absolute; left: 12px; right: 12px; bottom: 12px; width: fit-content; max-width: calc(100% - 24px); margin: 0 auto;
  z-index: 3; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 8px 8px 14px; font-size: 12.5px;
  background: var(--bg-app); border-radius: var(--r-inner); box-shadow: var(--sh-overlay); }
.pz-kandidaten button { height: 30px; padding: 0 12px; font-size: 12.5px; }
.pz-feld-reihe { display: flex; gap: 6px; align-items: center; }
.pz-feld-reihe input { min-width: 0; flex: 1; }
.pz-dialog-breit { width: min(560px, 100%); }

/* Reiter im Kennzahlen-Panel (Schritt 3) */
.pz-reiter { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pz-reiter button { border: none; background: transparent; font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--text-tertiary); padding: 4px 6px; border-radius: var(--r-icon); white-space: nowrap; }
.pz-reiter button.an { color: var(--accent); background: var(--accent-dim); }
.pz-reiter-inhalt { padding: 8px 14px 12px; }

/* Durchdringungen */
.pz-dd td, .pz-dd th { white-space: nowrap; }
.pz-dd td:first-child { min-width: 110px; }
.pz-dd td:first-child { white-space: normal; }
.pz-dd tr.offen td { background: var(--accent-dim); }
.pz-dd-detail td { background: var(--bg-app); text-align: left; white-space: normal; }
.pz-link { border: none; background: none; font: inherit; color: var(--accent); padding: 0; text-align: left; cursor: pointer; }
.pz-link:hover { text-decoration: underline; }
.pz-dd-liste { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.pz-dd-liste li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pz-dd-editor { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 6px 0; }
.pz-dd-auswahl { padding: 8px 10px; border-radius: var(--r-block); background: var(--accent-dim); }
.pz-dd-hinweis { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--color-info); background: var(--color-info-bg);
  padding: 8px 10px; border-radius: var(--r-block); }
.pz-dd-hinweis svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }
#pz-tab-dd { display: flex; flex-direction: column; gap: 8px; }

/* ── Schritt 3: Auswahl, Befunde, Optionen, Stände ────────── */
.pz-auswahl3 { position: absolute; left: 12px; right: 12px; bottom: 12px; width: fit-content; max-width: calc(100% - 24px); margin: 0 auto;
  z-index: 3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 8px 8px 14px; font-size: 12.5px;
  background: var(--bg-app); border-radius: var(--r-inner); box-shadow: var(--sh-overlay); }
#content .pz-auswahl3 select.pz-select { height: 28px; border-radius: var(--r-icon); }
.pz-befund-klick { cursor: pointer; }
.pz-befund-klick:hover { filter: brightness(.97); text-decoration: underline; text-decoration-color: currentColor; }
.pz-dd-hinweis.pz-warn { color: var(--color-warning); background: var(--color-warning-bg); margin-bottom: 8px; }
.pz-dd-hinweis.pz-warn .pf-mini { color: var(--text-primary); }
.pz-rot { color: var(--color-danger); font-weight: 600; }
.pz-marken-chip.an { background: rgba(255,255,255,.4); }
.pz-optionen td:last-child { text-align: right; }
#content .pz-optionen select.pz-select { height: 28px; border-radius: var(--r-icon); width: 168px; max-width: 100%; }
.pz-optionen td:first-child { white-space: normal; }
.pz-staende { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pz-staende li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px;
  border-radius: var(--r-block); background: var(--bg-surface); font-size: 12.5px; }
.pz-staende li.an { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pz-staende .pz-chip { height: 20px; font-size: 11px; }
.pz-ebenen-menue { position: relative; }
.pz-ebenen-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 8; min-width: 200px; padding: 6px;
  background: var(--bg-app); border-radius: var(--r-inner); box-shadow: var(--sh-overlay); }
.pz-ebenen-zeile { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 12.5px; border-radius: var(--r-icon);
  cursor: pointer; white-space: nowrap; }
.pz-ebenen-zeile:hover { background: var(--bg-hover); }
.pz-ebenen-zeile span { display: flex; flex-direction: column; gap: 1px; }
.pz-ebenen-zeile small { font-size: 11px; color: var(--text-quaternary); }
.pz-ebenen-zeile.leer { color: var(--text-tertiary); cursor: default; }
.pz-ebenen-zeile.leer:hover { background: transparent; }
.pz-staende-knoepfe { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.pz-staende-knoepfe .pf-mini svg { width: 13px; height: 13px; }
.pz-dd-gesetzt { font-weight: 600; color: var(--accent); }

/* ── Vollbild: Plan füllt den Bildschirm, Chat und Kennzahlen als Overlays ── */
.pz-flaeche.pz-vollbild { position: fixed; inset: 0; z-index: 1500; display: block; height: auto; min-height: 0; background: var(--bg-page); }
.pz-vollbild .pz-plan { position: absolute; inset: 0; height: auto; min-height: 0; border-radius: 0; box-shadow: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
.pz-vollbild .pz-seite { display: contents; }
.pz-vollbild .pz-leiste { position: relative; z-index: 6; background: var(--bg-app); }
.pz-vollbild .pz-panel { position: absolute; z-index: 5; box-shadow: var(--sh-overlay); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
.pz-vollbild .pz-panel-chat { height: min(580px, calc(100vh - 140px)); height: min(580px, calc(100dvh - 140px)); }
.pz-vollbild .pz-panel-kennzahlen { max-height: min(420px, calc(100dvh - 96px)); }
.pz-vollbild .pz-panel.zu { height: auto; min-height: 0; }
.pz-vollbild .pz-panel-kopf { cursor: move; touch-action: none; user-select: none; -webkit-user-select: none; }
.pz-panel.zieht { opacity: .94; }
/* Größe ändern (R113): Griffe an allen Rändern und Ecken, nur im Vollbild und nicht eingeklappt */
.pz-griff { position: absolute; z-index: 2; display: none; touch-action: none; }
.pz-vollbild .pz-panel.groesse .pz-griff { display: block; }
.pz-griff-n, .pz-griff-s { left: 16px; right: 16px; height: 6px; cursor: ns-resize; }
.pz-griff-e, .pz-griff-w { top: 16px; bottom: 16px; width: 6px; cursor: ew-resize; }
.pz-griff-n { top: 0; } .pz-griff-s { bottom: 0; } .pz-griff-e { right: 0; } .pz-griff-w { left: 0; }
.pz-griff-ne, .pz-griff-nw, .pz-griff-se, .pz-griff-sw { width: 16px; height: 16px; }
.pz-griff-ne { top: 0; right: 0; cursor: nesw-resize; } .pz-griff-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.pz-griff-nw { top: 0; left: 0; cursor: nwse-resize; } .pz-griff-se { bottom: 0; right: 0; cursor: nwse-resize; }
.pz-griff-se::after { content: ''; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px; opacity: .45;
  border-right: 1.5px solid var(--text-tertiary); border-bottom: 1.5px solid var(--text-tertiary); border-bottom-right-radius: 3px; }

/* ── Dialog (Plankopf) ───────────────────────────────────── */
.pz-dialog { position: fixed; inset: 0; z-index: 2100; background: rgba(11,54,89,.28); display: flex; align-items: center;
  justify-content: center; padding: 16px; }
.pz-dialog-box { max-height: calc(100vh - 32px); overflow-y: auto; width: min(480px, 100%); background: var(--bg-app); border-radius: var(--r-card); box-shadow: var(--sh-overlay); padding: 22px; }
.pz-dialog-titel { font-size: 16px; font-weight: 500; margin-bottom: 14px; }
.pz-kopf-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pz-dialog-knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ── Schmal (Tablet hochkant, Handy) ─────────────────────── */
@media (max-width: 900px) {
  .pz-basis { grid-template-columns: minmax(0, 1fr); }
  .pz-basis-seite { overflow: visible; }
  .pz-flaeche { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .pz-plan { height: 62vh; height: 62dvh; min-height: 340px; }
  .pz-panel-kennzahlen { max-height: none; }
  .pz-panel-chat { height: 72vh; height: 72dvh; min-height: 380px; }
  .pz-seite { order: 2; }
}
@media (max-width: 600px) {
  .pz-kopf { padding: 10px 12px; gap: 10px; }
  .pz-kopf-knoepfe { margin-left: 0; width: 100%; }
  .pz-lang { display: none; }
  .pz-kurz { display: inline; }
  .pz-schritte { max-width: none; }
  .pz-leiste { padding: 6px; gap: 4px; }
  .pz-seg button { min-width: 30px; padding: 0 5px; }
  .pz-erzeugen span { display: none; }
  .pz-erzeugen { width: 34px; padding: 0; }
  .pz-vorschlag { left: 8px; right: 8px; width: auto; flex-wrap: wrap; gap: 8px; }
  .pz-vorschlag-knoepfe { margin-left: auto; }
  .pz-kopf-form { grid-template-columns: 1fr; }
  .pz-neu .btn-primary { width: 100%; }
  .pz-staende li { flex-direction: column; align-items: stretch; }
  .pz-staende-knoepfe { justify-content: flex-start; }
  .pz-freigabe-titel { flex-basis: calc(100% - 48px); }
  .pz-freigabe-zu { order: 2; }
  .pz-freigabe-kopf .btn-primary { order: 3; width: 100%; justify-content: center; }
}
