/* ============================================
   EXIMO NEXUS - ZENTRALE CSS-DATEI
   ============================================
   Version: 1.2
   Datum: 2025-01-XX

   ============================================ */

/* ============================================
   TEIL 1: CSS-VARIABLEN (ROOT & DARK THEME)
   ============================================ */

/* Light Theme (Base) */
:root {
	--bs-body-bg: #f8f9fa;
	--bs-body-color: #212529;
	--bs-primary: #343a40;
	--bs-secondary: #6c757d;
	--bs-light: #ffffff;
	--bs-border-color: #dee2e6;
	--z-index-sticky: 1020;
	--z-index-fixed: 1030;
	--z-index-modal: 1055;
	--z-index-toast: 1090;
	
	/* CI-Farben (Blau-Töne) */
	--bs-ci-blue: #2a7fe1;
	--bs-ci-blue-light: #4facfe;
	--bs-ci-blue-cyan: #00c6ff;
	--bs-ci-blue-dark: #0072ff;
	
	/* Spacing & Border Radius (häufig verwendete Werte) */
	--bs-radius-sm: 0.5rem;
	--bs-radius-md: 0.75rem;
	--bs-radius-lg: 1rem;
	--bs-spacing-xs: 0.125rem;
	--bs-spacing-sm: 0.5rem;
	--bs-spacing-md: 1rem;
	--bs-spacing-lg: 1.5rem;
	--bs-spacing-xl: 2rem;
	
	/* Transitions (häufig verwendete Werte) */
	--bs-transition-fast: 0.15s ease;
	--bs-transition-base: 0.2s ease;
	--bs-transition-slow: 0.3s ease;
	
	/* Typografie-Systematik (Schriftgrößen) */
	--font-size-base: 1rem;           /* 16px - Body, Standard-Text */
	--font-size-sm: 0.875rem;         /* 14px - Kleine Texte, Captions */
	--font-size-xs: 0.75rem;          /* 12px - Sehr kleine Texte, Labels */
	--font-size-lg: 1.125rem;         /* 18px - Hervorgehobener Text */
	--font-size-xl: 1.25rem;          /* 20px - Große Texte */
	
	/* Überschriften */
	--font-size-h1: 2rem;             /* 32px - Hauptüberschrift */
	--font-size-h2: 1.75rem;          /* 28px - Sektions-Überschrift */
	--font-size-h3: 1.5rem;           /* 24px - Unter-Sektion */
	--font-size-h4: 1.25rem;          /* 20px - Kleinere Überschrift */
	--font-size-h5: 1.125rem;         /* 18px - Sehr kleine Überschrift */
	--font-size-h6: 1rem;             /* 16px - Minimale Überschrift */
	
	/* Komponenten-spezifisch */
	--font-size-button: 0.9375rem;    /* 15px - Buttons (Sweet Spot für Dashboards) */
	--font-size-button-sm: 0.875rem;  /* 14px - Kleine Buttons */
	--font-size-nav: 0.9375rem;        /* 15px - Navigation */
	--font-size-table: 0.9375rem;      /* 15px - Tabellen (Sweet Spot für Daten) */
	--font-size-table-sm: 0.875rem;    /* 14px - Kompakte Tabellen */
	--font-size-form: 1rem;           /* 16px - Form Controls */
	--font-size-form-label: 0.875rem; /* 14px - Form Labels */
	--font-size-card-title: 1.125rem;  /* 18px - Card-Titel */
	--font-size-badge: 0.75rem;       /* 12px - Badges */
	--font-size-sidebar: 0.9375rem;   /* 15px - Sidebar Navigation */
	--font-size-sidebar-section: 0.75rem; /* 12px - Sidebar Sektionen (bessere Lesbarkeit) */
	
	/* Font Weights (Hierarchie durch Dicke, nicht nur Größe) */
	--font-weight-regular: 400;        /* Standard-Text, Body */
	--font-weight-medium: 500;        /* Tabellen-Header, Buttons */
	--font-weight-semibold: 600;       /* H3, H4, wichtige Zahlen, Sidebar-Sektionen */
	--font-weight-bold: 700;           /* Sparsam nutzen! Nur für H1 oder Alerts */
	
	/* Line Heights (Der Schlüssel zu "Clean Design") */
	--line-height-tight: 1.2;         /* Für Überschriften */
	--line-height-base: 1.5;          /* Für Fließtext / Body */
	--line-height-relaxed: 1.75;     /* Für lange Hilfetexte */
	
	/* Navigation & Sidebar  */
	--sidebar-width: 260px; /* von 280px auf 260px (7% kleiner) */
	--sidebar-width-collapsed: 88px;
	--header-height: 70px;
	--sidebar-bg: var(--bs-body-bg);
	--transition-speed: 0.3s;
	--transition-props: width var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

/* Dark Theme Overrides */
[data-bs-theme="dark"] {
	--bs-body-bg: #1a1a1a;
	--bs-body-color: #e0e0e0;
	--bs-primary: #89939e;
	--bs-secondary: #6c757d;
	--bs-light: #212529;
	--bs-border-color: #495057;
	
	/* Zusätzliche Dark Theme Variablen für häufig verwendete Werte */
	--bs-dark-bg: #212529;
	--bs-dark-border: #343a40;
	--bs-dark-striped: #2c3034;
	--bs-dark-hover: #32383e;
	--bs-dark-text: #e0e0e0;
	--bs-dark-secondary-text: #adb5bd;
	--bs-dark-overlay: rgba(0, 0, 0, 0.55);
	--bs-dark-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.55);
	--bs-dark-shadow-strong: 0 1rem 2rem rgba(0, 0, 0, 0.65);
	--bs-dark-border-weak: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .navbar,
[data-bs-theme="dark"] .accordion-item { 
	background-color: var(--bs-dark-bg, #212529); 
}

[data-bs-theme="dark"] .table {
	--bs-table-bg: var(--bs-dark-bg, #212529);
	--bs-table-color: var(--bs-dark-text, #e0e0e0);
	--bs-table-border-color: var(--bs-dark-border, #343a40);
	--bs-table-striped-bg: var(--bs-dark-striped, #2c3034);
	--bs-table-hover-bg: var(--bs-dark-hover, #32383e);
}

/* ============================================
   TEIL 1B: FONTS (LOKAL)
   ============================================ */
@font-face {
	font-family: 'Avalon';
	src: url('/fonts/avalonn.ttf') format('truetype');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Avalon';
	src: url('/fonts/avalonb.ttf') format('truetype');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ============================================
   TEIL 2: BASIS-STYLES (BODY, TYPOGRAPHY)
   ============================================ */

/* Konsistentes Box-Sizing für alle Elemente */
:root,
*, *::before, *::after {
	box-sizing: border-box;
}

/* Globale Schrift */
body {
	font-family: 'Avalon', 'Inter', sans-serif;
	font-weight: var(--font-weight-regular); /* 400 */
	font-style: normal;
	font-size: var(--font-size-base); /* 1rem = 16px - Bessere Lesbarkeit */
	line-height: var(--line-height-base); /* 1.5 - Clean Design */
}

.btn, .form-control, .input-group-text, .nav-link {
	font-family: 'Avalon', 'Inter', sans-serif;
	font-weight: 400;
	font-style: normal;
}

/* Form Controls - Bessere Lesbarkeit */
.form-control,
.form-select {
	font-size: var(--font-size-form); /* 1rem = 16px */
}

.form-label,
.form-floating > label {
	font-size: var(--font-size-form-label); /* 0.875rem = 14px */
}

h1, h2, h3, h4, h5, h6 { 
	font-family: 'Avalon', 'Inter', sans-serif;
	font-weight: var(--font-weight-bold); /* 700 - nutzt avalonb.ttf */
	font-style: normal;
	line-height: var(--line-height-tight); /* 1.2 - Für Überschriften */
}

h1 { 
	font-size: var(--font-size-h1); /* 2rem = 32px */
	font-weight: var(--font-weight-semibold); /* 600 - Leichter, nicht zu wuchtig */
	letter-spacing: -0.02em; /* Große Schrift etwas enger -> wirkt moderner */
}

h2 { 
	font-size: var(--font-size-h2); /* 1.75rem = 28px */
	font-weight: var(--font-weight-semibold); /* 600 */
}

h3 { 
	font-size: var(--font-size-h3); /* 1.5rem = 24px */
	font-weight: var(--font-weight-semibold); /* 600 */
}

h4 { 
	font-size: var(--font-size-h4); /* 1.25rem = 20px */
	font-weight: var(--font-weight-semibold); /* 600 */
}

h5 { 
	font-size: var(--font-size-h5); /* 1.125rem = 18px */
	font-weight: var(--font-weight-medium); /* 500 */
}

h6 { 
	font-size: var(--font-size-h6); /* 1rem = 16px */
	font-weight: var(--font-weight-medium); /* 500 */
}

/* Fokus klar sichtbar (A11y) */
:focus-visible {
	outline: 2px solid var(--bs-primary);
	outline-offset: 2px;
	box-shadow: none;
}

.navbar { 
	border-bottom: 1px solid var(--bs-border-color); 
	box-shadow: 0 2px 4px rgba(0,0,0,.04); 
}

.navbar-brand { 
	font-weight: 700; 
	font-size: var(--font-size-h3); /* 1.5rem = 24px */
}

/* Standard Card: Alle Cards haben einheitlich große abgerundete Ecken (1rem) */
.card { 
	border: 1px solid var(--bs-border-color); 
	box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.07); 
	border-radius: var(--bs-radius-lg); 
	background-color: #fff;
	overflow: hidden;
}

.card .card-body {
	border-radius: inherit;
	background-color: #fff;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card .card-body {
	background-color: var(--bs-dark-bg, #212529);
}

.btn-primary { 
	background-color: var(--bs-primary); 
	border-color: var(--bs-primary); 
	font-weight: 400; /* Schlanke Schrift (avalonn.ttf) */
}

[data-bs-theme="dark"] .btn-light {
	background-color: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.2);
	color: #fff;
}

[data-bs-theme="dark"] .btn-light:hover,
[data-bs-theme="dark"] .btn-light:focus {
	background-color: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
}

.btn-primary:hover { 
	opacity: 0.85; 
}

/* ✅ Inaktive Buttons mit Lock-Icon (für Tabellen mit Feldern/ASO) */
.btn-disabled-locked {
	cursor: not-allowed;
	opacity: 0.6;
	pointer-events: none;
	user-select: none;
	background-color: #6c757d;
	border-color: #6c757d;
}

.btn-disabled-locked:hover,
.btn-disabled-locked:focus,
.btn-disabled-locked:active {
	cursor: not-allowed;
	opacity: 0.6;
	background-color: #6c757d;
	border-color: #6c757d;
	box-shadow: none;
}

/* ✅ Tabellen-Kachel: Nicht entfernbar (wenn Felder/ASO vorhanden) */
.tabelle-kachel-locked {
	cursor: not-allowed;
	opacity: 0.85;
	border-color: #dc3545;
	border-width: 2px;
	position: relative;
	pointer-events: none;
}

.tabelle-kachel-locked::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 10px,
		rgba(220, 53, 69, 0.1) 10px,
		rgba(220, 53, 69, 0.1) 20px
	);
	pointer-events: none;
	border-radius: inherit;
	z-index: 1;
}

.tabelle-kachel-locked::after {
	content: '🔒';
	position: absolute;
	top: 8px;
	right: 8px;
	font-size: var(--font-size-lg); /* 1.125rem = 18px - Icon-Größe */
	opacity: 0.7;
	pointer-events: none;
	z-index: 2;
}

/* Dark Theme Support für gesperrte Kacheln */
[data-bs-theme="dark"] .tabelle-kachel-locked {
	border-color: #dc3545;
	background-color: rgba(220, 53, 69, 0.1);
}

[data-bs-theme="dark"] .tabelle-kachel-locked::before {
	background: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 10px,
		rgba(220, 53, 69, 0.2) 10px,
		rgba(220, 53, 69, 0.2) 20px
	);
}

/* ✅ Erfasste Elemente: Visuelle Kennzeichnung (Tabellen, Felder, ASO) */
/* Tabellen-Kachel: Erfasst */
.tabelle-kachel.border-success,
.tabelle-kachel.erfasst {
	--erfasst-border-color: #198754;
	--erfasst-shadow-color: color-mix(in srgb, var(--erfasst-border-color), transparent 80%);
	--erfasst-bg: linear-gradient(135deg, 
		color-mix(in srgb, var(--erfasst-border-color), transparent 85%) 0%, 
		color-mix(in srgb, var(--erfasst-border-color), transparent 92%) 100%);
	border-color: var(--erfasst-border-color);
	border-width: 2px;
	background: var(--erfasst-bg);
	box-shadow: 0 0 0 2px var(--erfasst-shadow-color);
	position: relative;
}

.tabelle-kachel.erfasst::after {
	content: '✓';
	position: absolute;
	top: 8px;
	right: 8px;
	width: 24px;
	height: 24px;
	background-color: var(--erfasst-border-color, #198754);
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--font-size-sm); /* 0.875rem = 14px */
	font-weight: var(--font-weight-bold); /* 700 */
	box-shadow: 0 2px 4px var(--erfasst-shadow-color, rgba(25, 135, 84, 0.3));
	z-index: 2;
}

/* Feld-Item: Erfasst */
.feld-item.erfasst,
.feld-item.border-primary {
	--erfasst-border-color: #0d6efd;
	--erfasst-shadow-color: color-mix(in srgb, var(--erfasst-border-color), transparent 80%);
	--erfasst-bg: linear-gradient(135deg, 
		color-mix(in srgb, var(--erfasst-border-color), transparent 85%) 0%, 
		color-mix(in srgb, var(--erfasst-border-color), transparent 92%) 100%);
	border-color: var(--erfasst-border-color);
	border-width: 2px;
	background: var(--erfasst-bg);
	box-shadow: 0 0 0 1px var(--erfasst-shadow-color);
	position: relative;
}

.feld-item.erfasst::before {
	content: '✓';
	position: absolute;
	top: 4px;
	right: 4px;
	width: 20px;
	height: 20px;
	background-color: var(--erfasst-border-color, #0d6efd);
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--font-size-xs); /* 0.75rem = 12px - Badge-Größe */
	font-weight: var(--font-weight-bold); /* 700 */
	box-shadow: 0 1px 3px var(--erfasst-shadow-color, rgba(13, 110, 253, 0.3));
	z-index: 2;
}

/* Assoziation-Item: Erfasst */
.assoziation-item.erfasst,
.assoziation-item.border-primary {
	--erfasst-border-color: #0d6efd;
	--erfasst-shadow-color: rgba(13, 110, 253, 0.2);
	--erfasst-bg: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
	border-color: var(--erfasst-border-color);
	border-width: 2px;
	background: var(--erfasst-bg);
	box-shadow: 0 0 0 1px var(--erfasst-shadow-color);
	position: relative;
}

.assoziation-item.erfasst::before {
	content: '✓';
	position: absolute;
	top: 4px;
	right: 4px;
	width: 20px;
	height: 20px;
	background-color: var(--erfasst-border-color, #0d6efd);
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--font-size-xs); /* 0.75rem = 12px - Badge-Größe */
	font-weight: var(--font-weight-bold); /* 700 */
	box-shadow: 0 1px 3px var(--erfasst-shadow-color, rgba(13, 110, 253, 0.3));
	z-index: 2;
}

/* Dark Theme Support für erfasste Elemente */
[data-bs-theme="dark"] .tabelle-kachel.erfasst,
[data-bs-theme="dark"] .tabelle-kachel.border-success {
	--erfasst-border-color: #20c997;
	--erfasst-shadow-color: rgba(32, 201, 151, 0.3);
	--erfasst-bg: linear-gradient(135deg, rgba(32, 201, 151, 0.15) 0%, rgba(32, 201, 151, 0.08) 100%);
	border-color: var(--erfasst-border-color);
	background: var(--erfasst-bg);
	box-shadow: 0 0 0 2px var(--erfasst-shadow-color);
}

[data-bs-theme="dark"] .feld-item.erfasst,
[data-bs-theme="dark"] .feld-item.border-primary {
	--erfasst-border-color: #4facfe;
	--erfasst-shadow-color: rgba(79, 172, 254, 0.3);
	--erfasst-bg: linear-gradient(135deg, rgba(79, 172, 254, 0.15) 0%, rgba(79, 172, 254, 0.08) 100%);
	border-color: var(--erfasst-border-color);
	background: var(--erfasst-bg);
	box-shadow: 0 0 0 1px var(--erfasst-shadow-color);
}

[data-bs-theme="dark"] .assoziation-item.erfasst,
[data-bs-theme="dark"] .assoziation-item.border-primary {
	--erfasst-border-color: #4facfe;
	--erfasst-shadow-color: rgba(79, 172, 254, 0.3);
	--erfasst-bg: linear-gradient(135deg, rgba(79, 172, 254, 0.15) 0%, rgba(79, 172, 254, 0.08) 100%);
	border-color: var(--erfasst-border-color);
	background: var(--erfasst-bg);
	box-shadow: 0 0 0 1px var(--erfasst-shadow-color);
}

/* ============================================
   TEIL 3: LOADING STATES
   ============================================ */

.spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid var(--bs-border-color, #dee2e6);
	border-top-color: var(--bs-primary, #343a40);
	border-radius: 50%;
	animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
	to {
		transform: rotate(360deg);
	}
}

.spinner-sm {
	width: 16px;
	height: 16px;
	border-width: 2px;
}

/* Loading States - Zusammenfassung identischer Regeln */
.btn.loading,
.form-loading {
	position: relative;
	pointer-events: none;
	opacity: 0.7;
}

.form-loading::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.5);
	z-index: 10;
}

[data-bs-theme="dark"] .form-loading::after {
	background: rgba(0, 0, 0, 0.5);
}

/* ============================================
   TEIL 4: NAVIGATION & SIDEBAR (POC Production-ready)
   ============================================ */

/* ============================================
   BASIS: NAVIGATION LINKS
   ============================================ */

.nav-link {
	color: var(--bs-body-color);
	position: relative;
	border-radius: 0.5rem;
	transition: var(--transition-props);
	display: flex;
	align-items: center;
	text-decoration: none;
}

.nav-link i {
	font-size: 1.1em;
	width: 20px;
	text-align: center;
	margin-right: 10px;
	flex-shrink: 0;
	transition: color var(--transition-speed) ease;
}

.nav-link:hover {
	background-color: rgba(59, 130, 246, 0.08);
	color: #3b82f6;
}

[data-bs-theme="dark"] .nav-link:hover {
	background-color: rgba(59, 130, 246, 0.08);
	color: #93c5fd;
}

/* ============================================
   ACCESSIBILITY: FOKUS-STYLES
   ============================================ */

.nav-link:focus-visible {
	outline: 2px solid var(--bs-primary);
	outline-offset: 2px;
	border-radius: 0.5rem;
}

[data-bs-theme="dark"] .nav-link:focus-visible {
	outline-color: #60a5fa;
}

/* ============================================
   SIDEBAR: NAVIGATION (Spezifisch)
   ============================================ */

.sidebar-nav {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sidebar-nav .nav-link {
	display: flex;
	align-items: center;
	gap: 0.5rem; /* von 0.625rem auf 0.5rem */
	font-size: var(--font-size-sidebar); /* 0.9375rem = 15px - Sweet Spot für Dashboards */
	font-weight: var(--font-weight-regular); /* 400 */
	font-style: normal;
	padding: 0.3125rem 0.75rem; /* von 0.375rem 0.875rem auf 0.3125rem 0.75rem */
	margin: 0.03125rem 0; /* von 0.0625rem auf 0.03125rem */
	border-radius: 0.5rem;
	transition: var(--transition-props);
	color: var(--bs-body-color);
	white-space: nowrap;
}

.sidebar-nav .nav-link.active {
	background-color: var(--bs-primary);
	color: white;
	font-weight: 600;
}

.sidebar-nav .nav-link:not(.active):hover {
	background-color: var(--bs-secondary-bg);
}

.sidebar-nav .nav-link .sidebar-icon {
	font-size: var(--font-size-base); /* 1rem = 16px - Konsistent mit Basis-Schriftgröße */
	min-width: 1.25rem; /* von 1.375rem auf 1.25rem */
	width: 1.25rem;
	height: 1.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	flex-shrink: 0;
	transition: none;
	line-height: 1;
	vertical-align: middle;
}

/* ============================================
   SIDEBAR: ACCORDION TOGGLE
   ============================================ */

/* Sektionen-Titel als nicht-klickbare Überschriften */
.sidebar-section-title {
	font-size: var(--font-size-sidebar-section); /* 0.75rem = 12px - Bessere Lesbarkeit */
	font-weight: var(--font-weight-semibold); /* 600 - Macht es edler, nicht zu wuchtig */
	font-style: normal;
	text-transform: uppercase; /* Macht kleine Schrift edler */
	letter-spacing: 0.05em; /* Mehr Luft zwischen Buchstaben */
	padding: 0.4375rem 0.75rem 0.3125rem; /* von 0.5rem 0.875rem 0.375rem auf 0.4375rem 0.75rem 0.3125rem */
	margin: 0.25rem 0 0.0625rem; /* von 0.375rem 0 0.125rem auf 0.25rem 0 0.0625rem */
	color: var(--bs-secondary);
	user-select: none;
	pointer-events: none;
}

/* ============================================
   SIDEBAR: CONTAINER & LAYOUT
   ============================================ */

.app-container-main {
	display: flex;
	height: 100vh;
	overflow: hidden;
}

.sidebar-container {
	width: var(--sidebar-width);
	flex-shrink: 0;
	background-color: var(--sidebar-bg);
	border-inline-end: 1px solid var(--bs-border-color);
	display: flex;
	flex-direction: column;
	transition: width var(--transition-speed) ease;
}

/* Sidebar Header - Kompakt & Minimalistisch */
.sidebar-header {
	padding: 0.625rem 0.875rem; /* Noch kompakter */
	border-bottom: 1px solid var(--bs-border-color);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(to bottom, 
		rgba(var(--bs-primary-rgb, 52, 58, 64), 0.02), 
		transparent
	);
	position: relative;
}

.sidebar-header::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 30%;
	height: 1.5px;
	background: linear-gradient(to right, 
		transparent, 
		var(--bs-primary), 
		transparent
	);
	opacity: 0.5;
}

.sidebar-header__link {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	color: var(--bs-body-color);
	flex: 1;
	transition: transform 0.2s ease, opacity 0.2s ease;
	position: relative;
	z-index: 1;
}

.sidebar-header__link:hover {
	transform: translateY(-1px);
	opacity: 0.9;
}

.sidebar-header__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	text-align: center;
}

.sidebar-header__title {
	font-size: var(--font-size-lg); /* 1.125rem = 18px - Bessere Lesbarkeit */
	font-weight: var(--font-weight-semibold); /* 600 - Leichter, nicht zu wuchtig */
	color: var(--bs-body-color);
	line-height: var(--line-height-tight); /* 1.2 */
	letter-spacing: 0.08em; /* Mehr Letter Spacing für modernen Look */
	text-transform: uppercase;
	opacity: 0.95;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.sidebar-header__link:hover .sidebar-header__title {
	color: var(--bs-primary);
	opacity: 1;
}

/* Dark Mode Anpassungen */
[data-bs-theme="dark"] .sidebar-header {
	background: linear-gradient(to bottom, 
		rgba(255, 255, 255, 0.03), 
		transparent
	);
}

[data-bs-theme="dark"] .sidebar-header::after {
	background: linear-gradient(to right, 
		transparent, 
		rgba(255, 255, 255, 0.25), 
		transparent
	);
}

/* Sidebar Footer - System Status */
.sidebar-footer {
	padding: 0.5rem 0.875rem; /* von 0.625rem 1rem auf 0.5rem 0.875rem */
	border-top: 1px solid var(--bs-border-color);
	flex-shrink: 0;
}

.sidebar-footer__status {
	display: flex;
	align-items: center;
	gap: 0.4375rem; /* von 0.5rem auf 0.4375rem */
	font-size: var(--font-size-xs); /* 0.75rem = 12px - Bessere Lesbarkeit */
	font-weight: var(--font-weight-regular); /* 400 */
	color: var(--bs-secondary);
}

.sidebar-footer__status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #28a745;
	flex-shrink: 0;
	transition: background-color 0.2s ease;
}

.sidebar-footer__status-dot.offline {
	background-color: #dc3545;
}

.sidebar-footer__status-text {
	font-weight: 400;
}

[data-bs-theme="dark"] .sidebar-footer__status-dot {
	background-color: #28a745;
}

[data-bs-theme="dark"] .sidebar-footer__status-dot.offline {
	background-color: #dc3545;
}

/* Navigation Container - kein Scrollen, alles auf einen Blick */
.sidebar-nav-container {
	flex: 1;
	overflow: visible;
	display: flex;
	flex-direction: column;
}

.main-content-wrapper {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.main-content {
	flex-grow: 1;
	overflow-y: auto;
	background-color: var(--bs-secondary-bg);
	padding: 1.5rem; /* von 2rem auf 1.5rem (20% kleiner) */
}

.header-main {
	flex-shrink: 0;
	background-color: var(--bs-body-bg);
	border-bottom: 1px solid var(--bs-border-color);
}

/* ============================================
   SIDEBAR: COLLAPSED STATE
   ============================================ */

/* Unterstützung für Anti-Flicker: html.sidebar-collapsed-state */
html.sidebar-collapsed-state .app-container-main .sidebar-container,
.app-container-main.sidebar-collapsed .sidebar-container {
	width: var(--sidebar-width-collapsed);
}

/* Gemeinsame Selektoren für beide States */
html.sidebar-collapsed-state .app-container-main .sidebar-nav .nav-link span,
.app-container-main.sidebar-collapsed .sidebar-nav .nav-link span {
	display: none;
}

/* Sektionen-Titel ausblenden wenn Sidebar collapsed */
html.sidebar-collapsed-state .app-container-main .sidebar-section-title,
.app-container-main.sidebar-collapsed .sidebar-section-title {
	display: none;
}

html.sidebar-collapsed-state .app-container-main .sidebar-container nav,
.app-container-main.sidebar-collapsed .sidebar-container nav {
	scrollbar-width: none;
}

html.sidebar-collapsed-state .app-container-main .sidebar-container nav::-webkit-scrollbar,
.app-container-main.sidebar-collapsed .sidebar-container nav::-webkit-scrollbar {
	width: 0;
	height: 0;
}


html.sidebar-collapsed-state .app-container-main .sidebar-header,
.app-container-main.sidebar-collapsed .sidebar-header {
	justify-content: center;
}

html.sidebar-collapsed-state .app-container-main .sidebar-nav .nav-link,
.app-container-main.sidebar-collapsed .sidebar-nav .nav-link {
	justify-content: center;
	align-items: center;
	gap: 0;
	padding: 0.625rem;
	margin: 0.125rem 0.5rem;
	width: auto;
	min-width: auto;
	height: auto;
	min-height: 2.5rem;
	transition: none;
	position: relative;
	line-height: 1;
}

html.sidebar-collapsed-state .app-container-main .sidebar-nav .nav-link .sidebar-icon,
.app-container-main.sidebar-collapsed .sidebar-nav .nav-link .sidebar-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	font-size: var(--font-size-xl); /* 1.25rem = 20px - Größere Icons im collapsed State */
	text-align: center;
	width: 1.5rem;
	min-width: 1.5rem;
	height: 1.5rem;
	flex-shrink: 0;
	transition: none;
	position: relative;
	line-height: 1;
	vertical-align: middle;
	top: 0;
	left: 0;
}

html.sidebar-collapsed-state .app-container-main .sidebar-nav .nav-link[data-bs-toggle="tooltip"],
.app-container-main.sidebar-collapsed .sidebar-nav .nav-link[data-bs-toggle="tooltip"] {
	cursor: pointer;
}

html.sidebar-collapsed-state .app-container-main .sidebar-nav .nav-link > *:not(.sidebar-icon),
.app-container-main.sidebar-collapsed .sidebar-nav .nav-link > *:not(.sidebar-icon) {
	display: none;
}



.mobile-sidebar-close {
	display: none;
}

/* ============================================
   TEIL 12: STATISTIK CARDS & DASHBOARD
   ============================================ */

/* ============================================
   TEIL 5: FORMS & INPUTS
   ============================================ */

/* Gelesene / deaktivierte Felder klar anzeigen */
.form-control[readonly],
.form-control:disabled,
.form-select:disabled,
textarea[readonly],
textarea:disabled {
	background-color: #eef1f5;
	color: #495057;
	opacity: 1;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select { 
	background-color: var(--bs-dark-border, #343a40); 
	border-color: var(--bs-secondary, #6c757d); 
	color: var(--bs-dark-text, #e0e0e0); 
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus { 
	box-shadow: 0 0 0 0.25rem rgba(137, 147, 158, 0.25); 
}

[data-bs-theme="dark"] .input-group-text { 
	background-color: var(--bs-dark-border, #343a40); 
	border-color: var(--bs-secondary, #6c757d); 
}

/* Einheitliche, aber kompaktere Button-Höhen (global) - 20% kleiner */
.btn {
	min-height: 1.8rem; /* von 2.25rem auf 1.8rem */
	padding: 0.4rem 0.85rem; /* von 0.5rem 1.05rem auf 0.4rem 0.85rem */
	border-radius: var(--bs-radius-md);
	font-weight: var(--font-weight-medium); /* 500 - Für Buttons */
	font-size: var(--font-size-button); /* 0.9375rem = 15px - Sweet Spot für Dashboards */
}

.btn-sm {
	min-height: 1.6rem; /* von 2rem auf 1.6rem */
	padding: 0.28rem 0.68rem; /* von 0.35rem 0.85rem auf 0.28rem 0.68rem */
	border-radius: var(--bs-radius-md);
	font-weight: 400; /* Schlanke Schrift (avalonn.ttf) */
	font-size: var(--font-size-button-sm); /* 0.875rem = 14px */
}

.search-card {
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-lg); /* Erbt von .card, !important nicht nötig */
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
	background: var(--bs-light);
	margin-bottom: 3.5rem;
	overflow: visible; /* sichtbar, damit Custom-Dropdown-Menüs (.custom-dropdown__menu) nicht abgeschnitten werden */
}

.search-card .card-body {
	border-radius: inherit;
}

.search-card + .table-pattern,
.search-card + .card,
.search-card + .list-standard {
	margin-top: 1.25rem;
}

[data-bs-theme="dark"] .search-card {
	background: var(--bs-dark-bg, #1f1f1f);
	border-color: var(--bs-dark-border, #343a40);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.search-card-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(240px, 1fr)) auto;
	gap: 1rem;
	align-items: end;
}

/* Einzelnes Suchfeld + Aktionen (z. B. Tabellen/Index): keine leere zweite Spalte */
.search-card-form.search-card-form--single-field {
	grid-template-columns: 1fr auto;
}

.search-card-field-group {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-width: 0;
}

.search-card-actions {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	flex-wrap: wrap;
}

.search-card-field-group label {
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Konsistent mit Form Labels */
	font-weight: var(--font-weight-semibold); /* 600 */
	color: var(--bs-secondary);
	margin-bottom: 0;
}

@media (max-width: 991.98px) {
	.search-card-form {
		grid-template-columns: minmax(220px, 1fr);
	}

	.search-card-form .search-card-btn {
		width: 100%;
	}
}

.search-card-field {
	position: relative;
	display: flex;
	align-items: center;
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	padding: 0;
	background: var(--bs-body-bg);
	height: 2.5rem;
	transition: border-color var(--bs-transition-base), box-shadow var(--bs-transition-base);
}

.search-card-field.full-width {
	max-width: none;
}

.search-card-field:focus-within {
	border-color: var(--bs-primary);
	box-shadow: 0 0 0 0.15rem rgba(52, 58, 64, 0.15);
}

[data-bs-theme="dark"] .search-card-field {
	background: var(--bs-dark-border, #343a40);
	border-color: var(--bs-dark-border, #343a40);
}

.search-card-icon {
	font-size: 1rem;
	color: var(--bs-secondary);
	position: absolute;
	left: 0.85rem;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.search-card-input {
	width: 100%;
	border: none;
	background: transparent;
	box-shadow: none;
	padding: 0 1rem;
	font-size: 1rem;
	color: inherit;
	height: 100%;
}

.search-card-input:focus {
	box-shadow: none;
}

.search-card-select {
	width: 100%;
	border: none;
	background: transparent;
	box-shadow: none;
	height: 100%;
	font-size: 1rem;
	color: inherit;
	appearance: none;
	padding: 0 1rem;
}

.search-card-select option {
	padding: 0.4rem 0.85rem;
	font-size: var(--font-size-form); /* 1rem = 16px - Konsistent mit Form Controls */
}

.search-card-field-select {
	position: relative;
}

.search-card-field-select::after {
	content: "\f282";
	font-family: "bootstrap-icons";
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--bs-secondary);
	pointer-events: none;
}

.search-card-field-select.dropdown-ready::after {
	display: none;
}

.form-field-select {
	position: relative;
	width: 100%;
}

.form-field-select .custom-dropdown__toggle {
	min-height: 2.5rem;
	border: 1px solid var(--bs-border-color);
	background: var(--bs-body-bg);
	border-radius: var(--bs-radius-md);
}

.form-field-select .custom-dropdown__toggle:focus {
	outline: 0;
	border-color: var(--bs-primary);
	box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

[data-bs-theme="dark"] .form-field-select .custom-dropdown__toggle {
	background: var(--bs-dark-bg, #1f1f1f);
	border-color: var(--bs-dark-border, #343a40);
}

.form-field-select--auto {
	width: auto;
	min-width: 6rem;
}

.custom-dropdown {
	position: relative;
	width: 100%;
}

.custom-dropdown.is-open {
	z-index: 20;
}

.custom-dropdown__native {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	pointer-events: none;
}

.custom-dropdown__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	height: 2.5rem;
	padding: 0 1rem;
	border: none;
	background: transparent;
	font-size: var(--font-size-form); /* 1rem = 16px - Konsistent mit Form Controls */
	font-weight: var(--font-weight-medium); /* 500 */
	color: var(--bs-body-color);
	cursor: pointer;
	text-align: left;
	gap: 0.75rem;
}

.search-card-field.has-icon .custom-dropdown__toggle {
	padding-left: 2.75rem;
}

.custom-dropdown.is-open .custom-dropdown__toggle {
	color: var(--bs-primary);
}

.custom-dropdown__value {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.custom-dropdown__chevron {
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Kleine Icons */
	color: var(--bs-secondary);
	transition: transform var(--bs-transition-fast);
}

.custom-dropdown.is-open .custom-dropdown__chevron {
	transform: rotate(180deg);
}

.custom-dropdown__menu {
	position: absolute;
	top: calc(100% + 0.35rem);
	left: 0;
	width: 100%;
	background: #fff;
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	box-shadow: 0 1rem 2.25rem rgba(15, 23, 42, 0.18);
	list-style: none;
	margin: 0;
	padding: 0.35rem;
	max-height: 16rem;
	overflow-y: auto;
	opacity: 0;
	pointer-events: none;
	transform: translateY(-6px);
	transition: opacity var(--bs-transition-fast), transform var(--bs-transition-fast);
	z-index: 40;
}

.custom-dropdown.is-open .custom-dropdown__menu {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.custom-dropdown__option {
	position: relative;
	padding: 0.45rem 0.75rem;
	padding-left: 2.5rem; /* Platz für Checkmark */
	border-radius: var(--bs-radius-sm);
	font-size: var(--font-size-form); /* 1rem = 16px - Konsistent mit Form Controls */
	color: var(--bs-body-color);
	cursor: pointer;
	transition: background var(--bs-transition-fast), color var(--bs-transition-fast);
}

.custom-dropdown__option:hover,
.custom-dropdown__option.is-focused {
	background: rgba(42, 127, 225, 0.08);
}

.custom-dropdown__option.is-selected {
	font-weight: var(--font-weight-semibold); /* 600 */
	color: var(--bs-primary);
}

.custom-dropdown__option.is-selected::before {
	content: '\f26b'; /* Bootstrap Icons checkmark */
	font-family: 'bootstrap-icons';
	position: absolute;
	left: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--bs-primary);
	font-size: var(--font-size-sm); /* 0.875rem = 14px */
	font-weight: var(--font-weight-bold); /* 700 */
}

.custom-dropdown__option.is-disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.custom-dropdown.is-disabled .custom-dropdown__toggle {
	color: var(--bs-secondary);
	cursor: not-allowed;
}

.custom-dropdown.is-disabled .custom-dropdown__chevron {
	opacity: 0.4;
}

.custom-dropdown.is-disabled .custom-dropdown__menu {
	display: none;
}

[data-bs-theme="dark"] .custom-dropdown__toggle {
	color: var(--bs-dark-text, #e0e0e0);
}

[data-bs-theme="dark"] .custom-dropdown__chevron {
	color: var(--bs-dark-secondary-text, #adb5bd);
}

[data-bs-theme="dark"] .custom-dropdown__menu {
	background: var(--bs-dark-bg, #1f1f1f);
	border-color: var(--bs-dark-border, #343a40);
	box-shadow: 0 1.2rem 2.5rem rgba(0, 0, 0, 0.55);
}

[data-bs-theme="dark"] .custom-dropdown__option {
	color: var(--bs-dark-text, #e0e0e0);
}

[data-bs-theme="dark"] .custom-dropdown__option:hover,
[data-bs-theme="dark"] .custom-dropdown__option.is-focused {
	background: rgba(144, 184, 255, 0.12);
}

[data-bs-theme="dark"] .custom-dropdown__option.is-selected {
	color: #90b8ff;
}

[data-bs-theme="dark"] .custom-dropdown__option.is-selected::before {
	color: #90b8ff;
}

.search-card-field.has-icon .search-card-input,
.search-card-field.has-icon .search-card-select {
	padding-left: 2.75rem;
}

.search-card-btn {
	flex: 0 0 auto;
	min-height: 2.5rem;
	padding: 0.55rem 1.1rem;
	border-radius: var(--bs-radius-md);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	font-weight: var(--font-weight-semibold); /* 600 */
	font-size: var(--font-size-form); /* 1rem = 16px - Konsistent mit Form Controls */
	min-width: 6.5rem;
	max-width: 20ch;
}

[data-bs-theme="dark"] .design-project-elements,
[data-bs-theme="dark"] .design-field-stack__header {
	background: var(--bs-dark-bg, #1f1f1f);
	border-color: var(--bs-dark-border, #343a40);
}

[data-bs-theme="dark"] .design-field-stack {
	background: var(--bs-dark-bg, #1f1f1f);
}

[data-bs-theme="dark"] .design-field-stack__header {
	background: #2f3338;
}

.design-step-content {
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	background: var(--bs-light);
	box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.05);
	padding: 1.5rem;
}

.design-step-content__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.design-table-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}

.design-table-card {
	height: 100%;
	padding: 1.25rem;
	border-radius: var(--bs-radius-md);
	box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	align-items: center;
	text-align: center;
}

.design-table-card__icon {
	width: 48px;
	height: 48px;
	border-radius: var(--bs-radius-md);
	background: rgba(52, 58, 64, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--font-size-xl); /* 1.25rem = 20px - Große Icons */
	color: var(--bs-primary);
	margin: 0 auto;
}

.design-table-card__stats {
	display: flex;
	justify-content: space-between;
	width: 100%;
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Konsistent mit kleinen Texten */
	color: var(--bs-secondary);
}

.design-table-card__footer {
	margin-top: auto;
}

.design-table-card__action {
	width: 100%;
	border: none;
	border-radius: var(--bs-radius-md);
	background: var(--bs-primary);
	color: #fff;
	font-weight: 600;
	padding: 0.65rem 1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	text-transform: none;
}

.design-table-card__action.is-secondary {
	background: transparent;
	border: 1px solid var(--bs-border-color);
	color: var(--bs-secondary);
}

.design-table-card__action.is-disabled,
.design-table-card__action.is-disabled:disabled {
	background: var(--bs-secondary-bg);
	color: var(--bs-secondary);
	cursor: not-allowed;
}

[data-bs-theme="dark"] .design-table-card__action {
	background: var(--bs-primary);
	color: #fff;
}

[data-bs-theme="dark"] .design-table-card__action.is-secondary {
	background: transparent;
	border-color: var(--bs-dark-border, #343a40);
	color: var(--bs-dark-text, #e0e0e0);
}

[data-bs-theme="dark"] .design-table-card__action.is-disabled {
	background: rgba(73, 80, 87, 0.45);
	color: rgba(255, 255, 255, 0.5);
}

.design-field-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.design-field-list__item {
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	padding: 0.85rem 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: rgba(248, 249, 250, 0.85);
}

.design-field-list__item.is-selected {
	border-color: rgba(13, 110, 253, 0.4);
	box-shadow: 0 0.5rem 1.2rem rgba(79, 172, 254, 0.15);
}

.design-field-list__item.is-locked {
	opacity: 0.85;
	pointer-events: none;
	background: repeating-linear-gradient(
		45deg,
		rgba(255, 255, 255, 0.85),
		rgba(255, 255, 255, 0.85) 12px,
		rgba(220, 53, 69, 0.08) 12px,
		rgba(220, 53, 69, 0.08) 24px
	);
}

.project-info-card {
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	background: var(--bs-light);
	box-shadow: 0 0.6rem 1.5rem rgba(15, 23, 42, 0.08);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
}

.project-info-card__header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: var(--bs-secondary);
}

.project-info-card__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 0.75rem 1.5rem;
}

.project-info-card__row {
	display: flex;
	flex-direction: column;
	font-size: var(--font-size-form); /* 1rem = 16px - Konsistent mit Form Controls */
}

.project-info-card__row span:first-child {
	font-weight: 600;
	color: var(--bs-secondary);
}

.project-elements-flat {
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	background: var(--bs-light);
	box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.08);
	margin-bottom: 1.5rem;
	overflow: hidden;
}

.project-elements-flat__header {
	background: var(--bs-primary);
	color: #fff;
	padding: 1rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.project-elements-flat__body {
	padding: 1.25rem 1.5rem;
}

.flat-field-section + .flat-field-section {
	margin-top: 1.25rem;
}

.flat-field-section h6 {
	font-weight: 600;
	margin-bottom: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--bs-secondary);
}

.flat-field-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 0.75rem;
}

.flat-field-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.85rem 1rem;
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	background: #fff;
}

.flat-field-row__title {
	font-weight: 600;
	margin-bottom: 0;
}

.flat-field-row__meta {
	margin-bottom: 0;
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Kleine Meta-Informationen */
	color: var(--bs-secondary);
}

.flat-field-row button {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--bs-radius-md);
}

.flat-field-row--asso {
	background: rgba(79, 172, 254, 0.1);
	border-color: rgba(79, 172, 254, 0.3);
}

.step-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	border-radius: var(--bs-radius-md);
	border: 1px solid var(--bs-border-color);
	background: rgba(248, 249, 250, 0.85);
	height: 100%;
	box-shadow: 0 0.4rem 0.6rem rgba(15, 23, 42, 0.05);
}

.step-card__circle {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: rgba(108, 117, 125, 0.2);
	color: var(--bs-secondary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
}

.step-card.is-active {
	border-color: var(--bs-primary);
	box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.12);
}

.step-card.is-active .step-card__circle {
	background: var(--bs-primary);
	color: #fff;
}

.design-icon-actions,
.design-action-stack .btn-group {
	display: inline-flex;
	gap: 0.5rem;
}

.design-icon-actions .btn-icon,
.design-action-stack .btn-group .btn {
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.design-search--dense input {
	padding: 0.5rem 0.9rem 0.5rem 2.2rem;
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Kompakte Suche */
}

[data-bs-theme="dark"] .design-step-block,
[data-bs-theme="dark"] .design-step-content {
	background: var(--bs-dark-bg, #1f1f1f);
	border-color: var(--bs-dark-border, #343a40);
}

[data-bs-theme="dark"] .design-field-list__item {
	background: rgba(33, 37, 41, 0.9);
}

[data-bs-theme="dark"] .step-card {
	background: rgba(33, 37, 41, 0.85);
	border-color: var(--bs-dark-border, #343a40);
}

[data-bs-theme="dark"] .step-card.is-active {
	border-color: var(--bs-primary);
}

[data-bs-theme="dark"] .project-info-card,
[data-bs-theme="dark"] .project-elements-flat {
	background: var(--bs-dark-bg, #1f1f1f);
	border-color: var(--bs-dark-border, #343a40);
}

[data-bs-theme="dark"] .project-elements-flat__header {
	background: #1f2327;
}

[data-bs-theme="dark"] .project-info-card__row span:first-child {
	color: rgba(255, 255, 255, 0.65);
}

[data-bs-theme="dark"] .flat-field-row {
	background: rgba(33, 37, 41, 0.9);
	border-color: rgba(73, 80, 87, 0.9);
}

[data-bs-theme="dark"] .flat-field-row--asso {
	background: rgba(79, 172, 254, 0.15);
	border-color: rgba(79, 172, 254, 0.4);
}

[data-bs-theme="dark"] .design-table-card__icon {
	background: rgba(13, 110, 253, 0.25);
}

[data-bs-theme="dark"] .design-field-list__item.is-locked {
	background: repeating-linear-gradient(
		45deg,
		rgba(33, 37, 41, 0.9),
		rgba(33, 37, 41, 0.9) 12px,
		rgba(220, 53, 69, 0.18) 12px,
		rgba(220, 53, 69, 0.18) 24px
	);
}

/* ============================================
   TEIL 5B: DESIGN-GUIDE (FARBEN & REFERENZEN)
   ============================================ */

.design-guide {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.design-eyebrow {
	font-size: var(--font-size-xs); /* 0.75rem = 12px - Eyebrow-Text */
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: var(--font-weight-semibold); /* 600 */
	color: var(--bs-secondary);
	margin-bottom: 0.35rem;
}

.design-guide__intro p {
	max-width: 720px;
	color: var(--bs-secondary);
}

.design-guide__intro {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	background: var(--bs-light);
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.08);
	padding: 1.75rem;
}

@media (min-width: 992px) {
	.design-guide__intro {
		flex-direction: row;
		justify-content: space-between;
		align-items: flex-start;
	}
}

.design-guide__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1rem;
}

.design-guide__nav a {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.5rem 0.9rem;
	border-radius: var(--bs-radius-md);
	border: 1px solid transparent;
	background: rgba(248, 249, 250, 0.9);
	color: inherit;
	text-decoration: none;
	transition: border-color var(--bs-transition-base), background var(--bs-transition-base);
}

.design-guide__nav a:hover {
	border-color: var(--bs-border-color);
	background: #fff;
}

.design-guide__meta {
	min-width: 220px;
	padding: 1rem;
	border: 1px dashed var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	background: rgba(248, 249, 250, 0.6);
	align-self: stretch;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.design-guide__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 1.5rem;
}

.design-panel {
	background: var(--bs-light);
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.08);
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.design-panel__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
}

.design-panel__header h2 {
	margin: 0;
	font-size: var(--font-size-lg); /* 1.125rem = 18px - Panel-Titel */
}

.design-panel__tag {
	font-size: var(--font-size-xs); /* 0.75rem = 12px - Tag-Größe */
	font-weight: var(--font-weight-semibold); /* 600 */
	color: var(--bs-ci-blue);
	background: rgba(42, 127, 225, 0.12);
	border-radius: var(--bs-radius-sm);
	padding: 0.15rem 0.6rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.design-color-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
}

.design-color-card {
	display: flex;
	gap: 1rem;
	padding: 1rem;
	border: 1px dashed var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	background: rgba(248, 249, 250, 0.75);
}

.design-color-swatch {
	width: 64px;
	min-width: 64px;
	height: 64px;
	border-radius: var(--bs-radius-md);
	background: var(--swatch, #000);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.design-color-swatch--primary { background: #343a40 !important; }
.design-color-swatch--secondary { background: #6c757d !important; }
.design-color-swatch--body-bg { background: #f8f9fa !important; }
.design-color-swatch--white { background: #ffffff !important; }
.design-color-swatch--border { background: #dee2e6 !important; }
.design-color-swatch--ci-blue { background: #2a7fe1 !important; }
.design-color-swatch--ci-blue-light { background: #4facfe !important; }
.design-color-swatch--ci-blue-cyan { background: #00c6ff !important; }
.design-color-swatch--ci-blue-dark { background: #0072ff !important; }
.design-sidebar-demo-box {
	max-width: 280px;
	border: 1px solid var(--bs-border-color);
	border-radius: 0.5rem;
}
.design-sidebar-demo-box--body {
	max-width: 280px;
	border: 1px solid var(--bs-border-color);
	border-radius: 0.5rem;
	padding: 0.5rem;
	background: var(--bs-body-bg);
}

.design-color-meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Kleine Info-Texte */
}

.design-color-name {
	font-weight: var(--font-weight-semibold); /* 600 */
	margin-bottom: 0;
}

.design-color-hex {
	font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Monospace-Text */
	color: var(--bs-secondary);
	margin-bottom: 0;
}

.design-color-token {
	font-size: var(--font-size-xs); /* 0.75rem = 12px - Token-Text */
	color: var(--bs-secondary);
	margin-bottom: 0;
}

.design-color-usage {
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Usage-Text */
	color: var(--bs-body-color);
	margin-bottom: 0;
}

.design-link-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.design-link {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 1rem;
	border: 1px solid transparent;
	border-radius: var(--bs-radius-md);
	text-decoration: none;
	color: inherit;
	transition: border-color var(--bs-transition-base), background var(--bs-transition-base);
}

.design-link:hover {
	border-color: var(--bs-border-color);
	background: rgba(248, 249, 250, 0.8);
}

.design-link__meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.design-link__title {
	font-weight: 600;
	margin: 0;
}

.design-link__desc {
	margin: 0;
	font-size: 0.85rem;
	color: var(--bs-secondary);
}

.design-section {
	background: var(--bs-light);
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.08);
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.design-section__header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
}

.design-section__header-text {
	flex: 1 1 320px;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.design-section__actions {
	display: inline-flex;
	gap: 0.5rem;
	align-items: center;
	flex-wrap: wrap;
}

.design-section__desc {
	max-width: 640px;
	color: var(--bs-secondary);
	margin-bottom: 0;
}

.design-demo {
	background: rgba(248, 249, 250, 0.8);
	border: 1px solid rgba(222, 226, 230, 0.8);
	border-radius: var(--bs-radius-md);
	padding: 1.25rem;
}

.design-demo + .design-demo {
	margin-top: 1rem;
}

.design-demo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1rem;
}

.component-matrix {
	background: var(--bs-light);
	border-radius: var(--bs-radius-md);
	box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
}

.component-matrix th {
	font-weight: 600;
}

.component-matrix td,
.component-matrix th {
	vertical-align: middle;
}

.component-matrix__icon {
	font-size: 1rem;
}

.component-matrix__icon.is-na {
	opacity: 0.3;
}

.design-badge-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.design-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Pill-Größe */
	font-weight: var(--font-weight-semibold); /* 600 */
	border: 1px solid transparent;
}

.design-pill--success {
	color: #0f5132;
	background: rgba(25, 135, 84, 0.12);
	border-color: rgba(25, 135, 84, 0.4);
}

.design-pill--info {
	color: #055160;
	background: rgba(13, 202, 240, 0.15);
	border-color: rgba(13, 202, 240, 0.4);
}

.design-pill--neutral {
	color: var(--bs-secondary);
	background: rgba(108, 117, 125, 0.12);
	border-color: rgba(108, 117, 125, 0.3);
}

.design-status-card {
	background: #fff;
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.08);
	padding: 1.5rem;
}

.step-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1rem;
	border-radius: var(--bs-radius-md);
	border: 1px solid var(--bs-border-color);
	background: rgba(248, 249, 250, 0.8);
}

.step-card__circle {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
}

.step-card.is-active {
	border-color: var(--bs-primary);
	box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.12);
}

.step-card.is-active .step-card__circle {
	background: var(--bs-primary);
	color: #fff;
}

.design-field-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1rem;
}

.design-field-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.25rem;
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	background: #fff;
	box-shadow: 0 0.65rem 1.25rem rgba(15, 23, 42, 0.06);
}

.design-field-card__meta {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.design-field-card__label {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-weight: 600;
}

.design-field-card__label i {
	color: var(--bs-secondary);
}

.design-field-card__type {
	margin: 0;
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Kleine Meta-Informationen */
	color: var(--bs-secondary);
}

.design-field-card__actions {
	display: flex;
	gap: 0.5rem;
}

.btn-icon {
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--bs-radius-md);
	padding: 0;
}

.design-field-card--association {
	background: rgba(42, 127, 225, 0.04);
	border-style: dashed;
}

.design-count-badge {
	min-width: 32px;
	text-align: center;
	padding: 0.2rem 0.75rem;
	border-radius: 999px;
	background: rgba(42, 127, 225, 0.15);
	color: #1a5cb1;
	font-weight: 600;
	display: inline-flex;
	justify-content: center;
}

.design-count-badge--info {
	background: rgba(0, 198, 255, 0.18);
	color: #0072ff;
}

.design-count-badge--neutral {
	background: rgba(108, 117, 125, 0.2);
	color: var(--bs-secondary);
}

.design-action-stack {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: flex-end;
}

.design-icon-actions,
.design-action-stack .btn-group {
	display: inline-flex;
	gap: 0.5rem;
}

.design-icon-actions .btn-icon,
.design-action-stack .btn-group .btn {
	width: 38px;
	height: 38px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.design-project-elements {
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	background: var(--bs-light);
	box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.08);
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.design-project-elements__header {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.design-project-elements__search .design-search {
	position: relative;
}

.design-search input {
	width: 100%;
	padding: 0.65rem 1rem 0.65rem 2.5rem;
	border-radius: var(--bs-radius-md);
	border: 1px solid var(--bs-border-color);
	background: var(--bs-body-bg);
}

.design-search i {
	position: absolute;
	left: 0.9rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--bs-secondary);
}

.design-field-stack {
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-md);
	background: #fff;
	overflow: hidden;
}

.design-field-stack__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.25rem;
	background: var(--bs-primary);
	color: #fff;
}

.design-field-stack__tabs .btn {
	min-width: 110px;
}

.design-field-section {
	padding: 1rem 1.25rem;
	background: var(--bs-body-bg);
}

.design-field-section + .design-field-section {
	border-top: 1px solid var(--bs-border-color);
}

.design-field-section__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	margin-bottom: 1rem;
}

@media (max-width: 575.98px) {
	.search-card-form {
		flex-direction: column;
		align-items: stretch;
	}

	.search-card-btn {
		width: 100%;
	}

	.search-card-field {
		max-width: none;
	}

	.search-card-actions {
		width: 100%;
		flex-direction: column;
	}

	.search-card-actions .btn {
		width: 100%;
	}
}

/* Dark Theme Support (Design Guide) */
[data-bs-theme="dark"] .design-guide__intro,
[data-bs-theme="dark"] .design-section,
[data-bs-theme="dark"] .design-panel,
[data-bs-theme="dark"] .design-demo,
[data-bs-theme="dark"] .design-status-card {
	background: var(--bs-dark-bg, #1f1f1f);
	border-color: var(--bs-dark-border, #343a40);
	box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.6);
}

[data-bs-theme="dark"] .design-guide__nav a {
	background: rgba(52, 58, 64, 0.65);
}

[data-bs-theme="dark"] .design-guide__nav a:hover {
	background: rgba(73, 80, 87, 0.85);
	border-color: var(--bs-dark-border, #343a40);
}

[data-bs-theme="dark"] .design-guide__meta {
	border-color: rgba(255, 255, 255, 0.08);
	background: rgba(52, 58, 64, 0.6);
}

[data-bs-theme="dark"] .design-color-card,
[data-bs-theme="dark"] .design-demo {
	background: rgba(33, 37, 41, 0.8);
	border-color: rgba(73, 80, 87, 0.9);
}

[data-bs-theme="dark"] .design-pill--neutral {
	color: #cfd3d7;
	background: rgba(108, 117, 125, 0.35);
	border-color: rgba(108, 117, 125, 0.6);
}

[data-bs-theme="dark"] .design-pill--info {
	color: #a6e6f5;
	background: rgba(13, 202, 240, 0.25);
	border-color: rgba(13, 202, 240, 0.5);
}

[data-bs-theme="dark"] .design-pill--success {
	color: #a3e4c4;
	background: rgba(25, 135, 84, 0.25);
	border-color: rgba(25, 135, 84, 0.55);
}

/* ============================================
   TEIL 6: TABLES (inkl. Zebra-Pattern!)
   ============================================ */

/* UX/CI STANDARD: EINHEITLICHE TABELLEN-STYLES */
.table {
	width: 100%;
	margin-bottom: 0;
	border-collapse: separate;
	border-spacing: 0;
	font-size: var(--font-size-table); /* 0.9375rem = 15px - Bessere Lesbarkeit */
}

.table thead th {
	font-weight: var(--font-weight-medium); /* 500 - Für Tabellen-Header */
	font-size: var(--font-size-table); /* 0.9375rem = 15px */
	padding: 0.6rem 0.8rem; /* von 0.75rem 1rem auf 0.6rem 0.8rem */
	vertical-align: middle;
	border-bottom: 2px solid var(--bs-border-color);
	white-space: nowrap;
	background-color: var(--bs-body-bg);
	color: var(--bs-body-color);
}

.table tbody td {
	padding: 0.6rem 0.8rem; /* von 0.75rem 1rem auf 0.6rem 0.8rem */
	vertical-align: middle;
	border-bottom: 1px solid var(--bs-border-color);
	color: var(--bs-body-color);
}

.table tbody tr {
	transition: background-color 0.15s ease;
	background-color: transparent;
}

/* Zebra-Table-Pattern für bessere Lesbarkeit (aus site.css) */
.table tbody tr:nth-child(even) {
	background-color: var(--bs-table-striped-bg, #f8f9fa);
}

[data-bs-theme="dark"] .table tbody tr:nth-child(even) {
	background-color: var(--bs-dark-striped, #2c3034);
}

/* Odd rows sind transparent (Standard) - explizit für Klarheit */
.table tbody tr:nth-child(odd) {
	background-color: transparent;
}

/* ============================================
   TEIL 6.1: TABLE PATTERNS (Design Referenz)
   ============================================ */

.table-pattern {
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 0.5rem;
	background: var(--bs-light);
	box-shadow: 0 15px 35px rgba(15, 23, 42, 0.05);
	overflow: hidden;
	margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .table-pattern {
	background: var(--bs-dark-bg);
	border-color: var(--bs-dark-border);
}

.table-pattern .table {
	margin-bottom: 0;
}

.table-pattern .table thead th {
	background: var(--bs-light);
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
	font-weight: 600;
	color: var(--bs-body-color);
}

.table-pattern .table tbody td {
	padding: 0.9rem 1.25rem;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
	background-color: var(--bs-light);
}

.table-pattern .table tbody tr:nth-child(even) {
	background-color: var(--bs-light);
}

[data-bs-theme="dark"] .table-pattern .table thead th {
	background: var(--bs-dark-bg);
	border-color: var(--bs-dark-border);
	color: var(--bs-dark-text);
}

[data-bs-theme="dark"] .table-pattern .table tbody td {
	border-color: var(--bs-dark-border);
	background-color: var(--bs-dark-bg);
	color: var(--bs-dark-text);
}

.table-pattern .table tbody tr:last-child td {
	border-bottom: none;
}

.table-pattern__footer {
	border-top: 1px solid var(--bs-border-color);
	background: var(--bs-light);
	padding: 0.75rem 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Footer-Text */
	color: var(--bs-secondary);
}

[data-bs-theme="dark"] .table-pattern__footer {
	background: var(--bs-dark-bg);
	border-color: var(--bs-dark-border);
	color: var(--bs-dark-secondary-text, #adb5bd);
}

.table-pattern__empty {
	padding: 2rem 0;
	text-align: center;
	color: var(--bs-secondary);
}

.table-pattern__empty i {
	font-size: var(--font-size-h1); /* 2rem = 32px - Große Empty-State-Icons */
	color: rgba(15, 23, 42, 0.4);
	display: inline-block;
	margin-bottom: 0.35rem;
}

[data-bs-theme="dark"] .table-pattern__empty i {
	color: rgba(255, 255, 255, 0.35);
}

.table-pattern__empty-row td {
	padding: 0;
	border-bottom: none;
	background: var(--bs-light);
}

.table-pattern__empty-row,
.table-pattern__empty-row td {
	pointer-events: none;
}

[data-bs-theme="dark"] .table-pattern__empty-row td {
	background: var(--bs-dark, #212529);
}

.table-pattern__empty-row tr:hover,
.table-pattern__empty-row td:hover,
.table-pattern__empty-row:hover {
	background: transparent;
}

.table-pattern__empty-row .table-pattern__empty {
	margin: 0;
}

.table-pattern__empty-title {
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Kleine Texte */
	margin: 0;
	color: var(--bs-secondary);
}

.table-pattern__empty.is-light {
	background: transparent;
	border: none;
}

.table-pattern__empty .btn {
	display: none;
}

.table-pattern__actions {
	white-space: nowrap;
	width: 1%;
}

.table-pattern__col-status {
	width: 160px;
}

.table-pattern__badge {
	min-width: 70px;
	border-radius: 999px;
	font-weight: 600;
	padding: 0.3rem 0.85rem;
}

.table-hover tbody tr:not(.table-pattern__empty-row):hover,
.table tbody tr:not(.table-pattern__empty-row):hover {
	background-color: var(--bs-table-hover-bg, #f1f3f5);
	transition: background-color 0.15s ease-in-out;
}

.table-hover tbody tr.table-pattern__empty-row:hover,
.table-hover tbody tr.table-pattern__empty-row:hover > *,
.table tbody tr.table-pattern__empty-row:hover,
.table tbody tr.table-pattern__empty-row:hover > * {
	background-color: transparent;
}

[data-bs-theme="dark"] .table-hover tbody tr:not(.table-pattern__empty-row):hover,
[data-bs-theme="dark"] .table tbody tr:not(.table-pattern__empty-row):hover {
	background-color: var(--bs-dark-hover, #32383e);
}

.table tbody tr:last-child td {
	border-bottom: none;
}

.table-sm thead th,
.table-sm tbody td {
	padding: 0.4rem 0.6rem; /* von 0.5rem 0.75rem auf 0.4rem 0.6rem (20% kleiner) */
	font-size: var(--font-size-table-sm); /* 0.875rem = 14px - Bessere Lesbarkeit */
}

.table-sm {
	font-size: var(--font-size-table-sm); /* 0.875rem = 14px */
}

.table.align-middle tbody td {
	vertical-align: middle;
}

.table thead.table-dark th {
	background-color: var(--bs-dark);
	color: var(--bs-light);
	border-bottom-color: rgba(255, 255, 255, 0.1);
}

.table thead.table-light th {
	background-color: var(--bs-light);
	color: var(--bs-body-color);
	border-bottom-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .table thead.table-dark th {
	background-color: var(--bs-dark-bg, #212529);
	color: #f8f9fa;
	border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .table thead.table-light th {
	background-color: var(--bs-dark-border, #343a40);
	color: var(--bs-dark-text, #e0e0e0);
	border-bottom-color: var(--bs-border-color, #495057);
}

/* Dark Theme Table - Direkte Styles ergänzen CSS-Variablen aus TEIL 1 */
/* HINWEIS: TEIL 1 (Zeile 88-94) setzt CSS-Variablen (--bs-table-bg, --bs-table-color, etc.) */
/* Diese direkten Styles setzen die tatsächlichen Werte für .table Elemente */
[data-bs-theme="dark"] .table {
	color: var(--bs-dark-text, #e0e0e0);
	background-color: var(--bs-dark-bg, #212529);
}

[data-bs-theme="dark"] .table thead th {
	color: var(--bs-dark-text, #e0e0e0);
	border-bottom-color: var(--bs-border-color, #495057);
	background-color: var(--bs-dark-bg, #212529);
}

[data-bs-theme="dark"] .table tbody td {
	color: var(--bs-dark-text, #e0e0e0);
	border-bottom-color: var(--bs-dark-border, #343a40);
	background-color: transparent;
}

/* Dark Theme Table Rows - bereits durch Zebra-Pattern oben definiert */
[data-bs-theme="dark"] .table tbody tr {
	background-color: transparent;
}

.table-group-divider td {
	background-color: var(--bs-secondary-bg);
	font-weight: 600;
	padding: 0.75rem 1rem;
	border-bottom: 2px solid var(--bs-border-color);
}

[data-bs-theme="dark"] .table-group-divider td {
	background-color: var(--bs-dark-striped, #2c3034);
	color: var(--bs-dark-text, #e0e0e0);
	border-bottom-color: var(--bs-border-color, #495057);
}

.table-responsive {
	border-radius: 0.5rem;
	overflow-x: auto;
}

.table-hover tbody tr {
	cursor: pointer;
}

.table-bordered {
	border: 1px solid var(--bs-border-color);
}

.table-bordered thead th,
.table-bordered tbody td {
	border: 1px solid var(--bs-border-color);
}

[data-bs-theme="dark"] .table-bordered {
	border-color: var(--bs-dark-border, #343a40);
}

[data-bs-theme="dark"] .table-bordered thead th,
[data-bs-theme="dark"] .table-bordered tbody td {
	border-color: var(--bs-dark-border, #343a40);
}

/* Table Striped - Bootstrap-Standard für explizite Verwendung */
/* Hinweis: .table ist bereits gestreift, .table-striped für explizite Kontrolle */
.table-striped tbody tr:nth-child(odd) {
	background-color: transparent;
}

.table-striped tbody tr:nth-child(even) {
	background-color: var(--bs-table-striped-bg, #f8f9fa);
}

[data-bs-theme="dark"] .table-striped tbody tr:nth-child(even) {
	background-color: var(--bs-dark-striped, #2c3034);
}

/* Table Sortable (wird dynamisch verwendet) */
.th-sortable {
	cursor: pointer;
	position: relative;
	user-select: none;
	padding-right: 2rem;
}

.th-sortable::after,
.th-sortable::before {
	content: "";
	position: absolute;
	right: 0.75rem;
	font-size: 0.7em;
	opacity: 0.3;
	transition: opacity 0.2s ease;
}

.th-sortable::before { 
	content: "▲"; 
	top: 0.75rem; 
}

.th-sortable::after { 
	content: "▼"; 
	bottom: 0.75rem; 
}

.th-sortable.sorted-asc::before { 
	opacity: 1; 
}

.th-sortable.sorted-desc::after { 
	opacity: 1; 
}

.table-actions {
	white-space: nowrap;
}

/* ============================================
   TEIL 7: PAGINATION
   ============================================ */

/* Custom Pagination Styles - CI Anpassung */
.pagination {
	border-radius: 0.5rem;
	box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.07);
	background-color: transparent;
	border: none;
}

.pagination .page-link {
	border: 1px solid var(--bs-border-color);
	background-color: var(--bs-light);
	color: var(--bs-body-color);
	border-radius: 0.375rem;
	margin: 0 0.125rem;
	font-weight: 500;
	transition: all 0.2s ease;
	min-width: 2.5rem;
	text-align: center;
	font-family: inherit;
}

.pagination .page-link:hover {
	background-color: var(--bs-primary);
	border-color: var(--bs-primary);
	color: var(--bs-light);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pagination .page-item.active .page-link {
	background-color: var(--bs-primary);
	border-color: var(--bs-primary);
	color: var(--bs-light);
	font-weight: 600;
	box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.pagination .page-item.disabled .page-link {
	background-color: var(--bs-light);
	border-color: var(--bs-border-color);
	color: var(--bs-secondary);
	opacity: 0.5;
	cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
	background-color: var(--bs-light);
	border-color: var(--bs-border-color);
	color: var(--bs-secondary);
	transform: none;
	box-shadow: none;
}

[data-bs-theme="dark"] .pagination .page-link {
	background-color: var(--bs-dark-border, #343a40);
	border-color: var(--bs-border-color, #495057);
	color: var(--bs-dark-text, #e0e0e0);
}

[data-bs-theme="dark"] .pagination .page-link:hover {
	background-color: var(--bs-border-color, #495057);
	border-color: var(--bs-secondary, #6c757d);
	color: #f8f9fa;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
	background-color: var(--bs-border-color, #495057);
	border-color: var(--bs-secondary, #6c757d);
	color: #f8f9fa;
	box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
	background-color: var(--bs-dark-border, #343a40);
	border-color: var(--bs-border-color, #495057);
	color: var(--bs-secondary, #6c757d);
	opacity: 0.5;
}

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link:hover {
	background-color: var(--bs-dark-border, #343a40);
	border-color: var(--bs-border-color, #495057);
	color: var(--bs-secondary, #6c757d);
	box-shadow: none;
}

.pagination-info {
	color: var(--bs-secondary);
	font-size: var(--font-size-sm); /* 0.875rem = 14px - Pagination-Info */
	font-weight: var(--font-weight-medium); /* 500 */
}

[data-bs-theme="dark"] .pagination-info {
	color: var(--bs-dark-secondary-text, #adb5bd);
}

/* ============================================
   TEIL 8: TOAST/NOTIFICATION SYSTEM
   ============================================ */

.toast-container {
	position: fixed;
	top: 80px;
	right: 20px;
	z-index: 3000;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 400px;
	pointer-events: none;
}

.toast {
	position: relative;
	background: var(--bs-light, #ffffff);
	border: 1px solid var(--bs-border-color, #dee2e6);
	border-radius: 0.5rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	padding: 0;
	opacity: 0;
	transform: translateX(100%);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: auto;
	min-width: 300px;
	max-width: 400px;
}

.toast.show {
	opacity: 1;
	transform: translateX(0);
}

.toast.hide {
	opacity: 0;
	transform: translateX(100%);
}

.toast-content {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px;
}

.toast-icon {
	flex-shrink: 0;
	font-size: var(--font-size-xl); /* 1.25rem = 20px - Toast-Icons */
	line-height: 1;
}

.toast-success .toast-icon {
	color: #10b981;
}

.toast-error .toast-icon {
	color: #ef4444;
}

.toast-warning .toast-icon {
	color: #f59e0b;
}

.toast-info .toast-icon {
	color: #06b6d4;
}

.toast-body {
	flex: 1;
	min-width: 0;
}

.toast-title {
	font-weight: 600;
	font-size: 0.9375rem;
	margin-bottom: 4px;
	color: var(--bs-body-color, #212529);
}

.toast-message {
	font-size: 0.875rem;
	color: var(--bs-secondary, #6c757d);
	line-height: 1.5;
}

.toast-close {
	flex-shrink: 0;
	background: none;
	border: none;
	color: var(--bs-secondary, #6c757d);
	font-size: 1.125rem;
	cursor: pointer;
	padding: 4px;
	border-radius: 0.25rem;
	transition: all 0.2s ease;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.toast-close:hover {
	background: var(--bs-body-bg, #f8f9fa);
	color: var(--bs-body-color, #212529);
}

.toast-close:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.toast-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 3px;
	background: var(--bs-primary, #343a40);
	border-radius: 0 0 0.5rem 0.5rem;
	animation: toast-progress linear forwards;
	transform-origin: left;
}

@keyframes toast-progress {
	from {
		transform: scaleX(1);
	}
	to {
		transform: scaleX(0);
	}
}

.toast-success {
	border-left: 4px solid #10b981;
}

.toast-error {
	border-left: 4px solid #ef4444;
}

.toast-warning {
	border-left: 4px solid #f59e0b;
}

.toast-info {
	border-left: 4px solid #06b6d4;
}

[data-bs-theme="dark"] .toast {
	background: var(--bs-dark-bg, #212529);
	border-color: var(--bs-border-color, #495057);
}

[data-bs-theme="dark"] .toast-title {
	color: var(--bs-dark-text, #e0e0e0);
}

[data-bs-theme="dark"] .toast-message {
	color: var(--bs-dark-secondary-text, #adb5bd);
}

[data-bs-theme="dark"] .toast-close:hover {
	background: var(--bs-dark-border, #343a40);
	color: var(--bs-dark-text, #e0e0e0);
}

[data-bs-theme="dark"] .toast-progress {
	background: #89939e;
}

.toast-count-badge {
	position: absolute;
	top: -8px;
	left: -8px;
	background: #dc3545;
	color: white;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--font-size-xs); /* 0.75rem = 12px - Badge-Größe */
	font-weight: var(--font-weight-bold); /* 700 */
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
	z-index: 10;
	animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	border: 2px solid var(--bs-body-bg);
}

@keyframes popIn {
	from { transform: scale(0); }
	to { transform: scale(1); }
}

@media (max-width: 767.98px) {
	.toast-container {
		top: 70px;
		right: 10px;
		left: 10px;
		max-width: none;
	}
	
	.toast {
		min-width: auto;
		max-width: none;
	}
}

/* ============================================
   TEIL 8B: AUDIT INFO & LEGENDEN
   ============================================ */

.audit-info-container {
	text-align: right;
	padding: 0;
}
.audit-info-content {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.75rem;
	color: var(--bs-secondary);
	opacity: 0.7;
	transition: opacity 0.2s ease;
}
.audit-info-content:hover {
	opacity: 1;
}
.audit-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}
.audit-item i {
	font-size: 0.65rem;
	opacity: 0.6;
}
.audit-text {
	font-family: 'Courier New', monospace;
	font-size: 0.7rem;
	color: var(--bs-secondary);
}
.audit-user {
	font-size: 0.7rem;
	color: var(--bs-secondary);
	opacity: 0.8;
	margin-left: 4px;
}
.audit-separator {
	color: var(--bs-secondary);
	opacity: 0.4;
	margin: 0 4px;
}
[data-bs-theme="dark"] .audit-info-content,
[data-bs-theme="dark"] .audit-text,
[data-bs-theme="dark"] .audit-user {
	color: var(--bs-secondary);
}
@media (max-width: 768px) {
	.audit-info-container {
		text-align: left;
	}
}

/* ============================================
   TEIL 9: NETWORK STATUS INDICATOR
   ============================================ */

.network-status-indicator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	margin-right: 12px;
	font-size: 1rem;
	transition: all 0.3s ease;
	cursor: default;
}

/* Sidebar-Version des Network Status Indicators */
.network-status-indicator-sidebar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	font-size: 0.875rem;
	transition: all 0.2s ease;
	cursor: default;
	flex-shrink: 0;
}

.network-status-indicator-sidebar.online {
	color: #10b981;
}

.network-status-indicator-sidebar.online:hover {
	background-color: rgba(16, 185, 129, 0.1);
}

/* Network Status Offline - Zusammenfassung identischer Eigenschaften */
.network-status-indicator-sidebar.offline,
.network-status-indicator.offline {
	color: #ef4444;
	animation: pulse 2s ease-in-out infinite;
	background-color: rgba(239, 68, 68, 0.1);
}

.network-status-indicator-sidebar.offline:hover {
	background-color: rgba(239, 68, 68, 0.1);
}

.network-status-text {
	font-size: 0.875rem;
	transition: color 0.2s ease;
}

.network-status-indicator.online {
	color: #10b981;
	background-color: rgba(16, 185, 129, 0.1);
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.5;
	}
}

form.offline-disabled {
	position: relative;
	opacity: 0.6;
	pointer-events: none;
}

/* Offline-Badge im Header entfernt - nur visueller Indikator in Sidebar */
form.offline-disabled::before {
	display: none;
}

[data-bs-theme="dark"] .network-status-indicator.online {
	background-color: rgba(16, 185, 129, 0.2);
}

[data-bs-theme="dark"] .network-status-indicator.offline {
	background-color: rgba(239, 68, 68, 0.2);
}

@media (max-width: 767.98px) {
	.network-status-indicator {
		width: 28px;
		height: 28px;
		font-size: 0.875rem;
		margin-right: 8px;
	}
}

/* ============================================
   TEIL 10: EMPTY STATES
   ============================================ */

/* Konsistente Empty State für alle Index-Seiten */
.text-center.py-5 {
	padding: 3rem 1rem;
}

.text-center.py-5 i.display-1 {
	font-size: 4rem;
	opacity: 0.5;
	color: var(--bs-secondary);
}

.text-center.py-5 h4 {
	margin-top: 1rem;
	color: var(--bs-secondary);
}

.text-center.py-5 p {
	margin-bottom: 1.5rem;
	color: var(--bs-secondary);
}

[data-bs-theme="dark"] .text-center.py-5 i.display-1,
[data-bs-theme="dark"] .text-center.py-5 h4,
[data-bs-theme="dark"] .text-center.py-5 p {
	color: var(--bs-secondary);
}

/* ============================================
   TEIL 11: LOGIN-SPECIFIC STYLES
   ============================================ */

/* Login Page Body */
body.login-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	position: relative;
	overflow-x: hidden;
	/* Background & Animation siehe weiter unten (zusammengeführt) */
}

/* Canvas für Partikel-Animation */
/* HINWEIS: #animatedBackground Definition siehe weiter unten (zusammengeführt mit opacity) */

/* Aurora Hintergrund - CI-konform (nur Blau-Töne) */
/* HINWEIS: body.login-page::before wird weiter unten definiert (zusammengeführt mit zusätzlichem Overlay) */

@keyframes auroraShift {
	0%, 100% { 
		background-position: 0% 50%, 100% 50%, 50% 0%, 0% 50%;
	}
	25% { 
		background-position: 100% 50%, 0% 50%, 50% 100%, 25% 75%;
	}
	50% { 
		background-position: 50% 100%, 50% 0%, 0% 50%, 100% 50%;
	}
	75% { 
		background-position: 0% 50%, 100% 50%, 100% 50%, 50% 0%;
	}
}

@keyframes auroraPulse {
	0%, 100% { 
		opacity: 0.3;
	}
	50% { 
		opacity: 0.5;
	}
}

/* Datenströme Overlay - Netzwerk-Effekt (CI-konform) */
[data-bs-theme="light"] body.login-page::after {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/* CI-Farben: Logo-Blau-Töne */
	background-image: 
		linear-gradient(90deg, transparent 0%, rgba(42, 127, 225, 0.08) 50%, transparent 100%),
		linear-gradient(0deg, transparent 0%, rgba(0, 198, 255, 0.06) 50%, transparent 100%),
		radial-gradient(circle at 2px 2px, rgba(0,0,0,0.015) 1px, transparent 0);
	background-size: 200% 200%, 200% 200%, 40px 40px;
	background-position: 0% 0%, 0% 0%, 0 0;
	animation: dataFlow 15s linear infinite, gridMove 20s linear infinite;
	z-index: -1;
}

[data-bs-theme="dark"] body.login-page::after {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/* CI-Farben: Logo-Blau-Töne */
	background-image: 
		linear-gradient(90deg, transparent 0%, rgba(42, 127, 225, 0.15) 50%, transparent 100%),
		linear-gradient(0deg, transparent 0%, rgba(0, 198, 255, 0.12) 50%, transparent 100%),
		radial-gradient(circle at 2px 2px, rgba(42, 127, 225, 0.08) 1px, transparent 0);
	background-size: 200% 200%, 200% 200%, 40px 40px;
	background-position: 0% 0%, 0% 0%, 0 0;
	animation: dataFlow 12s linear infinite, gridMove 25s linear infinite;
	z-index: -1;
}

@keyframes dataFlow {
	0% { 
		background-position: -100% 0%, 0% -100%, 0 0;
	}
	100% { 
		background-position: 200% 0%, 0% 200%, 0 0;
	}
}

@keyframes gridMove {
	0% { 
		background-position: 0% 0%, 0% 0%, 0 0;
	}
	100% { 
		background-position: 0% 0%, 0% 0%, 40px 40px;
	}
}

/* Animierte Datenströme - Verbindungslinien */
/* HINWEIS: .data-streams Definition siehe weiter unten (zusammengeführt mit inset: 0) */

.stream {
	position: absolute;
	width: 3px;
	height: 100%;
	background: linear-gradient(180deg, 
		transparent 0%, 
		rgba(42, 127, 225, 0.6) 20%, 
		rgba(0, 198, 255, 0.75) 50%, 
		rgba(42, 127, 225, 0.6) 80%, 
		transparent 100%);
	opacity: 0.85;
	filter: drop-shadow(0 0 6px rgba(42, 127, 225, 0.35));
	animation: streamFlow 8s linear infinite;
	will-change: transform, opacity;
	transform: translate3d(0, -100%, 0) scaleY(0);
}

.stream-1 {
	left: 10%;
	animation-delay: 0s;
	animation-duration: 10s;
}

.stream-2 {
	left: 30%;
	animation-delay: -2s;
	animation-duration: 12s;
}

.stream-3 {
	left: 50%;
	animation-delay: -4s;
	animation-duration: 9s;
}

.stream-4 {
	left: 70%;
	animation-delay: -6s;
	animation-duration: 11s;
}

.stream-5 {
	left: 90%;
	animation-delay: -8s;
	animation-duration: 13s;
}

@keyframes streamFlow {
	0% {
		transform: translate3d(0, -100%, 0) scaleY(0);
		opacity: 0;
	}
	10% {
		opacity: 0.4;
	}
	50% {
		opacity: 0.6;
	}
	90% {
		opacity: 0.4;
	}
	100% {
		transform: translate3d(0, 100vh, 0) scaleY(1);
		opacity: 0;
	}
}

[data-bs-theme="light"] .stream {
	background: linear-gradient(180deg, 
		transparent 0%, 
		rgba(42, 127, 225, 0.12) 20%, 
		rgba(0, 198, 255, 0.15) 50%, 
		rgba(42, 127, 225, 0.12) 80%, 
		transparent 100%);
	opacity: 0.2;
}

/* Partikel-Effekt für Datenpunkte */
.data-streams::before,
.data-streams::after {
	content: '';
	position: absolute;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: rgba(42, 127, 225, 0.5);
	box-shadow: 
		0 0 10px rgba(42, 127, 225, 0.6),
		0 0 20px rgba(0, 198, 255, 0.4);
	animation: particleFloat 15s ease-in-out infinite;
}

.data-streams::before {
	top: 20%;
	left: 15%;
	animation-delay: 0s;
}

.data-streams::after {
	top: 60%;
	left: 85%;
	animation-delay: -7.5s;
}

@keyframes particleFloat {
	0%, 100% {
		transform: translate(0, 0) scale(1);
		opacity: 0.6;
	}
	25% {
		transform: translate(50px, -30px) scale(1.2);
		opacity: 0.8;
	}
	50% {
		transform: translate(-30px, 50px) scale(0.8);
		opacity: 0.4;
	}
	75% {
		transform: translate(40px, 20px) scale(1.1);
		opacity: 0.7;
	}
}

[data-bs-theme="light"] .data-streams::before,
[data-bs-theme="light"] .data-streams::after {
	background: rgba(42, 127, 225, 0.25);
	box-shadow: 
		0 0 5px rgba(42, 127, 225, 0.3),
		0 0 10px rgba(0, 198, 255, 0.2);
}

/* Login: Actions oben rechts (z.B. Theme-Toggle) */
.login-actions-top {
	z-index: 10;
}
.rate-limit-progress-bar {
	width: 0%;
}
.login-title {
	font-size: 2.5rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.login-subtitle {
	font-size: 0.95rem;
	color: var(--bs-text-light, var(--bs-secondary));
}

/* TwoFactor-Verification (body.login-page) */
body.login-page .twofactor-title {
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 1.25;
	margin-bottom: 0.35rem;
	word-break: normal;
	white-space: normal;
}
body.login-page .twofactor-subtitle {
	color: #6c757d;
	margin: 0;
}
body.login-page .login-card--narrow {
	max-width: 460px;
}
body.login-page .verification-code {
	font-size: 1.5rem;
	letter-spacing: 0.5em;
	text-align: center;
}
body.login-page .user-info {
	background-color: rgba(0, 0, 0, 0.05);
	border-radius: 0.5rem;
	padding: 1rem;
	margin-bottom: 1.5rem;
}
[data-bs-theme="dark"] body.login-page .user-info {
	background-color: rgba(255, 255, 255, 0.05);
}
body.login-page {
	--bs-primary: #343a40;
}
[data-bs-theme="dark"] body.login-page {
	--bs-body-bg: #1a1a1a;
	--bs-body-color: #e0e0e0;
	--bs-primary: #89939e;
	--bs-border-color: #495057;
}
[data-bs-theme="dark"] body.login-page .card {
	background-color: #212529 !important;
}
[data-bs-theme="dark"] body.login-page .form-control {
	background-color: #343a40;
	border-color: #6c757d;
	color: #e0e0e0;
}
[data-bs-theme="dark"] body.login-page .form-control:focus {
	box-shadow: 0 0 0 0.25rem rgba(137, 147, 158, 0.25);
}

/* Icon-Größen (Login, 2FA, AccessDenied, Partials) */
.icon-size-xl { font-size: 3rem; }
.icon-size-lg { font-size: 2rem; }
.icon-size-md { font-size: 1.5rem; }
.icon-size-4rem { font-size: 4rem; }
.icon-size-dot { font-size: 0.5rem; }

/* Login Main Container */
body.login-page main {
	position: relative;
	z-index: 1;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	padding: 2rem 1rem;
}

/* Login Background & Animation (zusammengeführt) */
body.login-page {
	/* Layout (aus erster Definition) */
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	position: relative;
	overflow-x: hidden;
	/* Background (aus zweiter Definition) */
	background: radial-gradient(circle at 20% 20%, rgba(42, 127, 225, 0.12), transparent 35%),
	            radial-gradient(circle at 80% 80%, rgba(255, 193, 7, 0.12), transparent 35%),
	            linear-gradient(135deg, #e8effa 0%, #eef2f8 100%);
}

/* Aurora Hintergrund + Zusätzliches Overlay (zusammengeführt) */
[data-bs-theme="light"] body.login-page::before {
	content: '';
	position: fixed;
	inset: 0;
	/* Aurora Hintergrund (CI-konform: Logo-Gradient Blau-Töne) */
	background: 
		linear-gradient(135deg, var(--bs-ci-blue, #2a7fe1) 0%, var(--bs-ci-blue-cyan, #00c6ff) 25%, var(--bs-ci-blue-dark, #0072ff) 50%, var(--bs-ci-blue-light, #4facfe) 75%, var(--bs-ci-blue, #2a7fe1) 100%),
		/* Zusätzliches Overlay für sichtbare Animation */
		radial-gradient(circle at 30% 30%, rgba(79, 172, 254, 0.12), transparent 45%),
		radial-gradient(circle at 70% 70%, rgba(0, 198, 255, 0.12), transparent 45%);
	background-size: 400% 400%, 100% 100%, 100% 100%;
	animation: auroraShift 20s ease infinite;
	opacity: 0.12; /* Leichter für eleganteres Aussehen */
	pointer-events: none;
	z-index: -2;
}

[data-bs-theme="dark"] body.login-page::before {
	content: '';
	position: fixed;
	inset: 0;
	/* Aurora Hintergrund (CI-konform: Nur Blau-Töne) */
	background: 
		radial-gradient(ellipse at 20% 50%, rgba(42, 127, 225, 0.3) 0%, transparent 50%),
		radial-gradient(ellipse at 80% 80%, rgba(0, 198, 255, 0.25) 0%, transparent 50%),
		radial-gradient(ellipse at 40% 20%, rgba(79, 172, 254, 0.2) 0%, transparent 50%),
		linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #0a0a1a 100%),
		/* Zusätzliches Overlay für sichtbare Animation */
		radial-gradient(circle at 30% 30%, rgba(79, 172, 254, 0.12), transparent 45%),
		radial-gradient(circle at 70% 70%, rgba(0, 198, 255, 0.12), transparent 45%);
	background-size: 400% 400%, 400% 400%, 400% 400%, 400% 400%, 100% 100%, 100% 100%;
	animation: auroraShift 25s ease infinite, auroraPulse 8s ease-in-out infinite;
	pointer-events: none;
	z-index: -2;
}

/* Canvas für Partikel-Animation (zusammengeführt - zweite Definition behalten mit opacity) */
#animatedBackground {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	opacity: 0.55; /* stärker sichtbar */
	z-index: 0;
}

/* Animierte Datenströme - Verbindungslinien (zusammengeführt - zweite Definition behalten mit inset: 0) */
.data-streams {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}

/* Login Card */
.login-card {
	width: 100%;
	max-width: 520px;
	border-radius: 1.25rem;
	box-shadow: 
		0 20px 60px rgba(0, 0, 0, 0.08),
		0 8px 24px rgba(0, 0, 0, 0.04),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	background-color: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(0, 0, 0, 0.06);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	z-index: 1;
	overflow: hidden;
}

[data-bs-theme="dark"] .login-card {
	background-color: rgba(33, 37, 41, 0.95);
	box-shadow: 
		0 20px 60px rgba(0, 0, 0, 0.3),
		0 8px 24px rgba(0, 0, 0, 0.2),
		inset 0 1px 0 rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-card:hover {
	box-shadow: 
		0 24px 72px rgba(0, 0, 0, 0.12),
		0 12px 32px rgba(0, 0, 0, 0.06),
		inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .login-card:hover {
	box-shadow: 
		0 24px 72px rgba(0, 0, 0, 0.4),
		0 12px 32px rgba(0, 0, 0, 0.25),
		inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-card .card-body {
	position: relative;
	z-index: 1;
}

/* Login Card Title */
.login-card h1 {
	color: #1a2b4d;
	font-weight: 700;
	letter-spacing: -0.02em;
	font-size: 2.5rem;
	line-height: 1.2;
	margin-bottom: 0.5rem;
}

.rate-limit-card {
	width: 100%;
	text-align: center;
	padding: 0; /* nutzt das Padding der login-card */
	border: none;
	background: transparent;
	box-shadow: none;
}

.rate-limit-card .alert {
	border-radius: var(--bs-radius-md);
}

.rate-limit-card .countdown {
	font-size: 2.75rem;
	font-weight: 700;
	color: #1a2b4d;
}

[data-bs-theme="dark"] .rate-limit-card .countdown {
	color: #f1f5f9;
}

.rate-limit-card .progress {
	height: 6px;
}

[data-bs-theme="dark"] .login-card h1 {
	color: #f1f5f9;
}

@media (max-width: 575.98px) {
	.login-card h1 {
		font-size: 2rem;
	}
}

/* Login Welcome Text */
.login-card .card-body > p {
	margin-bottom: 1.5rem;
	font-weight: 400;
	line-height: 1.5;
}

/* Login Countdown (CI-konform: Blau statt Rot) */
#countdown {
	color: var(--bs-ci-blue, #2a7fe1);
}

[data-bs-theme="dark"] #countdown {
	color: var(--bs-ci-blue-light, #4facfe);
}

/* Login Password Toggle */
#togglePassword {
	cursor: pointer;
	position: absolute;
	top: 50%;
	right: 1rem;
	transform: translateY(-50%);
	z-index: 10;
	transition: color 0.2s ease;
}

#togglePassword:hover {
	color: #343a40; /* Grau statt Blau */
}

[data-bs-theme="light"] #togglePassword {
	color: #6c757d;
}

[data-bs-theme="dark"] #togglePassword {
	color: #adb5bd;
}

[data-bs-theme="dark"] #togglePassword:hover {
	color: #89939e; /* Helles Grau statt Blau */
}

/* Login Forgot Password Link */
.login-card a[href="/ForgotPassword"] {
	color: #6c757d; /* Grau statt Blau */
	transition: all 0.2s ease;
	font-weight: 500;
}

.login-card a[href="/ForgotPassword"]:hover {
	color: #343a40; /* Dunkleres Grau */
	text-decoration: underline;
}

[data-bs-theme="dark"] .login-card a[href="/ForgotPassword"] {
	color: #adb5bd;
}

[data-bs-theme="dark"] .login-card a[href="/ForgotPassword"]:hover {
	color: #e0e0e0;
}

/* Login: klare Disabled-Darstellung bei Offline-DB (ohne !important) */
body.login-page.login-offline .form-control,
body.login-page.login-offline .form-select,
body.login-page.login-offline textarea {
	background-color: #f5f6f8;
	color: #6c757d;
	border-color: #d0d5dd;
}

body.login-page.login-offline .btn.disabled,
body.login-page.login-offline .btn:disabled {
	background-color: #c7ccd3;
	border-color: #c7ccd3;
	color: #6c757d;
	opacity: 1;
	cursor: not-allowed;
}

body.login-page.login-offline .link-disabled,
body.login-page.login-offline .pe-none {
	color: #adb5bd;
	text-decoration: none;
	cursor: not-allowed;
	pointer-events: none;
}

body.login-page.login-offline .alert-warning {
	background: #eef4ff;
	border-color: #d6e4ff;
	color: #1b3a8a;
}

body.login-page.login-offline .alert-warning .bi {
	color: #1b3a8a;
}

/* ============================================
   TEIL 12: SPACING & LAYOUT
   ============================================ */

/* Dashboard & Quick Actions */
.dashboard-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}

.dashboard-card {
	padding: 1rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	text-align: center;
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-lg);
	box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
	background: var(--bs-light);
}

[data-bs-theme="dark"] .dashboard-card {
	background: rgba(33, 37, 41, 0.85);
	border-color: var(--bs-dark-border, #343a40);
	box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.55);
}

.dashboard-card__value {
	font-size: var(--font-size-xl); /* 1.25rem = 20px - Bessere Lesbarkeit */
	font-weight: var(--font-weight-semibold); /* 600 - Für wichtige Zahlen */
}

.dashboard-card__label {
	font-size: var(--font-size-sm); /* 0.875rem = 14px */
	color: var(--bs-secondary);
	margin-bottom: 0;
}

.quick-actions {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.quick-actions__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.quick-actions .design-table-card__action {
	border-radius: var(--bs-radius-sm);
}

.permissions-card {
	padding: 1.5rem;
}

.permissions-card__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.permissions-card__note {
	font-size: 0.9rem;
	color: var(--bs-secondary);
	margin-bottom: 0;
}

/* Neue einfache Struktur: Überschriften + Tabellen */
.permissions-groups {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.permissions-group {
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-lg);
	background: var(--bs-light);
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.permissions-group:hover {
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.permissions-group__header {
	padding: 1rem 1.25rem;
	background: rgba(248, 249, 250, 0.9);
	border-bottom: 1px solid var(--bs-border-color);
}

.permissions-group__title {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--bs-body-color);
}

.permissions-group__content {
	padding: 0;
	background: var(--bs-body-bg);
}

.permissions-group__content .table-responsive {
	border-radius: 0;
}

.permissions-group__content .table {
	margin-bottom: 0;
}

.permissions-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 24px;
	padding: 0 0.75rem;
	border-radius: 999px;
	background: #343a40;
	color: #fff;
	font-weight: 600;
	font-size: 0.85rem;
}

/* Basis-Panel für Karten/Kacheln */
.eximo-ui-panel,
.quick-actions,
.permissions-card,
.activity-card {
	border: 1px solid var(--bs-border-color);
	border-radius: var(--bs-radius-lg);
	box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
	background: var(--bs-light);
}

[data-bs-theme="dark"] .eximo-ui-panel,
[data-bs-theme="dark"] .component-matrix,
[data-bs-theme="dark"] .quick-actions,
[data-bs-theme="dark"] .permissions-card,
[data-bs-theme="dark"] .activity-card {
	background: rgba(33, 37, 41, 0.85);
	border-color: var(--bs-dark-border, #343a40);
	box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.55);
}

[data-bs-theme="dark"] .permissions-group {
	background: rgba(33, 37, 41, 0.85);
	border-color: var(--bs-dark-border, #343a40);
}

[data-bs-theme="dark"] .permissions-group__header {
	background: rgba(47, 51, 56, 0.85);
	border-color: rgba(73, 80, 87, 0.5);
}

[data-bs-theme="dark"] .permissions-group__content {
	background: var(--bs-dark-bg, #212529);
}

[data-bs-theme="dark"] .permissions-count {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.activity-card__header {
	padding: 0.75rem 1.25rem;
	border-bottom: 1px solid var(--bs-border-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.activity-card__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.activity-card__item {
	padding: 0.9rem 1.25rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.activity-card__item:last-child {
	border-bottom: none;
	border-radius: 0 0 var(--bs-radius-lg) var(--bs-radius-lg);
}

.activity-card__type {
	font-weight: 600;
	color: var(--bs-body-color);
}

.activity-card__meta {
	font-size: 0.85rem;
	color: var(--bs-secondary);
}

.activity-card__meta span {
	margin-right: 1rem;
}

/* Design Stepper */
.design-stepper {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.design-stepper__item {
	flex: 1 1 160px;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border-radius: var(--bs-radius-md);
	background: rgba(248, 249, 250, 0.85);
	border: 1px solid transparent;
	transition: border-color var(--bs-transition-base), box-shadow var(--bs-transition-base);
}

.design-stepper__item.is-active {
	background: #fff;
	border-color: var(--bs-primary);
	box-shadow: 0 0.4rem 1rem rgba(15, 23, 42, 0.12);
}

.design-stepper__index {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: rgba(108, 117, 125, 0.2);
	color: var(--bs-secondary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
}

.design-stepper__item.is-active .design-stepper__index {
	background: var(--bs-primary);
	color: #fff;
}

.design-stepper__title {
	font-weight: 600;
	margin-bottom: 0;
}

.design-stepper__desc {
	margin: 0;
	font-size: 0.85rem;
	color: var(--bs-secondary);
}

.card-body .design-stepper + .design-stepper {
	margin-top: 1rem;
}

[data-bs-theme="dark"] .design-stepper__item {
	background: rgba(33, 37, 41, 0.85);
	border-color: rgba(73, 80, 87, 0.4);
}

[data-bs-theme="dark"] .design-stepper__item.is-active {
	border-color: var(--bs-primary);
	background: rgba(33, 37, 41, 0.95);
}

[data-bs-theme="dark"] .design-stepper__index {
	background: rgba(108, 117, 125, 0.35);
	color: rgba(255, 255, 255, 0.75);
}

[data-bs-theme="dark"] .design-stepper__item.is-active .design-stepper__index {
	background: var(--bs-primary);
	color: #fff;
}

/* Process-Stepper (Details-Seiten: Konfigurations-Prozess) */
.process-stepper {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	row-gap: 1rem;
}

.process-stepper__link {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: inherit;
	flex: 1 1 140px;
	min-width: 0;
}

.process-stepper__link:hover {
	text-decoration: none;
	color: inherit;
}

.process-stepper__circle {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	flex-shrink: 0;
	margin-right: 0.75rem;
	background: var(--bs-secondary);
	color: #fff;
}

.process-stepper__circle--active {
	background: var(--bs-primary);
	color: #fff;
}

.process-stepper__title {
	font-weight: 600;
	margin-bottom: 0;
	color: var(--bs-body-color);
}

.process-stepper__title--active {
	color: var(--bs-primary);
}

.process-stepper__desc {
	margin: 0;
	font-size: 0.875rem;
	color: var(--bs-secondary);
}

[data-bs-theme="dark"] .process-stepper__circle {
	background: rgba(108, 117, 125, 0.6);
}

[data-bs-theme="dark"] .process-stepper__circle--active {
	background: var(--bs-primary);
}

/* Step-Selection-Card (Tabellen/Felder/Assoziationen-Kacheln in Details-Steps) */
.step-selection-card {
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.step-selection-card__icon {
	color: var(--bs-secondary);
	font-size: 2rem;
}

.step-selection-card__title {
	color: var(--bs-body-color);
}

.step-selection-card--selected .step-selection-card__icon,
.step-selection-card--selected .step-selection-card__title {
	color: var(--bs-primary);
}

.step-feld-row {
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.step-feld-row--selected {
	background-color: var(--bs-light);
	border-color: var(--bs-primary);
}

[data-bs-theme="dark"] .step-feld-row--selected {
	background-color: rgba(var(--bs-primary-rgb), 0.15);
	border-color: var(--bs-primary);
}

.step-alert-no-tables {
	background-color: var(--bs-light);
	border-color: var(--bs-secondary);
	color: var(--bs-body-color);
}

[data-bs-theme="dark"] .step-alert-no-tables {
	background-color: rgba(108, 117, 125, 0.2);
	border-color: rgba(108, 117, 125, 0.5);
}

.step-card-header-primary {
	background-color: var(--bs-primary);
	color: var(--bs-light);
}

.step-card-header-primary .badge {
	background-color: var(--bs-light);
	color: var(--bs-primary);
}

/* ===== Rest-Audit: Zentrale Utility-Klassen (keine Inline-Styles) ===== */
.textarea-fixed-sm {
	height: 100px;
}

.textarea-fixed-md {
	height: 160px;
}

.dropdown-menu--scrollable {
	max-height: 320px;
	overflow-y: auto;
}

.modal-header-primary {
	background-color: var(--bs-primary);
	color: #fff;
}

.modal-header-primary .btn-close {
	filter: invert(1);
}

.qr-code-container,
.qr-code-img {
	width: 260px;
	height: 260px;
}

.verification-code-input {
	letter-spacing: 0.25em;
	font-size: 1.25rem;
	text-align: center;
}

.verification-code-input--sm {
	font-size: 1.125rem;
	letter-spacing: 0.125em;
}

.alert-info-box {
	background-color: var(--bs-light);
	border-color: var(--bs-primary);
	color: var(--bs-body-color);
}

[data-bs-theme="dark"] .alert-info-box {
	background-color: rgba(108, 117, 125, 0.2);
	border-color: var(--bs-primary);
}

.help-modal .modal-header {
	background-color: var(--bs-primary);
	color: #fff;
}

.help-modal .modal-header .btn-close {
	filter: invert(1);
}

.help-modal .alert-primary-custom {
	background-color: var(--bs-primary);
	color: #fff;
	border: 1px solid var(--bs-primary);
}

.help-modal .alert-primary-custom code {
	background-color: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.help-modal .text-primary { color: var(--bs-primary); }
.help-modal .text-white { color: #fff; }
.help-modal .text-success { color: var(--bs-success); }
.help-modal .text-info { color: var(--bs-info); }
.help-modal .text-warning { color: var(--bs-warning); }
.help-modal .text-danger { color: var(--bs-danger); }

.icon-funnel-lg {
	font-size: 3rem;
}

[data-bs-theme="dark"] .design-field-card {
	background: var(--bs-dark-bg, #1f1f1f);
	border-color: var(--bs-dark-border, #343a40);
	box-shadow: 0 0.65rem 1.25rem rgba(0, 0, 0, 0.55);
}

[data-bs-theme="dark"] .design-field-card--association {
	background: rgba(42, 127, 225, 0.12);
}

[data-bs-theme="dark"] .design-count-badge {
	color: #90b8ff;
}

/* Listen im Design-Pattern */
.list-standard {
	background: transparent;
	border: none;
	padding: 0;
}

.list-standard__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 1.25rem;
}

.list-standard__header h3 {
	margin-bottom: 0.35rem;
}

.list-standard__meta {
	font-size: 0.85rem;
	color: var(--bs-secondary);
}

.card-body {
	padding: 1.2rem; /* von 1.5rem auf 1.2rem (20% kleiner) */
}

.main-content > .d-flex.justify-content-between.align-items-center.mb-4 {
	margin-bottom: 1.2rem; /* von 1.5rem auf 1.2rem (20% kleiner) */
}

.main-content > .card.mb-4 {
	margin-bottom: 1.2rem; /* von 1.5rem auf 1.2rem (20% kleiner) */
}

.main-content > .card:last-child {
	margin-bottom: 0;
}

.main-content > h1 {
	margin-bottom: 1.2rem; /* von 1.5rem auf 1.2rem (20% kleiner) */
	font-size: var(--font-size-h1); /* 2rem = 32px - Bessere Lesbarkeit */
	font-weight: var(--font-weight-semibold); /* 600 - Leichter, nicht zu wuchtig */
	letter-spacing: -0.02em; /* Große Schrift etwas enger ziehen -> wirkt moderner */
	line-height: var(--line-height-tight); /* 1.2 */
}

.main-content > .card {
	margin-bottom: 0;
}

.main-content > .card.search-card {
	margin-bottom: 3.5rem;
}

.form-floating.mb-3 {
	margin-bottom: 1rem;
}

.d-flex.justify-content-end {
	gap: 0.5rem;
}

.d-flex.gap-4 {
	gap: 1rem;
}

.d-flex.justify-content-between.align-items-center.mt-3 {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--bs-border-color);
}

[data-bs-theme="dark"] .d-flex.justify-content-between.align-items-center.mt-3 {
	border-top-color: var(--bs-border-color);
}

/* .table-responsive border-radius bereits in TEIL 6 definiert */

/* ============================================
   TEIL 13: RESPONSIVE & MOBILE
   ============================================ */

@media (max-width: 991.98px) {
	.sidebar-container {
		position: fixed;
		left: 0;
		top: 0;
		height: 100vh;
		z-index: 1050;
		transform: translateX(-100%);
		transition: transform var(--transition-speed) ease, width var(--transition-speed) ease;
	}
	
	html.sidebar-collapsed-state .app-container-main .sidebar-container,
	.app-container-main.sidebar-collapsed .sidebar-container {
		width: var(--sidebar-width);
	}
	
	.sidebar-container.mobile-open {
		transform: translateX(0);
		box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
	}
	
	.mobile-overlay {
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		z-index: 1040;
		display: none;
		opacity: 0;
		transition: opacity var(--transition-speed) ease;
	}
	
	.mobile-overlay.active {
		display: block;
		opacity: 1;
	}
	
	.sidebar-container.mobile-open .mobile-sidebar-close {
		display: block;
	}
}

@media (min-width: 992px) {
	.mobile-nav-toggle {
		display: none;
	}
	.mobile-sidebar-close {
		display: none;
	}
}

/* ============================================
   TEIL 14: UTILITY CLASSES
   ============================================ */

/* Globale Scrollbars */
* {
	scrollbar-width: thin;
	scrollbar-color: var(--bs-border-color) transparent;
}

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background-color: var(--bs-border-color);
	border-radius: 4px;
	border: 2px solid transparent;
	background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
	background-color: var(--bs-secondary);
}

/* Visually hidden for screen readers */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* Anti-Flicker (FOUC) – Layout */
.no-transition,
.no-transition * {
	transition: none !important;
}

/* Loading-Spin (Index) */
.spin {
	animation: spin 1s linear infinite;
}
@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Database-Offline-Banner */
.database-offline-banner {
	margin-bottom: 0;
	border-radius: 0;
}
.icon-secondary { color: var(--bs-secondary); }

/* Status-Dot (SecurityBlocks Badge) */
.status-dot {
	width: 12px;
	height: 12px;
	padding: 0;
	display: inline-block;
	flex-shrink: 0;
}

/* Textarea SQL-Preview (Exporte/Wizard) */
.textarea-sql-preview {
	height: 800px;
	resize: vertical;
	background-color: #f8f9fa;
}

/* Scrollable Menu 300px (Dokumentation/Editor) */
.scrollable-menu-300 {
	max-height: 300px;
	overflow-y: auto;
}

/* Card-Header / Element-Box (Partials) */
.card-header-primary {
	background-color: var(--bs-primary);
	color: var(--bs-light);
}
.card-header-warning {
	background-color: var(--bs-warning);
	color: var(--bs-dark);
}
.badge-light-primary {
	background-color: var(--bs-light);
	color: var(--bs-primary);
}
.card-element-box {
	background-color: var(--bs-light);
}

/* Progress / Table Utilities */
.progress-thin { height: 6px; }

/* Dynamische Progress-Bar-Breite per CSS-Variable (kein width im Markup, Rest-Audit) */
.progress-bar--dynamic {
	width: calc(var(--progress, 0) * 1%);
}
.th-w-150 { width: 150px; }

/* ============================================
   TEIL 15: ERM VIEWER
   ============================================ */

/* ERM Viewer Container */
.erm-viewer-container {
	position: relative;
	width: 100%;
	height: 100vh;
	background-color: var(--bs-body-bg);
	overflow: hidden;
	user-select: none;
}

/* Canvas Container mit Grid-Hintergrund */
.erm-canvas-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: 
		linear-gradient(var(--bs-border-color) 1px, transparent 1px),
		linear-gradient(90deg, var(--bs-border-color) 1px, transparent 1px);
	background-size: 40px 40px;
	z-index: 1;
}

#erm-canvas {
	display: block;
	width: 100%;
	height: 100%;
}

/* UI Overlay Layer */
.erm-ui-layer {
	position: absolute;
	z-index: 10;
	pointer-events: none;
	width: 100%;
	height: 100%;
	padding: 20px;
	box-sizing: border-box;
}

/* Panel (gemeinsame Basis für alle UI-Elemente) */
.erm-panel {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
	border-radius: 12px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.5);
	pointer-events: auto;
	transition: all 0.3s ease;
}

[data-bs-theme="dark"] .erm-panel {
	background: rgba(33, 37, 41, 0.95);
	border-color: var(--bs-dark-border);
}

/* Statusbar (oben links) */
#erm-statusbar {
	position: absolute;
	top: 20px;
	left: 20px;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 600;
	color: var(--bs-secondary);
}

/* Controls (oben rechts) */
#erm-controls {
	position: absolute;
	top: 20px;
	right: 20px;
	padding: 8px 12px;
	display: flex;
	align-items: center;
	gap: 15px;
}

.erm-control-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.erm-zoom-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--bs-secondary);
	width: 40px;
	text-align: right;
}

#erm-zoom-slider {
	width: 100px;
	cursor: pointer;
}

.erm-control-separator {
	width: 1px;
	height: 20px;
	background: var(--bs-border-color);
}

.erm-icon-btn {
	background: transparent;
	border: none;
	color: var(--bs-secondary);
	cursor: pointer;
	padding: 6px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.erm-icon-btn:hover {
	background: var(--bs-light);
	color: var(--bs-ci-blue);
	transform: rotate(180deg);
}

[data-bs-theme="dark"] .erm-icon-btn:hover {
	background: var(--bs-dark-hover);
}

/* Legend (unten links) */
#erm-legend {
	position: absolute;
	bottom: 20px;
	left: 20px;
	width: 200px;
	overflow: hidden;
}

.erm-legend-header {
	padding: 12px 16px;
	font-size: 13px;
	font-weight: 600;
	color: var(--bs-body-color);
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.erm-legend-toggle-icon {
	transition: transform 0.3s ease;
	font-size: 10px;
	color: var(--bs-secondary);
}

#erm-legend.collapsed .erm-legend-content {
	max-height: 0;
	opacity: 0;
	padding-bottom: 0;
}

#erm-legend.collapsed .erm-legend-toggle-icon {
	transform: rotate(-90deg);
}

.erm-legend-content {
	padding: 0 16px 16px 16px;
	max-height: 200px;
	opacity: 1;
	transition: all 0.3s ease;
}

.erm-legend-row {
	display: flex;
	align-items: center;
	margin-bottom: 8px;
	font-size: 11px;
	color: var(--bs-secondary);
}

.erm-dot {
	width: 8px;
	height: 8px;
	border-radius: 2px;
	margin-right: 10px;
}
.legend-dot--header { background: var(--header-bg); }
.legend-dot--pk { background: var(--pk-color); }
.legend-dot--fk { background: var(--fk-color); }
.legend-section-title {
	margin-top: 12px;
	font-weight: 600;
	font-size: 11px;
	margin-bottom: 8px;
	border-top: 1px solid var(--grid-color-2);
	padding-top: 8px;
}
#erm-legend .legend-toggle-icon svg,
.legend-toggle-icon svg,
#legend .legend-header svg {
	transition: transform 0.2s;
}

/* Minimap (unten rechts) */
#erm-minimap-container {
	position: absolute;
	bottom: 20px;
	right: 20px;
	width: 200px;
	height: 120px;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid var(--bs-border-color);
	border-radius: 8px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	pointer-events: auto;
}

[data-bs-theme="dark"] #erm-minimap-container {
	background: rgba(33, 37, 41, 0.9);
	border-color: var(--bs-dark-border);
}

#erm-minimap-canvas {
	width: 100%;
	height: 100%;
	display: block;
}

/* ERM Modal */
#erm-modal .modal-dialog {
	max-width: 95vw;
	height: 95vh;
	margin: 2.5vh auto;
}

#erm-modal .modal-content {
	height: 100%;
	display: flex;
	flex-direction: column;
}

#erm-modal .modal-body {
	flex: 1;
	padding: 0;
	overflow: hidden;
}

#erm-modal .modal-body .erm-viewer-container {
	height: 100%;
}

/* ============================================
   ENDE DER ZENTRALEN CSS-DATEI
   ============================================ */