:root {
  /* Markenorange aus dem itolia-Schriftzug (#e6500f), für die Anwendung
     zwei Nuancen tiefer gezogen: auf dem puren Ton erreicht weiße Schrift
     nur 3,8:1 und wäre damit schlecht lesbar. --akzent liegt bei 4,7:1,
     --akzent-text für Links auf hellem Grund bei 6,0:1. */
  --akzent: #cf450c; --akzent-dunkel: #a83809; --akzent-text: #b03d0b;
  --grund: #f4f5f7;
  --karte: #ffffff; --text: #1f2937; --grau: #6b7280; --rand: #e5e7eb;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--grund); color: var(--text); }
header { background: var(--karte); border-bottom: 1px solid var(--rand); }
.kopf { max-width: 1000px; margin: 0 auto; padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center; }
.marke { text-decoration: none; color: var(--text); font-size: 17px;
  display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo { height: 30px; width: auto; flex: none; display: block; }
.produkt { border-left: 1px solid var(--rand); padding-left: 14px;
  white-space: nowrap; }
@media (max-width: 620px) {
  .produkt { border: 0; padding-left: 0; white-space: normal;
    font-size: 15px; }
  .kopf { gap: 10px; }
}
nav { display: flex; gap: 16px; align-items: center; }
nav a { color: var(--akzent-text); text-decoration: none; }
.wer { color: var(--grau); }
main { max-width: 1000px; margin: 24px auto; padding: 0 20px 60px; }
footer { text-align: center; color: var(--grau); font-size: 12px;
  padding: 20px; }
.rechtslinks { display: block; margin-top: 6px; }
.rechtslinks a { color: var(--grau); text-decoration: none;
  margin: 0 8px; }
.rechtslinks a:hover { text-decoration: underline; }
/* Rechtstexte: schmalere Zeilen, ruhigere Zwischenueberschriften */
.karte.rechtstext { max-width: 720px; margin: 30px auto; line-height: 1.6; }
.rechtstext h2 { font-size: 15px; margin: 22px 0 6px; }
.rechtstext p { margin: 0 0 10px; }
h1 { font-size: 24px; } h2 { font-size: 17px; margin-top: 0; }
.karte { background: var(--karte); border: 1px solid var(--rand);
  border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.karte.schmal { max-width: 420px; margin: 60px auto; }
.raster { display: grid; grid-template-columns: repeat(auto-fill,
  minmax(280px, 1fr)); gap: 14px; margin-bottom: 20px; }
.karte.projekt { display: block; text-decoration: none; color: var(--text); }
.karte.projekt:hover { border-color: var(--akzent); }
.grau { color: var(--grau); } .status { font-size: 14px; }
label { display: block; margin-bottom: 12px; font-size: 14px;
  color: var(--grau); }
input, textarea { width: 100%; padding: 9px 11px; margin-top: 4px;
  border: 1px solid var(--rand); border-radius: 8px; font: inherit; }
input:focus, textarea:focus { outline: 2px solid var(--akzent);
  border-color: transparent; }
.knopf { background: var(--akzent); color: #fff; border: 0;
  border-radius: 8px; padding: 10px 18px; font: inherit; cursor: pointer;
  text-decoration: none; display: inline-block; }
.knopf:hover { background: var(--akzent-dunkel); }
.knopf:disabled { background: var(--grau); cursor: not-allowed; }
.knopf.klein { padding: 5px 12px; font-size: 13px; }
/* Löschen als Umriss statt Fläche: hebt sich klar vom orangefarbenen
   Hauptknopf ab und lädt nicht zum versehentlichen Klicken ein. */
.knopf.rot { background: #fff; color: #b91c1c;
  border: 1px solid #fca5a5; }
.knopf.rot:hover { background: #b91c1c; color: #fff;
  border-color: #b91c1c; }
.knopf.diktat { background: #475569; }
.knopf.diktat:hover { background: #334155; }
.knopf.diktat.aktiv { background: #b91c1c; }
.knopf.diktat.aktiv:hover { background: #991b1b; }
.fehlerhinweis { color: #b91c1c; }
.anhangliste { list-style: none; margin: 0 0 8px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px; }
.anhangliste li { display: flex; align-items: center; gap: 8px;
  background: var(--grund); border: 1px solid var(--rand);
  border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px;
  max-width: 100%; }
.anhangname { overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 260px; }
.anhanggroesse { color: var(--grau); font-size: 12px; white-space: nowrap; }
.anhangweg { border: 0; background: var(--rand); color: var(--text);
  border-radius: 50%; width: 20px; height: 20px; line-height: 1;
  font-size: 15px; cursor: pointer; flex: none; }
.anhangweg:hover { background: #b91c1c; color: #fff; }
.chatzeile { display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; }
.chatzeile a { flex: 1; min-width: 160px; }
.chatinfo { font-size: 12.5px; }
form.inline { display: inline-block; margin-left: 8px; }
.fehler { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 8px; padding: 8px 12px; }
.erfolg { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: 8px; padding: 8px 12px; }
.warnbox { background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 8px; padding: 10px 14px; font-size: 13.5px;
  margin-bottom: 14px; }
.hinweis { color: var(--grau); font-size: 13px; }
.liste { list-style: none; padding: 0; } .liste li { padding: 6px 0;
  border-bottom: 1px solid var(--rand); }
.liste a { color: var(--akzent-text); text-decoration: none; }
.nebeneinander { display: flex; gap: 10px; align-items: center;
  flex-wrap: wrap; }
.nebeneinander input { margin: 0; width: auto; flex: 0 1 240px; }
.nebeneinander .knopf { white-space: nowrap; }
.brotkrumen { font-size: 13px; } .brotkrumen a { color: var(--akzent-text); }
.zeilen label { max-width: 480px; }

/* Chat */
main.breit { max-width: 1360px; }
.chatlayout { display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px; align-items: start; }
.feldleiste { position: sticky; top: 16px; max-height: calc(100vh - 32px);
  overflow-y: auto; background: var(--karte); border: 1px solid var(--rand);
  border-radius: 12px; padding: 14px 16px; font-size: 13px; }
.feldleiste h3 { margin: 0 0 4px; font-size: 14px; }
.feldleiste input { margin-bottom: 10px; padding: 6px 10px; }
.feldleiste details { margin-bottom: 8px; }
.feldleiste summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
/* Zwei Ebenen: Gruppe (Felder, Auswahllisten, Rollen, Benutzer) und
   darunter die einzelnen Archive bzw. Listen. */
.gruppe { border-top: 1px solid var(--rand); padding-top: 6px; }
.gruppe > summary { font-size: 13.5px; }
.unter { margin: 4px 0 4px 10px; }
.unter > summary { font-weight: 500; font-size: 12.5px; }
.anzahl { color: var(--grau); font-weight: 400; font-size: 11.5px;
  background: var(--grund); border-radius: 999px; padding: 1px 7px;
  margin-left: 4px; }
.listenkopf { display: inline; }
.vorschau { display: block; color: var(--grau); font-size: 11.5px;
  font-weight: 400; margin: 2px 0 0 14px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.listenbezug { display: block; color: var(--grau); font-size: 11px;
  margin: 0 0 2px 18px; }
.listenquelle { margin: 2px 0 4px 14px; font-size: 11px; }
.listenhinweis { margin: 2px 0 8px; font-size: 11.5px; line-height: 1.45;
  border-left: 2px solid var(--rand); padding-left: 8px; }

/* Fließtext der KI (kleine Markdown-Teilmenge) */
.kitext > :first-child { margin-top: 0; }
.kitext > :last-child { margin-bottom: 0; }
.kitext p { margin: 0 0 8px; line-height: 1.55; }
.kitext h3, .kitext h4, .kitext h5, .kitext h6 {
  margin: 12px 0 6px; font-size: 14.5px; }
.kitext ul, .kitext ol { margin: 0 0 8px; padding-left: 20px; }
.kitext li { margin-bottom: 3px; line-height: 1.5; }
.kitext code { background: var(--grund); border-radius: 4px;
  padding: 1px 5px; font-size: 12.5px; }
.kitext strong { font-weight: 600; }

/* Download-Box: die gebauten Workflow-Stände unter dem Org-Menü */
.downloadbox { margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--rand); }
.downloadbox h3 { margin: 0 0 8px; font-size: 14px; }
.versionsliste { list-style: none; margin: 0 0 6px; padding: 0; }
.versionsliste li { display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px; }
/* Ältere Stände als Umriss, nur der aktuelle in Vollfarbe */
.versionsliste .knopf { background: #fff; color: var(--akzent-text);
  border: 1px solid var(--rand); }
.versionsliste .knopf:hover { background: var(--grund); }
.versionsliste .knopf.aktuell { background: var(--akzent); color: #fff;
  border: 0; }
.versionsliste .knopf.aktuell:hover { background: var(--akzent-dunkel); }

/* Anhänge in Nutzernachrichten: nur der Dateiname, nicht der Inhalt */
.anhangchip { display: inline-block; margin: 4px 6px 0 0; padding: 3px 10px;
  background: var(--grund); border: 1px solid var(--rand);
  border-radius: 999px; font-size: 12.5px; }

/* Kleine Code-Beispiele in KI-Antworten (die YAML-Spec selbst wird im
   Chat nicht mehr angezeigt, nur die fertige .wfd zum Download). */
.codeblock { margin: 6px 0 10px; max-height: 260px; overflow: auto;
  background: var(--grund); border: 1px solid var(--rand);
  border-radius: 8px; padding: 10px 12px; font-size: 12.5px; }

/* Ladeanzeige, solange die KI arbeitet */
.warten { position: fixed; inset: 0; z-index: 50; display: flex;
  align-items: center; justify-content: center;
  background: rgba(31, 41, 55, 0.45); }
/* display:flex aus der Klasse schlaegt sonst das [hidden] des Browsers */
.warten[hidden] { display: none; }
.warten-kasten { background: var(--karte); border-radius: 14px;
  padding: 26px 30px; max-width: 380px; text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); }
.warten-titel { margin: 14px 0 6px; font-weight: 600; }
.ladekreis { width: 42px; height: 42px; margin: 0 auto;
  border: 4px solid var(--rand); border-top-color: var(--akzent);
  border-radius: 50%; animation: drehen 0.9s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ladekreis { animation-duration: 2.5s; }
}
/* Zeilen mehrspaltiger Listen sind lang — hier umbrechen statt abschneiden */
.feldknopf.wert { white-space: normal; }
.feldknopf.wert .feldname { white-space: normal; word-break: break-word; }
.feldliste { list-style: none; margin: 4px 0; padding: 0; }
.feldliste.spalten { margin-left: 14px; border-left: 2px solid var(--rand);
  padding-left: 6px; }
.feldknopf { display: flex; gap: 6px; align-items: baseline; width: 100%;
  background: none; border: 0; padding: 3px 4px; font: inherit;
  text-align: left; cursor: pointer; border-radius: 6px; }
.feldknopf:hover { background: var(--grund); }
.feldknopf .feldname { flex: 1; min-width: 0; }
.feldknopf code { color: var(--akzent-text); font-size: 11.5px; }
.feldknopf .feldtyp { color: var(--grau); font-size: 11px; }
@media (max-width: 1000px) {
  .chatlayout { grid-template-columns: 1fr; }
  .feldleiste { position: static; max-height: 300px; order: -1; }
}
.chat { display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 18px; }
.blase { max-width: 85%; border-radius: 12px; padding: 12px 16px;
  border: 1px solid var(--rand); }
.blase pre { margin: 0; white-space: pre-wrap; word-wrap: break-word;
  font-family: inherit; font-size: 14.5px; line-height: 1.45; }
.blase.nutzer { align-self: flex-end; background: #e0f2f7;
  border-color: #bae6fd; }
.blase.ki { align-self: flex-start; background: var(--karte); }
.blase.build { align-self: flex-start; background: #f0fdf4;
  border-color: #bbf7d0; font-size: 14px; }
.downloads { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center; }
.downloads img { max-width: 100%; max-height: 260px; border: 1px solid
  var(--rand); border-radius: 8px; background: #fff; }
.eingabe textarea { resize: vertical; }
.eingabe-zeile { display: flex; justify-content: space-between;
  margin-top: 8px; align-items: center; gap: 10px; }
