/* ============================================================
   Depp – Dorfelektriker Shifts
   Design-System übernommen vom DE Lehrlingstool:
   Marine-Blau + Dorfelektriker-Gelb, Inter, helle Karten,
   weiche Schatten, großzügige Radien.
   ============================================================ */

:root {
  /* Marken-Farben (identisch zum Lehrlingstool) */
  --brand-blue:      #0f406e;
  --brand-blue-700:  #14507f;
  --brand-blue-600:  #1d6098;
  --brand-blue-500:  #3279b3;
  --brand-blue-300:  #88b4d5;
  --brand-blue-200:  #c6dbed;
  --brand-blue-100:  #e5eff7;
  --brand-blue-50:   #f4f8fc;
  --brand-yellow:    #fbba05;
  --brand-yellow-600:#e0a604;
  --brand-yellow-300:#fdd45c;
  --brand-yellow-100:#fef0c8;
  --brand-yellow-50: #fffaeb;
  --ink-900: #0b1a2c;
  --ink-700: #2b3a4d;
  --ink-500: #5b6a7d;
  --ink-400: #8593a3;
  --ink-300: #b9c3cf;
  --ink-200: #dde3ea;
  --ink-100: #eef2f6;
  --ink-50:  #f6f8fb;
  --white:   #ffffff;
  --success: #1f9d6b;  --success-bg: #e6f5ee;
  --warning: #d97706;  --warning-bg: #fef3e2;
  --danger:  #c43d3d;  --danger-bg:  #fbe9e9;
  --prio-hoch: #f97316;   /* Service-Board: Priorität hoch (Runde 8) */
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --shadow-card:  0 1px 2px rgba(15,64,110,.04), 0 6px 18px rgba(15,64,110,.06);
  --shadow-hover: 0 2px 4px rgba(15,64,110,.06), 0 14px 28px rgba(15,64,110,.10);

  /* Aliase für Depp-Komponenten */
  --bg:        var(--brand-blue-50);
  --bg-panel:  var(--white);
  --bg-raise:  var(--white);
  --line:      var(--ink-200);
  --line-soft: var(--ink-100);
  --text:      var(--ink-900);
  --text-dim:  var(--ink-500);
  --accent:    var(--brand-yellow);
  --accent-ink:var(--brand-blue);
  --blue:      var(--brand-blue-500);
  --ok:        var(--success);
  --radius:    var(--r-md);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* hidden schlägt jedes display */
html, body { margin: 0; height: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--white);
  border-bottom: 3px solid var(--brand-yellow);
  box-shadow: var(--shadow-card);
}
.logo { display: flex; align-items: center; gap: 9px; }
.logo-mark { height: 32px; width: auto; display: block; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b {
  font-size: 19px; font-weight: 800; letter-spacing: -.4px;
  color: var(--brand-blue);
}
.logo-text small {
  font-size: 8px; font-weight: 700; letter-spacing: 1.7px;
  color: var(--ink-400); margin-top: 3px;
  text-transform: uppercase;   /* Firmenname aus dem Erscheinungsbild (Runde P2 T4) */
}
.logo-bolt {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--brand-yellow); color: var(--brand-blue);
  font-size: 17px;
}
.week-nav { display: flex; align-items: center; gap: 6px; }
.zeitraum { color: var(--text-dim); font-size: 13px; font-weight: 500; }
/* Runde 8 T8: dezent, solange Outlook-Termine laden; rot, wenn es scheitert */
.ol-hinweis { color: var(--ink-400); font-size: 12px; font-style: italic; white-space: nowrap; }
.ol-hinweis.fehler { color: var(--danger); font-style: normal; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.me-chip {
  display: flex; align-items: center; gap: 8px; font-weight: 600;
  background: var(--ink-50); border: 1px solid var(--ink-100);
  border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13px;
  color: var(--ink-700);
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-sans); font-weight: 600; font-size: 13px;
  padding: 8px 11px; border-radius: 10px;
  border: 1px solid var(--ink-200);
  background: var(--white); color: var(--brand-blue);
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: transform .1s, background .15s, box-shadow .15s;
}
.btn:hover { background: var(--brand-blue-100); border-color: var(--brand-blue-200); }
.btn:active { transform: scale(.97); }
.btn-accent {
  background: var(--brand-yellow); color: var(--brand-blue); border-color: transparent;
  box-shadow: var(--shadow-card);
}
.btn-accent:hover { background: var(--brand-yellow-300); box-shadow: var(--shadow-hover); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border-radius: 10px; border: 1px solid var(--ink-200);
  background: var(--white); color: var(--brand-blue); font-size: 16px;
  cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--brand-blue-100); }
/*
 * Datumsknopf mit fester Breite (Ralph Runde 5 T7, 01.10.2026): Vorher wuchs
 * er mit dem Text („Heute“, „Mi, 30. Sep“, „Diese Woche“), und der Pfeil ›
 * rechts daneben wanderte bei jedem Klick – man traf ihn nicht zweimal.
 * Die Breite reicht für den längsten Text; was trotzdem nicht passt, wird
 * abgeschnitten statt den Knopf zu dehnen. Das Handy hat seinen eigenen Kopf.
 */
body:not([data-ansicht="mobil"]) .btn-datum {
  width: 108px; padding-left: 4px; padding-right: 4px;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Gelb wie die Spalte von heute, solange der sichtbare Zeitraum heute enthält */
.btn-datum.ist-heute { border-color: var(--brand-yellow); background: var(--brand-yellow-50); }
.btn-datum.ist-heute:hover { background: var(--brand-yellow-100); border-color: var(--brand-yellow); }

/* ---------- Layout ---------- */
.board-layout {
  display: grid; grid-template-columns: 300px 1fr;
  height: calc(100vh - 58px);
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: relative;
  display: flex; flex-direction: column; overflow: hidden;
  border-right: 1px solid var(--ink-200); background: var(--white);
}
/*
 * Seitenleiste einklappen (Runde 14 T5, Fachticket 3): Am iPad quer braucht
 * die Woche die Breite. Der Griff bleibt stehen (44 × 44, für den Finger) und
 * ragt bei zugeklappter Leiste in den Rand des Kalenders.
 */
.sb-griff {
  position: absolute; top: 6px; right: 6px; z-index: 6;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--ink-200); border-radius: 10px;
  background: var(--white); color: var(--ink-500);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.sb-griff:hover { border-color: var(--brand-yellow); color: var(--text); }
.board-layout.leiste-zu { grid-template-columns: 28px 1fr; }
.board-layout.leiste-zu .sidebar { width: auto; overflow: visible; }
.board-layout.leiste-zu .sb-griff { right: auto; left: 0; }
/* Runde 15 T5 (Ticket 3): derselbe Griff im Cockpit (board.js). Die Zahl rechts
   im Kopf „Stillstand“ rückt am Griff vorbei; eingeklappt zeigt die rote Marke,
   wie viele Karten über der Schwelle sind. */
body.sb-seite .sidebar .pool-head { padding-right: 40px; }
.sb-griff-marke {
  position: absolute; top: -7px; right: -7px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--danger); color: var(--white);
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
.sb-griff-marke[hidden] { display: none; }
.sidebar h2 {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--brand-yellow-600);
  margin: 0;
}
.pool { flex: 1 1 55%; display: flex; flex-direction: column; padding: 16px; min-height: 0; }
.pool-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pool-suche {
  width: 100%; padding: 9px 12px; margin-bottom: 10px;
  border-radius: 10px; border: 1px solid var(--ink-200);
  background: var(--ink-50); color: var(--text); font-family: var(--font-sans);
}
.pool-suche:focus { outline: none; border-color: var(--brand-blue-500); background: var(--white); }
.pool-liste { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }

.pool-card {
  position: relative;
  border: 1px solid var(--ink-200); border-left: 4px solid var(--card-farbe, var(--brand-yellow));
  border-radius: var(--r-sm); padding: 9px 26px 9px 11px; background: var(--white);
  cursor: grab; user-select: none;
  box-shadow: var(--shadow-card);
  transition: transform .12s, box-shadow .12s;
}

/* ---------- Leihkräfte ----------
   Gestrichelter Rahmen in Erdbraun: gehört dazu, ist aber sichtbar kein
   Stammpersonal. Ohne Firmen-Adresse gibt es auch keinen Outlook-Termin. */
/* ---------- Ringfarbe = Funktion auf der Baustelle ----------
   Bis 23.08.2026 trug jeder Avatar seine persönliche Farbe. Bei 62 Gesichtern
   sagte die niemandem etwas. Jetzt steht der Ring für die Funktion – das ist
   die Frage, die man beim Einteilen wirklich stellt.

   Bewusst NICHT verwendet: Gelb, Orange und Rot. Die sind am Avatar schon
   vergeben – gefiltert, ausgelastet ab 6 Stunden, abwesend. Käme Orange hier
   noch einmal vor, wüsste man nicht mehr, ob jemand Hilfsmonteur oder einfach
   schon voll verplant ist. */
