/* ============================================================
   w-doo studio – Design-System (ruhig, ein Akzent)
   ============================================================ */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --sidebar: #fbfbfc;
  --ink: #1b2230;
  --muted: #6b7280;
  --faint: #9aa1ad;
  --line: #ebedf1;
  --line-strong: #dde0e6;

  --accent: #5b57eb;          /* w-doo Indigo/Violett – nur Primär-Aktion + aktiver Menüpunkt */
  --accent-ink: #ffffff;
  --accent-soft: #eeeefc;
  --accent-text: #4338ca;

  --pos: #4a9d68;  --pos-soft: #e9f4ec;  --pos-text: #2f7d49;
  --neg: #cf5d57;  --neg-soft: #fbecec;  --neg-text: #b3403a;
  --info: #4f86c6; --info-soft: #eaf1fb; --info-text: #2c5f9e;
  --warm: #cf8a3c; --warm-soft: #fbf0e2; --warm-text: #95591a;
  --neutral: #9aa1ad; --neutral-soft: #eef0f3; --neutral-text: #5b6473;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,25,40,.05), 0 6px 22px rgba(20,25,40,.06);
  --font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 600; margin: 0 0 2px; letter-spacing: -.2px; }
h2 { font-size: 17px; font-weight: 600; margin: 26px 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.muted { color: var(--muted); }

/* ---------- App-Shell: Sidebar + Inhalt ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px;
}
.content { flex: 1; min-width: 0; }
.wrap { max-width: 1060px; margin: 30px auto; padding: 0 30px 60px; }
/* Mobile-Menü-Elemente sind nur auf dem Handy aktiv (s. @media ≤640px) – auf Desktop unsichtbar. */
.nav-cb, .topbar, .nav-overlay { display: none; }

.side-brand { display: flex; align-items: baseline; gap: 6px; padding: 4px 10px 6px; text-decoration: none; }
.side-brand:hover { text-decoration: none; }
.side-brand .wd { color: var(--accent); font-weight: 700; font-size: 20px; letter-spacing: -.5px; }
.side-brand .st { color: var(--faint); font-weight: 500; font-size: 13px; }
.side-brand img { height: 30px; width: auto; }

.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; overflow-y: auto; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase;
  color: var(--faint); padding: 16px 10px 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px;
  color: var(--muted); font-weight: 500; font-size: 14px; text-decoration: none; }
.nav-item:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.9; }
.nav-badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }

.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; text-decoration: none; border-radius: 9px; }
a.side-user:hover { background: var(--bg); text-decoration: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.side-user .nm { font-size: 13px; font-weight: 600; line-height: 1.2; }
.side-user .rl { font-size: 11.5px; color: var(--faint); }
.side-logout { display: flex; align-items: center; gap: 9px; padding: 8px 10px; margin-top: 2px; border-radius: 9px;
  color: var(--muted); font-size: 13px; text-decoration: none; }
.side-logout:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.side-logout svg { width: 17px; height: 17px; }
/* Abmelden ist jetzt ein POST-Button (CSRF-Schutz) statt Link -> Button-Chrome zuruecksetzen, damit er
   optisch 1:1 wie der fruehere Link aussieht (volle Breite, klickbar, gleiche Schrift). */
.side-logout-form { margin: 0; width: 100%; }
button.side-logout { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }

/* ---------- Kopfzeile / generisch ---------- */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.sub { color: var(--muted); margin: 2px 0 0; font-size: 14px; }
.back { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 5px; margin-bottom: 14px; }
.back:hover { color: var(--ink); text-decoration: none; }
.kv { color: var(--muted); font-size: 13.5px; }
.eyebrow { font-size: 13px; color: var(--muted); margin: 0 0 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1; white-space: nowrap;
  transition: filter .12s, background .12s, transform .06s, box-shadow .12s; }
.btn:hover { filter: brightness(1.04); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn svg { width: 16px; height: 16px; stroke-width: 2; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--bg); filter: none; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: var(--surface); color: var(--neg-text); border-color: #ecc9c7; }
.btn.danger:hover { background: var(--neg-soft); filter: none; }
.btn.block { width: 100%; justify-content: center; }
/* Segmentierter Umschalter (Liste / Pipeline) */
.seg { display: inline-flex; }
.seg .btn { border-radius: 0; }
.seg .btn:first-child { border-radius: 8px 0 0 8px; }
.seg .btn:last-child { border-radius: 0 8px 8px 0; border-left: 0; }

/* Menü-Manager (ziehen, hinzufügen, inline speichern) */
.menu-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.menu-row { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; padding: 4px 8px; }
.menu-row.dragging { opacity: .45; border-style: dashed; }
.menu-row .grip { color: var(--faint); cursor: grab; display: flex; }
.menu-row .grip svg { width: 18px; height: 18px; }
.menu-row input { border: 0; margin: 0; padding: 7px 4px; flex: 1; background: transparent; font-size: 14px; }
.menu-row input:focus { box-shadow: none; outline: none; }
.menu-del { background: none; border: 0; color: var(--faint); cursor: pointer; padding: 4px; display: flex; }
.menu-del:hover { color: var(--neg-text); }
.menu-del svg { width: 16px; height: 16px; }
.save-status { font-size: 13px; color: var(--pos-text); }

/* Lightbox-Galerie */
.lbx { position: fixed; inset: 0; z-index: 100; background: rgba(16,20,28,.88); display: none; align-items: center; justify-content: center; }
.lbx.open { display: flex; }
.lbx img { max-width: 92vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 12px 48px rgba(0,0,0,.5); cursor: zoom-in; user-select: none; transform-origin: 0 0; will-change: transform; -webkit-user-drag: none; }
.lbx img.zoomed { cursor: grab; }
.lbx img.grabbing { cursor: grabbing; }
.lbx-hint { position: absolute; bottom: 38px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.55); font-size: 12px; pointer-events: none; }
.lbx-x { position: absolute; top: 14px; right: 20px; color: #fff; font-size: 30px; line-height: 1; background: none; border: 0; cursor: pointer; }
.lbx-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 30px; cursor: pointer; background: rgba(0,0,0,.3); border: 0; width: 50px; height: 66px; border-radius: 9px; }
.lbx-prev { left: 18px; } .lbx-next { right: 18px; }
.lbx-cap { position: absolute; top: 16px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; font-weight: 600; pointer-events: none; }
.lbx-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: 13px; pointer-events: none; }
.lb-item { cursor: zoom-in; }

/* ============================================================
   Auftrags-Hero + Fortschritts-Stepper
   ============================================================ */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 18px; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hero .eyebrow { font-size: 12.5px; color: var(--faint); letter-spacing: .3px; }
.hero h1 { font-size: 24px; margin: 2px 0 4px; }
.hero .meta { color: var(--muted); font-size: 13.5px; }
.stepper { display: flex; align-items: flex-start; margin-top: 22px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.step .line { position: absolute; top: 14px; right: 50%; width: 100%; height: 2px; background: var(--line-strong); z-index: 0; }
.step.done .line, .step.cur .line { background: var(--accent); }
.step .bub { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 13px; font-weight: 600; background: var(--bg);
  color: var(--faint); border: 2px solid transparent; }
.step.done .bub { background: var(--accent); color: #fff; }
.step.cur .bub { background: var(--surface); border-color: var(--accent); color: var(--accent-text); }
.step .bub svg { width: 16px; height: 16px; }
.step .lbl { font-size: 12px; color: var(--muted); margin-top: 7px; text-align: center; }
.step.cur .lbl { color: var(--accent-text); font-weight: 600; }

/* ============================================================
   Paket-Konfigurator (Karten + Chips + Live-Preis)
   ============================================================ */
.pkgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 18px; }
.pkg { position: relative; display: block; cursor: pointer; }
.pkg input { position: absolute; opacity: 0; pointer-events: none; }
.pkg-card { display: block; border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 16px;
  transition: border-color .12s, background .12s, box-shadow .12s; }
.pkg:hover .pkg-card { border-color: var(--accent); }
.pkg input:checked + .pkg-card { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.pkg-name { font-size: 14px; color: var(--muted); }
.pkg input:checked + .pkg-card .pkg-name { color: var(--accent-text); }
.pkg-price { font-size: 26px; font-weight: 700; margin: 4px 0; color: var(--ink); }
.pkg-price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.pkg-sub { font-size: 12px; color: var(--faint); }
.pkg-rec { position: absolute; top: -9px; left: 14px; background: var(--accent); color: #fff; font-size: 11px;
  font-weight: 600; padding: 2px 9px; border-radius: 999px; z-index: 2; }
.addon-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.chip { display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong);
  color: var(--muted); font-size: 13px; padding: 7px 13px; border-radius: 999px; transition: all .12s; }
.chip:hover span { border-color: var(--accent); color: var(--ink); }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.qty-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin: 4px 0 16px; }
.qty { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 7px 9px 7px 13px; }
.qty label { margin: 0; font-size: 13.5px; color: var(--ink); font-weight: 500; }
.qty .qsub { color: var(--faint); font-size: 12px; }
.qty input { width: 60px; margin: 0; text-align: center; padding: 7px; }
.total-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--ink);
  color: #fff; border-radius: 14px; padding: 16px 20px; }
