/*
 * ERP-2025-025: Dark-Mode des eAero-Backends.
 * Alle Regeln gelten nur unter html[data-theme="dark"] (gesetzt von assets/js/eaero-theme.js);
 * das helle Schema bleibt unverändert. Farbwelt wie die API-Hilfe (ERP-2026-079-008).
 * Aufbau: Variablen, Überblendung, Grundflächen, Kopfleiste, Seitenleiste, Inhalt, Kästen und
 * Reiter, Tabellen und Listen, Formulare, Knöpfe, Meldungen, Menüs und Dialoge, Bibliotheken,
 * eAero-eigene Klassen, feste Farben aus Vorlagen, Umschalter.
 */

/* ------------------------------------------------------------------ Variablen */
html[data-theme="dark"] {
    color-scheme: dark;
    --dm-bg: #1b1f23;          /* Seite */
    --dm-surface: #22272e;     /* Kästen, Kacheln, Menüs */
    --dm-surface-2: #2b323b;   /* abgesetzte Flächen, Hover */
    --dm-surface-3: #343c46;   /* aktive Flächen */
    --dm-input: #1f252b;       /* Eingabefelder */
    --dm-text: #d6dbe0;
    --dm-text-strong: #eef1f4;
    --dm-muted: #9aa4ae;
    --dm-line: #3a424b;
    --dm-line-2: #4a535e;
    --dm-accent: #6fb3e0;
    --dm-accent-strong: #8cc6ec;
    --dm-heading: #7fbde6;
    --dm-bar: #1f4f73;         /* Kopfleiste */
    --dm-active: #1f3b52;      /* aktive Menüzeile */
    --dm-hover-row: #2a3542;   /* Zeile unter der Maus */
    --dm-stripe: #20262c;      /* gestreifte Zeilen */
    --dm-shadow: rgba(0, 0, 0, .5);
    --dm-focus: #f59942;
    --dm-info-bg: #173447;   --dm-info-text: #a9d4ee;    --dm-info-line: #24506b;
    --dm-ok-bg: #1d3a26;     --dm-ok-text: #a8dbb3;      --dm-ok-line: #2f5d3b;
    --dm-warn-bg: #3d3216;   --dm-warn-text: #f0d48a;    --dm-warn-line: #6a5622;
    --dm-err-bg: #42201f;    --dm-err-text: #f2aaa6;     --dm-err-line: #6e3431;
}

/* Helles Schema: eingebaute Bedienelemente immer hell, auch wenn das System dunkel ist
   (sonst zeichnet der Browser wegen <meta name="color-scheme" content="light dark"> z. B.
   Checkboxen dunkel) */
html[data-theme="light"] { color-scheme: light; }

/* Überblendung beim Umschalten (Klasse nur kurz gesetzt, gilt in beide Richtungen) */
html.theme-fade, html.theme-fade *, html.theme-fade *::before, html.theme-fade *::after {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, stroke .3s ease, box-shadow .3s ease !important;
}

/* Geschützte Bereiche: Inhalte, die wie veröffentlicht aussehen sollen (eingebetteter Shop,
   Ticket-Shop, Kursplan), tragen die Klasse "eaero-light". Alle dunklen Regeln dieser Datei
   schließen sie mit :not(.eaero-light *) aus; dort gilt immer das helle Aussehen. */
