/* aiyaro flow – helles Design */
:root {
  --bg: #f4f5f9; --flaeche: #fff; --spalte: #eceef4; --rand: #e1e4ec; --text: #1b2130; --leise: #667085; --hover: #f0f2f7;
  --akzent: #5b5bd6; --akzent-h: #4a4ac4; --akzent-weich: #ececfb; --rot: #e03131; --gelb: #e67700; --gruen: #2b8a3e;
  --radius: 10px; --schatten: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.leise { color: var(--leise); } .klein { font-size: 12.5px; }
.laden { padding: 40px; text-align: center; color: var(--leise); }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--rand); background: var(--flaeche); cursor: pointer; font-weight: 500; }
.knopf:hover { background: var(--hover); }
.knopf.primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf.primaer:hover { background: var(--akzent-h); }
.knopf.geist { background: transparent; border-color: transparent; color: var(--leise); }
.knopf.geist:hover { background: rgba(0,0,0,.05); color: var(--text); }
.knopf.gefahr { color: var(--rot); }
.knopf.klein { padding: 5px 10px; font-size: 13px; }
.knopf.breit { width: 100%; } .knopf.links { justify-content: flex-start; }
.knopf:disabled { opacity: .6; cursor: default; }
.icon-knopf { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--leise); cursor: pointer; flex: none; }
.icon-knopf:hover { background: rgba(0,0,0,.06); color: var(--text); }
.icon-knopf.klein { width: 24px; height: 24px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--rand); background: var(--flaeche); cursor: pointer; font-size: 13px; white-space: nowrap; }
.chip:hover { background: var(--hover); }
.chip.an { background: var(--akzent-weich); border-color: var(--akzent); color: var(--akzent-h); }
.punkt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], textarea {
  border: 1px solid var(--rand); border-radius: 8px; padding: 8px 10px; background: #fff; outline: none; width: 100%; }
input:focus, textarea:focus { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-weich); }
textarea { resize: vertical; }

/* Avatar */
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 600; flex: none; }
.avatar.klein { width: 24px; height: 24px; font-size: 10.5px; }
.avatar-knopf { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }

/* Anmeldung */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 20% 0%, #e9e9fb, transparent 50%), var(--bg); }
.login-karte { width: 100%; max-width: 380px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 16px; padding: 28px; box-shadow: 0 10px 30px rgba(16,24,40,.08); display: grid; gap: 8px; }
.login-karte label { font-size: 13px; font-weight: 600; margin-top: 6px; }
.login-karte .knopf { margin-top: 10px; padding: 10px; }
.login-fehler { color: var(--rot); font-size: 13px; min-height: 18px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; letter-spacing: -.01em; }
.logo img { width: 26px; height: 26px; }
.logo b { color: var(--akzent); }
.logo.gross { font-size: 24px; } .logo.gross img { width: 34px; height: 34px; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--flaeche); border-bottom: 1px solid var(--rand); }
.kopf-links { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kopf-rechts { position: relative; }
.zurueck { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--leise); }
.zurueck:hover { background: var(--hover); color: var(--text); }
.board-titel { display: flex; align-items: center; gap: 12px; min-width: 0; }
.board-titel h1 { font-size: 18px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mitglieder { display: flex; } .mitglieder .avatar { margin-left: -6px; border: 2px solid #fff; }
.menu { position: absolute; right: 0; top: 42px; background: #fff; border: 1px solid var(--rand); border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.12); min-width: 220px; padding: 6px; display: none; }
.menu.offen { display: block; }
.menu-name { padding: 8px 10px; font-weight: 600; display: grid; } .menu-name small { color: var(--leise); font-weight: 400; }
.menu-punkt { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 8px 10px; border-radius: 7px; cursor: pointer; text-align: left; }
.menu-punkt:hover { background: var(--hover); }

/* Übersicht */
.uebersicht { max-width: 1040px; margin: 0 auto; padding: 24px 16px 60px; }
.uebersicht h1 { font-size: 24px; margin: 4px 0 20px; }
.uebersicht h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--leise); margin: 28px 0 10px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.kachel { display: grid; gap: 4px; align-content: start; min-height: 96px; padding: 16px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); cursor: pointer; text-align: left; }
.kachel strong::before { content: ''; display: block; width: 28px; height: 4px; border-radius: 2px; background: var(--farbe, var(--akzent)); margin-bottom: 10px; }
.kachel:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,24,40,.08); }
.kachel strong { font-size: 16px; } .kachel small { color: var(--leise); }
.kachel.neu { border: 1px dashed #c7cbd6; background: transparent; box-shadow: none; color: var(--leise); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500; }
.meine { list-style: none; margin: 0; padding: 0; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; }
.meine li + li { border-top: 1px solid var(--rand); }
.meine a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 11px 14px; }
.meine a:hover { background: var(--hover); }
.meine small { color: var(--leise); grid-column: 1; }
.meine .frist { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.frist, .badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--leise); }
.frist .ic, .badge .ic { width: 13px; height: 13px; }
.rot { color: var(--rot) !important; } .gelb { color: var(--gelb) !important; } .gruen { color: var(--gruen) !important; }

