﻿/* SoMaERP – Standarddesign (Bootstrap 5.3, Titelleiste, Modulleiste). Die Akzentfarbe einer Firma kommt über /branding.css (ADR 0195). */

html, body { height: 100%; }
.page { min-height: 100vh; }
h1:focus { outline: none; }

body[data-theme] {
    --app-accent: #0d6efd;
    --app-accent-hover: #0b5ed7;
    --app-link: #0d6efd;
}

body[data-theme] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.side-link):not(.admin-tree-link):not(.ws-mod):not(.dash-presence):not(.chip-link) { color: var(--app-link); }

body[data-theme] .btn-primary {
    --bs-btn-bg: var(--app-accent);
    --bs-btn-border-color: var(--app-accent);
    --bs-btn-hover-bg: var(--app-accent-hover);
    --bs-btn-hover-border-color: var(--app-accent-hover);
    --bs-btn-active-bg: var(--app-accent-hover);
    --bs-btn-active-border-color: var(--app-accent-hover);
    --bs-btn-disabled-bg: var(--app-accent);
    --bs-btn-disabled-border-color: var(--app-accent);
}
body[data-theme] .btn-outline-primary {
    --bs-btn-color: var(--app-accent);
    --bs-btn-border-color: var(--app-accent);
    --bs-btn-hover-bg: var(--app-accent);
    --bs-btn-hover-border-color: var(--app-accent);
    --bs-btn-active-bg: var(--app-accent);
    --bs-btn-active-border-color: var(--app-accent);
}
body[data-theme] .bg-primary { background-color: var(--app-accent) !important; }
body[data-theme] .text-primary { color: var(--app-accent) !important; }

