/* Import von allgemeinen CSS Dateien (im shared css ordner) */
@import url("./../../css/color.css");
@import url("./../../css/dialog.css");
@import url("./../../css/font/font.css");

/********************* REDESIGN DESIGN TOKENS *********************/
/* Scoped to this file only (only Dienstplaner.html loads dienstplan.css), so these can freely
   introduce a second, redesign-specific token layer alongside shared/css/color.css's global
   --primary-color/--custom-* tokens without colliding with or overriding them elsewhere. Values
   taken 1:1 from the design handoff's Design Tokens section. */
:root {
	--navy: #273e69;
	--navy-2: #1d2f50;
	--accent: #2a6fdb;
	--accent-soft: #e7f0fd;
	--ink: #1d2b3a;
	--muted: #566b81;
	/* War #8499ae — nur ~3:1 Kontrast auf Weiß/Tint, verfehlt WCAG AA (4.5:1) für Fließtext. Dieser
	   Wert liegt bei ~7.7:1 auf Weiß (WCAG AAA), gleiche Blaugrau-Farbfamilie wie --muted/--navy.
	   Damit dunkler als --muted (~5.5:1) — bewusst in Kauf genommen, die beiden werden selten
	   direkt nebeneinander zum Helligkeitsvergleich verwendet. */
	--muted-2: #405665;
	--bg: #eef5fb;
	--panel: #ffffff;
	--tint: #f4f9ff;
	--tint-2: #eaf2fb;
	--line: rgba(20, 40, 70, .12);
	--line-soft: rgba(20, 40, 70, .06);
	--pos: #1f8a5b;
	--pos-bg: #e8f5ee;
	--amber: #b8791a;
	--amber-bg: #fbf2e1;
	--violet: #7a5af0;
	--violet-bg: #efeafe;
	--neg: #c0485a;
	--neg-bg: #fbeaed;
	--shadow: 0 10px 30px rgba(20, 40, 70, .10);
	--shadow-sm: 0 1px 2px rgba(20, 40, 70, .06);
	/* Bereichsfarben: base palette only. Actual per-Bereich colour assignment (deterministic,
	   cycling for >3 Bereiche) lives in js/util/bereichFarben.js since Bereiche are dynamic data,
	   not a fixed 3-area set — see that file for how these get applied per BereichID. */
	--c-service: #2a6fdb;
	--c-service-bg: #e7f0fd;
	--c-kueche: #b8791a;
	--c-kueche-bg: #fbf2e1;
	--c-bar: #7a5af0;
	--c-bar-bg: #efeafe;
}

/* Border-box überall: die redesignten Komponenten (Karten, Selects, Buttons) rechnen ihre Breiten
   auf Basis von border-box, siehe Design-Handoff. Ohne diesen Reset addieren Padding/Border auf die
   deklarierte Breite drauf und Elemente wie die Kopierquelle-Vorschau in der schmalen Sidebar laufen
   über den Rand hinaus. */
*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	overflow: hidden;
	background-color: var(--bg);
	font-family: "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#container {
	display: flex;
	flex-direction: column;
	height: 100dvh;
}

.hidden {
	display: none !important;
}

/********************* APP SHELL: appbar + toolbar + filterbar *********************/

.appbar, .toolbar {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--panel);
	padding: 0 22px;
	height: 60px;
	flex-shrink: 0;
	border-bottom: 1px solid var(--line-soft);
}

/* Toolbar darf wie die Appbar umbrechen, statt Buttons aus dem Bildschirm zu schieben. Der Abstandhalter .sp
   trennt in der ersten Zeile weiter links (Navigation) und rechts (Aktionen); umgebrochene Buttons rechtsbündig. */
.toolbar {
	flex-wrap: wrap;
	height: auto;
	/* 36px hohe Controls + 2 × 4px */
	min-height: 44px;
	padding-top: 4px;
	padding-bottom: 4px;
	row-gap: 6px;
	justify-content: flex-end;
}

/* Appbar darf umbrechen, statt Standort/Avatar/Logout aus dem Bildschirm zu schieben (z.B. 700–1000px).
   Logo + Ansichts-Tabs links, Rest rechtsbündig (auch eine umgebrochene zweite Zeile) — statt Abstandhalter .sp.
   Mobil rücken die Tabs mit nach rechts, siehe @media (max-width: 700px). */
.appbar {
	flex-wrap: wrap;
	height: auto;
	min-height: 60px;
	padding-top: 8px;
	padding-bottom: 8px;
	row-gap: 8px;
	justify-content: flex-end;
}
.appbar .tabs {
	margin-right: auto;
}
.appbar .sp {
	display: none;
}

.appbar .sp, .toolbar .sp {
	flex: 1;
}

.brand {
	display: flex;
	align-items: center;
	gap: 9px;
	font-weight: 700;
	color: var(--navy);
	font-size: 19px;
	letter-spacing: .2px;
	text-decoration: none;
	cursor: pointer;
}

.brand:hover {
	opacity: .8;
}

.brand-logo {
	height: 34px;
	width: auto;
	display: block;
	flex-shrink: 0;
}

/* ── view tabs ── */
.tabs {
	display: flex;
	align-items: center;
	gap: 4px;
	background: var(--tint-2);
	border: 1px solid var(--line);
	border-radius: 13px;
	padding: 4px;
}

.tab {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--muted);
	padding: 8px 16px;
	border-radius: 9px;
	white-space: nowrap;
}

.tab .bi {
	font-size: 15px;
}

.tab.active {
	background: #fff;
	color: var(--navy);
	box-shadow: var(--shadow-sm);
}

.tab.inert {
	cursor: not-allowed;
	opacity: .55;
}

.tab:not(.inert) {
	cursor: pointer;
}

/* Sichtbarkeits-Toggle für die Wochenplan-/Mitarbeiteransicht-Grids und ansichtsspezifische
   Toolbar-Controls (siehe views/viewSwitcher.js). */
.view-hidden {
	display: none !important;
}

/* ── location pill / clock / avatar / logout ── */
.loc-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--navy);
	background: var(--tint-2);
	border: 1px solid var(--line);
	padding: 8px 14px;
	border-radius: 999px;
	max-width: 40vw;
	cursor: pointer;
}

.loc-pill .bi-shop {
	color: var(--accent);
	font-size: 13px;
	flex-shrink: 0;
}

.loc-pill .car {
	/* als Flex-Box, damit das Icon mittig sitzt (bi-Icons haben sonst vertical-align:-.125em und rutschen nach unten) */
	display: flex;
	align-items: center;
	color: var(--muted-2);
	font-size: 11px;
	margin-left: -4px;
	flex-shrink: 0;
	pointer-events: none;
}
.loc-pill .car .bi {
	line-height: 1;
	vertical-align: 0;
}

.loc-pill select {
	appearance: none;
	background: transparent;
	border: none;
	color: var(--navy);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	/* füllt nur den Restplatz der Pille (deren max-width begrenzt) und darf darunter schrumpfen — sonst
	   drückt ein langer Betriebsname den Chevron über den Rand der Pille hinaus */
	flex: 1 1 auto;
	min-width: 0;
	text-overflow: ellipsis;
	padding: 0;
}

.clock {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	color: var(--navy);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
}

.clock small {
	font-size: 10px;
	color: var(--muted-2);
	font-weight: 600;
}

.avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--tint-2);
	color: var(--navy);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
	border: 1px solid var(--line);
	flex-shrink: 0;
}

#logout {
	display: flex;
	align-items: center;
	gap: 6px;
}

#logout-timer-div {
	font-size: 10px;
	font-weight: 600;
	color: var(--muted);
	text-align: right;
	white-space: nowrap;
}

.logout-last-minute {
	color: var(--neg);
}

#logout-link-div a {
	width: 36px;
	height: 36px;
	border-radius: 11px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--navy);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	cursor: pointer;
	text-decoration: none;
}

#logout-link-div a:hover {
	background: var(--tint-2);
	opacity: 1;
}

/* ── toolbar / weeknav / tbtn ── */
.weeknav {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--navy);
}

.weeknav .nav {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: var(--navy);
	cursor: pointer;
}

.weeknav .nav:hover {
	background: var(--tint-2);
}

.weeknav .wk {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-evenly;
	padding: 2px 14px;
	min-width: 188px;
	cursor: pointer;
}

.weeknav .wk div {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.weeknav .wk b {
	font-size: 15px;
	font-weight: 700;
	color: var(--navy);
}

.weeknav .wk small {
	font-size: 11.5px;
	color: var(--muted);
	font-weight: 600;
}

.tbtn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 13px;
	border-radius: 10px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--navy);
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
	box-sizing: border-box;
	cursor: pointer;
	flex-shrink: 0;
}

.tbtn:hover {
	background: var(--tint-2);
}

.tbtn .bi {
	font-size: 14px;
}

.tbtn.icon {
	padding: 0 11px;
	justify-content: center;
}

.tbtn.accent {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
	box-shadow: 0 4px 12px rgba(42, 111, 219, .28);
}

.tbtn.accent:hover {
	opacity: .88;
	background: var(--accent);
}

/* Events (Bedarfsplaner) sind durchgehend violett — Balken, Editor und der Toolbar-Button. */
.tbtn.violet {
	background: var(--violet);
	border-color: var(--violet);
	color: #fff;
	box-shadow: 0 4px 12px rgba(122, 90, 240, .28);
}

.tbtn.violet:hover {
	opacity: .88;
	background: var(--violet);
}

.tbtn.muted {
	color: var(--muted);
}

/* Freigabe (Mitarbeiteransicht) grün wie "Bereich freigeben" in den Bereichsköpfen */
.tbtn.ok {
	background: var(--pos);
	border-color: var(--pos);
	color: #fff;
	box-shadow: 0 4px 12px rgba(31, 138, 91, .28);
}

.tbtn.ok:hover {
	opacity: .88;
	background: var(--pos);
}

.kopieren-tb-div {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* Zusammengehörige Toolbar-Buttons (z.B. Sortierung) enger gruppiert als der normale Toolbar-Abstand */
.tb-gruppe {
	display: flex;
	align-items: center;
	gap: 4px;
}

.kw-select {
	width: auto;
	padding: 0 8px;
	margin: 0;
}

/* Aktive-Vorlage-Select in der Toolbar (templatesRail.js:erstelleToolbarVorlagenSelect) — die
   Auswahl passiert inzwischen über die Vorlagen-Karten in der Sidebar (die den Wert dieses Selects
   im Hintergrund mitsetzen, siehe changeVorlageActive), ein sichtbares Dropdown in der Toolbar
   daneben ist redundant. Element bleibt im DOM (wird von schichtAdden()/changeVorlageActive()
   weiterhin gelesen/gesetzt), nur visuell ausgeblendet. */
#vorlage-tb-select {
	display: none;
}

#kal-help a {
	display: flex;
	align-items: center;
	justify-content: center;
	color: inherit;
}

/* ── filter bar ── */
.filterbar {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--tint);
	padding: 11px 22px;
	flex-shrink: 0;
	border-bottom: 1px solid var(--line-soft);
	flex-wrap: wrap;
}

.filterbar[hidden] {
	display: none;
}

.filterbar .flab {
	font-size: 12px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .05em;
	display: flex;
	align-items: center;
	gap: 7px;
}

.filterbar .sp {
	flex: 1;
}

.filterbar .fsum {
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	display: flex;
	align-items: center;
	gap: 6px;
}

.fchip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	padding: 6px 8px 6px 12px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--line);
	color: var(--navy);
	cursor: default;
}

.fchip .k {
	color: var(--muted);
	font-weight: 600;
}

.fchip .x {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--tint-2);
	color: var(--muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	cursor: pointer;
}

.fchip .x:hover {
	background: var(--neg-bg);
	color: var(--neg);
}

.fchip.add {
	color: var(--accent);
	border-style: dashed;
	border-color: var(--accent);
	background: var(--accent-soft);
	padding: 6px 13px;
	cursor: pointer;
}

/********************* GRIDWRAP: fpanel | gridscroll | sidebar *********************/

.gridwrap {
	flex: 1;
	overflow: hidden;
	display: flex;
}

/* Filter-Seitenpanel (Bereich/Posten/Qualifikation), LINKS. Standard versteckt, per .offen
   umgeschaltet (siehe fun.toggleFilterPanel), js/components/filterPanel.js baut den Inhalt. */
.fpanel {
	display: none;
	flex-direction: column;
	width: 262px;
	flex-shrink: 0;
	background: var(--panel);
	border-right: 1px solid var(--line-soft);
	overflow-y: auto;
}

.fpanel.offen {
	display: flex;
}

.fpanel .fph {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 15px 16px;
	border-bottom: 1px solid var(--line-soft);
	position: sticky;
	top: 0;
	background: var(--panel);
	font-size: 15px;
	font-weight: 700;
	color: var(--navy);
	z-index: 2;
}

.fpanel .fph .x {
	margin-left: auto;
	color: var(--muted);
	font-size: 14px;
	cursor: pointer;
}

.fsec {
	padding: 13px 16px;
	border-bottom: 1px solid var(--line-soft);
}

/* Suchfeld oben im Filter-Panel (Schichttitel, Name, Personalnummer — filterPanel.js:initSuchfeld). */
.fsuche {
	position: relative;
	display: flex;
	align-items: center;
	margin: 12px 16px 2px;
	height: 38px;
	/* .fpanel ist eine Flex-Spalte: bei vollem Panel würde das Feld sonst auf Inputhöhe gestaucht statt zu scrollen. */
	flex-shrink: 0;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fff;
	padding: 0 10px;
	gap: 8px;
	cursor: text;
}

.fsuche:focus-within {
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(42, 111, 219, .12);
}

.fsuche > .bi-search {
	color: var(--muted-2);
	font-size: 13px;
}

.fsuche input {
	flex: 1;
	min-width: 0;
	border: none;
	outline: none;
	background: transparent;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--ink);
}

.fsuche input::placeholder {
	color: var(--muted-2);
	font-weight: 500;
	opacity: .7;
}

.fsuche-x {
	color: var(--muted-2);
	font-size: 13px;
	cursor: pointer;
}

.fsuche-x:hover {
	color: var(--neg);
}

/* Schichtkarte, deren Titel zur Suche passt (shiftCard.js): ringsum ein Rahmen in der Farbe, die die Karte
 * links ohnehin trägt — als box-shadow statt border, damit die Karte beim Hervorheben nicht springt.
 * EGFZ-Karten haben statt --schicht-farbe eigene Linksfarben (grau/Krank rot/Urlaub akzent). */
.schicht-div.such-treffer {
	--such-farbe: var(--schicht-farbe, var(--accent));
	box-shadow: 0 0 0 1.5px var(--such-farbe);
}

.schicht-div.such-treffer.egfz-schicht {
	--such-farbe: var(--muted-2);
}

.schicht-div.such-treffer.egfz-krank {
	--such-farbe: var(--neg);
}

.schicht-div.such-treffer.egfz-urlaub {
	--such-farbe: var(--accent);
}

/* Spezifischer als .schicht-div:focus und .schicht-div.egfz-schicht:hover (weiter unten), damit der Rahmen
 * beim Hover/Fokus nicht verschwindet. */
.schicht-div.such-treffer:hover,
.schicht-div.such-treffer:focus {
	box-shadow: 0 0 0 1.5px var(--such-farbe), 0 7px 18px rgba(20, 40, 70, .18);
}

.schicht-div.such-treffer.egfz-schicht:hover {
	box-shadow: 0 0 0 1.5px var(--such-farbe);
}

.fsh {
	font-size: 11px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-bottom: 7px;
}

/* Ein-/ausklappbare Filter-Sektionen (Bereich/Posten/Einsatzort/Qualifikation), analog zur
   Bereichs-/Postenzeile im Grid (siehe .areahead .ch). Sitzt auf dem statischen .fsh-Markup in
   Dienstplaner.html statt im per neuZeichnen() neu gebauten Listen-Inhalt, damit der Ein-/Ausklapp-
   Zustand über Filter-Änderungen hinweg erhalten bleibt — siehe filterPanel.js:toggleFilterSektion. */
