/* Adminbereich – Design abgeleitet aus der CI der Website (Konzept 2.6).
   Die CI bestimmt Akzentfarbe und Überschriftenschrift; Layout, Grauwerte,
   Schriftgrößen und die Ampelfarben bestimmt der Adminbereich selbst, damit er
   bei jedem Kunden lesbar bleibt. */

/* Schriften der Website – sie liegen im Webroot unter /fonts/ (kein Google) */
@font-face {
  font-family: 'Gloock';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/gloock-400-normal-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/fonts/nunito-sans-variabel-latin.woff2') format('woff2');
}

:root {
  /* aus der Website-CI Demeterhof Kraindorf (src/styles/global.css) */
  --akzent:       #22432E;   /* Tannengrün – Knöpfe, aktive Bereiche, Diagramm-Hauptlinie */
  --akzent-dunkel:#16301F;
  --akzent-hell:  #E8B84B;   /* Getreidegold */
  --schrift-titel: Gloock, Georgia, serif;

  /* eigene Werte des Adminbereichs, an den Papierton der Website angelehnt */
  --schrift-text: 'Nunito Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --grund:    #FBF8F1;
  --flaeche:  #FFFDF7;
  --rand:     #E4DCCA;
  --text:     #2E2A25;
  --text-leise:#6E675C;

  --gut:     #2f7a3f;
  --achtung: #9a6b00;
  --schlecht:#a32b2b;

  --radius: 6px;
  --abstand: 16px;
  --schatten: 0 1px 2px rgba(35, 33, 31, .08);
}

html[data-modus="dunkel"] {
  --grund:    #232221;
  --flaeche:  #2c2a29;
  --rand:     #3d3a38;
  --text:     #ececea;
  --text-leise:#a8a39e;
  /* Tannengrün ist auf Anthrazit zu dunkel (Konzept 2.6: Kontrast-Check) – aufgehellt */
  --akzent: #7FAF8E;
  --akzent-dunkel: #E8B84B;
  --schatten: 0 1px 2px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--akzent-dunkel); }

.kopf-innen {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--abstand);
}

/* ------------------------------------------------------------ Kopfleiste */
.kopf {
  background: var(--flaeche);
  border-bottom: 1px solid var(--rand);
  position: sticky;
  top: 0;
  z-index: 10;
}
.kopf > .kopf-innen {
  display: flex;
  align-items: center;
  gap: calc(var(--abstand) * 1.5);
  min-height: 58px;
}
.kopf-marke {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.marke-name { font-family: var(--schrift-titel); font-size: 20px; }
.marke-zusatz {
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-leise);
}

.bereiche { display: flex; gap: 4px; margin-left: auto; }
.bereich {
  padding: 7px 13px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
}
.bereich:hover { background: color-mix(in srgb, var(--akzent) 12%, transparent); }
.bereich.aktiv {
  background: color-mix(in srgb, var(--akzent) 16%, transparent);
  color: var(--akzent-dunkel);
  font-weight: 600;
}

.kopf-rechts { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.modus-form { margin: 0; }
.knopf-klein {
  font: inherit;
  font-size: 12.5px;
  padding: 5px 10px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-leise);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.knopf-klein:hover { border-color: var(--akzent); color: var(--akzent-dunkel); }

/* KI-Zugang: aktives Modell groß mit Ampel */
.ki-aktiv { border-width: 2px; }
.ki-aktiv.ki-gut { border-color: var(--gut); background: color-mix(in srgb, var(--gut) 7%, var(--flaeche)); }
.ki-aktiv.ki-schlecht, .ki-aktiv.ki-aus { border-color: var(--schlecht); background: color-mix(in srgb, var(--schlecht) 7%, var(--flaeche)); }
.ki-aktiv-kopf { display: flex; align-items: center; gap: 14px; }
.ki-aktiv-kopf .punkt { width: 18px; height: 18px; flex: none; }
.ki-aktiv-titel { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-leise); }
.ki-aktiv-modell { font-family: ui-monospace, monospace; font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; overflow-wrap: anywhere; }
.ki-aktiv-stand { margin: 10px 0; }

/* Untermenü: als Reiter unter dem gewählten Bereich, klar als Menü erkennbar (Bernd, 18.09.2026) */
.unterzeile { border-top: 1px solid var(--rand); background: color-mix(in srgb, var(--akzent) 5%, var(--grund)); }
.unterzeile .kopf-innen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; padding-bottom: 8px; }
.unterzeile-titel { font-size: 13px; color: var(--text-leise); margin-right: 4px; }
.unterseite {
  padding: 6px 13px;
  font-size: 14px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--flaeche);
  transition: border-color .2s ease, background .2s ease;
}
.unterseite:hover { border-color: var(--akzent); }
.unterseite.aktiv { color: var(--akzent-dunkel); font-weight: 600; border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 16%, transparent); }

/* ------------------------------------------------------------ Inhalt */
.inhalt { padding: calc(var(--abstand) * 2) 0 calc(var(--abstand) * 3); }

h1 {
  font-family: var(--schrift-titel);
  font-weight: 600;
  font-size: 30px;
  margin: 0 0 4px;
}
.untertitel { color: var(--text-leise); margin: 0 0 calc(var(--abstand) * 1.5); }

h2 { font-family: var(--schrift-titel); font-weight: 600; font-size: 21px; margin: 0 0 var(--abstand); }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: var(--abstand);
  box-shadow: var(--schatten);
  margin-bottom: var(--abstand);
}

.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--abstand);
  margin-bottom: calc(var(--abstand) * 1.5);
}
.kachel { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: var(--abstand); }
.kachel-wert { font-family: var(--schrift-titel); font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kachel-name { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-leise); }
.kachel-zusatz { font-size: 12.5px; color: var(--text-leise); margin-top: 4px; }
/* Google-Suche auf dem Dashboard (Konzept 6.7): die Zahlen führen zur Suche */
.kachel-suche .kachel-wert a { color: inherit; text-decoration: none; }
.kachel-suche .kachel-wert a:hover { text-decoration: underline; }
.kachel-einheit { font-family: var(--schrift-text, inherit); font-size: 13px; color: var(--text-leise); }
.wert-text .marke-status { white-space: nowrap; }

/* Ampel */
.ampel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.punkt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.punkt.gut { background: var(--gut); }
.punkt.achtung { background: var(--achtung); }
.punkt.schlecht { background: var(--schlecht); }

/* Tabellen */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--rand); vertical-align: top; }
th { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-leise); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.tabelle-huelle { overflow-x: auto; }

