/* css/masken.css - Einheitlicher Aufbau von Eingabemasken (15.10.2026, Auftrag Roman "WaWi und ReWe: Listen und
   Eingabemasken sinnvoll aufbauen, gruppierte Felder uebersichtlich, keine uebergrossen Checkboxen/Radiobuttons").
   Vorbild: Dashboard-Einstellungen (dashboard/bearbeiten.php) - fachlich zusammengehoerige Felder in eigenen Karten
   (.tc-form-card + .tc-form-abschnitt-titel), auf breiten Bildschirmen in zwei Spalten, die Aktion in einer eigenen
   Leiste darunter. Global eingebunden (framework/js/head.php); greift nur bei Verwendung der Klassen.

   Aufbau:
     <div class="tc-maske">
       <div class="tc-maske-spalten">
         <div class="tc-maske-spalte">
           <section class="tc-form-card"><h2 class="tc-maske-titel">Allgemein</h2>
             <div class="tc-maske-raster">
               <div class="tc-maske-feld"><label for="x">Bezeichnung</label><input id="x" ...></div>
               <div class="tc-maske-feld tc-maske-feld--breit">...</div>
             </div>
           </section>
         </div>
         <div class="tc-maske-spalte">...</div>
       </div>
       <div class="tc-form-card tc-maske-aktionen"><button ...>Speichern</button></div>
     </div>
   Optionen (Radio) nebeneinander: .tc-form-radio-karte-zeile mit .tc-form-radio-karte (bestehender OTS-Baustein).
   Haken (Checkbox) normal gross neben der Beschriftung: <label class="tc-haken"><input type="checkbox"> Text</label>,
   mehrere untereinander in .tc-haken-liste. */

