/* CB-PLANUNG – eigenes CSS, hell/dunkel nach Systemeinstellung */
:root {
  --bg: #f4f6f8;
  --flaeche: #ffffff;
  --flaeche-2: #eef2f5;
  --text: #1b2430;
  --leise: #5d6b7a;
  --rand: #d8dee5;
  --haupt: #0b7285;
  --haupt-text: #ffffff;
  --haupt-hell: #e3f4f7;
  --gefahr: #c92a2a;
  --gefahr-hell: #fdeaea;
  --warn: #b26a00;
  --warn-hell: #fff4e0;
  --ok: #2b8a3e;
  --ok-hell: #e6f6ea;
  --rot: #e03131;
  --gelb: #f2b705;
  --grau: #adb5bd;
  --leiste: #0f2a33;
  --leiste-text: #d7e6ea;
  --leiste-aktiv: #1d4a57;
  --radius: 8px;
  --schatten: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 6px rgba(0, 0, 0, 0.04);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c;
    --flaeche: #1a2129;
    --flaeche-2: #222b35;
    --text: #e6ebf0;
    --leise: #9aa7b4;
    --rand: #2e3a46;
    --haupt: #3bc9db;
    --haupt-text: #0b1a1f;
    --haupt-hell: #133640;
    --gefahr: #ff6b6b;
    --gefahr-hell: #3a1d1f;
    --warn: #ffc078;
    --warn-hell: #3a2c16;
    --ok: #69db7c;
    --ok-hell: #17321f;
    --leiste: #0b1015;
    --leiste-text: #c3d0da;
    --leiste-aktiv: #1d3440;
    --schatten: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--haupt); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.5rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.6rem; }

code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.88em; }

/* ---------- Rahmen & Navigation ---------- */
.rahmen { display: flex; min-height: 100vh; }

.leiste {
  width: 230px;
  flex: 0 0 230px;
  background: var(--leiste);
  color: var(--leiste-text);
  padding: 1rem 0.75rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.leiste .marke {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.15rem;
  padding: 0.25rem 0.5rem 1rem;
  display: block;
}
.leiste .marke small { display: block; font-weight: 400; font-size: 0.75rem; color: var(--leiste-text); letter-spacing: 0; }
.leiste ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.leiste li a {
  display: block;
  color: var(--leiste-text);
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 2px;
}
.leiste li a:hover { background: var(--leiste-aktiv); text-decoration: none; }
.leiste li a.aktiv { background: var(--leiste-aktiv); color: #fff; font-weight: 600; }
.leiste .abmelden { color: var(--leiste-text); opacity: 0.8; padding: 0.5rem 0.65rem; font-size: 0.9rem; }

.inhalt { flex: 1; min-width: 0; padding: 1.5rem 2rem 3rem; max-width: 1200px; }
.inhalt.solo { margin: 0 auto; max-width: 420px; padding-top: 10vh; }

@media (max-width: 800px) {
  .rahmen { display: block; }
  .leiste {
    position: sticky;
    top: 0;
    z-index: 10;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0.4rem 0.5rem;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .leiste::-webkit-scrollbar { display: none; }
  .leiste .marke { padding: 0.25rem 0.5rem; font-size: 0.95rem; white-space: nowrap; }
  .leiste .marke small { display: none; }
  .leiste ul { display: flex; flex: none; gap: 0.15rem; }
  .leiste li a { white-space: nowrap; padding: 0.4rem 0.6rem; margin: 0; font-size: 0.9rem; }
  .leiste .abmelden { white-space: nowrap; font-size: 0.85rem; }
  .inhalt { padding: 1rem 0.9rem 3rem; }
}

/* ---------- Bausteine ---------- */
.kopfzeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.kopfzeile h1, .kopfzeile h2 { margin: 0; }
.aktionen { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.brotkrume { margin: 0 0 0.5rem; font-size: 0.9rem; }

.leise { color: var(--leise); }
.klein { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.vorformatiert { white-space: pre-wrap; word-break: break-word; }

.knopf, button.knopf {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--rand);
  background: var(--flaeche);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}
.knopf:hover { text-decoration: none; border-color: var(--haupt); }
.knopf.haupt { background: var(--haupt); color: var(--haupt-text); border-color: var(--haupt); }
.knopf.haupt:hover { filter: brightness(1.08); }
.knopf.leicht { background: transparent; }
.knopf.gefahr { color: var(--gefahr); border-color: var(--gefahr); background: transparent; }
.knopf-link { background: none; border: 0; padding: 0; font: inherit; color: var(--haupt); cursor: pointer; }
.knopf-link.gefahr { color: var(--gefahr); font-size: 0.85rem; }
form.inline { display: inline; }

.meldung { padding: 0.7rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; border: 1px solid transparent; }
.meldung.ok { background: var(--ok-hell); border-color: var(--ok); }
.meldung.fehler { background: var(--gefahr-hell); border-color: var(--gefahr); }
.meldung.info { background: var(--haupt-hell); border-color: var(--haupt); }
.meldung ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }

.leer {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--leise);
  background: var(--flaeche);
  border: 1px dashed var(--rand);
  border-radius: var(--radius);
}

.etikett {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--flaeche-2);
  color: var(--leise);
  margin-left: 0.25rem;
  white-space: nowrap;
  vertical-align: middle;
}
.etikett.warn { background: var(--warn-hell); color: var(--warn); }
.etikett.gefahr { background: var(--gefahr-hell); color: var(--gefahr); }
.marke-block { font-size: 0.85rem; white-space: nowrap; }

.status { font-size: 0.85rem; white-space: nowrap; }
.status.st-gefuehrt { color: var(--ok); }
.status.st-ausgefallen { color: var(--gefahr); text-decoration: line-through; }
.status.st-geplant { color: var(--warn); }

.sterne { color: var(--gelb); letter-spacing: 1px; white-space: nowrap; }

/* ---------- Formulare ---------- */
.formular { display: flex; flex-direction: column; gap: 0.9rem; max-width: 900px; }
.formular label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 500; font-size: 0.92rem; }
.formular label.checkbox { flex-direction: row; align-items: center; gap: 0.5rem; padding-top: 1.6rem; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.9rem; }

