/* ============================================================
   LAUSITZ DIGITAL — Admin Control Panel
   Nutzt Tokens aus ../style.css (DESIGN.md ist verbindlich).
   Eine Farbe (Kobalt), Karten mit Elevation, Blueprint-Signatur.
   Spacing-Basis: 4px · Elevation: Canvas=--bg, Karten=--surface+shadow.
   ============================================================ */

:root {
  --bp-grid: linear-gradient(var(--grid-line) 1px, transparent 1px),
             linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
}

body.admin {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  font-family: var(--font-body);
  color: var(--ink-soft);
}

/* ---------- Sidebar: gleicher Ton wie Canvas, nur Border trennt ---------- */
.admin-side {
  width: 244px;
  flex: 0 0 244px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  min-height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.admin-brand img { width: 30px; height: 30px; }
.admin-brand strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -.01em;
  display: block;
  line-height: 1.15;
}
.admin-brand span {
  display: block;
  font-size: 11px;
  color: var(--muted-soft);
  font-weight: 500;
  letter-spacing: .02em;
}
.admin-navlabel {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted-soft); padding: 0 12px; margin: 8px 0 8px;
}
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.admin-nav a svg { width: 18px; height: 18px; stroke: currentColor; flex: none; }
.admin-nav a:hover { background: var(--surface); color: var(--ink); }
.admin-nav a.active { background: var(--brand-50); color: var(--brand-dark); font-weight: 600; }
/* Blueprint-Tick am aktiven Punkt */
.admin-nav a.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  background: var(--brand); border-radius: var(--r-pill);
}
.admin-nav .nav-badge {
  margin-left: auto;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums;
}
/* User-Chip unten */
.admin-user {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
}
.admin-user .ava {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
}
.admin-user b { display: block; font-size: 13px; color: var(--ink); font-weight: 700; line-height: 1.2; }
.admin-user span { display: block; font-size: 11.5px; color: var(--muted-soft); }

/* ---------- Main ---------- */
.admin-main { flex: 1; min-width: 0; }
.admin-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 34px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
/* Blueprint-Signaturband im Header, nach rechts ausgefadet */
.admin-top::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--bp-grid); background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent 55%, #000);
  mask-image: linear-gradient(90deg, transparent 55%, #000);
  opacity: .8;
}
.admin-top > * { position: relative; z-index: 1; }
.admin-top h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -.01em;
}
.admin-top p { font-size: 13px; color: var(--muted-soft); margin: 3px 0 0; }
.admin-top-actions { display: flex; align-items: center; gap: 10px; }

.range-tabs {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 2px;
}
.range-tabs a {
  padding: 7px 15px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.range-tabs a:hover { color: var(--ink); }
.range-tabs a.active { background: var(--brand); color: #fff; box-shadow: var(--shadow-blue-sm); }

.admin-body { padding: 28px 34px 64px; max-width: 1340px; }

/* Sektion-Überschrift mit Blueprint-Tick */
.sec-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink);
  margin: 30px 0 14px; letter-spacing: -.01em;
}
.sec-title::before {
  content: ""; width: 3px; height: 16px; background: var(--brand); border-radius: var(--r-pill);
}
.sec-title:first-child { margin-top: 0; }

/* ---------- Overview: Live-Hero + 2×2 Strip ---------- */
.overview {
  display: grid; gap: 16px; grid-template-columns: 1fr;
}
@media (min-width: 960px) { .overview { grid-template-columns: minmax(300px, 348px) 1fr; align-items: stretch; } }

