/* OMNIS Prospect — tokens da marca OMNIS (omnis-tokens.css), tema escuro por padrão */
:root {
  --bg: #141416;
  --surface: #1d1d20;
  --surface-2: #26262a;
  --surface-3: #303035;
  --line: rgba(237, 237, 234, 0.08);
  --line-2: rgba(237, 237, 234, 0.15);
  --text: #ededea;
  --muted: #9a9b98;
  --dim: #66676b;
  --paper: #f7f7f6;
  --paper-2: #e9e9e7;
  --paper-line: #dededc;
  --ink: #2a2a2a;
  --ink-soft: #55565b;
  --blue: #117dc6;
  --blue-deep: #064c9e;
  --blue-light: #a6d6ff;
  --blue-soft: rgba(17, 125, 198, 0.16);
  --accent: #6fb5ee;
  --grad: linear-gradient(100deg, #a6d6ff 0%, #117dc6 55%, #064c9e 100%);
  --grad-fill: linear-gradient(100deg, #3d9be0 0%, #117dc6 50%, #064c9e 100%);
  --grad-soft: linear-gradient(100deg, rgba(166, 214, 255, 0.18), rgba(6, 76, 158, 0.18));
  --ok: #5fd39a;
  --danger: #f07a7a;
  --r-xl: 26px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 8px;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --font: 'Wix Madefor Display', ui-sans-serif, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #f7f7f6;
  --surface: #ffffff;
  --surface-2: #f0f0ee;
  --surface-3: #e6e6e3;
  --line: #e6e6e3;
  --line-2: #d6d6d3;
  --text: #2a2a2a;
  --muted: #6b6c70;
  --dim: #9a9b9e;
  --paper: #2a2a2a;
  --paper-2: #3a3a3d;
  --paper-line: #44444a;
  --ink: #f7f7f6;
  --ink-soft: #c9c9c6;
  --accent: #117dc6;
  --blue-soft: rgba(17, 125, 198, 0.1);
  --ok: #1f9d63;
  --danger: #c94545;
  --shadow: 0 24px 50px -30px rgba(42, 42, 42, 0.35);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(900px 420px at 78% -8%, rgba(17, 125, 198, 0.16), transparent 62%),
    radial-gradient(700px 380px at -10% 10%, rgba(166, 214, 255, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
::selection { background: var(--blue); color: #fff; }
svg.i { display: block; flex: none; }

/* ---------- Estrutura ---------- */
.shell { max-width: 1360px; margin: 0 auto; padding: 18px 24px 60px; }
.top { display: flex; align-items: center; gap: 16px; padding: 4px 0 18px; }
.logo { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.logo-img { height: 30px; width: auto; display: block; }
.logo-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--grad-fill); color: #fff; font-weight: 700; }
.pillnav { display: flex; align-items: center; gap: 2px; background: var(--paper); border-radius: 999px; padding: 5px; margin: 0 auto; box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: none; }
.pillnav a { color: var(--ink-soft); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 7px; transition: background 0.15s, color 0.15s; }
.pillnav a:hover { color: var(--ink); background: var(--paper-2); }
.pillnav a.active { background: var(--grad-fill); color: #fff; }
.pillnav a.active::before { content: '•'; font-size: 18px; line-height: 0; margin-right: -2px; }
.pillnav .count { background: var(--ink); color: var(--paper); font-size: 11px; border-radius: 999px; padding: 1px 7px; font-weight: 700; }
.pillnav .count:empty { display: none; }
.pillnav a.active .count { background: rgba(255, 255, 255, 0.24); color: #fff; }
.top-right { display: flex; align-items: center; gap: 8px; }
.circ { width: 42px; height: 42px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; display: grid; place-items: center; color: var(--text); transition: background 0.15s; }
.circ:hover { background: var(--surface-2); }
.circ.sm { width: 34px; height: 34px; }
.circ.warn { color: var(--blue-light); border-color: var(--blue); background: var(--blue-soft); }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 14px 0 26px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.page-head h1 { font-size: 46px; line-height: 1.05; font-weight: 600; letter-spacing: -0.035em; margin: 6px 0 0; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.demo-banner { background: var(--grad-soft); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px 16px; margin-bottom: 18px; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px; position: relative; min-width: 0; }
.card.tight { padding: 18px; }
.card.glow::before { content: ''; position: absolute; left: 28px; right: 28px; top: -1px; height: 2px; border-radius: 2px; background: var(--grad); }
.card h2, .h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 600; white-space: nowrap; transition: transform 0.12s, background 0.15s, filter 0.15s; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--grad-fill); color: #fff; border: 0; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.white { background: var(--paper); color: var(--ink); border: 0; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.lg { padding: 14px 24px; font-size: 15px; }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.input, .select, .textarea { width: 100%; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 11px 14px; font-size: 14px; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.input.pill { border-radius: 999px; padding-left: 18px; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.help { font-size: 12.5px; color: var(--muted); margin: 0; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-wrap .input { padding-left: 40px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.quente { background: var(--grad-fill); color: #fff; border: 0; }
.chip.morno { background: var(--blue-soft); color: var(--accent); border-color: transparent; }
.chip.frio { color: var(--muted); }
.chip.sem_site { color: var(--blue-light); border-color: rgba(166, 214, 255, 0.35); }
:root[data-theme='light'] .chip.sem_site { color: var(--blue-deep); border-color: rgba(6, 76, 158, 0.3); }
.chip.so_rede_social { color: var(--accent); }
.chip.site_fraco { color: var(--text); }
.chip.site_ok { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--paper); color: var(--ink); }
.seg button .n { font-size: 11px; opacity: 0.7; }

/* ---------- Painel ---------- */
.hero { overflow: hidden; padding: 34px; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; }
.hero h2 { font-size: 34px; line-height: 1.08; letter-spacing: -0.03em; font-weight: 600; margin: 10px 0 12px; max-width: 620px; }
.hero h2 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 520px; margin: 0 0 22px; }
.hero-art { position: absolute; right: -60px; top: -60px; width: 340px; height: 340px; border-radius: 50%; border: 1px solid var(--line-2); pointer-events: none; }
.hero-art::before, .hero-art::after { content: ''; position: absolute; inset: 50px; border-radius: 50%; border: 1px solid var(--line-2); }
.hero-art::after { inset: 110px; background: var(--grad); opacity: 0.85; filter: blur(0.3px); animation: pulse 3.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: 0.6; } }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-size: 38px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.kpi .l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.kpi .d { font-size: 13px; color: var(--muted); }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width 0.4s; }
.funnel-mini { display: flex; flex-direction: column; gap: 10px; }
.funnel-mini .fr { display: grid; grid-template-columns: 110px 1fr 36px; gap: 10px; align-items: center; font-size: 13px; }
.funnel-mini .fr b { text-align: right; }
.hist { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hist:first-child { border-top: 0; }

/* ---------- Lista de leads ---------- */
.lead-row { display: grid; grid-template-columns: 26px 46px minmax(0, 2.2fr) minmax(0, 1.2fr) 120px 128px 104px 120px; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); cursor: pointer; transition: background 0.12s; }
.lead-row:hover { background: var(--surface-2); }
.lead-row.head { cursor: default; background: none; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border-top: 0; padding-top: 4px; padding-bottom: 8px; }
.lead-row.head button { background: none; border: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; display: inline-flex; gap: 4px; align-items: center; }
.lead-row .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-row .meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; position: relative; }
.score svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.stars { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.stars svg { color: var(--blue-light); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .select { width: auto; min-width: 150px; border-radius: 999px; padding: 9px 14px; }
.filters .search-wrap { flex: 1; min-width: 220px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 20px; margin: 12px 0 6px; font-weight: 600; }
.empty .ico { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); }
.pager { display: flex; justify-content: center; gap: 8px; padding: 16px 0 4px; align-items: center; font-size: 13px; color: var(--muted); }
.quick-links { display: flex; gap: 6px; }
.qa { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); transition: background 0.15s; }
.qa:hover { background: var(--blue); color: #fff; }
.qa.off { opacity: 0.3; pointer-events: none; }

/* ---------- Buscar ---------- */
.search-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.map-card { padding: 0; overflow: hidden; }
.map-tools { padding: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); position: relative; }
.map-tools .search-wrap { flex: 1; min-width: 220px; }
#map { height: 520px; background: var(--surface-2); }
.leaflet-container { font-family: var(--font); background: var(--surface-2); }
.radius-box { padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; border-top: 1px solid var(--line); }
.radius-box input[type='range'] { width: 100%; accent-color: var(--blue); }
.radius-val { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; min-width: 80px; text-align: right; }
.geo-results { position: absolute; left: 16px; right: 16px; top: 62px; z-index: 1000; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden; }
.geo-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; font-size: 13.5px; border-top: 1px solid var(--line); }
.geo-results button:first-child { border-top: 0; }
.geo-results button:hover { background: var(--surface-2); }
.pin-center { width: 18px; height: 18px; border-radius: 50%; background: var(--grad); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(17, 125, 198, 0.3); }
.lead-pin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.niche-picker .groups { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.niche-picker .groups button { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.niche-picker .groups button.on { background: var(--paper); color: var(--ink); border-color: transparent; }
.niche-list { max-height: 300px; overflow: auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 2px; scrollbar-width: thin; }
.niche { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; transition: background 0.12s, border-color 0.12s; }
.niche:hover { border-color: var(--blue); }
.niche.on { background: var(--grad-fill); color: #fff; border-color: transparent; }
.selected-niches { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; padding: 10px; border: 1px dashed var(--line-2); border-radius: var(--r-md); margin-bottom: 14px; }
.selected-niches .sel { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-soft); color: var(--text); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 13px; font-weight: 600; }
.selected-niches .sel button { border: 0; background: var(--surface-3); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.cover-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cover-opts button { text-align: left; border: 1px solid var(--line-2); background: var(--surface-2); border-radius: var(--r-md); padding: 12px; }
.cover-opts button b { display: block; font-size: 14px; }
.cover-opts button span { font-size: 12px; color: var(--muted); }
.cover-opts button.on { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.estimate { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); font-size: 13px; color: var(--muted); margin: 14px 0; }
.estimate b { color: var(--text); }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--blue); width: 18px; height: 18px; }
.job { margin-top: 16px; }
.job .log { font-family: var(--mono); font-size: 12px; color: var(--muted); max-height: 140px; overflow: auto; margin-top: 10px; line-height: 1.7; }
.job-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.job-stats div { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; }
.job-stats b { display: block; font-size: 22px; letter-spacing: -0.02em; }
.job-stats span { font-size: 11px; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- Funil ---------- */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; min-height: 420px; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.15s, background 0.15s; }
.col.over { border-color: var(--blue); background: var(--blue-soft); }
.col-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 8px; }
.col-head b { font-size: 14px; }
.col-head span { font-size: 12px; color: var(--muted); }
.col-hint { font-size: 11.5px; color: var(--dim); padding: 0 6px 6px; margin-top: -8px; }
.kcard { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 12px; cursor: grab; font-size: 13px; transition: transform 0.12s, border-color 0.12s; }
.kcard:hover { border-color: var(--line-2); }
.kcard.dragging { opacity: 0.4; }
.kcard .nm { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.kcard .meta { color: var(--muted); font-size: 12px; }
.kcard .row { margin-top: 8px; gap: 5px; }
.kcard .val { font-weight: 700; color: var(--ok); }

/* ---------- Drawer / modal ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 80; backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--line-2); z-index: 90; transform: translateX(100%); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); overflow-y: auto; padding: 24px; }
.drawer.open { transform: none; }
.drawer h2 { font-size: 26px; letter-spacing: -0.02em; margin: 10px 0 6px; line-height: 1.15; }
.drawer .sec { border-top: 1px solid var(--line); padding: 18px 0; }
.drawer .sec:first-of-type { border-top: 0; }
.info-list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.info-list a, .info-list div { display: flex; align-items: center; gap: 10px; word-break: break-word; }
.info-list a:hover { color: var(--accent); }
.info-list svg { color: var(--muted); }
.status-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.status-pick button { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.status-pick button.on { background: var(--paper); color: var(--ink); border-color: transparent; }
.msg-preview { white-space: pre-wrap; background: var(--surface-2); border-radius: var(--r-md); padding: 14px; font-size: 14px; line-height: 1.55; }
.reasons { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.reasons div { display: flex; gap: 8px; align-items: center; }
.reasons .p { color: var(--ok); font-weight: 700; min-width: 34px; font-family: var(--mono); font-size: 12px; }
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 26px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal h2 { margin: 0 0 6px; font-size: 22px; }

.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center; }
.toast { background: var(--paper); color: var(--ink); padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); animation: up 0.25s ease; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }

.tpl-vars { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.tpl-vars code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; cursor: pointer; }
.tpl-vars code:hover { border-color: var(--blue); }
.steps { display: flex; flex-direction: column; gap: 10px; counter-reset: s; font-size: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: flex; gap: 12px; }
.steps li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--blue-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }

@media (max-width: 1100px) {
  .search-layout, .g-main { grid-template-columns: 1fr; }
  .g-4 { grid-template-columns: 1fr 1fr; }
  .lead-row { grid-template-columns: 26px 46px minmax(0, 1fr) 110px 100px; }
  .lead-row .c-city, .lead-row .c-rating, .lead-row .c-status { display: none; }
}
@media (max-width: 760px) {
  .shell { padding: 14px 16px 50px; }
  .top { flex-wrap: wrap; }
  .pillnav { order: 3; width: 100%; margin: 0; }
  .top-right { margin-left: auto; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 34px; }
  .head-actions { margin-left: 0; justify-content: flex-start; }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .cover-opts { grid-template-columns: 1fr; }
  .job-stats { grid-template-columns: 1fr 1fr; }
  .lead-row { grid-template-columns: 26px 42px minmax(0, 1fr) 90px; }
  .lead-row .c-sit { display: none; }
  #map { height: 380px; }
  .hero { padding: 24px; }
  .hero h2 { font-size: 27px; }
}

/* =========================================================
   Polimento v2 — etapas, funil, seleção em massa, ficha
   ========================================================= */
:root {
  --st-novo: #9a9b98;
  --st-contatado: #a6d6ff;
  --st-conversando: #6fb5ee;
  --st-proposta: #117dc6;
  --st-fechado: #5fd39a;
  --st-perdido: #f07a7a;
}
:root[data-theme='light'] { --st-novo: #8a8b8e; --st-contatado: #6fb5ee; --st-fechado: #1f9d63; --st-perdido: #c94545; }

#view.enter > * { animation: enter 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
#view.enter > *:nth-child(2) { animation-delay: 0.04s; }
#view.enter > *:nth-child(3) { animation-delay: 0.08s; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

.card { transition: border-color 0.2s; }
.btn:focus-visible, .circ:focus-visible, .niche:focus-visible, .seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn.danger-fill { background: var(--danger); color: #fff; border: 0; }
.btn.danger-fill:hover { filter: brightness(1.08); background: var(--danger); }
.circ:disabled { opacity: 0.3; cursor: default; }
.circ:disabled:hover { background: transparent; }
.mini-list { margin: 8px 0 0; padding-left: 18px; color: var(--text); font-size: 14px; line-height: 1.7; }

/* Etapas */
.st-dot-novo { background: var(--st-novo); }
.st-dot-contatado { background: var(--st-contatado); }
.st-dot-conversando { background: var(--st-conversando); }
.st-dot-proposta { background: var(--st-proposta); }
.st-dot-fechado { background: var(--st-fechado); }
.st-dot-perdido { background: var(--st-perdido); }
.chip.st-novo { color: var(--muted); }
.chip.st-contatado { color: var(--st-contatado); border-color: color-mix(in srgb, var(--st-contatado) 35%, transparent); }
.chip.st-conversando { color: var(--st-conversando); border-color: color-mix(in srgb, var(--st-conversando) 35%, transparent); }
.chip.st-proposta { color: var(--accent); border-color: color-mix(in srgb, var(--st-proposta) 50%, transparent); }
.chip.st-fechado { color: var(--st-fechado); border-color: color-mix(in srgb, var(--st-fechado) 40%, transparent); }
.chip.st-perdido { color: var(--st-perdido); border-color: color-mix(in srgb, var(--st-perdido) 35%, transparent); }
.status-pick button { display: inline-flex; align-items: center; gap: 7px; transition: background 0.15s, color 0.15s; }
.status-pick button:hover { color: var(--text); border-color: var(--muted); }
.status-pick .dot { width: 7px; height: 7px; }

/* Tabela de leads */
.table-card { padding: 10px 8px; }
.lead-row.head button.on { color: var(--text); }
.lead-row.sel { background: var(--blue-soft); }
.ck-wrap { display: grid; place-items: center; cursor: pointer; height: 100%; }
.ck { appearance: none; -webkit-appearance: none; width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--line-2); background: transparent; cursor: pointer; display: grid; place-items: center; transition: background 0.12s, border-color 0.12s; margin: 0; }
.ck:hover { border-color: var(--accent); }
.ck:checked { background: var(--blue); border-color: var(--blue); }
.ck:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.lead-row:not(.head):not(.sel) .ck { opacity: 0.45; }
.lead-row:hover .ck { opacity: 1; }
.select-all { text-align: center; font-size: 13px; color: var(--muted); padding: 8px; background: var(--blue-soft); border-radius: var(--r-sm); margin: 0 8px 6px; }

.bulk-bar { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 160%); z-index: 70; display: flex; align-items: center; gap: 10px; background: var(--paper); color: var(--ink); padding: 8px 8px 8px 20px; border-radius: 999px; box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.55); transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s; white-space: nowrap; opacity: 0; pointer-events: none; }
.bulk-bar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.bulk-bar b { font-size: 14px; margin-right: 4px; }
.bulk-bar .select { width: auto; border-radius: 999px; padding: 7px 12px; background: var(--paper-2); color: var(--ink); border-color: transparent; font-size: 13px; }
.bulk-bar .btn { background: var(--paper-2); color: var(--ink); border-color: transparent; }
.bulk-bar .btn.danger-fill { background: var(--danger); color: #fff; }
.bulk-bar .circ { color: var(--ink); border-color: transparent; }
.bulk-bar .circ:hover { background: var(--paper-2); }
body:has(.bulk-bar.show) .toasts { bottom: 86px; }

/* Busca em 3 passos */
.step-title { display: flex; align-items: center; gap: 12px; padding: 16px 16px 0; }
.step-title.flat { padding: 0; }
.step-title b { display: block; font-size: 18px; letter-spacing: -0.01em; line-height: 1.2; }
.step-title span:not(.step-n) { font-size: 13px; color: var(--muted); }
.step-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--grad-fill); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.search-summary { font-size: 14.5px; line-height: 1.5; padding: 2px 2px 14px; }
.search-summary.empty-sum { color: var(--muted); }
.niche-picker .groups button:first-child:not(.on) { color: var(--accent); border-color: color-mix(in srgb, var(--blue) 45%, transparent); }

/* Mapa no tema escuro */
.leaflet-bar a, .leaflet-bar a:hover { background: var(--surface); color: var(--text); border-bottom-color: var(--line-2); }
.leaflet-bar { border: 1px solid var(--line-2) !important; box-shadow: var(--shadow) !important; }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-tooltip { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-family: var(--font); }
.leaflet-tooltip-top::before, .leaflet-tooltip-left::before, .leaflet-tooltip-right::before, .leaflet-tooltip-bottom::before { display: none; }

/* Ficha do lead */
.drawer { padding: 18px 24px 30px; box-shadow: -30px 0 60px -30px rgba(0, 0, 0, 0.6); }
.d-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.d-nav { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.d-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 18px; }
.d-hero .score span { font-size: 18px; }
.d-hero h2 { margin: 8px 0 4px; }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.d-details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.d-details summary::-webkit-details-marker { display: none; }
.d-details summary svg { transition: transform 0.2s; color: var(--muted); }
.d-details[open] summary svg { transform: rotate(90deg); }

/* Funil */
.kanban { grid-template-columns: repeat(6, minmax(200px, 1fr)); align-items: start; }
.col-body > * { flex: none; }
.col { min-height: 480px; padding: 10px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 4px; }
.col-head b { font-size: 14px; }
.col-head .col-n { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); padding: 1px 9px; border-radius: 999px; }
.col-act { border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.col-act:hover { background: var(--surface-2); color: var(--danger); }
.col-hint { margin-top: 0; padding: 0 6px 10px; }
.col-body { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 290px); min-height: 200px; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.col-empty { border: 1.5px dashed var(--line-2); border-radius: var(--r-md); padding: 22px 10px; text-align: center; font-size: 12.5px; color: var(--dim); }
.col.over .col-empty { border-color: var(--blue); color: var(--accent); }
.kcard { position: relative; padding: 11px 12px 10px 14px; transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s; overflow: hidden; }
.kcard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--st-novo); }
.kcard.t-quente::before { background: var(--grad); }
.kcard.t-morno::before { background: var(--blue); }
.kcard:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6); }
.kcard:active { cursor: grabbing; }
.k-top { display: flex; align-items: flex-start; gap: 6px; }
.k-top .nm { flex: 1; min-width: 0; margin-bottom: 2px; line-height: 1.3; }
.k-acts { position: absolute; top: 7px; right: 7px; display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--surface-2); box-shadow: -10px 0 12px -4px var(--surface-2); opacity: 0; transition: opacity 0.15s; }
.kcard:hover .k-acts, .kcard:focus-within .k-acts { opacity: 1; }
.k-btn { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 0; transition: background 0.12s, color 0.12s; }
.k-btn:hover { background: var(--blue); color: #fff; border-color: transparent; }
.k-btn.del:hover { background: var(--danger); }
.k-foot { display: flex; align-items: center; gap: 5px; margin-top: 9px; flex-wrap: wrap; }
.k-foot .k-btn { width: 24px; height: 24px; opacity: 0; }
.kcard:hover .k-foot .k-btn { opacity: 1; }
@media (hover: none) { .k-acts, .k-foot .k-btn { opacity: 1; } }
.trash-zone { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 16px 30px; border-radius: 999px; background: var(--surface); border: 1.5px dashed var(--danger); color: var(--danger); font-weight: 700; box-shadow: var(--shadow); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.15s, opacity 0.2s; pointer-events: none; opacity: 0; }
body.is-dragging .trash-zone { transform: translate(-50%, 0); pointer-events: auto; opacity: 1; }
.trash-zone.over { background: var(--danger); color: #fff; border-style: solid; transform: translate(-50%, 0) scale(1.06); }

/* Avisos */
.toast { display: flex; align-items: center; gap: 14px; transition: opacity 0.25s, transform 0.25s; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast button { border: 0; background: none; color: var(--blue); font-weight: 800; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme='light'] .toast button { color: var(--blue-light); }

/* Painel */
.kpi:hover { border-color: var(--line-2); }
.lead-row { border-radius: var(--r-sm); }

@media (max-width: 760px) {
  .bulk-bar { left: 12px; right: 12px; transform: translateY(160%); flex-wrap: wrap; border-radius: var(--r-lg); white-space: normal; }
  .bulk-bar.show { transform: none; }
  .kanban { grid-template-columns: repeat(6, 82vw); }
}

/* Site de demonstração na ficha */
.demo-site { margin: 18px 0 0; padding: 16px; border-radius: var(--r-md); background: var(--grad-soft); border: 1px solid var(--line-2) !important; }
.demo-site.done { background: var(--surface-2); }
.demo-site + .sec { border-top: 0; }
.kcard .chip.demo-ok, .lead-row .chip.demo-ok { color: var(--st-fechado); }

/* =========================================================
   v3 — retornos, checagem do site, histórico, Sistema Interno
   ========================================================= */
.chip.due { gap: 4px; color: var(--accent); border-color: color-mix(in srgb, var(--blue) 40%, transparent); }
.chip.due.today { background: var(--blue); color: #fff; border-color: transparent; }
.chip.due.late { background: var(--danger); color: #fff; border-color: transparent; }
.chip svg { display: inline-block; }
.pillnav .count.due { background: var(--danger); color: #fff; }
.pillnav a.active .count.due { background: #fff; color: var(--danger); }
.stack-chips { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.lead-row .meta .chip { padding: 1px 7px; font-size: 11px; vertical-align: 1px; }

.due-card::before { background: linear-gradient(90deg, var(--danger), var(--blue)) !important; }

.fu-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fu-pick button { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: background 0.15s, color 0.15s; }
.fu-pick button:hover { color: var(--text); border-color: var(--muted); }
.fu-pick .input { width: auto; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; }
.fu-pick .fu-clear { padding: 6px 8px; display: grid; place-items: center; }

.site-check { margin-top: 16px; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); }
.issues { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.issues li { display: flex; gap: 8px; align-items: flex-start; }
.issues li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-top: 7px; }
.ok-line { display: flex; gap: 6px; align-items: center; color: var(--ok); font-size: 13.5px; margin: 10px 0 0; }

.crm-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--st-fechado) 14%, transparent); border: 1px solid color-mix(in srgb, var(--st-fechado) 35%, transparent); }
.crm-box b { display: block; font-size: 14px; }
.crm-box span { font-size: 12.5px; color: var(--muted); }

.timeline { list-style: none; margin: 12px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--blue); }
.timeline li:first-child::before { background: var(--blue); }
.timeline time { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }

/* Autocompletar de cidades */
.geo-results { max-height: 420px; overflow-y: auto; }
.geo-results button { display: flex; align-items: center; gap: 10px; }
.geo-results button svg { flex: none; color: var(--muted); }
.geo-results button small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.geo-results button b { color: var(--accent); font-weight: 700; }
.geo-results button.on { background: var(--surface-2); }
.geo-results button.on svg { color: var(--blue); }
.geo-results button.geo { color: var(--muted); font-size: 13px; }

/* lista de cidades fica por cima dos controles do mapa */
.geo-results { z-index: 1100; }

/* Ações da lista: colorido = o negócio tem, cinza = não tem */
:root { --c-site: #3d9be0; --c-zap: #25d366; --c-insta: #e1306c; --c-fone: #f5b301; }
[data-theme='light'] { --c-site: #117dc6; --c-zap: #1aa64f; --c-insta: #d62976; --c-fone: #d99a00; }
.qa.site { --c: var(--c-site); }
.qa.zap { --c: var(--c-zap); }
.qa.insta { --c: var(--c-insta); }
.qa.fone { --c: var(--c-fone); }
.qa.site, .qa.zap, .qa.insta, .qa.fone { color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border-color: color-mix(in srgb, var(--c) 32%, transparent); }
.qa.site:hover, .qa.zap:hover, .qa.insta:hover, .qa.fone:hover { background: var(--c); color: #fff; border-color: transparent; }
.qa.off, .qa.dim { color: var(--muted); background: transparent; border-color: var(--line); filter: grayscale(1); opacity: 0.55; }
.qa.off { pointer-events: none; cursor: default; }
.qa.dim:hover { opacity: 1; filter: none; }
.quick-links { display: flex; gap: 6px; }

/* 4 botões de ação com folga (4 x 32px + espaços) */
.lead-row { grid-template-columns: 26px 46px minmax(0, 2.2fr) minmax(0, 1.2fr) 116px 100px 112px 158px; }
.lead-row .quick-links { gap: 8px; justify-content: flex-start; }
.quick-links .qa { flex: none; }
@media (max-width: 1100px) { .lead-row { grid-template-columns: 26px 46px minmax(0, 1fr) 110px 158px; } }
@media (max-width: 760px) { .lead-row { grid-template-columns: 26px 42px minmax(0, 1fr) 158px; } }

/* Diagnóstico para o cliente */
.diag-sec.done { background: linear-gradient(100deg, color-mix(in srgb, var(--blue) 9%, transparent), transparent); }
.diag-sec .input[readonly] { font-family: var(--mono); font-size: 12.5px; }
.dx-lista { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; padding: 2px; }
.dx-item { display: grid; grid-template-columns: auto 8px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.dx-item:hover { background: var(--surface-2); }
.dx-item .ck { margin-top: 2px; }
.dx-sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.dx-item b { display: block; font-size: 13.5px; font-weight: 600; }
.dx-item small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.field .dx-item, .field .dx-item b, .field .dx-item small { font-family: var(--font); text-transform: none; letter-spacing: normal; }
.field .dx-item { color: var(--text); font-size: 13.5px; font-weight: 400; margin: 0; }

/* ---------- Login ---------- */
.login-tela { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 80% -10%, rgba(17,125,198,.28), transparent 60%), var(--bg); }
.login-card { width: min(380px, 100%); display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 32px 28px; box-shadow: var(--shadow); }
.login-logo { height: 26px; width: auto; justify-self: start; }
:root[data-theme='light'] .login-logo { filter: invert(1) brightness(.35); }
.login-card h1 { font-size: 28px; line-height: 1.1; margin: 0; }
.login-sub { color: var(--muted); font-size: 14px; margin: -6px 0 4px; }
.login-card label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.login-card input { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 12px 14px; color: var(--text); }
.login-card input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.login-ou { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; }
.login-ou::before, .login-ou::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.login-erro { color: var(--danger); font-size: 13px; min-height: 1em; margin: 0; }
.login-card .btn { width: 100%; padding: 12px 18px; }