.fsh-toggle {
	display: flex;
	align-items: center;
	cursor: pointer;
}

.fsh-toggle .ch {
	margin-left: auto;
	font-size: 10px;
	transition: transform .15s;
}

.fsh-toggle.eingeklappt {
	margin-bottom: 0;
}

.fsh-toggle.eingeklappt .ch {
	transform: rotate(-90deg);
}

.fopt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 0;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--muted);
	cursor: pointer;
}

.fopt .cb {
	width: 18px;
	height: 18px;
	border-radius: 6px;
	border: 1.5px solid var(--line);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	color: #fff;
}

.fopt .cb i {
	display: none;
}

.fopt.on .cb {
	background: var(--accent);
	border-color: var(--accent);
}

.fopt.on .cb i {
	display: inline;
}

.fopt .cnt {
	margin-left: auto;
	font-size: 11px;
	color: var(--muted-2);
	font-weight: 700;
	flex-shrink: 0;
	white-space: nowrap;
}

.fopt.on {
	color: var(--navy);
}

.fopt.alle {
	font-weight: 700;
	padding-bottom: 10px;
	margin-bottom: 3px;
	border-bottom: 1px solid var(--line-soft);
}

.fpanel .ffoot {
	margin-top: auto;
	display: flex;
	gap: 10px;
	padding: 14px 16px;
	border-top: 1px solid var(--line-soft);
	background: var(--tint);
	position: sticky;
	bottom: 0;
}

.fpanel .ffoot .tbtn {
	flex: 1;
	justify-content: center;
}

/* Grid-Scroll-Bereich: einziges scrollendes Element (vertikal + horizontal), hält .wgrid */
.gridscroll {
	position: relative;
	flex: 1;
	overflow: auto;
	padding: 0 4px 6px;
}

/* Lade-Overlay während eines Wochen-/Bereichs-/Betriebswechsels — deckt bewusst nur den Grid-Bereich
   ab (nicht appbar/toolbar/filterbar/fpanel/sidebar), siehe dienstplan.js:zeigeDienstplan
   show-/hideGridLoader. Analog zum .mu-grid-loader Muster in monatsuebersicht.js/ma_monatsuebersicht.html. */
.dp-grid-loader {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg);
}

.dp-grid-loader::before {
	content: '';
	width: 34px;
	height: 34px;
	border: 3px solid var(--line);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: dp-grid-spin .8s linear infinite;
}

@keyframes dp-grid-spin {
	to { transform: rotate(360deg); }
}

/* Vorlagen-Sidebar (Schichtvorlagen-Rail), RECHTS. */
.sidebar {
	width: 172px;
	flex-shrink: 0;
	background: var(--panel);
	border-left: 1px solid var(--line-soft);
	display: flex;
	flex-direction: column;
	padding: 8px 6px;
	gap: 8px;
	overflow-y: auto;
}

.side-h {
	font-size: 13px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .05em;
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

/* Volle Breite für einen Toolbar-Button (.tbtn) in der Sidebar, z.B. "Vorlagen bearbeiten". */
.tbtn.side-btn {
	width: 100%;
	justify-content: center;
	flex-shrink: 0;
}

.side-select-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	min-width: 0;
	width: 100%;
}

.side-select-wrap select {
	appearance: none;
	margin: 0;
	background: var(--tint-2);
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--muted-2);
	font: inherit;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	padding: 6px 12px;
	cursor: pointer;
	max-width: 100%;
	width: 100%;
}

.side-select-wrap .bi-chevron-down {
	position: absolute;
	right: 8px;
	font-size: 13px;
	color: var(--muted-2);
	pointer-events: none;
}

#vorlagen-liste {
	/* 2 Spalten: die kurzen EGFZ-Karten (Krank, Urlaub, ...) liegen als kleines Raster nebeneinander, die
	   echten Vorlagen (.vorlagen-liste-item) belegen die volle Breite. */
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	/* Zeilen immer in Inhaltshöhe: bei auto-Zeilen ersetzt die explizite min-height:30px von .schicht-div
	   die Untergrenze, bei voller Liste würden die Karten sonst auf 30px gestaucht statt zu scrollen. */
	grid-auto-rows: max-content;
	align-content: start;
	gap: 6px;
	overflow-y: auto;
	min-height: 0;
	flex: 1 1 auto;
	/* overflow-y:auto clips overflow-x too (per spec, once one axis isn't visible the other
	   defaults to auto) — this padding gives the active-item box-shadow/hover-shadow room to
	   render before hitting that clip boundary. .sidebar's own padding was reduced by the same
	   amount above so the card width/inset from the sidebar edge stays the same as before. */
	padding: 4px;
}

#vorlagen-liste .schicht-div.vorlage-liste-item-active {
	background: var(--accent-soft);
	border-color: var(--accent) !important;
	box-shadow: 0 0 0 2px rgba(42, 111, 219, .18);
}

#vorlagen-liste .schicht-div.vorlagen-liste-item {
	grid-column: 1 / -1;
}

#vorlagen-liste .schicht-div.egfz-schicht {
	min-height: 36px;
	padding: 6px
}

/* Lange Namen ("unentschuldigt krank") in der halben Breite auf max. 2 Zeilen umbrechen, darüber hinaus
   abschneiden; voller Name steht im title-Tooltip. */
#vorlagen-liste .schicht-div.egfz-schicht .schicht-inhalt {
	min-width: 0;
	overflow: hidden;
}

#vorlagen-liste .schicht-div.egfz-schicht .schicht-titel {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	font-size: 10px;
	overflow: hidden;
	overflow-wrap: anywhere;
	text-align: center;
}

/* Markierung einer als Kopiervorlage selektierten Dienstplan-Schicht */
.schicht-div.schicht-kopier-quelle,
.schicht-div.schicht-kopier-quelle:hover {
	border-color: var(--pos);
	color: #fff;
	box-shadow:
		0 0 0 3px rgba(31, 138, 91, .30),
		0 6px 16px rgba(31, 138, 91, .38);
	animation: kopier-quelle-pulse 1.8s ease-in-out infinite;
}

@keyframes kopier-quelle-pulse {
	0%, 100% {
		box-shadow:
			0 0 0 3px rgba(31, 138, 91, .30),
			0 6px 16px rgba(31, 138, 91, .32);
	}
	50% {
		box-shadow:
			0 0 0 6px rgba(31, 138, 91, .12),
			0 6px 20px rgba(31, 138, 91, .48);
	}
}

@media (prefers-reduced-motion: reduce) {
	.schicht-div.schicht-kopier-quelle {
		animation: none;
	}
}

#kopier-quelle-anzeige[hidden] { display: none; }
#kopier-quelle-anzeige {
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	background: var(--pos-bg);
	border: 1px solid var(--pos);
	border-radius: 11px;
	padding: 8px;
	box-sizing: border-box;
	gap: 7px;
}
#kopier-quelle-preview {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

#kopier-quelle-preview .schicht-div.kopier-quelle-vorschau:hover {
	cursor: default;
}
#kopier-quelle-clear {
	font-size: 14px;
}

.vorlage-liste-item {
	display: flex;
	justify-content: center;
}

/********************* WGRID: die Wochenplan Tabelle *********************/

.wgrid {
	display: grid;
	grid-template-columns: minmax(200px, 1.25fr) minmax(150px, 0.75fr) repeat(7, minmax(100px, 1fr)) 0.75fr;
	gap: 2px;
	align-content: start;
	width: 100%;
	min-width: 100%;
	padding-top: 2px;
}

/* ── Spaltenköpfe: Mitarbeiter/Status/7×Tag/Woche, ein Grid-Kind pro Spalte, sticky oben ── */
.colhead {
	position: sticky;
	top: 0;
	z-index: 5;
	background: #fff;
	color: var(--navy);
	border: 1px solid var(--line);
	border-radius: 13px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 8px 4px;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	min-height: 56px;
	box-shadow: var(--shadow-sm);
}

.colhead small {
	font-size: 10.5px;
	font-weight: 600;
	color: var(--muted-2);
	margin-top: 1px;
}

.colhead.lbl {
	align-items: flex-start;
	justify-content: center;
	text-align: left;
	padding-left: 16px;
	font-size: 11px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .06em;
}

.colhead.we {
	background: var(--tint);
	color: var(--muted);
}
.colhead.we small {
	color: var(--muted-2);
}

.colhead.num {
	align-items: flex-end;
	text-align: right;
	padding-right: 12px;
	font-size: 11px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .05em;
}

.colhead.today {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
	box-shadow: 0 6px 16px rgba(42, 111, 219, .32);
}
.colhead.today small {
	color: #dce9fb;
}

/* .feiertag-label ist normal dunkelgrün (#12866e, siehe unten) — auf dem blauen .colhead.today-
   Hintergrund liegt das fast auf derselben Helligkeit wie --accent (~1.5:1 Kontrast), also praktisch
   unlesbar. Helles Mint statt der Ganztags-Textfarbe #dce9fb (die schon .colhead.today small/.wxp
   nutzen), damit das Feiertags-Label optisch weiterhin als "grün" erkennbar und vom Datum/Wetter-Text
   unterscheidbar bleibt, aber ausreichend Kontrast zum blauen Hintergrund hat (~4:1, vergleichbar mit
   dem bereits bestehenden #dce9fb-Kontrast von small/.wxp auf derselben Fläche). */
.colhead.today .feiertag-label {
	color: #c9f7e3;
}

.wx {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 3px;
}
.wxp {
	display: flex;
	align-items: center;
	gap: 2px;
	font-size: 9.5px;
	font-weight: 700;
	color: var(--muted);
}
.wxp .bi {
	font-size: 10px;
}
.colhead.today .wxp {
	color: #dce9fb;
}

/* ── Tagesnotizen: eine extra Zeile direkt unter dem Spaltenkopf (kein Reference-Äquivalent,
   reale Backend-Funktion, siehe js/toolbar.js:updateTagesNotiz) ── */
.notizcell {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 13px;
	padding: 6px;
	min-height: 44px;
	display: flex;
}
.notizcell.lbl {
	align-items: center;
	padding-left: 16px;
	font-size: 11px;
	font-weight: 700;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .06em;
}
.notizcell.num {
	align-items: center;
	justify-content: flex-end;
	padding-right: 12px;
	font-size: 11px;
	font-weight: 700;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .05em;
}

/* ── Offener Bedarf: Zeile direkt unter den Spaltenköpfen ── (reference/offener-bedarf/, components/bedarfZeile.js)
 * .blbl (Name + Status) · 7× .bcell · .bsum. Bewusst nicht sticky (scrollt mit dem Raster).
 * Chips in Schriftgrößen der Schichtkarten; Tageszellen scrollen ab ca. drei Chips. */