.stat-hero {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 24px 24px;
  display: flex; flex-direction: column;
}
.stat-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--bp-grid); background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(130% 90% at 100% 0, #000, transparent 68%);
  mask-image: radial-gradient(130% 90% at 100% 0, #000, transparent 68%);
}
.stat-hero > * { position: relative; z-index: 1; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  color: var(--brand-dark);
}
.hero-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(46px, 6vw, 60px); line-height: 1; color: var(--ink);
  margin: 14px 0 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.hero-sub { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.hero-live-list {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 9px;
}
.hero-live-list .hll-cap {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-soft);
  margin-bottom: 1px;
}
.hll-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-soft); }
.hll-row code {
  font-family: var(--font-body); color: var(--brand-dark); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hll-row .hll-city { margin-left: auto; color: var(--muted-soft); font-size: 12px; flex: none; }

.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); flex: none;
  box-shadow: 0 0 0 0 rgba(37,99,235,.5);
  animation: livepulse 1.8s infinite;
}
@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,.45); }
  70% { box-shadow: 0 0 0 7px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

.stat-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
/* KPI-Raster für Analyse-Seiten (2 mobil, 4 ab Desktop) */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 1000px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.stat-cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.stat-cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hv); }
.stat-cell .sc-label {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted-soft);
}
.stat-cell .sc-val {
  font-family: var(--font-display); font-size: clamp(26px, 3vw, 32px); font-weight: 700;
  color: var(--ink); margin: 12px 0 4px; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.sc-delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.sc-delta.up { color: var(--ok); }
.sc-delta.down { color: var(--muted-soft); }

/* ---------- Panels / grid ---------- */
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 1080px) {
  .dash-grid { grid-template-columns: 1.6fr 1fr; }
  .dash-grid.even { grid-template-columns: 1fr 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 24px 24px;
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.panel-head h2 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -.01em;
}
.panel-head a { font-size: 13px; font-weight: 600; color: var(--brand-dark); text-decoration: none; }
.panel-head a:hover { text-decoration: underline; }
.panel-cap { font-size: 12.5px; color: var(--muted-soft); font-weight: 500; }

/* Bar chart (pure CSS) */
.barchart { display: flex; align-items: flex-end; gap: 7px; height: 190px; padding-top: 10px; }
.barchart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.barchart .bar {
  width: 100%; max-width: 28px;
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  border-radius: 6px 6px 2px 2px;
  box-shadow: var(--shadow-blue-sm);
  transition: filter var(--dur-1) var(--ease);
}
.barchart .bar-col:hover .bar { filter: saturate(1.15) brightness(1.05); }
.barchart .bar-col span { font-size: 10.5px; color: var(--muted-soft); font-weight: 500; font-variant-numeric: tabular-nums; }

.rank-list { display: flex; flex-direction: column; }
.rank-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
}
.rank-row:last-child { border-bottom: none; }
.rank-row .path { color: var(--ink); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-row .views { color: var(--muted); font-variant-numeric: tabular-nums; width: 48px; text-align: right; font-weight: 600; }
.rank-bar-track { flex: 1; height: 6px; background: var(--line-soft); border-radius: var(--r-pill); overflow: hidden; max-width: 96px; }
.rank-bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: var(--r-pill); }

.src-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.src-row:last-child { border-bottom: none; }
.src-row .dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; display: inline-block; }
.src-row .pct { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Stat-Rows mit Balken (Geräte, Browser, Angebote, Herkunft) */
.stat-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.stat-row:last-child { border-bottom: none; }
.stat-row .stat-ico { width: 20px; height: 20px; flex: none; color: var(--muted-soft); }
.stat-row .stat-ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.stat-row .stat-label { color: var(--ink); font-weight: 600; flex: none; width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row .stat-track { flex: 1; height: 8px; background: var(--line-soft); border-radius: var(--r-pill); overflow: hidden; }
.stat-row .stat-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); border-radius: var(--r-pill); }
.stat-row .stat-pct { font-weight: 700; color: var(--ink); width: 42px; text-align: right; font-variant-numeric: tabular-nums; }

