/* BlueLeit – Oberfläche
 * Gestaltungsidee: Das Tableau ist eine Magnet-Stecktafel. Einsatzmittel sind
 * Schilder mit großer, farbiger Statusziffer. Alles andere bleibt ruhig.
 * Systemschriften: keine externen Fonts (Datenschutz, schlechtes Netz im Einsatz).
 *
 * Aufbau: Farbwerte und Zuordnungen stehen nur im ersten Abschnitt; jede Komponente hat
 * genau einen Abschnitt, ihre Bildschirm- und Touch-Varianten stehen dort mit.
 * „Bewegung reduzieren“ steht gesammelt am Ende.
 */

/* ===== Farbwerte und Theme ===== */
/* Die Werte gelten an der App und an jeder Ebene, die außerhalb von ihr im <body> hängt
   (Dialog, Menü, Vorschlagsliste, Zeichenleiste, Meldungen): Diese tragen ebenfalls
   „blueleit“ und die Theme-Klasse. */
.blueleit {
	--bg: #e4e9ee;
	--panel: #f3f6f8;
	--surface: #ffffff;
	--ink: #14202b;
	--muted: #5a6875;
	--line: #cbd3db;
	--line-soft: #dde3e9;
	--accent: #0b5f8a;
	--accent-ink: #ffffff;
	--accent-soft: #dcecf5;
	--danger: #b3261e;
	--danger-soft: #fbe9e7;
	--warn-soft: #fff4d6;
	--warn-ink: #9a6a00; /* Gelb als Schrift: auf hellem Grund abgedunkelt */
	--ok: #1b7f3a;
	--shadow: 0 1px 0 rgba(20, 32, 43, .06), 0 2px 6px rgba(20, 32, 43, .08);
	--shadow-pop: 0 10px 40px rgba(10, 20, 30, .25);
	--chip-hover: 0 6px 18px rgba(20, 32, 43, .16), 0 0 0 2px var(--brand-glow);

	/* Status der Einsatzmittel (FMS) und Sichtungskategorien */
	--s1: #1e9e50; --s2: #12733a; --s3: #e8a100; --s4: #d1342f; --s5: #7b4fd6;
	--s6: #7a8590; --s7: #2f6fdb; --s8: #0e95a3; --s0: #d1342f;
	--t1: #d1342f; --t2: #e8a100; --t3: #1e9e50; --t4: #2f6fdb;
	--tEX: #222; --tEX-ink: #fff;
	--on-s3: #1b1400; /* dunkle Schrift auf Gelb (Status 3, Sichtung II) */

	/* Taktische Zeichen sind für hellen Grund gezeichnet – auch im Dunkeln. */
	--sym-bg: #eef2f5;

	/* Farben der Angaben beim Anlegen eines Einsatzes (Schlagwort, Diagnose, Meldung, Ort, Patienten, dringend) */
	--ic-kw: #d1342f; --ic-diag: #7b4fd6; --ic-msg: #2f6fdb; --ic-pos: #0b8793; --ic-pat: #d0700a; --ic-prio: #d1342f;

	--brand: #1d64d8;
	--brand-glow: rgba(29, 100, 216, .22);
	--radius: 6px;
	--chip-r: 12px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	font-family: var(--font);
	font-size: 14px;
	line-height: 1.4;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
	-webkit-font-smoothing: antialiased;
}

.blueleit.bl-theme-dark {
	--bg: #0f151b;
	--panel: #141c24;
	--surface: #1b252f;
	--ink: #e5ecf2;
	--muted: #8c9aa7;
	--line: #2b3946;
	--line-soft: #233039;
	--accent: #59aedc;
	--accent-ink: #062030;
	--accent-soft: #163447;
	--danger: #ff7a6e;
	--danger-soft: #3a1b19;
	--warn-soft: #3a2f10;
	--warn-ink: var(--s3);
	--ok: #4fc277;
	--shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 2px 6px rgba(0, 0, 0, .35);
	--shadow-pop: 0 10px 40px rgba(0, 0, 0, .6);
	--chip-hover: 0 8px 22px rgba(0, 0, 0, .55), 0 0 0 2px rgba(89, 174, 220, .35);
	/* Schwarz (EX) verschwände auf dunklem Grund: hell mit dunkler Schrift */
	--tEX: #c8d0d8; --tEX-ink: #0f151b;
	--sym-bg: #dfe6ec;
	--ic-kw: #ff7a6e; --ic-diag: #b69cff; --ic-msg: #7fa9ff; --ic-pos: #3cc8d6; --ic-pat: #ffa94d; --ic-prio: #ff6b5e;
	color-scheme: dark;
}

/* ---------- Farbzuordnungen ----------
   Die Klassen aus app.js (Status s0–s8, Sichtung tri-*, Einsatzstatus st-*, Markierungs-
   farbe mk-*, Tag-Farbe c-*, UHS-Farbe uc-*) setzen hier nur Variablen. Komponenten lesen
   var(--st), var(--tri), var(--stc), var(--mk), var(--tc), var(--uc) und die Schriftfarbe
   darauf (--st-ink usw., sonst Weiß). Einen Grundton ohne Zuordnung bringt die Komponente
   als Rückfallwert oder mit :where() (ohne Gewicht) mit, damit diese Zuordnungen gewinnen. */
.s0 { --st: var(--s0); } .s1 { --st: var(--s1); } .s2 { --st: var(--s2); }
.s3 { --st: var(--s3); --st-ink: var(--on-s3); } .s4 { --st: var(--s4); } .s5 { --st: var(--s5); }
.s6 { --st: var(--s6); } .s7 { --st: var(--s7); } .s8 { --st: var(--s8); }

/* Sichtung; ohne Sichtung (tri-none) bleibt beim Grundton der Komponente.
   data-tri: Patientendialog (Farbe am oberen Rand). */
.tri-1, [data-tri="1"] { --tri: var(--t1); }
.tri-2, [data-tri="2"] { --tri: var(--t2); --tri-ink: var(--on-s3); }
.tri-3, [data-tri="3"] { --tri: var(--t3); }
.tri-4, [data-tri="4"] { --tri: var(--t4); }
.tri-EX, [data-tri="EX"] { --tri: var(--tEX); --tri-ink: var(--tEX-ink); }

/* Einsatzstatus: Farbe und zarter Hintergrund; abgeschlossen bleibt beim Grundton. */
.st-offen { --stc: var(--danger); --stc-soft: var(--danger-soft); }
.st-alarmiert { --stc: var(--s3); --stc-soft: var(--warn-soft); --stc-ink: var(--on-s3); }
.st-vor_ort { --stc: var(--s4); --stc-soft: var(--danger-soft); }
.st-transport { --stc: var(--s7); --stc-soft: var(--accent-soft); }
.st-uhs { --stc: var(--s8); --stc-soft: color-mix(in srgb, var(--s8) 16%, transparent); }

