/* Geisterhand CRM. Ruhiges, dichtes Arbeitswerkzeug, mobil zuerst. Amber heißt hier immer: Da wartet jemand auf einen Anruf. */

@font-face {
  font-family: "Outfit";
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/outfit-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-opsz-de.woff2") format("woff2");
}

:root {
  --color-navy: #0F1E2E;
  --color-navy-900: #0A1622;
  --color-navy-800: #16293B;
  --color-navy-700: #22394E;
  --color-amber: #E1861B;
  --color-amber-600: #B96A0E;
  --color-amber-100: #FBEBD7;
  --color-amber-text: #8F5200;
  --color-cream: #F7F9FA;
  --color-cream-200: #F1F4F6;
  --color-white: #FFFFFF;
  --text-strong: #0F1E2E;
  --text-body: #33475B;
  --text-muted: #56697C;
  --text-on-amber: #1A1206;
  --border-subtle: #E2E7EB;
  --border-strong: #B9C2BE;
  --focus-ring: #E1861B;
  --state-success: #2F7A55;
  --state-error: #B4432E;
  --state-error-bg: #F7E7E2;
  --state-info: #2C5A78;
  --surface-page: #FAFBFC;
  --surface-card: #FFFFFF;
  --font-headline: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow-md: 0 8px 24px rgba(15, 30, 46, .16);
  --kurve: cubic-bezier(.25, 1, .5, 1);
  --rand: 16px;
  --rand-links: max(var(--rand), env(safe-area-inset-left));
  --rand-rechts: max(var(--rand), env(safe-area-inset-right));
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--surface-page);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; }
img { display: block; }
[hidden] { display: none !important; }

a { color: var(--text-strong); }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
[tabindex="-1"]:focus { outline: none; }

.sym {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.unsichtbar {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Bewegung: nur transform und opacity, eine Kurve. Der Grundzustand ist immer sichtbar. */
@keyframes ein {
  from { opacity: 0; transform: translateY(8px); }
}
@keyframes auf {
  from { opacity: 0; transform: translateY(-8px); }
}
@keyframes erscheinen {
  from { opacity: 0; }
}
@keyframes drehen {
  to { transform: rotate(360deg); }
}
.einblenden { animation: ein .3s var(--kurve) backwards; }
.aufklappen { animation: auf .3s var(--kurve) backwards; }

/* Rahmen */
.seite {
  max-width: 1200px;
  margin-inline: auto;
  padding: env(safe-area-inset-top) var(--rand-rechts) calc(32px + env(safe-area-inset-bottom)) var(--rand-links);
}
.seite-schmal { max-width: 640px; }

.startbild {
  display: grid;
  place-items: center;
  min-height: 100dvh;
}

.leiste {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-inline: calc(-1 * var(--rand-links)) calc(-1 * var(--rand-rechts));
  padding-inline: var(--rand-links) var(--rand-rechts);
  background: rgba(250, 251, 252, .94);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
}
.zurueck {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin-left: -8px;
  padding-right: 12px;
  color: var(--text-strong);
  font-weight: 500;
  text-decoration: none;
}
.seitentitel {
  margin-block: 8px 16px;
  color: var(--text-strong);
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.ueberzeile {
  color: var(--text-muted);
  font-family: var(--font-headline);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.3;
  text-transform: uppercase;
}
.zwischentitel {
  color: var(--text-strong);
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 600;
}
.kleingedruckt {
  color: var(--text-muted);
  font-size: .875rem;
}

.karte {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}

/* Knöpfe. Die Hover-Fläche liegt als eigene Ebene darüber, damit nur opacity animiert wird. */
.knopf, .pille-filter, .weg, .symbolknopf, .textknopf {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .1s var(--kurve);
}
.knopf {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: normal;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.knopf-haupt { background: var(--color-navy); color: var(--color-white); }
.knopf-zweit { background: var(--surface-card); border-color: var(--border-strong); color: var(--text-strong); }
.knopf-gefahr { background: var(--state-error); color: var(--color-white); }
.knopf-zweit[aria-expanded="true"] { background: var(--color-navy); border-color: var(--color-navy); color: var(--color-white); }
.knopf-gross { min-height: 56px; }
.knopf:active, .pille-filter:active, .weg:active, .symbolknopf:active, .textknopf:active { transform: scale(.97); }
.knopf:disabled { cursor: default; opacity: .7; }
.knopf.laeuft::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: drehen .8s linear infinite;
}

.knopf::after, .pille-filter::after, .weg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--kurve);
}
@media (hover: hover) {
  .knopf:hover::after, .pille-filter:hover::after, .weg:hover::after { opacity: .08; }
  .textknopf:hover, .zurueck:hover, .symbolknopf:hover { opacity: .75; }
  .textknopf, .zurueck, .symbolknopf { transition: transform .1s var(--kurve), opacity .2s var(--kurve); }
}

.knopfreihe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.knopfreihe > .knopf { flex: 1 1 120px; }

.textknopf {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text-strong);
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.textknopf .sym { width: 14px; height: 14px; }

.symbolknopf {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  color: var(--text-body);
}

/* Felder. 16 px Schrift, sonst zoomt iOS beim Antippen. */
.feld {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.feld-name {
  color: var(--text-strong);
  font-size: .875rem;
  font-weight: 500;
}
.eingabe {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text-strong);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
}
.eingabe::placeholder { color: var(--text-muted); opacity: 1; }
select.eingabe {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356697C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px;
  text-overflow: ellipsis;
  cursor: pointer;
}
textarea.eingabe { resize: vertical; }
input[type="date"].eingabe, input[type="datetime-local"].eingabe { -webkit-min-logical-width: 0; }

.meldung { font-size: .875rem; font-weight: 500; }
.meldung-fehler { color: var(--state-error); }
.meldung-ok { color: var(--state-success); }

.formular, .formular-eng { display: grid; gap: 12px; min-width: 0; }

.zustand {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 44ch;
  margin-inline: auto;
  padding: 48px 16px;
  color: var(--text-muted);
  text-align: center;
}
.zustand-klein { padding: 16px; }
.zustand-laden {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: erscheinen .2s .15s var(--kurve) backwards;
}
.kreisel {
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--color-navy);
  border-radius: 50%;
  animation: drehen .8s linear infinite;
}