.blbl {
	grid-column: 1 / 3;
	display: flex;
	align-items: center;
	gap: 10px;
	background: linear-gradient(135deg, #fdeaec, #fdf3f4);
	border: 1px solid var(--neg);
	border-left: 4px solid var(--neg);
	border-radius: 13px;
	padding: 8px 12px;
	min-width: 0;
}
.blbl .bic {
	width: 30px;
	height: 30px;
	border-radius: 9px;
	background: var(--neg);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	flex-shrink: 0;
}
.blbl .bt {
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
	line-height: 1.2;
}
.blbl .bs {
	font-size: 10.5px;
	font-weight: 600;
	color: var(--muted);
	margin-top: 2px;
}
/* Woche ohne offenen Bedarf: grün und flacher */
.blbl.clear {
	background: linear-gradient(135deg, var(--pos-bg), #f3faf6);
	border-color: var(--pos);
}
.blbl.clear .bic {
	background: var(--pos);
}

.bcell {
	background: #fff;
	border: 1px solid var(--line-soft);
	border-radius: 13px;
	padding: 6px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-height: 74px;
	/* ab ca. drei Chips scrollt die Zelle, damit die klebende Zeile nicht zu hoch wird */
	max-height: 140px;
	overflow-y: auto;
	scrollbar-width: thin;
}
.bcell.we {
	background: var(--tint);
}
.bcell.feiertag {
	background: var(--pos-bg);
}
.bcell.clear {
	align-items: center;
	justify-content: center;
}
.bcell.flach,
.bsum.flach {
	min-height: 40px;
}
.bcell .clr {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 10.5px;
	font-weight: 700;
	color: var(--pos);
	background: var(--pos-bg);
	border-radius: 7px;
	padding: 3px 8px;
}
.bcell .clr.leer {
	color: var(--muted);
	background: var(--tint-2);
}

/* Chip = eine offene Bedarfszeile; rot = niemand zugeordnet, amber = teilweise */
.bopen {
	position: relative;
	flex-shrink: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 5px;
	row-gap: 1px;
	align-items: center;
	width: 100%;
	text-align: left;
	font-family: inherit;
	background: var(--neg-bg);
	border: 1px solid var(--neg);
	border-radius: 10px;
	padding: 5px 8px;
	cursor: pointer;
	transition: box-shadow .12s;
}
.bopen .pn {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--navy);
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.bopen .pn small {
	margin-left: 4px;
	font-size: 10px;
	font-weight: 600;
	color: var(--muted-2);
}
.bopen .pc {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--neg);
	font-variant-numeric: tabular-nums;
}
.bopen .tm {
	grid-column: 1 / 3;
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.bopen.part {
	background: var(--amber-bg);
	border-color: var(--amber);
}
.bopen.part .pc {
	color: var(--amber);
}
/* Event-Bedarf: linker Rand + Icon in der Farbe des Events (--evf, siehe util/eventFarben.js) */
.bopen.ev {
	border-left: 3px solid var(--evf, var(--violet));
}
.bopen.ev .tm .bi {
	color: var(--evf, var(--violet));
}
.bopen:hover,
.bopen:focus-visible {
	outline: none;
	box-shadow: 0 4px 10px rgba(29, 47, 80, .16);
}
.bopen .asg {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: var(--accent);
	color: #fff;
	border-radius: 9px;
	font-size: 11px;
	font-weight: 700;
}
.bopen:hover .asg,
.bopen:focus-visible .asg {
	display: flex;
}

.bsum {
	background: var(--neg);
	color: #fff;
	border-radius: 11px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
}
.bsum b {
	font-size: 19px;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.bsum span {
	font-size: 10px;
	font-weight: 700;
	opacity: .85;
}
.bsum.clear {
	background: var(--pos);
}
.bsum.clear .bi {
	font-size: 18px;
	line-height: 1;
}
/* Wochenplan + Mitarbeiteransicht: Tageszellen der Bedarfszeile leicht eingefärbt (wie das Label), damit sich
 * die Zeile von den Mitarbeiterzeilen absetzt. Gedeckte Woche (.flach) grün. */
.wgrid .bcell {
	background: #fdf3f4;
	border-color: #f5c6cb;
}
.wgrid .bcell.flach {
	background: #f3faf6;
	border-color: #bfe3cf;
}
.tages-notiz {
	width: 100%;
	border: none;
	background: transparent;
	resize: none;
	color: var(--navy);
	font: inherit;
	font-size: 11.5px;
	font-weight: 600;
	text-align: center;
}
.tages-notiz:focus {
	outline: none;
	background: #fff;
	border-radius: 8px;
}

/* ── Bereichs-/Posten-Kopfzeile ── */
.areahead {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 11px;
	background: var(--tint-2);
	color: var(--navy);
	border-radius: 13px;
	border-left: 4px solid var(--navy);
	padding: 10px 16px;
	margin-top: 8px;
	cursor: pointer;
}
.areahead .ch {
	font-size: 12px;
	color: var(--muted-2);
	transition: transform .15s;
}
.areahead.area-header-closed .ch {
	transform: rotate(-90deg);
}
.areahead .badge {
	width: 28px;
	height: 28px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	color: #fff;
	background: var(--navy);
	flex-shrink: 0;
}
.areahead .nm {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .02em;
}
.areahead .ct {
	font-size: 12px;
	font-weight: 700;
	padding: 2px 9px;
	border-radius: 999px;
	color: #fff;
	background: var(--navy);
}
.areahead .sp {
	flex: 1;
}
.areahead .ahbtn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	font-weight: 700;
	border-radius: 9px;
	padding: 6px 12px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--navy);
	cursor: pointer;
}
.areahead .ahbtn:hover {
	opacity: .8;
}
.areahead .ahbtn.ok {
	background: var(--pos);
	border-color: transparent;
	color: #fff;
}

/* Bereichs-Ebene (bereich-header, js/dienstplan.js:addBereichHeaderRow), Farbe dynamisch via
   --bereich-farbe (bereichFarben.js) statt der drei festen b-service/b-kueche/b-bar Klassen aus
   dem Reference-Mock, da Bereiche echte, unbegrenzt viele Stammdaten sind. */
.bereich-header {
	border-left-color: var(--bereich-farbe, var(--navy));
	background: color-mix(in srgb, var(--bereich-farbe, var(--navy)) 12%, var(--tint-2));
}
.bereich-header .badge {
	background: var(--bereich-farbe, var(--navy));
}
.bereich-header .nm {
	color: var(--bereich-farbe, var(--navy));
}
.bereich-header .ct {
	background: var(--bereich-farbe, var(--navy));
}

/* Posten-Ebene (area-header-template) — subordiniert unter der Bereichszeile: kleiner, eingerückt,
   ungefärbt (die Bereichsfarbe wurde bereits eine Zeile darüber kommuniziert). */
.areahead-posten {
	margin-top: 6px;
	padding: 6px 16px;
	border-left-width: 3px;
}
.areahead-posten .badge {
	width: 22px;
	height: 22px;
	font-size: 11px;
}
.areahead-posten .nm {
	font-size: 13px;
}
.areahead-posten .ct {
	background: var(--muted-2);
}

.area-header.hidden,
[aria-level].hidden {
	display: none;
}

/* ── Mitarbeiter-Zelle ── */
.macell {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 13px;
	padding: 4px 6px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.macell .av {
	width: 36px;
	height: 36px;
	font-size: 13px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	flex-shrink: 0;
	background: color-mix(in srgb, var(--bereich-farbe, var(--navy)) 16%, white);
	color: var(--bereich-farbe, var(--navy));
	position: relative;
}
/* Profilbild über den Initialen (dienstplan.js:zeigeMitarbeiterZelle); Ring in der Bereichsfarbe */
.macell .av .av-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--bereich-farbe, var(--navy));
}
.macell-info {
	flex: 1;
	min-width: 0;
}
.macell .nm {
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
	line-height: 1.15;
	hyphens: auto;
}
/* Personalnummer immer in eigener Zeile über dem Namen */
.macell .nm .pnr {
	display: block;
	margin-bottom: 1px;
	font-size: 9.5px;
	font-weight: 600;
	color: var(--muted-2);
	opacity: .75;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.macell .ql {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	margin-top: 4px;
}
.qtag {
	font-size: 9.5px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 5px;
	background: var(--tint-2);
	color: var(--muted);
}
.qtag.lead {
	background: var(--accent-soft);
	color: var(--accent);
}
.macell .chk {
	margin-left: auto;
	width: 16px;
	height: 16px;
	border-radius: 4px;
	border: 1.5px solid var(--line);
	flex-shrink: 0;
	appearance: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.macell .chk:checked {
	background: var(--accent);
	border-color: var(--accent);
}
.macell .chk:checked::after {
	font-family: 'bootstrap-icons' !important;
	content: '\f633'; /* bi-check-lg */
	color: #fff;
	font-size: 11px;
	line-height: 1;
}

.macell.tot {
	background: #fff;
	font-weight: 700;
	color: var(--navy);
	font-size: 13px;
	align-items: center;
	justify-content: flex-start;
	padding: 4px 16px;
}
.macell.tot.grand {
	background: var(--navy);
	color: #fff;
}

/* ── Status-Zelle ── (reference/statuszelle_v2/STATUSZELLE.md, gerendert von dienstplan.js:renderStatusZelle)
 * Oben Plan- und Ist-Spur (gemeinsame Skala, Monatssoll), darunter reine Zahlen: Resturlaub,
 * Gutzeit-Saldo, AG-Kosten/h (nur Budget-Rollen). Alles unter .statuscell geschachtelt, weil Kurznamen
 * wie .k/.v/.n anderswo (Filter-Chips, Summenzellen) schon belegt sind. */
.statuscell {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 11px;
	padding: 5px 9px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	min-width: 0;
	cursor: pointer;
}
.statuscell:not(.tot-label):hover,
.statuscell:not(.tot-label):focus-visible {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
	outline: none;
}

/* Stunden: Plan vs. Ist */
.statuscell .hrs {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.statuscell .hrs .hd {
	display: flex;
	align-items: baseline;
	gap: 4px;
	min-width: 0;
	/* Notbremse für extrem schmale Spalten: nichts ragt über die Zelle hinaus. */
	overflow: hidden;
}
.statuscell .hrs .big {
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
	line-height: 1;
	letter-spacing: -.01em;
}
.statuscell .hrs .of {
	font-size: 10.5px;
	font-weight: 600;
	color: var(--muted-2);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
/* Rechts im Kopf: Abweichung (.dv). Nur sie darf schrumpfen und wird bei zu
 * schmaler Spalte mit "…" abgeschnitten — Plan-Zahl und "/ Soll h" bleiben immer vollständig. */
.statuscell .hrs .big,
.statuscell .hrs .of {
	flex-shrink: 0;
}
.statuscell .hrs .dv {
	margin-left: auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
/* Abweichung Ist − Plan bis heute: grün wie geplant, amber weniger, rot mehr */
.statuscell .hrs .dv {
	font-size: 9.5px;
	font-weight: 700;
	border-radius: 4px;
	padding: 1px 4px;
	line-height: 1.25;
	font-variant-numeric: tabular-nums;
}
.statuscell .hrs .dv.ok {
	color: var(--pos);
	background: var(--pos-bg);
}
.statuscell .hrs .dv.lo {
	color: var(--amber);
	background: var(--amber-bg);
}
.statuscell .hrs .dv.hi {
	color: var(--neg);
	background: var(--neg-bg);
}
.statuscell.over .hrs .big {
	color: var(--neg);
}
.statuscell .trk {
	position: relative;
	height: 5px;
	border-radius: 3px;
	background: #e9eff6;
	overflow: hidden;
}
.statuscell .trk .fil {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	border-radius: 3px;
	background: var(--accent);
}
.statuscell .trk .fil.warn {
	background: var(--amber);
}
.statuscell .trk .fil.over {
	background: var(--neg);
}
.statuscell .trk .fil.erf.ok {
	background: var(--navy);
}
.statuscell .trk .fil.erf.lo {
	background: var(--amber);
}
.statuscell .trk .fil.erf.hi {
	background: var(--neg);
}
.statuscell .trk .tgt {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1.5px;
	background: rgba(255, 255, 255, .95);
}
/* Zwei Spuren PLAN / IST mit Wert rechts */
.statuscell .duo {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	column-gap: 5px;
	row-gap: 1px;
	align-items: center;
	line-height: 1.2;
}
.statuscell .duo .l {
	font-size: 7.5px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--muted-2);
}
.statuscell .duo .n2 {
	font-size: 10px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
	text-align: right;
	min-width: 20px;
}
.statuscell .duo .trk {
	height: 3px;
}

/* reine Zahlen — Label neben dem Wert in einer Zeile (Design-Vorschlag "Statuscell – schlanke Variante") */
.statuscell .nums {
	display: flex;
	align-items: center;
	/* Abstand links vom Trenner (der rechtsbündige Wert stünde sonst direkt an der Linie); rechts davon padding-left */
	gap: 6px;
	border-top: 1px solid var(--line);
	padding-top: 4px;
}
.statuscell .nums .n {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	/* Label + Wert rechtsbündig im jeweiligen Abschnitt */
	justify-content: flex-end;
	gap: 2px;
	min-width: 0;
	flex: 1 1 auto;
	line-height: 1.2;
}
/* Labels nie abschneiden — schrumpfen darf nur der Wert */
.statuscell .nums .n .k {
	flex: none;
	overflow: visible;
}
.statuscell .nums .n + .n {
	border-left: 1px solid var(--line);
	padding-left: 3px;
}
.statuscell .nums .k {
	position: relative;
	display: flex;
	align-items: center;
	gap: 2px;
	/* gleiche Typo wie PLAN/IST darüber (.duo .l) */
	font-size: 7.5px;
	font-weight: 700;
	letter-spacing: .01em;
	text-transform: uppercase;
	color: var(--muted-2);
	white-space: nowrap;
	overflow: hidden;
	line-height: 1.35;
}
/* Einheiten wie "€/h" nicht in Großbuchstaben */
.statuscell .nums .k.klein {
	text-transform: none;
}
.statuscell .nums .k .bi {
	font-size: 8.5px;
	line-height: 1;
}
.statuscell .nums .k .ua-antrag-icon {
	display: inline-block;
	transform: rotate(45deg);
}
/* Offener Urlaubsantrag: amber Punkt am Flugzeug */
.statuscell .nums .k .pend {
	position: absolute;
	/* oben links NEBEN dem Flugzeug (Platz dafür schafft das padding-left unten), weißer Ring zur Abgrenzung */
	top: -3px;
	left: -1px;
	width: 6px;
	height: 6px;
	box-shadow: 0 0 0 1.5px #fff;
	border-radius: 50%;
	background: var(--amber);
}
/* Platz links vom Flugzeug für den Punkt, damit er das Icon nicht verdeckt */
.statuscell .nums .k:has(.pend) {
	padding-left: 5px;
}
.statuscell .nums .v {
	min-width: 0;
	/* gleiche Größe wie die Werte neben den Balken (.duo .n2) */
	font-size: 10px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.statuscell .nums .v em {
	font-style: normal;
	font-weight: 600;
	font-size: 8.5px;
	color: var(--muted-2);
	margin-left: 1px;
}
.statuscell .nums .n.warn .v {
	color: var(--amber);
}
.statuscell .nums .n.neg .v {
	color: var(--neg);
}
.statuscell.tot-label {
	cursor: default;
	display: flex;
	/* .statuscell ist eine Spalte (Stunden über Zahlen) — das Summen-Label wieder als Zeile, rechtsbündig. */
	flex-direction: row;
	gap: 0;
	align-items: center;
	justify-content: flex-end;
	text-align: right;
	font-size: 10px;
	color: var(--muted);
	font-weight: 700;
	line-height: 1.3;
	padding: 4px 10px;
}
.statuscell.grand {
	background: var(--navy);
}
.statuscell.tot-label.grand {
	color: #fff;
}

/* ── Tages-Zelle ── */
.daycell {
	position: relative;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 7px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-height: 60px;
}
.daycell.we {
	background: var(--tint);
}
.daycell.pos {
	background: var(--pos-bg);
}
.daycell.neg {
	background: var(--neg-bg);
}
/* Inaktiv (vor Eintritt/nach Austritt) hat Vorrang vor allen anderen Tagesfarben — .feiertag steht weiter
 * unten in der Datei und würde bei gleicher Spezifität gewinnen, daher die eigene Kombination. */
.daycell.inactive,
.daycell.feiertag.inactive {
	background: repeating-linear-gradient(45deg, #f1f4f8, #f1f4f8 6px, #e9eef4 6px, #e9eef4 12px);
}
.daycell .daymeta {
	display: flex;
	gap: 4px;
	align-items: center;
	flex-wrap: wrap;
}
.dbadge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 9.5px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 999px;
	line-height: 1.4;
}
.dbadge .bi {
	font-size: 10px;
}
.dbadge.pos {
	background: var(--pos-bg);
	color: var(--pos);
}
.dbadge.neg {
	background: var(--neg-bg);
	color: var(--neg);
}
.dbadge.cake {
	background: #fdeef0;
	color: #c0485a;
}
.daycell .addbtn {
	margin-top: auto;
	align-self: center;
	color: var(--muted-2);
	font-size: 15px;
	opacity: .5;
	cursor: pointer;
}
.daycell .addbtn:hover {
	color: var(--accent);
	opacity: 1;
}

.dbadge.urlaub i {
	transform: rotate(45deg);
}

/* Sobald eine echte Schicht in der Zelle liegt (shiftCard.js setzt .wunschzeit-hide), verschwindet
   nur der Wunschzeit-Hinweis-Chip — Geburtstag/andere daymeta-Badges bleiben sichtbar. */
.daycell.wunschzeit-hide .dbadge.pos,
.daycell.wunschzeit-hide .dbadge.neg {
	display: none;
}

.daycell.tot {
	background: #fff;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 4px 7px;
}
.daycell.tot .h {
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
}
.daycell.tot .k {
	font-size: 10px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}
.daycell.tot.we {
	background: var(--tint);
}
.daycell.tot.grand {
	background: var(--navy);
}
.daycell.tot.grand .h {
	color: #fff;
}
.daycell.tot.grand .k {
	color: #aec6ee;
}
.daycell.tot.grand.we {
	background: var(--navy-2);
}

/* ── Summen-Zelle ── */
.sumcell {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 11px;
	padding: 8px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	text-align: right;
}
.sumcell .h {
	font-size: 14px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
}
.sumcell .k {
	font-size: 10.5px;
	color: var(--muted);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.sumcell.grand {
	background: var(--navy);
}
.sumcell.grand .h {
	color: #fff;
}
.sumcell.grand .k {
	color: #aec6ee;
}

.feiertag-label {
	color: #12866e;
	font-size: 9px;
	text-overflow: ellipsis;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
}
.daycell.feiertag {
	background: var(--pos-bg);
}

.ua-antrag-icon {
	cursor: pointer;
}
.ua-antrag-icon:hover {
	opacity: 0.7;
}

.highlight-element {
	background-color: yellow;
	border-color: yellow;
}

/********************* SCHICHT ELEMENTE (Redesign) *********************/

/* Kartenfarbe folgt der (per Schichtfarbe-Swatch gewählten, siehe shiftCard.js/templatesRail.js)
   --schicht-farbe Custom Property: Rand in voller Farbe, Hintergrund eine helle color-mix()-Abtönung
   davon — analog zu den fest codierten EGFZ-Varianten weiter unten (.egfz-krank/.egfz-urlaub) bzw.
   .bereich-header/.macell .av, nur eben für eine dynamische statt fester Farbe. 10% Mischanteil
   entspricht in etwa den handkuratierten --pos-bg/--neg-bg/--accent-soft-Tokens (~6–12%). Ohne
   gesetzte --schicht-farbe (kein SchichtFarbe auf der Schicht) fällt beides auf --accent zurück,
   das bisherige Default. */
.schicht-div {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-self: stretch;
	justify-content: flex-start;
	width: auto;
	margin: 0;
	padding: 6px 16px 6px 10px;
	gap: 1px;
	background: color-mix(in srgb, var(--schicht-farbe, var(--accent)) 10%, white);
	border-left: 3px solid var(--schicht-farbe, var(--accent));
	border-radius: 10px;
	color: var(--navy);
	transition: box-shadow .15s;
	/* Mindesthöhe knapp über der natürlichen Größe der Urlaub-Karte (Zeile mit Icon), damit textlastige
	Karten wie "Schule" nicht kleiner wirken, ohne die kompakte Urlaub-Karte selbst aufzublähen. */
	min-height: 28px;
}

.schicht-div:hover,
.schicht-div:focus {
	color: var(--navy);
	cursor: pointer;
	box-shadow: 0 7px 18px rgba(20, 40, 70, .18);
}

.schicht-div.vorlagen-liste-item {
	background: unset;
	border: 1px solid var(--schicht-farbe, var(--accent));
	border-left: 3px solid var(--schicht-farbe, var(--accent));
}
.schicht-div.egfz-schicht:hover,
.schicht-div.vorlagen-liste-item:hover {
	background: color-mix(in srgb, var(--schicht-farbe, var(--accent)) 10%, white);
	border-left: 3px solid var(--schicht-farbe, var(--accent));
}

.schicht-div.s-kueche {
	border-color: var(--c-kueche);
}
.schicht-div.s-kueche .schicht-beschreibung {
	color: var(--c-kueche);
}
.schicht-div.s-bar {
	border-color: var(--c-bar);
}
.schicht-div.s-bar .schicht-beschreibung {
	color: var(--c-bar);
}

.schicht-div.egfz-schicht {
	background: var(--tint-2);
	border-left-color: var(--muted-2);
	border-left-style: solid;
	border-top: none;
	border-right: none;
	border-bottom: none;
	color: var(--muted);
	justify-content: center;
}

.schicht-div.egfz-schicht .schicht-inhalt {
	margin: auto;
}

.schicht-div.egfz-schicht:hover {
	cursor: not-allowed;
	box-shadow: none;
}

.schicht-div.egfz-krank {
	background: var(--neg-bg);
	border-left-color: var(--neg);
	border-left-style: solid;
}
.schicht-div.egfz-krank .schicht-titel {
	color: var(--neg);
}

.schicht-div.egfz-urlaub {
	background: var(--accent-soft);
	border-left-color: var(--accent);
	border-left-style: solid;
	flex-direction: row;
	align-items: center;
	gap: 7px;
}
.schicht-div.egfz-urlaub .schicht-titel {
	color: var(--accent);
}
.schicht-div.egfz-urlaub .tag-urlaub {
	color: var(--accent);
	transform: rotate(45deg);
	font-size: 12px;
}

.schicht-inhalt {
	display: block;
	max-width: 100%;
	text-align: left;
}

.schicht-div.schicht-panel {
	background: var(--tint);
	border-left-color: var(--muted-2);
	border-left-style: dotted;
	border-top: none;
	border-right: none;
	border-bottom: none;
	opacity: .92;
	color: var(--muted);
	flex-direction: row;
	align-items: center;
	gap: 5px;
}

.schicht-div.schicht-panel:hover {
	cursor: help;
	box-shadow: none;
}

.schicht-panel .schicht-inhalt {
	margin: 0;
	flex-direction: row;
}
.schicht-panel .schicht-titel {
	font-size: 11px;
}
.schicht-panel .schicht-beschreibung {
	font-size: 9.5px;
}
.schicht-freigabe-status {
	position: absolute;
	top: 4px;
	right: 6px;
	height: auto;
	margin: 0;
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: 4px;
	transition: opacity .15s;
}

.schicht-div:hover .schicht-freigabe-status {
	opacity: 0;
	pointer-events: none;
}

.schicht-freigabe-status > i {
	font-size: 8px;
	color: var(--muted-2);
}

.schicht-freigabe-status > i.bi-circle-fill {
	color: var(--pos);
}

.schicht-titel {
	font-weight: 700;
	color: var(--navy);
}

.schicht-titel,
.schicht-beschreibung {
	line-height: 1.2;
}
.schicht-titel {
	font-size: 11.5px;
}
.schicht-beschreibung {
	font-size: 10px;
	color: var(--accent);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.egfz-schicht .schicht-beschreibung {
	color: var(--muted);
}

/* Einsatzort-Pill (nur gerendert, wenn die Schicht einem Einsatzort zugeordnet ist, siehe
   shiftCard.js:createSchichtElement) — eigene Zeile unter der Uhrzeit, dezenter als der
   Titel/Zeitraum da nur ergänzende Info. */
.schicht-einsatzort {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 3px;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--tint-2);
	color: var(--muted);
	font-size: 9px;
	font-weight: 700;
	line-height: 1.4;
}
/* Andere Verbraucher des geteilten data-schicht-template (z.B. templatesRail.js für die
   Vorlagen-Sidebar/EGFZ-Karten) füllen/leeren [schicht-einsatzort] nie — anders als
   .schicht-freigabe-status ist diese Zelle nicht position:absolute, ein leeres Element würde also
   trotz fehlendem Inhalt durch padding/margin/line-height Höhe einnehmen (sichtbar z.B. an
   .egfz-schicht-Karten in #vorlagen-liste, die dadurch über ihre min-height:30px hinauswuchsen).
   :empty statt eines display:none in jedem Verbraucher, damit das automatisch für alle gilt. */
.schicht-einsatzort:empty {
	display: none;
}
.schicht-einsatzort .bi {
	font-size: 8.5px;
	color: var(--muted-2);
}

.span-div {
	position: absolute;
	right: 4px;
	bottom: 2px;
	display: flex;
	width: auto;
	float: none;
	justify-content: flex-end;
	align-items: center;
	flex-direction: row;
	gap: 3px;
	margin: 0;
	opacity: 0;
	transform: translateY(3px);
	pointer-events: none;
	transition: opacity .15s, transform .15s;
}

.schicht-div:hover .span-div {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.span-tools {
	float: none;
	font-weight: normal;
	margin: 0;
	font-size: 12px;
	width: 23px;
	height: 23px;
	border-radius: 7px;
	background: #fff;
	border: 1px solid var(--line);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	box-shadow: var(--shadow-sm);
}

.span-tools:hover,
.span-tools:focus {
	text-decoration: none;
	cursor: pointer;
}

.span-tools.span-edit:hover,
.span-tools.span-edit:focus {
	color: var(--accent);
	border-color: var(--accent);
}

.span-tools.span-copy:hover,
.span-tools.span-copy:focus {
	color: var(--pos);
	border-color: var(--pos);
}

.span-tools.span-remove:hover,
.span-tools.span-remove:focus {
	color: var(--neg);
	border-color: var(--neg);
}

/* "+" zum Schicht hinzufügen: kleine Pille unten mittig in der Tageszelle (Stil wie .addbedarf im
 * Bedarfsplaner). Liegt absolut über einem fest reservierten Streifen (padding-bottom der Zelle), damit sie
 * nie über Schichtkarten liegt und keinen Platz im Fluss belegt. */
.daycell:has(> .span-add) {
	padding-bottom: 24px;
}

.span-add {
	position: absolute;
	left: 50%;
	bottom: 3px;
	transform: translateX(-50%);
	width: 90%;
	height: 18px;
	border-radius: 999px;
	border: none;
	box-shadow: none;
	/* nur das Icon, ohne Fläche — dezent, damit die vielen "+" das Raster nicht dominieren */
	background: transparent;
	/* Akzentblau, halbtransparent — passt zu Schichtkarten und Toolbar; beim Hover voll */
	color: var(--accent);
	font-size: 16px;
	opacity: .5;
	transition: opacity .15s, color .15s, background-color .15s;
}

.span-add:focus-visible {
	opacity: 1;
}

.span-add:hover {
	opacity: 1;
	color: var(--accent);
	/* beim Hover als kleine Pille hinterlegt */
	background: var(--accent-soft);
}

/* außerhalb des Beschäftigungszeitraums: nur ausgegraut, Klick zeigt den Hinweis */
.daycell.ma-inaktiv .span-add,
.daycell.ma-inaktiv .span-add:hover {
	color: var(--muted-2);
	opacity: .35;
	cursor: not-allowed;
}

.span-question {
	padding: 5px;
	margin-bottom: auto;
	display: flex;
	vertical-align: top;
	color: var(--custom-yellow);
}

span > i {
	margin: 0px;
}

/*********************  The Modal (background) *********************/
.modal {
	display: none; /* Hidden by default */
	position: fixed; /* Stay in place */
	z-index: 100; /* Sit on top */
	padding-top: 10vh; /* Location of the box */
	left: 0;
	top: 0;
	width: 100%; /* Full width */
	height: 100%; /* Full height */
	overflow: auto; /* Enable scroll if needed */
	background-color: rgba(20, 40, 70, .28);
	backdrop-filter: blur(1px);
}

/* Modal Content — outer dialog shell (see .dlg-head/.dlg-body/.dlg-foot below for the 3 regions) */
.modal-inhalt {
	position: relative;
	background-color: var(--panel, #fff);
	margin: auto;
	padding: 0;
	border: none;
	width: 560px;
	max-width: 90vw;
	max-height: 80vh;
	overflow: hidden;
	border-radius: 22px;
	text-align: left;
	box-shadow: var(--shadow, 0 10px 30px rgba(20, 40, 70, .10));
}

/* The Close Button */
.close {
	position: absolute;
	top: 12px;
	right: 18px;
	color: #fff;
	opacity: .85;
	font-size: 30px;
	line-height: 1;
	font-weight: bold;
	z-index: 2;
}

.close:hover,
.close:focus {
	color: #fff;
	opacity: 1;
	text-decoration: none;
	cursor: pointer;
}

#modal-text {
	display: flex;
	flex-direction: column;
	max-height: 80vh;
}

#modal-tag {
	font-size: 1.5vw;
	font-weight: bold;
	margin: 10px;
}

.modal-p {
	font-size: 1vw;
	margin-left: 0;
}

hr {
	border-style: solid;
	background: black;
}

select {
	padding: 2.5px;
	border-radius: 5px;
	margin: 5px;
	background-color: var(--third-color);
}


/********************* SCHICHT EDITIEREN ELEMENTE *********************/

.schicht-input-div {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
}

.schicht-input-div label {
	margin: 5px;
}

.schicht-input {
	margin: 5px;
	border-radius: 5px;
	max-width: 125px;
	border: 1px solid var(--secondary-color);
	height: 20px;
	box-sizing: border-box;
}

.schicht-input[type="number"] {
	width: 50px;
}

select.schicht-input {
	background-color: white;
	padding: 0;
}

#submitAdd,
#submitEdit {
	padding: 5px;
	width: 100px;
	height: 30px;
}

/********************* SYSTEM NACHRICHTEN *********************/

.nachricht-background {
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.4);
	position: fixed;
	z-index: 1000;
	top: 0;
	left: 0;
	overflow: auto;
}

.nachricht-box {
	margin: auto;
	display: flex;
	flex-direction: column;
	border: 1px solid black;
	border-radius: 10px;
	width: 30vw;
	box-shadow: 0px 0px 20px black;
	position: absolute;
	z-index: 1000;
	overflow-y: auto;
	background-color: white;
	top: 20vh;
	left: 35vw;
}

.nachricht-icon {
	padding: 1%;
	width: auto;
	align-self: center;
	font-size: 20px;
}

.nachricht-icon > span {
	padding: 1%;
}

.bi-exclamation-octagon-fill {
	color: var(--custom-red);
}

.bi-shield-fill-check {
	color: #5bad58;
}

.bi-exclamation-triangle-fill {
	color: orange;
}

.nachricht-inhalt {
	display: flex;
	flex-direction: column;
	justify-content: left;
	margin: 0px 10px 0px 2vw;
	padding: 10px;
}

.nachricht-titel {
	margin: 0;
	margin-bottom: 5px;
}

.nachricht-buttons {
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: #f2f2f2;
	border-bottom-right-radius: 10px;
	border-bottom-left-radius: 10px;
	vertical-align: bottom;
	width: 100%;
}
.nachricht-buttons > button {
	margin: 10px;
	border: 1px solid var(--secondary-color);
	background-color: var(--primary-color);
	color: white;
	border-radius: 5px;
	min-width: 5vw;
	width: auto;
	height: auto;
	padding: 1%;
}

.nachricht-buttons > button:hover {
	background-color: var(--secondary-color);
}

.nachricht-buttons > button:active {
	background-color: var(--secondary-color);
	transform: translateY(1px);
}

.line-break {
	width: 100%;
}

/********************* Schicht-Editor / Vorlage-Editor (reference/editors) *********************/

.dlg {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: 80vh;
}

.dlg-head {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: linear-gradient(135deg, var(--navy), #33508a);
	color: #fff;
	padding: 14px 20px;
	flex-shrink: 0;
}

.dlg-head.accent {
	background: linear-gradient(135deg, var(--accent), #5a94e8);
}

.dlg-head .ic {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .16);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 19px;
	flex-shrink: 0;
}

.dlg-head .ttl {
	font-size: 18px;
	font-weight: 700;
}

.dlg-head .sub {
	font-size: 12.5px;
	color: #bcd0ee;
	margin-top: 3px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.dlg-head .x {
	margin-left: auto;
	font-size: 18px;
	opacity: .85;
	cursor: pointer;
}

.dlg-body {
	flex: 1;
	overflow-y: auto;
	padding: 14px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fld {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.fld > label {
	font-size: 12px;
	font-weight: 700;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.row2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.inp {
	height: 40px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fff;
	display: flex;
	align-items: center;
	padding: 0 12px;
	font-size: 14px;
	color: var(--ink);
	font-weight: 600;
	font-family: inherit;
	width: 100%;
}

.inp .bi {
	color: var(--muted-2);
	margin-left: auto;
}

.inp.ph {
	color: var(--muted-2);
	font-weight: 500;
}

textarea.inp {
	height: auto;
	resize: vertical;
	align-items: flex-start;
}

/* appearance:none entfernt den nativen Pfeil — stattdessen ein eigener Chevron rechts (bi-chevron-down als
 * SVG), damit erkennbar bleibt, dass es eine Auswahl ist. Gesperrte Selects (select:disabled setzt den
 * Hintergrund neu) zeigen bewusst keinen Chevron. */
select.inp {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23405665' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
	padding-right: 34px;
	cursor: pointer;
	/* Legacy `select { margin: 5px; }` (siehe weiter unten, vor-Redesign-Styling für unstyled
	   Selects) wird von .inp nirgendwo zurückgesetzt — .inp selbst setzt kein margin. Ohne dies
	   sitzen alle .inp-Selects (Posten/Qualifikation/Einsatzort) 5px tiefer/weiter rechts als
	   .inp-Inputs/-Textareas in derselben .row2-Zeile und wirken "nicht ausgerichtet". */
	margin: 0;
}

.inp:focus,
.inp:focus-within {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(42, 111, 219, .12);
}

/* Art: eine Segmented-Control steuert die drei (versteckten) Checkboxen Ganztags/OffenerBeginn/
   OffenesEnde — siehe schichtEditor.js:initArtSegment. Datenmodell bleibt unverändert. */
.seg {
	display: flex;
	background: var(--tint-2);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 2px;
	gap: 2px;
}

.seg .o {
	flex: 1;
	text-align: center;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--muted);
	padding: 6px 4px;
	border-radius: 7px;
	cursor: pointer;
}

.seg .o.on {
	background: #fff;
	color: var(--navy);
	box-shadow: var(--shadow-sm);
}

/* Schichtfarbe: feste Vorschlags-Swatches + der native Farbwähler als letzter, "custom" Swatch */
.swatches {
	display: flex;
	gap: 7px;
	flex-wrap: wrap;
}

.sw {
	width: 30px;
	height: 30px;
	border-radius: 9px;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--line);
	cursor: pointer;
	flex-shrink: 0;
	padding: 0;
}

.sw.on {
	box-shadow: 0 0 0 2px var(--accent);
}

.sw-divider {
	width: 1px;
	height: 22px;
	align-self: center;
	background: var(--line);
	flex-shrink: 0;
}

#input-schicht-farbe,
.farbwahl {
	appearance: none;
	background: transparent;
	cursor: pointer;
	border: none;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	padding: 0;
}

#input-schicht-farbe::-webkit-color-swatch,
.farbwahl::-webkit-color-swatch {
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--line);
	padding: 0;
	border-radius: 9px;
}

#input-schicht-farbe::-webkit-color-swatch-wrapper,
.farbwahl::-webkit-color-swatch-wrapper {
	border: none;
	padding: 0;
	border-radius: 9px;
}

#input-schicht-farbe::-moz-color-swatch,
.farbwahl::-moz-color-swatch {
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--line);
	padding: 0;
	border-radius: 9px;
}

/* ── Zeitblöcke ── */
.ztable {
	border: 1px solid var(--line);
	border-radius: 11px;
	overflow: hidden;
}

.ztable .zr {
	display: grid;
	grid-template-columns: 24px 1fr 1fr 96px 70px 30px;
	gap: 6px;
	align-items: center;
	padding: 7px 10px;
	border-top: 1px solid var(--line-soft);
	font-size: 12.5px;
}

.ztable .zr:first-child {
	border-top: none;
}

.ztable .zr.h {
	background: var(--tint);
	border-top: none;
	font-size: 10.5px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .03em;
}

.ztable .zr .num {
	font-weight: 700;
	color: var(--muted-2);
	text-align: center;
}

.ztable .zr .zi {
	height: 32px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #fff;
	display: flex;
	align-items: center;
	padding: 0 9px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
}

.ztable .zr .zi input[type="time"],
.ztable .zr .zi select {
	border: none;
	background: transparent;
	width: 100%;
	height: 100%;
	padding: 0;
	font: inherit;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
}

.ztable .zr .zi select {
	cursor: pointer;
}

.ztable .zr .zi:focus-within {
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(42, 111, 219, .12);
}

.ztable .zr .del {
	color: var(--neg);
	text-align: center;
	cursor: pointer;
}

.addz {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--accent);
	align-self: flex-start;
	cursor: pointer;
	background: none;
	border: none;
	padding: 4px 0;
	font-family: inherit;
}

.ztotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--accent-soft);
	border: 1px solid var(--accent);
	border-radius: 11px;
	padding: 9px 14px;
}

.ztotal .l {
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
}

.ztotal .v {
	font-size: 18px;
	font-weight: 700;
	color: var(--accent);
	font-variant-numeric: tabular-nums;
}

/* ── Schnellauswahl Vorlage: Chips + Suche (Schicht-Editor only, siehe components/vorlagenPicker.js) ── */
.qchips {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.qpick {
	display: flex;
	flex-direction: column;
	gap: 1px;
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 6px 10px;
	background: #fff;
	min-width: 90px;
	cursor: pointer;
}

.qpick.on {
	border-color: var(--accent);
	background: var(--accent-soft);
	box-shadow: 0 0 0 2px rgba(42, 111, 219, .12);
}

.qpick .qt {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--navy);
}

.qpick .qm {
	font-size: 10.5px;
	color: var(--muted);
	font-weight: 600;
}

.qpick.toggle {
	min-width: 0;
	padding: 8px 12px;
}

.qpick.more {
	border-style: dashed;
	border-color: var(--accent);
	background: var(--accent-soft);
	color: var(--accent);
	flex-direction: row;
	align-items: center;
	gap: 7px;
	font-size: 12.5px;
	font-weight: 700;
	min-width: 0;
	padding: 0 12px;
	height: 44px;
}

.vpickwrap {
	position: relative;
}

/* Vorlage-Editor: einzelner .inp-Trigger statt Schnellauswahl-Chips, siehe vorlagenPicker.js
   (renderVorlagenPicker mit { zeigeSchnellauswahl: false }). */
.vselect-trigger {
	cursor: pointer;
	margin: 0;
	text-align: left;
}

.vselect .vpop {
	width: 100%;
}

.vpop {
	position: absolute;
	z-index: 30;
	top: calc(100% + 6px);
	left: 0;
	width: 330px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: var(--shadow);
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 380px;
}

.vpop[hidden] {
	display: none;
}

.vsearch {
	height: 34px;
	border: 1px solid var(--line);
	border-radius: 8px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 10px;
	font-size: 13px;
	color: var(--muted-2);
	font-weight: 600;
	background: var(--tint);
	flex-shrink: 0;
}

.vsearch .bi {
	color: var(--muted-2);
	font-size: 13px;
}

.vsearch input {
	border: none;
	background: transparent;
	outline: none;
	font: inherit;
	font-weight: 600;
	color: var(--ink);
	width: 100%;
}

.vlist {
	overflow-y: auto;
}

.vgrp {
	font-size: 10.5px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .05em;
	padding: 7px 8px 2px;
}

.vopt {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 7px 9px;
	border-radius: 8px;
	border: 1px solid var(--accent);
	border-left: 3px solid var(--accent);
	cursor: pointer;
	margin-bottom: 2px;
}

.vopt.k { border-left-color: var(--c-kueche); }
.vopt.b { border-left-color: var(--c-bar); }
.vopt.a { border-left-color: var(--muted-2); }

.vopt .vt {
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
}

.vopt .vm {
	font-size: 11px;
	font-weight: 600;
	color: var(--muted);
	margin-left: auto;
	font-variant-numeric: tabular-nums;
}

.vopt.on {
	background: var(--accent-soft);
}

.vopt:hover,
.vopt.active {
	background: var(--tint-2);
}

.vfoot {
	border-top: 1px solid var(--line-soft);
	margin-top: 4px;
	padding: 8px 8px 2px;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--accent);
	cursor: pointer;
}

.vhint {
	font-size: 11.5px;
	color: var(--muted);
}

/* ── Vorlage-Editor Vorschau ── */
.vprev {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--tint);
	border: 1px solid var(--line);
	border-radius: 11px;
	padding: 11px 14px;
}

