/* Layout: faixa de números no topo; mapa do Brasil como palco central com a divisão por categoria ao lado; carteira de empresas agrupada por categoria embaixo.
   Cores: azul-noite profundo (confiança, tecnologia) como chão; amarelo Senna (energia, atenção) como destaque único;
   cada categoria com uma cor que conversa com o ramo (laranja abre o apetite, rosa para beleza, azul-aço para automotivo, verde para comércio). */
:root {
  color-scheme: dark;
  --night: #060b1c;
  --surface: #0c1530;
  --surface-2: #111d3f;
  --line: #22315f;
  --state: #121d42;
  --state-on: #1c2d66;
  --state-edge: #2c3f7c;
  --text: #eef2ff;
  --text-2: #b9c3e6;
  --muted: #8392bf;
  --gold: #ffd21f;
  --gold-soft: rgba(255, 210, 31, .14);
  --ok: #22d38a;
  --ok-soft: rgba(34, 211, 138, .14);
  --trial: #ffd21f;
  --trial-soft: rgba(255, 210, 31, .14);
  --off: #ff6f61;
  --off-soft: rgba(255, 111, 97, .14);
  --cat-food: #ff8a3d;
  --cat-beauty: #ff5fa8;
  --cat-auto: #4aa3ff;
  --cat-shop: #22d38a;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --r: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
button { font: inherit; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #13235a 0%, transparent 60%), var(--night);
  background-color: var(--night);
  color: var(--text); font-family: var(--body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
.wrap { max-width: 1240px; margin: 0 auto; padding-block: 28px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; gap: 28px; }

header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; }
.mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), #ffb000); color: var(--night);
  font-family: var(--display); font-weight: 800; font-size: 24px; box-shadow: 0 8px 30px rgba(255, 200, 0, .25); }