/* Formulare */
label.feld { display: block; margin-bottom: var(--abstand); }
label.feld > span { display: block; font-size: 12.5px; color: var(--text-leise); margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%;
  font: inherit;
  padding: 9px 10px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--flaeche);
  color: var(--text);
}
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

.knopf {
  font: inherit;
  font-weight: 600;
  padding: 9px 18px;
  border: 1px solid var(--akzent);
  border-radius: var(--radius);
  background: transparent;
  color: var(--akzent-dunkel);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.knopf:hover { background: color-mix(in srgb, var(--akzent) 12%, transparent); }
.knopf.warnend { border-color: var(--schlecht); color: var(--schlecht); }

.hinweis { padding: 10px 12px; border-radius: var(--radius); margin-bottom: var(--abstand); font-size: 14px; }
.hinweis.fehler { background: color-mix(in srgb, var(--schlecht) 12%, transparent); color: var(--schlecht); }
.hinweis.erfolg { background: color-mix(in srgb, var(--gut) 12%, transparent); color: var(--gut); }
.hinweis.info { background: color-mix(in srgb, var(--akzent) 12%, transparent); color: var(--akzent-dunkel); }

.leer { color: var(--text-leise); padding: calc(var(--abstand) * 2); text-align: center; }

.marke-status { font-size: 11.5px; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--rand); color: var(--text-leise); }
.marke-status.neu { border-color: var(--akzent); color: var(--akzent-dunkel); font-weight: 600; }

/* ------------------------------------------------------------ Anmeldung */
.anmelde-huelle {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--abstand);
}
.anmelde-karte {
  width: 100%;
  max-width: 400px;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: calc(var(--abstand) * 2);
  box-shadow: var(--schatten);
}
.anmelde-karte h1 { font-size: 24px; margin-bottom: 2px; }

/* ------------------------------------------------------------ Redaktion */
.spalten {
  display: grid;
  /* minmax(0, …): Eine breite Tabelle darf die Spalte nicht über den Bildschirm drücken
     (Handy: Statistik war 519 px breit, 18.09.2026) – sie scrollt stattdessen in ihrer Karte */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--abstand);
  align-items: start;
}
.spalten > .karte { min-width: 0; overflow-x: auto; }
@media (max-width: 1000px) {
  .spalten { grid-template-columns: minmax(0, 1fr); }
}
/* Lange Adressen und Schlüssel in code brechen um, statt die Seite zu verbreitern */
code { overflow-wrap: anywhere; }

.chat {
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 2px;
  margin-bottom: var(--abstand);
}
.chat-zeile { margin-bottom: 10px; }
.chat-zeile .chat-text {
  display: inline-block;
  max-width: 92%;
  padding: 8px 11px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.chat-zeile.nutzer { text-align: right; }
.chat-zeile.nutzer .chat-text {
  background: color-mix(in srgb, var(--akzent) 12%, transparent);
  text-align: left;
}
.chat-zeile.ki .chat-text {
  background: var(--grund);
  border: 1px solid var(--rand);
}
.chat-zeile .chat-text.chat-gegliedert { white-space: normal; }
.chat-gegliedert p { margin: 0 0 8px; }
.chat-gegliedert p:last-child, .chat-gegliedert ul:last-child, .chat-gegliedert ol:last-child { margin-bottom: 0; }
.chat-gegliedert ul, .chat-gegliedert ol { margin: 0 0 8px; padding-left: 20px; }
.chat-gegliedert li { margin: 2px 0; }
.chat-gegliedert strong { font-weight: 650; }
.chat-zeile.ki .chat-text.chat-plan { border-style: dashed; background: transparent; }
.chat-plan-titel { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-leise); margin-bottom: 4px; }
.chat-zeit { font-size: 11.5px; color: var(--text-leise); margin-top: 2px; }
.chat-zeile.nutzer .chat-zeit { text-align: right; }

textarea.quelltext {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  tab-size: 2;
  white-space: pre;
  overflow-x: auto;
}

.vorschau { border-left: 3px solid var(--akzent); }

.diff {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.55;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  overflow-x: auto;
  max-height: 460px;
  overflow-y: auto;
  background: var(--grund);
}
.diff-zeile { padding: 1px 10px; white-space: pre-wrap; word-break: break-word; }
.diff-marke { display: inline-block; width: 1.2em; color: var(--text-leise); user-select: none; }
.diff-zeile.neu { background: color-mix(in srgb, var(--gut) 14%, transparent); }
.diff-zeile.weg { background: color-mix(in srgb, var(--schlecht) 12%, transparent); }
.diff-zeile.luecke { color: var(--text-leise); text-align: center; }

