/* ================================================================
   BRÜCKE agroserv → gemeinsame Gestaltung (zu gemeinsam.css Version 1.1.0) · 05.11.2026
   Keine eigenen Werte: jede Zeile zeigt auf eine Variable aus gemeinsam.css. Einbinden NACH gemeinsam.css (LIESMICH.md).
   Wirkt erst mit dem Schalter am <html>-Element – so lässt sich die Umstellung (Konzept §5, Etappe U1) ein- und ausschalten:
     <html class="g-bruecke">             Teil A: alte Variablen (--ag, --agl, --red, --fc…, --ef-…, Handy --bg, --text …) → --g-*
     <html class="g-bruecke g-inline">    zusätzlich Teil B: die häufigsten Inline-Farben (style="…") und die Systemschrift
   Spezifität: :root.g-bruecke schlägt :root und die bestehenden Bereichs-Regeln (#p-fleet …) – die Reihenfolge der Dateien ist dafür egal.
   Teil B wurde aus der Zählung des Abzugs 04.11.2026 gebaut (werkzeug/inline_farben.py + bruecke_agroserv_bauen.py):
     Desktop 6.843 style-Attribute, 5.431 Farbstellen, 583 Farben; Handy 595 style-Attribute, 270 Farbstellen.
   ================================================================ */

/* ── Teil A · Variablen ── */
/* Desktop (admin/index.html, :root) */
:root.g-bruecke {
  --ag: var(--g-akzent);
  --ag2: var(--g-akzent-d);
  --ag-deep: var(--g-akzent-d);
  --agb: var(--g-akzent-d);
  --agl: var(--g-akzent-s);
  --agl-strong: var(--g-akzent-m);
  --agll: var(--g-flaeche-2);
  --red: var(--g-alert);
  --red-bg: var(--g-alert-s);
  --red-strong: var(--g-alert-r);
  --amber: var(--g-warn);
  --amber-bg: var(--g-warn-s);
  --amber-strong: var(--g-warn-r);
  --blue: var(--g-info);
  --blue-bg: var(--g-info-s);
  --blue-strong: var(--g-info-r);
  --purple: var(--g-lila);
  --purple-bg: var(--g-lila-s);
  --gray-text: var(--g-text-2);
  --gray-line: var(--g-linie);
  --gray-border: var(--g-linie-2);
  --bg-soft: var(--g-flaeche-2);
  --bg-page: var(--g-grund);
  --ag-r: var(--g-r-karte);
  --ag-r-lg: var(--g-r-fenster);
  --ag-sh: var(--g-schatten-1);
  --ag-sh-h: var(--g-schatten-2);
}
/* Handy (m/index.html, :root) – die Namen kommen im Desktop nicht vor */
:root.g-bruecke {
  --ag-dark: var(--g-akzent-d);
  --ag-light: var(--g-akzent-s);
  --ag-soft: var(--g-flaeche-2);
  --ag-tint: var(--g-akzent-hauch);
  --accent-mint: var(--g-akzent);
  --accent-amber: var(--g-warn);
  --accent-blue: var(--g-info);
  --accent-coral: var(--g-alert);
  --bg: var(--g-grund);
  --surface: var(--g-flaeche-2);
  --card: var(--g-flaeche);
  --card-hover: var(--g-flaeche-2);
  --text: var(--g-text);
  --text-muted: var(--g-text-2);
  --text-faint: var(--g-text-3);
  --text-secondary: var(--g-text-2);
  --border: var(--g-linie);
  --border-strong: var(--g-linie-2);
  --shadow-xs: var(--g-schatten-1);
  --shadow-sm: var(--g-schatten-1);
  --shadow-md: var(--g-schatten-2);
  --shadow-lg: var(--g-schatten-pop);
  --shadow-xl: var(--g-schatten-pop);
  --r-sm: var(--g-r-feld);
  --r-md: var(--g-r-karte);
  --r-lg: var(--g-r-fenster);
  --r-xl: var(--g-r-blatt);
  --r-2xl: var(--g-r-blatt);
  --r-pill: var(--g-r-voll);
}
/* Fleet Control (Desktop) */
:root.g-bruecke :is(#p-fleet, #fc-modal-ov) {
  --fcgn: var(--g-akzent);
  --fcgn-d: var(--g-akzent-d);
  --fcgn-l: var(--g-akzent-s);
  --fcamber: var(--g-warn);
  --fcamber-l: var(--g-warn-s);
  --fcpurple: var(--g-lila);
  --fcpurple-l: var(--g-lila-s);
  --fcside: var(--g-flaeche-2);
  --fcborder: var(--g-linie-2);
  --fcok: var(--g-ok-f);
  --fcwarn: var(--g-warn-f);
  --fcbad: var(--g-alert);
  --fcink: var(--g-text);
  --fcmut: var(--g-text-2);
  --fcline: var(--g-linie);
}
/* Erfassen-Seite (Desktop) */
:root.g-bruecke #p-erfassen {
  --ef-line: var(--g-linie);
  --ef-line-soft: var(--g-linie);
  --ef-bg-soft: var(--g-flaeche-2);
  --ef-bg-tint: var(--g-flaeche-2);
  --ef-text-muted: var(--g-text-3);
  --ef-text-label: var(--g-text-2);
  --c-grn: var(--g-ok);
  --c-grn-bg: var(--g-ok-s);
  --c-grn-soft: var(--g-ok-s);
  --c-blau: var(--g-info);
  --c-blau-bg: var(--g-info-s);
  --c-amber: var(--g-warn);
  --c-amber-bg: var(--g-warn-s);
  --c-rot: var(--g-alert);
  --c-rot-bg: var(--g-alert-s);
  --c-lila: var(--g-lila);
  --c-lila-bg: var(--g-lila-s);
}
/* Management (Handy) */
:root.g-bruecke :is(.page[data-page="management"], .mg-kopf, .mg-sheet, #mg-mehr-karte) {
  --mg-rot: var(--g-alert);
  --mg-rot-bg: var(--g-alert-s);
  --mg-amber: var(--g-warn);
  --mg-amber-bg: var(--g-warn-s);
  --mg-blau-bg: var(--g-info-s);
  --mg-neutral: var(--g-text-2);
  --mg-neutral-bg: var(--g-hover);
  --mg-fraunces: var(--g-schrift-titel);
  --text-faint: var(--g-text-2);
  --text-muted: var(--g-text-2);
}