.vprev .pl {
	font-size: 11px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .05em;
}

.vprev .shift {
	width: 150px;
}

.vprev .sum {
	margin-left: auto;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted);
	text-align: right;
	line-height: 1.4;
}

.dlg-foot {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px;
	border-top: 1px solid var(--line-soft);
	background: var(--panel);
	flex-shrink: 0;
}

.dlg-foot .sp {
	flex: 1;
}

.dbtn {
	height: 42px;
	padding: 0 20px;
	border-radius: 11px;
	font-size: 14px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--navy);
	font-family: inherit;
	cursor: pointer;
}

.dbtn:hover {
	background: var(--tint-2);
}

.dbtn.danger {
	color: var(--neg);
	border-color: transparent;
	background: transparent;
}

.dbtn.danger:hover {
	background: var(--neg-bg);
}

.dbtn.primary {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
	box-shadow: 0 4px 12px rgba(42, 111, 219, .28);
}

.dbtn.primary:hover {
	opacity: .9;
	background: var(--accent);
}

#loader-div {
	display: none;
	position: fixed;
	height: 100%;
	width: 100%;
	z-index: 2000;
	background-color: rgba(0, 0, 0, 0.5);
	top: 0;
	left: 0;
}

#loader {
	border: 16px solid var(--third-color); /* Light blue */
	border-top: 16px solid var(--secondary-color); /* Blue */
	border-radius: 50%;
	width: 120px;
	height: 120px;
	animation: spin 2s linear infinite;
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	margin: auto;
}