/* ------------------------------------------------------------ Backup */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: var(--abstand) 0;
  border-bottom: 1px solid var(--rand);
}
.tabs .tab {
  padding: 8px 14px;
  font-size: 13.5px;
  color: var(--text-leise);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs .tab:hover { color: var(--text); }
.tabs .tab.aktiv { color: var(--akzent-dunkel); border-bottom-color: var(--akzent); }

.ampel-gross { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: var(--abstand); }

.balken {
  height: 8px;
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
}
.balken-fuell {
  height: 100%;
  background: var(--akzent);
  transition: width .3s ease;
}

.reihe { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.reihe .feld { margin-bottom: 0; }

.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }

.liste-schlicht { list-style: none; margin: 8px 0 0; padding: 0; }
.liste-schlicht li { padding: 4px 0; font-size: 14px; }

pre.code {
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  overflow-x: auto;
}
/* Befehle mit Schlüssel: ganz sichtbar - der Umbruch kommt beim Kopieren nicht mit */
pre.code.umbrechen { white-space: pre-wrap; word-break: break-all; }

details > summary.knopf-klein { cursor: pointer; display: inline-block; list-style: none; }
details > summary.knopf-klein::-webkit-details-marker { display: none; }
.einspielen {
  position: absolute;
  z-index: 5;
  margin-top: 6px;
  right: var(--abstand);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: var(--abstand);
  box-shadow: var(--schatten);
  text-align: left;
  min-width: 260px;
}

/* ------------------------------------------------- Zweiter Anmeldeschritt */
.anmelde-karte h2 { font-size: 16px; margin: var(--abstand) 0 6px; }
.anmelde-karte p { margin-bottom: 10px; line-height: 1.55; }
.anmelde-karte .klein { font-size: 12.5px; color: var(--text-leise); }

/* Weißer Grund auch im Dunkelmodus – sonst lesen Kameras den Code nicht */
.qr-code { margin: var(--abstand) 0; text-align: center; }
.qr-code img { background: #fff; padding: 8px; border-radius: var(--radius); max-width: 100%; height: auto; }

.angaben { margin: var(--abstand) 0; }
.angaben dt { font-size: 12.5px; color: var(--text-leise); margin-top: 8px; }
.angaben dd { margin: 2px 0 0; }

code.geheim {
  display: inline-block;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.06em;
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 6px 10px;
  user-select: all;
}

.codeliste {
  list-style: none;
  margin: var(--abstand) 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.codeliste li {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  background: var(--grund);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 6px 8px;
  text-align: center;
  user-select: all;
}

.abbruch { margin-top: var(--abstand); text-align: center; }
.knopf-leise {
  background: none;
  border: 0;
  color: var(--text-leise);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}
.knopf-leise:hover { color: var(--text); }

/* Auswahl des zweiten Schritts (doku/zugang.md) */
.wege { display: grid; gap: 10px; margin: var(--abstand) 0; }
.weg {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.weg strong { display: block; margin-bottom: 3px; }
.weg span { display: block; font-size: 13px; color: var(--text-leise); line-height: 1.45; }
.weg:hover, .weg:focus-visible { border-color: var(--akzent); }
.weg.aus { opacity: .55; pointer-events: none; }
.ersatz { margin-top: var(--abstand); }
.ersatz summary { cursor: pointer; }

@media (max-width: 420px) {
  .codeliste { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ Statistik */
/* `hidden` gilt auch dort, wo eine Regel `display` setzt */
[hidden] { display: none !important; }
input[type=date], input[type=number], input[type=search] {
  font: inherit;
  padding: 7px 9px;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: var(--flaeche);
  color: var(--text);
}
input[type=number], input[type=search] { width: 100%; }
html[data-modus="dunkel"] input[type=date] { color-scheme: dark; }

.seitenkopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--abstand); align-items: flex-start; }
.seitenkopf-aktionen { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.zahl { text-align: right; }
.leise { color: var(--text-leise); }
.klein { font-size: 12.5px; }
.mehr { color: var(--gut); font-weight: 600; }
.weniger { color: var(--schlecht); font-weight: 600; }
.zwischentitel { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-leise); margin: calc(var(--abstand) * 1.25) 0 6px; font-weight: 600; }
form.inline { display: inline; margin: 0; }
.knopf-klein.gewaehlt { border-color: var(--akzent); color: var(--akzent-dunkel); font-weight: 600; }
td.aktionen { white-space: nowrap; text-align: right; }

/* Werkzeugleiste */
.werkzeug {
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 10px var(--abstand);
  margin-bottom: var(--abstand);
}
.werkzeug-zeile { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.zeitraum-form, .filter-form, .suche-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin: 0; }
.suche-form { flex: 1 1 320px; }
.suche-form .klein-feld.breit { flex: 0 1 320px; }
.bericht .filter-knopf, .bericht .hilfe { display: none; }
.klein-feld { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-leise); }
.klein-feld select, .klein-feld input { width: auto; padding: 6px 8px; font-size: 13.5px; }
.klein-feld.breit { flex: 1 1 200px; }
.klein-feld.breit input { width: 100%; }
.sprung { font-size: 18px; line-height: 1; padding: 6px 11px; }
.sprung.aus { opacity: .35; cursor: default; }
.werkzeug-stand { margin: 8px 0 0; font-size: 13px; color: var(--text-leise); }
.werkzeug-stand strong { color: var(--text); }

.filterleiste { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; padding: 3px 10px;
  border: 1px solid var(--akzent); border-radius: 999px;
  background: color-mix(in srgb, var(--akzent) 10%, transparent);
  color: var(--akzent-dunkel);
}
.chip-weg { text-decoration: none; font-size: 15px; line-height: 1; color: inherit; }
.filter-neu > summary { list-style: none; cursor: pointer; }
.filter-neu > summary::-webkit-details-marker { display: none; }
.filter-neu[open] { flex-basis: 100%; }
.filter-neu .filter-form { margin-top: 8px; padding: 10px; border: 1px dashed var(--rand); border-radius: var(--radius); }
.filter-neu .filter-form p { flex-basis: 100%; margin: 0; }

/* Karten */
.karte-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.karte-kopf h2 { margin: 0; }
.karte-aktionen { display: flex; gap: 6px; flex-wrap: wrap; }
.raster-karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--abstand); }
.tabellen-werkzeug { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

/* Kacheln */
.kachel { position: relative; }
.kachel .sparkline { width: 100%; height: 30px; margin-top: 6px; display: block; }
.hilfe {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid var(--rand); font-size: 10px; letter-spacing: 0;
  cursor: help; vertical-align: 1px; margin-left: 3px;
}
.hilfe-box { position: relative; }
.hilfe-box > summary { list-style: none; }
.hilfe-box > summary::-webkit-details-marker { display: none; }
.hilfe-inhalt {
  position: absolute; right: 0; top: 34px; z-index: 6;
  width: min(420px, 90vw);
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12); padding: 12px 14px; font-size: 14px;
}
.hilfe-inhalt p { margin: 0 0 8px; }

/* Diagramm */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip.metrik {
  border-color: var(--rand); background: transparent; color: var(--text-leise); text-decoration: none;
}
.chip.metrik::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--farbe); opacity: .45; }
.chip.metrik.an { border-color: var(--farbe); color: var(--text); font-weight: 600; }
.chip.metrik.an::before { opacity: 1; }
.diagramm-huelle { overflow-x: auto; }
svg.diagramm { width: 100%; min-width: 560px; height: auto; display: block; }
/* Infofeld am Diagramm – erscheint sofort (statistik.js) */
.dg-tipp { position: absolute; z-index: 20; pointer-events: none; min-width: 190px; max-width: 280px; padding: 10px 12px;
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px;
  box-shadow: 0 10px 30px rgb(0 0 0 / .14), 0 2px 6px rgb(0 0 0 / .08); font-size: 13px; line-height: 1.35; }
.dg-tipp-kopf { display: block; font-weight: 600; font-size: 12.5px; letter-spacing: .02em; color: var(--text-leise);
  padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--rand); }
