/* Dokki Webapp – Gespräch, Terminübersicht, Zeugnisbefunde. Baut auf basis.css und web.css auf. */

/* ---------- Einstieg in der Seitenleiste ---------- */
#nav-gespraech { margin-bottom: -8px; }
.gespraechknopf {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-m);
  background: var(--tinte); color: var(--auf-tinte); font-weight: 600; text-decoration: none; box-shadow: var(--schatten);
}
.gespraechknopf:hover { background: var(--tinte-kraeftig); }
.gespraechknopf.an { box-shadow: 0 0 0 3px var(--tinte-zart), var(--schatten); }

.gastleiste {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 36px 6px; padding: 10px 14px;
  border-radius: var(--r-m); border: 1.5px dashed var(--linie-stark); background: var(--honig-zart); font-size: 13.5px;
}
.gastleiste span { flex: 1; min-width: 200px; }

/* ---------- Gespräch ---------- */
.gespraech { display: flex; flex-direction: column; padding: 0; overflow: hidden; min-height: 0; }
.gespraech.hoch { height: calc(100vh - 136px); min-height: 460px; max-height: 900px; }
.spalte.haftet { position: sticky; top: 84px; }
.g-kopf { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; }
.g-kopf > div { flex: 1; display: grid; line-height: 1.3; }
.g-kopf small { font-size: 12.5px; }
.g-bezug { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; border-bottom: 1px solid var(--linie); }
.g-bezugchip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--linie-stark); background: var(--grund); color: var(--text-2); font-size: 12.5px; font-weight: 600; text-decoration: none; text-align: left;
}
a.g-bezugchip:hover, button.g-bezugchip:hover { border-color: var(--tinte); color: var(--tinte); }
.g-bezugchip.fest { border-style: dashed; }
.g-verlauf { flex: 1; min-height: 120px; overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; background: var(--grund); }
.gespraech.kompakt .g-verlauf { max-height: 400px; }
.g-nachricht { display: grid; gap: 4px; min-width: 0; }
.g-nachricht.du { justify-items: end; }
.g-nachricht.dokki { justify-items: start; }
.g-nachricht time { font-size: 11.5px; color: var(--text-3); }
.g-nachricht .blase { max-width: min(94%, 580px); font-size: 14.5px; min-width: 0; }
.blase p + p { margin-top: 8px; }
.g-nachricht .blase.dokki { background: var(--flaeche); border: 1px solid var(--linie); }
.g-stelle { display: flex; gap: 5px; align-items: center; font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: 6px; }
.g-zitate { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--linie-stark); }
.g-zitate .dach { width: 100%; }
.g-zitate .beleg { margin-top: 0; }
.g-system { display: flex; gap: 6px; align-items: center; justify-content: center; text-align: center; font-size: 12.5px; color: var(--text-2); padding: 2px 10px; }
.g-system svg { flex: none; }
.g-mehr { justify-self: center; font-size: 13px; font-weight: 600; }
.g-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
.g-chips .knopf { text-align: left; height: auto; white-space: normal; border-radius: 14px; font-weight: 500; justify-content: flex-start; }
.g-eingabe { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px 16px; }
.g-eingabe textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 160px; resize: none; padding: 10px 16px; border-radius: 22px;
  border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text); font: inherit; line-height: 1.4;
}
.g-eingabe textarea:focus { outline: 2px solid var(--tinte); outline-offset: 0; border-color: var(--tinte); }
.g-eingabe .knopf { min-height: 44px; }