input, select, textarea {
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  width: 100%;
  min-height: 2.4rem;
}
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; min-height: 0; }
input[type="file"] { padding: 0.35rem; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--haupt); outline-offset: -1px; border-color: var(--haupt); }
input.schmal { max-width: 9rem; }

.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; align-items: center; }
.filter input[type="search"] { flex: 1 1 240px; width: auto; }
.filter select { width: auto; flex: 0 1 auto; }

.umschalter { display: inline-flex; border: 1px solid var(--rand); border-radius: var(--radius); overflow: hidden; }
.umschalter a { padding: 0.45rem 0.8rem; color: var(--text); background: var(--flaeche); }
.umschalter a + a { border-left: 1px solid var(--rand); }
.umschalter a.an { background: var(--haupt); color: var(--haupt-text); }
.umschalter a:hover { text-decoration: none; }

.login-box {
  background: var(--flaeche);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--schatten);
  border: 1px solid var(--rand);
  text-align: center;
}
.login-box h1 { margin: 0.5rem 0 0.2rem; }
.login-box .formular { text-align: left; margin-top: 1.25rem; }

/* ---------- Tabellen ---------- */
.tabelle-rahmen { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rand); }
.tabelle th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--leise); background: var(--flaeche-2); white-space: nowrap; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover { background: var(--flaeche-2); }
.tabelle .zahl { text-align: right; }
.tabelle details summary { cursor: pointer; }

