/* ================= 2.0: Module umschalten + Leadmanagement ================= */
.module-wahl { display: inline-flex; flex: none; background: var(--side); border-radius: 22px; padding: 3px; gap: 2px; }
.module-wahl a { color: var(--side-ink); text-decoration: none; padding: 7px 14px; border-radius: 18px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.module-wahl a:hover { background: #343434; }
.module-wahl a.an { background: var(--gold); color: #1b1b1b; }
a.btn { text-decoration: none; display: inline-block; }
.nur-handy { display: none; }
.gold-text { color: var(--gold-dark); } .rot { color: var(--bad); } .ok-text { color: var(--ok); }
.auswahl { width: auto; padding: 7px 10px; border-radius: 20px; } .auswahl.klein { font-size: 13px; padding: 4px 8px; margin-top: 4px; }
.reiter.klein { margin-bottom: 0; } .reiter.klein a { padding: 6px 13px; font-size: 13px; cursor: pointer; }
.chip.gross { padding: 8px 16px; font-size: 14px; text-decoration: none; color: var(--ink); background: #f1efe9; }

.lead-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.lead-kpis.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-k { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.card.kpi-k + .card.kpi-k { margin-top: 0; }
.kpi-k > span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi-k > b { font-size: 30px; font-weight: 400; color: var(--gold-dark); line-height: 1.15; }
.kpi-k > small { font-size: 12px; color: var(--muted); }
.kpi-k.voll > b { color: var(--bad); }
.lead-start { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.lead-start .card + .card { margin-top: 0; }
.score { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.score small { display: block; color: var(--muted); font-size: 12px; } .score > span { font-size: 22px; color: var(--gold-dark); }
.score.gesamt { background: var(--gold-soft); border-radius: 8px; padding: 10px 12px; margin: 10px 0; border: 0; }

.lead-zeile { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px;
  border-radius: 10px; background: #f8f7f4; margin-top: 8px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.lead-zeile:hover { border-color: var(--gold); background: #fff; }
.lead-zeile.faellig { border-left: 4px solid var(--bad); }
.lead-zeile small { display: block; color: var(--muted); font-size: 12px; }
.lz-chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.spalte { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; min-height: 300px; }
.spalte-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.karte { display: block; background: #f8f7f4; border-radius: 10px; padding: 10px 12px; margin-top: 8px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.karte:hover { border-color: var(--gold); background: #fff; }
.karte.faellig { border-left: 4px solid var(--bad); }
.karte small { display: block; color: var(--muted); margin-bottom: 6px; } .karte .row { gap: 4px; }

.lead-kopf { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; margin-bottom: 14px; }
.lead-kopf h1 { margin: 0; font-size: 22px; } .lead-kopf small { color: var(--muted); }
.zurueck { font-size: 22px; text-decoration: none; color: var(--ink); width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.lk-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; } .lk-aktionen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lead-raster { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.lead-links .card + .card, .lead-rechts .card + .card { margin-top: 16px; }
.lead-raster h2 small { font-size: 13px; font-weight: 400; }
.mp-zahlen { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.mp-zahlen > div { background: #f8f7f4; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mp-zahlen span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mp-zahlen b { font-size: 19px; } .mp-zahlen b.klein { font-size: 14px; } .mp-zahlen small { font-size: 11px; color: var(--muted); }
.mp-zahlen .gut b { color: var(--ok); } .mp-zahlen small.rot { color: var(--bad); }
.mp-zahlen .mp-links { justify-content: center; gap: 6px; font-size: 13px; }
.marktlage { margin-top: 10px; background: #fcfaf6; border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.lead-reiter { margin: 10px 0 14px; }
.abschnitt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--info); margin: 14px 0 8px; }
.pruef-raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.pruef > span { font-size: 13px; }
.pruef.leer-feld input, .pruef.leer-feld textarea { background: #fdf5f3; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg button { border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button.an { background: var(--gold); border-color: var(--gold); font-weight: 600; }
.seg button:disabled { cursor: default; opacity: .75; }
.kalk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; }
.maengel, .kalkulation { background: #fafaf8; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.mangel { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.mangel b { color: var(--bad); white-space: nowrap; } .mangel.summe { background: #fde8e8; border-radius: 8px; padding: 8px 10px; margin-top: 8px; border: 0; }
.mangel .x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.kz { display: grid; grid-template-columns: minmax(0, 1fr) auto 110px; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid #eee; font-size: 14px; }
.kz small { color: var(--gold-dark); font-size: 12px; } .kz b { text-align: right; }
.kz-in { padding: 4px 8px; text-align: right; background: #fff8ec; border-color: #e2c999; }
.preise { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.preis { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; display: flex; flex-direction: column; }
.preis span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); } .preis b { font-size: 20px; } .preis small { font-size: 11px; color: var(--muted); }
.preis.an { border: 2px solid var(--ok); background: #f4faf4; } .preis.an b { color: var(--ok); }
.dropzone.klein { padding: 16px; } .dropzone.klein .ico { font-size: 28px; }
.verk-name { font-size: 18px; display: block; margin: 6px 0 2px; }
.verk-tel { display: block; font-size: 20px; font-weight: 700; color: var(--gold-dark); text-decoration: none; margin-bottom: 4px; }
.wv-box { margin-top: 10px; background: var(--gold-soft); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.wv-box.bad { background: #fde8e8; color: var(--bad); }
.verlauf-liste { max-height: 520px; overflow-y: auto; margin: 6px -4px 10px; padding: 0 4px; }
.vl { border-left: 3px solid var(--line); padding: 4px 0 8px 10px; margin-bottom: 6px; }
.vl.ok { border-left-color: var(--ok); } .vl.bad { border-left-color: var(--bad); } .vl.status { border-left-color: var(--info); }
.vl small { display: block; color: var(--muted); font-size: 11px; } .vl b { font-size: 13px; color: var(--info); } .vl.ok b { color: var(--ok); } .vl.bad b { color: var(--bad); }
.vl-text { font-size: 13px; overflow-wrap: anywhere; }
.notiz-zeile { flex-wrap: nowrap; } .notiz-zeile input { flex: 1; min-width: 0; }
.kontakt-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

.spalten2.breit-links { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.saeulen { display: flex; gap: 10px; height: 170px; align-items: flex-end; margin: 14px 0 22px; border-bottom: 1px solid var(--line); }
.saeule { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; justify-content: center; }
.s-stapel { width: 60%; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 0; }
.s-stapel i { display: block; min-height: 0; }
.s1 { background: #8c6a3d; } .s2 { background: #2f86b8; } .s3 { background: #e7d3ae; }
.saeule em { position: absolute; left: 10%; right: 10%; border-top: 2px dashed var(--ink); }
.saeule small { position: absolute; bottom: -20px; font-size: 11px; color: var(--muted); }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.vgl { display: grid; grid-template-columns: 130px minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.vgl-bar { position: relative; height: 10px; background: #eee; border-radius: 5px; }
.vgl-bar i { display: block; height: 100%; background: var(--gold); border-radius: 5px; }
.vgl-bar em { position: absolute; top: -4px; bottom: -4px; border-left: 2px solid var(--ink); }
.vgl b { text-align: right; }
.dran { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.dran-k { border-radius: 10px; padding: 12px 14px; background: #f4f2ee; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); }
.dran-k > b { font-size: 30px; font-weight: 400; } .dran-k > span { font-weight: 600; font-size: 14px; }
.dran-k.bad { background: #fde8e8; } .dran-k.bad > b { color: var(--bad); }
.dran-k.warn { background: #fff3e0; } .dran-k.warn > b { color: var(--warn); }
.dran-k.ok { background: #e6f3e7; } .dran-k.ok > b { color: var(--ok); }
.phase-zeile { display: grid; grid-template-columns: 150px minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; }
.stapel { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: #eee; min-width: 4px; }
.stapel i { display: block; } .phase-zeile b { text-align: right; }
.team-zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.team-zahlen > div { background: #f8f7f4; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.team-zahlen span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); } .team-zahlen b { font-size: 24px; font-weight: 400; }
.punkt-farbe { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
table.margen input { padding: 5px 8px; max-width: 120px; }
tr.ueberschneidung td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.einst-raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.einst-raster .card + .card { margin-top: 0; }
.einst-zeile { padding: 5px 0; border-bottom: 1px solid #eee; font-size: 14px; gap: 6px; flex-wrap: nowrap; }
.einst-scroll { max-height: 560px; overflow-y: auto; }
.md-hilfe ol li { margin: 8px 0; }

@media (max-width: 1100px) {
  .lead-raster { grid-template-columns: 1fr; }
  .mp-zahlen { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pruef-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .einst-raster, .dran { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .topbar { grid-template-areas: "menue marke sprache" "module module module" "ordner ordner ordner"; }
  .module-wahl { grid-area: module; justify-self: start; background: #2a2a2a; }
  .lead-kpis, .lead-kpis.drei { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lead-start, .kalk, .spalten2.breit-links, .einst-raster, .dran, .team-zahlen { grid-template-columns: 1fr; }
  .lead-kopf { grid-template-columns: auto minmax(0, 1fr); }
  .lk-chips, .lk-aktionen { grid-column: 1 / -1; justify-content: flex-start; }
  .nur-handy { display: inline-block; text-decoration: none; font-size: 14px; padding: 5px 12px; }
  .mp-zahlen { grid-template-columns: 1fr 1fr; }
  .pruef-raster { grid-template-columns: 1fr; }
  .lead-zeile { grid-template-columns: 1fr; } .lz-chips { justify-content: flex-start; }
  .kanban { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; } .spalte { scroll-snap-align: start; }
  .preise { grid-template-columns: 1fr; } .kz { grid-template-columns: minmax(0, 1fr) 100px; } .kz small { display: none; }
  .vgl, .phase-zeile { grid-template-columns: 110px minmax(0, 1fr) 34px; }
}
@media print { .module-wahl { display: none !important; } }
.checks label.reifen-rolle select { width: auto; padding: 3px 6px; font-size: 13px; }

/* 2.1 Team & Pipelines (Einstellungen) */
.team-tabelle input.tv-nr { width: 150px; max-width: 100%; }
.team-tabelle tr.gedimmt td { opacity: .55; }
.team-tabelle tr.gedimmt td:nth-child(2), .team-tabelle tr.gedimmt td:nth-child(3) { opacity: 1; }
label.haken { display: inline-flex; align-items: center; gap: 6px; flex-direction: row; margin: 0; font-weight: 400; white-space: nowrap; }
label.haken input { width: auto; margin: 0; }
#teamKarte select.auswahl { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
