:root {
  /* ein Farbsatz mit der Modellansicht (Konzept Bedienung und Farben 3.3) */
  --grund: #eef1f4; --flaeche: #fff; --text: #1d2228; --leise: #5b6470; --linie: #d5d9df;
  --akzent: #1a5fd0; --akzent-hell: #e7f0ff; --rot: #b42318; --gruen: #0e8560;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--grund);
}
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
header { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--flaeche); border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.marke { font-weight: 700; color: var(--text); text-decoration: none; font-size: 17px; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav a { color: var(--leise); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
nav a.aktiv, nav a:hover { color: var(--akzent); background: var(--akzent-hell); }
#wer { color: var(--leise); font-size: 13px; }
td.mitte, th.mitte { text-align: center; }
/* ToDos (W6) */
.todo-tabelle td { vertical-align: middle; }
.todo-zeile { cursor: pointer; }
.todo-zeile:hover td, .todo-zeile.offen td { background: var(--akzent-hell); }
.todo-zeile.ist-entwurf td:nth-child(4) b { color: var(--akzent); }
.bild-zelle img { width: 64px; height: 44px; object-fit: cover; border-radius: 4px; border: 1px solid var(--linie); display: block; }
.marke-klein.entwurf { color: var(--akzent); border: 1px dashed var(--akzent); background: transparent; }
.marke-klein.ki { background: var(--akzent); color: #fff; }
.ok-text { color: #0e8560; }
button.diktat { align-self: flex-start; }
button.diktat.aufnahme { background: #c92a2a; color: #fff; border-color: #c92a2a; animation: ki-puls 1.2s ease-in-out infinite; }
.regelvorschlag { margin-bottom: 12px; }
.ki-hinweis.einordnung.gut { border-left-color: #0e8560; background: #e7f6ef; }
.ki-hinweis.einordnung.achtung { border-left-color: #d97706; background: #fdf3e2; }
.ki-auswertung h3 { font-size: 14px; margin: 10px 0 4px; }
.schreiben-entwurf input, .schreiben-entwurf textarea { width: 100%; box-sizing: border-box; font: inherit; }
.schreiben-entwurf textarea { font-family: system-ui, sans-serif; line-height: 1.5; }
tr.aktiv td { background: var(--akzent-hell); }
.regelvorschlag .zeile { gap: 10px; align-items: center; flex-wrap: wrap; }
.regelvorschlag.abgelehnt { opacity: .6; }
.marke-klein.ki.laeuft { animation: ki-puls 1.4s ease-in-out infinite; }
@keyframes ki-puls { 50% { opacity: .45; } }
.todo-form { display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 16px; padding: 8px 0; }
.todo-bilder { display: flex; flex-direction: column; gap: 8px; }
.todo-bilder img { width: 100%; border-radius: 6px; border: 1px solid var(--linie); }
.todo-felder { display: flex; flex-direction: column; gap: 8px; }
.todo-felder textarea, .todo-felder input[name=titel] { width: 100%; box-sizing: border-box; }
.ki-hinweis { margin: 0; padding: 6px 10px; border-left: 3px solid var(--akzent); background: var(--akzent-hell); font-size: 13px; }
.todo-filter { margin-bottom: 10px; max-width: 640px; }
@media (max-width: 700px) { .todo-form { grid-template-columns: 1fr; } .todo-tabelle th:nth-child(2), .todo-tabelle td:nth-child(2) { display: none; } }
/* Startseite dreispaltig (W5) */
main.breit { max-width: 1520px; }
.start-raster { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.spalte h1 { margin-top: 0; }
.spalte-neu, .spalte-ki { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px;
  position: sticky; top: 12px; max-height: calc(100vh - 110px); overflow: auto; }
.spalte-neu h2, .spalte-ki h2 { margin: 4px 0 10px; font-size: 15px; }
.spalte-ki h2 + .ki-platz + h2 { margin-top: 18px; }
.filter-zeile { gap: 6px; margin-bottom: 8px; }
.filter-zeile select { flex: 1; min-width: 0; font-size: 13px; padding: 4px 6px; }
.tag-kopf { font-size: 12px; font-weight: 600; color: var(--leise); margin: 12px 0 4px; text-transform: uppercase; letter-spacing: .03em; }
.ereignis { display: flex; gap: 8px; padding: 6px 6px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13.5px; line-height: 1.35; }
.ereignis:hover { background: var(--akzent-hell); }
.ereignis-symbol { width: 18px; flex: none; text-align: center; color: var(--leise); }
.ereignis-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.ereignis-text .leise { font-size: 12px; }
.ereignis.ist-neu .ereignis-symbol { color: var(--akzent); }
.ereignis.ist-neu .ereignis-text { color: var(--akzent); font-weight: 500; }
.neu-zeile { color: var(--akzent); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.punkt-blau { width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); display: inline-block; }
.ki-platz textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.ki-platz form { display: flex; flex-direction: column; gap: 6px; }
.ki-platz select { font-size: 13px; padding: 4px 6px; }
.ki-verlauf { max-height: 52vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; font-size: 13.5px; }
.ki-frage { align-self: flex-end; background: var(--akzent); color: #fff; padding: 6px 10px; border-radius: 10px 10px 2px 10px; max-width: 90%; }
.ki-antwort { background: var(--grund); padding: 8px 10px; border-radius: 10px 10px 10px 2px; line-height: 1.45; }
.ki-antwort.fehler { color: #b42318; }
.ki-quellen { margin: 6px 0 0; padding-left: 0; list-style: none; font-size: 12px; }
.ki-quellen li { margin: 2px 0; }
.meine-todos { list-style: none; padding: 0; margin: 0; }
.meine-todos li { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--linie); font-size: 13.5px; }
.meine-todos .leise { font-size: 12px; }
.start-reiter { display: none; gap: 4px; margin-bottom: 12px; }
.start-reiter button { flex: 1; background: var(--flaeche); color: var(--leise); border: 1px solid var(--linie); }
.start-reiter button.aktiv { color: var(--akzent); border-color: var(--akzent); background: var(--akzent-hell); }
@media (max-width: 1100px) {
  .start-reiter { display: flex; }
  .start-raster { grid-template-columns: minmax(0, 1fr); }
  .start-raster > .spalte { display: none; position: static; max-height: none; }
  .start-raster[data-zeigt="neu"] > .spalte-neu, .start-raster[data-zeigt="projekte"] > .spalte-projekte,
  .start-raster[data-zeigt="ki"] > .spalte-ki { display: block; }
}
.reiterleiste { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin: 4px 0 16px; flex-wrap: wrap; }
.reiterleiste a { padding: 8px 12px; color: var(--leise); text-decoration: none; border-bottom: 2px solid transparent; }
.reiterleiste a.aktiv { color: var(--akzent); border-bottom-color: var(--akzent); }
.zahl-blau { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--akzent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.balken { height: 4px; background: var(--linie); border-radius: 2px; margin-top: 4px; width: 100px; }
.balken i { display: block; height: 100%; background: var(--akzent); border-radius: 2px; }
input.schmal { width: 90px; }
th.zwischen { text-align: left; background: var(--grund); font-weight: 600; }
.modulkarten { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.modulkarte { margin: 0; }
.modulkarte:not(.gebucht) { opacity: .75; }
.lizenzwahl { gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.haken-text { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
#wer .wer-name { color: var(--text, inherit); text-decoration: none; padding: 4px 8px; border-radius: 6px; }
#wer .wer-name:hover, #wer .wer-name.aktiv { background: var(--blau-hell, #e8f0fe); color: var(--blau, #1a5fd0); }
main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 24px 16px; box-sizing: border-box; }
footer { text-align: center; padding: 16px; font-size: 12px; color: var(--leise); }
footer a { color: var(--leise); }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 28px 0 10px; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 20px; }
.schmal { max-width: 380px; margin: 8vh auto 0; }
label { display: block; font-size: 13px; color: var(--leise); margin: 12px 0 4px; }
input, select { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; background: #fff; }
input:focus, select:focus { outline: 2px solid var(--akzent-hell); border-color: var(--akzent); }
button { font: inherit; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--akzent); background: var(--akzent); color: #fff; cursor: pointer; }
button.zweit { background: #fff; color: var(--akzent); }
button.klein { padding: 3px 8px; font-size: 13px; }
button.gefahr { border-color: var(--rot); color: var(--rot); background: #fff; }
button:disabled { opacity: .5; cursor: default; }
.zeile { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.zeile > * { flex: 1; min-width: 140px; }
.zeile > button { flex: 0 0 auto; }
table { width: 100%; border-collapse: collapse; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--linie); font-size: 14px; }
th { font-size: 12px; color: var(--leise); font-weight: 600; background: #fafafa; }
tr:last-child td { border-bottom: 0; }
td a { color: var(--akzent); text-decoration: none; }
.leise { color: var(--leise); }
.fehler { color: var(--rot); margin-top: 10px; min-height: 1.2em; }
.marke-klein { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 10px; background: #f3f4f6; color: var(--leise); }
.marke-klein.ok { background: #dcfce7; color: var(--gruen); }
.marke-klein.aus { background: #fee2e2; color: var(--rot); }
#meldung { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; max-width: 90vw; }
.tabelle-huelle { overflow-x: auto; }
.links-abstand { margin-left: 12px; }
input.haken { width: auto; }
.zeile > .fest { flex: 0 0 auto; min-width: 0; }
main.rechtstext { max-width: 760px; }
main.rechtstext td, main.rechtstext th { vertical-align: top; }
mark { background: #fef08a; }
/* Kacheln: Projekte auf der Startseite, Module im Projekt */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.kachel { display: flex; flex-direction: column; gap: 6px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px;
  padding: 18px; color: var(--text); text-decoration: none; transition: border-color .12s, box-shadow .12s; }
a.kachel:hover { border-color: var(--akzent); box-shadow: 0 4px 14px rgba(29, 78, 216, .12); }
.kachel-titel { font-weight: 600; font-size: 17px; }
.kachel-zahlen { font-size: 13px; }
.kachel .marke-klein { align-self: flex-start; }
.kacheln.module { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 8px 0 8px; }
.kachel.modul { align-items: flex-start; min-height: 120px; }
.kachel.modul svg { color: var(--akzent); }
.kachel.modul.aus { opacity: .55; cursor: default; }
.kachel.modul.aus svg { color: var(--leise); }
a.knopf { display: inline-block; padding: 9px 16px; border-radius: 6px; background: var(--akzent); color: #fff; text-decoration: none; font-weight: 500; }
a.knopf:hover { filter: brightness(1.08); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
/* Aufmaßprüfung: Prüfliste */
table.aufmass td { vertical-align: top; font-size: 13px; }
table.aufmass .aktionen { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
table.aufmass details summary { cursor: pointer; margin-top: 2px; }
ul.teile { margin: 4px 0 0; padding-left: 16px; max-height: 220px; overflow-y: auto; font-size: 12px; }
.fehler-text { color: var(--rot); }
