/* Verkaufstool Möckli Beton – schlicht, gut lesbar, auch auf älteren Geräten */
:root {
  --text: #1f2a30;
  --grau: #6b767c;
  --linie: #d9dee1;
  --hinter: #f4f5f6;
  --karte: #ffffff;
  --kopf: #2f3a3f;
  --akzent: #2e6b3a;
  --akzent-hell: #e3f1e5;
  --warn: #9a6200;
  --warn-hell: #fff4dc;
  --rot: #b3261e;
  --rot-hell: #fde8e6;
  --blau: #1c5a8c;
  --blau-hell: #e4eef7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--hinter); line-height: 1.45; }
a { color: var(--blau); }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 8px 0 16px; }
h2 { font-size: 1.2rem; margin: 28px 0 10px; }
h3 { font-size: 1.05rem; margin: 18px 0 8px; }
.grau { color: var(--grau); }
.nw { white-space: nowrap; }
.rechts { text-align: right; }

/* Kopfzeile */
.kopf { background: var(--kopf); color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 16px; }
.kopf a { color: #fff; text-decoration: none; }
.kopf .marke a { font-weight: 700; }
.kopf nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.kopf nav a { padding: 6px 8px; border-radius: 4px; }
.kopf nav a:hover, .kopf nav a.aktiv { background: rgba(255,255,255,0.16); }
.kopf .wer { font-size: 0.9rem; color: #dfe5e8; }
.kopf .wer a { text-decoration: underline; }
form.inline { display: inline; }
button.link { background: none; border: 0; color: #fff; text-decoration: underline; padding: 0 0 0 8px; font: inherit; cursor: pointer; }

/* Meldungen */
.meldung { padding: 10px 14px; border-radius: 6px; margin: 0 0 14px; border: 1px solid var(--linie); background: var(--karte); }
.meldung.ok { background: var(--akzent-hell); border-color: #b8dcbe; }
.meldung.warnung { background: var(--warn-hell); border-color: #f0d49a; }
.meldung.fehler { background: var(--rot-hell); border-color: #f2b8b3; }
.meldung ul { margin: 6px 0 0; padding-left: 20px; }

/* Karten und Formulare */
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; padding: 16px; margin: 0 0 16px; }
.karte.schmal { max-width: 460px; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; }
.feld-gruppe { display: grid; grid-template-columns: 110px 1fr; gap: 0 10px; }
.feld { margin: 0 0 12px; }
.feld label { display: block; font-weight: 600; font-size: 0.9rem; margin: 0 0 4px; }
.feld small { display: block; color: var(--grau); margin-top: 3px; }
input[type=text], input[type=password], input[type=date], input[type=email], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #b9c2c7; border-radius: 5px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blau); outline-offset: 0; border-color: var(--blau); }
textarea { resize: vertical; }
button, .knopf { display: inline-block; font: inherit; padding: 8px 16px; border-radius: 5px; border: 1px solid #aab4b9; background: #fff; color: var(--text); cursor: pointer; text-decoration: none; margin: 4px 6px 4px 0; }
button:hover, .knopf:hover { background: #eef1f2; }
button.haupt, .knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600; }
button.haupt:hover, .knopf.haupt:hover { background: #245a2f; }
button.gefahr { color: var(--rot); border-color: #e0a19c; }
button.klein, .knopf.klein { padding: 4px 10px; font-size: 0.9rem; }
fieldset.janein { border: 1px solid var(--linie); border-radius: 6px; padding: 10px 14px; margin: 0 0 12px; background: #fff; }
fieldset.janein legend { font-weight: 600; padding: 0 4px; }
fieldset.janein label { display: inline-block; margin-right: 24px; padding: 6px 0; font-size: 1.05rem; cursor: pointer; }
fieldset.janein input { transform: scale(1.3); margin-right: 6px; }
fieldset.janein small { display: block; color: var(--grau); }
details { background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; margin: 0 0 10px; }
details > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; }
details[open] > summary { border-bottom: 1px solid var(--linie); }
details > .inhalt { padding: 14px; }
.aktionen { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 12px; align-items: start; }

/* Tabellen */
table.liste { width: 100%; border-collapse: collapse; background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
table.liste th, table.liste td { padding: 8px 10px; border-bottom: 1px solid #e8ecee; text-align: left; vertical-align: top; }
table.liste th { background: #eceff1; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.02em; color: #4a565c; }
table.liste tr:last-child td { border-bottom: 0; }
table.liste tr.ueberfaellig td { background: var(--rot-hell); }
table.liste tr.bald td { background: var(--warn-hell); }
.tabelle-scroll { overflow-x: auto; }
dl.daten { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; margin: 0; }
dl.daten div { background: var(--karte); border: 1px solid var(--linie); border-radius: 6px; padding: 8px 10px; }
dl.daten dt { font-size: 0.8rem; color: var(--grau); text-transform: uppercase; letter-spacing: 0.02em; }
dl.daten dd { margin: 2px 0 0; font-weight: 600; }
dl.daten dd.rot { color: var(--rot); }

/* Filter */
form.filter { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; padding: 12px; margin: 0 0 14px; }
form.filter .feld { margin: 0; min-width: 160px; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; background: #e6e9eb; color: #37434a; }
.s-pruefung { background: #e4eef7; color: var(--blau); }
.s-abgesagt { background: #eceff1; color: #5a666c; }
.s-offeriert { background: var(--warn-hell); color: var(--warn); }
.s-vergeben { background: #fff0c2; color: #7a5000; }
.s-gewonnen { background: var(--akzent-hell); color: var(--akzent); }
.s-verloren { background: var(--rot-hell); color: var(--rot); }
.s-anderweitig { background: #f1e7f5; color: #6a3d7a; }
.g-ja { background: var(--akzent-hell); color: var(--akzent); }
.g-nein { background: var(--rot-hell); color: var(--rot); }
.g-unbekannt { background: #eceff1; color: #5a666c; }

/* Assistent */
ol.schritte { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 16px; gap: 6px; counter-reset: s; }
ol.schritte li { counter-increment: s; padding: 6px 12px; border-radius: 16px; background: #e6e9eb; color: #5a666c; font-size: 0.9rem; }
ol.schritte li::before { content: counter(s) ". "; }
ol.schritte li.aktiv { background: var(--blau); color: #fff; font-weight: 600; }
ol.schritte li.fertig { background: var(--akzent-hell); color: var(--akzent); }
ol.schritte li.uebersprungen { text-decoration: line-through; }
.entscheid { border-radius: 8px; padding: 14px 16px; margin: 0 0 16px; font-size: 1.1rem; }
.entscheid.offerte { background: var(--akzent-hell); border: 2px solid var(--akzent); }
.entscheid.absage { background: var(--rot-hell); border: 2px solid var(--rot); }
.entscheid strong { display: block; font-size: 1.25rem; margin-bottom: 4px; }
.nur-js { display: none; }
html.js .nur-js { display: block; }
.vorschau { font-weight: 600; padding: 10px 14px; border-radius: 6px; margin: 8px 0 12px; }
.vorschau.offerte { background: var(--akzent-hell); color: var(--akzent); }
.vorschau.absage { background: var(--rot-hell); color: var(--rot); }
.objekt-treffer { border: 1px solid var(--linie); background: #fff; border-radius: 6px; padding: 10px 12px; margin: 0 0 8px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }

/* Kacheln Heute */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 0 0 16px; }
.kachel { background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; padding: 12px; }
.kachel .zahl { font-size: 1.8rem; font-weight: 700; }
.kachel.rot .zahl { color: var(--rot); }
.kachel.gelb .zahl { color: var(--warn); }
.kachel .text { color: var(--grau); font-size: 0.9rem; }
progress { width: 100%; max-width: 220px; height: 12px; vertical-align: middle; }

@media (max-width: 700px) {
  main { padding: 10px; }
  .feld-gruppe { grid-template-columns: 90px 1fr; }
  table.liste th, table.liste td { padding: 6px; font-size: 0.92rem; }
}
@media print {
  .kopf, form.filter, details, button { display: none !important; }
  body { background: #fff; }
}

/* ===== Ergänzung 30.09.2026: Möckli-Weinrot (gemessen auf beton-rc.ch: rgb(137, 36, 52)), Logos, Farblegende ===== */
:root {
  --moeckli: #892434;
  --moeckli-hell: #f6e9eb;
  --pendent: #fcdcd9;
  --bald: #ffe0b8;
  --unvollst: #fff5b8;
  --auftrag: #2e7d32;
  --absage: #c62828;
  --gebiet-ja: #e3f3e5;
  --gebiet-nein: #fbe7e5;
}
/* Kopfzeile: hell, Reiter im Möckli-Weinrot */
.kopf { background: #fff; color: var(--text); border-bottom: 3px solid var(--moeckli); padding: 8px 16px; }
.kopf a { color: var(--moeckli); }
.kopf .marke a { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.kopf .marke img { height: 44px; width: auto; display: block; }
.kopf nav a { color: var(--moeckli); font-weight: 600; }
.kopf nav a:hover { background: var(--moeckli-hell); }
.kopf nav a.aktiv { background: var(--moeckli); color: #fff; }
.kopf .partner img { height: 30px; width: auto; display: block; }
.kopf .wer { color: var(--grau); }
.kopf .wer a, .kopf button.link { color: var(--moeckli); }
/* Leichte Farben: Gebiet und Handlungsbedarf (Reihenfolge = Vorrang: später gewinnt) */
table.liste tr:has(.g-ja) td, table.liste tr.gebiet-ja td { background: var(--gebiet-ja); }
table.liste tr:has(.g-nein) td { background: var(--gebiet-nein); }
table.liste tr:has(.s-pruefung) td, table.liste tr.unvollstaendig td { background: var(--unvollst); }
table.liste tr.bald td { background: var(--bald); }
table.liste tr.pendent td, table.liste tr.ueberfaellig td { background: var(--pendent); }
/* Starke Farben: Ergebnis */
table.liste tr.auftrag td, table.liste tr:has(.badge.s-gewonnen) td { background: var(--auftrag); color: #fff; }
table.liste tr:has(.badge.s-abgesagt) td { background: var(--absage); color: #fff; }
/* 11a: nur Textlinks weiss – Knöpfe (a.knopf) behalten ihre eigene Schrift (vorher weiss auf weissem Knopf) */
table.liste tr.auftrag a:not(.knopf), table.liste tr.auftrag .grau,
table.liste tr:has(.badge.s-gewonnen) a:not(.knopf), table.liste tr:has(.badge.s-gewonnen) .grau,
table.liste tr:has(.badge.s-abgesagt) a:not(.knopf), table.liste tr:has(.badge.s-abgesagt) .grau { color: #fff; }
.badge.s-gewonnen { background: var(--auftrag); color: #fff; box-shadow: 0 0 0 1px #fff; }
.badge.s-abgesagt { background: var(--absage); color: #fff; box-shadow: 0 0 0 1px #fff; }
/* Bonität */
.badge.b-gut { background: var(--akzent-hell); color: var(--akzent); }
.badge.b-schlecht { background: var(--rot-hell); color: var(--rot); }
dl.daten dd.gruen { color: var(--akzent); }
/* Legenden */
.legende { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: flex-start; margin: 0 0 12px; font-size: 0.85rem; color: var(--grau); }
.legende > span { display: inline-flex; align-items: center; }
.legende .lg { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; border: 1px solid rgba(0, 0, 0, 0.18); }
.lg-pendent { background: var(--pendent); }
.lg-bald { background: var(--bald); }
.lg-unvollst { background: var(--unvollst); }
.lg-auftrag { background: var(--auftrag); }
.lg-absage { background: var(--absage); }
.lg-gebiet-ja { background: var(--gebiet-ja); }
.lg-gebiet-nein { background: var(--gebiet-nein); }

/* Kopfzeile: Reiter mittig am Bildschirm (30.09.2026). Drei Spalten: Marke links, Reiter Mitte, Logo/Benutzer rechts */
.kopf { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px 18px; }
.kopf .marke { justify-self: start; }
.kopf nav { justify-content: center; }
.kopf .kopf-rechts { justify-self: end; display: flex; align-items: center; gap: 14px; }
@media (max-width: 1280px) {
  .kopf { grid-template-columns: 1fr auto; }
  .kopf nav { grid-column: 1 / -1; grid-row: 2; }
}

/* Verkäufer-Wahl oben auf «Heute» (30.09.2026) */
.vk-wahl { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.vk-wahl .knopf.haupt { background: var(--moeckli); border-color: var(--moeckli); }

/* Marktkarte RC-Beton (Gebiet) – Farben und Linien gemäss KARTE_FUER_CLAUDE.md; 1 SVG-Einheit = 100 m */
main:has(.km-bereich) { max-width: 2400px; }
.km-untertitel { margin: 0 0 4px; color: #4a565c; font-size: 0.92rem; }
.km-raster { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "karte" "werke" "liste"; margin: 12px 0 8px; align-items: start; }
@media (min-width: 1100px) { .km-raster { grid-template-columns: minmax(0, 2.6fr) minmax(300px, 1fr); grid-template-areas: "karte werke" "liste liste"; } }
@media (min-width: 2000px) { .km-raster { grid-template-columns: minmax(360px, 1.15fr) minmax(0, 2.8fr) minmax(320px, 0.95fr); grid-template-areas: "liste karte werke"; } }
.km-karte { grid-area: karte; min-width: 0; }
.km-werkliste { grid-area: werke; min-width: 0; }
.km-liste { grid-area: liste; min-width: 0; }
.km-werkliste h3, .km-liste h3 { margin-top: 0; }
.km-rahmen-aussen { position: relative; }
svg.km { display: block; width: 100%; height: auto; background: #e9e6df; border-radius: 4px; }
.km-ausland { fill: #e9e6df; }
.km-schweiz { fill: #ffffff; }
.km-g { stroke: #7d7d7d; stroke-width: 0.25; stroke-linejoin: round; cursor: pointer; }
.km-g:hover { fill-opacity: 0.72; }
.km-s1 { fill: #ef9a9a; }
.km-s2 { fill: #ffcc80; }
.km-s3 { fill: #ffe0b2; }
.km-s4 { fill: #e8f5e9; }
.km-s5 { fill: #c8e6c9; }
.km-s6 { fill: #a5d6a7; }
.km-s7 { fill: #81c784; }
.km-manuell { fill: url(#km-schraffur); pointer-events: none; }
.km-schraffur { fill: #37474f; fill-opacity: 0.45; }
.km-leg-hand { fill: #eeeeee; }
.km-kantone { fill: none; stroke: #444444; stroke-width: 0.9; stroke-linejoin: round; pointer-events: none; }
.km-seen { fill: #a9cfe8; pointer-events: none; }
.km-seen-rand { fill: none; stroke: #7fb2d6; stroke-width: 0.6; stroke-linejoin: round; pointer-events: none; }
.km-ezg { fill: none; stroke: #0d2b6b; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.km-grenze { fill: none; stroke: #1a1a1a; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.km-auswahl path { fill: none; pointer-events: none; stroke-linejoin: round; }
.km-auswahl .aussen { stroke: #ffffff; stroke-width: 3.4; }
.km-auswahl .innen { stroke: #000000; stroke-width: 1.5; }
.km-werk { cursor: pointer; }
.km-sym-eigen { fill: #0d47a1; stroke: #ffffff; stroke-width: 1; stroke-linejoin: round; }
.km-sym-rc_gleich { fill: #111111; stroke: #ffffff; stroke-width: 1; stroke-linejoin: round; }
.km-sym-rc_schwach { fill: #ff9800; stroke: #111111; stroke-width: 1; }
.km-sym-rc_unklar { fill: #8e24aa; stroke: #ffffff; stroke-width: 1; stroke-linejoin: round; }
.km-sym-kein_rc { fill: #bdbdbd; stroke: #212121; stroke-width: 1; }
.km-texte, .km-legende, .km-massstab, .km-rahmen { pointer-events: none; }
.km-kasten { fill: #ffffff; fill-opacity: 0.85; }
.km-kasten-ort { fill: #ffffff; fill-opacity: 0.6; }
.km-nr { font-size: 9.5px; font-weight: 700; fill: #111111; }
.km-eigen { font-size: 10.4px; font-weight: 700; fill: #0d47a1; }
.km-ort { font-size: 9px; font-style: italic; fill: #212121; }
.km-land { font-size: 14.5px; font-weight: 700; fill: #777777; letter-spacing: 1px; }
.km-legende text, .km-massstab text { font-size: 9px; fill: #111111; }
.km-legende text.km-leg-titel { font-size: 9.5px; }
.km-leg-rahmen { fill: #ffffff; fill-opacity: 0.94; stroke: #cccccc; stroke-width: 0.6; }
.km-leg-ezg { stroke: #0d2b6b; stroke-width: 2.6; }
.km-leg-grenze { stroke: #1a1a1a; stroke-width: 1.8; }
.km-massstab rect { fill: #000000; }
.km-rahmen { fill: none; stroke: #333333; stroke-width: 1; }
.km-form { position: relative; background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: 12px 14px; margin: 12px 0; max-width: 420px; }
html.js .km-form { display: none; }
html.js .km-form.offen { display: block; position: absolute; z-index: 5; width: 340px; max-width: calc(100% - 8px); margin: 0; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.km-form h3 { margin: 0 0 8px; font-size: 1rem; padding-right: 26px; }
.km-form .feld { margin-bottom: 8px; }
.km-zu { position: absolute; top: 4px; right: 4px; border: 0; background: none; font-size: 1.4rem; line-height: 1; padding: 2px 8px; margin: 0; cursor: pointer; }
.km-info { font-size: 0.86rem; margin: 0 0 8px; }
.km-info p { margin: 0 0 3px; }
.km-info p.km-info-titel { font-weight: 700; font-size: 0.95rem; }
button.km-weg { padding: 2px 8px; margin: 0; color: var(--rot); border-color: #e0a19c; }
.km-zaehlung { font-size: 0.88rem; margin: 6px 0 0; }
.km-chip { display: inline-block; width: 12px; height: 12px; border: 1px solid rgba(0, 0, 0, 0.3); vertical-align: -1px; margin: 0 3px 0 2px; }
.km-chip.km-c1 { background: #ef9a9a; }
.km-chip.km-c2 { background: #ffcc80; }
.km-chip.km-c3 { background: #ffe0b2; }
.km-chip.km-c4 { background: #e8f5e9; }
.km-chip.km-c5 { background: #c8e6c9; }
.km-chip.km-c6 { background: #a5d6a7; }
.km-chip.km-c7 { background: #81c784; }
.km-hinweis { font-size: 0.85rem; color: var(--grau); margin: 0 0 8px; }
.km-werke-tabelle th, .km-werke-tabelle td, .km-gemeinden-tabelle th, .km-gemeinden-tabelle td { padding: 4px 6px; font-size: 0.86rem; vertical-align: middle; }
.km-werke-tabelle select, .km-gemeinden-tabelle select { width: auto; max-width: 100%; padding: 3px 6px; font-size: 0.84rem; }
.km-gemeinden-tabelle th, .km-gemeinden-tabelle td { padding: 4px 4px; }
.km-gemeinden-tabelle select { padding: 3px 3px; }
.km-auto { margin: 0; }
.km-kat-rc_gleich select { color: #111111; font-weight: 700; }
.km-kat-rc_schwach select { color: #e65100; font-weight: 700; }
.km-kat-rc_unklar select { color: #7b1fa2; font-weight: 700; }
.km-kat-kein_rc select { color: #757575; font-weight: 700; }
.km-kat-text { font-weight: 700; white-space: nowrap; }
.km-kat-rc_gleich .km-kat-text { color: #111111; }
.km-kat-rc_schwach .km-kat-text { color: #e65100; }
.km-kat-rc_unklar .km-kat-text { color: #7b1fa2; }
.km-kat-kein_rc .km-kat-text { color: #757575; }
.km-geaendert { display: block; color: var(--warn); font-size: 0.76rem; }
html.js .km-ohne-js { display: none; }
table.liste tr.km-markiert td { background: var(--blau-hell); }
.km-nicht { font-size: 0.8rem; color: var(--grau); margin: 8px 0 0; }
ul.km-nicht { padding-left: 18px; }
.km-liste .tabelle-scroll { max-height: 80vh; overflow: auto; }
.km-gemeinden-tabelle tr[data-bfs] { cursor: pointer; }
.km-plz { display: block; font-size: 0.76rem; }
table.liste tr.km-bg1 td { background: #f7cdcd; }
table.liste tr.km-bg2 td { background: #ffe6c0; }
table.liste tr.km-bg3 td { background: #fff0d9; }
table.liste tr.km-bg4 td { background: #f4faf4; }
table.liste tr.km-bg5 td { background: #e4f3e4; }
table.liste tr.km-bg6 td { background: #d2ebd3; }
table.liste tr.km-bg7 td { background: #c0e3c2; }
.km-fuss { font-size: 0.8rem; color: var(--grau); margin: 8px 0 16px; }
@media print { .km-form, .km-auto select { display: none !important; } }
/* Baustellen als Fähnchen – Farbe = Phase der Baustelle, roter Rand = fällig (Chris 09.10.2026) */
.km-fahne { cursor: pointer; }
.km-fahne-stange { stroke: #212121; }
.km-fahne-tuch { stroke: #212121; stroke-linejoin: round; }
.km-fahne-fuss { fill: #212121; }
.km-fahne-halo { stroke: #ffffff; fill: #ffffff; stroke-linejoin: round; stroke-linecap: round; }
/* Phasen: gold Auftrag erhalten/laufend › grün Kunde hat Zuschlag › gelb in Prüfung/Offerte unvollständig › weiss abgegeben › grau verloren/abgesagt;
   fällige und gelbe 1,5-mal so gross – Geometrie in karte.php */
.km-fahne-gelb .km-fahne-tuch { fill: #fff176; }
.km-fahne-gruen .km-fahne-tuch { fill: #81c784; }
.km-fahne-weiss .km-fahne-tuch { fill: #ffffff; }
.km-fahne-gold .km-fahne-tuch { fill: url(#km-gold); }
.km-fahne-grau .km-fahne-tuch { fill: #bdbdbd; }
.km-fahne-faellig .km-fahne-halo { stroke: #d32f2f; fill: #d32f2f; }
.km-fahne:hover .km-fahne-tuch, .km-fahne:focus .km-fahne-tuch { stroke: #000000; stroke-width: 1.6; }
.km-fahnen-legende { font-size: 0.86rem; margin: 4px 0 0; }
.km-fahnen-legende p { margin: 4px 0; }
.km-fl { display: inline-block; width: 14px; height: 10px; border: 1px solid #212121; vertical-align: -1px; margin: 0 4px 0 2px; }
.km-fl.km-fl-gross { width: 18px; height: 13px; vertical-align: -2px; }
.km-fl-gelb { background: #fff176; }
.km-fl-gruen { background: #81c784; }
.km-fl-weiss { background: #ffffff; }
.km-fl-gold { background: linear-gradient(135deg, #fbe7a1 0%, #e5b83b 55%, #f7d774 100%); }
.km-fl-grau { background: #bdbdbd; }
.km-fl.km-fl-faellig { border: 2px solid #d32f2f; background: #ffffff; vertical-align: -3px; }
.km-rot { color: #c62828; }
table.km-fahnen-tabelle tr.km-fahnen-summe td { border-top: 2px solid var(--linie); }
table.km-fahnen-tabelle th, table.km-fahnen-tabelle td { padding: 3px 6px; font-size: 0.8rem; vertical-align: middle; }
table.km-fahnen-tabelle th { font-size: 0.72rem; }
.km-ohne, .km-ohne a { color: var(--rot); }
/* Karte rechts auf allen Seiten */
.km-seite { max-width: 1200px; margin: 0 auto 24px; padding: 0 16px; }
.km-seite-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; margin: 0 0 6px; }
.km-seite-kopf a { color: var(--moeckli); font-weight: 700; text-decoration: none; }
.km-seite-kopf a.km-seite-link { font-weight: 400; font-size: 0.82rem; text-decoration: underline; }
.km-seite svg.km { border: 1px solid var(--linie); }
.km-mini .km-g { cursor: default; stroke-width: 0.3; }
.km-mini .km-g:hover { fill-opacity: 1; }
.km-mini-legende { font-size: 0.8rem; color: var(--grau); margin: 6px 0 0; line-height: 1.7; }
.km-seite .km-fahnen-legende { font-size: 0.8rem; }
@media (min-width: 1560px) {
  .seite.mit-karte { display: grid; grid-template-columns: minmax(0, 1200px) minmax(320px, 760px); justify-content: center; column-gap: 20px; align-items: start; }
  .seite.mit-karte > main { margin: 0; width: 100%; }
  .km-seite { position: sticky; top: 12px; margin: 16px 0 24px; padding: 0; max-width: none; }
}
@media print { .km-seite { display: none !important; } }
/* Zoomen und Verschieben (karte.js); Linien behalten ihre Breite (--km-px = Pixel je Karteneinheit bei ganzer Karte) */
.km-zoom-box { position: relative; }
svg.km { -webkit-user-select: none; user-select: none; }
svg.km.km-gezoomt { cursor: grab; }
svg.km.km-ziehen, svg.km.km-ziehen .km-g { cursor: grabbing; }
.km-zoom { position: absolute; top: 8px; left: 8px; z-index: 4; display: flex; flex-direction: column; gap: 4px; }
.km-zoom button { width: 30px; height: 30px; padding: 0; margin: 0; font-size: 18px; line-height: 28px; text-align: center; background: #ffffff; border: 1px solid #9aa4a9; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); color: #1f2a30; }
.km-zoom button:hover { background: #eef1f2; }
.km-zoom-box .km-zoom button { width: 26px; height: 26px; font-size: 16px; line-height: 24px; }
svg.km.km-zoom-aktiv .km-g { vector-effect: non-scaling-stroke; stroke-width: calc(var(--km-px, 1) * 0.25px); }
svg.km.km-zoom-aktiv .km-kantone { vector-effect: non-scaling-stroke; stroke-width: calc(var(--km-px, 1) * 0.9px); }
svg.km.km-zoom-aktiv .km-seen-rand { vector-effect: non-scaling-stroke; stroke-width: calc(var(--km-px, 1) * 0.6px); }
svg.km.km-zoom-aktiv .km-ezg { vector-effect: non-scaling-stroke; stroke-width: calc(var(--km-px, 1) * 2.6px); }
svg.km.km-zoom-aktiv .km-grenze { vector-effect: non-scaling-stroke; stroke-width: calc(var(--km-px, 1) * 1.8px); }
svg.km.km-zoom-aktiv .km-rahmen { vector-effect: non-scaling-stroke; stroke-width: calc(var(--km-px, 1) * 1px); }
svg.km.km-zoom-aktiv .km-auswahl .aussen { vector-effect: non-scaling-stroke; stroke-width: calc(var(--km-px, 1) * 3.4px); }
svg.km.km-zoom-aktiv .km-auswahl .innen { vector-effect: non-scaling-stroke; stroke-width: calc(var(--km-px, 1) * 1.5px); }
@media print { .km-zoom { display: none !important; } }
.km-legende rect.km-s1, .km-legende rect.km-s2, .km-legende rect.km-s3, .km-legende rect.km-s4, .km-legende rect.km-s5, .km-legende rect.km-s6, .km-legende rect.km-s7 { stroke: #9e9e9e; stroke-width: 0.4; }
/* Kacheln «Heute» (Chris 30.09.2026): fällig mit Anzahl rot, «Objekt an Kunde vergeben» grün, bei 0 weiss */
.kachel.faellig { background: #e57373; border-color: #d9534f; }
.kachel.faellig .zahl { color: #5d0000; }
.kachel.faellig .text { color: #2b0a0a; }
.kachel.vergeben { background: #81c784; border-color: #5fae63; }
.kachel.vergeben .zahl { color: #0d3d12; }
.kachel.vergeben .text { color: #0f2a12; }
/* Kacheln «Heute»: unvollständig gelb, Aufträge laufend goldig (Chris 30.09.2026), bei 0 weiss */
.kachel.unvollst { background: #fff176; border-color: #e3cf4a; }
.kachel.unvollst .zahl { color: #6d4c00; }
.kachel.gold { background: linear-gradient(135deg, #fbe7a1 0%, #e5b83b 55%, #f7d774 100%); border-color: #c9a227; }
.kachel.gold .zahl { color: #4a3300; }
.kachel.gold .text { color: #3d2b00; }
/* Zeilen «Aufträge laufend» auf «Heute» goldig statt grün */
table.liste tr.auftrag.gold { background: linear-gradient(90deg, #f7df8e 0%, #e8c04a 50%, #f7df8e 100%); }
table.liste tr.auftrag.gold td { background: transparent; color: #3d2b00; }
table.liste tr.auftrag.gold a:not(.knopf), table.liste tr.auftrag.gold .grau { color: #3d2b00; }
/* Farblegende oben links: neue Einträge */
.legende .lg.lg-vergeben { background: #81c784; }
.legende .lg.lg-gold { background: linear-gradient(135deg, #fbe7a1 0%, #e5b83b 55%, #f7d774 100%); }
/* Strassen (OpenStreetMap) – Linien behalten beim Zoomen ihre Breite */
.km-strassen path { fill: none; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; vector-effect: non-scaling-stroke; }
.km-str-motorway { stroke: #5a5a5a; stroke-width: max(1.2px, calc(var(--km-px, 1) * 1.6px)); }
.km-str-trunk { stroke: #676767; stroke-width: max(1px, calc(var(--km-px, 1) * 1.3px)); }
.km-str-primary { stroke: #787878; stroke-width: max(0.8px, calc(var(--km-px, 1) * 1px)); }
.km-str-secondary { stroke: #8d8d8d; stroke-width: max(0.6px, calc(var(--km-px, 1) * 0.75px)); }
.km-str-tertiary { stroke: #a6a6a6; stroke-width: max(0.5px, calc(var(--km-px, 1) * 0.5px)); }
.km-mini .km-str-secondary, .km-mini .km-str-tertiary { display: none; }
.km-mini.km-gezoomt .km-str-secondary, .km-mini.km-gezoomt .km-str-tertiary { display: inline; }
.km-strassen-legende { font-size: 0.8rem; color: var(--grau); margin: 4px 0 0; line-height: 1.7; }
.km-sl { display: inline-block; width: 22px; vertical-align: middle; margin: 0 4px 0 2px; border-top: 1px solid #a6a6a6; }
.km-sl-motorway { border-top: 3px solid #5a5a5a; }
.km-sl-trunk { border-top: 2.5px solid #676767; }
.km-sl-primary { border-top: 2px solid #787878; }
.km-sl-secondary { border-top: 1.5px solid #8d8d8d; }
.km-sl-tertiary { border-top: 1px solid #a6a6a6; }
/* Kleine Karte: Strassen etwas dunkler (Chris 30.09.2026) */
.km-mini .km-str-motorway { stroke: #333333; stroke-width: max(1.4px, calc(var(--km-px, 1) * 1.8px)); }
.km-mini .km-str-trunk { stroke: #3d3d3d; stroke-width: max(1.2px, calc(var(--km-px, 1) * 1.5px)); }
.km-mini .km-str-primary { stroke: #4d4d4d; stroke-width: max(1px, calc(var(--km-px, 1) * 1.2px)); }
.km-mini .km-str-secondary { stroke: #5e5e5e; }
.km-mini .km-str-tertiary { stroke: #737373; }
/* «Heute»: Zeilen «Objekt an unseren Kunden vergeben» grün wie die Kachel */
table.liste tr.zeile-vergeben td { background: #81c784; color: #0f2a12; }
table.liste tr.zeile-vergeben a, table.liste tr.zeile-vergeben .grau { color: #0f2a12; }
/* Kacheln «Heute»: 8 Kacheln auf einer Linie (Chris 30.09.2026); «Abgegeben, warte auf Antwort» weiss, «Absagen» grau (Chris 30.09.2026) */
.kacheln.kacheln-heute { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1000px) { .kacheln.kacheln-heute { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kacheln-heute .kachel { padding: 8px 10px; }
.kacheln-heute .kachel .zahl { font-size: 1.35rem; }
.kacheln-heute .kachel .text { font-size: 0.76rem; line-height: 1.25; }
.kacheln-heute .kachel .text small { font-size: 0.68rem; }
@media (max-width: 700px) { .kacheln.kacheln-heute { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kachel.grau { background: #bdbdbd; border-color: #9e9e9e; }
.kachel.grau .zahl { color: #212121; }
.kachel .text small { display: block; font-size: 0.78rem; margin-top: 2px; }
.legende .lg.lg-grau { background: #bdbdbd; }
/* Umschalter Kartenansicht «Distanzen berechnet» / «Manuelle Karte» oben rechts in der Karte (Chris 30.09.2026) */
.km-modus { position: absolute; top: 8px; right: 8px; z-index: 4; display: flex; gap: 4px; }
.km-modus .knopf { margin: 0; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.km-modus .knopf.haupt { background: var(--moeckli); border-color: var(--moeckli); color: #ffffff; }
.km-zoom-box .km-modus .knopf { padding: 2px 8px; font-size: 0.78rem; }
@media print { .km-modus { display: none !important; } }
/* Kacheln «Heute»: gleiche Höhe in jeder Verkäufer-Ansicht (Chris 30.09.2026) */
.kacheln-heute .kachel { min-height: 122px; }
/* Liste «Offerte unvollständig»: was fehlt */
table.liste small.fehlt { display: block; margin-top: 2px; color: #6d4c00; font-weight: 600; }
/* Handy bis 700 px (Chris 30.09.2026): Kopf kompakt mit Knopf «Menü» (app.js), nichts ragt seitlich hinaus, Kacheln und Legende enger */
.menue-knopf { display: none; }
@media (max-width: 700px) {
  .kopf { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 6px 10px; }
  .kopf .marke { grid-column: 1; grid-row: 1; min-width: 0; }
  .kopf .marke a { gap: 8px; font-size: 1rem; }
  .kopf .marke img { height: 36px; }
  .kopf nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-width: 0; }
  .kopf nav a { padding: 10px 6px; border: 1px solid var(--moeckli-hell); border-radius: 6px; text-align: center; }
  .kopf .kopf-rechts { grid-column: 1 / -1; grid-row: 3; justify-self: stretch; justify-content: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
  .kopf .partner { display: none; }
  html.js .menue-knopf { display: inline-flex; align-items: center; gap: 6px; grid-column: 2; grid-row: 1; margin: 0; padding: 8px 12px; border: 1px solid var(--moeckli); border-radius: 6px; background: #ffffff; color: var(--moeckli); font: inherit; font-weight: 600; cursor: pointer; }
  html.js .kopf.menue-offen .menue-knopf { background: var(--moeckli); color: #ffffff; }
  html.js .kopf:not(.menue-offen) nav, html.js .kopf:not(.menue-offen) .kopf-rechts { display: none; }
  .menue-knopf .menue-aktiv { font-weight: 400; }
  .legende { gap: 2px 10px; font-size: 0.75rem; }
  .kacheln-heute .kachel { min-height: 0; }
  table.liste.verlauf, table.km-werke-tabelle { display: block; max-width: 100%; overflow-x: auto; }
}
@media (max-width: 480px) { .menue-knopf .menue-aktiv { display: none; } }
/* «Heute» und Anfrageseite: Nachfrage direkt erfassen (Chris 03.10.2026) */
table.liste tr.formzeile td { background: #fafbfb; padding-top: 2px; border-bottom: 2px solid var(--linie); }
table.liste tr.formzeile.mit-fehler td { background: var(--rot-hell); }
form.nachfrage { margin: 0; }
form.nachfrage .raster { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
form.nachfrage .feld { margin-bottom: 6px; }
form.nachfrage button { margin: 2px 0 0; }
.feld label.haken { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.feld label.haken input { width: auto; margin: 0; transform: scale(1.3); }
.feld label.haken.klein { font-weight: 400; margin-top: 6px; }

/* ===== Baugesuche (Infopro), 20.10.2026: Fahnen braun = Aushub, schwarz = Beton, diagonal geteilt = beides, Umriss = offen ===== */
.km-bgf { cursor: pointer; }
.km-bgf-braun { fill: #8d5a3b; }
.km-bgf-schwarz { fill: #212121; }
.km-bgf-rand { fill-opacity: 1; stroke: #212121; stroke-linejoin: round; }
polygon.km-bgf-rand:not(.km-bgf-braun):not(.km-bgf-schwarz) { fill: none; }
.km-bgf-leer { fill: #ffffff; }
.km-bgf-umriss-braun { fill: none; stroke: #8d5a3b; stroke-linejoin: round; }
.km-bgf-umriss-schwarz { fill: none; stroke: #212121; stroke-linejoin: round; }
.km-bgf:hover .km-fahne-stange, .km-bgf:focus .km-fahne-stange { stroke-width: 1.8; }
svg.km.km-ohne-bg .km-bg { display: none; }
svg.km.km-ohne-bg-aussen .km-bgf-aussen { display: none; }
.km-bg-legende { font-size: 0.86rem; margin: 6px 0 0; padding: 6px 8px; border: 1px solid var(--linie); border-radius: 6px; background: #fbfaf8; }
.km-bg-legende p { margin: 3px 0; }
.km-bg-schalter label { margin-right: 12px; cursor: pointer; white-space: nowrap; }
.km-seite .km-bg-legende { font-size: 0.8rem; }
.bg-fl { display: inline-block; width: 14px; height: 10px; border: 1px solid #212121; vertical-align: -1px; margin: 0 4px 0 2px; background: #ffffff; }
.bg-fl-braun { background: #8d5a3b; }
.bg-fl-schwarz { background: #8a8a8a; }
.bg-fl-geteilt { background: linear-gradient(to bottom right, #8d5a3b 0%, #8d5a3b 50%, #8a8a8a 50%, #8a8a8a 100%); }
.bg-fl-offen { border: 2px solid #8d5a3b; border-right-color: #8a8a8a; border-bottom-color: #8a8a8a; }
.bg-fl-keine { border-style: dashed; border-color: #9e9e9e; }
table.liste tr.bg-aussen td { color: #5a666c; }
table.liste tr.bg-zu td { background: #f6f6f6; color: #7a858b; }
.bg-kontakte { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.bg-kontakt { background: var(--karte); border: 1px solid var(--linie); border-radius: 6px; padding: 8px 10px; }
.bg-kontakt.gesperrt { border-color: #e0a19c; background: #fdf3f2; }
.bg-kontakt h3 { margin: 0 0 4px; font-size: 0.95rem; }
.bg-kontakt form { margin: 6px 0 0; }
.bg-text { white-space: pre-line; }
.bg-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 16px; }
.bg-knoepfe form { margin: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bg-knoepfe select { width: auto; }
.bg-hinweis { font-size: 0.85rem; color: var(--grau); }
.kacheln.kacheln-heute { grid-template-columns: repeat(9, minmax(0, 1fr)); }
a.kachel.bg-kachel { display: block; color: inherit; text-decoration: none; background: #f6efe9; border-color: #c8a68d; }
a.kachel.bg-kachel:hover { border-color: #8d5a3b; }
a.kachel.bg-kachel .zahl { color: #5d3a23; }
@media (max-width: 1000px) { .kacheln.kacheln-heute { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kacheln.kacheln-heute { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Brief und Offerten-Entwurf (Druckansicht, A4) */
body.druck { background: #e9ecee; }
.druck-leiste { max-width: 210mm; margin: 12px auto 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.blatt { background: #ffffff; width: 210mm; min-height: 297mm; margin: 12px auto; padding: 18mm 20mm 20mm 25mm; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18); font-size: 11pt; line-height: 1.45; }
.blatt .briefkopf { display: flex; justify-content: space-between; align-items: flex-start; margin: 0 0 14mm; }
.blatt .briefkopf img { height: 18mm; width: auto; }
.blatt .absender { font-size: 8.5pt; color: #4a565c; text-align: right; }
.blatt .empfaenger { min-height: 30mm; margin: 0 0 12mm; }
.blatt .ort-datum { margin: 0 0 8mm; }
.blatt .betreff { font-weight: 700; margin: 0 0 6mm; }
.blatt p { margin: 0 0 4mm; }
.blatt [contenteditable] { outline: 1px dashed transparent; }
.blatt [contenteditable]:hover, .blatt [contenteditable]:focus { outline-color: #9bb5c9; }
.blatt table.entwurf { width: 100%; border-collapse: collapse; margin: 4mm 0 6mm; font-size: 10pt; }
.blatt table.entwurf th, .blatt table.entwurf td { border: 1px solid #b9c2c7; padding: 2mm 3mm; text-align: left; vertical-align: top; }
.blatt .stempel { display: inline-block; border: 2px solid #b3261e; color: #b3261e; font-weight: 700; padding: 1mm 3mm; margin: 0 0 6mm; text-transform: uppercase; letter-spacing: 0.05em; }
@media print {
  body.druck { background: #ffffff; }
  .druck-leiste { display: none !important; }
  .blatt { box-shadow: none; margin: 0; width: auto; min-height: 0; padding: 0; }
  .blatt [contenteditable] { outline: none !important; }
  @page { size: A4; margin: 18mm 20mm 20mm 25mm; }
}
/* Baugesuche: Übersicht nach Distanz-Stufe und Art (Chris 21.10.2026) */
details.bg-stufe { margin: 0 0 12px; }
details.bg-stufe > summary { cursor: pointer; font-weight: 700; padding: 6px 10px; background: #892434; color: #ffffff; border-radius: 4px; }
details.bg-stufe-mittel > summary { background: #a8505f; }
details.bg-stufe-weit > summary { background: #7a858b; }
details.bg-stufe > summary .grau { color: #f3e3e6; }
details.bg-stufe > .tabelle-scroll { margin-top: 6px; }
.bg-art { font-weight: 700; }
.bg-art-braun { color: #8d5a3b; }
.bg-art-geteilt { color: #5d3a23; }
.bg-art-offen, .bg-art-keine { color: #6b6b6b; font-weight: 400; }
/* Kopf: Kunden rechts, Verwaltung ganz rechts mit Abstand wie im Verkaufstool MZ (Chris 21.10.2026) */
.kopf .nav-rechts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.kopf .nav-rechts a.nav-kunden { padding: 6px 8px; border-radius: 4px; color: var(--moeckli); font-weight: 600; }
.kopf .nav-rechts a.nav-kunden:hover { background: var(--moeckli-hell); }
.kopf .nav-rechts a.nav-kunden.aktiv { background: var(--moeckli); color: #ffffff; }
.kopf .nav-rechts a.kopf-admin { border: 1px solid #c9c9c9; border-radius: 6px; padding: 5px 12px; font-size: 0.9rem; font-weight: 600; color: #444444; background: #f6f6f6; }
.kopf .nav-rechts a.kopf-admin.erst { margin-left: 18px; }
.kopf .nav-rechts a.kopf-admin.aktiv, .kopf .nav-rechts a.kopf-admin:hover { border-color: var(--moeckli); color: var(--moeckli); background: #ffffff; }
/* Karte: grosser Umschalter Ausschreibungen / Baugesuche, Baugesuch-Fähnchen nach Baustadium (Chris 21.10.2026) */
.km-ansicht { display: none; gap: 6px; margin: 0 0 6px; }
html.js .km-ansicht { display: flex; }
.km-ansicht-knopf { flex: 1 1 0; padding: 10px 12px; font: inherit; font-size: 1rem; font-weight: 700; line-height: 1.2; border: 2px solid var(--moeckli); border-radius: 8px; background: #ffffff; color: var(--moeckli); cursor: pointer; }
.km-ansicht-knopf:hover { background: var(--moeckli-hell); }
.km-ansicht-knopf.aktiv { background: var(--moeckli); color: #ffffff; }
.km-ansicht-zahl { font-weight: 400; }
.km-seite .km-ansicht-knopf { padding: 7px 8px; font-size: 0.92rem; }
html.km-ansicht-aus svg.km .km-bg, html.km-ansicht-aus .km-bg-legende { display: none; }
html.km-ansicht-bg svg.km .km-fahnen, html.km-ansicht-bg .km-fahnen-legende { display: none; }
/* Dritte Karte «Baubewilligungen erteilt» (01.11.2026) */
html.km-ansicht-aus svg.km .km-bew, html.km-ansicht-aus .km-bew-legende,
html.km-ansicht-bg svg.km .km-bew, html.km-ansicht-bg .km-bew-legende { display: none; }
html.km-ansicht-bew svg.km .km-fahnen, html.km-ansicht-bew .km-fahnen-legende,
html.km-ansicht-bew svg.km .km-bg, html.km-ansicht-bew .km-bg-legende { display: none; }
.km-bgs { stroke: #212121; stroke-linejoin: round; }
.km-bgs-gesuch { fill: #9e9e9e; }
.km-bgs-erteilt { fill: #2e7d32; }
.km-bgs-nicht { fill: #d32f2f; }
.bg-st { display: inline-block; width: 14px; height: 10px; border: 1px solid #212121; vertical-align: -1px; margin: 0 4px 0 2px; background: #ffffff; }
.bg-st-gesuch { border: 1px solid #212121; }
.bg-st-erteilt { border: 3px solid #2e7d32; }
.bg-st-nicht { border: 3px solid #d32f2f; }
/* Baugesuche: Fenster «✕ entfernen» je Zeile (Chris 21.10.2026) */
details.bg-weg { position: relative; display: inline-block; margin: 4px 0 0; background: none; border: 0; border-radius: 0; }
details.bg-weg > summary { list-style: none; cursor: pointer; padding: 1px 7px; font-size: 0.8rem; font-weight: 600; color: #8a1c1c; border: 1px solid #e0a19c; border-radius: 4px; background: #ffffff; }
details.bg-weg > summary::-webkit-details-marker { display: none; }
details.bg-weg[open] > summary { border-bottom: 1px solid #e0a19c; background: #fdf3f2; }
.bg-weg-fenster { position: absolute; right: 0; top: 100%; z-index: 20; width: 270px; margin-top: 4px; padding: 8px 10px; background: #ffffff; border: 1px solid var(--linie); border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2); }
.bg-weg-fenster p { margin: 0 0 6px; }
.bg-weg-fenster label { display: block; margin: 0 0 6px; font-size: 0.85rem; }
.bg-weg-fenster select { width: 100%; margin-top: 2px; }
/* Kopf: Reiter mit Rahmen und Farben wie im Verkaufstool MZ (Chris 21.10.2026) */
.kopf nav.reiter { gap: 10px; }
.kopf nav.reiter a { border: 2px solid var(--moeckli); border-radius: 8px; padding: 8px 16px; font-size: 1rem; font-weight: 700; line-height: 1.2; color: var(--moeckli); background: #ffffff; }
.kopf nav.reiter a:hover { background: var(--moeckli-hell); }
.kopf nav.reiter a.aktiv { background: var(--moeckli); border-color: var(--moeckli); color: #ffffff; }
.kopf nav.reiter a.r-rot { background: #fde6e7; border-color: #e2000f; color: #c4000d; box-shadow: 0 1px 3px rgba(226, 0, 15, 0.25); }
.kopf nav.reiter a.r-rot:hover { background: #fbd3d6; }
.kopf nav.reiter a.r-rot.aktiv { background: #e2000f; border-color: #e2000f; color: #ffffff; }
.kopf nav.reiter a.r-gruen { background: #e8f5e9; border-color: #2e7d32; color: #1b5e20; box-shadow: 0 1px 3px rgba(46, 125, 50, 0.25); }
.kopf nav.reiter a.r-gruen:hover { background: #c8e6c9; }
.kopf nav.reiter a.r-gruen.aktiv { background: #2e7d32; border-color: #2e7d32; color: #ffffff; }
.kopf nav.reiter a.r-orange { background: #fff3e0; border-color: #ef6c00; color: #e65100; box-shadow: 0 1px 3px rgba(239, 108, 0, 0.25); }
.kopf nav.reiter a.r-orange:hover { background: #ffe0b2; }
.kopf nav.reiter a.r-orange.aktiv { background: #ef6c00; border-color: #ef6c00; color: #ffffff; }
.kopf nav.reiter a.neu-knopf { background: #6b6b6b; border-color: #6b6b6b; color: #ffffff; margin-right: 8px; }
.kopf nav.reiter a.neu-knopf:hover, .kopf nav.reiter a.neu-knopf.aktiv { background: #4a4a4a; border-color: #4a4a4a; }
.kopf .nav-rechts a.nav-kunden { border: 2px solid var(--moeckli); border-radius: 8px; padding: 6px 12px; }
/* Karte: Baugesuch-Fahne nach Art (braun / braun-grau / grau), Rand nach Stadium (grün = bewilligt) – 21.10.2026 */
.km-bgf-grau { fill: #8a8a8a; }
.km-bgf-umriss-grau { fill: none; stroke: #8a8a8a; stroke-linejoin: round; }
.km-bgf-gestrichelt { stroke: #6b6b6b; stroke-dasharray: 2 1.5; }
.km-bgr { fill: none; stroke: #212121; stroke-linejoin: round; }
.km-bgr-erteilt { stroke: #2e7d32; }
.km-bgr-nicht { stroke: #d32f2f; }
/* Bewilligt besser sichtbar (Chris 21.10.2026): Liste grünes Feld statt nur Rahmen, helleres Grün; Karte grüner Rahmen mit weissem Abstand zum Tuch */
.bg-st-erteilt { background: #4caf50; border: 1px solid #2e7d32; }
.bg-st { width: 16px; height: 11px; }
table.liste.bg-tabelle tr td.bg-st-feld-erteilt { background: #a5d6a7; color: #1b5e20; font-weight: 700; }
.km-bgrahmen { fill: #ffffff; stroke-linejoin: round; }
.km-bgr-erteilt { stroke: #43a047; }
.km-bg-legende .bg-st-erteilt { background: #ffffff; border: 3px solid #43a047; }
.km-bg-legende .bg-st-nicht { background: #ffffff; border: 3px solid #d32f2f; }

/* ---------- Karte «Baubewilligungen erteilt» und Offerten-Ablage (01.11.2026) ---------- */
.km-bew-legende { font-size: 0.86rem; margin: 6px 0 0; padding: 6px 8px; border: 1px solid var(--linie); border-radius: 6px; background: #fbfaf8; }
.km-bew-legende p { margin: 3px 0; }
.km-seite .km-bew-legende { font-size: 0.8rem; }
.km-bew-legende .bg-st-erteilt { background: #ffffff; border: 3px solid #43a047; }
svg.km.km-ohne-bg-aussen .km-bewf.km-bgf-aussen { display: none; }
.km-ansicht { flex-wrap: wrap; }
.km-seite .km-ansicht-knopf { min-width: 0; }
.reiter-zahl { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: #d32f2f; color: #ffffff; font-size: 0.78rem; line-height: 18px; text-align: center; }
.opdf-kasten h2 { margin-top: 0; }
.opdf-liste { margin: 6px 0 10px; padding-left: 18px; }
.opdf-liste li { margin: 3px 0; }
.opdf-hoch { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.opdf-hoch .feld { margin: 0; }
.opdf-zuordnen { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; }
.opdf-zuordnen .feld { margin: 0; max-width: 340px; }
.opdf-zuordnen select { max-width: 340px; }
.opdf-mehr { margin-top: 4px; }
table.opdf-tabelle td { vertical-align: top; }

/* Rechnungswesen (02.11.2026): Reiter blau ganz links neben dem Logo, Status-Ampel, Abgleich-Tabelle */
.kopf .marke { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; min-width: 0; }
.kopf .marke a.rw-reiter { display: inline-flex; align-items: center; gap: 0; border: 2px solid #1565c0; border-radius: 8px; padding: 8px 16px; font-size: 1rem; font-weight: 700; line-height: 1.2; white-space: nowrap; background: #e3f2fd; color: #0d47a1; box-shadow: 0 1px 3px rgba(21, 101, 192, 0.25); }
.kopf .marke a.rw-reiter:hover { background: #bbdefb; }
.kopf .marke a.rw-reiter.aktiv { background: #1565c0; color: #ffffff; }
@media (max-width: 700px) { .kopf .marke a.rw-reiter { padding: 7px 12px; font-size: 0.95rem; } }
.rw-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.82rem; font-weight: 600; white-space: nowrap; background: #e6e9eb; color: #37434a; }
.rw-badge.rw-ok { background: #2e7d32; color: #fff; }
.rw-badge.rw-pruefen { background: #ffe0b2; color: #8a4b00; }
.rw-badge.rw-abw { background: #c62828; color: #fff; }
.rw-badge.rw-offen { background: #eceff1; color: #455a64; }
table.liste tr.rw-z-ok td { background: #e8f5e9; }
table.liste tr.rw-z-abweichung td { background: #ffebee; }
table.liste tr.rw-z-pruefen td { background: #fff8e1; }
.kachel.rw-k-ok { background: #e8f5e9; border-color: #81c784; }
.kachel.rw-k-pruefen { background: #fff8e1; border-color: #ffcc80; }
.kachel.rw-k-abw { background: #ffebee; border-color: #e57373; }
table.rw-abgleich td { vertical-align: top; }
td.rw-sym { font-weight: 700; font-size: 1.1rem; width: 1.6em; text-align: center; }
td.rw-sym.rw-ok { color: #2e7d32; }
td.rw-sym.rw-info { color: #546e7a; }
td.rw-sym.rw-pruefen { color: #e65100; }
td.rw-sym.rw-abw { color: #c62828; }
pre.rw-text { margin: 10px 0 0; padding: 10px 12px; max-height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 0.82rem; line-height: 1.4; background: #f7f8f9; border: 1px solid #e0e4e7; border-radius: 6px; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 6px; }
.knopfreihe form { margin: 0; }
fieldset.rw-ls label { display: inline-block; margin: 2px 12px 2px 0; }

/* ===== Devis/Offerten (06.11.2026): grüner Reiter neben «Rechnungswesen», Umschalter, Ablage ===== */
.kopf .marke a.do-reiter { display: inline-flex; align-items: center; border: 2px solid #2e7d32; border-radius: 8px; padding: 8px 16px; font-size: 1rem; font-weight: 700; line-height: 1.2; white-space: nowrap; background: #e8f5e9; color: #1b5e20; text-decoration: none; }
.kopf .marke a.do-reiter:hover { background: #c8e6c9; }
.kopf .marke a.do-reiter.aktiv { background: #2e7d32; color: #ffffff; }
.do-umschalter { display: inline-flex; margin: 0 0 16px; border: 2px solid #2e7d32; border-radius: 8px; overflow: hidden; }
.do-umschalter button.do-schalter { margin: 0; border: 0; border-radius: 0; padding: 9px 20px; background: #ffffff; color: #1b5e20; font-weight: 600; }
.do-umschalter button.do-schalter + button.do-schalter { border-left: 2px solid #2e7d32; }
.do-umschalter button.do-schalter:hover { background: #e8f5e9; }
.do-umschalter button.do-schalter.aktiv { background: #2e7d32; color: #ffffff; }
.do-hinweis { margin: 0 0 16px; }
.do-zone { border: 2px dashed #9fb8a3; border-radius: 8px; padding: 28px 16px; text-align: center; background: #f7faf7; }
.do-zone p { margin: 4px 0; }

/* ===== Devis/Offerten Phase 2 (06.11.2026): Ablagefeld, Kundensuche, Status, Kundenfilter ===== */
label.do-zone { display: block; cursor: pointer; margin: 0 0 14px; }
.do-zone .do-zone-text { display: block; font-weight: 700; font-size: 1.05rem; color: #1b5e20; margin: 0 0 4px; }
.do-zone input[type="file"] { display: block; margin: 12px auto 0; max-width: 100%; }
.do-zone .do-dateien { display: block; margin-top: 8px; font-weight: 600; color: #1b5e20; }
.do-zone.do-zone-aktiv { background: #e8f5e9; border-color: #2e7d32; }
.do-zone.do-zone-voll { border-style: solid; border-color: #2e7d32; }
.do-suche { position: relative; }
.do-vorschlaege { position: absolute; z-index: 30; left: 0; right: 0; margin: 2px 0 0; padding: 0; list-style: none; background: #ffffff; border: 1px solid var(--linie); border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); max-height: 320px; overflow-y: auto; }
.do-vorschlaege li { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid #eef1f2; }
.do-vorschlaege li:last-child { border-bottom: 0; }
.do-vorschlaege li small { display: block; color: var(--grau); }
.do-vorschlaege li:hover, .do-vorschlaege li.aktiv { background: #e8f5e9; }
.do-vorschlaege li.leer { cursor: default; color: var(--grau); }
.do-vorschlaege li.do-gesperrt strong, .do-vorschlaege li.do-gesperrt small, .feld small.do-kunde-info.do-gesperrt { color: var(--rot); }
.feld small.do-kunde-info { min-height: 1.2em; }
.badge.do-s-freigabe { background: var(--warn-hell); color: var(--warn); }
.badge.do-s-ein { background: var(--blau-hell); color: var(--blau); }
.badge.do-s-ok { background: var(--akzent-hell); color: var(--akzent); }
.badge.do-s-fehler { background: var(--rot-hell); color: var(--rot); }
.badge.do-s-offeriert { background: #2e7d32; color: #ffffff; }
.badge.do-s-weg { background: #eceff1; color: #5a666c; }
.do-unbekannt { color: var(--warn); font-weight: 600; }
.do-filter { margin: 0 0 10px; }
td details.do-aktion { margin: 0; min-width: 260px; }
td details.do-aktion > summary { padding: 4px 10px; font-size: 0.9rem; }
td details.do-aktion > .inhalt { padding: 10px; }
td details.do-aktion form { margin: 0 0 12px; }
td details.do-aktion form small { display: block; }
.feld input.kunde-filter { margin: 0 0 6px; }
.do-ablage input[type="tel"] { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #b9c2c7; border-radius: 5px; background: #fff; color: var(--text); }

/* ===== Devis/Offerten Phase 3 (06.11.2026): Detailansicht, Mengenzusammenzug, Kundenvorschläge ===== */
.do-kunde-karte input[type="tel"] { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #b9c2c7; border-radius: 5px; background: #fff; color: var(--text); }
.do-kopf p { margin: 0 0 6px; }
ul.do-kandidaten { list-style: none; margin: 0 0 12px; padding: 0; }
ul.do-kandidaten li { padding: 4px 0; border-bottom: 1px solid #eef1f2; }
ul.do-kandidaten li form.inline { display: inline; }
.do-zz h3 { margin: 16px 0 6px; }
.do-zz table.liste tr.do-total td { font-weight: 700; border-top: 2px solid var(--text); }
.do-zz table.liste tr.do-gruppe td { font-weight: 700; background: #f4f6f7; }
table.liste tr.do-pruefen td { background: var(--warn-hell); }
table.do-positionen td { font-size: 0.92rem; }

/* ===== Rechnungswesen (06.11.2026): Ordner oben, Suche, Visum von Hand ===== */
.rw-ordner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0 14px; }
a.rw-mappe { position: relative; display: block; min-height: 96px; padding: 14px 16px 12px; border-radius: 0 10px 10px 10px; text-decoration: none; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18); }
a.rw-mappe::before { content: ""; position: absolute; left: 0; top: -11px; width: 40%; height: 12px; border-radius: 8px 8px 0 0; background: inherit; }
a.rw-mappe .rw-mappe-zahl { display: block; font-size: 2rem; font-weight: 700; line-height: 1.1; }
a.rw-mappe .rw-mappe-titel { display: block; font-size: 1.1rem; font-weight: 700; }
a.rw-mappe .rw-mappe-text { display: block; font-size: 0.85rem; margin-top: 2px; }
a.rw-mappe.rw-orange { background: #f57c00; color: #1f1300; }
a.rw-mappe.rw-rot { background: #c62828; color: #ffffff; }
a.rw-mappe.rw-gruen { background: #2e7d32; color: #ffffff; }
a.rw-mappe:hover { filter: brightness(1.08); }
a.rw-mappe.aktiv { outline: 3px solid var(--text); outline-offset: 3px; }
form.rw-suche { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; }
form.rw-suche label { font-weight: 600; }
form.rw-suche input[type=search] { flex: 1 1 260px; width: auto; }
form.rw-suche button, form.rw-suche .knopf { margin: 0; }
.rw-badge.rw-art-orange { background: #f57c00; color: #1f1300; }
.rw-badge.rw-art-rot { background: #c62828; color: #ffffff; }
.rw-badge.rw-art-gruen { background: #2e7d32; color: #ffffff; }
table.liste tr.rw-z-visiert td { background: #e8f5e9; }
.karte.rw-hand { border-left: 5px solid #2e7d32; }
@media (max-width: 700px) { .rw-ordner { grid-template-columns: 1fr; gap: 20px; } }

/* ===== Devis/Offerten Phase 4 (06.11.2026): Bearbeiten, A4-Mengenzusammenzug, Seite der Devis-PDF daneben ===== */
main:has(.do-bearbeiten) { max-width: 2400px; }
.do-bearbeiten { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.do-links { min-width: 0; }
.do-werkzeug p { margin: 0 0 8px; }
.do-werkzeug .knopfreihe form { display: inline; margin: 0; }
.do-blatt { background: #ffffff; border: 1px solid var(--linie); border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); padding: 22px 26px; margin: 0 0 16px; max-width: 900px; font-size: 0.95rem; color: #111111; }
.do-blatt-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 4px 16px; border-bottom: 2px solid #1f5fae; padding-bottom: 4px; margin-bottom: 8px; font-size: 0.8rem; color: #555555; }
.do-blatt-marke { font-weight: 700; color: #1f5fae; font-size: 0.95rem; }
.do-blatt h2.do-blatt-titel { font-size: 1.25rem; margin: 6px 0 2px; }
.do-blatt h3 { font-size: 1rem; color: #1f5fae; margin: 14px 0 4px; }
.do-blatt-meta { margin: 0 0 4px; font-size: 0.88rem; color: #333333; }
table.do-a4 { border-collapse: collapse; width: 100%; }
table.do-a4 th, table.do-a4 td { border-bottom: 1px solid #d6d6d6; padding: 3px 6px; text-align: left; vertical-align: top; }
table.do-a4 th { background: #eef2f8; font-size: 0.85rem; }
table.do-a4 th.rechts, table.do-a4 td.rechts { text-align: right; }
table.do-a4 tr.do-total td { font-weight: 700; border-top: 2px solid #111111; border-bottom: none; }
table.do-a4 tr.do-gruppe td { font-weight: 700; background: #f6f6f6; font-size: 0.85rem; }
.do-blatt-hin { font-size: 0.85rem; color: #444444; margin-top: 10px; }
.do-blatt-hin ul { margin: 4px 0 0; padding-left: 18px; }
.do-blatt-fuss { font-size: 0.78rem; color: #777777; margin: 8px 0 0; }
table.do-edit { font-size: 0.88rem; }
table.do-edit th { padding: 6px 5px; }
table.do-edit td { vertical-align: top; padding: 4px; }
table.do-edit td.mitte { text-align: center; }
table.do-edit input[type="text"], table.do-edit select, table.do-edit textarea { padding: 4px 6px; font-size: 0.88rem; min-width: 0; }
table.do-edit textarea { min-width: 170px; }
table.do-edit input.do-npk { width: 96px; }
table.do-edit input.do-z { width: 70px; text-align: right; }
table.do-edit input.do-einheit { width: 58px; }
table.do-edit select { min-width: 110px; max-width: 150px; }
table.do-edit td:nth-child(12) input { width: 116px; }
table.do-edit input[type="checkbox"] { transform: scale(1.2); }
table.do-edit .do-geaendert { background: #fff8d6; border-color: #e0b400; }
table.do-edit tr.do-weg td { opacity: 0.45; text-decoration: line-through; }
table.do-edit tr.do-aktiv td { background: #e4eef7; }
table.do-edit tr[data-pruefen="1"] td { background: var(--warn-hell); }
table.do-edit tr.do-neu td { background: #f1f8f2; }
.do-marken { margin-top: 3px; }
.do-marke { display: inline-block; font-size: 0.72rem; padding: 1px 6px; border-radius: 8px; background: #e6e9eb; color: #37434a; margin: 0 3px 2px 0; }
.do-marke.do-m-pruefen { background: #ffe0b2; color: #8a4b00; }
.do-marke.do-m-geaendert { background: #fff3c4; color: #6d4c00; }
a.do-seite { white-space: nowrap; font-weight: 600; }
.do-pdf { background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; padding: 10px; }
.do-pdf-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 8px; font-size: 0.9rem; }
.do-pdf-kopf button { margin: 0; }
.do-pdf-kopf input.do-pdf-nr { width: 70px; padding: 4px 6px; }
.do-pdf-bild { display: block; width: 100%; height: auto; border: 1px solid #d6d6d6; background: #ffffff; }
@media (min-width: 1900px) {
  .do-bearbeiten { grid-template-columns: minmax(0, 2.3fr) minmax(340px, 1fr); }
  .do-pdf { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
}
@page { size: A4; margin: 14mm 14mm 12mm 14mm; }
@media print {
  main > *:not(.do-bearbeiten), .do-links > *:not(.do-blatt), .do-pdf { display: none !important; }
  .do-bearbeiten { display: block; }
  .do-blatt { border: none; box-shadow: none; padding: 0; margin: 0; max-width: none; font-size: 9.5pt; }
}
/* ===== Devis/Offerten Phase 5 (06.11.2026): Offert-Maske; grün = Knopf für den nächsten Arbeitsschritt (Chris 06.11.2026) ===== */
button.do-weiter, .knopf.do-weiter { background: #2e7d32; border-color: #2e7d32; color: #ffffff; font-weight: 700; }
button.do-weiter:hover, .knopf.do-weiter:hover { background: #1b5e20; border-color: #1b5e20; color: #ffffff; }
main:has(.do-of) { max-width: 2400px; }
.do-of-raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.do-of-haupt, .do-of-seite { min-width: 0; }
@media (min-width: 1400px) {
  .do-of-raster { grid-template-columns: minmax(0, 2.4fr) minmax(320px, 1fr); }
}
.do-of-unsichtbar { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.do-of .feld input.do-of-chg, .do-of .feld select.do-of-chg { background: #fff6d6; border-color: #e0b400; }
label.do-of-check { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 8px 0; padding: 3px 6px; border: 1px solid transparent; border-radius: 4px; font-weight: 400; cursor: pointer; }
label.do-of-check.do-of-chg { background: #fff6d6; border-color: #e0b400; }
.do-of-checks { margin: 0 0 6px; }
.do-of-stdbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; }
.do-of-stdbar button { margin: 0; }
button.do-of-scharf, button.do-of-scharf:hover { background: var(--rot); border-color: var(--rot); color: #ffffff; }
.do-of-kbox { margin: 4px 0 8px; padding: 8px 10px; background: var(--hinter); border-radius: 6px; }
.do-of-kbox:empty { display: none; }
.do-of-warn { color: var(--warn); font-weight: 600; margin-top: 4px; }
.do-of-suche { max-width: 640px; }
.do-of-breit { min-width: 0; }
table.do-of-tab { font-size: 0.9rem; }
table.do-of-tab td { vertical-align: top; }
table.do-of-tab td.do-of-art { min-width: 260px; }
table.do-of-tab select { width: 100%; max-width: 420px; padding: 4px 6px; font-size: 0.88rem; }
table.do-of-tab input.do-of-z { width: 86px; padding: 4px 6px; text-align: right; }
table.do-of-tab input.do-of-hand { background: #fff6d6; border-color: #e0b400; }
.do-of-dv, .do-of-src { font-size: 0.8rem; color: var(--grau); margin-top: 2px; }
table.do-of-tab td.do-of-quelle { min-width: 170px; max-width: 280px; }
table.do-of-tab tr.do-of-mismatch td { background: var(--warn-hell); }
table.do-of-tab tr.do-of-extra td { font-style: italic; }
table.do-of-tab tr.do-of-weg-zeile td { opacity: 0.4; text-decoration: line-through; }
button.do-of-weg { margin: 0; color: var(--rot); border-color: #e0a19c; }
.badge.do-of-q-kunde { background: #2e7d32; color: #ffffff; }
.badge.do-of-q-zone { background: var(--blau-hell); color: var(--blau); }
.badge.do-of-s-entwurf { background: var(--warn-hell); color: #6d4c00; }
.badge.do-of-s-verworfen { background: #e6e9eb; color: #37434a; }
.do-of-hinweis { font-size: 0.9rem; margin: 8px 0; }
.do-of-zs h3 { font-size: 0.95rem; margin: 14px 0 4px; color: var(--akzent); }
.do-of-zs .feld { margin: 0 0 6px; }
.do-of-zs .feld input { max-width: 160px; }
.do-of-zs > small { display: block; color: var(--grau); font-size: 0.78rem; margin: -2px 0 8px; }
table.do-of-total { width: 100%; border-collapse: collapse; }
table.do-of-total td { padding: 5px 6px; border-bottom: 1px solid var(--linie); }
table.do-of-total tr.do-of-gross td { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--text); }
.do-of-meldung { min-height: 1.2em; margin: 6px 0 0; font-size: 0.85rem; color: var(--grau); }
.do-of-meldung.do-of-fehler { color: var(--rot); font-weight: 600; }
.do-of-fuss p { margin: 4px 0; font-size: 0.85rem; color: var(--grau); }
form.do-of-verwerfen { margin: 0 0 16px; }
.do-weiter-zeile { margin: 8px 0 0; }
.do-weiter-zeile form { display: inline; margin: 0; }
td .do-liste-weiter { margin: 0 0 6px; }
td .do-liste-weiter form { margin: 0; }
/* ===== Devis/Offerten Phase 5b (06.11.2026): Bonitäts-Ampel – warnt nur, sperrt nie ===== */
.bo-ampel { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 10px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.bo-punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.bo-ampel.bo-gruen { background: #e8f5e9; color: #1b5e20; }
.bo-ampel.bo-gruen .bo-punkt { background: #2e7d32; }
.bo-ampel.bo-gelb { background: #fff4dc; color: #6d4c00; }
.bo-ampel.bo-gelb .bo-punkt { background: #f9a825; }
.bo-ampel.bo-rot { background: #fde8e6; color: #8e1b14; }
.bo-ampel.bo-rot .bo-punkt { background: #c62828; }
.bo-ampel.bo-grau { background: #eceff1; color: #455a64; }
.bo-ampel.bo-grau .bo-punkt { background: #9e9e9e; }
.bo-block { margin: 8px 0; padding: 8px 10px; border-left: 5px solid #9e9e9e; border-radius: 4px; background: #f7f8f9; }
.bo-block.bo-gruen { border-left-color: #2e7d32; }
.bo-block.bo-gelb { border-left-color: #f9a825; background: #fffaf0; }
.bo-block.bo-rot { border-left-color: #c62828; background: #fff5f4; }
.bo-block .bo-grund { font-size: 0.9rem; }
.bo-links { margin: 4px 0 0; font-size: 0.85rem; }
.do-vorschlaege li .bo-ampel { margin-top: 3px; }
table.bo-quellen th, table.bo-zahlen th { text-align: left; width: 260px; vertical-align: top; }
ul.bo-liste { margin: 0; padding-left: 18px; }
.bo-vorschlag { margin: 2px 0; }
.bo-vorschlag form { display: inline; margin: 0; }
.knopf.do-bo-link { margin-left: 8px; vertical-align: top; }
/* Devis/Offerten Phase 6 (07.11.2026): Erstellen, Versionen, Versand, Zustellung */
.do-of-erstellen { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linie); }
.do-of-erstellen h3 { margin: 0 0 6px; font-size: 1rem; }
.do-of-vliste { list-style: none; margin: 0; padding: 0; }
.do-of-vliste li { padding: 8px 0; border-bottom: 1px solid var(--linie); }
.do-of-vliste .knopfreihe { margin-top: 6px; }
.do-of-sendeform textarea { width: 100%; box-sizing: border-box; font: inherit; }
.do-of-vs-ampel { margin: 0 0 10px; }
.badge.do-vs-ok { background: var(--akzent-hell); color: #1b5e20; }
.badge.do-vs-gesendet { background: #e6e9eb; color: #37434a; }
.badge.do-vs-warn { background: var(--warn-hell); color: #6d4c00; }
.badge.do-vs-fehler { background: #c62828; color: #ffffff; font-weight: 700; }
.do-of-s-erstellt { background: #e3eefa; color: #1f4e78; }
.do-of-s-versendet { background: var(--akzent-hell); color: #1b5e20; }
.do-unzustellbar { border-color: #c62828; }
.do-unzustellbar form.inline { display: inline; margin-left: 6px; }
.reiter-zahl.do-rot { background: #b71c1c; font-weight: 700; }
img.do-of-sig { max-height: 70px; max-width: 100%; border: 1px solid var(--linie); background: #ffffff; padding: 4px; }
.do-versand td div + div { margin-top: 4px; }

/* Devis/Offerten Phase 7b (07.11.2026): Signatur der Offert-Mail (Vorschau in der Maske) */
.do-sig-titel { display: block; font-weight: 600; margin-bottom: 4px; }
.do-sig { border: 1px solid var(--linie); border-radius: 6px; background: #ffffff; padding: 14px 16px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; line-height: 19px; color: #333333; }
.do-sig-kopf { display: flex; align-items: flex-start; }
img.do-sig-logo { display: block; width: 92px; height: 75px; padding-right: 18px; border-right: 2px solid #892434; }
.do-sig-text { display: flex; flex-direction: column; padding-left: 18px; }
.do-sig-name { font-size: 15px; line-height: 20px; color: #1a1a1a; }
.do-sig-fkt { color: #6b767c; }
.do-sig-firma { padding-top: 6px; font-weight: 700; color: #892434; }
img.do-sig-nc { display: block; width: 180px; height: 50px; margin-top: 14px; }

/* ===== Devis/Offerten Phase 7c (07.11.2026): Ladebalken der Auswertung, Hochladen mit Fortschritt, Devis löschen; Offert-Maske: Vorschau oben,
   dann «PDF erstellen», darunter Positionen (rechts) und Zuschläge (links), Titel Möckli-Rot (Chris 07.11.2026) ===== */
.do-fortschritt { margin: 6px 0 0; max-width: 360px; }
.do-fortschritt progress { display: block; width: 100%; max-width: none; height: 10px; accent-color: var(--moeckli); }
.do-fortschritt small { display: block; color: var(--grau); font-size: 0.8rem; margin-top: 2px; }
.do-kopf .do-fortschritt { max-width: 520px; margin: 8px 0; }
.do-hochladen-stand { display: inline-block; vertical-align: middle; margin-left: 12px; min-width: 280px; }
.do-hochladen-stand progress { display: block; width: 100%; max-width: none; height: 12px; accent-color: #2e7d32; }
.do-hochladen-stand small { display: block; color: var(--grau); font-size: 0.85rem; margin-top: 2px; }
.meldung.do-hochladen-fehler { margin: 10px 0 0; }
.do-loeschen-zeile { margin: 10px 0 0; }
.do-loeschen-zeile form { display: inline; margin: 0; }
main:has(.do-of) .karte h2, main:has(.do-of) .karte h3 { color: var(--moeckli); }
.do-of-vs-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 10px; }
.do-of-vs-kopf h2 { margin: 0; }
.do-of-vs-knoepfe { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 6px; }
.do-of-vs-knoepfe button { margin: 0; }
.do-of-vs-rahmen { display: block; background: #e9ecee; border-radius: 6px; padding: 14px; min-height: 120px; overflow: hidden; }
.do-of-vs-fuss { margin: 8px 0 0; font-size: 0.85rem; }
.karte.do-of-erstellen { margin: 0 0 16px; padding: 16px; border-top: 1px solid var(--linie); border-left: 5px solid var(--moeckli); }
.do-of-erstellen h2 { margin: 0; }
.do-of-erst-zeile { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 18px; margin: 0 0 8px; }
.do-of-erst-zeile .feld { margin: 0; min-width: 260px; }
.do-of-erst-zeile .knopfreihe { margin: 0; }
.do-of-total-kurz { margin-left: auto; font-weight: 700; font-size: 1.1rem; }
.do-of-pdf-aktuell { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--linie); }
.do-of-pdf-aktuell .knopfreihe { margin: 6px 0 4px; }
@media (min-width: 1100px) {
  .do-of-raster { grid-template-columns: minmax(300px, 1fr) minmax(0, 2.8fr); }
  .do-of-seite { grid-column: 1; grid-row: 1; }
  .do-of-haupt { grid-column: 2; grid-row: 1; }
}

/* ===== Devis/Offerten Phase 7e (07.11.2026, Chris: «Versand kommt unter PDF erstellen hin»): Anzeige-Reihenfolge der Offert-Maske. Die Maske ist ein Formular,
   der Versand ein eigenes danach; das Maskenformular gibt seine Karten an den Rahmen weiter (display: contents), die Reihenfolge setzt «order». ===== */
.do-of-fluss { display: flex; flex-direction: column; }
.do-of-fluss > form.do-of { display: contents; }
.do-of-fluss .do-of-vorschau { order: 1; }
.do-of-fluss .do-of-kunde { order: 2; }
.do-of-fluss .do-of-erstellen { order: 3; }
.do-of-fluss > .do-of-versand-karte { order: 4; }
.do-of-fluss .do-of-raster { order: 5; }

/* ===== Phase 8 / U1 (07.11.2026, Chris: «unterscheiden zwischen Offerten erstellt und Offerten versendet»): Status «Offerte erstellt» orange,
   Erinnerung orange ab 1 / rot ab 2 Arbeitstagen, Kachel und Reiterzahl, Versand-Block auf der Anfrage ===== */
.s-erstellt { background: #ffe0b8; color: #8a4b00; }
.legende .lg.lg-erstellt { background: #ffcc80; }
.kacheln.kacheln-heute { grid-template-columns: repeat(10, minmax(0, 1fr)); }
@media (max-width: 1000px) { .kacheln.kacheln-heute { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kacheln.kacheln-heute { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kachel.erstellt { background: #ffcc80; border-color: #f0a54a; }
.kachel.erstellt .zahl { color: #7a3e00; }
.kachel.erstellt.rot .zahl { color: #b3261e; }
.kachel.erstellt .text { color: #4a2800; }
table.liste tr.erinnerung-orange td { background: #ffe0b8; }
table.liste tr.erinnerung-rot td { background: #fcdcd9; }
.reiter-zahl.do-orange { background: #ef6c00; }
.do-versand-block .tabelle-scroll { margin: 6px 0 10px; }
form.do-versand-form { margin: 8px 0 0; }
form.do-versand-form .raster { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
form.do-versand-form .feld { margin-bottom: 6px; }
form.do-versand-form button { margin: 2px 0 0; }
.opdf-versand { margin-top: 2px; }
/* Phase 10b (Chris 07.11.2026): Status «Offerte versendet» grün, «Offerte erstellt» (nicht versendet) rot – Hintergrund des Status */
.badge.s-offeriert { background: #2e7d32; color: #ffffff; }
.badge.s-erstellt { background: #c62828; color: #ffffff; }
/* 10c (Chris 07.11.2026 «weisses feld»): Aufklappfelder in farbigen Zeilen (z. B. «Angaben ändern» in der Offerten-Ablage) mit dunkler Schrift;
   die Klasse ist dreifach genannt, damit die Regel die weisse Schrift der grünen bzw. dunklen Zeilen (tr:has(...) a) übersteuert */
table.liste tr td details { color: var(--text); }
table.liste.liste.liste tr td details a { color: var(--blau); }
table.liste.liste.liste tr td details .grau { color: var(--grau); }

/* 10e (Chris 07.11.2026): leere Pflichtfelder gelb (Offert-Maske: Kunde, Objekt PLZ, Objekt, Datum; Versand: erster Empfänger, Betreff) */
input.do-pflicht:placeholder-shown, .do-of .do-suche input[name="kunde_suche"]:placeholder-shown { background: #fff176; border-color: #f9a825; }
/* 10e: Versand per Mail – ein Feld pro Empfänger (+), Betreff und Kopie rechts daneben, nutzt die Breite */
.do-vs-raster { display: grid; grid-template-columns: minmax(260px, 2fr) 3fr; gap: 0 24px; align-items: start; }
@media (max-width: 760px) { .do-vs-raster { grid-template-columns: 1fr; } }
.do-vs-empf-liste { display: flex; flex-direction: column; gap: 6px; }
button.do-vs-plus { margin: 6px 0 0; }
.do-vs-rechts label.do-of-check { margin-top: 4px; }
.do-sig-rahmen { overflow-x: auto; }
.do-sig-v { border: 1px solid var(--linie); border-radius: 6px; background: #ffffff; padding: 14px 16px; min-width: 0; }
.do-sig-v table { margin: 0; }
.do-sig-v img { max-width: none; }
/* 10e (Chris 07.11.2026 «grenze die hier bei objekte besser sichtbar ab»): Zeilen der Objekte-Liste klar getrennt */
.pg-objekte table.liste:not(.km-fahnen-tabelle) > tbody > tr > td { border-bottom: 2px solid #9fb0b8; }
.pg-objekte table.liste:not(.km-fahnen-tabelle) > tbody > tr:last-child > td { border-bottom: 0; }
/* 10e: Aufträge */
.do-au-karte { border-left: 4px solid #2e7d32; }
.do-au-karte p { margin: 0 0 8px; }
.do-au-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 20px; margin: 0; }
.do-au-dl dt { font-size: 0.85rem; color: var(--grau); }
.do-au-dl dd { margin: 0; }
table.do-au-tab input[type="text"] { padding: 4px 6px; font-size: 0.9rem; }
table.do-au-tab input.do-au-zahl { width: 7.5em; text-align: right; }
table.do-au-tab input.do-au-einh { width: 5.5em; }
table.do-au-tab input.do-au-gruppe { width: 12em; }
table.do-au-tab input.do-au-text { min-width: 24em; }
table.liste tr.do-au-weg-an td { background: #fdecea; color: #8a2a20; }
table.liste tr.do-au-weg-an td input[type="text"] { text-decoration: line-through; }
.do-au-weg { font-size: 0.85rem; white-space: nowrap; }
table.do-au-total { width: auto; min-width: 320px; margin: 12px 0 0 auto; }
table.do-au-total tr.do-au-summe td { font-weight: 700; border-top: 2px solid var(--text); }
.badge.do-au-s-offen { background: #2e7d32; color: #ffffff; }
.badge.do-au-s-abgeschlossen { background: #607d8b; color: #ffffff; }
.badge.do-au-s-a3 { background: #e8c04a; color: #3d2b00; }
/* 10e (Chris 07.11.2026): Reiter als Verlauf vom Einlesen bis zum Auftrag – Devis einlesen hellgrün, Offerte erstellt dunkler, Offerten verschickt noch dunkler,
   Aufträge erteilt ganz dunkel; der gewählte Reiter trägt einen Ring (die Farbe bleibt) */
.kopf nav.reiter a.r-s1 { background: #dcefdc; border-color: #81c784; color: #1b5e20; box-shadow: 0 1px 3px rgba(46, 125, 50, 0.25); }
.kopf nav.reiter a.r-s1:hover { background: #c8e6c9; }
.kopf nav.reiter a.r-s2 { background: #a5d6a7; border-color: #66bb6a; color: #103d14; box-shadow: 0 1px 3px rgba(46, 125, 50, 0.3); }
.kopf nav.reiter a.r-s2:hover { background: #8fcc92; }
.kopf nav.reiter a.r-s3 { background: #43a047; border-color: #388e3c; color: #ffffff; box-shadow: 0 1px 3px rgba(27, 94, 32, 0.35); }
.kopf nav.reiter a.r-s3:hover { background: #388e3c; }
.kopf nav.reiter a.r-s4 { background: #1b4d20; border-color: #123816; color: #ffffff; box-shadow: 0 1px 3px rgba(18, 56, 22, 0.45); }
.kopf nav.reiter a.r-s4:hover { background: #123816; }
.kopf nav.reiter a.r-s1.aktiv, .kopf nav.reiter a.r-s2.aktiv, .kopf nav.reiter a.r-s3.aktiv, .kopf nav.reiter a.r-s4.aktiv { box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #0d3311; }
/* 10e: ein Reiter mehr («Aufträge erteilt») – Abstände etwas enger, damit Logo und Firmenname nicht umbrechen */
.kopf nav.reiter { gap: 8px; }
.kopf nav.reiter a { padding: 8px 13px; }
/* 10e: Vorschau der Mail-Signatur (Outlook-Signatur Mitarbeiter) – Stile der Vorlage als Klassen (CSP: keine Inline-Stile) */
.do-sig-v .sv1 { border-collapse: collapse; }
.do-sig-v .sv2 { padding: 0 0 14px 0; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #222222; }
.do-sig-v .sv3 { border-collapse: collapse; width: 963px; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #222222; }
.do-sig-v .sv4 { width: 159px; padding: 0 24px 0 0; }
.do-sig-v .sv5 { display: block; border: 0; width: 159px; height: 292px; }
.do-sig-v .sv6 { width: 780px; }
.do-sig-v .sv7 { border-collapse: collapse; width: 780px; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #222222; }
.do-sig-v .sv8 { width: 212px; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #222222; }
.do-sig-v .sv9 { font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 19px; line-height: 24px; font-weight: bold; color: #222222; }
.do-sig-v .sv10 { font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #595959; padding-bottom: 2px; }
.do-sig-v .sv11 { width: 16px; padding: 2px 6px 0 0; }
.do-sig-v .sv12 { display: block; border: 0; width: 14px; height: 14px; }
.do-sig-v .sv13 { padding: 2px 0 0 0; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #222222; white-space: nowrap; }
.do-sig-v .sv14 { color: #222222; text-decoration: none; }
.do-sig-v .sv15 { color: #344795; }
.do-sig-v .sv16 { width: 228px; padding: 0 0 0 14px; border-left: 1px solid #d9d9d9; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #222222; }
.do-sig-v .sv17 { font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; line-height: 24px; font-weight: bold; color: #8b2332; }
.do-sig-v .sv18 { width: 16px; padding: 0px 6px 0 0; }
.do-sig-v .sv19 { padding: 0px 0 0 0; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #222222; white-space: nowrap; }
.do-sig-v .sv20 { color: #595959; }
.do-sig-v .sv21 { width: 202px; padding: 0 0 0 14px; border-left: 1px solid #d9d9d9; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #222222; }
.do-sig-v .sv22 { width: 16px; padding: 0 6px 0 0; }
.do-sig-v .sv23 { display: block; border: 0; width: 16px; height: 16px; }
.do-sig-v .sv24 { font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 15px; line-height: 24px; font-weight: bold; color: #344795; }
.do-sig-v .sv25 { border-collapse: collapse; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #222222; }
.do-sig-v .sv26 { padding: 2px 8px 0 0; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #595959; }
.do-sig-v .sv27 { width: 110px; }
.do-sig-v .sv28 { display: block; border: 0; width: 108px; height: 94px; }
.do-sig-v .sv29 { padding: 8px 0 10px 0; }
.do-sig-v .sv30 { border-collapse: collapse; width: 780px; }
.do-sig-v .sv31 { border-top: 2px solid #8b2332; font-size: 1px; line-height: 1px; }
.do-sig-v .sv32 { border-collapse: collapse; width: 780px; font-family: Calibri, Arial, Helvetica, sans-serif; color: #222222; }
.do-sig-v .sv33 { width: 140px; white-space: nowrap; padding: 7px 10px; background: #eef5ec; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 15px; font-weight: bold; color: #3b7a2e; }
.do-sig-v .sv34 { color: #3b7a2e; text-decoration: none; }
.do-sig-v .sv35 { padding: 7px 7px; background: #eef5ec; border-left: 1px solid #cfe0ca; font-family: Calibri, Arial, Helvetica, sans-serif; }
.do-sig-v .sv36 { width: 24px; padding: 0 6px 0 0; }
.do-sig-v .sv37 { display: block; border: 0; width: 24px; height: 24px; }
.do-sig-v .sv38 { font-family: Calibri, Arial, Helvetica, sans-serif; white-space: nowrap; }
.do-sig-v .sv39 { font-size: 17px; line-height: 20px; font-weight: bold; color: #3b7a2e; }
.do-sig-v .sv40 { font-size: 12px; line-height: 15px; color: #595959; }
.do-sig-v .sv41 { padding: 10px 0 0 0; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #344795; }
.do-sig-v .sv42 { padding: 6px 0 0 0; }
.do-sig-v .sv43 { width: 200px; padding: 0 14px 0 0; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; line-height: 20px; color: #344795; white-space: nowrap; }
.do-sig-v .sv44 { width: 199px; }
.do-sig-v .sv45 { display: block; border: 0; width: 199px; height: 36px; }
.do-sig-v .sv46 { font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 18px; color: #222222; }
.do-sig-v .sv47 { padding: 10px 0 0 0; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 8px; line-height: 10px; color: #767676; }

/* 10h (Chris 07.11.2026): Kopf rechts kompakt – Gebiet/Kunden, NovoCon, dann Verwaltung und Benutzer zweizeilig ganz rechts. Die Reiter stehen in einer
   eigenen Zeile, solange nicht alles nebeneinander passt (gemessen: Admin mit allen Reitern braucht rund 2200 px). */
.kopf .nav-rechts { flex-wrap: nowrap; }
.kopf .kopf-verw { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.kopf .kopf-verw .verw-knoepfe { display: flex; gap: 4px; flex-wrap: nowrap; }
.kopf .kopf-verw a.kopf-admin { border: 1px solid #c9c9c9; border-radius: 6px; padding: 2px 9px; font-size: 0.82rem; font-weight: 600; line-height: 1.35; color: #444444; background: #f6f6f6; white-space: nowrap; }
.kopf .kopf-verw a.kopf-admin.aktiv, .kopf .kopf-verw a.kopf-admin:hover { border-color: var(--moeckli); color: var(--moeckli); background: #ffffff; }
.kopf .kopf-verw .wer { font-size: 0.82rem; line-height: 1.3; white-space: nowrap; }
.kopf .kopf-verw .wer button.link { padding: 0; margin: 0; }
.kopf nav.reiter a.r-grau { background: #eceff1; border-color: #9e9e9e; color: #424242; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.kopf nav.reiter a.r-grau:hover { background: #e0e0e0; }
.kopf nav.reiter a.r-grau.aktiv { box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px #616161; }
@media (min-width: 701px) and (max-width: 2300px) {
  .kopf { grid-template-columns: minmax(0, 1fr) auto; }
  .kopf nav { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 700px) { .kopf .kopf-verw { align-items: center; } }
/* 10h (Chris 07.11.2026): Listen im Ablauf (Devis einlesen bis Offerte abgelehnt) abwechselnd weiss und hellgrau – farbige Zeilen (Fristen, Status) behalten
   ihre Farbe (geringere Spezifität); CHF-Betrag grün hervorgehoben */
:where(table.liste) > tbody > tr:nth-child(even) > td { background: #eef1f3; }   /* 10i (Chris 08.11.2026): «alle listen gleich» */
.do-chf { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #dff0e0; color: #1b5e20; font-weight: 700; white-space: nowrap; }
/* 10h: Entscheid je versendeter Offerte – grün «Auftrag erhalten», rot «Abgesagt» */
.do-entscheid { display: flex; flex-wrap: wrap; gap: 0 6px; margin-top: 2px; }
.do-entscheid form { margin: 0; }
button.do-erhalten { background: #2e7d32; border-color: #2e7d32; color: #ffffff; font-weight: 700; }
button.do-erhalten:hover { background: #1b5e20; }
button.do-abgesagt { background: #c62828; border-color: #c62828; color: #ffffff; font-weight: 700; }
button.do-abgesagt:hover { background: #a31515; }
/* 10h: PDF-Vorschau als Seitenbilder (Offerte, Auftragsbestätigung, A3-PDF) – ein Klick öffnet die PDF */
.do-pdfbild-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.do-pdfbild-kopf h2 { margin: 0; }
.do-pdfbild-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.do-pdfbild-seiten { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.do-pdfbild-seite { flex: 1 1 300px; max-width: 560px; display: block; text-decoration: none; color: var(--grau); font-size: 0.82rem; text-align: center; }
.do-pdfbild-seite img { display: block; width: 100%; height: auto; margin-bottom: 4px; border: 1px solid #c9ced1; background: #ffffff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.do-pdfbild-seite:hover img { border-color: var(--moeckli); }
/* 10i (Chris 08.11.2026): Grund der Absage neben dem roten Knopf */
.do-entscheid form.do-abgesagt-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.do-entscheid form.do-abgesagt-form select { width: auto; max-width: 210px; margin: 4px 0; padding: 4px 6px; font-size: 0.85rem; }
/* 10j (Chris 08.11.2026): Konkurrent neben dem Grund beim roten Knopf */
.do-entscheid form.do-abgesagt-form input[type=text] { width: 200px; max-width: 100%; margin: 4px 0; padding: 4px 6px; font-size: 0.85rem; }
/* 10k (Chris 08.11.2026): Grund nachträglich ändern in «Offerte abgelehnt» */
.do-entscheid form.do-grund-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.do-entscheid form.do-grund-form select { width: auto; max-width: 210px; margin: 4px 0; padding: 4px 6px; font-size: 0.85rem; }
.do-entscheid form.do-grund-form input[type=text] { width: 200px; max-width: 100%; margin: 4px 0; padding: 4px 6px; font-size: 0.85rem; }
/* 10l (Chris 08.11.2026): «knöpfe oben, unter dem knopf was zu dem knopf gehört» – grün und rot (bzw. «Grund speichern») nebeneinander oben, darunter Grund und Konkurrent */
.do-entscheid { align-items: flex-start; gap: 6px 8px; margin-top: 6px; }
.do-entscheid form.do-abgesagt-form, .do-entscheid form.do-grund-form { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 4px; width: 210px; max-width: 100%; }
.do-entscheid form.do-abgesagt-form select, .do-entscheid form.do-abgesagt-form input[type=text],
.do-entscheid form.do-grund-form select, .do-entscheid form.do-grund-form input[type=text] { width: 100%; max-width: 100%; margin: 0; }
/* 10l: «Testmail an mich» – Empfänger rot (dahin geht nichts) */
.do-vs-empf-liste.do-vs-aus input { border-color: #c62828; background: #fdecea; color: #b71c1c; text-decoration: line-through; }
.do-vs-test-hinweis { margin: 6px 0 0; padding: 6px 10px; border-left: 4px solid #c62828; background: #fdecea; color: #8e1b1b; font-size: 0.88rem; }
.do-of-check.do-vs-testmail { color: #8e1b1b; }
/* 10l: «Offerte aus A3 hochladen» als Knopf in «Offerte erstellt» – öffnet den Kasten zum Hochladen */
details.do-a3-hoch { margin: 0 0 12px; }
details.do-a3-hoch > summary.knopf { list-style: none; padding: 8px 16px; font-weight: 600; }
details.do-a3-hoch > summary::-webkit-details-marker { display: none; }
details.do-a3-hoch > .karte { margin-top: 8px; }
/* 10r (Chris 08.11.2026: «auch in der hellen Ansicht korrigieren»): «fehlt: …» auf grüner bzw. roter Zeile lesbar – vorher dunkelbraun auf grün (1,5:1) */
table.liste tr.auftrag:not(.gold) small.fehlt, table.liste tr:has(.badge.s-gewonnen):not(.gold) small.fehlt, table.liste tr:has(.badge.s-abgesagt):not(.gold) small.fehlt { color: #fff3b0; }
/* 10s (Chris 08.11.2026): Marktkarte – Ansicht «Preise» (Marktmittel je Gemeinde/Bezirk, Kunde gegen Markt, Preis ohne Transport) */
.km-preis-wahl, .km-preis-legende, .km-preis-h2 { display: none; }
html.km-ansicht-preis .km-preis-wahl, html.km-ansicht-preis .km-preis-legende, html.km-ansicht-preis .km-preis-h2 { display: block; }
svg.km .km-legende-preis { display: none; }
html.km-ansicht-preis svg.km .km-legende-preis { display: inline; }
html.km-ansicht-preis svg.km .km-legende-stufen, html.km-ansicht-preis svg.km .km-fahnen, html.km-ansicht-preis svg.km .km-bg, html.km-ansicht-preis svg.km .km-bew,
html.km-ansicht-preis svg.km .km-manuell, html.km-ansicht-preis .km-fahnen-legende, html.km-ansicht-preis .km-bg-legende, html.km-ansicht-preis .km-bew-legende,
html.km-ansicht-preis .km-mini-legende, html.km-ansicht-preis .km-zaehlung, html.km-ansicht-preis .km-modus,
html.km-ansicht-preis .km-bereich > h2:not(.km-preis-h2), html.km-ansicht-preis .km-bereich > .km-untertitel { display: none; }
html.km-ansicht-preis svg.km .km-g[data-pp="0"], .km-legende rect.km-pp0 { fill: #eceff1; }
html.km-ansicht-preis svg.km .km-g[data-pp="n"], .km-legende rect.km-ppn { fill: #c2c7cb; }
/* 10t (Chris 09.11.2026: «preise höher besser muss grün sein, tiefer schlechter muss ins rot wechseln») */
html.km-ansicht-preis svg.km .km-g[data-pp="1"], .km-legende rect.km-pp1 { fill: #d9534a; }
html.km-ansicht-preis svg.km .km-g[data-pp="2"], .km-legende rect.km-pp2 { fill: #f4b0aa; }
html.km-ansicht-preis svg.km .km-g[data-pp="3"], .km-legende rect.km-pp3 { fill: #ffffff; }
html.km-ansicht-preis svg.km .km-g[data-pp="4"], .km-legende rect.km-pp4 { fill: #a5d6a7; }
html.km-ansicht-preis svg.km .km-g[data-pp="5"], .km-legende rect.km-pp5 { fill: #43a047; }
.km-legende rect.km-pp0, .km-legende rect.km-ppn, .km-legende rect.km-pp1, .km-legende rect.km-pp2, .km-legende rect.km-pp3, .km-legende rect.km-pp4, .km-legende rect.km-pp5 { stroke: #9e9e9e; stroke-width: 0.4; }
.km-chip.km-pp0 { background: #eceff1; } .km-chip.km-ppn { background: #c2c7cb; } .km-chip.km-pp1 { background: #d9534a; } .km-chip.km-pp2 { background: #f4b0aa; }
.km-chip.km-pp3 { background: #ffffff; } .km-chip.km-pp4 { background: #a5d6a7; } .km-chip.km-pp5 { background: #43a047; }
.km-preis-wahl { margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 6px; background: #fbfaf8; font-size: 0.88rem; }
.km-preis-suche { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 6px; }
.km-preis-suche label { font-weight: 700; }
.km-preis-suche input[type="search"] { flex: 1 1 240px; min-width: 0; width: auto; margin: 0; }
.km-preis-suche button, .km-preis-suche .knopf { margin: 0; }
.km-preis-filter { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.km-preis-gruppe { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.km-preis-gtitel { color: var(--grau); margin-right: 2px; }
.km-preis-treffer { margin: 0 0 6px; }
.km-preis-treffer a { margin-right: 10px; }
.km-preis-legende { font-size: 0.86rem; margin: 6px 0 0; padding: 6px 8px; border: 1px solid var(--linie); border-radius: 6px; background: #fbfaf8; }
.km-preis-legende p { margin: 3px 0; }
.km-preis-titel { font-weight: 700; }
.km-preis-chips { line-height: 1.8; }
.km-seite .km-preis-wahl, .km-seite .km-preis-legende { font-size: 0.8rem; }
.km-seite .km-preis-suche input[type="search"] { flex-basis: 160px; }
.km-preis-box { position: absolute; z-index: 6; width: 470px; max-width: calc(100% - 8px); max-height: 600px; overflow: auto; background: #ffffff; border: 1px solid var(--linie);
  border-radius: 8px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); font-size: 0.85rem; }
.km-preis-box[hidden] { display: none; }
.km-preis-box h3 { margin: 0 0 6px; font-size: 1rem; padding-right: 26px; }
.km-preis-box p { margin: 0 0 4px; }
.km-preis-kopf { font-weight: 700; }
.km-preis-ut { font-weight: 700; margin-top: 8px !important; }
table.liste.km-preis-tab { margin: 4px 0 8px; font-size: 0.82rem; }
table.liste.km-preis-tab th, table.liste.km-preis-tab td { padding: 3px 6px; }
/* 10u (Chris 09.11.2026): interne Spalten Anteil Transport / Beton ab Werk mit Marktwert – nur in der Offert-Maske */
table.do-of-tab th.do-of-intern-th { background: #eef1f3; color: #37474f; }
table.do-of-tab th.do-of-intern-th small { display: block; font-weight: 400; font-size: 0.75rem; color: #5f6b72; }
table.do-of-tab td.do-of-intern { background: #f6f8f9; color: #37474f; min-width: 92px; white-space: nowrap; }
table.do-of-tab td.do-of-intern .do-of-mk { font-size: 0.78rem; color: #5f6b72; white-space: nowrap; }
table.do-of-tab td.do-of-intern .do-of-mk.do-of-mk-markt { white-space: normal; max-width: 150px; margin-left: auto; line-height: 1.25; margin-top: 2px; }
table.do-of-tab td.do-of-intern .do-of-mk-d { font-weight: 700; color: #37474f; white-space: nowrap; }
table.do-of-tab td.do-of-intern .do-of-mk-d.do-of-mk-hoch { color: #2e7d32; }
table.do-of-tab td.do-of-intern .do-of-mk-d.do-of-mk-tief { color: #c62828; }
table.do-of-total tr.do-of-intern-summe td { background: #f6f8f9; color: #37474f; font-size: 0.85rem; border-top: 1px dashed #b0bec5; }
.do-of-intern-hinweis { font-size: 0.85rem; }
/* 11f (Chris 09.11.2026): Offert-Maske – Offerten zu diesem Objekt (Vergleich) und «An weitere Kunden versenden» */
table.liste.do-vgl-tab { margin: 6px 0 10px; font-size: 0.88rem; }
table.liste.do-vgl-tab th, table.liste.do-vgl-tab td { padding: 4px 8px; vertical-align: top; }
table.liste.do-vgl-tab tr.do-vgl-ich td { font-weight: 600; }
table.liste.do-vgl-tab tr.do-vgl-ich td:first-child { box-shadow: inset 4px 0 0 var(--blau); }
table.liste.do-vgl-tab .do-vgl-hoch, .do-vgl .do-vgl-hoch { color: var(--akzent); font-weight: 700; }
table.liste.do-vgl-tab .do-vgl-tief, .do-vgl .do-vgl-tief { color: var(--rot); font-weight: 700; }
table.liste.do-vgl-tab .do-vgl-gleich { color: var(--grau); }
table.liste.do-vgl-tab tr:has(.badge.s-gewonnen) :is(.do-vgl-hoch, .do-vgl-tief, .do-vgl-gleich),
table.liste.do-vgl-tab tr:has(.badge.s-abgesagt) :is(.do-vgl-hoch, .do-vgl-tief, .do-vgl-gleich) { color: #fff; }
table.liste.do-vgl-matrix th small, table.liste.do-vgl-matrix td.do-vgl-zelle small { display: block; font-weight: 400; }
table.liste.do-vgl-matrix td.do-vgl-zelle { white-space: nowrap; }
table.liste.do-vgl-matrix th.do-vgl-ich, table.liste.do-vgl-matrix td.do-vgl-ich { background: var(--blau-hell); font-weight: 600; }
.karte.do-vgl > h2:first-child { margin-top: 0; }
.do-vgl-kopie { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--linie); }
.do-vgl-kopie h3 { margin-top: 0; }
/* 11f2 (Chris 09.11.2026: «hier wird noch abgeschnitten»): Listen neben der Seitenkarte nie abschneiden – karte.js misst die breiteste Tabelle; der Inhalt
   erhält die nötige Breite (Karte schmaler, mindestens 320 px), sonst steht die Karte unter dem Inhalt */
.seite.mit-karte.km-unten > main { max-width: none; }
@media (min-width: 1560px) {
  .seite.mit-karte.km-breit { grid-template-columns: var(--km-main, 1200px) minmax(320px, 760px); }
  .seite.mit-karte.km-breit > main { max-width: none; }
  .seite.mit-karte.km-unten { display: block; }
  .seite.mit-karte.km-unten > .km-seite { position: static; max-width: 1200px; margin: 0 auto 24px; padding: 0 16px; }
}
/* 11h (Chris 09.11.2026): Creditreform-Vollprüfung – oranger Balken bei Neukunden ohne gültige Prüfung (warnt nur), Ergebnis der Prüfung, Kundenblatt */
div.bo-cr.bo-cr-fehlt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; padding: 8px 10px; border-left: 5px solid var(--warn);
  border-radius: 4px; background: var(--warn-hell); color: var(--text); font-size: 0.9rem; }
.bo-cr-knoepfe { display: inline-flex; flex-wrap: wrap; gap: 6px; }
p.bo-cr.bo-cr-ok { margin: 6px 0 0; font-size: 0.9rem; }
.bo-cr-kopie input[readonly] { background: var(--hinter); color: var(--text); }
.bo-cr-form { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--linie); }
.bo-cr-form h3 { margin-top: 0; }

/* 17.11.2026 (Chris «2 ja»): Liste Baugesuche – graue Schrift auf grün/rot hinterlegten Zeilen mindestens 4.5:1 (hell vorher 3.9–4.0);
   im dunklen Modus setzt dunkel.css --grau-liste und --grau-zu */
table.bg-tabelle tbody tr { --grau: var(--grau-liste, #5c666b); }
table.bg-tabelle tbody tr.bg-zu td { color: var(--grau-zu, #5c666b); }
/* 17.11.2026 (E2): öffentliche Abmeldeseite /abmelden/ (ohne Kopfzeile, nur hell) */
main.abm-seite { max-width: 560px; padding-top: 32px; }
.abm-karte h1 { margin-top: 12px; }
.abm-logo { display: block; }
.abm-wer { font-size: 1.1rem; }
.abm-fuss { margin-top: 24px; font-size: 0.9rem; }/* 17.11.2026 (E4): Seite «Schreiben an Baugesuche» – Zahlen, Liste je Empfänger (grün = angeschrieben), Haken/Kreuz je Kanal mit Grund, Plan-Marken, Gruppen */
.bgb-zahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0 0 14px; }
.bgb-zahl { font-size: 1.6rem; font-weight: 700; }
table.bgb-tabelle td { font-size: 0.9rem; }
table.bgb-tabelle td.bgb-kanal { min-width: 150px; }
table.liste tr.bgb-gesendet td { background: var(--akzent-hell); }
table.liste tr.bgb-gesendet .grau, table.liste tr.bgb-gesendet .bgb-grund { color: #46524f; }
table.liste tr.bgb-gesperrt td { color: var(--grau); }
.bgb-ja, .bgb-nein { font-size: 1.15rem; font-weight: 700; line-height: 1; }
.bgb-ja { color: var(--akzent); }
.bgb-nein { color: var(--rot); }
.bgb-grund { display: block; font-size: 0.82rem; color: var(--grau); margin-top: 2px; }
.bgb-p { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 0.8rem; font-weight: 600; background: #e6e9eb; color: #37434a; }
.bgb-p.bgb-p-geplant { background: var(--akzent-hell); color: var(--akzent); }
.bgb-p.bgb-p-zusammen { background: var(--blau-hell); color: var(--blau); }
.bgb-p.bgb-p-verschoben { background: var(--warn-hell); color: var(--warn); }
.bgb-p.bgb-p-weg { background: var(--rot-hell); color: var(--rot); }
.badge.bgb-gr-architekt { background: var(--blau-hell); color: var(--blau); }
.badge.bgb-gr-ingenieur { background: var(--warn-hell); color: var(--warn); }
.badge.bgb-gr-baufirma { background: #efe6f5; color: #5b2a86; }
.badge.bgb-kunde { background: var(--blau); color: #ffffff; text-decoration: none; }
.badge.bgb-firma { background: #e6e9eb; color: #37434a; }
table.bgb-tabelle form.inline { display: inline-block; margin: 4px 6px 0 0; }
table.bgb-tabelle .knopf.klein, table.bgb-tabelle button.klein { margin: 4px 4px 0 0; padding: 2px 8px; font-size: 0.8rem; }
details.bgb-mini { position: relative; display: inline-block; margin: 4px 0 0; background: none; border: 0; border-radius: 0; }
details.bgb-mini > summary { list-style: none; cursor: pointer; padding: 1px 7px; font-size: 0.8rem; font-weight: 600; color: var(--blau); border: 1px solid #b9cde0; border-radius: 4px; background: #ffffff; }
details.bgb-mini > summary::-webkit-details-marker { display: none; }
.bgb-mini-fenster { position: absolute; left: 0; top: 100%; z-index: 20; width: 280px; margin-top: 4px; padding: 8px 10px; background: #ffffff; border: 1px solid var(--linie); border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2); }
.bgb-mini-fenster .feld { margin: 0 0 8px; }
.bgb-mini-fenster input[type="text"], .bgb-mini-fenster select { width: 100%; }

/* 12 (Chris 17.11.2026): Offert-Maske – Varianten Primär/NovoCon (nicht im Total), Netto von Hand, Quelle des Vorschlags, Referenzzeilen orange/rot (noch ohne Zahlen) */
table.do-of-tab tr.do-of-var td { background: #f3f7f3; }
table.do-of-tab tr.do-of-var td.do-of-art { padding-left: 26px; }
table.do-of-tab td.do-of-var-menge, table.do-of-tab td.do-of-var-betrag { color: var(--grau); }
.badge.do-of-var-b { background: #dfeee0; color: #1e5a2a; }
button.do-of-tausch { margin: 4px 0 0; padding: 2px 8px; font-size: 0.78rem; }
.do-of-var-schalter { margin: 2px 0 8px; }
.badge.do-of-q-liste { background: #eceff1; color: #37474f; }
.badge.do-of-q-hand { background: #fff6d6; color: #6d4c00; border: 1px solid #e0b400; }
table.do-of-tab tr.do-of-ref td { padding-top: 3px; padding-bottom: 3px; font-size: 0.8rem; border-bottom: 1px solid #f1f3f4; }
table.do-of-tab tr.do-of-ref td.do-of-ref-l { text-align: right; }
table.do-of-tab tr.do-of-ref td.do-of-ref-l small { font-size: 0.75rem; }
table.do-of-tab tr.do-of-ref .do-of-ref-t { font-weight: 700; }
table.do-of-tab tr.do-of-ref td.do-of-ref-w { font-style: italic; }
table.do-of-tab tr.do-of-ref-o td.do-of-ref-l, table.do-of-tab tr.do-of-ref-o td.do-of-ref-w { background: #fff1e0; color: #8a4600; }
table.do-of-tab tr.do-of-ref-o td.do-of-ref-l { border-left: 4px solid #ef8a1a; }
table.do-of-tab tr.do-of-ref-s td.do-of-ref-l, table.do-of-tab tr.do-of-ref-s td.do-of-ref-w { background: #fde9e9; color: #a3161c; }
table.do-of-tab tr.do-of-ref-s td.do-of-ref-l { border-left: 4px solid #d32f2f; }
.do-of-ref-hinweis .do-of-ref-o-t { color: #8a4600; font-weight: 700; }
.do-of-ref-hinweis .do-of-ref-s-t { color: #a3161c; font-weight: 700; }

/* ===== Rechnungswesen (19.11.2026): 4. Ordner «Gesendet» (an die Buchhaltung) ===== */
.rw-ordner.rw-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
a.rw-mappe.rw-blau { background: #1565c0; color: #ffffff; }
.rw-badge.rw-art-blau { background: #1565c0; color: #ffffff; }
@media (max-width: 1100px) { .rw-ordner.rw-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .rw-ordner.rw-4 { grid-template-columns: 1fr; } }

/* ===== Rechnungswesen (19.11.2026): Mein Visum – Vorschau ===== */
img.rw-visum-bild { width: auto; height: auto; max-width: 240px; max-height: 80px; background: #ffffff; border: 1px solid var(--rand, #ccc); vertical-align: middle; }

/* ===== Rechnungswesen (20.11.2026): Offerten-Ordner einmalig / Jahresvereinbarungen / Archiv, Löschschutz ===== */
.rw-ordner.rw-unter { margin: 26px 0 14px; }
a.rw-mappe.rw-braun { background: #8d5a00; color: #ffffff; }
a.rw-mappe.rw-grau { background: #546e7a; color: #ffffff; }
.rw-badge.rw-art-braun { background: #8d5a00; color: #ffffff; }
.rw-badge.rw-art-grau { background: #546e7a; color: #ffffff; }
.rw-gesperrt { display: inline-block; font-size: 0.82rem; color: var(--grau); white-space: nowrap; }
.karte.rw-offerte { border-left: 5px solid #f57c00; }
/* 13 (Chris 22.11.2026: «unterer verkaufspreis soll grün sein selbstkosten preis rot»): Referenzzeilen mit Werten je Werk, Marken beim Netto, Kosten ab Werk */
table.do-of-tab tr.do-of-ref-g td.do-of-ref-l, table.do-of-tab tr.do-of-ref-g td.do-of-ref-w { background: #e8f5e9; color: #1b5e20; }
table.do-of-tab tr.do-of-ref-g td.do-of-ref-l { border-left: 4px solid #2e7d32; }
table.do-of-tab tr.do-of-ref td.do-of-ref-w.do-of-ref-zahl { font-style: normal; font-weight: 700; }
table.do-of-tab tr.do-of-ref .do-of-ref-werk { white-space: nowrap; }
table.do-of-tab tr.do-of-ref .do-of-ref-werk.do-of-ref-best { font-weight: 700; }
table.do-of-tab tr.do-of-ref .do-of-ref-werk.do-of-ref-fehlt { font-style: italic; opacity: .85; }
table.do-of-tab tr.do-of-ref td.do-of-ref-l small.do-of-ref-info { display: block; font-size: 0.72rem; opacity: .85; }
.do-of-kw-marke { display: inline-block; margin-top: 3px; padding: 1px 6px; border-radius: 3px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.do-of-kw-marke.do-of-kw-s { background: #c62828; color: #fff; }
.do-of-kw-marke.do-of-kw-u { background: #f9a825; color: #1f1f1f; }
.do-of-ref-hinweis .do-of-ref-g-t { color: #1b5e20; font-weight: 700; }
.do-of-sy { margin: 6px 0 10px; line-height: 1.5; }
.kw-gruen { color: #1b5e20; }
.kw-rot { color: #a3161c; }
table.liste td.kw-abw { background: #fff3cd; }
table.liste tr.kw-pruefung td { background: #fff8e1; }
table.kw-einst input { text-align: right; }
/* 13b (Chris 22.11.2026): Marke «unter unterstem Verkaufspreis» orange; Deponie in der Position Aushub Typ A */
.do-of-kw-marke.do-of-kw-u { background: #ef6c00; color: #fff; }
.do-of-dep { margin-top: 4px; font-size: 0.8rem; line-height: 1.35; }
.do-of-dep .do-of-dep-wahl { display: block; margin-bottom: 2px; font-weight: 600; }
.do-of-dep select { max-width: 100%; margin-left: 4px; }
.do-of-dep .do-of-dep-info { display: block; color: var(--grau); }
/* 13c (Chris 22.11.2026): Beträge in den Zeilen grün/rot, Summen unter der letzten Position (Total Offerte, grün unterster Verkaufspreis, rot Selbstkosten) */
table.do-of-tab tr.do-of-ref td.do-of-ref-betrag { font-style: normal; font-weight: 700; }
table.do-of-tab tr.do-of-ref td.do-of-ref-betrag small { font-weight: 400; opacity: .85; }
table.do-of-tab tr.do-of-ref td.do-of-ref-mal { text-align: right; font-style: normal; opacity: .9; }
table.do-of-tab tr.do-of-ref td.do-of-ref-betrag.do-of-ref-var { opacity: .7; }
table.do-of-tab tr.do-of-sum td { padding-top: 6px; padding-bottom: 6px; border-bottom: 0; }
table.do-of-tab tr.do-of-sum-o td { border-top: 2px solid #37474f; font-weight: 700; }
table.do-of-tab tr.do-of-sum td.do-of-sum-l { text-align: right; }
table.do-of-tab tr.do-of-sum td.do-of-sum-w { font-weight: 700; }
table.do-of-tab tr.do-of-sum .do-of-sum-t { font-weight: 700; }
table.do-of-tab tr.do-of-sum .do-of-sum-info { display: block; font-size: 0.75rem; font-weight: 400; }
table.do-of-tab tr.do-of-sum-g td.do-of-sum-l, table.do-of-tab tr.do-of-sum-g td.do-of-sum-w { background: #e8f5e9; color: #1b5e20; }
table.do-of-tab tr.do-of-sum-g td.do-of-sum-l { border-left: 4px solid #2e7d32; }
table.do-of-tab tr.do-of-sum-s td.do-of-sum-l, table.do-of-tab tr.do-of-sum-s td.do-of-sum-w { background: #fde9e9; color: #a3161c; }
table.do-of-tab tr.do-of-sum-s td.do-of-sum-l { border-left: 4px solid #d32f2f; }
table.do-of-tab tr.do-of-sum-x td { padding-top: 2px; font-size: 0.75rem; color: var(--grau); text-align: right; }
/* 13d (22.11.2026): freigegebene Rezepte «Rezept ungeprüft» in den Zeilen grün/rot */
table.do-of-tab tr.do-of-ref .do-of-ref-werk .do-of-ref-ungeprueft { font-weight: 400; font-style: italic; text-decoration: underline dotted; }

/* 16 (Chris 26.11.2026: «offerte senden mit signatur text und versand per email sowie offerte erstellen UNTER das eingabefeld damit man nicht dauernd drüber scrollen muss»):
   «PDF für Offerte erstellen» und «Versand» nach Positionen und Zuschlägen (vorher 3/4 vor dem Raster 5) */
.do-of-fluss .do-of-erstellen { order: 6; }
.do-of-fluss > .do-of-versand-karte { order: 7; }