.dg-tipp-zeile { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; margin-top: 4px; }
.dg-tipp-punkt { width: 10px; height: 10px; border-radius: 50%; }
.dg-tipp-name { color: var(--text); }
.dg-tipp-wert { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.dg-tipp-vergleich { display: flex; justify-content: flex-end; gap: 8px; font-size: 12px; color: var(--text-leise);
  font-variant-numeric: tabular-nums; margin: 1px 0 2px 18px; }
.dg-tipp-gut { color: var(--gut); font-weight: 600; }
.dg-tipp-schlecht { color: var(--schlecht); font-weight: 600; }
.dg-tipp-einfach { display: block; }
.dg-hilfslinie { stroke: var(--text-leise); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; pointer-events: none; }
.dg-ziel { cursor: pointer; }
.dg-wochenende { fill: var(--text); fill-opacity: .045; }
.dg-gitter { stroke: var(--rand); stroke-width: 1; }
.dg-text { fill: var(--text-leise); font-size: 11px; font-family: var(--schrift-text); }
.dg-ziel:hover { fill: var(--text); fill-opacity: .05; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 8px; font-size: 13px; }
.legende-eintrag { font: inherit; background: none; border: 0; padding: 2px 0; cursor: pointer; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.legende-eintrag[aria-pressed="false"] { color: var(--text-leise); text-decoration: line-through; }
.legende-farbe { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.legende-hinweis { color: var(--text-leise); font-size: 12px; }
.als-tabelle, .annotationen { margin-top: 10px; font-size: 14px; }
.als-tabelle > summary, .annotationen > summary { cursor: pointer; color: var(--akzent-dunkel); }
.annotation { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--rand); }
.annotation-form { margin-top: var(--abstand); padding-top: var(--abstand); border-top: 1px solid var(--rand); }
.annotation-form input[type=date] { width: 100%; }

/* Auswertungstabellen */
table.auswertung td { vertical-align: middle; }
.wert-zelle { position: relative; min-width: 180px; }
.wert-balken {
  position: absolute; left: 0; top: 4px; bottom: 4px;
  background: color-mix(in srgb, var(--akzent) 13%, transparent);
  border-radius: 3px;
}
.wert-text { position: relative; display: flex; align-items: baseline; gap: 6px; word-break: break-word; }
.wert-text > a:first-child { color: var(--text); text-decoration: none; }
.wert-text > a:first-child:hover { color: var(--akzent-dunkel); text-decoration: underline; }
.filter-knopf { text-decoration: none; color: var(--text-leise); font-size: 13px; }
.filter-knopf:hover { color: var(--akzent-dunkel); }
.anteil { margin-left: auto; font-size: 11.5px; color: var(--text-leise); padding-left: 8px; white-space: nowrap; }
th a { color: inherit; text-decoration: none; }
th a:hover, th a[aria-sort] { color: var(--akzent-dunkel); }
th a[aria-sort="descending"]::after { content: " ▼"; font-size: 9px; }
th a[aria-sort="ascending"]::after { content: " ▲"; font-size: 9px; }
.blaettern { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 10px; font-size: 13px; color: var(--text-leise); }

.liste-balken { list-style: none; margin: 0; padding: 0; }
.liste-balken li { position: relative; display: flex; gap: 8px; padding: 6px 8px; font-size: 14px; }
.liste-balken-fuell { position: absolute; left: 0; top: 3px; bottom: 3px; background: color-mix(in srgb, var(--akzent) 13%, transparent); border-radius: 3px; }
.liste-balken-text { position: relative; flex: 1; word-break: break-word; }
.liste-balken-text a { color: var(--text); text-decoration: none; }
.liste-balken-text a:hover { text-decoration: underline; }
.liste-balken .zahl { position: relative; }

/* Jetzt */
.minuten { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.minute { flex: 1; background: var(--akzent); border-radius: 2px 2px 0 0; min-height: 2px; transition: height .4s ease; }
.minuten-achse { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-leise); margin-top: 4px; }

/* Dashboard */
.ampelzeile { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ampelzeile .ampel a { color: var(--text); text-decoration: none; }
.kachel-jetzt .kachel-wert { color: var(--gut); }

/* Anfragen */
.suche-anfragen { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; padding: 10px var(--abstand); }
table.posteingang td { vertical-align: top; }
table.posteingang tr.ungelesen td { background: color-mix(in srgb, var(--akzent) 7%, transparent); }
table.posteingang tr.ungelesen td:nth-child(3) a { font-weight: 600; }
.nowrap { white-space: nowrap; }
.nachricht { white-space: pre-wrap; word-break: break-word; margin: 0 0 var(--abstand); }
.aktionszeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: var(--abstand); border-top: 1px solid var(--rand); }
.notiz { border-left: 3px solid var(--rand); padding: 4px 0 4px 12px; margin-bottom: 10px; }
.notiz p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.notiz-form { margin-top: var(--abstand); }
.endgueltig { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: var(--abstand); padding-top: var(--abstand); border-top: 1px dashed var(--rand); }
.knopf-klein.warnend { border-color: var(--schlecht); color: var(--schlecht); }

/* System & Wartung */
th.normal { font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--text); font-weight: 600; width: 34%; }
table.konfiguration th code { font-size: 12.5px; }
fieldset.umfang { border: 1px solid var(--rand); border-radius: var(--radius); padding: 8px 12px; margin: 0 0 var(--abstand); }
fieldset.umfang label { display: block; font-size: 14px; padding: 3px 0; }

/* Website: Security */
.ampel-gross { margin-bottom: 0; }
table.sicherheit th.normal { width: 22%; }
table.verlauf-matrix { font-size: 12px; }
table.verlauf-matrix th, table.verlauf-matrix td { padding: 4px 3px; }
table.verlauf-matrix td.tag, table.verlauf-matrix th.tag { text-align: center; width: 16px; }
table.verlauf-matrix th.normal { white-space: nowrap; width: auto; font-size: 13px; }
.punkt.grau { background: var(--rand); }
.dokument-rahmen { display: grid; grid-template-columns: 260px 1fr; gap: var(--abstand); align-items: start; }
.dokument-inhalt { position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow-y: auto; font-size: 13.5px; }
.dokument-inhalt h2 { font-size: 17px; }
.dokument-inhalt li.ebene-3 { padding-left: 14px; font-size: 13px; }
.dokument-inhalt a { color: var(--text); text-decoration: none; }
.dokument-inhalt a:hover { color: var(--akzent-dunkel); text-decoration: underline; }
.dokument { max-width: 900px; }
.dokument h2 { font-size: 28px; }
.dokument h3 { font-family: var(--schrift-titel); font-size: 23px; margin: calc(var(--abstand) * 2) 0 10px; scroll-margin-top: 130px; }
.dokument h4 { font-size: 17px; margin: var(--abstand) 0 8px; scroll-margin-top: 130px; }
.dokument table { margin: 10px 0 var(--abstand); }
.dokument blockquote { border-left: 3px solid var(--akzent); margin: 10px 0; padding: 4px 12px; color: var(--text-leise); }
.dokument code { font-size: 13px; background: var(--grund); padding: 1px 4px; border-radius: 3px; }
@media (max-width: 900px) { .dokument-rahmen { grid-template-columns: 1fr; } .dokument-inhalt { position: static; max-height: none; } }

/* Website: CI */
.farbraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: var(--abstand); }
.farbraster.stufen { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.farbfeld { border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; background: var(--flaeche); }
.farbfeld-farbe { height: 64px; display: flex; align-items: flex-end; padding: 6px 8px; font-size: 12px; font-weight: 600; }
.farbraster.stufen .farbfeld-farbe { height: 44px; }
.farbfeld-werte { padding: 6px 8px; font-size: 11.5px; display: flex; flex-direction: column; gap: 1px; color: var(--text-leise); }
.kopieren { font: inherit; font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: none; border: 0; padding: 0; color: var(--text); cursor: copy; text-align: left; }
.kontrastprobe { display: inline-block; padding: 3px 8px; border-radius: 3px; border: 1px solid var(--rand); font-weight: 600; }
.schriftproben { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--abstand); margin-bottom: 10px; }
.schriftprobe { margin: 6px 0; line-height: 1.3; color: var(--text); }
.massband { display: flex; align-items: center; gap: 8px; font-size: 12.5px; margin: 4px 0; }
.massband-balken { display: inline-block; height: 10px; background: var(--akzent); border-radius: 2px; }
.eckprobe, .schattenprobe { border: 1px solid var(--rand); background: var(--flaeche); padding: 14px 10px; margin: 8px 0; font-size: 12.5px; }
.schattenprobe { border-color: transparent; }
.logoflaechen { display: flex; gap: var(--abstand); flex-wrap: wrap; }
.logoflaeche { padding: 24px; border-radius: var(--radius); border: 1px solid var(--rand); }
.logoflaeche img { max-height: 90px; width: auto; }
.logoflaeche.hell { background: #ffffff; }
.logoflaeche.grund { background: #f3f2f2; }

/* Bericht */
body.bericht { background: #fff; color: #23211f; }
.bericht-leiste { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px var(--abstand); border-bottom: 1px solid var(--rand); background: var(--grund); }
.bericht-deckblatt, .bericht-block, .bericht-fuss { max-width: 960px; margin: 0 auto; padding: 0 var(--abstand); }
.bericht-deckblatt { padding-top: 48px; padding-bottom: 24px; border-bottom: 3px solid var(--akzent); margin-bottom: 24px; }
.bericht-deckblatt h1 { font-size: 40px; margin: 4px 0 8px; }
.bericht-marke { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--akzent-dunkel); margin: 0; }
.bericht-zeitraum { font-size: 18px; margin: 0 0 8px; }
.bericht-block { margin-bottom: 28px; }
.bericht-block .karte { box-shadow: none; }
.bericht-block svg.diagramm { min-width: 0; }
.bericht-fuss { color: var(--text-leise); font-size: 12px; border-top: 1px solid var(--rand); padding-top: 10px; padding-bottom: 30px; }

@media print {
  .nicht-drucken, .kopf, .fuss, .werkzeug, .karte-aktionen, .legende-eintrag[aria-pressed], .filter-knopf, .sprung, .tabs, .dokument-inhalt { display: none !important; }
  .dokument-rahmen { display: block; }
  body.bericht { font-size: 11pt; }
  .bericht-deckblatt { page-break-after: always; min-height: 60vh; }
  .bericht-block { page-break-inside: avoid; }
  .kacheln { grid-template-columns: repeat(4, 1fr); }
  .kachel { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  svg.diagramm { min-width: 0; }
}

@media (max-width: 640px) {
  .zeitraum-form { width: 100%; }
  .klein-feld { flex: 1 1 45%; }
  .klein-feld select, .klein-feld input { width: 100%; }
  .wert-zelle { min-width: 140px; }
}

/* ------------------------------------------------------------ Schmal */
@media (max-width: 860px) {
  .kopf > .kopf-innen { flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .bereiche { order: 3; width: 100%; overflow-x: auto; margin-left: 0; }
  .kopf-rechts { margin-left: auto; }
}

/* ------------------------------------------------------------ Inhalte (Live-Editor)
   Seiten, Verlauf, Elemente und Build – übernommen aus Herz & Darm, auf die
   Variablen dieses Adminbereichs umgestellt (hell und dunkel). */
.suchtreffer .ausschnitt { display: block; font-size: 13px; color: var(--text-leise); }

.verlaufsatz { border: 1px solid var(--rand); border-radius: var(--radius); margin-bottom: 10px; background: var(--flaeche); }
.verlaufsatz--sicherung { border-color: var(--akzent-hell); }
.verlaufsatz > summary { list-style: none; cursor: pointer; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; }
.verlaufsatz > summary::-webkit-details-marker { display: none; }
.verlaufsatz > summary:hover { background: var(--grund); }
.verlaufsatz .initialen {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: color-mix(in srgb, var(--akzent) 12%, transparent); color: var(--akzent-dunkel);
  font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.verlaufsatz--sicherung .initialen { background: color-mix(in srgb, var(--akzent-hell) 25%, transparent); }
.verlaufsatz .satztext { flex: 1; min-width: 0; }
.verlaufsatz .satztext b { display: block; font-size: 14px; }
.verlaufsatz .satztext > span { display: block; font-size: 13px; color: var(--text-leise); }
.verlaufsatz .satzaktion { flex: none; }
.verlaufsatz .satzleib { border-top: 1px solid var(--rand); padding: 4px 14px 14px; }
.verlaufelement { padding: 12px 0; border-bottom: 1px solid var(--rand); }
.verlaufelement:last-child { border-bottom: 0; }
.verlaufelement > b { display: block; font-size: 13.5px; margin-bottom: 6px; }
.verlaufelement .klein { margin: 6px 0 0; }
.vergleich {
  font-size: 13.5px; line-height: 1.6; background: var(--grund); border-radius: var(--radius);
  padding: 10px 12px; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto;
}
.vergleich del { background: color-mix(in srgb, var(--schlecht) 16%, transparent); color: var(--schlecht); text-decoration: line-through; }
.vergleich ins { background: color-mix(in srgb, var(--gut) 18%, transparent); color: var(--gut); text-decoration: none; }
.bildvergleich { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 10px; }
.bildvergleich figure { margin: 0; }
.bildvergleich img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--grund); }
.bildvergleich figcaption { font-size: 12px; color: var(--text-leise); text-align: center; margin-top: 4px; }
.knopfreihe { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
/* Sieht aus wie ein Link, ist aber ein Knopf – Aktionen müssen POST sein. */
.alslink { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--akzent-dunkel); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.datenfeldzeile { display: grid; grid-template-columns: 220px 1fr auto; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--rand); }
.datenfeldzeile:last-child { border-bottom: 0; }
.datenfeldzeile small { display: block; color: var(--text-leise); font-size: 12.5px; }
.datenfeldzeile textarea { min-height: 70px; resize: vertical; }
@media (max-width: 760px) { .datenfeldzeile { grid-template-columns: 1fr; } }

.schalterreihe { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 var(--abstand); font-size: 14px; }
.regelchips { display: flex; gap: 4px; flex-wrap: wrap; }
.regelchips span { font-size: 11px; background: var(--grund); border: 1px solid var(--rand); color: var(--text-leise); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.warnliste { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--schlecht); line-height: 1.7; }

/* ------------------------------------------------------------ KI-Assistent (doku/assistent.md) */
.verbrauch { display: block; min-width: 220px; text-decoration: none; color: var(--text); font-size: 13px; }
.verbrauch .balken { display: block; margin: 4px 0 0; }
.verbrauch .balken-fuell { display: block; }
.verbrauch-zahl { font-variant-numeric: tabular-nums; }
/* Nur noch der Zähler über dem Chat, rechts (21.09.2026) */
.assistent-kopf { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.verbrauch-agentur { display: block; margin-top: 4px; font-size: 12px; color: var(--text-leise); font-variant-numeric: tabular-nums; }
/* Die Begrüßung: erste Nachricht jedes Gesprächs, etwas ruhiger als eine Antwort */
.chat-begruessung .chat-text { border-left: 3px solid var(--akzent); }
.verbrauch.knapp .balken-fuell, .balken-fuell.knapp { background: var(--achtung); }

.assistent { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--abstand); align-items: start; }
@media (max-width: 900px) { .assistent { grid-template-columns: 1fr; } }
.assistent-verlauf .knopf { width: 100%; text-align: center; margin-bottom: 10px; }
.assistent-suche input { width: 100%; margin-bottom: 8px; }
.verlauf-liste li { border-left: 3px solid transparent; padding: 6px 0 6px 8px; }
.verlauf-liste li a { display: block; text-decoration: none; color: var(--text); overflow-wrap: anywhere; }
.verlauf-liste li.aktiv { border-left-color: var(--akzent); }
.verlauf-liste li.aktiv a { color: var(--akzent-dunkel); font-weight: 600; }

.assistent-chat { max-height: 520px; }
.chat-zeile.system .chat-text { background: transparent; border: 1px dashed var(--rand); color: var(--text-leise); font-size: 13px; }
/* Veröffentlichung: läuft · online · abgelehnt (Bernd, 21.09.2026) */
.auslieferung-marke { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; font-weight: 600; font-size: 12px; letter-spacing: .02em; }
.auslieferung-laeuft .auslieferung-marke { color: var(--akzent-dunkel); }
.auslieferung-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); animation: auslieferungPuls 1.4s ease-in-out infinite; }
@keyframes auslieferungPuls { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .auslieferung-punkt { animation: none; } }
.chat-zeile.system .chat-text.auslieferung-online { border-style: solid; border-color: var(--gut); color: var(--text); }
.auslieferung-online .auslieferung-marke { color: var(--gut); }
.chat-zeile.system .chat-text.auslieferung-abgelehnt { border-style: solid; border-color: var(--schlecht); color: var(--text); }
.auslieferung-abgelehnt .auslieferung-marke { color: var(--schlecht); }
.chat-abgewiesen { color: var(--schlecht); }
.rueckfrage { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* Rückfrage: eigene Karte mit Akzentrand, Antworten als große Knöpfe, Empfehlung hervorgehoben */
.chat-zeile.mit-rueckfrage { align-items: stretch; }
.rueckfrage-karte { border: 1px solid color-mix(in srgb, var(--akzent) 55%, var(--rand)); border-left: 4px solid var(--akzent);
  background: color-mix(in srgb, var(--akzent) 7%, var(--flaeche)); border-radius: var(--radius); padding: 14px 16px; max-width: 760px; }
.rueckfrage-titel { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--akzent); font-weight: 600; margin-bottom: 6px; }
.rueckfrage-frage { font-size: 15.5px; line-height: 1.5; }
.rueckfrage-frage p { margin: 0 0 .4em; }
.rueckfrage-antwort { display: inline-flex; align-items: center; gap: 8px; text-align: left; font: inherit; font-size: 14px; line-height: 1.35;
  padding: 9px 14px; border-radius: var(--radius); border: 1px solid var(--rand); background: var(--flaeche); color: var(--text); cursor: pointer; }
.rueckfrage-antwort:hover, .rueckfrage-antwort:focus-visible { border-color: var(--akzent); }
.rueckfrage-antwort.empfohlen { border: 2px solid var(--gut); background: color-mix(in srgb, var(--gut) 10%, var(--flaeche)); font-weight: 500; }
.empfohlen-marke { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .03em; color: #fff; background: var(--gut); border-radius: 999px; padding: 2px 8px; }
.rueckfrage-hinweis { margin: 10px 0 0; font-size: 12.5px; color: var(--text-leise); }
/* Nach dem Veröffentlichen: Link zum Ansehen, Verlauf mit Rückgängig */
.ansehen-link { display: inline-block; margin: 6px 12px 0 0; font-weight: 500; }
.aenderungen h2 { font-size: 17px; }
.aenderungen-liste { list-style: none; margin: 0; padding: 0; }
.aenderungen-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 9px 0; border-top: 1px solid var(--rand); }
.aenderungen-liste li:first-child { border-top: 0; }
.aenderungen-liste li.zurueck { opacity: .6; }
.aenderung-zeit { font-size: 12.5px; color: var(--text-leise); min-width: 118px; }
.aenderung-was { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.aenderung-seite .ansehen-link { margin: 0 0 0 8px; }
/* Das Nachrichtenfeld klar vom Gespräch getrennt */
.assistent-chat + .assistent-form, .assistent-form { border-top: 1px solid var(--rand); margin-top: 28px; padding-top: 22px; }
/* Senden: Dreh-Rad, solange die KI arbeitet */
#assistent-senden { display: inline-flex; align-items: center; gap: 8px; }
#assistent-senden .dreh { display: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: dreh .8s linear infinite; }
#assistent-senden.sendet .dreh { display: inline-block; }
#assistent-senden.sendet { opacity: 1; cursor: progress; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #assistent-senden .dreh { animation-duration: 2.4s; } }
/* Bernd anfragen: zugeklappt und leise, mit Abstand */
.bernd-anfragen { margin-top: 40px; font-size: 13px; color: var(--text-leise); }
.bernd-anfragen summary { cursor: pointer; display: inline-block; padding: 4px 0; }
.bernd-anfragen summary:hover { color: var(--text); }
.bernd-anfragen form { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--rand); border-radius: var(--radius); max-width: 620px; }
.assistent-form textarea { width: 100%; resize: vertical; }
.assistent-form .anhang-feld { flex: 1 1 260px; }
.assistent-form input[type=file] { max-width: 100%; }
/* Anhänge & Screenshots: große, einladende Fläche (Bernd, 18.09.2026) */
.anhang-flaeche { position: relative; display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 10px;
  padding: 16px 18px; border: 2px dashed var(--rand); border-radius: var(--radius); background: var(--grund);
  cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.anhang-flaeche:hover, .anhang-flaeche:focus-within, .anhang-flaeche.ziehen { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 6%, var(--grund)); }
.anhang-flaeche input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.anhang-symbol { font-size: 26px; line-height: 1; }
.anhang-text { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.anhang-text strong { font-size: 15px; }
.anhang-text .leise { font-size: 13px; }
.anhang-text kbd { font: inherit; font-size: 12px; padding: 1px 5px; border: 1px solid var(--rand); border-radius: 4px; background: var(--flaeche); }
.anhang-liste { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.anhang-liste li { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 8px; border: 1px solid var(--rand); border-radius: 999px; background: var(--flaeche); }
.anhang-liste li.zu-gross { border-color: var(--schlecht); color: var(--schlecht); }
.assistent-status { min-height: 1.4em; margin: 8px 0 0; font-size: 13px; color: var(--text-leise); }
/* Während die KI arbeitet: grüne Leiste mit pulsierendem Punkt (Bernd, 18.09.2026) */
.assistent-status.arbeitet { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--gut) 14%, var(--flaeche)); border: 1px solid color-mix(in srgb, var(--gut) 45%, transparent);
  color: var(--text); font-size: 14px; font-weight: 500; }
.assistent-status.arbeitet::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--gut);
  animation: arbeitet-puls 1.2s ease-in-out infinite; }
