/* Painel do escritório — visual OLED + vermelhão iAPX (versão 2 do mockup aprovado em 03/11/2026).
   Preto puro e grade, uma cor por área, vermelhão como foco. Bebas nos títulos e números grandes, Geist no corpo,
   Geist Mono nos rótulos. Fontes locais, sem rede: Geist e Geist Mono sob a OFL em /fonts/OFL.txt. */

@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bebas Neue';
  src: url('fonts/BebasNeue-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --p1: #0a0a0a;
  --p2: #121212;
  --line: #262626;
  --line2: #3a3a3a;
  --ink: #f4f4f4;
  --mut: #a8a8a8;
  --soft: #808080;

  --foco: #F04B0A;      /* vermelhão iAPX: o que está em foco */
  --foco-ink: #260d05;
  --btn: #F04B0A;
  --btn-ink: #fff;
  --grid: #160a05;

  /* uma cor por área do cérebro */
  --a-nucleo: #F04B0A;
  --a-mkt: #ff3d8b;
  --a-cli: #4d94ff;
  --a-ges: #ffb627;
  --a-fer: #2be4a7;
  --a-ent: #ececec;
  --a-bib: #8FA3AD;     /* ardósia: material do curso, só consulta */

  --f-disp: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --f-body: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;

  --r: 3px;
  --pad: 32px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, dt { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 2px; }
code, .mono { font-family: var(--f-mono); }

.lbl { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.lbl b { color: var(--foco); font-weight: 600; }

/* ---------------------------------------------------------------- topo */
.topo { border-bottom: 1px solid var(--line); }
.topo-in { display: flex; align-items: center; gap: 16px; min-height: 84px; padding: 10px var(--pad); max-width: 1440px; margin: 0 auto; }
.identidade { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo { width: 44px; height: 44px; object-fit: contain; border: 1px solid var(--line2); border-radius: var(--r); background: var(--p1); flex: none; }
.monograma { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: var(--r); background: var(--p1); font-family: var(--f-disp); font-size: 26px; line-height: 1; }
.identidade-texto { min-width: 0; }
#nome { font-family: var(--f-disp); font-weight: 400; font-size: 30px; line-height: 1; letter-spacing: .01em; text-transform: uppercase; overflow-wrap: anywhere; }
#sub { color: var(--mut); font-size: 13px; margin-top: 4px; }

.abas { margin-left: auto; display: flex; gap: 4px; flex: none; }
.aba {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 8px 12px;
  color: var(--soft);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r);
}
.aba:hover { color: var(--ink); }
.aba.active { color: var(--ink); border-color: var(--line2); background: var(--p1); }
.vivo { display: flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 11px; color: var(--soft); flex: none; }
.vivo i { width: 7px; height: 7px; border-radius: 50%; background: var(--line2); display: inline-block; }
.vivo[data-estado='ao vivo'] i { background: var(--foco); }

main { position: relative; min-height: 0; }
.view { position: absolute; inset: 0; display: none; }
.view.active { display: block; }

/* --------------------------------------------------------------- cockpit */
.cockpit { height: 100%; overflow: auto; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }

.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(90deg, #000 10%, transparent 75%);
  mask-image: linear-gradient(90deg, #000 10%, transparent 75%);
}
.hero.novo::after {
  content: '';
  position: absolute;
  right: -40px; top: -20px; width: 380px; height: 380px;
  background: url('logo/simbolo.png') center / contain no-repeat;
  opacity: .08;
  pointer-events: none;
}
.hero .wrap { position: relative; padding-top: 40px; padding-bottom: 36px; }
.h1 { font-family: var(--f-disp); font-weight: 400; font-size: 60px; line-height: 1; letter-spacing: .01em; text-transform: uppercase; margin: 12px 0 10px; overflow-wrap: anywhere; }
.h1 em { font-style: normal; color: var(--foco); }
.lead { font-size: 17px; color: var(--mut); max-width: 760px; }
.lead strong { color: var(--ink); }
.comando { font-family: var(--f-mono); font-size: 14px; color: var(--ink); background: var(--p2); border: 1px solid var(--line2); border-radius: var(--r); padding: 1px 7px; white-space: nowrap; }
.trilha { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: 28px; }
.passo { border-top: 3px solid var(--line2); padding-top: 10px; min-width: 0; }
.passo.feito { border-top-color: var(--ink); }
.passo.agora { border-top-color: var(--foco); }
.passo strong { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.passo .marca { font-family: var(--f-mono); font-size: 11px; color: var(--soft); }
.passo.agora .marca { color: var(--foco); }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.stat { padding: 22px 0 22px 20px; border-left: 1px solid var(--line); min-width: 0; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .n { font-family: var(--f-disp); font-size: 44px; line-height: 1; letter-spacing: .01em; color: var(--cor, var(--ink)); }
.stat .t { font-size: 13px; color: var(--mut); margin-top: 6px; }

.cores { display: flex; gap: 18px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 12px; color: var(--mut); }
.cores span { display: flex; align-items: center; gap: 7px; }
.cores i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; background: var(--cor); }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; padding: 24px 0 40px; align-items: start; }
.c {
  grid-column: span var(--s, 6);
  min-width: 0;
  background: var(--p1);
  border: 1px solid var(--line);
  border-top: 2px solid var(--cor, var(--line2));
  border-radius: var(--r);
  padding: 20px;
}
.c > h3 { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cor, var(--soft)); font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.vazio { color: var(--soft); font-size: 14px; }
.nota-cmd { margin-top: 12px; font-size: 13px; color: var(--mut); }

/* saúde */
.nota-linha { display: flex; align-items: flex-end; gap: 14px; }
.nota { font-family: var(--f-disp); font-size: 96px; line-height: .85; letter-spacing: .01em; color: var(--cor); }
.nota-texto { padding-bottom: 4px; }
.veredito { font-size: 18px; font-weight: 600; }
.nota-escala { color: var(--mut); font-size: 13px; }
.agora-frase { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; max-width: 60ch; }
.agora-frase strong { color: var(--ink); }
.derruba { margin-top: 10px; }
.derruba li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pontos { font-family: var(--f-mono); color: var(--cor); }
.derruba strong { font-weight: 600; }
.derruba small { display: block; color: var(--soft); font-size: 12px; }
.em-dia { color: var(--soft); font-size: 12px; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }

/* esteira de status: marketing e clientes */
.esteira { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; align-items: end; }
.esteira-clientes { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.etapa { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.etapa i { display: block; background: var(--cor); border-radius: 2px 2px 0 0; min-height: 2px; }
.etapa-num { font-family: var(--f-disp); font-size: 34px; line-height: 1; margin-top: 6px; }
.etapa-nome { font-size: 12px; color: var(--mut); overflow-wrap: anywhere; }
.esteira-clientes .etapa { border-left: 1px solid var(--line); padding-left: 10px; }
.esteira-clientes .etapa:first-child { border-left: 0; padding-left: 0; }
.esteira-clientes .etapa-num { color: var(--cor); margin-top: 0; }
.etapa-nota { color: var(--soft); font-size: 13px; margin-top: 10px; }
.marketing-numeros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.marketing-numeros b { display: block; font-family: var(--f-disp); font-weight: 400; font-size: 34px; line-height: 1; }
.marketing-numeros span { display: block; font-size: 12px; color: var(--mut); }
.marketing-numeros small { display: block; font-size: 12px; color: var(--soft); }

/* entrada */
.tag { font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em; color: var(--foco-ink); background: var(--foco); border-radius: 2px; padding: 1px 5px; }
.arq { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 12.5px; }
.arq b { font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.arq span { color: var(--soft); text-align: right; flex: none; max-width: 48%; overflow-wrap: anywhere; }
.arq span.sabe { color: var(--cor); }
.arq small { display: block; font-family: var(--f-body); color: var(--soft); font-size: 12px; font-weight: 400; margin-top: 2px; }

/* o que falta */
.lacunas { counter-reset: n; }
.lacunas li { counter-increment: n; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.lacunas li::before { content: counter(n, decimal-leading-zero); font-family: var(--f-mono); color: var(--cor); font-size: 12px; padding-top: 2px; }
.lacunas small { display: block; color: var(--soft); font-size: 12px; overflow-wrap: anywhere; }
.lacunas .estado-lacuna { font-family: var(--f-mono); font-size: 11px; color: var(--soft); padding-top: 3px; }
.lacunas .estado-lacuna.falta { color: var(--cor); }
.lacunas li.maior strong { color: var(--cor); }

/* mapa no cockpit */
.c.mapa-mini { cursor: pointer; display: flex; flex-direction: column; }
.c.mapa-mini canvas { width: 100%; height: 240px; display: block; }
.c.mapa-mini:hover { border-color: var(--line2); }

/* ecossistema */
.conexoes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.conexao { border: 1px solid var(--line); border-left: 3px solid var(--e, var(--line2)); border-radius: var(--r); padding: 12px; background: var(--p2); min-width: 0; }
.conexao h3 { font-size: 15px; font-weight: 600; }
.conexao-ferramenta { color: var(--mut); font-size: 12px; margin-bottom: 8px; }
.conexao-detalhe { color: var(--soft); font-size: 12px; margin-top: 8px; }
.estado { font-family: var(--f-mono); font-size: 12px; display: inline-flex; align-items: center; gap: 7px; }
.estado::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.estado-ok { color: var(--ink); }
.estado-ok::before { background: var(--a-fer); }
.estado-falta { color: var(--mut); }
.estado-falta::before { border: 1px solid var(--mut); }
.estado-erro { color: var(--foco); }
.estado-erro::before { background: var(--foco); border-radius: 0; }
.repos li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 3px 0; font-size: 13px; }

/* listas */
.lista li { padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.lista li:first-child { border-top: 0; padding-top: 0; }
.lista strong { font-weight: 600; overflow-wrap: anywhere; }
.lista small { display: block; color: var(--soft); font-size: 12px; margin-top: 1px; overflow-wrap: anywhere; }
.biblioteca-linha { font-size: 14px; margin: 0 0 6px; }

/* ----------------------------------------------------------------- mapa */
#mapa-view.active { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.mapa-top { border-bottom: 1px solid var(--line); }
.mapa-top .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; max-width: none; }
.mt-stats { margin-left: auto; display: flex; gap: 28px; }
.mt-stats p { text-align: right; }
.mt-stats b { display: block; font-family: var(--f-disp); font-weight: 400; font-size: 30px; line-height: 1; letter-spacing: .01em; }
.mt-stats span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
#mt-saude { color: var(--foco); }

.mapa-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr) 290px; min-height: 0; }
.lado { padding: 20px; overflow: auto; min-height: 0; }
.lado.esq { border-right: 1px solid var(--line); }
.lado.dir { border-left: 1px solid var(--line); }

.busca { position: relative; margin-top: 12px; }
#search { width: 100%; height: 38px; background: var(--p1); border: 1px solid var(--line2); border-radius: var(--r); color: var(--ink); font-size: 14px; padding: 0 12px; outline: none; }
#search:focus { border-color: var(--foco); }
#search::placeholder, #pedido::placeholder { color: var(--soft); opacity: 1; }
.busca-resultados { position: absolute; top: 42px; left: 0; right: 0; max-height: 300px; overflow: auto; background: var(--p1); border: 1px solid var(--line2); border-radius: var(--r); padding: 4px; z-index: 40; }
.busca-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 2px; padding: 7px 9px; font-size: 13px; overflow-wrap: anywhere; }
button.busca-item:hover, button.busca-item:focus-visible { background: var(--p2); }
.busca-item small { display: block; color: var(--soft); font-family: var(--f-mono); font-size: 11px; }

.areas { display: grid; gap: 6px; margin-top: 14px; }
.legenda-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font-size: 13px; color: var(--ink); background: var(--p1); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: var(--r); padding: 9px 10px; }
.legenda-item .qtd { margin-left: auto; font-family: var(--f-mono); font-size: 12px; color: var(--soft); }
.legenda-item[aria-pressed='true'] { border-color: var(--c); background: var(--p2); }
.legenda-item.vazia { color: var(--soft); }
.legenda-item.off { color: var(--soft); }
.legenda-item:hover { background: var(--p2); }

.filtros { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.filtro, .palco-bts button { font-family: var(--f-mono); font-size: 12px; color: var(--mut); background: var(--bg); border: 1px solid var(--line2); border-radius: var(--r); padding: 6px 10px; }
.filtro:hover, .palco-bts button:hover { color: var(--ink); }
.filtro.active, .filtro[aria-pressed='true'], .palco-bts button[aria-pressed='true'] { color: var(--foco); border-color: var(--foco); }
.lado .lbl + .filtros, .lado .lbl.sep { margin-top: 22px; }

.top-con { margin-top: 10px; }
.top-con li { border-top: 1px solid var(--line); }
.top-con button { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; padding: 8px 0; font-size: 13px; overflow-wrap: anywhere; }
.top-con button:hover { color: var(--foco); }
.top-con i { width: 8px; height: 8px; border-radius: 50%; flex: none; transform: translateY(1px); background: var(--c); }
.top-con .qtd { margin-left: auto; font-family: var(--f-mono); font-size: 12px; color: var(--soft); }

.palco { position: relative; overflow: hidden; background: var(--bg); min-height: 0; }
#graph { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#graph.arrastando { cursor: grabbing; }
#graph.sobre { cursor: pointer; }
.palco-bts { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.palco-bts button { white-space: nowrap; }
.regiao { position: absolute; left: 24px; bottom: 22px; z-index: 2; pointer-events: none; max-width: 56%; }
.r-nome { font-family: var(--f-disp); font-size: 44px; line-height: 1; letter-spacing: .01em; text-transform: uppercase; color: var(--rc, var(--foco)); }
.r-sub { font-family: var(--f-mono); font-size: 12px; color: var(--mut); margin-top: 6px; }
.palco-pe { position: absolute; right: 20px; bottom: 22px; max-width: 38%; text-align: right; font: 11px var(--f-mono); color: var(--soft); z-index: 2; pointer-events: none; }
.dica { position: absolute; z-index: 3; pointer-events: none; background: var(--bg); border: 1px solid var(--line2); border-left: 3px solid var(--dc, var(--foco)); border-radius: var(--r); padding: 8px 10px; font-size: 13px; max-width: 280px; }
.dica b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.dica span { font-family: var(--f-mono); font-size: 11px; color: var(--soft); overflow-wrap: anywhere; }

.mapa-vazio { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; text-align: center; gap: 8px; padding: 90px 24px 24px; z-index: 2; pointer-events: none; }
.mapa-vazio h2 { font-family: var(--f-disp); font-weight: 400; font-size: 40px; line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; }
.mapa-vazio p { max-width: 46ch; color: var(--mut); }

.eventos { margin-top: 12px; }
.eventos li { border-top: 1px solid var(--line); }
.eventos button { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; width: 100%; text-align: left; background: none; border: 0; padding: 9px 0; font-size: 13px; }
.eventos button:hover span { color: var(--foco); }
.eventos time { font-family: var(--f-mono); font-size: 12px; color: var(--foco); }
.eventos span { overflow-wrap: anywhere; }
.eventos code { font-size: 12px; color: var(--soft); }
.exemplo { margin-top: 10px; font: 11px var(--f-mono); color: var(--soft); }

/* detalhe do arquivo, sobre o palco */
.painel { position: absolute; top: 60px; right: 12px; bottom: 12px; width: 340px; max-width: calc(100% - 24px); background: var(--p1); border: 1px solid var(--line2); border-left: 3px solid var(--pc, var(--foco)); border-radius: var(--r); padding: 16px 18px; overflow: auto; z-index: 30; }
.painel-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.painel h2 { font-size: 20px; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.painel-fechar { background: none; border: 1px solid var(--line2); border-radius: var(--r); padding: 3px 9px; font: 12px var(--f-mono); color: var(--mut); flex: none; }
.painel-fechar:hover { color: var(--ink); }
.painel-meta { color: var(--soft); font-size: 12px; font-family: var(--f-mono); margin-top: 6px; overflow-wrap: anywhere; }
.painel h3 { font-family: var(--f-mono); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--pc, var(--foco)); margin: 18px 0 6px; }
.painel li { border-top: 1px solid var(--line); }
.painel li button { width: 100%; text-align: left; background: none; border: 0; padding: 7px 0; font-size: 13px; overflow-wrap: anywhere; }
.painel li button:hover { color: var(--foco); }
.previa { font-family: var(--f-mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow: auto; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; }
.painel-acoes { display: flex; gap: 8px; margin-top: 16px; }
.botao { flex: 1; min-height: 38px; padding: 7px 12px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--bg); font-size: 14px; }
.botao:hover { border-color: var(--ink); }
.botao.primario { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); font-weight: 600; }
.botao.primario:hover { filter: brightness(1.08); }

/* --------------------------------------------------------------- rodapé */
.rodape { border-top: 1px solid var(--line); background: var(--bg); }
.rodape-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 12px; min-height: 64px; padding: 10px var(--pad); max-width: 1440px; margin: 0 auto; }
.rodape-rotulo { font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
#pedido { height: 38px; min-width: 0; padding: 0 12px; background: var(--p1); border: 1px solid var(--line2); border-radius: var(--r); font-size: 14px; outline: none; }
#pedido:focus { border-color: var(--foco); }
#pedido-send { height: 38px; padding: 0 16px; background: var(--btn); border: 0; border-radius: var(--r); color: var(--btn-ink); font-size: 14px; font-weight: 600; }
#pedido-send:hover { filter: brightness(1.08); }
.pedido-aviso { grid-column: 2 / -1; grid-row: 2; font-size: 13px; color: var(--ink); }
.pedido-aviso:empty { display: none; }
.assinatura { display: flex; align-items: center; gap: 8px; margin-left: 8px; color: var(--soft); font-size: 12px; white-space: nowrap; }
.assinatura img { height: 15px; width: auto; display: block; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 2px; border: 2px solid var(--bg); }

/* --------------------------------------------------------- telas menores */
@media (max-width: 1100px) {
  .mapa-grid { grid-template-columns: 240px minmax(0, 1fr) 250px; }
  .conexoes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  #mapa-view.active { display: block; overflow: auto; }
  .mapa-grid { grid-template-columns: minmax(0, 1fr); }
  .palco { height: 62vh; min-height: 420px; order: -1; }
  .lado, .lado.esq, .lado.dir { border: 0; border-top: 1px solid var(--line); overflow: visible; }
  .r-nome { font-size: 30px; }
  .palco-pe { display: none; }
  .painel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 70%; }
}

@media (max-width: 820px) {
  :root { --pad: 18px; }
  .topo-in { flex-wrap: wrap; gap: 10px 14px; min-height: 0; padding-top: 12px; padding-bottom: 10px; }
  .identidade { flex: 1 1 100%; }
  .abas { margin-left: 0; }
  .vivo { margin-left: auto; }
  #nome { font-size: 26px; }
  .h1 { font-size: 40px; }
  .hero .wrap { padding-top: 28px; padding-bottom: 26px; }
  .hero.novo::after { width: 220px; height: 220px; right: -60px; top: -20px; }
  .trilha { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat, .stat:first-child { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 16px; }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .stat:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .stat:last-child:nth-child(odd) { grid-column: span 2; }
  .c { grid-column: span 12; }
  .conexoes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .esteira { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .esteira-clientes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .esteira-clientes .etapa:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
  .mapa-top .wrap { flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
  .mt-stats { gap: 18px; }
  .rodape-in { grid-template-columns: minmax(0, 1fr) auto; min-height: 0; }
  .rodape-rotulo { display: none; }
  .pedido-aviso { grid-column: 1 / -1; grid-row: auto; }
  .assinatura { grid-column: 1 / -1; margin-left: 0; }
}

/* Clientes: o rótulo de status nunca quebra no meio da palavra. As colunas seguem a largura do próprio cartão, não a
   da tela: 5 lado a lado só onde "Onboarding" (64 px a 12 px) cabe inteiro, senão 3 por linha, e 2 no cartão
   mais estreito. Conta: 5 × (64 + 11 de borda e recuo) + 4 × 6 de vão = 399; 3 × 75 + 2 × 6 = 237. */
[data-bloco="clientes"] { container-type: inline-size; }
.esteira-clientes { row-gap: 14px; }
.esteira-clientes .etapa-nome { overflow-wrap: normal; }
@container (max-width: 399px) {
  .esteira-clientes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .esteira-clientes .etapa:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
}
@container (max-width: 236px) {
  .esteira-clientes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .esteira-clientes .etapa:nth-child(3n + 1) { border-left: 1px solid var(--line); padding-left: 10px; }
  .esteira-clientes .etapa:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
}

@media (max-width: 480px) {
  .nota { font-size: 80px; }
  .conexoes { grid-template-columns: minmax(0, 1fr); }
  .marketing-numeros { gap: 8px; }
  .palco-bts { top: 10px; flex-wrap: wrap; justify-content: center; width: calc(100% - 20px); }
  .regiao { left: 14px; bottom: 14px; max-width: calc(100% - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