/* Angebots-Tag (Interesse) — durchgehendes Motiv */
.offer-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: var(--r-pill); background: var(--brand-tint); color: var(--brand-dark); font-size: 12px; font-weight: 700; white-space: nowrap; }
.offer-tag.growing { background: #EDE9FE; color: #6D28D9; }
.offer-tag.enterprise { background: #FEF3C7; color: #92400E; }
.offer-tag.none { background: var(--surface-2); color: var(--muted-soft); border: 1px solid var(--line); }

/* Monatsbericht */
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.report-prog { font-size: 13px; color: var(--muted); }
.report-list { display: flex; flex-direction: column; }
.report-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.report-row:last-child { border-bottom: none; }
.report-ico { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--brand-50); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; flex: none; }
.report-ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.report-meta { flex: 1; min-width: 0; }
.report-meta strong { display: block; color: var(--ink); font-size: 14px; font-weight: 700; }
.report-meta span { display: block; color: var(--muted-soft); font-size: 12.5px; margin-top: 1px; }
.report-dl {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm);
  padding: 8px 15px; font-size: 13px; font-weight: 600; color: var(--brand-dark); text-decoration: none;
  cursor: pointer; flex: none; transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.report-dl:hover { border-color: var(--brand); background: var(--brand-50); }
.report-dl.solid { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-blue-sm); }
.report-dl.solid:hover { background: var(--brand-dark); }