@keyframes arbeitet-puls { 0%, 100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .assistent-status.arbeitet::before { animation: none; } }
/* Verlauf: Papierkorb neben dem Titel */
.verlauf-kopf { display: flex; align-items: flex-start; gap: 6px; }
.verlauf-kopf a { flex: 1 1 auto; }
.verlauf-loeschen { margin: 0; }
.papierkorb { border: 0; background: transparent; color: var(--text-leise); padding: 2px 4px; border-radius: 4px; cursor: pointer; line-height: 0; opacity: .55; }
.verlauf-liste li:hover .papierkorb, .papierkorb:focus-visible { opacity: 1; }
.papierkorb:hover { color: var(--schlecht); background: color-mix(in srgb, var(--schlecht) 10%, transparent); }
/* Vorschau der Anhänge: Bildchen mit Entfernen, groß beim Darüberfahren */
.anhang-liste li { position: relative; border-radius: var(--radius); padding: 4px 6px 4px 4px; }
.anhang-vorschau { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--rand); display: block; }
.anhang-gross { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 30; max-width: min(640px, 80vw); max-height: 60vh;
  border-radius: var(--radius); border: 1px solid var(--rand); box-shadow: 0 12px 40px rgb(0 0 0 / .3); background: var(--flaeche); display: none; }