/* hidden-Attribut hat Vorrang vor den display-Regeln der Bausteine (Ein-/Ausblenden per JS) */
.tc-maske [hidden],
.tc-maske[hidden],
.tc-haken[hidden],
.tc-maske-feld[hidden],
[data-tc-zeigen-wenn][hidden],
.tc-auswahl-neu-dialog [hidden] {
	display: none !important;
}
.tc-maske {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-md, 16px);
	margin: 0 0 var(--spacing-md, 16px);
}
.tc-maske .tc-form-card {
	max-width: none;
	margin: 0;
}
.tc-maske-spalten {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-md, 16px);
	align-items: flex-start;
}
.tc-maske-spalte {
	flex: 1 1 400px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: var(--spacing-md, 16px);
}
/* einspaltige Maske mit begrenzter Breite (kurze Stammdaten-Formulare) */
.tc-maske--schmal {
	max-width: 980px;
}
.tc-maske-titel {
	/* 16.10.2026 "Mischung A+B": getoente Titelleiste mit 4px-Akzentbalken links (vorher duenne graue Linie) */
	margin: 0 0 14px;
	padding: 9px 14px 9px 16px;
	font-size: 1.0625rem;
	font-weight: 800;
	color: var(--color-text);
	background-color: var(--color-gruppe-titel-flaeche);
	box-shadow: inset 4px 0 0 var(--color-gruppe-akzent);
	border-radius: 6px;
}
.tc-maske-titel small {
	font-weight: 400;
	font-size: .82rem;
	color: var(--color-text-muted);
	margin-left: 6px;
}
.tc-maske-text {
	margin: 0 0 10px;
	font-size: .85rem;
	color: var(--color-text-muted);
}
.tc-maske-raster {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px 16px;
	align-items: start;
}
.tc-maske-raster + .tc-maske-raster,
.tc-maske-raster + .tc-haken-liste,
.tc-haken-liste + .tc-maske-raster {
	margin-top: 12px;
}
.tc-maske-feld,
.tc-maske-raster > .re-feld {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0; /* lange Auswahltexte duerfen das Raster nicht verbreitern */
}
.tc-maske-raster select {
	min-width: 0;
	max-width: 100%;
}
/* Filterzeile ueber Listen */
.tc-maske-filterzeile {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 20px;
}
.tc-maske-feld--breit {
	grid-column: 1 / -1;
}
.tc-maske-feld > label,
.tc-maske-feld > .tc-maske-label {
	font-size: .875rem;
	font-weight: 600;
	color: var(--color-text); /* 16.10.2026: volle Textfarbe statt grau (Erkennbarkeit) */
}
.tc-maske-feld input[type="text"],
.tc-maske-feld input[type="number"],
.tc-maske-feld input[type="date"],
.tc-maske-feld input[type="time"],
.tc-maske-feld input[type="email"],
.tc-maske-feld input[type="tel"],
.tc-maske-feld input[type="url"],
.tc-maske-feld input[type="search"],
.tc-maske-feld input[type="password"],
.tc-maske-feld select,
.tc-maske-feld textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.tc-maske-feld textarea {
	min-height: 70px;
}
.tc-maske-feld .tc-form-hinweis,
.tc-maske-hinweis {
	margin: 0;
	font-size: .8rem;
	color: var(--color-text-muted);
}
/* Feld + Einheit/Knopf in einer Zeile (z. B. "14 Tage", Zahl + "%") */
.tc-maske-inline {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.tc-maske-inline input[type="text"],
.tc-maske-inline input[type="number"] {
	width: auto;
	flex: 1 1 90px;
	min-width: 70px;
}

/* Checkbox in normaler Groesse links neben ihrer Beschriftung */
.tc-haken {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
	font-size: .9rem;
	font-weight: 400;
	color: var(--color-text);
	cursor: pointer;
	line-height: 1.35;
}
.tc-haken input[type="checkbox"],
.tc-haken input[type="radio"] {
	width: 20px; /* 16.10.2026: 20px statt 16px, Darstellung siehe Block "Erkennbarkeit" unten */
	height: 20px;
	min-height: 0;
	margin: 0;
	padding: 0;
	flex: 0 0 auto;
}
.tc-haken small {
	display: block;
	font-size: .8rem;
	color: var(--color-text-muted);
}
.tc-haken-liste {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.tc-haken-liste--zeile {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px 20px;
}

/* Optionen nebeneinander (Radio-Karten) in normaler Groesse - bestehender Baustein, hier nur Abstaende */
.tc-maske .tc-form-radio-karte-zeile .tc-form-radio-karte input {
	width: 20px;
	height: 20px;
}

/* Aktionsleiste unter der Maske */
.tc-maske-aktionen {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
}
.tc-maske-aktionen .tc-maske-hinweis {
	margin-left: 4px;
}

/* Abstaende, wenn Haken-Liste/Aktionsleiste innerhalb einer Karte nicht direkt auf ein Raster folgen */
.tc-form-card > .tc-haken-liste:not(:first-child),
.tc-form-card > .tc-maske-raster:not(:first-child):not(.tc-maske-titel + .tc-maske-raster) {
	margin-top: 12px;
}
.tc-form-card > .tc-maske-aktionen,
.tc-form-card form > .tc-maske-aktionen {
	margin-top: 16px;
}
/* Zwischenueberschrift innerhalb einer Gruppe */
.tc-maske-untertitel {
	margin: 16px 0 8px;
	font-size: .8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--color-text);
}
.tc-maske-untertitel:first-child {
	margin-top: 4px;
}
/* Spalte, in der Titel und Inhalt ohne Kartenabstand aufeinander folgen */
.tc-maske-spalte--dicht {
	gap: 0;
}
/* Aktionsleiste mit Trennlinie innerhalb einer Karte; gefaehrliche Aktion rechts abgesetzt */
.tc-maske-warnbereich {
	margin-top: 14px;
	padding: 10px 14px;
	border: 1px solid var(--color-warning, #b8860b);
	border-left-width: 5px;
	border-radius: 8px;
}
.tc-maske-spalte--eng {
	gap: 0;
}
.tc-maske-aktionen > .re-feld,
.tc-maske-aktionen > .tc-maske-feld {
	flex: 1 1 280px;
	max-width: 520px;
}
.tc-maske-aktionen--unten {
	align-items: flex-end;
}
.tc-maske-aktionen--getrennt,
.tc-maske-aktionen--trenn {
	border-top: 1px solid var(--color-border);
	padding-top: 12px;
	margin-top: 12px;
}
.tc-maske-aktionen .tc-maske-gefahr {
	margin-left: auto;
}
/* kurze Felder (Zahlen, Kuerzel, kurze Auswahl) nicht ueber die ganze Rasterbreite ziehen */
.tc-maske-feld--kurz input,
.tc-maske-feld--kurz select {
	max-width: 160px;
}

/* Listen: Spaltenkoepfe wie die Werte linksbuendig (Altlisten setzten th zentriert), Betraege rechts */
.tc-maske-liste th {
	text-align: left;
}
.tc-maske-liste .tc-betrag,
.tc-maske-liste th.tc-betrag,
.tc-maske-liste th.r,
.tc-maske-liste td.r {
	text-align: right;
	white-space: nowrap;
}
/* Mengen-/Hinzufuegen-Knoepfe neben Feldern deutlich als Knopf erkennbar (Roman: gut sichtbar) */
.tc-maske-inline .tc-admin-aktion-link--als-button {
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-small);
	padding: 6px 10px;
	min-height: 38px;
	box-sizing: border-box;
	background-color: var(--color-surface);
	color: var(--color-text);
}
.tc-maske-inline .tc-admin-aktion-link--als-button:hover {
	background-color: var(--color-info-subtle);
	color: var(--color-text);
}

@media (max-width: 767.98px) {
	.tc-maske-spalte {
		flex-basis: 100%;
	}
	.tc-maske-raster {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Erkennbarkeit (16.10.2026, Roman: "Mischung A+B" aus administration/system/kontrast_muster.php)
   Feldrahmen, Fokus, Fehler und gesperrte Felder stehen zentral in styles.css (--color-feld-*,
   Zustandsvariablen --tc-feld-*); hier die Bausteine der Masken: Haken/Optionen mit eigenem,
   kontrastreichem Kaestchen (20px, Rahmen >= 3:1, gefuellt wenn gewaehlt), "nur lesen" sichtbar
   abgesetzt, Listenkopf getoent.
   ========================================================================== */
.tc-haken input[type="checkbox"],
.tc-haken input[type="radio"],
.tc-form-radio-karte input[type="radio"],
.tc-form-radio-karte input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	min-height: 0;
	padding: 0;
	border: 2px solid var(--color-feld-rahmen);
	background-color: var(--color-surface);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 80%;
	cursor: pointer;
	flex: 0 0 auto;
	vertical-align: middle;
}
.tc-haken input[type="checkbox"],
.tc-form-radio-karte input[type="checkbox"] {
	border-radius: 4px;
}
.tc-haken input[type="radio"],
.tc-form-radio-karte input[type="radio"] {
	border-radius: 50%;
}
.tc-form-radio-karte input[type="radio"],
.tc-form-radio-karte input[type="checkbox"] {
	margin-top: 0;
}
.tc-form-radio-karte:not([hidden]) {
	align-items: center;
}
.tc-haken input[type="checkbox"]:hover,
.tc-haken input[type="radio"]:hover,
.tc-form-radio-karte input:hover {
	border-color: var(--color-feld-rahmen-hover);
	background-color: var(--color-surface);
}
.tc-haken input[type="checkbox"]:checked,
.tc-form-radio-karte input[type="checkbox"]:checked {
	border-color: var(--color-fokus-ring);
	background-color: var(--color-fokus-ring);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
:root[data-theme="dunkel"] .tc-haken input[type="checkbox"]:checked,
:root[data-theme="dunkel"] .tc-form-radio-karte input[type="checkbox"]:checked {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%2311151B' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.tc-haken input[type="radio"]:checked,
.tc-form-radio-karte input[type="radio"]:checked {
	border-color: var(--color-fokus-ring);
	background-color: var(--color-fokus-ring);
	box-shadow: inset 0 0 0 4px var(--color-surface);
}
.tc-haken input:focus-visible,
.tc-form-radio-karte input:focus-visible {
	outline: 3px solid var(--color-fokus-ring);
	outline-offset: 2px;
}
.tc-haken input:disabled,
.tc-form-radio-karte input:disabled {
	border-style: dashed;
	border-color: var(--color-feld-gesperrt-rahmen);
	background-color: var(--color-feld-gesperrt-flaeche);
	cursor: not-allowed;
}
.tc-haken input:disabled:checked,
.tc-form-radio-karte input:disabled:checked {
	border-style: solid;
	background-color: var(--color-feld-gesperrt-rahmen);
}

/* "nur lesen" in Masken: graue Flaeche mit Balken links, Text in voller Farbe */
.tc-maske-feld input[readonly],
.re-feld input[readonly] {
	--tc-feld-flaeche: var(--color-feld-gesperrt-flaeche);
	--tc-feld-rahmen: transparent;
	box-shadow: inset 4px 0 0 var(--color-feld-gesperrt-rahmen);
	background-color: var(--color-feld-gesperrt-flaeche);
	border-color: transparent;
}

/* Listen der Masken: getoenter Kopf mit kraeftiger Trennlinie (staerker als table.ticket-list-view th) */
table.tc-maske-liste > thead > tr > th {
	background-color: var(--color-gruppe-titel-flaeche);
	color: var(--color-text);
	font-weight: 700;
	border-bottom: 2px solid var(--color-feld-rahmen);
}

/* 20.10.2026 (OTS-0642): "Kondition auf passende Positionen übertragen" (js/tc-kondition-uebertragen.js) */
.tc-kond-uebertragen { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 0 6px; min-height: 30px; padding: 3px 9px; border: 1px solid var(--color-border-strong, #b9bcc2); border-radius: 6px; background-color: var(--color-surface, #fff); color: var(--color-primary, #2f4592); font-size: 13px; cursor: pointer; vertical-align: middle; }
.tc-kond-uebertragen:hover, .tc-kond-uebertragen:focus-visible { background-color: var(--color-fokus-flaeche, #eef3ff); color: var(--color-primary-dark, #22346e); border-color: var(--color-primary, #2f4592); }
.tc-kond-uebertragen:disabled { opacity: .45; cursor: not-allowed; }
.tc-kond-uebertragen .tc-icon { width: 14px; height: 14px; }
@media (max-width: 640px) { .tc-kond-uebertragen { min-height: 40px; margin-left: 0; } }

/* ==========================================================================
   Stammdaten-Layout und gemeinsame Maskenbausteine (23.10.2026, Auftrag Roman "Systemweite Optimierung der
   Administrations- und Stammdatenmasken", Referenz: Gerätetypen). PHP-Helfer: includes/tc_maske.php, Verhalten:
   js/tc-maske.js (global), Beispiele: dokumentation/oberflaeche/MASKEN_LEITFADEN.md, Abschnitt "Stammdaten-Layout".

   .tc-stamm                      Behaelter (Container-Abfrage: Spaltenaufteilung haengt an der Inhaltsbreite,
                                  nicht am Fenster - die Seitenleisten nehmen unterschiedlich viel Platz)
     .tc-stamm-raster             Raster: Kopf oben, links .tc-stamm-haupt, rechts .tc-stamm-info, unten Aktionsleiste
       form.tc-stamm-form         display: contents - Formular umschliesst Kopf/Haupt/Info/Aktionsleiste; eigene
                                  Formulare (z. B. Dokumente) stehen als weitere .tc-stamm-info daneben im Raster
       .tc-stamm-kopf             Pfad, Seitenbezeichnung, Objektname, Merkmale, Status, primaere Aktion
       .tc-stamm-haupt            Stammdaten und Funktionskonfiguration (Karten untereinander)
       .tc-stamm-info--oben/--mitte/--unten   Informationsspalte (Bild / Dokumente / Beschreibung + Notiz)
       .tc-aktionsleiste          fixiert am unteren Rand
   Einspaltig (Inhalt schmaler als 880 px): alle Karten werden zu einer Spalte und nach style="--tc-mobil:N"
   sortiert (bewusste Reihenfolge statt "linke Spalte, dann rechte Spalte").
   ========================================================================== */
.tc-stamm {
	container-type: inline-size;
	container-name: tc-stamm;
	margin: 0 0 var(--spacing-md, 16px);
}
.tc-stamm [hidden] {
	display: none !important;
}
.tc-stamm-form {
	display: contents;
}
.tc-stamm-raster {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-md, 16px);
}
.tc-stamm-raster > *,
.tc-stamm-form > * {
	order: var(--tc-mobil, 50);
	min-width: 0;
}
.tc-stamm-haupt,
.tc-stamm-info {
	display: contents; /* einspaltig: Karten direkt im Raster, damit --tc-mobil wirkt */
}
.tc-stamm-haupt > *,
.tc-stamm-info > * {
	order: var(--tc-mobil, 50);
	min-width: 0;
}
.tc-stamm .tc-form-card {
	max-width: none;
	margin: 0;
}
@container tc-stamm (min-width: 880px) {
	.tc-stamm-raster {
		display: grid;
		grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
		grid-template-rows: auto auto auto auto 1fr auto;
		grid-template-areas:
			"kopf kopf"
			"haupt oben"
			"haupt mitte"
			"haupt unten"
			"haupt rest"
			"leiste leiste";
		column-gap: 20px;
		row-gap: 0;
		align-items: start;
	}
	.tc-stamm-haupt,
	.tc-stamm-info {
		display: flex;
		flex-direction: column;
		gap: var(--spacing-md, 16px);
		margin-bottom: var(--spacing-md, 16px);
	}
	.tc-stamm-kopf { grid-area: kopf; margin-bottom: var(--spacing-md, 16px); }
	.tc-stamm-haupt { grid-area: haupt; }
	.tc-stamm-info--oben { grid-area: oben; }
	.tc-stamm-info--mitte { grid-area: mitte; }
	.tc-stamm-info--unten { grid-area: unten; }
	.tc-stamm-raster > .tc-aktionsleiste,
	.tc-stamm-form > .tc-aktionsleiste { grid-area: leiste; }
	/* leere Bereiche (z. B. Dokumente erst nach dem Anlegen) nehmen keinen Platz */
	.tc-stamm-info:empty { display: none; }
}

/* ---- Seitenkopf ---- */
.tc-stamm-kopf {
	padding: 12px 18px 14px;
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-medium, 8px);
	box-shadow: inset 0 3px 0 var(--color-gruppe-akzent);
}
.tc-stamm-pfad ol {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 0;
	margin: 0 0 6px;
	padding: 0;
	list-style: none;
	font-size: .85rem;
	color: var(--color-text-muted);
}
.tc-stamm-pfad li + li::before {
	content: "›";
	margin: 0 7px;
	color: var(--color-text-muted);
}
.tc-stamm-pfad a {
	color: var(--color-primary);
	text-decoration: none;
}
.tc-stamm-pfad a:hover,
.tc-stamm-pfad a:focus-visible {
	background-color: var(--color-fokus-flaeche);
	color: var(--color-text);
	text-decoration: underline;
}
.tc-stamm-pfad [aria-current="page"] {
	color: var(--color-text);
	font-weight: 600;
}
.tc-stamm-kopf-zeile {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 20px;
}
.tc-stamm-kopf-text {
	min-width: 0;
	flex: 1 1 320px;
}
.tc-stamm-seite {
	margin: 0;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--color-text-muted);
}
.tc-stamm-titel {
	margin: 0;
	font-size: 1.45rem;
	line-height: 1.25;
	font-weight: 800;
	color: var(--color-text);
	overflow-wrap: anywhere;
}
.tc-stamm-merkmale {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	margin: 8px 0 0;
}
.tc-stamm-merkmal,
.tc-stamm-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border: 1px solid var(--color-feld-rahmen);
	border-radius: 999px;
	font-size: .85rem;
	color: var(--color-text);
	background-color: var(--color-surface);
}
.tc-stamm-merkmal-name {
	color: var(--color-text-muted);
}
.tc-stamm-merkmal-wert {
	font-weight: 700;
}
.tc-stamm-status {
	font-weight: 700;
}
.tc-stamm-status::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: var(--color-text-muted);
}
.tc-stamm-status--an {
	border-color: var(--color-success);
	background-color: color-mix(in srgb, var(--color-success) 12%, var(--color-surface));
}
.tc-stamm-status--an::before {
	background-color: var(--color-success);
}
.tc-stamm-status--aus {
	background-color: var(--color-feld-gesperrt-flaeche);
}
.tc-stamm-kopf-aktionen {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.tc-stamm-kopf .tc-admin-meldung {
	margin: 12px 0 0;
}

/* ---- Bereichskarten ---- */
/* weniger prominente Karte (z. B. interne Notiz): kleiner Titel ohne Farbleiste, getoente Flaeche */
.tc-form-card.tc-bereich--leise {
	background-color: color-mix(in srgb, var(--color-background) 55%, var(--color-surface));
}
.tc-bereich--leise .tc-maske-titel {
	margin-bottom: 8px;
	padding: 0 0 6px;
	font-size: .95rem;
	background-color: transparent;
	box-shadow: none;
	border-bottom: 1px solid var(--color-border);
	border-radius: 0;
}
/* Titel/Beschriftung mit Info-Symbol daneben; der Kurztext klappt in voller Breite darunter auf */
.tc-maske-mit-hilfe {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 6px;
}
.tc-maske-titel.tc-maske-mit-hilfe > span:first-child {
	flex: 0 1 auto;
}
/* 29.10.2026: Klasse direkt am Feld (z. B. Standorte, Lieferanten) - Beschriftung + Info-Symbol in einer Zeile links,
   Eingabe/Fehlermeldung darunter in voller Breite (vorher: Spaltenrichtung + zentriert = Symbol unter der Beschriftung) */
.tc-maske-feld.tc-maske-mit-hilfe {
	flex-direction: row;
	justify-content: flex-start;
	align-content: flex-start;
	align-items: center;
	column-gap: 6px;
	row-gap: 4px;
}
.tc-maske-feld.tc-maske-mit-hilfe > :not(label):not(.tc-maske-label):not(.tc-kurzhilfe):not(.tc-kurzhilfe-text) {
	flex: 1 0 100%;
}
/* Symbol macht die Beschriftungszeile nicht hoeher - Eingabefelder bleiben mit Nachbarfeldern ohne Symbol auf einer Linie */
.tc-maske-feld.tc-maske-mit-hilfe > .tc-kurzhilfe,
.tc-maske-feld > .tc-maske-mit-hilfe > .tc-kurzhilfe {
	margin-top: -11px; /* 28px (Touch: 34px + Rand) Symbol auf Zeilenhoehe der Beschriftung (16px) - Klickflaeche bleibt */
	margin-bottom: -11px;
}
.tc-maske-feld > .tc-maske-mit-hilfe > label,
.tc-maske-feld > .tc-maske-mit-hilfe > .tc-maske-label {
	font-size: .875rem;
	font-weight: 600;
	color: var(--color-text);
}

/* ---- Feldbreiten und Feldzeilen ---- */
/* Breitenklasse am .tc-maske-feld begrenzt das Eingabeelement auf eine zum Inhalt passende Breite */
.tc-maske-feld--xs input, .tc-maske-feld--xs select { max-width: 7rem; }
.tc-maske-feld--s input, .tc-maske-feld--s select { max-width: 11rem; }
.tc-maske-feld--m input, .tc-maske-feld--m select { max-width: 20rem; }
.tc-maske-feld--l input, .tc-maske-feld--l select { max-width: 32rem; }
/* Feldzeile: Felder in natuerlicher Breite nebeneinander, Umbruch nur bei Platzmangel */
.tc-maske-zeile {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 12px 24px;
}
.tc-maske-zeile > .tc-maske-feld {
	flex: 1 1 14rem;
}
.tc-maske-zeile > .tc-maske-feld--xs,
.tc-maske-zeile > .tc-maske-feld--s {
	flex: 0 1 auto;
	min-width: 0;
}
.tc-maske-zeile > .tc-eingabegruppe {
	flex: 0 1 auto;
	min-width: 0;
}
.tc-maske-zeile > .tc-maske-feld--breit {
	flex-basis: 100%;
}
.tc-maske-zeile + .tc-maske-zeile,
.tc-maske-zeile + .tc-haken-liste,
.tc-maske-raster + .tc-maske-zeile,
.tc-maske-zeile + .tc-maske-raster,
.tc-maske-zeile + .tc-konfig,
.tc-haken-liste + .tc-konfig {
	margin-top: 14px;
}
/* Wert + Einheit (z. B. "1,850 kg") */
.tc-maske-einheit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--color-text);
}
.tc-maske-einheit > input {
	flex: 1 1 auto;
	min-width: 0;
}

/* ---- Eingabegruppe: zusammengehoerige Werte in einer Zeile (z. B. L × B × H) ---- */
fieldset.tc-eingabegruppe {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}
.tc-eingabegruppe > legend {
	float: left; /* Legende als normales Blockelement im Fluss - darf umbrechen (aufgeklappte Kurzhilfe) */
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0;
	margin: 0 0 4px;
	font-size: .875rem;
	font-weight: 600;
	color: var(--color-text);
}
.tc-eingabegruppe-zeile {
	clear: both;
	display: flex;
	align-items: flex-end;
	gap: 6px;
	flex-wrap: nowrap;
}
.tc-eingabegruppe-teil {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 0 1 5.5rem;
	min-width: 3.6rem;
}
.tc-eingabegruppe-teil > label {
	font-size: .8rem;
	font-weight: 600;
	color: var(--color-text);
}
.tc-eingabegruppe-teil > input {
	width: 100%;
	box-sizing: border-box;
	text-align: right;
}
.tc-eingabegruppe-trenner,
.tc-eingabegruppe-einheit {
	flex: 0 0 auto;
	padding-bottom: 9px;
	color: var(--color-text);
	font-weight: 600;
}
.tc-eingabegruppe > .tc-haken {
	margin-top: 8px;
}

/* ---- Auswahl mit "Neu anlegen …" ---- */
.tc-auswahl-neu-feld {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 8px;
	padding: 10px 12px;
	border-radius: 6px;
	background-color: var(--color-gruppe-titel-flaeche);
	box-shadow: inset 3px 0 0 var(--color-gruppe-akzent);
}
.tc-auswahl-neu-feld > label {
	font-size: .85rem;
	font-weight: 600;
	color: var(--color-text);
}
.tc-maske-knopf-leise {
	min-height: 36px;
	padding: 5px 12px;
	border: 1px solid var(--color-feld-rahmen);
	border-radius: var(--radius-small, 4px);
	background-color: var(--color-surface);
	color: var(--color-text);
	font: inherit;
	font-size: .875rem;
	cursor: pointer;
	white-space: nowrap;
}
.tc-maske-knopf-leise:hover,
.tc-maske-knopf-leise:focus-visible {
	background-color: var(--color-fokus-flaeche);
	color: var(--color-text);
	border-color: var(--color-fokus-ring);
}

/* ---- Kurzhilfe (Info-Symbol + aufklappbarer Kurztext, Anbindung an das Hilfesystem) ---- */
.tc-kurzhilfe {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 50%;
	background-color: transparent;
	color: var(--color-primary);
	cursor: pointer;
	flex: 0 0 auto;
	vertical-align: middle;
}
:root[data-theme="dunkel"] .tc-kurzhilfe { color: var(--color-fokus-ring); }
.tc-kurzhilfe svg { width: 18px; height: 18px; }
.tc-kurzhilfe:hover,
.tc-kurzhilfe[aria-expanded="true"] {
	background-color: var(--color-fokus-flaeche);
	color: var(--color-text);
	border-color: var(--color-fokus-ring);
}
.tc-kurzhilfe:focus-visible {
	outline: 3px solid var(--color-fokus-ring);
	outline-offset: 1px;
}
@media (pointer: coarse) {
	.tc-kurzhilfe { width: 34px; height: 34px; }
}
.tc-kurzhilfe-text {
	display: block;
	flex: 1 0 100%;
	contain: inline-size; /* Breite kommt vom Feld, nicht vom Text - das Feld waechst beim Aufklappen nicht */
	min-width: min(20rem, 78vw); /* in schmalen Feldern (z. B. Gewicht) nicht zu einer schmalen Spalte zusammenschrumpfen */
	margin: 4px 0 2px;
	padding: 8px 12px;
	border-radius: 6px;
	background-color: var(--color-info-subtle);
	box-shadow: inset 3px 0 0 var(--color-gruppe-akzent);
	font-size: .875rem;
	font-weight: 400;
	line-height: 1.45;
	color: var(--color-text);
	text-transform: none;
	letter-spacing: normal;
}
/* display:block oben wuerde [hidden] ueberschreiben - zugeklappte Kurzhilfe bleibt ueberall verborgen */
.tc-kurzhilfe-text[hidden] { display: none; }
/* 29.10.2026 (Roman): Kurztext schwebt als Hinweis am Info-Symbol (Mouse-over/Fokus/Antippen) statt fest in der Maske
   aufzuklappen - js/tc-maske.js setzt die Klasse und die Position (fixed, im sichtbaren Bereich gehalten). Hohe
   Spezifitaet, damit bereichsspezifische Regeln (Benutzer-, Koop-, ReWe-Masken) das Schweben nicht aufheben. */
.tc-kurzhilfe-text.tc-kurzhilfe-text--schwebend[id] {
	position: fixed;
	z-index: 10050;
	display: block;
	contain: none;
	box-sizing: border-box;
	width: max-content;
	min-width: 12rem;
	max-width: min(24rem, calc(100vw - 16px));
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--color-fokus-ring);
	border-radius: 8px;
	background-color: var(--color-surface);
	box-shadow: inset 3px 0 0 var(--color-gruppe-akzent), 0 6px 20px rgba(0, 0, 0, .22);
	color: var(--color-text);
	text-align: left;
	white-space: normal;
}
.tc-kurzhilfe-text.tc-kurzhilfe-text--schwebend[hidden] { display: none; }
.tc-kurzhilfe-mehr {
	display: inline;
	margin-left: 4px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--color-primary);
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}
:root[data-theme="dunkel"] .tc-kurzhilfe-mehr { color: var(--color-fokus-ring); }
.tc-kurzhilfe-mehr:hover,
.tc-kurzhilfe-mehr:focus-visible {
	background-color: var(--color-fokus-flaeche);
	color: var(--color-text);
}