/* Karten in Antworten */
.g-karte { display: grid; gap: 8px; margin-top: 10px; padding: 12px; border-radius: var(--r-m); background: var(--grund); border: 1px solid var(--linie); min-width: 0; }
.g-karte .knopf { justify-self: start; }
.g-karte.korrektur s { color: var(--siegel); text-decoration-thickness: 2px; }
.g-karte.lesarten > div { padding-left: 10px; border-left: 3px solid var(--honig); }
.g-karte.entwurf ul { display: grid; gap: 4px; }
.g-karte.entwurf li { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.g-karte.entwurf li.drin svg { color: var(--moos); }
.g-karte.entwurf li.raus { color: var(--text-2); font-weight: 500; }
.g-karte.entwurf li small { font-size: 12.5px; }
.g-karte.fakten button { display: grid; text-align: left; padding: 6px 8px; border: 0; border-radius: var(--r-s); background: none; color: inherit; }
.g-karte.fakten button:hover { background: var(--tinte-zart); }
.g-karte.fakten small { color: var(--text-2); font-size: 12.5px; }
.g-liste { display: grid; gap: 4px; padding-left: 18px; list-style: disc; font-size: 14px; }
.g-termin { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; padding: 4px; border-radius: var(--r-s); }
.g-termin:hover { background: var(--tinte-zart); }
.g-termin > span:nth-child(2) { flex: 1; display: grid; min-width: 0; }
.g-termin small { color: var(--text-2); font-size: 12.5px; }
.g-termin.erledigt b { text-decoration: line-through; color: var(--text-2); }
.g-termin > svg { color: var(--text-3); }

/* Einstieg auf der Startseite */
.fragkarte { padding: 6px; margin-bottom: 26px; }
.fragkarte .g-eingabe { padding: 8px 8px 4px; align-items: center; }
.fragkarte .g-chips { padding: 4px 10px 8px 54px; }

.abgleich.weit > div { grid-template-columns: 104px minmax(0, 1fr) auto; }

/* Gesprächsseite */
.gespraechsseite { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 24px; align-items: start; }
.zeile.an { background: var(--tinte-zart); }
.zweispaltig.fall { grid-template-columns: minmax(0, 1.08fr) minmax(340px, 1fr); }

/* ---------- Befunde zum Arbeitszeugnis ---------- */
.befunde { gap: 14px; }
.befund { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--linie); border-radius: var(--r-m); background: var(--grund); min-width: 0; }
.befund.einschaetzung { border-style: dashed; border-color: var(--honig); }
.befund h4 { margin: 0; font: 600 16.5px/1.3 var(--serif); }
.befund .b-kopf { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.befund .b-fuss { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.befund .g-karte { margin-top: 0; background: var(--flaeche); }
.befund .woher { background: var(--flaeche); }
.b-wahl { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px; border: 1px solid var(--linie-stark); border-radius: 999px; background: var(--flaeche); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.b-wahl:has(input:checked) { border-color: var(--tinte); background: var(--tinte-zart); }
.b-wahl:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.b-wahl input { accent-color: var(--tinte); width: 16px; height: 16px; margin: 0; }
.entscheid { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-m); background: var(--moos-zart); }
.entscheid .rund { background: var(--moos); color: var(--auf-tinte); }
.entscheid.offen { background: var(--siegel-zart); }
.entscheid.offen .rund { background: var(--siegel); color: #fff; }
.entscheid > div { display: grid; gap: 4px; flex: 1; min-width: 0; }
.entscheid .knopfreihe { margin-top: 6px; }
.naechster { display: grid; gap: 8px; justify-items: start; padding-top: 14px; border-top: 1px solid var(--linie); }
.fallbrief { display: grid; gap: 10px; }
.fb-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.fb-kopf > div { display: grid; min-width: 0; }
.brieftext.gekuerzt { max-height: 200px; overflow: auto; font-size: 13.5px; }
.fassungzeile { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-2); }
.fassungzeile svg { flex: none; }
.fassungen summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--tinte); }
.fassungen > div { display: grid; gap: 4px; margin-top: 12px; }
.pruefliste li.ausgelassen b { text-decoration: line-through; color: var(--text-2); font-weight: 500; }
.warum { margin-top: 12px; }