/* Nur beim Darüberfahren bzw. Tastaturfokus; klickdurchlässig, damit sie nie das Nachrichtenfeld blockiert */
.anhang-liste li:hover .anhang-gross, .anhang-liste li:focus-visible .anhang-gross { display: block; }
.anhang-gross { pointer-events: none; }
/* Dasselbe an Anhängen in den Chat-Nachrichten: Vorschaubild, groß beim Darüberfahren (23.09.2026) */
.chat-anhang { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
/* Der Chat scrollt in sich (.chat overflow) – die Großansicht darum mittig im Fenster, nie abgeschnitten */
.chat-anhang .anhang-gross { position: fixed; left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); max-height: 80vh; }
.chat-anhang:hover .anhang-gross, .chat-anhang:focus-visible .anhang-gross { display: block; }
.auslieferung-hinweis { display: block; margin-top: 8px; font-size: 13px; color: var(--text-leise); }
/* Werkzeugprotokoll der Agentur (23.09.2026) */
.werkzeugprotokoll { margin-top: var(--abstand); border: 1px dashed var(--rand); border-radius: var(--radius); padding: 8px 12px; }
.werkzeugprotokoll summary { cursor: pointer; font-size: 13px; color: var(--text-leise); }
.werkzeugprotokoll-liste { margin: 10px 0; padding-left: 22px; font-size: 12.5px; line-height: 1.5; max-height: 420px; overflow: auto; }
.werkzeugprotokoll-liste li { margin-bottom: 4px; overflow-wrap: anywhere; }
.werkzeugprotokoll-liste .wp-modell { color: var(--text-leise); }
.werkzeugprotokoll-liste .wp-sicherung, .werkzeugprotokoll-liste .wp-fehler { color: var(--schlecht); }
.wp-zeit { font-variant-numeric: tabular-nums; color: var(--text-leise); }
.anhang-entfernen { border: 0; background: transparent; color: var(--text-leise); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; }
.anhang-entfernen:hover { color: var(--schlecht); background: color-mix(in srgb, var(--schlecht) 10%, transparent); }