.avatar.fk-monteur  { --av: #0f406e; }   /* Monteur, Service-Monteur, Techniker */
.avatar.fk-hilfs    { --av: #0f7a6e; }   /* Hilfsmonteur */
.avatar.fk-lehrling { --av: #2c6b3f; }   /* Lehrling, alle Lehrjahre */
.avatar.fk-leih     { --av: #8a7a5c; }   /* Leihkraft – dazu der gestrichelte Rand */

.avatar.leihkraft {
  border-style: dashed !important;
  border-color: #8a7a5c !important;
  box-shadow: 0 0 0 1px #d9cdb4;
}
/* Leihkräfte tragen ein schlichtes „L" statt eines bunten Symbols */
.team-item.ist-leih .tname::after,
.m-person.ist-leih .mp-name::after {
  content: ' L'; font-size: 9px; font-weight: 800; color: #8a7a5c;
}

/* --- Dialog „Wofür ist dieser Eintrag?" ---
   Ersetzt das nackte Browser-Fenster: gleiche Formensprache wie alle anderen
   Dialoge, dazu Schnellauswahl für die Fälle, die immer wiederkommen. */
#dlgEintrag { width: min(460px, 94vw); }
#dlgEintrag h3 { margin-bottom: 6px; }
.dlg-unter {
  margin: 0 0 14px; font-size: 12px; color: var(--ink-500); line-height: 1.5;
}
.eintrag-schnell {
  display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--ink-100);
}
.eintrag-schnell button {
  border: 1px solid var(--ink-200); border-radius: 999px;
  background: var(--white); color: var(--ink-700);
  padding: 7px 13px; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  transition: border-color .12s, background .12s, transform .1s;
}
.eintrag-schnell button:hover {
  border-color: var(--brand-yellow); background: var(--brand-yellow-50, #fff9e8);
  transform: translateY(-1px);
}
.eintrag-schnell button:active { transform: none; }

/* Rückfrage in der Matrix: Dazustellen oder eigener halber Tag */
#dlgHalbTag { width: min(420px, 94vw); }
.halbtag-wahl { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.halbtag-wahl .btn { width: 100%; text-align: left; }
.halbtag-eigen:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.halbtag-hinweis { width: 100%; margin: 0; color: var(--danger); font-size: 13px; }
/* Auswahl der Service-Aktivität (Runde 6 T9) – gleicher Aufbau wie oben */
#dlgAktivitaet { width: min(460px, 94vw); }
.aktivitaet-wahl { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.aktivitaet-wahl .btn { width: 100%; text-align: left; display: block; }
.aktivitaet-wahl .btn small { display: block; font-weight: 400; color: var(--ink-500); }

/* Legende „Farben" (Runde 3 T5): Farbfeld + Text je Zeile. Die Beispiele
   benutzen die echten Farbvariablen und Klassen (.pub-punkt, .std-label). */
.btn-farben { padding: 6px 12px; }
body.finger .btn-farben { min-height: 44px; }
.lg-liste { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 7px; }
.lg-liste li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-700); }
.lg-feld {
  position: relative; flex: 0 0 auto; width: 28px; height: 18px;
  border-radius: 5px; border: 1px solid var(--ink-200);
}
.lg-rot    { background: var(--danger-bg); border: 2px solid var(--danger); }
.lg-orange { background: var(--warning-bg); border: 2px solid var(--warning); }
.lg-gruen  { background: var(--success-bg); border: 2px solid var(--success); }
.lg-outlook { background: #fbfcfd; border: 1px dashed var(--ink-400); }
.lg-punkt  { border-color: transparent; }
.lg-punkt .pub-punkt { top: 2px; right: auto; left: 7px; }
.lg-orange .std-label { top: -9px; right: -12px; }

/* --- Dialog „Leihkräfte" ---
   Der Dialog ist standardmäßig 430 px breit; hier brauchen Name, Team und
   Knopf nebeneinander mehr Platz. */
#dlgLeih { width: min(640px, 94vw); }
.dlg-leih { max-height: 82vh; overflow-y: auto; }
.dlg-leih .hint { font-size: 12px; color: var(--ink-500); line-height: 1.5; margin: 2px 0 16px; }

/* --- Dialog „Einstellungen" (Runde 6 T1) ---
   Je Schalter eine Zeile: Text und Erklärung links, Aus/Ein rechts. */
#dlgEinstellungen { width: min(860px, 94vw); }
.dlg-einstellungen .hint { font-size: 12px; color: var(--ink-500); line-height: 1.5; margin: 2px 0 12px; }
.es-zeile {
  display: flex; align-items: center; gap: 16px; padding: 12px 0;
  border-top: 1px solid var(--ink-200);
}
.es-zeile:first-child { border-top: 0; }
.es-text { flex: 1; }
.es-text b { display: block; font-size: 14px; }
.es-text small { display: block; margin-top: 3px; font-size: 12px; color: var(--ink-500); line-height: 1.45; }
/* Abschnitt „Service“ mit Zahlen und Listen (Runde 7 T7): der Dialog wird länger und scrollt */
.dlg-einstellungen { max-height: 80vh; overflow-y: auto; }
/* Reiter links, darin Gruppen mit Überschrift (Jeremias 03.11.2026); am Handy Reiter oben */
#einstellungenListe { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 24px; align-items: start; }
.es-reiter { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.es-abschnitt {
  border: 0; border-radius: 8px; background: none; padding: 9px 12px; text-align: left; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--ink-700, var(--ink-500)); white-space: nowrap;
}
.es-abschnitt:hover { background: var(--ink-100); }
.es-abschnitt.aktiv { background: var(--brand-blue-50); color: var(--brand-blue); font-weight: 700; }
.es-gruppe { margin: 22px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500); }
.es-flaeche > .es-gruppe:first-child { margin-top: 2px; }
.es-block { border: 1px solid var(--ink-200); border-radius: 10px; padding: 0 14px; }
@media (max-width: 640px) {
  #einstellungenListe { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .es-reiter { flex-direction: row; overflow-x: auto; background: var(--white, #fff); z-index: 1; }
  .es-abschnitt { padding: 8px 10px; }
  .es-zeile { flex-wrap: wrap; gap: 8px; }
  .es-text { flex-basis: 100%; }
  .es-wert, .es-wert .es-text-feld, .es-zeile > select.es-text-feld { width: 100%; }
  .es-wert .es-text-feld { flex: 1; min-width: 0; }
}
.es-zahl { width: 72px; }
/* E-Mail-Adresse (Runde 12b): breit genug für info@dorfelektriker.at */
.es-text-feld { width: 300px; max-width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; }
.es-zeile:has(.es-liste-feld) { flex-direction: column; align-items: stretch; gap: 8px; }
.es-liste-feld { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.es-liste-feld textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; }
/* Abschnitt „Firma“ (Runde P2 T4): Werte mit „Vorgabe“, Farbwähler mit Hex-Feld,
   Bilder mit Vorschau; die Meldung des Servers steht unter dem Feld */
.es-zeile:has(.es-fehler) { flex-wrap: wrap; }
.es-fehler { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--danger); }
.es-wert { display: flex; align-items: center; gap: 6px; }
.es-wert .btn, .es-bild .btn { padding: 4px 8px; font-size: 12px; }
.es-farbe { width: 36px; height: 28px; padding: 0; border: 1px solid var(--ink-200); background: none; }
.es-hex { width: 80px; font: inherit; font-size: 13px; }
.es-bild { display: flex; align-items: center; gap: 6px; }
.es-bild-vorschau { width: 40px; height: 40px; object-fit: contain; border: 1px solid var(--ink-200); border-radius: 6px; background: #fff; }

/* Zwei Zeilen: Name über die volle Breite, darunter Team und Knopf.
   So bleibt der Name gut lesbar, auch auf schmalen Bildschirmen. */
.leih-neu {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px;
  margin-bottom: 4px; align-items: end;
}
.leih-neu input[name=name] { grid-column: 1 / -1; }
.leih-neu select { grid-column: 1 / -1; }
.leih-neu input, .leih-neu select { width: 100%; margin: 0; }
.leih-neu button { white-space: nowrap; }
/* Zeitraum: zwei Monatsfelder nebeneinander, Beschriftung darüber */
.leih-neu .leih-zeit {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--ink-500);
}
.leih-hint {
  margin: 0 0 16px; padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-100);
}

.leih-gruppe {
  margin-top: 12px; font-size: 11px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--brand-yellow-600, #c98a00);
}
.leih-liste { display: flex; flex-direction: column; gap: 6px; }
.leih-zeile {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--ink-150);
  border-radius: var(--r-sm); background: var(--white);
}
.lz-name { font-weight: 600; font-size: 13px; flex: 1; min-width: 0; }
.lz-eingeteilt { font-size: 11px; color: var(--ink-400); white-space: nowrap; }

/* ---------- Persönliche Favoriten ----------
   Der Stern hängt an jeder Auftragskarte. Gemerkte Aufträge sammeln sich
   oben in einer eigenen Liste – die ist für jeden Benutzer eine andere. */
.fav-stern {
  position: absolute; top: 5px; right: 5px; z-index: 2;
  border: 0; background: none; cursor: pointer; padding: 2px;
  font-size: 15px; line-height: 1; color: var(--ink-300);
  opacity: .5; transition: opacity .12s, color .12s, transform .12s;
}
.pool-card:hover .fav-stern { opacity: 1; }
.fav-stern:hover { transform: scale(1.2); color: var(--brand-yellow-600, #c98a00); }
.fav-stern.aktiv { opacity: 1; color: var(--brand-yellow-600, #c98a00); }
.favoriten { margin-bottom: 10px; }
.fav-kopf {
  margin: 4px 0 6px; font-size: 11px; font-weight: 800;
  color: var(--brand-yellow-600, #c98a00);
  text-transform: uppercase; letter-spacing: .05em;
}
.fav-liste { margin-bottom: 6px; }
.fav-liste .pool-card { background: var(--brand-yellow-50, #fff9e8); }
/* Vorlagen heben sich ab: violett statt gelb, damit man sie nicht mit
   einem echten Auftrag verwechselt */
.pool-card.vorlage {
  background: #f4f0fb !important; border-left-color: #6d28d9;
  border-style: dashed; border-left-style: solid;
}
.pool-card.vorlage .nummer { color: #6d28d9; font-weight: 800; }
.pool-card:hover { transform: translateX(3px); box-shadow: var(--shadow-hover); }
.pool-card.dragging { opacity: .4; }
.pool-card .nummer { font-size: 11px; font-weight: 600; color: var(--ink-400); letter-spacing: .3px; }
/*
 * Wie auf der Kalenderkarte: Kunde oben und fett, Betreff darunter
 * (Tim, 30.08.2026). Die VORLAGE-Karte hat keinen Kunden – dort steht in
 * der Zeile „kunde" nur der Hinweistext, deshalb bleibt dort der Titel die
 * fette Hauptzeile. Das regelt die Geschwisterregel darunter.
 */
.pool-card .kunde { font-weight: 700; margin: 1px 0; color: var(--ink-900); }
.pool-card .titel { font-size: 12px; font-weight: 500; color: var(--ink-500); }
/* Kein Kunde vorhanden (Vorlage, Auftrag ohne Kundenname): Titel bleibt Hauptzeile */
.pool-card .nummer + .titel { font-size: inherit; font-weight: 600; color: var(--ink-900); }
.pool-card .nummer + .titel + .kunde { font-size: 12px; font-weight: 400; color: var(--ink-500); }
.pool-card.erledigt { opacity: .5; }
.pool-card.erledigt .titel { text-decoration: line-through; }

.teamleiste {
  flex: 1 1 45%; padding: 16px; border-top: 1px solid var(--ink-200);
  overflow-y: auto; min-height: 0; background: var(--ink-50);
}
.tl-kopf { display: flex; align-items: center; gap: 8px; }
.tl-kopf h2 { flex-shrink: 0; }
.team-wahl.klein {
  flex: 1; min-width: 0; font-size: 11.5px; padding: 4px 7px;
  border-radius: var(--r-sm);
}
/* Andere Team-Wahl als im Kalender: sichtbar machen, damit niemand rätselt,
   warum in der Leiste fremde Gesichter stehen */
.team-wahl.klein.abweichend {
  border-color: var(--brand-yellow); background: var(--brand-yellow-50, #fff9e8);
  font-weight: 700;
}
.teamleiste .hint { font-size: 11px; color: var(--ink-400); margin: 4px 0 12px; }
.team-liste { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Schutzstreifen unten (iPad/iPhone) ----------
   Am unteren Bildschirmrand liegt der Home-Indicator. Ein Zug von dort nach
   oben ist für iPadOS „App verlassen": Wer den letzten Avatar der Teamleiste
   ziehen wollte, landete stattdessen im App-Umschalter und hatte die App
   praktisch geschlossen (Tim, 31.08.2026, Video). Die Geste lässt sich nicht
   abfangen, nur meiden – also hält die Leiste Abstand.

   28 px zusätzlich zur Systemangabe: Der Indikator ist rund 5 px hoch, sein
   Einzugsbereich reicht aber deutlich weiter hinauf. Gemessen mit dem
   letzten Avatar, der sich danach zuverlässig ziehen liess. */
.teamleiste {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
}

/* ---------- Avatare ---------- */
.avatar {
  --av: var(--brand-blue-500);
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: color-mix(in srgb, var(--av) 14%, var(--white));
  border: 2px solid var(--av);
  color: var(--brand-blue); font-size: 13px; font-weight: 700;
  user-select: none; flex-shrink: 0;
  position: relative; overflow: hidden;
}
.avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
}
.avatar-s { width: 26px; height: 26px; font-size: 10px; border-width: 1.5px; }
.team-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 62px; cursor: grab; }
.team-item .tname { font-size: 10px; font-weight: 500; color: var(--ink-500); text-align: center; line-height: 1.2; }
.team-item.lehrling .avatar { border-style: dashed; }
/* Suchtreffer aus einem fremden Team: Teamname als Untertitel */
.team-item .fremd-team {
  font-size: 9px; line-height: 1.1; text-align: center;
  color: var(--ink-300); letter-spacing: .02em;
}
.team-item.fremdes-team .avatar { border-style: dotted; }
.team-item:hover .avatar { box-shadow: var(--shadow-hover); }
.team-item.dragging { opacity: .4; }

/* ---------- Kalender ---------- */
.kalender { overflow-y: auto; padding: 18px 22px 40px; }
/* Tagesansicht füllt die Höhe (Runde 5 T12): unten nur Platz für die halbe „19:00" */
.kalender:has(> .tl) { padding-bottom: 10px; }
.woche { margin-bottom: 24px; }
.woche-titel {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--brand-yellow-600);
  margin: 0 0 8px 2px;
}
.woche-grid { display: grid; grid-template-columns: repeat(var(--tage), minmax(0, 1fr)); gap: 12px; }

.tag {
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--r-md); min-height: 150px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: border-color .15s, box-shadow .15s;
}
.tag.heute { border-color: var(--brand-yellow); background: var(--brand-yellow-50); box-shadow: inset 0 3px 0 var(--brand-yellow), var(--shadow-card); }
.tag.samstag { background: var(--ink-50); }
.tag.vergangen { opacity: .6; }
.tag.dragover {
  border-color: var(--brand-yellow);
  box-shadow: 0 0 0 2px var(--brand-yellow), var(--shadow-hover);
}
.tag-kopf {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 11px 4px; font-size: 12px; font-weight: 600; color: var(--ink-400);
}
.tag.heute .tag-kopf { color: var(--brand-yellow-600); }
/*
 * Feiertag im Tageskopf (Tag, Woche, Matrix) – dieselbe kleine Großschrift wie
 * der Abwesenheitsgrund in der Matrix (.mx-abw), damit man sofort sieht: an
 * diesem Tag fehlen alle (Runde 4, Ralph T6).
 */
.feiertag-name {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; color: var(--ink-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tag-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 4px 7px 9px; }

/* ---------- Einsatz-Karten ---------- */
.einsatz {
  border-radius: 10px; border: 1px solid var(--ink-200);
  border-left: 4px solid var(--card-farbe, var(--brand-yellow));
  background: var(--white); padding: 8px 9px;
  cursor: grab; position: relative;
  box-shadow: var(--shadow-card);
  transition: box-shadow .15s;
}
/*
   Die Einblend-Animation läuft nur noch bei Karten, die wirklich neu
   dazugekommen sind (Klasse setzt renderTag/renderWoche). Vorher hing sie
   an jeder Karte – nach jedem Verschieben wird das Board neu gezeichnet,
   und dann zuckte das ganze Board kurz auf, obwohl sich nur ein Einsatz
   bewegt hatte. */
.einsatz.frisch { animation: einsatz-in .18s ease-out; }
@keyframes einsatz-in { from { transform: scale(.92); opacity: 0; } }
.einsatz:hover { box-shadow: var(--shadow-hover); }
.einsatz.dragging { opacity: .4; }
.einsatz.dragover { box-shadow: 0 0 0 2px var(--card-farbe, var(--brand-yellow)), var(--shadow-hover); }
/* Lange Auftragstitel und Kundennamen laufen sonst aus der Karte heraus –
   „Aufstockung Einfamilienhaus Robert-Stolz-Gasse" ragte am iPad um 69 px
   über den Rand (gemessen 23.08.2026 bei 820 px Breite). In der Tagesansicht
   sind die Spuren nur rund 30 px breit, da hilft kein Umbruch mehr: Dort
   schneidet das Kürzel-Zeichen sauber ab, statt über den Nachbarn zu laufen.
   `anywhere` statt `break-word`, weil sonst genau die langen Wörter ohne
   Trennstelle stehen bleiben, um die es hier geht. */
.einsatz .nummer, .einsatz .titel, .einsatz .kunde,
.pool-card .titel, .pool-card .kunde {
  overflow-wrap: anywhere; word-break: break-word; hyphens: auto;
  min-width: 0; max-width: 100%;
}
.einsatz .nummer {
  font-size: 10px; font-weight: 600; color: var(--ink-400); letter-spacing: .3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/*
 * Auf der Kalenderkarte steht der KUNDE oben und fett, der Betreff darunter
 * (Tim, 30.08.2026): Zuerst zählt, zu wem man fährt – was dort zu tun ist,
 * sagt die Zeile darunter. In der Auftragsliste links bleibt es umgekehrt,
 * dort sucht man nach Auftrag und Betreff.
 */
.einsatz .kunde { font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--ink-900); overflow: hidden; }
.einsatz .titel { font-size: 11px; font-weight: 500; line-height: 1.3; color: var(--ink-500); }
/* Vorlagen-Einträge haben keinen Kunden – dort ist der Zweck die Hauptzeile */
.einsatz .nummer + .titel { font-size: 12.5px; font-weight: 600; color: var(--ink-900); }
/* Service-Aktivität: eine Zeile, voll im Infofeld (Runde 6 T9) */
.einsatz .akt-zeile {
  font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--ink-700);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Notiz auf der Karte: höchstens zwei Zeilen, der Rest steht im Tooltip.
   Sonst schöbe eine lange Notiz alles andere aus dem Blickfeld. */
.einsatz .notiz {
  font-size: 11px; line-height: 1.35; margin-top: 3px;
  color: var(--ink-500); border-left: 2px solid var(--ink-200); padding-left: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* In der Wochenansicht sind die Kästchen zu schmal – dort nur ein Hinweis */
.tag .einsatz .notiz {
  -webkit-line-clamp: 1; font-size: 10.5px;
}
.einsatz .crew { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; min-height: 26px; }
/* Die obere Zeile teilt sich von rechts nach links: Griff, ✕, roter Punkt.
   Die Auftragsnummer bekommt entsprechend Platz frei, sonst läuft sie
   darunter durch (17.09.2026). */
/*
 * Zwei Fälle, zwei Breiten (17.09.2026, zweite Runde).
 *
 * Griffe gibt es nur in der Tagesansicht (.tl-block) – nur dort lässt sich
 * ein Block an Beginn und Ende ziehen. In Woche und Matrix stehen oben rechts
 * allein ✕ und roter Punkt; dort wäre eine Reserve für einen Griff, den es
 * gar nicht gibt, verschenkte Breite. Vorher galt eine einzige Regel für
 * beides, und die schmalen Wochenkärtchen zahlten dafür.
 */
.einsatz .nummer { padding-right: 46px; }

.einsatz .x {
  position: absolute; top: 4px; right: 4px;
  border: 0; background: none; color: var(--ink-300);
  cursor: pointer; font-size: 12px; padding: 2px; line-height: 1;
  opacity: 0; transition: opacity .12s;
}
.einsatz:hover .x { opacity: 1; }
.einsatz .x:hover { color: var(--danger); }

.crew-chip { position: relative; cursor: pointer; }
.crew-chip.leiter .avatar-s { box-shadow: 0 0 0 2px var(--brand-yellow); }
.crew-chip.leiter::after {
  content: '*'; position: absolute; top: -7px; right: -4px;
  font-size: 9px; color: var(--brand-yellow-600);
}
.crew-chip .chip-x {
  position: absolute; top: -5px; left: -5px;
  width: 14px; height: 14px; border-radius: 50%;
  border: 0; background: var(--danger); color: #fff;
  font-size: 9px; line-height: 14px; text-align: center; padding: 0;
  cursor: pointer; opacity: 0; transition: opacity .12s;
}
.crew-chip:hover .chip-x { opacity: 1; }

.konflikt {
  position: absolute; bottom: 5px; right: 6px;
  font-size: 9px; font-weight: 700;
  color: var(--warning); background: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: 6px; padding: 1px 5px;
}

/* ---------- Ansichten-Umschalter, Suche, Filter ---------- */
.seg {
  display: inline-flex; background: var(--ink-100); border-radius: 10px; padding: 3px;
}
.seg button {
  border: 0; background: transparent; padding: 6px 11px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  color: var(--ink-500); border-radius: 8px; cursor: pointer;
}
.seg button.aktiv { background: var(--white); color: var(--brand-blue); box-shadow: var(--shadow-card); }
.topbar-suche {
  width: 130px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--ink-200); background: var(--ink-50);
  color: var(--text); font-family: var(--font-sans); font-size: 13px;
}
.topbar-suche:focus { outline: none; border-color: var(--brand-blue-500); background: var(--white); }
/* Cockpit-Karten unter der Suche (Runde 8, Entscheidung 9); Lage setzt app.js */
.suche-cockpit {
  position: fixed; z-index: 120; width: 340px; max-height: 60vh; overflow-y: auto;
  background: var(--white); border: 1px solid var(--ink-200); border-radius: 10px;
  box-shadow: var(--shadow-card); padding: 4px 0;
}
.sc-gruppe, .ms-gruppe {
  margin: 0; padding: 8px 12px 4px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500);
}
.ms-gruppe { padding: 16px 4px 4px; }
.sc-treffer { display: block; padding: 8px 12px; color: var(--ink-900); text-decoration: none; font-size: 13px; }
.sc-treffer small { display: block; font-size: 12px; color: var(--ink-500); }
.sc-treffer:hover { background: var(--brand-blue-50); }
a.ms-treffer-zeile { text-decoration: none; }
.topbar-filter {
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--ink-200);
  background: var(--white); color: var(--brand-blue);
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; cursor: pointer;
  max-width: 170px;
}
.topbar-filter:focus { outline: none; border-color: var(--brand-blue-500); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--brand-yellow); background: var(--brand-yellow-50);
  color: var(--brand-blue); font-family: var(--font-sans);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.filter-chip:hover { background: var(--brand-yellow-100); }
.team-item.gefiltert .avatar { box-shadow: 0 0 0 3px var(--brand-yellow); }
/* ---------- Live-Treffer aus VenDoc ---------- */
.erp-kopf {
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-400); margin: 12px 0 6px; padding-top: 8px;
  border-top: 1px dashed var(--ink-200);
}
/* VenDoc-Suche gescheitert: sichtbar statt „Keine weiteren" (Ralph T9) */
.erp-fehler { color: var(--danger); }
.erp-fehler .erp-nochmal { display: block; margin-top: 6px; text-transform: none; letter-spacing: 0; }
.pool-card.erp-card {
  border-style: dashed; border-left-style: solid;
  border-left-color: var(--brand-blue-500); background: var(--brand-blue-50);
}
.pool-card.erp-card:hover { background: var(--brand-blue-100); }
.erp-badge {
  font-size: 8px; font-weight: 800; letter-spacing: .5px;
  color: var(--white); background: var(--brand-blue-500);
  border-radius: 4px; padding: 1px 4px; vertical-align: 1px;
}
.pool-toggle {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: 11px; color: var(--ink-400); cursor: pointer; user-select: none;
}
.chip-menu {
  position: fixed; z-index: 200; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: 10px; box-shadow: var(--shadow-hover); overflow: hidden;
  animation: einsatz-in .12s ease-out;
}
.chip-menu button {
  border: 0; background: none; text-align: left; cursor: pointer;
  padding: 9px 16px; font-family: var(--font-sans); font-size: 13px;
  font-weight: 600; color: var(--brand-blue);
}
.chip-menu button:hover { background: var(--brand-blue-100); }
.chip-menu button.rot { color: var(--danger); }
.chip-menu button.rot:hover { background: var(--danger-bg); }
.tl-leer {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--ink-300); font-size: 14px; font-weight: 600;
  pointer-events: none; text-align: center;
}
.team-item { position: relative; }
.team-item.belegt .avatar { opacity: .35; filter: grayscale(.7); }
.team-item.belegt .tname { color: var(--ink-300); }
/* „Ganztägig verplant": schlichter roter Punkt statt eines bunten Symbols */
.belegt-badge {
  position: absolute; top: -2px; right: 6px; z-index: 2;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--white);
  filter: none;
}

/* ---------- Auslastung ----------
   Zwei Stufen, bewusst verschieden:
     ORANGE = über 6 Stunden am Tag verplant. Wer will, teilt trotzdem zu –
              der Rahmen ist nur ein Hinweis, kein Verbot.
     ROT    = laut Zeiterfassung gar nicht da (weiter unten). Dort wird die
              Zuteilung tatsächlich verweigert.                              */
.team-item.ausgelastet .avatar,
.m-person.ausgelastet .avatar {
  border-color: #e08a1e !important;
  box-shadow: 0 0 0 2px rgba(224, 138, 30, .28);
}
.team-item.ausgelastet, .m-person.ausgelastet { position: relative; }
.std-label {
  position: absolute; top: -3px; right: 2px; z-index: 2;
  padding: 1px 5px; border-radius: 999px;
  background: #e08a1e; color: var(--white);
  font-size: 8.5px; font-weight: 800; line-height: 1.5;
  border: 1.5px solid var(--white); white-space: nowrap;
}

/* Laut Zeiterfassung abwesend (Urlaub, Krank, Schule …) – nicht einteilbar */
.team-item.abwesend { cursor: not-allowed; }
.team-item.abwesend .avatar { opacity: .3; filter: grayscale(1); }
.team-item.abwesend .tname { color: var(--ink-300); }
/* Wochenansicht: Zahl der Tage, an denen die Person im Zeitraum fehlt */
.abw-tage {
  position: absolute; top: -3px; right: 4px; z-index: 2;
  min-width: 16px; height: 16px; padding: 0 3px;
  display: grid; place-items: center;
  border-radius: 999px; background: var(--danger); color: var(--white);
  font-size: 9px; font-weight: 800; line-height: 1;
  border: 2px solid var(--white);
}
/* ---------- Matrix: Wochentage gegen Monteure ----------
   Dritte Sicht auf dieselbe Woche. Tag und Woche zeigen, was läuft –
   die Matrix zeigt, wer noch frei ist (Tim, 31.08.2026). */
/*
 * Die Matrix nimmt die ganze Höhe des Kalenders ein. Vorher standen fünf
 * Zeilen à 104 px oben am Rand und darunter blieb der halbe Bildschirm leer –
 * der Platz gehört den Feldern, dort liegen die Karten (Tim, 31.08.2026).
 * min-height: 100% rechnet gegen den Innenbereich des Kalenders, deshalb
 * entsteht dadurch keine Bildlaufleiste.
 */
/*
 * Spalten nie schmaler als 140 px, auf PC und iPad. Passen sie nicht, wird
 * die Matrix breiter als der Kalender und der Kalender scrollt seitlich –
 * nur er, nicht die Seite (Tim, 29.09.2026, Ralph Runde 4 T3). Die
 * Mindestbreite rechnet das Raster nach: Tagesspalte 64 px, je Kopf 140 px
 * plus 5 px Abstand, 2 × 14 px Innenrand. Ohne sie bliebe die Matrix 100 %
 * breit und die Spalten ragten rechts über ihren Rand hinaus.
 */
.matrix {
  display: grid; width: 100%; min-height: 100%;
  min-width: calc(64px + var(--koepfe) * (140px + 5px) + 28px);
  grid-template-columns: 64px repeat(var(--koepfe), minmax(140px, 1fr));
  grid-template-rows: auto;                /* Kopfzeile bleibt so hoch wie nötig */
  grid-auto-rows: minmax(104px, 1fr);      /* die Tageszeilen teilen sich den Rest */
  gap: 5px; padding: 12px 14px; align-items: stretch;
}
/* Die Ecke steht oben UND links fest und liegt deshalb über Kopfzeile und
   Tagesspalte, die unter ihr durchscrollen (Ralph Runde 4 T3). */
.mx-ecke { position: sticky; top: 0; left: 0; z-index: 4; background: var(--ink-50); }
/* Probelauf-Schalter (Runde 5 T12, Runde 6 T6): die Beschriftung steht als kleine
   Überschrift wie „AUFTRÄGE"/„TEAM" der Seitenleiste über den Werten, nur die Werte
   sitzen im seg-Rahmen. Im Tageskopf rechts, in der Matrix-Ecke oben links gestapelt. */
.probe-schalter, .probe-richtung { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.probe-schalter { margin-left: auto; }
.probe-text {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--brand-yellow-600); padding: 0 2px; line-height: 1.2;
}
.probe-schalter .seg, .probe-richtung .seg { padding: 2px; }
.probe-schalter button, .probe-richtung button { padding: 3px 8px; font-size: 12px; text-transform: none; letter-spacing: 0; }
.mx-ecke { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px; padding: 2px 0 0; }
.mx-ecke .probe-schalter, .mx-ecke .probe-richtung { display: flex; margin: 0; width: 100%; align-items: stretch; }
.mx-ecke .probe-text { font-size: 9px; letter-spacing: .5px; padding: 0; }
.mx-ecke .seg { flex-direction: column; gap: 1px; }
.mx-ecke .seg button { width: 100%; padding: 2px 0; font-size: 11px; }
.mx-kopf {
  position: sticky; top: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; background: var(--ink-50); border-radius: 8px;
  font-size: 11px; font-weight: 700; color: var(--ink-700);
}
.mx-kopf span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-kopf.ohne { justify-content: center; color: var(--ink-500); font-weight: 600; }

/*
 * Die Tagesspalte bleibt beim seitlichen Scrollen links stehen. Der Schatten
 * in der Hintergrundfarbe deckt den Abstand rechts daneben, sonst blitzen
 * dort die Karten durch, die unter ihr durchlaufen (Ralph Runde 4 T3).
 */
.mx-tag {
  position: sticky; left: 0; z-index: 2;
  box-shadow: 5px 0 0 var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 6px 8px; background: var(--ink-50); border-radius: 8px;
  font-size: 11px; color: var(--ink-500);
}
.mx-tag b { font-size: 13px; color: var(--ink-900); }
.mx-tag.heute b { color: var(--brand-blue); }
/*
 * Die Zeile von heute im Gelb von .tag.heute (Ralph Runde 5 T7, 01.10.2026).
 * Der Rahmen der Felder bleibt die Ampel (leer/teil/voll) – deshalb liegt
 * das Gelb als Umriss direkt außen am Rahmen, nicht an seiner Stelle.
 * Der Umriss (2 px) passt in den Abstand zwischen den Feldern.
 */
.mx-tag.heute {
  background: var(--brand-yellow-50);
  outline: 2px solid var(--brand-yellow); outline-offset: -2px;
}
.mx-feld.heute { background: var(--brand-yellow-50); outline: 2px solid var(--brand-yellow); }

/*
 * Das Feld ist ein kleiner Tagesstreifen von 07:00 bis 17:00. Die Linie in
 * der Mitte ist 12 Uhr und trennt Vormittag von Nachmittag – dadurch sieht
 * man an der Lage der Karte sofort, ob jemand nur halbtags verplant ist.
 */
.mx-feld {
  /* Die Höhe kommt aus renderMatrix: volle Tage lassen die Zeile wachsen,
     damit auch kurze Termine lesbar bleiben (Tim, 02.09.2026). */
  position: relative; min-height: var(--mx-feld-h, 104px); padding: 4px;
  border-radius: 8px; border: 2px solid transparent; background: var(--white);
  /* Eigene Stapelebene: Karten, Sperre und Fremd-Streifen (z-index bis 4)
     bleiben im Feld und laufen UNTER Tagesspalte und Kopfzeile durch,
     statt beim Scrollen darüber zu liegen (Ralph Runde 4 T3). */
  isolation: isolate;
}
.mx-feld::before {                       /* Mittagslinie bei 12 Uhr */
  content: ''; position: absolute; left: 6px; right: 6px; top: 50%;
  border-top: 1px dashed var(--ink-200); pointer-events: none;
}

/*
 * Die Ampel liegt im Rahmen, nicht in der Fläche: Gefüllte Felder
 * erschlagen das Board, sobald einmal alles rot ist (Tim, 31.08.2026).
 */
.mx-feld.leer     { border-color: #e88b80; }
.mx-feld.teil     { border-color: #e0a33c; }
.mx-feld.voll     { border-color: #6aab7e; }
.mx-feld.abwesend { border-color: var(--ink-200); background: var(--danger-bg); }
/*
 * Teilweise abwesend: hellorange statt hellrot, aber sichtbar. Ein neuer
 * Termin im Matrixfeld läuft von 07:00 bis 17:00 - jede Überschneidung
 * sperrt ihn, also muss man sie sehen (Tim, 08.09.2026).
 *
 * Beide flächig ohne Streifen: Schraffiert heißt seit Runde 6 T4 nur noch
 * „verliehen“ (Tim, 03.10.2026).
 */
.mx-feld.abwesend-teilweise {
  background: #fdf0e3;
  border-color: #e8c39a;
}
.mx-feld.abwesend-teilweise .mx-abw { color: #a5621a; align-content: start; }

.mx-feld.ohne     { border-color: var(--ink-200); border-style: dashed; }
.mx-feld.ohne.leer-still { background: transparent; }

.mx-feld.dragover { border-color: var(--brand-blue); background: var(--brand-blue-100); }
/* Volles oder abwesendes Feld: schon beim Ziehen zeigen, dass es klemmt */
.mx-feld.warnt    { border-color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger); }

/*
 * Vorlagen-Karten im Kalender: leicht violett hinterlegt, wie die Karte in
 * der Liste. So sieht man auf einen Blick, wo ein fester Auftrag liegt und
 * wo nur ein Platzhalter steht - Arzttermin, Schulung, Krankenstand
 * (Tim, 08.09.2026). Bewusst zurueckhaltend: Die Karte soll auffallen,
 * nicht schreien, und der Farbstreifen links bleibt lesbar.
 */
.einsatz.vorlagen-karte,
.mx-karte.vorlagen-karte,
.mt-block.vorlagen-karte {
  background: var(--vorlage-hell, #f4f0ff);
  /* Nur EINE violette Kante: der border-left, fest #6d28d9 unabhaengig von
     Auftraege.farbe (die setzt erst auftraege_sync). Der fruehere
     inset-Streifen daneben ergab zwei Kanten (Tim, 29.09.2026). */
  border-left-color: #6d28d9;
  box-shadow: 0 1px 2px rgba(11,26,44,.08);
}
.einsatz.vorlagen-karte .titel,
.mx-karte.vorlagen-karte .mx-titel { color: #4a3a8c; font-weight: 700; }

/*
 * Probelauf „Tage als Spalten" (Runde 5 T17): Zeilen = Personen, Spalten =
 * Tage, im Feld läuft die Zeit 07–17 von links nach rechts. Namen links und
 * Tage oben bleiben beim Scrollen stehen, die Ecke über beiden.
 */
.matrix.gedreht {
  min-height: 0; align-content: start;
  min-width: calc(120px + var(--tage) * (180px + 5px) + 28px);
  grid-template-columns: 120px repeat(var(--tage), minmax(180px, 1fr));
  grid-auto-rows: minmax(var(--mx-feld-h, 64px), auto);
}
.matrix.gedreht .mx-tag {
  top: 0; left: auto; z-index: 3; box-shadow: 0 5px 0 var(--bg);
  flex-direction: row; align-items: baseline; justify-content: center; gap: 6px;
}
.matrix.gedreht .mx-kopf {
  top: auto; left: 0; z-index: 2; box-shadow: 5px 0 0 var(--bg);
  flex-direction: row; justify-content: flex-start; gap: 6px; font-size: 12px;
}
.matrix.gedreht .mx-kopf.ohne { justify-content: flex-start; }
.matrix.gedreht .mx-feld::before {         /* Mittagslinie senkrecht */
  left: 50%; right: auto; top: 6px; bottom: 6px;
  border-top: 0; border-left: 1px dashed var(--ink-200);
}
.matrix.gedreht .mx-karte { right: auto; }
.matrix.gedreht .mx-feld .mx-sperre { top: 2px; bottom: 2px; right: auto; }

/*
 * Tagesmatrix für Team Service (Runde 8 T7, Tim 06.10.2026): EIN Tag,
 * Zeitachse 06–19 links, eine Spalte je Person. Stundenlinien statt der
 * Mittagslinie; Achse und Felder haben denselben 2-px-Rahmen, damit die
 * Prozentlagen von Beschriftung, Linie und Karte genau übereinanderliegen.
 */
.mx-ecke .mx-zeitraum { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
.mx-ecke .mx-zeitraum .probe-text { font-size: 9px; letter-spacing: .5px; padding: 0; color: var(--ink-500); }
.mx-zeitraum .seg { padding: 2px; }
.mx-zeitraum button { text-transform: none; letter-spacing: 0; }
.matrix.mx-tagesmatrix { min-height: 0; align-content: start; grid-auto-rows: var(--mx-feld-h); }
.mx-tagesmatrix .mx-feld { height: var(--mx-feld-h); }
.mx-tagesmatrix .mx-feld::before { display: none; }
.mx-stunde {
  position: absolute; left: 0; right: 0; z-index: 0; pointer-events: none;
  border-top: 1px solid var(--ink-100);
}
.mx-achse {
  position: sticky; left: 0; z-index: 2; box-shadow: 5px 0 0 var(--bg);
  border: 2px solid transparent; border-radius: 8px; background: var(--ink-50);
}
.mx-achse span {
  position: absolute; right: 6px; transform: translateY(-50%);
  font-size: 10px; color: var(--ink-500); font-variant-numeric: tabular-nums;
}

/* ---------- Kartendetail ----------
   Ein Ort für alles, was nur diese eine Karte betrifft. Der Auftrag steht
   darunter bewusst in einem eigenen, abgesetzten Block und nur zum Lesen –
   was dort geändert wird, trifft alle Tage und alle Teams. */
#dlgKarte { max-width: 460px; }
#kdKopf { margin: -6px 0 12px; font-weight: 600; color: var(--ink-500); }
.kd-umplanen {
  margin: 0 0 12px; padding: 8px 10px;
  background: var(--danger-bg, #fdeaea);
  border: 1px solid var(--danger); border-radius: 6px;
  font-size: 12.5px; font-weight: 600; line-height: 1.35; color: var(--danger);
}
.kd-abschnitt { margin-top: 14px; }
.kd-ueber {
  display: block; margin-bottom: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-400);
}
.kd-crew { display: flex; flex-wrap: wrap; gap: 6px; }
.kd-person {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--ink-200); background: var(--white);
  border-radius: 999px; padding: 4px 12px 4px 4px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-800); cursor: pointer;
}
.kd-person:hover { border-color: var(--brand-blue-500); background: var(--brand-blue-50, #eef5fb); }
.kd-person.leiter { box-shadow: 0 0 0 2px var(--brand-yellow); }
.kd-person small { font-size: 10.5px; font-weight: 500; color: var(--ink-400); }
/* Auftragsdaten: ruhig, klar abgesetzt, nicht anfassbar */
.kd-auftrag {
  margin: 0; padding: 8px 10px; white-space: pre-line;
  background: var(--ink-50); border-radius: 6px;
  font-size: 12.5px; line-height: 1.45; color: var(--ink-500);
}
/* Service-Aktivität im Einsatzdialog (Runde 6 T9): wie der Auftragsblock,
   Betreff fett, Beschreibung zwei Zeilen – antippen klappt auf */
.kd-akt {
  padding: 8px 10px; background: var(--ink-50); border-radius: 6px;
  font-size: 12.5px; line-height: 1.45; color: var(--ink-500);
}
.kd-akt-titel { font-weight: 700; color: var(--ink-900); }
.kd-akt-geloescht { font-weight: 700; color: var(--danger); }
.kd-akt-text {
  margin: 2px 0 4px; white-space: pre-line; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kd-akt-text.offen { display: block; }
/* Regiebericht im Einsatzdialog (Runde 6 T11): Knopf, darunter die Berichte des Auftrags */
/* Links am Einsatz (Runde 11 T6): im Detail anklickbar, auf der Karte eine
   kleine Marke rechts in der Fußzeile – Anzahl im title */
.kd-links { display: flex; flex-direction: column; gap: 2px; margin: -4px 0 8px; font-size: 12.5px; }
.kd-links a { color: var(--brand-blue-500); text-decoration: none; overflow-wrap: anywhere; }
.kd-links a:hover { text-decoration: underline; }
.link-marke, .mx-link {
  border-radius: 999px; padding: 0 5px; background: var(--ink-200); color: var(--ink-700);
  font-size: 9px; font-weight: 800; line-height: 14px; text-transform: uppercase;
}
.einsatz .crew .link-marke { margin-left: auto; align-self: center; }
.mx-link { position: absolute; top: 2px; right: 12px; pointer-events: none; }
.kd-regie-liste { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12.5px; line-height: 1.6; }
.kd-regie-liste a { color: var(--brand-blue-500); text-decoration: none; }
.kd-regie-liste a:hover { text-decoration: underline; }
.kd-akt a { color: var(--brand-blue-600); font-weight: 600; }
#kdAktWahlLabel { display: block; margin-top: 8px; }
#kdAktWahlLabel[hidden] { display: none; }
#kdAktWahl { width: 100%; }

/* Erklärender Hinweis in einem Dialog – z. B. warum die Vorlage gesperrt ist */
.dlg-hinweis {
  margin: 0 0 10px; padding: 8px 10px;
  background: var(--brand-yellow-50, #fff9e8);
  border: 1px solid var(--brand-yellow, #fbba05); border-radius: 6px;
  font-size: 12.5px; line-height: 1.4; color: var(--ink-700, #33445c);
}

/*
 * KEINE Mindesthöhe. Sie war die Ursache für das Überlappen: Eine Karte von
 * 07:00 bis 08:00 bekommt bei 130 Pixeln Feldhöhe rund 13 Pixel, wurde aber
 * auf 16 aufgeblasen – und schob sich damit über den Termin darunter
 * (Martins Donnerstag, 02.09.2026). Die Karte ist so hoch wie ihre Zeit,
 * nicht mehr und nicht weniger; was hineinpasst, regeln die Stufen unten.
 */
.mx-karte {
  position: absolute; left: 0; right: 3px; overflow: hidden;
  border-left: 3px solid var(--card-farbe, var(--ink-300));
  background: var(--ink-50); border-radius: 5px; padding: 2px 4px;
  font-size: 10.5px; line-height: 1.2; cursor: pointer;
  box-shadow: 0 1px 2px rgba(11,26,44,.08);
  z-index: 1;                    /* immer ueber dem Abwesenheitsstreifen */
}
.mx-karte.fremd { opacity: .55; }        /* führt ein anderer – trotzdem belegt */

/*
 * „Umplanen": Auf dieser Karte steht jemand, der laut Zeiterfassung an dem
 * Tag fehlt (Tim, 23.09.2026). Der Auftrag bleibt stehen – er verschwindet
 * nicht und wird nicht umbesetzt –, aber man muss ihn finden, ohne danach zu
 * suchen. Deshalb roter Rahmen, nicht nur ein Tooltip.
 *
 * Bis dahin sagte das nur die Matrix, und dort nur als Rahmen um das ganze
 * FELD: Man sah, dass in dieser Spalte etwas nicht stimmt, aber nicht bei
 * welcher Karte.
 */
.mx-karte.umplanen {
  box-shadow: inset 0 0 0 1.5px var(--danger), 0 1px 2px rgba(11,26,44,.08);
}
.einsatz.umplanen {
  box-shadow: 0 0 0 2px var(--danger), var(--shadow-card);
}
.umplanen-hinweis {
  display: block; margin-top: 4px;
  font-size: 10.5px; font-weight: 700; line-height: 1.25;
  color: var(--danger); overflow-wrap: anywhere;
}
/* In der Woche sind die Kärtchen schmal – dort nur die Kurzform */
.tag .einsatz .umplanen-hinweis { font-size: 10px; }
/* Bei sehr kurzen Tagesblöcken ist kein Platz; der rote Rahmen bleibt */
.tl-block.sehr-knapp .umplanen-hinweis { display: none; }

/* Noch nicht veröffentlicht – kleiner als in Tag und Woche, die Matrixkarten
   sind nur ein paar Millimeter hoch. Oben rechts, wo sonst nichts steht;
   die Uhrzeit beginnt links (Tim, 23.09.2026). */
.mx-karte .pub-punkt {
  top: 2px; right: 2px; width: 8px; height: 8px; border-width: 1.5px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.7);
}
.mx-karte .mx-titelzeile { padding-right: 12px; }

/* Wer ist noch dabei? Kleine Gesichter unten in der Karte – der Monteur der
   Spalte fehlt, den sagt schon die Spalte. Bei kurzen Terminen ist kein Platz
   dafür; dann bleibt die Uhrzeit stehen (Tim, 31.08.2026). */
.mx-crew {
  position: absolute; left: 4px; right: 3px; bottom: 2px;
  display: flex; gap: 2px; flex-wrap: nowrap; overflow: hidden;
  pointer-events: none;
}
/*
 * Die Gesichter selbst sind anklickbar - darueber nimmt man einen Lehrling
 * vom Auftrag, genau wie in Tag und Woche. Der Rest der Leiste bleibt
 * durchlaessig, damit die Karte weiter ziehbar ist (Tim, 08.09.2026).
 */
.mx-crew .crew-chip {
  pointer-events: auto; cursor: pointer; border-radius: 999px;
  display: inline-flex; flex: 0 0 auto;
}
.mx-crew .crew-chip:hover { outline: 2px solid var(--brand-blue); outline-offset: 1px; }
body.finger .mx-crew .crew-chip::after { content: ''; position: absolute; inset: -4px; }
/* 22 statt 17 px: Bei 17 waren die Gesichter zwar da, aber man erkannte
   niemanden mehr darauf (Martin Schneider, 31.08.2026). */
.mx-crew .avatar {
  width: 22px; height: 22px; font-size: 9px; border-width: 1.5px; flex: 0 0 auto;
}
/* Die Anzahl der Mitfahrer, wenn für die Gesichter kein Platz mehr ist */
.mx-crew-n {
  display: none; position: absolute; right: 4px; bottom: 2px;
  min-width: 14px; padding: 0 4px; border-radius: 999px;
  background: var(--ink-200); color: var(--ink-700);
  font-size: 9px; font-weight: 800; line-height: 14px; text-align: center;
  pointer-events: none;
}
.mx-crew-n::before { content: '+'; }

/*
 * Die vier Stufen. Was keinen Platz hat, fällt von unten nach oben weg –
 * der Titel hält sich am längsten, denn er sagt, worum es geht. Alles
 * Weggelassene steht im Detail, das ein Antippen ohnehin öffnet
 * (Tim, 02.09.2026).
 */
.mx-karte.mx-s1 { padding-bottom: 25px; }          /* Platz für die Gesichter */
.mx-karte.mx-s2 { padding-bottom: 2px; }
.mx-karte.mx-s2 .mx-crew   { display: none; }
.mx-karte.mx-s2 .mx-crew-n { display: block; }

.mx-karte.mx-s3 { padding-bottom: 2px; }
/* s3: Titel und Beginn in EINER Zeile; gekürzt wird der Titel, die Zeit
   bleibt stehen (Tim, 29.09.2026, Ralph Runde 3 T3) */
.mx-karte.mx-s3 .mx-beginn { display: block; }
.mx-karte.mx-s3 .mx-zeit,
.mx-karte.mx-s3 .mx-crew,
.mx-karte.mx-s3 .mx-crew-n { display: none; }

/* Ganz eng: nur noch der farbige Balken – Text wäre hier ohnehin Brei */
.mx-karte.mx-s4 { padding: 0; border-left-width: 4px; }
.mx-karte.mx-s4 > * { display: none; }

/* Ausgewählt: dieselbe Kennzeichnung wie der Block in Tag und Woche, damit
   klar ist, worauf sich die Aktionsleiste unten bezieht. */
.mx-karte.ausgewaehlt {
  box-shadow: 0 0 0 2px var(--brand-blue); background: var(--brand-blue-100);
}
.mx-karte.dragging  { opacity: .4; }
.mx-karte.dragover  { box-shadow: 0 0 0 2px var(--brand-blue); background: var(--brand-blue-100); }
.mx-karte.blockiert { box-shadow: 0 0 0 2px var(--danger); background: var(--danger-bg); }

/* ---------- Matrix: Blocker der gezogenen Person ----------
   Die Matrix zeigt Monteurspalten – ein Lehrling mit Schulwoche taucht darin
   gar nicht auf. Beim Ziehen wird deshalb seine Abwesenheit über die ganze
   Tageszeile gelegt, mit der Beschriftung links an der Tagesspalte. Sonst
   steht man vor einem Donnerstag, in den nichts hineingeht, ohne den Grund
   zu sehen (Tim, 31.08.2026). */
.mx-feld.abwesend-zone {
  background: rgba(196, 61, 61, .14);
  border-color: var(--danger) !important;
  cursor: not-allowed;
}
.mx-feld.abwesend-zone .mx-karte { opacity: .3; }
/* Teilabwesenheit färbt das Feld nicht ein – nur der gesperrte Streifen zählt,
   die freie Hälfte soll weiterhin nach „hier geht was" aussehen. */
.mx-feld.abwesend-teil { border-color: #e8c39a !important; }
/* Die Sperre liegt auf den Stunden, die weg sind – nicht auf dem ganzen Feld.
   Bei Teilabwesenheit bleibt die freie Hälfte offen und einladend. */
.mx-feld .mx-sperre {
  position: absolute; left: 2px; right: 2px; z-index: 4;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; padding: 0 4px; pointer-events: none;
  min-height: 14px; overflow: hidden;
}
.mx-feld .mx-sperre span {
  font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 999px; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mx-feld .mx-sperre.ganz {
  background: rgba(196, 61, 61, .3);
  border: 1px solid var(--danger);
}
.mx-feld .mx-sperre.ganz span {
  color: var(--white); background: var(--danger);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.mx-feld .mx-sperre.teil {
  background: rgba(253,240,227,.8);      /* flächig, Schraffur = verliehen (Runde 6 T4) */
  border: 1px solid #e8c39a;
}
.mx-feld .mx-sperre.teil span {
  color: #a5621a; background: #fdf0e3; border: 1px solid #e8c39a;
}
/* Die Tagesspalte links färbt mit, damit die Zeile als Ganzes auffällt */
.mx-tag.abwesend-zone { background: var(--danger); color: var(--white); }
.mx-tag.abwesend-zone b { color: var(--white); }
.mx-tag.abwesend-teil { background: #fdf0e3; }

/*
 * Eingeteilt bei einer fremden Anzeigetafel: früher ein blauer Riegel über
 * den ganzen Tag (Tim, 11.09.2026), seit Runde 6 T4 eine schraffierte Karte
 * zur echten Uhrzeit (.mx-karte.ausgeliehen, siehe „Ausgeliehen“ unten).
 */

/* Person steht auf dieser Karte schon – gelb wie in der Wochenansicht */
.mx-karte.belegt-zone {
  outline: 2px dashed var(--brand-yellow); outline-offset: -2px;
  background: rgba(251, 186, 5, .18);
}
/* Titel vor Uhrzeit (Tim, 29.09.2026, Ralph Runde 3 T3): der Titel fett und
   dunkel oben, die Zeit darunter klein und grau – sie ist nur Beiwerk. */
.mx-titelzeile { display: flex; min-width: 0; font-weight: 700; color: var(--ink-900); }
.mx-titel { display: block; flex: 0 1 auto; min-width: 0;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-beginn { display: none; flex: none; white-space: pre; }
.mx-zeit  { display: block; font-size: 9.5px; font-weight: 400; color: var(--ink-500);
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Einsatznotiz im Kärtchen nur, wenn über s1 hinaus Platz ist – sonst
   steht sie im Tooltip (Tim, 28.09.2026, Ralph T4) */
.mx-notiz { display: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
            font-style: italic; color: var(--ink-500); }
.mx-karte.mx-s1.mx-notiz-platz .mx-notiz { display: block; }
/* Service-Aktivität unter dem Titel (Runde 6 T9); in s3 ist nur eine Zeile Platz */
.mx-akt { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
          font-size: 9.5px; font-weight: 600; color: var(--ink-700); }
.mx-karte.mx-s3 .mx-akt { display: none; }
.mx-summe {
  position: absolute; right: 5px; bottom: 3px; z-index: 2;
  font-size: 9.5px; font-weight: 800; color: var(--ink-500);
  background: var(--white); border-radius: 4px; padding: 0 3px;
}
/*
 * Karte reicht bis an die Summe (Ralph Runde 5 T11): Inhalt rückt nach links,
 * --summe-b = wie weit die Summe von rechts in die Karte ragt (matrixSummePlatz).
 */
.mx-karte.neben-summe { padding-right: calc(var(--summe-b) + 2px); }
.mx-karte.neben-summe .mx-crew { right: calc(var(--summe-b) + 2px); }
.mx-karte.neben-summe .mx-crew-n,
.mx-karte.neben-summe .pub-punkt { right: calc(var(--summe-b) + 2px); }
.mx-karte.neben-summe .adr-warnung { right: calc(var(--summe-b) + 12px); }
/*
 * Der Abwesenheitsgrund liegt HINTER den Karten (z-index 0), nicht darüber.
 * Bis 02.09.2026 war dieses Feld die einzige Füllung – die Aufträge der
 * Person wurden an Abwesenheitstagen gar nicht erst gezeichnet und waren
 * damit unauffindbar (Fall Nemanja). Jetzt ist es reine Hintergrundschrift.
 */
.mx-abw {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; color: var(--ink-500); text-align: center;
  z-index: 0; pointer-events: none;
}

/*
 * Abwesend UND trotzdem eingeteilt: Das ist kein Normalzustand, sondern
 * etwas, das jemand sehen und aufloesen muss. Der Grund rutscht nach oben
 * und wird rot, die Karten bleiben voll lesbar darunter.
 */
.mx-feld.abwesend.abw-trotzdem {
  border-color: var(--danger);
  box-shadow: inset 0 0 0 1px var(--danger);
}
.mx-feld.abwesend.abw-trotzdem .mx-abw {
  align-content: start; color: var(--danger); opacity: .85;
}

/* Kalenderwoche klein unter „Diese Woche" im Datumsknopf */
.kw-klein {
  display: block; margin-top: -2px;
  font-size: 10px; font-weight: 700; line-height: 1.2;
  color: var(--ink-500); letter-spacing: .02em;
}

/*
 * Wochenstunden unter dem Avatar (Wochenansicht).
 *
 * Gemessen wird nicht an einer festen Stundenzahl, sondern an dem, was die
 * Person in dieser Woche überhaupt leisten kann – sonst stünde jemand mit
 * zwei Urlaubstagen immer grün da (Tim, 30.08.2026).
 * Gelb und Orange sind hier bewusst nicht in Markenfarbe: Sie bedeuten
 * "Achtung", nicht "ausgewählt".
 */
.wochen-std {
  display: block; margin: 1px auto 0; width: fit-content;
  padding: 1px 6px; border-radius: 999px;
  font-size: 9px; font-weight: 800; line-height: 1.5; white-space: nowrap;
}
.wochen-std.frei { background: #e6f4ea; color: #1e7c3a; }
.wochen-std.eng  { background: #fdf0d5; color: #a76a08; }
.wochen-std.voll { background: #fbe3e1; color: #b3403a; }

/* Welche Woche die Stunden meinen – anklickbare Wochenzeile */
.woche-titel { cursor: pointer; }
.woche-marke {
  display: none; margin-left: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  color: var(--ink-500); text-transform: none;
}
.woche.aktive-woche > .woche-titel {
  color: var(--brand-blue);
}
.woche.aktive-woche > .woche-titel .woche-marke { display: inline; }
.woche.aktive-woche > .woche-grid {
  box-shadow: inset 0 0 0 2px var(--brand-blue-200, #b8d4ea);
  border-radius: 10px;
}

.abw-label {
  display: block; margin-top: 1px;
  font-size: 8px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #b3403a; line-height: 1.1;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Monatsansicht ---------- */
.monat-wochentage {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--ink-400); margin: 0 0 6px; padding: 0 2px;
}
.monat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.monat-zelle {
  background: var(--white); border: 1px solid var(--ink-200); border-radius: 10px;
  min-height: 92px; padding: 5px 6px; box-shadow: var(--shadow-card);
  transition: border-color .15s, box-shadow .15s;
}
.monat-zelle .mz-nr {
  font-size: 11px; font-weight: 700; color: var(--ink-400);
  cursor: pointer; display: block; margin-bottom: 4px;
}
.monat-zelle .mz-nr:hover { color: var(--brand-blue); }
.monat-zelle.fremd { opacity: .45; }
.monat-zelle.heute { border-color: var(--brand-yellow); background: var(--brand-yellow-50); }
.monat-zelle.heute .mz-nr { color: var(--brand-yellow-600); }
.monat-zelle.dragover { border-color: var(--brand-yellow); box-shadow: 0 0 0 2px var(--brand-yellow); }
.monat-chip {
  display: flex; align-items: center; gap: 4px;
  border-left: 3px solid var(--card-farbe, var(--brand-yellow));
  background: var(--ink-50); border-radius: 5px;
  font-size: 10px; font-weight: 600; color: var(--ink-700);
  padding: 2px 4px; margin-bottom: 3px; cursor: grab;
  white-space: nowrap; overflow: hidden;
}
.monat-chip:hover { background: var(--brand-blue-100); }
.monat-chip .mc-avs { margin-left: auto; display: flex; gap: 1px; flex-shrink: 0; }
.monat-chip .mc-av {
  width: 15px; height: 15px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 7px; font-weight: 700; color: var(--brand-blue);
  background: color-mix(in srgb, var(--av) 25%, var(--white));
  border: 1px solid var(--av);
}
.monat-chip.dragging { opacity: .4; }

/* ---------- Tages-Zeitleiste ---------- */
.tl { display: grid; grid-template-columns: 52px 1fr; gap: 0; }
.tl-achse { position: relative; }
.tl-achse span {
  position: absolute; right: 8px; transform: translateY(-50%);
  font-size: 11px; font-weight: 600; color: var(--ink-400);
}
.tl-canvas {
  position: relative; background: var(--white);
  border: 1px solid var(--ink-200); border-radius: var(--r-md);
  box-shadow: var(--shadow-card); overflow: hidden;
  background-image:
    repeating-linear-gradient(to bottom, var(--ink-100) 0 1px, transparent 1px var(--px-h, 56px));
  background-position: 0 0;
}
.tl-canvas.dragover { outline: 2px solid var(--brand-yellow); outline-offset: -2px; }
.tl-lane {
  position: absolute; top: 0; bottom: 0; width: 0;
  border-right: 1px solid var(--ink-100); pointer-events: none;
}
.tl-block {
  position: absolute; width: calc(100% / var(--spalten) - 10px);
  margin: 0; cursor: grab; touch-action: none;
}
.tl-block.bewegt {
  opacity: .9; z-index: 6; cursor: grabbing;
  box-shadow: var(--shadow-hover), 0 0 0 2px var(--brand-yellow);
}
.tl-block .crew { min-height: 0; }

/* ---------- Der Block IST seine Zeit ----------
   Die Höhe kommt aus der Dauer, nicht aus dem Text. Was nicht hineinpasst,
   wird abgeschnitten – ein Block, der über seine Uhrzeit hinauswächst,
   macht die ganze Zeitachse wertlos (Tim, 31.08.2026).

   Damit trotzdem das Wichtigste lesbar bleibt, fällt der Inhalt gestaffelt
   weg: erst die Notiz, dann der Betreff. Kunde und Uhrzeit bleiben immer. */
.tl-block {
  overflow: hidden;
  display: flex; flex-direction: column;
  /* Bandhoehe an einer Stelle – Polsterung und Griff halten sich daran */
  --griff-h: 15px;
  padding-top: calc(var(--griff-h) + 3px);
  padding-bottom: calc(var(--griff-h) + 3px);
}
.tl-block .titel,
.tl-block .kunde { overflow: hidden; }
/* Crew sitzt unten, nutzt jetzt die volle Breite: Der Griff hat sein eigenes
   Band darunter und braucht hier keine Reserve mehr (23.09.2026). */
.tl-block .crew { margin-top: auto; padding-right: 0; }

/*
 * Titel vor Uhrzeit (Tim, 29.09.2026, Ralph Runde 3 T2).
 *
 * In der Tagesansicht sagt die Zeitachse schon, wann ein Block liegt. Wichtig
 * ist, WAS es ist: der Kunde, bei Vorlagen der eigene Name. Die Uhrzeit wird
 * deshalb zu kleinem grauem Text unter dem Titel – weiterhin klickbar, er
 * öffnet den Zeit-Dialog wie bisher. Vorher fiel bei kurzen Blöcken zuerst
 * der Titel weg, und eine Vorlagen-Karte zeigte nur noch die blaue Zeit-Pille.
 *
 * „Titel" ist .kunde, oder – bei Vorlagen und Aufträgen ohne Kunden – die
 * .titel direkt hinter der Nummer.
 */
.tl-block .zeit {
  align-self: flex-start; flex-shrink: 0;
  background: none; border-radius: 0; padding: 0; margin-top: 2px;
  font-size: 10.5px; font-weight: 500; color: var(--ink-500);
}
.tl-block .zeit:hover { background: none; color: var(--brand-blue-600); text-decoration: underline; }

/* Knapp (unter 120px): Titel oben, darunter die Zeit – Nummer, Betreff und
   Notiz fallen weg. Der Titel darf nicht schrumpfen, sonst schneidet der
   Block ihn statt der Gesichter ab. */
.tl-block.knapp .nummer,
.tl-block.knapp .notiz,
.tl-block.knapp .kunde + .titel { display: none; }
.tl-block.knapp :is(.kunde, .nummer + .titel) {
  flex-shrink: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Sehr knapp (unter 70px): NUR der Titel, eine Zeile mit Auslassungspunkten.
   Früher schrumpfte er als Erstes und wurde oben abgeschnitten. */
.tl-block.sehr-knapp .zeit,
.tl-block.sehr-knapp .crew,
.tl-block.sehr-knapp .konflikt { display: none; }
.tl-block.sehr-knapp :is(.kunde, .nummer + .titel) {
  display: block; flex-shrink: 0;
  font-size: 11px; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/*
 * „überschneidet" in der Tagesansicht (Runde 3 T2): Das Schild steht im
 * Fluss unter den Gesichtern statt absolut unten rechts – dort lag es in
 * kurzen Blöcken unter dem Zieh-Griff. In knappen Blöcken ist dafür kein
 * Platz; stattdessen ein oranger Rahmen wie der rote von .umplanen. Rot hat
 * Vorrang: Fehlt jemand, ist das wichtiger als eine Überschneidung.
 */
.tl-block .konflikt {
  position: static; align-self: flex-start; flex-shrink: 0; margin-top: 4px;
}
.tl-block.knapp .konflikt { display: none; }
.tl-block.knapp.ueberschneidet:not(.bewegt) {
  box-shadow: 0 0 0 2px var(--warning), var(--shadow-card);
}
.tl-block.knapp.ueberschneidet.umplanen:not(.bewegt) {
  box-shadow: 0 0 0 2px var(--danger), var(--shadow-card);
}

/* ---------- Resize-Griffe (Maus + Touch) ---------- */
/*
 * Der Griff sitzt rechts, nicht über die ganze Breite.
 *
 * Vorher lag er als 22 Pixel hohes Band über der kompletten Unterkante – und
 * damit dauerhaft auf der Gesichterreihe, weil er am Finger immer sichtbar
 * ist. Wer jemanden wieder vom Auftrag nehmen wollte, traf den Griff statt
 * des Avatars (Tim, 15.09.2026: „Die Namen werden von den Pfeilen verdeckt").
 *
 * Gezogen wird ohnehin nur senkrecht, also genügt ein Griff am Eck. Die
 * Gesichter fuellen von links auf und laufen nie hinein; die Trefferflaeche
 * ist grosszuegiger als das, was man sieht.
 */
/*
 * Die Pfeile haben eine eigene Zone – oben und unten im Block, ueber und
 * unter dem Inhalt (Tim, 23.09.2026).
 *
 * Vorgeschichte in drei Anlaeufen: Erst lagen die Griffe ueber die volle
 * Breite und verdeckten die Gesichter. Dann rueckten sie ans rechte Eck und
 * verdeckten das ✕. Dann wurde das ✕ verschoben und der rote Punkt war im
 * Weg. Jedes Mal haben wir sie ein Stueck weitergeschoben, und jedes Mal
 * kamen sie dem Naechsten in die Quere.
 *
 * Jetzt teilen sie sich den Platz mit gar nichts mehr: Der Block reserviert
 * oben und unten ein Band, in dem ausschliesslich der Pfeil sitzt. Der
 * Inhalt faengt darunter an und hoert darueber auf. Damit kann sich das
 * Problem nicht wiederholen - es gibt keinen gemeinsamen Platz mehr.
 *
 * Echtes Ausserhalb ging nicht: .tl-block schneidet ab (damit ein kurzer
 * Block nicht ueber seine Uhrzeit hinausschreibt), und bei lueckenlos
 * aneinandergrenzenden Terminen waere dazwischen ohnehin kein Platz.
 */
.griff {
  position: absolute; left: 0; right: 0; height: var(--griff-h, 16px);
  display: flex; align-items: center; justify-content: center;
  cursor: ns-resize; touch-action: none; user-select: none;
  opacity: 0; transition: opacity .12s; z-index: 2;
}
/* Unsichtbar groesser: am Finger faengt der Griff auch knapp daneben */
.griff::before {
  content: ''; position: absolute; inset: -6px -4px;
}
.griff::after {
  content: '↕'; font-size: 10px; line-height: 1;
  color: var(--brand-blue); background: var(--brand-blue-100);
  border: 1px solid var(--brand-blue-200); border-radius: 999px;
  padding: 1px 10px;
}
.griff:hover::after, .griff:active::after { background: var(--brand-yellow); border-color: var(--brand-yellow-600); }
/* Innen statt halb überstehend: Seit der Block seine Zeit exakt abbildet und
   deshalb abschneidet, wären überstehende Griffe angeschnitten. Innen liegen
   sie ausserdem nicht mehr über dem Nachbarblock (Tim, 31.08.2026). */
/*
 * Oben links, unten rechts – diagonal versetzt, damit sich die Griffe mit
 * nichts anlegen: Oben rechts sitzt das ✕ zum Löschen, unten links stehen
 * die Gesichter. Vorher lagen beide Griffe über die volle Breite und damit
 * über genau diesen beiden Bedienelementen; am Finger, wo sie dauerhaft
 * sichtbar sind, traf man deshalb regelmässig den Griff statt des Ziels
 * (Tim, 15.09.2026).
 */
/*
 * Beide Griffe rechts, oben wie unten (Tim, 17.09.2026).
 *
 * Der erste Versuch setzte den oberen nach links – frei von ✕ und Punkt,
 * aber mitten auf der Auftragsnummer, und man musste sich zwei verschiedene
 * Ecken merken. Rechts oben und rechts unten ist die Kante, an der man zieht,
 * und sonst nichts.
 *
 * Oben ist der Griff schmaler: Dort teilt er sich die Zeile mit dem ✕ und
 * dem roten Punkt, die beide links daneben rücken.
 */
/*
 * Beide Griffe: gleiche Breite, gleicher rechter Rand – damit stehen die
 * zwei Pillen exakt übereinander auf derselben senkrechten Achse (Tim,
 * 17.09.2026: „Pfeilsymbol gleich groß wie unten, in der gleichen
 * vertikalen Achse"). Oben war der Griff eine Zeit lang schmaler, weil er
 * sich die Zeile mit ✕ und rotem Punkt teilte; die beiden rücken jetzt
 * stattdessen weiter nach links (siehe .tl-block .x / .pub-punkt).
 */
.griff-oben  { top: 0; }
.griff-unten { bottom: 0; }
.tl-block:hover .griff, .tl-block.ausgewaehlt .griff { opacity: 1; }

/* Während des Ziehens: andere Blöcke stillhalten (kein Hover-Geblinke) */
.tl-canvas.ziehen .tl-block:not(.bewegt) { pointer-events: none; }
.tl-canvas.ziehen .tl-block:not(.bewegt) .griff { opacity: 0; }

/* ---------- Wochenansicht: Tage, an denen die gezogene Person fehlt ----------
   Beim Ziehen eines Avatars über das 3-Wochen-Board leuchten alle Tage rot
   auf, an denen die Person laut Zeiterfassung nicht da ist. So sieht man
   sofort, wo sie einsetzbar ist – ohne jeden Tag einzeln zu prüfen. */
.tag.abwesend-zone {
  background: rgba(196, 61, 61, .14);
  outline: 2px solid var(--danger); outline-offset: -2px;
  cursor: not-allowed;
}
.tag.abwesend-zone .tag-kopf { background: var(--danger); color: var(--white); }
.tag.abwesend-zone .tag-body { opacity: .35; }
.tag.abwesend-zone::after {
  content: attr(data-abw-grund);
  position: absolute; left: 4px; right: 4px; top: 50%; transform: translateY(-50%);
  z-index: 3; text-align: center;
  font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
  color: var(--white); background: var(--danger);
  padding: 3px 4px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Person steht an dem Tag schon auf einem Auftrag – gelber Hinweis */
.tag.belegt-zone { background: rgba(251, 186, 5, .16); outline: 2px dashed var(--brand-yellow); outline-offset: -2px; }
.tag { position: relative; }

/* ---------- Blockzonen: Person ist im Zeitraum schon verplant ---------- */
.blockzone {
  position: absolute; left: 0; right: 0;
  background: rgba(196, 61, 61, .3);          /* Rot, 30 % Opacity */
  border-top: 1px dashed var(--danger);
  border-bottom: 1px dashed var(--danger);
  z-index: 4; pointer-events: none;
  display: flex; align-items: flex-start; justify-content: flex-end;
}
.blockzone span {
  font-size: 10px; font-weight: 700; color: #fff;
  background: var(--danger); border-radius: 0 0 0 8px; padding: 2px 8px;
}
.einsatz.blockiert {
  outline: 2px solid var(--danger);
  background: rgba(196, 61, 61, .12);
  cursor: not-allowed;
}

/* ---------- Rückgängig + Aktualisieren ---------- */
#btnUndo:disabled { opacity: .35; cursor: default; }
.btn-publish { position: relative; }
.btn-publish.offen::after {
  content: ''; position: absolute; top: -4px; right: -4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--white);
}

/* ---------- Fortschritt beim Schreiben der Outlook-Termine ----------
   Eine Runde dauert bis zu 85 Sekunden, bei einer ganzen Woche braucht es
   mehrere. Ohne sichtbaren Fortschritt steht der Knopf minutenlang auf
   demselben Text und wirkt hängengeblieben (Tim, 01.09.2026).
   Der Balken liegt hinter der Beschriftung und wächst mit dem Anteil der
   bereits geschriebenen Termine. */
.btn-publish.laeuft { overflow: hidden; cursor: progress; }
.btn-publish.laeuft::before {
  content: ''; position: absolute; inset: 0;
  width: var(--fortschritt, 0%);
  background: rgba(255, 255, 255, .45);
  transition: width .4s ease;
  pointer-events: none;
}
/* Der rote Punkt lenkt während des Laufs nur ab – es passiert ja gerade etwas */
.btn-publish.laeuft::after { display: none; }

/* ---------- Auswahl + Aktionsleiste ---------- */
.einsatz.ausgewaehlt {
  outline: 2px solid var(--brand-blue-500); outline-offset: 1px;
  box-shadow: var(--shadow-hover);
}
.aktionsleiste[hidden] { display: none; }
.aktionsleiste {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; gap: 8px; align-items: center;
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: 999px; padding: 8px 10px 8px 16px;
  box-shadow: var(--shadow-hover); font-size: 13px; font-weight: 600;
  color: var(--ink-700); animation: einsatz-in .15s ease-out;
  max-width: 92vw;
}
.aktionsleiste .al-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aktionsleiste button { padding: 7px 12px; border-radius: 999px; }

/*
 * Einfügemodus: deutlich anders eingefärbt als die normale Aktionsleiste.
 * Man soll auf einen Blick sehen, dass gerade ein besonderer Zustand läuft,
 * in dem ein Tipp etwas anlegt.
 */
.einfuege-leiste {
  background: var(--brand-blue); border-color: var(--brand-blue);
  color: var(--white);
}
.einfuege-leiste .el-hinweis {
  font-size: 11px; font-weight: 500; opacity: .8; white-space: nowrap;
}
.einfuege-leiste .btn-accent { background: var(--brand-yellow); color: var(--ink-900); }
/* Im Einfügemodus zeigt der Zeiger, dass hier etwas abgesetzt wird */
body.einfuegen .mt-flaeche, body.einfuegen .tag-body { cursor: copy; }

/* ---------- Personenfilter sichtbar machen ----------
   Solange nach einer Person gefiltert wird, ist der Arbeitsbereich umrandet
   und trägt oben eine Fahne mit dem Namen. Ohne das zieht man Aufträge
   hinein, sie sind sofort wieder weg (der neue Termin hat noch niemanden
   zugeteilt und fällt durch den Filter) – und man zieht sie mehrfach hinein,
   bis der Filter weg ist und alles doppelt dasteht. Gemeldet 23.08.2026. */
body.person-gefiltert #kalender {
  position: relative;
  box-shadow: inset 0 0 0 3px var(--brand-yellow);
  border-radius: var(--r-md, 10px);
}

/* ---------- Nur lesen (Monteure) ----------
   Dieselbe Übersicht wie für Planer, aber ohne Werkzeug: kein Löschen, keine
   Zeitgriffe, kein Stern. Was man nicht darf, soll man auch nicht sehen –
   ein ✕, das beim Antippen "keine Berechtigung" sagt, ärgert nur.
   Die verbindliche Sperre sitzt im Server, das hier ist die Oberfläche. */
body.nur-lesen .einsatz .x,
body.nur-lesen .crew-chip .chip-x,
body.nur-lesen .fav-stern,
body.nur-lesen .griff,
body.nur-lesen #btnNeuerAuftrag,
body.nur-lesen .eintrag-schnell { display: none; }
/* Karten bleiben anklickbar (Details), aber nichts daran lässt sich fassen */
body.nur-lesen .einsatz,
body.nur-lesen .tl-block { cursor: default; }

/* Ausnahme: der eigene Eintrag aus der Vorlage – Arzttermin, Behördengang.
   Den muss man auch wieder loswerden und verschieben können. */
body.nur-lesen .einsatz.mein-eintrag { cursor: grab; }
body.nur-lesen .einsatz.mein-eintrag .x,
body.nur-lesen .einsatz.mein-eintrag .griff { display: block; }
body.nur-lesen .einsatz.mein-eintrag .x { opacity: 1; }

/* ---------- Fingerbedienung (iPad, Handy) ----------
   Gesetzt von app.js als Klasse am <body>. Sie fasst zwei Fälle zusammen:
   echte Berührungsgeräte (pointer: coarse) und den Schalter ?touch=1, mit
   dem die Geräte-Vorschau die iPad-Bedienung am Rechner nachstellt. Früher
   stand hier eine reine Medienabfrage – die griff bei ?touch=1 nicht, die
   Vorschau zeigte also eine Bedienung, die es am iPad so nicht gibt.

   Am Finger gibt es kein Hover. Was im CSS erst bei :hover auftaucht, ist
   hier dauerhaft sichtbar. Und es muss größer sein: 17 px trifft der Daumen
   nicht zuverlässig. Vergrößert wird die unsichtbare Fläche über ein
   ::after, nicht das Symbol – so bleibt das Bild ruhig und nichts
   verschiebt sich. */
/* ---------- Warum touch-action hier entscheidet ----------
   Am iPad läuft das Desktop-Board mit dem Finger. Ohne Angabe steht jedes
   Element auf touch-action:auto – dann reisst Safari JEDE Fingerbewegung als
   Scrollen an sich und schickt ein pointercancel, bevor unser Zug anspringt.
   Auftragskarten liessen sich deshalb am iPad gar nicht herausziehen.

   Erster Versuch war pan-y: senkrecht scrollt der Browser, waagrecht ziehen
   wir. Technisch richtig, in der Hand aber zäh – Safari wartet erst ab, wohin
   die Geste geht, und das kostete rund eine Sekunde, bevor die Karte folgte
   (gemeldet 23.08.2026).

   Deshalb jetzt none: Die Karte folgt dem Finger sofort. Gescrollt wird
   stattdessen am breiten Balken rechts an der Liste (siehe .pool-liste) oder
   an der freien Fläche zwischen den Karten. */
body.finger .pool-card,
body.finger .team-item { touch-action: none; }

/* ---------- Scrollbalken zum Anfassen ----------
   Zuerst standen hier ::-webkit-scrollbar-Regeln. Am Rechner sah das gut aus,
   am iPad war es wertlos: iOS zeichnet eigene Überlagerungsbalken, die man
   nicht greifen kann – und weil die Karten auf touch-action:none stehen,
   liess sich die Liste überhaupt nicht mehr bewegen (gemeldet 24.08.2026).
   Deshalb ein eigener Balken mit eigenen Zeigerereignissen (app.js,
   fingerScroller). Er sitzt neben der Liste, nicht darin – sonst würde er
   mitscrollen. */
/* Breite 24 statt 12 Pixel, Griff mindestens 64 hoch: Mit 12 Pixeln traf
   man den Balken am iPad kaum (Tim, 28.09.2026). */
body.finger .pool-liste,
body.finger .teamleiste { padding-right: 30px; }

.fs-bahn {
  position: fixed; width: 24px;
  background: var(--ink-100); border-radius: 12px;
  touch-action: none; z-index: 5;
}
.fs-griff {
  width: 100%; min-height: 64px; border-radius: 12px;
  background: var(--brand-blue-500);
  border: 2px solid var(--white);
  touch-action: none; cursor: grab;
}
.fs-griff.zieht { background: var(--brand-blue); cursor: grabbing; }

/* Am Finger sichtbar und etwas groesser – aber weiterhin nur am rechten Eck,
   damit die Gesichter darunter frei bleiben (Tim, 15.09.2026). */
/* Am Finger wird das Band höher – Polsterung und Griff folgen automatisch,
   weil beide an derselben Variable hängen (23.09.2026). */
body.finger .griff { opacity: 1; }
body.finger .tl-block { --griff-h: 21px; }
body.finger .tl-block.sehr-knapp .griff { width: 58px; height: 18px; }
body.finger .tl-block.sehr-knapp .x         { right: 64px; }
body.finger .tl-block.sehr-knapp .pub-punkt { right: 88px; }
body.finger .griff::after { font-size: 12px; padding: 2px 12px; }
body.finger .griff::before { inset: -10px -6px; }   /* Trefferflaeche fuer den Daumen */

body.finger .einsatz .x { opacity: 1; font-size: 15px; }
body.finger .fav-stern  { opacity: 1; }

/* Trefferfläche aufziehen. Maßvoll beim ✕ am Termin: Löschen fragt noch
   nicht nach, ein zu großes Ziel im Kartenkopf träfe man versehentlich. */
body.finger .einsatz .x::after   { content: ''; position: absolute; inset: -6px; }
body.finger .fav-stern::after    { content: ''; position: absolute; inset: -8px; }
/* Beim Crew-Chip bewusst klein: Der Chip selbst öffnet das Personenmenü.
   Zieht man das ✕ zu weit auf, verschluckt es den Chip und man löscht
   Leute, die man nur ansehen wollte. */
body.finger .crew-chip .chip-x {
  opacity: 1; width: 17px; height: 17px; line-height: 17px;
}
body.finger .crew-chip .chip-x::after { content: ''; position: absolute; inset: -4px; }

/* ---------- Zeit-Chip auf Einsatzkarten ---------- */
.zeit {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--font-sans); font-size: 10px; font-weight: 600;
  color: var(--brand-blue-600); background: var(--brand-blue-100);
  border: 0; border-radius: 6px; padding: 2px 7px; margin-top: 5px;
  cursor: pointer;
}
.zeit:hover { background: var(--brand-blue-200); }

/* ---------- Tagesansicht ---------- */
.tv-kopf { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.tv-datum { font-weight: 800; font-size: 18px; color: var(--brand-blue); }
.tv-lane-titel {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--brand-yellow-600);
  margin: 14px 0 6px 2px;
}
.tv-gz {
  display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start;
  min-height: 68px; background: var(--white);
  border: 1px dashed var(--ink-300); border-radius: var(--r-md);
  padding: 10px; transition: box-shadow .15s, border-color .15s;
}
.tv-gz.dragover { border-color: var(--brand-yellow); box-shadow: 0 0 0 2px var(--brand-yellow); }
.tv-gz .einsatz, .tv-slot .einsatz { width: 250px; }
.tv-wrap {
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: 4px 10px 8px;
}
.tv-row { display: grid; grid-template-columns: 54px 1fr; border-top: 1px solid var(--ink-100); }
.tv-row:first-child { border-top: 0; }
.tv-stunde { font-size: 11px; font-weight: 600; color: var(--ink-400); padding: 8px 4px; }
.tv-slot { min-height: 38px; padding: 4px; display: flex; gap: 8px; flex-wrap: wrap; border-radius: 8px; }
.tv-slot.dragover { background: var(--brand-yellow-50); outline: 2px solid var(--brand-yellow); }

dialog label.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-700); }
dialog label.chk input { width: auto; margin: 0; }
.zeit-felder { display: flex; gap: 10px; }
.zeit-felder label { flex: 1; }
/* Stunde : Minute statt des eingebauten Zeitfelds (28.09.2026) */
.zeitwahl-box { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.zeitwahl-box select.zeitwahl { flex: 1; min-width: 0; min-height: 40px; font-size: 16px; }

/* ============================================================
   Dimension „Kapazität" – mittel-/langfristige Planung
   ============================================================ */
.seg-dimension button.aktiv { background: var(--brand-blue); color: var(--white); }
.kapa { padding: 18px 22px 40px; overflow: auto; height: calc(100vh - 58px); }
.kapa-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.kapa-kopf .tv-datum { font-size: 17px; }
.kapa-suche { width: 240px; margin: 0; }
.projekt-badge {
  font-size: 9px; font-weight: 800; letter-spacing: .5px;
  color: var(--brand-blue-600); background: var(--brand-blue-100);
  border-radius: 5px; padding: 1px 5px; margin-left: 5px; vertical-align: 1px;
}
.kapa-scroll { overflow: auto; }
.kapa-tabelle {
  border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%;
  background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.kapa-tabelle th, .kapa-tabelle td {
  padding: 5px 7px; border-bottom: 1px solid var(--ink-100);
  border-right: 1px solid var(--ink-100); text-align: right; white-space: nowrap;
}
.kapa-tabelle thead th {
  position: sticky; top: 0; background: var(--brand-blue-50); z-index: 3;
  font-size: 11px; font-weight: 700; color: var(--brand-blue);
  text-transform: uppercase; letter-spacing: .5px;
}
.kapa-tabelle .k-auftrag {
  position: sticky; left: 0; background: var(--white); z-index: 2;
  text-align: left; min-width: 210px; max-width: 260px;
  overflow: hidden; text-overflow: ellipsis;
  border-left: 4px solid var(--card-farbe, var(--brand-yellow));
}
.kapa-tabelle thead .k-auftrag { z-index: 4; background: var(--brand-blue-50); }
.kapa-tabelle .k-auftrag .nummer { font-size: 10px; font-weight: 600; color: var(--ink-400); display: block; }
.kapa-tabelle .k-auftrag .titel { font-weight: 600; color: var(--ink-900); cursor: pointer; }
.kapa-tabelle .k-auftrag .titel:hover { color: var(--brand-blue); }
/* Aus Team entfernen (Runde 5 T2): klein rechts oben, damit es nicht mit dem Titel verwechselt wird */
.kapa-tabelle .k-auftrag .k-entfernen {
  float: right; margin: 0 0 0 6px; padding: 0 5px; border: 1px solid transparent;
  border-radius: 4px; background: none; color: var(--ink-400); font-size: 11px;
  line-height: 16px; cursor: pointer;
}
.kapa-tabelle .k-auftrag .k-entfernen:hover { color: var(--danger); border-color: var(--danger); }
/* Leere Kapazitätsliste: erklären statt weiße Fläche zeigen */
.kapa-tabelle .kapa-leer td {
  text-align: center; padding: 28px 12px; color: var(--ink-500);
  font-size: 13px; white-space: normal;
}
.kapa-tabelle .kapa-leer .leer-hilfe { font-size: 12px; color: var(--ink-400); }

/* Summenzeilen unter der Team-Matrix: eigene Mannschaft / Leasing / Gesamt.
   Abgesetzt vom Rest, damit man sie nicht mit einer Person verwechselt. */
.kapa-summe td {
  font-weight: 700; background: var(--brand-blue-50);
  border-top: 2px solid var(--ink-200);
}
.kapa-summe .k-auftrag { background: var(--brand-blue-50); border-left-color: var(--ink-300); }
.kapa-summe .summe-anzahl {
  display: block; font-size: 10px; font-weight: 500;
  color: var(--ink-500); text-transform: none; letter-spacing: 0;
}
/* Leasing gelb wie der Leihkraft-Rahmen – zugekaufte Kapazität fällt auf */
.kapa-summe.summe-leasing td { background: #fdf6e3; color: #8a6d1e; }
.kapa-summe.summe-leasing .k-auftrag { background: #fdf6e3; border-left-color: #e0a91e; }
.kapa-summe.summe-gesamt td { background: var(--brand-blue); color: var(--white); }
.kapa-summe.summe-gesamt .k-auftrag { background: var(--brand-blue); color: var(--white); border-left-color: var(--brand-yellow); }
.kapa-summe.summe-gesamt .summe-anzahl { color: rgba(255,255,255,.75); }
.kapa-tabelle .k-zahl { color: var(--ink-500); }
.kapa-tabelle .k-offen { font-weight: 700; color: var(--brand-blue); }
.kapa-tabelle .k-rest-ok   { font-weight: 700; color: var(--success); }
.kapa-tabelle .k-rest-todo { font-weight: 700; color: var(--warning); }
.kapa-tabelle .k-rest-ueber{ font-weight: 700; color: var(--danger); }
.kapa-zelle {
  width: 62px; padding: 4px 6px; border: 1px solid transparent; border-radius: 7px;
  background: var(--ink-50); text-align: right;
  font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--ink-900);
}
.kapa-zelle:focus { outline: none; border-color: var(--brand-blue-500); background: var(--white); }
.kapa-zelle.hat-wert { background: var(--brand-yellow-100); }
.kapa-tabelle tfoot td {
  position: sticky; background: var(--brand-blue-50); font-weight: 700; z-index: 2;
  border-top: 2px solid var(--brand-blue-200);
}
.kapa-tabelle tfoot .k-auftrag { background: var(--brand-blue-50); }
.kapa-tabelle .f-kap  { color: var(--ink-700); }
/* „− 1 Feiertag“ klein unter der Kapazitätszahl (Runde 12 T1) */
.kapa-tabelle .kap-feiertag { display: block; font-size: 10px; font-weight: 400; color: var(--ink-500); cursor: help; }
.kapa-tabelle .f-plan { color: var(--brand-blue); }
.kapa-tabelle .f-frei { color: var(--success); }
.kapa-tabelle .f-ueber { color: var(--danger); background: var(--danger-bg); }
.neu-zeile td { background: var(--ink-50); }
.neu-zeile .k-auftrag { display: flex; align-items: center; gap: 8px; background: var(--ink-50); }
.neu-plus {
  display: inline-grid; place-items: center; width: 22px; height: 22px;
  border-radius: 7px; background: var(--brand-yellow); color: var(--brand-blue);
  font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.neu-zeile input {
  flex: 1; border: 0; background: transparent; padding: 6px 4px;
  font-family: var(--font-sans); font-size: 12.5px; color: var(--ink-900);
}
.neu-zeile input:focus { outline: none; }

/* --- VenDoc-Treffer in der Kapazitätsplanung: ziehbare Karten --- */
/* Zeigt im Kopf der Kapazitätsplanung, welches Team gerechnet wird */
/* Letzter Abgleich ohne Stunden aus VenDoc (Runde 4, Ralph T5) */
.kapa-stundenfehler {
  margin: 0 0 8px; padding: 6px 10px;
  background: var(--brand-yellow-50, #fff9e8);
  border: 1px solid var(--warning, #d97706); border-radius: 6px;
  font-size: 12.5px; color: var(--ink-700, #33445c);
}
.kapa-teamfilter {
  border: 1px solid var(--brand-yellow); background: var(--brand-yellow-50, #fff9e8);
  color: var(--brand-blue); border-radius: 999px; padding: 4px 11px;
  font-family: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.kapa-teamfilter.neutral {
  border-color: var(--ink-200); background: var(--ink-50);
  color: var(--ink-500); cursor: default;
}

.kapa-treffer { padding: 0 14px 10px; }
.kt-kopf {
  font-size: 11px; font-weight: 700; color: var(--ink-500);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
.kt-karten { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
/* Grüner Rahmen = „dieser Auftrag lässt sich aufnehmen". Zusammen mit dem
   Knopf sieht man ohne Erklärung, was zu tun ist. */
.kt-karte {
  flex: 0 0 210px; display: flex; flex-direction: column; gap: 2px;
  background: var(--white);
  border: 1.5px solid var(--success, #2e9e5b);
  border-left: 4px solid var(--success, #2e9e5b);
  border-radius: var(--r-md); padding: 8px 10px 9px;
  box-shadow: var(--shadow-card);
}
.kt-karte.laeuft { opacity: .5; pointer-events: none; }
.kt-nummer { font-size: 10px; font-weight: 700; color: var(--ink-400); letter-spacing: .3px; }
.kt-titel {
  font-size: 12.5px; font-weight: 600; color: var(--ink-900); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kt-kunde { font-size: 11px; color: var(--ink-500); margin-bottom: 5px; }
.kt-uebernehmen {
  margin-top: auto; width: 100%; cursor: pointer;
  border: 0; border-radius: var(--r-sm); padding: 7px 8px;
  background: var(--success, #2e9e5b); color: var(--white);
  font-family: inherit; font-size: 12px; font-weight: 700;
  transition: filter .12s, transform .12s;
}
.kt-uebernehmen:hover { filter: brightness(1.08); transform: translateY(-1px); }
.kt-uebernehmen:active { transform: none; }

/* Die frisch übernommene Zeile kurz grün hinterlegen */
@keyframes zeile-frisch {
  from { background: rgba(46,158,91,.35); }
  to   { background: transparent; }
}
tr.frisch-uebernommen td { animation: zeile-frisch 2.5s ease-out; }
.kapa-matrix th, .kapa-matrix td { text-align: center; }
.kapa-matrix .k-auftrag { min-width: 170px; }
.dlg-breit { width: min(980px, 96vw); }

/* ---------- Mein Plan (mobil-first) ---------- */
.meinplan { max-width: 640px; margin: 0 auto; padding: 18px 14px 60px; }
.mp-tag { margin-bottom: 16px; }
.mp-datum {
  font-size: 12px; font-weight: 700; color: var(--brand-yellow-600);
  margin: 0 0 6px 4px; text-transform: uppercase; letter-spacing: 1.2px;
}
.mp-tag.heute .mp-datum { color: var(--brand-blue); }
.mp-karte {
  background: var(--white); border: 1px solid var(--ink-200);
  border-left: 5px solid var(--card-farbe, var(--brand-yellow));
  border-radius: var(--r-md); padding: 13px 15px; margin-bottom: 8px;
  box-shadow: var(--shadow-card);
  animation: einsatz-in .2s ease-out;
}
.mp-karte .nummer { font-size: 11px; font-weight: 600; color: var(--ink-400); letter-spacing: .3px; }
.mp-karte .titel { font-size: 16px; font-weight: 800; margin: 2px 0; color: var(--brand-blue); }
.mp-karte .ort { font-size: 13px; color: var(--ink-500); }
.mp-karte .ort a { color: var(--brand-blue-600); text-decoration: none; font-weight: 500; }
.mp-karte .crew { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mp-karte .crew .wer { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--ink-700); }
.mp-frei {
  color: var(--ink-400); font-size: 13px; padding: 8px 14px;
  border: 1px dashed var(--ink-300); border-radius: var(--r-md);
}
.mp-leer { text-align: center; color: var(--ink-500); padding: 60px 20px; }
.mp-leer .gross { font-size: 40px; margin-bottom: 10px; }

/* ---------- Dialoge ---------- */
dialog {
  border: 1px solid var(--ink-200); border-radius: var(--r-lg);
  background: var(--white); color: var(--text);
  padding: 22px 24px; width: min(430px, 92vw);
  box-shadow: var(--shadow-hover);
}
dialog::backdrop { background: rgba(11,26,44,.4); backdrop-filter: blur(3px); }
dialog h3 { margin: 0 0 14px; color: var(--brand-blue); font-weight: 800; }
dialog h4 {
  font-size: 11px; margin: 16px 0 8px; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--brand-yellow-600);
}
dialog label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-500); margin-bottom: 10px; }
dialog input, dialog textarea, dialog select {
  width: 100%; margin-top: 3px; padding: 9px 11px;
  border-radius: 10px; border: 1px solid var(--ink-200);
  background: var(--ink-50); color: var(--text);
  font-family: var(--font-sans); font-size: 13px;
}
dialog input:focus, dialog textarea:focus, dialog select:focus {
  outline: none; border-color: var(--brand-blue-500); background: var(--white);
}
dialog input[type=color] { padding: 2px; height: 38px; cursor: pointer; }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; margin: 14px 0 0; padding: 0; }
.dlg-danger {
  display: flex; justify-content: space-between; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--ink-100);
}
/* Breites Fenster: 60 Personen und ein Formular brauchen Platz */
#dlgTeam { width: min(1180px, 95vw); max-width: none; }
.dlg-team { max-height: 86vh; display: flex; flex-direction: column; }

/* Links die Mannschaft, rechts die Bearbeitung – beides gleichzeitig sichtbar */
.tv-spalten {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px; align-items: start; min-height: 0; flex: 1;
}
.tv-links { display: flex; flex-direction: column; min-height: 0; }
.tv-links .pool-suche { margin-bottom: 8px; }
.tv-spalten.ohne-formular { grid-template-columns: minmax(0, 1fr); }
#teamVerwaltungListe { overflow-y: auto; max-height: 56vh; padding-right: 4px; }

.tv-rechts {
  position: sticky; top: 0;
  background: var(--brand-blue-50); border: 1px solid var(--ink-200);
  border-radius: var(--r-md); padding: 14px;
}
.tv-rechts h4 { margin: 0 0 2px; font-size: 15px; }
.tv-rechts .hint { margin: 0 0 12px; font-size: 11px; }
.tv-rechts label { display: block; margin-bottom: 8px; font-size: 12px; }
.tv-rechts input:not([type=checkbox]), .tv-rechts select { width: 100%; }
.tv-rechts .tv-check {
  display: flex; align-items: center; gap: 8px; margin: 12px 0;
  padding: 8px; background: var(--white); border-radius: var(--r-sm);
}
.tv-rechts .tv-check input { width: auto; margin: 0; }
.tv-rechts menu { display: flex; gap: 8px; margin: 12px 0 0; padding: 0; }

.tv-zeile {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 4px; border-bottom: 1px solid var(--ink-100); font-size: 13px;
  border-radius: var(--r-sm);
}
.tv-zeile:hover { background: var(--brand-blue-50); }
.tv-zeile.ausgewaehlt {
  background: var(--brand-blue-50); box-shadow: inset 3px 0 0 var(--brand-yellow);
}
.tv-zeile .tv-name { display: flex; flex-direction: column; flex: 1; min-width: 150px; }
.tv-zeile .tv-team, .tv-zeile .tv-rolle { color: var(--ink-500); font-size: 11px; }
/* Zwei feste Spalten: was auf der Baustelle, was im Tool */
.tv-zeile .tv-spalte { display: flex; gap: 4px; flex-wrap: wrap; }
.tv-zeile .tv-einteilung { width: 190px; }
.tv-zeile .tv-toolrolle  { width: 120px; }
.tv-zeile .tv-marken { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.tv-marke {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.tv-marke.admin    { background: var(--brand-blue); color: var(--white); }
.tv-marke.planer   { background: #fdf0c8; color: #7a5c00; }
.tv-marke.user     { background: transparent; color: var(--ink-400); font-weight: 500; padding-left: 0; }
.tv-marke.monteur  { background: var(--brand-blue-50); color: var(--brand-blue); }
.tv-marke.lehrling { background: #e8f3ea; color: #2c6b3f; }
.tv-marke.grau     { background: var(--ink-100); color: var(--ink-500); }
.tv-marke.leih     { background: #fdf6e3; color: #8a6d1e; border: 1px dashed #e0a91e; }
/* Kopfzeile über der Liste, damit die Spalten benannt sind */
.tv-kopf {
  display: flex; align-items: center; gap: 10px; padding: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-400);
  border-bottom: 2px solid var(--ink-200);
}
/* ============================================================
   Handy: Datumsauswahl und Suche (für Planer unterwegs)
   ============================================================ */
.mobil-kopf .mk-suche {
  background: var(--brand-blue-50); border: 1px solid var(--ink-200);
  border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 600;
  color: var(--brand-blue); white-space: nowrap;
}
/* "Heute" und Kalenderknopf als ein Paar: gemeinsamer Rahmen, dünne Fuge
   dazwischen. Beide gehen auf dieselbe Frage – welchen Tag sehe ich? */
.datum-paar { display: inline-flex; }
.datum-paar .btn {
  border-radius: 0;
  border-right-width: 0;
}
.datum-paar .btn:first-child { border-radius: var(--r-sm, 8px) 0 0 var(--r-sm, 8px); }
.datum-paar .btn:last-child  {
  border-radius: 0 var(--r-sm, 8px) var(--r-sm, 8px) 0;
  border-right-width: 1px;
  border-left: 1px solid var(--ink-200);
  padding-left: 10px; padding-right: 10px;
}
.datum-paar #btnKalender[aria-expanded="true"] {
  background: var(--brand-blue-100); border-color: var(--brand-blue-200);
}

/* Am Desktop und iPad hängt der Kalender unter dem Knopf, an dem man ihn
   geöffnet hat – nicht über die ganze Breite wie am Handy. Position setzt
   app.js, hier steht nur die Form. */
.m-kalender.am-knopf {
  left: auto; right: auto; width: 320px;
  box-shadow: 0 12px 38px rgba(11,26,44,.28);
}
.m-kalender {
  position: fixed; left: 8px; right: 8px; top: 96px; z-index: 58;
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--r-md); box-shadow: 0 10px 34px rgba(11,26,44,.22);
  padding: 12px;
}
.m-kalender[hidden], .m-suche[hidden] { display: none; }
.m-kalender .mk-kopf {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; margin-bottom: 8px;
}
.mk-wochentage, .mk-raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mk-wochentage span {
  text-align: center; font-size: 10px; font-weight: 700;
  color: var(--ink-400); padding-bottom: 4px;
}
.mk-tag {
  aspect-ratio: 1; border: 0; background: none; border-radius: var(--r-sm);
  font-size: 14px; color: var(--ink-900); position: relative; cursor: pointer;
}
.mk-tag:active { background: var(--brand-blue-50); }
.mk-tag.heute { font-weight: 800; color: var(--brand-blue); }
.mk-tag.gewaehlt { background: var(--brand-blue); color: var(--white); }
/* Punkt = an dem Tag ist etwas eingeplant */
.mk-tag.belegt::after {
  content: ''; position: absolute; left: 50%; bottom: 5px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--brand-yellow);
}
.mk-tag.gewaehlt.belegt::after { background: var(--white); }
.m-kalender #mkHeute { width: 100%; margin-top: 10px; }

.m-suche {
  position: fixed; inset: 0; z-index: 59; background: var(--white);
  display: flex; flex-direction: column;
}
.m-suche .ms-kopf {
  display: flex; gap: 8px; padding: 12px;
  border-bottom: 1px solid var(--ink-100);
}
.m-suche .ms-kopf input { flex: 1; margin: 0; font-size: 16px; }  /* 16px: iOS zoomt sonst */
.ms-treffer { flex: 1; overflow-y: auto; padding: 8px 12px 20px; }
.ms-leer { color: var(--ink-400); font-size: 13px; text-align: center; padding: 24px 0; }
.ms-treffer-zeile, .ms-block {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--ink-100);
  padding: 12px 4px; font-size: 14px; color: var(--ink-900);
}
.ms-treffer-zeile small, .ms-block small { display: block; font-size: 12px; color: var(--ink-500); }
.ms-treffer-zeile:active { background: var(--brand-blue-50); }
.ms-zeile {
  display: block; font-size: 13px; color: var(--ink-700);
  padding: 7px 8px; margin-top: 5px;
  background: var(--brand-blue-50); border-radius: var(--r-sm);
}
.ms-zeile.leer { background: none; color: var(--ink-400); font-style: italic; }

/* ============================================================
   Teilabwesenheit: nur ein Zeitfenster, nicht der ganze Tag
   ------------------------------------------------------------
   Klar unterschieden von der ganztägigen Sperre: gestreift statt flächig rot,
   und immer mit Uhrzeit. Wer von 18 bis 21 Uhr Fortbildung hat, ist tagsüber
   einsetzbar – das darf nicht aussehen wie Urlaub.
   ============================================================ */
.team-item.teil-abwesend .avatar {
  border-color: #d98324; border-style: dashed;
}
.team-item .teil-label {
  font-size: 9px; font-weight: 700; color: #a5621a;
  background: #fdf0e3; border-radius: 3px; padding: 1px 4px; margin-top: 1px;
  white-space: nowrap;
}
/* Wochenansicht: Tag mit Teilabwesenheit hellorange (flächig, Schraffur =
   verliehen, Runde 6 T4), Uhrzeit als Fähnchen */
.tag.abwesend-teil {
  background: #fdf0e3;
}
.tag.abwesend-teil::before {
  content: attr(data-abw-grund);
  position: absolute; left: 4px; right: 4px; top: 26px; z-index: 2;
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .02em; color: #a5621a; text-align: center;
  background: #fdf0e3; border: 1px solid #e8c39a; border-radius: 3px;
  padding: 1px 2px; pointer-events: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Zieltag für Strg+V: deutlich, aber nicht so laut wie eine Warnung */
.tag.ziel-tag {
  outline: 2px dashed var(--brand-yellow);
  outline-offset: -2px; background: #fffdf5;
}
.einfuege-hinweis {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px;
  z-index: 55; background: var(--brand-blue); color: var(--white);
  padding: 8px 16px; border-radius: 999px; font-size: 12px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(11,26,44,.28); pointer-events: none;
}
.einfuege-hinweis[hidden] { display: none; }

/* ============================================================
   Menü bei Rechtsklick / langem Drücken
   ============================================================ */
.ktx-menu {
  position: fixed; z-index: 60; min-width: 210px;
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--r-md); box-shadow: 0 8px 28px rgba(11,26,44,.18);
  padding: 5px; display: flex; flex-direction: column;
}
.ktx-menu[hidden] { display: none; }
.ktx-menu hr { border: 0; border-top: 1px solid var(--ink-100); margin: 4px 6px; }
.ktx-eintrag {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: none; border: 0; border-radius: var(--r-sm);
  padding: 9px 11px; text-align: left; cursor: pointer; width: 100%;
  font-size: 13px; color: var(--ink-900);
}
.ktx-eintrag:hover:not(.aus) { background: var(--brand-blue-50); }
.ktx-eintrag small { font-size: 11px; color: var(--ink-500); }
.ktx-eintrag.aus { opacity: .45; cursor: default; }
/*
 * Langes Drücken darf nicht die Textauswahl auslösen.
 *
 * Auf dem iPhone legt Safari sonst sein eigenes Menü („Kopieren · Nachschlagen
 * · Übersetzen") mitsamt den blauen Griffen über unseres – man drückt auf
 * einen Termin und bekommt die Textauswahl des Browsers. touch-callout allein
 * genügt dafür nicht, es braucht auch user-select.
 *
 * Bewusst nur auf den Flächen, auf denen wir das lange Drücken selbst
 * auswerten. In Eingabefeldern und Dialogen bleibt Markieren möglich.
 */
.einsatz, .tag, .mt-block, .mt-flaeche, .ktx-menu,
/* Ergänzt 24.08.2026: Auf dem iPad markierte Safari beim Ziehen von
   Auftragskarten und Avataren den Text blau. Genau diese drei fehlten. */
.pool-card, .team-item, .tl-canvas {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Gruppenüberschrift in der Verwaltungsliste */
.tv-gruppe {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 4px; padding: 4px 4px 5px;
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--brand-blue);
  border-bottom: 1px solid var(--ink-200);
}
.tv-gruppe:first-child { margin-top: 4px; }
.tv-gruppe span {
  background: var(--brand-blue-50); color: var(--brand-blue);
  border-radius: 999px; padding: 1px 8px; font-size: 10px;
}
/* Service-Autos unter der Personenliste (Runde 6 T10) */
.fz-bereich { flex-shrink: 0; margin-top: 8px; }
/* Mit den Autos darunter scrollt der Dialog als Ganzes – sonst ragte das
   Personenformular über den Abschnitt und verdeckte dessen Knöpfe */
.dlg-team { overflow-y: auto; }
.dlg-team .tv-spalten { flex: none; }
.fz-zeile {
  display: flex; align-items: center; gap: 8px; padding: 4px;
  border-bottom: 1px solid var(--ink-100);
}
.fz-zeile input[name=name] { flex: 1; min-width: 120px; }
.fz-zeile input[name=kennzeichen] { width: 140px; }
.fz-zeile .fz-status { width: 80px; font-size: 11px; color: var(--ink-500); }
.fz-zeile button { font-size: 11px; padding: 3px 9px; }
.fz-zeile.fz-inaktiv input { color: var(--ink-400); }
.fz-neu { border-bottom: 0; }

/* Steht nicht im Board: Zeile dezenter, Baustellenspalte leer */
.tv-zeile.nicht-im-board .tv-name { color: var(--ink-500); }
/* Dritte Gruppe „Nicht im Tool": deutlich zurückgenommen – das sind keine
   Kolleginnen und Kollegen, mit denen man hier arbeitet, sondern ein
   Nachschlagewerk (17.09.2026). */
.tv-zeile.tv-draussen { opacity: .62; }
.tv-zeile.tv-draussen .tv-name { color: var(--ink-400); }
.tv-zeile.tv-draussen .tv-team { font-style: italic; }
.tv-zeile .tv-leer { color: var(--ink-300); padding-left: 4px; }
.tv-zeile .tv-platzhalter { width: 74px; }
.tv-kopf .k-name { flex: 1; min-width: 150px; padding-left: 36px; }
.tv-kopf .k-eint { width: 190px; }
.tv-kopf .k-tool { width: 120px; }
.tv-kopf .k-rest { width: 148px; }
.tv-zeile button { font-size: 11px; padding: 3px 9px; }

@media (max-width: 900px) {
  .tv-spalten { grid-template-columns: 1fr; }
  .tv-rechts { position: static; }
  #teamVerwaltungListe { max-height: 40vh; }
}

/* ---------- Login ---------- */
.login-page {
  display: grid; place-items: center; min-height: 100vh;
  background: var(--brand-blue-50);
  position: relative; overflow: hidden;
}
.login-page::after {
  content: ''; position: absolute; right: -70px; bottom: -50px;
  width: 460px; height: 300px;
  background: url('logo-pfeile-rahmen.svg') no-repeat center / contain;
  opacity: .07; pointer-events: none;
}
.login-card {
  background: var(--white); border: 1px solid var(--ink-200);
  border-top: 4px solid var(--brand-yellow);
  border-radius: var(--r-lg); padding: 36px 40px; width: min(400px, 92vw);
  text-align: center; box-shadow: var(--shadow-hover);
  position: relative; z-index: 1;
}
.login-card .logo { justify-content: center; font-size: 28px; margin-bottom: 6px; }
.login-logo { width: 210px; max-width: 80%; margin: 0 auto 14px; display: block; }
.login-titel {
  font-size: 24px; font-weight: 800; color: var(--brand-blue);
  margin: 0 0 2px; letter-spacing: -.4px;
}
.login-sub { color: var(--ink-500); margin: 0 0 20px; }
.login-error { color: var(--danger); font-size: 13px; }
.dev-hint { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--brand-yellow-600); }
.dev-users { display: flex; flex-direction: column; gap: 6px; }
.dev-user {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-radius: 10px; border: 1px solid var(--ink-200);
  background: var(--white); color: var(--ink-900); cursor: pointer;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
}
.dev-user:hover { border-color: var(--brand-blue-500); background: var(--brand-blue-100); }
.dev-user small { color: var(--ink-400); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--white); border: 1px solid var(--ink-200);
  border-left: 4px solid var(--brand-yellow);
  color: var(--ink-900);
  padding: 11px 18px; border-radius: var(--r-md); box-shadow: var(--shadow-hover);
  font-size: 13px; font-weight: 500; z-index: 100; animation: einsatz-in .2s ease-out;
}
.toast.fehler { border-left-color: var(--danger); }

/*
 * Infofeld beim Drüberfahren (Runde 5 T10): ein Kärtchen für die ganze Seite,
 * gut lesbar, fängt keine Maus (sonst flackert es unter dem Zeiger).
 */
#infofeld {
  position: fixed; top: 0; left: 0; z-index: 300;
  max-width: 340px; padding: 9px 12px;
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--r-md); box-shadow: var(--shadow-hover);
  color: var(--ink-700); font-size: 13px; line-height: 1.45;
  pointer-events: none; overflow-wrap: anywhere;
}
#infofeld[hidden] { display: none; }
#infofeld .if-titel { color: var(--ink-900); font-size: 14px; font-weight: 700; margin-bottom: 3px; }

/*
 * Ist unten eine Leiste offen, rueckt der Toast darueber (Tim, 23.09.2026:
 * "Fehlermeldung kommt direkt ueber diesem Balken. Verdeckt ihn.").
 *
 * Beide haengen fix unten in der Mitte - Aktionsleiste bei 18px/z-90, der
 * Toast bei 22px/z-100. Der Toast gewinnt also zwangslaeufig und legt sich
 * genau auf die Leiste, die gerade erklaert, was man als naechstes tun
 * soll. Kein Zufall, sondern Bauart.
 */
body.leiste-offen .toast { bottom: 82px; }
/* Am Handy sitzt die Leiste hoeher (ueber den Leistengriffen) */
body[data-ansicht="mobil"].leiste-offen .toast { bottom: 124px; }

/* ---------- Responsive ---------- */
/*
 * Kopfleiste bei 1280 px: Als Planer mit Admin war sie breiter als das
 * Fenster, rechts verschwanden Knöpfe (Ralph Runde 5 T6, 01.10.2026).
 * Zuerst fällt der eigene Name weg (steht im title des Knopfs), dann wird
 * die Suche schmaler und die Abstände kleiner. Reicht das nicht (langer
 * Teamname), bricht die Leiste sauber in eine zweite Zeile um, statt
 * Knöpfe zu quetschen. Unter 900 px und am Handy gelten die eigenen Regeln.
 */
@media (min-width: 901px) and (max-width: 1500px) {
  body:not([data-ansicht="mobil"]) .topbar { flex-wrap: wrap; row-gap: 6px; gap: 6px; padding: 10px 12px; }
  body:not([data-ansicht="mobil"]) .topbar-right { gap: 6px; }
  body:not([data-ansicht="mobil"]) .week-nav { gap: 4px; }
  body:not([data-ansicht="mobil"]) .topbar-suche { width: 100px; }
  body:not([data-ansicht="mobil"]) .me-name { display: none; }
  body:not([data-ansicht="mobil"]) button.me-chip { padding: 4px 8px 4px 4px; gap: 5px; }
}
/*
 * iPad im Hochformat (820 px) bekommt das normale Desktop-Board, nur mit
 * schmalerer Seitenleiste. Die frühere Regel stapelte alles untereinander –
 * dann war der Kalender erst nach langem Scrollen zu sehen und Ziehen über
 * die Bereiche hinweg praktisch unmöglich.
 * Handys betrifft das nicht: die bekommen ihre eigene Ansicht vom Server.
 */
@media (max-width: 900px) {
  .board-layout { grid-template-columns: 224px 1fr; }
  .sidebar { width: 224px; }
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .zeitraum { display: none; }
  .topbar-suche { width: 150px; }
  .woche-grid .einsatz .kunde { display: none; }
}

/* ============================================================
   Team-Auswahl oben rechts
   Zeigt jederzeit, welches Team gerade im Board steht.
   ============================================================ */
.team-wahl {
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 700;
  color: var(--brand-blue);
  background: var(--brand-yellow-50);
  border: 1.5px solid var(--brand-yellow);
  border-radius: var(--r-md);
  padding: 8px 30px 8px 12px;
  cursor: pointer;
  max-width: 200px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%230f406e' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 11px;
}
.team-wahl:hover { background-color: var(--brand-yellow-100); }
.team-wahl:focus-visible { outline: 2px solid var(--brand-blue-500); outline-offset: 2px; }

/* ============================================================
   Fenster schließen: ✕ im gelben Kreis, oben rechts
   ============================================================ */
dialog { position: relative; }
.dlg-x {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--brand-yellow); color: var(--brand-blue);
  font-family: var(--font-sans); font-size: 15px; font-weight: 700; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(15,64,110,.18);
  transition: transform .12s, background .12s;
}
.dlg-x:hover  { background: var(--brand-yellow-300); transform: scale(1.08); }
.dlg-x:active { transform: scale(.94); }
dialog > h3, dialog form > h3, .dlg-team > h3 { padding-right: 46px; }

/* ============================================================
   Menü unter dem eigenen Namen (Verwaltung, nur für Planer)
   ============================================================ */
.ich { position: relative; }
button.me-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  background: none; padding: 4px 10px 4px 4px; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  color: var(--ink-900);
}
button.me-chip:hover { background: var(--ink-100); border-color: var(--ink-200); }
button.me-chip[aria-expanded="true"] { background: var(--brand-blue-100); border-color: var(--brand-blue-200); }
.me-pfeil { color: var(--ink-400); font-size: 10px; }

.ich-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 250px; padding: 6px;
  background: var(--white);
  border: 1px solid var(--ink-200); border-radius: var(--r-md);
  box-shadow: 0 12px 34px rgba(15,64,110,.20);
}
.ich-menu .im-kopf { padding: 10px 12px 12px; border-bottom: 1px solid var(--ink-100); margin-bottom: 6px; }
.ich-menu .im-kopf b { display: block; font-size: 13px; color: var(--brand-blue); }
.ich-menu .im-kopf small { font-size: 11px; color: var(--ink-500); }
.ich-menu button,
.ich-menu a {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: 0; border-radius: var(--r-sm);
  background: none; cursor: pointer; text-decoration: none;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--ink-900);
}
.ich-menu button:hover,
.ich-menu a:hover { background: var(--brand-blue-50); color: var(--brand-blue); }
.ich-menu .im-trenner { height: 1px; background: var(--ink-100); margin: 6px 0; }
/* Version klein ganz unten im Menü (Runde P1 T4) */
.ich-menu .im-version { padding: 6px 12px 2px; font-size: 10px; color: var(--ink-500); text-align: right; }

/* Auftragspool: wann war dieser Auftrag zuletzt eingeplant? */
.pool-card .zuletzt {
  margin-top: 3px; font-size: 11px; font-weight: 600;
  color: var(--brand-blue-500);
}

/* Auswahlblätter: genug Höhe, damit Listen bedienbar sind */
.sheet-kopf h3 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.3;
}

/* ============================================================
   Mobile Ansicht (body[data-ansicht="mobil"])
   ------------------------------------------------------------
   Zeitachse quer, acht Spuren untereinander, zwei ausziehbare
   Leisten unten. Bedient wird mit dem Finger.
   ============================================================ */
body[data-ansicht="mobil"] {
  background: var(--ink-50);
  overflow: hidden;                    /* nur die Fläche selbst scrollt */
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

/* --- Was am Handy wegfällt --- */
body[data-ansicht="mobil"] .sidebar,
body[data-ansicht="mobil"] .week-nav,
body[data-ansicht="mobil"] .topbar-suche,
body[data-ansicht="mobil"] .topbar-filter,
body[data-ansicht="mobil"] #kapa,
body[data-ansicht="mobil"] .topbar-right > a.btn { display: none !important; }

/* --- Topbar kompakt --- */
body[data-ansicht="mobil"] .topbar {
  position: sticky; top: 0; z-index: 40;
  padding: 7px 10px; gap: 6px; flex-wrap: nowrap; overflow: hidden;
}
body[data-ansicht="mobil"] .logo-mark  { height: 24px; }
body[data-ansicht="mobil"] .logo-text  { display: none; }
body[data-ansicht="mobil"] .topbar-right { margin-left: auto; gap: 5px; }
body[data-ansicht="mobil"] .btn-publish { padding: 7px 9px; font-size: 12px; }
body[data-ansicht="mobil"] .topbar-right .icon-btn { width: 36px; height: 36px; }
body[data-ansicht="mobil"] .me-name,
body[data-ansicht="mobil"] .me-pfeil { display: none; }
body[data-ansicht="mobil"] button.me-chip { padding: 3px; }
/* --------------------------------------------------------------
   Das Menü unter dem Gesicht: am Handy kein enges Dropdown, das
   halb aus dem Bild ragt, sondern ein ordentliches Blatt unter der
   Topbar – volle Breite, große Zeilen, abgedunkelter Hintergrund.
   -------------------------------------------------------------- */
body[data-ansicht="mobil"] .ich-menu {
  position: fixed; top: 50px; left: 8px; right: 8px;
  min-width: 0; padding: 6px;
  border-radius: var(--r-lg);
  /* Der zweite Schatten legt einen Schleier über den Rest der Seite.
     Ein eigenes Overlay-Element wäre hier unnötig – und ein ::before mit
     negativem z-index läge über dem weißen Hintergrund, nicht darunter. */
  box-shadow: 0 16px 44px rgba(15,64,110,.28),
              0 0 0 100vmax rgba(11,26,44,.38);
  animation: ich-auf .16s ease-out;
}
@keyframes ich-auf {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
body[data-ansicht="mobil"] .ich-menu .im-kopf { padding: 12px 14px 14px; }
body[data-ansicht="mobil"] .ich-menu .im-kopf b { font-size: 15px; }
body[data-ansicht="mobil"] .ich-menu .im-kopf small { font-size: 12px; }
body[data-ansicht="mobil"] .ich-menu button,
body[data-ansicht="mobil"] .ich-menu a {
  padding: 14px 14px; font-size: 15px; border-radius: var(--r-md);
}
/* Team-Auswahl sitzt neben dem Gesicht – kompakt, sonst passt sie nicht */
body[data-ansicht="mobil"] .team-wahl {
  max-width: 104px; font-size: 12px; padding: 7px 22px 7px 8px;
  background-position: right 7px center; background-size: 9px;
  min-height: 36px;
}
/* Der Publizier-Knopf wird zum Symbol – der Text frisst die Breite */
body[data-ansicht="mobil"] .btn-publish { font-size: 0; padding: 8px 10px; min-height: 36px; }
/* Am Handy ist für „Veröffentlichen" kein Platz – dort genügt ein Pfeil,
   der nach oben in den Kalender zeigt. */
body[data-ansicht="mobil"] .btn-publish::before { content: '↥'; font-size: 16px; }

body[data-ansicht="mobil"] .board-layout { display: block; }
body[data-ansicht="mobil"] .kalender { padding: 0; overflow: visible; }

/* --- Datumskopf + Team-Auswahl --- */
.mobil-kopf {
  position: sticky; top: 50px; z-index: 30;
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px;
  background: var(--white); border-bottom: 1px solid var(--ink-200);
}
.mk-pfeil {
  flex: 0 0 42px; height: 42px;
  border: 1px solid var(--ink-200); background: var(--white);
  border-radius: var(--r-md); font-size: 21px; line-height: 1;
  color: var(--brand-blue); cursor: pointer;
}
.mk-pfeil:active { background: var(--brand-blue-100); }
/* Der Datumsknopf öffnet den Monatskalender. Bis 23.08.2026 sah er aus wie
   eine Beschriftung – niemand hat ihn angetippt, und der Kalender galt als
   „fehlt". Jetzt trägt er ein Kalenderblatt und einen Rahmen, damit man ihm
   ansieht, dass er einer ist. */
.mk-datum {
  flex: 1; min-height: 42px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--ink-200); border-radius: var(--r-sm, 8px);
  background: var(--white);
  font-family: var(--font-sans); color: var(--ink-900); text-align: center;
}
.mk-datum:active { background: var(--brand-blue-50); }
.mk-datum-text  { display: block; }
.mk-datum b     { display: block; font-size: 15px; font-weight: 700; }
.mk-datum small { display: block; font-size: 11px; color: var(--ink-500); }

/* Kalenderblatt, rein aus CSS gezeichnet – im Tool sind keine Emojis erlaubt
   und für ein einzelnes Symbol lohnt keine zusätzliche Bilddatei. */
.mk-kal {
  position: relative; flex: 0 0 17px; width: 17px; height: 16px;
  border: 1.5px solid var(--brand-blue); border-radius: 3px;
  border-top-width: 5px;
}
.mk-kal::before, .mk-kal::after {
  content: ''; position: absolute; top: -4px; width: 2px; height: 3px;
  background: var(--white); border-radius: 1px;
}
.mk-kal::before { left: 3px; }
.mk-kal::after  { right: 3px; }


/* ============================================================
   Tagesfläche: quer scrollbar, acht Spuren untereinander
   ============================================================ */
.mt-rahmen {
  position: relative;
  overflow-x: hidden;                  /* der ganze Tag passt quer hinein */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* Topbar 50 + Register 44 + Datumskopf 57 + Leistengriffe 54 */
  height: calc(100dvh - 205px);
  background: var(--white);
}
.mt-achse {
  position: sticky; top: 0; z-index: 3;
  height: 24px;
  background: var(--brand-blue-50);
  border-bottom: 1px solid var(--ink-200);
}
.mt-achse span {
  position: absolute; top: 5px;
  font-size: 11px; font-weight: 700; color: var(--brand-blue-500);
  transform: translateX(-2px);
}
.mt-flaeche { position: relative; margin: 0 20px; }
.mt-achse   { margin: 0 20px; }
.mt-spurlinie {
  position: absolute; left: 0; right: 0; height: 1px;
  background: var(--ink-100);
}
.mt-stundenlinie {
  position: absolute; top: 0; bottom: 0; width: 1px;
  background: var(--ink-100);
}
.mt-jetzt {
  position: absolute; top: 0; bottom: 0; width: 2px; z-index: 2;
  background: var(--danger);
}
.mt-jetzt::before {
  content: ''; position: absolute; top: -3px; left: -3px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
}
.mt-leer {
  position: absolute; top: 40%; left: 50%; transform: translateX(-50%);
  font-size: 13px; color: var(--ink-400); text-align: center; white-space: nowrap;
}
.mt-flaeche.zielt { background: var(--brand-yellow-50); }

/* --- Einsatz als liegender Balken --- */
.mt-block {
  position: absolute; z-index: 4;
  display: flex; align-items: stretch;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-left: 4px solid var(--card-farbe, var(--brand-yellow));
  border-radius: var(--r-sm);
  box-shadow: 0 1px 4px rgba(15,64,110,.14);
  overflow: hidden;
  touch-action: none;                  /* der Finger zieht den Block, nicht die Seite */
  -webkit-tap-highlight-color: transparent;
}
.mt-block.zieht {
  box-shadow: 0 8px 22px rgba(15,64,110,.3);
  opacity: .92; z-index: 20;
}
/* Ausgewählt: Der Block darf überstehen, sonst schnitte „overflow: hidden"
   die seitlichen Fangpunkte in der Mitte durch – sie sähen aus wie Halbmonde
   und wären schlecht zu treffen. Den Inhalt bändigt .mtb-inhalt selbst. */
.mt-block.ausgewaehlt {
  border-color: var(--brand-blue); box-shadow: 0 0 0 2px var(--brand-blue-200);
  overflow: visible;
}
.mt-block.zielt      { border-color: var(--success); box-shadow: 0 0 0 2px var(--success); }
.mt-block.blockiert  { border-color: var(--danger);  box-shadow: 0 0 0 2px var(--danger); }
.mt-block.blockzone  { background: rgba(196,61,61,.3); }

/* Der Balken ist nur rund 50 Pixel hoch – Titel, Zeit und Gesichter müssen
   knapp gesetzt sein, sonst wird die unterste Zeile abgeschnitten. */
.mtb-inhalt {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 3px 2px 3px 5px;
  overflow: hidden;                    /* der Block selbst darf überstehen */
  border-radius: inherit;
}
.mtb-titel {
  font-size: 11px; font-weight: 700; color: var(--ink-900); line-height: 1.15;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mtb-zeit { font-size: 9.5px; color: var(--ink-500); line-height: 1.1; }
/* Die Gesichter rücken etwas nach rechts: Bei ausgewähltem Balken liegt links
   der Fangpunkt für den Beginn – ohne Einrückung deckt er das erste Gesicht zu. */
.mtb-crew { display: flex; gap: 2px; overflow: hidden; height: 18px; padding-left: 15px; }
.mtb-crew .avatar { width: 18px; height: 18px; font-size: 7.5px; flex: 0 0 auto; border-width: 1.5px; }
/* Enge Balken zeigen weniger: erst die Zeit, dann auch den Titel */
.mt-block.schmal .mtb-zeit  { display: none; }
.mt-block.winzig .mtb-titel { display: none; }
.mt-block.winzig .mtb-inhalt { padding: 3px 1px 3px 3px; }

/* --- Fangpunkte: erscheinen erst bei Auswahl ------------------------------
   Bei rund 28 Pixeln je Stunde ist der Blockrand mit dem Finger nicht zu
   treffen. Die drei Punkte stehen deshalb über den Block hinaus und sind
   gut 38 Pixel groß – links der Beginn, in der Mitte das Verschieben,
   rechts das Ende. */
.fang {
  position: absolute; top: 50%; z-index: 12;
  width: 36px; height: 36px; margin-top: -18px;
  display: none; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--brand-blue); color: var(--white);
  font-size: 18px; font-weight: 700; line-height: 1;
  border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(15,64,110,.45);
  touch-action: none;
}
/* Die Ränder sitzen mittig auf der Kante: halb auf dem Balken, halb daneben.
   So lässt sich die Kante treffen, ohne den Balkeninhalt zuzudecken. */
.fang.links  { left: -18px; }
.fang.rechts { right: -18px; }
.fang.mitte  {
  left: 50%; margin-left: -18px;
  background: var(--brand-yellow); color: var(--brand-blue);
  font-size: 13px; letter-spacing: -1px;
}
.mt-block.ausgewaehlt .fang { display: flex; }
/* Ganztägige Einsätze haben keinen Anfang und kein Ende zum Ziehen */
.mt-block.ganztags.ausgewaehlt .fang.links,
.mt-block.ganztags.ausgewaehlt .fang.rechts { display: none; }
.mt-block.ausgewaehlt { z-index: 15; }
.fang:active { transform: scale(1.12); }

/* Bei kurzen Einsätzen würden drei Punkte den ganzen Balken zudecken.
   Dort bleiben nur die beiden Ränder – geschoben wird am Balken selbst. */
.mt-block.schmal.ausgewaehlt .fang.mitte { display: none; }
/* Ganz kurze zeigen den Balken darunter noch durch */
.mt-block.winzig.ausgewaehlt .fang { width: 32px; height: 32px; margin-top: -16px; font-size: 16px; }
.mt-block.winzig.ausgewaehlt .fang.links  { left: -16px; }
.mt-block.winzig.ausgewaehlt .fang.rechts { right: -16px; }

/* Fahne mit der neuen Zeit – der Finger verdeckt den Balken */
.fang-anzeige {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
  z-index: 16; padding: 4px 10px; border-radius: 999px;
  background: var(--ink-900); color: var(--white);
  font-size: 12px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
}

/* ============================================================
   Handy: Register „Meine Woche" / „Einteilung"
   ============================================================ */
.m-reiter {
  display: flex; gap: 6px; padding: 7px 8px 0;
  background: var(--white); border-bottom: 1px solid var(--ink-100);
}
.mr-tab {
  flex: 1; padding: 9px 6px; border: 0; border-radius: var(--r-md) var(--r-md) 0 0;
  background: transparent; color: var(--ink-500);
  font-size: 13px; font-weight: 700; font-family: inherit;
  border-bottom: 3px solid transparent; cursor: pointer;
}
.mr-tab.aktiv {
  color: var(--brand-blue); border-bottom-color: var(--brand-yellow);
  background: var(--brand-yellow-50, #fff9e8);
}

/* --- Die eigene Woche --- */
.m-woche { padding: 0 0 24px; overflow-y: auto; height: calc(100dvh - 108px); }
.mw-kopf {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; position: sticky; top: 0; z-index: 5;
  background: var(--bg); border-bottom: 1px solid var(--ink-100);
}
.mw-label {
  flex: 1; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; line-height: 1.15;
}
.mw-label b { font-size: 14px; color: var(--ink-900); }
.mw-label small { font-size: 11px; color: var(--ink-500); }

.mw-tag { padding: 10px 10px 2px; }
.mw-tag.vergangen { opacity: .55; }
.mw-datum {
  display: flex; align-items: baseline; gap: 7px; margin: 0 0 6px;
  font-size: 13px; font-weight: 800; color: var(--ink-900);
}
.mw-datum small { font-size: 11px; font-weight: 600; color: var(--ink-500); }
.mw-tag.heute .mw-datum { color: var(--brand-blue); }
.mw-tag.heute .mw-datum span:first-child::before {
  content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px;
  border-radius: 50%; background: var(--brand-yellow);
}

.mw-leer, .mw-frei {
  padding: 9px 12px; border-radius: var(--r-md);
  background: var(--ink-50); color: var(--ink-400);
  font-size: 12px; font-weight: 600;
}
.mw-frei { background: #fff4e0; color: #a15c00; }

.mw-karte {
  position: relative;
  background: var(--white); border: 1px solid var(--ink-150);
  border-left: 5px solid var(--card-farbe, var(--brand-yellow));
  border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(15,64,110,.09);
}
.mw-zeile1 { display: flex; align-items: center; gap: 8px; }
.mw-zeit {
  font-size: 13px; font-weight: 800; color: var(--brand-blue);
  background: var(--brand-blue-50, #eef5fb); padding: 2px 8px; border-radius: 999px;
}
.mw-karte .pub-punkt { position: static; margin-left: auto; }
.mw-titel { font-size: 14px; font-weight: 700; color: var(--ink-900); margin-top: 5px; line-height: 1.25; }
.mw-nummer { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }
.mw-ort {
  display: inline-block; margin-top: 6px; font-size: 12px;
  color: var(--brand-blue); text-decoration: none; font-weight: 600;
}
.mw-notiz { font-size: 12px; color: var(--ink-500); margin-top: 5px; }
.mw-crew { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.mw-wer {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--ink-700);
}
.mw-wer .avatar { width: 26px; height: 26px; font-size: 10px; }

.mw-nichts {
  padding: 40px 20px; text-align: center; color: var(--ink-400);
  font-size: 13px; font-weight: 600;
}
.mw-nichts .gross { font-size: 34px; margin-bottom: 8px; }

/* ============================================================
   Ausziehbare Leisten unten (Team, Aufträge)
   ============================================================ */
.m-leisten {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--white);
  border-top: 1px solid var(--ink-200);
  box-shadow: 0 -4px 18px rgba(15,64,110,.10);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.ml-griffe { display: flex; gap: 6px; padding: 7px 10px; align-items: center; }
.ml-griff {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--ink-200); border-radius: var(--r-md);
  background: var(--white); cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink-700);
}
.ml-griff span { font-size: 15px; }
.ml-griff b    { color: var(--brand-blue); }
/* (0) in Grün: alle aus dem Team sind heute eingeteilt */
.ml-griff b.fertig { color: var(--success); }
.ml-griff.offen {
  background: var(--brand-yellow-50);
  border-color: var(--brand-yellow); color: var(--brand-blue);
}
.ml-plus {
  flex: 0 0 40px; height: 40px; border: 0; border-radius: var(--r-md);
  background: var(--brand-yellow); color: var(--brand-blue);
  font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer;
}
.ml-plus:active { transform: scale(.94); }

.ml-inhalt {
  /* Höchstens bis zur halben Bildschirmhöhe – zusammen mit den Griffen
     bleibt so immer ein brauchbarer Teil der Zeitfläche sichtbar. */
  max-height: min(42vh, 340px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 10px 12px;
  border-top: 1px solid var(--ink-100);
}
.ml-hinweis { margin: 6px 0 10px; font-size: 11px; color: var(--ink-500); }

/* --- Personen --- */
.m-team-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 6px; }
.m-person {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 3px; border-radius: var(--r-md);
  border: 1px solid transparent;
  touch-action: none; cursor: grab;
  -webkit-tap-highlight-color: transparent;
}
.m-person:active   { background: var(--brand-blue-50); }
.m-person.gefiltert { background: var(--brand-yellow-50); border-color: var(--brand-yellow); }
.m-person.belegt   { opacity: .5; }
.m-person .belegt-badge { position: absolute; top: 2px; right: 8px; }
.m-person.abwesend { opacity: .45; }
.m-person.abwesend .avatar { filter: grayscale(1); }
.m-person .abw-label { font-size: 7px; }
.mp-name {
  font-size: 11px; font-weight: 600; color: var(--ink-700);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- Auftragskarten --- */
.m-pool { display: flex; flex-direction: column; gap: 7px; }
.m-auftrag {
  border: 1px solid var(--ink-200);
  border-left: 4px solid var(--card-farbe, var(--brand-yellow));
  border-radius: var(--r-md);
  padding: 8px 10px; background: var(--white);
  touch-action: none; cursor: grab;
  -webkit-tap-highlight-color: transparent;
}
.m-auftrag:active { background: var(--brand-blue-50); }
.m-auftrag.erp    { border-style: dashed; }
.ma-nummer { font-size: 10.5px; font-weight: 700; color: var(--ink-500); letter-spacing: .3px; }
.ma-titel  { font-size: 13px; font-weight: 700; color: var(--ink-900); line-height: 1.25; }
.ma-kunde  { font-size: 11px; color: var(--ink-500); }
.ma-kopf {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--ink-400); margin: 8px 0 2px;
}

/* --- Der Geist, der am Finger hängt --- */
.zieh-geist {
  position: fixed; top: 0; left: 0; z-index: 200;
  pointer-events: none;
  margin: -26px 0 0 -26px;
  filter: drop-shadow(0 6px 14px rgba(15,64,110,.4));
}
.geist-person .avatar { width: 52px; height: 52px; font-size: 15px; border-width: 3px; }
.geist-auftrag {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  background: var(--brand-blue); color: var(--white);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}

/* --- Aktionsleiste über den Griffen --- */
/* Die Aktionsleiste sitzt über den Leistengriffen. Die Zeit stellt man
   inzwischen an den Fangpunkten ein – hier bleibt nur, was sonst nicht geht. */
body[data-ansicht="mobil"] .aktionsleiste {
  bottom: 60px; left: 8px; right: 8px;
  transform: none;                    /* die Desktop-Zentrierung schöbe sie aus dem Bild */
  max-width: none; width: auto;
  border-radius: var(--r-lg);
  padding: 7px 9px; gap: 5px; flex-wrap: wrap;
  box-shadow: 0 6px 20px rgba(15,64,110,.22);
}
body[data-ansicht="mobil"] .aktionsleiste .al-text {
  flex: 1 0 100%; font-size: 11.5px; margin-bottom: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body[data-ansicht="mobil"] .aktionsleiste .btn { flex: 1; font-size: 12px; padding: 9px 4px; }
body[data-ansicht="mobil"] #alZeit { display: none; }

/* Dialoge dürfen am Handy die Breite nutzen */
body[data-ansicht="mobil"] dialog { width: calc(100vw - 24px); max-width: none; }

/* Beim Ziehen einer Person: wo steht sie schon? */
.mt-block.belegt-warn {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px var(--danger);
  background: var(--danger-bg);
}
.mt-block.belegt-warn::after {
  content: '!'; position: absolute; top: 1px; right: 5px;
  font-size: 12px; font-weight: 800; color: var(--danger);
}


/* ============================================================
   iOS zoomt beim Antippen in jedes Eingabefeld, dessen Schrift
   kleiner als 16 Pixel ist. Deshalb hier überall 16 – das ist
   die einzige Größe, die Safari in Ruhe lässt.
   ============================================================ */
body[data-ansicht="mobil"] input,
body[data-ansicht="mobil"] select,
body[data-ansicht="mobil"] textarea { font-size: 16px; }
body[data-ansicht="mobil"] .team-wahl { font-size: 13px; }   /* Auswahl zoomt nicht */
body[data-ansicht="mobil"] .pool-suche { font-size: 16px; padding: 11px 12px; }

/* ============================================================
   Roter Punkt: Dieser Termin ist noch nicht veröffentlicht.
   Outlook kennt den Stand also nicht – erst 📤 macht ihn amtlich.
   Sitzt oben rechts an jeder Einsatzkarte (Desktop wie Handy).
   ============================================================ */
.pub-punkt {
  position: absolute; top: -5px; right: -5px; z-index: 6;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
/*
   ACHTUNG: Hier stand einmal „.einsatz { position: relative; }".
   Das sah harmlos aus, hat aber die Blöcke in der Tagesansicht zerlegt:
   Diese Regel steht weiter unten als „.tl-block { position: absolute }",
   ist gleich stark – und gewinnt deshalb. Die Einsätze fielen damit in den
   normalen Textfluss und standen hintereinander statt an ihrer Uhrzeit.
   Von außen sah es aus, als würde ein Auftrag den nächsten blockieren.
   .einsatz bringt sein „position: relative" ohnehin schon von oben mit. */

/*
 * Auf der Tageskarte sitzt der Punkt INNEN.
 *
 * Er stand mit top/right auf -5 Pixel, ragte also bewusst über den Rand
 * hinaus – ein Abzeichen an der Ecke. Seit die Karte genau ihre Zeit abbildet
 * und dafür abschneidet ('overflow: hidden', 31.08.2026), wurde er dabei
 * halbiert: „Das Symbol ist abgeschnitten" (Tim, 17.09.2026).
 *
 * Jetzt liegt er vollständig in der Karte, und die obere Zeile teilt sich von
 * rechts nach links auf: Griff, ✕, Punkt.
 */
.einsatz .pub-punkt { top: 4px; right: 26px; }

/*
 * Tagesansicht: ✕ und roter Punkt sitzen unter dem oberen Band, am rechten
 * Rand wie in der Woche. Sie teilen sich die Zeile mit keinem Griff mehr,
 * brauchen also auch keine Reserve nach rechts (23.09.2026).
 */
.tl-block .x         { top: calc(var(--griff-h) + 6px); right: 4px; }
.tl-block .pub-punkt { top: calc(var(--griff-h) + 6px); right: 26px; }
.tl-block .nummer    { padding-right: 46px; }

/*
 * Sehr kurze Termine (unter 70px, also rund eine Stunde) bekommen keine
 * Baender: Zwei davon fraessen die Karte auf. Dort bleiben die Pfeile wie
 * bisher schmal am rechten Eck – zu verdecken gibt es bei so einer Karte
 * ohnehin fast nichts, sie zeigt nur noch Kunde und Uhrzeit.
 */
.tl-block.sehr-knapp {
  --griff-h: 0px;
  padding-top: 4px; padding-bottom: 4px;
}
.tl-block.sehr-knapp .griff { left: auto; right: 0; width: 52px; height: 14px; }
.tl-block.sehr-knapp .x         { top: 3px; right: 58px; }
.tl-block.sehr-knapp .pub-punkt { top: 3px; right: 80px; }

/*
 * Warnzeichen „nur Rechnungsadresse“ (Tim, 01.10.2026, Ralph Runde 5 T5):
 * Die Lieferadresse fehlt in VenDoc, die Adresse ist vielleicht die des
 * Bauherrn. Sitzt in derselben oberen Zeile links neben dem roten Punkt –
 * Griff, ✕, Punkt, Warnzeichen. Text steht im title.
 */
.adr-warnung {
  position: absolute; top: 3px; right: 42px; z-index: 6;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--warning); color: var(--white);
  font-size: 10px; font-weight: 800; line-height: 14px; text-align: center;
  cursor: help;
}
.tl-block .adr-warnung { top: calc(var(--griff-h) + 5px); }
.tl-block.sehr-knapp .adr-warnung { top: 2px; right: 96px; }
body.finger .tl-block.sehr-knapp .adr-warnung { right: 104px; }
.mx-karte .adr-warnung {
  top: 1px; right: 12px; width: 10px; height: 10px;
  font-size: 8px; line-height: 10px;
}
.mx-karte .adr-warnung ~ .mx-titelzeile { padding-right: 24px; }

/* ============================================================
   Geister: gelöschte Einsätze, deren Outlook-Termin noch lebt.
   Blass, gestrichelt, durchgestrichen, nicht anfassbar. Erst das
   Veröffentlichen räumt sie weg – im Board und im Outlook.
   ============================================================ */
.geist {
  opacity: .55;
  border-style: dashed !important;
  background: var(--ink-50) !important;
  pointer-events: none;
  box-shadow: none !important;
}
.geist .titel,
.geist .mtb-titel { text-decoration: line-through; color: var(--ink-500); }
/* ---------- Ausgeliehen: gehört einer fremden Anzeigetafel ----------
   Jemand aus meinem Team arbeitet an einem Termin, der woanders geplant
   wurde. Er steht hier, damit man sieht, dass die Person vergeben ist – aber
   schraffiert und nicht anfassbar, geändert wird er in der Tafel, zu der er
   gehört. Bewusst grau und nicht rot: Das ist kein Fehler, sondern normale
   Zusammenarbeit zwischen zwei Teams (Tim, 24.08.2026). */
.einsatz.ausgeliehen,
.mx-karte.ausgeliehen,
.mt-block.ausgeliehen {
  --card-farbe: var(--ink-300) !important;
  opacity: .82; cursor: default;
}
/* Die eine Schraffur im ganzen Depp (Runde 6 T4, Tim 03.10.2026: „Schraffiert
   heißt verliehen – überall gleich“): Tag, Woche, Matrix, Handy, Legende. */
.einsatz.ausgeliehen,
.mx-karte.ausgeliehen,
.mt-block.ausgeliehen,
.lg-feld.ausgeliehen {
  background-image: repeating-linear-gradient(135deg,
    transparent 0 7px, rgba(11,26,44,.08) 7px 14px);
}
.mx-karte.ausgeliehen { background-color: var(--ink-50); border-left-color: var(--ink-300); }
.lg-feld.ausgeliehen  { background-color: var(--ink-50); border: 1px solid var(--ink-300); }
.mx-fremd-text {
  display: block; font-size: 9.5px; font-weight: 700; color: var(--brand-blue);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.einsatz.ausgeliehen .x,
.einsatz.ausgeliehen .griff,
.einsatz.ausgeliehen .chip-x { display: none; }
.einsatz.ausgeliehen::after {
  content: attr(data-fremd-text);
  display: block; margin-top: 4px;
  font-size: 10px; font-weight: 700; line-height: 1.2;
  color: var(--brand-blue); overflow-wrap: anywhere;
}

/* Rückholbare Geister sind anfassbar – der Rest bleibt reine Anzeige.
   Ohne diesen Hinweis sieht man dem blassen Block nicht an, dass ein Tipp
   ihn zurückholt (Tim, 24.08.2026). */
.einsatz.geist.rueckholbar {
  pointer-events: auto; cursor: pointer;
}
.einsatz.geist.rueckholbar:hover,
body.finger .einsatz.geist.rueckholbar {
  opacity: .85;
  box-shadow: 0 0 0 2px var(--brand-yellow);
}
.einsatz.geist.rueckholbar .geist-label::after {
  content: ' · tippen zum Zurückholen';
  font-weight: 700; color: var(--brand-blue);
}

.geist-label {
  font-size: 9.5px; font-weight: 700; color: var(--danger);
  text-transform: uppercase; letter-spacing: .4px; margin-top: 2px;
}

/* Matrix-Feld: für die Zeile reicht der durchgestrichene Titel, die
   Beschriftung „gelöscht" hätte dort keinen Platz. Planer dürfen die Karte
   trotz .geist { pointer-events: none } antippen, um sie zurückzuholen. */
.mx-karte.geist {
  opacity: .5;
  border-style: dashed;
  background: var(--ink-50);
  box-shadow: none;
}
.mx-karte.geist .mx-titel { text-decoration: line-through; color: var(--ink-500); }
.mx-karte.geist .mx-zeit  { color: var(--danger); }
.mx-karte.geist.rueckholbar { pointer-events: auto; cursor: pointer; }
.mx-karte.geist.rueckholbar:hover,
body.finger .mx-karte.geist.rueckholbar {
  opacity: .8; box-shadow: 0 0 0 2px var(--brand-yellow);
}
.geist .pub-punkt { opacity: 1; }

/* ---------- Outlook-Termine (Runde 5 T14, Runde 6 T5) ----------
   Fast weiß mit grau gestricheltem Rand: belegt laut Outlook, nicht aus
   Depp. Heller als jede Depp-Karte, ohne farbigen Streifen und ohne
   Schatten – nur Information, nicht ziehbar, nichts zum Bearbeiten. */
.ol-block {
  background: #fbfcfd; color: var(--ink-500);
  border: 1px dashed var(--ink-400); border-radius: 5px; box-shadow: none;
  font-size: 10px; line-height: 1.25; overflow: hidden;
  cursor: default; user-select: none;
}
.ol-block .ol-belegt { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--ink-500); }
.ol-block .ol-betreff { font-weight: 600; color: var(--ink-500); }
.ol-block.privat .ol-betreff { font-style: italic; }
/* Matrix: schmaler Streifen am rechten Rand (gedreht unten), ganztägige als Leiste oben */
.ol-block.mx-ol {
  position: absolute; z-index: 1; padding: 1px 2px; font-size: 9px;
  display: flex; flex-direction: column; overflow-wrap: anywhere;
}
.ol-block.mx-ol .ol-zeit { font-weight: 700; }
.ol-block.mx-ol .ol-betreff { overflow: hidden; }
.ol-block.mx-ol-leiste {
  position: absolute; left: 3px; right: 3px; top: 2px; z-index: 3;
  padding: 0 4px; white-space: nowrap; text-overflow: ellipsis;
}
.ol-block.mx-ol-leiste .ol-betreff { margin-left: 4px; }
/* Tag: Leiste über der Zeitleiste, schmale Spalte rechts daneben */
.ol-tagleiste { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px 52px; }
.ol-block.tag-ol-leiste { padding: 2px 6px; font-size: 11px; }
.ol-block.tag-ol-leiste .ol-betreff { margin-left: 5px; }
.tl.mit-outlook { grid-template-columns: 52px 1fr 130px; }
.tl-outlook { position: relative; margin-left: 4px; }
.ol-block.tag-ol {
  position: absolute; padding: 2px 4px; font-size: 11px;
  display: flex; flex-direction: column;
}
/* Woche: kompakte Zeile im Tagesfeld – abgeschnitten mit „…", damit die
   fünf Tage auf eine Seite passen (Runde 14 T5); der volle Text steht im title */
.ol-block.woche-ol {
  padding: 2px 6px; font-size: 11px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0;
}
.ol-block.woche-ol .ol-zeit { font-weight: 700; }
/* Feine Linie zwischen den Einsatzkarten und den Outlook-Zeilen darunter
   (Runde 17 T1); den Abstand von 6 px gibt das gap der .tag-body */
.woche-ol-trenner { flex: none; height: 0; border-top: 1px solid #cbd5e1; }

/* ---------- Tag waagrecht (Runde 5 T16, Probelauf Team Hämmerle) ----------
   Zeit von links nach rechts, Einsätze als Balken in Spuren untereinander.
   Lage und Breite setzt app.js in Pixeln (renderTagWaagrecht); hier nur,
   was senkrecht anders ist: Achse oben, Griffe links/rechts statt oben/unten. */
.tl.waagrecht { display: block; padding: 0 16px; }
.tlw-achse { position: relative; height: 20px; }
.tlw-achse span {
  position: absolute; top: 2px; transform: translateX(-50%);
  font-size: 11px; font-weight: 600; color: var(--ink-400);
}
.tl-canvas.waagrecht {
  background-image:
    repeating-linear-gradient(to right, var(--ink-100) 0 1px, transparent 1px var(--px-w, 80px));
}
.tlw-lane {
  position: absolute; left: 0; right: 0; height: 0;
  border-top: 1px solid var(--ink-100); pointer-events: none;
}
.tl-canvas.waagrecht .tl-block {
  --griff-h: 0px;
  padding: 4px 14px 4px 14px;
}
/* Kurze Balken (rund eine Stunde): weniger Rand, sonst bleibt vom Titel nichts */
.tl-canvas.waagrecht .tl-block.sehr-knapp { padding: 4px 6px; }
.tl-canvas.waagrecht .tl-block .x,
.tl-canvas.waagrecht .tl-block .pub-punkt,
.tl-canvas.waagrecht .tl-block .adr-warnung { top: 4px; }
.tl-canvas.waagrecht .tl-block .x { right: 14px; }
.tl-canvas.waagrecht .tl-block .pub-punkt { right: 36px; }
.tl-canvas.waagrecht .tl-block .adr-warnung { right: 52px; }
.tl-canvas.waagrecht .tl-block .griff {
  top: 0; bottom: 0; left: auto; right: auto; width: 12px; height: auto;
  cursor: ew-resize;
}
.tl-canvas.waagrecht .tl-block .griff::after { content: '↔'; padding: 8px 0; width: 10px; text-align: center; font-size: 9px; }
.tl-canvas.waagrecht .tl-block .griff-links  { left: 0; }
.tl-canvas.waagrecht .tl-block .griff-rechts { right: 0; }
.blockzone.waagrecht {
  top: 0; bottom: 0; right: auto;
  border-top: 0; border-bottom: 0;
  border-left: 1px dashed var(--danger); border-right: 1px dashed var(--danger);
}
.tlw-outlook { position: relative; margin-top: 4px; }
.ol-block.tag-ol-w {
  position: absolute; height: 20px; padding: 2px 5px; font-size: 11px;
  white-space: nowrap; text-overflow: ellipsis;
}
.ol-block.tag-ol-w .ol-betreff { margin-left: 5px; }

/* ---------- Abwesenheiten in Woche und Tag (Runde 8 T8) ----------
   Wie die Outlook-Zeilen, aber rötlich: fehlt laut Zeiterfassung. Nicht
   ziehbar, nichts zum Bearbeiten – nur sichtbar ohne Anklicken. */
.abw-block {
  background: var(--danger-bg); color: var(--danger);
  border: 1px solid #e8b4b4; border-radius: 5px; box-shadow: none;
  font-size: 11px; line-height: 1.25; overflow: hidden;
  cursor: default; user-select: none;
}
.abw-block .abw-titel { font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.abw-block .abw-text { font-weight: 600; }
.abw-block.woche-abw {
  padding: 2px 6px; font-weight: 600;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0;
}
/* Tag: schmale Streifen rechts neben der Outlook-Spalte, Schrift gedreht */
.tl.mit-abw { grid-template-columns: 52px 1fr var(--abw-breite); }
.tl.mit-outlook.mit-abw { grid-template-columns: 52px 1fr 130px var(--abw-breite); }
.tl-abw { position: relative; margin-left: 4px; }
.abw-block.tag-abw {
  position: absolute; padding: 4px 0; display: flex; align-items: center;
  writing-mode: vertical-rl; white-space: nowrap; font-size: 10px;
}
.abw-block.tag-abw .abw-titel { margin-bottom: 4px; }
.abw-block.tag-abw-w {
  position: absolute; height: 20px; padding: 2px 5px;
  white-space: nowrap; text-overflow: ellipsis;
}
.abw-block.tag-abw-w .abw-text { margin-left: 5px; }

/* ==============================================================
   Regiebericht am Handy (service/regiebericht.php, Runde 6 T11)
   Aufbau wie die Attrappe service/prototyp/index.html, Farben und
   Knöpfe aus diesem Stylesheet. Alles unter .rb-seite, damit nichts
   ins Board ausläuft.
   ============================================================== */
body.rb-seite {
  margin: 0 auto; max-width: 520px; min-height: 100vh;
  background: var(--white); color: var(--ink-900);
  font-family: var(--font-sans); font-size: 15px;
  box-shadow: 0 0 0 1px var(--ink-200);
}
/* Die Handy-Regel oben sperrt das Scrollen der Seite (dort scrollt nur der
   Kalender). Der Regiebericht ist eine normale Seite und muss als Ganzes
   scrollen - am Handy ging nach dem ersten Bildschirm nichts weiter
   (Tim, 04.10.2026). */
html:has(body.rb-seite) { height: auto; }
body.rb-seite[data-ansicht="mobil"] { overflow: visible; height: auto; }
/* iPad im Querformat (und Bildschirm): breiter, zwei Spalten, Unterschriften
   nebeneinander. Die Fussleiste waechst mit. */
@media (min-width: 900px) {
  body.rb-seite { max-width: 1080px; }
  /* Die Felder liegen in #rbFelder (bis zum Laden ausgeblendet), nicht direkt in .rb-inhalt */
  .rb-inhalt #rbFelder:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
  /* Feste Spalten statt freier Verteilung (Runde 12b T5, Tim 09.10.2026): links
     Einsatz bis KFZ-Zone, rechts Material und Arbeitszeit; die Unterschriften als
     eigene Zeile über beide Spalten, nebeneinander auf gleicher Höhe. */
  .rb-inhalt #rbFelder > :not(.rb-spalte) { grid-column: 1 / -1; }
  .rb-unterschriften { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
  .rb-fuss { max-width: 1080px; }
}
.rb-seite .mk-titel { flex: 1; font-weight: 700; font-size: 15px; text-align: center; }
.rb-inhalt { padding: 14px 16px 170px; }   /* Platz unter der festen Fussleiste, auch mit langer Meldung */
.rb-seite fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.rb-seite legend {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-500); font-weight: 700; margin-bottom: 8px; padding: 0;
}
.rb-lesen {
  background: var(--ink-50); border-radius: var(--r-sm); padding: 10px 12px;
  font-size: 14px; line-height: 1.45;
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px;
}
.rb-lesen b { color: var(--ink-500); font-weight: 600; white-space: nowrap; }
.rb-seite input[type=text], .rb-seite input[type=email], .rb-seite input[type=number],
.rb-seite input[type=time], .rb-seite input[type=search], .rb-seite textarea, .rb-seite select {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px 12px;
  border: 1px solid var(--ink-300); border-radius: var(--r-sm);
  background: var(--white); color: var(--ink-900);
}
.rb-seite textarea { min-height: 90px; resize: vertical; }
.rb-wahl { display: flex; gap: 6px; }
.rb-wahl label { flex: 1; position: relative; }
.rb-wahl input { position: absolute; opacity: 0; }
.rb-wahl span {
  display: block; text-align: center; padding: 10px 6px; cursor: pointer;
  border: 1px solid var(--ink-300); border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600;
}
.rb-wahl input:checked + span { background: var(--brand-blue); border-color: var(--brand-blue); color: var(--white); }
.rb-wahl input:focus-visible + span { outline: 2px solid var(--brand-yellow); }
.rb-zeile { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.rb-zeile > * { flex: 1; min-width: 0; }
.rb-abstand { margin-top: 8px; }
.rb-beschr { flex: 0 1 auto; font-size: 13px; color: var(--ink-500); }
.rb-mittel { flex: 0 0 96px; }
.rb-klein { padding: 6px 10px; font-size: 12px; }
.rb-x { flex: 0 0 36px; border: 0; background: none; color: var(--danger); font-size: 20px; cursor: pointer; }
.rb-mat { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
.rb-mat td { padding: 6px 4px; border-bottom: 1px solid var(--ink-100); vertical-align: middle; }
.rb-mat td.rb-nr { color: var(--ink-500); font-size: 12px; white-space: nowrap; }
.rb-mat td.rb-menge { width: 70px; }
.rb-mat td.rb-einheit { width: 34px; color: var(--ink-500); font-size: 12px; }
.rb-mat td.rb-x-zelle { width: 30px; }
.rb-mat td.rb-leer { color: var(--ink-400); font-style: italic; }
.rb-mat input { padding: 6px 8px; font-size: 15px; }
.rb-vorschlaege {
  border: 1px solid var(--ink-200); border-radius: var(--r-sm); background: var(--white);
  box-shadow: var(--shadow-card); margin-top: 4px;
}
.rb-vorschlaege:empty { display: none; }
.rb-vorschlaege button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 10px 12px; font: inherit; font-size: 14px; cursor: pointer;
  border-bottom: 1px solid var(--ink-100);
}
.rb-vorschlaege button small { display: block; color: var(--ink-500); font-size: 12px; }
.rb-zeit { border: 1px solid var(--ink-200); border-radius: var(--r-sm); padding: 8px; margin-bottom: 8px; }
.rb-zeit .rb-zeile:last-child { margin-bottom: 0; }
.rb-fahrt { flex: 0 0 110px !important; display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-500); }
.rb-fahrt input { width: 60px; padding: 8px 6px !important; }
.rb-unterschrift {
  position: relative; border: 1px dashed var(--ink-300);
  border-radius: var(--r-sm); background: var(--ink-50);
}
.rb-unterschrift canvas { width: 100%; height: 150px; display: block; touch-action: none; border-radius: var(--r-sm); }
.rb-unterschrift .rb-loeschen { position: absolute; right: 6px; top: 6px; }
.rb-unterschrift.leer::after {
  content: 'Hier unterschreiben'; position: absolute; inset: 0;
  display: grid; place-items: center; color: var(--ink-400); pointer-events: none;
}
.rb-banner {
  background: var(--success-bg); color: var(--success); font-weight: 600;
  padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 12px;
}
.rb-seite .gesperrt input, .rb-seite .gesperrt textarea, .rb-seite .gesperrt select,
.rb-seite .gesperrt .rb-x, .rb-seite .gesperrt .rb-loeschen, .rb-seite .gesperrt #zeitNeu { opacity: .7; }
.rb-fuss {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; box-sizing: border-box; z-index: 5;
  display: flex; gap: 8px; align-items: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--white); border-top: 1px solid var(--ink-200);
}
.rb-fuss .btn { text-align: center; padding: 11px 10px; text-decoration: none; }
.rb-fuss a.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.rb-fuss .btn:disabled { opacity: .5; cursor: default; }
.rb-status { flex: 1; font-size: 12px; color: var(--ink-500); }
/* Status, Versand und „Erneut senden“ übereinander links in der Fußleiste (Runde 12b T4) */
.rb-fuss-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.rb-fuss-text .rb-status { flex: none; }
.rb-versand { font-size: 12px; color: var(--ink-500); }
.rb-versand.gesendet { color: var(--success); }
.rb-versand.fehler { color: var(--danger); font-weight: 600; }
.rb-fuss .btn.rb-klein { padding: 4px 8px; font-size: 12px; }
.rb-status.ok { color: var(--success); font-weight: 600; }
.rb-status.warn { color: var(--warning); font-weight: 600; }

/* ---------- Druckseite Regiebericht (Runde 6 T12) ----------
   Aufbau des VenDoc-Arbeitsnachweises, schwarz auf weiss wie das Papier.
   Am Bildschirm mit Depp-Kopfzeile und Knopf „Drucken“; beim Drucken nur
   das Blatt (A4, ohne Kopfzeile). */
body.druck-seite { background: var(--ink-100); }
.druck {
  background: var(--white); color: #000; font-family: Verdana, Arial, sans-serif; font-size: 11px;
  max-width: 190mm; margin: 16px auto; padding: 14mm 12mm; box-shadow: var(--shadow-card);
}
/* Aus dem Bericht geöffnet (Runde 7 T1): Zurück-Knopf über dem Blatt */
.dr-zurueck .mk-pfeil { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 0 12px; font-size: 15px; font-weight: 600; text-decoration: none; }
.dr-zurueck .mk-titel { flex: 1; font-weight: 700; font-size: 15px; text-align: center; }
.druck .dr-entwurf { border: 1px solid var(--warning); color: var(--warning); font-weight: 700; padding: 4px 8px; margin-bottom: 10px; }
.druck .dr-kopf { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.druck .dr-kasten { border-collapse: collapse; width: 100%; }
.druck .dr-kasten.dr-schmal { width: auto; margin-bottom: 10px; }
.druck .dr-kasten td, .druck .dr-kasten th { border: 1px solid #000; padding: 4px 6px; vertical-align: top; text-align: left; font-size: 11px; }
.druck .dr-kasten th.dr-breit { width: 55%; }
.druck .dr-kasten small { font-size: 9px; }
.druck .dr-box { display: inline-block; width: 10px; height: 10px; border: 1px solid #000; vertical-align: middle; margin: 0 4px 0 6px; text-align: center; line-height: 9px; font-size: 9px; }
.druck .dr-box.an::after { content: '×'; }
.druck .dr-adresse { margin-top: 10px; }
.druck .dr-firma { text-align: right; }
.druck .dr-logo { width: 150px; height: auto; display: block; margin: 0 0 8px auto; }
.druck .dr-daten { font-size: 11px; text-align: left; margin-left: auto; border-collapse: collapse; }
.druck .dr-daten th { font-weight: 700; padding-right: 12px; }
.druck .dr-daten td.dr-nummer { font-weight: 800; }
.druck .dr-betreff { font-size: 13px; margin: 14px 0 4px; }
.druck .dr-text { border-bottom: 1px solid #000; min-height: 48px; padding: 4px 0; white-space: pre-line; }
.druck .dr-abstand { margin-top: 10px; }
.druck .dr-abstand-s { margin-top: 6px; }
.druck .dr-klein { font-size: 9px; }
.druck .dr-unten { display: flex; gap: 10px; }
.druck .dr-hinweis { flex: 1; border: 1px solid #000; padding: 5px; font-size: 8px; line-height: 1.3; }
.druck .dr-zone { flex: 0 0 190px; border: 1px solid #000; padding: 5px; }
.druck .dr-unterschriften { display: flex; gap: 12px; margin-top: 12px; }
.druck .dr-unterschriften > div { flex: 1; border: 1px solid #000; padding: 6px; min-height: 95px; }
.druck .dr-unterschriften img { max-height: 60px; max-width: 100%; display: block; margin-top: 4px; }
.druck .dr-fuss { margin-top: 14px; border-top: 1px solid #000; padding-top: 6px; font-size: 9px; display: flex; justify-content: space-between; gap: 8px; }
.druck .dr-fuss.dr-fuss-firma { border: 0; margin-top: 0; padding-top: 2px; }
@media print {
  @page { size: A4; margin: 12mm; }
  body.druck-seite { background: var(--white); }
  body.druck-seite .topbar, body.druck-seite .dr-zurueck { display: none; }
  .druck { max-width: none; margin: 0; padding: 0; box-shadow: none; }
}

/* ============================================================
   Service-Board (Runde 7 T5, Attrappe service/prototyp/board.html).
   Dieselben Klassen wie die Einteilung; hier nur, was das Board
   zusätzlich braucht. Farbe am linken Rand: gelb = bei uns offen,
   grün = wir warten, rot = Stillstand (berechnet).
   ============================================================ */
/* Umschalter Einteilung | Kapazität | Service: Links sehen aus wie die Knöpfe */
.seg .seg-link {
  display: inline-flex; align-items: center; padding: 6px 11px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 600;
  color: var(--ink-500); border-radius: 8px; text-decoration: none;
}
.seg .seg-link:hover { color: var(--brand-blue); }
.team-anzeige {
  font-size: 13px; font-weight: 600; color: var(--brand-blue);
  padding: 6px 10px; border: 1px solid var(--ink-200); border-radius: 10px; background: var(--white);
}
/* Die Seite selbst scrollt nie – das Board scrollt in sich (iPad) */
body.sb-seite { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
body.sb-seite .board-layout { flex: 1; min-height: 0; height: auto; }
body.sb-seite .sidebar { min-height: 0; }
.kalender.service { overflow: auto; min-width: 0; padding: 16px 18px 40px; }
.sb-leer { font-size: 14px; color: var(--ink-500); max-width: 640px; }
/* Runde 9 (Tim, 06.10.2026): Spalten einzeln scrollbar, der Kopf jeder Spalte bleibt
   stehen – wie im Tawiro-Cockpit. Das Board füllt die Höhe und scrollt nur seitlich
   (iPad), senkrecht scrollt jede Spalte für sich. Projektliste/Übersicht scrollen wie bisher. */
body.sb-seite #sbHaupt { display: flex; flex-direction: column; overflow-x: auto; overflow-y: hidden; padding-bottom: 12px; }
body.sb-seite #sbHaupt > * { flex: none; }
body.sb-seite #sbHaupt > .sb-pipewahl { align-self: flex-start; }
body.sb-seite #sbHaupt > .sb-pipeline:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-bottom: 0; }
body.sb-seite .woche-grid.sb-pipe { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
body.sb-seite .sb-spalte { min-height: 0; }
body.sb-seite .sb-spalte .tag-kopf { flex: none; }
body.sb-seite .sb-spalte .tag-body { flex: 1; min-height: 0; overflow-y: auto; }
/* Ohne „Zuletzt bewegt“ (Runde 9) bekommt der Stillstand die Höhe und scrollt in sich */
body.sb-seite #sbStill { flex: 1; min-height: 0; overflow-y: auto; }
/* Runde 8: alle Spalten einer Seite gleich breit; am Desktop 1280 ohne Seitwärtsscrollen,
   schmaler (iPad) scrollt das Board seitlich */
.woche-grid.sb-pipe { grid-template-columns: repeat(var(--tage), minmax(90px, 1fr)); gap: 8px; }
.sb-pipewahl { margin: 0 0 12px; display: inline-flex; }
.sb-pipewahl .zahl { margin-left: 6px; font-size: 10px; font-weight: 700; color: var(--ink-400); }
.sb-pipewahl button.aktiv .zahl { color: var(--brand-blue); }
.sb-spalte .tag-kopf .zahl {
  font-size: 10px; background: var(--ink-100); border-radius: 999px;
  padding: 1px 7px; color: var(--ink-500); margin-left: 6px;
}
.sb-spalte .tag-kopf .schwelle { font-weight: 500; font-size: 10px; color: var(--ink-300); }
/* Runde 8: neun schmale Spalten – Kopf bricht um statt über den Rand zu laufen */
.sb-spalte { min-width: 0; }
.sb-spalte .tag-kopf { flex-wrap: wrap; gap: 2px 6px; padding: 9px 6px 4px; font-size: 11px; overflow-wrap: anywhere; }
.sb-spalte .tag-body { padding-left: 6px; padding-right: 6px; }
.sb-karte { cursor: pointer; }
.sb-karte[draggable="true"] { cursor: grab; }
/* Runde 9 T2: Personen aus der Teamleiste auf Karten ziehen, Avatar auf der Karte öffnet das Chip-Menü */
body.sb-seite .sb-person[draggable="true"] { cursor: grab; }
/* Weiß = normal, rot = Stillstand, orange = Priorität hoch (schlägt rot am Rand) */
.sb-karte, .sb-pool { --card-farbe: var(--ink-200); }
.sb-karte.rot, .sb-pool.rot { --card-farbe: var(--danger); }
.sb-karte.hoch, .sb-pool.hoch { --card-farbe: var(--prio-hoch); }
.sb-karte .nummer { overflow-wrap: anywhere; }
.sb-karte.hoch .nummer { padding-right: 34px; }
.sb-prio {
  position: absolute; top: 6px; right: 7px; font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px; color: var(--white);
  background: var(--prio-hoch); border-radius: 4px; padding: 1px 4px;
}
.sb-karte .sb-adresse {
  /* Nur so breit wie der Text: ein Klick rechts neben der Adresse gehört der
     Karte (Kartendetail), nicht Google Maps (Tim, 06.10.2026) */
  display: inline-block; max-width: 100%; vertical-align: top;
  font-size: 11px; margin-top: 3px; color: var(--brand-blue-500);
  text-decoration: none; overflow-wrap: anywhere;
}
.sb-karte .sb-adresse:hover { text-decoration: underline; }
.sb-karte .sb-aufwand {
  font-size: 10px; font-weight: 700; color: var(--brand-blue); background: var(--brand-blue-50);
  border-radius: 4px; padding: 1px 5px; white-space: nowrap;
}
.sb-karte .fuss { flex-wrap: wrap; }
.sb-karte .warten {
  font-size: 11px; line-height: 1.35; margin-top: 3px; color: var(--danger);
  border-left: 2px solid var(--danger); padding-left: 6px;
}
.sb-karte .sb-hinweis { font-size: 11px; margin-top: 3px; color: var(--brand-blue-500); font-weight: 600; }
.sb-karte .fuss { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.sb-karte .zeit { margin-top: 0; cursor: inherit; }
.sb-karte.rot .zeit { color: var(--danger); background: var(--danger-bg); }
.sb-karte .aufg { font-size: 10px; font-weight: 700; color: var(--warning); margin-left: auto; }
.sb-karte .crew { margin-top: 4px; min-height: 0; }
.sb-pool { cursor: pointer; }
.sb-pool .zuletzt { font-size: 11px; color: var(--brand-blue-500); font-weight: 600; margin-top: 3px; }
.sb-pool.rot .zuletzt { color: var(--danger); }
.sb-person { cursor: pointer; }
.sb-zaehler { color: var(--brand-blue); }
.legende-zeile { font-size: 11px; color: var(--ink-500); display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 12px 2px; }
.legende-zeile i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.legende-zeile .lg-weiss { background: var(--white); border: 1px solid var(--ink-300); }
.legende-zeile .lg-hoch { background: var(--prio-hoch); }
.legende-zeile .lg-gelb { background: var(--brand-yellow-50); border: 1px solid var(--brand-yellow-300); }
/* Haken „Überprüfen“ (Tim, 27.10.2026): hellgelb in Board, Liste, Loxone Mail und Kopf des Kartendetails */
.sb-karte:has(.sh-pruef), tr.sh-ueberpruefen > td, .shm-karte.sh-ueberpruefen, .sh-status.sh-ueberpruefen { background: var(--brand-yellow-50); }
.sh-pruef { display: inline-block; margin: 2px 0 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
  color: var(--brand-yellow-600); background: var(--white); border: 1px solid var(--brand-yellow-300); }
.sh-pruef-haken { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; cursor: pointer; }
.sh-status.sh-ueberpruefen { border-radius: var(--r-md); padding: 4px 8px; }
.legende-zeile .lg-rot { background: var(--danger); }

/* ---------- Service-Board: Akte (Runde 7 T6), Aufbau wie die Attrappe und #dlgKarte ---------- */
dialog.akte { width: min(600px, 96vw); max-height: 92vh; overflow-y: auto; padding: 0; }
dialog.akte .ak-kopf { position: sticky; top: 0; background: var(--white); padding: 18px 24px 12px; border-bottom: 1px solid var(--ink-100); z-index: 1; }
dialog.akte .ak-kopf h3 { margin: 0 0 6px; padding-right: 40px; }
dialog.akte .ak-inhalt { padding: 6px 24px 22px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--brand-blue-100); color: var(--brand-blue); margin-right: 6px; }
.pill.hoch { background: var(--warning-bg); color: var(--prio-hoch); }
.pill.weiss { background: var(--ink-50); color: var(--ink-500); }
.pill.rot { background: var(--danger-bg); color: var(--danger); }
.pill.grau { background: var(--ink-100); color: var(--ink-500); }
dialog.akte .meta { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 13px; background: var(--ink-50); padding: 10px 12px; border-radius: var(--r-sm); }
dialog.akte .meta b { color: var(--ink-500); font-weight: 600; white-space: nowrap; }
dialog.akte .meta a { color: var(--brand-blue-500); font-weight: 600; text-decoration: none; }
dialog.akte .ak-beschreibung { white-space: pre-line; }
dialog.akte .h4zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
dialog.akte .h4zeile h4 { margin-top: 16px; }
dialog.akte .ak-fehler { font-size: 12px; color: var(--danger); margin: 4px 0 0; font-weight: 600; }
dialog.akte .ak-zeile { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
dialog.akte .ak-zeile input { margin-top: 0; }
dialog.akte .ak-zeile .btn { white-space: nowrap; }
.ak-checks { padding: 0; margin: 0; list-style: none; }
.ak-checks li { display: flex; gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--ink-100); font-size: 13px; }
dialog.akte .ak-checks input.ak-haken { width: auto; margin: 0; flex: none; }
dialog.akte .ak-checks input.ak-checktext { margin: 0; padding: 5px 8px; background: transparent; border-color: transparent; }
dialog.akte .ak-checks input.ak-checktext:focus { border-color: var(--brand-blue-500); background: var(--white); }
.ak-checks li.erl input.ak-checktext { color: var(--ink-400); text-decoration: line-through; }
.ak-mini { flex: none; border: 0; background: transparent; color: var(--ink-500); cursor: pointer; font-size: 13px; padding: 2px 5px; border-radius: 6px; }
.ak-mini:hover:not(:disabled) { background: var(--ink-100); color: var(--brand-blue); }
.ak-mini:disabled { opacity: .3; cursor: default; }
.ak-beteiligte { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.ak-person { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--ink-50); border-radius: 999px; padding: 2px 6px 2px 2px; }
dialog.akte .ak-klein { padding: 4px 9px; font-size: 12px; text-decoration: none; }
dialog.akte .dateien a { display: block; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--ink-100); color: var(--brand-blue-500); text-decoration: none; }
dialog.akte .ak-datei { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--ink-100); }
dialog.akte .ak-datei a { border-bottom: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
dialog.akte .dateien small { color: var(--ink-400); margin-left: 6px; font-size: 11px; }
dialog.akte .ak-upload { display: inline-flex; margin-top: 8px; font-size: 12px; color: var(--brand-blue); cursor: pointer; }
/* Kartendetail Runde 8 (T3): Felder Straße/Ort/Aufwand, Personensuche, Ablagefläche für Dateien */
dialog.akte .ak-felder { display: grid; grid-template-columns: 2fr 1.4fr 1fr auto; gap: 6px; align-items: end; }
dialog.akte .ak-felder label { font-size: 12px; color: var(--ink-500); margin: 0; }
dialog.akte .ak-felder input { margin-top: 2px; }
@media (max-width: 600px) { dialog.akte .ak-felder { grid-template-columns: 1fr 1fr; } }
dialog.akte #akPersonSuche { margin-top: 6px; }
.ak-treffer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
button.ak-person { border: 1px solid var(--ink-200); cursor: pointer; font: inherit; font-size: 13px; }
button.ak-person:hover { border-color: var(--brand-blue-500); }
.ak-ablage { margin-top: 8px; padding: 14px; border: 2px dashed var(--ink-200); border-radius: var(--r-sm); text-align: center; font-size: 13px; color: var(--ink-500); }
.ak-ablage.dragover { border-color: var(--brand-blue-500); background: var(--ink-50); color: var(--brand-blue); }
dialog.akte .ak-ablage .ak-upload { margin-top: 0; display: inline; font-weight: 600; }
.verlauf { padding: 0; margin: 0 0 0 5px; list-style: none; }
.verlauf li { font-size: 12px; padding: 5px 0 5px 14px; border-left: 2px solid var(--ink-200); position: relative; color: var(--ink-700); }
.verlauf li::before { content: ''; position: absolute; left: -5px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-blue-500); }
.verlauf li.vendoc { color: var(--ink-500); }
.verlauf li.vendoc::before { background: var(--ink-400); }
.verlauf li b { color: var(--ink-500); font-weight: 600; margin-right: 6px; }
dialog.akte .ak-fuss { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--ink-100); }
/* Einstieg aus dem Service-Board mit ?auftrag= (Runde 7 T6): der Auftrag ist markiert */
.pool-card.vorgewaehlt { outline: 2px solid var(--brand-blue-500); outline-offset: 1px; }
.kd-service-karte { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--brand-blue-500); }

/* ---------- Service-Board: Projektliste und Übersicht (Runde 7 T7), Look wie die Attrappe ---------- */
.sb-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 12px 2px; font-size: 12px; color: var(--ink-500); }
.sb-filter select { margin-left: 4px; }
table.sb-liste { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-card); font-size: 13px; }
table.sb-liste th { text-align: left; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--brand-yellow-600); padding: 10px 12px; background: var(--white); border-bottom: 1px solid var(--ink-200); }
table.sb-liste td { padding: 9px 12px; border-top: 1px solid var(--ink-100); vertical-align: middle; }
table.sb-liste tr[data-id]:hover td { background: var(--brand-blue-50); cursor: pointer; }
table.sb-liste .sb-zeile-erledigt td, table.sb-liste .sb-zeile-abgesagt td { color: var(--ink-500); }
table.sb-liste.laedt { opacity: .5; }
.sb-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; background: var(--ink-300); }
.sb-punkt.weiss { background: var(--white); border: 1px solid var(--ink-300); }
.sb-punkt.hoch { background: var(--prio-hoch); }
.sb-punkt.rot { background: var(--danger); }
.sb-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.sb-kachel { background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow-card); margin-bottom: 12px; }
.sb-kacheln .sb-kachel { margin-bottom: 0; }
.sb-kachel .zahl { font-size: 28px; font-weight: 800; color: var(--brand-blue); }
.sb-kachel .text { font-size: 12px; color: var(--ink-500); }
.sb-balken { display: flex; flex-direction: column; gap: 6px; }
.sb-balken div { display: grid; grid-template-columns: 200px 1fr 50px; gap: 10px; align-items: center; font-size: 13px; }
.sb-balken i { display: block; height: 14px; background: var(--brand-blue-500); border-radius: 3px; }
.sb-balken span:last-child { text-align: right; color: var(--ink-500); font-size: 12px; }
.sb-abgleich { font-size: 13px; color: var(--ink-700); margin: 0; }
/* Server-Abgleich laeuft nicht mehr (Runde 8): Stand in der Kopfzeile rot */
#sbStand.warn { color: var(--danger); font-weight: 600; }

/* ---------- Smart-Home-Cockpit (Runde 14 T3, Vorlage smarthome/prototyp) ----------
   Board, Akte, Liste und Übersicht kommen vom Service-Cockpit (sb-*, akte);
   hier nur, was die Anlage zusätzlich zeigt: Basissystem-Chips, Felder der
   Anlage in Blöcken, Wahl der Basissysteme. */
.sh-systeme { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; font-size: 10px; }
.sh-systeme i { font-style: normal; background: var(--brand-blue-50); color: var(--brand-blue); border-radius: 4px; padding: 0 5px; font-weight: 700; }
.sb-karte .sh-vertrag { font-size: 11px; color: var(--ink-500); margin-top: 3px; }
.sb-karte .sh-wartung { font-size: 11px; color: var(--ink-700); margin-top: 3px; }
.sh-fehlt { color: var(--danger); font-weight: 700; }
dialog.akte .sh-wartung-auftrag label { font-size: 12px; color: var(--ink-500); margin: 0; }
dialog.akte .sh-jahre { list-style: none; margin: 4px 0 8px; padding: 0; font-size: 12px; }
dialog.akte .sh-jahre li { padding: 3px 0; border-bottom: 1px solid var(--ink-100); }
dialog.sh-akte { width: min(720px, 96vw); }
dialog.akte .sh-status { margin-top: 4px; }
dialog.akte .sh-felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 10px; }
dialog.akte .sh-felder label { font-size: 12px; color: var(--ink-500); margin: 0; min-width: 0; }
dialog.akte .sh-felder label.sh-breit { grid-column: 1 / -1; }
dialog.akte .sh-felder input, dialog.akte .sh-felder select, dialog.akte .sh-felder textarea { margin-top: 2px; width: 100%; }
dialog.akte .sh-link { font-weight: 600; color: var(--brand-blue-500); }
dialog.akte .sh-block { margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--brand-blue-100); }
dialog.akte #shVertragMeta { margin-bottom: 8px; }
.systemwahl { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.systemwahl label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-700); margin: 0; border: 1px solid var(--ink-200); border-radius: 999px; padding: 3px 10px; cursor: pointer; background: var(--white); }
.systemwahl label.an { background: var(--brand-blue); color: var(--white); border-color: var(--brand-blue); }
.systemwahl input[type=checkbox] { width: auto; margin: 0; }
dialog.akte .sh-uebergaenge { margin-top: 12px; }
/* Archivierte Anlage (Runde 19b): Hinweis oben im Kartendetail */
dialog.akte .sh-archiv-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 8px;
  padding: 6px 10px; border-radius: var(--r-sm); background: var(--ink-50); border: 1px solid var(--ink-200); font-size: 13px; font-weight: 600; color: var(--ink-700); }
dialog.akte button.sh-zf { flex-direction: column; align-items: flex-start; border-radius: var(--r-sm); padding: 4px 10px; }
.sh-tabelle { overflow-x: auto; }
table.sh-liste td .sh-systeme { margin-top: 0; }
/* Arbeitsliste E-Mail (Runde 18): E-Mail in der Zeile, „Kunde suchen“, eingeschobene Vorschlagszeile */
table.sh-liste input.sh-email { width: 210px; padding: 3px 6px; font-size: 12px; }
table.sh-liste .ak-klein, table.sh-liste .sh-treffer .btn { padding: 2px 8px; font-size: 12px; }
table.sh-liste tr.sh-vorschlag td { background: var(--ink-50); }
table.sh-liste .sh-treffer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 0; }
table.sh-liste .sh-kunden-suche { width: 320px; margin-top: 6px; }
/* Mailverteiler (Runde 18 T3): Ersatz, wenn die Zwischenablage nicht geht */
textarea.sh-emails-text { display: block; width: 100%; min-height: 60px; margin: 0 0 12px; font-size: 12px; }
textarea.sh-emails-text[hidden] { display: none; }
.sb-kachel-klick { cursor: pointer; }
.sb-kachel-klick:hover { border-color: var(--brand-blue); }
/* Loxone-Abgleich (Runde 19): je Kunde eine Zeile, Knöpfe rechts, Aufträge aufklappbar */
table.shl-liste .shl-knoepfe { white-space: nowrap; text-align: right; }
table.shl-liste .shl-knoepfe .btn + .btn { margin-left: 4px; }
table.shl-liste .shl-mini { text-align: center; font-weight: 600; }
/* Runde 19b T2: Filterchips über der Liste „Keine Anlage“ (Klick filtert im Browser) */
.shl-arten .filter-chip { padding: 4px 11px; font-size: 12px; }
.shl-arten.gefiltert .filter-chip:not(.aktiv) { border-color: var(--ink-200); background: var(--white); color: var(--ink-500); }
table.shl-liste .shl-art select { font-size: 12px; }
table.shl-liste tr.shl-auftragszeile td { background: var(--ink-50); }
table.shl-liste .shl-auftragsliste { margin: 0; padding-left: 18px; font-size: 12px; }
table.shl-liste .shl-anlagen-suche { width: 320px; margin-top: 6px; }
.toast .shl-oeffnen { color: var(--brand-blue); font-weight: 600; }
/* Loxone Mail (Runde 19 T3, Prototyp): zwei Spalten unbearbeitet / Mail versendet, kopierte Karten gelb umrandet */
.shm-tafel { --tage: 2; grid-template-columns: repeat(2, minmax(220px, 420px)); gap: 12px; }
.shm-tafel .tag-body { display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
.shm-tafel .sb-spalte.dragover { outline: 2px dashed var(--brand-blue); }
.shm-kopf { padding: 4px 6px 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.shm-kopf .hint { margin: 0; flex-basis: 100%; }
.shm-karte { --card-farbe: var(--ink-200); cursor: default; }
.shm-karte[draggable="true"] { cursor: grab; }
.shm-karte .shm-name { font-weight: 600; color: var(--ink-900); }
.shm-karte .shm-keine { color: var(--danger); font-weight: 600; }
.shm-karte .shm-intern { color: #fff; background: var(--warning); border-radius: 3px; padding: 0 5px; font-size: 11px; font-weight: 600; }
.sh-vorschlag-titel { font-size: 12px; font-weight: 600; color: var(--ink-500); margin: 4px 0 2px; }
.shm-karte.sh-kopiert { border-color: var(--brand-yellow); box-shadow: 0 0 0 2px var(--brand-yellow); }
.shm-kopiert-text { font-size: 11px; font-weight: 700; color: var(--ink-700); }

/* ============================================================
   Termin noch nicht fixiert (Michi/Tim 10.10.2026, Runde 16 T1)
   Rundes Badge „?“ oben rechts am Rand, gleich unter dem ✕ – die Kopfzeile
   (Nummer, Warnzeichen, roter Punkt, ✕) bleibt, wie sie ist; in schmalen
   Wochen- und Tageskarten wäre neben ihr kein Platz mehr.
   Fix: blass, nur beim Anfahren – am Finger immer blass sichtbar.
   Unbestätigt: Markengelb; die Karte wird gelb mit gelbem Rand, die
   Kostenstellen-Kante links bleibt. Kein gestrichelter Rand, kein Orange,
   kein Violett – das sind Geist, Warnung und eigener Eintrag.
   ============================================================ */
.eb-badge {
  position: absolute; top: 22px; right: 4px; z-index: 6;
  width: 22px; height: 22px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--ink-300); background: var(--white);
  color: var(--ink-500); font: 800 12px/19px var(--font-sans); text-align: center;
  cursor: pointer; opacity: 0; transition: opacity .12s;
}
.einsatz:hover .eb-badge, .mx-karte:hover .eb-badge { opacity: .5; }
body.finger .eb-badge { opacity: .5; }
.eb-badge:hover { opacity: 1 !important; border-color: var(--brand-yellow); }
.eb-badge.an, .einsatz:hover .eb-badge.an, .mx-karte:hover .eb-badge.an, body.finger .eb-badge.an {
  opacity: 1; background: var(--brand-yellow); border-color: var(--brand-yellow-600); color: var(--brand-blue);
}
.eb-badge:disabled { cursor: default; }
/* 44 × 44 px Trefffläche am Finger, das Bild bleibt 22 px */
body.finger .eb-badge::before { content: ''; position: absolute; inset: -11px; }
/* Die Zeilen neben dem Badge machen ihm Platz – nur in der Woche. Im Tag
   bliebe sonst bei kurzen Blöcken die Zeit unter dem unteren Griff liegen
   (tagesansicht.spec „knapper Block“); dort liegt das Badge über dem Ende
   der Zeile, unbestätigt steht daneben ohnehin die Pille. */
.einsatz.mit-badge:not(.tl-block) .kunde,
.einsatz.mit-badge:not(.tl-block) .nummer + .titel { margin-right: 24px; }
.einsatz.mit-badge .eb-pille { max-width: calc(100% - 26px); }
.tl-block .eb-badge { top: calc(var(--griff-h) + 24px); }
.tl-block.sehr-knapp .eb-badge { top: 20px; }
.tl-canvas.waagrecht .tl-block .eb-badge { top: 2px; right: 70px; }

.einsatz.unbestaetigt,
.mt-block.unbestaetigt {
  background-color: var(--brand-yellow-100);
  border-color: var(--brand-yellow);
  border-left-color: var(--card-farbe, var(--brand-yellow));
}
.mx-karte.unbestaetigt {
  background-color: var(--brand-yellow-100);
  box-shadow: inset 0 0 0 1px var(--brand-yellow), 0 1px 2px rgba(11,26,44,.08);
}
.eb-pille {
  display: inline-block; margin: 2px 0 1px; padding: 1px 7px; border-radius: 999px;
  background: var(--brand-yellow-300); color: var(--brand-blue);
  font-size: 10px; font-weight: 700; line-height: 1.4; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}

/* Matrix: Kärtchen sind nur Millimeter hoch – Badge kleiner, Pille nur in der größten Stufe */
.mx-karte .eb-badge {
  top: 1px; right: 26px; width: 14px; height: 14px;
  border-width: 1px; font-size: 9px; line-height: 12px;
}
.mx-karte.mit-badge .mx-titelzeile { padding-right: 42px; }
.mx-karte .eb-pille { display: none; font-size: 9px; padding: 0 5px; }
.mx-karte.mx-s1 .eb-pille { display: inline-block; }

/* Handy: nur lesend – Zeichen und Pille oben rechts im Balken */
.mtb-unbestaetigt {
  position: absolute; top: 2px; right: 4px; z-index: 5;
  display: flex; align-items: center; gap: 3px; pointer-events: none;
}
.mtb-unbestaetigt .eb-badge {
  position: static; opacity: 1; width: 14px; height: 14px;
  border-width: 1px; font-size: 9px; line-height: 12px;
}
.mtb-unbestaetigt .eb-pille { margin: 0; font-size: 9px; padding: 0 5px; }
.mt-block.schmal .mtb-unbestaetigt .eb-pille { display: none; }

/* Legende: gelbe Mini-Karte */
.lg-gelb { background: var(--brand-yellow-100); border: 1px solid var(--brand-yellow); border-left: 4px solid var(--brand-blue-500); }
