:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --card: rgba(255, 255, 255, 0.72);
  --glass: rgba(255, 255, 255, 0.6);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.65);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-2: #5856d6;
  --call: #34c759;
  --call-text: #043814;
  --danger: #ff3b30;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --radius: 18px;
  --radius-lg: 22px;
  --pill: 980px;
  --tabbar-h: 72px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(0,113,227,.12), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(88,86,214,.10), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(255,45,85,.06), transparent 45%),
    var(--bg);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}
body.sheet-open { overflow: hidden; overscroll-behavior: none; }
.hidden { display: none !important; }
a { color: var(--accent); }

#app {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px);
}
.view {
  padding: clamp(12px, 3vw, 20px);
  padding-top: calc(clamp(12px, 3vw, 20px) + var(--safe-top));
  max-width: min(720px, 100%);
  margin: 0 auto;
  width: 100%;
}

/* Login */
.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 28px);
}
.login-box {
  width: min(420px, 100%); padding: 32px 28px; border-radius: var(--radius-lg);
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  backdrop-filter: blur(26px) saturate(165%); box-shadow: var(--shadow);
}
.brand { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
h1 { margin: 8px 0; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.login-box p { margin: 0 0 18px; color: var(--muted); line-height: 1.4; }
label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
input, textarea, select {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border);
  background: rgba(255,255,255,.9); color: inherit; font-size: 16px; font-family: inherit;
}
textarea { resize: vertical; min-height: 88px; }
.btn, button.btn {
  appearance: none; border: 0; cursor: pointer; font-family: inherit; font-weight: 700;
  border-radius: var(--pill); padding: 14px 18px; font-size: 16px; min-height: 48px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}
.btn.block { width: 100%; display: block; text-align: center; text-decoration: none; }
.btn.ghost {
  background: var(--glass); color: var(--text); border: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
.btn.call {
  background: rgba(52, 199, 89, 0.16);
  color: #0b5c28;
  border: 1px solid rgba(52, 199, 89, 0.38);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 24px rgba(52, 199, 89, 0.12);
}
.btn.call:active { background: rgba(52, 199, 89, 0.24); }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.err { color: var(--danger); min-height: 18px; margin-top: 10px; font-size: 14px; }
.ok { color: #15803d; font-size: 14px; }

/* Header */
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.topbar h1 { font-size: 28px; margin: 4px 0 0; }
.counts { color: var(--muted); font-size: 14px; font-weight: 600; }

/* Glass cards / KPIs */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.kpi {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(26px) saturate(165%); padding: 12px 14px; box-shadow: var(--shadow);
}
.kpi .n { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.progress {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px; backdrop-filter: blur(20px);
}
.progress-bar { height: 8px; border-radius: 980px; background: rgba(0,0,0,.06); overflow: hidden; margin-top: 10px; }
.progress-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--call)); border-radius: 980px; transition: width .35s ease; }
.progress-bar.team { height: 6px; margin-top: 8px; }
.progress-bar.team > i { background: linear-gradient(90deg, #8e8e93, #aeaeb2); }

/* Challenge duel */
.challenge-card { margin-bottom: 14px; }
.challenge-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.challenge-title h3 { margin: 0; }
.challenge-flag {
  display: inline-flex; color: var(--accent);
  animation: challenge-pulse 2.4s ease-in-out infinite;
}
@keyframes challenge-pulse {
  0%, 100% { opacity: .75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
.challenge-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.challenge-chip {
  border: 1px solid var(--border); background: rgba(255,255,255,.65);
  border-radius: 980px; padding: 6px 12px; font-size: 12px; font-weight: 700;
  color: var(--muted); cursor: pointer;
}
.challenge-chip.is-on { background: var(--accent); color: #fff; border-color: transparent; }
.challenge-row { margin-bottom: 12px; }
.challenge-row:last-child { margin-bottom: 0; }
.challenge-row-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.challenge-cat { font-size: 13px; font-weight: 800; }
.challenge-lead { font-size: 11px; font-weight: 600; color: var(--muted); }
.challenge-lead.is-me { color: var(--accent); }
.challenge-names {
  display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px;
}
.challenge-names b { color: var(--text); font-weight: 800; }
.challenge-track {
  display: flex; height: 8px; border-radius: 980px; overflow: hidden; background: rgba(0,0,0,.05);
}
.challenge-track > i { display: block; height: 100%; transition: width .35s ease; }
.challenge-track > i.j { background: linear-gradient(90deg, #0071e3, #34aadc); }
.challenge-track > i.o { background: linear-gradient(90deg, #ff9f0a, #ffd60a); }
.challenge-loading { font-size: 13px; color: var(--muted); padding: 8px 0; }

/* Filters */
.filter-glass {
  background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(26px); padding: 12px; margin-bottom: 12px; display: grid; gap: 8px;
}
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-glass input[type="search"] { grid-column: 1 / -1; }

/* Lead cards */
.lead-list { display: grid; gap: 10px; }
.hunt-mcard {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(22px); padding: 14px 16px; box-shadow: var(--shadow);
  transition: transform .12s ease;
}
.hunt-mcard:active { transform: scale(0.985); }
.hunt-mcard h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.hunt-mcard .sub { color: var(--muted); font-size: 13px; line-height: 1.4; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: var(--pill);
  background: rgba(255,255,255,.7); border: 1px solid var(--border); color: var(--muted);
}
.card-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 12px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 8px; }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(0,0,0,.04), rgba(0,0,0,.08), rgba(0,0,0,.04)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* Tabbar */
.tabbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(8px + var(--safe-bottom));
  height: var(--tabbar-h); display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
  padding: 6px; border-radius: 22px; z-index: 40;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(32px) saturate(190%);
  box-shadow: 0 12px 40px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.9);
}
.tabbar button {
  border: 0; background: transparent; border-radius: 14px; font-family: inherit;
  font-size: 10px; font-weight: 650; letter-spacing: -0.01em;
  color: var(--muted); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; cursor: pointer;
  min-height: 56px; min-width: 0; padding: 6px 2px;
  -webkit-tap-highlight-color: transparent;
}
.tabbar button .ico {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; line-height: 1;
}
.tabbar button .ico svg { width: 22px; height: 22px; display: block; }
.tabbar button.is-on {
  color: var(--accent);
  background: rgba(0, 113, 227, 0.10);
  box-shadow: inset 0 0 0 1px rgba(0, 113, 227, 0.08);
}

/* Focus sheet — bottom sheet, compact top (NO safe-area-top: sheet starts mid-screen) */
.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(4px); }
.sheet-panel {
  position: relative; z-index: 1;
  width: 100%;
  max-width: 100%;
  max-height: min(92dvh, calc(100dvh - 12px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: rgba(255,255,255,.96);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(28px) saturate(170%);
  padding: 4px clamp(12px, 4vw, 18px) calc(16px + var(--safe-bottom));
  box-shadow: 0 -20px 60px rgba(0,0,0,.18);
}
.de-pin-hit { cursor: pointer; }
.de-pin-group { -webkit-tap-highlight-color: transparent; }
.sheet-handle {
  width: 36px; height: 5px; border-radius: 980px; background: rgba(0,0,0,.15);
  margin: 6px auto 4px;
}
.sheet-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 4px 0 8px; margin: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 55%, rgba(255,255,255,.88) 85%, transparent);
  backdrop-filter: blur(14px);
}
.sheet-close {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 980px; border: 1px solid var(--border);
  background: rgba(255,255,255,.95); backdrop-filter: blur(16px); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
  -webkit-tap-highlight-color: transparent;
}
.sheet-close svg { width: 18px; height: 18px; }
.lead-focus-kicker { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.lead-focus-title {
  margin: 2px 0 2px; font-size: clamp(20px, 5.5vw, 26px); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.15;
}
.lead-focus-sub { color: var(--muted); font-size: clamp(12px, 3.4vw, 14px); margin-bottom: 12px; }
.lead-focus-call {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; border-radius: var(--pill);
  background: rgba(52, 199, 89, 0.16); color: #0b5c28;
  border: 1px solid rgba(52, 199, 89, 0.38);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 24px rgba(52, 199, 89, 0.12);
  font-weight: 800; text-decoration: none; margin-bottom: 10px;
}
.lead-focus-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.lead-focus-sec-btn {
  text-align: center; text-decoration: none; color: var(--text); font-weight: 700; font-size: 14px;
  min-height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--pill); background: var(--glass); border: 1px solid var(--border);
}
.lead-focus-sec-btn.is-muted { opacity: .4; pointer-events: none; }
.lead-focus-grid { display: grid; gap: 8px; margin-bottom: 12px; }
.lead-focus-row {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px;
  border-radius: 14px; background: rgba(255,255,255,.65); border: 1px solid var(--border);
}
.lead-focus-row-k { color: var(--muted); font-size: 12px; font-weight: 600; }
.lead-focus-row-v { font-size: 13px; font-weight: 700; text-align: right; }
.lead-focus-section {
  border-radius: 16px; background: rgba(255,255,255,.7); border: 1px solid var(--border);
  margin-bottom: 10px; overflow: hidden;
}
.lead-focus-section > summary {
  list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 800; font-size: 15px;
}
.lead-focus-section > summary::-webkit-details-marker { display: none; }
.lead-focus-section-body { padding: 0 16px 16px; }
.lead-focus-tips { margin: 0; padding-left: 18px; color: var(--text); font-size: 14px; line-height: 1.45; }
.lead-focus-tips li { margin-bottom: 8px; }
.lead-focus-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.lead-outcome {
  border: 1px solid var(--border); background: #fff; border-radius: 14px; min-height: 48px;
  font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit;
}
.lead-outcome.is-on { border-color: var(--accent); background: rgba(0,113,227,.1); color: var(--accent); }
.lead-outcome.is-good.is-on { border-color: var(--call); background: rgba(52,199,89,.12); color: #15803d; }
.lead-outcome.is-bad.is-on { border-color: var(--danger); background: rgba(255,59,48,.08); color: var(--danger); }
.lead-stars { display: flex; gap: 6px; margin-bottom: 10px; }
.lead-star {
  border: 0; background: transparent; font-size: 28px; color: rgba(0,0,0,.18); cursor: pointer; line-height: 1;
}
.lead-star.is-on { color: #f5a524; }
.lead-focus-note { width: 100%; margin-bottom: 10px; }
.lead-focus-save { width: 100%; }
.score-row { display: flex; flex-wrap: wrap; gap: 6px; }
.score-pick {
  min-width: 44px; min-height: 44px; border-radius: 12px; border: 1px solid var(--border);
  background: #fff; font-weight: 700; cursor: pointer; font-family: inherit;
}
.score-pick.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.call-history { display: grid; gap: 6px; margin-top: 8px; }
.call-history .item {
  font-size: 12px; color: var(--muted); padding: 8px 10px; border-radius: 12px;
  background: rgba(0,0,0,.03); border: 1px solid var(--border);
}

/* More tab */
.more-card {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(22px); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.more-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.more-card p, .help li { color: var(--muted); font-size: 14px; line-height: 1.45; }
.quick-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-filters button { font-size: 13px; }

@media (min-width: 900px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel {
    width: min(560px, 100%);
    max-height: min(88dvh, 900px);
    border-radius: 22px;
    padding-bottom: 20px;
    margin: 0;
  }
}

/* —— Call-Pro polish v5 —— */
.btn:active, .lead-outcome:active, .tabbar button:active { transform: scale(0.97); }
.sheet-panel { animation: sheetUp .28s cubic-bezier(.2,.8,.2,1); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 900px) {
  .sheet-panel { animation: sheetFade .28s cubic-bezier(.2,.8,.2,1); }
  @keyframes sheetFade { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* Short / landscape phones: use more of the viewport, tighter type */
@media (max-height: 700px) {
  .sheet-panel { max-height: calc(100dvh - 8px); }
  .lead-focus-title { font-size: 20px; }
  .lead-focus-call { min-height: 46px; }
  .de-map-wrap { height: 210px; min-height: 200px; }
}
@media (max-width: 380px) {
  .lead-focus-outcomes { grid-template-columns: 1fr; }
  .kpi .n { font-size: 22px; }
  .tabbar { left: 8px; right: 8px; }
  .filter-row { grid-template-columns: 1fr; }
  .geo-card-title { font-size: 18px; }
  .map-hud-split { grid-template-columns: 1fr 1fr; font-size: 11px; }
}
@media (min-width: 720px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .de-map-wrap { height: 340px; max-height: 380px; }
  .map-hud-split { grid-template-columns: repeat(4, 1fr); }
}
.kpi { animation: fadeUp .45s ease both; }
.kpi:nth-child(1) { animation-delay: .02s; }
.kpi:nth-child(2) { animation-delay: .06s; }
.kpi:nth-child(3) { animation-delay: .1s; }
.kpi:nth-child(4) { animation-delay: .14s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.streak {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--pill);
  background: rgba(0,113,227,.08); color: var(--accent); font-weight: 700; font-size: 12px;
  border: 1px solid rgba(0,113,227,.12);
}
.heatbar {
  display: flex; height: 8px; border-radius: 980px; overflow: hidden; background: rgba(0,0,0,.06); margin: 10px 0 6px;
}
.heatbar > i { display: block; height: 100%; min-width: 2px; }
.heat-legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--muted); font-weight: 600; }
.heat-legend span::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; background: var(--c, #999);
}

.inbox-list { display: grid; gap: 8px; margin: 12px 0 16px; }
.inbox-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px); cursor: pointer;
}
.inbox-item.is-overdue { border-color: rgba(255,59,48,.35); background: rgba(255,59,48,.06); }
.inbox-item .t { font-weight: 800; font-size: 14px; }
.inbox-item .m { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cal-kind {
  font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: var(--pill);
}
.cal-kind.callback { background: rgba(255,149,0,.15); color: #c45c00; }
.cal-kind.appointment { background: rgba(52,199,89,.15); color: #15803d; }
.cal-kind.mailbox { background: rgba(0,0,0,.06); color: var(--muted); }

/* Geo Command Card */
.geo-card {
  margin: 8px 0 14px; padding: 12px 12px 10px; border-radius: calc(var(--radius) + 2px);
  background: linear-gradient(165deg, rgba(255,255,255,.97), rgba(245,248,252,.88));
  border: 1px solid var(--glass-border); backdrop-filter: blur(26px) saturate(170%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.9);
}
.geo-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.geo-card-title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.geo-card-sub { font-size: 11px; font-weight: 650; color: var(--muted); margin-top: 2px; }
.geo-card-stat { text-align: right; }
.geo-card-stat .n { font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--accent); line-height: 1; }
.geo-card-stat .l { font-size: 10px; font-weight: 650; color: var(--muted); margin-top: 2px; }
.geo-truth-hint {
  font-size: 11px; font-weight: 600; color: var(--muted);
  margin: -2px 0 8px; line-height: 1.35;
}
.map-toolbar { margin-bottom: 8px; display: grid; gap: 6px; }
.map-mini-row { display: flex; gap: 5px; }
.map-mini-chip {
  flex: 0 0 auto; border: 1px solid var(--border); background: rgba(255,255,255,.75);
  color: var(--muted); border-radius: 980px; padding: 4px 9px; font-size: 11px; font-weight: 750;
  font-family: inherit; cursor: pointer; min-height: 28px;
}
.map-mini-chip.is-on { color: var(--accent); border-color: rgba(0,113,227,.35); background: rgba(0,113,227,.1); }
.map-tone-row { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.map-tone-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); background: rgba(255,255,255,.75); color: var(--muted);
  border-radius: 980px; padding: 4px 9px; font-size: 11px; font-weight: 700; font-family: inherit; cursor: pointer;
  min-height: 28px;
}
.map-tone-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #0071e3; }
.map-tone-chip .dot.tone-called { background: #ffcc00; }
.map-tone-chip .dot.tone-interest { background: #ff9500; }
.map-tone-chip .dot.tone-lost { background: #ff3b30; }
.map-tone-chip.is-on { color: var(--accent); border-color: rgba(0,113,227,.35); background: rgba(0,113,227,.10); }

.de-map-wrap {
  position: relative; height: min(360px, 62vw); min-height: 260px; max-height: 420px;
  margin: 0 0 8px; border-radius: 16px;
  background:
    radial-gradient(ellipse at 32% 28%, rgba(0,113,227,.2), transparent 52%),
    radial-gradient(ellipse at 70% 70%, rgba(90,200,250,.1), transparent 48%),
    linear-gradient(165deg, rgba(255,255,255,.99), rgba(232,242,255,.92));
  border: 1px solid rgba(0,113,227,.14);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 28px rgba(0,113,227,.06);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.de-map-svg {
  width: 100%; height: 100%; display: block; padding: 6px 10px 12px; box-sizing: border-box;
  position: relative; z-index: 1; cursor: grab;
  /* keep SVG on a crisp compositor layer (avoids blurry text while panning) */
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}
.de-map-wrap:active .de-map-svg { cursor: grabbing; }
.de-land-shine { opacity: .9; }
.map-zoom-controls {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  display: flex; flex-direction: row; gap: 4px; align-items: center;
  touch-action: manipulation;
}
.map-zoom-controls button {
  width: 28px; height: 28px; border-radius: 9px; border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
  font-size: 15px; font-weight: 700; color: var(--text); cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.08); font-family: inherit; line-height: 1;
  padding: 0; touch-action: manipulation;
}
.map-zoom-controls button:active { transform: scale(.96); }
#map-zoom-label {
  font-size: 9px; font-weight: 750; color: var(--muted);
  background: rgba(255,255,255,.9); padding: 2px 5px; border-radius: 980px;
}
.de-city-label-g { pointer-events: none; }
.de-city-label {
  font-size: 5.6px; font-weight: 750; fill: #1d1d1f;
  paint-order: stroke; stroke: rgba(255,255,255,.95); stroke-width: 1.2px;
  font-family: var(--font), system-ui, sans-serif;
  text-rendering: geometricPrecision;
  dominant-baseline: auto;
}
.de-city-label .de-city-n { fill: #6e6e73; font-weight: 650; }
.de-pin-group { cursor: pointer; animation: pinIn .45s ease both; animation-delay: var(--delay, 0s); }
.de-pin-svg { transition: opacity .15s ease; }
.de-pin-halo { transition: opacity .2s ease; }
.de-pin-pulse {
  transform-origin: center; transform-box: fill-box;
  animation: pinPulse 2.4s ease-out infinite;
}
.de-pin-active {
  stroke-width: 1.6; opacity: .95;
  animation: pinActive .9s ease-in-out infinite alternate;
}
.de-pin-group.is-on .de-pin-svg { stroke: rgba(0,113,227,.55); stroke-width: 1.2; }
.map-float-chip {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  z-index: 2; padding: 6px 12px; border-radius: 980px; font-size: 12px; font-weight: 750;
  background: rgba(29,29,31,.88); color: #fff; backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18); pointer-events: none; white-space: nowrap; max-width: 90%;
  overflow: hidden; text-overflow: ellipsis;
}
@keyframes pinIn {
  from { opacity: 0; transform: scale(.4); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pinPulse {
  0% { opacity: .75; transform: scale(1); stroke-width: 1.4; }
  70% { opacity: 0; transform: scale(2.4); stroke-width: .5; }
  100% { opacity: 0; transform: scale(2.6); }
}
@keyframes pinActive {
  from { opacity: .55; stroke-width: 1.4; }
  to { opacity: 1; stroke-width: 2; }
}

.map-hud {
  border-radius: 16px; padding: 12px; margin-bottom: 10px;
  background: rgba(255,255,255,.82); border: 1px solid rgba(0,113,227,.12);
  box-shadow: 0 6px 20px rgba(0,113,227,.06);
}
.map-hud.is-empty { padding: 10px 12px; background: rgba(0,0,0,.03); border-color: var(--border); box-shadow: none; }
.map-hud-hint { font-size: 12px; font-weight: 650; color: var(--muted); text-align: center; }
.map-hud-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.map-hud-city { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.map-hud-sub { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.map-hud-x {
  width: 32px; height: 32px; border-radius: 980px; border: 1px solid var(--border);
  background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted);
}
.map-hud-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-bottom: 10px;
  font-size: 12px; color: var(--muted); font-weight: 650;
}
.map-hud-split b { color: var(--text); font-weight: 800; margin-right: 4px; }

.map-top-label { font-size: 11px; font-weight: 750; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin: 2px 0 8px; }
.map-top-strip { display: grid; gap: 6px; }
.map-top-item {
  display: grid; grid-template-columns: 24px 1fr auto 8px; align-items: center; gap: 6px;
  width: 100%; text-align: left; padding: 8px 10px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,255,255,.7);
  font-family: inherit; cursor: pointer;
}
.map-top-item.is-on { border-color: rgba(0,113,227,.35); background: rgba(0,113,227,.08); }
.map-top-item .rank {
  width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; background: rgba(0,113,227,.1); color: var(--accent);
}
.map-top-item .name { font-size: 14px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-top-item .cnt { font-size: 13px; font-weight: 800; color: var(--muted); }
.map-top-item .tone-dot { width: 8px; height: 8px; border-radius: 50%; background: #0071e3; }
.map-top-item .tone-dot.tone-called { background: #ffcc00; }
.map-top-item .tone-dot.tone-interest { background: #ff9500; }
.map-top-item .tone-dot.tone-lost { background: #ff3b30; }
.map-top-empty { font-size: 13px; color: var(--muted); font-weight: 600; padding: 8px 0 4px; text-align: center; }

.scripts-row { display: grid; gap: 8px; margin-top: 8px; }
.script-chip {
  text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border);
  background: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; line-height: 1.35;
}
.script-chip:active { background: rgba(0,113,227,.08); }

.lead-focus-outcomes { grid-template-columns: 1fr 1fr; }
.lead-outcome { font-size: 12px; padding: 8px 6px; }
.follow-box {
  display: none; margin: 10px 0; padding: 12px; border-radius: 14px;
  background: rgba(0,113,227,.06); border: 1px solid rgba(0,113,227,.15);
}
.follow-box.is-on { display: grid; gap: 8px; }
.follow-box .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gate-box { margin: 8px 0; }

.bucket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.bucket {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  backdrop-filter: blur(22px); padding: 14px; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .12s ease, border-color .15s;
}
.bucket:active { transform: scale(.98); }
.bucket.is-on { border-color: var(--accent); background: rgba(0,113,227,.08); }
.bucket .n { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.bucket .l { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.pipe-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pipe-toolbar select { flex: 1; min-width: 140px; }

.cal-week { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 10px; }
.cal-day-chip {
  flex: 0 0 auto; min-width: 52px; padding: 10px 8px; border-radius: 14px; text-align: center;
  border: 1px solid var(--border); background: var(--glass); font-weight: 700; cursor: pointer;
}
.cal-day-chip .d { font-size: 18px; }
.cal-day-chip .w { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.cal-day-chip.is-on { background: rgba(0,113,227,.12); border-color: var(--accent); color: var(--accent); }
.cal-day-chip.has-items::after {
  content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 4px auto 0;
}
.cal-list { display: grid; gap: 8px; }
.stars-mini { color: #f5a524; letter-spacing: 1px; font-size: 12px; }

/* —— CRM v6 —— */
.lead-outcome {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 10px 6px; min-height: 64px;
}
.lead-outcome .oc-smile { font-size: 22px; line-height: 1; }
.lead-outcome .oc-label { font-size: 11px; font-weight: 700; }
.lead-outcome.is-good.is-on { border-color: var(--call); background: rgba(52,199,89,.12); color: #15803d; }
.lead-outcome.is-bad { border-color: rgba(255,59,48,.2); }
.lead-outcome.is-bad.is-on { border-color: var(--danger); background: rgba(255,59,48,.1); color: var(--danger); }

.filter-extra {
  border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.7);
  padding: 0 12px;
}
.filter-extra > summary {
  list-style: none; cursor: pointer; font-weight: 750; font-size: 13px; padding: 12px 0; color: var(--accent);
}
.filter-extra > summary::-webkit-details-marker { display: none; }
.filter-checks {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 12px;
}
.filter-checks .chk {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  margin: 0; color: var(--text);
}
.filter-checks .chk input { width: auto; }
.filter-checks .chk.full { grid-column: 1 / -1; display: grid; gap: 6px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fchip {
  border: 1px solid rgba(0,113,227,.2); background: rgba(0,113,227,.08); color: var(--accent);
  border-radius: 980px; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.chip.warn { color: #c45c00; background: rgba(255,149,0,.12); }
.chip.web-ok { color: #1a7f37; background: rgba(52,199,89,.14); font-weight: 750; }
.chip.web-miss { color: #c62828; background: rgba(255,59,48,.12); font-weight: 750; }
.chip.prio { color: #5856d6; background: rgba(88,86,214,.12); font-weight: 750; }
.chip.money { color: #0b6b2a; background: rgba(52,199,89,.16); font-weight: 750; }
.chip.fee { color: #0051a8; background: rgba(0,113,227,.1); font-weight: 700; }
.chip.vendor { color: #c45c00; background: rgba(255,149,0,.14); font-weight: 700; }
.chip.owner { color: #9a7b00; background: rgba(255,204,0,.18); font-weight: 700; }
.cal-kind.email { background: rgba(0,113,227,.12); color: #0051a8; }
.cal-kind.brief { background: rgba(175,82,222,.12); color: #7a3aa8; }
.wish-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px;
}
.wish-chip {
  border: 1px solid rgba(0,0,0,.08); background: rgba(255,255,255,.7);
  border-radius: 980px; padding: 5px 9px; font-size: 11px; font-weight: 650;
  color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.wish-chip.is-on { border-color: var(--accent); background: rgba(0,113,227,.1); color: var(--accent); font-weight: 750; }
.wish-chip[data-wish="callback"].is-on { border-color: #c45c00; background: rgba(255,149,0,.12); color: #c45c00; }
.wish-chip[data-wish="live_call"].is-on { border-color: #15803d; background: rgba(52,199,89,.12); color: #15803d; }
.wish-chip[data-wish="email"].is-on { border-color: #0051a8; background: rgba(0,113,227,.1); color: #0051a8; }
.wish-chip[data-wish="brief"].is-on { border-color: #7a3aa8; background: rgba(175,82,222,.1); color: #7a3aa8; }
.wish-chip[data-wish="consult"].is-on { border-color: #5856d6; background: rgba(88,86,214,.1); color: #5856d6; }
.wish-label { font-size: 11px; font-weight: 700; color: var(--muted); margin: 2px 0 0; }
.web-mark.ok { color: #1a7f37; font-weight: 750; }
.web-mark.miss { color: #c62828; font-weight: 750; }
.econ-card {
  margin: 0 0 12px; padding: 12px 14px; border-radius: 14px;
  background: rgba(0,113,227,.06); border: 1px solid rgba(0,113,227,.12);
}
.econ-title { font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.econ-title span { font-weight: 650; color: var(--muted); font-size: 11px; }
.econ-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }
.econ-row span { color: var(--muted); font-weight: 600; }
.econ-row b { font-weight: 750; text-align: right; }
.econ-row.good b { color: #1a7f37; }
.econ-row.accent b { color: var(--accent); }
.econ-row.muted b { color: var(--muted); font-weight: 650; }
.econ-note { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.35; }
.econ-foot { font-size: 10px; color: var(--muted); margin-top: 8px; font-weight: 600; }
.call-history .item { font-size: 13px; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.call-history .item:last-child { border-bottom: 0; }
.call-history .item.muted { color: var(--muted); font-weight: 600; }
.chips-compact .chip { font-size: 11px; }

.de-map-glow {
  position: absolute; inset: -30% -15%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 35% 30%, rgba(0,113,227,.22), transparent 52%),
    radial-gradient(ellipse at 75% 65%, rgba(90,200,250,.14), transparent 48%),
    radial-gradient(ellipse at 50% 90%, rgba(0,113,227,.10), transparent 45%);
  animation: mapGlow 12s ease-in-out infinite alternate;
}
@keyframes mapGlow {
  from { transform: translate3d(-2%, -1%, 0) scale(1); opacity: .8; }
  to { transform: translate3d(3%, 2%, 0) scale(1.06); opacity: 1; }
}
.de-land { transform-origin: center; }
@keyframes landBreath {
  from { opacity: .96; }
  to { opacity: 1; }
}
.de-pin-svg.tone-called { stroke: rgba(255,204,0,.55); stroke-width: .6; }
.de-pin-svg.tone-interest { stroke: rgba(255,149,0,.55); stroke-width: .6; }
.de-pin-svg.tone-lost { stroke: rgba(255,59,48,.5); stroke-width: .6; }
.de-pin-svg.tone-fresh { stroke: rgba(0,113,227,.4); stroke-width: .55; }

.map-legend {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; font-size: 11px; font-weight: 700; color: var(--muted);
}
.map-legend .ml {
  appearance: none; border: 1px solid var(--border); background: rgba(255,255,255,.7);
  border-radius: 980px; padding: 6px 10px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer;
}
.map-legend .ml.is-on { border-color: rgba(0,113,227,.3); color: var(--accent); background: rgba(0,113,227,.08); }
.map-legend .ml::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle;
}
.map-legend .fresh::before { background: #0071e3; }
.map-legend .called::before { background: #ffcc00; }
.map-legend .interest::before { background: #ff9500; }
.map-legend .lost::before { background: #ff3b30; }

@media (prefers-reduced-motion: reduce) {
  .de-map-glow, .de-land, .de-pin-pulse, .de-pin-active, .de-pin-group { animation: none !important; }
}

.empty-card {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 20px 16px; text-align: center; backdrop-filter: blur(16px);
}
.empty-card.compact { padding: 12px; }
.empty-card h3 { margin: 0 0 6px; font-size: 17px; }
.empty-card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

/* Follow-up items (Heute + Kalender) */
.fu-item {
  position: relative; overflow: hidden; border-radius: 14px; margin-bottom: 8px;
  background: transparent;
}
.fu-item.is-overdue .fu-card { border-color: rgba(255,59,48,.35); background: rgba(255,59,48,.06); }
.fu-swipe {
  position: absolute; inset: 0; display: flex; justify-content: flex-end; align-items: stretch;
  pointer-events: none; z-index: 0;
}
.fu-swipe-del {
  width: 88px; border: 0; background: #ff3b30; color: #fff; font-weight: 800; font-size: 13px;
  pointer-events: auto; font-family: inherit; cursor: pointer;
}
.fu-card {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 12px 14px; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 14px; backdrop-filter: blur(16px);
  transition: transform .18s ease;
}
.fu-main { flex: 1; min-width: 0; cursor: pointer; }
.fu-main .t { font-weight: 800; font-size: 14px; }
.fu-main .m { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fu-dt {
  border: 0; background: transparent; padding: 0; font: inherit; color: var(--accent);
  font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.fu-side {
  display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0;
}
.fu-check, .fu-x {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1);
  background: rgba(255,255,255,.8); font-size: 14px; font-weight: 800; line-height: 1;
  cursor: pointer; font-family: inherit; color: var(--muted);
  display: grid; place-items: center; -webkit-tap-highlight-color: transparent;
}
.fu-check { color: #15803d; border-color: rgba(52,199,89,.35); background: rgba(52,199,89,.12); }
.fu-x { color: #c62828; border-color: rgba(255,59,48,.25); background: rgba(255,59,48,.08); font-size: 12px; }
.fu-side .cal-kind { font-size: 10px; padding: 3px 7px; }

.fu-overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.35);
  display: grid; place-items: end center; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.fu-modal {
  width: min(420px, 100%); background: #fff; border-radius: 18px; padding: 18px 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.2);
}
.fu-modal h3 { margin: 0 0 8px; font-size: 18px; }
.fu-modal p { margin: 0 0 12px; font-size: 14px; color: var(--text); line-height: 1.35; }
.fu-hint { font-size: 12px !important; color: var(--muted) !important; }
.fu-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.fu-result-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fu-result {
  border: 1px solid rgba(0,0,0,.1); background: rgba(0,0,0,.03); border-radius: 980px;
  padding: 8px 12px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.fu-result.is-on { border-color: var(--accent); background: rgba(0,113,227,.12); color: var(--accent); }
.fu-note-lab { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.fu-note-lab textarea { font: inherit; font-weight: 500; color: var(--text); border-radius: 12px; border: 1px solid rgba(0,0,0,.12); padding: 10px; }
.fu-dt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fu-dt-row label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.fu-dt-row input { font: inherit; font-weight: 600; padding: 10px; border-radius: 12px; border: 1px solid rgba(0,0,0,.12); }
.btn.danger {
  background: #ff3b30; color: #fff; border: 0;
}
.fu-sheet-bar {
  margin: 0 0 12px; padding: 12px; border-radius: 14px;
  background: rgba(0,113,227,.06); border: 1px solid rgba(0,113,227,.12);
}
.fu-sheet-lab { font-size: 12px; font-weight: 750; margin-bottom: 8px; color: var(--muted); }
.fu-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