/* Vorschläge: drei nebeneinander, kurz – der ganze Text beim Darüberfahren oder Antippen */
.vorschlaege { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: var(--abstand); align-items: start; }
.vorschlag { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; border: 1px solid var(--rand); border-radius: var(--radius); padding: 10px 12px; background: var(--grund); }
.vorschlag p { margin: 0; font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.vorschlag:hover p, .vorschlag:focus-within p { -webkit-line-clamp: unset; }
.vorschlag form { margin: 0; }
.vorschlag.vorschlag-gross { opacity: .8; }
.vorschlag.vorschlag-gross .knopf-klein { font-size: 12px; padding: 3px 8px; align-self: flex-start; }

details.entwurf { border-top: 1px solid var(--rand); padding: 10px 0; }
details.entwurf > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.lese-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--abstand); margin: 10px 0; }
.lese { border: 1px solid var(--rand); border-radius: var(--radius); padding: 10px 14px; background: var(--flaeche); overflow-wrap: anywhere; font-size: 14px; }
.lese img { max-width: 100%; height: auto; display: block; margin: 8px 0 2px; border-radius: 4px; }
.lese h3, .lese h4, .lese h5, .lese h6 { font-family: var(--schrift-titel); margin: 12px 0 6px; }
.lese-titel { font-size: 20px; }
.lese blockquote { border-left: 3px solid var(--akzent); margin: 8px 0; padding-left: 10px; color: var(--text-leise); }
.lese-platzhalter { display: inline-block; padding: 4px 8px; border: 1px dashed var(--rand); border-radius: 4px; color: var(--text-leise); font-size: 12.5px; }
.lese-hinweis { display: block; font-size: 11.5px; color: var(--achtung); }
.lese-warnung { color: var(--schlecht); }