/* Anmeldung */
.anmeldung {
  display: grid;
  align-content: center;
  gap: 24px;
  width: 100%;
  max-width: 400px;
  min-height: 100dvh;
  margin-inline: auto;
  padding: calc(24px + env(safe-area-inset-top)) var(--rand-rechts) calc(24px + env(safe-area-inset-bottom)) var(--rand-links);
}
.anmeldung-form {
  display: grid;
  gap: 16px;
  padding: 24px 16px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}
.anmeldung-logo { justify-self: center; }
.anmeldung .kleingedruckt { text-align: center; }

/* Liste */
.seite-liste { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.warnungen:empty { display: none; }
.warnzeile {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--color-amber-100);
  border-radius: 10px;
  color: var(--color-amber-text);
  font-size: .875rem;
  font-weight: 500;
}
.warnzeile .sym { width: 18px; height: 18px; margin-top: 2px; }

.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  padding-top: 8px;
}
.kopf-logo { display: flex; align-items: center; min-height: 44px; margin-right: auto; }
.suchzeile {
  order: 3;
  display: flex;
  flex: 0 0 100%;
  gap: 8px;
  min-width: 0;
}
.suche {
  position: relative;
  flex: 1 1 0;
  min-width: 112px;
}
.suche .sym {
  position: absolute;
  top: 12px;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.suche .eingabe { padding-left: 40px; }
.suche input::-webkit-search-decoration { -webkit-appearance: none; }
.statuswahl { flex: 0 1 136px; min-width: 0; }
/* Ein gewählter Status steht ganz da, auch „Workshop vereinbart“. */
.statuswahl.hat-wahl { flex-basis: 208px; }

.neu-knopf {
  flex: none;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
}
.neu-knopf .sym { width: 24px; height: 24px; }
/* Am Handy nur das Plus im Kopf: Eine feste Fläche unten rechts läge immer über einer Karte. */
.neu-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.filterleiste {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-inline: calc(-1 * var(--rand-links)) calc(-1 * var(--rand-rechts));
  background: rgba(250, 251, 252, .94);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
}
.pillen {
  display: flex;
  gap: 8px;
  padding: 8px var(--rand-rechts) 8px var(--rand-links);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.pillen::-webkit-scrollbar { display: none; }
.pille-filter {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  overflow-wrap: normal;
  white-space: nowrap;
  cursor: pointer;
}
.zahl {
  min-width: 1ch;
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.pille-filter[aria-pressed="true"] { background: var(--color-navy); border-color: var(--color-navy); color: var(--color-white); }
.pille-filter[aria-pressed="true"] .zahl { color: var(--color-white); }
.f-nachfassen.hat-treffer { background: var(--color-amber); border-color: var(--color-amber); color: var(--text-on-amber); }
.f-nachfassen.hat-treffer .zahl { color: var(--text-on-amber); font-weight: 600; }
.f-nachfassen.hat-treffer[aria-pressed="true"] { background: var(--color-amber); border-color: var(--color-navy); box-shadow: inset 0 0 0 1px var(--color-navy); color: var(--text-on-amber); }
.f-nachfassen.hat-treffer[aria-pressed="true"] .zahl { color: var(--text-on-amber); }

.stand {
  padding-block: 4px 8px;
  color: var(--text-muted);
  font-size: .875rem;
}

.liste {
  display: grid;
  gap: 8px;
  list-style: none;
}
.einblenden-reihe > li:nth-child(-n+9) { animation: ein .3s var(--kurve) backwards; }
.einblenden-reihe > li:nth-child(3) { animation-delay: 40ms; }
.einblenden-reihe > li:nth-child(4) { animation-delay: 80ms; }
.einblenden-reihe > li:nth-child(5) { animation-delay: 120ms; }
.einblenden-reihe > li:nth-child(n+6) { animation-delay: 150ms; }

.kopfzeile { display: none; }
.eintrag {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 12px 16px;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  transition: transform .1s var(--kurve);
}
.eintrag:active { transform: scale(.97); }
.ist-nachfassen { box-shadow: inset 4px 0 0 var(--color-amber); }
.z { min-width: 0; }
.z:empty { display: none; }
.z-betrieb { flex: 0 0 100%; }
.e-name {
  color: var(--text-strong);
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
/* Die ganze Karte ist die Tippfläche. */
.e-name::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-navy);
  opacity: 0;
  transition: opacity .2s var(--kurve);
}
.e-name:focus-visible { outline: none; }
.e-name:focus-visible::after { opacity: .04; outline: 2px solid var(--focus-ring); outline-offset: -2px; }
@media (hover: hover) {
  .eintrag:hover .e-name::after { opacity: .03; }
}
.z-gruppe {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}
.z-ort, .z-gewerk { color: var(--text-muted); font-size: .875rem; }
.z-ort:not(:empty) + .z-gewerk::before { content: "·"; margin-right: 8px; }
.z-auf {
  display: flex;
  flex: 0 0 100%;
  gap: 4px;
  color: var(--text-body);
  font-size: .875rem;
}
.z-auf .sym { width: 16px; height: 16px; margin-top: 2px; }
.ist-nachfassen .z-auf { color: var(--color-amber-text); font-weight: 600; }
.z-pillen { margin-top: 4px; }
.z-marken, .z-status { display: flex; flex-wrap: wrap; gap: 4px; }
.z-schritt {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  gap: 0 8px;
  margin-top: 4px;
  font-size: .875rem;
}
.s-text { color: var(--text-strong); }
.s-frist { color: var(--text-muted); }
.ist-ueberfaellig { color: var(--state-error); font-weight: 600; }

/* Pillen für Status und Hinweise, jede mit mindestens 4.5:1 */
.pille {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: normal;
}
.marke { background: var(--color-cream-200); color: var(--text-strong); }
.marke-nachfassen { background: var(--color-amber-100); color: var(--color-amber-text); }
.st-neu { background: var(--color-cream-200); color: var(--text-body); }
.st-im_gespraech { background: var(--surface-card); box-shadow: inset 0 0 0 1px var(--state-info); color: var(--state-info); }
.st-workshop { background: var(--state-info); color: var(--color-white); }
.st-angebot { background: var(--color-navy); color: var(--color-white); }
.st-kunde { background: var(--state-success); color: var(--color-white); }
.st-kein_interesse { background: var(--color-cream-200); color: var(--text-muted); }
.st-widerspruch { background: var(--state-error-bg); color: var(--state-error); }

/* Betrieb */
.b-raster, .b-links {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.b-links > * { min-width: 0; }
.b-kopf { display: grid; gap: 4px; }
.b-name {
  color: var(--text-strong);
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.b-wer { color: var(--text-strong); font-weight: 500; }
.b-ort { color: var(--text-muted); font-size: .875rem; }
.b-auf {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  color: var(--color-amber-text);
  font-size: .875rem;
  font-weight: 600;
}
.b-auf .sym { width: 16px; height: 16px; margin-top: 2px; }
/* Die Bestätigung steht neben der Beschriftung, damit darunter nichts springt. */
.status-block {
  position: relative;
  display: grid;
  gap: 4px;
  max-width: 360px;
  margin-top: 8px;
}
.status-block .meldung-ok {
  position: absolute;
  top: 0;
  right: 0;
}

.wege { display: grid; gap: 8px; }
.wege:empty { display: none; }
.weg {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  color: var(--text-strong);
  font-weight: 500;
  text-decoration: none;
}
.weg-telefon {
  background: var(--color-amber);
  border-color: var(--color-amber);
  color: var(--text-on-amber);
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 600;
}
.weg-text { color: var(--text-muted); }
.weg-text:active { transform: none; }
.weg-text::after { content: none; }

.b-festhalten { display: grid; gap: 8px; }
.anruf-reihe > .knopf { flex: 1 1 120px; flex-direction: column; gap: 4px; padding: 8px; min-height: 64px; }
.festhalten-form {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: var(--color-cream-200);
  border-radius: 14px;
}
.schritt-lage { color: var(--text-muted); font-size: .875rem; font-weight: 500; }
.schritt-lage.ist-ueberfaellig { color: var(--state-error); font-weight: 600; }
.brief-beobachtung { color: var(--text-strong); white-space: pre-wrap; }
.angaben { display: grid; gap: 4px; font-size: .875rem; }
.angaben > div { display: flex; flex-wrap: wrap; gap: 0 8px; }
.angaben dt { flex: 0 0 72px; color: var(--text-muted); }
.angaben dd { flex: 1 1 auto; min-width: 0; color: var(--text-strong); }

.b-stamm { gap: 0; padding-block: 0; }
.klappkopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: var(--text-muted);
  font-family: var(--font-headline);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.klappkopf::-webkit-details-marker { display: none; }
.klappkopf::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s var(--kurve);
}
details[open] > .klappkopf::after { transform: rotate(-135deg); }
details[open] > .stamm-form { padding-bottom: 16px; animation: auf .3s var(--kurve) backwards; }

.b-gefahr {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}
.bestaetigung { display: grid; gap: 8px; min-width: 0; }
.bestaetigung-satz { color: var(--text-strong); font-size: .875rem; }
.v-eintrag .bestaetigung > .textknopf { justify-self: start; }

/* Verlauf als Zeitleiste */
.b-verlauf { display: grid; gap: 12px; min-width: 0; align-content: start; }
.v-tag { display: grid; gap: 8px; }
.v-tag + .v-tag { margin-top: 12px; }
.v-tagtitel {
  color: var(--text-strong);
  font-family: var(--font-headline);
  font-size: .875rem;
  font-weight: 600;
}
.v-liste { position: relative; display: grid; list-style: none; }
.v-liste::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 13px;
  width: 2px;
  background: var(--border-subtle);
}
.v-eintrag {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
}
.v-eintrag:last-child { padding-bottom: 0; }
.v-symbol {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-strong);
}
.v-symbol .sym { width: 14px; height: 14px; }
.v-rumpf { min-width: 0; }
.v-zeile {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}
.v-titel { min-width: 0; color: var(--text-strong); font-size: .875rem; font-weight: 600; }
.v-zeit {
  flex: none;
  color: var(--text-muted);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}
.v-betreff { color: var(--text-strong); font-size: .875rem; font-weight: 500; }
.v-text {
  margin-top: 4px;
  color: var(--text-body);
  font-size: .875rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ist-eingeklappt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
}
.v-wer { margin-top: 2px; color: var(--text-muted); font-size: .875rem; }
.v-anhaenge { display: grid; gap: 2px; margin-top: 4px; list-style: none; color: var(--text-muted); font-size: .875rem; }
.v-anhaenge li { display: flex; gap: 4px; }
.v-anhaenge .sym { width: 14px; height: 14px; margin-top: 2px; }
/* Öffnungen stehen einzeln, aber eng. Viele hintereinander bleiben so lesbar. */
.ist-kompakt { padding-bottom: 2px; align-items: center; }
.ist-kompakt .v-symbol { justify-self: center; width: 20px; height: 20px; }
.ist-kompakt .v-symbol .sym { width: 12px; height: 12px; }
.ist-kompakt .v-zeile { padding-top: 0; }
.ist-kompakt .v-titel { color: var(--text-body); font-weight: 400; }
.v-aufruf .v-symbol { background: var(--color-amber-100); border-color: var(--color-amber); color: var(--color-amber-text); }

/* Einstellungen */
.einstellungen { display: grid; gap: 16px; }
.angemeldet { color: var(--text-body); }
.angemeldet strong { color: var(--text-strong); font-weight: 600; }
.postfach-liste { display: grid; gap: 8px; list-style: none; }
.postfach { padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle); }
.postfach:last-child { padding-bottom: 0; border-bottom: 0; }
.postfach-adresse { color: var(--text-strong); font-weight: 500; }
.postfach-stand { color: var(--text-muted); font-size: .875rem; }
.skript-bereich {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  animation: auf .3s var(--kurve) backwards;
}
.schritte { display: grid; gap: 4px; padding-left: 24px; }
.schritte code, .skript { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.schritte code {
  padding: 0 4px;
  background: var(--color-cream-200);
  border-radius: 6px;
  color: var(--text-strong);
  font-size: .875rem;
}
.skript {
  max-height: 280px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  background: var(--color-cream-200);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-strong);
  font-size: .75rem;
  line-height: 1.5;
  overflow-wrap: normal;
  white-space: pre;
}
.brief-bereich, .fristen-bereich { display: grid; gap: 8px; color: var(--text-strong); }
.brief-bereich .zustand, .postfaecher .zustand, .fristen-bereich .zustand { padding: 8px; }
.schalter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  color: var(--text-strong);
  font-weight: 500;
  cursor: pointer;
}
.schalter input {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  margin: 0;
  background: var(--border-strong);
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.schalter input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: var(--color-white);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(15, 30, 46, .3);
  transition: transform .2s var(--kurve);
}
.schalter input:checked { background: var(--color-navy); }
.schalter input:checked::before { transform: translateX(20px); }