/* Relevanz-Umschalter */
.relevanz { display: inline-flex; border: 1px solid var(--rand); border-radius: 6px; overflow: hidden; }
.relevanz button {
  border: 0;
  background: var(--flaeche);
  color: var(--leise);
  font: inherit;
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
}
.relevanz button + button { border-left: 1px solid var(--rand); }
.relevanz button.rel-offen.an { background: var(--flaeche-2); color: var(--text); font-weight: 600; }
.relevanz button.rel-relevant.an { background: var(--ok); color: #fff; font-weight: 600; }
.relevanz button.rel-verworfen.an { background: var(--grau); color: #222; font-weight: 600; }
.relevanz.laedt { opacity: 0.6; }

/* ---------- Übersicht ---------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.9rem; margin: 1rem 0 1.5rem; }
.kachel {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  color: var(--text);
  box-shadow: var(--schatten);
}
.kachel:hover { text-decoration: none; border-color: var(--haupt); }
.kachel.betont { border-color: var(--haupt); background: var(--haupt-hell); }
.kachel-zahl { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.kachel-text { font-weight: 600; }
.kachel-unter { font-size: 0.82rem; color: var(--leise); }
.kachel-unter.warn { color: var(--gefahr); font-weight: 600; }
.kacheln.export .kachel-text { font-size: 1.05rem; }

.zweispaltig { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 900px) { .zweispaltig { grid-template-columns: 1fr; } }

.abschnitt { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 1rem 1.2rem; margin-top: 1.25rem; box-shadow: var(--schatten); }
.zweispaltig .abschnitt { margin-top: 0; }
.abschnitt .kopfzeile { margin-bottom: 0.75rem; }
.gefahrzone { border-color: var(--gefahr-hell); background: transparent; box-shadow: none; }

.liste-schlicht { list-style: none; margin: 0; padding: 0; }
.liste-schlicht li { padding: 0.45rem 0; border-bottom: 1px solid var(--rand); display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: baseline; }
.liste-schlicht li:last-child { border-bottom: 0; }
.liste-schlicht li.erledigt a { text-decoration: line-through; color: var(--leise); }
.frist-inline { font-size: 0.85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.frist-inline.ueberfaellig, .frist.ueberfaellig { color: var(--gefahr); font-weight: 600; }
.frist.heute { color: var(--warn); font-weight: 600; }

/* Prio-Punkte */
.prio { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--grau); flex: none; vertical-align: middle; }
.prio-rot { background: var(--rot); }
.prio-gelb { background: var(--gelb); }
.prio-offen { background: var(--grau); }

/* ---------- Aufgabenliste ---------- */
.aufgabenliste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.aufgabe {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-left: 5px solid var(--grau);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
}
.aufgabe.prio-rand-rot { border-left-color: var(--rot); }
.aufgabe.prio-rand-gelb { border-left-color: var(--gelb); }
.aufgabe.erledigt { opacity: 0.65; }
.aufgabe.erledigt .aufgabe-text > a { text-decoration: line-through; }
.aufgabe-text { flex: 1; min-width: 0; }
.frist { text-align: right; white-space: nowrap; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.haken {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 6px;
  border: 2px solid var(--rand);
  background: var(--flaeche);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  flex: none;
}
.haken:hover { border-color: var(--ok); }
.haken.an { background: var(--ok); border-color: var(--ok); }

/* ---------- Detail ---------- */
.steckbrief { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 1rem 1.2rem; margin: 0.75rem 0 0; }
.steckbrief dt { color: var(--leise); font-size: 0.9rem; }
.steckbrief dd { margin: 0; }
@media (max-width: 600px) {
  .steckbrief { grid-template-columns: 1fr; }
  .steckbrief dt { margin-top: 0.4rem; }
}

.upload { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.75rem; }
.upload input[type="file"] { width: auto; flex: 1 1 260px; }

/* ---------- Auftrag 2: Termine, Einladungen, Mails ---------- */
.abstand-oben { margin-top: 1.25rem; }
.durchgestrichen { text-decoration: line-through; color: var(--leise); }
.fehlertext { color: var(--gefahr); }
.formular.breit { max-width: none; }
select.auto { width: auto; }
.wochen-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.75rem 0; }
.wochen-nav strong { margin: 0 0.5rem; }
.wochenraster { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 0.5rem; }
.wtag { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 0.5rem; min-width: 0; }
.wtag.heute { border-color: var(--haupt); }
.wtag h2 { font-size: 0.9rem; margin: 0 0 0.4rem; }
.wslot { display: block; border-radius: 6px; padding: 0.3rem 0.45rem; margin-bottom: 0.3rem; font-size: 0.82rem; border-left: 4px solid var(--grau); background: var(--flaeche-2); color: var(--text); }
a.wslot:hover { text-decoration: none; filter: brightness(0.97); }
.wslot .wzeit { display: block; font-variant-numeric: tabular-nums; font-weight: 600; }
.wslot .wtext { display: block; overflow-wrap: anywhere; }
.wslot .wunter { display: block; color: var(--leise); font-size: 0.75rem; }
.ws-frei { border-left-color: var(--ok); background: transparent; border: 1px dashed var(--rand); border-left: 4px solid var(--ok); }
.ws-gebucht { border-left-color: var(--haupt); background: var(--haupt-hell); }
.ws-intern { border-left-color: #7048e8; }
.ws-gesperrt, .ws-sperrzeit { border-left-color: var(--gefahr); background: var(--gefahr-hell); }
.ws-pause { border-left-color: var(--gelb); background: var(--warn-hell); }
.ws-abgesagt { opacity: 0.6; text-decoration: line-through; }
.ws-vergangen { opacity: 0.45; }
.wslot-legende { display: inline-block; padding: 0 0.4rem; border-radius: 4px; border-left: 4px solid; margin-right: 0.3rem; }
.mailstatus { font-size: 0.85rem; white-space: nowrap; }
.ms-gesendet { color: var(--ok); }
.ms-fehler { color: var(--gefahr); font-weight: 600; }
.ms-offen { color: var(--warn); }
.ms-verworfen { color: var(--leise); text-decoration: line-through; }
.einl-status { font-size: 0.85rem; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--flaeche-2); }
.es-offen { background: var(--haupt-hell); color: var(--haupt); }
.es-gebucht { background: var(--ok-hell); color: var(--ok); }
.es-widerrufen, .es-abgelaufen { background: var(--gefahr-hell); color: var(--gefahr); }
.link-kopie { display: flex; gap: 0.5rem; }
.link-kopie input { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
.gefahrzone-form { margin-top: 1rem; }
.steckbrief.schlicht { border: 0; padding: 0; margin: 0; background: transparent; }
h3 { font-size: 0.95rem; margin: 1rem 0 0.4rem; }
fieldset.abschnitt { margin: 0; }
fieldset.abschnitt legend { padding: 0 0.3rem; }
.ws-rahmen { border-left-color: var(--haupt); background: transparent; border: 0; border-left: 4px solid var(--haupt); padding-top: 0; padding-bottom: 0.2rem; }
.wslot .wmarke { display: inline-block; margin-top: 0.2rem; font-size: 0.72rem; font-weight: 700; color: var(--warn); background: var(--warn-hell); border-radius: 4px; padding: 0 0.3rem; }

/* ---------- Assistenz (Auftrag 3) ---------- */
.unternavi { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0 0 1rem; border-bottom: 1px solid var(--rand); }
.unternavi a { padding: 0.45rem 0.75rem; border-radius: var(--radius) var(--radius) 0 0; color: var(--text); }
.unternavi a.an { background: var(--haupt); color: var(--haupt-text); }
.unternavi a:hover { text-decoration: none; background: var(--flaeche-2); }
.unternavi a.an:hover { background: var(--haupt); }
.chat { display: grid; grid-template-columns: 260px 1fr; gap: 1rem; align-items: start; }
.chat-liste { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px; padding: 0.75rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; overflow-x: hidden; overflow-wrap: anywhere; }
.chat-liste li { flex-direction: column; gap: 0.1rem; }
.chat-liste li.an a { font-weight: 700; }
.knopf.breit { width: 100%; margin-bottom: 0.5rem; }
.chat-fenster { min-width: 0; }
.chat-titel { font-size: 1.2rem; }
.nachrichten { display: flex; flex-direction: column; gap: 0.75rem; margin: 0.75rem 0; }
.nachricht { border: 1px solid var(--rand); border-radius: 10px; padding: 0.6rem 0.9rem; background: var(--flaeche); max-width: 100%; }
.nachricht.nutzer { background: var(--haupt-hell); border-color: var(--haupt); align-self: flex-end; max-width: 85%; }
.nachricht .md p { margin: 0.35rem 0; }
.nachricht .md ul, .nachricht .md ol { margin: 0.35rem 0; padding-left: 1.3rem; }
.nachricht .md .tabelle-rahmen { margin: 0.5rem 0; }
.nachricht-kopf { margin-bottom: 0.25rem; }
.nachricht .aktionen { margin-top: 0.5rem; }
.nachricht .aktionen .knopf { padding: 0.25rem 0.6rem; font-size: 0.82rem; }
.quellen { margin-top: 0.5rem; }
.quellen ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }
a.quelle, span.quelle { font-size: 0.8rem; white-space: nowrap; }
.quelle-unbekannt { font-size: 0.8rem; color: var(--gefahr); }
.chat-eingabe { position: sticky; bottom: 0; background: var(--hintergrund, var(--flaeche)); padding: 0.75rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.zf { margin: 0.5rem 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.aussagen { margin: 0.25rem 0 0.75rem; padding-left: 1.2rem; }
.aussagen li { margin: 0.25rem 0; }
.einordnung { font-size: 0.72rem; border-radius: 4px; padding: 0 0.35rem; background: var(--flaeche-2); color: var(--leise); white-space: nowrap; }
.einordnung.e-bestaetigt { background: var(--ok-hell); color: var(--ok); }
.einordnung.e-laut_veranstalter { background: var(--haupt-hell); color: var(--haupt); }
.einordnung.e-interne_bewertung { background: var(--warn-hell); color: var(--warn); }
.einordnung.e-ki_vermutung { background: var(--gefahr-hell); color: var(--gefahr); }
.briefing-termin h3 { font-size: 0.95rem; margin: 0.9rem 0 0.2rem; }
.kompakt { margin: 0.2rem 0; padding-left: 1.2rem; }
.positionen { border: 1px solid var(--rand); border-radius: var(--radius); padding: 0.6rem 0.8rem; display: flex; flex-direction: column; gap: 0.6rem; }
.positionen .position { display: grid; grid-template-columns: 130px 2fr 1fr 2fr; gap: 0.5rem; align-items: end; border-bottom: 1px dashed var(--rand); padding-bottom: 0.5rem; }
.positionen .position label.checkbox { padding-top: 0; }
.ki-vorschlag { border-color: var(--haupt); }
.vergleich { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 1rem; align-items: start; }
.vergleich-pdf { position: sticky; top: 1rem; }
.vergleich-pdf iframe { width: 100%; height: calc(100vh - 2rem); border: 1px solid var(--rand); border-radius: var(--radius); background: #fff; }
@media (max-width: 900px) {
  .chat { grid-template-columns: 1fr; }
  .chat-liste { position: static; max-height: 40vh; }
  .nachricht.nutzer { max-width: 100%; }
  .positionen .position { grid-template-columns: 1fr; }
  .vergleich { grid-template-columns: 1fr; }
  .vergleich-pdf iframe { height: 70vh; }
}

/* ---------- Anfragen (Nachtrag 2b) ---------- */
.ws-angefragt { border-left-color: var(--gelb); background: var(--warn-hell); }
.anfragen { border-color: var(--gelb); background: var(--warn-hell); }
.anfrage-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.anfrage-zeile > span { flex: 1 1 280px; }
form.ablehnen { display: inline-flex; gap: 0.35rem; align-items: center; }
form.ablehnen input { width: 14rem; max-width: 100%; }
.breit-feld { flex: 1 1 420px; font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }

/* ---------- Teilnehmer und interne Personen ---------- */
.wteilnehmer { display: block; font-size: 0.72rem; font-weight: 600; color: var(--haupt); letter-spacing: 0.02em; }
.teilnehmer-liste { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.teilnehmer-liste label.checkbox { padding-top: 0; }
#whatsapp-text { flex: 1 1 420px; font-family: inherit; }
.person-zeile { border-bottom: 1px solid var(--rand); padding: 0.6rem 0; display: flex; flex-direction: column; gap: 0.4rem; }
.person-zeile input[name="name"], .person-zeile input[name="email"] { width: auto; flex: 1 1 200px; }
.person-zeile.inaktiv { opacity: 0.6; }

/* ---------- Saisonkalender (Auftrag 4) ---------- */
.kal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.kal-wtkopf { font-size: 0.75rem; color: var(--leise); text-align: center; text-transform: uppercase; letter-spacing: 0.03em; }
.kal-tag {
  display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; min-height: 6.2rem; padding: 0.35rem 0.4rem;
  background: var(--flaeche); border: 1px solid var(--rand); border-left: 5px solid var(--grau); border-radius: 6px;
  color: var(--text); font-size: 0.78rem; line-height: 1.25; overflow: hidden;
}
.kal-tag:hover { text-decoration: none; border-color: var(--haupt); }
.kal-tag.haupttag { background: var(--flaeche-2); }
.kal-tag.haupttag .kal-datum strong { color: var(--haupt); }
.kal-datum { font-size: 0.9rem; }
.kal-wt { color: var(--leise); font-size: 0.75rem; }
.kal-typ, .kal-miete { color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-zusage { font-weight: 600; color: var(--ok); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kal-wuensche { font-weight: 600; }
.kal-res { color: var(--warn); font-size: 0.72rem; }
.f-frei { border-left-color: var(--grau); }
.f-wunsch { border-left-color: var(--gelb); }
.f-konflikt { border-left-color: var(--gefahr); }
.f-konflikt .kal-wuensche { color: var(--gefahr); }
.f-zugesagt { border-left-color: var(--ok); }
.kal-legende { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0 1rem; }
.kal-marke { display: inline-block; padding: 0.05rem 0.5rem; border-left: 5px solid; border-radius: 4px; background: var(--flaeche); }
.kal-marke.haupttag-marke { border-left-color: var(--haupt); background: var(--flaeche-2); }
.saison-monat h2 { margin-top: 0; }
@media (max-width: 700px) {
  /* Handy: Liste statt Raster */
  .kal { grid-template-columns: 1fr; gap: 0.25rem; }
  .kal-wtkopf, .kal-leer { display: none; }
  .kal-tag { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.6rem; font-size: 0.85rem; }
  .kal-datum { min-width: 4.2rem; }
  .kal-typ, .kal-zusage { white-space: normal; }
}
.konflikt-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem; margin: 0.5rem 0; }
.konflikt-vorhaben { background: var(--flaeche-2); border: 1px solid var(--rand); border-radius: var(--radius); padding: 0.6rem 0.75rem; }
.vorhaben-karte { border: 1px solid var(--rand); border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0 0 0.9rem; background: var(--flaeche); }
.vorhaben-karte h3 { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.vorhaben-karte.vs-zugesagt { border-left: 5px solid var(--ok); }
.vorhaben-karte.vs-offen { border-left: 5px solid var(--gelb); }
.vorhaben-karte.vs-ausweich_angeboten { border-left: 5px solid var(--warn); }
.vorhaben-karte.vs-abgesagt, .vorhaben-karte.vs-verfallen, .vorhaben-karte.vs-zurueckgezogen { opacity: 0.75; }
.entscheidung-aktionen { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.entscheidung-aktionen details summary { cursor: pointer; color: var(--haupt); }
.posten-zeile { padding: 0.3rem 0; }
.formular .posten-zeile label.posten-wahl { flex-direction: row; align-items: center; gap: 0.45rem; padding: 0; min-width: 13rem; flex: 1 1 13rem; }
.formular .posten-zeile label.posten-wahl input { width: auto; }
.posten-zeile input[name^="betrag_"] { width: 9rem; flex: 0 0 9rem; }
.kal-miete .vorl { font-style: normal; color: var(--warn); font-size: 0.7rem; }