/* Markierungen und Linien auf der Karte */
.mk-white { --mk: #ffffff; } .mk-red { --mk: #e03a2f; } .mk-blue { --mk: #1f5fd1; } .mk-green { --mk: #1e8a46; } .mk-yellow { --mk: #f2c419; }
.mk-orange { --mk: #f08a1c; } .mk-purple { --mk: #8250d8; } .mk-gray { --mk: #8a96a1; } .mk-black { --mk: #1d232a; }

/* Tags */
.c-red { --tc: #d1342f; } .c-orange { --tc: #e87a00; } .c-yellow { --tc: #c99a00; --tc-ink: var(--on-s3); } .c-green { --tc: #1e9e50; }
.c-teal { --tc: #0e8f8f; } .c-blue { --tc: #2f6fdb; } .c-purple { --tc: #7b4fd6; } .c-gray { --tc: #6b7785; }

/* Unfallhilfsstellen */
.uc-teal { --uc: #0e9aa7; } .uc-purple { --uc: #8250d8; } .uc-orange { --uc: #ef7d10; } .uc-pink { --uc: #d6409f; }
.uc-lime { --uc: #6aa31a; } .uc-indigo { --uc: #4b5fd6; } .uc-amber { --uc: #c99200; } .uc-cyan { --uc: #1f9fd8; }

/* ===== Grundlagen ===== */
.blueleit *, .blueleit *::before, .blueleit *::after { box-sizing: border-box; }
/* Grundstil für Elemente mit :where() – ohne Eigengewicht, damit Komponentenklassen ihn
   ohne !important überschreiben können. */
:where(.blueleit) :where(h1, h2, h3) { margin: 0; color: var(--ink); line-height: 1.2; font-weight: 650; }
:where(.blueleit) h1 { font-size: 22px; }
:where(.blueleit) h2 { font-size: 16px; }
:where(.blueleit) h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 14px 0 6px; }
:where(.blueleit) p { margin: 0 0 8px; }
:where(.blueleit) a { color: var(--accent); }
:where(.blueleit) small { font-size: 12px; }
.blueleit :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* hidden muss jede display-Angabe der Bausteine schlagen. */
.blueleit [hidden] { display: none !important; }

.bl-ic { width: 18px; height: 18px; flex: none; }
.bl-spacer { flex: 1; }
.bl-muted { color: var(--muted); }
.bl-hint { color: var(--muted); font-size: 12px; display: block; margin-top: 4px; }
.bl-plain { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
[data-lp] { -webkit-touch-callout: none; } /* Langes Drücken öffnet das eigene Menü, nicht das des Systems */

/* ===== Einbettung und App-Fläche ===== */
/* Nur die App selbst bekommt den Grund; Ebenen außerhalb bringen ihren eigenen mit. */
.blueleit-standalone { background: var(--bg); }

/* Eigene Seite ohne WordPress-Rahmen */
html:has(body.blueleit-doc), body.blueleit-doc { margin: 0; height: 100%; background: #0f151b; }
.blueleit.blueleit-standalone {
	position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
/* Vollbild (auch ohne Fullscreen-API): über allem, ohne Rand. */
#blueleit-app.is-full {
	position: fixed; inset: 0; z-index: 99990;
	height: 100vh; margin: 0; border: 0; border-radius: 0;
}
.bl-boot { padding: 40px; color: var(--muted); }

/* ===== Rahmen: Kopfzeile, Icon-Leiste, Hauptbereich, Seiten ===== */
.bl-shell { flex: 1; min-height: 0; display: grid; grid-template-columns: 84px minmax(0, 1fr); }
.bl-main { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.bl-shell > .bl-main { min-width: 0; }

/* ---------- Kopfzeile ---------- */
.bl-top {
	display: flex; align-items: center; gap: 10px;
	padding: 0 12px; min-height: 52px; flex: none;
	background: var(--surface); border-bottom: 1px solid var(--line);
}
.bl-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); flex: none; }
.bl-brand-mark {
	display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
	background: var(--brand); color: #fff; box-shadow: 0 0 0 3px var(--brand-glow);
}
.bl-brand-mark .bl-ic { width: 19px; height: 19px; }
.bl-brand-logo { display: block; width: 30px; height: 30px; border-radius: 8px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 2px 8px rgba(29,100,216,.35); }
.bl-brand-name { font-weight: 750; font-size: 16px; letter-spacing: -.01em; }
.bl-top:has(.bl-svc-title) .bl-brand-name { display: none; }
.bl-svc-title { display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: 10px; border-left: 1px solid var(--line); }
.bl-svc-btn {
	display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 220px;
	background: none; border: 0; padding: 4px 8px; border-radius: 6px; cursor: pointer; color: var(--ink); text-align: left; font: inherit;
}
.bl-svc-btn:hover { background: var(--panel); }
.bl-svc-btn strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bl-svc-btn small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bl-pill {
	display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
	font-size: 12px; font-weight: 750; background: var(--panel); border: 1px solid var(--line); color: var(--ink);
}
.bl-pill.is-live { background: color-mix(in srgb, var(--s1) 15%, transparent); border-color: var(--s1); color: var(--ok); }
.bl-pill.is-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--s1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s1) 25%, transparent); }
.bl-pill.is-prep { background: var(--warn-soft); border-color: var(--s3); }
.bl-pill.is-closed { color: var(--muted); }
.bl-pill.role-blueleit_admin { border-color: var(--accent); }
.bl-pill.role-blueleit_viewer { color: var(--muted); }
.bl-pill.role-blueleit_uhs { border-color: var(--s8); color: var(--s8); }

.bl-top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.bl-presence { display: flex; }
.bl-avatar {
	display: grid; place-items: center; width: 28px; height: 28px; margin-left: -6px; border-radius: 50%;
	background: var(--accent-soft); color: var(--ink); font-size: 11px; font-weight: 700;
	border: 2px solid var(--surface); cursor: default;
}
.bl-avatar:first-child { margin-left: 0; }
.bl-avatar.is-me { background: var(--accent); color: var(--accent-ink); }
.bl-user-btn { background: none; border: 0; padding: 0 0 0 4px; cursor: pointer; }
.bl-user-btn .bl-avatar { width: 32px; height: 32px; margin: 0; }
.bl-conn { font-size: 12px; color: var(--muted); }
.bl-conn i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.bl-conn-ok i { background: var(--s1); }
.bl-conn-bad { color: var(--danger); font-weight: 700; }
button.bl-conn-bad { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.bl-conn-bad i { background: var(--danger); animation: bl-blink 1s steps(2) infinite; }
.bl-clock { font-size: 18px; font-weight: 650; padding: 0 6px; letter-spacing: .01em; }
@media (max-width: 1500px) { .bl-conn-ok .bl-conn-text { display: none; } }

/* Angekündigte Patienten: Hinweis in der Kopfzeile */
.bl-announce-pills { display: flex; gap: 6px; }
.bl-announce {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; cursor: pointer;
	border: 2px solid var(--uc); background: var(--danger); color: #fff; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap;
	animation: bl-alert-pulse 1.2s ease-in-out infinite;
}
.bl-announce .bl-ic { width: 16px; height: 16px; }
.bl-announce b { background: #fff; color: var(--danger); border-radius: 999px; min-width: 20px; text-align: center; padding: 0 5px; }
@media (max-width: 1100px) { .bl-announce > span:last-child { display: none; } }

/* ---------- Icon-Leiste ---------- */
.bl-rail {
	display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; overflow-y: auto;
	background: var(--surface); border-right: 1px solid var(--line); scrollbar-width: none;
}
.bl-rail-item {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
	padding: 9px 2px 7px; border-radius: 10px; text-decoration: none; color: var(--muted);
}
.bl-rail-item:hover { background: var(--panel); color: var(--ink); }
.bl-rail-item.is-active { background: var(--accent-soft); color: var(--ink); }
.bl-rail-item.is-active::before { content: ""; position: absolute; left: -6px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.bl-rail-ic .bl-ic { width: 24px; height: 24px; }
.bl-rail-label { font-size: 11px; font-weight: 650; text-align: center; line-height: 1.15; }
.bl-rail-badge {
	position: absolute; top: 4px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.bl-rail-badge.is-warn { background: var(--s3); color: var(--on-s3); }
.bl-rail-sep { height: 1px; background: var(--line); margin: 6px 8px; }
.bl-rail-fill { flex: 1 0 8px; }

/* ---------- Hinweisleiste über der Ansicht (geschlossen, Vorbereitung) ---------- */
.bl-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ink); color: var(--surface); padding: 8px 16px; font-weight: 600; flex: none; }
.bl-banner.is-prep { background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--s3); }
.bl-banner .bl-ic { width: 18px; height: 18px; }
.bl-banner.is-closed .bl-btn { margin-left: auto; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 45%, transparent); background: transparent; }
.bl-banner.is-closed .bl-btn:hover { background: color-mix(in srgb, var(--surface) 14%, transparent); }

/* ---------- Seiten ---------- */
.bl-page { padding: 20px 24px 40px; max-width: 1400px; width: 100%; margin: 0 auto; }
.bl-page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.bl-page-head h1 { margin-right: 4px; }
.bl-head-tools { display: inline-flex; align-items: center; gap: 4px; }
.bl-empty { padding: 48px 24px; text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto; }
.bl-empty.is-small { padding: 24px 12px; font-size: 13px; }
.bl-empty h2 { margin-bottom: 8px; }
.bl-empty-ic .bl-ic { width: 40px; height: 40px; color: var(--muted); }
.bl-callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; }
.bl-callout.is-warn { border-left-color: var(--s3); }
.bl-callout h2 { margin-bottom: 6px; }
.bl-waiting { text-align: center; padding: 40px 20px; margin: 10px auto 20px; max-width: 520px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.bl-waiting .bl-ic { width: 40px; height: 40px; color: var(--accent); }
.bl-waiting h2 { margin: 8px 0; }

@media (max-width: 860px) {
	.bl-top { flex-wrap: wrap; padding: 6px 10px; }
	.bl-conn span, .bl-brand-name { display: none; }
}
/* Mobil: Icon-Leiste unten */
@media (max-width: 760px) {
	.bl-shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
	.bl-rail { order: 2; flex-direction: row; overflow-x: auto; border-right: 0; border-top: 1px solid var(--line); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); }
	.bl-rail-item { min-width: 66px; padding: 6px 2px; }
	.bl-rail-item.is-active::before { left: 12px; right: 12px; top: auto; bottom: -4px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
	.bl-rail-sep { width: 1px; height: auto; margin: 6px 2px; }
	.bl-clock { display: none; }
	.bl-svc-btn { max-width: 140px; }
}

/* ===== Knöpfe ===== */
.bl-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 7px 14px; min-height: 34px; border-radius: var(--radius);
	border: 1px solid var(--line); background: var(--surface); color: var(--ink);
	font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.bl-btn:hover { border-color: var(--muted); }
.bl-btn.is-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bl-btn.is-primary:hover { filter: brightness(1.08); }
.bl-btn.is-ghost { background: transparent; }
.bl-btn.is-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.bl-btn.is-danger-text { color: var(--danger); }
.bl-btn.is-live { background: var(--s1); border-color: var(--s1); color: #fff; }
.bl-btn.is-sm { padding: 4px 10px; min-height: 28px; font-size: 13px; }
.bl-btn.is-sm .bl-ic { width: 16px; height: 16px; }
.bl-btn.is-lg { min-height: 46px; font-size: 16px; }
.bl-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Symbolknopf; is-on = eingeschalteter Umschalter (z. B. Kartenebenen) */
.bl-ibtn {
	display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius);
	background: transparent; border: 1px solid transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.bl-ibtn:hover { background: var(--panel); color: var(--ink); border-color: var(--line); }
.bl-ibtn.is-danger-ghost:hover { color: var(--danger); }
.bl-ibtn.is-on { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.bl-link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Segmentschalter */
.bl-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); flex-wrap: wrap; }
.bl-seg button {
	border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted);
	padding: 5px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.bl-seg button:last-child { border-right: 0; }
.bl-seg button.is-active { background: var(--ink); color: var(--surface); }

/* Farbiger Symbolknopf (dringend, Ort in der Karte); Farbe aus --ic der Angabe */
.bl-icbtn { flex: none; display: grid; place-items: center; width: 36px; height: 32px; padding: 0; border: 1px solid color-mix(in srgb, var(--ic, var(--accent)) 45%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--ic, var(--accent)) 8%, var(--surface)); color: var(--ic, var(--accent)); cursor: pointer; }
.bl-icbtn .bl-ic { width: 19px; height: 19px; }
.bl-icbtn:hover { background: color-mix(in srgb, var(--ic) 18%, var(--surface)); }
.bl-icbtn:focus-visible { outline: 2px solid var(--ic); outline-offset: 1px; }
.bl-icbtn.is-on { background: var(--ic); border-color: var(--ic); color: var(--surface); }
.bl-icbtn.is-picking { border-color: var(--ic); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ic) 30%, transparent); animation: bl-pick-pulse 1.2s ease-in-out infinite; }
/* Kleiner Löschknopf direkt rechts am Symbolknopf */
.bl-icbtn.is-x { --ic: var(--muted); width: 26px; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; background: var(--surface); }
.bl-icbtn.is-x .bl-ic { width: 14px; height: 14px; }
.bl-tg-group { display: inline-flex; }
.bl-tg-group .bl-icbtn:has(+ .bl-icbtn.is-x:not([hidden])) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* ===== Formulare ===== */
.blueleit .bl-input {
	width: 100%; min-height: 36px; padding: 7px 10px; border-radius: var(--radius);
	border: 1px solid var(--line); background: var(--surface); color: var(--ink);
	font: inherit; font-size: 14px; line-height: 1.35; margin: 0; box-shadow: none;
}
.blueleit .bl-input:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; box-shadow: none; }
.blueleit .bl-input[readonly], .blueleit .bl-input:disabled { background: var(--panel); color: var(--muted); }
textarea.bl-input { resize: vertical; }
.blueleit select.bl-input {
	-webkit-appearance: none; appearance: none; padding-right: 30px; max-width: none; color: var(--ink);
	background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c9aa7' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 14px;
}
.blueleit input[type=checkbox] { background: var(--surface); border-color: var(--line); }
.bl-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.bl-field.is-narrow { flex: 0 0 90px; }
.bl-field.is-grow { flex: 3; }
.bl-field.is-btn { flex: none; justify-content: flex-end; }
.bl-field.is-auto { flex: none; }
.bl-field.is-big .bl-input { font-size: 17px; min-height: 44px; font-weight: 600; }
.bl-label { font-size: 12px; font-weight: 650; color: var(--muted); }
.bl-form { display: flex; flex-direction: column; gap: 12px; }
.bl-form > .bl-btn { align-self: flex-start; }
.bl-form fieldset { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bl-form legend { font-weight: 700; font-size: 13px; padding: 0 4px; color: var(--ink); display: flex; gap: 8px; align-items: center; }
.bl-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.bl-row > * { min-width: 140px; }
.bl-row.is-end { align-items: flex-end; }
.bl-row.is-center { align-items: center; margin-bottom: 10px; }
.bl-row-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.bl-row-actions.is-left { margin-left: 0; margin-top: 6px; }
.bl-row-actions.is-center { margin: 0; justify-content: center; }
.bl-inline-form { display: flex; gap: 8px; align-items: flex-end; }
.bl-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.bl-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

/* Abschnitt mit Symbol im Dialog */
.bl-fsec { border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 14px 14px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bl-fsec > legend { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; padding: 0 6px; margin-left: -4px; color: var(--ink); }
.bl-fsec-ic { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.bl-fsec-ic .bl-ic { width: 15px; height: 15px; }

/* ---------- Vorschlagsliste (ersetzt <datalist>) und Feld mit Symbol ---------- */
.bl-combo { position: relative; width: 100%; }
.bl-combo.has-ic .bl-input { padding-left: 34px; }
.bl-combo-ic, .bl-ifield-ic { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: grid; }
.bl-combo-ic .bl-ic, .bl-ifield-ic .bl-ic { width: 17px; height: 17px; }
.bl-ifield { position: relative; }
.bl-ifield .bl-input { padding-left: 34px; }
/* Mehrzeiliger Text: Symbol oben statt mittig */
.bl-ifield.is-area .bl-ifield-ic { top: 9px; transform: none; }
.bl-combo-list {
	position: fixed; z-index: 100100; max-height: 300px; overflow-y: auto;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow-pop); padding: 4px;
}
.bl-combo-opt { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 4px; cursor: pointer; }
.bl-combo-opt.is-hi, .bl-combo-opt:hover { background: var(--accent-soft); }
.bl-combo-oic { color: var(--muted); display: grid; }
.bl-combo-txt { display: flex; flex-direction: column; min-width: 0; }
.bl-combo-txt b { font-weight: 650; }
.bl-combo-txt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Zähler mit Plus und Minus ---------- */
.bl-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-height: 32px; }
.bl-stepper-ic { display: grid; padding: 0 4px 0 8px; color: var(--muted); }
.bl-stepper-ic .bl-ic { width: 16px; height: 16px; }
.bl-step-btn { width: 32px; align-self: stretch; display: grid; place-items: center; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0; }
.bl-step-btn:hover { background: var(--panel); }
.bl-step-btn .bl-ic { width: 16px; height: 16px; }
.bl-step-val { min-width: 74px; text-align: center; font-weight: 650; font-size: 13px; padding: 0 4px; }
/* Patientenzahl kompakt: nur die Zahl */
.bl-stepper.is-compact { min-height: 32px; border-color: color-mix(in srgb, var(--ic) 45%, var(--line)); background: color-mix(in srgb, var(--ic) 8%, var(--surface)); }
.bl-stepper.is-compact .bl-step-btn { width: 28px; }
.bl-stepper.is-compact .bl-step-val { min-width: 22px; padding: 0 2px; font-size: 16px; font-weight: 800; color: var(--ic); }
.bl-stepper.is-compact.is-zero .bl-step-val { color: var(--muted); font-weight: 650; }
.bl-stepper.is-compact .bl-stepper-ic .bl-ic { width: 18px; height: 18px; }

/* ---------- Farbige Angaben beim Anlegen eines Einsatzes ----------
   Jede Art hat ihre Farbe (Symbol im Feld, Abschnittssymbol, Symbolknöpfe), damit man sich
   auf einen Blick zurechtfindet. */
.bl-c-kw { --ic: var(--ic-kw); }
.bl-c-diag { --ic: var(--ic-diag); }
.bl-c-msg { --ic: var(--ic-msg); }
.bl-c-pos, .bl-c-map { --ic: var(--ic-pos); }
.bl-c-pat { --ic: var(--ic-pat); }
.bl-c-prio { --ic: var(--ic-prio); }
:is(.bl-c-kw, .bl-c-diag, .bl-c-msg, .bl-c-pos, .bl-c-map, .bl-c-pat, .bl-c-prio) :is(.bl-combo-ic, .bl-ifield-ic, .bl-stepper-ic, .bl-posbox-ic) { color: var(--ic); }
.bl-fsec:is(.bl-c-kw, .bl-c-msg, .bl-c-pos, .bl-c-pat) > legend .bl-fsec-ic { color: var(--ic); background: color-mix(in srgb, var(--ic) 16%, transparent); }

/* Verdachtsdiagnose, ab zwei Patienten mit Patientenwahl davor */
.bl-diag { display: flex; gap: 6px; align-items: stretch; min-width: 0; }
.bl-diag > .bl-combo { flex: 1 1 auto; min-width: 0; }
.bl-diag-pat { flex: none; display: inline-flex; align-items: center; gap: 2px; padding: 0 5px 0 8px; border: 1px dashed color-mix(in srgb, var(--ic-diag) 60%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--ic-diag) 12%, var(--surface)); color: var(--ic-diag); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.bl-diag-pat.is-done { border-style: solid; }
.bl-diag-pat .bl-ic { width: 14px; height: 14px; }
.bl-diag-pat:hover, .bl-diag-pat:focus-visible { background: color-mix(in srgb, var(--ic-diag) 22%, var(--surface)); outline: none; border-color: var(--ic-diag); }

/* Ort aus der Karte */
.bl-posbox { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: var(--radius); }
.bl-posbox-ic { display: grid; color: var(--muted); }
.bl-posbox-ic.is-set { color: var(--accent); }
.bl-posbox-txt { flex: 1; }

/* ---------- Auswahl als Knöpfe ---------- */
.bl-chooser { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-choice {
	display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 12px; border-radius: var(--radius);
	border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.bl-choice .bl-ic { width: 17px; height: 17px; color: var(--muted); }
.bl-choice:hover:not(:disabled) { border-color: var(--muted); }
.bl-choice.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bl-choice.is-on .bl-ic { color: inherit; }
.bl-choice:disabled { opacity: .55; cursor: not-allowed; }
.bl-choice.is-prio { min-height: 44px; }
.bl-choice.is-prio.is-on { background: var(--danger); border-color: var(--danger); color: #fff; }
.bl-incform .bl-choice.is-prio:not(.is-on) .bl-ic { color: var(--ic-prio); }
/* Sichtung als farbige Schnellwahl */
:where(.bl-chooser.is-triage .bl-choice) { --tri: var(--muted); }
.bl-chooser.is-triage { flex-wrap: nowrap; }
.bl-chooser.is-triage .bl-choice {
	width: 52px; min-height: 44px; justify-content: center; font-size: 16px; font-weight: 800; border-width: 2px;
	border-color: var(--tri); color: var(--tri); background: color-mix(in srgb, var(--tri) 10%, var(--surface));
}
.bl-chooser.is-triage .bl-choice.is-on { background: var(--tri); color: var(--tri-ink, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tri) 35%, transparent); }
.bl-chooser.is-gender .bl-choice { width: 40px; justify-content: center; }
.bl-chooser.is-beds .bl-choice.is-busy { opacity: .5; }
.bl-chooser.is-icons { gap: 3px; flex-wrap: nowrap; }
.bl-chooser.is-icons .bl-choice { width: 34px; min-height: 34px; padding: 0; justify-content: center; }
/* Verbleib des Patienten */
.bl-chooser.is-disp .bl-choice.d-bleibt.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bl-chooser.is-disp .bl-choice.d-entlassen.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.bl-chooser.is-disp .bl-choice.d-transport_kh.is-on, .bl-chooser.is-disp .bl-choice.d-uebergabe_rd.is-on { background: var(--s7); border-color: var(--s7); color: #fff; }
.bl-chooser.is-disp .bl-choice.d-verweigert.is-on { background: var(--s5); border-color: var(--s5); color: #fff; }
/* Einsatzstatus; „abgeschlossen“ grün wie erledigt */
.bl-chooser.is-status .bl-choice.st-abgeschlossen { --stc: var(--ok); }
.bl-chooser.is-status .bl-choice.is-on { background: var(--stc); border-color: var(--stc); color: var(--stc-ink, #fff); }

/* ---------- Tag-Eingabe ---------- */
.bl-tagpick { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.bl-tagpick.is-compact { gap: 4px 10px; }
.blueleit .bl-tag-input {
	width: 130px; min-height: 26px; padding: 2px 10px; border-radius: 999px; border: 1.5px dashed var(--line);
	background: transparent; color: var(--ink); font: inherit; font-size: 12.5px;
}

/* ===== Kleine Bausteine: Status-Chip, Tag, Farbfeld, Punkt, Hinweise ===== */
/* Einsatzstatus als Etikett */
.bl-chip {
	display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 650;
	background: var(--stc-soft, var(--panel)); border: 1px solid var(--stc, var(--line)); color: var(--ink); white-space: nowrap;
}
.bl-chip.st-offen { color: var(--danger); }

/* Tag (Einsatz, Patient, Maßnahme); ohne Farbe grau. Abstände setzt der Behälter (gap). */
:where(.bl-tag) { --tc: #6b7785; }
.bl-tags-row { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.bl-tags-row.is-sm .bl-tag { font-size: 11px; padding: 0 6px; min-height: 18px; }
.bl-tag {
	display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 2px 10px; border-radius: 999px;
	border: 1.5px solid var(--tc); background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 650;
	cursor: default; white-space: nowrap; line-height: 1.2;
}
button.bl-tag { cursor: pointer; }
button.bl-tag:disabled { cursor: default; opacity: .8; }
.bl-tag.is-on { background: var(--tc); color: var(--tc-ink, #fff); }
.bl-tag.is-sug { border-style: dashed; box-shadow: 0 0 0 2px color-mix(in srgb, var(--tc) 25%, transparent); }
.bl-tag small { font-weight: 500; opacity: .85; }
.bl-tag-check .bl-ic { width: 13px; height: 13px; }

/* Farbfeld: Tag- oder Markierungsfarbe */
.bl-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.bl-swatches.is-lg .bl-swatch { width: 34px; height: 34px; }
.bl-swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; background: var(--mk, var(--tc)); cursor: pointer; padding: 0; }
.bl-swatch.is-sm { width: 22px; height: 22px; flex: none; border-width: 2px; }
.bl-swatch.mk-white { border-color: var(--line); }
.bl-swatch.mk-black { box-shadow: 0 0 0 1px var(--line); }
.bl-swatch.is-on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }

/* Alarmiert, Quittung ausstehend: gestrichelter Ring in der Farbe von Status 3 um die
   Statusziffer, bis das Einsatzmittel einen Status im Einsatzgeschehen meldet. Ein Sprechwunsch
   (0/5) blinkt weiter – seine Regeln stehen später und haben Vorrang. */
.bl-uchip.is-unacked .bl-uchip-st, .bl-plate.is-unacked .bl-plate-st, .bl-mini.is-unacked b, .bl-um.is-unacked b {
	outline: 3px dashed var(--s3); outline-offset: -5px; animation: bl-unacked 1.6s ease-in-out infinite;
}
.bl-mini.is-unacked b, .bl-um.is-unacked b { outline-width: 2px; outline-offset: 1px; }

.bl-dot { width: 12px; height: 12px; border-radius: 3px; flex: none; background: var(--st); }
.bl-prio { background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 4px; }
.bl-td-ic { display: inline-grid; vertical-align: -4px; margin-right: 6px; color: var(--muted); }
.bl-td-ic.is-on { color: var(--accent); }
.bl-editing-hint { background: var(--warn-soft); border: 1px solid var(--s3); color: var(--ink); font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 4px; }
.bl-editing-hint:empty { display: none; }
.bl-conflict { background: var(--danger-soft); border: 1px solid var(--danger); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bl-dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
.bl-dl dt { color: var(--muted); font-weight: 650; }
.bl-dl dd { margin: 0; }

/* ===== Dialoge, Menüs, Meldungen ===== */
/* ---------- Dialoge ---------- */
.bl-backdrop {
	position: fixed; inset: 0; z-index: 100010; background: rgba(8, 14, 20, .55);
	display: grid; place-items: start center; padding: 5vh 12px; overflow-y: auto;
}
.bl-modal {
	width: min(600px, 100%); background: var(--surface); color: var(--ink);
	border-radius: 10px; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; max-height: 90vh;
	border: 1px solid var(--line);
}
.bl-modal.is-wide { width: min(1020px, 100%); }
.bl-modal.is-xwide { width: min(1300px, 100%); }
/* Vollbild (Assistent „Neuen Dienst vorbereiten“) */
.bl-backdrop:has(> .bl-modal.is-full) { padding: 0; }
.bl-modal.is-full { width: 100%; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
.bl-modal.is-full .bl-modal-foot { border-radius: 0; }
.bl-modal.is-full .bl-modal-body { padding: 0; overflow: hidden; display: flex; }
/* Patientendialog: Sichtungsfarbe am oberen Rand */
.bl-modal.bl-patmodal { border-top: 6px solid var(--tri, var(--line)); }
.bl-modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.bl-modal-head h2 { font-size: 17px; margin-right: auto; }
.bl-modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.bl-modal-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--panel); border-radius: 0 0 10px 10px; flex-wrap: wrap; }
.bl-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(240px, 2fr); gap: 20px; }
.bl-modal-side { border-left: 1px solid var(--line-soft); padding-left: 18px; min-width: 0; }
.bl-modal-side h3 { display: flex; align-items: center; gap: 6px; }
.bl-modal-side h3:first-child { margin-top: 0; }
.bl-modal-side h3 > span { display: grid; }
.bl-modal-side h3 .bl-ic { width: 15px; height: 15px; }
.bl-feedback { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.bl-confirm-text { font-size: 15px; }
.bl-checkgrid { display: flex; flex-direction: column; gap: 10px; }
.bl-checkgrid fieldset { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.bl-checkgrid legend .bl-link { font-size: 12px; font-weight: 500; }
.bl-checkgrid legend .bl-ic { width: 16px; height: 16px; }
.bl-pick { display: flex; justify-content: space-between; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--ink); font-weight: 600; }
.bl-pick:hover { border-color: var(--accent); }
.bl-pick small { color: var(--muted); font-weight: 400; }
@media (max-width: 760px) { .bl-split { grid-template-columns: 1fr; } .bl-modal-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 12px; } }

/* ---------- Rückfragen des Servers (Transportmittel, Patient) ---------- */
.bl-q-units { display: grid; gap: 8px; }
.bl-q-unit {
	display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px 8px 8px; border-radius: 12px; cursor: pointer;
	border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; text-align: left;
}
.bl-q-unit:hover, .bl-q-unit:focus-visible { border-color: var(--accent); outline: none; }
.bl-q-unit b { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 8px; background: var(--st); color: var(--st-ink, #fff); font-weight: 800; }
.bl-q-unit small { margin-left: auto; color: var(--accent); font-weight: 600; }
.bl-q-unit.is-sug { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
:where(.bl-q-pat) { --tri: var(--s6); }
.bl-q-pat { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-left: 6px solid var(--tri); border-radius: 12px; }
.bl-q-pat-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.bl-q-pat-head .bl-pchip-tri { min-width: 30px; height: 30px; font-size: 14px; }
.bl-q-pat-head small { color: var(--muted); }
.bl-q-pat-uhs { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--uc, var(--accent)); font-weight: 650; }
.bl-q-pat-uhs .bl-ic { width: 16px; height: 16px; }

/* ---------- Kontextmenü ---------- */
.bl-menu {
	position: fixed; z-index: 100020; min-width: 220px; max-height: 80vh; overflow-y: auto;
	background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
	box-shadow: var(--shadow-pop); padding: 4px;
}
.bl-menu-head { padding: 6px 10px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.bl-menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.bl-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 5px; font: inherit; color: var(--ink); cursor: pointer; }
.bl-menu-item:hover, .bl-menu-item:focus { background: var(--accent-soft); outline: none; }
.bl-menu-item.is-active { font-weight: 700; }
.bl-menu-item.is-danger { color: var(--danger); }
.bl-menu-item:disabled { opacity: .45; cursor: not-allowed; }
.bl-menu-item span:not(.bl-dot) { flex: 1; }
.bl-menu-item kbd { font: 600 11px var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; background: var(--panel); }
/* Zeile mit Zustand (z. B. DIVERA-Rückmeldung), nicht anklickbar */
.bl-menu-info { display: flex; align-items: center; gap: 8px; padding: 5px 10px; font-size: 13px; max-width: 340px; }
.bl-menu-info i { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.bl-menu-info span { flex: 1 0 auto; max-width: 100%; }
.bl-menu-info small { flex: 0 1 auto; color: var(--muted); font-size: 12px; text-align: right; }

/* ---------- Meldungen ----------
   Reiner Text: Sie dürfen nichts darunter verdecken (UHS-Leiste, Ablageziele). */
.bl-toasts { pointer-events: none; position: fixed; left: 100px; bottom: 16px; z-index: 100030; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.bl-toast { background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow-pop); border-left: 5px solid var(--accent); transition: opacity .3s, transform .3s; }
.bl-toast.is-ok { border-left-color: var(--s1); }
.bl-toast.is-err { border-left-color: var(--danger); }
.bl-toast.is-warn { border-left-color: var(--s3); }
.bl-toast.is-out { opacity: 0; transform: translateY(6px); }
@media (max-width: 760px) { .bl-toasts { left: 12px; right: 12px; bottom: 90px; } }

/* ---------- Ziehen mit dem Finger: Abbild unter dem Finger ----------
   Das Abbild ist eine Kopie des gezogenen Chips und trägt dessen Klassen. Der Vorrang (zwei
   Klassen) stellt sicher, dass es unabhängig von der Reihenfolge der Chip-Regeln aus dem
   Fluss genommen wird – sonst schöbe es beim Ziehen das Layout und damit die Ablageziele. */
.blueleit .bl-tghost { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; margin: 0; opacity: .92; box-shadow: 0 12px 28px rgba(0, 0, 0, .35); transform-origin: top left; }
.blueleit .is-tdragging { opacity: .35; }

/* ===== Tabellen ===== */
.bl-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bl-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bl-table th { position: sticky; top: 0; background: var(--panel); text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.bl-table td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.bl-table tr:last-child td { border-bottom: 0; }
.bl-table tr.is-click { cursor: pointer; }
.bl-table tr.is-click:hover td { background: var(--accent-soft); }
.bl-table tr.is-inactive td { color: var(--muted); }
.bl-table .is-num { width: 48px; text-align: right; color: var(--muted); }
.bl-table .is-time { white-space: nowrap; font-weight: 650; }
.bl-table .is-actions { text-align: right; white-space: nowrap; width: 80px; }

/* ===== Karten (Leaflet): Lageplan-Ansicht, Markierungen, Linien, Zeichenwerkzeug ===== */
.blueleit .leaflet-container { font-family: var(--font); }
.bl-map-holder { flex: 1; min-height: 300px; position: relative; }
.bl-leaflet { position: absolute; inset: 0; background: var(--panel); }
.bl-leaflet.is-drop { outline: 4px dashed var(--s3); outline-offset: -4px; }
.bl-map-preview { position: relative; height: 320px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bl-map-preview.is-tall { height: 62vh; }
.bl-map-hint { position: absolute; left: 12px; bottom: 12px; z-index: 500; display: flex; align-items: center; gap: 8px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px; box-shadow: var(--shadow); font-size: 13px; max-width: calc(100% - 24px); }
.bl-map-hint.is-pick { border-color: var(--s3); box-shadow: 0 0 0 2px var(--s3), var(--shadow); font-weight: 650; }
.bl-layer-tg { display: inline-flex; gap: 2px; }

/* ---------- Lageplan-Ansicht ---------- */
.bl-mapview { flex: 1; min-height: 0; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.bl-map-side { border-right: 1px solid var(--line); background: var(--panel); padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.bl-map-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bl-map-list li { display: flex; align-items: center; gap: 4px; }
.bl-map-item { flex: 1; text-align: left; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; cursor: pointer; font: inherit; color: var(--ink); font-weight: 600; }
.bl-map-item small { color: var(--muted); font-weight: 400; }
.bl-map-item.is-active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.bl-map-main { display: flex; flex-direction: column; min-height: 0; }
.bl-map-toolbar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; font-size: 13px; }
.bl-map-markers ul { margin: 0; }
.bl-map-markers li { padding: 2px 0; }
.bl-mk-list li { padding: 3px 0; }
.bl-mk-list .bl-link { text-decoration: none; display: inline-flex; align-items: center; color: var(--ink); }
.bl-mk-mini { display: inline-grid; vertical-align: middle; margin-right: 6px; }
@media (max-width: 760px) { .bl-mapview { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .bl-map-side { max-height: 200px; } }

/* ---------- Marker ----------
   Beschriftungen auf der Karte bleiben in beiden Themes gleich: Sie liegen auf dem
   (hellen) Kartenbild, nicht auf der Oberfläche. */
.bl-mk, .bl-im-wrap, .bl-um-wrap, .bl-am-wrap, .bl-uhm-wrap { background: none; border: 0; }
.bl-mk-sym { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.bl-mk-sym.is-edit { cursor: move; }
.bl-mk-label { position: absolute; left: 38px; top: 7px; white-space: nowrap; background: rgba(255,255,255,.92); color: #111; font: 600 12px/1.3 var(--font); padding: 1px 5px; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.3); }

/* Einsatz: Stecknadel in der Farbe des Einsatzstatus */
.bl-im { display: flex; align-items: flex-end; gap: 4px; white-space: nowrap; }
.bl-im-pin {
	width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center;
	background: var(--stc, var(--s4)); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); margin-bottom: 4px;
}
.bl-im-pin .bl-ic { transform: rotate(45deg); color: #fff; width: 16px; height: 16px; }
.bl-im.is-prio .bl-im-pin { animation: bl-pulse 1.2s ease-in-out infinite; }
.bl-im-label { background: rgba(20,28,36,.92); color: #fff; font: 600 12px/1.2 var(--font); padding: 3px 7px; border-radius: 4px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.bl-im-label b { color: #ffd166; }
.bl-im.is-sel .bl-im-label { outline: 2px solid #59aedc; }
.bl-im.is-sel .bl-im-pin { box-shadow: 0 0 0 4px rgba(89,174,220,.6), 0 2px 6px rgba(0,0,0,.45); }
.leaflet-marker-icon.is-drop .bl-im-pin { box-shadow: 0 0 0 6px color-mix(in srgb, var(--s3) 70%, transparent); }

/* Einsatzmittel */
.bl-um { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.96); color: #14202b; border: 1px solid rgba(0,0,0,.25); border-radius: 5px; padding: 2px 7px 2px 2px; font: 650 12px/1 var(--font); white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: grab; }
.bl-um b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 3px; background: var(--st); color: var(--st-ink, #fff); font-size: 12px; }
.bl-um.s0, .bl-um.s5 { animation: bl-blink 1s steps(2) infinite; }
.bl-um.is-sel { outline: 3px solid #59aedc; }
/* Bereitstellungsraum */
.bl-am { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.bl-am span { background: rgba(242,196,25,.95); color: var(--on-s3); font: 700 11px/1.2 var(--font); padding: 2px 6px; border-radius: 3px; }
/* Anfahrt: gelb alarmiert, rot vor Ort/Transport, zur UHS in deren Farbe */
.bl-route { stroke: var(--s3); }
.bl-route.s4, .bl-route.s7 { stroke: var(--s4); }
.bl-route.is-uhs { stroke: var(--uc); stroke-width: 4; }

/* UHS: Ziel für Patienten und Transporte (Farbe aus der UHS) */
.bl-uhm { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
.bl-uhm-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--uc); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.bl-uhm-ic .bl-ic { width: 19px; height: 19px; }
.bl-uhm-name { background: rgba(20,28,36,.92); color: #fff; font: 650 12px/1.2 var(--font); padding: 3px 7px; border-radius: 4px; border-left: 4px solid var(--uc); box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.bl-uhm b { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font: 800 12px/1 var(--font); animation: bl-alert-pulse 1.2s ease-in-out infinite; }
.leaflet-marker-icon.is-drop .bl-uhm-ic { box-shadow: 0 0 0 6px color-mix(in srgb, var(--uc) 45%, transparent), 0 2px 6px rgba(0,0,0,.45); transform: scale(1.08); }

/* Ort wählen: Nadel und Fadenkreuz. Gegen Leaflets .leaflet-marker-icon { display: block }. */
.leaflet-marker-icon.bl-pick-pin { display: grid; place-items: center; color: #fff; background: var(--s4); border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--s4) 50%, transparent), 0 2px 8px rgba(0,0,0,.5); }
.bl-pick-pin .bl-ic { width: 16px; height: 16px; }

/* ---------- Linien ---------- */
.bl-line-arrow { background: none; border: 0; font-size: 13px; line-height: 16px; text-align: center; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.bl-line-label { background: none; border: 0; }
.bl-line-label span { display: inline-block; white-space: nowrap; background: rgba(255,255,255,.94); color: #111; font: 700 11px/1.2 var(--font); padding: 2px 6px; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
/* Muster in der Liste */
.bl-line-mini { display: inline-block; width: 26px; height: 0; border-top: 4px solid var(--mk, #e03a2f); vertical-align: middle; margin-right: 8px; }
.bl-line-mini.mk-white { --mk: #c8d0d8; } /* Weiß wäre auf heller Fläche unsichtbar */
.bl-line-mini.ls-dashed { border-top-style: dashed; }
.bl-line-mini.ls-block { border-top: 6px dashed #d1342f; background: #fff; height: 6px; } /* Absperrband */
.bl-line-editable { cursor: pointer; }
.bl-vertex { background: #fff; border: 3px solid #2f7bf5; border-radius: 50%; cursor: grab; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.bl-vertex.is-mid { opacity: .75; transform: scale(.7); background: #dbe8ff; }
.bl-vertex.is-mid:hover { opacity: 1; }

/* ---------- Zeichenwerkzeug ---------- */
.bl-dk, .bl-dk-sub {
	position: absolute; z-index: 1000; font-size: 13px; cursor: default;
	background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid var(--line);
	box-shadow: 0 10px 34px rgba(10, 20, 30, .28); backdrop-filter: blur(10px);
}
/* Werkzeugleiste rechts am Kartenrand */
.bl-dk {
	right: 10px; top: 10px; max-height: calc(100% - 84px); overflow-y: auto; overscroll-behavior: contain;
	display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; border-radius: 16px; width: 82px;
	scrollbar-width: thin;
}
.bl-dk-sep { height: 1px; width: 100%; background: var(--line); flex: none; }
.bl-dk-tools { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.bl-dk-tool {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 100%; height: 48px; padding: 2px;
	border: 0; border-radius: 11px; background: none; color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer;
	transition: background .12s ease, color .12s ease;
}
.bl-dk-tool .bl-ic { width: 22px; height: 22px; }
.bl-dk-tool:hover { color: var(--ink); background: var(--panel); }
.bl-dk-tool.is-on { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 8px var(--brand-glow); }
.bl-dk-colors { display: grid; grid-template-columns: repeat(3, 20px); gap: 5px; justify-content: center; padding: 2px 0; }
.bl-dk-color { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--surface); background: var(--mk); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; transition: transform .1s; }
.bl-dk-color.mk-black { box-shadow: 0 0 0 1px #8a96a1; } /* Ring, damit Schwarz auf dunkler Leiste sichtbar bleibt */
.bl-dk-color:hover { transform: scale(1.12); }
.bl-dk-color.is-on { box-shadow: 0 0 0 2.5px var(--accent); transform: scale(1.15); }
.bl-dk-styles { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.bl-dk-style { display: grid; place-items: center; height: 30px; border: 1px solid transparent; border-radius: 9px; background: none; cursor: pointer; padding: 0; }
.bl-dk-style:hover { background: var(--panel); }
.bl-dk-style.is-on { border-color: var(--accent); background: var(--accent-soft); }
.bl-dk-pair { display: flex; gap: 4px; }
.bl-dk-icon {
	display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border-radius: 9px;
	border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
}
.bl-dk-icon:disabled { opacity: .35; cursor: default; }
.bl-dk-icon .bl-ic { width: 17px; height: 17px; }
.bl-dk-icon.is-tg { color: var(--muted); }
.bl-dk-icon.is-tg.is-on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
/* Leiste unten: Hinweis, Name der Linie, Fertig */
.bl-dk-sub {
	left: 50%; bottom: 22px; transform: translateX(-50%); width: min(720px, calc(100% - 110px));
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 8px 8px 12px; border-radius: 14px;
}
.bl-dk-state { font: inherit; font-size: 11.5px; color: var(--muted); white-space: nowrap; background: none; border: 0; padding: 0; }
.bl-dk-state.is-saving { color: var(--s3); }
.bl-dk-state.is-err { color: var(--danger); font-weight: 700; cursor: pointer; text-decoration: underline; }
.bl-dk-state.is-ok::before { content: "✓ "; color: var(--ok); }
.bl-dk-done { height: 34px; }
.bl-dk-name { flex: 1; min-width: 160px; height: 36px; font-size: 14px; }
.bl-dk-hint { color: var(--muted); font-size: 12.5px; flex: 1; min-width: 160px; }
.bl-dk-selbadge { display: grid; place-items: center; width: 40px; height: 36px; border-radius: 9px; background: var(--panel); flex: none; }
.bl-dk-eraser { position: absolute; z-index: 999; pointer-events: none; border-radius: 50%; border: 2px solid var(--s3); background: color-mix(in srgb, var(--s3) 14%, transparent); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.bl-mc-map:has(.bl-dk-on) .bl-map-hint:not(.is-pick) { display: none; }
@media (hover: none), (pointer: coarse) {
	.bl-dk { width: 84px; }
	.bl-dk-tool { height: 54px; }
	.bl-dk-colors { grid-template-columns: repeat(3, 24px); }
	.bl-dk-color { width: 24px; height: 24px; }
	.bl-dk-icon { width: 34px; height: 34px; }
}
@media (max-width: 760px) {
	.bl-dk-sub { left: 8px; right: 96px; width: auto; transform: none; }
}

/* ---------- Mauszeiger je Modus ----------
   app.css lädt nach leaflet.css: Bei gleichem Gewicht gewinnen diese Regeln über Leaflets
   Zeiger (.leaflet-grab, .leaflet-interactive, .leaflet-dragging …). Die Modi stehen nach
   .bl-dk-hit, damit Stift, Radierer und Linie auch über bestehenden Linien gelten. */
.leaflet-container.bl-dk-on .bl-dk-hit { cursor: pointer; }
.leaflet-container.bl-dk-pen, .leaflet-container.bl-dk-erase { touch-action: none; }
.leaflet-container.bl-dk-pen, .leaflet-container.bl-dk-pen .leaflet-interactive { cursor: crosshair; }
.leaflet-container.bl-dk-erase, .leaflet-container.bl-dk-erase .leaflet-interactive { cursor: none; }
.leaflet-container.bl-dk-line, .leaflet-container.bl-dk-line .leaflet-interactive { cursor: copy; }
.bl-leaflet.is-picking, .bl-leaflet.is-picking .leaflet-interactive { cursor: crosshair; }

/* ===== Dienstübersicht ===== */
.bl-svc-list { display: flex; flex-direction: column; gap: 10px; }
/* Randfarbe nach Status des Dienstes: aktiv grün, Vorbereitung gelb, geschlossen grau */
.bl-svc {
	display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) auto; gap: 16px; align-items: center;
	background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--s1);
	border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.bl-svc.is-vorbereitung { border-left-color: var(--s3); }
.bl-svc.is-geschlossen { border-left-color: var(--s6); }
.bl-svc h2 { font-size: 17px; }
.bl-svc h2 a { color: var(--ink); text-decoration: none; }
.bl-svc h2 a:hover { text-decoration: underline; }
.bl-svc-titleline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bl-svc-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.bl-svc-nums { display: flex; gap: 24px; margin: 0; flex-wrap: wrap; }
.bl-svc-nums div { display: flex; flex-direction: column-reverse; }
.bl-svc-nums dt { font-size: 12px; color: var(--muted); }
.bl-svc-nums dd { margin: 0; font-size: 20px; font-weight: 700; }
.bl-svc-actions { display: flex; gap: 6px; align-items: center; }
@media (max-width: 900px) { .bl-svc { grid-template-columns: 1fr; } }

/* ===== Chips: Einsatzmittel und Patienten (Mission Control, Tafel, UHS, Dialoge) ===== */
/* ---------- Einsatzmittel-Chip ---------- */
.bl-uchip {
	position: relative; display: flex; align-items: center; gap: 10px; min-width: 0;
	min-height: 48px; padding: 6px 10px 6px 6px;
	background: linear-gradient(100deg, color-mix(in srgb, var(--st) 13%, var(--surface)) 0, var(--surface) 46%);
	border: 1px solid color-mix(in srgb, var(--st) 35%, var(--line)); border-radius: var(--chip-r);
	box-shadow: var(--shadow); cursor: pointer; user-select: none; -webkit-user-select: none;
	transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
	-webkit-tap-highlight-color: transparent;
}
.bl-uchip[draggable="true"] { cursor: grab; }
.bl-uchip:hover, .bl-uchip:focus-visible { transform: translateY(-1px); box-shadow: var(--chip-hover); border-color: color-mix(in srgb, var(--st) 65%, var(--line)); outline: none; }
.bl-uchip:active { transform: translateY(0) scale(.99); }
.bl-uchip.is-sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.bl-uchip-st {
	flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
	background: var(--st); color: var(--st-ink, #fff); font-size: 19px; font-weight: 800; letter-spacing: -.02em;
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18), 0 2px 6px color-mix(in srgb, var(--st) 45%, transparent);
}
/* Sprechwunsch (5) und Notruf (0) blinken */
.bl-uchip.s0 .bl-uchip-st, .bl-uchip.s5 .bl-uchip-st { animation: bl-blink 1s steps(2) infinite; }
.bl-uchip-sym { flex: none; display: grid; place-items: center; width: 46px; height: 38px; overflow: hidden; border-radius: 9px; background: var(--sym-bg); border: 1px solid rgba(0, 0, 0, .06); }
.bl-uchip-sym svg { display: block; }
.bl-uchip.is-empty .bl-uchip-sym { opacity: .7; }
.bl-uchip-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.bl-uchip-txt > b { font-size: 15px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.bl-uchip-txt small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-uchip-txt small.is-warn { color: var(--danger); font-weight: 650; }
.bl-uchip-badge { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--st) 18%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--st) 40%, transparent); flex: none; }
.bl-pos-ind { flex: none; display: grid; color: var(--line); }
.bl-pos-ind.is-set { color: var(--accent); }
.bl-pos-ind .bl-ic { width: 18px; height: 18px; }
.bl-uchip.is-lg { min-height: 58px; padding: 8px 10px 8px 8px; }
.bl-uchip.is-lg .bl-uchip-st { width: 40px; height: 40px; font-size: 22px; border-radius: 11px; }
.bl-uchip.is-lg .bl-uchip-sym { width: 50px; height: 42px; }
.bl-uchip.is-sm { min-height: 38px; padding: 3px 8px 3px 3px; gap: 6px; border-radius: 10px; display: inline-flex; }
.bl-uchip.is-sm .bl-uchip-st { width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }
.bl-uchip.is-sm .bl-uchip-sym { width: 32px; height: 28px; border-radius: 7px; }
.bl-uchip.is-sm .bl-uchip-txt > b { font-size: 13.5px; }

/* ---------- Patienten-Chip ---------- */
:where(.bl-pchip) { --tri: var(--s6); }
.bl-pchip {
	position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 100%;
	padding: 4px 8px 4px 4px; border-radius: var(--chip-r); cursor: pointer; user-select: none; -webkit-user-select: none;
	background: linear-gradient(100deg, color-mix(in srgb, var(--tri) 14%, var(--surface)), var(--surface) 55%);
	border: 1px solid color-mix(in srgb, var(--tri) 40%, var(--line)); box-shadow: var(--shadow);
	transition: transform .12s ease, box-shadow .15s ease;
	-webkit-tap-highlight-color: transparent;
}
.bl-pchip:hover, .bl-pchip:focus-visible { transform: translateY(-1px); box-shadow: var(--chip-hover); outline: none; }
.bl-pchip-tri {
	flex: none; display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 4px; border-radius: 10px;
	background: var(--tri); color: var(--tri-ink, #fff); font-weight: 800; font-size: 15px; font-family: Georgia, "Times New Roman", serif;
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18);
}
.bl-pchip.tri-none .bl-pchip-tri { font-family: inherit; }
.bl-pchip-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.bl-pchip-txt b { font-size: 14px; font-weight: 750; }
.bl-pchip-txt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.bl-pchip-txt small.bl-pchip-disp { color: var(--ok); font-weight: 650; }
.bl-pchip-uhs { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--uc, var(--accent)); color: #fff; }
.bl-pchip-uhs .bl-ic { width: 16px; height: 16px; }
.bl-pchip-uhs.is-incoming { animation: bl-alert-pulse 1.2s ease-in-out infinite; }
.bl-pchip.is-incoming { border-color: var(--danger); }
.bl-pchip.is-done { background: var(--panel); border-style: dashed; box-shadow: none; }
.bl-pchip.is-done .bl-pchip-tri { position: relative; filter: saturate(.55); }
.bl-pchip-done { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--ok); color: #fff; border: 2px solid var(--surface); }
.bl-pchip-done .bl-ic { width: 10px; height: 10px; stroke-width: 3.2; }
.bl-pchip.is-sm { min-height: 34px; }
.bl-pchip.is-sm .bl-pchip-tri { height: 26px; min-width: 26px; font-size: 13px; border-radius: 8px; }

/* ---------- Aktionsleiste am Chip: beim Überfahren sichtbar, am Tablet immer ---------- */
.bl-chip-acts {
	position: absolute; right: 6px; top: 50%; z-index: 3;
	display: flex; gap: 3px; padding: 3px; border-radius: 12px;
	background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 4px 14px rgba(20, 32, 43, .18);
	backdrop-filter: blur(6px);
	opacity: 0; transform: translate(6px, -50%); pointer-events: none;
	transition: opacity .15s ease, transform .15s ease;
}
/* Per Tastatur (:focus-visible) – ein Mausklick wählt nur aus; die Leiste würde sonst Punkt und
   Standortzeichen des gewählten Chips verdecken, solange er den Fokus hat. */
.bl-uchip:hover .bl-chip-acts, .bl-uchip:has(:focus-visible) .bl-chip-acts, .bl-uchip:focus-visible .bl-chip-acts,
.bl-pchip:hover .bl-chip-acts, .bl-pchip:has(:focus-visible) .bl-chip-acts, .bl-pchip:focus-visible .bl-chip-acts { opacity: 1; transform: translate(0, -50%); pointer-events: auto; }
.bl-chip-act {
	display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; padding: 0;
	border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
	transition: background .12s ease, color .12s ease;
}
.bl-chip-act:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bl-chip-act .bl-ic { width: 17px; height: 17px; }
.bl-pchip .bl-chip-act { width: 28px; height: 28px; }

@media (hover: none), (pointer: coarse) {
	.bl-chip-acts { position: static; opacity: 1; transform: none; pointer-events: auto; background: none; box-shadow: none; padding: 0; backdrop-filter: none; flex: none; }
	.bl-uchip.is-sm .bl-chip-acts, .bl-pchip .bl-chip-acts { display: none; }
	.bl-uchip:hover, .bl-pchip:hover { transform: none; }
	.bl-chip-act { width: 38px; height: 38px; }
}

/* ===== Mission Control ===== */
/* ---------- Bereiche (Spalten) ---------- */
.bl-panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); }
.bl-panel-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface); min-height: 48px; flex-wrap: nowrap; }
.bl-panel-head h2 { font-size: 15px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-panel-ic { color: var(--accent); display: grid; }
.bl-panel-count { color: var(--muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.bl-panel-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bl-panel-tools .bl-seg button { display: inline-flex; align-items: center; gap: 5px; }
.bl-panel-tools .bl-seg button .bl-ic { width: 15px; height: 15px; }
.bl-panel-body { flex: 1; min-height: 0; position: relative; }
/* Platzhalter, wenn ein Bereich in einem eigenen Fenster läuft */
.bl-popped { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: var(--muted); background: repeating-linear-gradient(-45deg, var(--panel), var(--panel) 10px, var(--bg) 10px, var(--bg) 20px); }
.bl-popped-ic .bl-ic { width: 34px; height: 34px; color: var(--accent); }
.bl-popped strong { color: var(--ink); }
.bl-pop-full { flex: 1; display: flex; }

/* ---------- Raster ----------
   Breit drei Spalten (Einsätze, Karte, Einsatzmittel), bis 1200 px zwei mit den
   Einsatzmitteln darunter, bis 760 px alles untereinander. Ein ausgelagerter Bereich
   (no-map, no-list, no-units) wird zur schmalen Spalte mit Platzhalter. */
.bl-mc { flex: 1; min-height: 0; display: grid; }
/* Trennlinie zwischen den Spalten; :where() ohne Gewicht, damit die schmalen Raster sie ersetzen. */
.bl-mc > :where(.bl-panel + .bl-panel) { border-left: 1px solid var(--line); }
.bl-mc .bl-popped { padding: 14px 8px; }
.bl-mc .bl-popped .bl-btn { white-space: normal; } /* schmale Spalte: Knopftext umbrechen */
@media (min-width: 1201px) {
	.bl-mc { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(300px, 360px); }
	.bl-mc.no-map { grid-template-columns: minmax(340px, 1fr) 160px minmax(300px, 1fr); }
	.bl-mc.no-list { grid-template-columns: 160px minmax(0, 1fr) minmax(300px, 360px); }
	.bl-mc.no-units { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) 160px; }
	/* Tafel: die Einsatzmittel brauchen Fläche */
	.bl-mc.is-tafel { grid-template-columns: minmax(280px, 330px) minmax(0, 1fr) minmax(460px, 44%); }
	.bl-mc.is-tafel.no-map { grid-template-columns: minmax(300px, 360px) 120px minmax(0, 1fr); }
	.bl-mc.is-tafel.no-list { grid-template-columns: 140px minmax(0, 1fr) minmax(460px, 50%); }
}
@media (max-width: 1200px) {
	.bl-mc { grid-template-columns: minmax(280px, 330px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
	.bl-mc.no-map { grid-template-columns: minmax(0, 1fr) 160px; }
	.bl-mc.no-list { grid-template-columns: 160px minmax(0, 1fr); }
	.bl-mc > .bl-mc-right { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); max-height: 34vh; }
	.bl-mc.is-tafel > .bl-mc-right { max-height: 55vh; min-height: 360px; }
}
@media (max-width: 760px) {
	.bl-mc { display: flex; flex-direction: column; overflow-y: auto; }
	.bl-mc > .bl-panel { flex: none; border-left: 0; border-top: 1px solid var(--line); }
	.bl-mc > .bl-mc-right { max-height: none; }
	.bl-mc-center { height: 62vh; }
	.bl-pop-btn { display: none; } /* „In eigenem Fenster öffnen“ (Kopfzeile und Bereiche) */
}

/* ---------- Linke Spalte: Neuer Einsatz und Einsätze scrollen gemeinsam, UHS bleibt unten ---------- */
.bl-mc-list { display: flex; flex-direction: column; overflow: hidden; }
.bl-mc-list > * { flex-shrink: 0; }
.bl-mc-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.bl-mc-scroll > .bl-mc-sec { position: sticky; top: 0; z-index: 2; }
.bl-mc-incs { flex: none; min-height: 80px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); }
/* Einsätze in der Mitte: links bleiben „Neuer Einsatz“ und die UHS – die UHS bekommen den Platz. */
.bl-mc-list.no-incs .bl-mc-scroll { flex: 0 1 auto; }
.bl-mc-list.no-incs .bl-mc-dock { flex: 1; max-height: none; }
@media (max-width: 760px) {
	.bl-mc-list, .bl-mc-scroll { overflow: visible; }
	.bl-mc-dock { max-height: none; }
}

/* Neuer Einsatz: eigene Karte mit Akzentrahmen */
.bl-mc-new { margin: 10px; border: 2px solid var(--accent); border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); overflow: hidden; flex: none; }
.bl-mc-new-head { display: flex; align-items: center; gap: 7px; padding: 7px 12px; background: var(--accent); color: var(--accent-ink); font-size: 13px; }
.bl-mc-new-head .bl-ic { width: 16px; height: 16px; }
.bl-mc-new-head kbd { font: 600 11px var(--font); opacity: .85; background: rgba(255,255,255,.18); border-radius: 4px; padding: 1px 6px; }

/* Schnellerfassung */
.bl-mcq { padding: 10px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); background: var(--surface); }
.bl-mc-new .bl-mcq { border-bottom: 0; padding: 10px 12px 12px; }
.bl-mcq .bl-combo .bl-input { font-size: 15px; }
.bl-mcq textarea.bl-input { min-height: 0; resize: vertical; }
/* Meldung zwei Zeilen hoch, so bleibt das Formular trotz Diagnosefeld so groß wie zuvor. */
.bl-mcq .bl-ifield.is-area textarea.bl-input { display: block; height: 48px; min-height: 48px; padding-top: 5px; padding-bottom: 5px; line-height: 1.3; }
.bl-mcq-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bl-mcq-row.is-icons { flex-wrap: nowrap; }
.bl-mcq-hint { flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 650; color: var(--ic-pos); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-mcq-foot { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bl-mcq-foot .bl-btn.is-primary { flex: 1 1 auto; min-width: 0; }

/* Einsatzmittel zum Alarmieren (Schnellerfassung, Einsatzdialog) */
.bl-utiles { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-utiles-head { width: 100%; color: var(--muted); font-weight: 650; }
.bl-utile {
	position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px 6px 7px; min-height: 40px;
	border: 1px solid var(--line); border-left: 4px solid var(--st); border-radius: var(--radius); background: var(--surface); color: var(--ink);
	font: inherit; font-size: 13px; cursor: pointer; text-align: left;
}
.bl-utile:hover { border-color: var(--muted); }
.bl-utile.is-on { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.bl-utile-ic { display: grid; color: var(--muted); }
.bl-utile-txt { display: flex; flex-direction: column; }
.bl-utile-txt small { color: var(--muted); font-size: 11px; }
.bl-utile-check { display: grid; color: var(--accent); }
.bl-utiles.is-compact .bl-utile { min-height: 30px; padding: 3px 8px 3px 5px; font-size: 12px; }
.bl-utiles.is-compact .bl-utile-ic .bl-ic, .bl-utiles.is-compact .bl-utile-check .bl-ic { width: 15px; height: 15px; }

/* Abschnittsleiste (Aktive Einsätze, UHS) */
.bl-mc-sec {
	display: flex; align-items: center; gap: 7px; padding: 8px 14px; margin-top: 4px; flex: none;
	border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface);
	font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.bl-mc-sec strong { color: var(--ink); }
.bl-mc-sec > span:first-child .bl-ic { width: 15px; height: 15px; color: var(--danger); }
.bl-mc-sec-count { margin-left: auto; min-width: 22px; text-align: center; border-radius: 999px; background: var(--danger); color: #fff; font-weight: 800; padding: 1px 7px; letter-spacing: 0; }
.bl-mc-sec .bl-ibtn { width: 28px; height: 28px; color: var(--muted); flex: none; }
.bl-mc-sec .bl-ibtn .bl-ic { width: 17px; height: 17px; }
.bl-mc-sec .bl-ibtn:hover { color: var(--accent); }
.bl-mc-sec-count + .bl-ibtn { margin-left: 2px; }
.bl-mc-sec.is-dock { padding: 0 2px; border: 0; background: none; }

/* ---------- Einsatzkarte ---------- */
.bl-mci {
	background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--stc, var(--line)); border-radius: 12px;
	padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow);
	transition: box-shadow .15s ease, transform .12s ease;
}
.bl-mci:hover { box-shadow: var(--chip-hover); }
.bl-mci.is-sel { outline: 2px solid var(--accent); background: var(--accent-soft); }
.bl-mci.is-prio { border-color: var(--danger); }
.bl-mci.is-ready { border-left-color: var(--ok); }
.bl-mci.is-drop { outline: 3px dashed var(--s3); outline-offset: 2px; background: color-mix(in srgb, var(--s3) 10%, var(--surface)); }
.bl-mci-head { display: flex; align-items: center; gap: 6px; }
.bl-mci-head > b { font-size: 14px; }
.bl-mci-kw { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-mci-head .bl-prio { display: grid; color: var(--danger); background: none; padding: 0; }
.bl-mci-head .bl-prio .bl-ic { width: 16px; height: 16px; }
.bl-mci-sub { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.bl-mci-sub > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-mci-sub time { font-weight: 650; color: var(--ink); }
.bl-mci-pos, .bl-mci-eye { background: none; border: 1px dashed var(--line); border-radius: 4px; color: var(--muted); width: 26px; height: 24px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.bl-mci-pos { margin-left: auto; }
.bl-mci-pos.is-set { border-style: solid; border-color: transparent; color: var(--accent); }
.bl-mci-eye.is-on { border-style: solid; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--accent); }
.bl-mci-pos .bl-ic, .bl-mci-eye .bl-ic { width: 15px; height: 15px; }
.bl-mci-pos + .bl-mci-eye { margin-left: -2px; }
.bl-mci-units, .bl-mci-pats { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-mci-units { margin-top: 2px; }

/* Einsatz „UHS“, alle Patienten versorgt: Abschluss anbieten (auch in der Einsatzliste) */
.bl-inc-ready { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding: 7px 8px 7px 10px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 13%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ink); font-weight: 650; font-size: 13px; cursor: default; }
.bl-inc-ready > span:first-child { display: grid; color: var(--ok); }
.bl-inc-ready > span:first-child .bl-ic { width: 17px; height: 17px; }
.bl-inc-ready .bl-btn { margin-left: auto; }

/* ---------- Mitte: Karte, oder Einsätze bzw. UHS, wenn die Karte ausgelagert ist ---------- */
.bl-mc-map { display: flex; }
.bl-mc-map .bl-map-holder { flex: 1; min-height: 200px; }
.bl-mc-incgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-content: start; gap: 10px; padding: 12px; overflow-y: auto; background: var(--panel); }
.bl-mc-incgrid > .bl-empty { grid-column: 1 / -1; }

/* ---------- Rechte Spalte: Einsatzmittel (Lage, Tafel, Besatzung) ---------- */
.bl-mc-units { overflow-y: auto; padding: 6px 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.bl-mc-units > * { flex-shrink: 0; }
.bl-mc-units > .bl-btn { align-self: flex-start; margin-top: 8px; }
.bl-mc-units .bl-uchip { width: 100%; }
.bl-mcu-tabs { display: flex; width: 100%; margin: 2px 0 4px; position: sticky; top: -6px; z-index: 3; box-shadow: 0 -8px 0 var(--panel), 0 4px 6px -4px rgba(0,0,0,.25); }
.bl-mcu-tabs button { flex: 1; padding: 5px 9px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.bl-mcu-tabs .bl-ic { width: 15px; height: 15px; }
.bl-mcu-sym { flex: none; display: grid; background: var(--sym-bg); border-radius: 4px; padding: 1px; }
/* Lage: Zuweisung je Einsatz, darunter verfügbar */
.bl-mcu-h { display: flex; align-items: baseline; gap: 6px; margin: 12px 2px 6px; }
.bl-mcu-h:first-child { margin-top: 4px; }
.bl-mcu-h small { font-weight: 600; }
.bl-mcu-h.is-free { color: var(--ok); padding-top: 8px; border-top: 1px dashed var(--line); }
.bl-mcu-none { margin: 0 4px 6px; font-size: 12px; }
.bl-mcu-list { display: flex; flex-direction: column; gap: 8px; }
.bl-mcu-inc { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-left: 4px solid var(--stc, var(--line)); border-radius: var(--radius); background: var(--bg); padding: 4px 4px 0; margin-bottom: 8px; }
.bl-mcu-inc.is-sel { outline: 2px solid var(--accent); }
.bl-mcu-inc.is-drop { outline: 3px dashed var(--s3); }
.bl-mcu-inc-head { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; color: var(--ink); font: inherit; font-size: 13px; padding: 2px 4px 5px; cursor: pointer; text-align: left; }
.bl-mcu-inc-head > span:not(.bl-chip):not(.bl-prio) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
.bl-mcu-inc-head .bl-prio { display: grid; color: var(--danger); background: none; padding: 0; flex: none; }
.bl-mcu-inc-head .bl-prio .bl-ic { width: 15px; height: 15px; }
.bl-mcu-inc-head .bl-chip { flex: none; }
.bl-mcu-st { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 4px; background: var(--st); color: var(--st-ink, #fff); font-weight: 800; flex: none; }
@media (max-width: 1200px) {
	.bl-mc-units { flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
	.bl-mc-units .bl-uchip { width: 260px; }
	.bl-mcu-list { display: contents; }
}
@media (max-width: 760px) {
	.bl-mc-units { overflow: visible; }
	.bl-mc-units .bl-uchip { width: 100%; }
}

/* Besatzungsübersicht */
.bl-crew-sum { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; font-size: 12px; color: var(--muted); padding: 4px 2px 8px; }
.bl-crew-sum b { color: var(--ink); font-size: 15px; }
.bl-crew-sum .is-warn b, .bl-crew-sum .is-warn { color: var(--danger); }
.bl-crew-sum .bl-ibtn { width: 28px; height: 28px; flex: none; }
.bl-crew-search { margin-bottom: 8px; }
.bl-crew-search .bl-input { min-height: 32px; }
.bl-crewcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; box-shadow: var(--shadow); }
.bl-crewcard.is-empty { border-style: dashed; border-color: var(--danger); }
.bl-crewcard-head { display: flex; align-items: center; gap: 7px; padding: 4px; border-bottom: 1px solid var(--line-soft); }
.bl-crewcard-head strong { font-size: 13px; }
.bl-crewcard-head .bl-mcu-st { width: 22px; height: 22px; font-size: 12px; }
.bl-crewcard-head .bl-ibtn { width: 28px; height: 28px; }
.bl-crewcard-list { padding: 4px 8px 6px; display: flex; flex-direction: column; gap: 3px; }
.bl-crewcard-list li { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.bl-crewcard-list li.is-hit { background: var(--warn-soft); border-radius: 4px; }
.bl-crew-n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bl-crew-role-chip { flex: none; min-width: 42px; text-align: center; font-size: 11px; font-weight: 800; padding: 1px 5px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.bl-crewcard-empty { margin: 0; padding: 6px 8px; color: var(--danger); font-weight: 650; font-size: 12px; display: flex; gap: 8px; align-items: center; }

/* ---------- UHS unten in der linken Spalte ---------- */
.bl-mc-dock {
	flex: none; display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 10px;
	border-top: 3px solid var(--line); background: color-mix(in srgb, var(--panel) 70%, var(--bg));
	box-shadow: 0 -6px 14px rgba(20, 32, 43, .06); max-height: 38%; overflow-y: auto;
}
.bl-mc-dock-tip { margin-left: auto; display: grid; color: var(--muted); }
.bl-mc-dock-tip .bl-ic { width: 18px; height: 18px; }
/* Nebeneinander nur, wenn Name und Status ganz lesbar bleiben – sonst untereinander. */
.bl-mc-dock-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
/* UHS-Kachel: Symbol mit Abzeichen (angekündigt oben links, Kartenstandort unten rechts,
   Übergabe-Hinweis unten links beim Ziehen), daneben Name, Bettenbalken und eine Statuszeile. */
.bl-uhs-tile {
	position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 54px; padding: 8px 12px 8px 11px;
	border-radius: 14px; cursor: pointer; user-select: none; -webkit-user-select: none;
	background: linear-gradient(100deg, color-mix(in srgb, var(--uc) 16%, var(--surface)), var(--surface) 60%);
	border: 1.5px solid color-mix(in srgb, var(--uc) 45%, var(--line)); box-shadow: var(--shadow);
	transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.bl-uhs-tile:hover, .bl-uhs-tile:focus-visible { transform: translateY(-1px); box-shadow: var(--chip-hover); outline: none; }
.bl-uhs-tile.has-incoming { border-color: var(--danger); }
.blueleit.is-dragging-patient .bl-uhs-tile { border-style: dashed; border-color: var(--uc); }
.bl-uhs-tile.is-drop { border-style: solid; border-color: var(--uc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--uc) 30%, transparent), var(--shadow); transform: scale(1.02); }
.bl-uhs-tile-ic { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--uc); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--uc) 45%, transparent); }
.bl-uhs-tile-ic > .bl-ic { width: 22px; height: 22px; }
.bl-uhs-tile-alert {
	position: absolute; top: -8px; left: -8px; display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px;
	border-radius: 999px; border: 2px solid var(--surface); background: var(--danger); color: #fff; font-weight: 800; font-size: 12px; line-height: 1;
	animation: bl-alert-pulse 1.2s ease-in-out infinite;
}
.bl-uhs-tile-ic > .bl-pos-ind { position: absolute; right: -6px; bottom: -6px; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--line); }
.bl-uhs-tile-ic > .bl-pos-ind.is-set { border-color: var(--accent); }
.bl-uhs-tile-ic > .bl-pos-ind .bl-ic { width: 11px; height: 11px; }
.bl-uhs-tile-in { position: absolute; left: -7px; bottom: -7px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); color: var(--uc); border: 1.5px solid var(--uc); opacity: 0; transition: opacity .15s ease; }
.bl-uhs-tile-in .bl-ic { width: 12px; height: 12px; }
.blueleit.is-dragging-patient .bl-uhs-tile-in, .bl-uhs-tile:hover .bl-uhs-tile-in { opacity: 1; }
.bl-uhs-tile-txt { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.bl-uhs-tile-txt b { font-size: 14px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-uhs-tile-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bl-uhs-tile-txt small { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-uhs-tile-txt small.is-incoming { color: var(--danger); font-weight: 750; }
/* Bettenbalken: belegt in Sichtungsfarbe, sonst in UHS-Farbe */
.bl-bedbar { flex: none; display: flex; gap: 3px; flex-wrap: wrap; max-width: 60%; }
.bl-bedbar i { width: 14px; height: 8px; border-radius: 3px; background: color-mix(in srgb, var(--uc) 22%, var(--line-soft)); border: 1px solid color-mix(in srgb, var(--uc) 40%, transparent); }
.bl-bedbar i.is-busy { background: var(--tri, var(--uc)); border-color: var(--tri, var(--uc)); }

/* UHS in der Mitte (Karte ausgelagert): je UHS eine Tafel */
.bl-uhs-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-content: start; gap: 12px; padding: 12px; overflow-y: auto; }
.bl-uhs-board {
	display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border-radius: 16px;
	background: linear-gradient(170deg, color-mix(in srgb, var(--uc) 12%, var(--surface)), var(--surface) 45%);
	border: 1.5px solid color-mix(in srgb, var(--uc) 45%, var(--line)); border-top: 5px solid var(--uc); box-shadow: var(--shadow);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.bl-uhs-board.has-incoming { border-color: var(--danger); border-top-color: var(--uc); }
.bl-uhs-board.is-drop { border-color: var(--uc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--uc) 30%, transparent), var(--shadow); }
.blueleit.is-dragging-patient .bl-uhs-board { border-style: dashed; }
.bl-uhs-board-head { display: flex; align-items: center; gap: 14px; min-width: 0; padding-left: 4px; }
.bl-uhs-board-head .bl-uhs-tile-txt b { font-size: 16px; }
.bl-uhs-board-head .bl-ibtn { width: 32px; height: 32px; }
.bl-uhs-board-sec { display: flex; flex-direction: column; gap: 6px; }
.bl-uhs-board-sec > small { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.bl-uhs-board-sec.is-incoming { padding: 8px; border-radius: 12px; background: color-mix(in srgb, var(--danger) 9%, transparent); border: 1px dashed color-mix(in srgb, var(--danger) 55%, transparent); }
.bl-uhs-board-sec.is-incoming > small { color: var(--danger); }
.bl-uhs-board-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-uhs-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.bl-uhs-slot {
	display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 64px; padding: 6px; border-radius: 12px;
	border: 1.5px dashed color-mix(in srgb, var(--uc) 45%, var(--line)); background: color-mix(in srgb, var(--uc) 5%, var(--surface));
}
.bl-uhs-slot > small { color: var(--muted); font-size: 11px; font-weight: 700; }
.bl-uhs-slot.is-busy { border-style: solid; background: var(--surface); }
.bl-uhs-slot.is-drop { border-style: solid; border-color: var(--uc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--uc) 30%, transparent); }
.bl-uhs-slot-free { flex: 1; display: grid; place-items: center; color: color-mix(in srgb, var(--uc) 70%, var(--muted)); font-size: 12px; font-weight: 650; }
.bl-uhs-slot .bl-pchip { width: 100%; }

/* ===== Tafel: Einsatzmittel frei anordnen und gruppieren ===== */
.bl-mc-units.is-tafel { display: flex; flex-direction: column; flex-wrap: nowrap; padding: 0; gap: 0; overflow: hidden; }
.bl-mc-units.is-tafel > .bl-tafel { width: 100%; }
.bl-tafel-tools { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); flex: none; }
.bl-tafel {
	flex: 1; min-height: 260px; overflow: auto; position: relative;
	background-color: var(--panel);
	background-image: radial-gradient(circle, color-mix(in srgb, var(--muted) 35%, transparent) 1px, transparent 1.4px);
	background-size: 16px 16px;
}
.bl-tafel-canvas { position: relative; min-width: 100%; min-height: 100%; }
/* Gruppe */
.bl-tframe {
	position: absolute; border-radius: 16px;
	background: color-mix(in srgb, var(--surface) 78%, transparent);
	border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--line));
	box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 4px 16px rgba(20, 32, 43, .08);
	backdrop-filter: blur(2px);
	transition: box-shadow .15s ease, border-color .15s ease;
}
.bl-tframe.is-auto { border-style: dashed; }
.bl-tframe.is-drop { border-color: var(--accent); box-shadow: 0 0 0 4px var(--brand-glow), 0 8px 24px rgba(20, 32, 43, .15); }
.bl-tframe.is-moving { z-index: 20; opacity: .92; box-shadow: var(--shadow-pop); }
.bl-tframe-head {
	position: absolute; left: 0; right: 0; top: 0; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
	border-radius: 16px 16px 0 0; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
	background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent);
}
.bl-tframe-head:active { cursor: grabbing; }
.bl-tframe-head b { font-size: 14px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.bl-tframe-grip { width: 12px; height: 16px; flex: none; opacity: .5; background: radial-gradient(circle, var(--muted) 1.3px, transparent 1.6px) 0 0 / 6px 5.33px; }
.bl-tframe-count { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.bl-tframe-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); }
.bl-tframe-count i { font-style: normal; color: var(--s4); }
.bl-tframe-empty { position: absolute; left: 12px; right: 12px; top: 48px; bottom: 10px; display: grid; place-items: center; border: 1.5px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12.5px; pointer-events: none; }
.bl-tframe-rs {
	position: absolute; right: 2px; bottom: 2px; width: 22px; height: 22px; cursor: nwse-resize; touch-action: none; border-radius: 0 0 14px 0;
	background: linear-gradient(135deg, transparent 50%, color-mix(in srgb, var(--accent) 55%, transparent) 50%, color-mix(in srgb, var(--accent) 55%, transparent) 58%, transparent 58%, transparent 68%, color-mix(in srgb, var(--accent) 55%, transparent) 68%, color-mix(in srgb, var(--accent) 55%, transparent) 76%, transparent 76%);
	opacity: .55;
}
.bl-tframe:hover .bl-tframe-rs { opacity: 1; }
/* Einsatzmittel auf der Tafel: etwas kompakter */
.bl-tunit { position: absolute; touch-action: none; }
.bl-tunit .bl-uchip { width: 100%; min-height: 58px; height: 58px; gap: 8px; padding-right: 8px; }
.bl-tunit .bl-uchip-st { width: 32px; height: 32px; font-size: 18px; }
.bl-tunit .bl-uchip-sym { width: 40px; height: 34px; }
.bl-tunit .bl-uchip-txt > b { font-size: 14.5px; }
.bl-tunit.is-moving { z-index: 30; pointer-events: none; }
.bl-tunit.is-moving .bl-uchip { box-shadow: var(--shadow-pop), 0 0 0 2px var(--accent); transform: rotate(-1.5deg) scale(1.03); }
/* Während des Ziehens überall der Greifzeiger – auch über Elementen mit eigenem Zeiger,
   deshalb hier !important statt einer Liste aller Zeigerregeln. */
.blueleit.is-tdrag, .blueleit.is-tdrag * { cursor: grabbing !important; }
.blueleit.is-tdrag [data-inc] { transition: outline .1s; }
.blueleit.is-tdrag .bl-mci:not(.st-abgeschlossen) { outline: 2px dashed color-mix(in srgb, var(--s3) 50%, transparent); outline-offset: 1px; }
.blueleit.is-tdrag [data-inc].is-drop { outline: 3px solid var(--s3); background: color-mix(in srgb, var(--s3) 14%, var(--surface)); }
@media (hover: none), (pointer: coarse) {
	.bl-tframe-rs { width: 32px; height: 32px; }
	.bl-tframe-head { height: 40px; }
}

/* ===== Eigenes Fenster (ausgeklinkter Bereich, z. B. für den zweiten Bildschirm) ===== */
.blueleit.is-popout { height: 100vh; display: flex; flex-direction: column; }
.bl-top.is-pop .bl-brand-mark, .bl-top.is-pop .bl-brand-logo { margin-left: 4px; }
.bl-top.is-pop .bl-svc-title { gap: 10px; }
.bl-pop-one { flex: 1; min-height: 0; display: flex; }
.bl-pop-one > .bl-panel { flex: 1; }
.bl-pop-one .bl-mc-units.is-tafel { height: 100%; }

/* ===== Einsatzliste: Einsätze links, Tableau der Einsatzmittel rechts ===== */
.bl-dash { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
.bl-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.bl-col-head {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; flex: none;
	border-bottom: 1px solid var(--line); background: var(--panel);
}
.bl-col-head h2 { margin-right: auto; }
.bl-inc-col { border-right: 1px solid var(--line); background: var(--panel); }
.bl-inc-col .bl-col-head .bl-seg { order: 3; width: 100%; display: flex; }
.bl-inc-col .bl-col-head .bl-seg button { flex: 1; }
.bl-inc-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 860px) {
	.bl-dash { grid-template-columns: 1fr; grid-template-rows: minmax(220px, 40%) 1fr; }
	.bl-inc-col { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Einsatzkarte ---------- */
.bl-inc {
	position: relative; display: flex; flex-direction: column; gap: 3px;
	background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--stc, var(--s6));
	border-radius: var(--radius); padding: 8px 10px; cursor: pointer; box-shadow: var(--shadow);
}
.bl-inc.st-abgeschlossen { opacity: .7; box-shadow: none; }
.bl-inc.is-sel { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--accent-soft); }
.bl-inc.is-prio { border-color: var(--danger); border-left-color: var(--danger); }
.bl-inc.is-ready { border-left-color: var(--ok); }
.bl-inc.is-drop { outline: 3px dashed var(--s3); outline-offset: 2px; }
.bl-inc-head { display: flex; align-items: center; gap: 6px; }
.bl-inc-no { font-weight: 800; font-size: 13px; }
.bl-inc-head time { margin-left: auto; font-weight: 650; display: flex; gap: 6px; align-items: baseline; }
.bl-inc-head time small { color: var(--muted); font-weight: 500; }
.bl-inc-kw { font-weight: 700; font-size: 15px; }
.bl-inc-addr { display: flex; gap: 5px; align-items: flex-start; font-size: 13px; }
.bl-inc-addr .bl-ic { width: 14px; height: 14px; color: var(--muted); margin-top: 2px; flex: none; }
.bl-inc-msg { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bl-inc-foot { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; align-items: center; }
/* Aktionsleiste erscheint am markierten Einsatz (Klick oder Pfeiltasten) */
.bl-inc-actions { display: none; gap: 4px; justify-content: flex-end; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.bl-inc.is-sel .bl-inc-actions { display: flex; }
.bl-inc-actions .bl-ibtn { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }

/* Einsatzmittel und Patienten als Mini-Schild in der Einsatzkarte */
.bl-mini {
	display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px 1px 1px;
	border: 1px solid var(--line); border-radius: 4px; background: var(--surface);
	font-size: 12px; font-weight: 650; cursor: grab;
}
.bl-mini b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 3px; background: var(--st); color: var(--st-ink, #fff); font-size: 12px; }
.bl-mini.is-sel { outline: 2px solid var(--accent); }
.bl-plate-ic, .bl-mini-ic { display: inline-flex; vertical-align: -3px; color: var(--muted); }
.bl-plate-ic { margin-right: 5px; }
.bl-plate-ic .bl-ic { width: 16px; height: 16px; }
.bl-mini-ic .bl-ic { width: 14px; height: 14px; }
:where(.bl-pmini) { --tri: var(--s6); }
.bl-pmini {
	display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px 1px 1px; border-radius: 4px; cursor: grab;
	border: 1px solid var(--line); background: var(--surface); font-size: 12px; font-weight: 650;
}
.bl-pmini b { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 3px; border-radius: 3px; font-size: 11px; background: var(--tri); color: var(--tri-ink, #fff); }
.bl-pmini.is-done { border-style: dashed; color: var(--muted); }
.bl-pmini-done { display: inline-grid; color: var(--ok); }
.bl-pmini-done .bl-ic { width: 13px; height: 13px; }
.bl-pmini-ic .bl-ic { width: 13px; height: 13px; color: var(--s1); }
.bl-pmini-ic[class*="uc-"] .bl-ic { color: var(--uc); }
.bl-pmini-ic.is-incoming .bl-ic { animation: bl-alert-pulse 1s ease-in-out infinite; }

/* Übergabezone UHS über dem Tableau */
.bl-uhs-strip { display: flex; align-items: stretch; gap: 8px; padding: 8px 12px 0; flex-wrap: wrap; flex: none; }
.bl-uhs-strip-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.bl-uhs-strip-label .bl-ic { width: 16px; height: 16px; }
.bl-uhs-drop {
	display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; cursor: pointer; font: inherit; color: var(--ink); text-align: left;
	background: var(--surface); border: 2px dashed var(--line); border-left: 5px solid var(--uc, var(--accent)); border-radius: 10px; min-width: 170px;
}
.bl-uhs-drop:hover { border-color: var(--accent); }
.bl-uhs-drop.is-drop { border-style: solid; border-color: var(--s1); background: color-mix(in srgb, var(--s1) 12%, transparent); }
.blueleit.is-dragging-patient .bl-uhs-drop { border-color: var(--s1); }
.bl-uhs-drop-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--uc, var(--accent)); color: #fff; }
.bl-uhs-drop-txt { display: flex; flex-direction: column; line-height: 1.2; }
.bl-uhs-drop-txt small { color: var(--muted); }

/* ---------- Tableau ---------- */
.bl-board-col { background: var(--bg); }
.bl-unit-sum { display: flex; gap: 10px; font-size: 13px; font-weight: 650; margin-right: 8px; }
.bl-unit-sum .is-free { color: var(--s1); }
.bl-unit-sum .is-busy { color: var(--warn-ink); }
.bl-unit-sum .is-off { color: var(--muted); }
.bl-board {
	flex: 1; min-height: 0; overflow: auto; padding: 12px;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: max-content; gap: 12px; align-content: start; align-items: start;
}
.bl-board-empty { grid-column: 1 / -1; }
.bl-area {
	background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
	display: flex; flex-direction: column; min-height: 120px;
}
.bl-area.is-drop { outline: 3px dashed var(--accent); outline-offset: -3px; }
.bl-area-head {
	display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
	padding: 8px 10px; border-bottom: 1px solid var(--line-soft); font-weight: 700; cursor: default; user-select: none;
}
.bl-area-head small { color: var(--muted); font-weight: 600; }
.bl-area-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.bl-area-out { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.bl-area-out > small { color: var(--muted); font-weight: 600; }
.bl-area-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 14px 4px; border: 1px dashed var(--line); border-radius: 6px; }

/* Das Schild: das Herzstück */
.bl-plate {
	display: flex; align-items: stretch; min-height: 48px;
	background: var(--surface); border: 1px solid var(--line); border-radius: 5px;
	box-shadow: 0 1px 0 rgba(20, 32, 43, .10), 0 3px 0 -1px var(--line-soft);
	cursor: grab; user-select: none; overflow: hidden;
}
.bl-plate:active { cursor: grabbing; }
.bl-plate.is-sel { outline: 3px solid var(--accent); outline-offset: 1px; }
.bl-plate.is-linked { box-shadow: 0 0 0 2px var(--accent-soft), 0 1px 0 rgba(20, 32, 43, .1); }
.bl-plate.s6 { opacity: .75; }
.bl-plate.s0 { border-color: var(--s0); box-shadow: 0 0 0 2px var(--s0); }
.bl-plate-st {
	flex: 0 0 42px; display: grid; place-items: center;
	font-size: 26px; font-weight: 800; background: var(--st); color: var(--st-ink, #fff); line-height: 1;
}
/* Sprechwunsch (5) und Notruf (0) blinken */
.bl-plate.s5 .bl-plate-st, .bl-plate.s0 .bl-plate-st { animation: bl-blink 1s steps(2) infinite; }
.bl-plate-body { display: flex; flex-direction: column; justify-content: center; padding: 4px 8px; min-width: 0; flex: 1; position: relative; }
.bl-plate-body strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-plate-body small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-plate-time { position: absolute; top: 4px; right: 6px; font-size: 11px; }

/* Tagebuch-Ticker unter dem Tableau (und Kurzliste im Dialog) */
.bl-ticker { flex: none; border-top: 1px solid var(--line); background: var(--surface); max-height: 34%; display: flex; flex-direction: column; }
.bl-ticker-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px 0; }
.bl-ticker-head h3 { margin: 0; }
.bl-ticker-head a { font-size: 12px; }
.bl-ticker-list { list-style: none; margin: 0; padding: 4px 12px; overflow-y: auto; flex: 1; min-height: 0; }
.bl-journal-mini { list-style: none; margin: 0 0 10px; padding: 0; max-height: 280px; overflow-y: auto; }
.bl-ticker-list li, .bl-journal-mini li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; padding: 3px 0; font-size: 13px; border-bottom: 1px solid var(--line-soft); }
.bl-ticker-list time, .bl-journal-mini time { font-weight: 700; }
.bl-ticker-list small, .bl-journal-mini small { color: var(--muted); }
.bl-ticker-list li.k-manual span, .bl-journal-mini li.k-manual span { font-weight: 600; }
.bl-ticker-form { display: flex; gap: 6px; padding: 6px 12px 10px; }
@media (max-width: 760px) {
	.bl-ticker-list { display: none; }
	.bl-ticker-head { padding-bottom: 4px; }
}

/* Ziehen: mögliche Ziele andeuten */
.blueleit.is-dragging-unit .bl-inc:not(.st-abgeschlossen) { outline: 1px dashed var(--s3); }

/* ===== Einsatzdialog: Einsatzmittel mit Status, Patienten, Besatzung ===== */
.bl-incunit-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.bl-incunit-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bl-incunit-st { display: inline-flex; align-items: center; gap: 4px; }
.bl-fms-btn {
	width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
	font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; padding: 0;
}
.bl-fms-btn:hover { border-color: var(--muted); }
.bl-fms-btn.is-on { background: var(--st); border-color: var(--st); color: var(--st-ink, #fff); }
@media (hover: none), (pointer: coarse) { .bl-fms-btn { width: 40px; height: 40px; } }
.bl-incpat-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.bl-incpat-del { width: 26px; height: 26px; margin-left: auto; }
.bl-incpat-del .bl-ic { width: 15px; height: 15px; }
.bl-uhs-badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, var(--s1) 15%, transparent); color: var(--ok); }

/* ---------- Besatzungsdialog ---------- */
.bl-crew > .bl-btn { align-self: flex-start; }
.bl-crew-head { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.bl-crew-head strong { font-size: 16px; }
.bl-crew-rows { display: flex; flex-direction: column; gap: 6px; }
.bl-crew-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr) 76px 34px; gap: 8px; align-items: start; }
.bl-crew-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; }
.bl-crew-sub:empty, .bl-crew-dv:empty { display: none; }
.bl-crew-hint { display: block; color: var(--s3); font-size: 11px; margin-top: 2px; min-height: 0; }
.bl-crew-sub .bl-crew-hint { margin-top: 0; }
.bl-crew-hint:empty { display: none; }
.bl-crew-since { align-self: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.bl-crew-leave { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
.bl-crew-leave:empty { display: none; }
.bl-crew-gone { display: inline-flex; gap: 6px; align-items: center; }
.bl-crew-gone s { text-decoration-color: var(--danger); }
.bl-crew-dvhint { margin: 0; font-size: 12.5px; color: var(--ink); background: var(--warn-soft); border: 1px solid var(--s3); border-radius: 8px; padding: 7px 10px; }
.bl-crew-dvhint:empty { display: none; }
.bl-crew-hist h3 { display: flex; align-items: center; gap: 6px; }
.bl-crew-hist h3 .bl-ic { width: 15px; height: 15px; }
.bl-crew-hist li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; font-size: 12px; padding: 3px 0; border-top: 1px solid var(--line-soft); }
.bl-crew-hist time { font-weight: 700; }
.bl-crew-hist small { color: var(--muted); }
@media (max-width: 600px) { .bl-crew-row { grid-template-columns: 1fr 1fr; } .bl-crew-since { grid-column: 1; } }

/* ===== Patienten: Lagen mit Betten und Warteraum ===== */
.bl-pat-page { max-width: none; }
.bl-lagen { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.bl-lage { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--line); border-radius: 10px; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.bl-lage.is-main { border-top-color: var(--accent); }
.bl-lage.is-uhs { border-top: 4px solid var(--uc); }
.bl-lage.is-drop { outline: 3px dashed var(--accent); outline-offset: -3px; }
.bl-lage-head { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line-soft); }
.bl-lage-ic { flex: none; display: grid; color: var(--muted); }
.bl-lage-ic .bl-ic { width: 22px; height: 22px; }
.bl-lage.is-main .bl-lage-ic { color: var(--accent); }
.bl-lage.is-uhs .bl-lage-ic { color: var(--uc); }
.bl-lage-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bl-lage-title h2 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-lage-title small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-lage-head .bl-ibtn { flex: none; }
.bl-beds { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); grid-auto-rows: minmax(72px, auto); gap: 8px; padding: 10px; }
.bl-bed { border: 1px dashed var(--line); border-radius: 8px; padding: 6px; min-width: 0; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.bl-bed.is-busy { border-style: solid; }
.bl-bed.is-drop { outline: 3px dashed var(--accent); }
.blueleit.is-dragging-patient .bl-bed:not(.is-busy) { border-color: var(--accent); }
.bl-bed-name { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--muted); }
.bl-bed-free { font-size: 12px; color: var(--s1); font-weight: 650; margin: auto; }
.bl-bed .bl-pat { box-shadow: none; border: 0; padding: 0; background: transparent; }
.bl-bed .bl-pat-line { white-space: normal; overflow-wrap: anywhere; } /* im Bett lieber umbrechen als abschneiden */
/* Warteraum: Patienten ohne Bett (Lagen mit Betten) */
.bl-wait { margin: 0 10px 10px; padding: 8px; border: 1.5px dashed var(--line); border-radius: 10px; background: color-mix(in srgb, var(--uc, var(--accent)) 5%, transparent); display: flex; flex-direction: column; gap: 6px; transition: border-color .15s ease, background .15s ease; }
.bl-wait-head { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.bl-wait-head strong { color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.bl-wait-head .bl-ic { width: 15px; height: 15px; }
.bl-wait-head small { margin-left: auto; }
.bl-wait .bl-pat-list { padding: 0; }
.bl-wait-hint { padding: 10px 4px; text-align: center; color: var(--muted); font-size: 12px; }
.bl-wait.is-drop, .blueleit.is-dragging-patient .bl-wait { border-color: var(--uc, var(--accent)); background: color-mix(in srgb, var(--uc, var(--accent)) 12%, transparent); }
/* Patient als Zeile */
.bl-pat-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.bl-pat {
	display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line);
	border-radius: 6px; padding: 6px; cursor: pointer; box-shadow: var(--shadow); min-width: 0;
}
/* Sichtungsfeld (auch in der UHS-Karte); ohne Sichtung neutral */
.bl-pat-tri { flex: 0 0 26px; border-radius: 4px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--tri, var(--line)); color: var(--tri-ink, #fff); }
.bl-pat-body { display: flex; flex-direction: column; min-width: 0; }
.bl-pat-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.bl-pat-body small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-done { margin-top: 20px; }
.bl-done-toggle { background: none; border: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; padding: 6px 0; }

/* ===== UHS-Ansicht ===== */
.bl-uhs-page { max-width: none; border-top: 6px solid var(--uc); }
.bl-uhs-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bl-uhs-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.bl-uhs-tab {
	display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: 999px; cursor: pointer;
	border: 2px solid color-mix(in srgb, var(--uc) 55%, transparent); background: color-mix(in srgb, var(--uc) 10%, var(--surface)); color: var(--ink); font: inherit; font-weight: 650;
}
.bl-uhs-tab small { color: var(--muted); font-weight: 500; }
.bl-uhs-tab-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--uc); color: #fff; }
.bl-uhs-tab-ic .bl-ic { width: 14px; height: 14px; }
.bl-uhs-tab.is-active { background: var(--uc); border-color: var(--uc); color: #fff; box-shadow: 0 2px 10px color-mix(in srgb, var(--uc) 45%, transparent); }
.bl-uhs-tab.is-active small { color: rgba(255,255,255,.85); }
.bl-uhs-tab.is-active .bl-uhs-tab-ic { background: rgba(255,255,255,.25); }
.bl-uhs-tab-alert { background: var(--danger); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; animation: bl-alert-pulse 1.2s ease-in-out infinite; }
.bl-uhs-banner {
	display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 12px; border-radius: 12px;
	background: linear-gradient(90deg, color-mix(in srgb, var(--uc) 22%, var(--surface)), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--uc) 45%, var(--line)); border-left: 8px solid var(--uc);
}
.bl-uhs-banner h1 { font-size: 22px; }
.bl-uhs-banner small { color: var(--muted); }
.bl-uhs-banner-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--uc); color: #fff; flex: none; }
.bl-uhs-banner-ic .bl-ic { width: 26px; height: 26px; }
.bl-uhs-tools { display: flex; gap: 4px; align-items: center; }

/* Spalten: angekündigt, Betten, im Einsatz */
.bl-uhs-grid { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(360px, 2.2fr) minmax(220px, .9fr); gap: 12px; align-items: start; }
.bl-uhs-grid.is-uhs-team { grid-template-columns: minmax(260px, 1fr) minmax(320px, 2fr); } /* UHS-Team: nur zwei Spalten */
.bl-uhs-col { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 220px; display: flex; flex-direction: column; gap: 8px; }
.bl-uhs-col.is-drop, .bl-uhs-bed.is-drop, .bl-uhs-loose.is-drop { outline: 3px dashed var(--s1); outline-offset: -3px; }
.bl-uhs-col > header { display: flex; align-items: center; gap: 8px; }
.bl-uhs-col > header h2 { font-size: 15px; }
.bl-uhs-col > header small { color: var(--muted); font-weight: 650; margin-right: auto; }
.bl-uhs-col > header .bl-ic { width: 20px; height: 20px; color: var(--muted); }
.bl-uhs-col.is-incoming { border-top: 4px solid var(--s3); }
.bl-uhs-col.is-beds { border-top: 4px solid var(--uc, var(--s1)); }
.bl-uhs-col.is-field { border-top: 4px solid var(--s6); opacity: .92; }
/* Angekündigt: deutlich, solange jemand kommt */
.bl-uhs-col.is-incoming.has-alert { border: 2px solid var(--danger); border-top-width: 6px; background: color-mix(in srgb, var(--danger) 9%, var(--panel)); animation: bl-incoming 1.6s ease-in-out infinite; }
.bl-uhs-col.is-incoming.has-alert > header .bl-ic { color: var(--danger); }
.bl-uhs-alert-text { margin: 0; font-weight: 700; color: var(--danger); }
.bl-uhs-col.is-incoming .bl-uhs-card { border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 30%, transparent); }
.bl-uhs-list { display: flex; flex-direction: column; gap: 8px; }
.bl-uhs-beds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.bl-uhs-bedtools { display: inline-flex; gap: 2px; margin-left: auto; }
.bl-uhs-bed { border: 1px dashed var(--line); border-left: 4px solid color-mix(in srgb, var(--uc) 60%, transparent); border-radius: 8px; padding: 6px; background: var(--surface); min-height: 86px; display: flex; flex-direction: column; gap: 4px; }
.bl-uhs-bed.is-busy { border-style: solid; border-left-color: var(--uc); }
.bl-uhs-bed .bl-bed-name { gap: 4px; }
.bl-uhs-bed .bl-bed-name .bl-ic { width: 14px; height: 14px; }
.bl-uhs-bed .bl-uhs-card { border: 0; box-shadow: none; padding: 0; background: transparent; }
.bl-bed-x { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 4px; border: 0; background: none; color: var(--muted); cursor: pointer; opacity: 0; padding: 0; }
.bl-uhs-bed:hover .bl-bed-x, .bl-bed-x:focus-visible { opacity: 1; }
.bl-bed-x:hover { color: var(--danger); background: var(--danger-soft); }
.bl-bed-x .bl-ic { width: 14px; height: 14px; }
.bl-uhs-loose { display: flex; flex-direction: column; gap: 8px; border-radius: 8px; padding: 4px; }
/* Patientenkarte */
.bl-uhs-card {
	display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px;
	cursor: pointer; box-shadow: var(--shadow); min-width: 0;
}
.bl-uhs-card .bl-pat-tri { flex: 0 0 30px; font-size: 13px; }
.bl-uhs-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; font-size: 13px; }
.bl-uhs-card-body small { display: flex; gap: 4px; align-items: center; }
.bl-uhs-card-body small .bl-ic { width: 14px; height: 14px; flex: none; }
.bl-vitals-line { color: var(--ink); font-weight: 600; }
.bl-uhs-card-actions { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.bl-uhs-card-actions .bl-ibtn { width: 32px; height: 32px; }
.bl-uhs-card-actions .bl-btn.is-bedpick { border-color: color-mix(in srgb, var(--uc, var(--accent)) 60%, var(--line)); color: var(--ink); }
.bl-uhs-card-actions .bl-btn.is-bedpick .bl-ic { color: var(--uc, var(--accent)); }
@media (max-width: 1100px) {
	.bl-uhs-grid { grid-template-columns: 1fr 1fr; }
	.bl-uhs-col.is-beds { grid-column: 1 / -1; order: -1; }
	.bl-uhs-col.is-incoming { order: -2; grid-column: 1 / -1; }
}
@media (max-width: 900px) { .bl-uhs-grid.is-uhs-team { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .bl-uhs-grid { grid-template-columns: 1fr; } }
@media (hover: none), (pointer: coarse) {
	.bl-uhs-card { padding: 12px; }
	.bl-uhs-card-body { font-size: 15px; gap: 5px; }
	.bl-uhs-card .bl-pat-tri { flex-basis: 40px; font-size: 16px; }
	.bl-uhs-card-actions { gap: 6px; margin-top: 8px; }
	.bl-uhs-card-actions .bl-ibtn { width: 44px; height: 44px; }
	.bl-uhs-card-actions .bl-btn { min-height: 44px; padding-inline: 14px; font-size: 14px; }
	.bl-uhs-tab, .bl-uhs-tools .bl-btn { min-height: 46px; }
	.bl-bed-x { width: 34px; height: 34px; }
}

/* ---------- Behandlungsdaten im Patientendialog ---------- */
.bl-fsec.bl-uhs-fs { border-color: var(--s1); }
.bl-uhs-fs legend .bl-ic { width: 16px; height: 16px; }
.bl-care { display: flex; flex-direction: column; gap: 8px; }
.bl-care h3 { margin: 6px 0 0; }
.bl-care-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bl-care-head h3 { margin: 0; }
.bl-vitals td, .bl-vitals th { padding: 4px 6px; text-align: right; }
.bl-vitals td:first-child, .bl-vitals th:first-child { text-align: left; }
.bl-vitals-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bl-measures { display: flex; flex-wrap: wrap; gap: 6px 12px; }
@media (max-width: 520px) { .bl-vitals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Tagebuch ===== */
.bl-etb { display: flex; flex-direction: column; max-width: none; height: 100%; padding-bottom: 16px; }
.bl-etb-new { display: flex; gap: 8px; margin-bottom: 12px; }
.bl-etb-new select { flex: 0 0 220px; }
.bl-etb-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.bl-search { max-width: 280px; }
.bl-etb .bl-table-wrap { flex: 1; min-height: 200px; }
.bl-etb-table td:nth-child(3), .bl-etb-table td:nth-child(5) { white-space: nowrap; }
.bl-etb-table tr.k-manual td { background: var(--warn-soft); }
.bl-etb-table tr.k-system td { font-weight: 650; }
.bl-etb-table .bl-tag { margin-right: 6px; } /* „manuell“ vor dem Text */
.bl-etb-more { text-align: center; padding: 8px; }
.bl-pii { color: var(--muted); }
.bl-verify.is-ok p:first-child { color: var(--ok); font-weight: 650; }
.bl-verify.is-bad { color: var(--danger); }
.bl-hash { display: block; word-break: break-all; font-size: 12px; background: var(--panel); padding: 6px 8px; border-radius: 4px; }

/* ===== Auswertung ===== */
.bl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.bl-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; }
.bl-kpi-v { font-size: 28px; font-weight: 750; line-height: 1.1; }
.bl-kpi-l { font-weight: 650; }
.bl-kpi small { color: var(--muted); }
.bl-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.bl-stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.bl-stat-card h2 { font-size: 14px; margin-bottom: 10px; }
.bl-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bl-bars li { display: grid; grid-template-columns: minmax(80px, 40%) 1fr 32px; gap: 8px; align-items: center; font-size: 13px; }
.bl-bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-bar-track { height: 14px; background: var(--panel); border-radius: 3px; overflow: hidden; }
/* Balken: Sichtungsfarbe bei der Sichtungs-Statistik, sonst Akzent */
.bl-bar { display: block; height: 100%; background: var(--tri, var(--accent)); border-radius: 3px; }
.bl-bar.tri-none { --tri: var(--s6); }
.bl-bar-val { text-align: right; font-weight: 700; }

/* ===== Stammdaten ===== */
.bl-subnav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.bl-subnav a { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.bl-subnav a.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.bl-settings { max-width: 640px; margin-bottom: 20px; }

/* ---------- Orte: Liste links, Einzelheiten rechts ---------- */
.bl-places { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.bl-place-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bl-place-list .bl-col-head { background: var(--panel); }
.bl-place-list ul { list-style: none; margin: 0; padding: 4px; }
.bl-place-list li button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 5px; cursor: pointer; font: inherit; color: var(--ink); font-weight: 600; display: flex; flex-direction: column; }
.bl-place-list li button small { color: var(--muted); font-weight: 400; }
.bl-place-list li button.is-active { background: var(--accent-soft); }
.bl-place-list .bl-muted { padding: 10px; }
.bl-place-detail { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bl-place-detail .bl-page-head { margin: 0; }
.bl-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bl-tags li { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 3px 4px 3px 10px; font-size: 13px; }
.bl-tag-x { background: none; border: 0; padding: 2px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.bl-tag-x .bl-ic { width: 14px; height: 14px; }
.bl-tag-x:hover { color: var(--danger); }
.bl-map-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bl-map-cards li { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; flex-wrap: wrap; }
.bl-map-cards small { color: var(--muted); }
@media (max-width: 760px) { .bl-places { grid-template-columns: 1fr; } }

/* ---------- Import / Export ---------- */
.bl-io-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.bl-io-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.bl-io-card .bl-row-actions { margin-left: 0; }

/* ---------- Einsatzmittel anlegen ---------- */
.bl-newunit { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.bl-unitpick { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.bl-unitpick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Taktische Zeichen und Markierungsdialog ---------- */
.bl-tz { display: block; overflow: visible; }
.bl-tz-grid { display: flex; flex-direction: column; gap: 10px; }
.bl-tz-group > small { display: block; font-weight: 650; color: var(--muted); margin-bottom: 4px; }
.bl-tz-row { display: flex; flex-wrap: wrap; gap: 6px; }
.bl-tz-btn { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--sym-bg); cursor: pointer; padding: 0; }
.bl-tz-btn:hover { border-color: var(--muted); }
.bl-tz-btn.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); background: #fff; }
.bl-mkd-top { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.bl-mkd-fields { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 12px; }
.bl-mkd-preview { width: 150px; min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 10px; background: repeating-linear-gradient(45deg, var(--panel), var(--panel) 8px, var(--surface) 8px, var(--surface) 16px); border: 1px solid var(--line); }
.bl-mkd-preview span { font-weight: 650; font-size: 13px; text-align: center; }

/* ---------- Schlagwörter und Tags ---------- */
.bl-kw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.bl-kw-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.bl-kw-search { width: 260px; }
.bl-kw-table { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: visible; }
.bl-kw-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(130px, 1fr) auto 22px minmax(220px, 1.6fr) minmax(40px, auto); gap: 8px; align-items: center; padding: 7px 10px; border-top: 1px solid var(--line-soft); }
.bl-kw-row.is-head { border-top: 0; font-size: 12px; font-weight: 650; color: var(--muted); padding-top: 9px; padding-bottom: 9px; background: var(--panel); border-radius: 8px 8px 0 0; }
.bl-kw-row.is-new { background: var(--accent-soft); }
.bl-kw-row .bl-input { min-height: 34px; }
.bl-kw-c.is-kw .bl-input { font-weight: 650; }
.bl-kw-arrow { color: var(--muted); display: grid; place-items: center; }
.bl-kw-arrow .bl-ic { width: 16px; height: 16px; }
.bl-kw-c.is-act { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.bl-kw-state { display: grid; color: var(--muted); }
.bl-kw-state .bl-ic { width: 15px; height: 15px; }
.bl-kw-state.is-err { color: var(--danger); }
/* Tags eines Schlagworts bearbeiten */
.bl-tagedit { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.bl-tagedit .bl-tag { gap: 2px; padding-right: 2px; min-height: 24px; }
.bl-tag-rm { background: none; border: 0; color: inherit; cursor: pointer; display: grid; place-items: center; padding: 1px; opacity: .8; }
.bl-tag-rm:hover { opacity: 1; }
.bl-tag-rm .bl-ic { width: 13px; height: 13px; }
.bl-tagedit .bl-combo { width: auto; flex: 1; min-width: 130px; }
.bl-tagedit .bl-combo .bl-input { min-height: 28px; padding-top: 3px; padding-bottom: 3px; font-size: 13px; }
.bl-kw-aside { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; position: sticky; top: 0; }
.bl-kw-aside h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.bl-kw-aside h2 > span { display: grid; color: var(--accent); }
.bl-kw-aside h2 small { color: var(--muted); font-weight: 600; font-size: 12px; }
.bl-tag-new { flex-wrap: nowrap; margin: 8px 0; gap: 6px; }
.bl-tag-new > * { min-width: 0; }
.bl-taglist { display: flex; flex-direction: column; gap: 4px; }
.bl-taglist-item { display: flex; align-items: center; gap: 6px; }
.bl-taglist-item .bl-input { min-height: 30px; padding: 4px 8px; flex: 1; }
@media (max-width: 1250px) {
	.bl-kw-layout { grid-template-columns: 1fr; }
	.bl-kw-aside { position: static; }
}
@media (max-width: 900px) {
	.bl-kw-row { grid-template-columns: 1fr 1fr; }
	.bl-kw-row.is-head { display: none; }
	.bl-kw-arrow { display: none; }
	.bl-kw-c.is-tags { grid-column: 1 / -1; }
}

/* ===== DIVERA: Alarmzeichen, Verbindung, Standort, Einrichtungsassistent ===== */
/* Alarmzeichen am Einsatzmittel */
.bl-dv { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 750; line-height: 1; cursor: pointer; }
.bl-dv b { font-weight: 800; }
.bl-dv-ic { display: grid; }
.bl-dv-ic .bl-ic { width: 14px; height: 14px; }
.bl-dv.is-sent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.bl-dv.has-ans { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.bl-dv.is-sending .bl-dv-ic { animation: bl-blink 1s steps(2) infinite; }
.bl-dv.is-error { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.bl-dv.is-failed { color: #fff; border-color: var(--danger); background: var(--danger); }
.bl-dv.is-nocrew { border-style: dashed; border-color: var(--s3); color: var(--ink); background: var(--warn-soft); }
.bl-dv.is-bare { padding: 0 4px; }
.bl-dv-ok { display: grid; }
.bl-dv-ok .bl-ic { width: 12px; height: 12px; stroke-width: 3; }
/* Quittiert (Status am Fahrzeug-Gerät, am Einsatzort, Transport): bleibt sichtbar, drängt sich nicht mehr auf. */
.bl-dv.is-ack { opacity: .5; background: transparent; }
.bl-dv.is-ack:hover, .bl-dv.is-ack:focus-visible { opacity: 1; }
.bl-dv:hover, .bl-dv:focus-visible { border-color: var(--accent); outline: none; }
.bl-dvtag { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .02em; padding: 1px 5px; border-radius: 4px; color: var(--muted); border: 1px dashed var(--line); white-space: nowrap; }
.bl-dvtag.is-on { color: var(--accent); background: var(--accent-soft); border: 1px solid transparent; }
.bl-dvtag.is-gone { color: var(--danger); border: 1px dashed var(--danger); }
td > .bl-dvtag { margin-left: 8px; vertical-align: 1px; }
.bl-sync-sec + .bl-sync-sec { margin-top: 12px; }
.bl-sync-sec h3 { margin: 0 0 4px; font-size: 14px; }
.bl-sync-sec li + li { margin-top: 4px; }

/* Verbindung in der Kopfzeile */
.bl-dvconn { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.bl-dvconn i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.bl-dvconn.is-ok i { background: var(--s1); }
.bl-dvconn.is-warn { color: var(--ink); }
.bl-dvconn.is-warn i { background: var(--s3); }
.bl-dvconn.is-bad { color: var(--danger); }
.bl-dvconn.is-bad i { background: var(--danger); animation: bl-blink 1s steps(2) infinite; }

/* Frische eines Standorts aus DIVERA: grün pulsierend = live, gelb = unverändert, grau = alt */
.bl-live { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #8a96a3; box-shadow: 0 0 0 2px #fff; vertical-align: middle; }
.bl-live.is-live { background: var(--s1); animation: bl-live-pulse 2s ease-out infinite; }
.bl-live.is-aging { background: var(--s3); }
.bl-live-wrap { flex: none; display: grid; place-items: center; margin-left: -4px; }

/* ---------- Einrichtungsassistent ---------- */
.bl-dvw { max-width: 920px; }
.bl-dvw-head p { margin: 4px 0 10px; }
.bl-dvw-tip { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); max-width: 780px; }
.bl-dvw-tip > span { flex: none; display: grid; color: var(--accent); }
.bl-dvw-tip > span .bl-ic { width: 22px; height: 22px; }
.bl-dvw-tip p { margin: 3px 0 0; }
.bl-dvw-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.bl-dvw-step { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bl-dvw-step.is-open { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); }
.bl-dvw-sh { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; background: none; border: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.bl-dvw-num { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); font-weight: 800; font-size: 13px; color: var(--muted); }
.bl-dvw-num .bl-ic { width: 16px; height: 16px; }
.bl-dvw-step.is-done .bl-dvw-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.bl-dvw-step.is-warn .bl-dvw-num { background: var(--warn-soft); border-color: var(--s3); color: var(--ink); }
.bl-dvw-step.is-open:not(.is-done):not(.is-warn) .bl-dvw-num { border-color: var(--accent); color: var(--accent); }
.bl-dvw-st { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bl-dvw-st b { font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.bl-dvw-st em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.bl-dvw-st small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-dvw-step.is-warn .bl-dvw-st small { color: var(--ink); }
.bl-dvw-chev { flex: none; display: grid; color: var(--muted); }
.bl-dvw-chev .bl-ic { width: 16px; height: 16px; }
.bl-dvw-body { padding: 2px 14px 14px 52px; display: grid; gap: 10px; font-size: 13.5px; }
.bl-dvw-body p { margin: 0; }
.bl-dvw-how { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.bl-dvw-row { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; max-width: 680px; }
.bl-dvw-row .bl-field { flex: 1; min-width: 260px; margin: 0; }
.bl-dvw-row.is-wide { max-width: 820px; }
.bl-dvw-row.is-wide .bl-field { min-width: 200px; }
.bl-dvw-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; }
.bl-dvw-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.bl-dvw-ways > div { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 10px 12px; background: var(--panel); }
.bl-dvw-ways h4 { margin: 0 0 6px; font-size: 13.5px; }
.bl-dvw-map select { min-width: 220px; }
.bl-dvw-guess { margin-left: 8px; color: var(--accent); font-weight: 700; }
.bl-dvw-fms { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 5px; background: var(--st, var(--muted)); color: var(--st-ink, #fff); font-weight: 800; font-size: 12px; }
.bl-dvw-legend .bl-live { margin: 0 2px; }
@media (max-width: 700px) { .bl-dvw-body { padding-left: 14px; } }

/* ---------- Einstellungen: Verbindung prüfen ---------- */
.bl-dvs-adv summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.bl-dvs-adv .bl-field { margin-top: 8px; max-width: 680px; }
.bl-dvs-state { display: flex; align-items: center; gap: 7px; font-weight: 650; margin: 6px 0; }
.bl-dvs-state i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.bl-dvs-state.is-ok i { background: var(--s1); }
.bl-dvs-state.is-warn i { background: var(--s3); }
.bl-dvs-state.is-bad { color: var(--danger); }
.bl-dvs-state.is-bad i { background: var(--danger); }
.bl-dvs-test { padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); max-width: 680px; display: grid; gap: 3px; }
.bl-dvs-test.is-ok { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.bl-dvs-test.is-ok strong { color: var(--ok); }
.bl-dvs-test.is-warn { border-color: var(--s3); background: var(--warn-soft); }
.bl-dvs-test.is-bad { border-color: var(--danger); background: var(--danger-soft); }
.bl-dvs-issue { display: flex; gap: 6px; align-items: flex-start; }
.bl-dvs-issue span { flex: none; display: grid; color: var(--s3); padding-top: 2px; }
.bl-dvs-issue .bl-ic { width: 14px; height: 14px; }
.bl-dvs-table { max-height: 340px; max-width: 780px; }

/* ===== Anmeldung (eigene Seite, immer dunkel) ===== */
.bl-login {
	position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px;
	background: radial-gradient(1000px 520px at 50% -12%, #123a7a 0%, var(--bg) 62%);
}
.bl-login-card {
	width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
	padding: 28px 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-pop);
}
.bl-login-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.bl-login-brand .bl-brand-mark { width: 40px; height: 40px; border-radius: 10px; }
.bl-login-brand .bl-brand-mark .bl-ic { width: 24px; height: 24px; }
.bl-login-brand .bl-brand-logo { width: 48px; height: 48px; border-radius: 12px; }
.bl-login-card h1 { font-size: 24px; margin: 4px 0 0; }
.bl-login-card .bl-input { min-height: 44px; font-size: 16px; }
.bl-login-error { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--ink); border-radius: 8px; padding: 10px 12px; }
.bl-login-lost { text-align: center; font-size: 13px; color: var(--muted); }
.bl-login-warn { color: var(--s3); font-size: 13px; }

/* ===== Animationen ===== */
@keyframes bl-blink { 50% { opacity: .35; } }
@keyframes bl-alert-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes bl-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--s4) 70%, transparent), 0 2px 6px rgba(0,0,0,.45); } 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--s4) 0%, transparent), 0 2px 6px rgba(0,0,0,.45); } }
@keyframes bl-pick-pulse { 50% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ic) 20%, transparent); } }
@keyframes bl-incoming { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 45%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--danger) 0%, transparent); } }
@keyframes bl-unacked { 50% { outline-color: transparent; } }
@keyframes bl-live-pulse { 0% { box-shadow: 0 0 0 2px #fff, 0 0 0 2px color-mix(in srgb, var(--s1) 55%, transparent); } 100% { box-shadow: 0 0 0 2px #fff, 0 0 0 9px color-mix(in srgb, var(--s1) 0%, transparent); } }

/* ===== Bewegung reduzieren =====
   Kein Blinken und Pulsieren, keine Bewegungsübergänge. Was sonst blinkt, bleibt an Farbe
   und Rahmen erkennbar; Sprechwunsch und Notruf bekommen dafür einen festen Ring. */
@media (prefers-reduced-motion: reduce) {
	.bl-conn-bad i, .bl-dvconn.is-bad i, .bl-dv.is-sending .bl-dv-ic, .bl-live.is-live, .bl-um.s0, .bl-um.s5,
	.bl-im.is-prio .bl-im-pin, .bl-icbtn.is-picking,
	.bl-announce, .bl-uhm b, .bl-uhs-tab-alert, .bl-uhs-tile-alert, .bl-pchip-uhs.is-incoming, .bl-pmini-ic.is-incoming .bl-ic,
	.bl-uhs-col.is-incoming.has-alert, .bl-uchip.is-unacked .bl-uchip-st, .bl-plate.is-unacked .bl-plate-st,
	.bl-mini.is-unacked b, .bl-um.is-unacked b { animation: none; }
	.bl-plate.s5 .bl-plate-st, .bl-plate.s0 .bl-plate-st, .bl-uchip.s0 .bl-uchip-st, .bl-uchip.s5 .bl-uchip-st { animation: none; outline: 3px solid #fff; outline-offset: -6px; }
	.bl-uchip, .bl-pchip, .bl-chip-acts, .bl-uhs-tile, .bl-toast { transition: none; }
}

/* ===== Assistent „Neuen Dienst vorbereiten“ ===== */
.bl-wiz-layout { display: grid; grid-template-columns: 270px 1fr; flex: 1; min-height: 0; }
.bl-wiz-steps { list-style: none; margin: 0; padding: 18px 12px; border-right: 1px solid var(--line); background: var(--panel); overflow-y: auto; }
.bl-wiz-steps li + li { margin-top: 4px; }
.bl-wiz-steps button { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.bl-wiz-steps button:disabled { cursor: default; opacity: .5; }
.bl-wiz-steps button:not(:disabled):hover { background: var(--surface); }
.bl-wiz-steps .is-current button { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.bl-wiz-steps b { display: block; font-size: 14px; }
.bl-wiz-steps small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }
.bl-wiz-num { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 12px; font-weight: 750; }
.bl-wiz-steps .is-current .bl-wiz-num { border-color: var(--accent); color: var(--accent); }
.bl-wiz-steps .is-done .bl-wiz-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.bl-wiz-num .bl-ic { width: 14px; height: 14px; }
.bl-wiz-main { overflow-y: auto; padding: 22px 28px 32px; min-width: 0; }
.bl-wiz-title { font-size: 22px; margin: 0 0 6px; }
.bl-wiz-sub { font-size: 14px; margin: 20px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bl-wiz-narrow { max-width: 640px; }
.bl-wiz-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.bl-wiz-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
button.bl-wiz-card { cursor: pointer; }
button.bl-wiz-card:hover { border-color: var(--muted); }
.bl-wiz-card.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.bl-wiz-card b { font-size: 15px; }
.bl-wiz-card small { color: var(--muted); }
.bl-wiz-card .bl-wiz-last { color: var(--ink); }
.bl-wiz-card .bl-row-actions { margin-top: 4px; }
.bl-wiz-main > .bl-row-actions { margin: 10px 0 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bl-wiz-sum { max-width: 760px; grid-template-columns: 150px 1fr; font-size: 15px; margin-bottom: 16px; }
/* Meldungen über der Fußleiste des Vollbilds, nicht über „Abbrechen“ */
body:has(.bl-modal.is-full) .bl-toasts { bottom: 80px; }
@media (max-width: 760px) {
	.bl-wiz-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
	.bl-wiz-steps { display: flex; gap: 4px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
	.bl-wiz-steps li + li { margin-top: 0; }
	.bl-wiz-steps small { display: none; }
	.bl-wiz-main { padding: 16px; }
}

/* Umschalter Karte / Luftbild auf Kartenlageplänen */
.leaflet-control .bl-aerial-btn, .bl-aerial-btn {
	padding: 6px 12px; border: 2px solid rgba(0, 0, 0, .25); border-radius: 6px; background: #fff; color: #1d2733;
	font: 650 13px/1.2 inherit; font-family: inherit; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.bl-aerial-btn:hover { background: #f1f4f7; }
.bl-aerial-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bl-fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; margin: 6px 0 12px; }
.bl-fieldset legend { font-weight: 750; padding: 0 6px; }