.remove-row {
	color: var(--custom-red);
}

.remove-row:hover {
	color: black;
	cursor: pointer;
}

.card-header {
	font-weight: bold;
}

#nachrichten-feed {
	position: absolute;
	bottom: 20px;
	right: 20px;
	display: flex;
	flex-direction: column;
	row-gap: 8px;
	pointer-events: none;
	z-index: 200;
}

/* Toast-Karte (zeigeKleineNachricht, js/systemNachricht.js) — gleiche Karten-/Schatten-/Radius-
   Sprache wie der Rest des Redesigns (.colhead/.areahead/.dlg etc.) statt der alten flachen
   Vollfarb-Box mit SVG-Hintergrundbild. Typ-Farbe kommt über einen 3px linken Rand + Icon-Farbe
   (siehe .nachricht-erfolg/-warnung/-fehler), nicht mehr über die gesamte Hintergrundfarbe. */
#kleine-system-nachricht {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 280px;
	min-height: 25px;
	max-height: 160px;
	padding: 12px 14px;
	background: var(--panel);
	color: var(--ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	border: 1px solid var(--line);
	border-left: 3px solid var(--muted-2);
	border-radius: 13px;
	box-shadow: var(--shadow);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .25s ease-out, transform .25s ease-out;
	text-align: left;
	word-wrap: break-word;
	word-break: break-word;
	white-space: normal;
	pointer-events: none;
}

#kleine-system-nachricht.zeigen {
	opacity: 1;
	transform: none;
}

#kleine-system-nachricht > .bi {
	font-size: 15px;
	flex-shrink: 0;
	margin-top: 1px;
}

#kleine-system-nachricht > span {
	flex: 1;
	min-width: 0;
}

/* #kleine-system-nachricht.X statt .X: die ID-Basisregel oben setzt border-left per Shorthand, eine
   reine Klassenregel für nur die Farbe würde an der höheren ID-Spezifität scheitern (border-left-
   color bliebe immer --muted-2, unabhängig vom Typ). */
#kleine-system-nachricht.nachricht-erfolg {
	border-left-color: var(--pos);
}
.nachricht-erfolg > .bi {
	color: var(--pos);
}

#kleine-system-nachricht.nachricht-warnung {
	border-left-color: var(--amber);
}
.nachricht-warnung > .bi {
	color: var(--amber);
}

#kleine-system-nachricht.nachricht-fehler {
	border-left-color: var(--neg);
}
.nachricht-fehler > .bi {
	color: var(--neg);
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Tablet Mode (820px chrome breakpoint per design handoff: icon-only tabs, collapsed filter/
   templates panels, grid keeps ~4 day columns + horizontal scroll). Scaffold only for now — rules
   filled in during the dedicated tablet-breakpoint phase once the desktop layout it adapts exists. */
@media only screen and (max-width: 1400px) and (min-width: 701px) {
}

/* Hochkant Tablet/Smartphone Mode */
@media only screen and (max-width: 700px) {
	.nachricht-icon,
	.nachricht-icon > i {
		font-size: 20px;
	}
	#neolohn-clock {
		display: none;
	}
	.sidebar {
		display: none;
	}
	#kleine-system-nachricht {
		left: 50%;
		right: unset;
		transform: translateX(-50%);
	}
	/* .zeigen{transform:none} (oben, Desktop) hat höhere Spezifität (ID+Klasse) als die bloße
	   ID-Regel eins drüber und würde die horizontale Zentrierung beim Einblenden sonst aufheben —
	   hier mit gleicher Spezifität erneut zentrieren. */
	#kleine-system-nachricht.zeigen {
		transform: translateX(-50%);
	}
	.appbar, .toolbar {
		height: auto;
		flex-wrap: wrap;
		padding: 8px 10px;
		gap: 6px;
	}
	/* Mobil nur das Logo links, die Tabs rücken mit nach rechts */
	.appbar .brand {
		margin-right: auto;
	}
	.appbar .tabs {
		margin-right: 0;
	}
	/* Ansichts-Umschalter nur als Icons, damit er neben Logo und Standort in die Appbar passt */
	.tab {
		padding: 8px 10px;
	}
	.tab .tab-lbl {
		display: none;
	}
	.loc-pill {
		max-width: 60vw;
		font-size: 11px;
		padding: 6px 10px;
	}
	.avatar {
		width: 30px;
		height: 30px;
	}
	/* gleiche 10 Spalten wie Desktop (Mitarbeiter · Status · 7 Tage · Woche), nur schmaler — sonst rutscht
	   die Wochenspalte jeder Zeile in die nächste */
	.wgrid {
		grid-template-columns: 150px 130px repeat(7, minmax(90px, 1fr)) 80px;
	}
}