.total-bar .t-lbl { font-size: 12.5px; color: rgba(255,255,255,.65); }
.total-bar .t-val { font-size: 23px; font-weight: 700; line-height: 1.2; }
.total-bar .t-val small { font-size: 13.5px; font-weight: 400; color: rgba(255,255,255,.75); }

/* ============================================================
   Globale Politur (Runde 2) – über alle Seiten
   ============================================================ */
.table thead th { text-transform: uppercase; font-size: 11px; letter-spacing: .6px; color: var(--faint); font-weight: 600; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--faint); font-weight: 600; margin: 28px 0 12px; }
h2 { letter-spacing: -.2px; }

/* Kacheln mit Icon + Hover-Lift */
.tile { transition: transform .12s ease, border-color .12s, box-shadow .12s; }
a.tile:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 6px 22px rgba(20,25,40,.09); }
.tile-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.tile-ic svg { width: 18px; height: 18px; }
.stat { transition: transform .12s, box-shadow .12s; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(20,25,40,.08); }

/* Filterleiste als Karte */
.toolbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { margin-top: 0; }
.toolbar input[type=text], .toolbar input:not([type]) { flex: 1; min-width: 220px; }

/* Schöne Leerzustände */
.blank { text-align: center; padding: 48px 24px; color: var(--muted); }
.blank .blank-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.blank .blank-ic svg { width: 26px; height: 26px; }
.blank h3 { font-size: 16px; color: var(--ink); margin-bottom: 4px; }

/* Avatar-Kreis (Benutzer/Listen) */
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }

/* Akquise-Cockpit */
.cockpit-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.callbig { font-size: 17px; padding: 15px 26px; border-radius: 12px; }
.callbig svg { width: 20px; height: 20px; }

/* Login premium */
.login-wrap { background: linear-gradient(165deg, var(--surface) 0%, var(--accent-soft) 130%); }
.login-card { width: 380px; max-width: 92vw; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 12px 40px rgba(20,25,40,.12); padding: 34px 32px; }
.login-mark { width: 46px; height: 46px; border-radius: 13px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; letter-spacing: -1px; margin-bottom: 16px; }

/* ============================================================
   PREMIUM THEME v2 — dunkle Sidebar · Inter · Akzent-Verläufe
   ============================================================ */