html[data-theme="dark"] .eaero-light { color-scheme: light; background-color: #fff; color: #333; }

/* ------------------------------------------------------------------ Grundflächen */
/* body und .main-container bleiben ohne eigenen Hintergrund (wie Ace): sonst malt der Browser sie als
   Fläche in Höhe des Inhalts über die feste Spalte der Seitenleiste (.sidebar:before, z-index -1).
   Die Seitenfarbe kommt von html und .main-container:after. */
html[data-theme="dark"] body:not(.eaero-light *) { background-color: transparent; color: var(--dm-text); }
html[data-theme="dark"],
html[data-theme="dark"] .main-container:not(.eaero-light *):after,
html[data-theme="dark"] .main-content:not(.eaero-light *),
html[data-theme="dark"] .page-content:not(.eaero-light *) {
    background-color: var(--dm-bg);
    color: var(--dm-text);
}
html[data-theme="dark"] a:not(.eaero-light *) { color: var(--dm-accent); }
html[data-theme="dark"] a:hover:not(.eaero-light *), html[data-theme="dark"] a:focus:not(.eaero-light *) { color: var(--dm-accent-strong); }
html[data-theme="dark"] hr:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] h1:not(.eaero-light *), html[data-theme="dark"] h2:not(.eaero-light *), html[data-theme="dark"] h3:not(.eaero-light *),
html[data-theme="dark"] h4:not(.eaero-light *), html[data-theme="dark"] h5:not(.eaero-light *), html[data-theme="dark"] h6:not(.eaero-light *) { color: var(--dm-text-strong); }
html[data-theme="dark"] .page-header:not(.eaero-light *) { border-bottom-color: var(--dm-line); }
html[data-theme="dark"] .page-header h1:not(.eaero-light *) { color: var(--dm-heading); }
html[data-theme="dark"] .page-header h1 small:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .lighter:not(.eaero-light *), html[data-theme="dark"] .light-grey:not(.eaero-light *), html[data-theme="dark"] .grey:not(.eaero-light *),
html[data-theme="dark"] .text-muted:not(.eaero-light *), html[data-theme="dark"] small:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .dark:not(.eaero-light *) { color: var(--dm-text) !important; }
html[data-theme="dark"] .black:not(.eaero-light *) { color: var(--dm-text-strong) !important; }
html[data-theme="dark"] .blue:not(.eaero-light *) { color: var(--dm-accent) !important; }
html[data-theme="dark"] .light-blue:not(.eaero-light *) { color: var(--dm-accent-strong) !important; }
html[data-theme="dark"] .green:not(.eaero-light *) { color: #7dcf8e !important; }
html[data-theme="dark"] .red:not(.eaero-light *) { color: #f08a84 !important; }
html[data-theme="dark"] .orange:not(.eaero-light *) { color: #f5b25c !important; }
html[data-theme="dark"] .purple:not(.eaero-light *) { color: #c49ad6 !important; }
html[data-theme="dark"] .pink:not(.eaero-light *) { color: #f093b8 !important; }
html[data-theme="dark"] mark:not(.eaero-light *) { background-color: #6a5622; color: var(--dm-text-strong); }
html[data-theme="dark"] code:not(.eaero-light *) { background-color: #3a2a30; color: #f0a3b6; }
html[data-theme="dark"] pre:not(.eaero-light *) { background-color: #161a1e; border-color: var(--dm-line); color: var(--dm-text); }
html[data-theme="dark"] blockquote:not(.eaero-light *) { border-left-color: var(--dm-line-2); }
html[data-theme="dark"] .well:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); box-shadow: none; }
html[data-theme="dark"] :not(.eaero-light *)::placeholder { color: #7d8791; opacity: 1; }
html[data-theme="dark"] :not(.eaero-light *)::selection { background: #2c6a96; color: #fff; }
html[data-theme="dark"] img.nav-user-photo:not(.eaero-light *) { border-color: var(--dm-line-2); }

/* ------------------------------------------------------------------ Kopfleiste */
html[data-theme="dark"] .navbar:not(.eaero-light *),
html[data-theme="dark"] .navbar-default:not(.eaero-light *) { background: var(--dm-bar); border-color: var(--dm-bar); }
html[data-theme="dark"] .ace-nav > li:not(.eaero-light *) { border-left-color: rgba(0, 0, 0, .35); }
html[data-theme="dark"] .ace-nav > li.light-blue > a:not(.eaero-light *) { background-color: #275d84; }
html[data-theme="dark"] .ace-nav > li.light-blue > a:hover:not(.eaero-light *),
html[data-theme="dark"] .ace-nav > li.light-blue > a:focus:not(.eaero-light *),
html[data-theme="dark"] .ace-nav > li.open.light-blue > a:not(.eaero-light *) { background-color: #2c6a96; }
html[data-theme="dark"] .ace-nav > li.grey > a:not(.eaero-light *) { background-color: #3a424b; }
html[data-theme="dark"] .ace-nav > li.purple > a:not(.eaero-light *) { background-color: #5e2a4d; }
html[data-theme="dark"] .ace-nav > li.green > a:not(.eaero-light *) { background-color: #24603b; }
html[data-theme="dark"] .navbar .navbar-brand:not(.eaero-light *) { color: #fff; }
/* Mandant und Benutzer in der Kopfleiste: weiß statt Linkfarbe bzw. gedämpftem small */
html[data-theme="dark"] .ace-nav > li > a:not(.eaero-light *),
html[data-theme="dark"] .ace-nav .user-info:not(.eaero-light *) { color: #fff; }
html[data-theme="dark"] .ace-nav .user-info small:not(.eaero-light *) { color: #d6e6f2; }

/* ------------------------------------------------------------------ Seitenleiste */
html[data-theme="dark"] .sidebar:not(.eaero-light *),
html[data-theme="dark"] .sidebar:not(.eaero-light *):before { background-color: #1e2327; border-color: #333a42; }
html[data-theme="dark"] .sidebar-shortcuts:not(.eaero-light *),
html[data-theme="dark"] .sidebar-shortcuts-mini:not(.eaero-light *) { background-color: #1e2327; border-color: #333a42; }
html[data-theme="dark"] .sidebar-collapse:not(.eaero-light *) { background-color: #1e2327; border-color: #333a42; }
html[data-theme="dark"] .sidebar-collapse:not(.eaero-light *):before { border-color: #333a42; }
html[data-theme="dark"] .sidebar-collapse > [class*="icon-"]:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line-2); color: var(--dm-muted); }
html[data-theme="dark"] .nav-list:not(.eaero-light *) { border-color: #333a42; }
html[data-theme="dark"] .nav-list > li:not(.eaero-light *) { border-color: #2c333a; }
html[data-theme="dark"] .nav-list > li > a:not(.eaero-light *) { background-color: #22272e; color: #c3cad1; }
html[data-theme="dark"] .nav-list > li > a:hover:not(.eaero-light *),
html[data-theme="dark"] .nav-list > li > a:focus:not(.eaero-light *) { background-color: #2a3139; color: var(--dm-accent-strong); }
html[data-theme="dark"] .nav-list > li > a:hover:not(.eaero-light *):before { background-color: var(--dm-accent); }
html[data-theme="dark"] .nav-list > li.open > a:not(.eaero-light *) { background-color: #262c33; color: var(--dm-accent-strong); }
html[data-theme="dark"] .nav-list > li.active > a:not(.eaero-light *),
html[data-theme="dark"] .nav-list > li.active > a:hover:not(.eaero-light *),
html[data-theme="dark"] .nav-list > li.active > a:focus:not(.eaero-light *),
html[data-theme="dark"] .nav-list > li.active > a:active:not(.eaero-light *) { background-color: var(--dm-active); color: var(--dm-accent-strong); }
html[data-theme="dark"] .nav-list > li.active:not(.eaero-light *):after { border-color: var(--dm-accent); }
html[data-theme="dark"] .nav-list li .submenu:not(.eaero-light *),
html[data-theme="dark"] .nav-list > li > .submenu:not(.eaero-light *) { background-color: #1e2327; border-color: #2c333a; }
html[data-theme="dark"] .nav-list > li > .submenu:not(.eaero-light *):before,
html[data-theme="dark"] .nav-list > li > .submenu > li:not(.eaero-light *):before { border-color: #3a424b; }
html[data-theme="dark"] .nav-list > li .submenu > li > a:not(.eaero-light *),
html[data-theme="dark"] .nav-list li .submenu li > a:not(.eaero-light *) { background-color: transparent; color: #b3bcc5; border-color: #2c333a; }
html[data-theme="dark"] .nav-list > li .submenu > li > a:hover:not(.eaero-light *),
html[data-theme="dark"] .nav-list li .submenu li > a:hover:not(.eaero-light *) { color: var(--dm-accent-strong); background-color: #262c33; }
html[data-theme="dark"] .nav-list > li .submenu > li.active > a:not(.eaero-light *),
html[data-theme="dark"] .nav-list li .submenu li.active > a:not(.eaero-light *) { color: var(--dm-accent-strong); background-color: var(--dm-active); }
html[data-theme="dark"] .nav-list > li > .submenu > li:first-child > a:not(.eaero-light *) { border-top-color: #2c333a; }
html[data-theme="dark"] .menu-min .nav-list > li > a > .menu-text:not(.eaero-light *),
html[data-theme="dark"] .menu-min .nav-list > li > .submenu:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); box-shadow: 2px 1px 2px 0 var(--dm-shadow); }
html[data-theme="dark"] .nav-list .badge:not(.eaero-light *) { border-color: transparent; }

/* ------------------------------------------------------------------ Brotkrumen und Suche */
html[data-theme="dark"] .breadcrumbs:not(.eaero-light *) { background-color: #20252a; border-bottom-color: var(--dm-line); }
html[data-theme="dark"] .breadcrumb > li:not(.eaero-light *), html[data-theme="dark"] .breadcrumb > li > a:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .breadcrumb > li.active:not(.eaero-light *) { color: var(--dm-text); }
html[data-theme="dark"] .nav-search .nav-search-input:not(.eaero-light *) { background-color: var(--dm-input); border-color: var(--dm-line-2); color: var(--dm-text); }

/* ------------------------------------------------------------------ Kästen (widget-box) und Reiter */
html[data-theme="dark"] .widget-box:not(.eaero-light *) { border-color: var(--dm-line); background-color: var(--dm-surface); }
html[data-theme="dark"] .widget-header:not(.eaero-light *) {
    background: #262c33; background-image: none; filter: none;
    border-color: var(--dm-line); color: var(--dm-heading);
}
html[data-theme="dark"] .widget-header > .widget-title:not(.eaero-light *), html[data-theme="dark"] .widget-header h4:not(.eaero-light *),
html[data-theme="dark"] .widget-header h5:not(.eaero-light *) { color: var(--dm-heading); }
html[data-theme="dark"] .widget-body:not(.eaero-light *), html[data-theme="dark"] .widget-main:not(.eaero-light *) { background-color: var(--dm-surface); color: var(--dm-text); }
html[data-theme="dark"] .widget-body:not(.eaero-light *), html[data-theme="dark"] .widget-box > .widget-body:not(.eaero-light *), html[data-theme="dark"] [class*="widget-color-"] > .widget-body:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .widget-toolbox:not(.eaero-light *), html[data-theme="dark"] .widget-toolbox.toolbox-vertical:not(.eaero-light *) { background-color: #262c33; border-color: var(--dm-line); }
html[data-theme="dark"] .widget-toolbar > a:not(.eaero-light *), html[data-theme="dark"] .widget-toolbar > .widget-menu > a:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .widget-toolbar:not(.eaero-light *):before { border-color: var(--dm-line); }
html[data-theme="dark"] .widget-box.transparent > .widget-header:not(.eaero-light *) { background: none; border-bottom-color: var(--dm-line); }
html[data-theme="dark"] .widget-header-flat:not(.eaero-light *), html[data-theme="dark"] .widget-box.transparent > .widget-header-flat:not(.eaero-light *) { border-bottom-color: var(--dm-line); }
html[data-theme="dark"] .widget-box .widget-header .nav-tabs > li > a:not(.eaero-light *) { background-color: #2b323b; color: var(--dm-muted); border-color: var(--dm-line); }
/* Aktiver Reiter im Kastenkopf geht ohne Linie in die Fläche des Kastens über (wie hell: unten in Flächenfarbe) */
html[data-theme="dark"] .widget-box .widget-header .nav-tabs > li.active > a:not(.eaero-light *),
html[data-theme="dark"] .widget-box .widget-header .nav-tabs > li.active > a:hover:not(.eaero-light *),
html[data-theme="dark"] .widget-box .widget-header .nav-tabs > li.active > a:focus:not(.eaero-light *) { background-color: var(--dm-surface); color: var(--dm-text-strong); border-color: var(--dm-line); border-top-color: var(--dm-accent); border-bottom-color: var(--dm-surface); }

html[data-theme="dark"] .nav-tabs:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .nav-tabs > li > a:not(.eaero-light *),
html[data-theme="dark"] .tabbable .nav-tabs > li > a:not(.eaero-light *) { background-color: #2b323b; color: var(--dm-muted); border-color: var(--dm-line); }
html[data-theme="dark"] .nav-tabs > li > a:hover:not(.eaero-light *),
html[data-theme="dark"] .tabbable .nav-tabs > li > a:hover:not(.eaero-light *) { background-color: #323a44; color: var(--dm-text); border-color: var(--dm-line); }
html[data-theme="dark"] .nav-tabs > li.active > a:not(.eaero-light *),
html[data-theme="dark"] .nav-tabs > li.active > a:hover:not(.eaero-light *),
html[data-theme="dark"] .nav-tabs > li.active > a:focus:not(.eaero-light *) { background-color: var(--dm-surface); color: var(--dm-text-strong); border-color: var(--dm-line); border-top-color: var(--dm-accent); border-bottom-color: transparent; }
html[data-theme="dark"] .tab-content:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-text); }
html[data-theme="dark"] .nav-pills > li > a:hover:not(.eaero-light *) { background-color: var(--dm-surface-2); }
/* Aktive Pille (z. B. Zeitraum "letzten 3 Monate"): weiße Schrift auf dunklerem Blau, Kontrast 5,9:1 */
html[data-theme="dark"] .nav-pills > li.active > a:not(.eaero-light *),
html[data-theme="dark"] .nav-pills > li.active > a:hover:not(.eaero-light *),
html[data-theme="dark"] .nav-pills > li.active > a:focus:not(.eaero-light *) { background-color: #2c6a96; color: #fff; }
html[data-theme="dark"] .nav > li > a:hover:not(.eaero-light *), html[data-theme="dark"] .nav > li > a:focus:not(.eaero-light *) { background-color: var(--dm-surface-2); }

/* Profil-Tabellen (Name/Wert), Accordion, Panels, Listen */
html[data-theme="dark"] .profile-info-row:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .profile-info-name:not(.eaero-light *) { background-color: #262c33; color: var(--dm-muted); border-color: var(--dm-line); }
html[data-theme="dark"] .profile-info-value:not(.eaero-light *) { color: var(--dm-text); border-color: var(--dm-line); }
html[data-theme="dark"] .profile-user-info-striped:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .panel:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); }
html[data-theme="dark"] .panel-heading:not(.eaero-light *), html[data-theme="dark"] .panel-default > .panel-heading:not(.eaero-light *),
html[data-theme="dark"] .panel-footer:not(.eaero-light *) { background-color: #262c33; border-color: var(--dm-line); color: var(--dm-text); }
html[data-theme="dark"] .accordion-style1.panel-group .panel-heading .accordion-toggle:not(.eaero-light *),
html[data-theme="dark"] .accordion-style2.panel-group .panel-heading .accordion-toggle:not(.eaero-light *) { background-color: #262c33; color: var(--dm-accent); border-color: var(--dm-line); }
html[data-theme="dark"] .accordion-style1.panel-group .panel-heading .accordion-toggle.collapsed:not(.eaero-light *) { background-color: var(--dm-surface); color: var(--dm-muted); }
/* Klappfelder (accordion-style1/2), z. B. Seite "Mandanten": Panel und aufgeklappter Bereich sind in Ace weiß */
html[data-theme="dark"] .accordion-style1.panel-group .panel:not(.eaero-light *),
html[data-theme="dark"] .accordion-style1.panel-group .panel .collapse:not(.eaero-light *),
html[data-theme="dark"] .panel-body:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-text); }
html[data-theme="dark"] .accordion-style1.panel-group .panel-body:not(.eaero-light *),
html[data-theme="dark"] .accordion-style1.panel-group .panel-heading + .panel-collapse .panel-body:not(.eaero-light *) { border-top-color: var(--dm-line) !important; }
html[data-theme="dark"] .accordion-style2.panel-group .panel-heading .accordion-toggle:not(.eaero-light *) { background-color: #262c33; border-color: var(--dm-accent); color: var(--dm-accent); }
html[data-theme="dark"] .accordion-style2.panel-group .panel-heading .accordion-toggle.collapsed:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-muted); }
html[data-theme="dark"] .accordion-style2.panel-group .panel-heading .accordion-toggle.collapsed:hover:not(.eaero-light *),
html[data-theme="dark"] .accordion-style1.panel-group .panel-heading .accordion-toggle:hover:not(.eaero-light *) { background-color: var(--dm-surface-2); color: var(--dm-accent-strong); }
html[data-theme="dark"] .accordion-style2.panel-group .accordion-style2.panel-group .panel .panel-heading:not(.eaero-light *),
html[data-theme="dark"] .accordion-style2.panel-group .accordion-style2.panel-group .panel .panel-heading .accordion-toggle:not(.eaero-light *) { background-color: transparent; }
html[data-theme="dark"] .list-group-item:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-text); }
html[data-theme="dark"] a.list-group-item:hover:not(.eaero-light *) { background-color: var(--dm-surface-2); }
html[data-theme="dark"] .item-list > li:not(.eaero-light *), html[data-theme="dark"] .list-striped > li:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); }
html[data-theme="dark"] .list-striped > li:nth-child(odd):not(.eaero-light *) { background-color: var(--dm-stripe); }
html[data-theme="dark"] .thumbnail:not(.eaero-light *), html[data-theme="dark"] .img-thumbnail:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); }
html[data-theme="dark"] .infobox:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-text); }
html[data-theme="dark"] .infobox > .infobox-data > .infobox-content:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .infobox > .infobox-data > .infobox-data-number:not(.eaero-light *) { color: var(--dm-text-strong); }
html[data-theme="dark"] .timeline-item .widget-box:not(.eaero-light *), html[data-theme="dark"] .timeline-item:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); }
html[data-theme="dark"] .itemdiv > .body:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); }
html[data-theme="dark"] .jumbotron:not(.eaero-light *) { background-color: var(--dm-surface); }
html[data-theme="dark"] .progress:not(.eaero-light *) { background-color: #323a44; box-shadow: none; }
html[data-theme="dark"] .footer .footer-inner .footer-content:not(.eaero-light *) { border-top-color: var(--dm-line); }

/* ------------------------------------------------------------------ Tabellen und Listen */
html[data-theme="dark"] .table:not(.eaero-light *) { color: var(--dm-text); background-color: var(--dm-surface); }
html[data-theme="dark"] .table > thead > tr > th:not(.eaero-light *), html[data-theme="dark"] .table > tbody > tr > th:not(.eaero-light *),
html[data-theme="dark"] .table > tfoot > tr > th:not(.eaero-light *), html[data-theme="dark"] .table > thead > tr > td:not(.eaero-light *),
html[data-theme="dark"] .table > tbody > tr > td:not(.eaero-light *), html[data-theme="dark"] .table > tfoot > tr > td:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .table thead tr:not(.eaero-light *),
html[data-theme="dark"] .table thead tr th:not(.eaero-light *),
html[data-theme="dark"] .table > thead > tr:not(.eaero-light *) {
    background: #2a3038; background-image: linear-gradient(to bottom, #2c333b 0, #262c33 100%); filter: none;
    color: #b3bcc5; border-color: var(--dm-line);
}
html[data-theme="dark"] .table thead tr th a:not(.eaero-light *) { color: #b3bcc5; }
html[data-theme="dark"] .table thead > tr > th[class*="sort"]:hover:not(.eaero-light *) { background: #323a44; }
html[data-theme="dark"] .table-bordered:not(.eaero-light *), html[data-theme="dark"] .table-bordered > thead > tr > th:not(.eaero-light *),
html[data-theme="dark"] .table-bordered > tbody > tr > th:not(.eaero-light *), html[data-theme="dark"] .table-bordered > tfoot > tr > th:not(.eaero-light *),
html[data-theme="dark"] .table-bordered > thead > tr > td:not(.eaero-light *), html[data-theme="dark"] .table-bordered > tbody > tr > td:not(.eaero-light *),
html[data-theme="dark"] .table-bordered > tfoot > tr > td:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .table.table-bordered thead tr th:first-child:not(.eaero-light *) { border-left-color: var(--dm-line); }
html[data-theme="dark"] .table-striped > tbody > tr:nth-child(odd) > td:not(.eaero-light *),
html[data-theme="dark"] .table-striped > tbody > tr:nth-child(odd) > th:not(.eaero-light *) { background-color: var(--dm-stripe); }
html[data-theme="dark"] .table-striped > tbody > tr:nth-child(even) > td:not(.eaero-light *) { background-color: var(--dm-surface); }
html[data-theme="dark"] .table-hover > tbody > tr:hover > td:not(.eaero-light *),
html[data-theme="dark"] .table-hover > tbody > tr:hover > th:not(.eaero-light *) { background-color: var(--dm-hover-row); }
html[data-theme="dark"] .table > tbody > tr.selected > td:not(.eaero-light *), html[data-theme="dark"] .table > tbody > tr.active > td:not(.eaero-light *),
html[data-theme="dark"] .table > tbody > tr > td.active:not(.eaero-light *) { background-color: var(--dm-active); }
html[data-theme="dark"] .table > tbody > tr.success > td:not(.eaero-light *), html[data-theme="dark"] .table > tbody > tr > td.success:not(.eaero-light *) { background-color: var(--dm-ok-bg); }
html[data-theme="dark"] .table > tbody > tr.warning > td:not(.eaero-light *), html[data-theme="dark"] .table > tbody > tr > td.warning:not(.eaero-light *) { background-color: var(--dm-warn-bg); }
html[data-theme="dark"] .table > tbody > tr.danger > td:not(.eaero-light *), html[data-theme="dark"] .table > tbody > tr > td.danger:not(.eaero-light *) { background-color: var(--dm-err-bg); }
html[data-theme="dark"] .table > tbody > tr.info > td:not(.eaero-light *), html[data-theme="dark"] .table > tbody > tr > td.info:not(.eaero-light *) { background-color: var(--dm-info-bg); }
html[data-theme="dark"] .table-header:not(.eaero-light *) { background-color: #275d84; color: #fff; }
html[data-theme="dark"] .table-responsive:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .dataTables_wrapper .row:first-child:not(.eaero-light *),
html[data-theme="dark"] .dataTables_wrapper .row:last-child:not(.eaero-light *) { background-color: #262c33; border-color: var(--dm-line); }
html[data-theme="dark"] .dataTables_wrapper .row:first-child + .dataTable:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .dataTables_wrapper label:not(.eaero-light *), html[data-theme="dark"] .dataTables_info:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .pagination > li > a:not(.eaero-light *), html[data-theme="dark"] .pagination > li > span:not(.eaero-light *),
html[data-theme="dark"] .pager > li > a:not(.eaero-light *), html[data-theme="dark"] .pager > li > span:not(.eaero-light *) {
    background-color: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-accent);
}
html[data-theme="dark"] .pagination > li > a:hover:not(.eaero-light *), html[data-theme="dark"] .pager > li > a:hover:not(.eaero-light *) { background-color: var(--dm-surface-2); border-color: var(--dm-line-2); color: var(--dm-accent-strong); }
html[data-theme="dark"] .pagination > .active > a:not(.eaero-light *), html[data-theme="dark"] .pagination > .active > span:not(.eaero-light *),
html[data-theme="dark"] .pagination > .active > a:hover:not(.eaero-light *) { background-color: #2c6a96; border-color: #2c6a96; color: #fff; }
html[data-theme="dark"] .pagination > .disabled > a:not(.eaero-light *), html[data-theme="dark"] .pagination > .disabled > span:not(.eaero-light *),
html[data-theme="dark"] .pager > .disabled > a:not(.eaero-light *) { background-color: #20252a; color: #6b747d; border-color: var(--dm-line); }

/* ------------------------------------------------------------------ Formulare */
html[data-theme="dark"] .form-control:not(.eaero-light *),
html[data-theme="dark"] select:not(.eaero-light *),
html[data-theme="dark"] textarea:not(.eaero-light *),
html[data-theme="dark"] input[type="text"]:not(.eaero-light *), html[data-theme="dark"] input[type="password"]:not(.eaero-light *),
html[data-theme="dark"] input[type="datetime"]:not(.eaero-light *), html[data-theme="dark"] input[type="datetime-local"]:not(.eaero-light *),
html[data-theme="dark"] input[type="date"]:not(.eaero-light *), html[data-theme="dark"] input[type="month"]:not(.eaero-light *),
html[data-theme="dark"] input[type="time"]:not(.eaero-light *), html[data-theme="dark"] input[type="week"]:not(.eaero-light *),
html[data-theme="dark"] input[type="number"]:not(.eaero-light *), html[data-theme="dark"] input[type="email"]:not(.eaero-light *),
html[data-theme="dark"] input[type="url"]:not(.eaero-light *), html[data-theme="dark"] input[type="search"]:not(.eaero-light *),
html[data-theme="dark"] input[type="tel"]:not(.eaero-light *), html[data-theme="dark"] input[type="color"]:not(.eaero-light *) {
    background-color: var(--dm-input); border-color: var(--dm-line-2); color: var(--dm-text);
}
html[data-theme="dark"] .form-control:focus:not(.eaero-light *), html[data-theme="dark"] select:focus:not(.eaero-light *), html[data-theme="dark"] textarea:focus:not(.eaero-light *),
html[data-theme="dark"] input[type="text"]:focus:not(.eaero-light *), html[data-theme="dark"] input[type="password"]:focus:not(.eaero-light *),
html[data-theme="dark"] input[type="date"]:focus:not(.eaero-light *), html[data-theme="dark"] input[type="time"]:focus:not(.eaero-light *),
html[data-theme="dark"] input[type="number"]:focus:not(.eaero-light *), html[data-theme="dark"] input[type="email"]:focus:not(.eaero-light *),
html[data-theme="dark"] input[type="url"]:focus:not(.eaero-light *), html[data-theme="dark"] input[type="search"]:focus:not(.eaero-light *),
html[data-theme="dark"] input[type="tel"]:focus:not(.eaero-light *) { background-color: #232a31; border-color: var(--dm-focus); color: var(--dm-text-strong); }
html[data-theme="dark"] select option:not(.eaero-light *) { background-color: var(--dm-surface); color: var(--dm-text); }
html[data-theme="dark"] .form-control[disabled]:not(.eaero-light *), html[data-theme="dark"] .form-control[readonly]:not(.eaero-light *),
html[data-theme="dark"] fieldset[disabled] .form-control:not(.eaero-light *), html[data-theme="dark"] input[readonly]:not(.eaero-light *),
html[data-theme="dark"] input[disabled]:not(.eaero-light *), html[data-theme="dark"] select[disabled]:not(.eaero-light *), html[data-theme="dark"] textarea[disabled]:not(.eaero-light *),
html[data-theme="dark"] textarea[readonly]:not(.eaero-light *) { background-color: #262c33 !important; color: #9aa4ae !important; border-color: var(--dm-line) !important; }
html[data-theme="dark"] .input-group-addon:not(.eaero-light *) { background-color: #2b323b; border-color: var(--dm-line-2); color: var(--dm-muted); }
html[data-theme="dark"] label:not(.eaero-light *), html[data-theme="dark"] .control-label:not(.eaero-light *) { color: var(--dm-text); }
html[data-theme="dark"] .help-block:not(.eaero-light *), html[data-theme="dark"] .help-button:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .help-button:not(.eaero-light *) { background-color: #3a6f94; color: #fff; }
html[data-theme="dark"] .has-error .help-block:not(.eaero-light *), html[data-theme="dark"] .has-error .control-label:not(.eaero-light *),
html[data-theme="dark"] .form-group.has-error label:not(.eaero-light *) { color: #f08a84; }
html[data-theme="dark"] .has-error .form-control:not(.eaero-light *), html[data-theme="dark"] .form-group.has-error input:not(.eaero-light *),
html[data-theme="dark"] .form-group.has-error select:not(.eaero-light *), html[data-theme="dark"] .form-group.has-error textarea:not(.eaero-light *) { border-color: #c4625c; background-color: #2a1f20; color: var(--dm-text); }
html[data-theme="dark"] .has-success .form-control:not(.eaero-light *), html[data-theme="dark"] .form-group.has-success input:not(.eaero-light *) { border-color: #4f9a5f; background-color: #1d2a21; }
html[data-theme="dark"] .has-warning .form-control:not(.eaero-light *), html[data-theme="dark"] .form-group.has-warning input:not(.eaero-light *) { border-color: #b8913a; background-color: #2a2619; }
html[data-theme="dark"] .form-group.has-info input:not(.eaero-light *), html[data-theme="dark"] .form-group.has-info select:not(.eaero-light *) { border-color: #4f8fbf; background-color: #1c2933; }
html[data-theme="dark"] form label.required:not(.eaero-light *) { color: var(--dm-accent); }
html[data-theme="dark"] .form-actions:not(.eaero-light *) { background-color: #262c33; border-top-color: var(--dm-line); }
html[data-theme="dark"] legend:not(.eaero-light *) { color: var(--dm-text-strong); border-bottom-color: var(--dm-line); }
html[data-theme="dark"] fieldset:not(.eaero-light *) { border-color: var(--dm-line); }
/* Ace-Checkboxen und -Optionen */
html[data-theme="dark"] input[type=checkbox].ace + .lbl:not(.eaero-light *)::before,
html[data-theme="dark"] input[type=radio].ace + .lbl:not(.eaero-light *)::before { background-color: var(--dm-input); border-color: #5a646f; color: var(--dm-accent-strong); box-shadow: none; }
html[data-theme="dark"] input[type=checkbox].ace:checked + .lbl:not(.eaero-light *)::before,
html[data-theme="dark"] input[type=radio].ace:checked + .lbl:not(.eaero-light *)::before { background-color: #23303b; border-color: var(--dm-accent); color: var(--dm-accent-strong); }
html[data-theme="dark"] input[type=checkbox].ace:hover + .lbl:not(.eaero-light *)::before,
html[data-theme="dark"] input[type=radio].ace:hover + .lbl:not(.eaero-light *)::before { border-color: var(--dm-focus); }
html[data-theme="dark"] input[type=checkbox].ace:disabled + .lbl:not(.eaero-light *)::before { background-color: #262c33 !important; border-color: var(--dm-line) !important; }
html[data-theme="dark"] input[type=checkbox].ace.ace-switch + .lbl:not(.eaero-light *)::before { background-color: #3a424b; border-color: #4a535e; color: #c3cad1; }
html[data-theme="dark"] input[type=checkbox].ace.ace-switch:checked + .lbl:not(.eaero-light *)::before { background-color: #2c6a96; border-color: #2c6a96; color: #fff; }
html[data-theme="dark"] input[type=checkbox].ace.ace-switch + .lbl:not(.eaero-light *)::after { background-color: #d6dbe0; }
/* awesome-bootstrap-checkbox */
html[data-theme="dark"] .checkbox label:not(.eaero-light *)::before, html[data-theme="dark"] .radio label:not(.eaero-light *)::before { background-color: var(--dm-input); border-color: #5a646f; }
/* Datei-Auswahl (Ace) */
html[data-theme="dark"] .ace-file-input label:not(.eaero-light *) { background-color: var(--dm-input); border-color: var(--dm-line-2); color: var(--dm-muted); }
html[data-theme="dark"] .ace-file-input label:not(.eaero-light *):before { background-color: #2c6a96; }
html[data-theme="dark"] .ace-file-multiple label:not(.eaero-light *) { background-color: var(--dm-input); border-color: var(--dm-line-2); }
/* Spinner / Zahlenfeld */
html[data-theme="dark"] .ace-spinner .spinner-buttons > .btn:not(.eaero-light *) { background-color: #3a424b !important; border-color: #3a424b; }

/* ------------------------------------------------------------------ Knöpfe */
html[data-theme="dark"] .btn:not(.eaero-light *) { border-color: rgba(0, 0, 0, .25); text-shadow: none; }
html[data-theme="dark"] .btn-default:not(.eaero-light *), html[data-theme="dark"] .btn-default:focus:not(.eaero-light *),
html[data-theme="dark"] .btn:not(.eaero-light *) { color: #fff; }
html[data-theme="dark"] .btn-default:not(.eaero-light *), html[data-theme="dark"] .btn-default:focus:not(.eaero-light *) { background-color: #4a535e !important; border-color: #4a535e; }
html[data-theme="dark"] .btn-default:hover:not(.eaero-light *), html[data-theme="dark"] .btn-default.active:not(.eaero-light *),
html[data-theme="dark"] .open .btn-default.dropdown-toggle:not(.eaero-light *) { background-color: #59636f !important; border-color: #59636f; }
html[data-theme="dark"] .btn-light:not(.eaero-light *), html[data-theme="dark"] .btn-light:focus:not(.eaero-light *) { background-color: #3a424b !important; border-color: #3a424b; color: #d6dbe0 !important; }
html[data-theme="dark"] .btn-light:hover:not(.eaero-light *), html[data-theme="dark"] .btn-light.active:not(.eaero-light *),
html[data-theme="dark"] .open .btn-light.dropdown-toggle:not(.eaero-light *) { background-color: #47505b !important; border-color: #47505b; color: #fff !important; }
html[data-theme="dark"] .btn-light.no-border:hover:not(.eaero-light *) { border-color: #47505b; }
html[data-theme="dark"] .btn-grey:not(.eaero-light *), html[data-theme="dark"] .btn-grey:focus:not(.eaero-light *) { background-color: #59636f !important; border-color: #59636f; }
html[data-theme="dark"] .btn-white:not(.eaero-light *), html[data-theme="dark"] .btn.btn-white:not(.eaero-light *) { background-color: var(--dm-surface) !important; border-color: var(--dm-line-2); color: var(--dm-text) !important; }
html[data-theme="dark"] .btn-white:hover:not(.eaero-light *) { background-color: var(--dm-surface-2) !important; }
html[data-theme="dark"] .btn-link:not(.eaero-light *) { color: var(--dm-accent); }
html[data-theme="dark"] .btn.disabled:not(.eaero-light *), html[data-theme="dark"] .btn[disabled]:not(.eaero-light *), html[data-theme="dark"] fieldset[disabled] .btn:not(.eaero-light *) { opacity: .5; }
html[data-theme="dark"] .btn-yellow:not(.eaero-light *), html[data-theme="dark"] .btn-yellow:focus:not(.eaero-light *) { color: #3a2e05 !important; }
/* Gelbe Schaltflächen behalten dunkle Schrift (Kontrast auf Gelb) */
/* Kacheln (btn-app) haben in Ace einen Verlauf über der Farbe: helle und graue Kacheln ohne Verlauf */
html[data-theme="dark"] .btn.btn-app.btn-light:not(.eaero-light *), html[data-theme="dark"] .btn.btn-app.btn-light:hover:not(.eaero-light *) { background: #3a424b !important; color: #a6a6a6 !important; border-color: #3a424b; text-shadow: none; }
html[data-theme="dark"] .btn.btn-app.btn-grey:not(.eaero-light *), html[data-theme="dark"] .btn.btn-app.btn-grey:hover:not(.eaero-light *) { background: #59636f !important; border-color: #59636f; }
html[data-theme="dark"] .btn.btn-app:not([class*="btn-primary"]):not([class*="btn-info"]):not([class*="btn-success"]):not([class*="btn-warning"]):not([class*="btn-danger"]):not([class*="btn-yellow"]):not([class*="btn-pink"]):not([class*="btn-purple"]):not([class*="btn-inverse"]):not([class*="btn-light"]):not([class*="btn-grey"]):not(.eaero-light *) { background: #5f6e79 !important; border-color: #5f6e79; }
/* Knöpfe ohne Farbklasse (Ace-Grundton #abbac3), z. B. Module ohne Kachelfarbe, btn-secondary */
html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-danger):not(.btn-yellow):not(.btn-pink):not(.btn-purple):not(.btn-inverse):not(.btn-light):not(.btn-grey):not(.btn-default):not(.btn-white):not(.btn-link):not(.btn-app):not(.eaero-light *) { background-color: #5f6e79 !important; border-color: #5f6e79; }
html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-danger):not(.btn-yellow):not(.btn-pink):not(.btn-purple):not(.btn-inverse):not(.btn-light):not(.btn-grey):not(.btn-default):not(.btn-white):not(.btn-link):not(.btn-app):hover:not(.eaero-light *) { background-color: #6c7c88 !important; border-color: #6c7c88; }
html[data-theme="dark"] .btn-group > .btn + .btn:not(.eaero-light *) { border-left-color: rgba(0, 0, 0, .35); }

/* Farbige Knöpfe und Kacheln etwas abdunkeln (Wunsch des Users): Farbton bleibt, auch bei Verläufen
   (btn-app) und Hover. Graue, helle und dunkle Knöpfe sind schon dunkel und bleiben außen vor. */
html[data-theme="dark"] .btn.btn-primary:not(.eaero-light *),
html[data-theme="dark"] .btn.btn-info:not(.navbar-brand):not(.eaero-light *),
html[data-theme="dark"] .btn.btn-success:not(.eaero-light *),
html[data-theme="dark"] .btn.btn-warning:not(.eaero-light *),
html[data-theme="dark"] .btn.btn-danger:not(.eaero-light *),
html[data-theme="dark"] .btn.btn-yellow:not(.eaero-light *),
html[data-theme="dark"] .btn.btn-pink:not(.eaero-light *),
html[data-theme="dark"] .btn.btn-purple:not(.eaero-light *) { filter: brightness(.65) saturate(1.35); }

/* Weiße Schrift und Symbole der grauen und dunklen Knöpfe gleich stark gedämpft wie bei den farbigen
   (Weiß x 0,65 = #a6a6a6), deren Fläche aber nicht weiter abdunkeln */
html[data-theme="dark"] .btn.btn-inverse:not(.eaero-light *), html[data-theme="dark"] .btn.btn-inverse:not(.eaero-light *):hover,
html[data-theme="dark"] .btn.btn-grey:not(.eaero-light *), html[data-theme="dark"] .btn.btn-grey:not(.eaero-light *):hover,
html[data-theme="dark"] .btn.btn-light:not(.eaero-light *), html[data-theme="dark"] .btn.btn-light:not(.eaero-light *):hover,
html[data-theme="dark"] .btn.btn-default:not(.eaero-light *), html[data-theme="dark"] .btn.btn-default:not(.eaero-light *):hover,
html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-danger):not(.btn-yellow):not(.btn-pink):not(.btn-purple):not(.btn-inverse):not(.btn-light):not(.btn-grey):not(.btn-default):not(.btn-white):not(.btn-link):not(.eaero-light *), html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-info):not(.btn-success):not(.btn-warning):not(.btn-danger):not(.btn-yellow):not(.btn-pink):not(.btn-purple):not(.btn-inverse):not(.btn-light):not(.btn-grey):not(.btn-default):not(.btn-white):not(.btn-link):not(.eaero-light *):hover { color: #a6a6a6 !important; }

/* Ace gibt hellen und gelben Knöpfen einen hellen Schriftschatten (#EEE, !important); auf Dunkel wirkt die
   Schrift damit unscharf */
html[data-theme="dark"] .btn-light:not(.eaero-light *), html[data-theme="dark"] .btn.btn-app.btn-light:not(.eaero-light *),
html[data-theme="dark"] .btn-yellow:not(.eaero-light *), html[data-theme="dark"] .btn.btn-app.btn-yellow:not(.eaero-light *) { text-shadow: none !important; }

/* ------------------------------------------------------------------ Abzeichen, Labels, Meldungen */
html[data-theme="dark"] .badge-grey:not(.eaero-light *), html[data-theme="dark"] .label-grey:not(.eaero-light *) { background-color: #59636f; }
html[data-theme="dark"] .label-light:not(.eaero-light *), html[data-theme="dark"] .badge-light:not(.eaero-light *) { background-color: #4a535e; color: var(--dm-text); }
html[data-theme="dark"] .alert:not(.eaero-light *) { box-shadow: none; }
html[data-theme="dark"] .alert-info:not(.eaero-light *) { background-color: var(--dm-info-bg); border-color: var(--dm-info-line); color: var(--dm-info-text); }
html[data-theme="dark"] .alert-success:not(.eaero-light *) { background-color: var(--dm-ok-bg); border-color: var(--dm-ok-line); color: var(--dm-ok-text); }
html[data-theme="dark"] .alert-warning:not(.eaero-light *) { background-color: var(--dm-warn-bg); border-color: var(--dm-warn-line); color: var(--dm-warn-text); }
html[data-theme="dark"] .alert-danger:not(.eaero-light *), html[data-theme="dark"] .alert-error:not(.eaero-light *) { background-color: var(--dm-err-bg); border-color: var(--dm-err-line); color: var(--dm-err-text); }
html[data-theme="dark"] .alert .close:not(.eaero-light *) { color: var(--dm-text); text-shadow: none; opacity: .6; }
html[data-theme="dark"] .alert strong:not(.eaero-light *), html[data-theme="dark"] .alert a:not(.eaero-light *) { color: inherit; }
html[data-theme="dark"] .text-success:not(.eaero-light *) { color: #7dcf8e; }
html[data-theme="dark"] .text-warning:not(.eaero-light *) { color: #f0c46a; }
html[data-theme="dark"] .text-danger:not(.eaero-light *) { color: #f08a84; }
html[data-theme="dark"] .text-info:not(.eaero-light *) { color: var(--dm-accent-strong); }
html[data-theme="dark"] .text-primary:not(.eaero-light *) { color: var(--dm-accent); }

/* ------------------------------------------------------------------ Menüs, Tooltips, Dialoge */
html[data-theme="dark"] .dropdown-menu:not(.eaero-light *) {
    background-color: var(--dm-surface); border-color: var(--dm-line); box-shadow: 0 6px 18px var(--dm-shadow);
}
html[data-theme="dark"] .dropdown-menu > li > a:not(.eaero-light *) { color: var(--dm-text); }
html[data-theme="dark"] .dropdown-menu > li > a:hover:not(.eaero-light *), html[data-theme="dark"] .dropdown-menu > li > a:focus:not(.eaero-light *),
html[data-theme="dark"] .dropdown-menu > .active > a:not(.eaero-light *) { background-color: #2c6a96; color: #fff; }
html[data-theme="dark"] .dropdown-menu .divider:not(.eaero-light *) { background-color: var(--dm-line); border-color: var(--dm-line); }
html[data-theme="dark"] .dropdown-menu > li.dropdown-header:not(.eaero-light *), html[data-theme="dark"] .dropdown-header:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .dropdown-caret:not(.eaero-light *):before { border-bottom-color: var(--dm-line); }
html[data-theme="dark"] .dropdown-caret:not(.eaero-light *):after { border-bottom-color: var(--dm-surface); }
/* Farbige Ace-Dropdowns (Benutzer-Menü gelb, Navbar-Listen) */
html[data-theme="dark"] .dropdown-yellow > li > a:hover:not(.eaero-light *), html[data-theme="dark"] .dropdown-yellow > li > a:focus:not(.eaero-light *),
html[data-theme="dark"] .dropdown-yellow2 > li > a:hover:not(.eaero-light *), html[data-theme="dark"] .dropdown-light > li > a:hover:not(.eaero-light *),
html[data-theme="dark"] .dropdown-lighter > li > a:hover:not(.eaero-light *), html[data-theme="dark"] .dropdown-lightest > li > a:hover:not(.eaero-light *),
html[data-theme="dark"] .dropdown-light-blue > li > a:hover:not(.eaero-light *) { background-color: #2c6a96; color: #fff; }
html[data-theme="dark"] .dropdown-navbar:not(.eaero-light *) { background-color: var(--dm-surface); }
html[data-theme="dark"] .dropdown-navbar > li:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .dropdown-navbar > li > a:not(.eaero-light *) { color: var(--dm-text); background-color: transparent; }
html[data-theme="dark"] .dropdown-navbar > li > a:hover:not(.eaero-light *) { background-color: var(--dm-surface-2) !important; color: var(--dm-text-strong); }
html[data-theme="dark"] .dropdown-navbar > li.dropdown-header:not(.eaero-light *) { background-color: #262c33 !important; color: var(--dm-heading) !important; border-color: var(--dm-line); }
html[data-theme="dark"] .dropdown-navbar > li.dropdown-content .dropdown-menu:not(.eaero-light *) { background-color: var(--dm-surface); }
html[data-theme="dark"] .navbar-pink > li > a:hover:not(.eaero-light *), html[data-theme="dark"] .navbar-green > li > a:hover:not(.eaero-light *) { background-color: var(--dm-surface-2) !important; }
/* Verlauf, Lesezeichen und Benachrichtigungen in der Kopfleiste (dropdown-navbar, auch navbar-pink/-grey) */
html[data-theme="dark"] .dropdown-navbar:not(.eaero-light *), html[data-theme="dark"] .dropdown-navbar.navbar-pink:not(.eaero-light *),
html[data-theme="dark"] .dropdown-navbar.navbar-grey:not(.eaero-light *) { border-color: var(--dm-line); box-shadow: 0 6px 18px var(--dm-shadow); }
html[data-theme="dark"] .dropdown-navbar > li:not(.eaero-light *) { background-color: var(--dm-surface); }
html[data-theme="dark"] .dropdown-navbar > li:hover:not(.eaero-light *), html[data-theme="dark"] .dropdown-navbar.navbar-pink > li:hover:not(.eaero-light *),
html[data-theme="dark"] .dropdown-navbar.navbar-grey > li:hover:not(.eaero-light *) { background-color: var(--dm-surface-2) !important; }
html[data-theme="dark"] .dropdown-navbar > li > a:not(.eaero-light *), html[data-theme="dark"] .dropdown-navbar.navbar-pink > li > a:not(.eaero-light *),
html[data-theme="dark"] .dropdown-navbar.navbar-grey > li > a:not(.eaero-light *) { color: var(--dm-text); border-bottom-color: var(--dm-line); }
html[data-theme="dark"] .dropdown-navbar > li > a:hover:not(.eaero-light *), html[data-theme="dark"] .dropdown-navbar > li > a:focus:not(.eaero-light *) { color: var(--dm-text-strong); background-color: transparent !important; }
html[data-theme="dark"] .dropdown-navbar > li > [class*="icon-"]:not(.eaero-light *), html[data-theme="dark"] .dropdown-navbar > li > a > [class*="icon-"]:not(.eaero-light *),
html[data-theme="dark"] .dropdown-navbar .msg-time:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .dropdown-navbar > li:last-child > a:not(.eaero-light *), html[data-theme="dark"] .dropdown-navbar > li:last-child > a:hover:not(.eaero-light *) { background-color: transparent; color: var(--dm-accent); }
html[data-theme="dark"] .dropdown-navbar > li.dropdown-header:not(.eaero-light *), html[data-theme="dark"] .dropdown-navbar.navbar-pink > li.dropdown-header:not(.eaero-light *),
html[data-theme="dark"] .dropdown-navbar.navbar-grey > li.dropdown-header:not(.eaero-light *) { background-color: #262c33 !important; color: var(--dm-heading) !important; border-bottom-color: var(--dm-line); }
html[data-theme="dark"] .dropdown-navbar > li.dropdown-header > [class*="icon-"]:not(.eaero-light *) { color: var(--dm-heading); }

html[data-theme="dark"] .tooltip-inner:not(.eaero-light *) { background-color: #0f1214; color: var(--dm-text-strong); }
html[data-theme="dark"] .tooltip.top .tooltip-arrow:not(.eaero-light *) { border-top-color: #0f1214; }
html[data-theme="dark"] .tooltip.bottom .tooltip-arrow:not(.eaero-light *) { border-bottom-color: #0f1214; }
html[data-theme="dark"] .tooltip.left .tooltip-arrow:not(.eaero-light *) { border-left-color: #0f1214; }
html[data-theme="dark"] .tooltip.right .tooltip-arrow:not(.eaero-light *) { border-right-color: #0f1214; }
html[data-theme="dark"] .popover:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-text); box-shadow: 0 6px 18px var(--dm-shadow); }
html[data-theme="dark"] .popover-title:not(.eaero-light *) { background-color: #262c33; border-bottom-color: var(--dm-line); color: var(--dm-heading); }
html[data-theme="dark"] .popover.top .arrow:not(.eaero-light *):after { border-top-color: var(--dm-surface); }
html[data-theme="dark"] .popover.bottom .arrow:not(.eaero-light *):after { border-bottom-color: #262c33; }
html[data-theme="dark"] .popover.left .arrow:not(.eaero-light *):after { border-left-color: var(--dm-surface); }
html[data-theme="dark"] .popover.right .arrow:not(.eaero-light *):after { border-right-color: var(--dm-surface); }

html[data-theme="dark"] .modal-content:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-text); box-shadow: 0 10px 30px var(--dm-shadow); }
html[data-theme="dark"] .modal-header:not(.eaero-light *) { border-bottom-color: var(--dm-line); }
html[data-theme="dark"] .modal-footer:not(.eaero-light *) { background-color: #262c33; border-top-color: var(--dm-line); }
html[data-theme="dark"] .modal-backdrop.in:not(.eaero-light *) { opacity: .7; }
html[data-theme="dark"] .close:not(.eaero-light *) { color: var(--dm-text); text-shadow: none; }
html[data-theme="dark"] .bootbox .modal-body:not(.eaero-light *) { color: var(--dm-text); }

/* jQuery UI (Dialoge, Datepicker, Autocomplete, Menüs, Tabs, Slider) */
html[data-theme="dark"] .ui-widget-content:not(.eaero-light *) { background: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-text); }
html[data-theme="dark"] .ui-widget-content a:not(.eaero-light *) { color: var(--dm-accent); }
html[data-theme="dark"] .ui-widget-header:not(.eaero-light *) { background: #262c33; border-color: var(--dm-line); color: var(--dm-heading); }
html[data-theme="dark"] .ui-dialog:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); box-shadow: 0 10px 30px var(--dm-shadow); }
html[data-theme="dark"] .ui-dialog .ui-dialog-titlebar:not(.eaero-light *) { background-color: #262c33; border-bottom-color: var(--dm-line); color: var(--dm-heading); }
html[data-theme="dark"] .ui-dialog .ui-dialog-content:not(.eaero-light *) { background-color: var(--dm-surface); color: var(--dm-text); }
html[data-theme="dark"] .ui-dialog .ui-dialog-buttonpane:not(.eaero-light *) { background-color: #262c33; border-top-color: var(--dm-line); }
html[data-theme="dark"] .ui-dialog-titlebar-close:not(.eaero-light *) { color: var(--dm-text); }
html[data-theme="dark"] .ui-widget-overlay:not(.eaero-light *) { background: rgba(0, 0, 0, .6); }
html[data-theme="dark"] .ui-state-default:not(.eaero-light *), html[data-theme="dark"] .ui-widget-content .ui-state-default:not(.eaero-light *),
html[data-theme="dark"] .ui-widget-header .ui-state-default:not(.eaero-light *) { background: #2b323b; border-color: var(--dm-line-2); color: var(--dm-text); }
html[data-theme="dark"] .ui-state-hover:not(.eaero-light *), html[data-theme="dark"] .ui-widget-content .ui-state-hover:not(.eaero-light *),
html[data-theme="dark"] .ui-state-focus:not(.eaero-light *), html[data-theme="dark"] .ui-widget-content .ui-state-focus:not(.eaero-light *) { background: #2c6a96; border-color: #2c6a96; color: #fff; }
html[data-theme="dark"] .ui-state-active:not(.eaero-light *), html[data-theme="dark"] .ui-widget-content .ui-state-active:not(.eaero-light *) { background: var(--dm-active); border-color: var(--dm-accent); color: #fff; }
html[data-theme="dark"] .ui-state-highlight:not(.eaero-light *), html[data-theme="dark"] .ui-widget-content .ui-state-highlight:not(.eaero-light *) { background: #3d3216; border-color: #6a5622; color: #f0d48a; }
html[data-theme="dark"] .ui-state-error:not(.eaero-light *) { background: var(--dm-err-bg); border-color: var(--dm-err-line); color: var(--dm-err-text); }
html[data-theme="dark"] .ui-menu:not(.eaero-light *), html[data-theme="dark"] .ui-autocomplete:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); box-shadow: 0 6px 18px var(--dm-shadow); }
html[data-theme="dark"] .ui-menu .ui-menu-item a:not(.eaero-light *) { color: var(--dm-text); }
html[data-theme="dark"] .ui-menu .ui-menu-item a.ui-state-focus:not(.eaero-light *), html[data-theme="dark"] .ui-menu .ui-menu-item a.ui-state-active:not(.eaero-light *) { background-color: #2c6a96; color: #fff; }
html[data-theme="dark"] .ui-autocomplete-category:not(.eaero-light *) { background-color: #262c33; color: var(--dm-heading); }
html[data-theme="dark"] .ui-datepicker:not(.eaero-light *), html[data-theme="dark"] .ui-datepicker .ui-datepicker-header:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); }
html[data-theme="dark"] .ui-datepicker td > a:not(.eaero-light *), html[data-theme="dark"] .ui-datepicker td > span:not(.eaero-light *) { background-color: transparent; color: var(--dm-text); }
html[data-theme="dark"] .ui-datepicker td > a:hover:not(.eaero-light *) { background-color: var(--dm-surface-2); }
html[data-theme="dark"] .ui-datepicker td .ui-state-active:not(.eaero-light *) { background-color: #2c6a96; color: #fff; }
html[data-theme="dark"] .ui-datepicker td.ui-datepicker-today > a:not(.eaero-light *) { background-color: #3a424b; color: #fff; }
html[data-theme="dark"] .ui-tabs .ui-tabs-nav li a:not(.eaero-light *) { background-color: #2b323b; color: var(--dm-muted); }
html[data-theme="dark"] .ui-tabs .ui-tabs-nav li.ui-state-active a:not(.eaero-light *) { background-color: var(--dm-surface); color: var(--dm-text-strong); }
html[data-theme="dark"] .ui-slider:not(.eaero-light *) { background-color: #3a424b; }
html[data-theme="dark"] .ui-accordion .ui-accordion-header:not(.eaero-light *) { background-color: #262c33; color: var(--dm-accent); border-color: var(--dm-line); }
html[data-theme="dark"] .ui-accordion .ui-accordion-content:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); }

/* ------------------------------------------------------------------ Bibliotheken: Auswahlfelder */
/* Chosen */
html[data-theme="dark"] .chosen-container-single .chosen-single:not(.eaero-light *),
html[data-theme="dark"] .chosen-container-multi .chosen-choices:not(.eaero-light *) {
    background: var(--dm-input); background-image: none; border-color: var(--dm-line-2); color: var(--dm-text); box-shadow: none;
}
html[data-theme="dark"] .chosen-container-single .chosen-single span:not(.eaero-light *) { color: var(--dm-text); }
html[data-theme="dark"] .chosen-container-single .chosen-default span:not(.eaero-light *), html[data-theme="dark"] .chosen-container-multi .chosen-choices li.search-field input[type="text"]:not(.eaero-light *) { color: #7d8791; }
html[data-theme="dark"] .chosen-container-single .chosen-single div:not(.eaero-light *) { background: transparent; border-left-color: var(--dm-line-2); }
html[data-theme="dark"] .chosen-container .chosen-drop:not(.eaero-light *), html[data-theme="dark"] .chosen-container-single .chosen-search input[type="text"]:not(.eaero-light *) {
    background: var(--dm-surface); border-color: var(--dm-line-2); color: var(--dm-text);
}
html[data-theme="dark"] .chosen-container .chosen-results li:not(.eaero-light *) { color: var(--dm-text); }
html[data-theme="dark"] .chosen-container .chosen-results li.highlighted:not(.eaero-light *) { background: #2c6a96; color: #fff; }
html[data-theme="dark"] .chosen-container .chosen-results li.no-results:not(.eaero-light *) { background: #262c33; color: var(--dm-muted); }
html[data-theme="dark"] .chosen-container-multi .chosen-choices li.search-choice:not(.eaero-light *) { background: #2b323b; border-color: var(--dm-line-2); color: var(--dm-text); box-shadow: none; }
html[data-theme="dark"] .chosen-container-active .chosen-single:not(.eaero-light *), html[data-theme="dark"] .chosen-container-active .chosen-choices:not(.eaero-light *) { border-color: var(--dm-focus); }
/* Select2 */
html[data-theme="dark"] .select2-container--default .select2-selection--single:not(.eaero-light *),
html[data-theme="dark"] .select2-container--default .select2-selection--multiple:not(.eaero-light *),
html[data-theme="dark"] .select2-container .select2-choice:not(.eaero-light *),
html[data-theme="dark"] .select2-container-multi .select2-choices:not(.eaero-light *) {
    background: var(--dm-input); background-image: none; border-color: var(--dm-line-2); color: var(--dm-text);
}
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered:not(.eaero-light *) { color: var(--dm-text); }
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder:not(.eaero-light *) { color: #7d8791; }
html[data-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice:not(.eaero-light *) { background-color: #2b323b; border-color: var(--dm-line-2); color: var(--dm-text); }
html[data-theme="dark"] .select2-container--default.select2-container--focus .select2-selection--multiple:not(.eaero-light *),
html[data-theme="dark"] .select2-container--default.select2-container--open .select2-selection--single:not(.eaero-light *) { border-color: var(--dm-focus); }
html[data-theme="dark"] .select2-dropdown:not(.eaero-light *), html[data-theme="dark"] .select2-drop:not(.eaero-light *) {
    background-color: var(--dm-surface); border-color: var(--dm-line-2); color: var(--dm-text);
}
html[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field:not(.eaero-light *),
html[data-theme="dark"] .select2-search input:not(.eaero-light *), html[data-theme="dark"] .select2-container--default .select2-search--inline .select2-search__field:not(.eaero-light *) {
    background-color: var(--dm-input); border-color: var(--dm-line-2); color: var(--dm-text);
}
html[data-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true]:not(.eaero-light *),
html[data-theme="dark"] .select2-container--default .select2-results__option--selected:not(.eaero-light *) { background-color: var(--dm-surface-3); }
html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected]:not(.eaero-light *),
html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted:not(.eaero-light *),
html[data-theme="dark"] .select2-results .select2-highlighted:not(.eaero-light *) { background-color: #2c6a96; color: #fff; }
html[data-theme="dark"] .select2-container--default .select2-results__group:not(.eaero-light *) { color: var(--dm-heading); }
/* bootstrap-select */
html[data-theme="dark"] .bootstrap-select .btn:not(.eaero-light *), html[data-theme="dark"] .bootstrap-select > .dropdown-toggle:not(.eaero-light *) {
    background-color: var(--dm-input) !important; border-color: var(--dm-line-2); color: var(--dm-text) !important;
}
html[data-theme="dark"] .bootstrap-select .dropdown-menu li.selected a:not(.eaero-light *) { background-color: var(--dm-surface-3); }
html[data-theme="dark"] .bootstrap-select .bs-searchbox input:not(.eaero-light *) { background-color: var(--dm-input); color: var(--dm-text); }

/* ------------------------------------------------------------------ Bibliotheken: Datum, Zeit, Farbe */
html[data-theme="dark"] .datepicker:not(.eaero-light *), html[data-theme="dark"] .datepicker.dropdown-menu:not(.eaero-light *),
html[data-theme="dark"] .daterangepicker:not(.eaero-light *), html[data-theme="dark"] .daterangepicker .calendar-table:not(.eaero-light *),
html[data-theme="dark"] .bootstrap-timepicker-widget:not(.eaero-light *), html[data-theme="dark"] .colorpicker:not(.eaero-light *) {
    background-color: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-text);
}
html[data-theme="dark"] .datepicker td:not(.eaero-light *), html[data-theme="dark"] .datepicker th:not(.eaero-light *),
html[data-theme="dark"] .daterangepicker td:not(.eaero-light *), html[data-theme="dark"] .daterangepicker th:not(.eaero-light *) { color: var(--dm-text); background-color: transparent; }
html[data-theme="dark"] .datepicker td.day:hover:not(.eaero-light *), html[data-theme="dark"] .datepicker th:hover:not(.eaero-light *),
html[data-theme="dark"] .datepicker td span:hover:not(.eaero-light *), html[data-theme="dark"] .daterangepicker td.available:hover:not(.eaero-light *),
html[data-theme="dark"] .daterangepicker th.available:hover:not(.eaero-light *) { background-color: var(--dm-surface-2); }
html[data-theme="dark"] .datepicker td.old:not(.eaero-light *), html[data-theme="dark"] .datepicker td.new:not(.eaero-light *),
html[data-theme="dark"] .daterangepicker td.off:not(.eaero-light *) { color: #6b747d; background-color: transparent; }
html[data-theme="dark"] .datepicker td.today:not(.eaero-light *), html[data-theme="dark"] .datepicker td.today:hover:not(.eaero-light *) { background: #4a3f1c; color: #f0d48a; }
html[data-theme="dark"] .datepicker td.active:not(.eaero-light *), html[data-theme="dark"] .datepicker td.active:hover:not(.eaero-light *),
html[data-theme="dark"] .datepicker td span.active:not(.eaero-light *), html[data-theme="dark"] .daterangepicker td.active:not(.eaero-light *),
html[data-theme="dark"] .daterangepicker td.active:hover:not(.eaero-light *) { background: #2c6a96 !important; color: #fff; }
html[data-theme="dark"] .daterangepicker td.in-range:not(.eaero-light *) { background-color: var(--dm-active); color: var(--dm-text); }
html[data-theme="dark"] .datepicker-dropdown:not(.eaero-light *):after, html[data-theme="dark"] .daterangepicker:not(.eaero-light *):after { border-bottom-color: var(--dm-surface); }
html[data-theme="dark"] .datepicker-dropdown:not(.eaero-light *):before, html[data-theme="dark"] .daterangepicker:not(.eaero-light *):before { border-bottom-color: var(--dm-line); }
html[data-theme="dark"] .daterangepicker .ranges li:not(.eaero-light *) { background-color: #2b323b; border-color: var(--dm-line); color: var(--dm-accent); }
html[data-theme="dark"] .daterangepicker .ranges li:hover:not(.eaero-light *), html[data-theme="dark"] .daterangepicker .ranges li.active:not(.eaero-light *) { background-color: #2c6a96; color: #fff; }
html[data-theme="dark"] .daterangepicker .drp-buttons:not(.eaero-light *), html[data-theme="dark"] .daterangepicker .ranges:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .daterangepicker select:not(.eaero-light *), html[data-theme="dark"] .daterangepicker input:not(.eaero-light *) { background-color: var(--dm-input); color: var(--dm-text); border-color: var(--dm-line-2); }
html[data-theme="dark"] .bootstrap-timepicker-widget table td input:not(.eaero-light *) { background-color: var(--dm-input); border-color: var(--dm-line-2); color: var(--dm-text); }
html[data-theme="dark"] .bootstrap-timepicker-widget table td a:not(.eaero-light *) { color: var(--dm-text); }
html[data-theme="dark"] .bootstrap-timepicker-widget table td a:hover:not(.eaero-light *) { background-color: var(--dm-surface-2); }
html[data-theme="dark"] .bootstrap-timepicker-widget.dropdown-menu:not(.eaero-light *):after { border-bottom-color: var(--dm-surface); }
html[data-theme="dark"] .ui-multiselect:not(.eaero-light *), html[data-theme="dark"] .ms-container .ms-list:not(.eaero-light *) { background-color: var(--dm-input); border-color: var(--dm-line-2); }

/* ------------------------------------------------------------------ Bibliotheken: Kalender (Fullcalendar, Scheduler) */
html[data-theme="dark"] .fc-unthemed th:not(.eaero-light *), html[data-theme="dark"] .fc-unthemed td:not(.eaero-light *), html[data-theme="dark"] .fc-unthemed thead:not(.eaero-light *),
html[data-theme="dark"] .fc-unthemed tbody:not(.eaero-light *), html[data-theme="dark"] .fc-unthemed .fc-divider:not(.eaero-light *), html[data-theme="dark"] .fc-unthemed .fc-row:not(.eaero-light *),
html[data-theme="dark"] .fc-unthemed .fc-content:not(.eaero-light *), html[data-theme="dark"] .fc-unthemed .fc-popover:not(.eaero-light *),
html[data-theme="dark"] .fc-unthemed .fc-list-view:not(.eaero-light *), html[data-theme="dark"] .fc-unthemed .fc-list-heading td:not(.eaero-light *) { border-color: var(--dm-line); }
html[data-theme="dark"] .fc-unthemed .fc-popover:not(.eaero-light *), html[data-theme="dark"] .fc-unthemed .fc-list-empty:not(.eaero-light *) { background-color: var(--dm-surface); }
html[data-theme="dark"] .fc-unthemed .fc-divider:not(.eaero-light *), html[data-theme="dark"] .fc-unthemed .fc-popover .fc-header:not(.eaero-light *),
html[data-theme="dark"] .fc-unthemed .fc-list-heading td:not(.eaero-light *) { background: #262c33; }
html[data-theme="dark"] .fc-unthemed td.fc-today:not(.eaero-light *), html[data-theme="dark"] .fc-unthemed .fc-today:not(.eaero-light *) { background: #2e2a1a; }
html[data-theme="dark"] .fc-widget-header:not(.eaero-light *), html[data-theme="dark"] .fc-head .fc-widget-header:not(.eaero-light *),
html[data-theme="dark"] .fc th:not(.eaero-light *) { background: #262c33; color: #b3bcc5; border-color: var(--dm-line); }
html[data-theme="dark"] .fc-day-number:not(.eaero-light *), html[data-theme="dark"] .fc-day-header:not(.eaero-light *), html[data-theme="dark"] .fc-axis:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .fc-toolbar h2:not(.eaero-light *) { color: var(--dm-heading); }
html[data-theme="dark"] .fc-state-default:not(.eaero-light *), html[data-theme="dark"] .fc-button:not(.eaero-light *) {
    background: #2b323b; background-image: none; border-color: var(--dm-line-2); color: var(--dm-text); text-shadow: none; box-shadow: none;
}
html[data-theme="dark"] .fc-state-hover:not(.eaero-light *), html[data-theme="dark"] .fc-button:hover:not(.eaero-light *) { background: #343c46; color: var(--dm-text-strong); }
html[data-theme="dark"] .fc-state-active:not(.eaero-light *), html[data-theme="dark"] .fc-state-down:not(.eaero-light *), html[data-theme="dark"] .fc-button.fc-state-active:not(.eaero-light *) { background: #2c6a96; color: #fff; }
html[data-theme="dark"] .fc-state-disabled:not(.eaero-light *) { opacity: .45; }
html[data-theme="dark"] .fc-unthemed .fc-list-item:hover td:not(.eaero-light *) { background-color: var(--dm-hover-row); }
html[data-theme="dark"] .fc-nonbusiness:not(.eaero-light *) { background: #101315; opacity: .45; }
html[data-theme="dark"] .fc-bgevent:not(.eaero-light *) { opacity: .35; }
html[data-theme="dark"] a.fc-event:not(.eaero-light *), html[data-theme="dark"] a.fc-event:hover:not(.eaero-light *), html[data-theme="dark"] .fc-event:not(.eaero-light *) { color: #fff; }
html[data-theme="dark"] .fc-highlight:not(.eaero-light *) { background: #2c6a96; opacity: .35; }
html[data-theme="dark"] .fc-time-grid .fc-slats td:not(.eaero-light *), html[data-theme="dark"] .fc-timeline .fc-cell-text:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .fc-timeline .fc-divider:not(.eaero-light *), html[data-theme="dark"] .fc-resource-area .fc-cell-content:not(.eaero-light *) { background-color: transparent; }
html[data-theme="dark"] .fc-event .fc-content:not(.eaero-light *), html[data-theme="dark"] .fc-event:not(.eaero-light *) { border-color: rgba(0, 0, 0, .3); }

/* ------------------------------------------------------------------ Bibliotheken: Bäume, Assistent, QueryBuilder */
html[data-theme="dark"] .dd-handle:not(.eaero-light *), html[data-theme="dark"] .dd2-content:not(.eaero-light *), html[data-theme="dark"] .dd-content:not(.eaero-light *) {
    background: var(--dm-surface); background-image: none; border-color: var(--dm-line); color: var(--dm-text);
}
html[data-theme="dark"] .dd-handle:hover:not(.eaero-light *), html[data-theme="dark"] .dd2-content:hover:not(.eaero-light *) { background: var(--dm-surface-2); color: var(--dm-text-strong); }
html[data-theme="dark"] .dd2-handle:not(.eaero-light *) { background: #2b323b; border-color: var(--dm-line); color: var(--dm-muted); }
html[data-theme="dark"] .dd2-handle:hover:not(.eaero-light *) { background: #343c46; color: var(--dm-accent); }
html[data-theme="dark"] .dd-placeholder:not(.eaero-light *), html[data-theme="dark"] .dd-empty:not(.eaero-light *) { background: #20262c; border-color: var(--dm-line-2); }
html[data-theme="dark"] .dd-dragel > .dd-item > .dd-handle:not(.eaero-light *), html[data-theme="dark"] .dd-dragel > li > .dd2-content:not(.eaero-light *) { box-shadow: 0 4px 12px var(--dm-shadow); }
html[data-theme="dark"] .dd-item > button:not(.eaero-light *) { color: var(--dm-muted); }
/* Baum der Shop-Seiten (Tree/tree.html.twig) */
html[data-theme="dark"] .dd3-content:not(.eaero-light *) { background: var(--dm-surface); border-color: var(--dm-line); color: var(--dm-accent); }
html[data-theme="dark"] #new_container .dd3-content:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .dd3-handle:not(.eaero-light *) { background: #2b323b; border-color: var(--dm-line); }
html[data-theme="dark"] .dd2-handle.disabled:hover:not(.eaero-light *) { background-color: #2b323b; }
html[data-theme="dark"] .dd-handle.dd2-handle.new .icon-plus:not(.eaero-light *), html[data-theme="dark"] .dd2-handle:not(.eaero-light *):before { color: var(--dm-accent); }
html[data-theme="dark"] .tree:not(.eaero-light *), html[data-theme="dark"] .tree .tree-item:not(.eaero-light *), html[data-theme="dark"] .tree .tree-folder .tree-folder-header:not(.eaero-light *) { color: var(--dm-text); }
html[data-theme="dark"] .tree .tree-item:hover:not(.eaero-light *), html[data-theme="dark"] .tree .tree-folder .tree-folder-header:hover:not(.eaero-light *) { background-color: var(--dm-surface-2); }
html[data-theme="dark"] .tree .tree-selected:not(.eaero-light *) { background-color: var(--dm-active); color: var(--dm-text-strong); }

html[data-theme="dark"] .wizard-steps li:not(.eaero-light *):before { background-color: #3a424b; border-color: #3a424b; }
html[data-theme="dark"] .wizard-steps li .step:not(.eaero-light *) { background-color: var(--dm-surface); border-color: #4a535e; color: var(--dm-muted); }
html[data-theme="dark"] .wizard-steps li.active .step:not(.eaero-light *), html[data-theme="dark"] .wizard-steps li.active:not(.eaero-light *):before { border-color: #5293c4; }
html[data-theme="dark"] .wizard-steps li.complete .step:not(.eaero-light *), html[data-theme="dark"] .wizard-steps li.complete:not(.eaero-light *):before { border-color: #87ba21; }
html[data-theme="dark"] .wizard-steps li .title:not(.eaero-light *) { color: var(--dm-muted); }
html[data-theme="dark"] .wizard-steps li.active .title:not(.eaero-light *) { color: var(--dm-text-strong); }
html[data-theme="dark"] .step-content:not(.eaero-light *) { color: var(--dm-text); }

html[data-theme="dark"] .query-builder .rules-group-container:not(.eaero-light *) { background: rgba(111, 179, 224, .06); border-color: var(--dm-line-2); }
html[data-theme="dark"] .query-builder .rule-container:not(.eaero-light *), html[data-theme="dark"] .query-builder .rule-placeholder:not(.eaero-light *) {
    background: var(--dm-surface); border-color: var(--dm-line-2);
}
html[data-theme="dark"] .query-builder .rule-container.has-error:not(.eaero-light *), html[data-theme="dark"] .query-builder .rules-group-container.has-error:not(.eaero-light *) {
    background-color: var(--dm-err-bg); border-color: var(--dm-err-line);
}
html[data-theme="dark"] .query-builder .rules-list > :not(.eaero-light *)::before, html[data-theme="dark"] .query-builder .rules-list > :not(.eaero-light *)::after { border-color: #5a646f; }
html[data-theme="dark"] .query-builder .error-container:not(.eaero-light *) { color: var(--dm-err-text); }

/* Code-Snippets (Google Prettify, pre.prettyprint linenums): Zeilennummern-Spalte und Farben dunkel,
   heller Schriftschatten der Zeilen entfernt (machte die Schrift unscharf) */
html[data-theme="dark"] .prettyprint:not(.eaero-light *) { background-color: #161a1e; border-color: var(--dm-line); }
html[data-theme="dark"] .prettyprint.linenums:not(.eaero-light *) { box-shadow: inset 40px 0 0 #20252a, inset 41px 0 0 var(--dm-line); }
html[data-theme="dark"] ol.linenums li:not(.eaero-light *) { color: #6b747d; text-shadow: none; }
html[data-theme="dark"] .prettyprint .pln:not(.eaero-light *) { color: #d6dbe0; }
html[data-theme="dark"] .prettyprint .tag:not(.eaero-light *), html[data-theme="dark"] .prettyprint .kwd:not(.eaero-light *) { color: #7fbde6; }
html[data-theme="dark"] .prettyprint .atn:not(.eaero-light *), html[data-theme="dark"] .prettyprint .typ:not(.eaero-light *),
html[data-theme="dark"] .prettyprint .dec:not(.eaero-light *), html[data-theme="dark"] .prettyprint .var:not(.eaero-light *) { color: #6fd0c4; }
html[data-theme="dark"] .prettyprint .str:not(.eaero-light *), html[data-theme="dark"] .prettyprint .atv:not(.eaero-light *) { color: #f0a3b6; }
html[data-theme="dark"] .prettyprint .pun:not(.eaero-light *), html[data-theme="dark"] .prettyprint .opn:not(.eaero-light *),
html[data-theme="dark"] .prettyprint .clo:not(.eaero-light *), html[data-theme="dark"] .prettyprint .com:not(.eaero-light *) { color: #9aa4ae; }
html[data-theme="dark"] .prettyprint .lit:not(.eaero-light *) { color: #8cc6ec; }
html[data-theme="dark"] .prettyprint .fun:not(.eaero-light *) { color: #f08a84; }
/* CodeMirror ist im Theme „material“ schon dunkel; nur den Rahmen angleichen */
html[data-theme="dark"] .CodeMirror:not(.eaero-light *) { border-color: var(--dm-line); }
/* TinyMCE: Rahmen außerhalb der Skin */
html[data-theme="dark"] .tox-tinymce:not(.eaero-light *) { border-color: var(--dm-line-2) !important; }

/* Ladeanzeige und Overlays */
html[data-theme="dark"] .widget-box-overlay:not(.eaero-light *), html[data-theme="dark"] .message-loading-overlay:not(.eaero-light *) { background-color: rgba(0, 0, 0, .5); }

/* ------------------------------------------------------------------ eAero-eigene Klassen */
html[data-theme="dark"] .table-hover > tbody > tr:hover > td:not(.eaero-light *) { background-color: var(--dm-hover-row); }
html[data-theme="dark"] form div.form-group.TemplateFields:not(.eaero-light *) { background-color: #20262c; border-color: var(--dm-line); }
html[data-theme="dark"] td div.progress:not(.eaero-light *) { background-color: #3a424b; }
html[data-theme="dark"] table tr.bookmark td:not(.eaero-light *),
html[data-theme="dark"] table tr.bookmark:nth-child(odd) td:not(.eaero-light *) { background-color: #1d3546; }
html[data-theme="dark"] table tr.bookmark:hover td:not(.eaero-light *),
html[data-theme="dark"] table tr.bookmark:nth-child(odd):hover td:not(.eaero-light *) { background-color: #244259; }
html[data-theme="dark"] tr.bookmark i.icon-bookmark:not(.eaero-light *) { color: var(--dm-accent); }
html[data-theme="dark"] .nav-tabs a span.bookmark:not(.eaero-light *) { color: var(--dm-accent); }
html[data-theme="dark"] .nav-tabs a span.bookmark:hover:not(.eaero-light *) { color: var(--dm-accent-strong); }
html[data-theme="dark"] div.index-header:not(.eaero-light *), html[data-theme="dark"] div.index-footer:not(.eaero-light *) { background-color: #262c33 !important; }
/* Anmeldeseite */
html[data-theme="dark"] body.login-layout:not(.eaero-light *) { background-color: #102a3d; background-image: none; }
html[data-theme="dark"] .login-layout .widget-box:not(.eaero-light *) { background-color: var(--dm-surface); border-color: var(--dm-line); }
html[data-theme="dark"] .login-layout .widget-box .widget-main:not(.eaero-light *) { background-color: var(--dm-surface); }
html[data-theme="dark"] .login-layout .login-box .toolbar:not(.eaero-light *) { background-color: #262c33; border-top-color: var(--dm-line); }
html[data-theme="dark"] .login-layout .login-container:not(.eaero-light *), html[data-theme="dark"] .login-layout .login-container a:not(.eaero-light *) { color: var(--dm-text) !important; }
html[data-theme="dark"] .login-layout h1:not(.eaero-light *), html[data-theme="dark"] .login-layout h4:not(.eaero-light *) { color: var(--dm-text-strong); }

/* ------------------------------------------------------------------ Feste Farben aus Vorlagen */
/* Lesezeichen (style="color:blue …") und graue Symbole bleiben auf Dunkel erkennbar; Favoriten-Stern (orange) bleibt */
html[data-theme="dark"] [style*="color:blue"]:not(.eaero-light *), html[data-theme="dark"] [style*="color: blue"]:not(.eaero-light *) { color: var(--dm-accent-strong) !important; }
/* Schwarz gesetzte Symbole (z. B. Favoriten im Menü: style="color: black;") hell */
html[data-theme="dark"] [style*="color: black"]:not(.eaero-light *), html[data-theme="dark"] [style*="color:black"]:not(.eaero-light *),
html[data-theme="dark"] [style*="color: #000"]:not(.eaero-light *), html[data-theme="dark"] [style*="color:#000"]:not(.eaero-light *) { color: var(--dm-text) !important; }
html[data-theme="dark"] [style*="color:gray"]:not(.eaero-light *), html[data-theme="dark"] [style*="color: gray"]:not(.eaero-light *),
html[data-theme="dark"] [style*="color:#c0c0c0"]:not(.eaero-light *) { color: #8d97a1 !important; }
html[data-theme="dark"] [style*="background-color:#fff"]:not(.eaero-light *), html[data-theme="dark"] [style*="background-color: #fff"]:not(.eaero-light *),
html[data-theme="dark"] [style*="background:#fff"]:not(.eaero-light *), html[data-theme="dark"] [style*="background: #fff"]:not(.eaero-light *),
html[data-theme="dark"] [style*="background-color:white"]:not(.eaero-light *), html[data-theme="dark"] [style*="background-color: white"]:not(.eaero-light *),
html[data-theme="dark"] [style*="background:white"]:not(.eaero-light *), html[data-theme="dark"] [style*="background: white"]:not(.eaero-light *) { background-color: var(--dm-surface) !important; }

/* ------------------------------------------------------------------ Umschalter in der Kopfleiste */
/* Auf der blauen Kopfleiste in beiden Schemata gleich: halbtransparente Rinne, aktiver Knopf hell hinterlegt */
.ace-nav > li.theme-switch-nav { display: flex; align-items: center; height: 45px; padding: 0 10px; border-left: 1px solid rgba(0, 0, 0, .2); }
.theme-switch-nav .theme-switch { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: rgba(0, 0, 0, .18); line-height: 1; }
.theme-switch-nav .theme-switch button {
    display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; padding: 0;
    border: 0; border-radius: 4px; background: none; color: rgba(255, 255, 255, .75); cursor: pointer;
}
.theme-switch-nav .theme-switch button:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.theme-switch-nav .theme-switch button[aria-checked="true"] { background: rgba(255, 255, 255, .22); color: #fff; }
.theme-switch-nav .theme-switch button:focus-visible { outline: 2px solid #f59942; outline-offset: 1px; }
.theme-switch-nav .theme-switch svg { width: 15px; height: 15px; }
/* Tooltip der Farbschema-Knöpfe (eigenes Element, siehe base.html.twig) */
.theme-switch-tip {
    position: fixed; z-index: 2000; padding: 5px 9px; border-radius: 4px;
    background: #0f1214; color: #eef1f4; font-size: 12px; line-height: 1.4; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .35); pointer-events: none;
}
.theme-switch-tip::before {
    content: ""; position: absolute; top: -5px; left: 50%; margin-left: -5px;
    border: 5px solid transparent; border-top: 0; border-bottom-color: #0f1214;
}