/* Board */
.board-leiste { padding: 10px 16px 0; }
.filter { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.suche { display: flex; align-items: center; gap: 6px; margin-left: auto; padding: 0 10px; border: 1px solid var(--rand); border-radius: 999px; background: #fff; color: var(--leise); }
.suche input { border: 0; padding: 5px 0; width: 160px; box-shadow: none !important; }
.spalten { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px 24px; overflow-x: auto; height: calc(100vh - 110px); scroll-snap-type: x proximity; }
.spalte { flex: 0 0 290px; max-height: 100%; display: flex; flex-direction: column; background: var(--spalte); border-radius: 12px; scroll-snap-align: start; }
.spalte-kopf { display: flex; align-items: center; gap: 6px; padding: 10px 8px 6px 12px; cursor: grab; }
.spalte-name { font-size: 14px; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spalte-input { padding: 4px 8px !important; font-weight: 600; flex: 1; }
.zahl { font-size: 12px; color: var(--leise); background: rgba(0,0,0,.06); border-radius: 999px; padding: 1px 8px; }
.karten { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 8px; overflow-y: auto; min-height: 24px; }
.neu-spalte { background: transparent; padding: 0; }
.neu-spalte .knopf { background: rgba(0,0,0,.04); padding: 12px; }
.karte-neu { padding: 0 8px 10px; display: grid; gap: 6px; }
.karte-neu .zeile { display: flex; gap: 6px; align-items: center; }
.karte { background: var(--flaeche); border-radius: 9px; padding: 9px 11px; box-shadow: var(--schatten); cursor: pointer; border: 1px solid transparent; display: grid; gap: 6px; }
.karte:hover { border-color: #cfd3df; }
.karte:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.karte-titel { word-break: break-word; }
.labels { display: flex; flex-wrap: wrap; gap: 4px; }
.label { font-size: 11px; font-weight: 600; color: #fff; padding: 1px 7px; border-radius: 5px; line-height: 17px; }
.karte-fuss { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.avatare { display: flex; } .avatare .avatar { margin-left: -5px; border: 2px solid #fff; }
.geist-karte { opacity: .4; background: var(--akzent-weich); }
.sortable-chosen .karte, .karte.sortable-chosen { box-shadow: 0 8px 20px rgba(16,24,40,.15); }

/* Dialog */
.dialog-hg { position: fixed; inset: 0; background: rgba(15,20,35,.35); z-index: 50; display: grid; place-items: start center; padding: 40px 16px; overflow-y: auto; }
.dialog { width: 100%; max-width: 720px; background: var(--flaeche); border-radius: 14px; box-shadow: 0 20px 60px rgba(16,24,40,.25); padding: 18px 22px 22px; display: grid; gap: 16px; }
.dialog-kopf { display: flex; align-items: center; justify-content: space-between; }
.dialog-ort { color: var(--leise); font-size: 13px; }
.dialog-titel { font-size: 20px; font-weight: 650; border-color: transparent !important; padding: 4px 6px; margin: -8px 0 -6px -6px; resize: none; overflow: hidden; box-shadow: none !important; }
.dialog-titel:hover:not([readonly]) { background: var(--hover); }
.dialog-titel:focus { border-color: var(--akzent) !important; background: #fff; }
.dialog-raster { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; }
.feld { display: grid; gap: 8px; align-content: start; }
.feld.breit { grid-column: 1 / -1; }
.feld h3 { display: flex; align-items: center; gap: 6px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--leise); margin: 0; }
.feld h3 small { margin-left: auto; text-transform: none; letter-spacing: 0; }
.feld input[type=date] { width: auto; }
.wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.label-wahl { border: 1.5px solid; border-radius: 6px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.person-wahl { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--rand); border-radius: 999px; background: #fff; cursor: pointer; font-size: 13px; }
.person-wahl.an { background: var(--akzent-weich); border-color: var(--akzent); }
.label-wahl:disabled, .person-wahl:disabled { cursor: default; }
.beschreibung { min-height: 90px; }
.fortschritt { height: 6px; background: var(--spalte); border-radius: 99px; overflow: hidden; }
.fortschritt span { display: block; height: 100%; background: var(--gruen); transition: width .2s; }
.checkliste { display: grid; gap: 4px; }
.check-punkt { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 6px; }
.check-punkt:hover { background: var(--hover); }
.check-punkt label { display: flex; align-items: flex-start; gap: 8px; flex: 1; cursor: pointer; }
.check-punkt input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--gruen); }
.check-punkt.erledigt span { text-decoration: line-through; color: var(--leise); }
.kommentare { display: grid; gap: 12px; }
.kommentar-neu { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; }
.kommentar { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.kommentar-kopf { display: flex; gap: 8px; align-items: baseline; } .kommentar-kopf small { color: var(--leise); }
.kommentar p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; background: var(--hover); padding: 8px 10px; border-radius: 8px; }
.verlauf summary { cursor: pointer; color: var(--leise); font-size: 13px; }
.verlauf ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; font-size: 13px; }
.verlauf small { color: var(--leise); }
.dialog-fuss { display: flex; justify-content: flex-end; border-top: 1px solid var(--rand); padding-top: 12px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 16px); background: #1b2130; color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s; z-index: 99; max-width: calc(100% - 32px); }
.toast.an { opacity: 1; transform: translate(-50%, 0); } .toast.fehler { background: var(--rot); }

@media (max-width: 700px) {
  .spalte { flex-basis: 84vw; }
  .spalten { height: calc(100vh - 106px); scroll-snap-type: x mandatory; }
  .suche input { width: 110px; }
  .dialog-hg { padding: 0; }
  .dialog { border-radius: 0; min-height: 100%; padding: 14px 16px 30px; }
  .dialog-raster { grid-template-columns: 1fr; }
  .board-titel .mitglieder { display: none; }
}

/* Stufe 2: Diktat, KI, Nachrichten */
.diktat-start { margin-left: 4px; }
.glocke-wrap { position: relative; display: inline-flex; margin-right: 6px; vertical-align: middle; }
.glocke { position: relative; width: 34px; height: 34px; }
.glocke .ic { width: 19px; height: 19px; }
.zahl-punkt { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--rot); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.kopf-rechts { display: flex; align-items: center; }
.menu.nachrichten { width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; right: -40px; }
.nachricht-liste { list-style: none; margin: 0; padding: 0; }
.nachricht-liste a { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 10px; border-radius: 8px; }
.nachricht-liste a:hover { background: var(--hover); }
.nachricht-liste li.neu a { background: var(--akzent-weich); }
.nachricht-liste p { margin: 2px 0; white-space: pre-wrap; word-break: break-word; }
.leer { padding: 6px 10px 10px; }
.nachricht-feld summary { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--leise); font-size: 13px; font-weight: 600; }
.nachricht-feld[open] { gap: 8px; }
.ki-chip { margin-left: auto; color: var(--akzent-h); border-color: #cfcff5; text-transform: none; letter-spacing: 0; font-weight: 500; }
.feld h3 small + .ki-chip { margin-left: 8px; }
.ki-box { background: #f7f7fe; border: 1px solid #dcdcf7; border-radius: 10px; padding: 12px; display: grid; gap: 6px; }
.ki-box ul { margin: 0; padding-left: 18px; }
.ki-kopf { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--akzent-h); }
.ki-zeile { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.ki-zeile input { margin-top: 3px; accent-color: var(--akzent); }
.zeile { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.diktat { max-width: 760px; }
.diktat-titel { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0; }
.diktat-inhalt { display: grid; gap: 12px; }
.diktat-mic { display: flex; align-items: center; gap: 14px; }
.mic-knopf { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--akzent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: 0 6px 16px rgba(91,91,214,.3); }
.mic-knopf .ic { width: 28px; height: 28px; }
.mic-knopf:disabled { background: #c9cbd6; box-shadow: none; cursor: default; }
.mic-knopf.an { background: var(--rot); animation: puls 1.6s infinite; }
@keyframes puls { 0% { box-shadow: 0 0 0 0 rgba(224,49,49,.45); } 70% { box-shadow: 0 0 0 14px rgba(224,49,49,0); } 100% { box-shadow: 0 0 0 0 rgba(224,49,49,0); } }
.diktat-status { color: var(--leise); }
.diktat-text { min-height: 160px; font-size: 15px; line-height: 1.55; }
.ki-zusammenfassung { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; background: var(--akzent-weich); border-radius: 10px; color: var(--akzent-h); }
.abschnitt { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--leise); margin: 6px 0 -4px; }
.vorschlag { border: 1px solid var(--rand); border-radius: 10px; padding: 12px; display: grid; gap: 8px; background: #fff; }
.vorschlag.aus { opacity: .45; }
.vorschlag-kopf { display: flex; align-items: center; gap: 10px; }
.vorschlag-kopf input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--akzent); flex: none; }
.vorschlag-kopf input[type=text] { font-weight: 600; }
.vorschlag-raster { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.vorschlag-raster label { display: grid; gap: 4px; font-size: 12px; color: var(--leise); font-weight: 600; }
.vorschlag select { font: inherit; padding: 7px 9px; border: 1px solid var(--rand); border-radius: 8px; background: #fff; }
.label-wahl.klein { padding: 2px 8px; font-size: 12px; }
.dialog-fuss.zwischen { justify-content: space-between; }
@media (max-width: 700px) { .diktat-start span, .diktat-start { padding: 5px 8px; } .vorschlag-raster { grid-template-columns: 1fr; } .menu.nachrichten { right: -44px; } }
.vorschlaege { display: grid; gap: 10px; }

/* Stufe 3: Erwähnungen, Benachrichtigungen */
.erwaehnen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 0 32px; }
.klein-chip { padding: 2px 9px; font-size: 12px; }
.erwaehnung { color: var(--akzent-h); font-weight: 600; }
.art { font-size: 11.5px; color: var(--akzent-h); background: var(--akzent-weich); border-radius: 5px; padding: 0 6px; }
.art-zugewiesen { color: #2b6a3e; background: #e6f4ea; } .art-kommentar { color: var(--leise); background: var(--hover); }
.klein-dialog { max-width: 520px; }
.einstellungen { display: grid; gap: 14px; }
.einstellung { border: 1px solid var(--rand); border-radius: 10px; padding: 14px; display: grid; gap: 8px; }
.einstellung h3 { margin: 0; font-size: 14.5px; }
.einstellung p { margin: 0; }

/* Stufe 4: Gastlinks, Demo */
.gastlinks { display: grid; gap: 8px; }
.gastlink { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; border: 1px solid var(--rand); border-radius: 10px; padding: 10px 12px; }
.gastlink > div:first-child { display: grid; }
.demo-link { display: inline-flex; align-items: center; gap: 6px; color: var(--akzent-h); font-weight: 600; }
.demo-link small { color: var(--leise); font-weight: 400; }
.einstellung select, .einstellung input[type=text] { font: inherit; padding: 7px 9px; border: 1px solid var(--rand); border-radius: 8px; background: #fff; width: 100%; }

/* Claude-Verbindung */
.mcp-neu:empty { display: none; }
.mcp-neu { margin-top: 12px; padding: 12px; border-radius: 10px; background: #f4f4ff; border: 1px solid #dcdcf7; }
.mcp-url { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; margin: 6px 0; }
.mcp-schritte { margin: 10px 0 6px 18px; padding: 0; line-height: 1.6; font-size: 14px; }
/* OAuth-Anmeldung für Claude */
.login-karte form { display: grid; gap: 8px; }
.login-karte form.zeile { display: flex; gap: 8px; flex-wrap: wrap; }
.login-karte h2 { font-size: 18px; margin: 10px 0 0; }
.login-karte p { margin: 4px 0; }
.mcp-schritte li.ohne-nr { list-style: none; margin-left: -18px; display: flex; gap: 6px; align-items: center; }
.mcp-schritte li.ohne-nr .mcp-url { margin: 0; flex: 1; }
details.einstellung summary { cursor: pointer; font-weight: 600; }