.veroeffentlichen { margin-top: var(--abstand); }
.bestaetigung { display: block; padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--rand); border-radius: var(--radius); font-size: 14px; }
.bestaetigung.fehlt { border-color: var(--schlecht); background: color-mix(in srgb, var(--schlecht) 8%, transparent); }
.ipsom-grund { flex: 1 1 300px; }
.ipsom-grund input { width: 100%; }

.tagesbalken { display: flex; align-items: flex-end; gap: 3px; height: 160px; overflow-x: auto; padding-bottom: 2px; }
.tagesbalken-tag { flex: 1 0 14px; display: flex; flex-direction: column; align-items: center; height: 100%; }
.tagesbalken-saeule { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.tagesbalken-saeule span { display: block; width: 100%; min-height: 0; }
.tagesbalken-saeule .kunde { background: var(--akzent); border-radius: 2px 2px 0 0; }
.tagesbalken-saeule .agentur { background: var(--akzent-hell); }
.tagesbalken-name { font-size: 10.5px; color: var(--text-leise); }

/* ------------------------------------------------------------ KI-Zugang: Schlüssel kompakt */
.ki-schluessel-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.ki-schluessel-kopf h2 { margin: 0; }
.ki-schluessel details { margin-top: 12px; }
.ki-schluessel details[open] > summary { margin-bottom: 8px; }
.ki-schluessel .reihe { gap: 12px; margin-top: 8px; }
.ki-schluessel .reihe .feld { flex: 1 1 220px; margin: 0; }
.ki-schluessel .untertitel { margin: 8px 0; }
.ki-rollen { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0 0 10px; }
.ki-rollen dt, .ki-rollen dd { margin: 0; }
.ki-schluessel .ki-entfernen .feld { flex: 0 1 300px; }

/* ------------------------------------------------------------ KI-Zugang: GitHub neben der grünen Karte */
.ki-kopf-raster { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--abstand); align-items: stretch; margin-bottom: var(--abstand); }
.ki-kopf-raster > .karte { margin: 0; }
@media (max-width: 900px) { .ki-kopf-raster { grid-template-columns: minmax(0, 1fr); } }
.ki-github-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ki-github-kopf h2 { margin: 0; }
.ki-github-stand { display: flex; align-items: baseline; gap: 8px; margin: 10px 0; }
.ki-github-stand .punkt { flex: none; transform: translateY(1px); }
.ki-github .feld { margin: 0 0 10px; }
.ki-github .untertitel { margin: 10px 0 0; }
.anleitung { max-width: min(640px, calc(100vw - 32px)); border: 1px solid var(--rand); border-radius: 12px; padding: 20px 24px; background: var(--flaeche); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.anleitung::backdrop { background: rgba(0, 0, 0, .35); }
.anleitung-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.anleitung-kopf h2 { margin: 0; }
.anleitung ol { padding-left: 1.3em; line-height: 1.55; }
.anleitung li { margin-bottom: 8px; }

/* Zwischenstand als Zeile im Chat, direkt unter der eigenen Nachricht (Bernd, 20.09.2026) */
.chat-zeile.arbeit .chat-text { display: flex; align-items: center; gap: 10px; font-weight: 500;
  background: color-mix(in srgb, var(--gut) 14%, var(--flaeche)); border-color: color-mix(in srgb, var(--gut) 45%, transparent); }
.chat-zeile.arbeit.arbeitet .chat-text::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--gut); animation: arbeitet-puls 1.2s ease-in-out infinite; }
.chat-zeile.arbeit.fehlgeschlagen .chat-text { background: color-mix(in srgb, var(--schlecht) 12%, var(--flaeche));
  border-color: color-mix(in srgb, var(--schlecht) 45%, transparent); font-weight: 400; }
@media (prefers-reduced-motion: reduce) { .chat-zeile.arbeit.arbeitet .chat-text::before { animation: none; } }
/* Verlauf des Assistenten: Kosten und Fehler je Aufgabe (Bernd, 23.09.2026) */
.verlauf-tabelle td { vertical-align: top; }
.verlauf-tabelle tr.auffaellig td:first-child { box-shadow: inset 3px 0 0 var(--schlecht); }
.verlauf-problem { color: var(--schlecht); overflow-wrap: anywhere; }
.verlauf-ergebnis { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; white-space: nowrap;
  border: 1px solid var(--rand); color: var(--text-leise); }
.verlauf-ergebnis.ergebnis-online { border-color: var(--gut); color: var(--gut); }
.verlauf-ergebnis.ergebnis-abgelehnt, .verlauf-ergebnis.ergebnis-problem { border-color: var(--schlecht); color: var(--schlecht); }
.verlauf-ergebnis.ergebnis-laeuft { border-color: var(--akzent); color: var(--akzent-dunkel); }
/* Fotoauswahl in der Rückfrage: Karin klickt das gemeinte Foto an (24.09.2026) */
.foto-wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0 10px; }
.foto-wahl-knopf { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 1px solid var(--rand); border-radius: var(--radius);
  background: var(--flaeche); cursor: pointer; font: inherit; font-size: 13px; color: var(--text); }
.foto-wahl-knopf img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; display: block; }
.foto-wahl-knopf:hover, .foto-wahl-knopf:focus-visible { border-color: var(--akzent); outline: none; }
.weiter-knopf { margin-top: 8px; }