@media print {
	* {
		overflow: hidden !important;
	}
	.feiertag-label {
		display: none;
	}
	#container {
		height: auto;
	}

	.appbar, .toolbar, .filterbar, .fpanel, .sidebar {
		display: none !important;
	}
	/* Der Ausdruck ist der Plan, nicht der offene Bedarf. */
	.blbl, .bcell, .bsum {
		display: none !important;
	}

	@page {
		margin: 1cm;
	}

	.gridwrap, .gridscroll {
		display: block;
		overflow: visible;
	}

	/* Status- und Wochensummen-Spalte werden im Druck (wie im alten Layout) komplett ausgeblendet —
	   .wgrid bekommt dafür ein eigenes, um diese zwei Spalten reduziertes Spaltenraster. Jede Zeile
	   muss dabei auf genau 8 sichtbare DOM-Kinder kommen (Name + 7 Tage), sonst rutscht ein
	   überzähliges Element (Grid-Auto-Flow) in eine neue Zeile und verschiebt/verdeckt die
	   Tagesspalten der jeweiligen Zeile — siehe die drei Sonderfälle unten (Statuskopf, Notiz-Label,
	   Notiz-Wochenspalte). */
	.statuscell, .sumcell {
		display: none !important;
	}

	.wgrid {
		display: grid;
		grid-template-columns: 150px repeat(7, minmax(70px, 1fr));
		gap: 0px;
	}

	.colhead.num {
		display: none;
	}

	/* Status-Spaltenkopf: einziges Spaltenkopf-Element ohne eigene unterscheidbare Klasse (siehe
	   dienstplan.js:zeigeWochenDaten statusKopf.className = 'colhead'), daher per Sibling-Selektor
	   ausgeblendet statt per Klasse — sonst zählt die Kopfzeile 9 statt 8 sichtbare Zellen und die
	   Tage rutschen/verschieben sich gegenüber den darunterliegenden Mitarbeiterzeilen. */
	.colhead.lbl + .colhead {
		display: none !important;
	}

	/* Tagesnotizen-Zeile: Label spannt normal über Name+Status (grid-column:1/3 inline gesetzt), im
	   reduzierten Druck-Raster gibt es aber nur noch eine Namensspalte — sonst frisst das Label die
	   Montagsspalte an. Die Wochenspalte der Notizzeile analog zu .colhead.num ausblenden. */
	.notizcell.lbl {
		grid-column: 1 / 2 !important;
	}
	.notizcell.num {
		display: none !important;
	}

	/* "Bereich freigeben"-Button (dienstplan.js:addBereichHeaderRow) trägt anders als alle anderen
	   Freigabe-/Auswahl-Buttons kein .hidden-print (die sitzen im area-header-template und sind dort
	   bereits abgedeckt) — hier gezielt für den Druck ausblenden. */
	.bereich-header-freigabe {
		display: none !important;
	}

	/* Summenzeilen (Posten-/Bereichs-/Gesamtsumme, dienstplan.js:addGridRow mit ZeilenID -1) werden
	   im Druck nicht gebraucht. .statuscell/.sumcell sind für JEDE Zeile schon oben ausgeblendet —
	   hier fehlen nur noch die verbleibenden zwei Spaltentypen dieser Zeilen, sonst bliebe pro
	   Summenzeile ein "nacktes" macell+daycell-Paar stehen (gleiches Auto-Flow-Problem wie bei den
	   leeren Mitarbeiterzeilen/dem Statuskopf oben). */
	.macell.tot,
	.daycell.tot {
		display: none !important;
	}

	/* Eingeklappte Bereiche/Posten (toggleBereich/togglePosten setzen .hidden auf die betroffenen
	   [data-bereich]/[aria-level]-Zeilen) sollen im Druck immer ausgeklappt erscheinen — Kollabieren
	   ist reiner UI-Komfort, im Ausdruck will man den vollständigen Plan sehen. .macell.hidden/
	   .daycell.hidden schlagen die generische .hidden{display:none!important}-Regel per höherer
	   Spezifität (zwei statt eine Klasse), statuscell/sumcell bleiben unberührt (die sind ohnehin
	   für jede Zeile ausgeblendet, siehe oben). :not(.hidden-print) ist nötig, damit das nicht die
	   Leerzeilen-Ausblendung von printDienstplan() (toolbar.js) überstimmt — eine Zeile, die sowohl
	   eingeklappt ALS AUCH leer ist, trägt beide Klassen, und ohne den Ausschluss würde die höhere
	   Spezifität hier sonst die .hidden-print-Regel (eine Klasse) schlagen und die Leerzeile trotzdem
	   wieder einblenden. */
	.macell.hidden:not(.hidden-print),
	.daycell.hidden:not(.hidden-print) {
		display: flex !important;
	}

	/* Auf-/Zuklapp-Chevron ist im Druck bedeutungslos, da oben ohnehin immer alles ausgeklappt ist. */
	.areahead .ch {
		display: none !important;
	}

	.colhead, .areahead, .macell, .daycell, .notizcell {
		border: 1px solid black;
		border-radius: 0;
		box-shadow: none;
		background: white !important;
		color: black !important;
		page-break-inside: avoid;
		overflow: visible !important;
	}

	/* Reservierter Streifen für den "+"-Button (.span-add) ist im Druck überflüssig */
	.daycell:has(> .span-add) {
		padding-bottom: 7px;
	}

	/* .colhead.today (aktueller Tag) hat außerhalb von @print eine eigene, spezifischere Regel mit
	   Akzentfarbe + Glow-Schatten (dienstplan.css .colhead.today), die die generische Zurücksetzung
	   oben teils übersteht: box-shadow/border-color haben dort kein !important und die höhere
	   Selektor-Spezifität (zwei Klassen) gewinnt sonst gegen die einklassige Regel oben, und die
	   helle Schrift der verschachtelten small/.wxp-Elemente wird von der Farb-Regel des Elternteils
	   gar nicht erst erfasst. Explizit für den Druck neutralisieren. */
	.colhead.today,
	.colhead.today small,
	.colhead.today .wxp {
		background: white !important;
		box-shadow: none !important;
		border-color: black !important;
		color: black !important;
	}

	/* Qualifikations-Pills unter dem Mitarbeiternamen (.macell .ql .qtag) drucken ohne Hintergrund
	   (Browser drucken Hintergrundfarben standardmäßig nicht) — ohne die sichtbare Pillenform bleibt
	   nur das links-/rechts-Padding als unmotivierter Einzug übrig, der den Text gegenüber dem Namen
	   darüber verschiebt. Seitliches Padding im Druck entfernen, damit der Text bündig mit dem Namen ist. */
	.qtag {
		padding-left: 0;
		padding-right: 0;
	}

	/* Mitarbeiterzahl-Badge im Posten-Header (area-header-template [area-header-count], nur dort
	   vorhanden — der Bereichs-Header hat kein .ct) wird im Druck nicht gebraucht. */
	.areahead-posten .ct {
		display: none !important;
	}

	.hidden-print {
		display: none !important;
	}

	.schicht-div {
		margin: 0;
		border: none;
		border-radius: 0;
		background-color: transparent !important;
		color: black;
		/* volle Zellbreite; rechts kein Platz für die (im Druck ausgeblendeten) Karten-Tools */
		width: auto;
		padding: 4px 6px;
		/* --schicht-farbe (siehe live .schicht-div-Regel) statt einfarbig Schwarz, damit Schichten auf
		   einem Farbdrucker weiterhin optisch unterscheidbar bleiben. Fällt auf Schwarz zurück, wenn
		   keine SchichtFarbe gesetzt ist (EGFZ-Karten etc. setzen --schicht-farbe nie). */
		border-left: 2px solid var(--schicht-farbe, black);
	}

	/* Kopierquelle-Markierung (Woche-kopieren-Feature, index.js) hat außerhalb von @print einen
	   grünen Glow-Schatten + Puls-Animation und weiße Schrift (.schicht-kopier-quelle, höhere
	   Spezifität als die generische .schicht-div-Regel oben, übersteht sie also) — im Druck ergibt
	   das nur einen unmotivierten Schatten und im schlimmsten Fall unlesbaren weißen Text auf weißem
	   Papier. Für den Druck neutralisieren. */
	.schicht-div.schicht-kopier-quelle,
	.schicht-div.schicht-kopier-quelle:hover {
		border-color: black !important;
		box-shadow: none !important;
		animation: none !important;
		color: black !important;
	}

	/* "Bereits verplant"-Panels wie normale Schichtkarten drucken (Spalte statt Zeile, gleiche Schrift),
	   nur der gepunktete Rand bleibt als Unterscheidung; das Kalender-Icon entfällt. */
	.schicht-div.schicht-panel {
		flex-direction: column;
		align-items: flex-start;
		gap: 1px;
		opacity: 1;
		color: black;
	}
	.schicht-panel > .bi-calendar4-week {
		display: none;
	}
	.schicht-panel .schicht-titel {
		font-size: 11.5px;
	}
	.schicht-panel .schicht-beschreibung {
		font-size: 10.5px;
	}

	.daymeta,
	.tag-urlaub,
	.tag-geburtstag {
		display: none;
	}

	#kleine-system-nachricht {
		display: none;
	}

	.tages-notiz {
		border: none;
		background-color: transparent;
		overflow: hidden;
		height: auto;
		font-size: x-small;
		color: black;
	}

	.tages-notiz::-webkit-input-placeholder {
		color: transparent;
	}
	.tages-notiz::-moz-placeholder {
		color: transparent;
	}
}

/********************* BEDARFSPLANER: Monatsgrid (Phase 9 von #763) *********************
 * Werte aus reference/bedarfsplaner/dienstplan.css übernommen/angepasst — siehe
 * reference/bedarfsplaner/BEDARFSPLANER.md §2 für die Spezifikation. */

#bedarfgrid {
	padding: 14px;
}

.month {
	display: grid;
	grid-template-columns: 44px repeat(7, minmax(0, 1fr));
	gap: 6px;
	align-content: start;
	align-items: start;
	position: relative;
}

.mhead {
	background: var(--navy);
	color: #fff;
	border-radius: 9px;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	padding: 7px 0;
}

.mhead.we {
	background: var(--navy-2);
}

/* Schmale KW-Spalte (1. Spalte links): Kopf-Label "KW" und die Kalenderwoche je Wochenzeile. */
.mkw-head {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--muted-2);
	padding: 7px 0;
}

.mkw {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding-top: 8px;
	font-variant-numeric: tabular-nums;
}

.mkw .k {
	font-size: 8.5px;
	font-weight: 700;
	color: var(--muted-2);
	letter-spacing: .05em;
	line-height: 1;
}

.mkw .n {
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
	line-height: 1;
	margin-bottom: 3px;
}

.mkw .wt-ib {
	width: 24px;
	height: 24px;
	border-radius: 7px;
	font-size: 12px;
}

/* Wochen-Werkzeug unter der KW (Vorlagen einsetzen), siehe components/vorlagenEinsetzen.js */
.wt-ib {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	border: 1px solid var(--line);
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	font-size: 13px;
	cursor: pointer;
}

.wt-ib:hover {
	color: var(--accent);
	border-color: var(--accent);
}

.wt-ib.on {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

/* ── Kostenanzeige (Kosten-Modus) ── (reference/kostenanzeige/, views/bedarfsplanerView.js) */
/* Toolbar-Umschalter mit Icon vor dem Text (Bereich/Posten, Besetzung/Kosten) */
.seg-ic .o {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
}
/* Monatssumme rechts in der Toolbar: "n offen | Juni · 46.295 € geplant" */
.ko-wk {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.ko-wk b {
	color: var(--navy);
}
.ko-wk .dv {
	width: 1px;
	height: 16px;
	background: var(--line);
}
.ko-open {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 10.5px;
	font-weight: 700;
	color: var(--neg);
}
/* Fußzeile der Tageszelle: offene Posten links, Tagessumme rechts */
.ko-foot {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	flex-wrap: wrap;
	border-top: 1px dashed var(--line);
	padding-top: 6px;
	font-size: 11px;
	font-weight: 700;
	color: var(--muted-2);
	font-variant-numeric: tabular-nums;
}
.ko-foot .ko-v {
	font-size: 12px;
	color: var(--navy);
}
.ko-foot .ko-v.z {
	color: var(--muted-2);
}
/* Wochensumme kompakt unten in der KW-Spalte (9,6 T€) */
.ko-ws {
	margin-top: auto;
	font-size: 10px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
/* Zähler enthalten Besetzung (.v-bes) und Kosten (.v-ko); #bedarfgrid.ko-modus schaltet um (bedarfState.js:fuelleZaehler) */
.v-ko,
#bedarfgrid.ko-modus .v-bes {
	display: none;
}
#bedarfgrid.ko-modus .v-ko {
	display: inline;
}
/* €-Beträge in den Chips und Event-Zeilen nicht umbrechen */
.dchip .cnt,
.pchip .pc,
.evrow .st {
	white-space: nowrap;
}

/* Event-Overlay (Phase 12): absolut positionierte Balken/Karten über .month; Spacer reservieren Platz
 * in den Zellen. Werte aus reference/bedarfsplaner/dienstplan.css §3. */
.mcell .ev-spacer {
	height: 22px;
	flex-shrink: 0;
	/* Der Spacer ist ein eigenes Flex-Kind und bekäme sonst zusätzlich den 5px-.mcell-Gap unter sich —
	 * das zieht den Zell-Inhalt wieder dicht an den Event-Balken heran (kleiner Restabstand bleibt). */
	margin-bottom: -4px;
}

/* Event-Farbe kommt als --evf vom Event (util/eventFarben.js); der Schatten wird daraus abgeleitet, die
 * Schriftfarbe setzt das JS passend zur Helligkeit. */
.mevent-bar {
	--evf: #7a5af0;
	position: absolute;
	background: var(--evf);
	color: #fff;
	border-radius: 8px;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 6px;
	box-shadow: 0 3px 8px color-mix(in srgb, var(--evf) 28%, transparent);
	z-index: 2;
	white-space: nowrap;
	overflow: hidden;
	cursor: pointer;
}

/* Feste Balkenhöhe — muss zu BALKEN_HOEHE in monthEventOverlay.js passen (Lane-Layout rechnet damit). */
.mevent-bar:not(.expanded) {
	height: 24px;
}

.mevent-bar.expanded {
	/* Expanded (single-day) cards live inside the cell flow instead of being absolutely
	 * positioned. Make them participate in document layout. */
	position: static;
	display: block;
	width: auto;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	padding: 0;
}

.mevent-bar .evh {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 9px;
	font-size: 12px;
	font-weight: 700;
}

.mevent-bar .evh .ttx {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mevent-bar .evh .bi {
	flex-shrink: 0;
}

.mevent-bar .sp {
	flex: 1;
}

.mevent-bar .gst {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 10.5px;
	font-weight: 700;
	background: rgba(255, 255, 255, .22);
	border-radius: 5px;
	padding: 1px 5px;
	font-variant-numeric: tabular-nums;
	flex-shrink: 0;
}

.mevent-bar .gst .bi {
	font-size: 9.5px;
}

.mevent-bar .evh .cnt,
.mevent-bar > .cnt {
	flex-shrink: 0;
	font-size: 10.5px;
	font-weight: 700;
	background: rgba(255, 255, 255, .22);
	border-radius: 5px;
	padding: 1px 5px;
	font-variant-numeric: tabular-nums;
}

.mevent-bar .evrows {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 0 4px 4px;
}

.mevent-bar .evrow {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: 6px;
	align-items: center;
	background: rgba(255, 255, 255, .92);
	border-radius: 5px;
	padding: 3px 6px;
	font-size: 11px;
	font-weight: 700;
	color: var(--navy);
	cursor: pointer;
}

.mevent-bar .evrow:hover {
	background: #fff;
	box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85);
}


.mevent-bar .evrow .pnm {
	display: flex;
	align-items: baseline;
	gap: 5px;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
}

.mevent-bar .evrow .pnm small {
	font-size: 10px;
	font-weight: 600;
	color: var(--muted-2);
}

.mevent-bar .evrow .tm {
	color: var(--muted);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.mevent-bar .evrow .st {
	font-variant-numeric: tabular-nums;
	border-radius: 4px;
	padding: 0 4px;
}

.mevent-bar .evrow .st.full {
	background: var(--pos-bg);
	color: var(--pos);
}

.mevent-bar .evrow .st.part {
	background: var(--amber-bg);
	color: var(--amber);
}

.mevent-bar .evrow .st.empty {
	background: var(--neg-bg);
	color: var(--neg);
}

.mcell {
	background: #fff;
	border: 1px solid var(--line-soft);
	border-radius: 11px;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-height: 118px;
	align-self: start;
	flex-shrink: 0;
}

.mcell.out {
	background: #f3f6fa;
	opacity: .6;
}

.mcell.we {
	background: #f7fafd;
}

.mcell .dn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 14px;
	font-weight: 700;
	color: var(--navy);
}

/* Heute-Markierung: bei einstelligen/zweistelligen Tagen ein Kreis, bei Tagen aus dem Nachbarmonat ("1.10")
 * wächst sie zur Pille mit, statt die Zahl einzuquetschen. */
.mcell.today .dn .dnum {
	background: var(--accent);
	color: #fff;
	border-radius: 999px;
	min-width: 24px;
	height: 20px;
	padding: 0 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.mcell .dn .dnum {
	padding: 0 2px;
}

.mcell-bedarf {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex-shrink: 0;
}

/* Bereich-Rollup-Chip (.dchip), siehe bedarfChip.js */
.dchip {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	border-radius: 7px;
	padding: 4px 8px;
	background: var(--tint-2);
	color: var(--muted);
	flex-shrink: 0;
	cursor: pointer;
}

.dchip.full {
	background: var(--pos-bg);
	color: var(--pos);
}

.dchip.part {
	background: var(--amber-bg);
	color: var(--amber);
}

.dchip.empty {
	background: var(--neg-bg);
	color: var(--neg);
}

.dchip .chev {
	font-size: 10px;
	flex-shrink: 0;
	transition: transform .12s;
}

.bgrp.collapsed .dchip .chev {
	transform: rotate(-90deg);
}

.dchip .cnt {
	margin-left: auto;
	font-variant-numeric: tabular-nums;
}

.dchip .po {
	font-size: 10.5px;
	font-weight: 700;
	opacity: .8;
	white-space: nowrap;
}

/* In-Zelle-Gruppe eines mehrtägigen Events: in Event-Farbe (--evf) getönte Karte mit farbiger Linkskante,
 * Kopf (Chevron, Icon, Titel) und darunter die .pchips des Tages, siehe bedarfChip.js:erstelleEventGruppe. */
.evgrp {
	--evf: #7a5af0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	background: color-mix(in srgb, var(--evf) 8%, #fff);
	border-left: 3px solid var(--evf);
	border-radius: 7px;
	padding: 3px 4px 4px 5px;
	flex-shrink: 0;
}

.evgrp-kopf {
	display: flex;
	align-items: center;
	gap: 3px;
	min-width: 0;
	font-size: 11px;
	font-weight: 700;
	/* Abgedunkelte Event-Farbe, damit auch helle Farben als Schrift lesbar bleiben. */
	color: color-mix(in srgb, var(--evf) 80%, #000);
}

.evgrp-titel {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	cursor: pointer;
}

.evgrp-titel .ttx {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.evgrp-titel:hover .ttx {
	text-decoration: underline;
}

.evgrp-zeilen {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.evgrp .pchip {
	margin-top: 0;
}

/* Hover-Verknüpfung: alle Elemente eines Events gemeinsam hervorheben (monthEventOverlay.js). */
.mevent-bar.hl {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--evf);
}

.evgrp.hl {
	box-shadow: 0 0 0 1.5px var(--evf);
}

/* Event-Block einer Tageszelle: direkt unter Tageszeile/Balken-Spacer, vor den normalen Bereich-Gruppen
 * (In-Zelle-Gruppen mehrtägiger Events in Lane-Reihenfolge, dann eintägige Karten). */
.mcell-events {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex-shrink: 0;
}

/* Auf-/Zuklappen eines Events (Chevron im Balken, Kartenkopf und In-Zelle-Gruppe, siehe monthEventOverlay.js). */
.evtoggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	margin-left: -4px;
	border-radius: 4px;
	font-size: 10px;
	flex-shrink: 0;
	cursor: pointer;
}

.mevent-bar .evtoggle:hover {
	background: rgba(255, 255, 255, .25);
}

.evgrp .evtoggle {
	margin-left: 0;
	width: 14px;
	height: 14px;
}

.evgrp .evtoggle:hover {
	background: color-mix(in srgb, var(--evf) 15%, transparent);
}

/* Zugeklappt: mehrtägige Events behalten nur den Balken (In-Zelle-Gruppen ganz weg), eintägige Karten nur
 * ihren Kopf. Eine einzeln zugeklappte Tagesgruppe (.tag-zu) behält ihren Kopf. */
.evgrp.collapsed,
.evgrp.tag-zu .evgrp-zeilen,
.mevent-bar.expanded.collapsed .evrows {
	display: none;
}

/* Tages-Chevron der In-Zelle-Gruppe: Drehung rein über die Klasse. */
.evgrp .tagtoggle .bi {
	transition: transform .12s;
}

.evgrp.tag-zu .tagtoggle .bi {
	transform: rotate(-90deg);
}

/* Klappzustand rein über .bgrp.collapsed (Umschalter/Spoiler ohne Re-Render, siehe bedarfChip.js):
 * zugeklappt → Posten-Liste aus und "n Posten offen"-Label an; aufgeklappt → Liste an, Label aus. */
.bgrp.collapsed .plist {
	display: none;
}

.bgrp:not(.collapsed) .dchip .po {
	display: none;
}

/* Posten-Zeilen (.plist/.pchip) — nur im Posten-Detaillevel, siehe BEDARFSPLANER.md §2.4. Die
 * Asymmetrie ist beabsichtigt: "part" tönt nur die Zahl, "empty" den ganzen Chip. */
.plist {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-left: 7px;
	padding-left: 6px;
	border-left: 1.5px solid var(--line);
}

.pchip {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: 5px;
	align-items: center;
	font-size: 11px;
	font-weight: 700;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 2px 4px;
	color: var(--ink);
	cursor: pointer;
	margin-top: 2px;
}

.pchip .pz {
	font-size: 10.5px;
	font-weight: 600;
	color: var(--muted-2);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.pchip .pn {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--ink);
}

/* Bereich-Zusatz hinter dem Posten (nur in Event-Gruppen, dort sind Bereiche gemischt). */
.pchip .pn small {
	margin-left: 4px;
	font-size: 10px;
	font-weight: 600;
	color: var(--muted-2);
}

/* Der Zustand (full/part/empty) sitzt als farbiges Badge um den filled/need-Zähler — nicht mehr als
 * Tönung des ganzen Chips. */
.pchip .pc {
	font-variant-numeric: tabular-nums;
	border-radius: 5px;
	padding: 1px 5px;
}

.pchip.full .pc {
	background: var(--pos-bg);
	color: var(--pos);
}

.pchip.part .pc {
	background: var(--amber-bg);
	color: var(--amber);
}

.pchip.empty .pc {
	background: var(--neg-bg);
	color: var(--neg);
}

/* Hover: Posten-Zeilen öffnen den Bedarf-Dialog, der Bereich-Chip klappt auf/zu. In Event-Gruppen nimmt
 * der Rahmen die Event-Farbe an. */
.pchip:hover {
	border-color: var(--accent);
	box-shadow: 0 0 0 1.5px var(--accent-soft);
}

.evgrp .pchip:hover {
	border-color: var(--evf);
	box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--evf) 18%, transparent);
}

.dchip:hover {
	box-shadow: inset 0 0 0 1px currentColor;
}

/* Schmalere Fenster: Abstände im Monatsgrid verringern, damit alle 7 Tagesspalten ohne horizontales
 * Scrollen passen. Steht hinter den Basisregeln von .mcell/.dchip/.pchip, damit es sie überschreibt. */
@media only screen and (max-width: 1500px) and (min-width: 701px) {
	#bedarfgrid {
		padding: 8px;
	}

	.month {
		gap: 4px;
	}

	.mcell {
		padding: 5px;
		gap: 4px;
	}

	.dchip {
		padding: 4px 6px;
		gap: 4px;
	}

	.pchip {
		gap: 3px;
	}
}