/* ── Teil B · Inline-Farben und Systemschrift (nur mit <html class="g-bruecke g-inline">) ── */
:root.g-bruecke.g-inline body {
  font-family: var(--g-schrift);
}
:root.g-bruecke.g-inline :is(
  [style*="accent-color:#1e5631" i]
) {
  accent-color: var(--g-akzent) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#1e5631" i]
) {
  background-color: var(--g-akzent) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#eaf3de" i]
) {
  background-color: var(--g-akzent-s) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#c0392b" i],
  [style*="background:#a32d2d" i]
) {
  background-color: var(--g-alert) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#f4f8f5" i],
  [style*="background:#f8faf6" i],
  [style*="background:#fafcf9" i],
  [style*="background:#f8faf8" i],
  [style*="background:#fafcfa" i]
) {
  background-color: var(--g-flaeche-2) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#eef1ee" i],
  [style*="background:#f0f0f0" i],
  [style*="background:#eaf0eb" i]
) {
  background-color: var(--g-hover) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#185fa5" i]
) {
  background-color: var(--g-info) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#e6f1fb" i]
) {
  background-color: var(--g-info-s) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#ccc" i]
) {
  background-color: var(--g-linie-2) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#2e7d32" i],
  [style*="background:#3b6d11" i]
) {
  background-color: var(--g-ok) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#1a1c19" i]
) {
  background-color: var(--g-text) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#ba7517" i]
) {
  background-color: var(--g-warn) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="background:#faeeda" i]
) {
  background-color: var(--g-warn-s) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border-bottom:0.5px solid #dde8e2" i],
  [style*="border-bottom:0.5px solid #eef3ef" i],
  [style*="border-bottom:0.5px solid #eaf0eb" i],
  [style*="border-bottom:0.5px solid #f0f5f0" i],
  [style*="border-bottom:1px solid #f0eee6" i],
  [style*="border-bottom:1px solid #eaf0eb" i],
  [style*="border-bottom:0.5px solid #dde8d9" i],
  [style*="border-bottom:1px solid #dde8e2" i]
) {
  border-bottom-color: var(--g-linie) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border:0.5px solid #1e5631" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"]),
  [style*="border:2px solid #1e5631" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"])
) {
  border-color: var(--g-akzent) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border:0.5px solid #c0dd97" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"]),
  [style*="border:0.5px dashed #c0dd97" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"])
) {
  border-color: var(--g-akzent-m) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border:0.5px solid #185fa5" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"])
) {
  border-color: var(--g-info-f) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border:0.5px solid #dde8e2" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"]),
  [style*="border:0.5px solid #dde8d9" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"]),
  [style*="border:1px solid #dde8e2" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"]),
  [style*="border:0.5px solid #eaf0eb" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"]),
  [style*="border:1px solid #dde2da" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"]),
  [style*="border:.5px solid #dde8e2" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"]),
  [style*="border:1px dashed #dde8e2" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"]),
  [style*="border:1px solid #dde8d9" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"])
) {
  border-color: var(--g-linie) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border:0.5px solid #c8d8ce" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"]),
  [style*="border:1px solid #999" i]:not([style*="border-left"]):not([style*="border-right"]):not([style*="border-top"]):not([style*="border-bottom"])
) {
  border-color: var(--g-linie-2) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border-left:3px solid #185fa5" i]
) {
  border-left-color: var(--g-info-f) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border-left:0.5px solid #dde8e2" i]
) {
  border-left-color: var(--g-linie) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border-left:3px solid #ba7517" i]
) {
  border-left-color: var(--g-warn-f) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border-right:0.5px solid #dde8e2" i],
  [style*="border-right:0.5px solid #eaf0eb" i]
) {
  border-right-color: var(--g-linie) !important;
}
:root.g-bruecke.g-inline :is(
  [style*="border-top:0.5px solid #eaf0eb" i],
  [style*="border-top:0.5px solid #dde8e2" i],
  [style*="border-top:0.5px solid #eef3ef" i],
  [style*="border-top:0.5px solid #f0f5f0" i],
  [style*="border-top:1px solid #dde8e2" i],
  [style*="border-top:1px solid #eaf0eb" i],
  [style*="border-top:0.5px dashed #dde8e2" i]
) {
  border-top-color: var(--g-linie) !important;
}
:root.g-bruecke.g-inline :is(
  [style^="color:#1e5631" i],
  [style*=";color:#1e5631" i],
  [style*="; color:#1e5631" i],
  [style^="color:#27500a" i],
  [style*=";color:#27500a" i],
  [style*="; color:#27500a" i]
) {
  color: var(--g-akzent-d) !important;
}
:root.g-bruecke.g-inline :is(
  [style^="color:#a32d2d" i],
  [style*=";color:#a32d2d" i],
  [style*="; color:#a32d2d" i],
  [style^="color:#c0392b" i],
  [style*=";color:#c0392b" i],
  [style*="; color:#c0392b" i],
  [style^="color:#b71c1c" i],
  [style*=";color:#b71c1c" i],
  [style*="; color:#b71c1c" i]
) {
  color: var(--g-alert) !important;
}
:root.g-bruecke.g-inline :is(
  [style^="color:#185fa5" i],
  [style*=";color:#185fa5" i],
  [style*="; color:#185fa5" i],
  [style^="color:#0d47a1" i],
  [style*=";color:#0d47a1" i],
  [style*="; color:#0d47a1" i]
) {
  color: var(--g-info) !important;
}
:root.g-bruecke.g-inline :is(
  [style^="color:#3c3489" i],
  [style*=";color:#3c3489" i],
  [style*="; color:#3c3489" i]
) {
  color: var(--g-lila) !important;
}
:root.g-bruecke.g-inline :is(
  [style^="color:#3b6d11" i],
  [style*=";color:#3b6d11" i],
  [style*="; color:#3b6d11" i],
  [style^="color:#2e7d32" i],
  [style*=";color:#2e7d32" i],
  [style*="; color:#2e7d32" i]
) {
  color: var(--g-ok) !important;
}
:root.g-bruecke.g-inline :is(
  [style^="color:#1a1a1a" i],
  [style*=";color:#1a1a1a" i],
  [style*="; color:#1a1a1a" i],
  [style^="color:#1a1c19" i],
  [style*=";color:#1a1c19" i],
  [style*="; color:#1a1c19" i],
  [style^="color:#1a3a0a" i],
  [style*=";color:#1a3a0a" i],
  [style*="; color:#1a3a0a" i],
  [style^="color:#243328" i],
  [style*=";color:#243328" i],
  [style*="; color:#243328" i],
  [style^="color:#15301c" i],
  [style*=";color:#15301c" i],
  [style*="; color:#15301c" i]
) {
  color: var(--g-text) !important;
}
:root.g-bruecke.g-inline :is(
  [style^="color:#6b7a6a" i],
  [style*=";color:#6b7a6a" i],
  [style*="; color:#6b7a6a" i],
  [style^="color:#555" i],
  [style*=";color:#555" i],
  [style*="; color:#555" i],
  [style^="color:#666" i],
  [style*=";color:#666" i],
  [style*="; color:#666" i],
  [style^="color:#6b8f78" i],
  [style*=";color:#6b8f78" i],
  [style*="; color:#6b8f78" i],
  [style^="color:#5a6f60" i],
  [style*=";color:#5a6f60" i],
  [style*="; color:#5a6f60" i],
  [style^="color:#444" i],
  [style*=";color:#444" i],
  [style*="; color:#444" i],
  [style^="color:#6b7a6e" i],
  [style*=";color:#6b7a6e" i],
  [style*="; color:#6b7a6e" i]
) {
  color: var(--g-text-2) !important;
}
:root.g-bruecke.g-inline :is(
  [style^="color:#888" i],
  [style*=";color:#888" i],
  [style*="; color:#888" i],
  [style^="color:#aaa" i],
  [style*=";color:#aaa" i],
  [style*="; color:#aaa" i],
  [style^="color:#8a9a8e" i],
  [style*=";color:#8a9a8e" i],
  [style*="; color:#8a9a8e" i],
  [style^="color:#9aa89c" i],
  [style*=";color:#9aa89c" i],
  [style*="; color:#9aa89c" i],
  [style^="color:#ccc" i],
  [style*=";color:#ccc" i],
  [style*="; color:#ccc" i],
  [style^="color:#999" i],
  [style*=";color:#999" i],
  [style*="; color:#999" i]
) {
  color: var(--g-text-3) !important;
}
:root.g-bruecke.g-inline :is(
  [style^="color:#ba7517" i],
  [style*=";color:#ba7517" i],
  [style*="; color:#ba7517" i],
  [style^="color:#8a5a10" i],
  [style*=";color:#8a5a10" i],
  [style*="; color:#8a5a10" i],
  [style^="color:#854f0b" i],
  [style*=";color:#854f0b" i],
  [style*="; color:#854f0b" i],
  [style^="color:#633806" i],
  [style*=";color:#633806" i],
  [style*="; color:#633806" i]
) {
  color: var(--g-warn) !important;
}
/* Teil B: 33 Regeln, 152 Schreibweisen, 51 Farben, deckt 3220 Farbstellen ab */