/* ---- Konfigurationsgruppe (aufklappbar, Zustand im Kopf) ---- */
.tc-konfig-liste {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
details.tc-konfig {
	border: 1px solid var(--color-feld-rahmen);
	border-radius: var(--radius-medium, 8px);
	background-color: var(--color-surface);
}
details.tc-konfig > summary.tc-konfig-kopf {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	min-height: 48px;
	box-sizing: border-box;
	padding: 8px 14px;
	list-style: none;
	cursor: pointer;
	border-radius: var(--radius-medium, 8px);
	color: var(--color-text);
}
details.tc-konfig > summary.tc-konfig-kopf::-webkit-details-marker { display: none; }
details.tc-konfig > summary.tc-konfig-kopf:hover {
	background-color: var(--color-gruppe-titel-flaeche);
	color: var(--color-text);
}
details.tc-konfig > summary.tc-konfig-kopf:focus-visible {
	outline: 3px solid var(--color-fokus-ring);
	outline-offset: 2px;
}
details.tc-konfig[open] > summary.tc-konfig-kopf {
	border-bottom: 1px solid var(--color-border);
	border-radius: var(--radius-medium, 8px) var(--radius-medium, 8px) 0 0;
	background-color: var(--color-gruppe-titel-flaeche);
}
.tc-konfig-name {
	font-weight: 800;
	font-size: 1rem;
}
.tc-konfig-name small {
	font-weight: 400;
	font-size: .82rem;
	color: var(--color-text-muted);
	margin-left: 4px;
}
.tc-konfig-zustand {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 10px;
	border: 1px solid var(--color-feld-rahmen);
	border-radius: 999px;
	font-size: .82rem;
	font-weight: 700;
	color: var(--color-text);
	background-color: var(--color-feld-gesperrt-flaeche);
}
.tc-konfig-zustand::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background-color: var(--color-text-muted);
}
.tc-konfig-zustand--an {
	border-color: var(--color-success);
	background-color: color-mix(in srgb, var(--color-success) 12%, var(--color-surface));
}
.tc-konfig-zustand--an::before { background-color: var(--color-success); }
.tc-konfig-zf {
	flex: 1 1 160px;
	min-width: 0;
	font-size: .875rem;
	color: var(--color-text-muted);
	overflow-wrap: anywhere;
}
.tc-konfig-pfeil {
	margin-left: auto;
	width: 10px;
	height: 10px;
	border-right: 2px solid var(--color-text);
	border-bottom: 2px solid var(--color-text);
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform .15s;
	flex: 0 0 auto;
}
details.tc-konfig[open] > summary .tc-konfig-pfeil {
	transform: rotate(-135deg) translate(-2px, -2px);
}
@media (prefers-reduced-motion: reduce) {
	.tc-konfig-pfeil { transition: none; }
}
.tc-konfig-inhalt {
	padding: 12px 14px 14px;
}
.tc-konfig-inhalt > * + * {
	margin-top: 12px;
}
.tc-konfig-abhaengig {
	padding-top: 10px;
	border-top: 1px dashed var(--color-border-strong);
}

