/* PB-8306: Kennzahlen hinter dem "i" oben rechts auf der Übersicht des Agenten-Projekts (templates/teile/agenten_kennzahlen.php).
   Ohne Skript: die Tafel erscheint bei Darüberfahren und bei Fokus im Knopf; sie bleibt offen, solange der Zeiger auf ihr liegt. */
.agd-kz { position: relative; display: flex; justify-content: flex-end; margin-bottom: var(--raum-2); }
.agd-kz-i { width: 2.75rem; height: 2.75rem; border: 1px solid var(--rand); border-radius: 50%; background: var(--flaeche); color: var(--text); font: inherit; font-weight: 700; font-style: italic; cursor: help; }
.agd-kz-i:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.agd-kz-tafel { display: none; position: absolute; top: 100%; right: 0; z-index: 20; min-width: 16rem; max-width: min(22rem, 90vw); margin-top: var(--raum-1); padding: var(--raum-3); border: 1px solid var(--rand); border-radius: var(--radius); background: var(--flaeche); color: var(--text); box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.15); }
.agd-kz:is(:hover, :focus-within) .agd-kz-tafel { display: block; }
.agd-kz-tafel dl { display: grid; gap: var(--raum-2); margin: 0; }
.agd-kz-tafel dl > div { display: flex; justify-content: space-between; gap: var(--raum-3); }
.agd-kz-tafel dt { color: var(--text-leise); }
.agd-kz-tafel dd { margin: 0; font-weight: 700; text-align: right; }
.agd-kz-leer dd { font-weight: 400; color: var(--text-leise); }
@media print { .agd-kz-tafel { display: block; position: static; box-shadow: none; } }
/* PB-8305: Übersicht als Baum nach rechts (templates/agenten_uebersicht.php). Links der Architekt, rechts je Team eine Zeile; die Linien
   zeichnen ::before/::after jeder Zeile (waagrecht zur Zeile, senkrecht als Stamm vom ersten bis zum letzten Ast), damit sie bei 1 bis 10
   Teams sauber bleiben. Schmal (unter 48rem) steht der Architekt über den Teams, die Linie zur Wurzel entfällt. */