:root {
  --bg: #f4f5f8;
  --side-bg: #15171d;
  --side-ink: #e9ebf1;
  --side-muted: #898fa0;
  --side-line: rgba(255,255,255,.08);
  --accent-grad: linear-gradient(135deg, #6f6bf0 0%, #5b57eb 100%);
}
body { font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
h1 { font-weight: 700; letter-spacing: -.4px; }
h2, h3 { letter-spacing: -.2px; }

/* Dunkle Sidebar */
.sidebar { background: var(--side-bg); border-right: 1px solid var(--side-line); }
.side-brand .wd { color: #fff; }
.side-brand .st { color: #6f6bf0; }
.nav-label { color: var(--side-muted); }
.nav-item { color: var(--side-muted); font-weight: 500; }
.nav-item svg { stroke-width: 2; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(91,87,235,.16); color: #a5a2f5; position: relative; }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent); }
.side-foot { border-top: 1px solid var(--side-line); }
.side-user .nm { color: var(--side-ink); }
.side-user .rl { color: var(--side-muted); }
.avatar { background: rgba(91,87,235,.2); color: #a5a2f5; }
.side-logout { color: var(--side-muted); }
.side-logout:hover { background: rgba(255,255,255,.06); color: #fff; }

/* Akzent-Verläufe (Premium-Sheen) */
.btn { background: var(--accent-grad); border-color: transparent; box-shadow: 0 2px 10px rgba(91,87,235,.28); }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--surface); box-shadow: none; }
.btn.danger { background: var(--surface); box-shadow: none; }
.btn.ghost:hover, .btn.danger:hover { filter: none; }
.step.done .bub { background: var(--accent-grad); }
.tile-ic, .blank-ic { background: var(--accent-grad); color: #fff; }
.login-mark { background: var(--accent-grad); box-shadow: 0 4px 16px rgba(91,87,235,.3); }
.total-bar { background: linear-gradient(135deg, #20242d 0%, #15171d 100%); }
.pkg input:checked + .pkg-card { box-shadow: 0 0 0 3px var(--accent-soft), 0 6px 18px rgba(91,87,235,.12); }

/* Karten etwas luftiger + feiner Hover auf klickbaren */
.card { border-color: #eef0f4; }
.jobrow, .tile, .stat { border-color: #eef0f4; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 16px; }

/* ---------- Status: Pills + Punkte (gedämpft, semantisch gruppiert) ---------- */
.pill { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; display: inline-block; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--neutral); }

.pill.offen, .pill.nicht_erreicht, .pill.lead, .pill.erfasst { background: var(--neutral-soft); color: var(--neutral-text); }
.pill.verschickt, .pill.kontaktiert, .pill.review { background: var(--info-soft); color: var(--info-text); }
.pill.design, .pill.pruefung, .pill.umsetzung, .pill.interessent, .pill.qualifiziert, .pill.angebot, .pill.freigegeben, .pill.inhalte { background: var(--warm-soft); color: var(--warm-text); }
.pill.gewonnen, .pill.fertig { background: var(--pos-soft); color: var(--pos-text); }
.pill.falsche_nummer, .pill.kein_interesse, .pill.verloren { background: var(--neg-soft); color: var(--neg-text); }

.dot.offen, .dot.nicht_erreicht, .dot.lead, .dot.erfasst { background: var(--neutral); }
.dot.verschickt, .dot.kontaktiert, .dot.review { background: var(--info); }
.dot.design, .dot.pruefung, .dot.umsetzung, .dot.interessent, .dot.qualifiziert, .dot.angebot, .dot.freigegeben, .dot.inhalte { background: var(--warm); }
.dot.gewonnen, .dot.fertig { background: var(--pos); }
.dot.falsche_nummer, .dot.kein_interesse, .dot.verloren { background: var(--neg); }

/* ---------- Tabellen ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clk { cursor: pointer; }
.table tbody tr.clk:hover { background: var(--bg); }
.table td.tcall { white-space: nowrap; }
/* Leads-Tabelle: Firma/Website begrenzen, damit lange (umbruchlose) URLs die Spalte nicht aufblähen und so
   die rechten Spalten (Telefonnummer/Status) aus dem Container drücken + kappen. Wrapper scrollt notfalls. */
.table td .lead-firma { max-width: 340px; }
.lead-web { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Filterzeile / Pager ---------- */
.crm-filter { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.crm-filter input { flex: 1; min-width: 220px; margin-top: 0; }
.crm-filter select { width: auto; margin-top: 0; }
.pager { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 18px; }

/* ---------- Klick-zum-Anrufen (dezent, kein Grün) ---------- */
a.callbtn { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); padding: 6px 11px; border-radius: 8px; font-weight: 600; font-size: 13px; }
a.callbtn:hover { background: var(--bg); text-decoration: none; }
a.callbtn svg { width: 14px; height: 14px; color: var(--accent); }

/* ---------- Formulare ---------- */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; font-weight: 500; }
input, textarea, select {
  width: 100%; margin-top: 6px; padding: 10px 12px; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: flex; gap: 14px; }
.row > label { flex: 1; }
.hint { font-size: 12.5px; color: var(--muted); margin: -6px 0 14px; }
.editgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .editgrid { grid-template-columns: 1fr; } }
.addons { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 9px; }
.addon { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); margin: 0; font-weight: 400; }
.addon input[type=number] { margin-top: 0; width: 64px; }
.addon input[type=checkbox] { margin-top: 0; width: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 15px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; border: 1px solid transparent; }
/* Icons in Hinweisen muessen klein bleiben – ohne diese Regel blaeht das SVG (kein width/height) auf volle Breite auf. */
.alert svg { width: 18px; height: 18px; vertical-align: -4px; flex: 0 0 auto; }
.alert.err  { background: var(--neg-soft); border-color: #f0cfcd; color: var(--neg-text); }
.alert.ok   { background: var(--pos-soft); border-color: #c9e6d3; color: var(--pos-text); }
.alert.warn { background: var(--warm-soft); border-color: #ecdab9; color: var(--warm-text); }
.alert.info { background: var(--info-soft); border-color: #cfe0f2; color: var(--info-text); }

/* ---------- Fortschritt ---------- */
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 12px 0 8px; }
.progress > span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s; }
.spin { width: 15px; height: 15px; border: 2px solid var(--accent-soft); border-top-color: var(--accent);
  border-radius: 50%; display: inline-block; animation: sp .8s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* Lade-Meldung (Spinner + Text sauber ausgerichtet statt &nbsp;-Quetschung) */
.alert.loading { display: flex; align-items: flex-start; gap: 11px; }
.alert.loading .spin { flex: 0 0 auto; margin-top: 2px; }
.alert.loading .msg { font-weight: 600; line-height: 1.5; }
.alert.loading .msg .sub { display: block; font-weight: 400; font-size: 12.5px; opacity: .82; margin-top: 3px; }
h3.loading-h { display: flex; align-items: center; gap: 9px; }
.pill-load { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Statistik-Kacheln ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .num { font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- Auftrags-Liste ---------- */
.jobs { display: grid; gap: 8px; }
/* Feste Spalten -> rechte Kante (Lead-Status / Auftrag-Status / Datum) richtet sich über alle Zeilen aus */
.jobrow { display: grid; grid-template-columns: 16px 12px minmax(0,1fr) 150px 168px 116px; align-items: center;
  gap: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.jobrow:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.jobrow .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jobrow .meta { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-main { min-width: 0; }
.jr-lead, .jr-job { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.jr-date { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jobrow .bulk-cb, .jobrow .dot { margin: 0; }
.src-badge { background: var(--neutral-soft); color: var(--neutral-text); font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 6px; vertical-align: middle; }
.pill.termin { background: #fef3c7; color: #854f0b; }
.dot.termin { background: #d99e0b; }
.pill.ruhend { background: var(--neutral-soft); color: var(--neutral-text); }
.dot.ruhend { background: var(--neutral); }
@media (max-width: 860px) { .jobrow { grid-template-columns: 16px 12px minmax(0,1fr) auto; }
  .jr-lead, .jr-date { display: none; } }
.spacer { flex: 1; }

/* ---------- Design-Grid ---------- */
.designs { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 6px 0; }
.design { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.design.chosen { border-color: var(--pos); box-shadow: 0 0 0 2px var(--pos-soft); }
.design img { width: 100%; display: block; border-bottom: 1px solid var(--line); }
.design .body { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.design .body .t { font-weight: 600; font-size: 14px; }
.design .body form { flex-basis: 100%; margin-top: 4px; }
.tag-ok { color: var(--pos-text); font-weight: 700; font-size: 13px; }
.tag-warn { color: #b45309; background: #fdf3e3; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 6px; }

/* ---------- Mail-Editor (echtes Editor-Fenster statt HTML-Tippen) ---------- */
.editor-label { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.rte-toolbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 9px 9px 0 0; background: var(--bg); }
.rte-toolbar button { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 4px 9px; font-size: 13px; cursor: pointer; color: var(--ink); line-height: 1.2; }
.rte-toolbar button:hover { border-color: var(--accent); color: var(--accent-text); }
.rte-toolbar .rte-sep { flex: 1; }
.rte-toolbar .rte-reset { color: var(--accent-text); }
.rte { border: 1px solid var(--line-strong); border-radius: 0 0 9px 9px; padding: 14px 16px; min-height: 220px; max-height: 460px; overflow-y: auto; background: var(--surface); font-size: 14px; line-height: 1.6; color: var(--ink); outline: none; }
.rte:focus { border-color: var(--accent); }
.rte ul { padding-left: 22px; } .rte p, .rte div { margin: 0 0 6px; }
.seite-meta { flex-basis: 100%; font-size: 12px; color: var(--muted, #6b7385); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Aufklappbares (Erweitert / Paket ändern) + Bestätigungs-Leiste ---------- */
details.adv, details.pkg-edit { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
details.adv > summary, details.pkg-edit > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent-text); list-style: none; padding: 4px 0; user-select: none; }
details.adv > summary::-webkit-details-marker, details.pkg-edit > summary::-webkit-details-marker { display: none; }
details.adv > summary::before, details.pkg-edit > summary::before { content: "▸ "; }
details.adv[open] > summary::before, details.pkg-edit[open] > summary::before { content: "▾ "; }
.confirm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--pos-soft); border: 1px solid #cfe6d6; border-radius: 10px; padding: 12px 16px; margin-bottom: 12px; }
.confirm-bar .t-lbl { font-size: 12px; color: var(--pos-text); font-weight: 600; }
.confirm-bar .t-val { font-size: 16px; font-weight: 700; } .confirm-bar .t-val small { font-weight: 400; color: var(--muted, #6b7385); }

/* ---------- Herkunft (Vertriebler + Notizen auf der Auftragsseite) ---------- */
.card.herkunft { border-left: 3px solid var(--accent); }
.hk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 18px; margin: 4px 0 8px; }
.hk-grid > div { display: flex; flex-direction: column; }
.hk-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7385); font-weight: 600; }
.hk-val { font-size: 14px; font-weight: 600; color: var(--ink); }
.hk-notes { background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-top: 8px; }
.hk-notes p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }
.hk-hist { list-style: none; padding: 8px 0 0; margin: 0; }
.hk-hist li { font-size: 13px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.hk-ts { color: var(--muted, #6b7385); font-variant-numeric: tabular-nums; margin-right: 6px; }

/* ---------- Dialer: Schritt-Hinweis + Design-Auswahl beim Rückruf ---------- */
.ck-step { margin: 16px 0 10px; }
.ck-step .ck-num { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-text); background: var(--accent-soft); padding: 2px 9px; border-radius: 20px; }
.ck-step h3 { margin: 8px 0 2px; font-size: 17px; }
.ck-step p { margin: 0; color: var(--muted, #6b7385); font-size: 14px; }
.designpick { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 14px; }
.dp { position: relative; cursor: pointer; display: block; }
.dp input { position: absolute; opacity: 0; pointer-events: none; }
.dp-card { display: block; border: 2px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.dp-card img { width: 100%; display: block; aspect-ratio: 3/4; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); }
.dp-lbl { display: block; padding: 9px 12px; font-weight: 600; font-size: 14px; }
.dp input:checked + .dp-card { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dp input:checked + .dp-card::after { content: "✓ gewählt"; position: absolute; top: 8px; right: 8px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.dp-zoom { position: absolute; bottom: 9px; right: 10px; font-size: 12px; color: var(--accent-text); display: inline-flex; align-items: center; gap: 3px; background: var(--surface); padding: 2px 7px; border-radius: 14px; border: 1px solid var(--line-strong); }
.dp-zoom svg { width: 13px; height: 13px; }

/* ---------- Wegweiser-Banner (Leads-Liste) ---------- */
.guide { display: flex; align-items: center; gap: 14px; background: var(--accent-soft); border: 1px solid #dcd9fb; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }
.guide-ic { flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.guide-ic svg { width: 18px; height: 18px; }
.guide-tx { font-size: 13.5px; line-height: 1.6; color: var(--ink); flex: 1; }
.guide .g-step { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 7px; padding: 1px 8px; white-space: nowrap; display: inline-block; margin: 2px 0; font-weight: 600; }
.guide .g-arr { color: var(--accent-text); font-weight: 700; margin: 0 2px; }
.guide .btn { flex-shrink: 0; }

/* ---------- Empfänger vor Versand ändern ---------- */
.mailto-edit { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.mailto-edit label { flex: 1; min-width: 220px; margin: 0; font-size: 12px; font-weight: 600; color: var(--muted, #6b7385); }
.mailto-edit input { margin-top: 3px; }
.mailto-edit .warn-txt { color: #b45309; font-weight: 600; }
.warn-txt { color: #b45309; font-weight: 600; }
.pwform { display: flex; gap: 6px; align-items: center; margin: 0; }
.pwform input { margin: 0; height: 32px; font-size: 13px; max-width: 150px; }

/* ============================================================
   Statistik – KPIs, Diagramme, Mitarbeiter-Tabelle
   ============================================================ */
.statfilter { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 4px 0 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); position: relative; }
.kpi-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.kpi-ic svg { width: 17px; height: 17px; }
.kpi-num { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.kpi-lbl { font-size: 13px; color: var(--muted, #6b7385); margin-top: 4px; }
.kpi-warn { border-color: #ecc9c7; background: #fdf2f1; }
.kpi-warn .kpi-ic { background: #fde3e1; color: #c0392b; }

/* Säulendiagramm (Anrufe pro Tag) */
.chart-bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 6px; }
.cbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.cbar-fill { width: 100%; max-width: 30px; background: linear-gradient(180deg, var(--accent) 0%, var(--accent-grad, var(--accent)) 100%); border-radius: 5px 5px 0 0; min-height: 2px; transition: height .2s; }
.cbar-lbl { font-size: 10px; color: var(--muted, #6b7385); margin-top: 5px; font-variant-numeric: tabular-nums; }

/* Balkendiagramm (Anrufe je Mitarbeiter) */
.hbar-row { display: grid; grid-template-columns: 130px 1fr 54px; align-items: center; gap: 10px; padding: 5px 0; }
.hbar-lbl { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { background: var(--bg); border-radius: 6px; height: 22px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--accent); border-radius: 6px; min-width: 2px; transition: width .2s; }
.hbar-fill.low { background: #e0a23a; }
.hbar-num { font-size: 13px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

/* Tabelle + Ampeln */
.stat-table th, .stat-table td { font-size: 13px; white-space: nowrap; }
.txt-low { color: #c0392b; }
.flag-low { color: #c0392b; }
.badge-warn { background: #fde3e1; color: #c0392b; font-weight: 700; font-size: 12px; padding: 2px 9px; border-radius: 20px; }
.stat.stat-warn { border-color: #ecc9c7; background: #fdf2f1; }
.alert.warn { background: #fdf3e3; color: #8a5a12; border: 1px solid #f1d8a8; padding: 10px 14px; border-radius: 10px; }

/* ---------- Daten-Dashboard (Funnel · Anruf-Ergebnisse · Pool-Gesundheit · Tagesverlauf) ---------- */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 880px) { .dash-grid { grid-template-columns: 1fr; } }
.funnel { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.fn-row { display: grid; grid-template-columns: 124px 1fr 102px; align-items: center; gap: 10px; }
.fn-lbl { font-size: 13px; font-weight: 600; }
.fn-track { background: var(--bg); border-radius: 7px; height: 26px; overflow: hidden; }
.fn-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #817ef2); border-radius: 7px;
  min-width: 3px; display: flex; align-items: center; justify-content: flex-end; transition: width .25s; }
.fn-fill span { color: #fff; font-size: 12px; font-weight: 700; padding-right: 9px; font-variant-numeric: tabular-nums; }
.fn-meta { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.fn-drop { color: #c0392b; font-weight: 700; margin-left: 2px; }
.out-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.poolbar { display: flex; height: 26px; border-radius: 7px; overflow: hidden; background: var(--bg); margin-top: 10px; }
.poolseg { height: 100%; min-width: 2px; transition: width .25s; }
.pool-legend { display: flex; flex-wrap: wrap; gap: 9px 16px; margin-top: 13px; font-size: 13px; }
.pool-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.pool-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.pool-legend b { color: var(--ink); }
.chart-bars.hours .cbar-fill.peak { background: #16a34a; }

/* ---------- Listen / Probleme ---------- */
ul.clean { list-style: none; padding: 0; margin: 0; }
ul.clean li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
ul.clean li:last-child { border-bottom: 0; }
.sev { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; margin-right: 9px; }
.sev.hoch { background: var(--neg-soft); color: var(--neg-text); }
.sev.mittel { background: var(--warm-soft); color: var(--warm-text); }
.sev.niedrig { background: var(--neutral-soft); color: var(--neutral-text); }

/* ---------- Mail / Code ---------- */
.mail { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; white-space: pre-wrap; font-size: 14px; }
code { background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 12.5px; }

/* ============================================================
   Mein Tag (Startseite)
   ============================================================ */
.greet { margin-bottom: 22px; }
.greet h1 { font-size: 24px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: block; }
a.tile:hover { border-color: var(--line-strong); text-decoration: none; }
.tile .tnum { font-size: 28px; font-weight: 700; line-height: 1.1; }
.tile .tnum.accent { color: var(--accent-text); }
.tile .tlbl { color: var(--muted); font-size: 13px; margin-top: 3px; }

.cta { display: flex; align-items: center; gap: 14px; background: var(--accent-soft); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 24px; }
.cta .cta-ic { width: 40px; height: 40px; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cta .cta-ic svg { width: 22px; height: 22px; color: var(--accent); }
.cta .cta-tx { flex: 1; line-height: 1.35; }
.cta .cta-tx b { color: var(--accent-text); font-weight: 600; }
.cta .cta-tx span { display: block; color: var(--accent-text); opacity: .85; font-size: 13px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; }
.panel-head a { font-size: 13px; color: var(--muted); }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lrow:last-child { border-bottom: 0; }
.lrow:hover { background: var(--bg); text-decoration: none; }
.lrow .lmain { flex: 1; min-width: 0; }
.lrow .lname { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .lmeta { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .lstat { font-size: 12px; color: var(--faint); white-space: nowrap; }
.empty { padding: 20px 18px; color: var(--muted); font-size: 14px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 820px) { .cols2 { grid-template-columns: 1fr; } }

/* ============================================================
   Pipeline (Kanban-Board)
   ============================================================ */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); min-height: 120px; display: flex; flex-direction: column; }
.col.over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 13px; font-weight: 600; }
.col-head .cnt { margin-left: auto; color: var(--faint); font-weight: 600; font-size: 12px; }
.col-body { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  cursor: grab; box-shadow: var(--shadow); }
.pcard:active { cursor: grabbing; }
.pcard.drag { opacity: .5; }
.pcard .pc-name { font-weight: 600; font-size: 13.5px; }
.pcard .pc-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pcard a { color: inherit; }
.col-more { color: var(--faint); font-size: 12px; padding: 4px 4px 2px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.brand .wd { color: var(--accent); font-weight: 800; letter-spacing: -.5px; }
.brand-sep { color: var(--muted); font-weight: 600; font-size: 14px; }
.brand-logo { height: 30px; width: auto; display: block; }
.tagline { color: var(--muted); font-size: 11.5px; letter-spacing: 1.5px; text-transform: lowercase; }

/* ============================================================
   PROFI-SYSTEM (final, gewinnt alles) — hell · puristisch · konsistent
   ============================================================ */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #1b2330;
  --muted: #5b6675;
  --faint: #939bab;
  --line: #e8ebf1;
  --line-strong: #d8dde5;
  --accent: #5b57eb;
  --accent-soft: #eeeefc;
  --accent-text: #4338ca;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20,25,40,.04), 0 3px 10px rgba(20,25,40,.045);
}
body { font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.6; color: var(--ink); }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.4px; margin: 0 0 2px; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
h3 { font-size: 14px; font-weight: 600; }
.sub, .eyebrow { font-size: 13px; }

/* Helle, ruhige Sidebar */
.sidebar { background: #fbfcfd; border-right: 1px solid var(--line); }
.side-brand .wd { color: var(--accent); }
.side-brand .st { color: var(--faint); }
.nav-label { color: var(--faint); }
.nav-item { color: var(--muted); font-weight: 500; }
.nav-item:hover { background: #eef1f5; color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-item.active::before { background: var(--accent); }
.side-foot { border-top: 1px solid var(--line); }
.side-user .nm { color: var(--ink); }
.side-user .rl { color: var(--faint); }
.avatar, .av { background: var(--accent-soft); color: var(--accent-text); }
.side-logout { color: var(--muted); }
.side-logout:hover { background: #eef1f5; color: var(--ink); }

/* EIN Button-System – einheitliche Höhen, flach */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px;
  background: var(--accent); border: 1px solid var(--accent); color: #fff; box-shadow: none;
  font-size: 13.5px; font-weight: 600; border-radius: 9px; line-height: 1; white-space: nowrap; cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--bg); filter: none; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.danger { background: var(--surface); color: var(--neg-text); border-color: #ecc9c7; }
.btn.danger:hover { background: var(--neg-soft); filter: none; }
.callbig { height: 38px; padding: 0 16px; font-size: 13.5px; }

/* Flache Akzente statt Verläufe (puristisch) */
.tile-ic, .blank-ic { background: var(--accent-soft); color: var(--accent-text); }
.step.done .bub { background: var(--accent); }
.login-mark { background: var(--accent); box-shadow: none; }
.total-bar { background: #1b2330; }
.cta { background: var(--accent-soft); }
.cta .cta-ic svg { color: var(--accent); }

/* Karten & Flächen einheitlich */
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.hero { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel, .stat, .tile, .toolbar, .jobrow { border-color: var(--line); }
.stat .num { font-size: 24px; font-weight: 700; }
.pill { font-weight: 600; }

/* Formulare einheitlich */
input, textarea, select { font-size: 13.5px; border-radius: 9px; }
label { font-size: 12.5px; }

/* Vertriebs-Briefing */
.brief-opener { background: var(--accent-soft); color: var(--accent-text); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
.brief-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--faint); font-weight: 600; margin: 16px 0 7px; }
.brief-list { margin: 0; padding-left: 18px; font-size: 13.5px; }
.brief-list li { margin-bottom: 5px; }
.seo-box { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.seo-num { font-size: 22px; font-weight: 700; color: var(--accent-text); line-height: 1.15; }
.seo-num span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.kw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kwc { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--muted); }
.einwand { border-left: 2px solid var(--line-strong); padding: 1px 0 1px 12px; margin-bottom: 8px; font-size: 13.5px; border-radius: 0; }
.einwand b { display: block; color: var(--ink); }
.einwand span { color: var(--muted); }
.kontakte { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; }
.kontakte span b { color: var(--muted); font-weight: 600; }

/* Mein-Tag-Container: farblich hervorgehobene Titelleiste */
.panel-head { background: var(--accent-soft); border-bottom: 1px solid #ddd9fb; }
.panel-head h3 { color: var(--accent-text); }
.panel-head .muted, .panel-head a { color: var(--accent-text); opacity: .8; }
/* Filter-Chip „nur vorbereitet" in der Toolbar */
.toolbar .chip span { white-space: nowrap; }
/* Status-Filter-Chips (Aufträge) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip-f { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--muted); font-size: 13px; padding: 7px 12px; border-radius: 999px; }
.chip-f:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
.chip-f.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.chip-f b { color: inherit; font-weight: 700; }

/* ---------- Akquise-Cockpit (Dialer) ---------- */
.cockpit { padding: 0; overflow: hidden; }
.ck-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 18px 20px; background: var(--accent-soft); border-bottom: 1px solid #ddd9fb; }
.ck-head .co { font-size: 20px; font-weight: 700; letter-spacing: -.3px; color: var(--ink); margin: 0; }
.ck-head .meta { font-size: 13px; color: var(--muted); margin: 3px 0 0; }
.ck-body { padding: 18px 20px; }
.ck-call { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 12px;
  font-size: 18px; font-weight: 700; letter-spacing: -.2px; text-decoration: none; }
.ck-call:hover { filter: brightness(1.05); color: #fff; }
.ck-call svg { width: 22px; height: 22px; }
.ck-call.dis { background: var(--neutral-soft); color: var(--neutral-text); border-color: var(--line-strong); pointer-events: none; }
.ck-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qchip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.qchip:hover { background: var(--bg); color: var(--ink); }
.qchip svg { width: 16px; height: 16px; }
.qchip.wa { border-color: #b7e4c7; background: var(--pos-soft); color: var(--pos-text); }
.qchip.web { color: var(--accent-text); }
.ck-sec { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--faint);
  font-weight: 600; margin: 22px 0 9px; }
.ck-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px; }
.rbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; width: 100%; }
.rbtn svg { width: 17px; height: 17px; }
.rbtn:hover { filter: brightness(.985); }
.rbtn.pos { background: var(--pos-soft); border-color: #bfe3cb; color: var(--pos-text); }
.rbtn.info { background: var(--info-soft); border-color: #cfe0f4; color: var(--info-text); }
.rbtn.warn { background: var(--warm-soft); border-color: #ecdab9; color: var(--warm-text); }
.rbtn.neg { background: var(--neg-soft); border-color: #f0cfce; color: var(--neg-text); }
.ck-cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent); border-radius: 12px;
  font-size: 16px; font-weight: 700; cursor: pointer; }
.ck-cta:hover { filter: brightness(1.05); }
.ck-cta svg { width: 20px; height: 20px; }
.ck-foot { display: flex; gap: 8px; justify-content: center; padding: 4px 20px 18px; }
.ck-foot a { color: var(--muted); font-size: 13px; text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.ck-foot a:hover { background: var(--bg); color: var(--ink); }
.ck-form .editgrid { margin-bottom: 10px; }
.ck-result-form { display: contents; }

/* ---------- Kunden-Historie / Audit-Log ---------- */
.hist { list-style: none; margin: 10px 0 0; padding: 0; }
.hist li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--line); }
.hist li:last-child { border-left-color: transparent; padding-bottom: 0; }
.hist li::before { content: ""; position: absolute; left: -5px; top: 3px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); }
.hist li.sys::before { background: var(--neutral); }
.hist .ha { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.hist .ha .hd { font-weight: 400; color: var(--muted); }
.hist .hm { color: var(--faint); font-size: 12px; margin-top: 1px; }

/* --- Live-Vorschau (Teilbilder während der KI-Generierung) --- */
.livepreview { margin-top: 12px; }
.livepreview .design { position: relative; }
.livepreview img { opacity: .9; filter: saturate(.92); animation: pvpulse 1.6s ease-in-out infinite; }
.livepreview .design::after {
  content: "rendert …"; position: absolute; top: 8px; left: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: #fff; background: rgba(91,87,235,.85); padding: 3px 8px; border-radius: 999px;
}
@keyframes pvpulse { 0%,100% { opacity: .78; } 50% { opacity: 1; } }

/* --- WhatsApp-Versand-Karte --- */
.wa-steps { margin: 4px 0 0; padding-left: 20px; }
.wa-steps > li { margin-bottom: 16px; line-height: 1.5; }
.wa-steps > li:last-child { margin-bottom: 4px; }
.wa-msg {
  width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font: inherit; font-size: 14px; line-height: 1.5;
  color: var(--ink); background: #fff; resize: vertical; box-sizing: border-box;
}
.btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn.wa:hover { background: #1ebe5d; border-color: #1ebe5d; color: #fff; }
.btn.wa svg { stroke: #fff; }

/* --- Massenbearbeitung (Bulk-Aktionen) --- */
.bulkbar { display: none; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 9px 14px; background: var(--accent-soft);
  border: 1px solid var(--accent-text); border-radius: 12px; position: sticky; top: 8px; z-index: 6; }
.bulkbar.show { display: flex; }
.bulkbar .bulk-n { font-size: 13.5px; color: var(--accent-text); }
.bulkbar select { height: 32px; padding: 0 8px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 13.5px; background: #fff; color: var(--ink); }
.bulk-cb { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); vertical-align: middle; }
th.cbcell, td.cbcell { width: 36px; text-align: center; }
.jobrow .bulk-cb { margin-right: 6px; flex: 0 0 auto; }
.assign-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.assign-row select { height: 38px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: #fff; min-width: 220px; }

/* --- Bulk-Auswahl im Kanban-Board --- */
.pcard { position: relative; }
.pcard .bulk-cb { position: absolute; top: 8px; right: 8px; z-index: 2; }
.pcard.has-cb .pc-name, .board .pcard .pc-name { padding-right: 22px; }

/* --- Statistik: Score, Tooltips, Profil-Balken, Glossar --- */
.info { display:inline-flex; align-items:center; justify-content:center; width:15px; height:15px;
  border-radius:50%; background:var(--accent-soft); color:var(--accent-text); font-size:10px;
  font-weight:700; font-style:normal; cursor:help; margin-left:4px; vertical-align:middle;
  border:1px solid var(--accent-text); line-height:1; }
.score-row { display:flex; align-items:center; gap:12px; margin-top:12px; }
.score-name { width:170px; flex:0 0 170px; display:flex; align-items:center; gap:8px; font-weight:600; font-size:14px; }
.score-track { flex:1; height:14px; background:var(--accent-soft); border-radius:999px; overflow:hidden; }
.score-fill { height:100%; border-radius:999px; transition:width .4s ease; }
.score-fill.gut { background:#16a34a; } .score-fill.mittel { background:#d97706; } .score-fill.schwach { background:#dc2626; }
.score-val { width:38px; text-align:right; font-weight:800; font-variant-numeric:tabular-nums; }
.score-befund { margin:3px 0 6px 182px; font-size:12.5px; color:var(--muted); }
.score-befund.schwach { color:#dc2626; } .score-befund.gut { color:#15803d; }
.dot-amp { width:9px; height:9px; border-radius:50%; flex:0 0 9px; }
.dot-amp.gut { background:#16a34a; } .dot-amp.mittel { background:#d97706; } .dot-amp.schwach { background:#dc2626; }
.score-pill { display:inline-block; min-width:30px; text-align:center; padding:2px 9px; border-radius:999px; font-weight:700; font-size:12.5px; }
.score-pill.gut { background:#dcfce7; color:#15803d; } .score-pill.mittel { background:#fef3c7; color:#b45309; } .score-pill.schwach { background:#fee2e2; color:#b91c1c; }
.prof { display:flex; flex-direction:column; gap:2px; min-width:64px; }
.prof .pf { height:4px; border-radius:2px; display:block; min-width:2px; }
.prof .pf.f { background:#6366f1; } .prof .pf.e { background:#16a34a; } .prof .pf.d { background:#d97706; }
.prof-lg { flex-direction:column; gap:10px; margin-top:14px; min-width:0; }
.prof-lg > div { display:grid; grid-template-columns:96px 1fr 34px; align-items:center; gap:12px; }
.prof-lg > div > span { font-size:13px; color:var(--muted); }
.prof-lg .pf { height:9px; border-radius:5px; }
.prof-lg > div > b { text-align:right; font-variant-numeric:tabular-nums; }
.glossar summary { cursor:pointer; font-size:15px; }
.gl-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px,1fr)); gap:14px 24px; margin-top:14px; }
.gl-grid > div b { color:var(--ink); }
.gl-grid p { margin:3px 0 0; font-size:13px; color:var(--muted); line-height:1.5; }
.rel.online { color:#16a34a; font-weight:600; }

/* --- Aufklappbare Karten (Toggles) – .card.tg, per JS gesteuert --- */
.card.tg > h3 { cursor: pointer; margin: 0; user-select: none; position: relative; padding-right: 26px; }
.card.tg > h3::after {
  content: "\203A"; position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%) rotate(0deg); transform-origin: center;
  font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s ease;
}
.card.tg.open > h3::after { transform: translateY(-50%) rotate(90deg); }
.card.tg > h3:hover { color: var(--accent-text); }
.card.tg .tg-body { display: none; margin-top: 12px; }
.card.tg.open .tg-body { display: block; }

/* --- Auftragsseite: Design-Auswahl-Aufforderung, Sektionen, Buttons --- */
.choose-cta { display: flex; gap: 12px; align-items: center; margin: 14px 0; padding: 12px 16px;
  background: var(--accent-soft); border: 1px solid var(--accent-text); border-radius: 12px; }
.choose-cta .choose-ic { flex: 0 0 auto; color: var(--accent-text); display: flex; }
.choose-cta .choose-ic svg { width: 22px; height: 22px; }
.choose-cta b { display: block; color: var(--accent-text); }
.choose-cta span { color: var(--muted); font-size: 13px; }
.btn.choose-btn { background: #fff; color: var(--accent-text); border: 1px solid var(--accent-text); }
.btn.choose-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.choose-btn svg { stroke: currentColor; }
.section-label { margin: 30px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint); }
.hint-lock { display: flex; gap: 8px; align-items: center; }
.hint-lock svg { width: 16px; height: 16px; color: var(--accent-text); flex: 0 0 auto; }
.tag-ok svg { width: 13px; height: 13px; vertical-align: -1px; }

/* --- Sortierbare Spaltenköpfe --- */
.sorth { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.sorth:hover { color: var(--accent-text); }
.sorth.on { color: var(--accent-text); font-weight: 700; }
.sarr { font-size: 10px; line-height: 1; }
/* Bulk-Leiste dauerhaft sichtbar (alle-auswählen immer erreichbar); dezent ohne Auswahl */
.bulkbar:not(.has-sel) { background: var(--card, #fff); }

/* Bulk-Leiste neutral, solange nichts gewählt ist (dezenter Dauer-Toolbar-Look) */
.bulkbar:not(.has-sel) { background: #fff; border-color: var(--line); }
.bulkbar:not(.has-sel) .bulk-n { color: var(--muted); }

/* FIX (27.06): die generische 15px-Icon-Klasse `.info` (Statistik-Tooltip) kollidierte mit
   `class="alert info"` und zwang Alerts width/height:15px + border-radius:50% + cursor:help auf
   -> Box zerschossen (Sende-Meldung als schmale Spalte über dem Formular). Hier für Alerts
   zurücksetzen. Steht am Datei-ENDE, damit es die frühere `.info`-Regel sicher überschreibt. */
.alert.info { width: auto; height: auto; min-width: 0; border-radius: 10px;
  cursor: default; margin-left: 0; }

/* Kopie-Status-Badge in der Aufträge-Übersicht (Kontrolle: Mail-Kopie im Gesendet-Ordner) */
.cmeta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted);
  margin-left: 10px; white-space: nowrap; }
.cmeta.ok { color: var(--pos-text); }
.cmeta.err { color: var(--neg-text); }
.cmeta .spin { width: 12px; height: 12px; }
.copy-status { margin: -4px 0 12px; }

/* ===== Lead-Detail: 2-Spalten-Cockpit (Briefing links, Aktionen rechts) ===== */
.lead-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.lead-head h1 { margin: 0; }
.contact-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cstrip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 13.5px;
  text-decoration: none; max-width: 100%; }
a.cstrip:hover { border-color: var(--accent); color: var(--accent-text); text-decoration: none; }
.cstrip svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
a.cstrip:hover svg { color: var(--accent); }
.cstrip.call { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.cstrip.call svg { color: var(--accent-text); }
.cstrip.wa svg, a.cstrip.wa:hover svg { color: #25d366; }
.cstrip.static { color: var(--muted); }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); gap: 16px;
  align-items: start; margin-bottom: 16px; }
.lead-main { min-width: 0; }
.lead-main .card { margin: 0; }
.lead-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.lead-side .card { margin: 0; }
.lead-side h3 { margin: 0 0 12px; }
.side-stack { display: flex; flex-direction: column; gap: 10px; }
.side-form { display: flex; flex-direction: column; gap: 10px; }
.side-form .fld { display: flex; flex-direction: column; gap: 4px; margin: 0;
  font-size: 12px; color: var(--muted); font-weight: 600; }
.side-form .fld select, .side-form .fld input, .side-form select, .side-form input { margin-top: 0; }
@media (max-width: 980px) {
  .lead-grid { grid-template-columns: 1fr; }
  .lead-side { position: static; }
}

/* ===== Akquise-Dialer: Kopf mit großem Anruf-Button ===== */
.dialer-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.dh-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dh-top h2 { margin: 0; }
.btn.call-big { height: 52px; font-size: 16px; }
.dialer-foot { display: flex; align-items: center; justify-content: space-between; padding: 2px; font-size: 13px; }
.dialer-foot a { color: var(--muted); }
.dialer-foot a:hover { color: var(--ink); }
.dialer-foot a.skip { color: var(--accent-text); font-weight: 600; }

/* ===== Akquise-Dialer 3-Spalten (Ganztags-Agent): links Kunde+Anruf · Mitte Briefing+Verlauf · rechts Ergebnis ===== */
.dialer3 { display: grid; grid-template-columns: 318px minmax(0,1fr) 330px; gap: 16px; align-items: start; margin-bottom: 16px; }
.d3-left, .d3-right { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.d3-mid { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dialer3 .dialer-head { margin-bottom: 0; }
.dialer3 .card { margin: 0; }
.dialer3 .d3-right > .card h3, .dialer3 .d3-left .card h3 { margin: 0 0 12px; }
.detbox { padding: 0; }
.detbox > summary { list-style: none; cursor: pointer; padding: 13px 18px; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; gap: 8px; color: var(--ink); }
.detbox > summary::-webkit-details-marker { display: none; }
.detbox > summary svg { width: 17px; height: 17px; color: var(--accent-text); }
.detbox[open] > summary { border-bottom: 1px solid var(--line); }
.detbox > .det-body { padding: 14px 18px; }
@media (max-width: 1080px) { .dialer3 { grid-template-columns: 1fr; } .d3-left, .d3-right { position: static; } }
/* Akquise = Ganztags-Arbeitsplatz: breiterer Container, damit die 3 Spalten Luft haben (Standard-.wrap 1060px
   quetschte die Mitte auf ~320px → das Briefing-cols2 darin auf ~150px = „verschoben"). Unter 1400px Viewport
   (Laptop) wird die schmaler werdende Mitte gestapelt statt zweispaltig gequetscht. */
.wrap.wrap-wide { max-width: 1480px; }
@media (max-width: 1400px) { .d3-mid .cols2 { grid-template-columns: 1fr; } }

/* ===== Fällige Rückrufe: Übersichtsliste ===== */
.cb-list { display: flex; flex-direction: column; gap: 10px; }
.cb-row { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 13px 18px; cursor: pointer; transition: border-color .12s; }
.cb-row:hover { border-color: var(--line-strong); }
.cb-when { flex: 0 0 64px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cb-when.overdue { color: var(--neg-text); }
.cb-main { flex: 1; min-width: 0; }
.cb-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-row .callbtn { flex-shrink: 0; }
.cb-row > .btn { flex-shrink: 0; }

/* ===== Auftrags-Karten: führendes Icon im Kartentitel (statt springender Nummern) ===== */
.card h3 > svg { width: 17px; height: 17px; vertical-align: -3px; margin-right: 8px; color: var(--accent-text); }

/* ===== Sidebar: Arbeitszeit-Uhr (läuft nur bei echter Arbeit) ===== */
.worktime { display: block; background: #fff; border: 1px solid #e7e8ee; border-left: 3px solid #cfd2dc;
  border-radius: 12px; padding: 10px 13px; margin-bottom: 12px; text-decoration: none;
  transition: border-color .2s ease, background .2s ease; }
.worktime.aktiv  { border-left-color: var(--pos);  background: var(--pos-soft); }
.worktime.karenz { border-left-color: var(--warm); background: var(--warm-soft); }
.worktime.pause  { border-left-color: var(--neg);  background: var(--neg-soft); }
a.worktime:hover { text-decoration: none; filter: brightness(.99); }
.wt-lbl { font-size: 11px; color: var(--faint); font-weight: 600; letter-spacing: .3px;
  text-transform: uppercase; margin-top: 9px; }
/* Status-Pille OBEN: weiße Pille, Farbe ueber Text + Punkt (gruen = laeuft, orange = kurz weg, rot = gestoppt) */
.wt-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: .2px; background: #fff;
  box-shadow: 0 1px 2px rgba(20,25,40,.07); }
.wt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wt-status.aktiv  { color: var(--pos-text); }
.wt-status.aktiv  .wt-dot, .wt-dot.aktiv  { background: var(--pos);  animation: wtpulse 2s ease-in-out infinite; }
.wt-status.karenz { color: var(--warm-text); }
.wt-status.karenz .wt-dot, .wt-dot.karenz { background: var(--warm); animation: wtpulse 1.1s ease-in-out infinite; }
.wt-status.pause  { color: var(--neg-text); }
.wt-status.pause  .wt-dot, .wt-dot.pause  { background: var(--neg); }
@keyframes wtpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.wt-clock { font-size: 25px; font-weight: 800; color: var(--ink); line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: .5px; margin-top: 3px; }
.worktime.pause .wt-clock { color: var(--faint); }   /* gestoppt -> Uhr gedaempft (zaehlt nicht) */
/* Tagesziel-Fortschritt (dezent) unter der Uhr */
.wt-goal { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(20,25,40,.08); }
.wtg-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--faint); }
.wtg-top b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.wtg-bar { height: 5px; background: rgba(20,25,40,.08); border-radius: 999px; margin-top: 5px; overflow: hidden; }
.wtg-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s; }

/* Idle-Nudge: dezenter Hinweis bei längerer Untätigkeit (rechts unten) */
.idle-nudge { position: fixed; bottom: 18px; right: 18px; z-index: 80; display: flex; align-items: center; gap: 11px;
  max-width: 330px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(20,25,40,.16); padding: 11px 13px; }
.idle-nudge .in-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--warm-soft); color: var(--warm-text);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.idle-nudge .in-ic svg { width: 16px; height: 16px; }
.idle-nudge .in-tx b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; }
.idle-nudge .in-tx span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.idle-nudge .in-x { background: transparent; border: 0; color: var(--faint); cursor: pointer; padding: 4px; flex-shrink: 0; display: inline-flex; }
.idle-nudge .in-x:hover { color: var(--ink); }
.idle-nudge .in-x svg { width: 15px; height: 15px; }

/* ===== Statistik: Heute-Board (Live-Ranking) + Tagesziele ===== */
.board-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.board-row:last-child { border-bottom: 0; }
.board-rank { width: 26px; height: 26px; border-radius: 50%; background: #eef0f4; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.board-rank.rk1 { background: #fbeec4; color: #92700f; }
.board-rank.rk2 { background: #e9ebef; color: #5f6470; }
.board-rank.rk3 { background: #f4e3d3; color: #875428; }
.board-name { width: 150px; flex-shrink: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-prog { flex: 1; min-width: 0; }
.bp-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.bp-top b { color: var(--ink); }
.bp-extra { color: var(--faint); white-space: nowrap; }
.bp-bar { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bp-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s; }
.bp-bar > span.full { background: var(--pos); }
.ziel-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.ziel-form .fld { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ziel-form .fld input { width: 110px; margin-top: 0; }

/* ===== Pipeline/Kanban: dezente Politur ===== */
.col-head { border-bottom: 1px solid var(--line); }
.pcard { transition: border-color .12s, box-shadow .12s; }
.pcard:hover { border-color: var(--line-strong); box-shadow: 0 2px 8px rgba(20,25,40,.06); }
a.col-more { display: block; text-align: center; font-size: 12px; color: var(--accent-text);
  padding: 7px; text-decoration: none; border-radius: 8px; }
a.col-more:hover { background: var(--accent-soft); text-decoration: none; }
.col-empty { text-align: center; color: var(--faint); font-size: 13px; padding: 16px 0; }
/* Zähler-Badge im Karten-Titel (z. B. Benutzer-Anzahl) */
.card h3 .cnt { background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 700;
  min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center; vertical-align: 1px; }

/* ===== Leads-Seite: Toolbar in EINER Zeile, schlanker Hinweis, Massenleiste nur bei Auswahl ===== */
/* selects sind global width:100% -> im Toolbar (flex) umbrechen sie jeweils in eine eigene Zeile.
   Hier auf Inhaltsbreite begrenzen, damit Suche + Filter sauber nebeneinander stehen. */
.toolbar select { flex: 0 0 auto; width: auto; min-width: 158px; max-width: 230px; }
.toolbar .btn { flex: 0 0 auto; }
/* Massenleiste mit .auto blendet sich aus, solange nichts gewählt ist (Alle-Wählen sitzt im Tabellenkopf) */
.bulkbar.auto:not(.has-sel) { display: none; }
/* Schlanker, ausblendbarer Akquise-Hinweis (ersetzt den großen 4-Schritte-Block) */
.hint-bar { display: flex; align-items: center; gap: 11px; background: var(--accent-soft);
  border: 1px solid #e0ddfb; border-radius: 11px; padding: 9px 13px; margin-bottom: 16px; font-size: 13.5px; color: var(--accent-text); }
.hint-bar .hint-ic { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hint-bar .hint-ic svg { width: 15px; height: 15px; }
.hint-bar .hint-tx { flex: 1; line-height: 1.45; }
.hint-bar .hint-tx b { font-weight: 600; }
.hint-bar .hint-x { flex-shrink: 0; background: transparent; border: 0; color: var(--accent-text); opacity: .6;
  cursor: pointer; padding: 4px; border-radius: 6px; display: inline-flex; }
.hint-bar .hint-x:hover { opacity: 1; background: rgba(91,87,235,.1); }
.hint-bar .hint-x svg { width: 15px; height: 15px; }
.lead-prep-dot { display: inline-flex; }

/* ===== Mein Tag: Funnel-KPIs + Panels ===== */
.sec-label { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--faint); margin: 4px 0 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 12px; margin-bottom: 24px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s, box-shadow .12s; }
a.kpi:hover { transform: translateY(-2px); border-color: var(--line-strong);
  box-shadow: 0 6px 22px rgba(20,25,40,.09); text-decoration: none; }
.kpi-top { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.kpi-ic { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center;
  justify-content: center; background: #eef0f4; color: var(--muted); flex-shrink: 0; }
.kpi-ic svg { width: 17px; height: 17px; }
.kpi-lbl { font-size: 13px; color: var(--muted); font-weight: 600; line-height: 1.25; }
.kpi-num { font-size: 30px; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--faint); margin-top: 5px; }
.kpi.k-accent .kpi-ic { background: var(--accent-soft); color: var(--accent-text); }
.kpi.k-accent .kpi-num { color: var(--accent-text); }
.kpi.k-info   .kpi-ic { background: var(--info-soft); color: var(--info-text); }
.kpi.k-pos    .kpi-ic { background: var(--pos-soft); color: var(--pos-text); }
.kpi.k-pos    .kpi-num { color: var(--pos-text); }
/* Panel-Kopf: Icon in der Überschrift + Zähler-Badge */
.panel-head h3 { display: inline-flex; align-items: center; gap: 8px; }
.panel-head h3 svg { width: 16px; height: 16px; }
.panel-head .cnt { background: var(--accent-soft); color: var(--accent-text); font-size: 12px;
  font-weight: 700; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.empty svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; color: var(--pos-text); }
.lrow .lstat .pill { font-size: 11.5px; }

/* ===== Handy (≤640px): echtes Mobil-Layout — Hamburger-Schublade + Leads als Karten ===== */
@media (max-width: 640px) {
  /* Top-Leiste mit Menü-Button */
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 9px 12px; }
  .topbar-brand { text-decoration: none; }
  .topbar-brand .wd { color: var(--accent); font-weight: 700; font-size: 19px; letter-spacing: -.5px; }
  .topbar-brand .st { color: var(--faint); font-weight: 500; font-size: 13px; }
  .navtoggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 9px; cursor: pointer;
    padding: 0 10px; background: var(--surface); flex-shrink: 0; }
  .navtoggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
  /* Sidebar als Off-Canvas-Schublade; Inhalt volle Breite. Checkbox (#navcb) hält den Zustand. */
  .app { display: block; }
  .sidebar { position: fixed; top: 0; left: 0; height: 100vh; width: 272px; z-index: 70;
    transform: translateX(-100%); transition: transform .22s ease; padding: 16px 12px; }
  .nav-cb:checked ~ .sidebar { transform: none; box-shadow: 6px 0 34px rgba(15,18,28,.28); }
  .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(15,18,28,.46); z-index: 60;
    opacity: 0; pointer-events: none; transition: opacity .2s; }
  .nav-cb:checked ~ .nav-overlay { opacity: 1; pointer-events: auto; }
  .content { width: 100%; }
  .wrap { padding: 0 14px 40px; margin: 14px auto; }
  .wrap.wrap-wide { max-width: none; }
  .head-row { flex-wrap: wrap; gap: 8px; }
  .toolbar, .bulkbar { flex-wrap: wrap; gap: 8px; }
  /* Leads: Tabelle -> Karten (jeder Lead ein Block; Firma + Anruf-Button + Status untereinander) */
  .table thead { display: none; }
  .table, .table tbody, .table tbody tr, .table td { display: block; width: auto; }
  .table tbody tr.clk { padding: 13px 14px; }
  .table td { padding: 1px 0; border: 0; }
  .table td.cbcell, .table td.predot { display: none; }
  .table td .lead-firma { max-width: none; font-size: 15px; }
  .table td.col-branche, .table td.col-ort { display: inline; color: var(--muted); font-size: 12.5px; }
  .table td.col-branche { margin-right: 5px; }
  .table td.tcall, .table td.tstat { margin-top: 9px; }
}

/* ==== Statistik-Neuaufbau: Block-Banner (Zeitraum/Bestand/Heute), Datumsbereich, Bestand-Markierung ==== */
.statband { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; padding: 12px 16px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--surface);
  border-left: 5px solid var(--accent); font-size: 22px; line-height: 1; }
.statband svg { width: 1.15em; height: 1.15em; }
.statband > div { display: flex; flex-direction: column; gap: 3px; }
.statband b { font-size: 15px; color: #111827; }
.statband span { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.statband.zeitraum { border-left-color: var(--accent); background: linear-gradient(90deg, rgba(91,87,235,.07), transparent); }
.statband.bestand  { border-left-color: #d97706; background: linear-gradient(90deg, rgba(217,119,6,.09), transparent); }
.statband.heute    { border-left-color: #16a34a; background: linear-gradient(90deg, rgba(22,163,74,.09), transparent); }

.statfilter .daterange { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; }
.statfilter .daterange input[type=date] { padding: 6px 8px; border: 1px solid var(--line-strong);
  border-radius: 8px; font-size: 13px; background: var(--surface); color: inherit; }
.statfilter .dr-lbl { font-size: 12.5px; color: var(--muted); }

.bestand-chip { display: inline-block; padding: 1px 7px; border-radius: 999px; background: rgba(217,119,6,.12);
  color: #b45309; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.stat-table th.bestand-col, .stat-table td.bestand-col { background: rgba(217,119,6,.05); }
.stat-table th.bestand-col { color: #b45309; }