.brand h1 { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -.02em; line-height: 1; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.sample { font-size: 13px; color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(255, 210, 31, .3);
  padding: 7px 12px; border-radius: 999px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: grid; gap: 4px; }
.kpi .lab { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.kpi .val { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1.05; letter-spacing: -.02em; }
.kpi .sub { color: var(--text-2); font-size: 13px; }
.kpi.hero { background: linear-gradient(160deg, #1a2a63, var(--surface) 70%); border-color: #31458a; }
.kpi.hero .val { color: var(--gold); }
.kpi .val.ok { color: var(--ok); }

.stage { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.panel h2 { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; text-wrap: balance; }
.panel .hint { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }

.mapbox { position: relative; margin-top: 10px; }
#map { width: 100%; height: auto; display: block; max-height: 620px; }
#map path { fill: var(--state); stroke: var(--state-edge); stroke-width: .8; transition: fill .2s; cursor: pointer; }
#map path.has { fill: var(--state-on); }
#map path:hover, #map path.sel { fill: #2a3f8a; }
#map path:focus-visible { outline: none; stroke: var(--gold); stroke-width: 2; }
.uf { font: 700 9px var(--body); fill: var(--muted); pointer-events: none; letter-spacing: .04em; }
.dot { cursor: pointer; }
.dot .core { stroke: var(--night); stroke-width: 1.6; }
.dot .halo { opacity: .35; transform-box: fill-box; transform-origin: center; animation: pulse 2.6s ease-out infinite; }
.dot.dim { opacity: .18; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .55; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dot .halo { animation: none; opacity: .25; } }
.tip { position: absolute; pointer-events: none; background: #0a1230; border: 1px solid var(--state-edge); border-radius: 12px;
  padding: 10px 12px; font-size: 13px; min-width: 180px; box-shadow: 0 12px 30px rgba(0,0,0,.45); transform: translate(-50%, calc(-100% - 14px)); }
.tip b { display: block; font-size: 14px; }
.tip span { color: var(--text-2); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

.cats { display: grid; gap: 14px; margin-top: 16px; }
.cat-row { display: grid; gap: 6px; background: none; border: 0; color: inherit; text-align: left; padding: 10px 12px; margin: 0 -12px;
  border-radius: 12px; cursor: pointer; font: inherit; }
.cat-row:hover, .cat-row.on { background: var(--surface-2); }
.cat-row:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.cat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cat-name { font-weight: 700; }
.cat-name small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.cat-num { font-family: var(--display); font-weight: 800; font-size: 22px; }
.bar { height: 8px; border-radius: 99px; background: var(--state); overflow: hidden; }
.bar > div { height: 100%; border-radius: 99px; }
.states-list { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.states-list h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 5px 11px;
  font: 600 13px var(--body); cursor: pointer; }
.chip b { color: var(--gold); margin-left: 4px; }
.chip.on { border-color: var(--gold); color: var(--text); }
.chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tools input, .tools select { background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 12px;
  padding: 10px 14px; font: 500 14px var(--body); min-width: 0; }
.tools input { flex: 1 1 260px; }
.tools input:focus, .tools select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.clear { background: none; border: 0; color: var(--gold); font: 600 14px var(--body); cursor: pointer; padding: 8px; }
.count { color: var(--muted); font-size: 14px; margin-left: auto; }

.group { display: grid; gap: 12px; }
.group-head { display: flex; align-items: center; gap: 10px; }
.group-head .sw { width: 12px; height: 12px; border-radius: 4px; }
.group-head h2 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.01em; }
.group-head span { color: var(--muted); font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px; display: grid; gap: 12px; min-width: 0;
  border-top: 3px solid var(--c); }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.card h3 { font-size: 16px; font-weight: 700; line-height: 1.3; }
.card .where { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.ativa { color: var(--ok); background: var(--ok-soft); }
.pill.teste { color: var(--trial); background: var(--trial-soft); }
.pill.pausada { color: var(--off); background: var(--off-soft); }
.mods { display: flex; flex-wrap: wrap; gap: 6px; }
.mod { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.mod.off { opacity: .35; text-decoration: line-through; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.facts div { display: grid; }
.facts small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.facts span { font-size: 13px; font-weight: 600; }
.empty { color: var(--muted); padding: 30px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r); }
footer { color: var(--muted); font-size: 12px; }

@media (max-width: 960px) { .stage { grid-template-columns: minmax(0, 1fr); } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .kpi .val { font-size: 32px; } .brand h1 { font-size: 24px; } }

.session { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; }
.logout { background: none; border: 1px solid var(--line); color: var(--text-2); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; }
.logout:hover { border-color: var(--gold); color: var(--text); }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: grid; gap: 10px; max-width: 560px; }
.notice h2 { font-family: var(--display); font-size: 22px; }
.notice p { color: var(--text-2); }
.notice a { color: var(--gold); font-weight: 700; }
.nomap { color: var(--muted); font-size: 13px; margin-top: 8px; }
.loading { color: var(--muted); }
/* "Conectar empresa": leva à tela de login; o e-mail e a senha abrem a empresa da pessoa. */
.connect { background: var(--gold); color: var(--night); border-radius: 12px; padding: 12px 22px; font: 800 17px var(--body);
  text-decoration: none; box-shadow: 0 8px 30px rgba(255, 200, 0, .2); }
.connect:hover { filter: brightness(1.06); }
.connect:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
@media (max-width: 560px) { .connect { order: 3; width: 100%; text-align: center; } }
.showcase-note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 14px 18px; color: var(--text-2); font-size: 16px; }
/* Vídeo de apresentação na vitrine (visitante sem login). Vídeo em pé (9:16): coluna estreita ao lado do texto no
 * computador; no celular fica em cima, ocupando a largura. */
.vsl { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; align-items: center;
  background: linear-gradient(160deg, #1a2a63, var(--surface) 70%); border: 1px solid #31458a; border-radius: var(--r); padding: 22px; }
.vsl-video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 14px; background: #000; }
.vsl-text h2 { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.vsl-text p { color: var(--text-2); font-size: 17px; margin: 12px 0 0; max-width: 46ch; }
.vsl-cta { display: inline-block; margin-top: 20px; background: var(--ok); color: var(--night); border-radius: 12px; padding: 14px 24px;
  font: 800 17px var(--body); text-decoration: none; box-shadow: 0 8px 30px rgba(34, 211, 138, .2); }
.vsl-cta:hover { filter: brightness(1.06); }
.vsl-cta:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.vsl-text .vsl-note { color: var(--muted); font-size: 14px; margin-top: 10px; }
@media (max-width: 720px) {
  .vsl { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
  .vsl-video { max-width: 360px; margin: 0 auto; }
  .vsl-text { text-align: center; }
  .vsl-text p { margin-inline: auto; }
  .vsl-cta { width: 100%; text-align: center; }
}