/* ---------- Termine, Fristen, Wiedervorlagen ---------- */
.t-art { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; border: 1.5px solid transparent; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.art-termin .t-art { background: var(--tinte); color: var(--auf-tinte); }
.art-frist .t-art { background: var(--siegel-zart); color: var(--siegel); border-color: var(--siegel); }
.art-erinnerung .t-art { color: var(--honig); border: 1.5px dashed var(--honig); border-radius: 7px; }
.t-art.mini { padding: 0; border: 0 !important; background: none !important; font-size: inherit; }
.art-termin .t-art.mini { color: var(--tinte); }

.terminliste { display: grid; gap: 10px; }
.terminzeile {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 18px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-l); box-shadow: var(--schatten); scroll-margin: 100px;
}
.terminliste.eng .terminzeile { box-shadow: none; background: var(--grund); padding: 12px 14px; }
.terminzeile.art-erinnerung { border-style: dashed; border-color: var(--honig); }
.terminzeile.erledigt { opacity: .72; }
.terminzeile.erledigt h3 { text-decoration: line-through; }
.terminzeile.hervor { outline: 3px solid var(--tinte); outline-offset: 2px; }
.t-datum { display: grid; justify-items: center; padding: 6px 0 8px; border-radius: var(--r-m); border: 1.5px solid transparent; line-height: 1.15; }
.t-datum b { font: 600 24px/1.1 var(--serif); }
.t-datum small, .t-datum span { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.art-termin .t-datum, .art-termin .datumsmarke { background: var(--tinte); color: var(--auf-tinte); }
.art-frist .t-datum, .art-frist .datumsmarke { background: var(--siegel-zart); color: var(--siegel); box-shadow: inset 0 0 0 1.5px var(--siegel); }
.art-erinnerung .t-datum, .art-erinnerung .datumsmarke { background: transparent; color: var(--honig); box-shadow: none; border: 1.5px dashed var(--honig); }
.art-termin .datumsmarke b, .art-frist .datumsmarke b, .art-erinnerung .datumsmarke b { color: inherit; }
.t-kopf { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.terminzeile h3 { font-size: 18px; margin: 6px 0 8px; }
.t-meta { display: grid; gap: 5px; font-size: 13.5px; }
.t-zeile { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.t-zeile > :nth-child(2) { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; min-width: 0; }
.t-wen { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.t-wen .avatar { width: 22px; height: 22px; font-size: 9px; }
.t-herkunft { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.t-vorgang { display: inline-flex; gap: 5px; align-items: center; font-weight: 600; }
.t-knoepfe { display: grid; gap: 6px; }
.abschnitt.warn { color: var(--siegel); }
.terminseite section { display: grid; gap: 12px; }
.erledigte { margin-top: 6px; }
.erledigte summary { cursor: pointer; font: 600 17px var(--serif); padding: 6px 0 12px; }
.reiter i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.reiter.art-termin i { background: var(--tinte); }
.reiter.art-frist i { background: var(--siegel); }
.reiter.art-erinnerung i { border: 1.5px dashed var(--honig); }
.reiter.an i { filter: brightness(1.5); }

.kalender { gap: 18px; }
.k-monat b { display: block; margin-bottom: 8px; font-family: var(--serif); font-size: 16px; }
.k-raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12.5px; }
.k-raster em { font-style: normal; color: var(--text-3); font-size: 11px; font-weight: 700; padding-bottom: 4px; }
.k-tag { position: relative; display: grid; place-items: center; height: 36px; padding: 0 0 6px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-variant-numeric: tabular-nums; }
.k-tag.heute { box-shadow: inset 0 0 0 1.5px var(--text); color: var(--text); font-weight: 700; }
button.k-tag { background: var(--flaeche-2); color: var(--text); font-weight: 700; }
button.k-tag:hover { background: var(--tinte-zart); }
.k-tag span { position: absolute; bottom: 4px; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; }
.k-tag i { width: 5px; height: 5px; border-radius: 50%; }
.k-tag i.art-termin { background: var(--tinte); }
.k-tag i.art-frist { background: var(--siegel); }
.k-tag i.art-erinnerung { background: var(--honig); }
.k-tag i.erledigt { opacity: .35; }
.legende-termine > div { display: grid; gap: 4px; justify-items: start; }
.zeile.alle b { color: var(--tinte); font-size: 13.5px; }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 1100px) {
  .zweispaltig.fall, .gespraechsseite { grid-template-columns: minmax(0, 1fr); }
  .spalte.haftet { position: static; }
  .gespraech.hoch { height: auto; max-height: none; min-height: 0; }
  .gespraech.hoch .g-verlauf { max-height: 62vh; }
}
@media (max-width: 860px) {
  .gastleiste { margin: 0 14px 6px; }
  .fussnav button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; border-radius: var(--r-s); background: none; color: var(--text-2); font: 600 10.5px var(--sans); letter-spacing: -.01em; }
  .fussnav button.an { color: var(--tinte); }
  .fussnav .mitte b { display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: var(--tinte); color: var(--auf-tinte); box-shadow: 0 0 0 4px var(--flaeche), var(--schatten); }
  .fussnav .mitte.an b { background: var(--tinte-kraeftig); box-shadow: 0 0 0 4px var(--tinte-zart), var(--schatten); }
  .mehrblatt { position: absolute; right: 8px; bottom: calc(100% + 8px); display: grid; gap: 2px; width: 230px; padding: 8px; box-shadow: var(--schatten-hoch); }
  .fussnav .mehrblatt a { display: flex; align-items: center; justify-items: start; gap: 12px; padding: 11px 12px; font-size: 14.5px; letter-spacing: 0; }
  .fussnav .mehrblatt a:hover, .fussnav .mehrblatt a.an { background: var(--tinte-zart); }
  .fussnav .mehrblatt .zaehler { position: static; margin-left: auto; }
  .terminzeile { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .t-knoepfe { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; }
  .t-zeile { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .t-datum b { font-size: 21px; }
  .fragkarte .g-chips { padding-left: 10px; }
  .g-eingabe .knopf span { display: none; }
  .g-eingabe .knopf { padding-inline: 14px; }
}

/* Die Vorführleiste weicht dem Gespräch: auf großen Bildschirmen sitzt sie oben rechts */
@media (min-width: 861px) {
  #vorfuehrung, body:has(.aktionsleiste) #vorfuehrung { top: 15px; bottom: auto; right: 18px; }
}
@media (max-width: 860px) {
  body:has(.gespraech) #vorfuehrung { bottom: auto; top: 62px; right: 10px; }
}
body:has(.aktionsleiste) .meldung { bottom: 100px; }

/* Herkunft als Fließtext, damit Symbol und Text beieinander bleiben */
.t-herkunft { display: inline; }
.t-herkunft > svg { display: inline; vertical-align: -2px; margin-right: 4px; }
.t-herkunft .beleg { vertical-align: middle; }
.terminliste.eng .terminzeile { grid-template-columns: 54px minmax(0, 1fr); }
.terminliste.eng .t-knoepfe { grid-column: 1 / -1; grid-auto-flow: column; justify-content: start; }
.terminliste.eng .t-zeile { grid-template-columns: 78px minmax(0, 1fr); }

/* Das Original bleibt beim Lesen der Einschätzung im Blick */
@media (min-width: 1101px) {
  .dokansicht > .spalte:first-child { position: sticky; top: 84px; }
}
.t-zeile > .t-herkunft { display: block; }