/* Desktop: Tabelle statt Karten, Verlauf neben den Aktionen */
@media (min-width: 900px) {
  :root { --rand: 24px; }
  .kopf { flex-wrap: nowrap; gap: 16px; padding-block: 12px 4px; }
  .kopf-logo { margin-right: 0; }
  .suchzeile { order: 0; flex: 1 1 auto; max-width: 560px; }
  .statuswahl { flex-basis: 208px; }
  .neu-knopf { width: auto; height: auto; margin-left: auto; padding: 8px 16px; }
  .neu-knopf .sym { width: 20px; height: 20px; }
  .neu-text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .seite-liste { padding-bottom: 32px; }

  .liste {
    gap: 0;
    overflow: hidden;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
  }
  .kopfzeile, .eintrag {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.9fr) minmax(96px, 1fr) minmax(148px, 1.4fr) minmax(0, 2fr);
    gap: 12px;
    align-items: start;
    padding: 12px 16px;
  }
  .kopfzeile {
    background: var(--color-cream-200);
    color: var(--text-muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .eintrag { border: 0; border-top: 1px solid var(--border-subtle); border-radius: 0; }
  .eintrag:active { transform: none; }
  .z:empty { display: block; }
  .z-gruppe { display: contents; }
  .z-ort:not(:empty) + .z-gewerk::before { content: none; }
  .z-ort, .z-gewerk { hyphens: auto; }
  .eintrag .pille { white-space: nowrap; }
  .z-schritt { margin-top: 0; }
  .z-schritt { flex-direction: column; }

  .b-raster { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 32px; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .knopf:active, .pille-filter:active, .weg:active, .symbolknopf:active, .textknopf:active, .eintrag:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .filterleiste, .leiste {
    background: var(--surface-page);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  :root {
    --border-subtle: #56697C;
    --border-strong: #33475B;
    --text-muted: #33475B;
  }
  .filterleiste, .leiste {
    background: var(--surface-page);
    border-bottom: 1px solid var(--border-strong);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