/* ---- Medienbereich Bild ---- */
.tc-medien {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 14px;
}
.tc-medien-vorschau {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 120px;
	height: 120px;
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-medium, 8px);
	background-color: var(--color-background);
	overflow: hidden;
}
.tc-medien-vorschau img,
.tc-medien-vorschau .tc-admin-vorschaubild {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	border-radius: 0;
}
.tc-medien-vorschau--leer {
	border-style: dashed;
	color: var(--color-text-muted);
	font-size: .85rem;
}
.tc-medien-steuerung {
	flex: 1 1 180px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.tc-medien-optionen {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.tc-medien-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 34px;
	box-sizing: border-box;
	padding: 4px 12px 4px 8px;
	border: 1px solid var(--color-feld-rahmen);
	border-radius: 999px;
	font-size: .875rem;
	color: var(--color-text);
	background-color: var(--color-surface);
	cursor: pointer;
}
.tc-medien-option input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--color-fokus-ring);
}
.tc-medien-option:hover {
	background-color: var(--color-fokus-flaeche);
	color: var(--color-text);
}
.tc-medien-option:has(input:checked) {
	border-color: var(--color-fokus-ring);
	background-color: var(--color-fokus-flaeche);
	font-weight: 700;
}
.tc-medien-option:has(input:focus-visible) {
	outline: 3px solid var(--color-fokus-ring);
	outline-offset: 2px;
}

