html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
    /* v1.6: Luft am unteren Rand, damit Inhalte (Tabellen/Cards) nie direkt an
       Viewport-/Taskbar-Kante stossen (gilt fuer alle Seiten unter MainLayout). */
    padding-bottom: 4rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC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rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Blazor circuit-error banner — global so it works under every layout (MainLayout + BareLayout). */
#blazor-error-ui {
    color-scheme: light only; background: lightyellow; bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); box-sizing: border-box; display: none; left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 300; src: url('/fonts/roboto/Roboto-Light.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; src: url('/fonts/roboto/Roboto-Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; src: url('/fonts/roboto/Roboto-Medium.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; src: url('/fonts/roboto/Roboto-Bold.woff2') format('woff2'); font-display: swap; }

/* Admin header "users waiting" badge. MudBlazor's global `button{}` reset strips bare-button styling,
   so the custom classes are styled explicitly here. Sits on the dark header bar -> light pill + red count. */
.pending-badge { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: #fff;
    padding: .25rem .55rem; border-radius: 999px; font-size: .85rem; line-height: 1.2; }
.pending-badge:hover { background: rgba(255,255,255,.22); }
.pending-badge .count { display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px;
    background: #dc3545; color: #fff; font-weight: 700; font-size: .8rem; }
/* Stage-25: MCP-Onboarding-Card — Style C engine buttons (logo on top + label below).
   Global (not scoped) + .mcp-onboarding-card prefix: app.css loads BEFORE MudBlazor.min.css, so a 2-class
   selector is needed to beat MudBlazor's single-class .mud-button rules. CSS var --logo set per button inline. */
.mcp-onboarding-card { height: 100%; }
.mcp-onboarding-card .ai-engine-btn { width: 118px; min-height: 74px; padding: 6px; text-transform: none; }
.mcp-onboarding-card .ai-engine-inner { display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 4px; width: 100%; }
.mcp-onboarding-card .ai-engine-ico { width: 26px; height: 26px; flex: none; background-image: var(--logo);
    background-repeat: no-repeat; background-position: center; background-size: contain; }
.mcp-onboarding-card .ai-engine-lab { font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center;
    text-transform: uppercase; white-space: normal; overflow-wrap: anywhere; }

/* Plan 36 (Stuecklisten-Bestandteile, ArtikelRechnungen + ArtikelDetail "Offene Auftraege"): Badge fuer
   Positionen ohne eigenen Preis (Art 10/13, Set-Bestandteile). Bewusst KEIN Bootstrap `.badge`
   (zu fett/farbig -- wuerde die gedaempfte `.arb-bestandteil-row.text-muted`-Zeile optisch dominieren,
   statt sich unterzuordnen). Global statt scoped: beide Komponenten teilen sich die Klasse, und
   `wwwroot/css/` existiert in diesem Projekt nicht (Praezedenz: alle Regeln hier in app.css). */
.arb-bestandteil-badge {
    display: inline-block;
    font-size: .75rem;
    line-height: 1.3;
    padding: .05rem .5rem;
    border: 1px solid #adb5bd;
    border-radius: 999px;
    color: #6c757d;
    background: #f1f3f5;
    white-space: nowrap;
}

/* Bootstrap setzt color direkt auf die Zelle (.table > :not(caption) > * > *, bootstrap.css ~1878)
   -> text-muted am <tr> bleibt wirkungslos. Praezedenz ArtikelSuche.razor.css .arb-eol-row td (Stage-32 #7).
   `text-muted` bleibt trotzdem am <tr> (Markup-Verdrahtung fuer Tests), die Daempfung wirkt hier auf td. */
.arb-bestandteil-row td {
    color: #6c757d !important;
}

/* Plan 37 (S2a) D6: Zwei-Ton-Zebra (gui/CLAUDE.md Tabellen-Zebra-Konvention) fuer die Artikel-
   Vorgangslisten -- plain Bootstrap-.table, also nth-child auf den ZELLEN (nie auf tr, Bootstrap
   malt --bs-table-bg opak ueber einen tr-Hintergrund) UND mit !important (Praezedenz
   ArtikelSuche.razor.css .arb-table -- ohne !important bleibt die Regel still wirkungslos, kein
   Test faengt CSS). Scoped .razor.css-Dateien existieren fuer ArtikelDetail/ArtikelRechnungen
   NICHT -- hier neben .arb-bestandteil-row td, wo die geteilten Regeln beider Komponenten bereits
   liegen. Vertraeglich mit .arb-bestandteil-row td { color … } (Hintergrund vs. Textfarbe). Plan 57
   F5 (Opus-Review): die dritte, urspruenglich hier geregelte Liste ("Offene Auftraege",
   .arb-offene-auftraege-table) ist seit Plan 57 K3 auf die geteilte .arb-vorgaenge-table (Regeln
   unten, Plan 54 B3) gehoben -- die eigene Regel dafuer war seitdem tot (kein Markup mehr) und ist
   entfallen. */
.arb-offene-best-table tbody tr:nth-child(odd) td {
    background-color: #e8edf4 !important;
}

.arb-offene-best-table tbody tr:nth-child(even) td {
    background-color: #d4dfec !important;
}

.arb-rechnungen-table tbody tr:nth-child(odd) td {
    background-color: #e8edf4 !important;
}

.arb-rechnungen-table tbody tr:nth-child(even) td {
    background-color: #d4dfec !important;
}

/* Plan 54 B3: geteilte Leaf-Tabelle Shared/ArtikelVorgaengeTabelle.razor ([$]-Dialog + Cards
   "Rechnungen"/"Reparaturen") -- dieselbe Zwei-Ton-Zebra auf den ZELLEN. Der [$]-Dialog traegt
   zusaetzlich arb-rechnungen-table (Regeln oben), beide Regelsaetze setzen dieselben Farben. */
.arb-vorgaenge-table tbody tr:nth-child(odd) td {
    background-color: #e8edf4 !important;
}

.arb-vorgaenge-table tbody tr:nth-child(even) td {
    background-color: #d4dfec !important;
}

/* Plan 37 (S2a) Review-Fund Phase 2: gui/CLAUDE.md Tabellen-Zebra-Konvention verlangt, dass Detail-/
   Unterzeilen WEISS bleiben (Kontrastanker gegen die Zebra der uebergeordneten Zeilen, Praezedenz
   AuftragHistorie.razor.css:57 .ah-lebenslauf ::deep tr.ah-posten-zeile). Die Stuecklisten-
   Bestandteil-Zeilen (tr.arb-bestandteil-row, Plan 36) sind genau solche Unterzeilen -- ihre
   gedaempfte Textfarbe #6c757d (oben) hat auf Weiss einen Kontrast von 4,69:1 (WCAG-AA-tauglich fuer
   normalen Fliesstext), auf der Zebra waere er niedriger. Gleiche Selektor-Spezifitaet wie die
   nth-child-Regeln oben (Klasse+3 Elemente je Selektor) -- gewinnt durch die spaetere Position im
   Quelltext (CSS-Tie-Break bei gleicher Spezifitaet + !important), MUSS deshalb NACH den Zebra-
   Regeln stehen. */
.arb-offene-best-table tbody tr.arb-bestandteil-row td,
.arb-rechnungen-table tbody tr.arb-bestandteil-row td,
.arb-vorgaenge-table tbody tr.arb-bestandteil-row td {
    background-color: #fff !important;
}

/* RTF-gerenderte Inhalte (Bemerkung / Notizen-Dialog / Artikel-Langtext): RtfPipe emittiert je Zeile
   ein <p style="margin:0">, aber der Sanitizer strippt margin bewusst (kein RTF-kontrolliertes Layout
   -- gleiche Entscheidung wie beim font-size-Cut, sonst Layout-DoS via \sa/\sb). Ohne diese Regel
   greift der Bootstrap-Default margin-bottom:1rem -> jeder \par-Umbruch wirkt wie ein ABSATZ und der
   Text zerfasert. Wir setzen den Absatz-Abstand fix auf 0 -> ein Umbruch bricht nur in die naechste
   Zeile; eine vom Autor gesetzte Leerzeile (leerer <p><br></p>, per Collapse auf max. 1 begrenzt)
   bleibt genau eine Leerzeile. (User-Smoke a2-test-97.) */
.adr-bemerkung-html p,
.ntz-html p,
.arb-langtext p {
    margin: 0;
}

/* Plan 53 B4: Artikelnummern-Popover der Modellreihen-Card. GLOBAL, weil MudPopover im MudPopoverProvider
   ausserhalb der Card rendert (scoped CSS greift dort nicht); Praefix .mr-artnr-popover haelt die Regeln lokal.
   Liste scrollbar (bis 50 Nummern + "+N weitere"). */
.mr-artnr-popover .mr-artnr-inhalt {
    padding: 8px 12px;
    min-width: 180px;
}

.mr-artnr-popover .mr-artnr-titel {
    font-weight: 600;
    margin-bottom: 4px;
}

.mr-artnr-popover .mr-artnr-liste {
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding-left: 18px;
    font-family: monospace;
}

.mr-artnr-popover .mr-artnr-weitere,
.mr-artnr-popover .mr-artnr-leer {
    margin-top: 4px;
    color: var(--mud-palette-text-secondary, #6e6e6e);
    font-style: italic;
}

/* Plan 56 A8.5 (Review-Fund I4, korrigiert) + Plan 56a8-Nachzug (Codex-Finding F3, 2026-09-26): Seiten-
   Scrollbalken dauerhaft sichtbar und in der Primaerfarbe -- GLOBAL (nicht scoped), weil er den <html>-Wurzel-
   Scroll-Container betrifft, nicht eine einzelne Komponente. Gleiches Muster wie ModellreihenCard.razor.css
   (dort ausfuehrlich begruendet): scrollbar-color ist eine VERERBTE Eigenschaft -- auf html gesetzt, wirkt sie
   in JEDEM scrollbaren Element der Seite (Dialoge, MudSelect-Listen, Textareas), nicht nur auf der Seite
   selbst; ausserdem deaktiviert scrollbar-color auf demselben Element in Chromium >=121 die
   ::-webkit-scrollbar*-Pseudoelemente vollstaendig (die 14px/immer-sichtbar-Regeln waeren dort toter Code).
   Fix: scrollbar-color/scrollbar-width nur noch innerhalb @supports not selector(::-webkit-scrollbar) -- true
   nur in Browsern OHNE ::-webkit-scrollbar-Unterstuetzung (Firefox); Chromium/Safari ueberspringen den Block
   komplett und bleiben bei den weiter unten stehenden ::-webkit-scrollbar*-Regeln (die dort jetzt ungestoert
   wirken).

   Codex-Finding F3: der vorige Stand benannte die Vererbung im Kommentar bereits, loeste sie aber NICHT --
   Firefox erbte die Primaerfarbe von html AUCH in jeden scrollbaren Nachfahren (MudDialog, MudPopover-
   Listen/-Selects, Textareas), unabhaengig davon, ob der jeweilige Container eine eigene Optik will. Fix:
   <body> setzt scrollbar-color explizit auf "auto" zurueck (im SELBEN @supports-Block -- gilt also ebenfalls
   nur fuer Firefox) -- das unterbricht die Vererbungskette fuer body UND jeden Nachfahren, OHNE die
   Viewport-Scrollbalken-Optik selbst zu beruehren: die styled Browser den viewport-Scrollbalken nicht ueber
   normale CSS-Vererbung, sondern ueber eine eigene Root-Element-Propagation (scrollbar-color des <html>-
   Wurzelelements gilt fuer den Viewport-Scroll-Container UNABHAENGIG vom berechneten Wert auf <body>, CSSOM
   View / CSS Scrollbars Module). Container, die trotzdem eine eigene Optik wollen (z.B. der Modellreihen-
   Tabellen-Scroll-Container, ModellreihenCard.razor.css), behalten das unveraendert -- eine EIGENE Deklaration
   auf dem Element selbst gewinnt gegen den geerbten Wert immer (specified > inherited), unabhaengig vom
   body-Reset hier. */
@supports not selector(::-webkit-scrollbar) {
    html {
        scrollbar-color: var(--mud-palette-primary) #eef1f6;
        scrollbar-width: auto;
    }

    body {
        scrollbar-color: auto;
    }
}

html::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

html::-webkit-scrollbar-track {
    background: #eef1f6;
}

html::-webkit-scrollbar-thumb {
    background-color: var(--mud-palette-primary);
    border-radius: 2px;
}

/* Plan 63: Artikelnummern-Popover der Top-Kunden-Card -- GLOBAL, weil MudPopover im MudPopoverProvider ausserhalb der
   Card rendert (scoped CSS greift dort nicht); Muster .mr-artnr-popover oben. */
.tk-artnr-popover .tk-artnr-inhalt {
    padding: 8px 12px;
    min-width: 180px;
}

.tk-artnr-popover .tk-artnr-titel {
    font-weight: 600;
    margin-bottom: 4px;
}

.tk-artnr-popover .tk-artnr-liste {
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding-left: 18px;
    font-family: monospace;
}

.tk-artnr-popover .tk-artnr-weitere,
.tk-artnr-popover .tk-artnr-leer {
    margin-top: 4px;
    color: var(--mud-palette-text-secondary, #6e6e6e);
    font-style: italic;
}
