/* Dunkles Design – 10/2026 überarbeitet: fast schwarz mit Grünstich, Karten heller abgesetzt
   (Kontraste geprüft auf Karten: Text 15,5:1, Grautext 7,6:1, Grün 9,2:1, Button-Text 5,1:1) */
:root {
  color-scheme: dark;
  --bg: #0b100e;
  --surface: #131b18;
  --surface-2: #1a2420;
  --hover: rgba(255, 255, 255, .035);
  --text: #edf2f0;
  --muted: #9eaea8;
  --line: #26332e;
  --brand: #4fd1a5;          /* grüne Schrift, Links, Akzente */
  --brand-btn: #0f7c64;      /* Hintergrund der Buttons (weiße Schrift) */
  --brand-btn-hover: #0c6956;
  --brand-dark: #8ee6c8;
  --brand-soft: rgba(60, 200, 156, .14);
  --warn-soft: rgba(245, 199, 106, .12);
  --warn: #f5c76a;
  --err-soft: rgba(255, 143, 143, .12);
  --err: #ff9a9a;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85em; }

/* Kopfzeile */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--text); }
.logo span { color: var(--brand); }
nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
nav a, nav button.link { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font: inherit; }
nav a:hover, nav button.link:hover { background: var(--bg); }
nav a.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
button.link { background: none; border: 0; cursor: pointer; }
form.inline { display: inline; }

main { padding: 24px 16px 48px; }
.footer { color: var(--muted); font-size: .8rem; padding-bottom: 24px; }