/* ---- Dokumente kompakt (Informationsspalte) ---- */
.tc-pdok-verwaltung--kompakt .tc-pdok-neu {
	margin-top: 10px;
	padding-top: 0;
	border-top: 0;
}
details.tc-pdok-neu-auf {
	margin-top: 10px;
}
summary.tc-pdok-neu-knopf {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 38px;
	box-sizing: border-box;
	padding: 6px 14px;
	border: 1px solid var(--color-fokus-ring);
	border-radius: var(--radius-small, 4px);
	background-color: var(--color-surface);
	color: var(--color-text);
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}
summary.tc-pdok-neu-knopf::-webkit-details-marker { display: none; }
summary.tc-pdok-neu-knopf:hover,
summary.tc-pdok-neu-knopf:focus-visible {
	background-color: var(--color-fokus-flaeche);
	color: var(--color-text);
}
summary.tc-pdok-neu-knopf:focus-visible {
	outline: 3px solid var(--color-fokus-ring);
	outline-offset: 2px;
}
details.tc-pdok-neu-auf[open] > summary.tc-pdok-neu-knopf {
	background-color: var(--color-gruppe-titel-flaeche);
}
.tc-pdok-verwaltung--kompakt .tc-maske-feld > span {
	font-size: .875rem;
	font-weight: 600;
	color: var(--color-text);
}

