/* Fallliste, Fallkarte, Aufgaben, Auswahl in den Blättern. */
.filter { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: 1rem; }
.filter button {
  min-height: var(--ziel); padding: 0 .875rem; background: var(--hemd);
  border: 1px solid var(--linie); border-radius: 2px;
}
.filter button:hover { border-color: var(--rand); }
.filter button[aria-pressed="true"] { background: var(--wand); border-color: var(--wand); color: #fff; font-weight: 600; }
.suche { margin-bottom: 1rem; max-width: 30rem; }

.fallzeile { display: flex; gap: .75rem; align-items: center; justify-content: space-between; }
.fallzeile > a { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.fallzeile > a > * { display: block; }
.fallzeile-kopf { display: flex !important; flex-wrap: wrap; gap: .125rem .625rem; align-items: center; }
.fallzeile-kopf strong { font: 500 1.1875rem/1.25 var(--titel); color: var(--bordeaux-tief); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.pille { display: inline-block; padding: 0 .5rem; border-radius: 2px; font-size: .9063rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.pille-offen { background: #fdeedd; color: #8a4b00; }
.pille-in_bearbeitung { background: #e1ecf8; color: #1565c0; }
.pille-wartet_kunde { background: #f6efc9; color: #5a4500; }
.pille-wartet_ergo { background: #f0e4f6; color: #6a1b9a; }
.pille-reguliert { background: #e3f1ea; color: #1d5a43; }
.pille-abgelehnt { background: #f8e1e1; color: #9b1c1c; }
.pille-erledigt { background: #e9ecea; color: #47544e; }

/* Fallkarte: Karteikarte mit Reiter */
.zurueck { display: inline-flex; align-items: center; min-height: var(--ziel); margin-bottom: .25rem; }
.reiter {
  display: inline-block; padding: .25rem 1.25rem .25rem 1rem;
  background: var(--wand); color: #fff; font-weight: 600; font-size: .9688rem;
}
.karte-innen { padding: 1.25rem 1rem; background: var(--hemd); border: 1px solid var(--linie); border-top: 4px solid var(--wand); }
.karte-innen h1 { margin-bottom: .125rem; }
.karte-spalten { display: grid; gap: 0 2.5rem; }
.karte-spalten > div { min-width: 0; }
.karte-spalten h2 { font-size: 1.25rem; margin: 1.75rem 0 .5rem; }

.status-wahl { display: grid; grid-template-columns: repeat(2, 1fr); gap: .375rem; }
.status-wahl button {
  min-height: var(--ziel); padding: .25rem .5rem; background: var(--hemd);
  border: 1px solid var(--rand); border-radius: 2px; font-weight: 600; line-height: 1.2;
}
.status-wahl button[aria-pressed="true"] { background: var(--wand); border-color: var(--wand); color: #fff; }

.zustaendig { display: grid; gap: 1rem; }
.zustaendig .knopf { width: 100%; margin-top: .5rem; }
.zustaendig small { display: block; margin-top: .25rem; font-weight: 400; }
.zustaendig .hinweis-gelb { margin-top: .375rem; }
.schritt { display: grid; gap: .75rem; }
.freitext { display: grid; gap: .75rem; margin-top: 1.25rem; }

.verlauf-kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; }
.verlauf-kopf h2 { margin: 0; }
.verlauf { margin-top: .75rem; }
.verlauf li { position: relative; padding: 0 0 1rem 1.125rem; border-left: 2px solid var(--linie); }
.verlauf li:first-child { border-left-color: var(--eiche); }
.verlauf li::before { content: ""; position: absolute; left: -6px; top: .45rem; width: 10px; height: 10px; background: var(--eiche); }
.verlauf time { display: block; font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Kleine Listen in der Fallkarte und Aufgaben */
.aufgabe { display: flex; gap: .75rem; align-items: center; justify-content: space-between; }
.aufgabe-text { min-width: 0; }
.aufgabe-text strong { display: block; font-weight: 600; line-height: 1.3; }
.aufgabe-text a { color: var(--bordeaux); display: inline-flex; align-items: center; min-height: 2.75rem; }
.aufgabe-text small { display: block; }
.aufgabe-erledigt strong { text-decoration: line-through; font-weight: 400; color: var(--leise); }
.ueberfaellig { color: var(--bordeaux); font-weight: 700; }
.haken-knopf { flex: none; min-width: 6.5rem; }

.datei { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; justify-content: space-between; }
.datei-name { min-width: 0; }
.datei-name strong { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.kleine-liste-kopf { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin: 1.75rem 0 .5rem; }
.kleine-liste-kopf h2 { margin: 0 !important; }
.kleine-leere { padding: .75rem 1rem; color: var(--leise); }

/* Auswahl in den Blättern */
.wahl-raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: .375rem; }
.wahl-liste { display: grid; gap: .375rem; max-height: 55dvh; overflow-y: auto; padding: 2px; }
.wahl {
  width: 100%; min-height: 3.25rem; padding: .5rem .75rem; text-align: left; line-height: 1.25;
  background: var(--rose); border: 1px solid var(--linie); border-radius: 2px;
}
.wahl:hover { border-color: var(--bordeaux); }
.wahl strong, .wahl span { display: block; }
.wahl span { font-size: .9375rem; color: var(--leise); }

.vorschlag { display: grid; gap: .25rem; }
.vorschlag > a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.vorschlag > span { color: var(--leise); }
.vorschlag label { margin-top: .5rem; }
.vorschlag .hinweis-gelb { margin-top: .375rem; }

@media (min-width: 48rem) {
  .karte-innen { padding: 1.5rem 1.75rem; }
  .status-wahl { grid-template-columns: repeat(4, 1fr); }
  .schritt { grid-template-columns: 2fr 1fr auto; align-items: end; }
  .schritt h2 { grid-column: 1 / -1; margin-bottom: 0; }
}
@media (min-width: 75rem) {
  .karte-spalten { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .schritt { grid-template-columns: 1fr 10rem; }
  .schritt .knopf { grid-column: 1 / -1; justify-self: start; }
}

/* Fallliste wie in der Team-Demo */
.fall-filter { display: grid; gap: .75rem; margin-bottom: .75rem; }
.fall-filter label { display: grid; gap: .25rem; font-weight: 600; }
.fall-filter .suche { margin: 0; max-width: none; }
.fall-anzahl { color: var(--leise); margin-bottom: .5rem; }
.fall-liste { background: var(--hemd); border: 1px solid var(--linie); }
.fall-tabelle { width: 100%; border-collapse: collapse; }
.fall-tabelle th { text-align: left; font-size: .9375rem; color: var(--leise); padding: .5rem .75rem; border-bottom: 2px solid var(--linie); }
.fall-tabelle td { padding: .75rem; border-top: 1px solid var(--linie); vertical-align: top; }
.fall-tabelle thead { display: none; }
.fall-tabelle tr.fall-ohne { background: var(--rose); }
.fall-tabelle td[data-label]::before { content: attr(data-label) ": "; color: var(--leise); font-size: .9063rem; }
.fall-titel { display: flex; gap: .625rem; align-items: flex-start; }
.fall-titel small { display: block; color: var(--leise); }
.fall-titel a { font-weight: 600; }
.fall-eintragen { text-align: right; }
.nur-leser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Art-Symbol */
.art-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; font: 700 1rem/1 var(--schrift); color: #fff; background: var(--rand);
}
.art-schaden { background: var(--bordeaux); }
.art-vorfall { background: var(--eiche-tief); }
.art-anliegen { background: var(--blau); }

/* Fallkarte im Aufbau der Team-Demo */
.fall-kopf { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin-bottom: 1rem; }
.fall-kopf .art-icon { width: 2.5rem; height: 2.5rem; font-size: 1.375rem; }
.fall-kopf > div { flex: 1; min-width: 12rem; }
.fall-kopf h1 { margin-bottom: 0; }
.fall-spalten { display: grid; gap: 1rem 1.5rem; align-items: start; }
.fall-spalten > div { min-width: 0; display: grid; gap: 1rem; }
.fall-karte { background: var(--hemd); border: 1px solid var(--linie); border-top: 3px solid var(--wand); padding: 1rem; display: grid; gap: .75rem; }
.fall-karte h2 { font-size: 1.1875rem; margin: 0; }
.fall-karte label { display: grid; gap: .25rem; font-weight: 600; }
.fall-karte .kleine-liste-kopf { margin: 0; }
.status-zeile { margin: 0; }
.angaben { display: grid; gap: .5rem; margin: 0; }
.angaben > div { display: grid; grid-template-columns: minmax(7rem, 9rem) 1fr; gap: .5rem; }
.angaben dt { color: var(--leise); }
.angaben dd { margin: 0; overflow-wrap: anywhere; }
.kurzliste li { padding: .5rem 0; border-top: 1px solid var(--linie); }
.kurzliste small { display: block; color: var(--leise); }
.hergang { white-space: pre-wrap; margin: 0; }
.schadenfelder { display: grid; gap: .75rem; border: 1px solid var(--linie); padding: .75rem; }
.schadenfelder[hidden] { display: none; }
.fall-karte textarea, .blatt-form textarea { width: 100%; min-height: 4.5rem; font: inherit; padding: .5rem; border: 1px solid var(--rand); border-radius: 2px; }

.dropzone {
  position: relative; display: grid; gap: .25rem; justify-items: center; text-align: center; padding: 1.25rem 1rem; cursor: pointer;
  border: 2px dashed var(--rand); background: var(--rose);
}
.dropzone small { font-weight: 400; color: var(--leise); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within, .dropzone-aktiv { border-color: var(--bordeaux); background: var(--rose-2); }

@media (min-width: 48rem) {
  .fall-filter { grid-template-columns: 2fr 1fr 1fr 1fr; align-items: end; }
  .fall-tabelle thead { display: table-header-group; }
  .fall-tabelle td[data-label]::before { content: none; }
}
@media (max-width: 47.99rem) {
  .fall-tabelle, .fall-tabelle tbody, .fall-tabelle tr, .fall-tabelle td { display: block; }
  .fall-tabelle td { border-top: 0; padding: .25rem .875rem; }
  .fall-tabelle tr { padding: .5rem 0; border-top: 1px solid var(--linie); }
}
@media (min-width: 75rem) {
  .fall-spalten { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
