/* LeadRadar – Weiß, Signalblau, Tintennavy. Ein prägendes Element: die Score-Ringe. */
:root {
  --paper: #ffffff;
  --wash: #f4f7fd;
  --wash-2: #eaf0fc;
  --line: #e2e8f2;
  --line-2: #cfd8e8;
  --ink: #0f1a2e;
  --ink-2: #33405a;
  --slate: #5d6880;
  --blue: #1f4fe0;
  --blue-700: #173eb3;
  --blue-50: #eef3ff;
  --blue-100: #dbe5ff;
  --moss: #157a47;
  --moss-50: #e7f5ed;
  --amber: #a85f00;
  --amber-50: #fff3df;
  --brick: #c0362c;
  --brick-50: #fdecea;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(15, 26, 46, 0.05), 0 8px 24px -12px rgba(15, 26, 46, 0.14);
  --font: 'Avenir Next', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --nav-w: 236px;
  --top-h: 56px;
  --tab-h: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;
}
body.no-scroll { overflow: hidden; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.012em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0; }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.muted { color: var(--slate); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 24px; }
.grow { flex: 1; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Layout ---------- */
.app { min-height: 100vh; }
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--nav-w);
  border-right: 1px solid var(--line); background: var(--paper);
  display: flex; flex-direction: column; padding: 18px 12px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 750; font-size: 17px; color: var(--ink); letter-spacing: -0.02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); position: relative; overflow: hidden; flex: none; }
.brand-mark::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.55); }
.brand-mark::after { content: ''; position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(255,255,255,.75), transparent 28%); animation: sweep 3.2s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.nav-group { margin-top: 14px; }
.nav-group > span { display: block; font-size: 12px; color: var(--slate); padding: 0 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  color: var(--ink-2); font-weight: 550; text-decoration: none;
}
.nav a:hover { background: var(--wash); }
.nav a.active { background: var(--blue-50); color: var(--blue-700); }
.nav a .count { margin-left: auto; font-size: 12px; background: var(--brick); color: #fff; border-radius: 99px; padding: 0 7px; line-height: 18px; }
.rail-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 10px 0; display: grid; gap: 8px; font-size: 13px; }
.cost { display: inline-flex; align-items: center; gap: 6px; color: var(--slate); }
.main { margin-left: var(--nav-w); min-height: 100vh; }
.page { max-width: 1180px; margin: 0 auto; padding: 28px 32px 80px; }
.page-narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { color: var(--slate); margin-top: 4px; max-width: 62ch; }

.topbar, .tabbar { display: none; }