/* ---- Validierung ---- */
.tc-feld-fehlertext {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 4px 0 0;
	font-size: .85rem;
	font-weight: 600;
	color: var(--color-feld-fehler);
}
.tc-feld-fehlertext::before {
	content: "!";
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background-color: var(--color-feld-fehler);
	color: var(--color-surface);
	font-size: .75rem;
	font-weight: 800;
}
/* Sammelhinweis oben nach einem Validierungsfehler (tc_maske_sammelhinweis_html): Meldung + "Eingaben erhalten" */
.tc-maske-sammelhinweis {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: .95rem;
}
.tc-maske-sammelhinweis > span {
	color: var(--color-text);
}
.tc-bereich-fehler {
	outline: 2px solid var(--color-feld-fehler);
	outline-offset: 2px;
}

/* ---- Aktionsleiste (fixiert am unteren Rand, Hinweis auf ungespeicherte Aenderungen) ---- */
.tc-aktionsleiste {
	position: sticky;
	bottom: 0;
	z-index: 6;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	padding: 10px 16px;
	background-color: var(--color-surface);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-medium, 8px);
	box-shadow: 0 -3px 10px rgba(0, 0, 0, .10);
}
.tc-aktionsleiste-haupt,
.tc-aktionsleiste-gefahr {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
}
/* 24.10.2026 (Q-4): Loeschen/Archivieren in der Aktionsleiste - rot, gut lesbar, Hover mit Hintergrund UND Schrift;
   gesperrte Aktion ohne Abdunkeln (Grund bleibt lesbar, Kontrast >= 4,5:1) */
