/* ==========================================================================
   BoxKIx Frontend — Designsystem
   Kino Nacht Theme, geprüft gegen WCAG 2.2 Level AA

   Kontraste gegen Grund #0D0F12:
     Text        #F2F4F6   17,2:1
     Text still  #A9B4C0    9,1:1
     Akzent      #F2B441   10,4:1
     Erfolg      #6FD08C    9,7:1
     Warnung     #F2C14E   11,3:1
     Fehler      #FF8A80    8,4:1
     Rahmen      #2A323B    Trennlinie, keine Bedienelemente
     Rahmen hell #6B7783    Rand von Eingabefeldern, 3,97:1 auf Flaeche

   Keine externen Schriften, keine CDN Einbindung. Das ist eine bewusste
   Entscheidung aus dem Maßnahmenprotokoll und Voraussetzung dafür, dass
   boxkix.de ohne Einwilligungsbanner auskommt.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Marken
   -------------------------------------------------------------------------- */

:root {
	/* Flächen */
	--grund:        #0D0F12;
	--flaeche:      #14181D;
	--flaeche-hoch: #1C2229;
	--rahmen:       #2A323B;
	--rahmen-hell:  #6B7783;

	/* Schrift */
	--text:         #F2F4F6;
	--text-still:   #A9B4C0;

	/* Bedeutung */
	--akzent:       #F2B441;
	--akzent-dunkel:#0D0F12;
	--erfolg:       #6FD08C;
	--warnung:      #F2C14E;
	--fehler:       #FF8A80;

	/* Maße */
	--ziel:         2.75rem;  /* 44px, deutlich über den geforderten 24px */
	--ziel-klein:   1.5rem;   /* 24px, absolute Untergrenze */
	--radius:       6px;
	--rand:         clamp(1rem, 4vw, 2.5rem);
	--spalte:       76rem;

	/* Typografie. Systemschriften, damit nichts extern geladen wird. */
	--schrift: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont,
	           "Helvetica Neue", Arial, sans-serif;
	--schrift-zahl: ui-monospace, "SF Mono", "Cascadia Mono", Menlo,
	                Consolas, "Liberation Mono", monospace;

	--stufe-1: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
	--stufe-2: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
	--stufe-3: 1.15rem;
	--stufe-4: 0.95rem;
	--stufe-klein: 0.85rem;
}

/* --------------------------------------------------------------------------
   2. Grundlagen
   -------------------------------------------------------------------------- */

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

html {
	background: var(--grund);
	/* Kein festes font-size in px, damit die Browsereinstellung wirkt */
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--grund);
	color: var(--text);
	font-family: var(--schrift);
	font-size: 1rem;
	line-height: 1.6;
	/* Textabstände bleiben veränderbar, siehe WCAG 1.4.12 */
	letter-spacing: 0.01em;
}

/* Inhalt bleibt bis 320px Breite und bei 200% Zoom lesbar */
.huelle {
	width: 100%;
	max-width: var(--spalte);
	margin-inline: auto;
	padding-inline: var(--rand);
}

.huelle--breit { max-width: 100rem; }

h1, h2, h3, h4 {
	line-height: 1.25;
	margin: 0 0 0.5em;
	font-weight: 600;
	text-wrap: balance;
}

h1 { font-size: var(--stufe-1); letter-spacing: -0.02em; }
h2 { font-size: var(--stufe-2); }
h3 { font-size: var(--stufe-3); }

p { margin: 0 0 1em; max-width: 68ch; }