/* Kontrast: dunkleres Rot für btn-danger, dunkle Schrift auf Gelb */
.btn-danger {
    --bs-btn-bg: #c1272d; --bs-btn-border-color: #c1272d;
    --bs-btn-hover-bg: #a31f24; --bs-btn-hover-border-color: #a31f24;
    --bs-btn-active-bg: #a31f24; --bs-btn-active-border-color: #a31f24;
    font-weight: 500;
}
.btn-warning { --bs-btn-color: #212529; --bs-btn-hover-color: #212529; --bs-btn-active-color: #212529; font-weight: 500; }

/* --- SoMaERP-Standarddesign: Akzentfarbe als Variable – je Installation über „Unser Unternehmen“ änderbar --- */
body[data-theme="somaerp"] {
    --app-accent: #1f5f8b;
    --app-accent-hover: #184a6d;
    --app-link: #184a6d;
    --app-accent-on-dark: #7fb2d9; /* Akzent auf der dunklen Modulleiste */
    --bs-border-radius: .25rem;
    background-color: #f5f6f7;
}
body[data-theme="somaerp"] .soma-container { width: 90%; max-width: 90%; margin: 0 auto; }
/* Arbeitsfläche (ADR 0039): Inhalt nutzt die volle Breite; die Fußzeile ist der Statusleiste gewichen */
body[data-theme="somaerp"] .content { max-width: none; width: auto; margin-inline: 0; }

body[data-theme="somaerp"] .soma-topbar {
    position: sticky; top: 0; z-index: 1040;
    background: #fff;
    border-bottom: 3px solid var(--app-accent);
    box-shadow: 0 .125rem .5rem rgba(20,24,33,.06);
    padding-top: .35rem; padding-bottom: .35rem;
}
body[data-theme="somaerp"] .soma-topbar .navbar-brand img, body[data-theme="somaerp"] .soma-topbar .navbar-brand .brand-logo { height: 38px; width: auto; display: block; }
body[data-theme="somaerp"] .soma-topbar .nav-link { color: #1c2128; font-weight: 500; padding-inline: .85rem; }
body[data-theme="somaerp"] .soma-topbar .nav-link:hover,
body[data-theme="somaerp"] .soma-topbar .nav-link:focus { color: var(--app-accent); }
body[data-theme="somaerp"] .soma-topbar .nav-link.active { color: var(--app-accent); box-shadow: inset 0 -2px 0 var(--app-accent); }
body[data-theme="somaerp"] .soma-topbar .nav-link.disabled { color: #9aa0a6; }
body[data-theme="somaerp"] .dropdown-menu { border-radius: .25rem; border-color: #e5e7eb; box-shadow: 0 .5rem 1rem rgba(20,24,33,.1); }
body[data-theme="somaerp"] .dropdown-item:hover,
body[data-theme="somaerp"] .dropdown-item:focus { background: rgba(193,39,45,.08); color: var(--app-accent); }
body[data-theme="somaerp"] .dropdown-item.active,
body[data-theme="somaerp"] .dropdown-item:active { background: var(--app-accent); color: #fff; }

body[data-theme="somaerp"] .card { border-radius: .25rem; box-shadow: 0 .125rem .4rem rgba(20,24,33,.06); }
body[data-theme="somaerp"] .card-header { border-top: 2px solid var(--app-accent); font-weight: 600; background: #fff; }
body[data-theme="somaerp"] .badge { border-radius: .2rem; }

/* Tabellen: kompakt, Kopf hervorgehoben */
body[data-theme="somaerp"] .table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: #5f6673; border-bottom: 2px solid #e5e7eb; }
body[data-theme="somaerp"] .table tbody tr.row-warn { background: #fff8e6; }

/* KI-Status-Badge in der Top-Leiste */
.ai-badge { font-size: .75rem; font-weight: 500; }
.ai-badge.off { background: #e9ecef; color: #5f6673; }
.ai-badge.on { background: #d1e7dd; color: #0f5132; }

/* Preisherleitung */
.derivation { font-size: .8rem; color: #5f6673; }
/* Ersatzteile & Preisfindung: Herleitung gekürzt in einer Zeile (voller Text im Tooltip), eigene Spalte für Ersatz-/Verschleißteil */
.derivation.deriv-short { font-size: .72rem; position: relative; cursor: help; }
.derivation.deriv-short > span { display: block; max-width: 13rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* voller Text als Einblendung über der Zeile (rechtsbündig) – verdeckt weder die Zeile noch liegt sie unter dem Mauszeiger; erste Zeile: darunter */
.derivation.deriv-short:is(:hover, :focus)::after { content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + .15rem); z-index: 20; width: max-content; max-width: min(30rem, 70vw);
    white-space: normal; text-align: left; padding: .4rem .6rem; font-size: .8rem; line-height: 1.35; color: var(--bs-body-color); background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color); border-radius: .3rem; box-shadow: var(--bs-box-shadow); pointer-events: none; }
tbody tr:first-child > .derivation.deriv-short:is(:hover, :focus)::after { bottom: auto; top: calc(100% + .15rem); }
.sp-kind { width: 7.5rem; }
.sp-kind .badge { display: inline-block; font-weight: 500; margin: .05rem 0; }

#blazor-error-ui { color-scheme: light only; background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); box-sizing: border-box; display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ===== Verbindungsdialog (Components/Layout/ReconnectModal.razor) – nur Bootstrap-Variablen, folgt dem Darkmodus von selbst ===== */
.components-reconnect-first-attempt-visible, .components-reconnect-repeated-attempt-visible, .components-reconnect-failed-visible,
.components-pause-visible, .components-resume-failed-visible, .components-rejoining-animation,
.reconnect-visible-connecting, .reconnect-visible-failed, .reconnect-visible-paused { display: none; }
#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-show .reconnect-visible-connecting,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-retrying .reconnect-visible-connecting,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible,
#components-reconnect-modal.components-reconnect-failed .reconnect-visible-failed,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-paused .reconnect-visible-paused,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-resume-failed .reconnect-visible-failed { display: block; }
#components-reconnect-modal .reconnect-actions .btn { display: none; }
#components-reconnect-modal.components-reconnect-failed .reconnect-actions .components-reconnect-failed-visible,
#components-reconnect-modal.components-reconnect-failed .reconnect-actions .reconnect-visible-failed,
#components-reconnect-modal.components-reconnect-paused .reconnect-actions .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .reconnect-actions .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-resume-failed .reconnect-actions .reconnect-visible-failed { display: inline-flex; }
#components-reconnect-modal { width: min(26rem, calc(100vw - 2rem)); margin: 18vh auto; padding: 2rem 1.75rem 1.5rem; border: 0; border-top: 4px solid var(--app-accent); border-radius: .75rem; outline: none;
    background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: var(--bs-box-shadow-lg); opacity: 0;
    transition: display .4s allow-discrete, overlay .4s allow-discrete; animation: reconnect-fade-out .4s both; }
#components-reconnect-modal[open] { animation: reconnect-slide-up .6s cubic-bezier(.05,.89,.25,1.02) .3s both, reconnect-fade-in .4s ease-in-out .3s both; }
#components-reconnect-modal::backdrop { background-color: rgba(33,37,41,.35); backdrop-filter: blur(2px); animation: reconnect-fade-in .4s ease-in-out; }
#components-reconnect-modal .reconnect-body { display: flex; flex-direction: column; align-items: center; gap: .75rem; text-align: center; }
#components-reconnect-modal .reconnect-icon { min-height: 64px; display: flex; align-items: center; justify-content: center; }
#components-reconnect-modal .reconnect-icon .bi { font-size: 2.6rem; color: var(--app-link); }
#components-reconnect-modal .reconnect-title { font-size: 1.2rem; font-weight: 600; margin: 0; }
#components-reconnect-modal p { margin: 0; color: var(--bs-secondary-color); line-height: 1.5; }
#components-reconnect-modal p strong { color: var(--bs-body-color); }
#components-reconnect-modal .reconnect-hint { font-size: .85rem; }
#components-reconnect-modal .reconnect-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .5rem; }
#components-reconnect-modal .reconnect-actions .btn { align-items: center; gap: .35rem; }
#components-reconnect-modal .btn-primary { --bs-btn-bg: var(--app-accent); --bs-btn-border-color: var(--app-accent); --bs-btn-hover-bg: var(--app-accent-hover); --bs-btn-hover-border-color: var(--app-accent-hover); --bs-btn-active-bg: var(--app-accent-hover); --bs-btn-active-border-color: var(--app-accent-hover); }
.components-rejoining-animation { position: relative; width: 64px; height: 64px; }
.components-rejoining-animation div { position: absolute; border: 3px solid var(--app-accent); opacity: 1; border-radius: 50%; animation: reconnect-ripple 1.5s cubic-bezier(0,.2,.8,1) infinite; }
.components-rejoining-animation div:nth-child(2) { animation-delay: -.5s; }
@keyframes reconnect-ripple { 0%, 4.9% { top: 32px; left: 32px; width: 0; height: 0; opacity: 0; } 5% { top: 32px; left: 32px; width: 0; height: 0; opacity: 1; } 100% { top: 0; left: 0; width: 64px; height: 64px; opacity: 0; } }
@keyframes reconnect-slide-up { 0% { transform: translateY(24px) scale(.96); } 100% { transform: translateY(0); } }
@keyframes reconnect-fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes reconnect-fade-out { 0% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #components-reconnect-modal, #components-reconnect-modal[open], .components-rejoining-animation div { animation-duration: .01s; } }

/* Administration: linker Navigationsbaum (dunkel) */
.admin-tree { background: #1c2128; color: #c7ccd4; border-radius: .25rem; padding: .5rem .5rem 1rem; position: sticky; top: var(--ws-top); }
.admin-tree-title { font-weight: 600; color: #fff; letter-spacing: .03em; text-transform: uppercase; font-size: .8rem; padding: .5rem .65rem .65rem; border-bottom: 1px solid #11151b; margin-bottom: .4rem; }
.admin-tree-group { color: #8b93a1; text-transform: uppercase; font-size: .68rem; letter-spacing: .06em; margin: .85rem .65rem .3rem; }
body[data-theme] .admin-tree a.admin-tree-link { display: block; padding: .4rem .65rem; margin: 1px 0; border-radius: .25rem; color: #e6e9ee; text-decoration: none; font-size: .92rem; }
body[data-theme] .admin-tree a.admin-tree-link i { color: #9aa3b2; }
body[data-theme] .admin-tree a.admin-tree-link:hover { background: rgba(255,255,255,.08); color: #fff; }
body[data-theme] .admin-tree a.admin-tree-link.active { background: var(--app-accent); color: #fff; font-weight: 600; }
body[data-theme] .admin-tree a.admin-tree-link.active i { color: #fff; }
.admin-tree-group { color: #aab2c0; }
.quote-steps .step { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border-radius: .25rem; color: #6c757d; }
.quote-steps .step.active { background: var(--app-accent); color: #fff; }
.quote-steps .step.done { color: #198754; }
.quote-steps .step .n { display: inline-flex; width: 1.6rem; height: 1.6rem; border-radius: 50%; align-items: center; justify-content: center; border: 1px solid currentColor; font-size: .8rem; }
.kv dt { font-weight: 500; color: #6c757d; font-size: .8rem; margin-top: .4rem; }
.kv dd { margin-bottom: 0; }
.timeline { list-style: none; padding-left: 0; margin: 0; }
.timeline li { border-left: 2px solid #dee2e6; padding: .25rem 0 .6rem .9rem; margin-left: .4rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .55rem; width: 10px; height: 10px; border-radius: 50%; background: var(--app-accent); }

/* ---- Kompakte Darstellung: kleinere Schrift und Eingabefelder, damit Formulare nicht erschlagen ---- */
body[data-theme] .content { font-size: .875rem; }
body[data-theme] .content h1 { font-size: 1.35rem; }
body[data-theme] .content h2 { font-size: 1.15rem; }
body[data-theme] .content h6 { font-size: .9rem; }
body[data-theme] .content .form-control, body[data-theme] .content .form-select, body[data-theme] .content .input-group-text {
    font-size: .8rem; padding: .1rem .45rem; min-height: 1.6rem; } /* eine Feldhöhe für alle Masken (Rückmeldung Jan 2026-10-16, wie head-form) */
body[data-theme] .content textarea.form-control { min-height: auto; }
/* Feldbeschriftungen normal geschrieben, keine Großbuchstaben (Jan 08.11.2026, ws189); Tabellenköpfe/Gruppenüberschriften bleiben */
body[data-theme] .content .form-label { margin-bottom: .1rem; font-size: .76rem; color: var(--bs-secondary-color); text-transform: none; letter-spacing: 0; }
body[data-theme] .content .form-text { font-size: .72rem; }
body[data-theme] .content .form-check-label { font-size: .8rem; }
body[data-theme] .content .btn { font-size: .82rem; padding: .3rem .7rem; }
body[data-theme] .content .btn-sm { font-size: .75rem; padding: .2rem .5rem; }
body[data-theme] .content .card-header { padding: .45rem .85rem; font-size: .82rem; }
body[data-theme] .content .card-body { padding: .75rem .85rem; }
body[data-theme] .content .row.g-2 > * { padding-top: .2rem; }
body[data-theme] .content .row.g-3 { --bs-gutter-y: .5rem; }
body[data-theme] .content .form-select { padding-right: 2rem; }
body[data-theme] .content .input-group > .btn { padding-top: .1rem; padding-bottom: .1rem; }
body[data-theme] .content .table { font-size: .82rem; }
body[data-theme] .content .table-sm > :not(caption) > * > * { padding: .25rem .4rem; }
body[data-theme] .content .badge { font-size: .68rem; }
body[data-theme] .content .alert { font-size: .85rem; padding: .5rem .85rem; }
body[data-theme] .content dl.row dt, body[data-theme] .content dl.row dd { margin-bottom: .15rem; }
body[data-theme] .content .kv dt { font-size: .7rem; margin-top: .3rem; }
body[data-theme] .content .header-filter { white-space: nowrap; }
body[data-theme] .content .header-filter-btn { color: #9aa0a6; font-size: .8rem; line-height: 1; text-decoration: none; }
body[data-theme] .content .header-filter-btn:hover, body[data-theme] .content .header-filter-btn.active { color: var(--app-accent); }
body[data-theme] .content .header-filter-value { color: var(--app-accent); font-weight: 600; text-transform: none; letter-spacing: 0; margin-left: .25rem; }
body[data-theme] .content .header-filter .dropdown-menu { font-size: .8rem; max-height: 18rem; overflow: auto; }

/* Artikelbild (Reiter „Bild“ im rechten Block): so groß wie der Block erlaubt, nie verzerrt */
.article-image { display: flex; align-items: center; justify-content: center; min-height: 12rem; max-height: calc(100vh - 22rem); border: 1px solid #e5e7eb; border-radius: .25rem; background: #fff; }
.article-image img { max-width: 100%; max-height: calc(100vh - 22rem); object-fit: contain; }
/* Bild-Reiter: Bild füllt den Block (ohne Scrollbalken) – Flex-Kette Block → Formular → Bildfläche */
.card.side-image > .block-body { display: flex; flex-direction: column; overflow: hidden !important; }
.card.side-image > .block-body > fieldset { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.card.side-image > .block-body > fieldset > div { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.card.side-image > .block-body > fieldset > div > .nav-tabs { flex: 0 0 auto; margin-bottom: .5rem !important; }
.card.side-image .article-image { flex: 1 1 0; min-height: 8rem; max-height: none; overflow: hidden; }
.card.side-image .article-image img { max-height: 100%; max-width: 100%; width: auto; height: auto; }
.card.side-image .article-image-meta { flex: 0 0 auto; }
/* Zeichnung (PDF) im rechten Artikelblock: Browser-PDF-Betrachter füllt die Fläche */
.article-drawing { align-items: stretch; min-height: 24rem; } .article-drawing iframe { width: 100%; height: 100%; min-height: 24rem; border: 0; }
.card.side-image .article-drawing, .card.side-image .article-drawing iframe { min-height: 8rem; }
@media (max-width: 991.98px) { .card.side-image > .block-body { height: 60vh; } }
.article-image-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #c7ccd4; font-size: 2.5rem; padding: 2rem; }

/* Artikelstatus als Punkt vor der Nummer (ruhiger als Badges mitten in der Tabelle) */
.status-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; background: #adb5bd; }
.status-dot.active { background: #198754; }
.status-dot.obsolete { background: #b02a37; }
.status-dot.draft { background: #adb5bd; }
.status-dot.open { background: #0d6efd; }
.status-dot.progress { background: #fd7e14; }
.feedback-row { cursor: pointer; }
.feedback-text { white-space: pre-wrap; }
.attr-icons i { font-size: .85rem; color: #6c757d; margin-right: .2rem; }
.bom-tree tr.bom-child > td:first-child { border-left: 2px solid #e5e7eb; }
.attr-icons i.on { color: var(--app-accent, #1f5f8b); }
.cell-clip { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Datensatz-Leiste (RecordToolbar): runde Symbolknöpfe wie in APplus */
.record-toolbar { padding: .35rem .5rem; background: #fff; border: 1px solid #e5e7eb; border-radius: .25rem; }
.rt-btn { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 1px solid #e5e7eb; background: #fff; color: #495057; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; text-decoration: none; }
.rt-btn:hover:not(:disabled) { background: #f1f3f5; color: #212529; }
.rt-btn:disabled { color: #ced4da; background: #fafafa; }
.rt-btn.rt-accent { background: var(--app-accent, #1f5f8b); color: #fff; border-color: var(--app-accent, #1f5f8b); }
.rt-sep { width: 1px; height: 1.5rem; background: #e5e7eb; margin: 0 .25rem; }
.rt-badge { position: absolute; right: -.35rem; bottom: -.3rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .3rem; border-radius: .6rem; background: #f5c242; color: #212529; font-size: .65rem; font-weight: 600; line-height: 1.1rem; }
.search-mask .form-label::after { content: ""; }
.search-mask .form-control, .search-mask .form-select { background: #fffdf5; }

/* Belegtexte (HTML aus APplus/Editor) lesbar darstellen */
.html p { margin: 0 0 .5rem; } .html ul, .html ol { margin: .25rem 0 .5rem 1.25rem; padding: 0; } .html h1, .html h2, .html h3 { font-size: 1rem; margin: .75rem 0 .25rem; }
.html table { border-collapse: collapse; margin: .25rem 0 .5rem; max-width: 100%; } .html table td, .html table th { border: 1px solid #d0d4da; padding: .1rem .35rem; font-size: .85rem; vertical-align: top; }
.html img { max-width: 100%; max-height: 120px; margin: .25rem .4rem .25rem 0; vertical-align: top; }
.html .page-break { border-top: 1px dashed #c1272d; margin: .75rem 0; height: 0; position: relative; }
.html .page-break::after { content: "Seitenumbruch"; position: absolute; right: 0; top: -.65rem; font-size: .65rem; color: #c1272d; background: #fff; padding: 0 .25rem; }
.doc-text-body.collapsed { max-height: 9rem; overflow: hidden; position: relative; }
.doc-text-body.collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3rem; background: linear-gradient(rgba(255,255,255,0), #fff); }
.html-editor-area { overflow: auto; max-height: 60vh; background: #fff; }
.html-editor-area:focus { outline: none; border-color: var(--app-accent, #1f5f8b); box-shadow: 0 0 0 .2rem rgba(193,39,45,.15); }
/* HTML-Editor im Seitenrahmen maximiert (wie .card.block-max; Rahmen-Variablen aus blocks.js) – nur Klassenwechsel, der Editor bleibt derselbe */
.html-editor.html-editor-max { position: fixed; top: max(var(--frame-top, 4rem), calc(var(--ws-top) + .5rem)); left: var(--frame-left, 1rem); width: var(--frame-width, calc(100vw - 2rem)); bottom: calc(var(--ws-status-h) + .5rem);
    z-index: 1045; margin: 0; padding: .5rem; display: flex; flex-direction: column; background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6); border-radius: var(--bs-border-radius, .375rem); box-shadow: 0 .5rem 2rem rgba(0,0,0,.25); }
.html-editor.html-editor-max > .html-editor-toolbar { flex: 0 0 auto; }
.html-editor.html-editor-max > .html-editor-area, .html-editor.html-editor-max > textarea { flex: 1 1 auto; max-height: none; min-height: 0 !important; overflow: auto; }
body.has-html-max { overflow: hidden; }
.longtext-cell { font-size: .85rem; color: #333; }
.longtext-cell.collapsed { max-height: 4.5rem; overflow: hidden; }
/* Langtext-Vorschau (ws192): eingeklappt eine Zeile mit „…“, dahinter „mehr“ */
.lt-prev:not(.open) { display: flex; align-items: baseline; min-width: 0; font-size: .85rem; color: var(--bs-secondary-color); }
.lt-prev:not(.open) .lt-first { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-prev:not(.open) .longtext-toggle { flex: 0 0 auto; }
/* ws252 (Jan 14.11.2026): Die Vorschau zählt nicht zur Breitenberechnung der Positionstabelle (automatisches Tabellenlayout nahm sonst die volle
   Länge der ersten Zeile → Tabelle breiter als der Block, Querscrollen, „…“ und „mehr“ außerhalb). contain: inline-size = füllt die Zelle,
   trägt aber nichts zur Mindestbreite bei (width 0 + min-width 100 % greift in Tabellenzellen nicht). */
.lt-prev { contain: inline-size; }
.lt-prev.open .longtext-cell { overflow-wrap: anywhere; }
.lt-prev.open .longtext-cell :is(img, video, iframe) { max-width: 100%; height: auto; }
.lt-prev.open .longtext-cell table { max-width: 100%; table-layout: fixed; }
.lt-prev.open .longtext-cell pre { white-space: pre-wrap; }
tr.pkg-sum td { background: #f8f9fa; font-weight: 600; }
tr.pkg-member td.price { color: #adb5bd; }


/* Responsiv: erst Schrift verkleinern, dann Beschriftungen neben den Symbolen ausblenden (nur Symbole), nie einklappen/verschieben */
.nav-label { margin-left: .35rem; }
.soma-topbar .navbar-nav { flex-wrap: nowrap; }
@media (max-width: 1400px) {
  body[data-theme="somaerp"] .soma-topbar .nav-link { font-size: .9rem; padding-inline: .6rem; }
  body[data-theme="somaerp"] .soma-container { width: 96%; max-width: 96%; }
}
@media (max-width: 1200px) {
  .soma-topbar .nav-label { display: none; }
  body[data-theme="somaerp"] .soma-topbar .nav-link { padding-inline: .5rem; font-size: 1.05rem; }
  .soma-topbar .navbar-brand .brand-logo { height: 30px; }
}
@media (max-width: 768px) {
  body[data-theme="somaerp"] .soma-topbar .nav-link { padding-inline: .35rem; }
  .soma-topbar .ai-badge { display: none; }
}
@media (max-width: 1200px) {
  h1 { font-size: 1.35rem; }
  .btn .btn-label { display: none; }
  .table { font-size: .85rem; }
  .record-toolbar { flex-wrap: wrap; }
}
@media (max-width: 992px) {
  body[data-theme="somaerp"] .soma-container { width: 100%; max-width: 100%; padding: 0 .75rem; }
  .card-body { padding: .75rem; }
  .form-control, .form-select { font-size: .9rem; }
  .quote-steps .step { font-size: .75rem; }
  .html-editor-toolbar { flex-wrap: wrap; }
}
@media (max-width: 768px) {
  h1 { font-size: 1.15rem; }
  .rt-btn { width: 1.8rem; height: 1.8rem; font-size: .9rem; }
  .record-toolbar .small { display: none; }
  .d-flex.flex-wrap.gap-2 > .btn { padding: .25rem .5rem; font-size: .85rem; }
}

/* Artikelseite: rechter Block (Verkauf · Lager · Einkauf · Verwendung) wird nie höher als der Stammdaten-Block – Inhalt scrollt */
@media (min-width: 992px) {
  .article-blocks .article-side { position: relative; }
  .article-blocks .article-side > .card { position: absolute; top: 0; bottom: 0; left: calc(var(--bs-gutter-x) * .5); right: 0; display: flex; flex-direction: column; }
  .article-blocks .article-side > .card > .card-body { overflow: auto; min-height: 0; }
}
@media (max-width: 991.98px) {
  .article-blocks .article-side > .card > .card-body { max-height: 60vh; overflow: auto; }
}

/* ---- Kalkulation & Projekte (Agent C) ---- */
.calc-lines input.form-control-sm, .calc-lines select.form-select-sm { min-width: 3.5rem; }
.timeline td { height: 1.6rem; border-left: 1px solid #eee; }
.timeline td.timeline-actual { background-image: repeating-linear-gradient(45deg, rgba(25,135,84,.45) 0 4px, transparent 4px 8px); }

/* Meldungen (Erfolg/Fehler) als eingeblendeter Stapel oben rechts unter der Top-Leiste – keine feste Meldungszeile in den Seiten */
.toast-stack { position: fixed; top: calc(var(--ws-top) + .5rem); right: 1rem; z-index: 1080; display: flex; flex-direction: column; gap: .5rem; max-width: min(34rem, calc(100vw - 2rem)); pointer-events: none; }
.app-toast { display: flex; align-items: flex-start; pointer-events: auto; cursor: pointer; color: #fff; padding: .6rem .8rem; border-radius: .25rem; box-shadow: 0 .5rem 1rem rgba(0,0,0,.25); font-size: .92rem; line-height: 1.35; animation: toast-in .22s ease-out; }
.app-toast .app-toast-text { flex: 1 1 auto; white-space: pre-line; }
.app-toast > i { flex: 0 0 auto; margin-top: .1rem; }
.app-toast .btn-close { flex: 0 0 auto; font-size: .7rem; margin-top: .15rem; }
.app-toast.hiding { animation: toast-out .25s ease-in forwards; }
.app-toast-success { background: #2e7d32; }
.app-toast-info { background: #37474f; }
.app-toast-warning { background: #b26a00; }
.app-toast-danger { background: #a61e22; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-.5rem); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-.5rem); } }
@media print { .toast-stack { display: none; } }


/* ---- Mitarbeiterportal /me (ADR 0013): ruhiges Layout, große Touchziele, Kacheln, Sperrbildschirm, PIN-Block ---- */
body[data-theme="somaerp"] .portal-topbar .portal-title { font-weight: 600; color: var(--app-accent); letter-spacing: .02em; }
body[data-theme="somaerp"] .portal-topbar .portal-nav .nav-link { padding-inline: .7rem; }
body[data-theme="somaerp"] .soma-topbar .nav-link.portal-link { color: var(--app-accent); font-weight: 600; }
body[data-theme] .portal-content { font-size: .95rem; }
.portal-h1 { font-size: 1.5rem !important; font-weight: 600; }
.portal-clock { font-size: 2.6rem; font-weight: 300; line-height: 1; color: #2b3440; font-variant-numeric: tabular-nums; }
.tile { transition: transform .12s ease, box-shadow .12s ease; }
a.tile:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(20,24,33,.12); }
.tile .tile-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #5f6673; font-weight: 600; margin-bottom: .35rem; }
.tile .tile-big { font-size: 1.7rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-icon { flex: 0 0 auto; width: 3.2rem; height: 3.2rem; border-radius: .5rem; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; background: #f1f3f5; color: #5f6673; }
.tile-icon.accent { background: rgba(193,39,45,.1); color: var(--app-accent); }
.tile-icon.ok { background: #d1e7dd; color: #0f5132; }
.tile-icon.warn { background: #fff3cd; color: #7a5a00; }
.tile-icon.danger { background: #f8d7da; color: #842029; }
.tile-status.present { border-color: #198754; }
.tile-status.break { border-color: #f9a825; }
.pze-plus { color: #198754; } .pze-minus { color: #b02a37; }
.pze-clock { font-size: 3rem; font-weight: 300; line-height: 1; }
.pze-btn { padding-block: .9rem; font-size: 1.05rem; }

/* Fortschrittsring */
.ring { position: relative; width: var(--ring-size, 96px); height: var(--ring-size, 96px); flex: 0 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.2; }
.ring .ring-bg { stroke: #e9ecef; }
.ring .ring-value { stroke: var(--app-accent); stroke-linecap: round; transition: stroke-dasharray .5s ease; }
.ring.ok .ring-value { stroke: #198754; } .ring.warn .ring-value { stroke: #e0a800; } .ring.danger .ring-value { stroke: #b02a37; } .ring.muted .ring-value { stroke: #adb5bd; }
.ring .ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.1; }
.ring .ring-main { font-weight: 600; font-size: calc(var(--ring-size, 96px) * .19); font-variant-numeric: tabular-nums; }
.ring .ring-sub { font-size: calc(var(--ring-size, 96px) * .11); color: #6c757d; }

/* Sperrbildschirm: Inhalt ist aus dem DOM entfernt; dahinter nur ein weichgezeichneter Hintergrund */
.portal-lock { position: relative; min-height: calc(100vh - var(--ws-top)); display: flex; align-items: center; justify-content: center; padding: 1rem; overflow: hidden; }
.portal-lock-backdrop { position: absolute; inset: 0; background: linear-gradient(135deg, #f5f6f7 0%, #e8ebee 100%); overflow: hidden; }
.portal-lock-blob { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; }
.portal-lock-blob.b1 { width: 40vw; height: 40vw; background: rgba(193,39,45,.35); top: -10vw; left: -8vw; }
.portal-lock-blob.b2 { width: 32vw; height: 32vw; background: rgba(43,52,64,.25); bottom: -8vw; right: 10vw; }
.portal-lock-blob.b3 { width: 24vw; height: 24vw; background: rgba(255,255,255,.9); top: 30%; right: -6vw; }
.portal-lock-card { position: relative; width: 100%; max-width: 26rem; border-top: 3px solid var(--app-accent); backdrop-filter: blur(6px); background: rgba(255,255,255,.92); }
.portal-avatar { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--app-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; letter-spacing: .03em; }

/* PIN-Block */
.pin-pad { max-width: 16rem; margin-inline: auto; }
.pin-pad-compact { max-width: 13rem; }
.pin-dots { display: flex; justify-content: center; gap: .45rem; min-height: .9rem; }
.pin-dot { width: .75rem; height: .75rem; border-radius: 50%; border: 2px solid #adb5bd; display: inline-block; }
.pin-dot.on { background: var(--app-accent); border-color: var(--app-accent); }
.pin-input { letter-spacing: .4em; font-size: 1.4rem; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.pin-key { font-size: 1.35rem; padding-block: .7rem; border: 1px solid #dee2e6; }
.pin-pad-compact .pin-key { font-size: 1.1rem; padding-block: .45rem; }
@media (max-width: 576px) { .portal-clock { display: none; } }
/* Fortschritt einer Anforderung als Schritte */
.portal-steps { display: flex; flex-wrap: wrap; gap: .25rem; }
.portal-step { font-size: .75rem; padding: .15rem .55rem; border-radius: 1rem; background: #f1f3f5; color: #6c757d; position: relative; }
.portal-step.done { background: #d1e7dd; color: #0f5132; }
.portal-step.active { background: var(--app-accent); color: #fff; font-weight: 600; }
.portal-step.fail { background: #f8d7da; color: #842029; font-weight: 600; }

/* ---- Navigation (ADR 0014/0039): Benutzer in der Titelleiste, Bereichsmenü links (einblendbar/anpinnbar) ---- */
.user-link { display: inline-flex; align-items: center; gap: .4rem; }
.user-link .nav-label { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #1c2128; color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
body[data-theme="somaerp"] .dropdown-menu .dropdown-header { color: #1c2128; font-weight: 600; }

.app-body { position: relative; align-items: stretch; min-width: 0; }
.app-main { min-width: 0; }
/* Inhaltsbreite je Benutzer (ADR 0039, Benutzermenü → Darstellung): Inhalt mittig auf 95 % (Standard), höchstens 1600 px oder volle Breite.
   Der Inhalt ist ein Container (container queries): Seiten teilen sich nach der verfügbaren Inhaltsbreite in Spalten, nicht nach der Fensterbreite. */
body[data-theme="somaerp"] .app-main .content { width: 100%; max-width: var(--ws-content-max); margin-inline: auto; container-type: inline-size; container-name: ws-content; }
.side-menu { width: 248px; flex: 0 0 248px; background: #fff; border-right: 1px solid #e5e7eb; padding: .4rem 0 1rem; align-self: flex-start; position: sticky; top: var(--ws-titlebar-h); max-height: calc(100vh - var(--ws-titlebar-h) - var(--ws-status-h)); overflow: auto; z-index: 1030; }
/* Einblendung neben der Modulleiste (ADR 0039) */
.side-menu.peek { position: fixed; left: var(--ws-modules-w); top: var(--ws-titlebar-h); bottom: var(--ws-status-h); max-height: none; align-self: stretch; box-shadow: .5rem 0 1.25rem rgba(20,24,33,.16); z-index: 1035; animation: ws-slide .12s ease-out; }
.side-head { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem .5rem .9rem; font-weight: 700; border-bottom: 1px solid #e5e7eb; margin-bottom: .3rem; }
.side-head i { color: var(--app-accent); }
.side-pin { margin-left: auto; border: 0; background: none; color: #6b7280; padding: .15rem .35rem; border-radius: .25rem; cursor: pointer; }
.side-pin:hover, .side-pin.on { color: var(--app-accent); background: rgba(193,39,45,.08); }
.side-group { margin: .7rem .9rem .2rem; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--app-accent); font-weight: 700; }
/* Knopf „Anleitung“ in der Titelleiste (ADR 0068) */
.ws-manual-btn { background: none; border: 1px solid transparent; border-radius: .25rem; color: #2b3440; display: flex; align-items: center; }
.ws-manual-btn:hover, .ws-manual-btn:focus-visible { border-color: var(--app-accent); color: var(--app-accent); }
/* Stammdaten-Menü: klappbare Gruppen (Standard eingeklappt) */
.side-fold { display: flex; align-items: center; width: calc(100% - 1.8rem); background: none; border: 0; padding: .3rem 0; text-align: left; cursor: pointer; border-radius: .25rem; }
.side-fold:hover { background: rgba(193,39,45,.06); }
.side-fold:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 1px; }
.side-fold .side-chev { font-size: .7rem; margin-left: .35rem; color: #6b7280; }
.side-fold .side-count { font-size: .66rem; color: #6b7280; font-weight: 600; letter-spacing: 0; }
.side-fold + .side-fold { margin-top: .1rem; }
body[data-theme] .side-link { display: flex; align-items: center; padding: .38rem .9rem; color: #1c2128; text-decoration: none; font-size: .88rem; }
body[data-theme] .side-link:hover { background: rgba(193,39,45,.08); color: var(--app-accent); }
body[data-theme] .side-link.active { color: var(--app-accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--app-accent); }
body[data-theme] .side-link.disabled { color: #9aa0a6; }
.side-backdrop { position: fixed; inset: 0 0 0 var(--ws-modules-w); z-index: 1034; }
@media (max-width: 768px) { .side-menu.pinned { position: absolute; left: 0; top: 0; box-shadow: 0 .5rem 1.25rem rgba(20,24,33,.18); } }
@media print { .side-menu, .ws-titlebar, .ws-modules, .ws-tabs, .ws-status, .ws-split { display: none !important; } }
/* Kopfleiste: Marke so breit wie das Seitenmenü, Module beginnen bündig mit dem Inhalt; Stempelstatus als Punkt am Avatar */
.user-avatar { position: relative; }
.user-status { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: #9aa0a6; }
.user-status.in { background: #2e7d32; }
.user-status.break { background: #b26a00; }
/* Fehler & Wünsche: Zahl eigener Einträge mit neuer Nachricht oben rechts am Benutzer */
.user-news { position: absolute; top: -7px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; border: 2px solid #fff; background: var(--app-accent); color: #fff; font-size: .62rem; font-weight: 700; line-height: 13px; text-align: center; }
/* Neuigkeiten nach einem Update (ADR 0202): Punkt an „Neuigkeiten“, Einträge im Dialog und auf /neuigkeiten */
.news-dot { position: absolute; top: 4px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--bs-danger); }
.news-version-head { border-bottom: 1px solid var(--bs-border-color); }
.news-text p:last-child, .news-text ul:last-child { margin-bottom: 0; }
.new-badge-wrap { position: relative; display: inline-block; vertical-align: middle; margin-left: .25rem; }
.new-badge { border: 0; border-radius: .6rem; padding: 0 .4rem; font-size: .65rem; font-weight: 700; line-height: 1.1rem; background: var(--bs-success); color: #fff; cursor: pointer; }
.ws-compact .new-badge { width: .55rem; height: .55rem; padding: 0; line-height: 0; }
.ws-compact .new-badge-text { display: none; }
.new-badge-pop { position: absolute; z-index: 1080; top: 1.4rem; left: 0; width: 18rem; padding: .5rem .6rem; border-radius: .25rem; background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); font-weight: normal; white-space: normal; text-align: left; }
.new-badge-pulse .new-badge { animation: new-badge-pulse 1s ease-in-out 4; }
@keyframes new-badge-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, .7); } 50% { box-shadow: 0 0 0 .4rem rgba(25, 135, 84, 0); } }
.side-new { display: inline-block; width: .45rem; height: .45rem; margin-left: .35rem; border-radius: 50%; background: var(--bs-success); vertical-align: middle; }
/* Unterhaltung zu einem Eintrag */
.feedback-thread { max-height: 26rem; overflow-y: auto; }
.feedback-msg { border-left: 3px solid var(--bs-border-color); padding: .25rem .6rem; margin-bottom: .5rem; background: #fff; border-radius: .25rem; }
.feedback-msg.own { border-left-color: var(--app-accent); }
.feedback-msg.system { background: transparent; border-left-style: dashed; color: #5f6773; font-style: italic; }
.feedback-unread { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--app-accent); margin-right: .35rem; vertical-align: middle; }
body[data-theme="somaerp"] .dropdown-item.user-stamp.in { color: #2e7d32; font-weight: 600; }
body[data-theme="somaerp"] .dropdown-item.user-stamp.break { color: #b26a00; font-weight: 600; }
body[data-theme] .dash-tile { color: inherit; }
/* Rollen & Berechtigungen: Reiter je Modul, Rechte zweispaltig ab genügender Inhaltsbreite */
.role-tabs { flex-wrap: wrap; }
.role-tabs .nav-link { padding: .3rem .6rem; font-size: .82rem; }
.role-tabs .nav-link .badge { font-size: .65rem; font-weight: 500; }
.role-panes { min-width: 0; }
.role-pane { display: none; }
.role-pane.active { display: block; }
.role-perms { display: grid; grid-template-columns: 1fr; gap: .35rem 1.5rem; }
@container ws-content (min-width: 900px) { .role-perms { grid-template-columns: 1fr 1fr; } }
.role-perm { font-size: .85rem; margin-bottom: 0; }
.role-group { border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: .4rem .75rem; margin-bottom: .5rem; }
.role-group-head { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.role-group.open .role-group-head { padding-bottom: .35rem; margin-bottom: .45rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.role-group-toggle { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: none; padding: 0; color: inherit; font-size: .85rem; }
.role-perm .form-check-label { overflow-wrap: anywhere; }
.role-perm-key { font-size: .7rem; color: #8a929c; margin-left: .35rem; }
.role-check-list { max-height: 16rem; overflow: auto; }
/* Anwesenheitstableau (ADR 0054) */
.pres-dep { font-size: .95rem; font-weight: 600; margin: .25rem 0 .5rem; color: #2b3440; }
.pres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.pres-card { --pres: #adb5bd; background: #fff; border: 1px solid var(--bs-border-color); border-left: 4px solid var(--pres); border-radius: .25rem; padding: .45rem .6rem; font-size: .82rem; }
.pres-card.present { --pres: #198754; } .pres-card.remote { --pres: #14a3a3; } .pres-card.break { --pres: #e0a800; } .pres-card.gone { --pres: #b58a3a; } .pres-card.absent { --pres: #2a78d6; } .pres-card.missing { --pres: #c9ced6; } .pres-card.none { --pres: #e9ecef; }
.pres-card.none, .pres-card.missing { background: #fafbfc; }
.pres-dot { flex: 0 0 auto; width: .6rem; height: .6rem; margin-top: .3rem; border-radius: 50%; background: var(--pres); }
.pres-name { font-weight: 600; color: #2b3440; } .pres-state { color: #5f6773; } .pres-abs { color: #2a78d6; font-size: .75rem; }
.pres-bar { position: relative; height: 8px; margin-top: .4rem; border-radius: 4px; background: #eef0f3; overflow: hidden; }
.pres-seg { position: absolute; top: 0; bottom: 0; background: #1baf7a; border-radius: 4px; }
.pres-seg.open { background: #198754; } .pres-seg.auto { background: #c1272d; }
.pres-seg.corr { background: repeating-linear-gradient(45deg, #1baf7a 0 4px, #8fd9bd 4px 8px); }
.pres-scale { display: flex; justify-content: space-between; font-size: .62rem; color: #8a929c; }
.pres-times { font-size: .72rem; color: #5f6773; }
.abs-cal-wrap { overflow-x: auto; }
.abs-cal { font-size: .75rem; table-layout: fixed; }
.abs-cal th, .abs-cal td { text-align: center; padding: .15rem .1rem; width: 2rem; vertical-align: middle; }
.abs-cal .abs-name { text-align: left; width: 13rem; max-width: 13rem; padding-left: .4rem; }
/* Anwesenheit: Wochenende dezent, Wochen mit feiner Linie vor dem Montag getrennt, heute durchgehend als transparente Fläche (über --bs-table-bg, damit Bootstrap sie nicht überdeckt) */
.abs-cal .we { --bs-table-bg: #f5f6f8; }
.abs-cal .wk-start { border-left: 1px solid #c9ced6; }
.abs-cal .today { --bs-table-bg: rgba(42,120,214,.12); }
.abs-cal thead th.today { color: #1d5fae; }
.abs-cal .abs-weeks th { font-size: .66rem; font-weight: 600; color: #6c757d; border-bottom: 0; padding-bottom: 0; }
.abs-cal .abs-group td { font-weight: 600; --bs-table-bg: #f8f9fb; }
.abs-cal .abs-group td.we { --bs-table-bg: #f0f1f4; }
.abs-cal .abs-group td.today { --bs-table-bg: rgba(42,120,214,.14); }
.abs-cal .abs-group .abs-name { text-align: left; white-space: nowrap; overflow: visible; }
.abs-cal col.abs-name-col { width: 13rem; } .abs-cal col.abs-day-col { width: 2rem; }
.abs-chip { display: inline-block; min-width: 1.5rem; padding: 0 .2rem; border-radius: .2rem; color: #fff; font-weight: 600; font-size: .68rem; line-height: 1.25rem; background: #6f42c1; }
.abs-chip.part { background-image: linear-gradient(135deg, transparent 50%, rgba(255,255,255,.55) 50%); }
/* Mitarbeiterseite (ADR 0055): links Reiter-Block so hoch wie der längste Reiter, rechts Buchungen nie höher als links */
.emp-blocks { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: stretch; }
@container ws-content (min-width: 900px) {
    .emp-blocks { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
    /* ADR 0057: der Buchungskalender bestimmt die Höhe, der linke Block passt sich an und scrollt */
    .emp-left { height: 0; min-height: 100%; }
    .emp-left > .card { height: 100%; display: flex; flex-direction: column; }
    .emp-left > .card > .block-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
}
.emp-right > .card { height: 100%; }
/* ADR 0075: ohne Buchungskalender (Neuanlage, kein Zeiterfassungsrecht, Datenschutzansicht) gibt kein Nachbar die Höhe vor – sonst schrumpft der
   linke Block auf wenige Pixel (Reiterleiste abgeschnitten, Scrollbalken, Inhalt unsichtbar). emp-free = natürliche Höhe, emp-solo = eine Spalte.
   Bewusst global statt in EmployeePage.razor.css: das Scoped-CSS-Bundle passte nach dem Umbenennen nicht mehr zum Bereichs-Attribut (b-…). */
.emp-blocks.emp-free .emp-left, .emp-blocks.emp-solo .emp-left { height: auto; min-height: 0; }
.emp-blocks.emp-free .emp-left > .card, .emp-blocks.emp-solo .emp-left > .card { height: auto; }
.emp-blocks.emp-free .emp-left > .card > .block-body, .emp-blocks.emp-solo .emp-left > .card > .block-body { overflow: visible; }
.emp-blocks.emp-solo { grid-template-columns: minmax(0, 1fr); }
.emp-blocks.emp-solo .emp-left { max-width: 60rem; }
.emp-vac { max-height: 14rem; overflow-y: auto; }
.emp-tabs { flex-wrap: wrap; } .emp-tabs .nav-link { padding: .3rem .65rem; font-size: .82rem; }
.emp-panes { display: grid; }
.emp-pane { grid-area: 1 / 1; visibility: hidden; min-width: 0; }
.emp-pane.active { visibility: visible; }
/* Buchungen tageweise (ADR 0055) */
.tl-days { display: flex; flex-direction: column; gap: .4rem; font-size: .82rem; }
.tl-day { border: 1px solid var(--bs-border-color); border-radius: .25rem; padding: .3rem .5rem; background: #fff; }
.tl-day.we { background: #f8f9fb; } .tl-day.empty { color: #8a929c; }
.tl-day-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.tl-entry { display: flex; align-items: baseline; gap: .5rem; padding: .05rem 0 .05rem .4rem; border-left: 3px solid #1baf7a; margin-top: .15rem; }
.tl-entry.absence { border-left-color: #2a78d6; } .tl-entry.error { border-left-color: #c1272d; color: #a11d22; }
.tl-entry.cancelled { border-left-color: #c9ced6; color: #8a929c; text-decoration: line-through; }
.tl-kind { width: 4.8rem; flex: 0 0 auto; font-weight: 600; } .tl-time { flex: 0 0 auto; font-variant-numeric: tabular-nums; } .tl-src { color: #8a929c; font-size: .74rem; }
.tl-table tr.cancelled td { color: #8a929c; text-decoration: line-through; } .tl-table tr.error td { color: #a11d22; }
/* Mein Dashboard (ADR 0053): Begrüßung und Anwesenheit über den Bausteinen */
.dash-hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.dash-greeting { font-size: 1.35rem; font-weight: 600; color: #2b3440; line-height: 1.2; }
body[data-theme] .dash-presence { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--bs-border-color); background: #f8f9fb; color: #5f6773; font-size: .85rem; text-decoration: none; }
body[data-theme] .dash-presence.present { background: #e5f4ea; border-color: transparent; color: #1f7a45; }
body[data-theme] .dash-presence.break { background: #fff3d6; border-color: transparent; color: #8a5a00; }
body[data-theme] a.dash-presence:hover { border-color: var(--app-accent); }
body[data-theme] a.dash-tile:hover { border-color: var(--app-accent); }

/* Kommando-Palette (Strg+K) */
.palette-btn { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid #e5e7eb; background: #f5f6f7; border-radius: .25rem; padding: .3rem .6rem; color: #6b7280; font-size: .85rem; width: min(340px, 30vw); cursor: text; }
.palette-btn:hover { border-color: var(--app-accent); color: #1c2128; }
.palette-btn .palette-hint { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-btn kbd, .palette kbd, .palette-foot kbd { font: 600 .7rem/1 system-ui, sans-serif; border: 1px solid #d1d5db; border-bottom-width: 2px; border-radius: 4px; padding: .15em .4em; color: #6b7280; background: #fff; }
.palette-backdrop { position: fixed; inset: 0; background: rgba(20,24,33,.45); z-index: 1085; }
.palette { position: fixed; top: 10vh; left: 50%; transform: translateX(-50%); width: min(640px, calc(100vw - 2rem)); background: #fff; border-radius: .35rem; box-shadow: 0 1rem 2rem rgba(20,24,33,.3); z-index: 1086; overflow: hidden; }
.palette-input { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border-bottom: 1px solid #e5e7eb; }
.palette-input i { color: #6b7280; }
body[data-theme] .palette-input .form-control { border: 0; box-shadow: none; font-size: 1rem; padding: .2rem 0; }
.palette-list { list-style: none; margin: 0; padding: .3rem 0; max-height: 55vh; overflow: auto; }
.palette-list li { display: flex; align-items: center; gap: .6rem; padding: .45rem .9rem; cursor: pointer; font-size: .92rem; }
.palette-list li.sel { background: rgba(193,39,45,.08); }
.palette-list li > i { color: var(--app-accent); width: 1.2rem; text-align: center; }
.palette-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.palette-text small { color: #6b7280; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; white-space: nowrap; }
.palette-empty { padding: .9rem; color: #6b7280; font-size: .9rem; cursor: default !important; }
.palette-foot { display: flex; gap: 1rem; padding: .4rem .9rem; border-top: 1px solid #e5e7eb; font-size: .75rem; color: #6b7280; }
@media (max-width: 1600px) { .palette-btn { width: auto; } .palette-btn .palette-hint { display: none; } }
@media (max-width: 1200px) { .palette-btn kbd { display: none; } }
/* Seitenmenü: Zeile mit Stern (Favorit) – Stern erscheint beim Überfahren, gesetzter Favorit immer */
.side-row { display: flex; align-items: center; }
.side-row .side-link { flex: 1; min-width: 0; }
.side-star { flex: 0 0 auto; border: 0; background: none; color: #c4c9d1; padding: .2rem .55rem; opacity: 0; cursor: pointer; }
.side-row:hover .side-star, .side-star:focus-visible, .side-star.on { opacity: 1; }
.side-star:hover, .side-star.on { color: #d4a017; }

/* Einheitlicher Seitenkopf (Listen): Titel + Hilfe, darunter Leiste links / Aktionen rechts – feste Höhen, nichts springt */
.page-head { display: flex; align-items: center; gap: .75rem; min-height: 2.4rem; margin-bottom: .35rem; }
body[data-theme] .page-head .page-title { margin: 0; flex: 1; min-width: 0; }
.help-btn { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #1e88e5; background: #fff; color: #1e88e5; display: inline-grid; place-items: center; font-size: .9rem; cursor: pointer; padding: 0; }
.help-btn:hover, .help-btn.on { background: #1e88e5; color: #fff; }
.help-panel { background: #eef6fd; border: 1px solid #bcdcf5; border-left: 4px solid #1e88e5; border-radius: .25rem; padding: .7rem .9rem .5rem; margin-bottom: .75rem; font-size: .9rem; animation: help-in .15s ease-out; }
.help-body { max-width: 90ch; }
.help-body p:last-child { margin-bottom: 0; }
.help-foot { display: flex; align-items: center; gap: .75rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid #bcdcf5; }
@keyframes help-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.page-tools { display: flex; align-items: center; gap: .75rem; min-height: 2.6rem; margin-bottom: .75rem; }
.page-tools-left { flex: 1; min-width: 0; display: flex; align-items: center; }
.page-tools-right { flex: 0 0 auto; display: flex; align-items: center; gap: .5rem; }
@media (max-width: 768px) { .page-tools { flex-wrap: wrap; } .page-tools-right { width: 100%; justify-content: flex-end; } }

/* ---- Datensatzseiten (ADR 0016): Kopf, Workflow-Balken, Rückfrage, Rücksprung, Texte in Reitern, Eingabehilfe ---- */
.record-head { display: flex; align-items: flex-start; gap: 1rem; min-height: 2.6rem; margin-bottom: .35rem; }
/* ws257: Kopf zweizeilig (RecordHeader.SubContent) – Titelzeile, darunter Status, Kennzeichen-Symbole und Warnhinweise */
.record-title-wrap { flex: 1; min-width: 0; }
.record-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .3rem; }
.record-sub .badge { font-size: .8rem !important; vertical-align: baseline; }
/* ws258: Statusschilder in der zweiten Kopfzeile dezent (helle Fläche, farbige Schrift, dünner Rahmen) statt Vollfarbe – alle Seiten mit SubContent */
.record-sub .badge.text-bg-success { background-color: var(--bs-success-bg-subtle) !important; color: var(--bs-success-text-emphasis) !important; border: 1px solid var(--bs-success-border-subtle); }
.record-sub .badge.text-bg-danger { background-color: var(--bs-danger-bg-subtle) !important; color: var(--bs-danger-text-emphasis) !important; border: 1px solid var(--bs-danger-border-subtle); }
.record-sub .badge.text-bg-warning { background-color: var(--bs-warning-bg-subtle) !important; color: var(--bs-warning-text-emphasis) !important; border: 1px solid var(--bs-warning-border-subtle); }
.record-sub .badge.text-bg-primary { background-color: var(--bs-primary-bg-subtle) !important; color: var(--bs-primary-text-emphasis) !important; border: 1px solid var(--bs-primary-border-subtle); }
.record-sub .badge.text-bg-info { background-color: var(--bs-info-bg-subtle) !important; color: var(--bs-info-text-emphasis) !important; border: 1px solid var(--bs-info-border-subtle); }
.record-sub .badge:is(.text-bg-secondary, .text-bg-dark) { background-color: var(--bs-secondary-bg-subtle) !important; color: var(--bs-secondary-text-emphasis) !important; border: 1px solid var(--bs-secondary-border-subtle); }
.record-sub-icons .attr-icons i { font-size: 1rem; margin-right: .35rem; }
body[data-theme] .record-head .page-title { margin: 0; flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.record-meta { flex: 0 0 auto; align-self: stretch; display: flex; flex-direction: column; text-align: right; font-size: .78rem; color: #6b7280; line-height: 1.35; padding-top: .25rem; }
/* Kopf aller Datensatzseiten: oben die Benutzerangaben (angelegt, zuletzt, freigegeben …); die erste Zeile mit einem Verweis oder Knopf
   (z. B. „Verkaufschance anlegen“, Lieferant, Wareneingang) und alles danach steht abgesetzt unten am Kopf direkt über der Leiste */
/* Benutzerangaben und Hilfe-Knopf ganz nach oben: neben die Zurück-Leiste, über die Höhe des Titels hinaus (Jan 22.11.2026) */
.record-head > .record-meta, .record-head > .page-help > .help-btn { margin-top: -2.2rem; }
@media print { .record-head > .record-meta, .record-head > .page-help > .help-btn { margin-top: 0; } }
.record-meta-action, .record-meta > :is(a, button, :has(a, button)):not(:is(a, button, .record-meta-action, :has(a, button)) ~ *) { margin-top: auto; padding-top: .9rem; }
.record-toolbar .rt-actions { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.wf-steps { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin-bottom: .9rem; }
.wf-step { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem; border-radius: .25rem; color: #6c757d; font-size: .88rem; border: 1px solid transparent; }
.wf-step .n { display: inline-flex; width: 1.5rem; height: 1.5rem; border-radius: 50%; align-items: center; justify-content: center; border: 1px solid currentColor; font-size: .75rem; }
.wf-step.active { background: var(--app-accent); color: #fff; font-weight: 600; }
.wf-step.done { color: #198754; }
.wf-step.aborted { background: #6c757d; color: #fff; margin-left: auto; }
button.wf-step.action { background: #198754; color: #fff; border-color: #198754; cursor: pointer; font-weight: 600; }
button.wf-step.action:hover { background: #157347; }
.confirm-ask { display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .5rem; border: 1px solid #f1aeb5; background: #fff0f1; border-radius: .25rem; font-size: .85rem; }
.ws-backbar { display: flex; align-items: center; gap: .5rem; margin: .4rem 1rem 0; min-height: 1.75rem; pointer-events: none; }
.ws-backbar > * { pointer-events: auto; }
body[data-theme] .ws-back { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border: 1px solid var(--bs-border-color); border-radius: 999px; background: #fff; color: #3b424c; font-size: .82rem; cursor: pointer; }
body[data-theme] .ws-back:hover { border-color: var(--app-accent); color: var(--app-accent); }
html:not([data-ws-back]) .ws-back { opacity: .45; pointer-events: none; }
@media print { .ws-backbar { display: none !important; } }
.return-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .5rem .25rem .7rem; background: #fff8e1; border: 1px solid #f0d58c; border-radius: 999px; font-size: .85rem; }
body[data-theme] .return-chip a { color: #5c4300; text-decoration: none; }
.return-chip button { border: 0; background: none; color: #7a5e10; padding: 0 .3rem; cursor: pointer; }
/* Bearbeiter mit Livesuche (UserPicker) */
.user-picker-list { max-height: 20rem; overflow-y: auto; z-index: 1060; top: 100%; left: 0; }
.user-picker-list .dropdown-item.active small { color: inherit !important; }
/* Gruppenauswahl mit Livesuche (ws191): ca. 15 Einträge sichtbar, breiter als das Feld, wenn Bezeichnungen lang sind */
/* Code-/Konfigurationskasten (ws189): Fläche und Schrift aus Bootstrap-Variablen → hell und dunkel lesbar (vorher bg-light: im Dunkeln hell auf hell) */
.code-box { font-family: var(--bs-font-monospace); font-size: .8rem; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bs-tertiary-bg); color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: .5rem .75rem; }
.group-picker { min-width: 0; }
/* Dreistufiger Haken in Suchmasken (ws192): egal · muss (grün ✓) · darf nicht (rot ✗) */
.tri-check { display: flex; align-items: center; gap: .35rem; padding-left: 0; }
.tri-box { width: 1em; height: 1em; flex: 0 0 auto; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; line-height: 1;
    border: 1px solid var(--bs-border-color); border-radius: .25em; background: var(--bs-body-bg); color: #fff; }
.tri-box i { font-size: .75em; }
.tri-box.tri-Must { background: #198754; border-color: #198754; }
.tri-box.tri-Not { background: #dc3545; border-color: #dc3545; }
.tri-box:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 1px; }
.group-picker-list { font-size: .8rem; max-height: 22rem; overflow-y: auto; z-index: 1060; top: 100%; left: 0; min-width: 100%; width: max-content; max-width: min(30rem, 90vw); }
.group-picker-list .dropdown-item code { color: inherit; min-width: 3.5rem; }
.doc-tabs .nav-link .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #198754; margin-left: .3rem; vertical-align: middle; }
.doc-text.bare .doc-text-bar { margin-bottom: .4rem; font-weight: 600; font-size: .85rem; }
.field-help { border: 0; background: none; color: #1e88e5; padding: 0 .25rem; font-size: .8rem; vertical-align: middle; cursor: pointer; }
.field-help.on { color: #0d47a1; }
.field-help-text { font-size: .78rem; color: #0d47a1; background: #eef6fd; border-left: 3px solid #1e88e5; padding: .3rem .5rem; margin-top: .25rem; border-radius: 0 .25rem .25rem 0; }
.side-row.arrange .side-link { cursor: default; color: #6b7280; }
.side-row.arrange .side-star { opacity: 1; color: #6b7280; }
.side-row.arrange .side-star:disabled { opacity: .25; }
/* Hilfe-Fenster unter der Kopfzeile (volle Breite), Knopf bleibt rechts in der Zeile */
.page-head, .record-head { flex-wrap: wrap; }
.page-help { display: contents; }
.page-help .help-btn { order: 2; }
.page-help .help-panel { order: 3; flex: 1 1 100%; margin-top: .5rem; }

/* Einklappbare Blöcke (BlockToggle im Kartenkopf) */
.block-toggle { color: var(--bs-secondary-color); text-decoration: none; display: inline-flex; align-items: center; width: 1.1rem; margin-right: .25rem; cursor: pointer; }
.block-toggle:hover { color: var(--app-accent); }
.doc-tabs .card-header > .block-toggle { align-self: center; }
/* Kleines Dialogfenster (Modal.razor) über Kopfleiste und Seitenmenü */
.modal.d-block { z-index: 1065; }
.modal-backdrop.show { z-index: 1060; }
/* Verschiebbares Fenster (Modal Movable): ohne Abdunklung, Titelleiste ziehen (attachments.js), Größe unten rechts ändern */
.modal-win { position: fixed; z-index: 1065; top: 10vh; left: calc((100vw - min(52rem, 94vw)) / 2); width: min(52rem, 94vw); height: min(75vh, 44rem); min-width: 18rem; min-height: 12rem; max-width: 100vw; max-height: 100vh; resize: both; overflow: hidden; border-radius: .3rem; box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .3); }
.modal-win { --bs-modal-bg: var(--bs-body-bg); --bs-modal-color: var(--bs-body-color); --bs-modal-border-color: var(--bs-border-color); --bs-modal-border-width: var(--bs-border-width); --bs-modal-border-radius: .3rem; --bs-modal-inner-border-radius: .25rem; --bs-modal-header-padding: .25rem .5rem; --bs-modal-header-border-color: var(--bs-border-color); --bs-modal-header-border-width: var(--bs-border-width); --bs-modal-title-line-height: 1.5; --bs-modal-footer-border-color: var(--bs-border-color); --bs-modal-footer-border-width: var(--bs-border-width); --bs-modal-padding: 0; }
.modal-win .modal-content { display: flex; flex-direction: column; }
.modal-win-head { cursor: move; user-select: none; touch-action: none; }
.modal-win-head .modal-title { min-width: 0; }
.modal-win-body { flex: 1 1 auto; min-height: 0; padding: 0; overflow: auto; }
.modal-win.dragging iframe { pointer-events: none; }
/* Anhänge (Fehler & Wünsche): Chips unter dem Beitrag, Vorschau beim Darüberfahren, Ablagefläche beim Schreiben */
.att-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.att-item { display: inline-flex; }
.att-chip { display: inline-flex; align-items: center; max-width: 20rem; padding: .05rem .5rem; border: 1px solid var(--bs-border-color); border-radius: 1rem; background: var(--bs-tertiary-bg); color: var(--bs-body-color); font-size: .8rem; line-height: 1.5; text-decoration: none; cursor: pointer; }
.att-chip:hover { border-color: var(--app-accent); color: var(--bs-body-color); }
.att-chip.pending { cursor: default; }
.att-chip .att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-chip .att-remove { font-size: .55rem; }
.att-pop { display: none; position: fixed; z-index: 1070; width: 20rem; height: 15rem; padding: .25rem; border: 1px solid var(--bs-border-color); border-radius: .25rem; background: var(--bs-body-bg); box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .25); pointer-events: none; }
.att-pop.show { display: block; }
.att-pop img { width: 100%; height: 100%; object-fit: contain; }
.att-pop iframe, .att-view-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--bs-body-bg); }
.att-view { display: flex; align-items: center; justify-content: center; min-height: 100%; padding: .5rem; }
.att-view img { max-width: 100%; height: auto; }
.att-drop { border-radius: .25rem; }
.att-drop.att-over { outline: 2px dashed var(--app-accent); outline-offset: 2px; }

/* Angebotspositionen: feste Spaltenbreiten, nichts verschiebt sich; (?) = Preisherleitung */
.quote-lines { table-layout: fixed; }
.quote-lines td:not([colspan]) { overflow: hidden; text-overflow: ellipsis; }
.quote-lines input.form-control-sm { padding-left: .3rem; padding-right: .3rem; }
.price-why { color: var(--bs-secondary-color); text-decoration: none; cursor: pointer; flex: 0 0 auto; }
.price-why:hover { color: var(--app-accent); }

/* HTML-Editor: Tabellen */
.html-editor-tablepanel { position: absolute; top: 100%; left: 0; z-index: 30; min-width: 11rem; }
.mail-textmodule-panel { width: 22rem; }
.mail-textmodule-panel .list-group-item { white-space: normal; }
.html-editor-area table { min-width: 30%; }
.html-editor-area table td, .html-editor-area table th { min-width: 3rem; }
.html table th { background: #f3f4f6; font-weight: 600; }

/* Angebotspositionen: gesperrte Zahlenfelder (Paket) sehen aus wie Eingabefelder, nur grau */
.quote-lines .num-ro { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; }
.quote-lines .price-why { width: 1.1rem; text-align: center; }
/* Verlauf: Höhe begrenzt, nach Tagen gruppiert */
.history-scroll { max-height: 18rem; overflow-y: auto; padding-right: .25rem; }
.history-day { position: sticky; top: 0; background: var(--bs-body-bg); font-weight: 600; font-size: .8rem; padding: .15rem 0; border-bottom: 1px solid var(--bs-border-color); margin-bottom: .25rem; z-index: 1; }

/* Vorlagen-Designer */
.tpl-frame { width: 100%; height: 78vh; border: 1px solid var(--bs-border-color); border-radius: .25rem; background: #e9ecef; }
.tpl-source { height: 78vh; font-size: .8rem; }
.tpl-preview { width: 100%; height: 75vh; border: 1px solid var(--bs-border-color); background: #fff; }
.tpl-fields { max-height: 62vh; overflow: auto; }
.tpl-tree .tpl-tree { padding-left: .9rem; border-left: 1px dashed var(--bs-border-color); margin-left: .3rem; }
.tpl-tree summary { cursor: pointer; }
.tpl-field-link { text-decoration: none; cursor: pointer; }
.tpl-field-link:hover { color: var(--app-accent); }
.tpl-img-width { width: 4.5rem; }

/* ---- Hilfe-Sprechblase (HelpBubble) ---- */
.help-q-wrap { position: relative; display: inline-flex; vertical-align: middle; }
.help-q { width: 1.15rem; height: 1.15rem; border-radius: 50%; border: 1px solid #8a919c; background: transparent; color: #5f6773; font-size: .7rem; font-weight: 700; line-height: 1; padding: 0; display: inline-grid; place-items: center; cursor: pointer; }
.help-q:hover, .help-q.on { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.help-bubble-backdrop { position: fixed; inset: 0; z-index: 1050; background: transparent; cursor: default; }
.help-bubble { position: absolute; top: calc(100% + .55rem); left: -.6rem; z-index: 1051; width: max-content; max-width: min(22rem, 80vw); background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); border-radius: .375rem; box-shadow: 0 .25rem 1rem rgba(28,33,40,.14); padding: .55rem 1.9rem .6rem .75rem; font-size: .8rem; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal; outline: none; }
.help-bubble::before { content: ""; position: absolute; top: -.4rem; left: .85rem; width: .7rem; height: .7rem; background: var(--bs-body-bg); border-left: 1px solid var(--bs-border-color); border-top: 1px solid var(--bs-border-color); transform: rotate(45deg); }
/* nie die Seite verbreitern: auch vor dem Platzieren (easyHelp.place) fest positioniert – zählt nicht zur Scrollbreite */
.help-bubble { position: fixed; top: auto; left: auto; }
.help-bubble.placed { position: fixed; }
.help-bubble.placed::before { left: var(--arrow-left, .85rem); }
.help-bubble.placed.above::before { top: auto; bottom: -.4rem; transform: rotate(225deg); }
.help-bubble-x { position: absolute; top: .2rem; right: .45rem; color: #8a919c; text-decoration: none; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.help-bubble-x:hover { color: var(--app-accent); }
.help-bubble-meta { display: block; margin-top: .35rem; color: #5f6773; }
.help-bubble-meta code { font-size: .72rem; color: #5f6773; }

/* ---- Einstellungen (Kacheln + Bereichskarte) ---- */
/* Kacheln kompakt (ADR 0071): eine Zeile Symbol · Name · (?) · Zähler; die Schaltfläche deckt die Kachel ab, (?) liegt darüber */
.set-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .45rem; margin-bottom: 1rem; }
.set-tile { position: relative; background: #fff; border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: .35rem .5rem; display: flex; align-items: center; gap: .4rem; min-width: 0; transition: border-color .12s, box-shadow .12s; color: inherit; }
.set-tile:hover { border-color: var(--app-accent); box-shadow: 0 .2rem .6rem rgba(28,33,40,.08); }
.set-tile.on { border-color: var(--app-accent); box-shadow: inset 3px 0 0 var(--app-accent), 0 .2rem .6rem rgba(28,33,40,.08); }
.set-tile-btn { display: flex; align-items: center; gap: .45rem; min-width: 0; border: 0; background: transparent; padding: 0; color: inherit; text-decoration: none; font-weight: 600; font-size: .86rem; text-align: left; cursor: pointer; }
.set-tile-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.set-tile-btn:hover { color: inherit; }
.set-tile-btn:focus-visible { outline: none; }
.set-tile:has(.set-tile-btn:focus-visible) { outline: 2px solid var(--app-accent); outline-offset: 1px; }
.set-tile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-tile .help-q-wrap { position: relative; z-index: 1; flex: none; }
.set-tile .help-q-wrap:has(.help-bubble) { z-index: 5; }
.set-tile-chips { margin-left: auto; display: flex; gap: .25rem; flex: none; pointer-events: none; }
.set-tile-link { border-style: dashed; }
.set-tile-ico { width: 1.6rem; height: 1.6rem; border-radius: .3rem; display: grid; place-items: center; background: #fbeaea; color: var(--app-accent); font-size: .85rem; flex: none; }
.set-tabs { padding: .5rem 1rem 0; }
.set-tabs .nav-link { padding: .35rem .8rem; font-size: .85rem; color: #5f6773; }
.set-tabs .nav-link.active { color: var(--app-accent); font-weight: 600; }
.set-chip { display: inline-flex; align-items: center; gap: .2rem; font-size: .7rem; padding: .05rem .45rem; border-radius: 999px; border: 1px solid var(--bs-border-color); color: #5f6773; background: #f8f9fb; white-space: nowrap; }
.set-chip.set { color: #0b5ed7; background: #e7f1ff; border-color: transparent; }
.set-chip.dirty { color: #8a5a00; background: #fff3d6; border-color: transparent; }
.set-chip.ok { color: #1f7a45; background: #e5f4ea; border-color: transparent; }
.set-chip.warn { color: #8a5a00; background: #fff3d6; border-color: transparent; }
.set-panel { background: #fff; border: 1px solid var(--bs-border-color); border-radius: .375rem; box-shadow: 0 .25rem .9rem rgba(28,33,40,.06); }
.set-panel-head { position: sticky; top: var(--ws-top); z-index: 6; background: #fff; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .7rem 1rem; border-bottom: 1px solid var(--bs-border-color); border-radius: .375rem .375rem 0 0; }
.set-panel-head h2 { margin: 0; font-size: 1.1rem; }
.set-panel-head .set-desc { color: #5f6773; font-size: .8rem; }
.set-panel-head .set-actions { margin-left: auto; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.set-sec { padding: .9rem 1rem; border-bottom: 1px solid var(--bs-border-color); }
.set-sec:last-child { border-bottom: 0; }
.set-sec h3 { margin: 0 0 .7rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #5f6773; font-weight: 600; }
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.2rem; }
.set-grid .wide { grid-column: 1 / -1; }
.set-label { display: flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .85rem; margin-bottom: .25rem; }
.set-meta { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .25rem; font-size: .72rem; color: #5f6773; }
.set-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--bs-border-color); border-radius: .25rem; overflow: hidden; }
.set-seg button { border: 0; border-right: 1px solid var(--bs-border-color); background: #fff; padding: .3rem .65rem; font-size: .85rem; }
.set-seg button:last-child { border-right: 0; }
.set-seg button.on { background: var(--app-accent); color: #fff; }
.set-toggle { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; user-select: none; margin: .2rem 0 0; }
.set-toggle input { appearance: none; width: 2.4rem; height: 1.35rem; border-radius: 999px; background: #d3d7dd; position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.set-toggle input::after { content: ""; position: absolute; top: .18rem; left: .18rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.set-toggle input:checked { background: var(--app-accent); }
.set-toggle input:checked::after { left: 1.22rem; }
.set-toggle input:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }
.set-callout { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .75rem; border-radius: .25rem; background: #fff3d6; color: #6b4600; font-size: .85rem; }
.set-callout.ok { background: #e5f4ea; color: #155c34; }
/* Selbsttest Texterkennung (ADR 0034 Nachtrag) */
.set-callout.fail { background: #fbeaea; color: #8f1d22; }
.ocr-checks { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .85rem; }
.ocr-checks li { display: grid; grid-template-columns: 1.2rem 12rem 1fr auto; gap: .5rem; align-items: baseline; padding: .3rem .25rem; border-bottom: 1px solid var(--bs-border-color-translucent); }
.ocr-checks li:last-child { border-bottom: 0; }
.ocr-checks .ocr-step { font-weight: 600; }
.ocr-checks .ocr-detail { overflow-wrap: anywhere; }
.ocr-checks .ocr-ms { color: #5f6773; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ocr-checks li.ok i { color: #1e7b45; } .ocr-checks li.warn i { color: #b07300; } .ocr-checks li.fail i { color: #b42318; } .ocr-checks li.skip { color: #5f6773; }
@media (max-width: 760px) { .ocr-checks li { grid-template-columns: 1.2rem 1fr; } .ocr-checks .ocr-detail, .ocr-checks .ocr-ms { grid-column: 2; } }
@media (max-width: 760px) { .set-grid { grid-template-columns: 1fr; } .set-panel-head { position: static; } }
@media (prefers-reduced-motion: reduce) { .set-tile, .set-toggle input, .set-toggle input::after { transition: none; } }
/* Mailanbindung (ADR 0071): eine Karte je Postfach, ab genügender Inhaltsbreite zwei bzw. drei nebeneinander */
.mc-grid { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@container ws-content (min-width: 900px) { .mc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container ws-content (min-width: 1500px) { .mc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mc-card { background: #fff; border: 1px solid var(--bs-border-color); border-radius: .375rem; display: flex; flex-direction: column; min-width: 0; }
.mc-card.off { background: #fcfcfd; }
.mc-head { display: flex; align-items: center; gap: .5rem; padding: .55rem .8rem; border-bottom: 1px solid var(--bs-border-color); box-shadow: inset 0 3px 0 var(--app-accent); border-radius: .375rem .375rem 0 0; }
.mc-card.off .mc-head { box-shadow: inset 0 3px 0 #d3d7dd; }
.mc-head h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.mc-head .set-toggle { margin: 0 0 0 auto; }
.mc-body { padding: .7rem .8rem; display: grid; gap: .6rem; }
.mc-state { display: grid; grid-template-columns: 8.5rem 1fr; gap: .2rem .6rem; font-size: .82rem; }
.mc-state dt { color: #5f6773; font-weight: 400; }
.mc-state dd { margin: 0; overflow-wrap: anywhere; }
.mc-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .55rem .8rem; border-top: 1px solid var(--bs-border-color); }
/* IMAP/SMTP-Angaben je Postfach (ADR 0178) */
.mc-imap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .6rem; padding-top: .5rem; border-top: 1px dashed var(--bs-border-color); }
.mc-imap .full { grid-column: 1 / -1; }
.mc-imap .mc-port { width: 5.5rem; flex: none; }

/* ---- Status-Auswahl als Chips (StatusPicker) ---- */
.chip-box { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; min-height: 2.1rem; padding: .25rem .35rem; border: 1px solid var(--bs-border-color); border-radius: .25rem; background: var(--bs-body-bg); }
.chip-box-empty { color: #5f6773; font-size: .82rem; padding: 0 .25rem; }
.chip-box-chip { display: inline-flex; align-items: center; gap: .25rem; background: #fbeaea; color: #8f1d22; border-radius: 999px; padding: .1rem .2rem .1rem .6rem; font-size: .8rem; font-weight: 600; }
.chip-box-x { color: inherit; text-decoration: none; width: 1.1rem; height: 1.1rem; border-radius: 50%; display: inline-grid; place-items: center; line-height: 1; cursor: pointer; }
.chip-box-x:hover { background: var(--app-accent); color: #fff; }
.chip-box-add-wrap { position: relative; display: inline-flex; }
.chip-box-add { font-size: .8rem; color: #5f6773; text-decoration: none; border: 1px dashed #b9bfc8; border-radius: 999px; padding: .08rem .55rem; cursor: pointer; }
.chip-box-add:hover { color: var(--app-accent); border-color: var(--app-accent); }
.chip-box-menu { position: absolute; top: calc(100% + .3rem); left: 0; z-index: 1051; min-width: 12rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .375rem; box-shadow: 0 .25rem 1rem rgba(28,33,40,.14); padding: .25rem; display: flex; flex-direction: column; }
.chip-box-opt { padding: .3rem .55rem; border-radius: .25rem; color: inherit; text-decoration: none; cursor: pointer; font-size: .85rem; white-space: nowrap; }
.chip-box-opt:hover { background: #fbeaea; color: #8f1d22; }

/* Einstellungen: Bereiche mit mehreren Abschnitten als Karten nebeneinander */
.set-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: .9rem; padding: .9rem 1rem 1rem; align-items: start; }
.set-sections .set-sec { border: 1px solid var(--bs-border-color); border-radius: .375rem; background: #fcfcfd; }
.set-sections .set-sec:last-child { border-bottom: 1px solid var(--bs-border-color); }
.set-sections .set-grid { grid-template-columns: minmax(0, 1fr); }
.set-sections .set-sec, .set-split .set-sec-main { min-width: 0; }
.set-sec .set-chip { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
/* Abschnittsmenü (ADR 0099 Nachtrag): bei mehr als zwei Abschnitten links die Abschnitte, rechts der gewählte in voller Breite */
.set-split { display: grid; grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr); align-items: start; }
.set-secnav { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .5rem; border-right: 1px solid var(--bs-border-color); position: sticky; top: calc(var(--ws-top) + 3.5rem); }
.set-secnav-item { display: flex; align-items: center; gap: .4rem; width: 100%; text-align: left; border: 0; background: transparent; color: var(--bs-body-color); padding: .4rem .6rem; border-radius: .3rem; font-size: .85rem; }
.set-secnav-item:hover { background: var(--bs-tertiary-bg); }
.set-secnav-item.on { background: var(--bs-secondary-bg); color: var(--app-accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--app-accent); }
.set-secnav-name { flex: 1 1 auto; min-width: 0; }
[data-bs-theme="dark"] .set-secnav-item.on { color: var(--bs-emphasis-color); }
.set-secnav-item .set-chip { flex: 0 0 auto; }
.set-split .set-sec-main { border-bottom: 0; }
@media (max-width: 760px) { .set-split { grid-template-columns: 1fr; } .set-secnav { position: static; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--bs-border-color); } .set-secnav-item { width: auto; } }
@media (max-width: 760px) { .set-sections { grid-template-columns: 1fr; } }

/* ---- Abteilungs-Cockpits ---- */
.cp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .7rem; margin-bottom: 1.1rem; }
.cp-tile { display: flex; flex-direction: column; gap: .15rem; padding: .8rem .9rem; background: #fff; border: 1px solid var(--bs-border-color); border-radius: .375rem; color: inherit; text-decoration: none; position: relative; overflow: hidden; transition: box-shadow .12s, transform .12s; }
.cp-tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: #c9ced6; }
.cp-tile.ok::before { background: #1f7a45; } .cp-tile.warn::before { background: #e0a100; } .cp-tile.alert::before { background: var(--app-accent); }
.cp-tile:hover { box-shadow: 0 .25rem .9rem rgba(28,33,40,.08); transform: translateY(-1px); color: inherit; }
.cp-tile-head { display: flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .85rem; color: #3b424c; }
.cp-tile-head i { color: var(--app-accent); }
.cp-tile-value { font-size: 1.9rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cp-tile.alert .cp-tile-value { color: var(--app-accent); }
.cp-tile-hint { font-size: .78rem; color: #5f6773; }
/* Kachel/Liste aus einem anderen Cockpit (persönliche Auswahl, ADR 0041) */
.cp-tile-area { align-self: flex-start; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #6c757d; background: #f1f3f5; border-radius: .25rem; padding: 0 .35rem; }
.cp-list h2 .cp-tile-area { vertical-align: middle; }
.cp-picker-list { max-height: 22rem; overflow: auto; }
/* Abfrage-Diagramm (ADR 0045): eine Reihe in Datenfarbe (validiert, nicht die Signalfarbe Rot), Texte in Textfarben, dünne Balken mit runder Spitze */
.qc { --qc-series: #2a78d6; --qc-grid: #e6e8eb; padding: .75rem 1rem .5rem; border-bottom: 1px solid var(--bs-border-color); }
.qc-title { font-size: .8rem; font-weight: 600; color: #3b424c; margin-bottom: .5rem; }
.qc-bars { display: grid; gap: 2px; }
.qc-bar { display: grid; grid-template-columns: minmax(6rem, 28%) 1fr; align-items: center; gap: .5rem; font-size: .78rem; min-height: 22px; }
.qc-bar:hover .qc-barfill { filter: brightness(.88); }
.qc-barlabel { color: #3b424c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.qc-bartrack { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.qc-barfill { height: 16px; background: var(--qc-series); border-radius: 0 4px 4px 0; min-width: 2px; flex: none; }
.qc-barvalue { color: #5f6773; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qc-cols { position: relative; height: 200px; margin: .25rem 0 1.6rem 3.2rem; }
.qc-grid { position: absolute; inset: 0; pointer-events: none; }
.qc-gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--qc-grid); }
.qc-gridline span { position: absolute; right: calc(100% + .35rem); top: -.55rem; font-size: .7rem; color: #6c757d; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qc-colwrap { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.qc-col { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.qc-col:hover .qc-colbar { filter: brightness(.88); }
.qc-colbar { width: 100%; max-width: 24px; background: var(--qc-series); border-radius: 4px 4px 0 0; min-height: 1px; }
.qc-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .75rem; color: #3b424c; margin-bottom: .5rem; }
.qc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.qc-colstack { width: 100%; max-width: 24px; display: flex; flex-direction: column-reverse; gap: 2px; min-height: 1px; }
.qc-colstack .qc-seg:last-child { border-radius: 4px 4px 0 0; }
.qc-barstack { display: flex; gap: 2px; height: 16px; min-width: 2px; flex: none; }
.qc-barstack .qc-seg:last-child { border-radius: 0 4px 4px 0; }
.qc-seg { min-width: 1px; min-height: 1px; }
.qc-col:hover .qc-colstack, .qc-bar:hover .qc-barstack { filter: brightness(.9); }
.qc-collabel { position: absolute; top: calc(100% + .25rem); font-size: .65rem; color: #6c757d; white-space: nowrap; }
.qc-col:not(:first-child):not(:last-child):not(:nth-child(3n+1)) .qc-collabel { visibility: hidden; }
/* Auswertungen (ADR 0042): Summenzeile unter der Trefferliste, Wertbalken in Zellen */
.search-mask-foot td { position: sticky; bottom: 0; background: #f1f3f5; font-weight: 600; border-top: 2px solid #3b424c; font-variant-numeric: tabular-nums; }
.an-bar { position: relative; white-space: nowrap; }
.an-bar > i { position: absolute; inset: 15% auto 15% 0; background: rgba(193, 18, 31, .12); border-radius: 2px; pointer-events: none; }
.an-bar > span { position: relative; }
.an-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .6rem; margin-bottom: .75rem; }
.an-kpi { background: #fff; border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: .5rem .75rem; }
.an-kpi b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.an-kpi span { font-size: .75rem; color: #5f6773; }
.cp-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: .9rem; align-items: start; margin-bottom: 1.2rem; }
.cp-list { background: #fff; border: 1px solid var(--bs-border-color); border-radius: .375rem; }
.cp-list header { display: flex; align-items: baseline; gap: .5rem; padding: .6rem .9rem; border-bottom: 1px solid var(--bs-border-color); }
.cp-list header h2 { font-size: .95rem; margin: 0; flex: 1; }
.cp-list header a { font-size: .8rem; }
.cp-list ul { list-style: none; margin: 0; padding: 0; }
.cp-list li { display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-bottom: 1px solid #eef0f3; }
.cp-list li:last-child { border-bottom: 0; }
.cp-list li a { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.cp-list li a:hover .cp-row-label { color: var(--app-accent); }
.cp-row-label { font-weight: 600; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-row-detail { font-size: .78rem; color: #5f6773; }
.cp-badge { font-size: .7rem; padding: .05rem .45rem; border-radius: 999px; background: #fff3d6; color: #8a5a00; white-space: nowrap; }
.cp-empty { margin: 0; padding: .8rem .9rem; color: #1f7a45; font-size: .85rem; }
.cp-planned-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #5f6773; margin: 0 0 .5rem; }
.cp-planned { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .7rem; }
.cp-planned-tile { display: flex; flex-direction: column; gap: .25rem; padding: .75rem .9rem; border: 1px dashed #b9bfc8; border-radius: .375rem; background: #fafbfc; }
.cp-planned-tile .cp-tile-head i { color: #8a919c; }
.cp-soon { font-size: .7rem; color: #8a919c; margin-top: .2rem; }
@media (prefers-reduced-motion: reduce) { .cp-tile { transition: none; } }

/* Unser Unternehmen */
.co-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .6rem; }
.co-fact { position: relative; display: flex; align-items: center; gap: .7rem; background: #fff; border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: .6rem .8rem; }
.co-fact > i { font-size: 1.3rem; color: var(--app-accent); }
.co-fact strong { display: block; font-size: 1.1rem; line-height: 1.1; }
.co-fact span { font-size: .78rem; color: #5f6773; }
.co-fact:has(a):hover { border-color: var(--app-accent); }
.co-logo { border: 1px dashed var(--bs-border-color); border-radius: .375rem; padding: .6rem; background: #fff; text-align: center; }
.co-logo img { max-height: 4rem; max-width: 100%; }
/* Probelauf der Tätigkeitsfelder (ADR 0204) */
.bl-preview { border-left: 3px solid var(--app-accent); padding: .35rem .6rem; background: var(--bs-tertiary-bg); border-radius: .25rem; }
/* Bau-Ablauf der Ausschreibung an der Verkaufschance (ADR 0206) */
.tender-steps { display: flex; flex-wrap: wrap; gap: .25rem; }
.tender-step { padding: .1rem .45rem; border: 1px solid var(--bs-border-color); border-radius: .25rem; color: var(--bs-secondary-color); }
.tender-step.done { color: var(--bs-body-color); background: var(--bs-tertiary-bg); }
.tender-step.current { color: var(--app-link); border-color: var(--app-link); font-weight: 600; }
.ds-periods { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

/* Gleichzeitige Bearbeitung (ADR 0023) */
.edit-presence .badge { font-weight: 500; }

/* Stücklisten-Baum: kompakt, Spalten eng beieinander */
.bom-tree { font-size: .82rem; width: auto; min-width: 100%; }
.bom-tree th, .bom-tree td { padding: .25rem .45rem; }
.bom-tree th { white-space: nowrap; }
.bom-tree .bom-text { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bom-tree .badge { font-weight: 500; }
/* Auftragsstückliste – Struktur ohne Querscrollen (Jan 15.11.2026): BMK/Zeichnung → Techn. Text/Kennz. → Fertig/Ist → Abmessung/Erfüllerstückliste → ME */
.bt-fit { container-type: inline-size; container-name: bomtree; overflow-x: hidden; }
.bt-fit .bom-tree td[colspan] { display: table-cell !important; }
@container bomtree (max-width: 110rem) { .bt-fit .bom-tree > thead > tr > th:nth-child(13), .bt-fit .bom-tree > tbody > tr > td:nth-child(13), .bt-fit .bom-tree > thead > tr > th:nth-child(15), .bt-fit .bom-tree > tbody > tr > td:nth-child(15) { display: none; } }
@container bomtree (max-width: 95rem) { .bt-fit .bom-tree > thead > tr > th:nth-child(5), .bt-fit .bom-tree > tbody > tr > td:nth-child(5), .bt-fit .bom-tree > thead > tr > th:nth-child(14), .bt-fit .bom-tree > tbody > tr > td:nth-child(14) { display: none; } }
@container bomtree (max-width: 80rem) { .bt-fit .bom-tree > thead > tr > th:nth-child(8), .bt-fit .bom-tree > tbody > tr > td:nth-child(8), .bt-fit .bom-tree > thead > tr > th:nth-child(9), .bt-fit .bom-tree > tbody > tr > td:nth-child(9) { display: none; } }
@container bomtree (max-width: 66rem) { .bt-fit .bom-tree > thead > tr > th:nth-child(6), .bt-fit .bom-tree > tbody > tr > td:nth-child(6), .bt-fit .bom-tree > thead > tr > th:nth-child(12), .bt-fit .bom-tree > tbody > tr > td:nth-child(12) { display: none; } }
@container bomtree (max-width: 52rem) { .bt-fit .bom-tree > thead > tr > th:nth-child(10), .bt-fit .bom-tree > tbody > tr > td:nth-child(10) { display: none; } }
/* Aufgerufene Position (ADR 0163, ?zeile=…): nur Bootstrap-Variablen – folgt dem Darkmodus von selbst */
.bom-tree tr.bom-focus > * { --bs-table-bg-state: var(--bs-warning-bg-subtle); }
.bom-tree tr.bom-focus > td:first-child { box-shadow: inset 3px 0 0 var(--bs-warning), inset 0 0 0 9999px var(--bs-warning-bg-subtle); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 1.25rem; row-gap: .2rem; margin: 0; max-width: 48rem; }
.kv dt { font-weight: 600; } .kv dd { margin: 0; }

/* ---------------------------------------------------------------- Blöcke (ADR 0026): klappbar, maximierbar im Seitenrahmen */
.card.block { margin-bottom: .75rem; }
.block-head .block-title { font-weight: 600; }
.card.block-max { position: fixed; top: max(var(--frame-top, 4rem), calc(var(--ws-top) + .5rem)); left: var(--frame-left, 1rem); width: var(--frame-width, calc(100vw - 2rem)); bottom: calc(var(--ws-status-h) + .5rem);
    z-index: 1040; margin: 0; display: flex; flex-direction: column; box-shadow: 0 .5rem 2rem rgba(0,0,0,.25); }
.card.block-max > .block-body { flex: 1 1 auto; overflow: auto; }
.card.block-max .table-responsive { max-height: none !important; }
body.has-block-max { overflow: hidden; }
body.has-block-max .record-toolbar, body.has-block-max .wf-steps { visibility: hidden; }
/* Artikel, Reiter Bild/Zeichnung gestapelt (ab 992 px Fenster, Inhalt schmaler als 1150 px): feste Fläche für Bild bzw. PDF.
   Nebeneinander füllt der Block die Höhe des Stammdaten-Blocks (siehe .article-blocks, ADR 0099). */
@media (min-width: 992px) { @container ws-content (max-width: 1149.98px) { .article-blocks > div:not(.article-side) > .card.side-image > .block-body { height: min(70vh, 40rem); } } }

/* ---------------------------------------------------------------- Reiterblock mit fester Höhe (ADR 0099)
   .ws-tabbody = Inhaltsbereich unter einer Reiterleiste (.nav-tabs): immer gleich hoch (--tabbody-h), kürzere Reiter schrumpfen nicht,
   längere scrollen innen – die Seite springt beim Reiterwechsel nicht mehr. Höhe je Verwendung als CSS-Wert über --tabbody-h am Element oder
   einem Vorfahren (nie zur Laufzeit messen); schmal/gestapelt Höhe nach Inhalt bis --tabbody-max. Tabellenköpfe kleben oben im Scrollbereich;
   .table-responsive gibt das Scrollen dafür an den Reiterblock ab (sonst wäre die Tabelle selbst der Scrollbereich und „sticky“ wirkungslos).
   Nur Bootstrap-Variablen → hell/dunkel ohne Generatorlauf. Verwendet von: Projektmanagement (PmPanel), Artikel „Zugehörige Daten“,
   Mein Vertriebstag (Reiter je Tag). Maximiert (.block-max) scrollt der ganze Blockinhalt. */
.ws-tabbody { height: var(--tabbody-h, 32rem); overflow-y: auto; overflow-x: hidden; position: relative; } /* ws192: nie horizontal scrollen (Gestaltungsregel) */
/* ws256 (Jan 14.11.2026: Mausrad über „Zugehörige Daten“ wurde ignoriert): kein overscroll-behavior: contain – Chromium sperrt damit die
   Weitergabe an die Seite auch dann, wenn der Reiterinhalt gar nichts zu scrollen hat (kurzer Reiter) bzw. unten angekommen ist. */
.ws-tabbody .table-responsive:not([style*="max-height"]) { overflow: visible; }
.ws-tabbody thead th { position: sticky; top: 0; z-index: 2; background-color: var(--bs-body-bg); box-shadow: inset 0 -1px 0 var(--bs-border-color); }
@media (max-width: 767.98px) { .ws-tabbody { height: auto; max-height: var(--tabbody-max, 70vh); } }
@container ws-content (max-width: 767.98px) { .ws-tabbody { height: auto; max-height: var(--tabbody-max, 70vh); } }
.card.block-max .ws-tabbody { height: auto; max-height: none; overflow: visible; }
/* Gestaltungsregel „nie horizontal scrollen“ (Jan 08./09.11.2026, ws190): Tabelle passt sich der Blockbreite an – feste Spaltenaufteilung,
   lange Inhalte brechen um bzw. werden mit „…“ gekürzt (title zeigt alles); Details und Bearbeiten im Popup. */
.tbl-fit { table-layout: fixed; width: 100%; }
.tbl-fit > :not(caption) > * > * { overflow-wrap: anywhere; }
.tbl-fit .text-truncate { max-width: 0; }
/* Nachbestellung: feste Spalten (Kurzbezeichnungen mit Tooltip), Menge + Einheit in fester Aufteilung, schmale Blöcke blenden Spalten aus */
.rpl-fit th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpl-fit .rc-sel { width: 2rem; } .rpl-fit .rc-no { width: 7.5rem; } .rpl-fit .rc-loc { width: 5.5rem; } .rpl-fit .rc-q { width: 4.6rem; } .rpl-fit .rc-mm { width: 6.5rem; }
.rpl-fit .rc-date { width: 8.5rem; } .rpl-fit .rc-sup { width: 9rem; } .rpl-fit .rc-qty { width: 9.5rem; }
.rpl-qty { display: grid; grid-template-columns: minmax(0, 1fr) 3.2rem; gap: .3rem; align-items: center; }
.rpl-qty .rpl-unit { font-size: .78rem; text-align: left; }
@container ws-content (max-width: 82rem) { .rpl-fit :is(th, td):is(:nth-child(10), :nth-child(11), :nth-child(14)) { display: none; } }
@container ws-content (max-width: 60rem) { .rpl-fit :is(th, td):is(:nth-child(4), :nth-child(6), :nth-child(7), :nth-child(12)) { display: none; } }
/* Projektmanagement: so hoch wie der Reiter „Risiken“ (Matrix + Kennzahlen + einige Zeilen), höchstens drei Viertel des Fensters */
.pm-panel { --tabbody-h: min(34rem, 75vh); }
/* ws192: Projektmanagement ohne horizontale Scrollbalken (Gestaltungsregel Jan) – Tabellen so breit wie der Block, weniger wichtige Spalten
   blenden bei schmalem Block aus (Details und Bearbeiten im Popup der Zeile); maximiert sind alle Spalten zu sehen. */
.pm-panel .ws-tabbody { overflow-x: hidden; container-type: inline-size; container-name: pmbody; }
.pm-panel .pm-pane-fit { overflow-x: hidden; }
.pm-panel .table.pm-fit { width: 100%; }
.pm-panel .table.pm-fit td { overflow-wrap: anywhere; }
.pm-panel .table.pm-fit td[colspan] { display: table-cell !important; } /* Hinweiszeilen („Keine … erfasst“) nie ausblenden */
@container pmbody (max-width: 64rem) {
    .pm-t-ms :is(th, td):is(:nth-child(3), :nth-child(8)),
    .pm-t-qc :is(th, td):is(:nth-child(2), :nth-child(3)),
    .pm-t-is :is(th, td):is(:nth-child(1), :nth-child(4)),
    .pm-t-rk :is(th, td):is(:nth-child(1), :nth-last-child(3), :nth-last-child(4)),
    .pm-t-sh :is(th, td):is(:nth-child(3), :nth-child(4)),
    .pm-t-rp :is(th, td):is(:nth-child(3), :nth-child(4), :nth-child(5), :nth-child(6), :nth-last-child(2)),
    .pm-t-po :is(th, td):nth-child(3) { display: none; }
}
@container pmbody (max-width: 48rem) {
    .pm-t-ms :is(th, td):is(:nth-child(4), :nth-child(7)),
    .pm-t-qc :is(th, td):nth-child(5),
    .pm-t-is :is(th, td):is(:nth-child(2), :nth-child(5)),
    .pm-t-rk :is(th, td):nth-child(3),
    .pm-t-sh :is(th, td):nth-last-child(3),
    .pm-t-rp :is(th, td):nth-child(8),
    .pm-t-co :is(th, td):is(:nth-child(3), :nth-child(6)),
    .pm-t-po :is(th, td):nth-child(2) { display: none; }
}
.po-pay i { margin-right: .25rem; }

/* Status-Leiste der Suchmasken (StatusSteps): nummerierte Punkte auf einer Linie, Mehrfachauswahl per Klick */
/* ws189: Mindestabstand zwischen den Beschriftungen und Wachsen in freien Platz (Suchzeile); bei Enge zweizeilig statt Überlappung */
.status-steps-wrap { margin-top: .4rem; display: flex; flex-direction: column; gap: .15rem; flex: 1 1 auto; min-width: min(100%, calc(var(--ss-count, 4) * 7.5rem)); }
.status-steps { position: relative; display: flex; justify-content: space-between; column-gap: 1.25rem; padding: 0 .1rem; }
.status-steps::before { content: ""; position: absolute; left: .55rem; right: .55rem; bottom: .5rem; height: 3px; background: #cfd4da; border-radius: 2px; }
.ss-step { position: relative; z-index: 1; background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: .25rem; cursor: pointer; color: #3d4550; font-size: .82rem; line-height: 1.2; }
.ss-step:first-child { align-items: flex-start; }
.ss-step:last-child { align-items: flex-end; }
.ss-label { white-space: nowrap; }
.ss-dot { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid #9aa3ad; background: #fff; transition: border-color .15s, background .15s; }
.ss-step:hover .ss-dot { border-color: var(--app-accent); }
.ss-step:hover .ss-label { color: var(--app-accent); }
.ss-step.on .ss-dot { border-color: var(--app-accent); background: var(--app-accent); box-shadow: inset 0 0 0 3px #fff; }
.ss-step.on .ss-label { color: var(--app-accent); font-weight: 600; }
.ss-step:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; border-radius: .25rem; }
.ss-hint { font-size: .75rem; color: #5f6773; text-align: right; min-height: 1.1rem; }
.ss-hint a { color: inherit; cursor: pointer; }
@media (max-width: 768px) { .ss-label { white-space: normal; max-width: 6rem; text-align: center; } }

/* Suchleiste über die volle Breite: Datensatzleiste und Aktionen der Seite stehen in einer gemeinsamen Leiste (ADR 0031) */
.page-tools:has(.record-toolbar) { padding: .35rem .5rem; background: #fff; border: 1px solid #e5e7eb; border-radius: .25rem; }
.page-tools:has(.record-toolbar) .record-toolbar { flex: 1; padding: 0; border: 0; background: none; }
.page-tools:has(.record-toolbar) .page-tools-right { padding-left: .5rem; border-left: 1px solid #e5e7eb; }
.page-tools:has(.record-toolbar) .page-tools-right .btn { padding: .2rem .6rem; font-size: .85rem; }

/* ---------- Kopf der Datensatzseiten (ADR 0035): Beschriftung links, Wert rechts – einheitlich in allen Ansichten ---------- */
.head-col { display: flex; flex-direction: column; gap: .3rem; }
.head-field { display: grid; grid-template-columns: minmax(8rem, 38%) 1fr; align-items: center; gap: .5rem; min-height: 1.9rem; }
.head-field .hf-label { font-size: .8rem; color: var(--bs-secondary-color); margin: 0; line-height: 1.15; }
.head-field .hf-value { min-width: 0; font-size: .875rem; }
.head-field .hf-value > .form-control, .head-field .hf-value > .form-select, .head-field .hf-value > .input-group { width: 100%; }
.head-field .hf-static { padding: .2rem .5rem; border: 1px solid transparent; border-radius: var(--bs-border-radius-sm); background: var(--bs-tertiary-bg); min-height: 1.9rem; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.head-field.wide { grid-template-columns: minmax(8rem, 19%) 1fr; }
@media (max-width: 575.98px) { .head-field, .head-field.wide { grid-template-columns: 1fr; gap: .1rem; } }
.search-mask .card-body { padding-bottom: .75rem; }

/* ---------- Maskenraster (ADR 0197): Bezeichnung links, Feldbreite nach Inhalt – Standard für alle Masken ----------
   Jedes Feldraster (row bzw. .art-fieldgrid mit mindestens zwei Zellen „form-label + Feld“) wird ohne Zutun der Seite zum Raster aus
   gleich breiten Spuren: so viele Felder je Zeile, wie in den Block passen. Jede Zelle zeigt die Bezeichnung links und das Feld rechts;
   das Feld ist nur so breit wie sein Inhalt (--fw: aus der bisherigen Spaltenbreite col-1/2/3 abgeleitet, Zahl/Datum/Zeit nach Typ,
   ausdrücklich über fw-xs/s/m/l an der Zelle). Breite Zellen (col-12,
   col-*-7 und mehr, Textfelder, Editoren, Tabellen) die ganze Zeile. Felder außerhalb eines Rasters bekommen dieselbe Zeile
   „Bezeichnung | Feld“. Stellschrauben: fm am Raster (erzwingt das Raster), fm-off (bleibt Bootstrap-Raster, Bezeichnung über dem Feld),
   fm-top an Zelle oder Bezeichnung (lange Bezeichnung über dem Feld), fm-wide (ganze Zeile), fm-group + data-fm-label (mehrere kurze
   Felder unter einer Bezeichnung). „Kompakt“ verdichtet zusätzlich. Ersetzt das Kopf-Layout .head-form (ADR 0035). */
body[data-theme] .content { --fm-label: 8rem; --fm-track: 16rem; --fm-gap: .3rem; }
html.ws-compact body[data-theme] .content { --fm-label: 7.5rem; --fm-track: 15rem; --fm-gap: .15rem; }
.fw-xs { --fw: 4rem !important; } .fw-s { --fw: 7rem !important; } .fw-m { --fw: 11rem !important; } .fw-l { --fw: 26rem !important; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--fm-track)), 1fr)); gap: var(--fm-gap) 1.25rem; margin: 0; align-items: center; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * { width: auto; max-width: none; flex: none; padding: 0; margin: 0; min-width: 0; --fw: 22rem; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:is(.col-1, .col-sm-1, .col-md-1, .col-lg-1) { --fw: 6rem; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:is(.col-2, .col-sm-2, .col-md-2, .col-lg-2) { --fw: 12rem; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:is(.col-3, .col-sm-3, .col-md-3, .col-lg-3) { --fw: 16rem; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:is(.col-12, .col-sm-12, .col-md-12, .col-lg-12, .col-7, .col-8, .col-9, .col-10, .col-11, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .fm-wide), body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:has(> textarea, > .html-editor, > .tabbed-texts, > table, > .table-responsive) { grid-column: 1 / -1; --fw: 40rem; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:has(> .form-label:first-child):not(.fm-top) { display: grid; grid-template-columns: var(--fm-label) minmax(0, 1fr); column-gap: .5rem; align-items: center; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:has(> .form-label:first-child):not(.fm-top):has(> textarea, > .html-editor, > .tabbed-texts, > table, > .table-responsive) { align-items: start; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:has(> .form-label:first-child):not(.fm-top) > .form-label { grid-column: 1; margin: 0 !important; font-size: .8rem; line-height: 1.15; overflow-wrap: break-word; hyphens: auto; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:has(> .form-label:first-child):not(.fm-top) > :not(.form-label) { grid-column: 2; min-width: 0; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:has(> .form-label:first-child):not(.fm-top):has(> textarea, > .html-editor, > .tabbed-texts, > table, > .table-responsive) > .form-label { padding-top: .3rem; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > :is(.form-control, .form-select, .input-group) { width: 100%; max-width: var(--fw); }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > textarea.form-control { max-width: 48rem; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > input:is([type="number"], [maxlength="6"], [maxlength="7"], [maxlength="8"]) { max-width: min(var(--fw), 8rem); }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > input[type="date"] { max-width: min(var(--fw), 9.5rem); }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > input[type="time"] { max-width: min(var(--fw), 6.5rem); }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > input[type="month"] { max-width: min(var(--fw), 10.5rem); }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > input[type="datetime-local"] { max-width: min(var(--fw), 14rem); }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > input:is([maxlength="1"], [maxlength="2"], [maxlength="3"]) { max-width: min(var(--fw), 4rem); }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > input:is([maxlength="4"], [maxlength="5"]) { max-width: min(var(--fw), 6rem); }
/* Häkchen ohne eigene Bezeichnung: links in ihrer Spur, mehrere immer nebeneinander (auch wenn die Seite sie stapelt); ab drei Häkchen ganze Zeile */
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:not(:has(> .form-label)):has(> .form-check) { display: flex; flex-direction: row !important; flex-wrap: wrap; justify-content: flex-start !important; align-items: center !important; gap: .1rem 1rem !important; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:not(:has(> .form-label)):has(> .form-check ~ .form-check ~ .form-check) { grid-column: 1 / -1; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *.d-flex { flex-wrap: wrap; }
/* Zellen mit freiem Inhalt (Hinweise, Listen, Bausteine) nehmen die ganze Zeile */
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *:not(:has(> .form-label, > .form-check, > .form-check-input, > .btn, > button, > .btn-group, > input, > select), .fm-group, :empty) { grid-column: 1 / -1; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > .form-check { margin-bottom: 0 !important; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * > .d-flex.flex-wrap { gap: .1rem 1rem !important; }
/* lange Bezeichnung über dem Feld */
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *.fm-top > .form-label { display: block; margin: 0 0 .1rem !important; font-size: .8rem; line-height: 1.15; }
/* Das Raster ist bewusst KEIN Container (container-type macht jedes Raster zu einer eigenen Ebene – Hilfe-Blasen und Auswahllisten aus einem Raster
   lägen dann unter dem nächsten). Breitenabhängiges hängt deshalb am Seiteninhalt (ws-content).
   Suchmasken (Klasse search-mask oder jedes Raster mit Volltextfeld fm-search): feste Spuren (alle Felder gleich breit, rechte Kanten bündig);
   das Volltextfeld (fm-search) steht immer zuerst und nimmt genau zwei Spuren – überall gleich groß, sein Ende fluchtet mit dem Feld der zweiten Spur */
body[data-theme] .content { --fm-search-track: 18rem; }
html.ws-compact body[data-theme] .content { --fm-search-track: 17rem; }
body[data-theme] .content .search-mask :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > * { --fw: 100%; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *):has(> .fm-search) > * { --fw: 100%; }
body[data-theme] .content .search-mask :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > .fm-search { order: -1; grid-column: auto; --fw: 100% !important; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *):has(> .fm-search) > .fm-search { order: -1; grid-column: auto; --fw: 100% !important; }
body[data-theme] .content .search-mask :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--fm-search-track)), var(--fm-search-track))); }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *):has(> .fm-search) { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--fm-search-track)), var(--fm-search-track))); }
@container ws-content (min-width: 48rem) {
    body[data-theme] .content .search-mask :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > .fm-search:not(.modal *, .modal-win *) { grid-column: span 2; }
    body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *):has(> .fm-search) > .fm-search:not(.modal *, .modal-win *) { grid-column: span 2; }
}
/* mehrere kurze Felder unter einer gemeinsamen Bezeichnung (Land / PLZ / Ort) */
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *.fm-group { display: grid; grid-template-columns: var(--fm-label) minmax(0, 1fr); column-gap: .5rem; align-items: center; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *.fm-group::before { content: attr(data-fm-label); font-size: .8rem; line-height: 1.15; color: var(--bs-secondary-color); }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *.fm-group > .row { display: flex; flex-wrap: nowrap; gap: .35rem; margin: 0; max-width: 26rem; }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *.fm-group > .row > * { display: block; width: auto; max-width: none; padding: 0; margin: 0; min-width: 0; flex: 0 1 var(--fw, 100%); }
body[data-theme] .content :is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > *.fm-group > .row > * > .form-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Felder außerhalb eines Rasters: Bezeichnung und das Feld dahinter in einer Zeile, alles Übrige über die ganze Breite */
body[data-theme] .content :has(> .form-label):not(:is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > :has(> .form-label:first-child), .d-flex:not(.flex-column) > *, .art-grid, .fm-top, .fm-off, .fm-off *, .fm-group *, td, th, td *, th *, label, .input-group, .form-check, .form-floating) { display: grid; grid-template-columns: var(--fm-label) minmax(0, 1fr); column-gap: .5rem; row-gap: var(--fm-gap); align-items: center; }
body[data-theme] .content :has(> .form-label):not(:is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > :has(> .form-label:first-child), .d-flex:not(.flex-column) > *, .art-grid, .fm-top, .fm-off, .fm-off *, .fm-group *, td, th, td *, th *, label, .input-group, .form-check, .form-floating) > * { grid-column: 1 / -1; min-width: 0; }
body[data-theme] .content :has(> .form-label):not(:is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > :has(> .form-label:first-child), .d-flex:not(.flex-column) > *, .art-grid, .fm-top, .fm-off, .fm-off *, .fm-group *, td, th, td *, th *, label, .input-group, .form-check, .form-floating) > .form-label { grid-column: 1; margin: 0 !important; font-size: .8rem; line-height: 1.15; overflow-wrap: break-word; hyphens: auto; }
body[data-theme] .content :has(> .form-label):not(:is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > :has(> .form-label:first-child), .d-flex:not(.flex-column) > *, .art-grid, .fm-top, .fm-off, .fm-off *, .fm-group *, td, th, td *, th *, label, .input-group, .form-check, .form-floating) > .form-label + * { grid-column: 2; }
body[data-theme] .content :has(> .form-label):not(:is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > :has(> .form-label:first-child), .d-flex:not(.flex-column) > *, .art-grid, .fm-top, .fm-off, .fm-off *, .fm-group *, td, th, td *, th *, label, .input-group, .form-check, .form-floating) > .form-label.fm-top, body[data-theme] .content :has(> .form-label):not(:is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > :has(> .form-label:first-child), .d-flex:not(.flex-column) > *, .art-grid, .fm-top, .fm-off, .fm-off *, .fm-group *, td, th, td *, th *, label, .input-group, .form-check, .form-floating) > .form-label.fm-top + * { grid-column: 1 / -1; }
body[data-theme] .content :has(> .form-label):not(:is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > :has(> .form-label:first-child), .d-flex:not(.flex-column) > *, .art-grid, .fm-top, .fm-off, .fm-off *, .fm-group *, td, th, td *, th *, label, .input-group, .form-check, .form-floating) > .form-label + :is(.form-control, .form-select, .input-group) { max-width: 22rem; }
body[data-theme] .content :has(> .form-label):not(:is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > :has(> .form-label:first-child), .d-flex:not(.flex-column) > *, .art-grid, .fm-top, .fm-off, .fm-off *, .fm-group *, td, th, td *, th *, label, .input-group, .form-check, .form-floating) > .form-label + textarea.form-control { max-width: 48rem; }
body[data-theme] .content :has(> .form-label):not(:is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > :has(> .form-label:first-child), .d-flex:not(.flex-column) > *, .art-grid, .fm-top, .fm-off, .fm-off *, .fm-group *, td, th, td *, th *, label, .input-group, .form-check, .form-floating) > .form-label + input:is([type="number"], [type="time"]) { max-width: 8rem; }
body[data-theme] .content :has(> .form-label):not(:is(.row, .art-fieldgrid, .fm):is(:has(> :first-child > .form-label:first-child):has(> :not(:first-child) > .form-label:first-child), :has(> :nth-child(2) > .form-label:first-child):has(> :nth-child(n+3) > .form-label:first-child), .fm, .art-fieldgrid):not(.fm-off, .fm-off *, .fm-group > *, td *, th *) > :has(> .form-label:first-child), .d-flex:not(.flex-column) > *, .art-grid, .fm-top, .fm-off, .fm-off *, .fm-group *, td, th, td *, th *, label, .input-group, .form-check, .form-floating) > .form-label + input[type="date"] { max-width: 9.5rem; }
/* Leisten (d-flex): Bezeichnung so breit wie nötig, Feld dahinter */
body[data-theme] .content .d-flex:not(.flex-column) > :has(> .form-label:first-child):not(:has(> :nth-child(3)), .fm-top, td *, .fm-off *) { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .4rem; min-width: 0; max-width: 100%; }
body[data-theme] .content .d-flex:not(.flex-column) > :has(> .form-label:first-child):not(:has(> :nth-child(3)), .fm-top, td *, .fm-off *) > .form-label { margin: 0 !important; }
body[data-theme] .content .d-flex:not(.flex-column) > :has(> .form-label:first-child):not(:has(> :nth-child(3)), .fm-top, td *, .fm-off *) > :not(.form-label) { min-width: 0; max-width: 100%; }
body[data-theme] .content .d-flex:not(.flex-column):has(> * > .form-label:first-child) { flex-wrap: wrap; }
/* HeadField (eigene Kopf-Felder) im gleichen Maß */
.head-field .hf-label { font-size: .8rem; }

/* Fundstelle der Verschlagwortung (ADR 0036) */
.found-in { font-size: .75rem; color: var(--bs-secondary-color); line-height: 1.2; }

/* Artikelseite (ADR 0037): Kopfkarte mit Miniatur und Kennzahlen, Stammdaten und zugehörige Daten über die volle Breite */
.article-summary .article-thumb { width: 4.5rem; height: 4.5rem; padding: 0; border: 1px solid #e5e7eb; border-radius: .375rem; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #c7ccd4; font-size: 1.6rem; flex: 0 0 auto; }
.article-summary .article-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.article-summary .article-thumb:hover { border-color: var(--bs-primary); }
.article-kpis .kpi { display: flex; flex-direction: column; align-items: flex-start; min-width: 8.5rem; padding: .35rem .75rem; border: 1px solid #e5e7eb; border-radius: .375rem; background: var(--bs-body-bg); text-align: left; line-height: 1.2; }
.article-kpis button.kpi:hover { border-color: var(--bs-primary); background: var(--bs-tertiary-bg); }
.article-kpis .kpi-label { font-size: .72rem; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .02em; }
.article-kpis .kpi-value { font-size: 1.05rem; font-weight: 600; white-space: nowrap; }
.article-related { scroll-margin-top: 4rem; }
.article-related .card.side-image .article-image, .article-related .card.side-image .article-image img { max-height: min(60vh, 34rem); }
.article-related .card.side-image .article-drawing, .article-related .card.side-image .article-drawing iframe { min-height: min(70vh, 40rem); }

/* Postfachintegration (ADR 0038): Verlauf eines Mailvorgangs, Treffer der Zuordnung */
.mail-item { border: 1px solid var(--bs-border-color); border-left: 3px solid #0d6efd; border-radius: .25rem; padding: .35rem .55rem; margin-bottom: .45rem; background: var(--bs-body-bg); }
.mail-item.out { border-left-color: #198754; margin-left: 1.25rem; }
.mail-item.note { border-left-color: #6c757d; background: var(--bs-tertiary-bg); }
.mail-item .mail-head { display: flex; align-items: center; flex-wrap: wrap; gap: .1rem; }
.mail-item .mail-meta { margin: .25rem 0 .35rem; }
.mail-item .mail-body { max-height: 32rem; overflow: auto; border-top: 1px dashed var(--bs-border-color); padding-top: .35rem; overflow-wrap: anywhere; }
.mail-item .mail-body img { max-height: 240px; }
.mail-item .mail-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-item .mail-foot { border-top: 1px dashed var(--bs-border-color); margin-top: .35rem; padding-top: .3rem; }
.summary-text { white-space: pre-line; }
.mail-target-hits { z-index: 1060; max-height: 18rem; overflow: auto; }
.erp-signature { margin-top: .75rem; }

/* =====================================================================================================================
   Arbeitsfläche (ADR 0039): Titelleiste · Modulleiste links · Tab-Leiste · Inhalt · rechte Hälfte · Statusleiste
   Maße als Variablen; Fokus (html.ws-focus) und Einbettung (html.ws-embedded: rechte Hälfte/eigenes Fenster) setzen sie auf 0.
   ===================================================================================================================== */
:root {
    --ws-titlebar-h: 38px; --ws-tabs-h: 32px; --ws-modules-w: 56px; --ws-status-h: 24px; --ws-split-w: 560px;
    --ws-top: calc(var(--ws-titlebar-h) + var(--ws-tabs-h));
    --ws-content-max: 95%;
}
html.ws-w-schmal { --ws-content-max: 1600px; }
html.ws-w-voll, html.ws-embedded { --ws-content-max: none; }
html.ws-focus, html.ws-embedded { --ws-titlebar-h: 0px; --ws-tabs-h: 0px; --ws-modules-w: 0px; --ws-status-h: 0px; }
html.ws-focus .ws-titlebar, html.ws-focus .ws-modules, html.ws-focus .ws-tabs, html.ws-focus .ws-status,
html.ws-embedded .ws-titlebar, html.ws-embedded .ws-modules, html.ws-embedded .ws-tabs, html.ws-embedded .ws-status, html.ws-embedded .ws-split,
html.ws-embedded .side-menu, html.ws-embedded .side-backdrop, html.ws-focus .side-menu.peek, html.ws-focus .side-backdrop { display: none !important; }
html.ws-embedded body { background: #fff; }
html.ws-resizing, html.ws-resizing * { user-select: none; cursor: col-resize !important; }
html.ws-resizing iframe { pointer-events: none; }
@keyframes ws-slide { from { transform: translateX(-12px); opacity: .4; } to { transform: none; opacity: 1; } }

.ws-shell { padding-bottom: var(--ws-status-h); }
.ws-shell .app-body { margin-left: var(--ws-modules-w); }
html.ws-has-split .ws-shell .app-body { margin-right: var(--ws-split-w); }

/* Titelleiste */
body[data-theme] .ws-titlebar { position: sticky; top: 0; z-index: 1040; height: var(--ws-titlebar-h); padding: 0; background: #fff; border-bottom: 1px solid #e5e7eb; }
.ws-titlebar-inner { display: flex; align-items: center; gap: .75rem; width: 100%; height: 100%; padding: 0 .6rem 0 .75rem; }
.ws-brand { display: flex; align-items: center; flex: 0 0 auto; width: calc(var(--ws-modules-w) + 5.5rem); }
.ws-brand .brand-logo { height: 26px; width: auto; display: block; }
/* Logo SoMaERP (BrandLogo): Bildmarke und „ERP“ in der Akzentfarbe, S weiß, Punkt als fester Markenakzent */
.brand-logo .brand-mark, .brand-logo .brand-erp { fill: var(--app-accent); }
.brand-logo .brand-s { stroke: #fff; }
.brand-logo .brand-dot { fill: #f08a24; }
.brand-logo .brand-soma { fill: #2b3440; }
/* Mandant in der Titelleiste (ADR 0196) */
.ws-tenant { flex: 0 1 auto; max-width: 16rem; margin-right: .75rem; padding: .1rem .5rem; border: 1px solid var(--bs-border-color); border-radius: .25rem; font-size: .8rem; color: var(--bs-secondary-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-theme] .ws-titlebar .ws-search { flex: 1 1 auto; width: auto; max-width: 560px; height: 28px; margin: 0 auto; padding: .15rem .6rem; }
body[data-theme] .ws-titlebar .ws-search .palette-hint { display: block; }
.ws-titlebar-right { flex-direction: row; gap: .15rem; flex-wrap: nowrap; }
body[data-theme] .ws-titlebar .nav-link { color: #1c2128; padding: .25rem .45rem; }
body[data-theme] .ws-titlebar .nav-link:hover { color: var(--app-accent); }
.ws-titlebar .user-avatar { width: 26px; height: 26px; font-size: .66rem; }
.ws-titlebar .ai-badge { font-size: .7rem; }
@media (max-width: 1400px) { .ws-titlebar .user-link .nav-label, .ws-titlebar .ai-badge .nav-label { display: none; } }
@media (max-width: 900px) { body[data-theme] .ws-titlebar .ws-search .palette-hint, .ws-titlebar .ws-search kbd { display: none; } .ws-brand { width: auto; } }
/* installierte App: die Titelleiste ist die Fensterleiste (Fensterknöpfe rechts gehören dem System) */
@media (display-mode: window-controls-overlay) {
    body[data-theme] .ws-titlebar { -webkit-app-region: drag; app-region: drag; height: max(var(--ws-titlebar-h), env(titlebar-area-height, 0px)); }
    .ws-titlebar-inner { padding-left: calc(env(titlebar-area-x, 0px) + .75rem); padding-right: calc(100vw - env(titlebar-area-x, 0px) - env(titlebar-area-width, 100vw) + .6rem); }
    .ws-titlebar a, .ws-titlebar button, .ws-titlebar .dropdown-menu, .ws-titlebar [data-bs-toggle] { -webkit-app-region: no-drag; app-region: no-drag; }
}

/* Modulleiste */
.ws-modules { position: fixed; z-index: 1036; left: 0; top: var(--ws-titlebar-h); bottom: var(--ws-status-h); width: var(--ws-modules-w); background: #2b2f33; padding: .25rem 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; }
.ws-modules::-webkit-scrollbar { display: none; }
body[data-theme] .ws-mod { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; height: 50px; padding: 0 2px; border: 0; border-left: 3px solid transparent; background: none; color: #b8bfc6; cursor: pointer; }
.ws-mod i { font-size: 1.15rem; line-height: 1; }
.ws-mod-label { font-size: .6rem; line-height: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-theme] .ws-mod:hover, body[data-theme] .ws-mod:focus-visible { color: #fff; background: #353a3f; outline: none; }
body[data-theme] .ws-mod.here { color: #fff; border-left-color: var(--app-accent-on-dark, #7fb2d9); }
body[data-theme] .ws-mod.open { color: #fff; background: #454b52; }
/* Mein Dashboard (ADR 0053): Link statt Knopf, roter Punkt bei Neuigkeiten */
body[data-theme] a.ws-mod { position: relative; text-decoration: none; }
.ws-mod-dot { position: absolute; top: 7px; right: 13px; width: 9px; height: 9px; border-radius: 50%; background: #e2575c; box-shadow: 0 0 0 2px #2b2f33; animation: ws-dot-in .25s ease-out; }
.ws-mod-dot.new { background: var(--bs-success); } /* Markierung „Neu“ seit dem letzten Update (ADR 0202) */
.cp-new { display: inline-block; width: 8px; height: 8px; margin-left: .35rem; border-radius: 50%; background: #e2575c; vertical-align: middle; animation: ws-dot-in .25s ease-out; }
@keyframes ws-dot-in { from { transform: scale(0); } to { transform: scale(1); } }
.ws-modules-sep { height: 1px; margin: .35rem .6rem; background: #495057; flex: 0 0 auto; }

/* Tab-Leiste */
.ws-tabs { position: sticky; top: var(--ws-titlebar-h); z-index: 1020; height: var(--ws-tabs-h); display: flex; align-items: stretch; background: #e9ecef; border-bottom: 1px solid #dee2e6; user-select: none; }
.ws-tab-strip { display: flex; align-items: stretch; min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: thin; }
.ws-tab { position: relative; display: flex; align-items: center; gap: .4rem; flex: 0 1 210px; min-width: 110px; padding: 0 .3rem 0 .65rem; border-right: 1px solid #dee2e6; color: #495057; font-size: .78rem; cursor: pointer; white-space: nowrap; }
.ws-tab:hover { background: #f1f3f5; color: #1c2128; }
.ws-tab.on { background: #f5f6f7; color: #1c2128; box-shadow: inset 0 2px 0 var(--app-accent); font-weight: 600; }
.ws-tab > i { color: #868e96; font-size: .85rem; }
.ws-tab.on > i { color: var(--app-accent); }
.ws-tab-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ws-dirty { width: 7px; height: 7px; border-radius: 50%; background: var(--app-accent); flex: 0 0 auto; }
.ws-tab-x { border: 0; background: none; color: #868e96; width: 20px; height: 20px; padding: 0; border-radius: .2rem; line-height: 1; visibility: hidden; flex: 0 0 auto; }
.ws-tab:hover .ws-tab-x, .ws-tab.on .ws-tab-x { visibility: visible; }
.ws-tab-x:hover { background: #dee2e6; color: #1c2128; }
.ws-tab.pulse { animation: ws-pulse .9s ease-out; }
@keyframes ws-pulse { 0% { background: #fbe9ea; } 100% { background: transparent; } }
.ws-tab-new { border: 0; background: none; color: #495057; width: 32px; flex: 0 0 32px; }
.ws-tab-new:hover { background: #dee2e6; }
.ws-tab-tools { display: flex; align-items: center; gap: .15rem; padding: 0 .4rem; flex: 0 0 auto; }
.ws-tool { display: inline-flex; align-items: center; gap: .3rem; height: 24px; padding: 0 .5rem; border: 1px solid transparent; border-radius: .25rem; background: none; color: #495057; font-size: .75rem; }
.ws-tool:hover { background: #dee2e6; }
.ws-tool.on { background: #fbe9ea; border-color: #f1c4c6; color: #a31f24; }
@media (max-width: 1100px) { .ws-tool span { display: none; } }

/* Rechte Hälfte */
.ws-split { display: none; }
html.ws-has-split .ws-split { display: flex; flex-direction: column; position: fixed; z-index: 1015; right: 0; top: var(--ws-titlebar-h); bottom: var(--ws-status-h); width: var(--ws-split-w); background: #fff; border-left: 1px solid #ced4da; }
.ws-split-resizer { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 2; }
.ws-split-resizer:hover { background: rgba(193,39,45,.18); }
.ws-split-head { display: flex; align-items: center; gap: .35rem; height: var(--ws-tabs-h); flex: 0 0 auto; padding: 0 .3rem 0 .65rem; background: #e9ecef; border-bottom: 1px solid #dee2e6; font-size: .78rem; font-weight: 600; }
.ws-split-head > i { color: var(--app-accent); }
.ws-split-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-split-head button { border: 0; background: none; width: 26px; height: 24px; border-radius: .25rem; color: #495057; }
.ws-split-head button:hover { background: #dee2e6; color: #1c2128; }

/* Statusleiste */
.ws-status { position: fixed; z-index: 1037; left: 0; right: 0; bottom: 0; height: var(--ws-status-h); display: flex; align-items: center; gap: .9rem; background: #343a40; color: #e9ecef; font-size: .72rem; white-space: nowrap; }
.ws-stage { align-self: stretch; display: flex; align-items: center; padding: 0 .75rem; font-weight: 600; }
.ws-stage.live { background: var(--app-accent); color: #fff; }
.ws-stage.deploy { background: #b26a00; color: #fff; }
.ws-stage.dev { background: #5c636a; color: #fff; }
.ws-conn { display: inline-flex; align-items: center; gap: .35rem; }
.ws-conn i { font-size: .5rem; color: #51cf66; }
.ws-conn.warn i { color: #ffc078; } .ws-conn.down i { color: #ff8787; } .ws-conn.down { color: #ffc9c9; }
.ws-status-tools { margin-left: auto; display: flex; align-items: stretch; align-self: stretch; }
.ws-status-tools button { display: inline-flex; align-items: center; gap: .35rem; border: 0; background: none; color: inherit; padding: 0 .6rem; font-size: inherit; }
.ws-status-tools button:hover, .ws-status-tools button.on { background: #495057; color: #fff; }
.ws-version { padding-right: .75rem; color: #ced4da; }

/* Überlagerungen: Kontextmenü, Hilfe, Hinweis */
.ws-menu-backdrop { position: fixed; inset: 0; z-index: 1089; }
.ws-menu-backdrop.dim { background: rgba(28,33,40,.35); }
.ws-menu { position: fixed; z-index: 1090; min-width: 250px; padding: .3rem 0; background: #fff; border: 1px solid #dee2e6; border-radius: .3rem; box-shadow: 0 .6rem 1.5rem rgba(20,24,33,.18); font-size: .82rem; }
.ws-menu button { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .35rem .85rem; border: 0; background: none; text-align: left; color: #1c2128; }
.ws-menu button:hover { background: rgba(193,39,45,.08); color: var(--app-accent); }
.ws-menu button i { width: 1rem; color: #6b7280; }
.ws-menu kbd { margin-left: auto; font: 600 .66rem/1 system-ui, sans-serif; color: #6b7280; background: #f1f3f5; border: 1px solid #dee2e6; padding: .15em .35em; border-radius: 3px; }
.ws-menu hr { margin: .3rem 0; }
.ws-help { position: fixed; z-index: 1090; left: 50%; top: 12vh; transform: translateX(-50%); width: min(600px, calc(100vw - 2rem)); max-height: 76vh; overflow: auto; background: #fff; border-radius: .4rem; box-shadow: 0 1rem 2.5rem rgba(0,0,0,.3); font-size: .85rem; }
.ws-help-head { display: flex; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid #e9ecef; box-shadow: inset 0 3px 0 var(--app-accent); border-radius: .4rem .4rem 0 0; }
.ws-help-head button { margin-left: auto; border: 0; background: none; color: #495057; }
.ws-help-body { padding: .6rem 1rem 1rem; }
.ws-help h6 { margin: .8rem 0 .3rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--app-accent); font-weight: 700; }
.ws-help table { width: 100%; } .ws-help td { padding: .2rem 0; vertical-align: top; } .ws-help td:first-child { width: 52%; }
.ws-help kbd { font: 600 .7rem/1 system-ui, sans-serif; color: #1c2128; background: #f8f9fa; border: 1px solid #ced4da; border-bottom-width: 2px; padding: .15em .4em; border-radius: 4px; }
.ws-help p { margin: 0; color: #495057; }
.ws-flash { position: fixed; z-index: 1091; left: 50%; bottom: calc(var(--ws-status-h) + 14px); transform: translateX(-50%); background: #343a40; color: #fff; padding: .4rem .9rem; border-radius: 999px; font-size: .8rem; box-shadow: 0 .4rem 1rem rgba(0,0,0,.25); pointer-events: none; }

/* Kompakte Darstellung (Alt+K): mehr Zeilen und Felder auf dieselbe Fläche */
html.ws-compact body[data-theme] .content { font-size: .8rem; }
html.ws-compact body[data-theme] .content .table > :not(caption) > * > * { padding: .12rem .35rem; }
html.ws-compact body[data-theme] .content .form-control, html.ws-compact body[data-theme] .content .form-select { padding-top: .12rem; padding-bottom: .12rem; font-size: .8rem; min-height: 0; }
html.ws-compact body[data-theme] .content .card-body { padding: .45rem .6rem; }
html.ws-compact body[data-theme] .content .card-header { padding: .3rem .6rem; }
html.ws-compact body[data-theme] .content .mb-3 { margin-bottom: .6rem !important; }
html.ws-compact body[data-theme] .content .btn { padding: .18rem .55rem; }
.ws-ask { width: min(460px, calc(100vw - 2rem)); top: 22vh; }
.ws-ask-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .9rem; }

/* Arbeitsweise „Drei Spalten“ (ADR 0039): Bereichsmenü angepinnt · Liste · Datensatz rechts (immer sichtbar) */
.ws-split-body { flex: 1 1 auto; display: flex; min-height: 0; }
.ws-split-body iframe { flex: 1 1 auto; width: 100%; border: 0; }
.ws-split-empty { margin: auto; max-width: 320px; padding: 2rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; color: #6c757d; font-size: .85rem; }
.ws-split-empty i { font-size: 2.2rem; color: #ced4da; }
.ws-split-empty strong { color: #343a40; font-size: .95rem; }
html.ws-has-split .app-main .content { overflow-x: auto; }

/* Datensatzseiten mehrspaltig, sobald der Inhalt breit genug ist (Rückmeldung Jan: nicht eine Spalte über die ganze Fläche ziehen).
   Artikelseite: Stammdaten links, zugehörige Daten (Bild, Verkauf, Lager …) rechts – rechts bleibt beim Scrollen stehen. */
@container ws-content (min-width: 1150px) {
    .article-blocks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1rem; align-items: start; }
    .article-blocks > .article-related { position: sticky; top: calc(var(--ws-top) + .5rem); }
    /* „Zugehörige Daten“ höchstens so hoch wie „Stammdaten“ (ADR 0099), reine CSS-Lösung: contain:size nimmt den rechten Block aus der
       Zeilenhöhe heraus, die Zeile bestimmt der linke Block; rechts wird auf diese Höhe gestreckt (höchstens Fensterhöhe, mindestens 26rem –
       auch bei eingeklapptem Stammdaten-Block). Block → Formular → Reiterinhalt als Flex-Kette, der Reiterinhalt (.ws-tabbody) scrollt innen. */
    .article-blocks > .article-related:has(> .card > .block-body) { align-self: stretch; contain: size; min-height: var(--tabbody-min, 26rem); max-height: calc(100vh - var(--ws-top) - 1rem);
        margin-bottom: 1rem; display: flex; flex-direction: column; }
    .article-blocks > .article-related > .card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .article-blocks > .article-related > .card > .block-body { flex: 1 1 auto; min-height: 0; height: auto; display: flex; flex-direction: column; }
    .article-blocks > .article-related > .card > .block-body > fieldset { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .article-blocks > .article-related > .card > .block-body > fieldset > div { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .article-blocks > .article-related .ws-tabbody { flex: 1 1 0; height: auto; min-height: 0; max-height: none; }
}
/* gestapelt (Inhalt schmaler als 1150 px): Reiterinhalt nach Inhalt, höchstens 70 % des Fensters bzw. 40rem */
@container ws-content (max-width: 1149.98px) {
    .article-related .ws-tabbody { height: auto; max-height: var(--tabbody-max, min(70vh, 40rem)); }
}
/* Reiter Bild/Zeichnung: Bild bzw. PDF füllt den Reiterinhalt ohne Scrollbalken (Flex-Kette bis in .ws-tabbody) */
.card.side-image .art-tabbody { flex: 1 1 0; height: auto; max-height: none; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* Belegseiten „Kopf | Info“ (Gestaltungsregel Jan 09.11.2026, ws191): links Kopfdaten mit Reitern (Kopfdaten · Belegtexte), rechts Info (Beträge, Prüfung, Zahlung),
   darunter die Positionen in voller Breite; schmal untereinander. Zuerst Rechnungen, weitere Belege folgen. */
.doc-head-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1rem; align-items: start; }
@container ws-content (min-width: 1100px) { .doc-head-info { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
/* Info-Block (DocumentInfo, ws227): Gruppen Summen · Status · Bezüge, Beträge rechtsbündig */
.doc-info .doc-info-group + .doc-info-group { border-top: 1px solid var(--bs-border-color-translucent); margin-top: .4rem; padding-top: .35rem; }
.doc-info .doc-info-title { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.doc-info .kv { max-width: none; grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); row-gap: .1rem; }
.doc-info .kv dt { margin-top: 0; font-weight: 500; }
.doc-info .kv dd { overflow-wrap: anywhere; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* Arbeitsplan (ADR 0076): Kopf | Plankosten bzw. Artikel | Laufzeiten nebeneinander, darunter untereinander */
.wp-blocks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@container ws-content (min-width: 1000px) {
    .wp-blocks { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}

/* Editor mit Werkzeugleiste nur im maximierten Zustand (HtmlEditor ToolbarOnlyMaximized): sonst bleibt nur der Maximieren-Knopf */
.html-editor-compact:not(.html-editor-max) > .html-editor-toolbar > :not(.html-editor-maxgroup) { display: none !important; }
.html-editor-compact:not(.html-editor-max) > .html-editor-toolbar { margin-bottom: .15rem !important; justify-content: flex-end; }
.html-editor-compact:not(.html-editor-max) > .html-editor-toolbar .btn { padding: .05rem .4rem; font-size: .75rem; }

/* Datensatzmasken (head-form) dichter: kleinere Schrift, weniger Zeilenabstand (Rückmeldung Jan 2026-10-16) */
.head-form .block-body .row { --bs-gutter-y: .12rem; }
body[data-theme] .content .head-form .block-body .form-control, body[data-theme] .content .head-form .block-body .form-select { min-height: 1.6rem; padding-top: .1rem; padding-bottom: .1rem; font-size: .8rem; }
body[data-theme] .content .head-form .block-body .input-group-text, body[data-theme] .content .head-form .block-body .input-group .btn { padding-top: .1rem; padding-bottom: .1rem; font-size: .8rem; }
body[data-theme] .content .head-form .block-body .form-label { font-size: .76rem; }
body[data-theme] .content .head-form .block-body .form-check { margin-bottom: 0; min-height: 1.3rem; }
body[data-theme] .content .head-form .block-body .form-check-label { font-size: .78rem; }
.head-form .block-body .row > .col-12.d-flex.flex-wrap:has(> .form-check) { row-gap: .2rem !important; column-gap: 1rem !important; }

/* Verweise auf andere Datensätze (ADR 0040, RecordLink): unaufdringlich, aber als Link erkennbar */
body[data-theme] a.rec-link { text-decoration: none; border-bottom: 1px dotted currentColor; }
body[data-theme] a.rec-link:hover { border-bottom-style: solid; }
body[data-theme] a.rec-link.badge, body[data-theme] .badge a.rec-link { border-bottom: 0; }

/* Firmenseite (ADR 0040): Firma in Reitern links, Kontaktaufnahmen + Korrespondenz rechts */
/* Vertragsseite (ADR 0051): Vertrag/Laufzeit links, Zuständigkeit/Werte/KI rechts */
.contract-blocks > div { min-width: 0; }
@container ws-content (min-width: 1150px) {
    .contract-blocks { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 1rem; align-items: start; }
}
@container ws-content (min-width: 1150px) {
    .partner-blocks { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 1rem; align-items: start; }
}
.partner-blocks .nav-tabs .nav-link { padding: .3rem .75rem; font-size: .82rem; }
.act-list .act-item { padding: .45rem .75rem; border-bottom: 1px solid #f1f3f5; }
.act-list .act-item.done { opacity: .75; }
.act-list .act-text { white-space: pre-line; margin-top: .15rem; }
.act-form .form-label { text-transform: none; letter-spacing: 0; font-size: .75rem; }

/* Bootstrap-Raster nach der Inhaltsbreite statt nach der Fensterbreite (ADR 0039 Nachtrag): in „Drei Spalten“ oder bei schmaler Inhaltsfläche
   ist das Fenster breit, der Inhalt aber schmal – dann stapeln sich md/lg/xl-Spalten wie auf einem kleinen Bildschirm. Grenzen = Bootstrap-Grenzen minus
   Modulleiste und Menü (~320 px), damit sich bei normaler Ansicht nichts ändert. Dialoge (fixe Breite) ausgenommen. */
@container ws-content (max-width: 879.98px) {
    .row:not(.modal .row) > :is([class*="col-xl-"], [class*="col-xxl-"]) { flex: 0 0 auto; width: 100%; }
}
@container ws-content (max-width: 679.98px) {
    .row:not(.modal .row) > [class*="col-lg-"] { flex: 0 0 auto; width: 100%; }
}
@container ws-content (max-width: 479.98px) {
    .row:not(.modal .row) > [class*="col-md-"] { flex: 0 0 auto; width: 100%; }
    .content .d-flex.flex-wrap > .form-control, .content .d-flex.flex-wrap > .form-select { min-width: 0; }
}
/* Projektmanagement (ADR 0052): Ampeln (immer mit Text), Gantt, Auslastung, Risiko- und Stakeholder-Matrix */
.sig { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; white-space: nowrap; }
.sig::before { content: ""; flex: none; width: .7rem; height: .7rem; border-radius: 50%; background: #adb5bd; }
.sig.sig-green::before { background: #1f8a4c; }
.sig.sig-yellow::before { background: #e0a100; }
.sig.sig-red::before { background: #c1272d; }
.sig.sig-dot { font-size: 0; gap: 0; }
.pm-signals { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .6rem; margin-bottom: .75rem; }
.pm-signal { background: #fff; border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: .45rem .7rem; }
.pm-signal small { display: block; color: #5f6773; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.pm-reasons { margin: 0 0 .75rem; padding-left: 1.1rem; font-size: .82rem; color: #3b424c; }
.pm-gantt { display: grid; grid-template-columns: minmax(6rem, 17rem) minmax(0, 1fr); font-size: .8rem; min-width: 0; overflow: hidden; } /* ws192: Zeitachse passt sich der Blockbreite an (kein Querscrollen); 1.0.312: Beschriftungen/Rauten am rechten Rand werden abgeschnitten statt einen Scrollbalken zu erzeugen (ADR 0120) */
.pm-gantt > div { border-bottom: 1px solid #eef0f3; }
.pm-gantt .g-label { padding: .3rem .5rem .3rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: .3rem; }
.pm-gantt .g-label small { color: #5f6773; }
.pm-gantt .g-track, .pm-gantt .g-scale { position: relative; min-height: 2rem; }
.pm-gantt .g-scale { min-height: 1.6rem; border-bottom: 1px solid #ced4da; }
.pm-gantt .g-tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid #edf0f2; font-size: .7rem; color: #5f6773; padding-left: .2rem; white-space: nowrap; pointer-events: none; }
.pm-gantt .g-bar { position: absolute; top: .5rem; height: .85rem; border-radius: 4px; background: #c9dcf4; overflow: hidden; }
.pm-gantt .g-bar > i { position: absolute; inset: 0 auto 0 0; background: #2a78d6; }
.pm-gantt .g-bar.done { background: #9fc0e9; }
.pm-gantt .g-bar.late { box-shadow: 0 0 0 2px #c1272d; }
.pm-gantt .g-base { position: absolute; top: 1.5rem; height: 3px; background: #8a9099; border-radius: 2px; }
.pm-gantt .g-ms { position: absolute; top: .5rem; width: .85rem; height: .85rem; margin-left: -.42rem; transform: rotate(45deg); background: #2a78d6; border: 2px solid #fff; box-shadow: 0 0 0 1px #2a78d6; z-index: 1; }
.pm-gantt .g-ms.reached { background: #1f8a4c; box-shadow: 0 0 0 1px #1f8a4c; }
.pm-gantt .g-ms.late { background: #c1272d; box-shadow: 0 0 0 1px #c1272d; }
.pm-gantt .g-ms.gate::after { content: ""; position: absolute; inset: 2px; background: #fff; }
.pm-gantt .g-today { position: absolute; top: 0; bottom: 0; border-left: 2px dashed #c1272d; z-index: 2; pointer-events: none; }
.pm-gantt .g-row-head { font-weight: 600; background: #f8f9fa; }
.pm-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .75rem; color: #5f6773; padding: .4rem 0; }
.pm-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.pm-legend .lg-bar { width: 1.4rem; height: .6rem; border-radius: 3px; background: linear-gradient(90deg, #2a78d6 50%, #c9dcf4 50%); }
.pm-legend .lg-base { width: 1.4rem; height: 3px; background: #8a9099; }
.pm-legend .lg-ms { width: .6rem; height: .6rem; transform: rotate(45deg); background: #2a78d6; }
.pm-legend .lg-today { width: 0; height: .9rem; border-left: 2px dashed #c1272d; }
.pm-load { text-align: center; font-variant-numeric: tabular-nums; font-size: .78rem; min-width: 4.2rem; cursor: default; }
.pm-load.l0 { background: #f8f9fa; color: #5f6773; }
.pm-load.l1 { background: #e3eefb; }
.pm-load.l2 { background: #b9d3f2; }
.pm-load.l3 { background: #7fb0e8; }
.pm-load.l4 { background: #f6d2d3; color: #7a1418; font-weight: 600; }
.pm-matrix { display: grid; gap: 2px; font-size: .75rem; }
.pm-matrix .m-cell { min-height: 3rem; border-radius: 4px; padding: .25rem; display: flex; flex-wrap: wrap; gap: .2rem; align-content: flex-start; }
.pm-matrix .m-cell.green { background: #e2f3e8; }
.pm-matrix .m-cell.yellow { background: #fdf1cf; }
.pm-matrix .m-cell.red { background: #f8d9da; }
.pm-matrix .m-axis { color: #5f6773; display: flex; align-items: center; justify-content: center; text-align: center; font-size: .7rem; }
.pm-matrix .m-chip { background: #fff; border: 1px solid #ced4da; border-radius: 999px; padding: 0 .4rem; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pm-matrix.risk { grid-template-columns: 2.2rem repeat(5, minmax(0, 1fr)); }
.pm-matrix.stake { grid-template-columns: 2.2rem repeat(3, minmax(0, 1fr)); }
.pm-matrix.stake .m-cell { background: #f1f3f5; min-height: 4rem; }
.pm-matrix.stake .m-cell.focus { background: #e3eefb; }
.pm-matrix .m-quad { width: 100%; font-size: .68rem; color: #5f6773; }
.pm-swatch { display: inline-block; width: 1rem; height: .7rem; border-radius: 2px; border: 1px solid #dee2e6; }
.pm-swatch.l1 { background: #e3eefb; } .pm-swatch.l2 { background: #b9d3f2; } .pm-swatch.l3 { background: #7fb0e8; } .pm-swatch.l4 { background: #f6d2d3; }
/* Aufgaben der Projektseite ohne Querscrollen (ADR 0120, Jan 15.11.2026): feste Spalten, Stufen nach Blockbreite, alle Felder im Dialog */
.pt-fit { container-type: inline-size; container-name: ptasks; overflow-x: hidden; }
.pm-tasks { table-layout: fixed; width: 100%; }
.pm-tasks .ptc-pos { width: 4rem; } .pm-tasks .ptc-status { width: 8rem; } .pm-tasks .ptc-date { width: 8.6rem; }
.pm-tasks .ptc-num { width: 5.2rem; } .pm-tasks .ptc-who { width: 9rem; } .pm-tasks .ptc-act { width: 6.4rem; }
.pm-tasks td[colspan] { display: table-cell !important; }
@container ptasks (max-width: 62rem) { .pm-tasks th:nth-child(8), .pm-tasks td:nth-child(8) { display: none; } }
@container ptasks (max-width: 54rem) { .pm-tasks th:nth-child(6), .pm-tasks td:nth-child(6), .pm-tasks th:nth-child(7), .pm-tasks td:nth-child(7) { display: none; } }
@container ptasks (max-width: 44rem) { .pm-tasks th:nth-child(4), .pm-tasks td:nth-child(4) { display: none; } }
@container ptasks (max-width: 36rem) { .pm-tasks th:nth-child(3), .pm-tasks td:nth-child(3), .pm-tasks th:nth-child(5), .pm-tasks td:nth-child(5) { display: none; } }

/* Buchungskalender (ADR 0056): Monat Mo–So, je Tag farbige Anteile (Arbeitszeit, Homeoffice, Pause, Fehlgründe) */
.tmc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.tmc-head { font-size: .72rem; color: #8a929c; text-align: center; font-weight: 600; }
.tmc-day { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 4.1rem; padding: 3px 4px 4px; border: 1px solid var(--bs-border-color); border-radius: .3rem;
    background: var(--bs-body-bg); color: inherit; text-align: left; font-size: .75rem; line-height: 1.15; cursor: pointer; }
.tmc-day:hover { border-color: #8a929c; }
.tmc-day.we { background: var(--bs-tertiary-bg, #f8f9fb); }
.tmc-day.future { opacity: .8; }
.tmc-day.today .tmc-num { color: #c1272d; }
.tmc-day.sel { outline: 2px solid #2a78d6; outline-offset: -1px; }
.tmc-num { font-weight: 600; }
.tmc-hours { font-size: .7rem; color: #5f6670; }
.tmc-bar { display: flex; margin-top: auto; height: 1.15rem; border-radius: .2rem; overflow: hidden; gap: 1px; }
.tmc-seg { flex-basis: 0; min-width: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tmc-seg-label { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: var(--tc, #fff); font-size: .62rem; white-space: nowrap; padding: 0 2px; }
.tmc-legend { display: flex; flex-wrap: wrap; gap: .25rem .8rem; }
.tmc-legend i, .tmc-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: .15rem; margin-right: .3rem; vertical-align: -1px; }
.tmc-detail { border: 1px solid var(--bs-border-color); border-radius: .3rem; padding: .4rem .6rem; font-size: .82rem; }
.tmc-entry { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; padding: .1rem 0 .1rem .5rem; border-left: 4px solid var(--c, #2f9e5b); margin-top: .2rem; }
.tmc-entry.error { color: #a11d22; }
.tmc-entry.cancelled { color: #8a929c; text-decoration: line-through; border-left-color: #c9ced6; }
.tmc-kind { min-width: 5.5rem; font-weight: 600; }
.tmc-time { min-width: 6rem; }
.tmc-list { max-height: 26rem; overflow-y: auto; }
.tmc.compact .tmc-day { min-height: 2.6rem; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: .3rem; }
.tmc.compact .tmc-bar { flex: 1 0 100%; height: .55rem; }
.tmc.compact .tmc-seg-label { display: none; }
@media (max-width: 575px) { .tmc-day { min-height: 3.2rem; font-size: .68rem; } .tmc-seg-label { display: none; } }

/* Betriebskalender als Jahresübersicht (ADR 0057) */
.bk-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: .8rem 1rem; }
.bk-mhead { font-size: .8rem; font-weight: 600; margin-bottom: .15rem; }
.bk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.bk-wd { font-size: .62rem; color: #8a929c; text-align: center; }
.bk-day { border: 0; border-radius: .2rem; background: var(--bs-tertiary-bg, #f3f4f6); color: inherit; font-size: .68rem; line-height: 1.5rem; padding: 0; text-align: center; cursor: pointer; }
.bk-day.we { background: transparent; color: #8a929c; }
.bk-day.set { color: #fff; font-weight: 600; }
.bk-day.today { outline: 2px solid #2a78d6; outline-offset: -1px; }
.bk-day:hover { filter: brightness(.92); }
.bk-legend { display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.bk-legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: .15rem; margin-right: .3rem; vertical-align: -1px; }
.bk-list { max-height: 22rem; overflow-y: auto; }

/* Zeitkonto & Urlaub abrufen (ADR 0060) */
.ts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.ts-box { border: 1px solid var(--bs-border-color); border-radius: .35rem; padding: .5rem .6rem; text-align: center; }
.ts-label { font-size: .75rem; color: #6c757d; }
.ts-big { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.ts-sub { font-size: .72rem; color: #6c757d; }

/* Mein Bereich: Kopfleiste wie die ERP-Titelleiste (ADR 0061) – gleiche Höhe/Schrift; als App zugleich Fensterleiste (Regeln der .ws-titlebar oben) */
.portal-titlebar .portal-brand { width: auto; gap: 0; text-decoration: none; }
body[data-theme] .portal-titlebar .portal-title { font-size: .85rem; font-weight: 600; color: var(--app-accent); white-space: nowrap; }
.portal-titlebar .portal-nav { flex-direction: row; flex-wrap: nowrap; gap: .1rem; margin-left: .5rem; }
body[data-theme] .portal-titlebar .nav-link { font-size: .85rem; display: flex; align-items: center; gap: .3rem; white-space: nowrap; }
body[data-theme] .portal-titlebar .nav-link.active { color: var(--app-accent); box-shadow: inset 0 -2px 0 var(--app-accent); }
body[data-theme] .portal-titlebar .portal-user { color: #6c757d; font-size: .8rem; cursor: default; }
body[data-theme] .portal-titlebar .portal-action { background: none; border: 1px solid #d0d5db; border-radius: .25rem; height: 26px; padding: 0 .5rem; margin-left: .25rem; font-size: .8rem; }
body[data-theme] .portal-titlebar .portal-action:hover { border-color: var(--app-accent); }
@media (max-width: 1200px) { .portal-titlebar .portal-nav .nav-label { display: none; } }
@media (max-width: 700px) { .portal-titlebar .portal-action .nav-label, .portal-titlebar .portal-title { display: none !important; } }

/* ---- Druckbarer Monatsnachweis (ADR 0062) ---- */
.mn-sheet { max-width: 1100px; margin: 0 auto; padding: 1rem; font-size: .78rem; color: #1f2328; background: #fff; }
.mn-toolbar { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.mn-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 2px solid #333; padding-bottom: .5rem; margin-bottom: .6rem; }
.mn-head h1 { font-size: 1.15rem; margin: .1rem 0; }
.mn-company { font-weight: 700; font-size: .9rem; }
.mn-meta th { font-weight: 600; padding: 0 .4rem 0 .8rem; color: #555; white-space: nowrap; }
.mn-meta td { padding: 0 .3rem; }
.mn-days { width: 100%; border-collapse: collapse; }
.mn-days th, .mn-days td { border-bottom: 1px solid #ddd; padding: .1rem .3rem; vertical-align: top; }
.mn-days thead th { border-bottom: 1.5px solid #333; text-align: left; white-space: nowrap; font-size: .72rem; }
.mn-days tfoot th { border-top: 1.5px solid #333; }
.mn-days tr.we td { background: #fafafb; color: #6b7280; }
.mn-days tr.future td { color: #9aa0a6; }
.mn-days .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mn-days .nowrap { white-space: nowrap; }
.mn-kind { display: inline-block; padding: 0 .3rem; border-radius: .15rem; font-size: .66rem; font-weight: 600; color: #3b4048; border-left: 3px solid var(--k, #888); background: color-mix(in srgb, var(--k, #888) 14%, #fff); }
.mn-note { font-size: .72rem; color: #555; margin-top: .2rem; }
.mn-page2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; margin-top: 1.2rem; }
.mn-box h2 { font-size: .95rem; border-bottom: 1.5px solid #333; padding-bottom: .15rem; margin-bottom: .3rem; }
.mn-box h3 { font-size: .85rem; margin: .7rem 0 .2rem; }
.mn-acc { width: 100%; border-collapse: collapse; }
.mn-acc td { border-bottom: 1px solid #e3e3e3; padding: .1rem .3rem; }
.mn-acc td:first-child { width: 4rem; color: #555; font-weight: 600; }
.mn-acc .num { text-align: right; font-variant-numeric: tabular-nums; }
.mn-acc tr.total td { font-weight: 700; border-top: 1.5px solid #333; }
@media print {
  @page { size: A4 portrait; margin: 10mm; }
  .no-print { display: none !important; }
  .mn-sheet { max-width: none; padding: 0; font-size: 7.5pt; }
  .mn-page2 { break-before: page; }
  .mn-days tr { break-inside: avoid; }
  .mn-days tr.we td, .mn-kind { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- Meine Zeiten: Buchungen | Monatsnachweis als Reiter in einem Block, höchstens fensterhoch (ADR 0062) ---- */
.tabs-block { display: flex; flex-direction: column; max-height: calc(100dvh - 7rem); min-height: 22rem; }
.tabs-block > .card-header { flex: 0 0 auto; padding-bottom: 0; border-bottom: 0; }
.tabs-block > .tabs-body { flex: 1 1 auto; overflow: auto; padding: .75rem; }
@media print { .tabs-block { max-height: none; display: block; } .tabs-block > .card-header { display: none; } .tabs-block > .tabs-body { overflow: visible; } }
.mn-lohn { margin-left: .4rem; font-size: .65rem; color: #555; border: 1px solid #bbb; border-radius: .2rem; padding: 0 .2rem; }
.abs-cal thead th { white-space: nowrap; letter-spacing: 0; text-transform: none; font-size: .68rem; }

/* ---- Lagerorte und Lagerplätze: Lagerliste höchstens halbe, Plätze höchstens volle Fensterhöhe, innen scrollen ---- */
.loc-list .loc-scroll { max-height: 50dvh; overflow-y: auto; }
.bin-card { display: flex; flex-direction: column; max-height: calc(100dvh - 15rem); min-height: 20rem; }
.bin-card > .card-header, .bin-card > .card-body, .bin-card > .px-3 { flex: 0 0 auto; }
.bin-card .bin-scroll { flex: 1 1 auto; min-height: 8rem; overflow: auto; }
.bin-card .bin-scroll thead.sticky-top th { background: var(--bs-body-bg); }

/* ---- Inventur (ADR 0083): Kennzahlen, Zählmodus fürs Handy, Drucke ---- */
.inv-stat { border: 1px solid var(--bs-border-color); border-radius: .35rem; padding: .25rem .6rem; min-width: 6.5rem; }
.inv-stat .n { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.inv-stat .l { font-size: .7rem; color: var(--bs-secondary-color); }
.inv-stat.warn { border-color: #e0a800; background: color-mix(in srgb, #ffc107 10%, transparent); }
.cnt { max-width: 44rem; width: 100%; margin: 0 auto; padding: .6rem .75rem 6.5rem; }
.cnt-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.cnt-card { margin-bottom: .6rem; }
.cnt-msg { font-size: .95rem; }
.cnt-cam { position: relative; margin-bottom: .6rem; border-radius: .4rem; overflow: hidden; background: #000; }
.cnt-cam video { width: 100%; max-height: 42vh; object-fit: cover; display: block; }
.cnt-cam-close { position: absolute; top: .4rem; right: .4rem; }
.cnt-binhead { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.cnt-bin { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.cnt-lines { display: flex; flex-direction: column; gap: .4rem; }
.cnt-line { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border: 1px solid var(--bs-border-color); border-radius: .4rem; background: var(--bs-body-bg); }
.cnt-line.done { border-left: 4px solid #198754; }
.cnt-art { flex: 1 1 auto; min-width: 0; }
.cnt-qty { flex: 0 0 8.5rem; display: flex; align-items: center; gap: .3rem; }
.cnt-qty input { font-variant-numeric: tabular-nums; }
.cnt-foot { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: .5rem; padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--bs-body-bg); border-top: 1px solid var(--bs-border-color); z-index: 20; max-width: 44rem; margin: 0 auto; }
.cnt-done .list-group-item { font-size: .9rem; }
.inv-print .inv-binhead td { background: #eef1f4; border-top: 1.5px solid #333; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.inv-print .inv-write { border-bottom: 1px solid #888; height: 1.6em; }
.inv-print .inv-bin { break-inside: avoid; }
.inv-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.inv-sign > div { border-top: 1px solid #333; padding-top: .25rem; font-size: .75rem; color: #444; }
@media print { .inv-print .mn-days td, .inv-print .mn-days th { font-size: 8pt; } }

/* Artikelmaske „Stamm“/„Technik“/„Hinweise“ (ADR 0072, Rückmeldung Jan): Bezeichnung links (Spalte = längster Bezeichner, Abstand .75rem ≥ 10 px),
   Felder schmal (~75 % der bisherigen Breite), Kennzeichen senkrecht rechts daneben; gilt auch in der Suchmaske. Ab breitem Block zwei Feldpaare je Zeile. */
.art-wrap { container-type: inline-size; container-name: artform; }
/* 1.0.135: Felder nie unter 10rem quetschen (vorher minmax(0, …) → bei ~1000–1150 px Blockbreite winzige Felder, Kennzeichen überlappten);
   Kennzeichen rutschen unter die Felder, wenn daneben kein Platz ist (Flex-Umbruch statt Grid-Überlauf). */
.art-stamm { display: flex; flex-wrap: wrap; column-gap: 1.5rem; row-gap: .6rem; align-items: flex-start; }
.art-stamm > .art-grid { flex: 0 1 auto; min-width: 0; max-width: 100%; }
.art-stamm > .art-flags { flex: 0 0 auto; }
.art-grid { display: grid; grid-template-columns: max-content minmax(10rem, 19rem); column-gap: .75rem; row-gap: .2rem; align-items: center; }
.art-grid.art-long { grid-template-columns: max-content minmax(10rem, 34rem); }
body[data-theme] .content .art-wrap .form-label { margin: 0; line-height: 1.15; white-space: nowrap; }
.art-grid > .form-control, .art-grid > .form-select, .art-grid > .art-pair, .art-grid > .art-cell { min-width: 0; width: 100%; }
.art-grid > .art-cell.art-cell-text { contain: inline-size; } /* Editor in der Feldspalte: so breit wie die anderen Felder (1.0.352) */
.art-grid > .form-control.art-short { width: 8rem; }
.art-pair { display: flex; gap: .3rem; }
.art-pair > * { flex: 1 1 0; min-width: 0; }
.art-flags { display: flex; flex-direction: column; gap: .05rem; padding-left: 1rem; border-left: 1px solid var(--bs-border-color); min-width: 11rem; }
/* ws190: Kennzeichen zweispaltig in Gruppen (Beschaffung · Verkauf/Service · Struktur · Disposition), schmal einspaltig */
.art-flags.art-flags-groups { display: grid; grid-template-columns: repeat(2, minmax(9rem, max-content)); column-gap: 1.25rem; row-gap: .45rem; align-content: start; }
.art-flags-groups > .art-flags-title { grid-column: 1 / -1; margin-bottom: 0; }
.art-flag-group { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.art-flag-head { font-size: .7rem; font-weight: 600; color: var(--bs-secondary-color); border-bottom: 1px solid var(--bs-border-color-translucent); margin-bottom: .1rem; }
@container artform (max-width: 520px) { .art-flags.art-flags-groups { grid-template-columns: minmax(0, 1fr); } }
.art-flags-title { font-size: .72rem; color: var(--bs-secondary-color); margin-bottom: .15rem; }
body[data-theme] .content .art-flags .form-check { margin: 0; min-height: 1.3rem; }
.art-wide { grid-column: 1 / -1; min-width: 0; }
/* ws190: im Flex-Container .art-stamm eigene Zeile in voller Breite (grid-column wirkt dort nicht → war als schmale Spalte neben die Kennzeichen gequetscht) */
.art-stamm > .art-wide { flex: 1 1 100%; }
/* 1.0.354 (Jan): Felder | Kennzeichen als zwei Spalten nach Inhalt, Zusatztext/Technischer Text über beide – endet rechtsbündig mit den
   Kennzeichen (1.0.352 mit fit-content reichte nicht: der Spaltenabstand des Textblocks zählte mit). inline-size-Containment, damit ein langer
   Text die Spalten nicht aufzieht; ist neben den Feldern kein Platz, stehen die Kennzeichen darunter. */
.art-stamm { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: start; }
.art-stamm > .art-wide { grid-column: 1 / -1; contain: inline-size; }
@container artform (max-width: 800px) { .art-stamm { grid-template-columns: minmax(0, 1fr); } .art-stamm > .art-grid { max-width: 100%; } }
/* ws190: alle Feld-Reiter gleich hoch – übereinander in einer Rasterzelle, der höchste bestimmt die Höhe, nur der aktive ist sichtbar */
.art-panes-eq { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.art-panes-eq > .art-pane { grid-area: 1 / 1; min-width: 0; }
.art-panes-eq > .art-pane.off { visibility: hidden; pointer-events: none; }
body[data-theme] .content .art-wide > .form-label { display: block; margin-bottom: .15rem; }
@container artform (min-width: 1180px) {
    .art-grid:not(.art-long) { grid-template-columns: max-content minmax(10rem, 19rem) max-content minmax(10rem, 19rem); column-gap: .75rem; }
    .art-grid:not(.art-long) > .form-label:nth-child(4n + 3) { padding-left: .75rem; }
}
@container artform (max-width: 520px) {
    .art-stamm > .art-grid { flex: 1 1 100%; }
    .art-grid, .art-grid.art-long { grid-template-columns: max-content minmax(0, 1fr); }
    .art-flags { border-left: 0; padding-left: 0; flex-flow: row wrap; column-gap: 1rem; }
    .art-flags-title { flex-basis: 100%; }
}

/* ws252 (Jan 14.11.2026): Artikelmaske im schmalen Block / geteilten Fenster.
   Reiter: ab < 46rem Blockbreite nur Symbole (Beschriftung im Tooltip), der aktive Reiter behält seinen Text; ab < 30rem auch der aktive nur als Symbol.
   Felder „Verkauf“/„Lager“: Raster nach Containerbreite statt Bootstrap-Spalten nach Fensterbreite (im eingebetteten Fenster waren es sonst
   volle Zeilen je Feld → unnötig hoch, innen scrollend). */
/* ws254 (Jan 14.11.2026: „grundlegend charmanter … wirkt aufgeräumter“): Symbole immer, nicht nur im schmalen Block */
.art-form { container-type: inline-size; container-name: arttabs; }
.art-tabs .nav-link { padding: .4rem .6rem; white-space: nowrap; }
.art-tabs .nav-link:not(.active) .art-tab-txt { display: none; }
.art-tabs .nav-link.active .art-tab-ico { margin-right: .35rem; }
/* ws259: dieselben Symbolreiter für andere Reiterleisten (Firma) – <i class="icon-tab-ico"> + <span class="icon-tab-txt"> */
.icon-tabs .nav-link { white-space: nowrap; }
.icon-tabs .nav-link:not(.active) .icon-tab-txt { display: none; }
.icon-tabs .nav-link.active .icon-tab-ico { margin-right: .35rem; }
@container arttabs (max-width: 30rem) {
    .art-tabs .nav-link { padding: .4rem .5rem; }
    .art-tabs .nav-link.active .art-tab-txt { display: none; }
    .art-tabs .nav-link.active .art-tab-ico { margin-right: 0; }
}
.art-fieldgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .5rem .75rem; align-items: start; }
.art-fieldgrid > [class*="col-"] { width: auto; max-width: none; flex: none; padding: 0; min-width: 0; }
.art-fieldgrid > .col-12 { grid-column: 1 / -1; }

/* ws252: Stammstückliste ohne Querscrollen – feste Spalten, Text mit „…“, Ausblendstufen nach Blockbreite (maximiert alles sichtbar) */
.bom-fit-wrap { container-type: inline-size; container-name: bomfit; }
.bom-fit-wrap > .table-responsive { overflow-x: hidden; }
.bom-tree.bom-fit { table-layout: fixed; width: 100%; min-width: 0; }
.bom-fit :is(th, td) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bom-fit .bom-text { display: block; max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bom-fit .bc-pos { width: 6rem; }
.bom-fit .bc-art { width: 8.5rem; }
.bom-fit .bc-flags { width: 13.5rem; } /* ws254: 9 Kennzeichen-Symbole ohne „…“ */
.bom-fit .bc-qty { width: 6rem; }
.bom-fit .bc-bmk { width: 5.5rem; }
.bom-fit .bc-rem { width: 18%; }
@container bomfit (max-width: 64rem) { .bom-fit :is(.bc-bmk, .bc-rem) { display: none; } }
@container bomfit (max-width: 50rem) { .bom-fit .bc-flags { display: none; } }
@container bomfit (max-width: 36rem) {
    .bom-fit .bc-tech { display: none; }
    .bom-fit .bc-pos { width: 4.5rem; }
    .bom-fit .bc-art { width: 7.5rem; }
    .bom-fit .bc-qty { width: 4.75rem; }
}

/* ws253 (Jan 14.11.2026): Trefferliste der Artikelsuche ohne Querscrollen – feste Spalten mit „…“, Ausblendstufen nach Listenbreite,
   Material/Techn. Text/Zeichnung stehen dann im Tooltip der Bezeichnung. */
.hit-fit-wrap { container-type: inline-size; container-name: hitfit; overflow-x: hidden; }
.table.hit-fit { table-layout: fixed; width: 100%; }
.hit-fit :is(th, td):not(.hc-desc) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit-fit .hc-desc { overflow-wrap: anywhere; }
.hit-fit .hc-art { width: 10.5rem; }
.hit-fit .hc-kind { width: 10.5rem; } /* ws254: 7 Symbole ohne „…“ */
.hit-fit .hc-mat { width: 9rem; }
.hit-fit .hc-dwg { width: 8.5rem; }
.hit-fit .hc-unit { width: 4.5rem; }
.hit-fit .hc-price { width: 7.5rem; }
.hit-fit .hc-sup { width: 11rem; }
@container hitfit (max-width: 75rem) { .hit-fit :is(.hc-dwg, .hc-unit) { display: none; } }
@container hitfit (max-width: 60rem) { .hit-fit :is(.hc-mat, .hc-sup) { display: none; } }
@container hitfit (max-width: 46rem) { .hit-fit :is(.hc-tech, .hc-kind) { display: none; } .hit-fit .hc-art { width: 9rem; } }
@container hitfit (max-width: 30rem) { .hit-fit .hc-price { display: none; } }

/* ws253: Positionstabellen der Belege ohne Querscrollen – Spalten nach Wichtigkeit ausblenden, sobald der Block schmal ist (maximiert: alle).
   Zählung per nth-child, Zeilen mit colspan (Langtext, „Keine Positionen“) bleiben; der leere Füller rechts der Langtextzeile entfällt,
   sobald Spalten fehlen (sonst würde er das Tabellenraster verlängern). */
.fit-lines { container-type: inline-size; container-name: fitlines; }
.fit-lines .btn-group { flex-wrap: wrap; }
@container fitlines (max-width: 80rem) {
    .dl-so > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(6), :nth-child(9)),
    .dl-so tr.longtext-row > td[colspan]:last-child { display: none; }
}
@container fitlines (max-width: 62rem) {
    .dl-so > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(5), :nth-child(8)) { display: none; }
}
@container fitlines (max-width: 46rem) {
    .dl-so > table > :is(thead, tbody) > tr > :not([colspan]):nth-child(7) { display: none; }
}
@container fitlines (max-width: 90rem) {
    .dl-q > table:not(.has-r2) > :is(thead, tbody) > tr > :not([colspan]):nth-last-child(3),
    .dl-q > table > :is(thead, tbody) > tr > :not([colspan]):nth-last-child(6),
    .dl-q tr.longtext-row > td[colspan]:last-child { display: none; }
}
@container fitlines (max-width: 76rem) {
    .dl-q > table:not(.has-r1) > :is(thead, tbody) > tr > :not([colspan]):nth-last-child(4),
    .dl-q > table.has-repl > :is(thead, tbody) > tr > :not([colspan]):nth-child(6) { display: none; }
}
@container fitlines (max-width: 62rem) {
    .dl-q > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(3), :nth-last-child(3)) { display: none; }
}
@container fitlines (max-width: 54rem) {
    .dl-q > table > :is(thead, tbody) > tr > :not([colspan]):nth-last-child(4) { display: none; }
}
@container fitlines (max-width: 110rem) {
    .dl-po > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(14), :nth-child(15)) { display: none; }
}
@container fitlines (max-width: 90rem) {
    .dl-po > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(6), :nth-child(8), :nth-child(13)) { display: none; }
}
@container fitlines (max-width: 72rem) {
    .dl-po > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(10), :nth-child(12)) { display: none; }
}
@container fitlines (max-width: 80rem) {
    .dl-ci > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(9), :nth-child(11)),
    .dl-ci tr.longtext-row > td[colspan]:last-child { display: none; }
}
@container fitlines (max-width: 64rem) {
    .dl-ci > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(2), :nth-child(6)) { display: none; }
}
@container fitlines (max-width: 64rem) {
    .dl-cir > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(7), :nth-child(8)),
    .dl-cir tr.longtext-row > td[colspan]:last-child,
    .dl-cir > table > tfoot > tr > td[colspan]:last-child { display: none; }
}

/* Querscrollen-Rest (1.0.332): Eingangsrechnung, Anfrage, Warenausgang (Erfassung/Positionen), Bestellvorschläge – gleiche Regel wie ws253 */
@container fitlines (max-width: 72rem) { .dl-si > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(6), :nth-child(7)) { display: none; } }
@container fitlines (max-width: 52rem) { .dl-si > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(1), :nth-child(4)) { display: none; } }
@container fitlines (max-width: 64rem) { .dl-inq > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(4), :nth-child(5)) { display: none; } }
@container fitlines (max-width: 46rem) { .dl-inq > table > :is(thead, tbody) > tr > :not([colspan]):nth-child(1) { display: none; } }
@container fitlines (max-width: 64rem) { .dl-gip > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(2), :nth-child(8)) { display: none; } }
@container fitlines (max-width: 48rem) { .dl-gip > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(5), :nth-child(7)) { display: none; } }
@container fitlines (max-width: 64rem) { .dl-gi > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(3), :nth-child(7)) { display: none; } }
@container fitlines (max-width: 48rem) { .dl-gi > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(1), :nth-child(5)) { display: none; } }
@container fitlines (max-width: 96rem) { .dl-req > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(6), :nth-child(9)) { display: none; } }
@container fitlines (max-width: 80rem) { .dl-req > table > :is(thead, tbody) > tr > :not([colspan]):is(:nth-child(8), :nth-child(11)) { display: none; } .dl-req > table > thead > tr > th:last-child { min-width: 0 !important; } }

/* Reiter „Einkauf“ der Artikelseite (ADR 0072): schmale Tabellen ohne waagrechtes Scrollen bei ~700 px, Symbole immer sichtbar, Zeile wählt den Lieferanten */
.as-compact { table-layout: auto; width: 100%; font-size: .8rem; }
body[data-theme] .content .as-compact th { white-space: nowrap; font-size: .72rem; text-transform: none; letter-spacing: 0; padding-left: .3rem; padding-right: .3rem; }
.as-compact td { padding-left: .3rem; padding-right: .3rem; }
.as-compact td.as-two { max-width: 8.5rem; line-height: 1.2; }
.as-compact .sort-th:not(.sorted) > i { display: none; } /* Sortiersymbol nur an der sortierten Spalte – spart Breite */
.as-compact .as-main, .as-compact .as-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-compact .as-sub { font-size: .7rem; color: var(--bs-secondary-color); }
.as-compact a.as-sub { color: var(--bs-link-color); }
.as-compact .as-star { width: 1.4rem; padding-right: 0; }
.as-compact td.as-valid { max-width: 6rem; }
.as-compact .as-actions { width: 1%; }
.as-compact .as-icon { font-size: .85rem; line-height: 1; vertical-align: baseline; }
.as-compact .as-icon small { font-size: .65rem; margin-left: .1rem; }
.as-row { cursor: pointer; }
.as-row:hover > td { background: var(--bs-tertiary-bg); }
.as-row.as-selected > td { background: #eaf2fc; box-shadow: inset 0 -1px 0 #2a78d6; }
.as-row.as-selected > td:first-child { box-shadow: inset 3px 0 0 #2a78d6, inset 0 -1px 0 #2a78d6; }
.ptc-select { width: auto; max-width: 16rem; }
.ptc { margin-top: .25rem; }
.ptc-legend { display: flex; gap: 1rem; font-size: .72rem; color: var(--bs-secondary-color); margin-bottom: .1rem; }
.ptc-legend i { display: inline-block; vertical-align: middle; margin-right: .3rem; }
.ptc-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #2a78d6; }
.ptc-line { width: 1rem; height: 2px; background: #eb6834; }
.ptc-dash { width: 1rem; height: 0; border-top: 2px dashed #eb6834; }
.ptc-svg { width: 100%; height: auto; max-height: 15rem; display: block; overflow: visible; }
.ptc-grid { stroke: #e6e8eb; stroke-width: 1; }
.ptc-axis { font-size: 10px; fill: #6c757d; font-variant-numeric: tabular-nums; }
.ptc-label { font-size: 10.5px; fill: #343a40; font-weight: 600; }
.ptc-today { stroke: #adb5bd; stroke-width: 1; stroke-dasharray: 2 3; }
.ptc-orderline { fill: none; stroke: #2a78d6; stroke-width: 2; stroke-linejoin: round; }
.ptc-order { fill: #2a78d6; stroke: #fff; stroke-width: 2; }
.ptc-list { stroke: #eb6834; stroke-width: 2.5; stroke-linecap: round; }
.ptc-est { stroke: #eb6834; stroke-width: 2; stroke-dasharray: 6 4; }
.ptc-estdot { fill: #fff; stroke: #eb6834; stroke-width: 2; }
.ptc-hit { stroke: transparent; stroke-width: 12; fill: transparent; }
.ptc-badge { font-weight: 500; border-style: dashed !important; }

/* ===== CRM (ADR 0080): Pipeline, Kundenverlauf, KI-Antworten ===== */
.nl-preview { display: block; width: 100%; height: 36rem; border: 0; background: #f4f4f4; }
.nl-editor .html img { max-height: none; height: auto; margin: .25rem 0; }
.crm-board { display: grid; grid-template-columns: repeat(5, minmax(13.5rem, 1fr)); gap: .75rem; overflow-x: auto; padding-bottom: .25rem; }
.crm-col { background: #f5f6f8; border: 1px solid #e1e4e8; border-radius: .5rem; padding: .5rem; min-height: 10rem; }
.crm-col-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 .5rem; margin-bottom: .5rem; font-weight: 600; }
.crm-col-sum { width: 100%; font-size: .78rem; color: #5f6670; font-weight: 400; }
.crm-card { background: #ffffff; border: 1px solid #dde1e6; border-left: 3px solid #dde1e6; border-radius: .4rem; padding: .45rem .55rem; margin-bottom: .5rem; font-size: .86rem; }
.crm-card.due { border-left-color: #e8a317; }
.crm-card.late { border-left-color: #c9303e; }
.crm-card .crm-card-title { font-weight: 600; display: block; }
.crm-card .crm-card-meta { color: #5f6670; font-size: .78rem; }
.crm-card .crm-card-actions { display: flex; gap: .25rem; margin-top: .3rem; }
.crm-tl { list-style: none; margin: 0; padding: 0; }
.crm-tl-item { display: grid; grid-template-columns: 1.9rem 1fr; gap: .4rem; padding: .45rem .6rem; border-bottom: 1px solid #edf0f2; }
.crm-tl-icon { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #eef2f7; color: #2a5d9a; font-size: .85rem; }
.crm-tl-when { color: #5f6670; font-size: .78rem; }
.crm-ai-out { background: #f7f8fa; border: 1px solid #e1e4e8; border-radius: .4rem; padding: .6rem .7rem; max-height: 28rem; overflow: auto; font-size: .9rem; }
/* KI-Antwort als Markdown (AiText, ADR 0099): kompakte Überschriften und Abstände im Ausgabekasten */
.ai-text > :last-child { margin-bottom: 0; }
.ai-text p, .ai-text ul, .ai-text ol { margin-bottom: .45rem; }
.ai-text ul, .ai-text ol { padding-left: 1.3rem; }
.ai-text h1, .ai-text h2, .ai-text h3, .ai-text h4, .ai-text h5, .ai-text h6 { font-size: .95rem; font-weight: 600; margin: .6rem 0 .3rem; }
.ai-text h1, .ai-text h2 { font-size: 1rem; }
.ai-text > h1:first-child, .ai-text > h2:first-child, .ai-text > h3:first-child, .ai-text > h4:first-child { margin-top: 0; }
.crm-ai-facts { white-space: pre-wrap; font-size: .78rem; color: #5f6670; max-height: 16rem; overflow: auto; }
.crm-kpi { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .9rem; }
.crm-kpi strong { font-size: 1.05rem; }

/* Fakturierung (ADR 0084): Prüfliste der Rechnung, Schritte des Rechnungsassistenten */
.fak-checks .fak-check { padding: .15rem 0; }
.fak-check-error { color: #b02a37; font-weight: 600; }
.fak-check-warning { color: #8a5a00; }
.fak-check-info { color: #555; }
.fak-steps { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.fak-steps .step { border: 1px solid #ced4da; border-radius: 1rem; padding: .2rem .75rem; font-size: .85rem; color: #555; background: #fff; }
.fak-steps .step.done { border-color: #198754; color: #198754; }
.fak-steps .step.active { border-color: #0d6efd; background: #e7f1ff; color: #0a58ca; font-weight: 600; }
.fak-steps .step.blocked { border-color: #dc3545; color: #b02a37; }
.fak-option { border: 1px solid #dee2e6; border-radius: .375rem; padding: .5rem .75rem; margin-bottom: .5rem; cursor: pointer; background: #fff; }
.fak-option.selected { border-color: #0d6efd; background: #f3f8ff; }
.fak-option.disabled { opacity: .55; cursor: not-allowed; }
.fak-greyed { color: #888; }

/* ===== Außendienst (ADR 0088): Plantafel, Techniker-Farben, Einsatzbericht ===== */
/* ws221: Plantafel ohne Querscrollen – Spalten teilen sich die Breite, Kopf zweizeilig (Wochentag | Datum), Inhalte kürzen statt verbreitern */
.fld-board-wrap { overflow-x: hidden; border: 1px solid #dee2e6; border-radius: .25rem; background: #ffffff; }
.fld-board { display: grid; min-width: 100%; font-size: .82rem; }
.fld-board > div { border-right: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; min-height: 3.6rem; padding: .2rem; position: relative; min-width: 0; overflow-wrap: anywhere; }
.fld-board .fld-head .fld-wd, .fld-board .fld-head .fld-dt { display: block; line-height: 1.15; }
.fld-board .fld-head .fld-dt { font-weight: 400; font-size: .74rem; }
.fld-board.fld-dense { font-size: .74rem; }
.fld-board.fld-dense > div { padding: .15rem .1rem; }
.fld-board .fld-tech b, .fld-board .fld-tech > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fld-board .fld-head { min-height: auto; background: #f5f6f7; font-weight: 600; text-align: center; position: sticky; top: 0; z-index: 2; padding: .3rem .2rem; }
.fld-board .fld-head.today { background: #fde8e9; color: #8c1c21; }
.fld-board .fld-tech { background: #fafbfc; position: sticky; left: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; }
.fld-board .fld-day.weekend { background: #f8f9fa; }
.fld-board .fld-day.today { background: #fff7f7; }
.fld-board .fld-day.drop { outline: 2px dashed #c1272d; outline-offset: -2px; }
.fld-board .fld-day:hover .fld-add { opacity: 1; }
.fld-add { position: absolute; right: .15rem; bottom: .1rem; opacity: 0; border: 0; background: transparent; color: #6c757d; padding: 0 .2rem; }
.fld-item { display: block; border-radius: .2rem; padding: .1rem .3rem; margin-bottom: .2rem; color: #212529; text-decoration: none; border-left: .3rem solid #6c757d; background: #eef1f4; line-height: 1.25; cursor: grab; overflow: hidden; }
.fld-item:hover { filter: brightness(.96); color: #212529; }
.fld-item.planned { border-style: dashed; border-left-style: solid; opacity: .85; }
.fld-item.done { opacity: .6; }
.fld-item .fld-sub { color: #495057; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fld-absent { font-size: .72rem; background: #e9ecef; color: #495057; border-radius: .2rem; padding: 0 .3rem; display: inline-block; margin-bottom: .15rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }
.fld-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }
.fld-c1 { border-left-color: #c1272d; } .fld-dot.fld-c1 { background: #c1272d; } .fld-item.fld-c1 { background: #fbe9ea; }
.fld-c2 { border-left-color: #1f6fb2; } .fld-dot.fld-c2 { background: #1f6fb2; } .fld-item.fld-c2 { background: #e6f0f9; }
.fld-c3 { border-left-color: #2e8540; } .fld-dot.fld-c3 { background: #2e8540; } .fld-item.fld-c3 { background: #e8f4ea; }
.fld-c4 { border-left-color: #b26a00; } .fld-dot.fld-c4 { background: #b26a00; } .fld-item.fld-c4 { background: #fbf0df; }
.fld-c5 { border-left-color: #6f42c1; } .fld-dot.fld-c5 { background: #6f42c1; } .fld-item.fld-c5 { background: #f0eafa; }
.fld-c6 { border-left-color: #0f8b8d; } .fld-dot.fld-c6 { background: #0f8b8d; } .fld-item.fld-c6 { background: #e3f4f4; }
.fld-c7 { border-left-color: #8a6d3b; } .fld-dot.fld-c7 { background: #8a6d3b; } .fld-item.fld-c7 { background: #f4efe6; }
.fld-c8 { border-left-color: #495057; } .fld-dot.fld-c8 { background: #495057; } .fld-item.fld-c8 { background: #eceef0; }
.fld-pool { max-height: 30rem; overflow-y: auto; }
.fld-pool .fld-order { border: 1px solid #dee2e6; border-radius: .25rem; padding: .3rem .45rem; margin-bottom: .35rem; cursor: grab; background: #ffffff; font-size: .82rem; }
.fld-pool .fld-order:hover { border-color: #c1272d; }
.fld-photos { display: flex; flex-wrap: wrap; gap: .5rem; }
.fld-photos figure { width: 9rem; margin: 0; font-size: .75rem; }
.fld-photos img { width: 9rem; height: 7rem; object-fit: cover; border: 1px solid #dee2e6; border-radius: .2rem; }
.fld-sign img { height: 5rem; max-width: 100%; border: 1px solid #dee2e6; background: #ffffff; border-radius: .2rem; }
.fld-text { white-space: pre-line; }

/* ===== Lizenz & Module (ADR 0092) ===== */
.session-lock-backdrop { z-index: 3000; }
.session-lock { z-index: 3001; }
.lic-blocks { display: grid; grid-template-columns: 1fr; gap: .8rem; margin-bottom: .8rem; }
@container ws-content (min-width: 1000px) { .lic-blocks { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.lic-blocks .art-grid { grid-template-columns: max-content minmax(10rem, 1fr); }

/* ===== Anmeldeseiten und Benutzerverwaltung (ADR 0094) – nur Bootstrap-Variablen, folgen dem Farbschema von selbst ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: var(--bs-tertiary-bg); }
.auth-card { width: 100%; max-width: 26rem; }
/* Demo-Betrieb (ADR 0214): Falle für Formular-Roboter auf /demo (unsichtbar), Hinweisbalken im Demo-Platz (Farben über Bootstrap-Klassen) */
.demo-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: -.5rem 0 .75rem; padding: .35rem .75rem; border-radius: .25rem; font-size: .875rem; }
.auth-brand { display: flex; align-items: center; font-weight: 600; font-size: 1.15rem; letter-spacing: .02em; }
.auth-card svg { display: block; }
.user-list { max-height: calc(100vh - 16rem); overflow-y: auto; }
.rights-matrix { max-height: calc(100vh - 12rem); }
.rights-matrix thead th { position: sticky; top: 0; z-index: 1; background: var(--bs-body-bg); }
.rights-matrix .rm-role { min-width: 6.5rem; white-space: normal; }

/* ===== Projektmanagement: alle Reiter so hoch wie „Risiken“ (1.0.151) – Bezugsreiter unsichtbar in derselben Rasterzelle, längere Reiter scrollen ===== */
.pm-panes { display: grid; }
.pm-panes > * { grid-area: 1 / 1; min-width: 0; }
.pm-ruler { visibility: hidden; pointer-events: none; }
.pm-pane-fit { height: 0; min-height: 100%; overflow: auto; }
.block-max .pm-ruler { display: none; }
.block-max .pm-pane-fit { height: auto; min-height: 0; overflow: visible; }
/* Vorschau-Blöcke (RecordPreview): „alle … anzeigen“ unter den ersten Einträgen */
.more-row, .more-row > td { font-size: .875em; }
div.more-row { padding-top: .35rem; }

/* ===== Preisanfrage (ADR 0180): gewählter Preis im Preisvergleich – nur Bootstrap-Variablen, folgt dem Darkmodus von selbst ===== */
.inq-picked { outline: 2px solid var(--bs-success); outline-offset: -2px; }

/* ===== Stücklisten (ADR 0183): nicht gesetztes Ersatz-/Verschleißteil-Kennzeichen blass – ohne eigene Farbe ===== */
.bom-flag-off { opacity: .25; }
.bom-flag-off:hover { opacity: .7; }

/* ===== Bedingungseditor der Beschaffungsregeln (ADR 0193) – nur Bootstrap-Variablen, folgt dem Darkmodus von selbst ===== */
.rule-group { border-left: 3px solid var(--bs-border-color); padding: .35rem 0 .35rem .6rem; margin: .3rem 0 .3rem .25rem; }
.rule-group.rule-root { border-left: 0; padding-left: 0; margin-left: 0; }
.rule-group .rule-test { margin-left: .25rem; }
.rule-group .rule-value { width: 18rem; max-width: 100%; }

/* Bezug in Bestellvorschlägen (1.0.349): Kurzbezeichnung | Nummer, Verursacher mit Position */
.req-ref { font-size: .85em; white-space: nowrap; }
.req-ref-kind { text-decoration: none; cursor: help; font-weight: 600; }
.req-ref-sep { opacity: .45; margin: 0 .3rem; }
.req-ref-src { padding-left: .15rem; }
.req-ref-pos { margin-left: .35rem; opacity: .8; }
.req-ref-pos::before { content: "· "; }
.req-blocks { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@container ws-content (min-width: 1100px) { .req-blocks { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .req-blocks > :nth-child(3) { grid-column: 1 / -1; } }

/* ===== Bauwesen: Partnerauswahl über der Suchmaske der Leistungsverzeichnisse (1.0.369) – nur Breiten, keine Farben ===== */
.lv-import-partner { width: 18rem; }
.lv-own-partner { width: 14rem; }
.sd-supplier { width: 20rem; }
/* Fertigungsaufträge: Meldung in der Zeile (1.0.370) */
.pt-report { min-width: 26rem; }
.pt-qty { width: 6rem; }
.pt-hrs { width: 5rem; }
.pt-rem { width: 9rem; }

/* ===== Darkmodus – erzeugt von tools/Generate-DarkCss.py (nicht von Hand ändern) ===== */
@media screen {
[data-bs-theme="dark"] body[data-theme] { --app-accent: #1c5bb9; --app-accent-hover: #1d4f98; --app-link: #7cacf3; }
[data-bs-theme="dark"] body[data-theme] .text-primary { color: var(--app-link) !important; }
[data-bs-theme="dark"] .btn-danger { --bs-btn-bg: #8b2f32; --bs-btn-border-color: #882d31; --bs-btn-hover-bg: #752629; --bs-btn-hover-border-color: #722528; --bs-btn-active-bg: #752629; --bs-btn-active-border-color: #722528; }
[data-bs-theme="dark"] body[data-theme="somaerp"] { --app-accent: #244a64; --app-link: #91bede; --app-accent-on-dark: #5a90b9; background-color: #1f2327; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .soma-topbar { background: #1c1c1c; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .soma-topbar .nav-link { color: #c7ccd3; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .soma-topbar .nav-link:hover, [data-bs-theme="dark"] body[data-theme="somaerp"] .soma-topbar .nav-link:focus { color: var(--app-link); }
[data-bs-theme="dark"] body[data-theme="somaerp"] .soma-topbar .nav-link.active { color: var(--app-link); }
[data-bs-theme="dark"] body[data-theme="somaerp"] .soma-topbar .nav-link.disabled { color: #61686f; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .dropdown-menu { border-color: #262930; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .dropdown-item:hover, [data-bs-theme="dark"] body[data-theme="somaerp"] .dropdown-item:focus { background: rgba(139,47,50,0.08); color: var(--app-link); }
[data-bs-theme="dark"] body[data-theme="somaerp"] .dropdown-item.active, [data-bs-theme="dark"] body[data-theme="somaerp"] .dropdown-item:active { color: #ededed; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .card-header { background: #1c1c1c; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .table thead th { color: #8a919e; border-bottom: 2px solid #262930; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .table tbody tr.row-warn { background: #4a3b15; }
[data-bs-theme="dark"] .ai-badge.off { background: #262b30; color: #8a919e; }
[data-bs-theme="dark"] .ai-badge.on { background: #32463d; color: #8ee1ba; }
[data-bs-theme="dark"] .derivation { color: #8a919e; }
[data-bs-theme="dark"] #blazor-error-ui { box-shadow: 0 -1px 2px rgba(41,41,41,0.2); }
[data-bs-theme="dark"] #components-reconnect-modal::backdrop { background-color: rgba(36,41,45,0.35); }
[data-bs-theme="dark"] .admin-tree { background: #24282e; color: #3c424c; }
[data-bs-theme="dark"] .admin-tree-title { color: #ebebeb; border-bottom: 1px solid #7a899f; }
[data-bs-theme="dark"] .admin-tree-group { color: #646d7c; }
[data-bs-theme="dark"] body[data-theme] .admin-tree a.admin-tree-link { color: #e9eaec; }
[data-bs-theme="dark"] body[data-theme] .admin-tree a.admin-tree-link i { color: #57606f; }
[data-bs-theme="dark"] body[data-theme] .admin-tree a.admin-tree-link:hover { background: rgba(28,28,28,0.08); color: #ebebeb; }
[data-bs-theme="dark"] body[data-theme] .admin-tree a.admin-tree-link.active { color: #ededed; }
[data-bs-theme="dark"] body[data-theme] .admin-tree a.admin-tree-link.active i { color: #ebebeb; }
[data-bs-theme="dark"] .admin-tree-group { color: #4d5462; }
[data-bs-theme="dark"] .quote-steps .step { color: #828b93; }
[data-bs-theme="dark"] .quote-steps .step.active { color: #ededed; }
[data-bs-theme="dark"] .quote-steps .step.done { color: #8ee1bb; }
[data-bs-theme="dark"] .kv dt { color: #828b93; }
[data-bs-theme="dark"] .timeline li { border-left: 2px solid #2a2f35; }
[data-bs-theme="dark"] body[data-theme] .content .header-filter-btn { color: #61686f; }
[data-bs-theme="dark"] body[data-theme] .content .header-filter-btn:hover, [data-bs-theme="dark"] body[data-theme] .content .header-filter-btn.active { color: var(--app-link); }
[data-bs-theme="dark"] body[data-theme] .content .header-filter-value { color: var(--app-link); }
[data-bs-theme="dark"] .article-image { border: 1px solid #262930; background: #1c1c1c; }
[data-bs-theme="dark"] .article-image-empty { color: #3c424c; }
[data-bs-theme="dark"] .status-dot { background: #4e5761; }
[data-bs-theme="dark"] .status-dot.obsolete { background: #7f2f37; }
[data-bs-theme="dark"] .status-dot.draft { background: #4e5761; }
[data-bs-theme="dark"] .status-dot.open { background: #1c5bb9; }
[data-bs-theme="dark"] .status-dot.progress { background: #be661d; }
[data-bs-theme="dark"] .attr-icons i { color: #828b93; }
[data-bs-theme="dark"] .bom-tree tr.bom-child > td:first-child { border-left: 2px solid #262930; }
[data-bs-theme="dark"] .attr-icons i.on { color: var(--app-link, #91bfde); }
[data-bs-theme="dark"] .record-toolbar { background: #1c1c1c; border: 1px solid #262930; }
[data-bs-theme="dark"] .rt-btn { border: 1px solid #262930; background: #1c1c1c; color: #a0a8b0; }
[data-bs-theme="dark"] .rt-btn:hover:not(:disabled) { background: #21262a; color: #c5cad0; }
[data-bs-theme="dark"] .rt-btn:disabled { color: #373e46; background: #202020; }
[data-bs-theme="dark"] .rt-btn.rt-accent { background: var(--app-accent, #244a64); color: #ededed; border-color: var(--app-accent, #234862); }
[data-bs-theme="dark"] .rt-sep { background: #292d34; }
[data-bs-theme="dark"] .rt-badge { background: #d0a128; }
[data-bs-theme="dark"] .search-mask .form-control, [data-bs-theme="dark"] .search-mask .form-select { background: #24221c; }
[data-bs-theme="dark"] .html table td, [data-bs-theme="dark"] .html table th { border: 1px solid #323840; }
[data-bs-theme="dark"] .html .page-break { border-top: 1px dashed #882d31; }
[data-bs-theme="dark"] .html .page-break::after { color: #e08f92; background: #1c1c1c; }
[data-bs-theme="dark"] .doc-text-body.collapsed::after { background: linear-gradient(rgba(28,28,28,0), #1c1c1c); }
[data-bs-theme="dark"] .html-editor-area { background: #1c1c1c; }
[data-bs-theme="dark"] .html-editor-area:focus { border-color: var(--app-accent, #234862); box-shadow: 0 0 0 .2rem rgba(139,47,50,0.15); }
[data-bs-theme="dark"] .html-editor.html-editor-max { background: var(--bs-body-bg, #1c1c1c); border: 1px solid var(--bs-border-color, #2a2f35); box-shadow: 0 .5rem 2rem rgba(41,41,41,0.25); }
[data-bs-theme="dark"] .longtext-cell { color: #bfbfbf; }
[data-bs-theme="dark"] tr.pkg-sum td { background: #1d2125; }
[data-bs-theme="dark"] tr.pkg-member td.price { color: #4e5761; }
[data-bs-theme="dark"] .timeline td { border-left: 1px solid #262626; }
[data-bs-theme="dark"] .app-toast { color: #ebebeb; box-shadow: 0 .5rem 1rem rgba(41,41,41,0.25); }
[data-bs-theme="dark"] .app-toast-success { background: #2d5c2f; }
[data-bs-theme="dark"] .app-toast-info { background: #3b464b; }
[data-bs-theme="dark"] .app-toast-warning { background: #7d5112; }
[data-bs-theme="dark"] .app-toast-danger { background: #772628; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .portal-topbar .portal-title { color: var(--app-link); }
[data-bs-theme="dark"] body[data-theme="somaerp"] .soma-topbar .nav-link.portal-link { color: var(--app-link); }
[data-bs-theme="dark"] .portal-clock { color: #b5bcc5; }
[data-bs-theme="dark"] .tile .tile-label { color: #8a919e; }
[data-bs-theme="dark"] .tile-icon { background: #21262a; color: #8a919e; }
[data-bs-theme="dark"] .tile-icon.accent { background: rgba(139,47,50,0.1); color: var(--app-link); }
[data-bs-theme="dark"] .tile-icon.ok { background: #32463d; color: #8ee1ba; }
[data-bs-theme="dark"] .tile-icon.warn { background: #554619; color: #f4d47b; }
[data-bs-theme="dark"] .tile-icon.danger { background: #4a2125; color: #dd9399; }
[data-bs-theme="dark"] .tile-status.present { border-color: #55c390; }
[data-bs-theme="dark"] .tile-status.break { border-color: #bf8220; }
[data-bs-theme="dark"] .pze-plus { color: #8ee1bb; }
[data-bs-theme="dark"] .pze-minus { color: #dd929a; }
[data-bs-theme="dark"] .ring .ring-bg { stroke: #23282d; }
[data-bs-theme="dark"] .ring.ok .ring-value { stroke: #55c390; }
[data-bs-theme="dark"] .ring.warn .ring-value { stroke: #997816; }
[data-bs-theme="dark"] .ring.danger .ring-value { stroke: #7c2e35; }
[data-bs-theme="dark"] .ring.muted .ring-value { stroke: #48515a; }
[data-bs-theme="dark"] .ring .ring-sub { color: #828b93; }
[data-bs-theme="dark"] .portal-lock-backdrop { background: linear-gradient(135deg, #1f2327 0%, #272c31 100%); }
[data-bs-theme="dark"] .portal-lock-blob.b1 { background: rgba(139,47,50,0.35); }
[data-bs-theme="dark"] .portal-lock-blob.b2 { background: rgba(47,53,60,0.25); }
[data-bs-theme="dark"] .portal-lock-blob.b3 { background: rgba(28,28,28,0.9); }
[data-bs-theme="dark"] .portal-lock-card { background: rgba(28,28,28,0.92); }
[data-bs-theme="dark"] .portal-avatar { color: #ededed; }
[data-bs-theme="dark"] .pin-dot { border: 2px solid #48515a; }
[data-bs-theme="dark"] .pin-key { border: 1px solid #2a2f35; }
[data-bs-theme="dark"] .portal-step { background: #21262a; color: #828b93; }
[data-bs-theme="dark"] .portal-step.done { background: #32463d; color: #8ee1ba; }
[data-bs-theme="dark"] .portal-step.active { color: #ededed; }
[data-bs-theme="dark"] .portal-step.fail { background: #4a2125; color: #dd9399; }
[data-bs-theme="dark"] .user-avatar { background: #24282e; color: #ebebeb; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .dropdown-menu .dropdown-header { color: #c7ccd3; }
[data-bs-theme="dark"] .side-menu { background: #1c1c1c; border-right: 1px solid #262930; }
[data-bs-theme="dark"] .side-head { border-bottom: 1px solid #262930; }
[data-bs-theme="dark"] .side-head i { color: var(--app-link); }
[data-bs-theme="dark"] .side-pin { color: #808795; }
[data-bs-theme="dark"] .side-pin:hover, [data-bs-theme="dark"] .side-pin.on { color: var(--app-link); background: rgba(139,47,50,0.08); }
[data-bs-theme="dark"] .side-group { color: var(--app-link); }
[data-bs-theme="dark"] .ws-manual-btn { color: #b5bcc5; }
[data-bs-theme="dark"] .ws-manual-btn:hover, [data-bs-theme="dark"] .ws-manual-btn:focus-visible { color: var(--app-link); }
[data-bs-theme="dark"] .side-fold:hover { background: rgba(139,47,50,0.06); }
[data-bs-theme="dark"] .side-fold .side-chev { color: #808795; }
[data-bs-theme="dark"] .side-fold .side-count { color: #808795; }
[data-bs-theme="dark"] body[data-theme] .side-link { color: #c7ccd3; }
[data-bs-theme="dark"] body[data-theme] .side-link:hover { background: rgba(139,47,50,0.08); color: var(--app-link); }
[data-bs-theme="dark"] body[data-theme] .side-link.active { color: var(--app-link); }
[data-bs-theme="dark"] body[data-theme] .side-link.disabled { color: #61686f; }
[data-bs-theme="dark"] .user-status { border: 2px solid #1a1a1a; background: #61686f; }
[data-bs-theme="dark"] .user-status.in { background: #2d5c2f; }
[data-bs-theme="dark"] .user-status.break { background: #7d5112; }
[data-bs-theme="dark"] .user-news { border: 2px solid #1a1a1a; color: #ededed; }
[data-bs-theme="dark"] .new-badge { color: #ededed; }
[data-bs-theme="dark"] .feedback-msg { background: #1c1c1c; }
[data-bs-theme="dark"] .feedback-msg.system { color: #8a929e; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .dropdown-item.user-stamp.in { color: #9cd49e; }
[data-bs-theme="dark"] body[data-theme="somaerp"] .dropdown-item.user-stamp.break { color: #f4c37b; }
[data-bs-theme="dark"] .role-perm-key { color: #69717c; }
[data-bs-theme="dark"] .pres-dep { color: #b5bcc5; }
[data-bs-theme="dark"] .pres-card { --pres: #4e5761; background: #1c1c1c; }
[data-bs-theme="dark"] .pres-card.remote { --pres: #1e7474; }
[data-bs-theme="dark"] .pres-card.break { --pres: #9d7b16; }
[data-bs-theme="dark"] .pres-card.gone { --pres: #846b3b; }
[data-bs-theme="dark"] .pres-card.absent { --pres: #32629a; }
[data-bs-theme="dark"] .pres-card.missing { --pres: #3a404a; }
[data-bs-theme="dark"] .pres-card.none { --pres: #262b30; }
[data-bs-theme="dark"] .pres-card.none, [data-bs-theme="dark"] .pres-card.missing { background: #1b1f23; }
[data-bs-theme="dark"] .pres-name { color: #b5bcc5; }
[data-bs-theme="dark"] .pres-state { color: #8a929e; }
[data-bs-theme="dark"] .pres-abs { color: #8fb4e1; }
[data-bs-theme="dark"] .pres-bar { background: #23272c; }
[data-bs-theme="dark"] .pres-seg { background: #247d5d; }
[data-bs-theme="dark"] .pres-seg.auto { background: #8b2f32; }
[data-bs-theme="dark"] .pres-seg.corr { background: repeating-linear-gradient(45deg, #247d5d 0 4px, #67b99a 4px 8px); }
[data-bs-theme="dark"] .pres-scale { color: #69717c; }
[data-bs-theme="dark"] .pres-times { color: #8a929e; }
[data-bs-theme="dark"] .abs-cal .we { --bs-table-bg: #1f2127; }
[data-bs-theme="dark"] .abs-cal .wk-start { border-left: 1px solid #363b44; }
[data-bs-theme="dark"] .abs-cal .today { --bs-table-bg: rgba(50,98,154,0.12); }
[data-bs-theme="dark"] .abs-cal thead th.today { color: #8cb4e3; }
[data-bs-theme="dark"] .abs-cal .abs-weeks th { color: #828b93; }
[data-bs-theme="dark"] .abs-cal .abs-group td { --bs-table-bg: #1d1f24; }
[data-bs-theme="dark"] .abs-cal .abs-group td.we { --bs-table-bg: #22242b; }
[data-bs-theme="dark"] .abs-cal .abs-group td.today { --bs-table-bg: rgba(50,98,154,0.14); }
[data-bs-theme="dark"] .abs-chip { color: #ededed; background: #5c408f; }
[data-bs-theme="dark"] .abs-chip.part { background-image: linear-gradient(135deg, transparent 50%, rgba(28,28,28,0.55) 50%); }
[data-bs-theme="dark"] .tl-day { background: #1c1c1c; }
[data-bs-theme="dark"] .tl-day.we { background: #1d1f24; }
[data-bs-theme="dark"] .tl-day.empty { color: #69717c; }
[data-bs-theme="dark"] .tl-entry { border-left: 3px solid #237a5b; }
[data-bs-theme="dark"] .tl-entry.absence { border-left-color: #315f97; }
[data-bs-theme="dark"] .tl-entry.error { border-left-color: #882d31; color: #e28d91; }
[data-bs-theme="dark"] .tl-entry.cancelled { border-left-color: #363b44; color: #69717c; }
[data-bs-theme="dark"] .tl-src { color: #69717c; }
[data-bs-theme="dark"] .tl-table tr.cancelled td { color: #69717c; }
[data-bs-theme="dark"] .tl-table tr.error td { color: #e28d91; }
[data-bs-theme="dark"] .dash-greeting { color: #b5bcc5; }
[data-bs-theme="dark"] body[data-theme] .dash-presence { background: #1d1f24; color: #8a929e; }
[data-bs-theme="dark"] body[data-theme] .dash-presence.present { background: #283e2f; color: #94dcb2; }
[data-bs-theme="dark"] body[data-theme] .dash-presence.break { background: #514017; color: #f4ca7b; }
[data-bs-theme="dark"] .palette-btn { border: 1px solid #262930; background: #1f2327; color: #808795; }
[data-bs-theme="dark"] .palette-btn:hover { color: #c7ccd3; }
[data-bs-theme="dark"] .palette-btn kbd, [data-bs-theme="dark"] .palette kbd, [data-bs-theme="dark"] .palette-foot kbd { border: 1px solid #32373f; color: #808795; background: #1c1c1c; }
[data-bs-theme="dark"] .palette { background: #1c1c1c; }
[data-bs-theme="dark"] .palette-input { border-bottom: 1px solid #262930; }
[data-bs-theme="dark"] .palette-input i { color: #808795; }
[data-bs-theme="dark"] .palette-list li.sel { background: rgba(139,47,50,0.08); }
[data-bs-theme="dark"] .palette-list li > i { color: var(--app-link); }
[data-bs-theme="dark"] .palette-text small { color: #808795; }
[data-bs-theme="dark"] .palette-group { color: #808795; }
[data-bs-theme="dark"] .palette-empty { color: #808795; }
[data-bs-theme="dark"] .palette-foot { border-top: 1px solid #262930; color: #808795; }
[data-bs-theme="dark"] .side-star { color: #3e444e; }
[data-bs-theme="dark"] .side-star:hover, [data-bs-theme="dark"] .side-star.on { color: #e8ce87; }
[data-bs-theme="dark"] .help-btn { border: 2px solid #2969a1; background: #1c1c1c; color: #87bbe8; }
[data-bs-theme="dark"] .help-btn:hover, [data-bs-theme="dark"] .help-btn.on { background: #2a6ca5; color: #ededed; }
[data-bs-theme="dark"] .help-panel { background: #1a2f42; border: 1px solid #33546e; border-left: 4px solid #2969a1; }
[data-bs-theme="dark"] .help-foot { border-top: 1px solid #33546e; }
[data-bs-theme="dark"] .record-meta { color: #808795; }
[data-bs-theme="dark"] .wf-step { color: #828b93; }
[data-bs-theme="dark"] .wf-step.active { color: #ededed; }
[data-bs-theme="dark"] .wf-step.done { color: #8ee1bb; }
[data-bs-theme="dark"] .wf-step.aborted { background: #51585e; color: #ebebeb; }
[data-bs-theme="dark"] button.wf-step.action { color: #ededed; }
[data-bs-theme="dark"] .confirm-ask { border: 1px solid #73373d; background: #261e1f; }
[data-bs-theme="dark"] body[data-theme] .ws-back { background: #1c1c1c; color: #a9b0bb; }
[data-bs-theme="dark"] body[data-theme] .ws-back:hover { color: var(--app-link); }
[data-bs-theme="dark"] .return-chip { background: #4c3f16; border: 1px solid #d2b157; }
[data-bs-theme="dark"] body[data-theme] .return-chip a { color: #f4d37b; }
[data-bs-theme="dark"] .return-chip button { color: #e6ce89; }
[data-bs-theme="dark"] .tri-box { color: #ebebeb; }
[data-bs-theme="dark"] .tri-box.tri-Not { background: #a7333f; border-color: #a3323d; }
[data-bs-theme="dark"] .field-help { color: #87bbe8; }
[data-bs-theme="dark"] .field-help.on { color: #84aceb; }
[data-bs-theme="dark"] .field-help-text { color: #84aceb; background: #1a2f42; border-left: 3px solid #2969a1; }
[data-bs-theme="dark"] .side-row.arrange .side-link { color: #808795; }
[data-bs-theme="dark"] .side-row.arrange .side-star { color: #808795; }
[data-bs-theme="dark"] .block-toggle:hover { color: var(--app-link); }
[data-bs-theme="dark"] .modal-win { box-shadow: 0 .5rem 1.5rem rgba(41,41,41,0.3); }
[data-bs-theme="dark"] .att-pop { box-shadow: 0 .25rem 1rem rgba(41,41,41,0.25); }
[data-bs-theme="dark"] .price-why:hover { color: var(--app-link); }
[data-bs-theme="dark"] .html table th { background: #202329; }
[data-bs-theme="dark"] .tpl-frame { background: #262b30; }
[data-bs-theme="dark"] .tpl-preview { background: #1c1c1c; }
[data-bs-theme="dark"] .tpl-field-link:hover { color: var(--app-link); }
[data-bs-theme="dark"] .help-q { border: 1px solid #626973; color: #8a929e; }
[data-bs-theme="dark"] .help-q:hover, [data-bs-theme="dark"] .help-q.on { color: #ededed; }
[data-bs-theme="dark"] .help-bubble { box-shadow: 0 .25rem 1rem rgba(36,40,46,0.14); }
[data-bs-theme="dark"] .help-bubble-x { color: #69707c; }
[data-bs-theme="dark"] .help-bubble-x:hover { color: var(--app-link); }
[data-bs-theme="dark"] .help-bubble-meta { color: #8a929e; }
[data-bs-theme="dark"] .help-bubble-meta code { color: #8a929e; }
[data-bs-theme="dark"] .set-tile { background: #1c1c1c; }
[data-bs-theme="dark"] .set-tile:hover { box-shadow: 0 .2rem .6rem rgba(36,40,46,0.08); }
[data-bs-theme="dark"] .set-tile.on { box-shadow: inset 3px 0 0 var(--app-accent), 0 .2rem .6rem rgba(36,40,46,0.08); }
[data-bs-theme="dark"] .set-tile-ico { background: #421e1e; color: var(--app-link); }
[data-bs-theme="dark"] .set-tabs .nav-link { color: #8a929e; }
[data-bs-theme="dark"] .set-tabs .nav-link.active { color: var(--app-link); }
[data-bs-theme="dark"] .set-chip { color: #8a929e; background: #1d1f24; }
[data-bs-theme="dark"] .set-chip.set { color: #81adee; background: #152b49; }
[data-bs-theme="dark"] .set-chip.dirty { color: #f4ca7b; background: #514017; }
[data-bs-theme="dark"] .set-chip.ok { color: #94dcb2; background: #283e2f; }
[data-bs-theme="dark"] .set-chip.warn { color: #f4ca7b; background: #514017; }
[data-bs-theme="dark"] .set-panel { background: #1c1c1c; box-shadow: 0 .25rem .9rem rgba(36,40,46,0.06); }
[data-bs-theme="dark"] .set-panel-head { background: #1c1c1c; }
[data-bs-theme="dark"] .set-panel-head .set-desc { color: #8a929e; }
[data-bs-theme="dark"] .set-sec h3 { color: #8a929e; }
[data-bs-theme="dark"] .set-meta { color: #8a929e; }
[data-bs-theme="dark"] .set-seg button { background: #1c1c1c; }
[data-bs-theme="dark"] .set-seg button.on { color: #ededed; }
[data-bs-theme="dark"] .set-toggle input { background: #343a42; }
[data-bs-theme="dark"] .set-toggle input::after { background: #1c1c1c; box-shadow: 0 1px 2px rgba(41,41,41,0.25); }
[data-bs-theme="dark"] .set-callout { background: #514017; color: #f4ca7b; }
[data-bs-theme="dark"] .set-callout.ok { background: #283e2f; color: #91deb3; }
[data-bs-theme="dark"] .set-callout.fail { background: #421e1e; color: #e08f93; }
[data-bs-theme="dark"] .ocr-checks .ocr-ms { color: #8a929e; }
[data-bs-theme="dark"] .ocr-checks li.ok i { color: #93dcb2; }
[data-bs-theme="dark"] .ocr-checks li.warn i { color: #f4ca7b; }
[data-bs-theme="dark"] .ocr-checks li.fail i { color: #e69089; }
[data-bs-theme="dark"] .ocr-checks li.skip { color: #8a929e; }
[data-bs-theme="dark"] .mc-card { background: #1c1c1c; }
[data-bs-theme="dark"] .mc-card.off { background: #1a1a22; }
[data-bs-theme="dark"] .mc-card.off .mc-head { box-shadow: inset 0 3px 0 #343a42; }
[data-bs-theme="dark"] .mc-state dt { color: #8a929e; }
[data-bs-theme="dark"] .chip-box-empty { color: #8a929e; }
[data-bs-theme="dark"] .chip-box-chip { background: #421e1e; color: #e08f93; }
[data-bs-theme="dark"] .chip-box-x:hover { color: #ededed; }
[data-bs-theme="dark"] .chip-box-add { color: #8a929e; border: 1px dashed #404751; }
[data-bs-theme="dark"] .chip-box-add:hover { color: var(--app-link); }
[data-bs-theme="dark"] .chip-box-menu { box-shadow: 0 .25rem 1rem rgba(36,40,46,0.14); }
[data-bs-theme="dark"] .chip-box-opt:hover { background: #421e1e; color: #e08f93; }
[data-bs-theme="dark"] .set-sections .set-sec { background: #1a1a22; }
[data-bs-theme="dark"] .set-secnav-item.on { color: var(--app-link); }
[data-bs-theme="dark"] .cp-tile { background: #1c1c1c; }
[data-bs-theme="dark"] .cp-tile::before { background: #3a404a; }
[data-bs-theme="dark"] .cp-tile.warn::before { background: #9d7716; }
[data-bs-theme="dark"] .cp-tile:hover { box-shadow: 0 .25rem .9rem rgba(36,40,46,0.08); }
[data-bs-theme="dark"] .cp-tile-head { color: #a9b0bb; }
[data-bs-theme="dark"] .cp-tile-head i { color: var(--app-link); }
[data-bs-theme="dark"] .cp-tile.alert .cp-tile-value { color: var(--app-link); }
[data-bs-theme="dark"] .cp-tile-hint { color: #8a929e; }
[data-bs-theme="dark"] .cp-tile-area { color: #828b93; background: #21262a; }
[data-bs-theme="dark"] .qc { --qc-series: #32629a; --qc-grid: #292d33; }
[data-bs-theme="dark"] .qc-title { color: #a9b0bb; }
[data-bs-theme="dark"] .qc-barlabel { color: #a9b0bb; }
[data-bs-theme="dark"] .qc-barvalue { color: #8a929e; }
[data-bs-theme="dark"] .qc-gridline span { color: #828b93; }
[data-bs-theme="dark"] .qc-legend { color: #a9b0bb; }
[data-bs-theme="dark"] .qc-collabel { color: #828b93; }
[data-bs-theme="dark"] .search-mask-foot td { background: #21262a; border-top: 2px solid #9ba4b1; }
[data-bs-theme="dark"] .an-bar > i { background: rgba(137,32,40,0.12); }
[data-bs-theme="dark"] .an-kpi { background: #1c1c1c; }
[data-bs-theme="dark"] .an-kpi span { color: #8a929e; }
[data-bs-theme="dark"] .cp-list { background: #1c1c1c; }
[data-bs-theme="dark"] .cp-list li { border-bottom: 1px solid #202429; }
[data-bs-theme="dark"] .cp-list li a:hover .cp-row-label { color: var(--app-link); }
[data-bs-theme="dark"] .cp-row-detail { color: #8a929e; }
[data-bs-theme="dark"] .cp-badge { background: #514017; color: #f4ca7b; }
[data-bs-theme="dark"] .cp-empty { color: #94dcb2; }
[data-bs-theme="dark"] .cp-planned-title { color: #8a929e; }
[data-bs-theme="dark"] .cp-planned-tile { border: 1px dashed #404751; background: #1b1f23; }
[data-bs-theme="dark"] .cp-planned-tile .cp-tile-head i { color: #69707c; }
[data-bs-theme="dark"] .cp-soon { color: #69707c; }
[data-bs-theme="dark"] .co-fact { background: #1c1c1c; }
[data-bs-theme="dark"] .co-fact > i { color: var(--app-link); }
[data-bs-theme="dark"] .co-fact span { color: #8a929e; }
[data-bs-theme="dark"] .co-logo { background: #1c1c1c; }
[data-bs-theme="dark"] .card.block-max { box-shadow: 0 .5rem 2rem rgba(41,41,41,0.25); }
[data-bs-theme="dark"] .status-steps::before { background: #373d45; }
[data-bs-theme="dark"] .ss-step { color: #a6aeb9; }
[data-bs-theme="dark"] .ss-dot { border: 2px solid #545e68; background: #1c1c1c; }
[data-bs-theme="dark"] .ss-step:hover .ss-label { color: var(--app-link); }
[data-bs-theme="dark"] .ss-step.on .ss-dot { box-shadow: inset 0 0 0 3px #1c1c1c; }
[data-bs-theme="dark"] .ss-step.on .ss-label { color: var(--app-link); }
[data-bs-theme="dark"] .ss-hint { color: #8a929e; }
[data-bs-theme="dark"] .page-tools:has(.record-toolbar) { background: #1c1c1c; border: 1px solid #262930; }
[data-bs-theme="dark"] .page-tools:has(.record-toolbar) .page-tools-right { border-left: 1px solid #262930; }
[data-bs-theme="dark"] .article-summary .article-thumb { border: 1px solid #262930; background: #1c1c1c; color: #3c424c; }
[data-bs-theme="dark"] .article-kpis .kpi { border: 1px solid #262930; }
[data-bs-theme="dark"] .mail-item { border-left: 3px solid #1b59b4; }
[data-bs-theme="dark"] .mail-item.out { border-left-color: #55c390; }
[data-bs-theme="dark"] .mail-item.note { border-left-color: #78828b; }
html[data-bs-theme="dark"].ws-embedded body { background: #1c1c1c; }
[data-bs-theme="dark"] body[data-theme] .ws-titlebar { background: #1c1c1c; border-bottom: 1px solid #262930; }
[data-bs-theme="dark"] .brand-logo .brand-mark, [data-bs-theme="dark"] .brand-logo .brand-erp { fill: var(--app-link); }
[data-bs-theme="dark"] .brand-logo .brand-s { stroke: #1a1a1a; }
[data-bs-theme="dark"] .brand-logo .brand-dot { fill: #edb883; }
[data-bs-theme="dark"] .brand-logo .brand-soma { fill: #b5bcc5; }
[data-bs-theme="dark"] body[data-theme] .ws-titlebar .nav-link { color: #c7ccd3; }
[data-bs-theme="dark"] body[data-theme] .ws-titlebar .nav-link:hover { color: var(--app-link); }
[data-bs-theme="dark"] .cp-new { background: #bf3b40; }
[data-bs-theme="dark"] .ws-tabs { background: #262b30; border-bottom: 1px solid #2a2f35; }
[data-bs-theme="dark"] .ws-tab { border-right: 1px solid #2a2f35; color: #a0a8b0; }
[data-bs-theme="dark"] .ws-tab:hover { background: #21262a; color: #c7ccd3; }
[data-bs-theme="dark"] .ws-tab.on { background: #1f2327; }
[data-bs-theme="dark"] .ws-tab > i { color: #6e767f; }
[data-bs-theme="dark"] .ws-tab.on > i { color: var(--app-link); }
[data-bs-theme="dark"] .ws-tab-x { color: #6e767f; }
[data-bs-theme="dark"] .ws-tab-x:hover { background: #2d3339; color: #c7ccd3; }
[data-bs-theme="dark"] .ws-tab-new { color: #a0a8b0; }
[data-bs-theme="dark"] .ws-tab-new:hover { background: #2d3339; }
[data-bs-theme="dark"] .ws-tool { color: #a0a8b0; }
[data-bs-theme="dark"] .ws-tool:hover { background: #2d3339; }
[data-bs-theme="dark"] .ws-tool.on { background: #421e20; border-color: #683739; color: #e18e91; }
html[data-bs-theme="dark"].ws-has-split .ws-split { background: #1c1c1c; border-left: 1px solid #333a41; }
[data-bs-theme="dark"] .ws-split-resizer:hover { background: rgba(139,47,50,0.18); }
[data-bs-theme="dark"] .ws-split-head { background: #262b30; border-bottom: 1px solid #2a2f35; }
[data-bs-theme="dark"] .ws-split-head > i { color: var(--app-link); }
[data-bs-theme="dark"] .ws-split-head button { color: #a0a8b0; }
[data-bs-theme="dark"] .ws-split-head button:hover { background: #2d3339; color: #c7ccd3; }
[data-bs-theme="dark"] .ws-menu-backdrop.dim { background: rgba(36,40,46,0.35); }
[data-bs-theme="dark"] .ws-menu { background: #1c1c1c; border: 1px solid #2a2f35; }
[data-bs-theme="dark"] .ws-menu button { color: #c7ccd3; }
[data-bs-theme="dark"] .ws-menu button:hover { background: rgba(139,47,50,0.08); color: var(--app-link); }
[data-bs-theme="dark"] .ws-menu button i { color: #808795; }
[data-bs-theme="dark"] .ws-menu kbd { color: #808795; background: #21262a; border: 1px solid #2a2f35; }
[data-bs-theme="dark"] .ws-help { background: #1c1c1c; box-shadow: 0 1rem 2.5rem rgba(41,41,41,0.3); }
[data-bs-theme="dark"] .ws-help-head { border-bottom: 1px solid #23282d; }
[data-bs-theme="dark"] .ws-help-head button { color: #a0a8b0; }
[data-bs-theme="dark"] .ws-help h6 { color: var(--app-link); }
[data-bs-theme="dark"] .ws-help kbd { color: #c7ccd3; background: #1d2125; border: 1px solid #333a41; }
[data-bs-theme="dark"] .ws-help p { color: #a0a8b0; }
[data-bs-theme="dark"] .ws-flash { color: #ebebeb; box-shadow: 0 .4rem 1rem rgba(41,41,41,0.25); }
[data-bs-theme="dark"] .ws-split-empty { color: #828b93; }
[data-bs-theme="dark"] .ws-split-empty i { color: #373e46; }
[data-bs-theme="dark"] .ws-split-empty strong { color: #b2bac1; }
[data-bs-theme="dark"] .act-list .act-item { border-bottom: 1px solid #1e2227; }
[data-bs-theme="dark"] .sig::before { background: #4e5761; }
[data-bs-theme="dark"] .sig.sig-green::before { background: #24643f; }
[data-bs-theme="dark"] .sig.sig-yellow::before { background: #9d7716; }
[data-bs-theme="dark"] .sig.sig-red::before { background: #8b2f32; }
[data-bs-theme="dark"] .pm-signal { background: #1c1c1c; }
[data-bs-theme="dark"] .pm-signal small { color: #8a929e; }
[data-bs-theme="dark"] .pm-reasons { color: #a9b0bb; }
[data-bs-theme="dark"] .pm-gantt > div { border-bottom: 1px solid #202429; }
[data-bs-theme="dark"] .pm-gantt .g-label small { color: #8a929e; }
[data-bs-theme="dark"] .pm-gantt .g-scale { border-bottom: 1px solid #333a41; }
[data-bs-theme="dark"] .pm-gantt .g-tick { border-left: 1px solid #21262a; color: #8a929e; }
[data-bs-theme="dark"] .pm-gantt .g-bar { background: #253850; }
[data-bs-theme="dark"] .pm-gantt .g-bar > i { background: #32629a; }
[data-bs-theme="dark"] .pm-gantt .g-bar.done { background: #6f98cb; }
[data-bs-theme="dark"] .pm-gantt .g-bar.late { box-shadow: 0 0 0 2px #8b2f32; }
[data-bs-theme="dark"] .pm-gantt .g-base { background: #666c75; }
[data-bs-theme="dark"] .pm-gantt .g-ms { background: #32629a; border: 2px solid #1a1a1a; box-shadow: 0 0 0 1px #32629a; }
[data-bs-theme="dark"] .pm-gantt .g-ms.reached { background: #24643f; box-shadow: 0 0 0 1px #24643f; }
[data-bs-theme="dark"] .pm-gantt .g-ms.late { background: #8b2f32; box-shadow: 0 0 0 1px #8b2f32; }
[data-bs-theme="dark"] .pm-gantt .g-ms.gate::after { background: #1c1c1c; }
[data-bs-theme="dark"] .pm-gantt .g-today { border-left: 2px dashed #882d31; }
[data-bs-theme="dark"] .pm-gantt .g-row-head { background: #1d2125; }
[data-bs-theme="dark"] .pm-legend { color: #8a929e; }
[data-bs-theme="dark"] .pm-legend .lg-bar { background: linear-gradient(90deg, #32629a 50%, #253850 50%); }
[data-bs-theme="dark"] .pm-legend .lg-base { background: #666c75; }
[data-bs-theme="dark"] .pm-legend .lg-ms { background: #32629a; }
[data-bs-theme="dark"] .pm-legend .lg-today { border-left: 2px dashed #882d31; }
[data-bs-theme="dark"] .pm-load.l0 { background: #1d2125; color: #8a929e; }
[data-bs-theme="dark"] .pm-load.l1 { background: #1d3046; }
[data-bs-theme="dark"] .pm-load.l2 { background: #283e58; }
[data-bs-theme="dark"] .pm-load.l3 { background: #568cca; }
[data-bs-theme="dark"] .pm-load.l4 { background: #4c2324; color: #e38c8f; }
[data-bs-theme="dark"] .pm-matrix .m-cell.green { background: #284031; }
[data-bs-theme="dark"] .pm-matrix .m-cell.yellow { background: #52441b; }
[data-bs-theme="dark"] .pm-matrix .m-cell.red { background: #492122; }
[data-bs-theme="dark"] .pm-matrix .m-axis { color: #8a929e; }
[data-bs-theme="dark"] .pm-matrix .m-chip { background: #1c1c1c; border: 1px solid #333a41; }
[data-bs-theme="dark"] .pm-matrix.stake .m-cell { background: #21262a; }
[data-bs-theme="dark"] .pm-matrix.stake .m-cell.focus { background: #1d3046; }
[data-bs-theme="dark"] .pm-matrix .m-quad { color: #8a929e; }
[data-bs-theme="dark"] .pm-swatch { border: 1px solid #2a2f35; }
[data-bs-theme="dark"] .pm-swatch.l1 { background: #1d3046; }
[data-bs-theme="dark"] .pm-swatch.l2 { background: #283e58; }
[data-bs-theme="dark"] .pm-swatch.l3 { background: #568cca; }
[data-bs-theme="dark"] .pm-swatch.l4 { background: #4c2324; }
[data-bs-theme="dark"] .tmc-head { color: #69717c; }
[data-bs-theme="dark"] .tmc-day:hover { border-color: #626a73; }
[data-bs-theme="dark"] .tmc-day.we { background: var(--bs-tertiary-bg, #1d1f24); }
[data-bs-theme="dark"] .tmc-day.today .tmc-num { color: #e08f92; }
[data-bs-theme="dark"] .tmc-day.sel { outline: 2px solid #315f97; }
[data-bs-theme="dark"] .tmc-hours { color: #8d949e; }
[data-bs-theme="dark"] .tmc-seg-label { color: var(--tc, #ebebeb); }
[data-bs-theme="dark"] .tmc-entry { border-left: 4px solid var(--c, #2f7049); }
[data-bs-theme="dark"] .tmc-entry.error { color: #e28d91; }
[data-bs-theme="dark"] .tmc-entry.cancelled { color: #69717c; border-left-color: #363b44; }
[data-bs-theme="dark"] .bk-wd { color: #69717c; }
[data-bs-theme="dark"] .bk-day { background: var(--bs-tertiary-bg, #202329); }
[data-bs-theme="dark"] .bk-day.we { color: #69717c; }
[data-bs-theme="dark"] .bk-day.set { color: #ebebeb; }
[data-bs-theme="dark"] .bk-day.today { outline: 2px solid #315f97; }
[data-bs-theme="dark"] .ts-label { color: #828b93; }
[data-bs-theme="dark"] .ts-sub { color: #828b93; }
[data-bs-theme="dark"] body[data-theme] .portal-titlebar .portal-title { color: var(--app-link); }
[data-bs-theme="dark"] body[data-theme] .portal-titlebar .nav-link.active { color: var(--app-link); }
[data-bs-theme="dark"] body[data-theme] .portal-titlebar .portal-user { color: #828b93; }
[data-bs-theme="dark"] body[data-theme] .portal-titlebar .portal-action { border: 1px solid #32383f; }
[data-bs-theme="dark"] .mn-sheet { color: #c5cbd2; background: #1c1c1c; }
[data-bs-theme="dark"] .mn-head { border-bottom: 2px solid #b3b3b3; }
[data-bs-theme="dark"] .mn-meta th { color: #a4a4a4; }
[data-bs-theme="dark"] .mn-days th, [data-bs-theme="dark"] .mn-days td { border-bottom: 1px solid #333333; }
[data-bs-theme="dark"] .mn-days thead th { border-bottom: 1.5px solid #b3b3b3; }
[data-bs-theme="dark"] .mn-days tfoot th { border-top: 1.5px solid #b3b3b3; }
[data-bs-theme="dark"] .mn-days tr.we td { background: #1c1c23; color: #808795; }
[data-bs-theme="dark"] .mn-days tr.future td { color: #61686f; }
[data-bs-theme="dark"] .mn-kind { color: #acb2bb; border-left: 3px solid var(--k, #737373); background: color-mix(in srgb, var(--k, #666666) 14%, #1c1c1c); }
[data-bs-theme="dark"] .mn-note { color: #a4a4a4; }
[data-bs-theme="dark"] .mn-box h2 { border-bottom: 1.5px solid #b3b3b3; }
[data-bs-theme="dark"] .mn-acc td { border-bottom: 1px solid #2f2f2f; }
[data-bs-theme="dark"] .mn-acc td:first-child { color: #a4a4a4; }
[data-bs-theme="dark"] .mn-acc tr.total td { border-top: 1.5px solid #b3b3b3; }
[data-bs-theme="dark"] .mn-lohn { color: #a4a4a4; border: 1px solid #4d4d4d; }
[data-bs-theme="dark"] .inv-stat.warn { border-color: #997816; background: color-mix(in srgb, #b7901a 10%, transparent); }
[data-bs-theme="dark"] .cnt-cam { background: #292929; }
[data-bs-theme="dark"] .cnt-line.done { border-left: 4px solid #55c390; }
[data-bs-theme="dark"] .inv-print .inv-binhead td { background: #2b3036; border-top: 1.5px solid #b3b3b3; }
[data-bs-theme="dark"] .inv-print .inv-write { border-bottom: 1px solid #737373; }
[data-bs-theme="dark"] .inv-sign > div { border-top: 1px solid #b3b3b3; color: #b2b2b2; }
[data-bs-theme="dark"] .as-row.as-selected > td { background: #1c2d43; box-shadow: inset 0 -1px 0 #32629a; }
[data-bs-theme="dark"] .as-row.as-selected > td:first-child { box-shadow: inset 3px 0 0 #32629a, inset 0 -1px 0 #32629a; }
[data-bs-theme="dark"] .ptc-dot { background: #32629a; }
[data-bs-theme="dark"] .ptc-line { background: #b9542c; }
[data-bs-theme="dark"] .ptc-dash { border-top: 2px dashed #b5522b; }
[data-bs-theme="dark"] .ptc-grid { stroke: #26292f; }
[data-bs-theme="dark"] .ptc-axis { fill: #828b93; }
[data-bs-theme="dark"] .ptc-label { fill: #b2bac1; }
[data-bs-theme="dark"] .ptc-today { stroke: #48515a; }
[data-bs-theme="dark"] .ptc-orderline { stroke: #315f97; }
[data-bs-theme="dark"] .ptc-order { fill: #8fb4e1; stroke: #1a1a1a; }
[data-bs-theme="dark"] .ptc-list { stroke: #b5522b; }
[data-bs-theme="dark"] .ptc-est { stroke: #b5522b; }
[data-bs-theme="dark"] .ptc-estdot { fill: #ebebeb; stroke: #b5522b; }
[data-bs-theme="dark"] .nl-preview { background: #252525; }
[data-bs-theme="dark"] .crm-col { background: #1f2127; border: 1px solid #282d33; }
[data-bs-theme="dark"] .crm-col-sum { color: #8d949e; }
[data-bs-theme="dark"] .crm-card { background: #1c1c1c; border: 1px solid #2a2f35; border-left: 3px solid #2a2f35; }
[data-bs-theme="dark"] .crm-card.due { border-left-color: #a17826; }
[data-bs-theme="dark"] .crm-card.late { border-left-color: #8e343d; }
[data-bs-theme="dark"] .crm-card .crm-card-meta { color: #8d949e; }
[data-bs-theme="dark"] .crm-tl-item { border-bottom: 1px solid #21262a; }
[data-bs-theme="dark"] .crm-tl-icon { background: #262f39; color: #95b5da; }
[data-bs-theme="dark"] .crm-tl-when { color: #8d949e; }
[data-bs-theme="dark"] .crm-ai-out { background: #1d2025; border: 1px solid #282d33; }
[data-bs-theme="dark"] .crm-ai-facts { color: #8d949e; }
[data-bs-theme="dark"] .fak-check-error { color: #dd929a; }
[data-bs-theme="dark"] .fak-check-warning { color: #f4ca7b; }
[data-bs-theme="dark"] .fak-check-info { color: #a4a4a4; }
[data-bs-theme="dark"] .fak-steps .step { border: 1px solid #333a41; color: #a4a4a4; background: #1c1c1c; }
[data-bs-theme="dark"] .fak-steps .step.done { border-color: #55c390; color: #8ee1bb; }
[data-bs-theme="dark"] .fak-steps .step.active { border-color: #1b59b4; background: #152b49; color: #81adef; }
[data-bs-theme="dark"] .fak-steps .step.blocked { border-color: #a3323d; color: #dd929a; }
[data-bs-theme="dark"] .fak-option { border: 1px solid #2a2f35; background: #1c1c1c; }
[data-bs-theme="dark"] .fak-option.selected { border-color: #1b59b4; background: #1d2025; }
[data-bs-theme="dark"] .fak-greyed { color: #7b7b7b; }
[data-bs-theme="dark"] .fld-board-wrap { border: 1px solid #2a2f35; background: #1c1c1c; }
[data-bs-theme="dark"] .fld-board > div { border-right: 1px solid #21262a; border-bottom: 1px solid #21262a; }
[data-bs-theme="dark"] .fld-board .fld-head { background: #1f2327; }
[data-bs-theme="dark"] .fld-board .fld-head.today { background: #461a1c; color: #e08f93; }
[data-bs-theme="dark"] .fld-board .fld-tech { background: #1b1f23; }
[data-bs-theme="dark"] .fld-board .fld-day.weekend { background: #1d2125; }
[data-bs-theme="dark"] .fld-board .fld-day.today { background: #231b1b; }
[data-bs-theme="dark"] .fld-board .fld-day.drop { outline: 2px dashed #882d31; }
[data-bs-theme="dark"] .fld-add { color: #828b93; }
[data-bs-theme="dark"] .fld-item { color: #c5cad0; border-left: .3rem solid #78828b; background: #2b3036; }
[data-bs-theme="dark"] .fld-item:hover { color: #c5cad0; }
[data-bs-theme="dark"] .fld-item .fld-sub { color: #a0a8b0; }
[data-bs-theme="dark"] .fld-absent { background: #262b30; color: #a0a8b0; }
[data-bs-theme="dark"] .fld-c1 { border-left-color: #882d31; }
[data-bs-theme="dark"] .fld-dot.fld-c1 { background: #8b2f32; }
[data-bs-theme="dark"] .fld-item.fld-c1 { background: #421e20; }
[data-bs-theme="dark"] .fld-c2 { border-left-color: #27557d; }
[data-bs-theme="dark"] .fld-dot.fld-c2 { background: #285780; }
[data-bs-theme="dark"] .fld-item.fld-c2 { background: #213242; }
[data-bs-theme="dark"] .fld-c3 { border-left-color: #2c5f37; }
[data-bs-theme="dark"] .fld-dot.fld-c3 { background: #2d6238; }
[data-bs-theme="dark"] .fld-item.fld-c3 { background: #283c2c; }
[data-bs-theme="dark"] .fld-c4 { border-left-color: #794f11; }
[data-bs-theme="dark"] .fld-dot.fld-c4 { background: #7d5112; }
[data-bs-theme="dark"] .fld-item.fld-c4 { background: #48371d; }
[data-bs-theme="dark"] .fld-c5 { border-left-color: #5a3f8b; }
[data-bs-theme="dark"] .fld-dot.fld-c5 { background: #5c408f; }
[data-bs-theme="dark"] .fld-item.fld-c5 { background: #2c2040; }
[data-bs-theme="dark"] .fld-c6 { border-left-color: #4bcbcd; }
[data-bs-theme="dark"] .fld-item.fld-c6 { background: #274040; }
[data-bs-theme="dark"] .fld-c7 { border-left-color: #645336; }
[data-bs-theme="dark"] .fld-dot.fld-c7 { background: #665537; }
[data-bs-theme="dark"] .fld-item.fld-c7 { background: #3e3628; }
[data-bs-theme="dark"] .fld-c8 { border-left-color: #949da5; }
[data-bs-theme="dark"] .fld-dot.fld-c8 { background: #373c41; }
[data-bs-theme="dark"] .fld-item.fld-c8 { background: #252a2f; }
[data-bs-theme="dark"] .fld-pool .fld-order { border: 1px solid #2a2f35; background: #1c1c1c; }
[data-bs-theme="dark"] .fld-pool .fld-order:hover { border-color: #882d31; }
[data-bs-theme="dark"] .fld-photos img { border: 1px solid #2a2f35; }
[data-bs-theme="dark"] .fld-sign img { border: 1px solid #2a2f35; background: #1c1c1c; }
}
/* ===== Darkmodus – Ende des erzeugten Teils ===== */

/* ===== Darkmodus – von Hand (bleibt beim Erzeugen erhalten) ===== */
@media screen {
[data-bs-theme="dark"] .brand-logo .brand-soma { fill: #e6e8eb; }
[data-bs-theme="dark"] .brand-logo .brand-s { stroke: #fff; }
[data-bs-theme="dark"] .brand-logo .brand-dot { fill: #f08a24; }
[data-bs-theme="dark"] .brand-logo .brand-erp { fill: var(--app-link); }
[data-bs-theme="dark"] .brand-logo .brand-mark { fill: var(--app-accent-on-dark, var(--app-accent)); }
[data-bs-theme="dark"] body[data-theme] { background-color: #16191d; }
[data-bs-theme="dark"] .form-control::placeholder { color: #7d8590; }
/* Schrift in Markenfarbe: lesbares helles Rot statt der gedämpften Flächenfarbe */
[data-bs-theme="dark"] body[data-theme] .text-primary { color: var(--app-link) !important; }
[data-bs-theme="dark"] body[data-theme] .btn-outline-primary { --bs-btn-color: var(--app-link); --bs-btn-hover-color: #f1f3f5; }
[data-bs-theme="dark"] .btn-outline-danger { --bs-btn-color: #e8959a; --bs-btn-border-color: #9b3a3f; --bs-btn-hover-bg: #7a2b2f; --bs-btn-hover-border-color: #7a2b2f; --bs-btn-hover-color: #f1f3f5; }
/* Abzeichen (Status „neu“ u. a.): getönt statt vollflächig, Schrift in der Farbe */
[data-bs-theme="dark"] .badge.text-bg-danger { background-color: rgba(220,53,69,.18) !important; color: #f0a3aa !important; box-shadow: inset 0 0 0 1px rgba(220,53,69,.45); }
[data-bs-theme="dark"] .badge.text-bg-primary { background-color: rgba(13,110,253,.2) !important; color: #9ec5fe !important; box-shadow: inset 0 0 0 1px rgba(13,110,253,.45); }
[data-bs-theme="dark"] .badge.text-bg-success { background-color: rgba(25,135,84,.2) !important; color: #8fd8b4 !important; box-shadow: inset 0 0 0 1px rgba(25,135,84,.5); }
[data-bs-theme="dark"] .badge.text-bg-info { background-color: rgba(13,202,240,.16) !important; color: #8fdff2 !important; box-shadow: inset 0 0 0 1px rgba(13,202,240,.4); }
[data-bs-theme="dark"] .badge.text-bg-secondary { background-color: #3a4047 !important; color: #d3d8de !important; }
[data-bs-theme="dark"] .badge.text-bg-light { background-color: #343a41 !important; color: #e3e6ea !important; }
[data-bs-theme="dark"] .badge.text-bg-warning { background-color: #c99b2b !important; color: #16191d !important; }
/* Tabellenzeilen-Varianten (table-secondary/-light …): Bootstrap färbt sie auch im Dunkeln hell – hier dunkle, getönte Flächen mit heller Schrift */
[data-bs-theme="dark"] .table-secondary, [data-bs-theme="dark"] .table-light { --bs-table-bg: #2a2f35; --bs-table-color: #e3e6ea; --bs-table-border-color: #3a4047; --bs-table-striped-bg: #2f343b; --bs-table-hover-bg: #343a41; --bs-table-hover-color: #f1f3f5; --bs-table-active-bg: #343a41; --bs-table-active-color: #f1f3f5; }
[data-bs-theme="dark"] .table-primary { --bs-table-bg: #1d2c42; --bs-table-color: #d6e4f8; --bs-table-border-color: #2d4466; --bs-table-hover-bg: #23364f; --bs-table-hover-color: #fff; }
[data-bs-theme="dark"] .table-success { --bs-table-bg: #1b3328; --bs-table-color: #d3eee0; --bs-table-border-color: #29503d; --bs-table-hover-bg: #213d30; --bs-table-hover-color: #fff; }
[data-bs-theme="dark"] .table-warning { --bs-table-bg: #3a3118; --bs-table-color: #f3e4b8; --bs-table-border-color: #5a4b22; --bs-table-hover-bg: #43391c; --bs-table-hover-color: #fff; }
[data-bs-theme="dark"] .table-danger { --bs-table-bg: #3d1f22; --bs-table-color: #f3cfd2; --bs-table-border-color: #5e2e33; --bs-table-hover-bg: #472428; --bs-table-hover-color: #fff; }
[data-bs-theme="dark"] .table-info { --bs-table-bg: #173640; --bs-table-color: #cfeef5; --bs-table-border-color: #24525f; --bs-table-hover-bg: #1b3f4a; --bs-table-hover-color: #fff; }
[data-bs-theme="dark"] .table > :not(caption) > * > .table-active, [data-bs-theme="dark"] .table > :not(caption) > .table-active > * { --bs-table-color-state: #f1f3f5; --bs-table-bg-state: rgba(255,255,255,.07); }
/* Anwesenheit: heute als dezente blaue Fläche */
[data-bs-theme="dark"] .abs-cal .today { --bs-table-bg: rgba(90,150,230,.16); }
[data-bs-theme="dark"] .abs-cal .abs-group td.today { --bs-table-bg: rgba(90,150,230,.18); }
/* Statusschritte: aktiver Schritt und Aktion getönt statt vollflächig */
[data-bs-theme="dark"] .wf-step.active { background: rgba(193,39,45,.22); border-color: rgba(193,39,45,.55); color: #f0b2b5; }
[data-bs-theme="dark"] button.wf-step.action { background: rgba(25,135,84,.22); border-color: rgba(25,135,84,.6); color: #9fdcbd; }
[data-bs-theme="dark"] button.wf-step.action:hover { background: rgba(25,135,84,.35); }
/* Symbolleiste hebt sich von der Seite ab; Trefferzahl gut lesbar */
[data-bs-theme="dark"] .record-toolbar, [data-bs-theme="dark"] .page-tools:has(.record-toolbar) { background: #262b31; border-color: #3a4048; }
[data-bs-theme="dark"] .page-tools:has(.record-toolbar) .record-toolbar { background: none; }
[data-bs-theme="dark"] .rt-btn { background: #30363d; border-color: #464d56; color: #d0d5db; }
[data-bs-theme="dark"] .rt-btn:hover:not(:disabled) { background: #3a414a; color: #f1f3f5; }
[data-bs-theme="dark"] .rt-btn:disabled { background: #2a2f35; color: #5d646c; }
[data-bs-theme="dark"] .rt-badge { background: #e7b941; color: #16191d; font-weight: 700; font-size: .7rem; box-shadow: 0 0 0 2px #262b31; }
/* Rücksprung „Zurück zu …“: helle Schrift auf dunklem Bernstein */
[data-bs-theme="dark"] .return-chip { background: #3d3418; border-color: #7a6526; }
[data-bs-theme="dark"] body[data-theme] .return-chip a { color: #f1dc9c; }
[data-bs-theme="dark"] body[data-theme] .return-chip a strong { color: #fff3cf; }
/* ws189: bg-light/bg-white sind in Bootstrap feste helle Flächen – im Dunkeln getönte Fläche mit heller Schrift (Code liest bg-body-tertiary) */
[data-bs-theme="dark"] .bg-light, [data-bs-theme="dark"] .bg-white:not(.mail-signature-preview) { background-color: var(--bs-tertiary-bg) !important; color: var(--bs-body-color); }
[data-bs-theme="dark"] .text-bg-light:not(.badge) { background-color: #2a2f35 !important; color: #e3e6ea !important; }
[data-bs-theme="dark"] .badge.text-bg-light.text-dark { color: #e3e6ea !important; }
/* Mailtext: Mails bringen eigene Farben mit – als helles Blatt anzeigen, damit sie lesbar bleiben */
[data-bs-theme="dark"] .mail-body.html { background: #e9ebee; color: #1c2128; border-radius: .25rem; padding: .5rem .75rem; color-scheme: light; }
[data-bs-theme="dark"] .mail-body.html a { color: #a31f24 !important; }
}

/* ------------------------------------------------------------------ Importadapter (ADR 0119), /stammdaten/import */
.imp-step { display: inline-block; font-size: .72rem; font-weight: 600; border: 1px solid var(--bs-primary); color: var(--bs-primary); border-radius: .25rem; padding: 0 .35rem; margin-right: .5rem; }
.imp-drop { position: relative; border: 2px dashed var(--bs-border-color); border-radius: .5rem; background: var(--bs-tertiary-bg); min-height: 11rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; text-align: center; padding: 1rem; transition: border-color .15s, background .15s; }
.imp-drop.over, .imp-drop:hover { border-color: var(--bs-primary); background: var(--bs-primary-bg-subtle); }
.imp-drop .imp-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.imp-rule { border: 1px solid var(--bs-border-color); border-radius: .375rem; padding: .25rem .75rem .5rem; flex: 1 1 15rem; min-width: 0; }
.imp-rule legend { float: none; width: auto; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); padding: 0 .25rem; margin: 0; }
.imp-sum.active { outline: 2px solid var(--bs-primary); }
.imp-rows { max-height: 32rem; overflow: auto; }
.imp-warn td:first-child { box-shadow: inset 3px 0 0 var(--bs-warning); }
.imp-chg { color: #6a4fb3; }
.imp-bg-chg { background: #6a4fb3; }
.imp-badge-chg { background: #e7e1f6; color: #5f47a8; }
:root[data-bs-theme="dark"] .imp-chg, [data-theme="dark"] .imp-chg { color: #ab98ee; }
.imp-tree { max-height: 32rem; overflow: auto; font-size: .85rem; background: var(--bs-tertiary-bg); }
.imp-tree ul { list-style: none; margin: 0; padding-left: 1.1rem; border-left: 1px dotted var(--bs-border-color); }
.imp-tree > ul { padding-left: 0; border-left: 0; }
.imp-tree li { padding: 1px 0; }
.imp-node { white-space: nowrap; }
.imp-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }
/* Importprofil (ADR 0181): Blöcke ab genügender Inhaltsbreite nebeneinander */
.imp-profile-blocks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1rem; }
@container ws-content (min-width: 1150px) { .imp-profile-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.imp-tag { font-size: .7rem; font-weight: 600; border: 1px solid currentColor; border-radius: .2rem; padding: 0 .25rem; margin-left: .25rem; }
.imp-gone .imp-node { text-decoration: line-through; color: var(--bs-danger); }
.imp-gone .imp-tag { text-decoration: none; display: inline-block; }
.imp-conflicts { border: 1px solid var(--bs-warning-border-subtle); background: var(--bs-warning-bg-subtle); border-radius: .5rem; padding: .5rem .75rem; }
.imp-conflicts .table { --bs-table-bg: var(--bs-body-bg); }

/* Controlling (ADR 0147): Balken der Übersicht, Mini-Fortschritt in Tabellen */
.ctl-tabs .nav-link { padding: .35rem .7rem; font-size: .88rem; }
.ctl-h { font-size: .82rem; font-weight: 600; margin-bottom: .6rem; }
.ctl-part > td { opacity: .8; font-size: .95em; }            /* Teilzeile aus der Auftragsstückliste (ADR 0161) – ohne eigene Farbe */
.ctl-part > td:nth-child(2) { padding-left: 1.1rem; }
.ctl-bar-row { display: grid; grid-template-columns: 9.5rem 1fr 6.5rem; align-items: center; gap: .5rem; margin-bottom: .35rem; font-size: .8rem; }
.ctl-click { cursor: pointer; border-radius: .25rem; }
.ctl-click:hover { background: rgba(0,0,0,.04); }
.ctl-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3b424c; }
.ctl-bar-val { text-align: right; font-variant-numeric: tabular-nums; }
.ctl-bar-track { display: flex; gap: 2px; height: .8rem; background: #f1f3f5; border-radius: 0 4px 4px 0; overflow: hidden; }
.ctl-bar { display: block; height: 100%; min-width: 0; }
.ctl-bar:last-child { border-radius: 0 4px 4px 0; }
.ctl-rev { background: #8a96a8; } .ctl-plan { background: #2a78d6; } .ctl-act { background: #1f3a5f; } .ctl-com { background: #8fb8ea; }
.ctl-over { background: #c1272d; } .ctl-crit { background: #c1272d; } .ctl-warn { background: #e0a100; } .ctl-info { background: #8fb8ea; }
.ctl-key { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; vertical-align: -1px; margin-right: .25rem; }
.ctl-mini { display: inline-block; width: 3rem; height: .45rem; background: #e9ecef; border-radius: 3px; vertical-align: middle; overflow: hidden; }
.ctl-mini > span { display: block; height: 100%; background: #1f8a4c; }
.ctl-table td, .ctl-table th { white-space: normal; }
/* Controlling ohne Querscrollen (ADR 0120, Jan 15.11.2026): Tabellen im Container „ctlbody“, Beträge ohne Umbruch, Spalten mit geringerer
   Bedeutung blenden nach Blockbreite aus (geteiltes Fenster / schmaler Bildschirm); maximiert bzw. breit alle Spalten. Hinweiszeilen bleiben. */
.ctl-fit { container-type: inline-size; container-name: ctlbody; overflow-x: hidden; }
.ctl-fit .ctl-table td.text-end, .ctl-fit .ctl-table th.text-end { white-space: nowrap; }
.ctl-fit .ctl-table td[colspan] { display: table-cell !important; }
@container ctlbody (max-width: 84rem) { .ctl-prj > thead > tr > th:nth-child(3), .ctl-prj > tbody > tr > td:nth-child(3), .ctl-prj > thead > tr > th:nth-child(6), .ctl-prj > tbody > tr > td:nth-child(6) { display: none; } }
@container ctlbody (max-width: 72rem) { .ctl-prj > thead > tr > th:nth-child(7), .ctl-prj > tbody > tr > td:nth-child(7), .ctl-prj > thead > tr > th:nth-child(13), .ctl-prj > tbody > tr > td:nth-child(13) { display: none; } }
@container ctlbody (max-width: 60rem) { .ctl-prj > thead > tr > th:nth-child(4), .ctl-prj > tbody > tr > td:nth-child(4), .ctl-prj > thead > tr > th:nth-child(9), .ctl-prj > tbody > tr > td:nth-child(9) { display: none; } }
@container ctlbody (max-width: 48rem) { .ctl-prj > thead > tr > th:nth-child(8), .ctl-prj > tbody > tr > td:nth-child(8), .ctl-prj > thead > tr > th:nth-child(12), .ctl-prj > tbody > tr > td:nth-child(12) { display: none; } }
@container ctlbody (max-width: 88rem) { .ctl-ord > thead > tr > th:nth-child(7), .ctl-ord > tbody > tr > td:nth-child(7), .ctl-ord > thead > tr > th:nth-child(14), .ctl-ord > tbody > tr > td:nth-child(14) { display: none; } }
@container ctlbody (max-width: 76rem) { .ctl-ord > thead > tr > th:nth-child(3), .ctl-ord > tbody > tr > td:nth-child(3), .ctl-ord > thead > tr > th:nth-child(10), .ctl-ord > tbody > tr > td:nth-child(10) { display: none; } }
@container ctlbody (max-width: 64rem) { .ctl-ord > thead > tr > th:nth-child(5), .ctl-ord > tbody > tr > td:nth-child(5), .ctl-ord > thead > tr > th:nth-child(11), .ctl-ord > tbody > tr > td:nth-child(11) { display: none; } }
@container ctlbody (max-width: 52rem) { .ctl-ord > thead > tr > th:nth-child(4), .ctl-ord > tbody > tr > td:nth-child(4), .ctl-ord > thead > tr > th:nth-child(13), .ctl-ord > tbody > tr > td:nth-child(13) { display: none; } }
@container ctlbody (max-width: 88rem) { .ctl-bom > thead > tr > th:nth-child(13), .ctl-bom > tbody > tr > td:nth-child(13), .ctl-bom > thead > tr > th:nth-child(4), .ctl-bom > tbody > tr > td:nth-child(4) { display: none; } }
@container ctlbody (max-width: 76rem) { .ctl-bom > thead > tr > th:nth-child(3), .ctl-bom > tbody > tr > td:nth-child(3), .ctl-bom > thead > tr > th:nth-child(10), .ctl-bom > tbody > tr > td:nth-child(10) { display: none; } }
@container ctlbody (max-width: 64rem) { .ctl-bom > thead > tr > th:nth-child(6), .ctl-bom > tbody > tr > td:nth-child(6), .ctl-bom > thead > tr > th:nth-child(11), .ctl-bom > tbody > tr > td:nth-child(11) { display: none; } }
@container ctlbody (max-width: 52rem) { .ctl-bom > thead > tr > th:nth-child(5), .ctl-bom > tbody > tr > td:nth-child(5), .ctl-bom > thead > tr > th:nth-child(8), .ctl-bom > tbody > tr > td:nth-child(8) { display: none; } }
@container ctlbody (max-width: 68rem) { .ctl-bpos > thead > tr > th:nth-child(6), .ctl-bpos > tbody > tr > td:nth-child(6), .ctl-bpos > thead > tr > th:nth-child(10), .ctl-bpos > tbody > tr > td:nth-child(10) { display: none; } }
@container ctlbody (max-width: 52rem) { .ctl-bpos > thead > tr > th:nth-child(1), .ctl-bpos > tbody > tr > td:nth-child(1), .ctl-bpos > thead > tr > th:nth-child(8), .ctl-bpos > tbody > tr > td:nth-child(8) { display: none; } }
@container ctlbody (max-width: 88rem) { .ctl-opos > thead > tr > th:nth-child(6), .ctl-opos > tbody > tr > td:nth-child(6), .ctl-opos > thead > tr > th:nth-child(7), .ctl-opos > tbody > tr > td:nth-child(7) { display: none; } }
@container ctlbody (max-width: 76rem) { .ctl-opos > thead > tr > th:nth-child(8), .ctl-opos > tbody > tr > td:nth-child(8), .ctl-opos > thead > tr > th:nth-child(13), .ctl-opos > tbody > tr > td:nth-child(13) { display: none; } }
@container ctlbody (max-width: 64rem) { .ctl-opos > thead > tr > th:nth-child(9), .ctl-opos > tbody > tr > td:nth-child(9), .ctl-opos > thead > tr > th:nth-child(10), .ctl-opos > tbody > tr > td:nth-child(10) { display: none; } }
@container ctlbody (max-width: 52rem) { .ctl-opos > thead > tr > th:nth-child(1), .ctl-opos > tbody > tr > td:nth-child(1), .ctl-opos > thead > tr > th:nth-child(14), .ctl-opos > tbody > tr > td:nth-child(14) { display: none; } }
@container ctlbody (max-width: 80rem) { .ctl-pur > thead > tr > th:nth-child(3), .ctl-pur > tbody > tr > td:nth-child(3), .ctl-pur > thead > tr > th:nth-child(9), .ctl-pur > tbody > tr > td:nth-child(9) { display: none; } }
@container ctlbody (max-width: 66rem) { .ctl-pur > thead > tr > th:nth-child(6), .ctl-pur > tbody > tr > td:nth-child(6), .ctl-pur > thead > tr > th:nth-child(11), .ctl-pur > tbody > tr > td:nth-child(11) { display: none; } }
@container ctlbody (max-width: 52rem) { .ctl-pur > thead > tr > th:nth-child(8), .ctl-pur > tbody > tr > td:nth-child(8), .ctl-pur > thead > tr > th:nth-child(12), .ctl-pur > tbody > tr > td:nth-child(12) { display: none; } }
@container ctlbody (max-width: 48rem) { .ctl-prob > thead > tr > th:nth-child(2), .ctl-prob > tbody > tr > td:nth-child(2), .ctl-prob > thead > tr > th:nth-child(6), .ctl-prob > tbody > tr > td:nth-child(6) { display: none; } }
.ctl-table thead th { font-size: .76rem; }
.ctl-pick { line-height: 1; vertical-align: baseline; opacity: .45; }   /* Projekt als Auswahl übernehmen (Trichter) */
tr:hover > td > .ctl-pick, td:hover > .ctl-pick, .ctl-pick:focus { opacity: 1; }
.ctl-pickrow { cursor: default; }
/* Laden/Rechnen im Controlling: Laufbalken unter der Titelleiste (nur Bootstrap-Klassen/-Variablen) */
.ctl-progress { position: sticky; top: var(--ws-top, 0); z-index: 1020; height: .25rem; margin-bottom: .25rem; overflow: hidden; border-radius: .125rem; }
.ctl-progress .progress-bar { width: 100%; height: 100%; }
.ctl-busy-badge { font-weight: 500; }
[data-bs-theme="dark"] .ctl-bar-track, [data-bs-theme="dark"] .ctl-mini { background: #2b3035; }
[data-bs-theme="dark"] .ctl-bar-label { color: #c5cad1; }
[data-bs-theme="dark"] .ctl-act { background: #9cc0ee; } [data-bs-theme="dark"] .ctl-com { background: #3d5f8a; }
[data-bs-theme="dark"] .ctl-click:hover { background: rgba(255,255,255,.05); }
