/* =============================================================================
 * WERAX BESS Park Developer V5 — Stylesheet
 * Ausgelagert aus dem Monolithen, lesbar gegliedert, mit Tab-Navigation,
 * Produktkatalog-Karten und responsivem Layout.
 * ========================================================================== */

:root {
  --blue: #2C5F8A; --blue2: #4E7FA8; --green: #2E9E6B; --green2: #1B7A50;
  --dark: #143038; --ink: #16262C; --steel: #566169; --line: #EAEFED;
  --paper: #F4F8F6; --paper2: #EEF4F1; --warn: #B56A1D; --bad: #A23E2E;
  --violet: #7A5CA8; --shadow: 0 10px 28px rgba(20, 48, 56, .07);
}

* { box-sizing: border-box; }
body {
  margin: 0; background: linear-gradient(180deg, #edf3f0, #f9fbfa 45%, #eef4f1);
  color: var(--ink); font-family: "Hanken Grotesk", system-ui, sans-serif;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4 { font-family: "Hanken Grotesk", system-ui, sans-serif; letter-spacing: -.015em; margin: 0; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid rgba(78, 127, 168, .4); outline-offset: 2px; }

/* ---- Hero ----------------------------------------------------------------- */
.hero { background: radial-gradient(circle at 12% 0, rgba(46, 158, 107, .16), transparent 38%), linear-gradient(135deg, #0f2830, #143038 58%, #1b424a); color: #fff; }
.hero .wrap { padding: 22px 22px 40px; }
.hero p { opacity: .92; }
.wrap { max-width: 1560px; margin: 0 auto; padding: 20px 22px 64px; transition: max-width .18s ease; }
/* Bei eingeklappter Eingabe-Seitenleiste darf der Inhalt auf breiten Bildschirmen
   mehr Platz nutzen (z. B. für die breite Katalog-Verwaltung-Tabelle). */
.wrap.wide { max-width: 1980px; }
.brand { display: flex; gap: 11px; align-items: center; }
/* Logo (Vorgabe Kaan 26.08.2026): dunkelblaues Quadrat mit gruenem Punkt
   unten rechts + Wortmarke "WERAX" — ersetzt die alte 4-Quadrate-Marke.
   Das Markup (.mk mit 4 <i>) bleibt unveraendert, nur das CSS zeichnet neu —
   so gilt das Logo automatisch ueberall (Header, Login, Druckansichten). */
.mk { position: relative; display: inline-block; width: 27px; height: 27px; background: #2d5f93; border-radius: 8px; }
.mk i { display: none; }
.mk::after { content: ""; position: absolute; right: -4px; bottom: -3px; width: 12px; height: 12px; background: #34a862; border-radius: 50%; }
.word { font-family: "Bricolage Grotesque"; font-weight: 800; font-size: 1.5rem; letter-spacing: .01em; }
.word em { display: none; }
.tag { font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: #8FD0B0; font-weight: 800; margin-top: 10px; }

/* ---- Rechte Kopfzeilen-Gruppe: Sprachumschalter + Profil-Menü, gemeinsam ---- */
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---- Sprachumschalter (DE/EN, Flaggen) -------------------------------------- */
.langmenu { position: relative; }
.langmenu-btn { appearance: none; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: #fff; padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: .8rem; letter-spacing: .02em; cursor: pointer; display: flex; align-items: center; gap: 7px; transition: background .14s ease, border-color .14s ease; }
.langmenu-btn:hover, .langmenu.open .langmenu-btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .6); }
.flag-icon { width: 20px; height: 15px; min-width: 20px; border-radius: 3px; display: block; }
.langmenu-btn .flag-icon { box-shadow: 0 0 0 1px rgba(255, 255, 255, .4); }
.langmenu-btn .caret { font-size: .6rem; opacity: .8; transition: transform .14s ease; }
.langmenu.open .langmenu-btn .caret { transform: rotate(180deg); }
.langmenu-panel { position: absolute; top: calc(100% + 10px); right: 0; min-width: 170px; background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .28); padding: 6px; z-index: 60; display: none; }
.langmenu.open .langmenu-panel { display: block; animation: fade .14s ease; }
.langmenu-item { appearance: none; border: none; background: transparent; width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; font-weight: 700; font-size: .85rem; color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: 9px; transition: background .12s ease; }
.langmenu-item:hover { background: #F1F5F3; }
.langmenu-item .flag-icon { box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.langmenu-item .check { margin-left: auto; opacity: 0; color: var(--green); font-weight: 800; }
.langmenu-item.active .check { opacity: 1; }
@media (max-width: 560px) { .langmenu-panel { right: -10px; } }

/* ---- Profil-Menü (Avatar oben rechts, Klick öffnet Abmelden-Menü) ---------- */
.usermenu { position: relative; }
.usermenu-btn { appearance: none; border: 2px solid rgba(255, 255, 255, .3); background: var(--green); color: #fff; width: 40px; height: 40px; border-radius: 50%; font-weight: 800; font-size: .85rem; letter-spacing: .01em; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: box-shadow .14s ease, border-color .14s ease; }
.usermenu-btn:hover, .usermenu.open .usermenu-btn { border-color: rgba(255, 255, 255, .7); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.usermenu-panel { position: absolute; top: calc(100% + 10px); right: 0; min-width: 230px; background: #fff; color: var(--ink); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .28); padding: 8px; z-index: 60; display: none; }
.usermenu.open .usermenu-panel { display: block; animation: fade .14s ease; }
.usermenu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.usermenu-head-name { font-weight: 800; font-size: .92rem; }
.usermenu-head-role { font-size: .78rem; color: var(--steel); margin-top: 1px; }
.usermenu-logout { appearance: none; border: none; background: transparent; width: 100%; text-align: left; padding: 9px 10px; border-radius: 9px; font-weight: 700; font-size: .85rem; color: var(--bad); cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background .12s ease; }
.usermenu-logout:hover { background: #FBECE9; }
@media (max-width: 560px) { .usermenu-panel { right: -10px; } }
.hero h1 { font-size: clamp(1.6rem, 3.2vw, 2.5rem); line-height: 1.04; margin: .14em 0 .12em; }
.hero p { max-width: 104ch; color: #D6E4E0; line-height: 1.5; margin: 0; font-size: .95rem; }

/* ---- Zugriffs-Sperre (auth.js) ---------------------------------------------- */
.authgate {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 12% 0, rgba(46, 158, 107, .22), transparent 42%), linear-gradient(135deg, #0f2830, #143038 58%, #1b424a);
}
.authgate-card { width: 100%; max-width: 380px; padding: 30px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.authgate-card .brand { margin-bottom: 2px; }
.authgate-card .btn { border-radius: 11px; }
.ag-status { min-height: 1.3em; margin-top: 12px; font-size: .82rem; font-weight: 700; }
.ag-status.err { color: var(--bad); }
.ag-spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--line); border-top-color: var(--steel); border-radius: 50%; vertical-align: -2px; margin-right: 6px; animation: ag-spin .7s linear infinite; }
@keyframes ag-spin { to { transform: rotate(360deg); } }
.ag-status.ok { color: var(--green2); }
body.authgate-locked { overflow: hidden; }
body.authgate-locked > *:not(#authGate) { visibility: hidden; }

/* ---- Buttons -------------------------------------------------------------- */
.btn { appearance: none; border: 0; border-radius: 11px; padding: 10px 14px; font-weight: 800; font-size: .86rem; cursor: pointer; background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(20, 48, 56, .12); transition: filter .15s ease, transform .08s ease, box-shadow .15s ease; }
.btn:hover { filter: brightness(.97); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(20, 48, 56, .16); }
.btn:active { transform: translateY(0); filter: brightness(.94); box-shadow: 0 1px 2px rgba(20, 48, 56, .12); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible { outline: 3px solid rgba(78, 127, 168, .5); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--blue); border: 1px solid transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--paper2); border-color: var(--line); }
.btn.soft { background: transparent; color: var(--steel); border: 1px solid transparent; box-shadow: none; font-weight: 700; }
.btn.soft:hover { background: var(--paper2); color: var(--ink); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid transparent; box-shadow: none; }
.btn.danger:hover { background: #fdf3f1; border-color: #edc4bb; }
.btn.small { padding: 7px 9px; font-size: .78rem; border-radius: 9px; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 16px 0 14px; align-items: center; }

/* ---- Tab navigation ------------------------------------------------------- */
/* justify-content:center: bei eingeschränkten Benutzern (wenige sichtbare Tabs,
   siehe auth.js applyPermissions()) verteilt sich die kurze Tabnav sonst links
   mit viel Leerraum rechts — zentriert wirkt das aufgeräumter. Bei voller
   Tab-Anzahl (Admin) macht das kaum einen sichtbaren Unterschied, da die Zeile(n)
   dann ohnehin fast die volle Breite füllen. */
/* [Zwei Ebenen, 17.09.2026] Oben die Bereiche (klebt oben), darunter die Kapitel des
   gewaehlten Bereichs. Frueher standen alle 21 Knoepfe gleichrangig in vier Zeilen und
   die Leiste war 188 px hoch — bei 846 px Fensterbreite ein Fuenftel des Bildschirms. */
.tabgroups { position: sticky; top: 0; z-index: 21; background: rgba(249, 251, 250, .96); backdrop-filter: blur(7px); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 10px 0 8px; }
.tabgroups button { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--steel); border-radius: 11px; padding: 10px 16px; font-weight: 700; font-size: .92rem; cursor: pointer; display: flex; gap: 7px; align-items: center; transition: background .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease; }
.tabgroups button:hover { background: var(--paper2); color: var(--ink); border-color: var(--steel); }
.tabgroups button.active { background: var(--dark); color: #fff; border-color: var(--dark); box-shadow: 0 3px 10px rgba(20, 48, 56, .18); }
/* [Beleg-Miniaturen, 17.09.2026] Kaan: «die bilder/Quittung die hochgeladen wurde
   sollte auch direkt im tool angezeigt werden». Statt der Bueroklammer steht das Bild
   selbst in der Liste; geladen wird erst, wenn die Zeile sichtbar ist. */
/* [17.09.2026] Geratene Werte aus der Texterkennung: gelber Rahmen statt stiller
   Uebernahme. Kaan: «es scannt einfach irgendwas statt die richtigen daten». */
.f input.pruefen, .f select.pruefen, input.pruefen, select.pruefen { border-color: #d9a441; background: #fffaf0; }

.beleggalerie { display: inline-flex; gap: 4px; align-items: center; }
.belegmini { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 50px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; cursor: pointer;
  font-size: .9rem; color: var(--steel); flex: 0 0 auto; }
.belegmini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.belegmini:hover { border-color: var(--steel); box-shadow: 0 2px 8px rgba(20, 48, 56, .14); }
.belegmini.gross { width: 100%; height: 420px; cursor: zoom-in; }
.belegmini.gross img { object-fit: contain; background: var(--paper2); }
.belegrest { font-size: .72rem; color: var(--steel); background: var(--paper2); border-radius: 6px; padding: 2px 5px; }
.belegfehlt { display: inline-block; width: 38px; text-align: center; color: var(--line); }
.editgrid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
.editseiten { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.editseite { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--paper); }
@media (max-width: 860px) { .editgrid { grid-template-columns: 1fr; } .belegmini.gross { height: 220px; } }

.tabgroups .badge-num:empty { display: none; }   /* leeres Kaestchen hinter jedem Namen vermeiden */
.tabgroups .badge-num { font-size: .68rem; background: var(--paper2); color: var(--steel); border-radius: 99px; padding: 1px 6px; }
.tabgroups button.active .badge-num { background: rgba(255, 255, 255, .25); color: #fff; }
.tabnav { position: sticky; top: 52px; z-index: 20; background: rgba(249, 251, 250, .92); backdrop-filter: blur(7px); border-bottom: 1px solid var(--line); display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 8px 0; margin-bottom: 16px; }
.tabnav button { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--steel); border-radius: 10px; padding: 9px 13px; font-weight: 600; font-size: .85rem; cursor: pointer; display: flex; gap: 7px; align-items: center; transition: background .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease; }
.tabnav button:hover { background: var(--paper2); color: var(--ink); border-color: var(--steel); }
.tabnav button.active { background: var(--paper2); color: var(--ink); font-weight: 800; border-color: var(--steel); box-shadow: inset 0 -2px 0 var(--dark); }
.tabnav .badge-num { font-size: .68rem; background: rgba(255, 255, 255, .25); border-radius: 99px; padding: 1px 6px; }
.tabnav button:not(.active) .badge-num { background: var(--paper2); color: var(--steel); }
/* Handy (01.09.2026, Wunsch Kaan): statt 8 gestapelter Zeilen wird die Leiste
   EINE wischbare Zeile — nur so kann sie beim Scrollen sinnvoll oben kleben.
   overflow-x auf der Leiste selbst bricht position:sticky nicht. */
@media (max-width: 700px) {
  .tabgroups { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 8px 10px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .tabgroups button { flex: 0 0 auto; white-space: nowrap; }
  .tabnav { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 8px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; top: 50px; }
  .tabnav button { flex: 0 0 auto; white-space: nowrap; }
}
.tabview { display: none; }
.tabview.active { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* ---- Layout shells -------------------------------------------------------- */
.layout { display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: start; transition: grid-template-columns .18s ease; }
.layout.panel-collapsed { grid-template-columns: 52px 1fr; }
@media (max-width: 1100px) { .layout, .layout.panel-collapsed { grid-template-columns: 1fr; } }
.panel, .card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); transition: box-shadow .18s ease; }
.panel { padding: 18px; position: sticky; top: 60px; max-height: calc(100vh - 72px); overflow: auto; }
@media (max-width: 1100px) { .panel { position: static; max-height: none; } }

/* ---- Eingabe-Panel: einklappbar (mehr Platz für breite Tabellen wie Katalog-Verwaltung) --- */
.panel-headrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.panel-headrow h3 { margin: 0; }
.panel-toggle-btn { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--steel); border-radius: 8px; padding: 5px 10px; font-size: .78rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .12s ease, color .12s ease; }
.panel-toggle-btn:hover { background: var(--paper2); color: var(--ink); }
.panel-collapsed-strip { display: none; }
.panel.collapsed { padding: 16px 4px; cursor: pointer; }
.panel.collapsed .panel-body { display: none; }
.panel.collapsed .panel-collapsed-strip { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 4px; color: var(--steel); }
.panel.collapsed .panel-collapsed-strip:hover { color: var(--ink); }
.panel-collapsed-icon { font-size: 1.05rem; font-weight: 800; }
.panel-collapsed-label { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 800; font-size: .82rem; letter-spacing: .04em; }
/* Auf schmalen Screens ist die Seitenleiste ohnehin einspaltig (kein Platz-Konflikt mit
   breiten Tabellen) — eingeklappt daher als schmaler horizontaler Balken statt Vertikaltext. */
@media (max-width: 1100px) {
  .panel.collapsed { padding: 10px 14px; }
  .panel.collapsed .panel-collapsed-strip { flex-direction: row; justify-content: center; padding-top: 0; }
  .panel-collapsed-label { writing-mode: horizontal-tb; transform: none; }
}
/* min-width:0 ist hier bewusst nötig: ohne das weigern sich Flex-/Grid-Kinder,
   unter die "natürliche" Breite ihres Inhalts zu schrumpfen (z. B. eine breite
   Tabelle wie Katalog-Verwaltung) — das drückt sonst die ganze Seite breiter als
   den Viewport und man muss die GANZE Seite seitlich scrollen, statt dass nur
   die Tabelle selbst (in ihrem eigenen Scroll-Rahmen) horizontal scrollt. */
.results { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.card { padding: 18px; min-width: 0; }
.card > h3 { margin-bottom: 10px; font-size: 1.02rem; }

/* ---- Form ----------------------------------------------------------------- */
details { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
details[open] > summary { margin-bottom: 6px; }
summary { cursor: pointer; font-weight: 800; font-size: .92rem; }
/* Hilfe-Seiten (08.09.2026): jede Frage als eigene Box mit Abstand */
.help-faq details { border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; margin: 0 0 12px; background: #fff; }
.help-faq details:hover { border-color: rgba(46, 125, 82, .45); }
.help-faq summary { font-size: .95rem; line-height: 1.4; }
.help-faq details[open] { background: rgba(46, 125, 82, .05); border-color: rgba(46, 125, 82, .45); }
.help-faq details[open] > summary { margin-bottom: 8px; }
.help-faq details > p { margin: 0 0 2px; padding-left: 18px; line-height: 1.6; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.f { margin-bottom: 8px; }
.f.full { grid-column: 1/-1; }
.f label { display: block; font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--steel); font-weight: 800; margin-bottom: 3px; }
.f input, .f select, .f textarea { width: 100%; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; font-size: .86rem; color: var(--ink); background: #fff; }
.f textarea { min-height: 70px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.f input, .f select, .f textarea { transition: border-color .12s ease, box-shadow .12s ease; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--blue2); box-shadow: 0 0 0 3px rgba(78, 127, 168, .12); }
.autocomplete-wrap { position: relative; }
.autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; z-index: 40; margin-top: 2px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 18px rgba(0, 0, 0, .1); max-height: 220px; overflow: auto; }
.autocomplete-item { padding: 7px 9px; font-size: .82rem; cursor: pointer; border-bottom: 1px solid var(--line); }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--paper); }
.autocomplete-empty { padding: 7px 9px; font-size: .78rem; color: var(--steel); }
.muted, .annahme { color: var(--steel); font-size: .78rem; line-height: 1.45; }

/* ---- Overall / scores ----------------------------------------------------- */
.overall { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 16px; color: #fff; }
.overall.A { background: linear-gradient(135deg, #1B7A50, #2E9E6B); }
.overall.B { background: linear-gradient(135deg, #234C6E, #2C5F8A); }
.overall.C { background: linear-gradient(135deg, #9a6116, #B56A1D); }
.overall.D { background: linear-gradient(135deg, #7e2d22, #A23E2E); }
.overall .grade { font-family: "Bricolage Grotesque"; font-weight: 700; font-size: 3.2rem; line-height: 1; min-width: 70px; text-align: center; }
.overall .t { font-size: 1.05rem; font-weight: 800; }
.overall .s { opacity: .9; font-size: .9rem; margin-top: 3px; }
.scoregrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 1100px) { .scoregrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .scoregrid { grid-template-columns: 1fr; } }
.scoremini { padding: 11px; border-radius: 13px; border: 1px solid var(--line); background: #fff; }
.scoremini .h { display: flex; justify-content: space-between; gap: 8px; }
.scoremini b { font-size: .86rem; }
.scoremini .v { font-weight: 900; }
.bar { height: 7px; border-radius: 5px; background: var(--line); margin: 7px 0 0; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; }

/* ---- Flags / notes -------------------------------------------------------- */
.flag { display: flex; gap: 8px; align-items: flex-start; border: 1px solid; border-radius: 11px; padding: 8px 10px; margin: 6px 0; font-size: .84rem; }
.flag.nogo { background: #fbeeec; border-color: #f0c5bc; color: #7e2d22; }
.flag.hoch { background: #fff5e8; border-color: #f3d4ae; color: #8a4d12; }
.flag.mittel { background: #eef4f1; border-color: #cfe0d8; color: #274b3c; }
.flag span:first-child { font-size: .62rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.warn { background: #fff7ed; border: 1px solid #f3d4ae; color: #8a4d12; border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-size: .84rem; }
.oknote { background: #E6F4EC; border: 1px solid #cfe7d8; color: #1B7A50; border-radius: 10px; padding: 8px 10px; margin-top: 8px; font-size: .84rem; }
/* Rote Entsprechung zu .oknote (Kassenbuch, Kaan 16.09.2026) */
.badnote { background: #FBECE6; border: 1px solid #f0d3c5; color: #9A3F14; border-radius: 10px; padding: 8px 10px; margin-top: 8px; font-size: .84rem; }
.minihelp { font-size: .78rem; line-height: 1.45; color: var(--steel); background: #f8fbfa; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }

/* ---- Tables --------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
td, th { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 800; }
td.r { text-align: right; color: var(--ink); }
th.r { text-align: right; }
td { color: var(--steel); }
tbody tr { transition: background .1s ease; }
tbody tr:hover td { background: var(--paper); }
/* Katalog-Verwaltung: kompaktere Zellen + kleinere Eingabefelder, damit die
   Tabelle mit möglichst wenig horizontalem Scrollen auf den Bildschirm passt. */
.admtable td, .admtable th { padding: 5px 5px; font-size: .82rem; }
.admtable td input { padding: 4px 6px; font-size: .82rem; }
.admtable td .btn.small { padding: 4px 7px; font-size: .74rem; }

/* ---- Variant tabs / editor ------------------------------------------------ */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.tab { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 7px 10px; font-weight: 900; font-size: .78rem; cursor: pointer; transition: background .12s ease, color .12s ease, border-color .12s ease; }
.tab:hover { background: var(--paper2); }
.tab.active { background: var(--dark); color: #fff; border-color: var(--dark); }
.editorgrid { display: grid; grid-template-columns: minmax(540px, 1fr) 320px; gap: 14px; }
@media (max-width: 1120px) { .editorgrid { grid-template-columns: 1fr; } }
.editorbar { display: flex; gap: 7px; flex-wrap: wrap; margin: 8px 0; }
.svgwrap { border: 1px solid var(--line); border-radius: 16px; background: #f8fbfa; overflow: auto; padding: 10px; }
.svgwrap svg { width: 100%; height: auto; touch-action: none; user-select: none; }
.svgobj { cursor: move; }
.svgobj.selected rect, .svgobj.selected polygon { stroke: #A23E2E !important; stroke-width: 2.4 !important; }
.prop { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.prop h4 { font-size: 1rem; margin-bottom: 8px; }
.prop .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; color: var(--steel); font-size: .74rem; }
.leg { display: flex; align-items: center; gap: 5px; }
.sw { width: 16px; height: 10px; border: 1px solid; }
.exportbox { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.layerbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0; padding: 9px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.layerbar label { font-size: .78rem; font-weight: 800; color: var(--steel); display: flex; gap: 5px; align-items: center; }
.dimtxt { font-family: system-ui, sans-serif; font-size: 9px; fill: #566169; }
.dimline { stroke: #566169; stroke-width: 1; stroke-dasharray: 3 3; }
.cableline { stroke-width: 2.8; fill: none; }
.svgobj.selected .cableline { stroke-width: 4 !important; }
.svgconn { cursor: pointer; }
.svgconn.selected .cableline { stroke-width: 4.5 !important; }
.svgconn.selected text { font-size: 11px; }
.cablehit { stroke: transparent; stroke-width: 14; fill: none; cursor: pointer; }
.cablehandle { cursor: crosshair; stroke-width: 2.2; }
.parcelpt { cursor: grab; fill: #fff; stroke: #143038; stroke-width: 2; }
.parcelpt.selected { stroke: #A23E2E; stroke-width: 3; }
.baufeldpt { cursor: grab; fill: #fff; stroke: #1B7A50; stroke-width: 2; }
.baufeld-leiste { border: 1px dashed #9CCBB0; border-radius: 10px; padding: 6px 10px; align-items: center; }
.baufeld-leiste.aktiv { background: #E6F4EC; border-style: solid; border-color: #1B7A50; }
.baufeld-titel { font-weight: 800; color: #1B7A50; font-size: .8rem; margin-right: 2px; }
/* Ausrichtung an einer Parzellenkante (01.10.2026) */
.ausricht-leiste { border: 1px dashed #E2B98C; border-radius: 10px; padding: 6px 10px; align-items: center; }
.ausricht-leiste.aktiv { background: #FBF0E4; border-style: solid; border-color: #C26A1B; }
.ausricht-leiste.erster-schritt { border-style: solid; border-color: #C26A1B; box-shadow: 0 0 0 3px rgba(194, 106, 27, .15); }
.ausricht-titel { font-weight: 800; color: #C26A1B; font-size: .8rem; margin-right: 2px; }
.ausricht-status { font-size: .8rem; }
.ausricht-warn { color: #A23E2E; }
.ausricht-hinweis { font-size: .78rem; font-weight: 700; color: #C26A1B; }
.ausricht-gleich { font-size: .78rem; color: #9A6A00; background: #FFF6DB; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }
/* Abstandslinie (01.10.2026) */
.ga-leiste { border: 1px dashed #E2A59C; border-radius: 10px; padding: 6px 10px; align-items: center; gap: 6px; }
.ga-leiste.aktiv { background: #FBEDEB; border-style: solid; border-color: #B23A2E; }
.ga-titel { font-weight: 800; color: #B23A2E; font-size: .8rem; margin-right: 2px; }
.ga-teil { font-size: .8rem; }
.ga-pruefen { color: #9A6A00; font-weight: 700; }
.baufeld-hinweis { font-size: .78rem; }
.baufeldpt.selected { stroke: #A23E2E; stroke-width: 3; }
.rothandle { cursor: grab; fill: #fff; stroke: #2C5F8A; stroke-width: 2.4; }
.rszhandle { fill: #fff; stroke: #2C5F8A; stroke-width: 1.6; }
.rszhandle:hover { fill: #2C5F8A; }
.rothandle:hover { fill: #E8F0F7; }
.rothandle:active { cursor: grabbing; }
.objtbl { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }

/* ---- Product catalog ------------------------------------------------------ */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 11px; margin: 8px 0 4px; }
.catcard { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s ease, border-color .15s ease, transform .1s ease; }
.catcard:hover { box-shadow: 0 8px 20px rgba(20, 48, 56, .09); transform: translateY(-1px); }
.catcard.sel { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(44, 95, 138, .14); }
.catcard .cname { font-weight: 800; font-size: .92rem; }
.catcard .cspec { font-size: .78rem; color: var(--steel); }
.catcard .ctag { display: inline-block; font-size: .66rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; border-radius: 99px; padding: 2px 8px; color: #fff; align-self: flex-start; }
.catcard .cnote { font-size: .76rem; color: var(--steel); line-height: 1.4; }
.catfilter { display: flex; gap: 7px; flex-wrap: wrap; margin: 6px 0 10px; }
.catfilter button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: .78rem; font-weight: 800; cursor: pointer; color: var(--steel); transition: background .12s ease, color .12s ease, border-color .12s ease; }
.catfilter button:hover { background: var(--paper2); color: var(--ink); }
.catfilter button.active { background: var(--dark); color: #fff; border-color: var(--dark); }

/* ---- Briefings / disclaimer ----------------------------------------------- */
.brief { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .brief { grid-template-columns: 1fr; } }
.brief .b { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--paper); }
.brief textarea { width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: 9px; padding: 9px; font-size: .8rem; color: var(--ink); background: #fff; resize: vertical; }
.disc { color: var(--steel); font-size: .78rem; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 10px; }

/* ---- Dataroom ------------------------------------------------------------- */
.dropzone { border: 2px dashed #C7D5D0; border-radius: 16px; background: linear-gradient(180deg, #F8FBFA, #F1F6F3); padding: 14px 16px; text-align: center; cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; min-height: 104px; width: 100%; transition: border-color .15s ease, background .15s ease; }
.dropzone:hover { border-color: var(--green2); }
.dropzone.drag { border-color: var(--green); background: #E6F4EC; }
.dropzone b { display: block; font-size: 1rem; margin-bottom: 4px; }
.dropzone input { display: none; }
.dmupload { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; margin: 10px 0 12px; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.dmupload .exportbox { margin: 0; flex: 1 1 280px; }
.dmgrid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; align-items: start; }
@media (max-width: 1050px) { .dmgrid { grid-template-columns: 1fr; } }
.docstatus { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
@media (max-width: 800px) { .docstatus { grid-template-columns: 1fr 1fr; } }
.statuspill { border-radius: 999px; padding: 3px 8px; font-size: .72rem; font-weight: 900; display: inline-block; }
.statuspill.ok { background: #E6F4EC; color: #1B7A50; }
.statuspill.warn { background: #FFF5E8; color: #8A4D12; }
.statuspill.bad { background: #FBEEEC; color: #7E2D22; }
.statuspill.info { background: #EEF4F8; color: var(--blue); }
.filecard { border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 10px; margin: 8px 0; }
.filecard .head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.filecard b { word-break: break-word; }
.filemeta { color: var(--steel); font-size: .75rem; margin-top: 2px; }
.filecontrols { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.filecontrols .full { grid-column: 1/-1; }
.filecontrols label { font-size: .67rem; letter-spacing: .05em; text-transform: uppercase; color: var(--steel); font-weight: 800; }
.filecontrols input, .filecontrols select, .filecontrols textarea { width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 8px; font-size: .8rem; background: #fff; }
.filecontrols textarea { min-height: 54px; resize: vertical; }
.manifestlist { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-top: 8px; }

/* ---- GIS ------------------------------------------------------------------ */
.gislinks { display: flex; gap: 7px; flex-wrap: wrap; align-items: flex-start; margin: 4px 0 10px; }
.gislinks .btn { white-space: nowrap; }
.gisnote { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; color: var(--steel); font-size: .82rem; line-height: 1.45; }
.geo-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.geo-status { border: 1px solid #cfe7d8; background: #E6F4EC; color: #1B7A50; border-radius: 10px; padding: 8px 10px; margin: 8px 0; font-size: .84rem; }
.geo-status.warn { border-color: #f3d4ae; background: #fff5e8; color: #8a4d12; }
.geo-results { display: grid; gap: 8px; margin: 8px 0; }
.geo-result { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 9px; }
.geo-result small { display: block; color: var(--steel); margin-top: 2px; }

/* ---- Cockpit / pipeline --------------------------------------------------- */
.cockpitcontrols { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin: 10px 0; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.cockpitcontrols .f { margin: 0; min-width: 160px; }
.pipelinewrap { overflow: auto; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.pipelinewrap table { min-width: 980px; }
.riskdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.riskdot.low { background: #1B7A50; } .riskdot.mid { background: #B56A1D; }
.riskdot.high { background: #A23E2E; } .riskdot.nogo { background: #5b1811; }
.pipebadge { display: inline-block; border-radius: 999px; padding: 2px 7px; font-size: .72rem; font-weight: 900; background: #EEF4F1; color: #143038; }
.pipebadge.A { background: #E6F4EC; color: #1B7A50; } .pipebadge.B { background: #EAF2FA; color: #2C5F8A; }
.pipebadge.C { background: #FFF5E8; color: #8A4D12; } .pipebadge.D { background: #FBEEEC; color: #7E2D22; }
.projectcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0; }
@media (max-width: 1100px) { .projectcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .projectcards { grid-template-columns: 1fr; } }

/* ---- QA ------------------------------------------------------------------- */
.qagrid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; align-items: start; }
@media (max-width: 1050px) { .qagrid { grid-template-columns: 1fr; } }
.qaitems { display: flex; flex-direction: column; gap: 7px; }
.qaitem { border: 1px solid var(--line); border-radius: 11px; padding: 8px 10px; background: #fff; font-size: .84rem; }
.qaitem.ok { border-color: #cfe7d8; background: #F1FAF5; }
.qaitem.warn { border-color: #f3d4ae; background: #FFF8EE; }
.qaitem.bad { border-color: #f0c5bc; background: #FBEEEC; }
.qaitem .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 900; }
.qaitem .hint { color: var(--steel); font-size: .78rem; margin-top: 3px; }
.summarybox { width: 100%; min-height: 250px; border: 1px solid var(--line); border-radius: 11px; padding: 10px; background: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; color: var(--ink); resize: vertical; }
.comparebox { border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 10px; margin: 10px 0; }
.comparechips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px; font-size: .78rem; font-weight: 800; background: #fff; }
.chip.bad { border-color: #f0c5bc; background: #FBEEEC; color: #7e2d22; }
.chip.good { border-color: #cfe7d8; background: #F1FAF5; color: #1B7A50; }
.changelog { max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

/* ---- Hilfe / Anleitung ------------------------------------------------------ */
.help-steps { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; }
.help-step { display: flex; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 20px; }
.help-num { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--dark); color: #fff; display: flex; align-items: center; justify-content: center; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 700; font-size: 1.05rem; }
.help-body { flex: 1; min-width: 0; }
.help-body h4 { font-size: 1.02rem; margin-bottom: 6px; }
.help-body p { margin: 0 0 9px; line-height: 1.6; color: var(--ink); font-size: .9rem; max-width: 78ch; }
.help-body p:last-child { margin-bottom: 0; }
.help-sub { color: var(--steel); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; margin: 0 0 9px; }
.help-opt { color: var(--steel); font-weight: 600; font-size: .82rem; text-transform: none; letter-spacing: 0; }
.help-substeps { margin: 0 0 9px; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }
.help-substeps li { line-height: 1.55; font-size: .88rem; }
.help-note { color: var(--steel); font-size: .78rem; line-height: 1.5; }
.help-callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
@media (max-width: 900px) { .help-callouts { grid-template-columns: 1fr; } }
.help-callout { display: flex; gap: 11px; border-radius: 14px; padding: 15px 17px; border: 1px solid; }
.help-callout.warn { background: #fff7ed; border-color: #f3d4ae; color: #8a4d12; }
.help-callout.info { background: var(--paper); border-color: var(--line); color: var(--ink); }
.help-callout .hc-icon { font-size: 1.35rem; line-height: 1; }
.help-callout b { display: block; margin-bottom: 4px; font-size: .88rem; }
.help-callout p { margin: 0; font-size: .84rem; line-height: 1.55; }

/* ---- Toast ---------------------------------------------------------------- */
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast .t { background: var(--dark); color: #fff; padding: 11px 14px; border-radius: 11px; box-shadow: var(--shadow); font-size: .85rem; font-weight: 700; max-width: 340px; animation: fade .2s ease; }
.toast .t.bad { background: var(--bad); } .toast .t.ok { background: var(--green2); }

/* ---- Dossier (offscreen print) -------------------------------------------- */
#dossier { position: absolute; left: -99999px; top: 0; width: 185mm; background: #fff; color: var(--ink); }
#dossier h2 { font-size: 15pt; margin: 6px 0; }
#dossier h3 { font-size: 10.5pt; margin: 10px 0 4px; color: var(--blue); }
#dossier .d-grade { display: inline-block; font-weight: 900; padding: 4px 12px; border-radius: 8px; color: #fff; font-size: 12pt; }
#dossier table { font-size: 8.5pt; }
#dossier .small { font-size: 8pt; color: var(--steel); }
#dossier svg { width: 100%; height: auto; max-height: 120mm; }
#dossier .page { page-break-after: always; break-after: page; }
#dossier .page:last-child { page-break-after: auto; break-after: auto; }
#dossier .twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; }
#dossier ul { margin: 2mm 0 3mm 5mm; padding: 0; }
#dossier li { margin: 1mm 0; }
#dossier .briefprint { white-space: pre-wrap; font-family: Arial, system-ui, sans-serif; font-size: 8pt; line-height: 1.35; border: 1px solid var(--line); border-radius: 6px; padding: 5px; background: #fff; margin: 2mm 0 4mm; }
#dossier .layoutprint svg { width: 100%; height: auto; max-height: 88mm; }
#dossier .noteprint { border: 1px solid var(--line); background: #F4F8F6; border-radius: 8px; padding: 6px; margin: 4px 0; font-size: 8pt; color: var(--steel); }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .wrap, .hero, .tabnav, .tabgroups, .toast { display: none !important; }
  #dossier { position: static; left: 0; width: auto; }
  .card { box-shadow: none; }
}

/* ==== Buchhaltung: Unternavigation & Übersicht (Bexio-Stil, 26.08.2026) ==== */
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid #dde6e9; }
.subtabs button { border: 1px solid #cfdadf; background: #fff; color: #0f4c5c; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.subtabs button:hover { background: #eef4f6; }
.subtabs button.active { background: #0f4c5c; border-color: #0f4c5c; color: #fff; }
.subtabs button .badge-num { background: #b4541f; color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 11px; margin-left: 2px; }
.subtabs button.active .badge-num { background: #fff; color: #0f4c5c; }
.bhbanner { background: #fdf3e7; border: 1px solid #ecc9a3; color: #7a4a1a; border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; font-size: 13.5px; }
.bhbanner.ok { background: #edf7f0; border-color: #bfe0cb; color: #1f6b3d; }
.bhcols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .bhcols { grid-template-columns: 1fr; } }

/* ==== Buchhaltung: Offerten-Kandidaten-Karten + Auswahlfelder ==== */
.candlist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.candrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid #cfdadf; border-radius: 10px; padding: 10px 14px; background: #f7fafb; transition: background .15s, border-color .15s; }
.candrow:hover { background: #eef4f6; border-color: #9fb8c1; }
.candrow .ci { display: flex; flex-direction: column; min-width: 0; }
.candrow .ci b { font-size: 14px; }
.candrow .cr { display: flex; align-items: center; gap: 14px; flex: none; }
.candrow .cr .amt { font-weight: 800; font-size: 14px; white-space: nowrap; }
#invoicesPanel select { appearance: none; -webkit-appearance: none; -moz-appearance: none; border: 1px solid #cfdadf; border-radius: 8px; background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230f4c5c' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center; background-size: 12px 8px; padding: 8px 32px 8px 12px; font: inherit; font-size: 13px; color: #16323a; cursor: pointer; }
#invoicesPanel select:focus { outline: none; border-color: #0f4c5c; box-shadow: 0 0 0 2px rgba(15, 76, 92, .15); }

/* Schmale Vorschau-Listen (Übersicht Buchhaltung): kein Zwangs-Scrollen wie
   bei den grossen Pipeline-Tabellen (die 980px-Mindestbreite gilt hier nicht). */
.listwrap { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; }
.listwrap table { width: 100%; min-width: 0; }

/* Beleg-Dropzone (assistierte Beleg-Ablage, Buchhaltung) */
.dropzone { border: 2px dashed #9fb8c1; border-radius: 12px; padding: 18px 14px; text-align: center; color: #5b6b72; background: #f7fafb; cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 10px; }
.dropzone:hover, .dropzone.drag { border-color: #0f4c5c; background: #eef4f6; color: #0f4c5c; }
.dropzone .linklike { color: #0f4c5c; text-decoration: underline; cursor: pointer; font-weight: 700; }

/* Layout-Editor: Vollbild + Zoom-Bedienung */
.svgwrap:fullscreen { display: flex; align-items: center; justify-content: center; background: #f8fbfa; padding: 0; }
.svgwrap:fullscreen svg { height: 100vh; width: auto; max-width: 100vw; }
.svgwrap svg { cursor: default; }

/* ---- Offerten: gefuehrte Status-Knoepfe + Ablehnungsgrund ---- */
.flowbtns { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-right: 8px; vertical-align: middle; }
.btn.flow { box-shadow: 0 1px 2px rgba(20, 48, 56, .14); }
.btn.good { background: var(--green); color: #fff; }
.btn.good:hover { background: var(--green2); filter: none; }
.btn.badfill { background: var(--bad); color: #fff; }
.btn.badfill:hover { filter: brightness(.92); }
.rejectnote { margin-top: 4px; font-size: .78rem; color: var(--bad); background: #fdf3f1; border: 1px solid #edc4bb; border-radius: 8px; padding: 4px 8px; max-width: 260px; }

/* ---- Break-Even: Thermometer + Info-Icons ---- */
.bevthermo { position: relative; height: 34px; border-radius: 12px; background: var(--paper2); border: 1px solid var(--line); overflow: visible; margin-top: 22px; }
.bevthermo .fill { position: absolute; inset: 0 auto 0 0; border-radius: 12px 0 0 12px; transition: width .4s ease; max-width: 100%; }
.bevthermo .bemark { position: absolute; top: -6px; bottom: -6px; width: 3px; background: var(--dark); border-radius: 2px; }
.bevthermo .bemark span { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); font-size: .68rem; font-weight: 800; color: var(--dark); text-align: center; line-height: 1.15; white-space: nowrap; }
.bevthermolegend { display: flex; justify-content: space-between; font-size: .74rem; color: var(--steel); margin-top: 4px; }
.bevinfo { display: inline-block; cursor: help; color: var(--blue2); font-weight: 700; font-size: .85em; }
#breakevenPanel input[type="range"] { width: 100%; accent-color: var(--blue); }

/* ---- Sales-Modus (Rolle sales sieht nur das eigene Dashboard) ---- */
#salesPanel { max-width: 980px; margin: 0 auto; }
.sgoal { margin-bottom: 12px; }
.sgoal .nums { display: flex; justify-content: space-between; font-size: .82rem; margin: 3px 0 5px; }
.sprogress { height: 16px; border-radius: 9px; background: var(--paper2); border: 1px solid var(--line); overflow: hidden; }
.sprogress .fill { height: 100%; border-radius: 9px 0 0 9px; background: var(--green); transition: width .4s; }
.sprogress .fill.low { background: var(--warn); }
.shint { background: var(--paper2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .82rem; color: var(--steel); margin-top: 8px; }
.sbars { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 8px; }
.sbars .sb { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.sbars .stick { width: 100%; border-radius: 6px 6px 0 0; background: var(--blue); min-height: 3px; }
.sbars .m { font-size: .66rem; color: var(--steel); font-weight: 700; }

/* ---- Sales-Modus: einspaltiges Layout (Eingabe-Panel + Toolbar weg) ---- */
body.salesmode .layout, body.salesmode .layout.panel-collapsed { grid-template-columns: 1fr; }
body.salesmode #inputPanel, body.salesmode .toolbar { display: none !important; }

/* [Auto-Plan V2, 2026-09-15] Stückliste-Dialog */
.modal-hintergrund { position: fixed; inset: 0; background: rgba(20, 48, 56, .45); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-karte { width: min(860px, 100%); max-height: 92vh; overflow: auto; }
.modal-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal-kopf h3 { margin: 0; }
.modal-fuss { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
/* Fotomontage (Kaan 17.09.2026): Foto und gerenderte Anlage liegen deckungsgleich
   uebereinander — beide fuellen die Buehne, damit die Perspektive stimmt. */
.montage-buehne { position: relative; width: 100%; min-height: 220px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex;
  align-items: center; justify-content: center; }
.montage-buehne img { display: block; width: 100%; height: auto; }
.montage-buehne #mo_anlage { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.montage-regler { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 10px; }
.montage-regler-zeile { display: grid; grid-template-columns: 96px 1fr 62px; align-items: center; gap: 8px; }
.montage-regler-zeile label { margin: 0; text-transform: none; font-size: .78rem; letter-spacing: 0; }
.montage-regler-zeile input[type=range] { width: 100%; }
.montage-wert { font-size: .8rem; font-weight: 700; color: var(--steel); text-align: right; }
@media (max-width: 720px) { .montage-regler { grid-template-columns: 1fr; } }

/* Visualisierungsblatt (Kaan 17.09.2026): Titelblock links, vier Bildplaetze rechts —
   dieselbe Aufteilung wie auf dem A3-Blatt, damit die Vorschau nicht luegt. */
.visu-vorschau { display: grid; grid-template-columns: 260px 1fr; gap: 14px; margin-top: 10px; align-items: start; }
.visu-titelblock { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--paper); font-size: .86rem; }
.visu-titelblock > b { font-size: 1.05rem; }
.visu-legende { margin-top: 10px; font-size: .8rem; line-height: 1.55; }
.visu-plaetze { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.visu-platz { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; }
.visu-platz.gross { grid-column: 1 / -1; }
.visu-platz-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.visu-bild { border: 1px dashed #cfdbd5; border-radius: 9px; background: var(--paper); min-height: 78px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; margin-bottom: 8px; overflow: hidden; }
.visu-platz.gross .visu-bild { min-height: 180px; }
.visu-bild img { max-width: 100%; max-height: 260px; border-radius: 6px; display: block; }
.visu-platz.voll .visu-bild { border-style: solid; background: #fff; }
@media (max-width: 900px) {
  .visu-vorschau { grid-template-columns: 1fr; }
  .visu-plaetze { grid-template-columns: 1fr; }
}
/* Beleg-Symbol neben einer Buchung (Kaan 17.09.2026): oeffnet die Vorschau. Sieht aus
   wie der frühere Link, ist aber ein Knopf, damit die Datei nicht heruntergeladen wird. */
.belegknopf { appearance: none; border: 0; background: transparent; cursor: pointer; padding: 0 2px;
  font-size: 1rem; line-height: 1; vertical-align: baseline; }
.belegknopf:hover { filter: brightness(.8); }
.belegknopf:focus-visible { outline: 2px solid rgba(78,127,168,.55); border-radius: 4px; }
.bz-gruppe td { background: var(--paper2); font-weight: 800; font-size: .8rem; color: var(--steel); }
.bz-karte { display: flex; flex-direction: column; overflow: hidden; max-height: 92vh; }
/* 3D-Ansicht (plan3d.js, 15.09.2026) */
.p3d-karte { width: min(1240px, 96vw); height: 90vh; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.p3d-hinweis { margin: 4px 0 0; font-size: .8rem; }
.p3d-knoepfe { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.p3d-canvas { flex: 1 1 auto; width: 100%; min-height: 320px; border-radius: 12px; background: #EEF3F0; cursor: grab; touch-action: none; display: block; }
.p3d-canvas:active { cursor: grabbing; }
.p3d-legende { font-size: .8rem; margin-top: 8px; }
.bz-intro { margin: 4px 0 0; font-size: .82rem; }
.bz-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--line); margin: 10px 0 0; }
.bz-tab { appearance: none; border: none; background: transparent; padding: 9px 14px; margin-bottom: -2px; border-bottom: 2px solid transparent; font-weight: 800; font-size: .86rem; color: var(--steel); cursor: pointer; }
.bz-tab:hover { color: var(--ink); }
.bz-tab.active { color: var(--green2); border-bottom-color: var(--green2); }
.bz-body { flex: 1 1 auto; overflow: auto; padding: 10px 2px 4px; }
.bz-empfehlung { background: #E6F4EC; border: 1px solid #cfe7d8; border-radius: 12px; padding: 12px 14px; margin: 2px 0 12px; }
.bz-empf-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: .9rem; }
.bz-empf-kopf .muted { font-size: .8rem; }
.bz-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bz-chip { background: #fff; border: 1px solid #cfe7d8; border-radius: 999px; padding: 4px 10px; font-size: .82rem; }
.bz-empf-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.bz-status { font-size: .82rem; font-weight: 700; color: var(--steel); }
.bz-status.ok { color: var(--green2); }
.bz-block { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.bz-block-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: .92rem; }
.bz-block-kopf .muted { font-size: .8rem; }
.bz-leer { margin: 4px 0; font-size: .84rem; }
.bz-tabelle { width: 100%; border-collapse: collapse; }
.bz-tabelle td { padding: 7px 6px; border-top: 1px solid var(--line); vertical-align: middle; font-size: .86rem; }
.bz-tabelle tr:first-child td { border-top: none; }
.bz-tabelle td.r { text-align: right; white-space: nowrap; }
.bz-klein { font-size: .76rem; color: var(--steel); margin-top: 1px; }
.bz-katalog { max-height: 34vh; overflow: auto; }
.bz-aktiv td { background: #f5faf7; }
.bz-menge { display: inline-flex; align-items: center; gap: 3px; }
.bz-menge input { width: 58px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; text-align: right; font-weight: 800; }
.bz-pm { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 900; font-size: 1rem; cursor: pointer; }
.bz-pm:hover { background: #eef4f6; }
.bz-empf { display: inline-block; margin-left: 6px; font-size: .72rem; font-weight: 800; color: #1B7A50; background: #E6F4EC; border-radius: 999px; padding: 1px 7px; }
.bz-fuss { align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.bz-summe { font-size: .86rem; color: var(--steel); }
.bz-fuss-knoepfe { display: flex; gap: 8px; }
.autoplan-bestellung { margin-top: 4px; }
.autoplan-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.autoplan-fehlend { color: #7E2D22; background: #FBEEEC; border: 1px solid #edc4bb; border-radius: 8px; padding: 6px 9px; margin-top: 6px; font-size: .84rem; }

/* [Standort, 2026-09-14] Tab Standort: Karte + Steckbrief */
.standort-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 10px; }
@media (max-width: 1000px) { .standort-grid { grid-template-columns: 1fr; } }
.standort-suche { display: flex; gap: 8px; flex-wrap: wrap; }
.standort-suche input { flex: 1; min-width: 220px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; }
.sto-modus { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.sto-modus button { border: 0; background: #fff; padding: 8px 12px; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; color: var(--steel); }
.sto-modus button.active { background: #0f4c5c; color: #fff; }
.standort-umkreis { display: flex; align-items: center; gap: 6px; font-size: .84rem; white-space: nowrap; }
.standort-umkreis select { padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: inherit; }
.karte-flaeche { position: relative; height: 420px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #e3e8e8; touch-action: none; cursor: grab; user-select: none; }
@media (max-width: 640px) { .karte-flaeche { height: 320px; } }
.karte-kacheln, .karte-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.karte-overlay { pointer-events: none; overflow: visible; }
.karte-kachel { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.karte-kachel.kataster { opacity: .85; }
.karte-knoepfe { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.karte-knoepfe .btn { min-width: 34px; background: #fff; }
.karte-quelle { position: absolute; right: 0; bottom: 0; z-index: 2; font-size: .68rem; background: rgba(255,255,255,.88); padding: 2px 7px; border-top-left-radius: 7px; }
.karte-hinweis { position: absolute; left: 8px; bottom: 8px; z-index: 2; font-size: .78rem; background: #fff5e8; color: #8a4d12; border: 1px solid #f3d4ae; border-radius: 8px; padding: 4px 8px; }
.karte-parzelle { fill: rgba(27,122,80,.16); stroke: #1B7A50; stroke-width: 2.5; }
.karte-parzelle.ungefaehr { stroke-dasharray: 7 5; }
.karte-vorschau { fill: rgba(47,108,168,.16); stroke: #2f6ca8; stroke-width: 2.5; stroke-dasharray: 7 5; }
.karte-linie { stroke: #A23E2E; stroke-width: 2; stroke-dasharray: 5 4; }
.karte-uw { fill: #A23E2E; stroke: #fff; stroke-width: 2.5; }
.karte-uw-weitere { fill: #c98a80; }
.karte-kandidat { fill: rgba(226,164,0,.10); stroke: #b4541f; stroke-width: 1.5; stroke-dasharray: 4 3; }
.karte-kandidat.gewaehlt { fill: rgba(226,164,0,.22); stroke-width: 2.5; stroke-dasharray: none; }
.kandliste { margin-top: 10px; }
.kandliste table { width: 100%; font-size: .84rem; }
.kandliste td, .kandliste th { padding: 4px 6px; vertical-align: top; }
.kandliste .btn { width: auto; margin: 0; }
.karte-text-klein { font-size: 10px; fill: #5b3a33; }
/* Ampel Schutzzonen & Gefahren (Paket 1b) */
.ampel { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; border: 1px solid rgba(0,0,0,.15); }
.ampel-rot { background: #c8362a; } .ampel-gelb { background: #e2a400; } .ampel-hinweis { background: #7aa7d6; } .ampel-gruen { background: #1B7A50; } .ampel-grau { background: #b5bfc4; }
.pruefliste { margin: 4px 0 0; padding-left: 0; list-style: none; font-size: .82rem; }
.pruefliste li { margin: 2px 0; }
.ampel-legende { margin-top: 6px; font-size: .76rem; color: var(--steel); }
.ampel-legende summary { cursor: pointer; }
.ampel-legende li { margin: 2px 0; }
.uwliste { margin: 0; padding-left: 0; list-style: none; }
.uwliste li { display: block; padding: 4px 0; border-top: 1px dashed var(--line); min-width: 0; }
.uwliste li:first-child { border-top: 0; }
.uwliste .uw-gewaehlt > div:first-child { font-weight: 700; }
.uwliste .uw-aktionen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 3px; }
.uwliste .btn { width: auto; margin: 0; }
.karte-punkt { fill: #2f6ca8; stroke: #fff; stroke-width: 2.5; }
.karte-text { font: 700 12px system-ui, sans-serif; fill: #1d2b30; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.steckbrief table { width: 100%; table-layout: fixed; }
.steckbrief td { vertical-align: top; padding: 5px 4px; overflow-wrap: anywhere; }
.steckbrief td:first-child { color: var(--steel); width: 36%; }
.steckbrief .btn { width: 100%; margin-top: 10px; }
/* Knöpfe in Listen (Unterwerke, Kandidaten) klein und nebeneinander — nicht in voller Breite */
.steckbrief .uwliste .btn, .steckbrief .kandliste .btn { width: auto; margin: 0; }
details.card > summary { cursor: pointer; font-weight: 700; }

/* Bauregeln im Standort-Steckbrief («Maximal möglich», Kaan 15.09.2026) */
.bauregeln table { margin: 2px 0 4px; font-size: 12px; }
.bauregeln td { padding: 1px 8px 1px 0; vertical-align: top; }
.bauregeln td:first-child { color: var(--muted, #6b7280); padding-right: 12px; max-width: 200px; }
/* lange Bezeichnungen wie «Feuerwehr-Schlauchlänge max.» dürfen umbrechen — mit nowrap klebte der Wert am Text */
.bauregeln .stufe { display: inline-block; font-size: 10px; padding: 0 5px; border-radius: 8px; background: #e5e7eb; color: #374151; margin-left: 4px; text-decoration: none; }
.bauregeln .stufe.gemeinde { background: #dcfce7; color: #166534; }
.bauregeln .stufe.kanton { background: #dbeafe; color: #1e40af; }
.bauregeln .stufe.oereb { background: #fef3c7; color: #92400e; }
.bauregeln .bess-ja { color: #166534; } .bauregeln .bess-nein { color: #b91c1c; } .bauregeln .bess-bedingt { color: #b45309; }
.bauregeln ul { margin: 2px 0 0 14px; padding: 0; }

/* Standort-Steckbrief: Karte oben über die ganze Breite, Kennzahlen als Kacheln, Details in Blöcken
   (Kaan 16.09.2026: «oben eine Karte und unten, wo es nichts hat, die Informationen … übersichtlicher») */
.steckbrief { margin-top: 12px; }
.sto-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.sto-kachel { border: 1px solid var(--line); border-left-width: 4px; border-radius: 10px; padding: 8px 12px; background: #fff; }
.sto-kachel .k-titel { font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #6b7280); }
.sto-kachel .k-wert { font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--steel); }
.sto-kachel .k-zusatz { font-size: .78rem; color: var(--muted, #6b7280); }
.sto-kachel.ok { border-left-color: #1B7A50; } .sto-kachel.warn { border-left-color: #C08A2E; } .sto-kachel.bad { border-left-color: #B3261E; }
.sto-bloecke { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.sto-block.breit { grid-column: span 2; }   /* Regeltabelle braucht Breite, sonst bricht jede Zeile um */
.sto-block.voll { grid-column: 1 / -1; }    /* Prüfung/ÖREB über die ganze Zeile — zugeklappt eine Leiste */
@media (max-width: 900px) { .sto-block.breit, .sto-block.voll { grid-column: auto; } }
.sto-block { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sto-block > summary { padding: 8px 12px; font-weight: 700; cursor: pointer; font-size: .9rem; color: var(--steel); }
.sto-block > div { padding: 0 12px 10px; }
.sto-block table { width: 100%; }
.sto-block h5 { margin: 10px 0 2px; font-size: .82rem; color: var(--steel); }
.sto-aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sto-aktionen .btn { width: auto; margin: 0; }

/* Checkliste Baueingabe (Kaan 16.09.2026, Punkt 4) */
.bau-fortschritt { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; flex-wrap: wrap; }
.bau-balken { flex: 1; min-width: 180px; height: 8px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.bau-balken span { display: block; height: 100%; background: #1B7A50; }
.bau-gruppe { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.bau-gruppe > summary { padding: 8px 12px; cursor: pointer; }
.bau-gruppe table { width: 100%; margin: 0 0 8px; font-size: .86rem; }
.bau-gruppe th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); padding: 4px 10px; }
/* Zahlenspalten auch im Kopf rechtsbuendig: .bau-gruppe th ueberschrieb sonst th.r, weil es spaeter
   im Stylesheet steht. In der Regelwerk-Bibliothek wirkte die Tabelle dadurch verschoben (30.09.2026). */
.bau-gruppe th.r { text-align: right; }
.bau-gruppe td { padding: 5px 10px; vertical-align: top; border-top: 1px solid var(--line); }
.bau-gruppe tr.bau-bad td { background: #fdf2f2; }
.bau-gruppe .muted { font-size: .78rem; }

/* Eingabe-Panel aufgeräumt (22.09.2026): Kunde oben, Zähler je Gruppe */
.formkunde { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--line, #d9dee7); border-radius: 10px; background: var(--soft, rgba(0,0,0,.02)); }
.formkunde label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.grpzaehler { float: right; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: rgba(46,160,67,.14); color: var(--green, #2e7d32); }
.grpzaehler.leer { background: rgba(0,0,0,.06); color: var(--muted, #6b7280); }
/* Kundenwahl im Dialog «Neues Projekt» als Umschalter — die allgemeinen .f-Regeln
   (Eingaben 100 % breit, Etiketten klein in Grossbuchstaben) quetschten die Radios */
.np-wahl { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 8px; }
.f .np-wahl label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border: 1px solid var(--line, #d9dee7);
  border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; white-space: nowrap; color: var(--ink, inherit); }
.f .np-wahl input { width: auto; margin: 0; }
.f .np-wahl label:has(input:checked) { border-color: var(--blue, #2563eb); background: rgba(37,99,235,.08); }
.f label .np-hinweis { text-transform: none; letter-spacing: 0; font-weight: 500; opacity: .75; }
.ohneparzelle { max-width: 640px; margin: 12px auto; text-align: left; }
/* Projektdaten als Tab (22.09.2026): eine Spalte, Felder in mehreren Spalten */
.layout.ohnepanel, .layout.ohnepanel.panel-collapsed { grid-template-columns: 1fr; }
#form .grid, #formAnnahmen .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
#form .f.full, #formAnnahmen .f.full { grid-column: 1 / -1; }
#form > details { padding: 10px 0 4px; }
#form > details > summary { font-size: 1rem; padding: 4px 0; }
.annahmenkarte > summary { font-size: 1rem; }
.annahmenkarte { padding: 14px 18px; }
/* Auswahlfelder nicht über die ganze Breite ziehen — nur Text, Links und Notizen */
#form .f.full:has(> select), #formAnnahmen .f.full:has(> select) { grid-column: auto; }
/* Projektdaten gekürzt (22.09.2026): wichtige Felder, Standort-Zusammenfassung, Rest eingeklappt */
.wichtigblock { margin: 12px 0 4px; }
.wichtigblock h4 { margin: 0 0 6px; font-size: .95rem; }
.stoinfo-box { margin: 14px 0 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper2, #f6f8fa); }
.stoinfo-kopf { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.stoinfo-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.stoinfo { display: inline-flex; gap: 5px; align-items: baseline; padding: 3px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .82rem; }
.stoinfo .k { color: var(--steel); font-size: .74rem; }
.stoinfo.warn { border-color: #e2a33b; background: #fff7e8; }
.allefelder > summary { font-size: 1rem; }
.allefelder > details { margin-left: 4px; }
#form .wichtigblock .f.full { grid-column: span 2; }
@media (max-width: 600px) { #form .wichtigblock .f.full { grid-column: 1 / -1; } }
/* Projektdaten als Karten (Kaan 22.09.2026, «UI-mässig verbessern») ---------------------
   Einheitliche Schriftstufen: Titel .95rem/800, Etiketten .68rem/800 (wie überall), Felder
   .86rem, Hinweise .78rem — vorher sprangen Kunden-Auswahl (16 px), «Vom Standort» und
   «Alle Felder anzeigen» (16 px/800) aus der Reihe. */
.pd-karten { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin: 10px 0 4px; align-items: start; }
.pd-karte { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 6px; background: #fff; }
.pd-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pd-kopf h4 { margin: 0; font-size: .95rem; font-weight: 800; }
.pd-status { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pd-status.ok { background: rgba(46,160,67,.14); color: var(--green, #2e7d32); }
.pd-status.offen { background: #fff3dc; color: #9a6400; }
#form .pd-karte .grid { grid-template-columns: 1fr 1fr; }
#form .pd-karte .f.full, #form .pd-karte .f.full:has(> select) { grid-column: 1 / -1; }
.kunde-zeile { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kunde-zeile select { flex: 1; min-width: 160px; }
/* Umschalter */
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { appearance: none; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 5px 11px;
  font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.seg button:hover { border-color: var(--steel); }
.seg button.an { background: var(--dark, #0f3b3a); border-color: var(--dark, #0f3b3a); color: #fff; }
.seg button.neutral.an { background: #6b7280; border-color: #6b7280; }
.seg-f select.seg-wert { display: none; }
/* einheitliche Schriftstufen */
.stoinfo-kopf b { font-size: .95rem; font-weight: 800; }
.stoinfo-kopf a { font-size: .78rem; }
.allefelder > summary { font-size: .95rem; font-weight: 800; }
#form details details > summary { font-size: .86rem; font-weight: 800; }
/* Projektgeschäft im Dashboard (22.09.2026) */
.vk-produkt { margin-bottom: 2px; }
.vk-ek { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 6px; font-size: .86rem; }
.vk-produkt td.r input { text-align: right; }
.vk-produkt .pipelinewrap table { max-width: 720px; }
.vk-alle { background: var(--paper2, #f6f8fa); border-radius: 10px; padding: 6px 8px; }
.vk-produkt tr.vk-eigen td { background: #f2f7ff; }
/* Sicherung einspielen (22.09.2026): kompakte Vergleichstabelle */
.wh-tabelle { width: 100%; border-collapse: collapse; font-size: .84rem; }
.wh-tabelle th, .wh-tabelle td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.wh-tabelle td:nth-child(2) { white-space: normal; }
.wh-tabelle .r { text-align: right; }
#cl_whdialog .modal-karte { max-height: 88vh; overflow: auto; }

/* ==== Sparte Personal (Kaan 30.09.2026) ==================================== */
/* Kopfzeile je Ansicht: Titel links, Wahl oder Knoepfe rechts */
.lohn-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.lohn-kopf h3 { margin: 0; font-size: 1.12rem; font-weight: 800; }
.lohn-wahl { display: flex; align-items: center; gap: 6px; }
.lohn-wahl select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: .88rem; background: #fff; min-width: 170px; }
.lohn-pfeil { border: 1px solid var(--line); background: #fff; border-radius: 9px; width: 34px; height: 34px; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--steel); }
.lohn-pfeil:hover { background: #eef4f6; border-color: #cfdadf; }
.lohn-jahre { display: flex; gap: 6px; flex-wrap: wrap; }

/* Ablauf eines Monats: fuenf Schritte, erledigte gruen, der naechste betont */
.lohn-schritte { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.lohn-schritte li { display: flex; align-items: center; gap: 7px; padding: 5px 13px 5px 5px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; font-size: .82rem; font-weight: 700; color: #7b8791; }
.lohn-schritte li .nr { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #eef1f3; font-size: .74rem; font-weight: 800; color: #7b8791; }
.lohn-schritte li.fertig { color: #1B7A50; border-color: #cfe7d8; background: #f3faf6; }
.lohn-schritte li.fertig .nr { background: #1B7A50; color: #fff; }
.lohn-schritte li.aktiv { color: #0f4c5c; border-color: #0f4c5c; box-shadow: 0 0 0 3px rgba(15,76,92,.08); }
.lohn-schritte li.aktiv .nr { background: #0f4c5c; color: #fff; }

/* Ein Lohnlauf als aufklappbare Karte */
.lohn-lauf { border: 1px solid var(--line); border-radius: 14px; background: #fff; margin: 0 0 10px; overflow: hidden; }
.lohn-lauf.storniert { opacity: .72; }
.lohn-lauf-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; flex-wrap: wrap; }
.lohn-lauf-kopf:hover { background: #f8fbfa; }
.lohn-lauf-kopf .titel { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .98rem; }
.lohn-lauf-kopf .zahlen { display: flex; gap: 20px; align-items: center; font-size: .82rem; color: #7b8791; }
.lohn-lauf-kopf .zahlen b { color: var(--ink); font-size: .9rem; margin-left: 4px; }
.lohn-lauf-inhalt { padding: 14px 16px 12px; border-top: 1px solid var(--line); background: #fcfdfd; }
.lohn-lauf-inhalt .sto-kacheln { margin-top: 12px; }

/* Summenzeile am Tabellenende */
tr.summe td { font-weight: 800; background: #f3f7f8; border-top: 2px solid #dde6e9; border-bottom: none; }

/* Aktionsleiste: was als Naechstes zu tun ist, mit dem passenden Knopf */
.lohn-aktion { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid #cfdadf; border-radius: 12px; padding: 12px 16px; background: #f5f9fa; margin: 12px 0 4px; }
.lohn-aktion .muted { font-size: .84rem; }

/* Leerer Zustand mit genau einem naechsten Schritt */
.lohn-leer { text-align: center; padding: 34px 18px; }
.lohn-leer h3 { margin: 0 0 6px; }
.lohn-leer p { color: var(--steel); margin: 0 auto 14px; max-width: 520px; }

/* Mitarbeiterliste: ganze Zeile anklickbar, fehlende Angaben rot */
tr.lohn-zeile { cursor: pointer; }
tr.lohn-zeile:hover td { background: #f8fbfa; }
.lohn-fehlt { color: #9A3F14; font-size: .74rem; font-weight: 700; }
.lohn-haken { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 6px; }
.lohn-haken .chk, .lohn-kind .chk, .lohn-aktion .chk { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; cursor: pointer; }
#personalPanel .pd-karte .grid .f label { min-height: 2.2em; display: flex; align-items: flex-end; }
.lohn-kind { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }
.lohn-kind input[type=date] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .85rem; }
.lohn-protokoll > summary { font-size: .95rem; }
.lohn-protokoll { padding: 14px 18px; }
@media (max-width: 700px) {
  .lohn-lauf-kopf .zahlen { gap: 12px; }
  .lohn-aktion { flex-direction: column; align-items: stretch; }
}

/* ==== Dashboard CRM / Verkauf: drei Themen mit Ringdiagramm (Kaan 30.09.2026) ==== */
/* Kategorienfarben in fester Reihenfolge, mit dem Pruefskript der dataviz-Regeln
   validiert (Farbenblindheit ok, Abstand ok). Gelb, Tuerkis und Rosa sind auf Weiss
   schwach, deshalb stehen Name und Betrag immer in der Legende daneben. */
.dash-viz { --viz-0: #2a78d6; --viz-1: #eb6834; --viz-2: #1baf7a; --viz-3: #eda100; --viz-4: #e87ba4; --viz-rest: #b4b8bc; }
.viz-0 { fill: var(--viz-0, #2a78d6); stroke: var(--viz-0, #2a78d6); }
.viz-1 { fill: var(--viz-1, #eb6834); stroke: var(--viz-1, #eb6834); }
.viz-2 { fill: var(--viz-2, #1baf7a); stroke: var(--viz-2, #1baf7a); }
.viz-3 { fill: var(--viz-3, #eda100); stroke: var(--viz-3, #eda100); }
.viz-4 { fill: var(--viz-4, #e87ba4); stroke: var(--viz-4, #e87ba4); }
.viz-rest { fill: var(--viz-rest, #b4b8bc); stroke: var(--viz-rest, #b4b8bc); }
.crm-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.crm-kopf h3 { margin: 0; }
.crm-mass { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; font-size: .84rem; }
.crm-kpi-an { border-color: #0f4c5c; box-shadow: 0 0 0 2px rgba(15,76,92,.10); }
.crm-themen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .crm-themen { grid-template-columns: 1fr; } }
.crm-thema { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 12px 14px; cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease; min-width: 0; }
.crm-thema:hover, .crm-thema:focus-visible { border-color: #0f4c5c; box-shadow: 0 2px 10px rgba(15,76,92,.10); outline: none; }
.crm-thema-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.crm-thema-kopf b { font-size: .95rem; }
.crm-mehr { font-size: .78rem; font-weight: 700; color: #0f4c5c; white-space: nowrap; }
.crm-thema-inhalt { display: flex; align-items: center; gap: 14px; }
.crm-ring { width: 128px; height: 128px; flex: 0 0 128px; }
/* 2px-Spalt in Flaechenfarbe zwischen den Segmenten */
.crm-ring path { stroke: #fff; stroke-width: 2; stroke-linejoin: round; transition: opacity .12s ease; }
.crm-ring circle[class^="viz-"] { fill: none; }
.crm-ring:hover path { opacity: .55; }
.crm-ring path:hover { opacity: 1; }
.crm-ring-wert { font-size: 15px; font-weight: 800; fill: var(--ink, #18222a); }
.crm-ring-einheit { font-size: 10px; font-weight: 700; fill: #7b8791; letter-spacing: .06em; }
.crm-legende { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; font-size: .8rem; }
.crm-legende li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 7px; align-items: center; padding: 3px 0; }
.crm-legende li + li { border-top: 1px solid #f0f3f4; }
.crm-legende li.leer { color: #9aa4ab; }
.crm-legende .punkt { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.crm-legende .punkt.viz-0 { background: var(--viz-0, #2a78d6); } .crm-legende .punkt.viz-1 { background: var(--viz-1, #eb6834); }
.crm-legende .punkt.viz-2 { background: var(--viz-2, #1baf7a); } .crm-legende .punkt.viz-3 { background: var(--viz-3, #eda100); }
.crm-legende .punkt.viz-4 { background: var(--viz-4, #e87ba4); } .crm-legende .punkt.viz-rest { background: var(--viz-rest, #b4b8bc); }
.crm-legende .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.crm-legende .wert { font-variant-numeric: tabular-nums; text-align: right; }
.crm-legende .anteil { font-variant-numeric: tabular-nums; text-align: right; color: #7b8791; min-width: 3.2em; }

/* Geschaefts-Uebersicht: Hauptzahl je Bereich und Margenbalken (30.09.2026) */
.dash-haupt { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: -2px 0 10px; font-size: .8rem; }
.dash-zahl { font-size: 1.45rem; font-weight: 900; color: var(--ink, #18222a); font-variant-numeric: tabular-nums; }
.dash-untertitel { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 800; color: #7b8791; margin: 0 0 8px; }
.dash-untertitel .muted { text-transform: none; letter-spacing: 0; font-weight: 600; }
.dash-bereich { display: flex; flex-direction: column; }
/* Eine Groesse, eine Farbe: Margen alle in Blau, negative in Rot mit Minuszeichen */
.dash-balken { list-style: none; margin: 0; padding: 0; font-size: .8rem; }
.dash-balken li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 3.6em; gap: 8px; align-items: center; padding: 4px 0; }
.dash-balken li + li { border-top: 1px solid #f0f3f4; }
.dash-balken .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dash-balken .spur { height: 10px; background: #eef2f4; border-radius: 0 4px 4px 0; overflow: hidden; }
.dash-balken .balken { display: block; height: 100%; background: #2a78d6; border-radius: 0 4px 4px 0; }
.dash-balken .balken.neg { background: #B3261E; }
.dash-balken .wert { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.dash-balken li.leer { color: #9aa4ab; }
.dash-balken li.leer .spur { background: repeating-linear-gradient(45deg, #f3f5f6 0 4px, #e9edef 4px 8px); }
.dash-balken li.leer .wert { font-weight: 600; font-size: .74rem; }

/* Layout-Editor Schritt für Schritt (01.10.2026) */
.schritt-leiste { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 8px; }
.schritt-knopf { appearance: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: .82rem; cursor: pointer; color: var(--ink); }
.schritt-knopf:hover { border-color: var(--steel); }
.schritt-knopf.erledigt { border-color: #1B7A50; color: #1B7A50; }
.schritt-knopf.warn { border-color: #C26A1B; color: #C26A1B; }
.schritt-knopf.aktiv { background: var(--dark, #0f3b3a); border-color: var(--dark, #0f3b3a); color: #fff; }
.schritt-nr { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid currentColor; font-size: .7rem; font-weight: 800; line-height: 1; margin-right: 6px; vertical-align: middle; font-variant-numeric: tabular-nums; }
.schritt-nr.erledigt { background: #1B7A50; border-color: #1B7A50; color: #fff; }
.schritt-nr.warn { background: #C26A1B; border-color: #C26A1B; color: #fff; }
.schritt-knopf { display: inline-flex; align-items: center; }
.schritt-knopf.aktiv .schritt-nr { background: #fff; border-color: #fff; color: var(--dark, #0f3b3a); }
.schritt-zeile .schritt-nr { background: var(--dark, #0f3b3a); border-color: var(--dark, #0f3b3a); color: #fff; }
.schritt-zahl { background: #A23E2E; color: #fff; border-radius: 999px; padding: 0 6px; font-size: .74rem; }
.schritt-alle { margin-left: auto; }
.schritt-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); margin-bottom: 8px; }
.schritt-nav { display: flex; gap: 6px; }
.werkzeuggruppe { display: contents; }
#layoutView:not(.alle-werkzeuge)[data-schritt="1"] [data-schritte]:not([data-schritte~="1"]),
#layoutView:not(.alle-werkzeuge)[data-schritt="2"] [data-schritte]:not([data-schritte~="2"]),
#layoutView:not(.alle-werkzeuge)[data-schritt="3"] [data-schritte]:not([data-schritte~="3"]),
#layoutView:not(.alle-werkzeuge)[data-schritt="4"] [data-schritte]:not([data-schritte~="4"]),
#layoutView:not(.alle-werkzeuge)[data-schritt="5"] [data-schritte]:not([data-schritte~="5"]),
#layoutView:not(.alle-werkzeuge)[data-schritt="6"] [data-schritte]:not([data-schritte~="6"]),
#layoutView:not(.alle-werkzeuge)[data-schritt="7"] [data-schritte]:not([data-schritte~="7"]),
#layoutView:not(.alle-werkzeuge)[data-schritt="8"] [data-schritte]:not([data-schritte~="8"]) { display: none !important; }
.checkliste { display: flex; flex-direction: column; gap: 2px; }
.check-zeile { display: flex; align-items: center; gap: 0; appearance: none; text-align: left; border: 0; background: none; padding: 4px 6px; border-radius: 6px; font: inherit; font-size: .84rem; cursor: pointer; color: var(--ink); }
.check-zeile:hover { background: var(--paper); }
.check-zeile.aktiv { background: #EEF4F2; font-weight: 700; }
.check-zeile.erledigt .check-marke { color: #1B7A50; }
.check-zeile.warn .check-marke { color: #C26A1B; }
.check-hinweis { font-size: .78rem; margin-left: 6px; }
.pruef-box { margin: 0 0 8px; }

/* CAD-Export (01.10.2026): Export-Karte im Schritt Export (Format, Detailfeld, Knopf), DWG-Anleitung */
.export-karte { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 12px 14px; margin-top: 10px; max-width: 620px; box-shadow: var(--shadow); }
.export-kopf { font-size: .95rem; font-weight: 800; color: var(--dark); margin-bottom: 10px; }
.export-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.export-zeile label { font-weight: 700; font-size: .86rem; color: var(--steel); }
.export-zeile select { flex: 1 1 260px; max-width: 100%; font-size: .9rem; padding: 6px 8px; }
.export-detail { margin-top: 10px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; background: var(--paper); padding: 10px 12px; }
.export-detail:empty { display: none; }
.ed-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-kopf b { font-size: 1rem; color: var(--dark); }
.ed-icon { font-size: 1.35rem; line-height: 1; }
.ed-fuer { margin-left: auto; font-size: .76rem; color: var(--blue); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.ed-liste { list-style: none; margin: 8px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 14px; font-size: .84rem; color: var(--ink); }
.ed-liste li { position: relative; padding-left: 20px; }
.ed-liste li::before { position: absolute; left: 0; top: 0; font-weight: 800; }
.ed-liste li.ed-ok::before { content: "✓"; color: var(--green2); }
.ed-liste li.ed-warn::before { content: "⚠"; color: var(--warn); }
.ed-datei { font-size: .8rem; color: var(--steel); border-top: 1px dashed var(--line); padding-top: 6px; overflow-wrap: anywhere; }
.ed-datei code { font-size: .8rem; color: var(--dark); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.export-fuss { display: flex; justify-content: flex-end; margin-top: 10px; }
.export-knopf { font-size: .95rem; padding: 8px 18px; }
.dwg-schritte { margin: 8px 0 10px 18px; padding: 0; line-height: 1.5; }
.dwg-schritte li { margin-bottom: 4px; }

/* Ablage (01.10.2026): nicht platzierte Objekte rechts neben der Parzelle */
.ablage-streifen { fill: #F3F5F4; stroke: #8E9C98; stroke-width: 1.4; stroke-dasharray: 6 4; }
.ablage-titel { font-family: system-ui; font-size: 12px; font-weight: 800; fill: #566169; }
.ablage-zahl { font-family: system-ui; font-size: 12px; font-weight: 800; fill: #B56A1D; }
.ablage-obj { opacity: .78; cursor: grab; }
.ablage-obj:hover { opacity: 1; }
.ablage-obj rect:first-of-type { stroke-dasharray: 4 3; }

/* Projekt-Ablauf (01.10.2026): Plaketten in der Kapitelleiste, Weiter-Leiste am Ende der Schritt-Kapitel */
.tabnav .schritt-nr { width: 17px; height: 17px; font-size: .64rem; margin-right: 5px; opacity: .85; }
.tabnav button.active .schritt-nr:not(.erledigt):not(.warn) { opacity: 1; }
.projekt-weiter { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin: 16px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.projekt-weiter .pw-hinweis { font-size: .84rem; color: var(--warn); }
.projekt-weiter .pw-ok { font-size: .84rem; color: var(--green2); font-weight: 700; }
.projekt-weiter .btn .schritt-nr { width: 17px; height: 17px; font-size: .64rem; margin: 0 4px 0 2px; }

/* Park-Kunde (01.10.2026): Marke im CRM, Zahl in der Dashboard-Kachel */
.statuspill.park { background: #E7F4EE; color: #1B7A50; border-color: #BFE3D0; }
.dash-parkkunden { margin-top: 4px; font-size: .8rem; color: var(--green2); font-weight: 700; }

/* Abschluss-Check (01.10.2026): Stand der fünf Schritte oben im Kapitel */
.abschluss-liste { display: grid; gap: 6px; }
.abschluss-zeile { display: grid; grid-template-columns: auto minmax(150px, 220px) 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.abschluss-hinweis { font-size: .84rem; color: var(--warn); }
@media (max-width: 700px) { .abschluss-zeile { grid-template-columns: auto 1fr auto; } .abschluss-hinweis { grid-column: 2 / 4; } }
.abschluss-hinweis .pw-ok { color: var(--green2); font-weight: 700; }

/* Übersicht aller Projekte (01.10.2026, überarbeitet): Kennzahlen, Filterleiste, anklickbare Karten */
.pu-rahmen { padding: 16px 18px; }
.pu-kopfzeile { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pu-kopfzeile h3 { margin: 0 0 2px; font-size: 1.1rem; }
.pu-kopfzeile .muted { font-size: .82rem; }
.pu-kacheln { margin: 14px 0 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pu-kacheln .k-wert small { font-size: .72rem; font-weight: 700; color: var(--steel); }
.pu-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 14px; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.pu-suche { flex: 1 1 260px; display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; }
.pu-suche input { border: 0; outline: none; background: transparent; flex: 1; padding: 8px 0; font-size: .9rem; }
.pu-sort { width: auto; padding: 6px 8px; border-radius: 10px; }
.pu-anzahl { margin-left: auto; font-size: .8rem; }
.pu-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.pu-karte { position: relative; border: 1px solid var(--line); border-left: 5px solid #C9D3D0; border-radius: 14px; background: #fff; padding: 12px 14px 10px; display: flex; flex-direction: column; gap: 7px;
  cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; }
.pu-karte:hover, .pu-karte:focus-visible { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #B8C8C4; outline: none; }
.pu-karte.stufe-fertig { border-left-color: var(--green2); }
.pu-karte.stufe-teil { border-left-color: #C26A1B; }
.pu-karte.stufe-neu { border-left-color: var(--blue2); }
.pu-karte.offen { box-shadow: 0 0 0 2px rgba(44, 95, 138, .25); }
.pu-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pu-titel { font-size: 1rem; font-weight: 800; color: var(--dark); line-height: 1.25; }
.pu-kunde, .pu-ort { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink); }
.pu-ort { color: var(--steel); font-size: .8rem; }
.pu-ico { width: 18px; text-align: center; }
.pu-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pu-chip { font-size: .76rem; color: var(--steel); background: var(--paper2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.pu-chip b { color: var(--dark); }
.pu-fortschritt { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.pu-balken { flex: 1; height: 7px; border-radius: 999px; background: #E6ECEA; overflow: hidden; }
.pu-balken span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--green2)); }
.pu-ftext { font-size: .76rem; color: var(--steel); white-space: nowrap; }
.pu-schritte { display: flex; gap: 4px; flex-wrap: wrap; }
.pu-schritte .schritt-nr { margin-right: 0; width: 18px; height: 18px; font-size: .64rem; color: #8C9A96; }
.pu-schritte .schritt-nr.erledigt, .pu-schritte .schritt-nr.warn { color: #fff; }
.pu-fuss { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.pu-datum { font-size: .76rem; }
.pu-pfeil { margin-left: auto; font-size: 1.3rem; line-height: 1; color: var(--blue); transition: transform .15s; }
.pu-karte:hover .pu-pfeil { transform: translateX(3px); }
.pu-leer { text-align: center; padding: 28px 10px; color: var(--steel); }
.pu-leer-ico { font-size: 2rem; margin-bottom: 4px; }
@media (max-width: 600px) { .pu-anzahl { margin-left: 0; } .pu-rahmen { padding: 12px; } }

/* Hersteller im Layout-Editor (01.10.2026) */
.obj-hersteller { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 10px; background: var(--paper); padding: 8px 10px; margin: 0 0 10px; }
.oh-oem { font-size: .8rem; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: .04em; }
.oh-name { font-size: .92rem; font-weight: 800; color: var(--dark); margin-top: 2px; }
.oh-modell { font-size: .78rem; margin-top: 2px; }
.produkte-im-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.pip-titel { font-size: .74rem; color: var(--steel); margin-right: 2px; }
.pip-chip { font-size: .78rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--ink); }
.pip-chip b { color: var(--dark); }
.pip-oem { font-weight: 800; color: var(--blue); }

/* Produkte verwalten (01.10.2026): Liste nach Kategorie, Bearbeiten-Fenster */
.kv-rahmen { padding: 16px 18px; }
.kv-gruppe { margin-top: 14px; }
.kv-gruppen-titel { font-weight: 800; color: var(--dark); border-left: 4px solid var(--blue); padding: 2px 0 2px 8px; margin-bottom: 6px; }
.kv-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.kv-tabelle { width: 100%; border-collapse: collapse; font-size: .85rem; }
.kv-tabelle th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--steel); background: var(--paper); padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.kv-tabelle td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv-tabelle tr:last-child td { border-bottom: 0; }
.kv-tabelle .r { text-align: right; white-space: nowrap; }
.kv-zeile { cursor: pointer; transition: background .12s; }
.kv-zeile:hover, .kv-zeile:focus-visible { background: #F4F8FB; outline: none; }
.kv-oem { color: var(--blue); }
.kv-klein { font-size: .76rem; }
.kv-stift { color: var(--blue); font-size: 1rem; }
.kv-dialog { width: min(820px, 100%); max-height: 92vh; overflow: auto; }
.kv-abschnitt { margin-top: 12px; }
.kv-abschnitt-titel { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--steel); border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 6px; }
.kv-dialog textarea { width: 100%; }
.kv-fuss { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.kv-id { font-family: ui-monospace, monospace; font-size: .72rem; color: var(--steel); }

/* Hersteller offen (Kaan 01.10.2026: WERAX ist nie Hersteller) */
.kv-offen { color: #9A6B12; font-style: italic; font-size: .8rem; }
.oh-oem.offen { color: #9A6B12; text-transform: none; letter-spacing: 0; font-style: italic; }