@media (max-width: 960px) {
  .rail { display: none; }
  .main { margin-left: 0; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
  .page { padding: 16px 16px 40px; }
  h1 { font-size: 22px; }
  .topbar {
    display: flex; position: sticky; top: 0; z-index: 30; height: var(--top-h);
    align-items: center; justify-content: space-between; padding: 0 16px;
    background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  }
  .topbar .brand { padding: 0; font-size: 16px; }
  .topbar .brand-mark { width: 26px; height: 26px; }
  .topbar .title { font-weight: 650; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 11px; font-weight: 600; color: var(--slate); background: none; border: 0; text-decoration: none; position: relative;
  }
  .tabbar .i { width: 22px; height: 22px; }
  .tabbar .active { color: var(--blue); }
  .tabbar .dot { position: absolute; top: 9px; right: calc(50% - 18px); min-width: 16px; height: 16px; border-radius: 9px; background: var(--brick); color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; }
}

/* ---------- Bausteine ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--paper); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--wash); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-700); }
.btn-soft { background: var(--blue-50); border-color: var(--blue-50); color: var(--blue-700); }
.btn-soft:hover { background: var(--blue-100); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { background: var(--brick); border-color: var(--brick); color: #fff; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; font-size: 16px; padding: 0 20px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; padding: 0; border-radius: 9px; }

.input, select.input, textarea.input {
  width: 100%; height: 42px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper);
  padding: 0 12px; outline: none;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 90px; line-height: 1.5; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

.panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.panel-pad { padding: 20px; }
.panel-wash { background: var(--wash); border-color: transparent; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--wash-2); color: var(--ink-2); white-space: nowrap; }
.pill-bad { background: var(--brick-50); color: var(--brick); }
.pill-good { background: var(--moss-50); color: var(--moss); }
.pill-mid { background: var(--amber-50); color: var(--amber); }
.pill-blue { background: var(--blue-50); color: var(--blue-700); }
.pill-grey { background: #eef0f4; color: var(--slate); }
.pill-glf { background: #fff0e5; color: #b4410b; }
.pot-hoch { background: var(--blue); color: #fff; }
.pot-mittel { background: var(--blue-100); color: var(--blue-700); }
.pot-niedrig { background: #eef0f4; color: var(--slate); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--wash-2); color: var(--ink-2); font-size: 12px; font-weight: 550; }

.seg { display: inline-flex; background: var(--wash); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--slate); cursor: pointer; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(15,26,46,.12); }

/* Score-Ring */
.ring { position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 3.2; }
.ring .ring-bg { stroke: var(--line); }
.ring .ring-fg { stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.ring-good .ring-fg { stroke: var(--moss); }
.ring-mid .ring-fg { stroke: var(--amber); }
.ring-bad .ring-fg { stroke: var(--brick); }
.ring b { font-size: calc(var(--s) * .34); font-weight: 700; position: relative; }
.ring-good b { color: var(--moss); }
.ring-mid b { color: var(--amber); }
.ring-bad b { color: var(--brick); }
.ring-none b { color: #a5adbd; }
.ring i { position: absolute; bottom: -15px; font-style: normal; font-size: 10.5px; color: var(--slate); white-space: nowrap; }

/* Chips-Eingabe */
.chips-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 48px; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--paper); cursor: text; }
.chips-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.chips-input input { border: 0; outline: none; flex: 1; min-width: 120px; height: 34px; background: transparent; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px 0 12px; border-radius: 8px; background: var(--blue-50); color: var(--blue-700); font-weight: 600; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; }
.chip button:hover { background: var(--blue-100); }

/* ---------- Suche ---------- */
.search-box { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--wash) 0%, var(--paper) 100%); }
.search-grid { display: grid; grid-template-columns: 1.3fr 1fr 150px; gap: 12px; align-items: end; }
@media (max-width: 760px) { .search-grid { grid-template-columns: 1fr; } }
.search-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.linkish { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.linkish:hover { text-decoration: underline; }
.recent { display: flex; gap: 6px; flex-wrap: wrap; }
.recent button { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 4px 12px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.recent button:hover { border-color: var(--blue); color: var(--blue); }

.progress-card { margin-top: 18px; border-radius: var(--r-lg); background: var(--ink); color: #fff; padding: 18px 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.progress-card .radar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(121,160,255,.5); position: relative; overflow: hidden; }
.progress-card .radar::after { content: ''; position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(121,160,255,.9), transparent 30%); animation: sweep 2s linear infinite; }
.progress-card .pct { font-size: 30px; font-weight: 750; color: #9db9ff; }
.progress-card .steps { display: grid; gap: 8px; }
.progress-card .step { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; color: #c4cee3; }
.progress-card .bar { grid-column: 1 / -1; height: 5px; background: rgba(255,255,255,.12); border-radius: 9px; overflow: hidden; }
.progress-card .bar i { display: block; height: 100%; background: #7da2ff; border-radius: 9px; transition: width .5s ease; }
.progress-card h3 { color: #fff; font-size: 15px; margin-bottom: 4px; }
@media (max-width: 600px) { .progress-card { grid-template-columns: 1fr auto; } .progress-card .radar { display: none; } }

.result-head { margin: 26px 0 12px; display: grid; gap: 12px; }
.quick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.quick button { flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 8px 12px; cursor: pointer; text-align: left; }
.quick button b { display: block; font-size: 18px; line-height: 1.1; }
.quick button span { font-size: 12px; color: var(--slate); }
.quick button.on { border-color: var(--blue); background: var(--blue-50); }
.quick button.on b { color: var(--blue-700); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.hidden-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate); }

.leads { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.lead {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-top: 1px solid var(--line); cursor: pointer; background: var(--paper);
}
.lead:first-child { border-top: 0; }
.lead:hover { background: #fafbfe; }
.lead .sel { width: 18px; height: 18px; accent-color: var(--blue); }
.lead-main { min-width: 0; display: grid; gap: 3px; }
.lead-name { font-weight: 650; font-size: 15.5px; }
.lead-sub { font-size: 13.5px; color: var(--slate); }
.lead-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.lead-scores { display: flex; gap: 14px; align-items: center; padding-bottom: 12px; }
.lead-right { display: flex; align-items: center; gap: 6px; }
.lead .pending { font-size: 12px; color: var(--slate); display: inline-flex; align-items: center; gap: 6px; }
.lead .pending::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }
.lead.no-sel { grid-template-columns: 1fr auto auto; }
@media (max-width: 640px) {
  .lead { grid-template-columns: 1fr auto; gap: 10px; padding: 14px; }
  .lead .sel { display: none; }
  .lead.no-sel { grid-template-columns: 1fr auto; }
  .lead-right { display: none; }
  .toolbar .spacer { display: none; }
  .toolbar [data-q-input] { order: 9; flex: 1 1 100%; width: 100% !important; }
  .toolbar [data-sort] { flex: 1 1 150px; min-width: 0; }
  .toolbar .seg { order: 8; }
  .lead-scores { gap: 10px; }
}

.empty { text-align: center; padding: 48px 20px; color: var(--slate); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* Popover / Filter */
.popover { position: absolute; z-index: 50; margin-top: 6px; width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; }
.filter-group { border-bottom: 1px solid var(--line); padding: 8px 8px 10px; }
.filter-group:last-child { border-bottom: 0; }
.filter-group h4 { font-size: 13px; color: var(--slate); font-weight: 650; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.filter-opt { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 14.5px; }
.filter-opt input { width: 18px; height: 18px; accent-color: var(--blue); }
.filter-opt .n { margin-left: auto; color: var(--slate); font-size: 13px; }
.filter-opt select { height: 32px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 6px; }

/* ---------- Sheet / Drawer ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15,26,46,.38); opacity: 0; transition: opacity .2s; }
.sheet {
  position: relative; background: var(--paper); border-radius: 18px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px);
  overflow: auto; box-shadow: 0 20px 60px -20px rgba(15,26,46,.4); transform: translateY(12px); opacity: 0; transition: transform .2s ease, opacity .2s ease;
}
.sheet-wide .sheet { width: min(860px, calc(100vw - 24px)); }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; opacity: 1; }
.sheet-side { justify-content: flex-end; align-items: stretch; }
.sheet-side .sheet { width: min(720px, 100vw); max-height: none; height: 100%; border-radius: 0; transform: translateX(30px); }
@media (max-width: 760px) {
  .sheet-wrap { align-items: flex-end; }
  .sheet, .sheet-wide .sheet { width: 100vw; border-radius: 18px 18px 0 0; max-height: 92vh; transform: translateY(30px); }
  .sheet-side { align-items: flex-end; }
  .sheet-side .sheet { height: 94vh; border-radius: 18px 18px 0 0; transform: translateY(30px); }
}
.sheet-head { position: sticky; top: 0; z-index: 2; background: var(--paper); padding: 18px 20px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.sheet-body { padding: 18px 20px 28px; }
.sheet-foot { position: sticky; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); padding: 12px 20px; }
.dialog { padding: 22px; }
.dialog p { font-size: 15.5px; }

/* Lead-Details */
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-actions .wide { grid-column: 1 / -1; }
.contact-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 12px -20px 0; padding: 0 20px; }
.contact-row > a, .contact-row > span { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 550; font-size: 14px; max-width: 280px; }
.contact-row a:hover { border-color: var(--blue); text-decoration: none; }
.score-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 18px; padding: 14px 6px 22px; border: 1px solid var(--line); border-radius: 14px; }
.score-strip > div { display: grid; justify-items: center; gap: 2px; }
.score-strip .grade { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 17px; }
@media (max-width: 520px) { .score-strip { grid-template-columns: repeat(3, 1fr); row-gap: 26px; } }
.pitch { margin-top: 16px; border-left: 3px solid var(--blue); background: var(--wash); border-radius: 0 14px 14px 0; padding: 14px 16px; }
.pitch-text { margin-top: 8px; font-size: 15px; line-height: 1.6; }
.pitch-text.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 20px; margin: 22px -20px 0; position: sticky; top: 0; background: var(--paper); z-index: 1; }
.tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab-body { padding-top: 18px; display: grid; gap: 18px; }
.bigscore { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bigscore b { font-size: 40px; font-weight: 750; line-height: 1; }
.bigscore .of { color: var(--slate); font-size: 15px; }
.t-good { color: var(--moss); } .t-mid { color: var(--amber); } .t-bad { color: var(--brick); } .t-none { color: #a5adbd; }
.issues { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.issues li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 11px 13px; border-radius: 11px; background: #fdf6f5; border: 1px solid #f6dcd8; font-size: 14.5px; }
.issues li .n { width: 22px; height: 22px; border-radius: 6px; background: var(--brick-50); color: var(--brick); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.issues.good li { background: #f4fbf6; border-color: #d6eedf; }
.issues.good li .n { background: var(--moss-50); color: var(--moss); }
.issues.plain li { background: var(--wash); border-color: transparent; }
.issues.plain li .n { background: var(--blue-100); color: var(--blue-700); }
.label-row { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; margin-bottom: 8px; }
.label-row.bad { color: var(--brick); } .label-row.good { color: var(--moss); }
.dims { display: grid; gap: 10px; }
.dim { display: grid; grid-template-columns: 150px 1fr 26px; gap: 4px 12px; align-items: center; }
.dim .bar { height: 7px; background: var(--wash-2); border-radius: 9px; overflow: hidden; }
.dim .bar i { display: block; height: 100%; border-radius: 9px; }
.dim .note { grid-column: 1 / -1; font-size: 13px; color: var(--slate); margin-top: -2px; }
@media (max-width: 520px) { .dim { grid-template-columns: 1fr 70px 22px; } }
.kv { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kv > div { padding: 9px 12px; border-top: 1px solid var(--line); font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-child(-n+2) { border-top: 0; }
.kv > div:nth-child(odd) { color: var(--slate); background: #fafbfe; }
.shot { max-height: 340px; object-fit: cover; object-position: top; width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; cursor: zoom-in; background: var(--wash); }
.shot-mobile { max-width: 210px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.metric { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.metric b { display: block; font-size: 18px; }
.metric span { font-size: 12px; color: var(--slate); }
.stars { color: #e3a008; letter-spacing: 1px; }
.review { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }

/* Export */
.col-list { display: grid; gap: 6px; }
.col-item { display: grid; grid-template-columns: 26px 22px 1fr auto auto; align-items: center; gap: 8px; height: 46px; padding: 0 8px; border: 1px solid var(--blue-100); background: #f7f9ff; border-radius: 10px; }
.col-item .grip { cursor: grab; color: #9aa5bb; display: grid; place-items: center; touch-action: none; }
.col-item input { width: 18px; height: 18px; accent-color: var(--blue); }
.col-item .pos { font-size: 12px; color: #9aa5bb; width: 22px; text-align: right; }
.col-item .arrows { display: flex; }
.col-item .arrows button { width: 28px; height: 28px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--slate); }
.col-item .arrows button:hover { background: var(--blue-100); }
.col-item.drop-before { box-shadow: 0 -3px 0 var(--blue); }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 999; pointer-events: none; opacity: .92; box-shadow: 0 12px 30px -8px rgba(15,26,46,.35); }
.drag-source { opacity: .35; }
.col-add { display: grid; gap: 4px; }
.col-add h4 { font-size: 13px; color: var(--slate); margin: 10px 0 2px; }

/* ---------- CRM ---------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font-size: 22px; letter-spacing: -0.02em; }
.stat span { font-size: 12.5px; color: var(--slate); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; } .stats .stat:nth-child(n+4) { display: none; } .stat { padding: 10px 12px; } .stat b { font-size: 18px; } }
.due-strip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--amber-50); color: #6b3e00; margin-bottom: 16px; font-weight: 550; flex-wrap: wrap; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 16px; align-items: flex-start; scroll-snap-type: x proximity; min-height: 60vh; }
.col { flex: 0 0 286px; background: var(--wash); border-radius: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 210px); scroll-snap-align: start; }
@media (max-width: 960px) { .col { flex-basis: 82vw; max-height: none; } }
.col-head { padding: 12px 12px 8px; display: grid; gap: 2px; }
.col-head .row { font-weight: 650; }
.col-head .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.col-head .sum { font-size: 12.5px; color: var(--slate); padding-left: 18px; }
.col-cards { padding: 4px 8px 10px; display: grid; gap: 8px; overflow-y: auto; min-height: 60px; align-content: start; }
.col.drop-target { outline: 2px dashed var(--blue); outline-offset: -2px; background: var(--blue-50); }
.kcard { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; display: grid; gap: 6px; cursor: pointer; user-select: none; position: relative; }
.kcard:hover { border-color: var(--line-2); box-shadow: 0 2px 8px -4px rgba(15,26,46,.18); }
.kcard.drop-before::before { content: ''; position: absolute; left: 0; right: 0; top: -6px; height: 3px; border-radius: 2px; background: var(--blue); }
.kcard .name { font-weight: 650; padding-right: 26px; }
.kcard .drag-handle { position: absolute; top: 6px; right: 4px; width: 30px; height: 30px; display: grid; place-items: center; color: #a3adc0; border: 0; background: none; touch-action: none; cursor: grab; border-radius: 6px; }
.kcard .foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--slate); }
.kcard .owner { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--blue-100); color: var(--blue-700); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.due { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.due.over { color: var(--brick); } .due.today { color: var(--amber); }
.col-add-btn { margin: 0 8px 10px; }

.table-wrap { border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 650; font-size: 12.5px; color: var(--slate); padding: 10px 12px; background: #fafbfe; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #fafbfe; }
.table input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--blue); }
.bulkbar { position: sticky; bottom: 12px; z-index: 5; margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; background: var(--ink); color: #fff; border-radius: 14px; }
.bulkbar select, .bulkbar .btn { height: 34px; }
@media (max-width: 960px) { .bulkbar { bottom: calc(var(--tab-h) + 12px); } }

/* Lead-Akte */
.dossier { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .dossier { grid-template-columns: 1fr; } .dossier > :last-child { order: -1; } }
.stagebar { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.stagebar button { flex: none; border: 1px solid var(--line); background: var(--paper); height: 34px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--slate); display: inline-flex; align-items: center; gap: 6px; }
.stagebar button .dot { width: 8px; height: 8px; border-radius: 50%; }
.stagebar button.on { color: #fff; border-color: transparent; }
.efield { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; padding: 4px 0; }
.efield > span { font-size: 13px; color: var(--slate); }
.efield input { border: 1px solid transparent; background: transparent; height: 36px; border-radius: 8px; padding: 0 8px; width: 100%; min-width: 0; }
.efield input:hover { border-color: var(--line); }
.efield input:focus { border-color: var(--blue); background: var(--paper); outline: none; box-shadow: 0 0 0 3px var(--blue-100); }
.composer { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.outcomes { display: flex; flex-wrap: wrap; gap: 6px; }
.outcomes button { border: 1px solid var(--line-2); background: var(--paper); height: 34px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600; cursor: pointer; }
.outcomes button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 10px 0; position: relative; }
.tl::before { content: ''; position: absolute; left: 16px; top: 42px; bottom: -10px; width: 1.5px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--wash-2); color: var(--ink-2); }
.tl.call .ic { background: var(--blue-50); color: var(--blue); }
.tl.stage .ic { background: var(--moss-50); color: var(--moss); }
.tl.email .ic { background: #f1ecff; color: #6d3fd8; }
.tl.meeting .ic { background: var(--amber-50); color: var(--amber); }
.tl .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.task { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task input { width: 18px; height: 18px; accent-color: var(--blue); }
.task.done .t { text-decoration: line-through; color: var(--slate); }
.quickdates { display: flex; gap: 6px; flex-wrap: wrap; }

/* Monitor & Insights */
.filters-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { border: 1px solid var(--line-2); background: var(--paper); border-radius: 99px; height: 36px; padding: 0 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.fchip .n { color: var(--slate); font-weight: 500; }
.fchip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.fchip.on .n { color: #c9d2e3; }
.fchip.crit { border-color: #ecb3ad; color: var(--brick); }
.fchip.crit.on { background: var(--brick); border-color: var(--brick); color: #fff; }
.meter { height: 6px; background: var(--wash-2); border-radius: 9px; overflow: hidden; min-width: 60px; }
.meter i { display: block; height: 100%; background: var(--blue); border-radius: 9px; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art .rings { position: absolute; right: -140px; bottom: -140px; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(157,185,255,.25); }
.login-art .rings::before, .login-art .rings::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(157,185,255,.25); }
.login-art .rings::before { inset: 80px; }
.login-art .rings::after { inset: 160px; background: conic-gradient(from 0deg, rgba(125,162,255,.35), transparent 25%); animation: sweep 4s linear infinite; }
.login-art h2 { font-size: 34px; max-width: 14ch; line-height: 1.1; font-weight: 700; }
.login-form { display: grid; place-items: center; padding: 32px 20px; }
.login-form form { width: min(380px, 100%); display: grid; gap: 14px; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } }

/* Toast */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 300; display: grid; gap: 8px; }
@media (max-width: 960px) { #toasts { bottom: calc(var(--tab-h) + 16px); } }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 550; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; }
.toast-error { background: var(--brick); }
.toast.out { opacity: 0; transform: translateY(8px); }

.map { height: 460px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; z-index: 0; }
.guide h2 { margin: 26px 0 8px; }
.guide p, .guide li { max-width: 72ch; line-height: 1.65; }
.guide .box { background: var(--wash); border-radius: 14px; padding: 16px 18px; margin: 10px 0; white-space: pre-wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Lieferung & Zeiten ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hours-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
.hours-table th, .hours-table td { padding: 8px 10px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.hours-table thead th { border-top: 0; background: #fafbfe; font-size: 12px; color: var(--slate); font-weight: 650; white-space: nowrap; }
.hours-table tbody th { font-weight: 600; color: var(--ink-2); width: 1%; white-space: nowrap; background: #fafbfe; }
.hours-table.zones td, .hours-table.zones th { white-space: nowrap; }
.hours-table.edit td { padding: 4px; }
.hours-table.edit .input { height: 36px; min-width: 120px; }
.src { display: inline-block; font-size: 10.5px; font-weight: 650; color: var(--blue-700); background: var(--blue-50); border-radius: 5px; padding: 1px 5px; margin-left: 2px; vertical-align: 1px; }
.svc .metric b { font-size: 16px; }
.svc-flags, .svc-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.zone-row { display: grid; grid-template-columns: 1.4fr .6fr 1.6fr .8fr .8fr .8fr auto; gap: 6px; align-items: center; }
.zone-row .input { height: 36px; min-width: 0; }
@media (max-width: 760px) { .zone-row { grid-template-columns: 1fr 1fr; } .zone-row [data-z="places"] { grid-column: 1 / -1; } }
.dropzone { display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--wash); cursor: pointer; text-align: center; color: var(--ink-2); }
.dropzone .i { width: 26px; height: 26px; color: var(--blue); }
.dropzone.over, .dropzone:hover { border-color: var(--blue); background: var(--blue-50); }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; }
.picked > span { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.steps { margin: 10px 0 8px; padding-left: 20px; display: grid; gap: 6px; }
.svc > *, .svc .table-scroll { min-width: 0; max-width: 100%; }
.hours-table .d-short { display: none; }
@media (max-width: 600px) {
  .hours-table th, .hours-table td { padding: 7px 8px; font-size: 13px; }
  .hours-table .d-long { display: none; }
  .hours-table .d-short { display: inline; }
  .hours-table .src { display: none; }
}