/* Wetterstreifen rechts neben der Tageszahl — enger gesetzt als der .wx-Default in den Wochenplan-
 * Spaltenköpfen (siehe BEDARFSPLANER.md §2.2). */
.mcell .dn .wx {
	margin-top: 0;
	gap: 4px;
}

.mcell .dn .wxp {
	font-size: 10px;
}

/********************* BEDARF-ZUORDNUNG (Dialog, Phase 10) *********************
 * Werte aus reference/bedarfsplaner/dienstplan.css §Dialoge — siehe BEDARFSPLANER.md §4. Die
 * Dialog-Hülle (.modal/.modal-inhalt/.dlg/.dlg-head/.dlg-body) existiert bereits (Editoren-Rebuild). */

.ring {
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.zp-prog {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--tint);
	border: 1px solid var(--line);
	border-radius: 13px;
	padding: 13px 15px;
}

.zp-prog .ringbig {
	width: 54px;
	height: 54px;
	flex-shrink: 0;
}

.zp-prog .ringbig .hole {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
}

.zp-prog .pt {
	font-size: 14px;
	font-weight: 700;
	color: var(--navy);
}

.zp-prog .ps {
	font-size: 12px;
	color: var(--muted);
	margin-top: 2px;
}

.zp-sec {
	font-size: 11px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-top: 4px;
}
/* Abschnittskopf "Vorschläge" mit Sortier-Umschalter rechts */
.zp-sec.mit-sort {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.zp-sort {
	flex: 0 0 auto;
	text-transform: none;
	letter-spacing: normal;
	border-radius: 8px;
}
.zp-sort .o {
	flex: 0 0 auto;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 6px;
}
/* Liste der Vorschläge: gleicher Zeilenabstand wie direkt im .dlg-body */
.zp-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ── Mitarbeiter-Status-Dialog ── (dialogs/mitarbeiterStatus.js, Aufbau wie die Editor-Dialoge) */
.dlg-head .ms-av {
	position: relative;
	border-radius: 50%;
	font-size: 15px;
	font-weight: 700;
	background: color-mix(in srgb, var(--bereich-farbe, #fff) 30%, rgba(255, 255, 255, .16));
	overflow: hidden;
}
.dlg-head .ms-av img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ms-body {
	gap: 8px;
}
.zp-sec .ms-sec-sub {
	margin-left: 6px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	color: var(--muted-2);
}
.ms-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 13px;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-variant-numeric: tabular-nums;
}
.ms-hd {
	display: flex;
	align-items: baseline;
	gap: 6px;
}
.ms-big {
	font-size: 26px;
	font-weight: 700;
	color: var(--navy);
	line-height: 1;
	letter-spacing: -.01em;
}
.ms-of {
	font-size: 13px;
	font-weight: 600;
	color: var(--muted-2);
}
.ms-dv {
	margin-left: auto;
	font-size: 12px;
	font-weight: 700;
	border-radius: 6px;
	padding: 2px 8px;
}
.ms-dv.ok,
.ms-kpi.ok .v {
	color: var(--pos);
}
.ms-dv.ok {
	background: var(--pos-bg);
}
.ms-dv.lo,
.ms-kpi.lo .v {
	color: var(--amber);
}
.ms-dv.lo {
	background: var(--amber-bg);
}
.ms-dv.hi,
.ms-kpi.hi .v {
	color: var(--neg);
}
.ms-dv.hi {
	background: var(--neg-bg);
}
/* Spuren Plan / Ist (größere Variante der Statuszelle) */
.ms-duo {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	column-gap: 10px;
	row-gap: 6px;
	align-items: center;
}
.ms-duo .l {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--muted-2);
}
.ms-duo .n2 {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--navy);
	text-align: right;
	min-width: 48px;
}
.ms-trk {
	position: relative;
	height: 8px;
	border-radius: 4px;
	background: #e9eff6;
	overflow: hidden;
}
.ms-trk .fil {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	border-radius: 4px;
	background: var(--accent);
}
.ms-trk .fil.warn {
	background: var(--amber);
}
.ms-trk .fil.over,
.ms-trk .fil.erf.hi {
	background: var(--neg);
}
.ms-trk .fil.erf.ok {
	background: var(--navy);
}
.ms-trk .fil.erf.lo {
	background: var(--amber);
}
.ms-trk .tgt {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background: rgba(255, 255, 255, .95);
}
/* Einzelwerte unter den Spuren */
.ms-kpis {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
	gap: 8px;
	border-top: 1px solid var(--line-soft);
	padding-top: 10px;
}
.ms-kpi,
.ms-tile {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.ms-kpi .k,
.ms-tile .k {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 10.5px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .03em;
	white-space: nowrap;
}
.ms-kpi .v {
	font-size: 14px;
	font-weight: 700;
	color: var(--navy);
}
/* Konten-Kacheln */
.ms-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 8px;
	font-variant-numeric: tabular-nums;
}
.ms-tile {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 13px;
	padding: 10px 12px;
}
.ms-tile .k .bi {
	font-size: 12px;
	color: var(--accent);
}
.ms-tile .k .ms-flug {
	display: inline-block;
	transform: rotate(45deg);
}
.ms-tile .v {
	font-size: 20px;
	font-weight: 700;
	color: var(--navy);
	white-space: nowrap;
}
.ms-tile .v em {
	font-style: normal;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted-2);
	margin-left: 4px;
}
.ms-tile.warn .v {
	color: var(--amber);
}
.ms-tile.neg .v {
	color: var(--neg);
}
/* Urlaubsanträge */
.ms-ua-liste {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.ms-ua {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto auto;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 8px 10px 8px 12px;
	font-size: 12.5px;
}
.ms-ua-zeit {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	color: var(--navy);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ms-ua-zeit .bi {
	color: var(--muted-2);
}
.ms-ua-tage {
	font-weight: 600;
	color: var(--muted);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.ms-chip {
	font-size: 11px;
	font-weight: 700;
	border-radius: 999px;
	padding: 2px 9px;
	white-space: nowrap;
	color: var(--muted);
	background: var(--tint-2);
}
.ms-chip.offen {
	color: var(--amber);
	background: var(--amber-bg);
}
.ms-chip.genehmigt {
	color: var(--pos);
	background: var(--pos-bg);
}
.ms-chip.abgelehnt {
	color: var(--neg);
	background: var(--neg-bg);
}
.ms-ua-akt {
	display: flex;
	gap: 6px;
	justify-content: flex-end;
}
.ms-btn {
	height: 30px;
	padding: 0 10px;
	border-radius: 9px;
	border: 1px solid var(--line);
	background: #fff;
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
	white-space: nowrap;
}
.ms-btn.pos {
	color: var(--pos);
}
.ms-btn.pos:hover {
	background: var(--pos-bg);
	border-color: var(--pos);
}
.ms-btn.neg {
	color: var(--neg);
}
.ms-btn.neg:hover {
	background: var(--neg-bg);
	border-color: var(--neg);
}
.ms-btn:disabled {
	opacity: .5;
	cursor: wait;
}
.ms-leer {
	border: 1px dashed var(--line);
	border-radius: 12px;
	padding: 14px;
	text-align: center;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--muted-2);
}

.macand {
	display: flex;
	align-items: center;
	gap: 11px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 10px 12px;
}

.macand .av {
	width: 38px;
	height: 38px;
	font-size: 13px;
}

.macand .nm {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--navy);
}

.macand .pnr {
	font-size: 10px;
	font-weight: 600;
	color: var(--muted-2);
	font-variant-numeric: tabular-nums;
}

.macand .mt {
	font-size: 11px;
	color: var(--muted);
	margin-top: 2px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	align-items: center;
}

.macand .act {
	margin-left: auto;
}

.macand.done {
	background: var(--pos-bg);
	border-color: rgba(31, 138, 91, .3);
}

.match {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 7px;
	border-radius: 999px;
}

.match.good {
	background: var(--pos-bg);
	color: var(--pos);
}

.match.ok {
	background: var(--accent-soft);
	color: var(--accent);
}

.match.warn {
	background: var(--amber-bg);
	color: var(--amber);
}

.assignbtn {
	height: 34px;
	padding: 0 14px;
	border-radius: 9px;
	font-size: 12.5px;
	font-weight: 700;
	background: var(--accent);
	color: #fff;
	border: none;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
}

.assignbtn:disabled {
	cursor: default;
}

/********************* VERANSTALTUNGS-EDITOR (Dialog, Phase 11) *********************
 * Werte aus reference/bedarfsplaner/dienstplan.css §Dialoge — siehe BEDARFSPLANER.md §5. */

.fld > label .opt {
	font-size: 10.5px;
	font-weight: 700;
	color: var(--muted-2);
	background: var(--tint-2);
	border-radius: 999px;
	padding: 1px 7px;
	margin-left: 6px;
	text-transform: none;
	letter-spacing: 0;
}

.daterange {
	display: flex;
	align-items: center;
	gap: 10px;
}

.daterange .ctl {
	flex: 1;
}

.daterange .span-badge {
	flex-shrink: 0;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--c-bar);
	background: var(--violet-bg);
	border-radius: 999px;
	padding: 5px 12px;
	white-space: nowrap;
}

.gcount {
	height: 40px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fff;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 0 12px;
}

.gcount > .bi {
	color: var(--muted-2);
	font-size: 14px;
}

/* Gästezahl: das eigentliche Zahlenfeld, randlos in der .gcount-Box — Platzhalter und Fokusrahmen der Box
 * zeigen, wo die Eingabe ist. */
.gcount {
	cursor: text;
}

.gcount:focus-within {
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(42, 111, 219, .12);
}

/* Höchstens 4 Ziffern — feste Breite, gerade genug für den Platzhalter "z. B. 120". */
.gcount .gv {
	flex: 0 0 76px;
	width: 76px;
	border: none;
	background: transparent;
	outline: none;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
}

.gcount .gv::placeholder {
	font-size: 14px;
	font-weight: 500;
	color: var(--muted-2);
	opacity: .7;
}

.gcount .gu {
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
}

.ghint {
	display: flex;
	align-items: center;
	gap: 7px;
	flex-wrap: wrap;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted);
	background: var(--violet-bg);
	border-radius: 9px;
	padding: 7px 10px;
	margin-top: 6px;
	line-height: 1.45;
}

.ghint .bi {
	color: var(--c-bar);
	font-size: 12px;
}

.ghint b {
	color: var(--navy);
}

.ghint .gapply {
	margin-left: auto;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: var(--c-bar);
	border-radius: 7px;
	padding: 3px 9px;
	white-space: nowrap;
	cursor: pointer;
}

.kvlist {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.kvrow {
	display: grid;
	grid-template-columns: 168px minmax(0, 1fr) 20px;
	gap: 7px;
	align-items: center;
}

.kvrow .kvk,
.kvrow .kvv {
	height: 34px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: #fff;
	padding: 0 10px;
	font-size: 12.5px;
	color: var(--navy);
	overflow: hidden;
}

.kvrow .kvk {
	font-weight: 700;
	color: var(--navy);
	background: var(--tint);
}

.kvrow .del {
	color: var(--muted-2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	cursor: pointer;
}

.kvrow .del:hover {
	color: var(--neg);
}

.kvfoot {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 9px;
	flex-wrap: wrap;
}

.kvfoot .sp {
	flex: 1;
}

.kvfoot .addrow,
.dbday .dbh .addrow {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--accent);
	display: inline-flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
}

.kvfoot .kvsug {
	font-size: 11px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.kvchip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--muted);
	background: #fff;
	border: 1px dashed var(--line);
	border-radius: 999px;
	padding: 3px 10px;
	cursor: pointer;
}

.kvchip:hover {
	border-color: var(--accent);
	color: var(--accent);
	border-style: solid;
}