.tc-aktionsleiste-gefahr .tc-maske-gefahr {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 10px;
	border-radius: var(--radius-small, 6px);
	color: var(--color-danger-dark); /* hell #8B1E22, dunkel #F4A3A6 - beide >= 4,5:1 */
	background-color: transparent;
	font-size: .9375rem;
	font-weight: 600;
	text-decoration: none;
}
.tc-aktionsleiste-gefahr .tc-maske-gefahr:hover,
.tc-aktionsleiste-gefahr .tc-maske-gefahr:focus-visible {
	color: var(--color-text);
	background-color: var(--color-danger-subtle);
	text-decoration: underline;
}
.tc-aktionsleiste-gefahr .tc-maske-gefahr:focus-visible {
	outline: 3px solid var(--color-fokus-ring, #2F4592);
	outline-offset: 2px;
}
.tc-aktionsleiste-gefahr .tc-maske-gefahr-gesperrt {
	opacity: 1;
	gap: 6px;
	color: var(--color-text-muted);
	font-size: .9375rem;
	white-space: normal;
}
.tc-maske-gefahr-grund {
	font-weight: 400;
}
/* Benutzer bearbeiten: Kontoaktionen in der Karte "Konto" (24.10.2026, Q-4) */
.tc-bv-konto-titel {
	margin: 14px 0 6px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-text);
}
.tc-bv-kontoaktionen .tc-admin-aktion-link {
	font-size: .9375rem;
	color: var(--color-text);
}
.tc-bv-kontoaktionen .tc-admin-aktion-link:hover,
.tc-bv-kontoaktionen .tc-admin-aktion-link:focus-visible {
	color: var(--color-primary);
	background-color: var(--color-fokus-flaeche, #EEF3FF);
}
.tc-aktionsleiste .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	box-sizing: border-box;
	text-decoration: none;
}
.tc-aktionsleiste-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .875rem;
	color: var(--color-text-muted);
}
.tc-aktionsleiste--geaendert .tc-aktionsleiste-status {
	padding: 4px 10px;
	border-radius: 999px;
	background-color: var(--color-warning-subtle);
	color: var(--color-warning-dark);
	font-weight: 700;
}
.tc-aktionsleiste--geaendert .tc-aktionsleiste-status::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background-color: var(--color-warning);
}
@media (max-width: 640px) {
	.tc-aktionsleiste {
		padding: 8px 10px;
		border-radius: var(--radius-medium, 8px) var(--radius-medium, 8px) 0 0;
	}
	.tc-aktionsleiste .button-primary {
		flex: 1 1 auto;
	}
	.tc-aktionsleiste-status {
		flex-basis: 100%;
		order: -1;
	}
}
@media print {
	.tc-aktionsleiste { position: static; box-shadow: none; }
}

/* ------------------------------------------------------------------ Token-Eingabe (24.10.2026, js/tc-token-eingabe.js)
   Mehrere Werte als Chips (z. B. IK). Rahmen wie ein Eingabefeld, Chips mit Kontrast >= 4,5:1 in hell und dunkel. */
.tc-token-feld {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 6px;
	min-height: 38px;
	padding: 4px 6px;
	border: 1px solid var(--color-feld-rahmen, var(--color-border-strong));
	border-radius: var(--radius-small, 4px);
	background-color: var(--color-surface);
	cursor: text;
}
.tc-token-feld:hover { border-color: var(--color-feld-rahmen-hover, var(--color-border-strong)); }
.tc-token-feld:focus-within {
	outline: 3px solid var(--color-fokus-ring);
	outline-offset: 1px;
}
.tc-token-liste {
	display: contents;
	list-style: none;
	margin: 0;
	padding: 0;
}
.tc-token {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 4px 2px 8px;
	border: 1px solid var(--color-border-strong);
	border-radius: 999px;
	background-color: var(--color-info-subtle, var(--color-background));
	color: var(--color-text);
	font-variant-numeric: tabular-nums;
	line-height: 1.4;
}
.tc-token--pruefen {
	background-color: var(--color-warning-subtle, var(--color-background));
	border-color: var(--color-warning-dark, var(--color-warning));
}
.tc-token-marke {
	font-size: 0.8em;
	font-weight: 600;
	color: var(--color-warning-dark, var(--color-text));
}
.tc-token-entfernen {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: transparent;
	color: var(--color-text);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}
.tc-token-entfernen:hover,
.tc-token-entfernen:focus-visible {
	background-color: var(--color-text);
	color: var(--color-surface);
}
.tc-token-entfernen:focus-visible {
	outline: 3px solid var(--color-fokus-ring);
	outline-offset: 1px;
}
.tc-token-eingabe {
	flex: 1 1 8em;
	min-width: 6em;
	border: 0;
	padding: 4px 2px;
	background: transparent;
	color: var(--color-text);
	font: inherit;
}
.tc-token-eingabe:focus { outline: none; }
.tc-token-meldung {
	display: block;
	margin-top: 4px;
	color: var(--color-danger-dark, var(--color-text));
	font-size: 0.9em;
}
:root[data-theme="dunkel"] .tc-token-marke,
:root[data-theme="dunkel"] .tc-token-meldung { color: var(--color-text); }