.agd-baum { display: grid; grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr); align-items: center; }
.agd-wurzel { margin: 0; }
.agd-wurzel h2 { margin-top: 0; }
.agd-aeste { position: relative; list-style: none; margin: 0; padding: 0 0 0 var(--raum-5); }
.agd-aeste::before { content: ""; position: absolute; left: 0; top: 50%; width: var(--raum-5); border-top: 2px solid var(--rand); }
.agd-ast { position: relative; padding: var(--raum-1) 0 var(--raum-1) var(--raum-4); }
.agd-ast::before { content: ""; position: absolute; left: 0; top: 50%; width: var(--raum-4); border-top: 2px solid var(--rand); }
.agd-ast::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--rand); }
.agd-ast:first-child::after { top: 50%; }
.agd-ast:last-child::after { bottom: 50%; }
.agd-ast:only-child::after { display: none; }
.agd-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2) var(--raum-3); padding: var(--raum-2) var(--raum-3); border: 1px solid var(--rand); border-radius: var(--radius); background: var(--flaeche); }
.agd-ast-neu .agd-zeile { border-style: dashed; background: transparent; color: var(--akzent); text-decoration: none; font-weight: 600; }
.agd-ast-neu .agd-zeile:hover { background: var(--akzent-leise); }
.agd-ast-neu .agd-zeile:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.agd-name { display: flex; flex: 1 1 12rem; align-items: center; gap: var(--raum-2); min-width: 0; margin: 0; font-weight: 600; }
.agd-name input { flex: 1 1 8rem; min-width: 0; font-weight: 600; }
.agd-name button { flex: none; }
.agd-koepfe { display: flex; align-items: center; }
.agd-koepfe .kt-initialen { width: 1.75rem; height: 1.75rem; font-size: var(--schrift-xs); }
.agd-koepfe .kt-initialen + .kt-initialen { margin-left: -0.4rem; }
.agd-mehr { margin-left: var(--raum-1); font-size: var(--schrift-xs); color: var(--text-leise); }
.agd-oeffnen { margin-left: auto; }
.agd-leer { margin: 0 0 var(--raum-2) var(--raum-5); }
/* PB-8401: Plan je Team in der Zeile (E-63): links aktive Etappe mit Balken, rechts drei Spalten; schmal untereinander */
.agd-plan { display: grid; flex: 1 1 100%; grid-template-columns: minmax(8rem, 1fr) repeat(3, minmax(0, 1.4fr)); gap: var(--raum-2) var(--raum-3); padding-top: var(--raum-2); border-top: 1px solid var(--rand); font-size: var(--schrift-s); }
.agd-plan p, .agd-plan h3, .agd-plan ul { margin: 0; }
.agd-plan-ohne { grid-column: 1 / -1; color: var(--text-leise); }
.agd-plan-etappe { font-weight: 700; }
.agd-plan-balken { width: 100%; height: 0.4rem; accent-color: var(--akzent); }
.agd-plan-gesamt, .agd-plan-leer, .agd-plan-mehr { color: var(--text-leise); font-size: var(--schrift-xs); }
.agd-plan-spalte h3 { font-size: var(--schrift-xs); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-leise); }
.agd-plan-spalte ul { display: flex; flex-direction: column; gap: 0.2rem; list-style: none; padding: 0; }
.agd-plan-spalte li { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.agd-plan-spalte .kt-initialen { flex: none; width: 1.25rem; height: 1.25rem; font-size: 0.6rem; }
.agd-plan-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agd-plan-erledigt .agd-plan-titel { text-decoration: line-through; color: var(--text-leise); }
.agd-plan-wartet { flex: none; padding: 0 0.3rem; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }
/* Schaltungs-Symbole (E50): nebeneinander = in Reihe, untereinander = parallel, Dreieck = Loop. Das Wort steht für Leser daneben. */
.agd-sch-bild { display: inline-grid; gap: 2px; width: 1.25rem; height: 1.25rem; place-items: center; }
.agd-sch-bild > span { width: 0.35rem; height: 0.35rem; border-radius: 50%; background: currentColor; }
.agd-sch-reihe .agd-sch-bild { grid-template-columns: repeat(3, 1fr); }
.agd-sch-parallel .agd-sch-bild { grid-template-rows: repeat(3, 1fr); }
.agd-sch-loop .agd-sch-bild { grid-template-columns: repeat(2, 1fr); }
.agd-sch-loop .agd-sch-bild > span:first-child { grid-column: 1 / 3; }
@media (max-width: 48rem) {
  .agd-baum { grid-template-columns: minmax(0, 1fr); gap: var(--raum-3); }
  .agd-aeste { padding-left: var(--raum-3); }
  .agd-aeste::before { display: none; }
  .agd-leer { margin-left: 0; }
  .agd-plan { grid-template-columns: minmax(0, 1fr); }
}
/* PB-8308: Team-Ansicht (templates/agenten_team.php). Der Architekt steht oben über allem; die Schaltung als Bild: Stufen mit Pfeilen
   (parallel: Agenten untereinander in "Gleichzeitig"; Reihe: Agenten nebeneinander; Loop: Kreis der Runde mit Takt). Schmal untereinander. */
.agt-architekt { text-align: center; }
.agt-bild { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2) var(--raum-4); list-style: none; margin: var(--raum-3) 0; padding: 0; }
.agt-bild > .agt-stufe { position: relative; padding: var(--raum-2) var(--raum-3); border: 1px solid var(--rand); border-radius: var(--radius); background: var(--flaeche); }
.agt-bild > .agt-stufe + .agt-stufe::before { content: "→"; position: absolute; left: calc(-1 * var(--raum-4)); width: var(--raum-4); text-align: center; color: var(--text-leise); }
.agt-stufe ul { display: flex; flex-direction: column; gap: var(--raum-1); list-style: none; margin: var(--raum-1) 0 0; padding: 0; }
.agt-stufe-name { display: block; font-weight: 600; }
.agt-agent .kt-initialen { width: 1.75rem; height: 1.75rem; font-size: var(--schrift-xs); }
.agt-bild > .agt-kreis { border-radius: 50%; padding: var(--raum-4) var(--raum-5); text-align: center; border-style: dashed; }
.agt-kreis ul { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.agt-takt { display: block; margin-top: var(--raum-1); font-size: var(--schrift-xs); color: var(--text-leise); }
.agt-ende { font-weight: 600; }
.agt-umschalten fieldset, .agt-neu fieldset { border: 0; margin: 0; padding: 0; }
.agt-umschalten label { display: inline-flex; align-items: center; gap: var(--raum-1); margin-right: var(--raum-3); }
.agt-kaestchen { display: inline-flex; gap: 2px; margin-right: var(--raum-2); vertical-align: middle; }
.agt-kaestchen > span { width: 0.75rem; height: 0.75rem; border: 1px solid var(--rand); border-radius: 2px; }
.agt-kaestchen > .agt-belegt { background: var(--akzent); border-color: var(--akzent); }
.agt-liste { list-style: none; margin: 0 0 var(--raum-3); padding: 0; }
.agt-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2); padding: var(--raum-1) 0; }
.agt-aufgabe { color: var(--text-leise); }
@media (max-width: 48rem) {
  .agt-bild { flex-direction: column; align-items: stretch; }
  .agt-bild > .agt-stufe + .agt-stufe::before { content: "↓"; left: 0; right: 0; top: calc(-1 * var(--raum-3)); width: auto; }
}
/* PB-8309: Fußleiste fest am unteren Rand, schmal, eine Zeile; Kästchen für die Plätze, Plakette für den Server */
.agd-fuss { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.35rem 0.75rem; margin-top: 1rem; background: var(--flaeche); border-top: 1px solid var(--rand); font-size: var(--schrift-xs); }
.agd-plaetze { display: inline-flex; align-items: center; gap: 0.35rem; }
.agd-kaestchen { display: inline-flex; gap: 2px; }
.agd-k { width: 0.6rem; height: 0.6rem; border: 1px solid var(--rand); border-radius: 2px; }
.agd-k-voll { background: var(--akzent); border-color: var(--akzent); }
.agd-upgrade { padding: 0.15rem 0.5rem; border-radius: var(--radius); background: var(--akzent); color: var(--akzent-text); text-decoration: none; }
.agd-github { margin-left: auto; }
/* PB-8304: Architekt-Chat links, "Alle pausieren" im Chat-Kopf */
.agd-chat-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
.agd-wurzel .db-agent { margin-top: 0.75rem; box-shadow: none; }
.agd-wurzel .tabelle-rahmen, main .tabelle-rahmen { overflow-x: auto; } /* PB-8312a: Kosten-Tabelle rollt auf dem Handy */
/* PB-8315b: Hilfeseite des Agenten-Projekts */
.agh-begriffe li { margin-bottom: 0.4rem; }
.agh-hilfe nav ul { columns: 2 14rem; }
.agd-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.agv-key { white-space: pre-wrap; overflow-wrap: anywhere; } /* PB-8423 (ZM B15): öffentlicher Schlüssel bricht um, in jeder Breite */
.agd-ergebnis + .agd-ergebnis { margin-top: var(--raum-3); padding-top: var(--raum-3); border-top: 1px solid var(--rand); }
.agt-budget-balken { width: 6rem; height: 0.5rem; vertical-align: middle; accent-color: var(--akzent); } /* PB-8404b */
/* PB-8403/8406 (E56): Etappen-Liste und Aufgaben-Tafel in der Team-Ansicht */
.agt-etappen-liste { display: flex; flex-direction: column; gap: var(--raum-2); list-style: none; margin: 0 0 var(--raum-3); padding: 0; }
.agt-etappe { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--raum-1) var(--raum-3); padding: var(--raum-2) var(--raum-3); border: 1px solid var(--rand); border-radius: var(--radius); background: var(--flaeche); }
.agt-etappe-vorschlag { border-style: dashed; }
.agt-etappe-wahl { font-weight: 600; }
.agt-etappe-wahl[aria-current="true"] { text-decoration: underline; text-decoration-thickness: 2px; }
.agt-etappe-wahl:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.agt-etappe-zustand { font-size: var(--schrift-xs); color: var(--text-leise); }
.agt-vorschlag { flex: 1 1 100%; }
.agt-vorschlag-form { display: inline-block; margin-right: var(--raum-2); }
.agt-spalten { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--raum-3); }
.agt-spalte h3 { margin-top: 0; }
.agt-karten { display: flex; flex-direction: column; gap: var(--raum-2); list-style: none; margin: 0; padding: 0; }
.agt-karte { display: flex; flex-direction: column; gap: var(--raum-1); padding: var(--raum-2) var(--raum-3); border: 1px solid var(--rand); border-radius: var(--radius); background: var(--flaeche); overflow-wrap: anywhere; }
.agt-karte-etappe { font-size: var(--schrift-xs); color: var(--text-leise); }
.agt-schloss::before { content: "🔒 "; }
@media (max-width: 48rem) { .agt-spalten { grid-template-columns: minmax(0, 1fr); } }