.kvchip .bi {
	font-size: 10px;
}

.daybedarf {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.dbday {
	border: 1px solid var(--line);
	border-radius: 11px;
	overflow: hidden;
}

.dbday .dbh {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--tint);
	padding: 9px 12px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--navy);
	border-bottom: 1px solid var(--line-soft);
}

.dbday .dbh .sp {
	flex: 1;
}

.dbrow {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) 86px 10px 86px 76px 74px 20px;
	gap: 7px;
	align-items: center;
	padding: 8px 12px;
	border-top: 1px solid var(--line-soft);
}

.dbrow:first-of-type {
	border-top: none;
}

.dbrow .areatag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 9px;
	border-radius: 999px;
	white-space: nowrap;
	overflow: hidden;
}

.dbrow .ptsel {
	height: 30px;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: #fff;
	padding: 0 8px;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--navy);
}

.dbrow .ti {
	height: 30px;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: #fff;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
	padding: 0 4px;
}

.dbrow .arrow {
	color: var(--muted-2);
	font-size: 11px;
	text-align: center;
}

.dbrow .stepper,
.bz-form .stepper {
	height: 30px;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 4px;
}

.dbrow .stepper .n,
.bz-form .stepper .n {
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
	font-size: 12px;
}

.dbrow .stepper .sb,
.bz-form .stepper .sb {
	width: 20px;
	height: 20px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	font-size: 10px;
	cursor: pointer;
}

.dbrow .zubtn {
	height: 30px;
	border-radius: 7px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	border: 1px solid transparent;
	white-space: nowrap;
}

.dbrow .zubtn.full {
	background: #e3f6ef;
	color: #12866e;
}

.dbrow .zubtn.part {
	background: #fdf0dd;
	color: #b8770f;
}

.dbrow .zubtn.empty {
	background: #fdeaec;
	color: var(--neg);
}

.dbrow .zubtn:hover {
	border-color: currentColor;
}

.dbrow .zubtn i {
	font-size: 10px;
	opacity: .75;
}

.dbrow .del {
	color: var(--neg);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	cursor: pointer;
}

/********************* BEDARF ANLEGEN / BEARBEITEN (Bedarf-Dialog + Monatszelle) *********************/

/* "+" in der Tageszelle — erst bei Hover sichtbar, damit das Monatsgrid ruhig bleibt. */
.mcell .dn .addbedarf {
	margin-right: auto;
	margin-left: 6px;
	width: 20px;
	height: 20px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	color: var(--accent);
	background: var(--accent-soft);
	cursor: pointer;
	opacity: 0;
}

.mcell:hover .dn .addbedarf,
.mcell .dn .addbedarf:focus-visible {
	opacity: 1;
}

.mcell .dn .addbedarf:hover {
	background: var(--accent);
	color: #fff;
}

.bz-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 12px;
}

.bz-form .stepper {
	height: 40px;
	border-radius: 10px;
	padding: 0 8px;
}

.bz-form .stepper .n {
	font-size: 14px;
}

.bz-form-akt {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}

.stepper .sb.off {
	opacity: .35;
	cursor: not-allowed;
}

select:disabled {
	background: var(--tint-2);
	color: var(--muted);
	cursor: not-allowed;
}

/* Hinweis unter einem gesperrten Posten-Select (Dialog und Event-Editor-Zeile). */
.lockhint {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin-top: 5px;
	font-size: 11px;
	font-weight: 600;
	color: var(--muted);
}

.lockhint .bi {
	color: var(--amber);
	margin-top: 1px;
}

.bdef {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 10px 12px;
}

.bdef-info {
	flex: 1;
	min-width: 0;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--muted);
}

.bdef-info b {
	color: var(--navy);
}

.bdef-info .bi {
	margin-right: 4px;
}

.bdef-info .sep {
	opacity: .5;
	margin: 0 7px;
}

.bdef-notiz {
	margin-top: 4px;
	font-weight: 500;
	white-space: pre-wrap;
}

.bz-bericht {
	background: var(--amber-bg);
	color: var(--amber);
	border-radius: 10px;
	padding: 9px 12px;
	font-size: 12px;
	font-weight: 600;
}

.bz-bericht .bi {
	margin-right: 6px;
}

.bz-bericht ul {
	margin: 5px 0 4px 20px;
	padding: 0;
	color: var(--navy);
}

.bz-bericht .hint,
.bz-hint {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted);
}

.bz-hint .bi {
	margin-right: 6px;
}

.bz-eventhint {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
}

.bz-eventhint .bi {
	color: var(--violet);
}

/********************* EVENT-DARSTELLUNG (Vorlagen im Event-Editor) *********************/

.evvorlagen {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.evvorlage {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	padding: 0 11px;
	border-radius: 9px;
	border: 1px solid color-mix(in srgb, var(--evf) 30%, #fff);
	background: color-mix(in srgb, var(--evf) 8%, #fff);
	color: color-mix(in srgb, var(--evf) 80%, #000);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.evvorlage:hover {
	border-color: var(--evf);
}

.evvorlage.on {
	background: var(--evf);
	border-color: var(--evf);
	color: #fff;
}

/* ── Tagesvorlagen-Dialog ── (reference/tagesvorlagen/TAGESVORLAGEN.md §3, gerendert von dialogs/tagesvorlagen.js)
 * Links Liste mit Suche, rechts Editor. Klickbare Elemente sind <button>s (Tastatur), daher der Reset. */
.tv-dlg {
	height: 840px;
	max-height: 92vh;
}

.tv-dlg button.tv-new,
.tv-dlg .tv-dpick button,
.tv-dlg .tv-gh .addrow,
.tv-dlg .tv-r .del,
.tv-dlg .tv-addb .kvchip {
	font: inherit;
	cursor: pointer;
}

.tv-dlg .dbtn:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.tv-wrap {
	flex: 1;
	display: grid;
	grid-template-columns: 270px minmax(0, 1fr);
	min-height: 0;
}

.tv-list {
	border-right: 1px solid var(--line-soft);
	background: var(--tint);
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	overflow: auto;
}

.tv-list .vsearch {
	background: #fff;
}

.tv-items {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tv-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #fff;
	border: 1px solid var(--line);
	border-left: 4px solid var(--tvc, var(--accent));
	border-radius: 12px;
	padding: 11px 12px;
	cursor: pointer;
}

.tv-item.on {
	border-color: var(--accent);
	border-left-color: var(--tvc, var(--accent));
	box-shadow: 0 0 0 2px rgba(42, 111, 219, .14);
}

.tv-item .tn {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--navy);
}

.tv-item .tm {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.tv-days {
	display: flex;
	gap: 3px;
}

.tv-days span {
	font-size: 10px;
	font-weight: 700;
	color: var(--muted-2);
	background: var(--tint-2);
	border-radius: 5px;
	padding: 2px 5px;
}

.tv-days span.on {
	background: var(--accent-soft);
	color: var(--accent);
}

.tv-new {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 40px;
	flex-shrink: 0;
	border: 1px dashed var(--accent);
	border-radius: 11px;
	color: var(--accent);
	font-size: 12.5px;
	font-weight: 700;
	background: var(--accent-soft);
}

.tv-leer {
	font-size: 12px;
	font-weight: 600;
	color: var(--muted-2);
	text-align: center;
	padding: 12px;
	border: 1px dashed var(--line);
	border-radius: 11px;
}

.tv-ed {
	overflow: auto;
	padding: 18px 22px;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.tv-ed > * {
	flex-shrink: 0;
}

.tv-row3 {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 14px;
	align-items: end;
}

.tv-row2 {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 14px;
	align-items: end;
}

.tv-dpick {
	display: flex;
	gap: 5px;
}

.tv-dpick button {
	width: 36px;
	height: 40px;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--muted);
}

.tv-dpick button.on {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.tv-dpick button.oth {
	background: var(--tint-2);
	color: var(--muted-2);
	border-style: dashed;
}

.tv-sum {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	background: var(--tint);
	border: 1px solid var(--line);
	border-radius: 11px;
	padding: 10px 14px;
}

.tv-sum .big {
	font-size: 15px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
	margin-right: 6px;
}

.tv-sum .sp {
	flex: 1;
}

.tv-sum .tv-span {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.needtag {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 700;
	border-radius: 7px;
	padding: 3px 9px;
}

.tv-grp {
	border: 1px solid var(--line);
	border-radius: 11px;
	overflow: hidden;
}

.tv-gh {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--tint);
	padding: 9px 12px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--navy);
	border-bottom: 1px solid var(--line-soft);
}

.tv-gh .gm {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.tv-gh .sp {
	flex: 1;
}

.tv-gh .addrow {
	border: none;
	background: none;
	padding: 0;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--accent);
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.tv-r {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) 76px 10px 76px 84px minmax(0, 1.2fr) 48px 24px;
	gap: 7px;
	align-items: center;
	padding: 7px 12px;
	border-top: 1px solid var(--line-soft);
}

.tv-r.h {
	border-top: none;
	background: #fff;
	font-size: 10px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .03em;
	padding-top: 6px;
	padding-bottom: 4px;
}

.tv-r.h div:nth-child(7) {
	text-align: right;
}

.tv-r .ptsel,
.tv-r .ti {
	height: 30px;
	min-width: 0;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: #fff;
	padding: 0 6px;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
}

.tv-r .ptsel.q {
	font-weight: 600;
	color: var(--ink);
}

.tv-r .arrow {
	color: var(--muted-2);
	font-size: 11px;
	text-align: center;
}

.tv-r .stepper {
	height: 30px;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 4px;
}

.tv-r .stepper .n {
	font-weight: 700;
	color: var(--navy);
	font-variant-numeric: tabular-nums;
	font-size: 12px;
}

.tv-r .stepper .sb {
	width: 20px;
	height: 20px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	font-size: 10px;
	cursor: pointer;
}

.tv-r .hrs {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--muted);
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.tv-r .del {
	border: none;
	background: none;
	padding: 0;
	color: var(--muted-2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
}

.tv-r .del:hover {
	color: var(--neg);
}

.tv-addb {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.tv-addb .kvsug {
	font-size: 11px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.ghint.plain {
	background: var(--tint);
}

.ghint.plain .bi {
	color: var(--muted-2);
}

/* ── Tag-Werkzeug + Popover "Vorlagen einsetzen" ── (TAGESVORLAGEN.md §4.1/§5, components/vorlagenEinsetzen.js) */
.mcell .dn .dib {
	margin-left: 4px;
	width: 20px;
	height: 20px;
	border: none;
	border-radius: 6px;
	background: var(--accent-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	color: var(--accent);
	cursor: pointer;
	opacity: 0;
}

.mcell:hover .dn .dib,
.mcell .dn .dib:focus-visible,
.mcell .dn .dib.on {
	opacity: 1;
}

/* wie .addbedarf: Hover/geöffnet vollflächig in Akzentfarbe */
.mcell .dn .dib:hover,
.mcell .dn .dib.on {
	background: var(--accent);
	color: #fff;
}

/* Touch-Geräte ohne Hover: Tag-Werkzeug immer sichtbar */
@media (hover: none) {
	.mcell .dn .dib {
		opacity: 1;
	}
}

.wt-pop {
	position: fixed;
	z-index: 90;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 20px);
	overflow-y: auto;
}

.wt-pop::before {
	content: "";
	position: absolute;
	width: 12px;
	height: 12px;
	background: #fff;
	border-left: 1px solid var(--line);
	border-top: 1px solid var(--line);
}

.wt-pop.side::before {
	left: -7px;
	top: var(--ay, 22px);
	transform: rotate(-45deg);
}

.wt-pop.below::before {
	top: -7px;
	left: var(--ax, 18px);
	transform: rotate(45deg);
}

.wt-ph {
	padding: 13px 16px 10px;
	display: flex;
	align-items: center;
	gap: 9px;
}

.wt-ph > .bi {
	color: var(--accent);
	font-size: 15px;
}

.wt-ph .pt {
	font-size: 14px;
	font-weight: 700;
	color: var(--navy);
}

.wt-ph .ps {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted);
}

.wt-ph .x {
	margin-left: auto;
	border: none;
	background: none;
	color: var(--muted-2);
	font-size: 13px;
	cursor: pointer;
}

.wt-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0 12px;
}

.wt-opt {
	display: grid;
	grid-template-columns: 20px 4px minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
	width: 100%;
	text-align: left;
	font: inherit;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 9px 11px;
	cursor: pointer;
}

.wt-opt.ohne-tage {
	grid-template-columns: 20px 4px minmax(0, 1fr);
}

.wt-opt.on {
	border-color: var(--accent);
	background: var(--accent-soft);
}

.wt-opt .cb {
	width: 18px;
	height: 18px;
	border-radius: 5px;
	border: 1.5px solid var(--line);
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #fff;
}

.wt-opt.on .cb {
	background: var(--accent);
	border-color: var(--accent);
}

.wt-opt .bar {
	width: 4px;
	height: 30px;
	border-radius: 2px;
}

.wt-opt .on1 {
	font-size: 13px;
	font-weight: 700;
	color: var(--navy);
}

.wt-opt .om {
	font-size: 11px;
	font-weight: 600;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
	margin-top: 1px;
}

.wt-opt .tv-days span {
	font-size: 9.5px;
	padding: 2px 4px;
}

.wt-opt:not(.on) .tv-days span.on {
	background: var(--tint-2);
	color: var(--muted);
}

.wt-sec {
	font-size: 10.5px;
	font-weight: 700;
	color: var(--muted-2);
	text-transform: uppercase;
	letter-spacing: .05em;
	padding: 14px 16px 6px;
}

.wt-prev {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	padding: 0 12px;
}

.wt-pd {
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 5px 5px 6px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-height: 74px;
	min-width: 0;
	background: #fff;
}

.wt-pd .d {
	font-size: 10px;
	font-weight: 700;
	color: var(--muted-2);
}

.wt-pd .seg1 {
	height: 5px;
	border-radius: 3px;
}

.wt-pd .nm {
	font-size: 10px;
	font-weight: 700;
	color: var(--navy);
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.wt-pd .h {
	font-size: 10px;
	font-weight: 600;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
	margin-top: auto;
}

.wt-pd.off {
	background: var(--tint);
	border-style: dashed;
}

.wt-pd.off .nm {
	color: var(--muted-2);
	font-weight: 600;
}

.wt-pd.sum {
	border-color: var(--violet);
	box-shadow: 0 0 0 1px var(--violet) inset;
}

.wt-pd .plus {
	font-size: 9px;
	font-weight: 700;
	color: var(--violet);
	overflow-wrap: anywhere;
}

/* Vorwoche übernehmen: Personen je Tag */
.wt-pd .pers {
	font-size: 9.5px;
	font-weight: 600;
	color: var(--muted);
}

.wt-note {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 10px 12px 0;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--muted);
	background: var(--violet-bg);
	border-radius: 9px;
	padding: 7px 10px;
}

.wt-note .bi {
	color: var(--violet);
}

.wt-note b {
	color: var(--navy);
}

/* Hinweis auf bereits vorhandenen Bedarf (oben im Popover) */
.wt-note.info {
	margin: 0 12px 8px;
	background: var(--tint);
}

.wt-note.info .bi {
	color: var(--muted-2);
}

.wt-leer {
	margin: 0 12px;
	padding: 14px;
	border: 1px dashed var(--line);
	border-radius: 10px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted-2);
}

.wt-pf {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	margin-top: 12px;
	border-top: 1px solid var(--line-soft);
}

.wt-pf .lk {
	border: none;
	background: none;
	padding: 0;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	color: var(--accent);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

.wt-pf .sp {
	flex: 1;
}

.wt-pf .dbtn {
	height: 36px;
	padding: 0 14px;
	font-size: 13px;
	border-radius: 9px;
}

.wt-pf .dbtn:disabled {
	opacity: .45;
	cursor: not-allowed;
}