/* ------------------------------------------------------------------ Masken-Dialog (24.10.2026)
   Groesseres Formular als OTS-Dialog (z. B. Partnerportal › Benutzer): breit, fast volle Hoehe, nur der Inhalt scrollt,
   die Aktionsleiste bleibt unten sichtbar. */
dialog.tc-modal.tc-modal--maske {
	width: min(980px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
}
dialog.tc-modal.tc-modal--maske[open] {
	max-height: calc(100vh - 32px);
}
dialog.tc-modal--maske .tc-modal-body {
	overflow-y: auto;
	min-height: 0;
	flex: 1 1 auto;
	display: grid;
	gap: 12px;
	background-color: var(--color-background);
}
dialog.tc-modal--maske .tc-modal-body > .tc-form-card { margin: 0; }
dialog.tc-modal--maske .tc-aktionsleiste {
	position: static;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	border-top: 1px solid var(--color-border);
}
dialog.tc-modal--maske .tc-modal-schliessen {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}
@media (max-width: 640px) {
	dialog.tc-modal.tc-modal--maske { width: 100vw; max-width: 100vw; }
	dialog.tc-modal.tc-modal--maske[open] { max-height: 100vh; border-radius: 0; }
}

/* 09.11.2026 (Gesamtauftrag Punkt 9): gerade gespeicherter Eintrag nach dem Ruecksprung in die Liste (js/tc-maske.js,
   ?tc_markiert=<id>) - kurz hervorgehoben, nur Farb-Tokens (helles und dunkles Design). */
.tc-eintrag-gespeichert,
.tc-eintrag-gespeichert > td,
.tc-eintrag-gespeichert > th {
	background-color: var(--color-info-subtle) !important;
	color: var(--color-text);
	transition: background-color .8s ease;
}
.tc-eintrag-gespeichert { outline: 2px solid var(--color-success); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) {
	.tc-eintrag-gespeichert, .tc-eintrag-gespeichert > td, .tc-eintrag-gespeichert > th { transition: none; }
}

/* 26.11.2026: Kennzeichen-Spalte "Eigenschaften" in den Administrationslisten Geraetetypen/Materialien/Dienstleistungen
   (includes/tc_wwi_listen_kennzeichen.php). Kurztext statt reiner Farbe: lesbar auch ohne Farbunterscheidung. */
.tc-wwi-kz-liste { display: flex; flex-wrap: wrap; gap: 4px; }
.tc-wwi-kz { display: inline-block; padding: 1px 8px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.tc-wwi-kz--portal { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
.tc-wwi-kz--id { background: #ede9fe; color: #4c1d95; border-color: #c4b5fd; }
.tc-wwi-kz--bundle { background: #fef3c7; color: #78350f; border-color: #fcd34d; }
.tc-wwi-kz--proalert { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; }
.tc-wwi-kz--dmp { background: #dcfce7; color: #14532d; border-color: #86efac; }
.tc-wwi-kz-leer { color: var(--color-text-muted, #6b7280); }
.tc-wwi-kz-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 10px; font-size: 13px; color: var(--color-text-muted, #4b5563); }
.tc-wwi-kz-legende-titel { font-weight: 700; margin-right: 4px; }
/* 26.11.2026: Legende als Filterknoepfe (aria-pressed). Eigene Knoepfe setzen bei :hover immer Hintergrund UND Schrift. */
.tc-wwi-kz-filter, .tc-wwi-kz-filter-zurueck { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 3px 10px 3px 6px; border: 1px solid var(--color-border, #cbd5e1);
	border-radius: 999px; background-color: var(--color-surface, #ffffff); color: var(--color-text, #1f2937); font: inherit; font-size: 13px; cursor: pointer; }
.tc-wwi-kz-filter:hover, .tc-wwi-kz-filter:focus-visible, .tc-wwi-kz-filter-zurueck:hover, .tc-wwi-kz-filter-zurueck:focus-visible {
	background-color: var(--color-fokus-flaeche, #eef3ff); color: var(--color-text, #1f2937); border-color: var(--color-fokus-ring, #2f4592); }
.tc-wwi-kz-filter:focus-visible, .tc-wwi-kz-filter-zurueck:focus-visible { outline: 3px solid var(--color-fokus-ring, #2f4592); outline-offset: 2px; }
.tc-wwi-kz-filter-haken { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border: 2px solid var(--color-border, #94a3b8); border-radius: 4px; font-size: 13px; font-weight: 700; line-height: 1; }
.tc-wwi-kz-filter--an, .tc-wwi-kz-filter--an:hover, .tc-wwi-kz-filter--an:focus-visible { background-color: var(--color-fokus-flaeche, #eef3ff); color: var(--color-text, #1f2937); border: 2px solid var(--color-fokus-ring, #2f4592); font-weight: 700; }
.tc-wwi-kz-filter--an .tc-wwi-kz-filter-haken { background-color: var(--color-fokus-ring, #2f4592); border-color: var(--color-fokus-ring, #2f4592); color: #ffffff; }
.tc-wwi-kz-filter-zurueck { padding-left: 10px; font-weight: 700; }
.tc-wwi-kz-filter-zurueck svg { width: 14px; height: 14px; }
.tc-wwi-kz-filter-stand { font-weight: 700; color: var(--color-text, #1f2937); }
.tc-wwi-kz-filter-leer td { padding: 14px 10px; font-weight: 600; }
:root[data-theme="dunkel"] .tc-wwi-kz-filter--an .tc-wwi-kz-filter-haken { color: #0f172a; }
:root[data-theme="dunkel"] .tc-wwi-kz--portal { background: #1e3a8a; color: #dbeafe; border-color: #3b82f6; }
:root[data-theme="dunkel"] .tc-wwi-kz--id { background: #4c1d95; color: #ede9fe; border-color: #8b5cf6; }
:root[data-theme="dunkel"] .tc-wwi-kz--bundle { background: #78350f; color: #fef3c7; border-color: #d97706; }
:root[data-theme="dunkel"] .tc-wwi-kz--proalert { background: #7f1d1d; color: #fee2e2; border-color: #ef4444; }
:root[data-theme="dunkel"] .tc-wwi-kz--dmp { background: #14532d; color: #dcfce7; border-color: #22c55e; }