a {
	color: var(--akzent);
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

a:hover { text-decoration-thickness: 2px; }

/* --------------------------------------------------------------------------
   3. Fokus. WCAG 2.4.7, 2.4.11, 2.4.13
   -------------------------------------------------------------------------- */

:focus-visible {
	outline: 3px solid var(--akzent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Der Fokus darf nie unter der Kopfleiste verschwinden */
:target,
main:focus,
[id] { scroll-margin-top: 6rem; }

.sprungmarke {
	position: absolute;
	left: 0;
	top: -4rem;
	z-index: 100;
	display: inline-block;
	padding: 0.75rem 1.25rem;
	background: var(--akzent);
	color: var(--akzent-dunkel);
	font-weight: 600;
	text-decoration: none;
	transition: top 0.12s ease-out;
}

.sprungmarke:focus { top: 0; }

/* --------------------------------------------------------------------------
   4. Kopfleiste
   -------------------------------------------------------------------------- */

.kopfleiste {
	border-bottom: 1px solid var(--rahmen);
	background: var(--grund);
	/* Bewusst nicht position: sticky. Ein fixierter Kopf kann den Fokus
	   verdecken, was gegen WCAG 2.4.11 verstößt. */
}

.kopfleiste .huelle {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 2rem;
	min-height: 4.5rem;
	padding-block: 0.75rem;
}

.marke {
	display: inline-flex;
	flex-direction: column;
	gap: 0.35rem;
	color: var(--text);
	text-decoration: none;
	font-weight: 700;
	font-size: 1.25rem;
	letter-spacing: -0.01em;
}

/* Signatur: die Perforation eines 35mm Streifens als einziges Ornament */
.marke__perforation {
	display: block;
	height: 4px;
	background-image: radial-gradient(circle at 3px 2px, var(--akzent) 1.6px, transparent 1.7px);
	background-size: 8px 4px;
	background-repeat: repeat-x;
	opacity: 0.9;
}

.hauptnavigation { margin-inline-start: auto; }

.hauptnavigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hauptnavigation a {
	display: flex;
	align-items: center;
	min-height: var(--ziel);
	padding: 0 0.9rem;
	border-radius: var(--radius);
	color: var(--text-still);
	text-decoration: none;
	font-size: var(--stufe-4);
}

.hauptnavigation a:hover {
	background: var(--flaeche);
	color: var(--text);
}

/* Der aktuelle Punkt wird nicht nur durch Farbe kenntlich gemacht */
.hauptnavigation .ist-aktuell {
	color: var(--text);
	background: var(--flaeche-hoch);
	box-shadow: inset 0 -2px 0 var(--akzent);
	font-weight: 600;
}

/* Navigationsgruppen: dasselbe details/summary-Muster wie sonst im
   Portal (z. B. bei Kinos-Kürzel-Hinweisen), hier als Dropdown ohne
   JavaScript -- Browser öffnen/schließen es nativ, tastatur- und
   screenreaderbedienbar. */
.nav-gruppe {
	position: relative;
}

.nav-gruppe summary {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	min-height: var(--ziel);
	padding: 0 0.9rem;
	border-radius: var(--radius);
	color: var(--text-still);
	font-size: var(--stufe-4);
	cursor: pointer;
	list-style: none;
	user-select: none;
	transition: background-color 0.12s ease, color 0.12s ease;
}

.nav-gruppe__icon {
	font-size: 0.95em;
	line-height: 1;
	opacity: 0.85;
}

.nav-gruppe summary::-webkit-details-marker {
	display: none;
}

.nav-gruppe summary::after {
	content: "▾";
	font-size: 0.7em;
	opacity: 0.55;
	margin-inline-start: 0.1rem;
}

.nav-gruppe summary:hover,
.nav-gruppe[open] summary {
	background: var(--flaeche);
	color: var(--text);
}

.nav-gruppe:not(:last-child) {
	border-inline-end: 1px solid var(--rahmen-hell);
	padding-inline-end: 0.35rem;
	margin-inline-end: 0.15rem;
}

/* Markiert, in welcher Gruppe die aktuelle Seite liegt -- ohne die
   Gruppe deswegen aufzuklappen (das frühere Verhalten legte ein
   Dropdown dauerhaft über den Seiteninhalt). */
.nav-gruppe summary.ist-aktuelle-gruppe {
	color: var(--text);
	box-shadow: inset 0 -2px 0 var(--akzent);
	font-weight: 600;
}

.nav-gruppe__liste {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 20;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 15rem;
	margin: 0.35rem 0 0;
	padding: 0.4rem;
	list-style: none;
	background: var(--flaeche-hoch);
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.nav-gruppe__liste a {
	display: block;
	padding: 0.55rem 0.8rem;
	border-radius: var(--radius);
	color: var(--text-still);
	text-decoration: none;
	font-size: var(--stufe-4);
	white-space: nowrap;
	transition: background-color 0.12s ease, color 0.12s ease;
}

.nav-gruppe__liste a:hover {
	background: var(--flaeche);
	color: var(--text);
}

.nav-gruppe__liste .ist-aktuell {
	color: var(--text);
	background: var(--flaeche);
	box-shadow: inset 2px 0 0 var(--akzent);
	font-weight: 600;
}

/* Auf schmalen Bildschirmen schwebt das Dropdown nicht frei, sondern
   klappt an Ort und Stelle auf -- ein frei schwebendes Panel würde bei
   wenig Platz leicht über den Bildschirmrand hinauslaufen. */
@media (max-width: 720px) {
	.nav-gruppe__liste {
		position: static;
		box-shadow: none;
		border-left: 2px solid var(--rahmen);
		border-radius: 0;
		margin-inline-start: 0.75rem;
	}
}

.sitzung {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: var(--stufe-klein);
	color: var(--text-still);
}

.sitzung__name { white-space: nowrap; }

.sitzungshinweis {
	max-width: none;
	margin: 0;
	padding: 0.75rem var(--rand);
	background: var(--flaeche-hoch);
	border-bottom: 1px solid var(--rahmen);
	color: var(--warnung);
	font-size: var(--stufe-4);
}

/* --------------------------------------------------------------------------
   5. Kennsätze und Status.
      Nie allein über Farbe, immer mit Text. WCAG 1.4.1
   -------------------------------------------------------------------------- */

.kennsatz {
	display: inline-flex;
	align-items: center;
	min-height: var(--ziel-klein);
	padding: 0.1rem 0.6rem;
	border: 1px solid var(--rahmen-hell);
	border-radius: 999px;
	font-size: var(--stufe-klein);
	font-weight: 600;
	letter-spacing: 0.03em;
	color: var(--text-still);
	white-space: nowrap;
}

.kennsatz--intern    { border-color: var(--akzent);  color: var(--akzent); }
.kennsatz--verleiher { border-color: #C39BFF;        color: #C39BFF; }
.kennsatz--kino      { border-color: #7FC4FF;        color: #7FC4FF; }
.kennsatz--presse    { border-color: #FF9EC4;        color: #FF9EC4; }
.kennsatz--festival  { border-color: #6FD08C;        color: #6FD08C; }

.status {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: var(--ziel-klein);
	font-size: var(--stufe-klein);
	font-weight: 600;
}

.status::before {
	content: "";
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: currentColor;
	flex: none;
}

.status--offen     { color: var(--warnung); }
.status--bezahlt   { color: var(--erfolg); }
.status--ueberfaellig { color: var(--fehler); }

/* --------------------------------------------------------------------------
   6. Meldungen
   -------------------------------------------------------------------------- */

.meldungen { margin: 1.5rem 0 0; }

.meldung {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	max-width: none;
	margin: 0 0 0.75rem;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--rahmen-hell);
	border-inline-start-width: 4px;
	border-radius: var(--radius);
	background: var(--flaeche);
}

.meldung__marke {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	font-weight: 700;
	font-size: 0.9rem;
	background: currentColor;
}

.meldung__marke::first-letter { color: var(--grund); }
.meldung__text { color: var(--text); }

.meldung--erfolg  { border-inline-start-color: var(--erfolg);  color: var(--erfolg); }
.meldung--hinweis { border-inline-start-color: var(--akzent);  color: var(--akzent); }
.meldung--fehler  { border-inline-start-color: var(--fehler);  color: var(--fehler); }

.fehlerliste {
	margin: 1.5rem 0;
	padding: 1.1rem 1.25rem;
	border: 2px solid var(--fehler);
	border-radius: var(--radius);
	background: var(--flaeche);
}

.fehlerliste h2 { margin: 0 0 0.5rem; font-size: var(--stufe-3); color: var(--fehler); }
.fehlerliste ul { margin: 0; padding-inline-start: 1.2rem; }
.fehlerliste li { margin-bottom: 0.35rem; }
.fehlerliste a  { color: var(--fehler); }

/* --------------------------------------------------------------------------
   7. Formulare
   -------------------------------------------------------------------------- */

.feldgruppe { margin-bottom: 1.25rem; }

.feldreihe {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.feldreihe .feldgruppe {
	flex: 1 1 12rem;
}

label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: var(--stufe-4);
}

.feldhinweis {
	margin: 0 0 0.4rem;
	font-size: var(--stufe-klein);
	color: var(--text-still);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
select,
textarea {
	width: 100%;
	min-height: var(--ziel);
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--rahmen-hell);
	border-radius: var(--radius);
	background: var(--flaeche);
	color: var(--text);
	font-family: inherit;
	font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
	color: var(--text-still);
	opacity: 1;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
	border-color: var(--fehler);
	border-width: 2px;
}

.feldfehler {
	display: block;
	margin-top: 0.35rem;
	font-size: var(--stufe-klein);
	font-weight: 600;
	color: var(--fehler);
}

fieldset {
	margin: 0 0 1.5rem;
	padding: 0;
	border: 0;
}

legend {
	padding: 0;
	font-size: var(--stufe-3);
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   8. Schaltflächen
   -------------------------------------------------------------------------- */

.knopf {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: var(--ziel);
	min-width: var(--ziel);
	padding: 0 1.25rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: var(--akzent);
	color: var(--akzent-dunkel);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.knopf:hover { filter: brightness(1.08); }

.knopf--zweit {
	background: transparent;
	border-color: var(--rahmen-hell);
	color: var(--text);
}

.knopf--zweit:hover { background: var(--flaeche); filter: none; }

.knopf--still {
	background: transparent;
	border-color: var(--rahmen-hell);
	color: var(--text-still);
	font-weight: 500;
	padding: 0 0.9rem;
}

.knopf--still:hover { color: var(--text); background: var(--flaeche); filter: none; }

.knopf--linkartig {
	background: none;
	border: none;
	padding: 0;
	color: var(--akzent);
	text-decoration: underline;
	font: inherit;
	cursor: pointer;
}

.knopf--linkartig:hover { color: var(--akzent-dunkel, var(--akzent)); }

.knopf--voll { width: 100%; }

.knopfreihe {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

/* --------------------------------------------------------------------------
   9. Karten und Kacheln
   -------------------------------------------------------------------------- */

.karte {
	padding: 1.5rem;
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	background: var(--flaeche);
}

.karte > :last-child { margin-bottom: 0; }

.kacheln {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	gap: 1.25rem;
	margin: 2rem 0;
	padding: 0;
	list-style: none;
}

.kachel {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.5rem;
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	background: var(--flaeche);
}

.kachel h3 { margin: 0; }
.kachel p  { margin: 0; color: var(--text-still); font-size: var(--stufe-4); }
.kachel .knopf { margin-top: auto; align-self: flex-start; }

.zahl {
	font-family: var(--schrift-zahl);
	font-size: var(--stufe-1);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
}

.augenbraue {
	margin: 2rem 0 0.25rem;
	font-size: var(--stufe-klein);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-still);
}

/* --------------------------------------------------------------------------
   10. Tabellen. Echte Tabellen mit Kopfzellen, WCAG 1.3.1
   -------------------------------------------------------------------------- */

.tabellenhuelle {
	overflow-x: auto;
	margin: 1.5rem 0;
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--stufe-4);
}

caption {
	padding: 0.9rem 1rem;
	text-align: start;
	font-weight: 600;
	color: var(--text-still);
	border-bottom: 1px solid var(--rahmen);
}

th, td {
	padding: 0.75rem 1rem;
	text-align: start;
	vertical-align: top;
	border-bottom: 1px solid var(--rahmen);
}

thead th {
	background: var(--flaeche-hoch);
	font-weight: 600;
	white-space: nowrap;
}

tbody tr:last-child th,
tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover { background: var(--flaeche); }

td.betrag,
th.betrag {
	text-align: end;
	font-family: var(--schrift-zahl);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Sortierbare Spaltenköpfe behalten die Mindestzielgröße */
th button {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: var(--ziel-klein);
	padding: 0.15rem 0.3rem;
	border: 0;
	border-radius: 3px;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   11. Anmeldeseite
   -------------------------------------------------------------------------- */

.anmeldung {
	max-width: 30rem;
	margin: 3rem auto 4rem;
}

.anmeldung--breit {
	max-width: 44rem;
}

.anmeldung h1 { margin-bottom: 0.25rem; }

.anmeldung__einleitung {
	color: var(--text-still);
	margin-bottom: 2rem;
}

.trenner {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 2rem 0;
	color: var(--text-still);
	font-size: var(--stufe-klein);
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.trenner::before,
.trenner::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--rahmen);
}

/* --------------------------------------------------------------------------
   12. Fußleiste
   -------------------------------------------------------------------------- */

.fussleiste {
	margin-top: 5rem;
	padding-block: 2.5rem;
	border-top: 1px solid var(--rahmen);
	color: var(--text-still);
	font-size: var(--stufe-4);
}

.fussleiste h2 { font-size: var(--stufe-3); color: var(--text); }
.fussleiste ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 1rem 0; padding: 0; list-style: none; }

.fussleiste__wege a {
	display: inline-flex;
	align-items: center;
	min-height: var(--ziel-klein);
}

.fussleiste__zeile { margin: 0; font-size: var(--stufe-klein); }

/* --------------------------------------------------------------------------
   13. Nur für Screenreader
   -------------------------------------------------------------------------- */

.nur-vorlesen {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   14. Rücksicht auf Systemeinstellungen
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@media (prefers-contrast: more) {
	:root {
		--text-still: #D6DEE6;
		--rahmen:     #55606C;
		--rahmen-hell:#7C8894;
	}
}

@media (forced-colors: active) {
	.knopf { border: 1px solid ButtonText; }
	.marke__perforation { display: none; }
	:focus-visible { outline: 3px solid Highlight; }
}

/* Helles Betriebssystem: die Nachtansicht bleibt, aber Ränder werden klarer */
@media (prefers-color-scheme: light) {
	:root { --rahmen: #38424E; }
}

/* --------------------------------------------------------------------------
   15. Druck
   -------------------------------------------------------------------------- */

@media print {
	body { background: #fff; color: #000; }
	.kopfleiste, .fussleiste, .sprungmarke, .knopf, .sitzungshinweis, .meldungen { display: none; }
	.tabellenhuelle { border: 0; }
	th, td { border-bottom: 1px solid #999; }
	a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* --------------------------------------------------------------------------
   16. Abrechnung
   -------------------------------------------------------------------------- */

.reiter { margin: 1.5rem 0; border-bottom: 1px solid var(--rahmen); }

.reiter ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.reiter a {
	display: flex;
	align-items: center;
	min-height: var(--ziel);
	padding: 0 1rem;
	color: var(--text-still);
	text-decoration: none;
	border-bottom: 3px solid transparent;
}

.reiter a:hover { color: var(--text); }

/* Der aktive Reiter trägt Farbe, Schriftschnitt und Linie zugleich */
.reiter .ist-aktuell {
	color: var(--text);
	font-weight: 600;
	border-bottom-color: var(--akzent);
}

.kennzahlen {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	gap: 1rem;
	margin: 1.5rem 0 2.5rem;
	padding: 0;
	list-style: none;
}

.kennzahl {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	background: var(--flaeche);
}

/* Auffällige Werte tragen zusätzlich zur Farbe eine Linie an der Seite */
.kennzahl--achtung {
	border-inline-start: 4px solid var(--warnung);
}

.kennzahl__wert {
	font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
	line-height: 1.15;
	color: var(--text);
}

.kennzahl--achtung .kennzahl__wert { color: var(--warnung); }

.kennzahl__name {
	font-size: var(--stufe-4);
	font-weight: 600;
	color: var(--text-still);
}

.kennzahl__zusatz {
	font-size: var(--stufe-klein);
	color: var(--text-still);
}

.filterleiste {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: flex-end;
	margin: 1rem 0 2rem;
	padding: 1.25rem;
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	background: var(--flaeche);
}

.filterleiste .feldgruppe {
	flex: 1 1 12rem;
	margin-bottom: 0;
}

.filterleiste .feldgruppe--knoepfe {
	flex: 0 0 auto;
	display: flex;
	gap: 0.5rem;
}

.zeile__zusatz {
	display: block;
	font-size: var(--stufe-klein);
	font-weight: 400;
	color: var(--text-still);
}

.zeile__zusatz--achtung { color: var(--warnung); }

tfoot th,
tfoot td {
	border-top: 2px solid var(--rahmen-hell);
	background: var(--flaeche-hoch);
	font-weight: 600;
}

.brotkrumen {
	margin: 1.5rem 0 0.5rem;
	font-size: var(--stufe-4);
}

.kopfzeile-meta {
	margin-top: -0.5rem;
	color: var(--text-still);
	font-size: var(--stufe-4);
}

/* --------------------------------------------------------------------------
   17. Mahntext
   -------------------------------------------------------------------------- */

.mahntext {
	margin: 0;
	padding: 1rem 1.1rem;
	border: 1px solid var(--rahmen-hell);
	border-radius: var(--radius);
	background: var(--flaeche-hoch);
	color: var(--text);
	font-family: var(--schrift);
	font-size: var(--stufe-4);
	line-height: 1.6;
	white-space: pre-wrap;
	overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   18. TB-Dokument
   -------------------------------------------------------------------------- */

.tb-dokument {
	max-width: 42rem;
	font-family: Georgia, 'Times New Roman', serif;
	line-height: 1.5;
}

.tb-dokument p { max-width: none; }

.tb-absender,
.tb-datum {
	margin: 0 0 0.25rem;
	font-size: var(--stufe-klein);
	color: var(--text-still);
	font-family: var(--schrift);
}

.tb-headline {
	margin: 1.25rem 0 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--text);
	font-size: var(--stufe-2);
	letter-spacing: 0.04em;
}

.tb-an { margin-bottom: 0.25rem; }

.tb-filmtitel {
	font-size: var(--stufe-3);
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 0.75rem;
}

.tb-tabelle {
	width: 100%;
	margin: 1rem 0;
	border-collapse: collapse;
}

.tb-tabelle th,
.tb-tabelle td {
	padding: 0.4rem 0.75rem 0.4rem 0;
	text-align: start;
	font-size: var(--stufe-4);
	border-bottom: 1px solid var(--rahmen);
	font-weight: 400;
}

.tb-tabelle th { width: 40%; color: var(--text-still); font-weight: 600; }

.tb-nummer-wert {
	font-family: var(--schrift-zahl);
	font-weight: 700;
	letter-spacing: 0.03em;
}

.tb-agb,
.tb-zahlungstext {
	font-family: var(--schrift);
	font-size: var(--stufe-klein);
	color: var(--text-still);
}

.tb-fuss {
	margin-top: 2rem;
	font-family: var(--schrift);
	font-size: var(--stufe-klein);
	color: var(--text-still);
	border-top: 1px solid var(--rahmen);
	padding-top: 0.75rem;
}

kbd {
	display: inline-block;
	padding: 0.05rem 0.4rem;
	border: 1px solid var(--rahmen-hell);
	border-radius: 4px;
	background: var(--flaeche);
	font-family: var(--schrift-zahl);
	font-size: var(--stufe-klein);
}

/* Beim Drucken: nur das Dokument selbst, in Schwarz auf Weiß, ohne Portal-Rahmen */
@media print {
	.tb-dokument {
		border: 0;
		padding: 0;
		background: #fff;
		color: #000;
		max-width: none;
	}
	.tb-tabelle th,
	.tb-tabelle td { border-bottom-color: #ccc; }
	.brotkrumen,
	h1 + p,
	.tb-bearbeiten-abschnitt { display: none; }
}

/* --------------------------------------------------------------------------
   19. Sortierbare Tabellenspalten
   -------------------------------------------------------------------------- */

.sortier-link {
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.sortier-link:hover,
.sortier-link:focus-visible {
	text-decoration: underline;
}

.sortier-link[aria-current="true"] {
	color: var(--akzent);
	font-weight: 700;
}

/* --------------------------------------------------------------------------
   20. FFA-Meldestand: Gesamtzeile je Film
   -------------------------------------------------------------------------- */

.gesamtzeile {
	border-top: 2px solid var(--rahmen-hell);
	font-weight: 700;
}

.gesamtzeile th,
.gesamtzeile td {
	background: var(--flaeche);
}

/* --------------------------------------------------------------------------
   20. Presse-Filmseite
   -------------------------------------------------------------------------- */

.presse-film {
	display: grid;
	grid-template-columns: minmax(220px, 300px) 1fr;
	gap: var(--abstand-gross, 2rem);
	align-items: start;
	margin-block: var(--abstand-gross, 2rem);
}

.presse-film__poster img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

.presse-film__poster-platzhalter {
	width: 100%;
	aspect-ratio: 2 / 3;
	background: var(--flaeche-zweit, #1a1a1a);
	border: 1px dashed var(--rahmen, #333);
	border-radius: 4px;
}

.presse-film__downloads {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

@media (max-width: 640px) {
	.presse-film {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------------------
   21. Ehrentopf-Feld (Anti-Spam, öffentliche Formulare)
   -------------------------------------------------------------------------- */

.feldgruppe--versteckt {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   22. Konflikt-Marke in Tabellenzeilen
   -------------------------------------------------------------------------- */

.zeile__marke--konflikt {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.2em;
	height: 1.2em;
	margin-left: 0.4em;
	border-radius: 50%;
	background: var(--fehler);
	color: #1a1a1a;
	font-weight: 700;
	font-size: 0.85em;
	line-height: 1;
}

/* --------------------------------------------------------------------------
   23a. Herausbringungs-Map (horizontale Phasen-Übersicht mit Feature-Links)
   -------------------------------------------------------------------------- */

.herausbringungsmap-huelle {
	overflow-x: auto;
	overflow-y: hidden;
	padding-block: 2.2rem 0.5rem;
	margin-block: 1.5rem;
}

.herausbringungsmap {
	display: flex;
	align-items: flex-start;
	gap: 0;
	min-width: max-content;
	position: relative;
}

/* Die durchgehende horizontale Linie, auf der die Phasen wie Stationen
   sitzen -- ein Pseudo-Element auf dem Container, damit sie nicht pro
   Station neu gezeichnet werden muss und an den Rändern glatt endet. */
.herausbringungsmap::before {
	content: '';
	position: absolute;
	top: 2.55rem;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--rahmen-hell);
}

.herausbringungsmap__station {
	flex: 0 0 17rem;
	width: 17rem;
	padding-inline: 1rem;
	position: relative;
}

.herausbringungsmap__station:first-child { padding-left: 0; }
.herausbringungsmap__station:last-child { padding-right: 0; }

.herausbringungsmap__zeit {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--text-still);
	text-transform: uppercase;
	margin-bottom: 0.4rem;
	white-space: nowrap;
}

.herausbringungsmap__punkt {
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 50%;
	background: var(--akzent);
	border: 2px solid var(--flaeche);
	box-shadow: 0 0 0 2px var(--akzent);
	margin-bottom: 1rem;
}

.herausbringungsmap__titel {
	font-size: 1rem;
	margin: 0 0 0.5rem;
}

.herausbringungsmap__beschreibung {
	font-size: 0.85rem;
	color: var(--text-still);
	margin: 0 0 0.9rem;
}

.herausbringungsmap__features {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.herausbringungsmap__features li {
	border-left: 2px solid var(--rahmen);
	padding-left: 0.6rem;
}

.herausbringungsmap__features a {
	font-weight: 600;
	font-size: 0.9rem;
}

.herausbringungsmap__features .feldhinweis {
	display: block;
	font-size: 0.78rem;
	margin-top: 0.1rem;
}

/* --------------------------------------------------------------------------
   23. Zeitstrahl (Tasks, Presseplan — horizontale Ansicht)
   -------------------------------------------------------------------------- */

.ansicht-umschalter {
	display: flex;
	gap: 0.5rem;
	margin-block: 1rem;
}

.zeitstrahl-bereich {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin-block: 1rem;
}

.zeitstrahl-huelle {
	overflow-x: auto;
	overflow-y: hidden;
	border: 1px solid var(--rahmen);
	border-radius: calc(var(--radius) + 4px);
	background: linear-gradient(180deg, var(--flaeche-hoch) 0%, var(--flaeche) 12%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.zeitstrahl {
	position: relative;
	min-width: 100%;
	/* Feines Tagesraster ganz ohne zusätzliche Elemente pro Tag: ein
	   sich wiederholender Verlauf zieht bei jedem Tagesabstand eine
	   hauchdünne Linie. --tag-breite wird inline je Ansicht gesetzt. */
	background-image: repeating-linear-gradient(
		to right,
		transparent 0,
		transparent calc(var(--tag-breite, 28px) - 1px),
		rgba(255, 255, 255, 0.05) calc(var(--tag-breite, 28px) - 1px),
		rgba(255, 255, 255, 0.05) var(--tag-breite, 28px)
	);
}

.zeitstrahl__kopf {
	position: relative;
	height: 1.9rem;
	border-bottom: 1px solid var(--rahmen);
}

.zeitstrahl__tagesmarke {
	position: absolute;
	top: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	padding-left: 6px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--text-still);
	white-space: nowrap;
}

.zeitstrahl__tagesmarke::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.35rem;
	bottom: 0.35rem;
	width: 1px;
	background: var(--rahmen-hell);
}

.zeitstrahl__heute {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	background: linear-gradient(180deg, var(--fehler) 0%, rgba(255, 138, 128, 0.35) 100%);
	z-index: 5;
	box-shadow: 0 0 8px rgba(255, 138, 128, 0.55);
}

.zeitstrahl__heute::before {
	content: 'Heute';
	position: absolute;
	top: -1.9rem;
	left: 50%;
	transform: translateX(-50%);
	background: var(--fehler);
	color: #1a1a1a;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 0.15rem 0.5rem;
	border-radius: 999px;
	white-space: nowrap;
}

.zeitstrahl__gruppe {
	position: relative;
	border-bottom: 1px solid var(--rahmen);
}

.zeitstrahl__gruppe:nth-child(even) {
	background: rgba(255, 255, 255, 0.015);
}

.zeitstrahl__gruppenname {
	position: sticky;
	left: 0;
	top: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.25rem 0.7rem 0.25rem 0.55rem;
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--text);
	background: var(--flaeche-hoch);
	border-left: 3px solid var(--gruppenfarbe, var(--akzent));
	border-radius: 0 0 var(--radius) 0;
	box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.25);
	z-index: 3;
}

.zeitstrahl__balken {
	position: absolute;
	height: 1.7rem;
	border-radius: 999px;
	display: flex;
	align-items: center;
	gap: 0.3rem;
	padding-inline: 0.55rem;
	overflow: hidden;
	white-space: nowrap;
	text-decoration: none;
	color: rgba(0, 0, 0, 0.82);
	font-size: 0.78rem;
	font-weight: 700;
	background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%);
	background-color: var(--balkenfarbe, var(--akzent));
	background-blend-mode: overlay;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.12);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.zeitstrahl__balken:hover,
.zeitstrahl__balken:focus-visible {
	transform: translateY(-1px);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), 0 0 0 2px var(--text);
	outline: none;
}

.zeitstrahl__balken--erledigt {
	opacity: 0.5;
	text-decoration: line-through;
	box-shadow: none;
}

.zeitstrahl__balken--erledigt::before {
	content: '✓';
	text-decoration: none;
	font-size: 0.75rem;
}

.zeitstrahl__balkentext {
	overflow: hidden;
	text-overflow: ellipsis;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}

@media (prefers-reduced-motion: reduce) {
	.zeitstrahl__balken {
		transition: none;
	}
}

/* Wochenend-Schattierung: eine ruhige, ganzflaechige Spalte je Samstag/Sonntag */
.zeitstrahl__wochenende {
	position: absolute;
	top: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.16);
	z-index: 1;
	pointer-events: none;
}

/* Meilensteine: einzelne Tage (Versand, Deadline) als Raute statt Balken --
   dieselbe Unterscheidung, die Asana/Monday/Linear fuer Gantt-Ansichten
   treffen: ein Balken zeigt eine Zeitspanne, eine Raute einen Zeitpunkt. */
.zeitstrahl__balken--meilenstein {
	background: none;
	background-image: none;
	background-color: transparent;
	box-shadow: none;
	border: none;
	padding-inline: 0;
	width: 13rem !important;
	gap: 0.5rem;
}

.zeitstrahl__meilenstein-form {
	width: 0.85rem;
	height: 0.85rem;
	flex-shrink: 0;
	transform: rotate(45deg);
	background-color: var(--balkenfarbe, var(--akzent));
	border-radius: 3px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 5px rgba(0, 0, 0, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.18);
}

.zeitstrahl__balken--meilenstein .zeitstrahl__balkentext {
	color: var(--text);
	font-weight: 700;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 6px rgba(0, 0, 0, 0.6);
}

.zeitstrahl__balken--meilenstein:hover,
.zeitstrahl__balken--meilenstein:focus-visible {
	transform: none;
	box-shadow: none;
}

.zeitstrahl__balken--meilenstein:hover .zeitstrahl__meilenstein-form,
.zeitstrahl__balken--meilenstein:focus-visible .zeitstrahl__meilenstein-form {
	transform: rotate(45deg) scale(1.15);
	outline: 2px solid var(--text);
	outline-offset: 2px;
}

/* Zustaendigkeits-Kuerzel als kleiner Kreis, statt nur im Titel-Text */
.zeitstrahl__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.1rem;
	height: 1.1rem;
	flex-shrink: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.28);
	font-size: 0.58rem;
	font-weight: 800;
	letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   24. Kalenderansicht (Tasks)
   -------------------------------------------------------------------------- */

table.kalender {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
}

table.kalender th {
	text-align: center;
	padding: 0.4rem;
	font-size: 0.8rem;
	color: var(--text-still);
	border-bottom: 1px solid var(--rahmen);
}

.kalender__zelle {
	vertical-align: top;
	border: 1px solid var(--rahmen);
	padding: 0.3rem;
	height: 6rem;
	overflow: hidden;
}

.kalender__zelle--fremd {
	opacity: 0.4;
}

.kalender__zelle--heute {
	background: var(--flaeche-hoch);
	border-color: var(--fehler);
	border-width: 2px;
}

.kalender__tag {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	margin-bottom: 0.2rem;
}

.kalender__eintrag {
	display: block;
	font-size: 0.72rem;
	line-height: 1.2;
	padding: 0.1rem 0.3rem;
	margin-bottom: 0.15rem;
	border-radius: 3px;
	color: #1a1a1a;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.kalender__eintrag--erledigt {
	opacity: 0.5;
	text-decoration: line-through;
}

@media (max-width: 640px) {
	.kalender__zelle { height: 3.5rem; font-size: 0.7rem; }
	.kalender__eintrag { font-size: 0.65rem; }
}

/* --------------------------------------------------------------------------
   25. Dispoplan
   -------------------------------------------------------------------------- */

table.kalender--dispoplan .kalender__zelle {
	height: 5.5rem;
	padding: 0.25rem;
}

.kalender__zelle--gewaehlt {
	border-color: var(--akzent);
	border-width: 2px;
}

.kalender__tageslink {
	display: block;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.kalender__tageslink:hover,
.kalender__tageslink:focus-visible {
	background: rgba(255, 255, 255, 0.06);
	border-radius: var(--radius);
}

.dispoplan__kinostart {
	display: block;
	font-size: 0.62rem;
	font-weight: 700;
	color: var(--akzent);
	letter-spacing: 0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dispoplan__anzahl {
	display: block;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--text);
	margin-top: 0.15rem;
}

.dispoplan__punkte {
	display: flex;
	gap: 0.2rem;
	flex-wrap: wrap;
	margin-top: 0.2rem;
}

.dispoplan__punkt {
	display: inline-block;
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	flex-shrink: 0;
}

.dispoplan__legende-titel {
	font-size: 0.85rem;
	color: var(--text-still);
	margin-top: 1.5rem;
}

.dispoplan__legende {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	font-size: 0.82rem;
}

.dispoplan__legende-eintrag {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

@media (max-width: 640px) {
	table.kalender--dispoplan .kalender__zelle {
		height: 4rem;
		font-size: 0.68rem;
	}
	.dispoplan__kinostart {
		font-size: 0.55rem;
	}
}

/* --------------------------------------------------------------------------
   26. Förderantrag-Vergleich
   -------------------------------------------------------------------------- */

.foerderantrag__foerderer {
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--rahmen);
}

.foerderantrag__typwahl {
	display: block;
	margin-top: 0.3rem;
	margin-left: 1.6rem;
	font-size: 0.85rem;
	color: var(--text-still);
}

.foerderantrag__typwahl label {
	margin-right: 1rem;
	white-space: nowrap;
}

.foerderantrag__bewertung {
	line-height: 1.6;
}

/* --------------------------------------------------------------------------
   27. Veedelskino-Gutschrift (ausgehender Beleg)
   -------------------------------------------------------------------------- */

.veedelskino-beleg {
	max-width: 42rem;
	font-family: Georgia, 'Times New Roman', serif;
	line-height: 1.5;
}

.veedelskino-beleg p { max-width: none; }

.veedelskino-beleg__absender,
.veedelskino-beleg__datum {
	margin: 0 0 0.25rem;
	font-size: var(--stufe-klein);
	color: var(--text-still);
	font-family: var(--schrift);
}

.veedelskino-beleg__headline {
	margin: 1.25rem 0 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--text);
	font-size: var(--stufe-2);
	letter-spacing: 0.04em;
}

.veedelskino-beleg__an { margin-bottom: 0.25rem; }

.veedelskino-beleg__filmtitel {
	font-size: var(--stufe-3);
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 0.75rem;
}

.veedelskino-beleg__tabelle {
	width: 100%;
	margin: 1rem 0;
	border-collapse: collapse;
}

.veedelskino-beleg__tabelle th,
.veedelskino-beleg__tabelle td {
	padding: 0.35rem 0.75rem 0.35rem 0;
	text-align: start;
	font-size: var(--stufe-4);
	border-bottom: 1px solid var(--rahmen);
	font-weight: 400;
}

.veedelskino-beleg__tabelle td.betrag,
.veedelskino-beleg__tabelle th.betrag { text-align: end; font-family: var(--schrift-zahl); }

.veedelskino-beleg__berechnung th { width: 60%; color: var(--text-still); font-weight: 400; }

.veedelskino-beleg__zwischensumme th,
.veedelskino-beleg__zwischensumme td { font-weight: 700; border-top: 2px solid var(--text); border-bottom: none; }

.veedelskino-beleg__endbetrag {
	margin-top: 1rem;
	padding: 0.85rem 1rem;
	border: 2px solid var(--akzent);
	border-radius: var(--radius);
	font-size: var(--stufe-3);
	font-weight: 700;
}

.veedelskino-beleg__fuss {
	margin-top: 2rem;
	font-family: var(--schrift);
	font-size: var(--stufe-klein);
	color: var(--text-still);
	border-top: 1px solid var(--rahmen);
	padding-top: 0.75rem;
}

@media print {
	.veedelskino-beleg {
		border: 0;
		padding: 0;
		background: #fff;
		color: #000;
		max-width: none;
	}
	.veedelskino-beleg__tabelle th,
	.veedelskino-beleg__tabelle td { border-bottom-color: #ccc; }
	.veedelskino-beleg__endbetrag { border-color: #000; }
	.brotkrumen,
	h1 + p,
	form { display: none; }
}

/* --------------------------------------------------------------------------
   28. Ladehinweis bei KI-Abfragen
   -------------------------------------------------------------------------- */

.ladehinweis {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.92);
}

.ladehinweis__karte {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	padding: 2rem 2.5rem;
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	background: var(--flaeche);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	max-width: 20rem;
	text-align: center;
}

.ladehinweis__spinner {
	width: 2.25rem;
	height: 2.25rem;
	border: 3px solid var(--rahmen);
	border-top-color: var(--akzent);
	border-radius: 50%;
	animation: ladehinweis-drehen 0.8s linear infinite;
}

@keyframes ladehinweis-drehen {
	to { transform: rotate(360deg); }
}

@media (prefers-color-scheme: dark) {
	.ladehinweis { background: rgba(0, 0, 0, 0.85); }
}

/* --------------------------------------------------------------------------
   29. Hinweis-Karte (z.B. Monatsreport-Erinnerung im Tagesbriefing)
   -------------------------------------------------------------------------- */

.karte--hinweis {
	border-left: 4px solid var(--akzent);
	background: color-mix(in srgb, var(--akzent) 8%, var(--flaeche));
}

/* --------------------------------------------------------------------------
   29b. Kritische Gegenprüfung von KI-Ergebnissen
   -------------------------------------------------------------------------- */

.gegenpruefung--gut {
	border-left: 4px solid var(--erfolg);
	background: color-mix(in srgb, var(--erfolg) 10%, var(--flaeche));
}

.gegenpruefung--vorsicht {
	border-left: 4px solid var(--warnung);
	background: color-mix(in srgb, var(--warnung) 10%, var(--flaeche));
}

.gegenpruefung--schlecht {
	border-left: 4px solid var(--fehler);
	background: color-mix(in srgb, var(--fehler) 10%, var(--flaeche));
}

.gegenpruefung--unklar {
	border-left: 4px solid var(--rahmen-hell);
}

/* --------------------------------------------------------------------------
   29c. Quellenliste bei KI-Recherchen mit Websuche
   -------------------------------------------------------------------------- */

.quellen {
	margin: 0.75rem 0 1.25rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	background: var(--flaeche);
}

.quellen__titel {
	font-size: var(--stufe-4);
	color: var(--text-still);
	margin-bottom: 0.4rem;
}

.quellen__liste {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	font-size: var(--stufe-4);
}

.quellen__liste a {
	word-break: break-word;
}

/* --------------------------------------------------------------------------
   29d. Prioritäten-Liste
   -------------------------------------------------------------------------- */

.prioritaeten-liste {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin-bottom: 2rem;
}

.prioritaeten-punkt {
	padding: 0.6rem 1rem;
	border-radius: var(--radius);
}

.prioritaeten-punkt p {
	margin: 0.2rem 0 0;
	font-size: var(--stufe-4);
	color: var(--text-still);
}

.prioritaeten-punkt .feldhinweis {
	margin-left: 0.5rem;
}

/* --------------------------------------------------------------------------
   30. Nachrichten-Verlauf
   -------------------------------------------------------------------------- */

.nachrichten-verlauf {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-block: 1.5rem;
}

.nachricht {
	max-width: 34rem;
	padding: 0.75rem 1rem;
	border-radius: var(--radius);
	border: 1px solid var(--rahmen);
}

.nachricht--intern {
	align-self: flex-end;
	background: color-mix(in srgb, var(--akzent) 10%, var(--flaeche));
}

.nachricht--extern {
	align-self: flex-start;
	background: var(--flaeche);
}

.nachricht__kopf {
	margin: 0 0 0.35rem;
	font-size: 0.85rem;
	color: var(--text-still);
}

.nachricht__text {
	margin: 0;
}

.nachricht__anhang {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   31. Gefahren-Knopf (endgültiges Löschen)
   -------------------------------------------------------------------------- */

.knopf--gefahr {
	background: var(--fehler);
	color: var(--akzent-dunkel);
	border-color: var(--fehler);
}

.knopf--gefahr:hover,
.knopf--gefahr:focus-visible {
	background: color-mix(in srgb, var(--fehler) 85%, black);
}

/* --------------------------------------------------------------------------
   32. Chat-Assistent
   -------------------------------------------------------------------------- */

.chat-verlauf {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.chat-nachricht {
	max-width: 40rem;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	border: 1px solid var(--rahmen);
	background: var(--flaeche);
}

.chat-nachricht--user {
	margin-left: auto;
	background: var(--flaeche-hoch);
	border-color: var(--rahmen-hell);
}

.chat-nachricht__rolle {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--text-still);
	margin-bottom: 0.25rem;
}

.chat-nachricht__text {
	white-space: pre-wrap;
	line-height: 1.5;
}

/* ------------------------------------------------------------------
   Barrierefreiheit -- nur für Bildschirmleseprogramme
   ------------------------------------------------------------------ */

.nur-bildschirmleser {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ------------------------------------------------------------------
   Navigations-Suche -- filtert die Menüpunkte live beim Tippen
   ------------------------------------------------------------------ */

.nav-suche {
	padding: 0.6rem 0.9rem;
	border-bottom: 1px solid var(--rahmen-hell);
}

.nav-suche input {
	width: 100%;
	padding: 0.5rem 0.7rem;
	border: 1px solid var(--rahmen-hell);
	border-radius: 4px;
	background: var(--flaeche);
	color: var(--text);
	font-size: 0.9rem;
}

.nav-suche input:focus {
	outline: 2px solid var(--akzent);
	outline-offset: 1px;
}

.nav-punkt--versteckt {
	display: none !important;
}

.nav-hinweis {
	display: inline-block;
	min-width: 1.3em;
	padding: 0.05em 0.4em;
	border-radius: 999px;
	background: var(--akzent);
	color: #1a1a1a;
	font-size: 0.75rem;
	font-weight: 700;
	text-align: center;
	line-height: 1.4;
}

/* ------------------------------------------------------------------
   Navigations-Umschalter -- klappt Menüleiste + Sitzungsinfo ein/aus
   ------------------------------------------------------------------ */

.nav-umschalter {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	min-height: var(--ziel);
	padding: 0 0.9rem;
	margin-left: auto;
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	background: var(--flaeche);
	color: var(--text-still);
	font-size: var(--stufe-4);
	cursor: pointer;
}

.nav-umschalter:hover {
	background: var(--flaeche-hoch);
	color: var(--text);
}

/* ------------------------------------------------------------------
   Willy -- schwebendes Chat-Widget
   ------------------------------------------------------------------ */

.willy {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 40;
}

.willy__knopf {
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	border: 1px solid var(--rahmen-hell);
	background: var(--akzent);
	color: var(--akzent-dunkel);
	font-size: 1.5rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
	cursor: pointer;
}

.willy__knopf:hover {
	filter: brightness(1.08);
}

.willy__fenster {
	position: absolute;
	right: 0;
	bottom: 4.25rem;
	display: flex;
	flex-direction: column;
	width: min(24rem, calc(100vw - 2.5rem));
	max-height: min(32rem, calc(100vh - 8rem));
	background: var(--flaeche-hoch);
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
	overflow: hidden;
}

/* Ohne diese Regel gewinnt die Klassenregel oben (display: flex)
   gegen das hidden-Attribut, das Fenster bliebe dauerhaft sichtbar,
   egal was der Öffnen/Schließen-Knopf im JavaScript setzt. */
.willy__fenster[hidden] {
	display: none;
}

.willy__kopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.6rem 0.9rem;
	border-bottom: 1px solid var(--rahmen);
	background: var(--flaeche);
}

.willy__kopf-knoepfe {
	display: flex;
	gap: 0.4rem;
}

.knopf--klein {
	min-height: 2rem;
	padding: 0 0.6rem;
	font-size: var(--stufe-5, 0.85rem);
}

.willy__verlauf {
	flex: 1;
	overflow-y: auto;
	padding: 0.9rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.willy__leer {
	color: var(--text-still);
	font-size: var(--stufe-4);
}

.willy__nachricht {
	max-width: 90%;
	padding: 0.55rem 0.75rem;
	border-radius: 0.5rem;
	border: 1px solid var(--rahmen);
	background: var(--flaeche);
	font-size: var(--stufe-4);
}

.willy__nachricht--user {
	align-self: flex-end;
	background: var(--akzent-dunkel);
	border-color: var(--rahmen-hell);
}

.willy__nachricht-rolle {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-still);
	margin-bottom: 0.2rem;
}

.willy__nachricht-text {
	white-space: pre-wrap;
	line-height: 1.45;
}

.willy__wartet {
	color: var(--text-still);
	font-size: var(--stufe-4);
	font-style: italic;
}

.willy__fehler {
	color: var(--fehler, #E5484D);
	font-size: var(--stufe-4);
}

.willy__formular {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem;
	border-top: 1px solid var(--rahmen);
	background: var(--flaeche);
}

.willy__formular textarea {
	flex: 1;
	resize: none;
	border-radius: var(--radius);
	border: 1px solid var(--rahmen);
	background: var(--flaeche-hoch);
	color: var(--text);
	padding: 0.5rem 0.65rem;
	font: inherit;
}

/* Auf schmalen Bildschirmen füllt das Fenster praktisch die ganze
   Breite, damit Willy auch mobil bedienbar bleibt. */
@media (max-width: 480px) {
	.willy {
		right: 0.75rem;
		bottom: 0.75rem;
	}
	.willy__fenster {
		width: calc(100vw - 1.5rem);
	}
}

/* --------------------------------------------------------------------------
   Feedback-Widget -- auf jeder internen Seite, links positioniert,
   damit es nicht mit Willy (rechts) kollidiert.
   -------------------------------------------------------------------------- */

.feedback-widget {
	position: fixed;
	left: 1.25rem;
	bottom: 1.25rem;
	z-index: 40;
}

.feedback-widget__knopf {
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	border: 1px solid var(--rahmen-hell);
	background: var(--flaeche-hoch);
	color: var(--text);
	font-size: 1.5rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
	cursor: pointer;
}

.feedback-widget__knopf:hover {
	filter: brightness(1.08);
}

.feedback-widget__fenster {
	position: absolute;
	left: 0;
	bottom: 4.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	width: min(22rem, calc(100vw - 2.5rem));
	background: var(--flaeche-hoch);
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
	padding: 0.9rem;
}

.feedback-widget__fenster[hidden] {
	display: none;
}

.feedback-widget__kopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.feedback-widget__fenster .feldgruppe {
	margin-bottom: 0;
}

.feedback-widget__fenster textarea {
	resize: vertical;
}

@media (max-width: 480px) {
	.feedback-widget {
		left: 0.75rem;
		bottom: 0.75rem;
	}
	.feedback-widget__fenster {
		width: calc(100vw - 1.5rem);
	}
}

/* --------------------------------------------------------------------------
   Booking-Board -- Kanban-Ansicht für die Booking-Pipeline
   -------------------------------------------------------------------------- */

.booking-board {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	padding-bottom: 1rem;
}

.booking-board__spalte {
	flex: 0 0 16rem;
	min-width: 16rem;
	background: var(--flaeche);
	border: 1px solid var(--rahmen-hell);
	border-radius: var(--radius);
	padding: 0.75rem;
}

.booking-board__spalte h3 {
	margin: 0 0 0.75rem;
	font-size: var(--stufe-3);
}

.booking-board__karten {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	min-height: 3rem;
}

.booking-karte {
	background: var(--flaeche-hoch);
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	padding: 0.6rem 0.75rem;
	cursor: grab;
	font-size: var(--stufe-klein);
}

.booking-karte strong {
	display: block;
	font-size: var(--stufe-4);
	margin-bottom: 0.2rem;
}

.booking-karte--wird-gezogen {
	opacity: 0.4;
}

.booking-karte .knopf--klein {
	margin-top: 0.4rem;
	font-size: var(--stufe-klein);
	padding: 0.2rem 0.5rem;
}

/* --------------------------------------------------------------------------
   36. Archiv-Dateien-Galerie
   -------------------------------------------------------------------------- */

.archiv-galerie {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}

.archiv-kachel {
	border: 1px solid var(--rahmen);
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--flaeche-hoch);
	display: flex;
	flex-direction: column;
}

.archiv-thumb {
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
	background: var(--flaeche);
	display: block;
}

.archiv-thumb--platzhalter {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: var(--stufe-2);
	color: var(--text-still);
	letter-spacing: 0.05em;
}

.archiv-kachel-info {
	padding: 0.6rem 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.archiv-kachel-name {
	font-size: var(--stufe-4);
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.archiv-kachel-links {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.3rem;
	font-size: var(--stufe-4);
}