/* ---------- Anfragen: Filter + Lead-Karten ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.filter-bar input[type="search"] {
  flex: 1; min-width: 220px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r); padding: 11px 15px; font-size: 14px; color: var(--ink);
  font-family: var(--font-body);
}
.filter-bar input[type="search"]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.chip {
  padding: 8px 15px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted);
  text-decoration: none; transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--muted-soft); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--shadow-blue-sm); }
.chip .chip-n { margin-left: 6px; opacity: .7; font-variant-numeric: tabular-nums; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.new { background: var(--brand-50); color: var(--brand-dark); }
.badge.progress { background: #FEF3C7; color: #92400E; }
.badge.done { background: transparent; color: var(--muted-soft); border-color: var(--line-strong); }
.badge.accepted { background: #DCFCE7; color: var(--ok); }
.badge.rejected { background: transparent; color: var(--muted-soft); border-color: var(--line-strong); }

/* ---------- Anfragen: schlichte Tabelle ---------- */
.leadtable-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); overflow: hidden;
}
table.leadtable { width: 100%; border-collapse: collapse; }
table.leadtable th {
  text-align: left; padding: 14px 22px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted-soft);
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.leadtable td { padding: 16px 22px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: middle; }
table.leadtable tbody tr:last-child td { border-bottom: none; }
table.leadtable tbody tr { cursor: pointer; transition: background var(--dur-1) var(--ease); }
table.leadtable tbody tr:hover td { background: var(--surface-2); }
table.leadtable tbody tr:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.lt-name { font-weight: 700; color: var(--ink); }
.lt-name span { display: block; font-weight: 500; color: var(--muted-soft); font-size: 12.5px; margin-top: 2px; }
.lt-appt { color: var(--ink-soft); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lt-appt.none { color: var(--muted-soft); font-weight: 500; }
.lt-chev { color: var(--muted-soft); text-align: right; width: 20px; font-size: 18px; }
/* Statische Datentabelle (Seiten-Analyse): kein Klick-Cursor, rechtsbündige Zahlen */
table.leadtable.static tbody tr { cursor: default; }
table.leadtable th.num, table.leadtable td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lt-path { font-weight: 600; color: var(--ink); }

@media (max-width: 640px) {
  table.leadtable th.col-opt, table.leadtable td.col-opt { display: none; }
  table.leadtable th, table.leadtable td { padding: 14px 16px; }
}

/* ---------- Terminplaner (Agenda nach Tag) ---------- */
.agenda { display: flex; flex-direction: column; gap: 20px; }
.agenda-day {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.ag-dayhead {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.ag-daydate { display: flex; align-items: baseline; gap: 10px; }
.ag-daydate b { font-size: 15px; color: var(--ink); font-weight: 700; }
.ag-daydate span { font-size: 13px; color: var(--muted-soft); font-variant-numeric: tabular-nums; }
.ag-rel {
  margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--brand-dark); background: var(--brand-50); padding: 3px 10px; border-radius: var(--r-pill);
}
.ag-list { display: flex; flex-direction: column; }

.ag-row {
  display: grid; grid-template-columns: 64px 1fr auto auto; align-items: center; gap: 16px;
  padding: 14px 22px; border-bottom: 1px solid var(--line-soft); cursor: pointer;
  transition: background var(--dur-1) var(--ease);
}
.ag-row:last-child { border-bottom: none; }
.ag-row:hover { background: var(--surface-2); }
.ag-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ag-row.status-abgelehnt { opacity: .55; }
.ag-row.status-abgelehnt .ag-name { text-decoration: line-through; }

.ag-time {
  font-size: 16px; font-weight: 700; color: var(--brand-dark);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.ag-info { min-width: 0; }
.ag-name { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.ag-contact { font-size: 12.5px; color: var(--muted-soft); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-contact a { color: var(--muted); text-decoration: none; }
.ag-contact a:hover { color: var(--brand-dark); text-decoration: underline; }

.ag-actions { display: flex; gap: 8px; }
.ag-btn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--muted); white-space: nowrap;
  transition: all var(--dur-1) var(--ease);
}
.ag-btn:disabled { opacity: .5; cursor: default; }
.ag-btn.accept { background: var(--ok); border-color: var(--ok); color: #fff; }
.ag-btn.accept:hover:not(:disabled) { filter: brightness(.94); }
.ag-btn.reject:hover:not(:disabled) { color: var(--error); border-color: var(--error); }
.ag-btn.move:hover:not(:disabled) { color: var(--brand-dark); border-color: var(--brand); }

/* Verschieben-Dialog: Datum/Uhrzeit */
.rx-fields { display: flex; gap: 14px; flex-wrap: wrap; }
.rx-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); flex: 1; min-width: 150px; }
.rx-fields input {
  font: inherit; font-size: 15px; color: var(--ink);
  padding: 11px 13px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2);
}
.rx-fields input:focus { outline: none; border-color: var(--brand); background: var(--surface); }
.rx-hint { margin-top: 14px; font-size: 12.5px; color: var(--muted-soft); }

@media (max-width: 640px) {
  .ag-row { grid-template-columns: 52px 1fr; row-gap: 10px; }
  .ag-status { grid-column: 2; }
  .ag-actions { grid-column: 1 / -1; }
  .ag-btn { flex: 1; text-align: center; }
}

.leads-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 22px; font-size: 13px; color: var(--muted-soft); font-variant-numeric: tabular-nums;
}
.leads-foot .pager { display: flex; gap: 8px; }
.leads-foot .pager a {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm);
  padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none;
}
.leads-foot .pager a:hover { color: var(--brand-dark); border-color: var(--brand); }
.leads-foot .pager a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Lead-Modal (kompakt, öffnet auf Klick) ---------- */
dialog.lmodal {
  border: none; border-radius: var(--r-lg); padding: 0; width: min(460px, 92vw);
  box-shadow: var(--shadow-lg); color: var(--ink-soft); font-family: var(--font-body);
}
dialog.lmodal::backdrop { background: rgba(15,23,42,.45); }
.lm-head { position: relative; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.lm-head h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink); margin: 0; padding-right: 36px; letter-spacing: -.01em; }
.lm-head p { font-size: 13px; color: var(--muted-soft); margin: 3px 0 0; }
.lm-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); cursor: pointer;
  font-size: 18px; line-height: 1;
}
.lm-close:hover { color: var(--brand-dark); border-color: var(--brand); }
.lm-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 22px; }
.lm-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-soft); margin: 0 0 12px; }
.lm-facts { display: flex; flex-direction: column; gap: 10px; }
.lm-fact { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; }
.lm-fact .k { color: var(--muted-soft); flex: none; }
.lm-fact .v { color: var(--ink); font-weight: 600; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-fact .v a { color: var(--brand-dark); text-decoration: none; }
.lm-fact .v a:hover { text-decoration: underline; }
.lm-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lm-steps li { position: relative; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.lm-steps li::before { content: ""; position: absolute; left: 0; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.lm-steps li.on { color: var(--ink); font-weight: 600; }
.lm-steps li.on::before { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.lm-steps li b { color: var(--muted-soft); font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 6px; }
.lm-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.lm-foot button { flex: 1; text-align: center; padding: 11px 14px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: var(--font-body); }
.lm-primary { background: var(--brand); border: 1px solid var(--brand); color: #fff; box-shadow: var(--shadow-blue-sm); }
.lm-primary:hover { background: var(--brand-dark); }
.lm-ghost { background: var(--surface); border: 1px solid var(--line-strong); color: var(--muted); }
.lm-ghost:hover { color: var(--error); border-color: var(--error); }

/* ---------- Mobile ---------- */
.menu-btn { display: none; }
.side-overlay { display: none; }

@media (max-width: 720px) {
  .admin-side { position: fixed; left: -260px; z-index: 20; box-shadow: var(--shadow-lg); transition: left var(--dur-2) var(--ease); background: var(--surface); }
  .admin-side.open { left: 0; }
  .admin-top { padding: 16px 18px; }
  .admin-body { padding: 20px 18px 60px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--r-sm);
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
    margin-right: 4px;
  }
  .side-overlay.open { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 19; }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .stat-cell, .barchart .bar, .chip, .range-tabs a, table.leadtable tbody tr { transition: none; }
}

/* --- Tracking / Analytics-Panels (dynamisch befüllt via admin.js) --- */
.admin-state {
  margin: 0 0 16px; padding: 12px 16px;
  background: var(--brand-tint); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--ink-soft); font-size: .9rem;
}
.admin-empty {
  margin: 4px 0; color: var(--muted); font-size: .9rem;
}
.admin-empty code {
  background: var(--brand-tint); padding: 1px 6px; border-radius: var(--r-sm);
  font-size: .85em; color: var(--brand-dark);
}
.camp-metric {
  min-width: 84px; text-align: right; color: var(--ink-soft);
  font-size: .85rem; font-variant-numeric: tabular-nums;
}
.admin-code {
  margin: 0; padding: 12px 14px; overflow-x: auto;
  background: var(--ink); color: #fff; border-radius: var(--r-sm);
  font-size: .82rem; line-height: 1.5;
}

/* ---------- Login-Seite ---------- */
.login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: var(--surface-2); padding: 24px; }
.login-wrap { width: 100%; max-width: 380px; }
.login-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); padding: 34px 30px; display: flex; flex-direction: column; gap: 14px;
}
.login-logo { width: 46px; height: 46px; margin: 0 auto 4px; }
.login-card h1 { text-align: center; font-size: 21px; color: var(--ink); margin: 0; }
.login-sub { text-align: center; color: var(--muted-soft); font-size: 14px; margin: 0 0 8px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.login-card input {
  font: inherit; font-size: 15px; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface-2);
}
.login-card input:focus { outline: none; border-color: var(--brand); background: var(--surface); }
.login-error { margin: 0; color: var(--error); font-size: 13px; font-weight: 600; }
.login-btn {
  margin-top: 6px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  padding: 13px; border: none; border-radius: var(--r-sm); background: var(--brand); color: #fff;
  box-shadow: var(--shadow-blue-sm); transition: background var(--dur-1) var(--ease);
}
.login-btn:hover:not(:disabled) { background: var(--brand-dark); }
.login-btn:disabled { opacity: .7; cursor: default; }
.login-foot { text-align: center; color: var(--muted-soft); font-size: 12px; margin-top: 18px; }

/* Logout-Button im Seitenmenü */
.logout-btn {
  margin-left: auto; flex: none; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface);
  color: var(--muted-soft); cursor: pointer;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.logout-btn:hover { color: var(--error); border-color: var(--error); }