/* Bausteine */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.narrow { max-width: 520px; margin: 0 auto 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid .card { margin: 0; }
.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0 8px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.btn { display: inline-block; background: var(--brand-btn); color: #fff; border: 1px solid var(--brand-btn); padding: 10px 18px; border-radius: 8px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--brand-btn-hover); }
.btn-ghost { background: transparent; color: var(--brand); border-color: rgba(60, 200, 156, .45); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-small { padding: 6px 12px; font-size: .9rem; }

.badge { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); font-weight: 600; }
.badge-fresh { background: var(--brand-soft); color: var(--brand-dark); }
.badge-mid { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }
.hint { font-size: .8rem; color: var(--warn); }
.masked { font-family: ui-monospace, Menlo, monospace; color: var(--muted); letter-spacing: .5px; white-space: nowrap; }
.phone { font-weight: 700; white-space: nowrap; }
.sold { color: var(--muted); font-weight: 600; }
.sold-own { color: var(--brand); font-weight: 700; white-space: nowrap; }
.price { font-size: 1.6rem; font-weight: 800; color: var(--brand); }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.flash-ok { background: var(--brand-soft); color: var(--brand-dark); }
.flash-err { background: var(--err-soft); color: var(--err); }
.flash-info { background: var(--warn-soft); color: var(--warn); }

/* Formulare */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.form label .muted { font-weight: 400; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
legend { font-weight: 600; padding: 0 4px; }
label.check { flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 400 !important; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; background: var(--surface); }
table.leads { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.action { text-align: right; vertical-align: middle; }
tr.is-sold td { color: var(--muted); background: rgba(0, 0, 0, .12); }
tr.detail td { background: var(--surface-2); font-size: .9rem; }
table.simple td, table.simple th { padding: 8px; }

/* Qualifizierte Leads */
.lead-card { display: flex; flex-direction: column; gap: 6px; }
.lead-card.is-sold { opacity: .6; }
.lead-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lead-card .desc { margin: 6px 0; }
.termine { background: var(--bg); padding: 10px; border-radius: 8px; font-size: .92rem; }
.lead-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.hero { max-width: 760px; margin: 24px auto; text-align: center; }
.hero h1 { font-size: 2rem; }
.hero .card { text-align: left; }
.stats { list-style: none; padding: 0; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.stat strong { font-size: 1.4rem; }

/* Handy: Tabellenzeilen als Karten */
@media (max-width: 760px) {
  table.leads, table.leads tbody, table.leads tr, table.leads td { display: block; width: 100%; }
  table.leads thead { display: none; }
  table.leads { border: 0; background: none; }
  table.leads tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 8px 0; }
  table.leads td { border: 0; padding: 4px 14px; }
  table.leads td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
  td.action { text-align: left; padding-top: 8px !important; }
  table.simple { display: block; overflow-x: auto; }
  .hero h1 { font-size: 1.5rem; }
}

/* Testmodus */
.testbanner { background: #241f0f; color: #ffd76a; text-align: center; font-size: .85rem; padding: 6px 16px; }
.testbanner a { color: #fff; }
.testbox { border: 2px dashed rgba(224, 184, 74, .6); background: rgba(224, 184, 74, .06); }
.test-accounts { display: flex; flex-direction: column; gap: 8px; }
.test-accounts .btn { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 8px; }
.test-accounts .btn .small { font-weight: 400; opacity: .85; }

/* Qualifizierte Leads: klickbare Karten + Detailseite */
.lead-card-link { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.lead-card-link:hover h3 { color: var(--brand); }
.lead-card-link .more { color: var(--brand); font-weight: 600; font-size: .9rem; }
.detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.buybox { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 8px; }
.btn-block { display: block; text-align: center; width: 100%; }
.big-phone { font-size: 1.3rem; }
.kunde { font-size: 1.1rem; font-weight: 700; }
.desc-full { white-space: normal; line-height: 1.6; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--bg); border-radius: 8px; border: 1px solid var(--line); display: block; }
.gallery-small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); margin: 8px 0; }
.img-edit { display: flex; flex-direction: column; gap: 4px; font-weight: 400 !important; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) {
  .detail-layout { grid-template-columns: 1fr; }
  .buybox { position: static; }
  .form-2 { grid-template-columns: 1fr; }
}

/* Gebrauchtgeräte */
.badge-blue { background: rgba(57, 135, 229, .16); color: #9cc3f5; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.product-link { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; height: 100%; }
.product-link:hover h3 { color: var(--brand); }
.product-link .more { color: var(--brand); font-weight: 600; font-size: .9rem; margin-top: auto; }
.product-img { margin: -20px -20px 8px; height: 200px; background: var(--bg); border-radius: var(--radius) var(--radius) 0 0;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: contain; }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.uvp { color: var(--muted); text-decoration: line-through; }
.save { color: var(--err); font-weight: 700; }
.dot { margin: 0 6px; color: var(--muted); }
.section-gap { margin-top: 24px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; background: var(--bg); padding: 1px 6px; border-radius: 4px; }
.radio-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; font-weight: 400; }
.radio-opt input { margin-top: 4px; }
.radio-opt > span { display: flex; flex-direction: column; }
.form label.radio-opt { flex-direction: row; gap: 10px; font-weight: 400; }
input[type=radio], input[type=checkbox] { padding: 0; width: auto; flex: none; }
.radio-opt > span > strong { display: block; }

/* Qualifizierte Leads: Liste + Detail-Fenster rechts */
table.clickable tbody tr { cursor: pointer; }
table.clickable tbody tr:hover td { background: var(--hover); }
table.clickable tbody tr.active td { background: var(--brand-soft); }
.row-link { color: inherit; text-decoration: none; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface); z-index: 21;
  box-shadow: -8px 0 32px rgba(0, 0, 0, .12); transform: translateX(100%); transition: transform .2s ease;
  overflow-y: auto; padding: 24px; visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: var(--bg); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--text); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-right: 40px; }
.panel-head h2 { margin: 0; font-size: 1.35rem; }
.panel-call { display: flex; flex-direction: column; background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 14px 0 4px; }
.panel-call strong { font-size: 1.05rem; }
.drawer h3, .narrow-wide h3 { margin: 18px 0 6px; }
.panel-buy { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.narrow-wide { max-width: 760px; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }

/* Übersicht: Kennzahlen (Farben Leads/Qualifiziert geprüft: farbenblind-sicher, alle Checks bestanden) */
:root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; }   /* Dunkel-Stufen, geprüft */
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.sw.s1 { background: var(--series-1); }
.sw.s3 { background: var(--series-3); }
.sw.s2 { background: var(--series-2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpis .card { margin: 0; }
.kpi { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
a.kpi:hover { border-color: var(--brand); }
.kpi-label { color: var(--muted); font-weight: 600; font-size: .9rem; }
.kpi-value { font-size: 2.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.up { color: var(--brand); font-weight: 700; }
.down { color: var(--err); font-weight: 700; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; color: var(--text); margin-bottom: 6px; }
/* Übersicht: Karte */
.map-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.map-head h2 { margin: 0; }
.map { height: 480px; border-radius: 8px; border: 1px solid var(--line); z-index: 0; }
.map-note { margin: 8px 0 0; }
.sw.round { border-radius: 50%; }
.sw.ring { border-radius: 50%; background: rgba(217, 89, 38, .25); border: 2px solid var(--series-2); width: 12px; height: 12px; }
.leaflet-popup-content { font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
@media (max-width: 760px) { .map { height: 380px; } }

/* Token-Pakete */
.token-badge { background: var(--brand-soft); color: var(--brand-dark) !important; font-weight: 700; border-radius: 99px !important; padding: 6px 12px !important; white-space: nowrap; }
.token-badge.empty { background: var(--warn-soft); color: var(--warn) !important; }
.paket-stand { display: flex; flex-direction: column; gap: 6px; }
.kpi-of { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.progress { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.pakete { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 16px; }
.pakete .card { margin: 0; }
.paket { position: relative; display: flex; flex-direction: column; gap: 6px; }
.paket.highlight { border: 2px solid var(--brand); }
.paket-tag { position: absolute; top: -11px; right: 16px; }
.paket-list { margin: 6px 0 10px; padding-left: 18px; color: var(--text); }
.paket .btn { margin-top: auto; }
.token-form input[name=anzahl] { width: 80px; }
.token-form input[name=notiz] { width: 120px; }

/* Umschalter (Zeitraum) */
.segmented { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 2px; }
.segmented label { padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: .9rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.segmented label.on { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.segmented label:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.segmented button { padding: 6px 12px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .9rem; color: var(--muted); font-weight: 600; border: 0; background: none; }
.segmented button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }

/* Seitenweise Listen */
.per-page { display: flex; align-items: center; gap: 8px; }
.segmented a { padding: 6px 12px; border-radius: 6px; font-size: .9rem; color: var(--muted); font-weight: 600; text-decoration: none; }
.segmented a.on { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.pagination { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pagination .pages { display: flex; gap: 4px; align-items: center; }
.pagination .page { min-width: 32px; text-align: center; padding: 5px 8px; border-radius: 6px; text-decoration: none; color: var(--text); font-weight: 600; }
.pagination a.page:hover { background: var(--bg); }
.pagination .page.on { background: var(--brand-btn); color: #fff; }
.btn.disabled { opacity: .4; pointer-events: none; }

/* Admin: Techniker-Auswertung */
.contact { margin: 6px 0 14px; }
.mini-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.mini-kpis > div { background: var(--bg); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mini-kpis strong { font-size: 1.5rem; line-height: 1.2; }
.mini-kpis .kpi-of { font-size: .9rem; }
.panel-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
table.compact td, table.compact th { padding: 5px 6px; font-size: .9rem; }
.bar-cell { width: 40%; }
.databar { display: block; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.databar i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--series-1); }
.panel-paket { background: var(--bg); border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; }
.panel-paket .kpi-value { font-size: 1.6rem; }
.panel-form { margin: 8px 0; }
@media (max-width: 520px) { .mini-kpis, .panel-2 { grid-template-columns: 1fr; } }

/* Kopfzeile: Token-Stand + Menü-Knopf (Handy) */
.topbar-right { display: flex; align-items: center; gap: 8px; order: 3; }
.topbar-inner nav { order: 2; }
.menu-btn { display: none; font: inherit; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; }
@media (max-width: 760px) {
  .topbar-inner { min-height: 56px; gap: 8px; }
  .menu-btn { display: inline-block; }
  .topbar.has-menu .topbar-inner nav { display: none; }
  .topbar-inner nav { order: 4; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding-bottom: 10px; }
  .topbar.has-menu.menu-open .topbar-inner nav { display: flex; }
  .topbar:not(.has-menu) .topbar-inner nav { width: auto; flex-direction: row; padding-bottom: 0; order: 2; }
  .topbar:not(.has-menu) .topbar-inner nav a { width: auto; padding: 8px 10px; }
  .topbar-inner nav a, .topbar-inner nav button.link { padding: 12px; font-size: 1.05rem; text-align: left; width: 100%; }
  .topbar-inner nav form.inline { display: block; }
  main { padding-top: 16px; }
  .page-head h1 { font-size: 1.4rem; }
  .btn, input, select, textarea { font-size: 16px; }  /* verhindert Auto-Zoom in iOS-Formularen */
}
/* Als App vom Home-Bildschirm: Platz für den Home-Balken unten */
.footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.lan-hint { margin: 12px 0 0; }
.lan-hint strong { overflow-wrap: anywhere; }
.test-accounts .btn { white-space: normal; flex-wrap: wrap; }
.token-badge { text-decoration: none; }
@media (max-width: 760px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpis .kpi:has(.progress) { grid-column: 1 / -1; }
  .kpi-value { font-size: 2.1rem; }
}

/* Startseite: Begrüßung + heutiger Stand */
:root { --c-mine: #199e70; --c-other: #55645f; --c-open: #9085e9; }   /* Dunkel-Stufen, geprüft */
.greeting { background: linear-gradient(135deg, #17382e 0%, var(--surface) 60%); }
.greeting-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.greeting h1 { font-size: 1.8rem; margin: 2px 0 4px; }
.greeting p { margin: 0; }
.greeting-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.greeting-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.greeting-stats a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; color: inherit; text-decoration: none; }
.greeting-stats a:hover { border-color: var(--brand); }
.standbar { display: flex; gap: 2px; height: 18px; border-radius: 6px; overflow: hidden; background: var(--bg); }
.standbar span { display: block; min-width: 6px; }
.c-mine { background: var(--c-mine); } .c-other { background: var(--c-other); } .c-open { background: var(--c-open); }
.standbar-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 10px; }
.standbar-legend div { display: flex; align-items: center; gap: 6px; }
.standbar-legend strong { font-size: 1.15rem; }
@media (max-width: 760px) {
  .greeting h1 { font-size: 1.45rem; }
  .greeting-tools { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .greeting-stats .kpi-value { font-size: 1.9rem; }
}

/* Hinweise bei neuen Leads */
.toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100% - 32px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; background: #22332e; border: 1px solid rgba(255, 255, 255, .12); color: #fff; padding: 12px 12px 12px 14px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); animation: toast-in .25s ease; }
.toast a { color: #fff; text-decoration: none; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.toast a span { color: #c9d1da; font-size: .9rem; }
.toast button { background: none; border: 0; color: #c9d1da; font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.toast-dot { width: 10px; height: 10px; border-radius: 50%; background: #2fd39b; margin-top: 6px; flex: none; box-shadow: 0 0 0 4px rgba(47, 211, 155, .25); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* Neues Design (/start2) – dunkle Kopfzeile, kompakte Kacheln. Farben auf dunklem Grund geprüft. */
.m-dash { --m-bg: #111916; --m-tile: rgba(255, 255, 255, .06); --m-line: rgba(255, 255, 255, .10); --m-text: #f3f6f5; --m-muted: #a9b8b3;
  --m-1: #3987e5; --m-2: #d95926; --m-3: #199e70; }
.m-hero { background: radial-gradient(1200px 400px at 10% -20%, #1b4a3c 0%, transparent 60%), linear-gradient(160deg, #121c19 0%, #0b100e 100%);
  color: var(--m-text); border-radius: 20px; padding: 24px; margin-bottom: 16px; }
.m-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.m-date { color: var(--m-muted); font-size: .9rem; text-transform: capitalize; }
.m-switch { color: var(--m-muted); font-size: .85rem; }
.m-hero h1 { font-size: 2rem; letter-spacing: -.02em; margin: 10px 0 4px; }
.m-sub { color: #d5dfdb; margin: 0; }
.m-sub strong { color: #fff; }
.m-hero-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.m-chip { background: var(--m-tile); color: var(--m-text); border: 1px solid var(--m-line); border-radius: 99px; padding: 7px 14px; font: inherit; font-size: .88rem; cursor: pointer; }
.m-chip:disabled { opacity: .7; cursor: default; }
.m-hero-tools .muted { color: var(--m-muted) !important; }
.m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.m-tile { background: var(--m-tile); border: 1px solid var(--m-line); border-radius: 16px; padding: 14px 16px; color: var(--m-text); text-decoration: none;
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; backdrop-filter: blur(6px); transition: border-color .15s, transform .15s; }
.m-tile:hover { border-color: rgba(255, 255, 255, .28); transform: translateY(-1px); }
.m-tile-ring { flex-direction: row; align-items: center; justify-content: space-between; }
.m-tile-ring > div { display: flex; flex-direction: column; gap: 4px; }
.m-label { color: var(--m-muted); font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.m-num { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.m-num small { font-size: 1rem; color: var(--m-muted); font-weight: 600; }
.m-foot { color: var(--m-muted); font-size: .82rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.d1 { background: var(--m-1); } .dot.d2 { background: var(--m-2); }
.spark { width: 100%; height: 44px; margin-top: 6px; }
.spark-line { fill: none; stroke: var(--m-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-end { fill: var(--m-1); stroke: var(--m-bg); stroke-width: 2; }
.spark-hit { fill: transparent; }
.ring { width: 76px; height: 76px; flex: none; }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 8; }
.ring-val { fill: none; stroke-width: 8; stroke-linecap: round; }
.ring-val.r1 { stroke: var(--m-3); } .ring-val.r2 { stroke: var(--m-1); }
.ring-text { fill: var(--m-text); font-size: 15px; font-weight: 700; }
.m-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.m-area { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.m-area strong { font-size: 1.05rem; margin-right: auto; }
.m-area span { color: var(--muted); font-size: .9rem; } .m-area b { color: var(--text); font-size: 1.1rem; }
.m-links { display: flex; gap: 8px; flex-wrap: wrap; }
.m-links a { padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; font-size: .9rem; }
@media (max-width: 760px) {
  .m-hero { padding: 18px; border-radius: 16px; margin-left: -4px; margin-right: -4px; }
  .m-hero h1 { font-size: 1.6rem; }
  .m-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .m-tile { padding: 12px; }
  .m-num { font-size: 2rem; }
  .m-tile-ring { grid-column: 1 / -1; }
}


/* Dunkles Design: Karten-Kacheln abdunkeln, Popups bleiben hell und gut lesbar */
.map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.5); }
.map.leaflet-container { background: #0e1513; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #1f2e2a; color: var(--text); box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
.leaflet-popup-content a { color: var(--brand); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-bar a { background: #1f2e2a; color: var(--text); border-bottom-color: var(--line); }
.leaflet-control-attribution { background: rgba(11, 16, 14, .8) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--muted); }
.topbar { background: rgba(19, 27, 24, .9); backdrop-filter: blur(8px); }
.card { border-color: var(--line); }
.product-img, .lead-thumb { background: #0e1513; }

/* Karte auf- und zuklappbar */
.map-card { padding: 0; overflow: hidden; }
.map-card > :not(summary) { margin-left: 20px; margin-right: 20px; }
.map-card > .map-note { margin-bottom: 16px; }
.map-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
.map-summary::-webkit-details-marker { display: none; }
.map-summary h2 { margin: 0; }
.map-toggle { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); position: relative; flex: none; }
.map-toggle::after { content: ''; position: absolute; left: 11px; top: 9px; width: 7px; height: 7px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.map-card[open] .map-toggle::after { transform: rotate(-135deg); top: 13px; }
.map-card .map-head { margin-bottom: 10px; }
.m-dash .map-card { margin-bottom: 16px; border-radius: 16px; }
@media (max-width: 760px) {
  .map-card > :not(summary) { margin-left: 12px; margin-right: 12px; }
  .map-summary { padding: 14px 12px; }
}

/* ===== Helles Design (Umschalter auf der Startseite, pro Benutzer gespeichert) ===== */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --hover: #f3f8f6;
  --text: #1c2430;
  --muted: #5f6773;
  --line: #e3e6ea;
  --brand: #0f6e5a;
  --brand-btn: #0f6e5a;
  --brand-btn-hover: #0b5546;
  --brand-dark: #0b5546;
  --brand-soft: #e3f3ee;
  --warn-soft: #fff4dc;
  --warn: #8a5a00;
  --err-soft: #fde8e8;
  --err: #a32020;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --c-mine: #1baf7a; --c-other: #b8bec6; --c-open: #4a3aa7;
}
[data-theme="light"] .btn-ghost { border-color: var(--brand); }
[data-theme="light"] .topbar { background: rgba(255, 255, 255, .94); }
[data-theme="light"] .testbanner { background: #2b2f36; }
[data-theme="light"] .testbox { border-color: #e0b84a; background: #fffcf2; }
[data-theme="light"] .badge-blue { background: #e6eefb; color: #1f4f9a; }
[data-theme="light"] tr.is-sold td { background: #fafafa; }
[data-theme="light"] .greeting { background: linear-gradient(135deg, #f1faf6 0%, #ffffff 60%); }
[data-theme="light"] .drawer-backdrop { background: rgba(20, 28, 38, .25); }
[data-theme="light"] .segmented label.on, [data-theme="light"] .segmented button.on, [data-theme="light"] .segmented a.on {
  background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
[data-theme="light"] .map .leaflet-tile-pane { filter: none; }
[data-theme="light"] .map.leaflet-container { background: #e9ecef; }
[data-theme="light"] .leaflet-popup-content-wrapper, [data-theme="light"] .leaflet-popup-tip { background: #fff; color: var(--text); }
[data-theme="light"] .leaflet-bar a { background: #fff; color: #1c2430; }
[data-theme="light"] .leaflet-control-attribution { background: rgba(255, 255, 255, .8) !important; }
[data-theme="light"] .product-img, [data-theme="light"] .lead-thumb { background: var(--bg); }
/* Startseite im hellen Design */
[data-theme="light"] .m-dash { --m-bg: #ffffff; --m-tile: #ffffff; --m-line: #e3e6ea; --m-text: #1c2430; --m-muted: #5f6773;
  --m-1: #2a78d6; --m-2: #eb6834; --m-3: #1baf7a; }
[data-theme="light"] .m-hero { background: radial-gradient(1200px 400px at 10% -20%, #d9f1e8 0%, transparent 60%), linear-gradient(160deg, #f1faf6 0%, #ffffff 100%);
  border: 1px solid var(--line); }
[data-theme="light"] .m-sub { color: #3a4450; }
[data-theme="light"] .m-sub strong { color: var(--text); }
[data-theme="light"] .m-tile:hover { border-color: var(--brand); }
[data-theme="light"] .ring-track { stroke: rgba(0, 0, 0, .08); }

/* Umschalter Hell/Dunkel */
.theme-switch { display: inline-flex; background: var(--m-tile, var(--surface-2)); border: 1px solid var(--m-line, var(--line)); border-radius: 99px; padding: 3px; }
.theme-switch button { border: 0; background: none; color: var(--m-muted, var(--muted)); font: inherit; font-size: .85rem; font-weight: 600;
  padding: 5px 12px; border-radius: 99px; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--brand-btn); color: #fff; }

/* Bearbeitungsstand gekaufter Leads */
.status-form select { padding: 6px 8px; font-size: .9rem; border-radius: 8px; }
.status-form select.status-neu { border-color: var(--warn); }
.status-form select.status-erledigt { border-color: var(--brand); }
.m-hero-right { display: flex; align-items: center; gap: 12px; }

/* ===== Admin: Auswertung ===== */
:root { --seg-a: #199e70; --seg-v: #3987e5; --seg-o: #3a4a45; --seg-o2: #6f8d85; }
:root[data-theme="light"] { --seg-a: #1baf7a; --seg-v: #2a78d6; --seg-o: #d3d8dd; --seg-o2: #8b96a3; }
.seg-a { fill: var(--seg-a); background: var(--seg-a); }
.seg-v { fill: var(--seg-v); background: var(--seg-v); }
.seg-o { fill: var(--seg-o); background: var(--seg-o); }
.seg-o2 { fill: var(--seg-o2); background: var(--seg-o2); }
.chart-wrap { position: relative; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .grid.base { stroke: var(--muted); stroke-opacity: .5; }
svg.chart .axis { fill: var(--muted); font-size: 11px; }
svg.chart .hit { fill: transparent; cursor: pointer; }
svg.chart .hit.hover { fill: rgba(127, 127, 127, .08); }
.tooltip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); padding: 8px 10px; font-size: .85rem; white-space: nowrap; z-index: 2; color: var(--text); }
.aw-filter { display: flex; flex-direction: column; gap: 10px; }
.aw-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wrap-seg { flex-wrap: wrap; }
.aw-date { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.aw-date input { padding: 6px 8px; }
.aw-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
.aw-table tfoot td { font-weight: 700; border-top: 2px solid var(--line); padding: 10px 12px; }
.stackbar { display: flex; gap: 1px; height: 10px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.stackbar i { display: block; height: 100%; }
.aw-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.aw-2 .card { margin-bottom: 16px; }
.databar i.seg-o2 { background: var(--seg-o2); } .databar i.seg-a { background: var(--seg-a); } .databar i.seg-v { background: var(--seg-v); }
svg.hours { max-height: 120px; }
/* Kompakte Auswertung auf der Admin-Startseite */
.m-report { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 16px; }
.m-report-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.m-report-head h2 { margin: 0; }
.m-report-links { display: flex; gap: 14px; font-weight: 600; font-size: .9rem; }
.m-report-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.m-report-grid > div { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.m-report .m-label { color: var(--muted); }
.m-report .m-foot { color: var(--muted); }
.m-num-s { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 760px) {
  .aw-2 { grid-template-columns: 1fr; }
  .m-report-grid { grid-template-columns: 1fr 1fr; }
}

/* Aufklappbare Fenster (Auswertung) */
.fold { padding: 0; }
.fold-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
.fold-head::-webkit-details-marker { display: none; }
.fold-head h2 { margin: 0; }
.fold-head:hover .map-toggle { background: var(--hover); }
.fold[open] .map-toggle::after { transform: rotate(-135deg); top: 13px; }
.fold-body { padding: 0 20px 18px; }
.fold:not([open]) { margin-bottom: 12px; }
.aw-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.aw-3 .card, .aw-2 .card { margin-bottom: 16px; }
.aw-tabelle-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
@media (max-width: 1000px) { .aw-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .aw-3 { grid-template-columns: 1fr; }
  .fold-head { padding: 14px 12px; }
  .fold-body { padding: 0 12px 14px; }
}

/* Einstellungen + eigener Standort auf der Karte */
.settings .card { margin-bottom: 16px; }
.plz-ort { grid-template-columns: 140px 1fr; }
.home-pin { display: flex !important; align-items: center; justify-content: center; background: #fff; color: #0f6e5a; border: 3px solid #0f6e5a;
  border-radius: 50%; font-size: 17px; font-weight: 800; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
@media (max-width: 760px) { .plz-ort { grid-template-columns: 110px 1fr; } }

/* Formular-Beschriftung: Zusatz wie „(optional)“ in derselben Zeile, Eingabefeld darunter */
.form label { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 4px; }
.form label > input, .form label > select, .form label > textarea { flex-basis: 100%; }
.form label.check, .form label.radio-opt { flex-wrap: nowrap; align-items: center; }

/* Admin-Startseite: Monatswert unter dem Tageswert, umschaltbare Auswertung */
.m-month { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--m-line); color: var(--m-muted); font-size: .82rem; }
.m-month b { color: var(--m-text); font-size: 1rem; }
.m-grid-admin { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.m-report-panel .m-report-links { margin-top: 12px; justify-content: flex-end; }
.m-report-panel[hidden] { display: none; }

/* ===== Öffentliche Startseite (Verkaufsseite) ===== */
.lp { display: flex; flex-direction: column; gap: 56px; padding-bottom: 24px; }
.lp-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding: 32px 0 8px; }
.lp-kicker { display: inline-block; font-size: .85rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 5px 12px; border-radius: 99px; }
.lp-hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; letter-spacing: -.03em; margin: 16px 0 14px; }
.lp-lead { font-size: 1.12rem; color: var(--muted); max-width: 560px; margin: 0; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 20px; }
.lp-btn { padding: 13px 22px; font-size: 1.02rem; border-radius: 10px; }
.lp-trust { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lp-trust li { display: flex; align-items: center; gap: 8px; }
.lp svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.lp-hero-visual { position: relative; }
.lp-live { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 14px; margin-bottom: 12px; font-size: .92rem; }
.lp-pulse { width: 10px; height: 10px; border-radius: 50%; background: #2fd39b; box-shadow: 0 0 0 0 rgba(47, 211, 155, .6); animation: lp-pulse 1.8s infinite; }
@keyframes lp-pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 211, 155, .55); } 70% { box-shadow: 0 0 0 10px rgba(47, 211, 155, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 211, 155, 0); } }
.lp-mock { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  transform: rotate(-1.2deg); }
.lp-mock-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 10px; font-weight: 700; }
.lp-mock-row { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 10px; align-items: center; padding: 11px 8px; border-top: 1px solid var(--line); font-size: .92rem; }
.lp-mock-meta { display: flex; flex-direction: column; }
.lp-mock-phone { font-family: ui-monospace, Menlo, monospace; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.lp-mock-foot { text-align: right; color: var(--muted); font-size: .72rem; padding: 6px 6px 0; }
.lp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: stretch; }
.lp-stat-main { grid-column: span 2; }
.lp-stat-main, .lp-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.lp-stat-main { background: linear-gradient(135deg, var(--brand-soft), var(--surface)); }
.lp-stat-num { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.lp-stat-main .lp-stat-num { font-size: 2.6rem; color: var(--brand); }
.lp-stat-note { grid-column: 1 / -1; margin: 0; }
.lp-section { display: flex; flex-direction: column; gap: 20px; }
.lp-h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -.02em; margin: 0; text-align: center; }
.lp-h2-sub { font-size: 1rem; font-weight: 600; }
.lp-center { text-align: center; margin: 0; }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-step, .lp-feature, .lp-type, .lp-pack { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.lp-step-nr { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--brand-btn); color: #fff; font-weight: 800; }
.lp-step h3, .lp-feature h3 { margin: 12px 0 6px; font-size: 1.08rem; }
.lp-step p, .lp-feature p { margin: 0; color: var(--muted); }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-icon { font-size: 1.6rem; }
.lp-types { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin: 0 auto; width: 100%; }
.lp-type ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.lp-type li { display: flex; gap: 8px; align-items: flex-start; }
.lp-type-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lp-type-head h3 { margin: 0; }
.lp-type-price { background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; padding: 4px 12px; border-radius: 99px; }
.lp-type-hl, .lp-pack-hl { border: 2px solid var(--brand); }
.lp-packs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-pack { position: relative; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.lp-pack h3 { margin: 0; }
.lp-pack-price { font-size: 2rem; font-weight: 800; color: var(--brand); }
.lp-pack-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand-btn); color: #fff; font-size: .75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.lp-faq { max-width: 820px; margin: 0 auto; width: 100%; gap: 10px; }
.lp-q { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.lp-q summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-q summary::-webkit-details-marker { display: none; }
.lp-q summary::after { content: '+'; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.lp-q[open] summary::after { content: '–'; }
.lp-q p { margin: 0 0 16px; color: var(--muted); }
.lp-final { text-align: center; background: radial-gradient(900px 300px at 50% -40%, rgba(60, 200, 156, .25), transparent 70%), var(--surface);
  border: 1px solid var(--line); border-radius: 20px; padding: 44px 20px; }
.lp-final h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 8px; }
.lp-final p { color: var(--muted); margin: 0 0 20px; }
@media (prefers-reduced-motion: reduce) { .lp-pulse { animation: none; } .lp-mock { transform: none; } }
@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 12px; }
  .lp-features { grid-template-columns: 1fr 1fr; }
  .lp-packs { grid-template-columns: 1fr 1fr; }
  .lp-stats { grid-template-columns: 1fr 1fr; }
  .lp-stat-main { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .lp { gap: 40px; }
  .lp-steps, .lp-features, .lp-types { grid-template-columns: 1fr; }
  .lp-mock-row { grid-template-columns: 1fr auto; }
  .lp-mock-phone { display: none; }
}
.nw { white-space: nowrap; }
/* Seitenkopf: Titel links, Filter rechts – auf allen Listen-Seiten gleich */
.page-head > div:first-child { flex: 1 1 280px; min-width: 0; }
.page-head > .filters { flex: 0 1 auto; justify-content: flex-end; }

/* Meine Käufe: Detailfenster */
.panel-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.panel-form-edit { margin-top: 6px; }
.panel-call .big-phone a { font-size: 1.15rem; }

/* Feste Spaltenbreiten: Tabellen springen beim Filtern (Heute/24 Std./48 Std./Alle) nicht mehr */
@media (min-width: 761px) {
  table.fixed-cols { table-layout: fixed; }
  table.fixed-cols td, table.fixed-cols th { overflow-wrap: anywhere; }
  table.fixed-cols td.action { white-space: nowrap; }
}
@media (max-width: 760px) { table.fixed-cols colgroup { display: none; } }

/* Abstand zwischen Menü und Seitenüberschrift (main.wrap, da .wrap sonst das Padding auf 0 setzt) */
main.wrap { padding-top: 40px; padding-bottom: 48px; }
@media (max-width: 760px) { main.wrap { padding-top: 24px; } }
table.fixed-cols th { overflow-wrap: normal; word-break: keep-all; }

/* ===== Feinschliff 10/2026: gleiche Formensprache wie die Kunden-Website (runder, weicher, mehr Tiefe) ===== */
:root {
  --radius: 16px;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .18);
  --shadow-hover: inset 0 1px 0 rgba(255, 255, 255, .04), 0 2px 4px rgba(0, 0, 0, .3), 0 16px 36px rgba(0, 0, 0, .28);
  --ring: 0 0 0 4px rgba(60, 200, 156, .18);
  --glow: rgba(60, 200, 156, .09);
}
/* Helles Design: warmes Weiß und Grüntöne wie auf der Website (Grautext 6,2:1 auf Weiß, 5,7:1 auf Hintergrund) */
:root[data-theme="light"] {
  --bg: #f5f6f2;
  --surface-2: #f3f5f2;
  --text: #10201c;
  --muted: #56645f;
  --line: #e1e6e2;
  --shadow: 0 1px 2px rgba(16, 32, 28, .05), 0 8px 28px rgba(16, 32, 28, .07);
  --shadow-hover: 0 2px 4px rgba(16, 32, 28, .06), 0 18px 40px rgba(16, 32, 28, .1);
  --ring: 0 0 0 4px rgba(15, 110, 90, .16);
  --glow: rgba(16, 185, 129, .07);
}
body { font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; background: radial-gradient(1100px 520px at 88% -180px, var(--glow), transparent 65%) no-repeat, var(--bg); }
h1, h2, h3 { letter-spacing: -.02em; }
h1 { font-size: 1.85rem; font-weight: 800; }
h2 { font-weight: 750; }

/* Kopfzeile + Logo */
.topbar { backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); border-bottom-color: rgba(255, 255, 255, .06); }
[data-theme="light"] .topbar { background: rgba(255, 255, 255, .86); border-bottom-color: rgba(16, 32, 28, .08); }
.logo { display: inline-flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.logo .logo-name { color: var(--text); }
.logo .logo-name span { color: var(--brand); }
.logo .logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, #14b083, #0b5c48); box-shadow: 0 4px 12px rgba(15, 124, 100, .35); }
.logo-mark svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
nav a, nav button.link { border-radius: 999px; transition: background .15s, color .15s; }
nav a:hover, nav button.link:hover { background: var(--surface-2); }
.token-badge { box-shadow: inset 0 0 0 1px rgba(60, 200, 156, .25); }
.menu-btn { border-radius: 999px; }

/* Knöpfe: Pillenform, leichter Schatten, hebt sich beim Drüberfahren */
.btn { border-radius: 999px; padding: 10px 20px; transition: transform .12s, background .15s, box-shadow .15s, border-color .15s; }
.btn:not(.btn-ghost) { box-shadow: 0 4px 14px rgba(15, 124, 100, .24); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-small { padding: 6px 12px; }
td .btn:not(.btn-ghost) { box-shadow: none; }
.lp-btn { border-radius: 999px; }
.test-accounts .btn { border-radius: 14px; }

/* Karten, Kacheln, Listen */
.card { box-shadow: var(--shadow); }
a.card, .card.product { transition: transform .15s, box-shadow .15s, border-color .15s; }
a.card:hover, .card.product:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.m-area, .m-report, .m-tile, .lp-step, .lp-feature, .lp-type, .lp-pack, .lp-stat, .lp-stat-main { border-radius: var(--radius); }
.m-area, .m-report { box-shadow: var(--shadow); }
.flash { border-radius: 12px; }
.badge { padding: 3px 9px; }
.drawer { border-radius: 20px 0 0 20px; }
.toast { border-radius: 14px; }
table.leads { border-radius: var(--radius); box-shadow: var(--shadow); }
table.leads tbody tr td { transition: background .12s; }
table.leads tbody tr:not(.detail):hover td { background: var(--hover); }
.segmented { border-radius: 999px; }
.segmented label, .segmented button, .segmented a { border-radius: 999px; }
.theme-switch button { transition: background .15s; }

/* Eingabefelder: weicher Fokus-Ring statt harter Linie */
input, select, textarea { border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand-btn); }
fieldset { border-radius: 12px; }

/* Begrüßung oben: feines Punktraster wie im Kopfbereich der Website */
.m-hero { position: relative; overflow: hidden; border-radius: 24px; }
.m-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 80%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%); }
[data-theme="light"] .m-hero::after { background-image: radial-gradient(rgba(16, 32, 28, .07) 1px, transparent 1px); }
.m-hero > * { position: relative; z-index: 1; }
.m-tile { transition: border-color .15s, transform .15s, box-shadow .15s; }
.m-tile:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .2); }
[data-theme="light"] .m-tile { box-shadow: var(--shadow); }
[data-theme="light"] .m-tile:hover { box-shadow: var(--shadow-hover); }

@media (max-width: 760px) {
  .topbar-inner nav a, .topbar-inner nav button.link { border-radius: 12px; }
  .drawer { border-radius: 0; }
  h1 { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, a.card, .card.product, .m-tile { transition: none; }
  .btn:hover, a.card:hover, .card.product:hover { transform: none; }
}

/* Startseite: mehr Abstand zwischen Hero (Vorteile-Liste) und den Anfrage-Zahlen */
.lp-stats { margin-top: 28px; }
@media (max-width: 600px) { .lp-stats { margin-top: 16px; } }
.row-between > h1 { margin: 0; }

/* Hell/Dunkel-Schalter in der Kopfzeile (immer ganz oben) */
.topbar-right .theme-switch { background: var(--surface-2); border-color: var(--line); }
.topbar-right .theme-switch button { padding: 4px 10px; }
.topbar-right .ts-text { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Häkchen mit längerem Text (z. B. Zustimmung bei der Registrierung): Kästchen links, Text daneben umbrechen */
.form label.check { align-items: flex-start; }
.form label.check > input { flex: none; flex-basis: auto; margin-top: 3px; }
.form label.check > span { flex: 1; min-width: 0; }

/* Handy: Menü als drei Striche neben dem Logo, Hell/Dunkel + Tokens in der Zeile darunter */
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; display: block; }
.menu-btn .mb-close, .menu-open .menu-btn .mb-open { display: none; }
.menu-open .menu-btn .mb-close { display: inline; }
@media (max-width: 760px) {
  .menu-btn { display: grid; place-items: center; width: 44px; height: 40px; padding: 0; order: 1; margin-left: auto; }
  .topbar.has-menu .topbar-right { order: 3; width: 100%; padding-bottom: 10px; }
  .topbar.has-menu .topbar-right .token-badge { margin-left: auto; }
  .topbar.has-menu .topbar-inner nav { order: 4; }
}

/* Hinweis „Als App installieren“ (Handy) */
.install-hint { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 16px; box-shadow: var(--shadow); }
.install-hint[hidden] { display: none; }
.install-hint > img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.install-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: .92rem; }
.install-text span { color: var(--muted); }
.install-text svg { width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.install-text .btn { align-self: flex-start; margin-top: 6px; }
.install-close { background: none; border: 0; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 4px; align-self: flex-start; }
.app-steps { margin: 6px 0 0; padding-left: 20px; }
.app-steps li { margin-bottom: 4px; }

/* Übersicht: Städte-Kästen – heute / diese Woche / dieser Monat untereinander */
.m-area { flex-direction: column; align-items: stretch; gap: 6px; }
.m-area strong { margin: 0 0 4px; }
.m-area-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); }
.m-area-row b { font-variant-numeric: tabular-nums; }

/* Admin-Übersicht: Städte-Kästen wählbar */
.m-area-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.m-area-x { border: 0; background: none; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 8px; }
.m-area-x:hover { background: var(--surface-2); color: var(--text); }
.m-area-add { border-style: dashed; gap: 10px; }
.m-area-add select { width: 100%; }

/* Karte: erneut angerufene Leads (≥ 1 Std. nach dem vorherigen Anruf) in Orange – anders als qualifizierte (rot-oranger Ring) */
:root { --erneut: #f59e0b; }
:root[data-theme="light"] { --erneut: #e08a00; }
.sw.s-erneut { background: var(--erneut); margin-left: 8px; }
/* „Stadt hinzufügen“: alles innerhalb des Kastens halten */
.m-area { min-width: 0; }
.m-area-add input[name=ort] { width: 100%; min-width: 0; }
.m-area-add .segmented { display: flex; width: 100%; }
.m-area-add .segmented label { flex: 1; text-align: center; padding: 6px 4px; }
.m-area-add .btn { width: 100%; }

/* ---------- Gebietsplaner (Admin) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gp-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px 28px; align-items: start; }
.gp-lab { color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.gp-zeitraum { flex-wrap: wrap; max-width: 100%; }
.gp-hint { margin: 8px 0 0; }
.gp-add { display: flex; flex-wrap: wrap; gap: 8px; }
.gp-add #gp-stadt { flex: 1 1 220px; min-width: 0; }
.gp-add #gp-neukm { flex: 0 0 auto; }
.gp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; margin-bottom: 16px; }
.gp-tile { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 14px 16px; }
.gp-tile strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.gp-tile-hl { border-color: var(--brand); background: var(--brand-soft); }
.gp-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.gp-main > .card { margin: 0; min-width: 0; }
@media (max-width: 1100px) { .gp-main, .gp-controls { grid-template-columns: minmax(0, 1fr); } }
.gp-mapcard { position: relative; padding: 10px; }
.gp-map { height: min(72vh, 640px); min-height: 380px; }
.gp-legend { margin: 8px 4px 2px; line-height: 1.8; }
.gp-legend .sw { margin-left: 4px; }
.gp-sw-aus { background: #ffffff; box-shadow: 0 0 0 1px #52606f; margin-left: 12px !important; }
.gp-toast { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); z-index: 500; background: var(--text); color: var(--bg); font-weight: 600; font-size: .9rem;
  padding: 7px 14px; border-radius: 999px; pointer-events: none; opacity: 0; transition: opacity .2s; white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; }
.gp-toast.on { opacity: 1; }
.gp-listhead { margin-bottom: 8px; }
.gp-listhead h2 { margin: 0; }
/* Liste: feste Spaltenbreiten, Name darf umbrechen – nie breiter als die Karte */
.gp-tabelle { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.gp-tabelle th, .gp-tabelle td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.gp-tabelle th { color: var(--muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.gp-tabelle .num { text-align: right; }
.gp-c-km { width: 86px; } .gp-c-n { width: 64px; } .gp-c-x { width: 30px; }
.gp-tabelle select { width: 100%; padding: 5px 4px; font-size: .88rem; }
.gp-tabelle tbody tr[data-k] { cursor: pointer; }
.gp-tabelle tbody tr[data-k]:hover, .gp-tabelle tbody tr.on { background: var(--hover); }
.gp-tabelle tbody tr.on { box-shadow: inset 3px 0 0 var(--brand); }
.gp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.gp-weg { border: 0; background: none; color: var(--muted); font: 700 1.15rem/1 inherit; cursor: pointer; padding: 2px 5px; border-radius: 6px; }
.gp-weg:hover { color: var(--err); background: var(--err-soft); }
.gp-leer { padding: 18px 4px !important; color: var(--muted); line-height: 1.55; }
.gp-leer b { color: var(--text); }
.gp-bars { display: flex; gap: 3px; margin-top: 6px; }
.gp-bar { flex: 1 1 0; max-width: 34px; display: flex; flex-direction: column; }
.gp-bar s { display: flex; align-items: flex-end; height: 24px; text-decoration: none; }
.gp-bar i { display: block; width: 100%; opacity: .35; border-radius: 2px 2px 0 0; }
.gp-bar.on i { opacity: 1; }
.gp-bar em { font-style: normal; font-size: .66rem; color: var(--muted); text-align: center; line-height: 1.3; }
@media (max-width: 600px) { .gp-map { height: 58vh; min-height: 320px; } .gp-c-km { width: 74px; } .gp-c-n { width: 52px; } .gp-tabelle th, .gp-tabelle td { padding: 7px 3px; } }
/* Standort-Mittelpunkt auf der Karte (verschiebbar) */
.gp-mitte span { position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid; box-sizing: border-box; cursor: grab; }
.gp-mitte b { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap; font-size: 12.5px; font-weight: 800; color: #13233f;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; pointer-events: none; }
.klapp-abstand { height: 8px; }


/* Feinschliff dunkles Design 10/2026: Karten mit feiner Lichtkante, Hover etwas deutlicher */
:root:not([data-theme="light"]) { --hover: rgba(255, 255, 255, .045); }
:root:not([data-theme="light"]) .card, :root:not([data-theme="light"]) table.leads { border-color: #22302a; }
:root:not([data-theme="light"]) .card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px rgba(0, 0, 0, .35); }

/* Admin-Lead-Liste: Status links, Käufername darunter */
table.admin-leads td.action { text-align: left; white-space: normal; vertical-align: top; }
table.admin-leads .kaeufer { margin-top: 4px; line-height: 1.3; }
.panel-links { margin-top: 18px; }
/* Gebietsplaner: Städtenamen über den Lead-Punkten (heller Text mit dunklem Rand bzw. im hellen Design umgekehrt) */
.gp-ort span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em; color: #f4f7f6; text-shadow: 0 0 2px #0b100e, 0 0 3px #0b100e, 0 0 6px rgba(11, 16, 14, .9); }
[data-theme="light"] .gp-ort span { color: #13233f; text-shadow: 0 0 2px #fff, 0 0 3px #fff, 0 0 6px rgba(255, 255, 255, .95); }
.gp-map.leaflet-container { background: #0b100e; }
[data-theme="light"] .gp-map.leaflet-container { background: #f7f8f5; }
/* Fläche außerhalb Deutschlands und Landesgrenzen (CSS statt fester Farbe, damit der Hell/Dunkel-Schalter sofort wirkt) */
.gp-maske { fill: #0b100e; }
[data-theme="light"] .gp-maske { fill: #f7f8f5; }
.gp-grenze { stroke: #6f8c82; fill: none; }
[data-theme="light"] .gp-grenze { stroke: #aab4bf; }
[data-theme="light"] .gp-sw-aus { box-shadow: 0 0 0 1.5px #1f2a37; }

/* Nutzungsbedingungen */
.nb h2 { font-size: 1.05rem; margin: 22px 0 6px; }
.nb ol { padding-left: 1.3rem; margin: 0; }
.nb li, .nb p { line-height: 1.6; margin: 0 0 8px; }
.nb-form { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
