/* ============================================================
   Freedom · app (PWA)
   ============================================================

   Visual do app no celular, na linguagem do manual de marca da Freedom
   Consulting: noite no topo, papel no chão, roxo só na ação principal,
   Montserrat nos textos, Azeret Mono nas etiquetas, ícones Lucide.

   Prefixo ap- em tudo. Lê os tokens fc- de
   v2/marca/freedom-consulting-design-system.css (carregado antes), e não
   usa nenhuma classe fv- nem fc- de componente: o app é uma casca própria.

   Cores DISC só no que é DISC (avatar, barras do perfil e linha de
   espectro), nunca em botão ou aviso — regra da seção 15 do manual.
   ============================================================ */

:root {
  --ap-noite: var(--fc-noite, #170A33);
  /* Cor de ação da Freedom Consulting no sistema: noite no claro (o roxo
     #440897 é da Freedom Start e não entra aqui). No escuro vira #6B4FB8. */
  --ap-roxo: var(--ap-noite);
  --ap-roxo-ativo: #2C1A52;
  --ap-acento: #6B4FB8;
  --ap-lilas: var(--fc-lilas, #A98BEF);
  --ap-lilas-claro: #EFEAFC;
  --ap-lilas-fundo: #F7F4FE;
  --ap-lavanda: var(--fc-lavanda, #E2E8F8);
  --ap-amarelo: var(--fc-consulting-amarelo, #FBCD18);
  --ap-papel: #F5F4F9;
  --ap-branco: #FFFFFF;
  --ap-tinta: var(--fc-tinta, #10151C);
  --ap-apoio: #5F5A73;
  --ap-apagado: #8E8AA3;
  --ap-fio: #E7E4EF;
  --ap-fio-campo: #D3CEE0;
  --ap-foco: var(--fc-foco, #458CE6);
  --ap-ok: var(--fc-ok, #2B7A12);
  --ap-erro: var(--fc-erro, #C41417);

  --ap-disc-d: var(--fc-disc-d, #FF3131);
  --ap-disc-i: var(--fc-disc-i, #FBCD18);
  --ap-disc-s: var(--fc-disc-s, #6ACE26);
  --ap-disc-c: var(--fc-disc-c, #458CE6);

  --ap-display: var(--fc-font-display, 'Montserrat', system-ui, sans-serif);
  --ap-serif: var(--fc-font-serif, 'Newsreader', Georgia, serif);
  --ap-mono: var(--fc-font-mono, 'Azeret Mono', ui-monospace, monospace);

  --ap-raio: 14px;
  --ap-raio-cartao: 20px;
  --ap-raio-folha: 28px;
  --ap-sombra: 0 1px 2px rgba(23, 10, 51, .05), 0 10px 28px -16px rgba(23, 10, 51, .22);
  --ap-sombra-forte: 0 18px 40px -18px rgba(23, 10, 51, .45);

  --ap-abas-altura: 66px;
  --ap-seguro-topo: env(safe-area-inset-top, 0px);
  --ap-seguro-base: env(safe-area-inset-bottom, 0px);
  --ap-mola: cubic-bezier(.32, .72, 0, 1);

  /* Papéis que mudam no modo escuro (os valores aqui são os do claro). */
  --ap-superficie: #FFFFFF;          /* fundo de cartão, folha, campo */
  --ap-forte: var(--ap-noite);       /* texto e ícone forte sobre superfície */
  --ap-dado-forte: var(--ap-noite);  /* barra de destaque em gráfico */
  --ap-link: var(--ap-acento);       /* texto clicável */
  --ap-ok-fundo: #E6F3E1;
  --ap-erro-fundo: #FDECEC;
  --ap-erro-texto: #7A0F11;
  --ap-apagado-fundo: #F1EFF6;
  --ap-segmento-fundo: #E9E6F2;
  --ap-chave-off: #D9D5E5;
  --ap-abas-fundo: rgba(255, 255, 255, .9);
  --ap-rodape-fundo: rgba(245, 244, 249, .92);
  --ap-toast-fundo: var(--ap-noite);
}

/* ------------------------------------------------------------
   Base
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

/* O atributo hidden sempre vence: sem isto, qualquer regra com display
   (.ap-campo, .ap-instalar...) deixava visível o que o JS escondeu. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; background: var(--ap-noite); }

body.ap {
  margin: 0;
  min-height: 100dvh;
  background: var(--ap-papel);
  color: var(--ap-tinta);
  font-family: var(--ap-display);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

:where(.ap) a { color: inherit; }
:where(.ap) button { font: inherit; color: inherit; }
.ap img { max-width: 100%; }

.ap-icone {
  width: 22px; height: 22px; flex: none;
  stroke-width: 2;
}

.ap-pular {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ap-branco); padding: 8px 12px; border-radius: 8px;
}
.ap-pular:focus { left: 8px; }

.ap :focus-visible { outline: 3px solid var(--ap-foco); outline-offset: 2px; }

.ap-esconder { display: none !important; }
.ap-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Transição suave entre páginas (Chrome/Edge/Safari 18+). A barra de abas
   fica parada, como num app nativo. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: ap-sair .16s ease both; }
::view-transition-new(root) { animation: ap-entrar .22s var(--ap-mola) both; }
.ap-abas { view-transition-name: ap-abas; }
@keyframes ap-sair { to { opacity: 0; } }
@keyframes ap-entrar { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ------------------------------------------------------------
   Etiqueta (mono, caixa alta) — a voz "técnica" da marca
   ------------------------------------------------------------ */
.ap-etiqueta {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ap-mono); font-weight: 500;
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ap-apoio);
}
.ap-etiqueta-clara { color: var(--ap-lilas); }

/* ------------------------------------------------------------
   Linha de espectro (D I S C, segmentos inclinados)
   ------------------------------------------------------------ */
.ap-espectro {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 3px; height: 4px; overflow: hidden;
}
.ap-espectro i { flex: 1; transform: skewX(-23.5deg); }
.ap-espectro i:nth-child(1) { background: var(--ap-disc-d); margin-left: -4px; }
.ap-espectro i:nth-child(2) { background: var(--ap-disc-i); }
.ap-espectro i:nth-child(3) { background: var(--ap-disc-s); }
.ap-espectro i:nth-child(4) { background: var(--ap-disc-c); margin-right: -4px; }

/* ------------------------------------------------------------
   Topo
   ------------------------------------------------------------ */
.ap-topo {
  position: relative;
  background: var(--ap-noite);
  color: var(--ap-branco);
}

.ap-topo-grande { padding: calc(var(--ap-seguro-topo) + 22px) 20px 22px; }
.ap-topo-linha { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ap-topo-textos { min-width: 0; }
.ap-topo-titulo {
  margin: 4px 0 0;
  font-weight: 800; font-size: 30px; line-height: 1.05; letter-spacing: -.025em;
}

.ap-topo-simples {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
  padding: var(--ap-seguro-topo) 6px 4px;
  min-height: calc(var(--ap-seguro-topo) + 58px);
}
.ap-topo-titulo-pequeno {
  margin: 0; text-align: center;
  font-weight: 700; font-size: 16px; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ap-topo-voltar, .ap-topo-botao {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--ap-branco); text-decoration: none;
  background: transparent; border: 0; cursor: pointer;
}
.ap-topo-voltar:active, .ap-topo-botao:active { background: rgba(255, 255, 255, .12); }
.ap-topo-voltar .ap-icone { width: 26px; height: 26px; }
.ap-topo-acao { display: flex; justify-content: flex-end; }
.ap-topo-grande .ap-topo-botao { background: rgba(255, 255, 255, .08); }

/* ------------------------------------------------------------
   Conteúdo
   ------------------------------------------------------------ */
.ap-conteudo {
  width: 100%; max-width: 560px; margin: 0 auto;
  padding: 18px 16px calc(var(--ap-abas-altura) + var(--ap-seguro-base) + 28px);
}
.ap-sem-abas .ap-conteudo { padding-bottom: calc(var(--ap-seguro-base) + 120px); }

.ap-secao {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 26px 4px 10px;
}
.ap-secao:first-child { margin-top: 4px; }
.ap-secao-link {
  font-weight: 600; font-size: 13px; color: var(--ap-link); text-decoration: none;
  display: inline-flex; align-items: center; gap: 2px;
}
.ap-secao-link .ap-icone { width: 16px; height: 16px; }

/* ------------------------------------------------------------
   Cartão e lista
   ------------------------------------------------------------ */
.ap-cartao {
  background: var(--ap-superficie);
  border-radius: var(--ap-raio-cartao);
  box-shadow: var(--ap-sombra);
  padding: 18px;
}
.ap-cartao + .ap-cartao { margin-top: 12px; }
.ap-cartao-titulo { margin: 0 0 4px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.ap-cartao-texto { margin: 0; color: var(--ap-apoio); font-size: 13.5px; }

.ap-lista {
  background: var(--ap-superficie);
  border-radius: var(--ap-raio-cartao);
  box-shadow: var(--ap-sombra);
  overflow: hidden;
}
.ap-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.ap-item + .ap-item::before {
  content: ''; position: absolute; top: 0; left: 70px; right: 0;
  border-top: 1px solid var(--ap-fio);
}
a.ap-item:active, button.ap-item:active { background: var(--ap-lilas-fundo); }
button.ap-item { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; }

.ap-item-textos { flex: 1; min-width: 0; }
.ap-item-titulo {
  display: block; font-weight: 700; font-size: 15px; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ap-item-sub {
  display: block; margin-top: 2px; font-size: 12.5px; color: var(--ap-apoio);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ap-item-fim { display: flex; align-items: center; gap: 6px; flex: none; color: var(--ap-apagado); }
.ap-item-fim .ap-icone { width: 18px; height: 18px; }
.ap-item-quando { font-family: var(--ap-mono); font-size: 10.5px; color: var(--ap-apagado); }

/* Avatar com as iniciais. A cor vem do fator principal do DISC (letra noite
   sobre a cor, como na 9-Box); sem perfil ainda, lilás claro. */
.ap-avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ap-lilas-claro); color: var(--ap-forte);
  font-weight: 800; font-size: 14px; letter-spacing: -.02em;
}
.ap-avatar[data-fator="D"] { background: var(--ap-disc-d); color: var(--ap-noite); }
.ap-avatar[data-fator="I"] { background: var(--ap-disc-i); }
.ap-avatar[data-fator="S"] { background: var(--ap-disc-s); }
.ap-avatar[data-fator="C"] { background: var(--ap-disc-c); }
.ap-avatar-grande { width: 76px; height: 76px; font-size: 26px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .12); }

/* Status: ponto + texto (padrão da área do cliente) */
.ap-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ap-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ap-apoio); white-space: nowrap;
}
.ap-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ap-apagado)); }
.ap-status-ok { --c: var(--ap-ok); }
.ap-status-alerta { --c: #D98A00; }
.ap-status-erro { --c: var(--ap-erro); }
.ap-status-roxo { --c: var(--ap-roxo); }

/* Selo do perfil DISC (ex.: "SI") */
.ap-perfil {
  display: inline-flex; align-items: center; gap: 1px;
  padding: 3px 7px; border-radius: 7px;
  background: var(--ap-papel); border: 1px solid var(--ap-fio);
  font-family: var(--ap-mono); font-weight: 500; font-size: 11px; letter-spacing: .04em; color: var(--ap-forte);
}

/* Cadeado na lista */
.ap-cadeado {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  background: var(--ap-noite); color: var(--ap-amarelo);
}
.ap-cadeado .ap-icone { width: 16px; height: 16px; }

/* Sigla do tipo de mapeamento */
.ap-sigla {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--ap-noite); color: var(--ap-lilas);
  font-family: var(--ap-mono); font-weight: 500; font-size: 10.5px; letter-spacing: .06em;
}
.ap-sigla[data-tipo="N"] { color: var(--ap-amarelo); }

/* ------------------------------------------------------------
   Botões
   ------------------------------------------------------------ */
.ap-botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border-radius: var(--ap-raio); border: 1.5px solid transparent;
  font-family: var(--ap-display); font-weight: 700; font-size: 15px; letter-spacing: -.005em;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: transform .12s, background .15s, opacity .15s;
}
.ap-botao:active { transform: scale(.97); }
.ap-botao[disabled], .ap-botao.ap-carregando { opacity: .55; pointer-events: none; }
.ap-botao .ap-icone { width: 20px; height: 20px; }
.ap-botao-bloco { width: 100%; }
.ap-botao-grande { min-height: 56px; font-size: 16px; border-radius: 16px; }
.ap-botao-pequeno { min-height: 38px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.ap-botao-pequeno .ap-icone { width: 17px; height: 17px; }

.ap-botao-primario { background: var(--ap-roxo); color: var(--ap-branco); box-shadow: 0 10px 22px -12px rgba(23, 10, 51, .7); }
.ap-botao-primario:active { background: var(--ap-noite); }
.ap-botao-secundario { background: var(--ap-superficie); color: var(--ap-forte); border-color: var(--ap-fio-campo); }
.ap-botao-suave { background: var(--ap-lilas-claro); color: var(--ap-forte); }
.ap-botao-claro { background: var(--ap-branco); color: var(--ap-noite); }
.ap-botao-fantasma-claro { background: transparent; color: var(--ap-branco); border-color: rgba(255, 255, 255, .28); }
.ap-botao-perigo { background: var(--ap-superficie); color: var(--ap-erro); border-color: #F0C9CA; }

.ap-botoes { display: grid; gap: 10px; }
.ap-botoes-3 { grid-template-columns: repeat(3, 1fr); }
.ap-botoes-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Botão de ícone com rótulo embaixo (ações do link) */
.ap-acao {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 74px; padding: 10px 6px;
  border-radius: 16px; border: 0; background: var(--ap-papel);
  font-weight: 700; font-size: 12.5px; color: var(--ap-forte); text-decoration: none; cursor: pointer;
  transition: transform .12s, background .15s;
}
.ap-acao:active { transform: scale(.96); background: var(--ap-lilas-claro); }
.ap-acao .ap-icone { width: 24px; height: 24px; }
.ap-acao-destaque { background: var(--ap-roxo); color: var(--ap-branco); }
.ap-acao-destaque:active { background: var(--ap-roxo-ativo); }

/* ------------------------------------------------------------
   Barra de abas
   ------------------------------------------------------------ */
.ap-abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: start;
  height: calc(var(--ap-abas-altura) + var(--ap-seguro-base));
  padding: 6px 6px var(--ap-seguro-base);
  background: var(--ap-abas-fundo);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  backdrop-filter: saturate(1.8) blur(18px);
  border-top: 1px solid rgba(23, 10, 51, .08);
}
.ap-aba {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding-top: 2px;
  color: var(--ap-apagado); text-decoration: none;
  font-weight: 600; font-size: 10.5px; letter-spacing: .01em;
}
.ap-aba-icone {
  display: grid; place-items: center;
  width: 58px; height: 32px; border-radius: 999px;
  transition: background .2s;
}
.ap-aba-icone .ap-icone { width: 23px; height: 23px; stroke-width: 1.9; }
.ap-aba.ap-ativa { color: var(--ap-forte); font-weight: 800; }
.ap-aba.ap-ativa .ap-aba-icone { background: var(--ap-lilas-claro); }
.ap-aba.ap-ativa .ap-icone { stroke-width: 2.3; }
.ap-aba:active .ap-aba-icone { background: var(--ap-lilas-claro); }

.ap-aba-novo {
  justify-self: center;
  display: grid; place-items: center;
  width: 58px; height: 58px; margin-top: -24px;
  border-radius: 50%;
  background: var(--ap-roxo); color: var(--ap-branco);
  box-shadow: 0 0 0 5px var(--ap-papel), 0 14px 26px -10px rgba(23, 10, 51, .6);
  transition: transform .15s;
}
.ap-aba-novo:active { transform: scale(.92); background: var(--ap-roxo-ativo); }
.ap-aba-novo .ap-icone { width: 28px; height: 28px; stroke-width: 2.4; }

/* ------------------------------------------------------------
   Início
   ------------------------------------------------------------ */
.ap-hero {
  position: relative;
  background: var(--ap-noite); color: var(--ap-branco);
  padding: calc(var(--ap-seguro-topo) + 18px) 20px 86px;
  overflow: hidden;
}
/* Lâmina lilás translúcida no canto: o "A" da marca, sem desenhar o logo. */
.ap-hero::after {
  content: ''; position: absolute; right: -60px; top: -40px;
  width: 220px; height: 320px;
  background: linear-gradient(180deg, rgba(169, 139, 239, .22), rgba(169, 139, 239, 0));
  transform: skewX(-23.5deg);
  pointer-events: none;
}
.ap-hero-topo { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ap-hero-marca { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ap-hero-marca img { width: 34px; height: 34px; flex: none; }
.ap-hero-empresa {
  font-family: var(--ap-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ap-lavanda);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ap-hero-ola { position: relative; z-index: 1; margin: 26px 0 0; font-weight: 800; font-size: 28px; line-height: 1.1; letter-spacing: -.025em; }
.ap-hero-ola em { font-family: var(--ap-serif); font-style: italic; font-weight: 400; color: var(--ap-lilas); }
.ap-hero-frase { position: relative; z-index: 1; margin: 8px 0 0; color: var(--ap-lavanda); font-size: 14px; }

/* Carteira: cartão branco que sobe sobre o herói */
.ap-carteira {
  position: relative; z-index: 2;
  margin: -64px 16px 0;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--ap-superficie); border-radius: 22px; box-shadow: var(--ap-sombra-forte);
  overflow: hidden;
}
.ap-carteira a { display: block; padding: 16px 18px 15px; text-decoration: none; }
.ap-carteira a:active { background: var(--ap-lilas-fundo); }
.ap-carteira a + a { border-left: 1px solid var(--ap-fio); }
.ap-carteira strong {
  display: block; margin-top: 6px;
  font-weight: 800; font-size: 28px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.ap-carteira small { display: block; margin-top: 5px; font-size: 12px; color: var(--ap-apoio); }
.ap-carteira .ap-etiqueta .ap-icone { width: 14px; height: 14px; }
.ap-carteira-baixo strong { color: var(--ap-erro); }

/* Atalhos 2 × 2 */
.ap-atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ap-atalho {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 118px; padding: 16px;
  background: var(--ap-superficie); border-radius: var(--ap-raio-cartao); box-shadow: var(--ap-sombra);
  text-decoration: none; color: var(--ap-tinta);
  transition: transform .14s;
  border: 0; text-align: left; cursor: pointer; font: inherit;
}
.ap-atalho:active { transform: scale(.97); }
.ap-atalho-icone {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px;
  background: var(--ap-lilas-claro); color: var(--ap-forte);
}
.ap-atalho strong { display: block; font-weight: 800; font-size: 15px; letter-spacing: -.01em; }
.ap-atalho small { display: block; margin-top: 2px; font-size: 12px; color: var(--ap-apoio); line-height: 1.35; }
.ap-atalho-principal { background: var(--ap-roxo); color: var(--ap-branco); }
.ap-atalho-principal .ap-atalho-icone { background: rgba(255, 255, 255, .16); color: var(--ap-branco); }
.ap-atalho-principal small { color: var(--ap-lavanda); }
.ap-contador {
  position: absolute; top: 14px; right: 14px;
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--ap-amarelo); color: var(--ap-noite);
  font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums;
}

/* Instalar o app */
.ap-instalar {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px; padding: 16px 40px 16px 16px;
  border-radius: var(--ap-raio-cartao);
  background: var(--ap-noite); color: var(--ap-branco);
}
.ap-instalar img { width: 46px; height: 46px; flex: none; border-radius: 12px; }
.ap-instalar strong { display: block; font-weight: 800; font-size: 15px; }
.ap-instalar small { display: block; color: var(--ap-lavanda); font-size: 12.5px; }
.ap-instalar .ap-botao { margin-left: auto; flex: none; }
.ap-instalar-fechar { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--ap-lavanda); cursor: pointer; }
.ap-instalar-fechar .ap-icone { width: 16px; height: 16px; }

/* ------------------------------------------------------------
   Números (resumo do link)
   ------------------------------------------------------------ */
.ap-numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ap-numero {
  padding: 14px 12px; border-radius: 16px; background: var(--ap-superficie); box-shadow: var(--ap-sombra);
}
.ap-numero strong { display: block; font-weight: 800; font-size: 24px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ap-numero .ap-etiqueta { margin-top: 8px; font-size: 9.5px; }

/* ------------------------------------------------------------
   Links
   ------------------------------------------------------------ */
.ap-filtros {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 14px; padding: 2px 16px;
}
.ap-filtros::-webkit-scrollbar { display: none; }
.ap-filtro {
  flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 15px;
  border-radius: 999px; border: 1px solid var(--ap-fio-campo); background: var(--ap-superficie);
  font-weight: 600; font-size: 13px; color: var(--ap-apoio); text-decoration: none; white-space: nowrap;
}
.ap-filtro.ap-ativo { background: var(--ap-noite); border-color: var(--ap-forte); color: var(--ap-branco); }
.ap-filtro small { margin-left: 6px; font-family: var(--ap-mono); font-size: 10px; opacity: .7; }

.ap-link-cartao {
  display: block;
  background: var(--ap-superficie); border-radius: var(--ap-raio-cartao); box-shadow: var(--ap-sombra);
  overflow: hidden;
}
.ap-link-cartao + .ap-link-cartao { margin-top: 12px; }
.ap-link-topo { display: flex; gap: 12px; align-items: center; padding: 16px 16px 12px; text-decoration: none; color: inherit; }
.ap-link-topo:active { background: var(--ap-lilas-fundo); }
.ap-link-inativo .ap-sigla { background: var(--ap-fio); color: var(--ap-apagado); }
.ap-link-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; }
.ap-link-barra { margin: 0 16px; height: 6px; border-radius: 99px; background: var(--ap-papel); overflow: hidden; }
.ap-link-barra i { display: block; height: 100%; border-radius: 99px; background: var(--ap-link); }
.ap-link-rodape { display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px 16px; }
.ap-link-numeros { flex: 1; font-size: 12.5px; color: var(--ap-apoio); }
.ap-link-numeros b { color: var(--ap-tinta); font-weight: 800; font-variant-numeric: tabular-nums; }
.ap-botao-icone {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 0; background: var(--ap-papel); color: var(--ap-forte); cursor: pointer; text-decoration: none;
}
.ap-botao-icone:active { background: var(--ap-lilas-claro); transform: scale(.94); }
.ap-botao-icone .ap-icone { width: 19px; height: 19px; }

/* QR */
.ap-qr-cartao { text-align: center; }
.ap-qr {
  display: grid; place-items: center;
  width: min(250px, 72vw); aspect-ratio: 1; margin: 4px auto 0;
  padding: 12px; border-radius: 18px; background: var(--ap-branco);
  border: 1px solid var(--ap-fio);
}
.ap-qr svg { width: 100%; height: 100%; display: block; }
.ap-url {
  display: block; margin: 14px auto 0; max-width: 100%;
  font-family: var(--ap-mono); font-size: 11px; color: var(--ap-apoio);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* QR em tela cheia (para mostrar à turma) */
.ap-qr-tela {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: calc(var(--ap-seguro-topo) + 24px) 24px calc(var(--ap-seguro-base) + 24px);
  background: var(--ap-noite); color: var(--ap-branco); text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.ap-qr-tela.ap-aberta { opacity: 1; pointer-events: auto; }
.ap-qr-tela .ap-qr { width: min(78vw, 62vh, 440px); padding: 18px; border: 0; border-radius: 26px; }
.ap-qr-tela h2 { margin: 0; font-weight: 900; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.ap-qr-tela p { margin: 0; color: var(--ap-lavanda); font-size: 15px; }
.ap-qr-tela-fechar {
  position: absolute; top: calc(var(--ap-seguro-topo) + 14px); right: 14px;
  width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); color: var(--ap-branco); cursor: pointer;
}
.ap-qr-tela .ap-espectro { height: 6px; }

/* ------------------------------------------------------------
   Pessoa
   ------------------------------------------------------------ */
.ap-pessoa-hero {
  position: relative; text-align: center;
  background: var(--ap-noite); color: var(--ap-branco);
  padding: 8px 20px 30px;
}
.ap-pessoa-hero h2 { margin: 14px 0 2px; font-weight: 800; font-size: 23px; letter-spacing: -.02em; line-height: 1.15; }
.ap-pessoa-hero p { margin: 0; color: var(--ap-lavanda); font-size: 13px; }
.ap-pessoa-hero .ap-perfil { margin-top: 12px; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: var(--ap-branco); font-size: 12px; }

.ap-barras { display: grid; gap: 14px; }
.ap-barra { display: grid; grid-template-columns: 30px 1fr 34px; align-items: center; gap: 12px; }
.ap-barra-letra {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  font-weight: 800; font-size: 14px; color: var(--ap-noite); background: var(--cor);
}
.ap-barra-nome { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ap-apoio); margin-bottom: 5px; }
.ap-barra-trilho { height: 10px; border-radius: 99px; background: var(--ap-papel); overflow: hidden; }
.ap-barra-trilho i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--cor); transition: width .9s var(--ap-mola); }
.ap-barra-valor { font-weight: 800; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.ap-barra-fraca .ap-barra-trilho i { opacity: .45; }

.ap-dupla { display: grid; grid-template-columns: 1fr 1fr; }
.ap-dupla > div { padding: 2px 0; }
.ap-dupla > div + div { padding-left: 16px; border-left: 1px solid var(--ap-fio); }
.ap-dupla strong { display: block; margin-top: 6px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }

.ap-relatorio { display: flex; gap: 14px; align-items: flex-start; }
.ap-relatorio-icone {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 15px;
  background: var(--ap-noite); color: var(--ap-amarelo);
}
.ap-relatorio-icone.ap-liberado { background: var(--ap-ok-fundo); color: var(--ap-ok); }

/* ------------------------------------------------------------
   Formulário
   ------------------------------------------------------------ */
.ap-campo { display: block; margin-bottom: 22px; }
.ap-rotulo { display: block; margin-bottom: 9px; font-weight: 700; font-size: 13.5px; color: var(--ap-tinta); }
.ap-rotulo small { font-weight: 500; color: var(--ap-apagado); }
.ap-ajuda { display: block; margin-top: 7px; font-size: 12.5px; color: var(--ap-apoio); }

.ap-entrada {
  width: 100%; height: 54px; padding: 0 16px;
  border-radius: var(--ap-raio); border: 1.5px solid var(--ap-fio-campo); background: var(--ap-superficie);
  font-family: var(--ap-display); font-weight: 600; font-size: 16px; color: var(--ap-tinta);
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.ap-entrada::placeholder { color: #ABA7BC; font-weight: 500; }
.ap-entrada:focus { outline: none; border-color: var(--ap-roxo); box-shadow: 0 0 0 3px rgba(69, 140, 230, .35); }
select.ap-entrada {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23170A33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
}
.ap-entrada-grupo { position: relative; display: block; }
.ap-entrada-grupo .ap-entrada { padding-right: 54px; }
.ap-entrada-botao {
  position: absolute; right: 5px; top: 5px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 11px; background: none; color: var(--ap-apoio); cursor: pointer;
}

.ap-busca { position: relative; margin-bottom: 14px; }
.ap-busca .ap-icone { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ap-apagado); }
.ap-busca .ap-entrada { padding-left: 46px; height: 50px; border-color: transparent; box-shadow: var(--ap-sombra); }

/* Escolha do tipo (cartões com rádio) */
.ap-tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ap-tipo { position: relative; display: block; cursor: pointer; }
.ap-tipo input { position: absolute; opacity: 0; pointer-events: none; }
.ap-tipo-corpo {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: 14px; border-radius: 18px; background: var(--ap-superficie);
  border: 2px solid transparent; box-shadow: var(--ap-sombra);
  transition: border-color .15s, background .15s, transform .12s;
}
.ap-tipo:active .ap-tipo-corpo { transform: scale(.97); }
.ap-tipo-corpo strong { font-weight: 800; font-size: 14px; line-height: 1.2; letter-spacing: -.01em; }
.ap-tipo-corpo small { font-size: 11.5px; color: var(--ap-apoio); line-height: 1.3; }
.ap-tipo .ap-sigla { width: 38px; height: 38px; border-radius: 11px; font-size: 9.5px; }
.ap-tipo-check {
  position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ap-roxo); color: var(--ap-branco);
  transform: scale(0); transition: transform .2s var(--ap-mola);
}
.ap-tipo-check .ap-icone { width: 14px; height: 14px; stroke-width: 3; }
.ap-tipo input:checked + .ap-tipo-corpo { border-color: var(--ap-roxo); background: var(--ap-lilas-fundo); }
.ap-tipo input:checked ~ .ap-tipo-check { transform: scale(1); }
.ap-tipo input:focus-visible + .ap-tipo-corpo { outline: 3px solid var(--ap-foco); outline-offset: 2px; }

/* Chips de escolha (validade, quantidade rápida) */
.ap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-chip { position: relative; cursor: pointer; }
.ap-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ap-chip span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid var(--ap-fio-campo); background: var(--ap-superficie);
  font-weight: 700; font-size: 13.5px; color: var(--ap-apoio);
  transition: background .15s, color .15s, border-color .15s;
}
.ap-chip input:checked + span { background: var(--ap-noite); border-color: var(--ap-forte); color: var(--ap-branco); }
.ap-chip input:focus-visible + span { outline: 3px solid var(--ap-foco); outline-offset: 2px; }
button.ap-chip-botao {
  display: inline-flex; align-items: center; height: 34px; padding: 0 13px;
  border-radius: 999px; border: 1.5px solid var(--ap-fio-campo); background: var(--ap-superficie);
  font-weight: 700; font-size: 12.5px; color: var(--ap-apoio); cursor: pointer;
}
button.ap-chip-botao:active { background: var(--ap-lilas-claro); }

/* Contador − 10 + */
.ap-passo { display: grid; grid-template-columns: 54px 1fr 54px; gap: 10px; }
.ap-passo button {
  display: grid; place-items: center; height: 54px; border-radius: var(--ap-raio);
  border: 1.5px solid var(--ap-fio-campo); background: var(--ap-superficie); color: var(--ap-forte); cursor: pointer;
}
.ap-passo button:active { background: var(--ap-lilas-claro); transform: scale(.95); }
.ap-passo .ap-entrada { text-align: center; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.ap-passo-rapido { margin-top: 10px; display: flex; gap: 8px; }

/* Chave liga/desliga */
.ap-alternar, .ap-manter {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 14px 16px; border-radius: 16px; background: var(--ap-superficie); box-shadow: var(--ap-sombra);
}
.ap-alternar + .ap-alternar { margin-top: 10px; }
.ap-alternar input, .ap-manter input { position: absolute; opacity: 0; pointer-events: none; }
.ap-alternar > span:last-child, .ap-manter > span:last-child { flex: 1; min-width: 0; }
.ap-alternar strong, .ap-manter strong { display: block; font-weight: 700; font-size: 14px; }
.ap-alternar small, .ap-manter small { display: block; margin-top: 2px; font-size: 12px; color: var(--ap-apoio); }
.ap-chave {
  position: relative; flex: none; order: 2;
  width: 50px; height: 30px; border-radius: 99px; background: var(--ap-chave-off);
  transition: background .2s;
}
.ap-chave::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ap-branco); box-shadow: 0 2px 6px rgba(23, 10, 51, .25);
  transition: transform .25s var(--ap-mola);
}
input:checked + .ap-chave { background: var(--ap-roxo); }
input:checked + .ap-chave::after { transform: translateX(20px); }
input:focus-visible + .ap-chave { outline: 3px solid var(--ap-foco); outline-offset: 2px; }

/* Barra de ação fixa no rodapé (telas de formulário) */
.ap-rodape-fixo {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 12px 16px calc(var(--ap-seguro-base) + 12px);
  background: var(--ap-rodape-fundo);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid rgba(23, 10, 51, .06);
}
.ap-rodape-fixo > * { max-width: 528px; margin: 0 auto; }
.ap-rodape-resumo { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 12.5px; color: var(--ap-apoio); }
.ap-rodape-resumo b { color: var(--ap-tinta); }

/* ------------------------------------------------------------
   Alerta, vazio e aviso
   ------------------------------------------------------------ */
.ap-alerta {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 16px; border-radius: 14px;
  background: var(--ap-erro-fundo); color: var(--ap-erro-texto); font-size: 13.5px; font-weight: 600;
}
.ap-alerta .ap-icone { width: 20px; height: 20px; margin-top: 1px; }
.ap-alerta a { color: inherit; font-weight: 800; }
.ap-alerta-info { background: var(--ap-lilas-claro); color: var(--ap-forte); }

.ap-vazio { text-align: center; padding: 38px 24px; }
.ap-vazio-icone {
  display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 22px;
  background: var(--ap-lilas-claro); color: var(--ap-forte); margin-bottom: 14px;
}
.ap-vazio-icone .ap-icone { width: 28px; height: 28px; }
.ap-vazio strong { display: block; font-weight: 800; font-size: 17px; }
.ap-vazio p { margin: 6px auto 18px; max-width: 280px; color: var(--ap-apoio); font-size: 13.5px; }

body.ap-tela-cheia { background: var(--ap-noite); color: var(--ap-branco); }
.ap-aviso {
  min-height: 100dvh; display: flex; flex-direction: column; justify-content: center;
  max-width: 420px; margin: 0 auto;
  padding: calc(var(--ap-seguro-topo) + 32px) 28px calc(var(--ap-seguro-base) + 32px);
}
.ap-aviso h1 { margin: 22px 0 8px; font-weight: 900; font-size: 30px; letter-spacing: -.025em; line-height: 1.1; }
.ap-aviso p { margin: 0 0 28px; color: var(--ap-lavanda); }
.ap-aviso-acoes { display: grid; gap: 10px; }

/* ------------------------------------------------------------
   Folha (bottom sheet), véu e toast
   ------------------------------------------------------------ */
.ap-veu {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(14, 6, 32, .5);
  opacity: 0; transition: opacity .25s;
}
.ap-veu.ap-visivel { opacity: 1; }

.ap-folha {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-width: 560px; margin: 0 auto; max-height: 90dvh; overflow-y: auto;
  padding: 8px 20px calc(var(--ap-seguro-base) + 22px);
  background: var(--ap-superficie); border-radius: var(--ap-raio-folha) var(--ap-raio-folha) 0 0;
  box-shadow: 0 -10px 40px rgba(14, 6, 32, .25);
  transform: translateY(105%); transition: transform .36s var(--ap-mola);
  visibility: hidden;
}
.ap-folha.ap-aberta { transform: translateY(0); visibility: visible; }
.ap-folha-alca { display: block; width: 40px; height: 5px; margin: 4px auto 16px; border-radius: 99px; background: var(--ap-fio); }
.ap-folha h2 { margin: 0 0 6px; font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.ap-folha > p { margin: 0 0 18px; color: var(--ap-apoio); font-size: 14px; }
.ap-folha-icone {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; margin-bottom: 14px;
  background: var(--ap-noite); color: var(--ap-amarelo);
}
.ap-folha-icone .ap-icone { width: 26px; height: 26px; }
.ap-folha-conta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; margin-bottom: 18px; border-radius: 16px; background: var(--ap-papel);
  font-size: 13.5px; color: var(--ap-apoio);
}
.ap-folha-conta b { color: var(--ap-tinta); font-weight: 800; font-size: 15px; }
.ap-folha .ap-botoes { margin-top: 4px; }

/* Passos do "Adicionar à Tela de Início" (iPhone) */
.ap-passos { margin: 0 0 20px; padding: 0; list-style: none; counter-reset: passo; }
.ap-passos li {
  counter-increment: passo; display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--ap-fio); font-size: 14px;
}
.ap-passos li:first-child { border-top: 0; }
.ap-passos li::before {
  content: counter(passo); display: grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%; background: var(--ap-noite); color: var(--ap-branco);
  font-weight: 800; font-size: 13px;
}
.ap-passos .ap-icone { width: 18px; height: 18px; vertical-align: -4px; color: var(--ap-foco); }

.ap-toasts {
  position: fixed; left: 0; right: 0; top: calc(var(--ap-seguro-topo) + 10px); z-index: 95;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.ap-toast {
  display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 32px);
  padding: 12px 18px 12px 14px; border-radius: 999px;
  background: var(--ap-toast-fundo); color: var(--ap-branco);
  font-weight: 700; font-size: 14px; box-shadow: 0 14px 30px -12px rgba(14, 6, 32, .6);
  animation: ap-toast-entra .35s var(--ap-mola) both;
}
.ap-toast .ap-icone { width: 20px; height: 20px; color: var(--ap-disc-s); }
.ap-toast-erro .ap-icone { color: #FF8A8A; }
.ap-toast.ap-saindo { animation: ap-toast-sai .25s ease both; }
@keyframes ap-toast-entra { from { opacity: 0; transform: translateY(-16px) scale(.96); } }
@keyframes ap-toast-sai { to { opacity: 0; transform: translateY(-10px); } }

/* Confirmação de sucesso (desbloqueio, link criado) */
.ap-sucesso {
  display: grid; place-items: center; width: 72px; height: 72px; margin: 6px auto 16px;
  border-radius: 50%; background: var(--ap-ok-fundo); color: var(--ap-ok);
  animation: ap-pulo .5s var(--ap-mola) both;
}
.ap-sucesso .ap-icone { width: 36px; height: 36px; stroke-width: 2.6; }
@keyframes ap-pulo { from { transform: scale(.4); opacity: 0; } }

.ap-girando { animation: ap-gira .8s linear infinite; }
@keyframes ap-gira { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------
   Entrar
   ------------------------------------------------------------ */
body.ap-entrar {
  position: relative; overflow-x: hidden;
  background: var(--ap-noite, #170A33); color: var(--ap-branco);   /* noite: o chão da Freedom Consulting no sistema */
}
/* Compacta de propósito: cabe inteira na tela do celular, sem rolagem. */
.ap-entrar-coluna {
  position: relative; z-index: 1;
  max-width: 400px; min-height: 100dvh; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--ap-seguro-topo) + 18px) 20px calc(var(--ap-seguro-base) + 16px);
}
.ap-entrar-marca img { display: block; width: 40px; height: 40px; }
.ap-entrar-marca h1 { margin: 12px 0 18px; font-weight: 900; font-size: 27px; line-height: 1.05; letter-spacing: -.03em; }
.ap-entrar-marca em { font-family: var(--ap-serif); font-style: italic; font-weight: 400; color: var(--ap-amarelo); letter-spacing: -.01em; }
.ap-entrar-cartao {
  padding: 18px 16px 14px; border-radius: 22px;
  background: var(--ap-superficie); color: var(--ap-tinta);
  box-shadow: 0 30px 60px -30px rgba(14, 6, 32, .7);
}
.ap-entrar-cartao .ap-campo { margin-bottom: 12px; }
.ap-entrar-cartao .ap-rotulo { margin-bottom: 6px; font-size: 13px; }
.ap-entrar-cartao .ap-entrada { height: 48px; }
.ap-entrar-cartao .ap-entrada-botao { top: 2px; }
.ap-entrar-cartao .ap-manter { gap: 10px; margin: 2px 0 14px; padding: 10px 12px; background: var(--ap-papel); box-shadow: none; border-radius: 14px; }
.ap-entrar-cartao .ap-manter strong { font-size: 13px; }
.ap-entrar-cartao .ap-manter small { font-size: 11.5px; margin-top: 0; }
.ap-entrar-cartao .ap-botao-grande { min-height: 50px; }
.ap-entrar-links { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; font-weight: 700; }
.ap-entrar-links a { color: var(--ap-link); text-decoration: none; }
/* Assinatura: by Freedom Start (logo branco sobre o roxo, nunca sobre o amarelo) */
.ap-entrar-assinatura {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 18px 0 0; color: var(--ap-lavanda);
  font-family: var(--ap-serif); font-style: italic; font-size: 14px;
}
.ap-entrar-assinatura img { display: block; height: 20px; width: auto; }
/* Lâmina amarela, larga com a fina partida (como no login do V2), no canto
   de cima: longe do formulário e do logo. */
.ap-entrar-lamina {
  position: fixed; z-index: 0; right: -150px; top: -70px;
  width: 260px; height: 170px; background: var(--ap-amarelo);
  transform: skewX(-23.5deg); pointer-events: none;
}
.ap-entrar-lamina::before {
  content: ''; position: absolute; left: -42px; top: 0; bottom: 0; width: 14px; background: var(--ap-amarelo);
}

/* Telas largas (tablet ou computador): o app vira uma coluna centrada */
@media (min-width: 700px) {
  .ap-hero, .ap-topo-grande, .ap-pessoa-hero { padding-left: max(20px, calc(50% - 260px)); padding-right: max(20px, calc(50% - 260px)); }
  .ap-carteira { max-width: 528px; margin-left: auto; margin-right: auto; }
  .ap-abas { max-width: 560px; margin: 0 auto; border-radius: 22px 22px 0 0; border: 1px solid rgba(23, 10, 51, .08); }
}

.ap-chip .ap-icone { width: 16px; height: 16px; }
/* Barra de espectro do topo some quando o herói logo abaixo já tem a dele */
.ap-topo-simples:has(+ .ap-pessoa-hero) .ap-espectro { display: none; }
.ap-tipo-corpo strong, .ap-tipo-corpo small { display: block; }
.ap-tipo-corpo small { margin-top: 3px; }
.ap-botoes-2 .ap-botao { padding: 0 10px; white-space: nowrap; font-size: 14px; }

/* Natural × Adaptado no perfil: natural cheio, adaptado listrado e mais fino */
.ap-legenda { display: flex; gap: 16px; margin-bottom: 16px; font-size: 12px; font-weight: 600; color: var(--ap-apoio); }
.ap-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.ap-legenda i { display: inline-block; width: 18px; height: 8px; border-radius: 99px; }
.ap-legenda-natural { background: var(--ap-dado-forte); }
.ap-legenda-adaptado { background: repeating-linear-gradient(-45deg, var(--ap-noite) 0 3px, #B9B3CC 3px 5px); }
.ap-barra2 { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.ap-barra2 .ap-barra-letra { margin-top: 2px; }
.ap-barra2-linha { display: grid; grid-template-columns: 1fr 26px; align-items: center; gap: 10px; }
.ap-barra2-linha + .ap-barra2-linha { margin-top: 6px; }
.ap-barra2-linha span { font-weight: 800; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.ap-barra2-linha.ap-adaptado .ap-barra-trilho { height: 7px; }
.ap-barra2-linha.ap-adaptado .ap-barra-trilho i {
  background: repeating-linear-gradient(-45deg, var(--cor) 0 4px, color-mix(in srgb, var(--cor) 40%, #fff) 4px 7px);
}
.ap-barra2-linha.ap-adaptado span { font-weight: 600; font-size: 12.5px; color: var(--ap-apoio); }
.ap-barra-dif {
  font-family: var(--ap-mono); font-size: 10.5px; letter-spacing: .02em; color: var(--ap-apoio);
  padding: 1px 6px; border-radius: 6px; background: var(--ap-papel);
}
.ap-leitura { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--ap-fio); font-size: 13px; color: var(--ap-apoio); line-height: 1.5; }

/* Busca com botão Filtrar (aparece só quando há texto) */
.ap-busca .ap-entrada { padding-right: 98px; }
.ap-busca input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.ap-busca-botao {
  position: absolute; right: 6px; top: 6px; height: 38px; padding: 0 16px;
  border: 0; border-radius: 11px; background: var(--ap-roxo); color: var(--ap-branco);
  font-family: var(--ap-display); font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.ap-busca-botao:active { transform: scale(.95); background: var(--ap-noite); }
.ap-busca .ap-entrada:placeholder-shown ~ .ap-busca-botao { display: none; }

/* ------------------------------------------------------------
   Comprar créditos
   ------------------------------------------------------------ */
.ap-segmento {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  border-radius: 16px; background: var(--ap-segmento-fundo);
}
.ap-segmento a {
  display: flex; align-items: center; justify-content: center; gap: 7px; height: 42px;
  border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--ap-apoio);
}
.ap-segmento a .ap-icone { width: 18px; height: 18px; }
.ap-segmento a.ap-ativo { background: var(--ap-superficie); color: var(--ap-forte); box-shadow: 0 2px 8px -3px rgba(23, 10, 51, .25); }

.ap-saldo {
  position: relative; overflow: hidden; margin-top: 14px; padding: 18px 20px 22px;
  border-radius: var(--ap-raio-cartao); background: var(--ap-noite); color: var(--ap-branco);
}
.ap-saldo strong { display: block; margin-top: 6px; font-weight: 800; font-size: 36px; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ap-saldo small { display: block; margin-top: 6px; color: var(--ap-lavanda); font-size: 13px; }

.ap-pacote {
  position: relative; padding: 18px; border-radius: var(--ap-raio-cartao);
  background: var(--ap-superficie); box-shadow: var(--ap-sombra); border: 2px solid transparent;
}
.ap-pacote + .ap-pacote { margin-top: 12px; }
.ap-pacote-popular { border-color: var(--ap-roxo); }
.ap-pacote-destaque { border-color: var(--ap-forte); }
.ap-pacote-bloqueado { background: var(--ap-apagado-fundo); box-shadow: none; }
.ap-pacote-fita {
  display: inline-flex; align-items: center; gap: 5px; margin-bottom: 10px; padding: 4px 10px; border-radius: 999px;
  background: var(--ap-amarelo); color: var(--ap-noite);
  font-family: var(--ap-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
}
.ap-pacote-fita .ap-icone { width: 12px; height: 12px; }
.ap-pacote-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.ap-pacote-nome { margin: 0; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.ap-pacote-desc { margin: 4px 0 0; font-size: 12.5px; color: var(--ap-apoio); line-height: 1.4; }
.ap-pacote-desc .ap-icone { width: 14px; height: 14px; vertical-align: -2px; }
.ap-pacote-preco { text-align: right; flex: none; }
.ap-pacote-preco s { display: block; font-size: 12px; color: var(--ap-apagado); }
.ap-pacote-preco strong { display: block; font-weight: 800; font-size: 22px; letter-spacing: -.02em; white-space: nowrap; }
.ap-pacote-preco small { display: block; margin-top: 2px; font-family: var(--ap-mono); font-size: 10px; color: var(--ap-apoio); }
.ap-pacote-desconto {
  display: inline-block; margin: -4px 0 12px; padding: 3px 9px; border-radius: 7px;
  background: var(--ap-ok-fundo); color: var(--ap-ok); font-weight: 700; font-size: 12px;
}

.ap-assinar {
  position: relative; display: block; margin-top: 16px; padding: 18px 20px;
  border-radius: var(--ap-raio-cartao); background: var(--ap-roxo); color: var(--ap-branco); text-decoration: none;
}
.ap-assinar strong { display: block; margin-top: 6px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.ap-assinar small { display: block; margin-top: 4px; color: var(--ap-lavanda); font-size: 13px; }
.ap-assinar-cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-weight: 800; font-size: 14px; color: var(--ap-amarelo); }
.ap-assinar-cta .ap-icone { width: 18px; height: 18px; }

/* ------------------------------------------------------------
   Retrato do grupo (tela do link)
   Cor DISC só no perfil; gênero e geração em noite e lilás, com o
   maior em cor cheia.
   ------------------------------------------------------------ */
.ap-retrato { padding: 4px 18px; }
.ap-retrato-bloco { padding: 16px 0; }
.ap-retrato-bloco + .ap-retrato-bloco { border-top: 1px solid var(--ap-fio); }
.ap-retrato-destaque { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; }
.ap-retrato-destaque strong { display: block; font-weight: 800; font-size: 18px; letter-spacing: -.02em; line-height: 1.2; }
.ap-retrato-destaque small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ap-apoio); }
.ap-letra-grande { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
.ap-pilha { display: flex; gap: 3px; height: 14px; border-radius: 99px; overflow: hidden; background: var(--ap-papel); }
.ap-pilha i { display: block; min-width: 6px; height: 100%; }
.ap-pilha-legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--ap-apoio); }
.ap-pilha-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.ap-pilha-legenda i { width: 9px; height: 9px; border-radius: 3px; }
.ap-pilha-legenda b { color: var(--ap-tinta); font-weight: 800; font-variant-numeric: tabular-nums; }
.ap-retrato-nota { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--ap-papel); font-size: 13px; color: var(--ap-apoio); }
.ap-retrato-nota strong { color: var(--ap-tinta); }
.ap-geracoes { display: grid; gap: 9px; }
.ap-geracao { display: grid; grid-template-columns: 96px 1fr 38px; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ap-apoio); }
.ap-geracao b { text-align: right; color: var(--ap-tinta); font-weight: 800; font-variant-numeric: tabular-nums; }
.ap-geracao .ap-barra-trilho { height: 8px; }
.ap-geracao .ap-barra-trilho i { background: var(--ap-lilas); }
.ap-geracao-topo span { color: var(--ap-tinta); font-weight: 700; }
.ap-geracao-topo .ap-barra-trilho i { background: var(--ap-dado-forte); }

/* Resultado do grupo nos outros mapeamentos e lista de respostas */
.ap-ranking .ap-geracao { grid-template-columns: 128px 1fr 38px; }
.ap-ranking .ap-geracao span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-nota-grande {
  display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 16px;
  background: var(--ap-noite); color: var(--ap-branco); font-weight: 800; font-size: 22px; letter-spacing: -.02em;
}
.ap-dupla small { display: block; margin-top: 2px; }
.ap-destaque { max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--ap-display); font-weight: 700; font-size: 11px; letter-spacing: 0; }

/* Ajustar link e desbloqueio em lote */
.ap-botoes-4 { grid-template-columns: repeat(4, 1fr); }
.ap-lote {
  display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 14px 14px 16px;
  border-radius: var(--ap-raio-cartao); background: var(--ap-noite); color: var(--ap-branco);
}
.ap-lote strong { display: block; font-weight: 800; font-size: 15px; }
.ap-lote small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ap-lavanda); }
.ap-lote .ap-cadeado { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.ap-folha .ap-rotulo { display: block; }

/* ------------------------------------------------------------
   Freedom IA (perfil e resposta)
   Tipografia igual à .fc-mp-ia-texto da web: o HTML salvo é o mesmo.
   ------------------------------------------------------------ */
.ap-ia-texto { counter-reset: ap-sec; font-size: 14px; line-height: 1.65; color: var(--ap-tinta); }
.ap-ia-texto > :first-child { margin-top: 0; }
.ap-ia-texto h3 {
  display: flex; align-items: baseline; gap: 10px;
  margin: 24px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--ap-fio);
  font-weight: 800; font-size: 16.5px; line-height: 1.25; letter-spacing: -.02em;
}
.ap-ia-texto h3::before {
  counter-increment: ap-sec; content: counter(ap-sec, decimal-leading-zero); flex: none;
  font-family: var(--ap-mono); font-weight: 500; font-size: 11px; letter-spacing: .1em; color: var(--ap-link);
}
.ap-ia-texto h4 { margin: 18px 0 6px; font-weight: 800; font-size: 14.5px; }
.ap-ia-texto p { margin: 0 0 10px; }
.ap-ia-texto strong { font-weight: 700; }
.ap-ia-texto ul, .ap-ia-texto ol { margin: 0 0 12px; padding: 0; list-style: none; }
.ap-ia-texto li { position: relative; padding: 8px 0 8px 22px; border-bottom: 1px solid var(--ap-fio); }
.ap-ia-texto li:last-child { border-bottom: 0; }
.ap-ia-texto ul > li::before { content: ''; position: absolute; left: 2px; top: 16px; width: 7px; height: 7px; background: var(--ap-link); transform: skewX(-23.5deg); }
.ap-ia-texto ol { counter-reset: ap-item; }
.ap-ia-texto ol > li { counter-increment: ap-item; padding-left: 32px; }
.ap-ia-texto ol > li::before { content: counter(ap-item, decimal-leading-zero); position: absolute; left: 0; top: 10px; font-family: var(--ap-mono); font-size: 11px; color: var(--ap-link); }
/* Fechado, mostra o começo com um esmaecido; "Ler análise completa" abre. */
.ap-ia-recolhido { max-height: 300px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.ap-ia-recolhido.ap-ia-aberto { max-height: none; -webkit-mask-image: none; mask-image: none; }
.ap-ia-mais, .ap-ia-refazer {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 0;
  border: 0; background: none; cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--ap-link);
}
.ap-ia-refazer { margin-top: 12px; font-size: 12.5px; color: var(--ap-apoio); }
.ap-ia-refazer .ap-icone { width: 15px; height: 15px; }
.ap-ia-convite { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.ap-ia-selo {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 15px;
  background: var(--ap-noite); color: var(--ap-amarelo);
}
textarea.ap-texto-longo { height: auto; min-height: 76px; padding: 12px 14px; line-height: 1.45; resize: vertical; font-weight: 500; font-size: 15px; }

/* Tela de espera da geração (até ~1 min) */
.ap-ia-carregando {
  position: fixed; inset: 0; z-index: 96;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 32px; text-align: center;
  background: var(--ap-noite); color: var(--ap-branco);
}
.ap-ia-carregando h2 { margin: 14px 0 0; font-weight: 900; font-size: 24px; letter-spacing: -.02em; }
.ap-ia-carregando p { margin: 0; min-height: 22px; color: var(--ap-lilas); font-weight: 600; }
.ap-ia-carregando small { margin-top: 18px; color: var(--ap-lavanda); font-size: 12.5px; }
.ap-ia-carregando .ap-espectro { height: 6px; }
.ap-ia-carregando-selo {
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 26px;
  background: rgba(255, 255, 255, .08); color: var(--ap-amarelo);
}
.ap-ia-carregando-selo .ap-icone { width: 40px; height: 40px; }
.ap-girando-lento { animation: ap-pulsa 1.6s ease-in-out infinite; }
@keyframes ap-pulsa { 50% { transform: scale(.82) rotate(12deg); opacity: .7; } }

/* Ficha única da pessoa */
.ap-avatar-foto { position: relative; overflow: hidden; }
.ap-avatar-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-ficha-contato { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.ap-resumo p { margin: 8px 0 0; font-family: var(--ap-serif); font-size: 18px; line-height: 1.45; color: var(--ap-tinta); }
.ap-resumo strong { font-family: var(--ap-display); font-weight: 800; font-size: 16px; }
.ap-chip-link {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1.5px dashed var(--ap-fio-campo); background: var(--ap-superficie);
  font-weight: 700; font-size: 13px; color: var(--ap-forte); text-decoration: none;
}
.ap-chip-link .ap-icone { width: 15px; height: 15px; }
.ap-atalho-ficha { display: flex; align-items: center; gap: 12px; margin-top: 12px; text-decoration: none; }
.ap-atalho-ficha .ap-avatar { width: 36px; height: 36px; font-size: 12px; }

/* ------------------------------------------------------------
   Lote 1: e-mail, lembrar todos, busca na lista, unidade, puxar
   ------------------------------------------------------------ */
.ap-lembrar { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 14px 14px 16px; }
.ap-lembrar strong { display: block; font-weight: 800; font-size: 14.5px; }
.ap-lembrar small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ap-apoio); }
.ap-lista-lembrar { box-shadow: none; border: 1px solid var(--ap-fio); }
.ap-lista-lembrar .ap-item { padding: 11px 12px; }
.ap-item.ap-feito .ap-item-titulo { color: var(--ap-apagado); text-decoration: line-through; }
.ap-busca-lista { margin: 22px 0 -10px; }
.ap-unidade { position: relative; margin-bottom: 12px; }
.ap-unidade > .ap-icone { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ap-apagado); pointer-events: none; }
.ap-unidade .ap-entrada { height: 46px; padding-left: 42px; font-size: 14.5px; border-color: transparent; box-shadow: var(--ap-sombra); }
.ap-convite-previa {
  white-space: pre-wrap; padding: 14px 16px; border-radius: 16px 16px 16px 4px;
  background: #E7F7DD; color: #10151C; font-size: 14px; line-height: 1.5;
  box-shadow: var(--ap-sombra);
}
.ap-puxar {
  position: fixed; left: 50%; top: calc(var(--ap-seguro-topo) + 6px); z-index: 80;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ap-superficie); color: var(--ap-apagado); box-shadow: var(--ap-sombra-forte);
  transform: translate(-50%, -60px); opacity: 0; transition: color .15s; pointer-events: none;
}
.ap-puxar .ap-icone { width: 20px; height: 20px; }
.ap-puxar.ap-pronto { color: var(--ap-roxo); }
.ap-girando-atualizar { transform: translate(-50%, 30px) !important; opacity: 1 !important; }
.ap-girando-atualizar .ap-icone { animation: ap-gira .8s linear infinite; }

/* Tela de espera (envio por e-mail): avião de papel indo e voltando,
   barra correndo e o pedido para não fechar. Termina com o "pronto". */
.ap-espera {
  position: fixed; inset: 0; z-index: 97;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 32px; text-align: center;
  background: var(--ap-noite); color: var(--ap-branco);
  opacity: 0; transition: opacity .25s;
}
.ap-espera.ap-visivel { opacity: 1; }
.ap-espera h2 { margin: 16px 0 0; font-weight: 900; font-size: 24px; letter-spacing: -.02em; }
.ap-espera-passo { margin: 0; min-height: 22px; color: var(--ap-lilas); font-weight: 600; }
.ap-espera-passo.ap-troca { animation: ap-entrar .35s var(--ap-mola) both; }
.ap-espera small { margin-top: 16px; max-width: 260px; color: var(--ap-lavanda); font-size: 13px; font-weight: 600; }
.ap-espera .ap-espectro { height: 6px; }
.ap-espera-selo {
  position: relative; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 28px;
  background: rgba(255, 255, 255, .08); color: var(--ap-amarelo); overflow: hidden;
}
.ap-espera-selo .ap-icone { width: 40px; height: 40px; }
.ap-espera-aviao { display: grid; animation: ap-voo 1.6s ease-in-out infinite; }
@keyframes ap-voo {
  0%   { transform: translate(-46px, 30px) scale(.7); opacity: 0; }
  25%  { opacity: 1; }
  50%  { transform: translate(0, 0) scale(1); }
  75%  { opacity: 1; }
  100% { transform: translate(46px, -30px) scale(.7); opacity: 0; }
}
.ap-espera-barra { width: 180px; height: 5px; margin-top: 14px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.ap-espera-barra i { display: block; width: 40%; height: 100%; border-radius: 99px; background: var(--ap-amarelo); animation: ap-barra 1.3s ease-in-out infinite; }
@keyframes ap-barra { 0% { transform: translateX(-110%); } 100% { transform: translateX(280%); } }
.ap-espera-ok .ap-espera-selo { background: var(--ap-ok-fundo); color: var(--ap-ok); animation: ap-pulo .5s var(--ap-mola) both; }
.ap-espera-ok .ap-espera-selo .ap-icone { stroke-width: 2.6; }
.ap-espera-ok .ap-espera-barra { visibility: hidden; }
.ap-espera-ok .ap-espera-passo { color: var(--ap-lavanda); }

/* ------------------------------------------------------------
   Lote 2: comparar, equipe e marca no QR
   ------------------------------------------------------------ */
.ap-comparar-topo {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 22px 12px; border-radius: var(--ap-raio-cartao); background: var(--ap-noite); color: var(--ap-branco); text-align: center;
}
.ap-comparar-topo > div { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.ap-comparar-topo strong { font-weight: 800; font-size: 16px; }
.ap-comparar-topo .ap-perfil { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: var(--ap-branco); }
.ap-comparar-x { font-family: var(--ap-serif); font-style: italic; font-size: 30px; color: var(--ap-lilas); }
.ap-comparar-a .ap-barra-trilho i { background: var(--ap-dado-forte); }
.ap-comparar-b .ap-barra-trilho i { background: var(--ap-lilas); }
.ap-comparar-b .ap-barra-trilho { height: 10px; }
.ap-comparar-b span { font-weight: 800; font-size: 14px; color: var(--ap-tinta); }
.ap-comparar-pontos { margin: 12px 0 0; padding: 0; list-style: none; }
.ap-comparar-pontos li { position: relative; padding: 6px 0 6px 18px; font-size: 14px; color: var(--ap-apoio); }
.ap-comparar-pontos li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 7px; height: 7px; background: var(--ap-link); transform: skewX(-23.5deg); }
.ap-dupla-texto p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ap-tinta); }
.ap-unidade-topo .ap-cartao-titulo { margin-top: 6px; }
.ap-qr-marca { display: grid; place-items: center; max-width: 220px; padding: 10px 16px; border-radius: 14px; background: var(--ap-branco); }
.ap-qr-marca img { display: block; max-width: 188px; max-height: 56px; object-fit: contain; }
.ap-qr-marca-nome { font-weight: 900; font-size: 20px; letter-spacing: -.02em; }
.ap-qr-simbolo { width: 44px; height: 44px; }


/* ============================================================
   Modo escuro
   Automático (segue o celular) ou escolhido em Conta → Aparência, que
   grava data-tema="claro" | "escuro" no <html>. Os tokens acima fazem o
   resto; aqui só os ajustes de contraste que o token não cobre.
   ============================================================ */
/* Claro escolhido: "only light" proíbe o navegador de escurecer a página
   sozinho (Samsung Internet com modo escuro deixava o Claro cinza). */
:root[data-tema="claro"] { color-scheme: only light; }
:root[data-tema="escuro"] {
  --ap-papel: #0E0620;
  --ap-superficie: #1A0F36;
  --ap-tinta: #EEEAF8;
  --ap-forte: #F4F1FC;
  --ap-dado-forte: #E4DAFB;
  --ap-apoio: #B7AFD3;
  --ap-apagado: #8C84AB;
  --ap-fio: #2D2250;
  --ap-fio-campo: #3D3068;
  --ap-lilas-claro: #2C1F55;
  --ap-lilas-fundo: #24174A;
  --ap-link: var(--ap-lilas);
  --ap-roxo: #6B4FB8;
  --ap-roxo-ativo: #5A3FA3;
  --ap-ok: #6FCF5A;
  --ap-erro: #FF7A7A;
  --ap-ok-fundo: #1E3A1C;
  --ap-erro-fundo: #3A1418;
  --ap-erro-texto: #FFC9C9;
  --ap-apagado-fundo: #160C2E;
  --ap-segmento-fundo: #160C2E;
  --ap-chave-off: #3D3068;
  --ap-abas-fundo: rgba(22, 12, 46, .9);
  --ap-rodape-fundo: rgba(14, 6, 32, .92);
  --ap-toast-fundo: #2C1F55;
  --ap-sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
  --ap-papel: #0E0620;
  --ap-superficie: #1A0F36;
  --ap-tinta: #EEEAF8;
  --ap-forte: #F4F1FC;
  --ap-dado-forte: #E4DAFB;
  --ap-apoio: #B7AFD3;
  --ap-apagado: #8C84AB;
  --ap-fio: #2D2250;
  --ap-fio-campo: #3D3068;
  --ap-lilas-claro: #2C1F55;
  --ap-lilas-fundo: #24174A;
  --ap-link: var(--ap-lilas);
  --ap-roxo: #6B4FB8;
  --ap-roxo-ativo: #5A3FA3;
  --ap-ok: #6FCF5A;
  --ap-erro: #FF7A7A;
  --ap-ok-fundo: #1E3A1C;
  --ap-erro-fundo: #3A1418;
  --ap-erro-texto: #FFC9C9;
  --ap-apagado-fundo: #160C2E;
  --ap-segmento-fundo: #160C2E;
  --ap-chave-off: #3D3068;
  --ap-abas-fundo: rgba(22, 12, 46, .9);
  --ap-rodape-fundo: rgba(14, 6, 32, .92);
  --ap-toast-fundo: #2C1F55;
  --ap-sombra: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
  }
}
:root[data-tema="escuro"] .ap-filtro.ap-ativo,
:root[data-tema="escuro"] .ap-chip input:checked + span { background: var(--ap-lilas); border-color: var(--ap-lilas); color: var(--ap-noite); }
:root[data-tema="escuro"] .ap-sigla,
:root[data-tema="escuro"] .ap-cadeado { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
:root[data-tema="escuro"] .ap-aba-novo { box-shadow: 0 0 0 5px var(--ap-papel), 0 14px 26px -10px rgba(0, 0, 0, .8); }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .ap-filtro.ap-ativo,
  :root:not([data-tema="claro"]) .ap-chip input:checked + span { background: var(--ap-lilas); border-color: var(--ap-lilas); color: var(--ap-noite); }
  :root:not([data-tema="claro"]) .ap-sigla,
  :root:not([data-tema="claro"]) .ap-cadeado { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
  :root:not([data-tema="claro"]) .ap-aba-novo { box-shadow: 0 0 0 5px var(--ap-papel), 0 14px 26px -10px rgba(0, 0, 0, .8); }
}
/* Escolha de aparência em Conta */
.ap-aparencia { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--ap-segmento-fundo); }
.ap-aparencia button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px;
  border: 0; border-radius: 12px; background: none; color: var(--ap-apoio); font-weight: 700; font-size: 12.5px; cursor: pointer;
}
.ap-aparencia button .ap-icone { width: 20px; height: 20px; }
.ap-aparencia button[aria-pressed="true"] { background: var(--ap-superficie); color: var(--ap-forte); box-shadow: 0 2px 8px -3px rgba(23, 10, 51, .25); }

/* Ficha: mapeamento que falta, já com link criado */
button.ap-chip-link { cursor: pointer; font-family: var(--ap-display); }
.ap-chip-link.ap-chip-feito { border-style: solid; border-color: var(--ap-ok); color: var(--ap-ok); opacity: .8; }

/* Notificações */
.ap-push-topo { display: flex; align-items: center; gap: 12px; }
.ap-push-topo strong { display: block; font-weight: 800; font-size: 15px; }
.ap-push-topo small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ap-apoio); }
.ap-push-tipos { margin-top: 16px; }
.ap-push-tipos .ap-alternar { box-shadow: none; background: var(--ap-papel); padding: 12px 14px; }
.ap-push-tipos .ap-alternar + .ap-alternar { margin-top: 8px; }
.ap-push .ap-ajuda { margin-top: 12px; }

/* Computador: o app é só para celular (computador.php) */
.ap-computador { max-width: 420px; }
.ap-computador-qr { width: 200px; height: 200px; margin: 0 auto 12px; padding: 14px; border-radius: 18px; background: #fff; }
.ap-computador-qr svg { width: 100%; height: 100%; display: block; }
.ap-computador-url { display: block; margin-bottom: 28px; font-family: var(--fc-fonte-mono, 'Azeret Mono', monospace); font-size: 12px; letter-spacing: .04em; color: var(--ap-lavanda); word-break: break-all; }
.ap-computador-nota { display: block; margin-top: 22px; font-size: 13px; line-height: 1.5; color: var(--ap-lavanda); opacity: .8; }

/* Modo turma: o código para digitar no computador do projetor */
.ap-turma-endereco {
  margin: 4px 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--ap-papel);
  font-family: var(--ap-mono); font-size: 13px; color: var(--ap-forte); text-align: center; word-break: break-all;
}
.ap-turma-codigo {
  font-family: var(--ap-mono); font-weight: 500; font-size: 40px; letter-spacing: .28em; text-indent: .28em;
  text-align: center; color: var(--ap-forte); padding: 6px 0 2px;
}
.ap-turma-validade { margin: 0 0 16px !important; text-align: center; font-size: 12.5px !important; color: var(--ap-apoio); }

/* Modo devolutiva: o perfil em tela cheia para mostrar à pessoa */
.ap-apresentar { justify-content: flex-start; gap: 18px; overflow-y: auto; text-align: left; align-items: stretch; }
.ap-apresentar > .ap-qr-simbolo, .ap-apresentar > .ap-qr-marca { align-self: center; }
.ap-apresentar-quem { text-align: center; }
.ap-apresentar-quem h2 { margin: 8px 0 0; font-size: 30px; }
.ap-apresentar-letras { display: inline-flex; gap: 6px; margin-top: 12px; }
.ap-apresentar-letras b {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--cor); color: var(--ap-noite); font-weight: 900; font-size: 18px;
}
.ap-apresentar-barras { width: 100%; max-width: 460px; margin: 0 auto; display: grid; gap: 16px; }
.ap-legenda-clara { color: var(--ap-lavanda); }
.ap-legenda-clara .ap-legenda-natural { background: var(--ap-branco); }
.ap-legenda-clara .ap-legenda-adaptado { background: repeating-linear-gradient(-45deg, var(--ap-branco) 0 3px, rgba(255,255,255,.35) 3px 5px); }
.ap-apresentar-fator { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; }
.ap-apresentar-fator .ap-barra-letra { width: 36px; height: 36px; font-size: 16px; }
.ap-apresentar-nome { display: block; margin-bottom: 6px; font-weight: 700; font-size: 15px; }
.ap-apresentar-linha { display: grid; grid-template-columns: 1fr 34px; gap: 10px; align-items: center; }
.ap-apresentar-linha + .ap-apresentar-linha { margin-top: 5px; }
.ap-apresentar-linha i { position: relative; display: block; height: 12px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.ap-apresentar-linha i::after {
  content: ''; position: absolute; inset: 0; right: auto; width: 0; border-radius: 6px; background: var(--cor);
  transition: width .9s cubic-bezier(.2,.8,.2,1) calc(.25s + var(--atraso, 0s));
}
.ap-apresentar-linha.ap-adaptado i::after { background: repeating-linear-gradient(-55deg, var(--cor) 0 5px, transparent 5px 9px); transition-delay: calc(.45s + var(--atraso, 0s)); }
.ap-apresentar.ap-aberta .ap-apresentar-linha i::after { width: calc(var(--v) * 1%); }
.ap-apresentar-linha b { font-weight: 900; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.ap-apresentar-linha.ap-adaptado b { font-weight: 600; font-size: 13px; color: var(--ap-lavanda); }
.ap-apresentar-foco { width: 100%; max-width: 460px; margin: 4px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ap-apresentar-foco > div { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.08); }
.ap-apresentar-foco strong { display: block; margin-top: 6px; font-weight: 900; font-size: 20px; }
/* A faixa fecha o conteúdo, no fluxo, com respiro acima e abaixo (antes ficava colada no rodapé) */
.ap-apresentar { padding-bottom: calc(var(--ap-seguro-base) + 36px); }
.ap-apresentar .ap-espectro { position: relative; left: auto; right: auto; bottom: auto; flex: none; width: 100%; max-width: 460px; margin: auto auto 0; }
.ap-apresentar-foco { margin-bottom: 14px; }

/* Perguntas prontas à Freedom IA */
.ap-perguntas-intro { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--ap-apoio); }
.ap-perguntas-lista { display: grid; gap: 8px; }
.ap-pergunta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ap-fio); background: var(--ap-superficie); cursor: pointer;
  font-family: var(--ap-display); font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--ap-forte);
  transition: border-color .15s, background .15s;
}
.ap-pergunta .ap-icone { flex-shrink: 0; width: 18px; height: 18px; color: var(--ap-link); }
.ap-pergunta.ap-respondida .ap-icone { color: var(--ap-ok); }
.ap-pergunta.ap-ativa { border-color: var(--ap-roxo); background: var(--ap-lilas-fundo); }
.ap-resposta { margin-top: 14px; padding: 16px; border-radius: 16px; background: var(--ap-lilas-fundo); }
.ap-resposta-pergunta { display: block; font-family: var(--ap-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ap-link); }
.ap-resposta-texto { margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--ap-tinta); }
.ap-resposta-texto a { color: var(--ap-link); font-weight: 700; }
.ap-resposta.ap-pensando .ap-resposta-texto { color: var(--ap-apoio); animation: ap-pensa 1.2s ease-in-out infinite; }
@keyframes ap-pensa { 50% { opacity: .45; } }
.ap-resposta-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ------------------------------------------------------------
   Análise de Posição (posicoes.php, posicao.php, posicao-link.php)
   ------------------------------------------------------------ */
[data-fator="D"] { --fator: var(--ap-disc-d); }
[data-fator="I"] { --fator: var(--ap-disc-i); }
[data-fator="S"] { --fator: var(--ap-disc-s); }
[data-fator="C"] { --fator: var(--ap-disc-c); }

/* Miniatura do perfil da vaga: quatro barras, a maior até o topo */
.ap-posicao-alvo {
  flex: none; display: flex; align-items: flex-end; gap: 3px; width: 42px; height: 42px; padding: 9px 8px;
  border-radius: 13px; background: var(--ap-noite);
}
.ap-posicao-alvo i { flex: 1; border-radius: 2px; background: var(--fator); transform: skewX(-8deg); }
.ap-alvo-faixa { display: flex; gap: 3px; height: 8px; border-radius: 4px; overflow: hidden; }
.ap-alvo-faixa i { background: var(--fator); transform: skewX(-23.5deg); }
.ap-alvo-faixa i:first-child { margin-left: -3px; }
.ap-alvo-faixa i:last-child { margin-right: -3px; }

.ap-posicao-cabeca h2 { margin: 8px 0 0; font-weight: 900; font-size: 22px; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ap-posicao-dados { display: grid; gap: 6px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--ap-fio); }
.ap-posicao-dados div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.ap-posicao-dados dt { color: var(--ap-apoio); }
.ap-posicao-dados dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.ap-posicao-ligacao { display: grid; gap: 6px; margin-top: 12px; }
.ap-posicao-link { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--ap-fio); font-weight: 700; font-size: 14px; }
.ap-posicao-link .ap-sigla { width: 34px; height: 34px; font-size: 9px; }

/* O perfil que a vaga pede: uma barra por fator, com a linha dos 25% */
.ap-alvo { display: grid; gap: 14px; }
.ap-alvo-fator { display: grid; grid-template-columns: 30px minmax(0, 1fr) 44px; gap: 12px; align-items: center; }
.ap-alvo-nome { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-weight: 700; font-size: 13.5px; color: var(--ap-apoio); }
.ap-alvo-nome small { font-weight: 600; font-size: 12px; color: var(--ap-apoio); }
.ap-alvo-trilho { position: relative; display: block; height: 10px; border-radius: 5px; background: var(--ap-fio); }
.ap-alvo-trilho::after { content: ''; position: absolute; top: -4px; bottom: -4px; left: var(--corte); border-left: 2px dashed var(--ap-apoio); opacity: .55; }
.ap-alvo-trilho i { display: block; width: 0; height: 100%; border-radius: 5px; background: var(--cor); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.ap-alvo-fator > b { font-weight: 800; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ap-apoio); }
.ap-alvo-pede .ap-alvo-nome, .ap-alvo-pede > b { color: var(--ap-forte); }
.ap-alvo-pede > b { font-weight: 900; }
.ap-alvo-nota { margin: 2px 0 0; font-size: 12px; color: var(--ap-apoio); }
.ap-posicao-descricao { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ap-fio); font-size: 14px; line-height: 1.6; color: var(--ap-tinta); overflow-wrap: anywhere; }
.ap-posicao-descricao.ap-ia-recolhido { max-height: 150px; }

/* Competências-chave: o toque marca e desmarca */
.ap-competencias { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-competencia {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--ap-fio-campo); background: var(--ap-superficie);
  font: inherit; font-weight: 700; font-size: 13px; color: var(--ap-apoio); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.ap-competencia i { width: 8px; height: 8px; border-radius: 2px; background: var(--cor); transform: skewX(-23.5deg); }
.ap-competencia[aria-pressed="true"] { background: var(--ap-noite); border-color: var(--ap-noite); color: #FFFFFF; }
.ap-competencia.ap-carregando { opacity: .6; }

/* Aderência: o número, no tom da faixa (as quebras da web: 40, 60, 80) */
.ap-aderencia {
  display: inline-flex; align-items: baseline; justify-content: center; min-width: 54px; padding: 6px 9px; border-radius: 11px;
  font-weight: 900; font-size: 17px; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.ap-aderencia small { font-weight: 700; font-size: 11px; margin-left: 1px; }
.ap-aderencia[data-tom="alta"] { background: var(--ap-ok-fundo); color: var(--ap-ok); }
.ap-aderencia[data-tom="boa"] { background: var(--ap-lilas-claro); color: var(--ap-forte); }
.ap-aderencia[data-tom="media"] { background: rgba(217, 138, 0, .14); color: #A86A00; }
.ap-aderencia[data-tom="baixa"] { background: var(--ap-erro-fundo); color: var(--ap-erro); }
.ap-nota-lista { margin: 10px 4px 0; font-size: 12.5px; line-height: 1.5; color: var(--ap-apoio); }

/* Candidatos de um link: posição, pessoa (abre o perfil) e o botão de associar */
.ap-candidato { gap: 10px; }
.ap-candidato-pos { flex: none; width: 22px; font-family: var(--ap-mono); font-size: 12px; color: var(--ap-apoio); text-align: center; }
.ap-candidato-pessoa { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.ap-associar {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--ap-fio-campo); background: var(--ap-superficie); color: var(--ap-forte); cursor: pointer;
}
.ap-associar .ap-icone { width: 18px; height: 18px; }
.ap-associar[aria-pressed="true"] { background: var(--ap-ok); border-color: var(--ap-ok); color: #FFFFFF; }
.ap-associar.ap-carregando { opacity: .55; }

/* Atalho largo no início (ocupa as duas colunas) */
.ap-atalho-largo { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; }
.ap-atalho-largo > span:nth-child(2) { flex: 1; }

:root[data-tema="escuro"] .ap-competencia[aria-pressed="true"] { background: var(--ap-lilas); border-color: var(--ap-lilas); color: var(--ap-noite); }
:root[data-tema="escuro"] .ap-aderencia[data-tom="media"] { color: #F2B544; }
:root[data-tema="escuro"] .ap-posicao-alvo { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .ap-competencia[aria-pressed="true"] { background: var(--ap-lilas); border-color: var(--ap-lilas); color: var(--ap-noite); }
  :root:not([data-tema="claro"]) .ap-aderencia[data-tom="media"] { color: #F2B544; }
  :root:not([data-tema="claro"]) .ap-posicao-alvo { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
}

/* Posição: ações no cabeçalho da seção (Gerenciar, Adicionar) */
.ap-secao-acoes { display: inline-flex; align-items: center; gap: 14px; }
.ap-link-botao {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 13px; color: var(--ap-link);
}
.ap-link-botao .ap-icone { width: 15px; height: 15px; }

/* Gerenciar: o botão de tirar da posição aparece em cada pessoa */
.ap-remover {
  flex: none; display: none; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--ap-erro-fundo); color: var(--ap-erro); cursor: pointer;
}
.ap-remover .ap-icone { width: 16px; height: 16px; }
.ap-gerenciando .ap-remover { display: grid; }
.ap-gerenciando .ap-candidato-pessoa { pointer-events: none; }
.ap-remover.ap-carregando { opacity: .5; }
.ap-item.ap-saindo { opacity: 0; transform: translateX(-12px); transition: opacity .25s, transform .25s; }

/* Associar em lote (candidatos de um link) */
.ap-lote-posicao { margin-bottom: 14px; }
.ap-lote-posicao > strong { display: block; font-weight: 800; font-size: 15.5px; }
.ap-lote-posicao > p { margin: 4px 0 12px; font-size: 13px; color: var(--ap-apoio); }
.ap-lote-posicao .ap-chip span { height: 36px; padding: 0 13px; font-size: 12.5px; }
.ap-lote-posicao .ap-chip input:disabled + span { opacity: .4; }

/* Formulário da posição */
.ap-detalhes { margin: -6px 0 22px; }
.ap-detalhes > summary {
  display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 13.5px; color: var(--ap-link);
}
.ap-detalhes > summary::-webkit-details-marker { display: none; }
.ap-detalhes > summary::before { content: '+'; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--ap-lilas-claro); font-size: 15px; line-height: 1; }
.ap-detalhes[open] > summary::before { content: '−'; }
.ap-detalhes > summary small { font-weight: 500; color: var(--ap-apagado); }
.ap-detalhes > .ap-campo:first-of-type { margin-top: 8px; }
.ap-detalhes p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; white-space: pre-line; }
.ap-pos-ia .ap-detalhes { margin: 0 0 14px; }
.ap-pos-ia-resultado { margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--ap-fio); }
.ap-pos-ia-resultado .ap-detalhes { margin: 0; }

.ap-pos-regras { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-pos-regras span {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px;
  background: var(--ap-erro-fundo); color: var(--ap-erro); font-weight: 700; font-size: 12px;
}
.ap-pos-regras span .ap-icone { width: 13px; height: 13px; opacity: .35; }
.ap-pos-regras span.ap-ok { background: var(--ap-ok-fundo); color: var(--ap-ok); }
.ap-pos-regras span.ap-ok .ap-icone { opacity: 1; }
.ap-pos-previa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.ap-pos-previa > div { display: grid; gap: 6px; justify-items: center; }
.ap-pos-previa-barra { display: flex; align-items: flex-end; width: 100%; height: 64px; border-radius: 10px; background: var(--ap-fio); overflow: hidden; }
.ap-pos-previa-barra i { width: 100%; height: 4%; background: var(--cor); transition: height .35s cubic-bezier(.2, .8, .2, 1); }
.ap-pos-previa b { font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }

.ap-carac { margin-top: 12px; }
.ap-carac-cabeca { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ap-carac-cabeca strong { flex: 1; font-weight: 800; font-size: 15px; }
.ap-carac-conta {
  min-width: 30px; height: 26px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--ap-lilas-claro); font-weight: 800; font-size: 13px; color: var(--ap-forte);
}
.ap-carac-conta.ap-empatado { background: var(--ap-erro-fundo); color: var(--ap-erro); }

/* Pessoa × posição */
.ap-aderencia-grande { flex: none; min-width: 84px; padding: 12px 10px; border-radius: 16px; font-size: 30px; }
.ap-aderencia-grande small { font-size: 15px; }
.ap-cmp-perfis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ap-cmp-perfis .ap-cartao { display: grid; gap: 4px; margin: 0; }
.ap-cmp-sigla { font-weight: 900; font-size: 26px; letter-spacing: .02em; }
.ap-cmp-perfis small { font-size: 12.5px; color: var(--ap-apoio); line-height: 1.35; }
.ap-legenda-vaga { background: repeating-linear-gradient(-55deg, var(--ap-apoio) 0 3px, transparent 3px 6px) !important; }
.ap-cmp-vaga .ap-barra-trilho i { background: repeating-linear-gradient(-55deg, var(--cor) 0 5px, transparent 5px 9px); }
.ap-cmp-dif { font-weight: 700; font-variant-numeric: tabular-nums; }
.ap-cmp-dif-forte { padding: 0 7px; border-radius: 999px; background: var(--ap-lilas-claro); color: var(--ap-forte); font-weight: 800; }
.ap-cmp-comps { display: grid; gap: 2px; }
.ap-cmp-comp { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--ap-fio); }
.ap-cmp-comp:last-child { border-bottom: 0; }
.ap-cmp-comp-nome { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; }
.ap-cmp-comp-nome .ap-icone { width: 15px; height: 15px; color: var(--ap-amarelo); fill: var(--ap-amarelo); }
.ap-cmp-chave .ap-cmp-comp-nome { font-weight: 800; }
.ap-cmp-pontos { display: inline-flex; gap: 4px; }
.ap-cmp-pontos i { width: 14px; height: 8px; border-radius: 2px; background: var(--ap-fio); transform: skewX(-23.5deg); }
.ap-cmp-pontos i.ap-cheio { background: var(--cor); }

/* Roda de perfil (includes/roda-perfil.php, desenho de RodaPerfil): o SVG traz o
   próprio estilo; aqui só as cores do tema, pelas variáveis --rp-* */
.ap-roda-caixa {
  max-width: 380px; margin: 0 auto;
  --rp-anel: var(--ap-papel); --rp-fundo: var(--ap-superficie); --rp-linha: var(--ap-fio);
  --rp-apoio: var(--ap-apoio); --rp-forte: var(--ap-forte);
  --rp-fonte: var(--ap-display); --rp-mono: var(--ap-mono);
}
.ap-roda-caixa .rp-roda { display: block; width: 100%; height: auto; }

.ap-roda-legenda { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 12px; font-weight: 700; font-size: 12.5px; color: var(--ap-tinta); }
.ap-roda-legenda span { display: inline-flex; align-items: center; gap: 7px; }
.ap-roda-legenda i { display: inline-block; width: 12px; height: 12px; }
.ap-roda-leg-pessoa { border-radius: 50%; background: var(--ap-noite); }
.ap-roda-leg-vaga { border-radius: 3px; background: var(--ap-amarelo); box-shadow: inset 0 0 0 1.5px var(--ap-noite); }
.ap-roda-leitura { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--ap-fio); font-size: 13.5px; line-height: 1.5; color: var(--ap-tinta); }

:root[data-tema="escuro"] .ap-roda-caixa {
  --rp-pessoa: var(--ap-lilas); --rp-pessoa-txt: var(--ap-noite); --rp-vaga-borda: var(--ap-superficie);
  --rp-d: var(--ap-disc-d); --rp-i: var(--ap-disc-i); --rp-s: var(--ap-disc-s); --rp-c: var(--ap-disc-c);
}
:root[data-tema="escuro"] .ap-roda-leg-pessoa { background: var(--ap-lilas); }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .ap-roda-caixa {
    --rp-pessoa: var(--ap-lilas); --rp-pessoa-txt: var(--ap-noite); --rp-vaga-borda: var(--ap-superficie);
    --rp-d: var(--ap-disc-d); --rp-i: var(--ap-disc-i); --rp-s: var(--ap-disc-s); --rp-c: var(--ap-disc-c);
  }
  :root:not([data-tema="claro"]) .ap-roda-leg-pessoa { background: var(--ap-lilas); }
}

/* As duas notas da pessoa na posição: Perfil e Competências (como na web) */
.ap-notas { flex: none; display: inline-flex; gap: 6px; }
.ap-nota { display: grid; justify-items: center; gap: 3px; }
.ap-nota small { font-family: var(--ap-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--ap-apoio); }
.ap-nota .ap-aderencia { min-width: 50px; padding: 5px 7px; font-size: 15px; }
.ap-nota .ap-aderencia:not([data-tom]), .ap-nota .ap-aderencia[data-tom=""] { background: var(--ap-fio); color: var(--ap-apoio); }
.ap-cmp-notas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ap-fio); }
.ap-cmp-nota { display: grid; justify-items: start; gap: 6px; padding: 12px; border-radius: 16px; background: var(--ap-papel); }
.ap-cmp-nota small { font-weight: 700; font-size: 12.5px; color: var(--ap-tinta); }
.ap-cmp-nota .ap-aderencia:not([data-tom]) { background: var(--ap-fio); color: var(--ap-apoio); }
.ap-cmp-explica { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ap-apoio); }

/* Contato no comparativo: WhatsApp, Ligar e E-mail */
.ap-cmp-contato { margin-top: 14px; }
.ap-acao-indisponivel { opacity: .45; cursor: default; }
.ap-cmp-nota .ap-etiqueta { white-space: nowrap; }

/* ── Mapa de compatibilidade (posicao.php, aba Mapa): o mesmo da web ──
   Perfil na horizontal, competências-chave na vertical, corte em 60%.
   O ponto leva a cor do fator (data-fator → --fator) com o relatório liberado. */
.ap-vistas { margin-bottom: 12px; }
.ap-segmento button {
  display: flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0;
  border: 0; border-radius: 12px; background: none; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 14px; color: var(--ap-apoio);
}
.ap-segmento button .ap-icone { width: 18px; height: 18px; }
.ap-segmento button.ap-ativo { background: var(--ap-superficie); color: var(--ap-forte); box-shadow: 0 2px 8px -3px rgba(23, 10, 51, .25); }

.ap-mapa { padding-left: 12px; padding-right: 12px; }
.ap-mapa > .ap-cartao-texto, .ap-mapa > .ap-nota-lista { padding: 0 4px; }
.ap-mapa-aviso { display: flex; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--ap-lilas-fundo); font-size: 12.5px; line-height: 1.45; color: var(--ap-apoio); }
.ap-mapa-aviso .ap-icone { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.ap-mapa-svg { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; font-family: var(--ap-display); }
.ap-mapa-corte { stroke: var(--ap-apoio); stroke-width: 1; stroke-dasharray: 4 4; opacity: .55; }
.ap-mapa-base { stroke: var(--ap-fio-campo); stroke-width: 1; }
.ap-mapa-eixo { font-family: var(--ap-mono); font-size: 8px; fill: var(--ap-apoio); }
.ap-mapa-titulo { font-family: var(--ap-mono); font-size: 7.5px; letter-spacing: .08em; text-transform: uppercase; fill: var(--ap-apoio); }
.ap-mapa-quad-nome { font-weight: 700; font-size: 8.5px; fill: var(--ap-apoio); opacity: .85; }
.ap-ponto { cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.ap-ponto circle {
  fill: var(--fator, var(--ap-lilas)); stroke: var(--ap-superficie); stroke-width: 2;
  transform-box: fill-box; transform-origin: center; transition: transform .2s var(--ap-mola);
}
.ap-ponto:active circle { transform: scale(.88); }
.ap-ponto:focus-visible circle, .ap-ponto-ativo circle { stroke: var(--ap-forte); stroke-width: 2.6; }
.ap-ponto-ini { font-weight: 800; font-size: 9px; fill: #170A33; pointer-events: none; }
.ap-ponto-nome { font-weight: 600; font-size: 10.5px; fill: var(--ap-tinta); }

.ap-mapa-quads { display: grid; gap: 8px; margin-top: 14px; }
.ap-mapa-quad { padding: 10px 12px; border-radius: 14px; background: var(--ap-papel); }
.ap-mapa-quad-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 13.5px; color: var(--ap-tinta); }
.ap-mapa-quad-topo span { display: inline-flex; align-items: center; gap: 8px; }
.ap-mapa-quad-topo i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.ap-mapa-quad-topo b { font-family: var(--ap-mono); font-weight: 500; font-size: 12px; color: var(--ap-apoio); }
.ap-mapa-quad-pessoas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ap-mapa-quad-pessoas button {
  padding: 6px 11px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ap-superficie); box-shadow: inset 0 0 0 1px var(--ap-fio);
  font-family: inherit; font-weight: 600; font-size: 13px; color: var(--ap-tinta);
}
.ap-mapa-quad-pessoas button:active { transform: scale(.96); }

.ap-mapa-bloqueio { display: grid; justify-items: center; gap: 8px; padding: 26px 20px; text-align: center; }
.ap-mapa-bloqueio-icone { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 16px; background: var(--ap-lilas-claro); color: var(--ap-forte); }
.ap-mapa-bloqueio-icone .ap-icone { width: 24px; height: 24px; }
.ap-mapa-bloqueio strong { font-weight: 800; font-size: 17px; }
.ap-mapa-bloqueio p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.5; color: var(--ap-apoio); }

/* A folha da pessoa no mapa: as duas notas, a leitura do quadrante e o comparativo */
.ap-mp-notas { margin-top: 12px; padding-top: 0; border-top: 0; }
.ap-folha > p.ap-mapa-leitura {
  margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; border-left: 4px solid var(--c, var(--ap-fio));
  background: var(--ap-papel); font-size: 14px; line-height: 1.5; color: var(--ap-tinta);
}
.ap-folha > p.ap-mp-bloqueado { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13px; color: var(--ap-apoio); }
.ap-folha > p.ap-mp-bloqueado[hidden] { display: none; }
.ap-mp-bloqueado .ap-icone { flex: none; width: 16px; height: 16px; }
.ap-folha > [data-ap-mp-abrir] { margin-top: 16px; }
.ap-folha > p.ap-nota-lista { margin: 12px 0 0; }

/* ── Roda de competências: as 16 da aba Competências da web, Natural × Adaptado ──
   Natural cheio por cima, Adaptado tracejado por baixo. A marca colorida na
   ponta de cada eixo é o fator-chave da competência (cor DISC só no dado). */
.ap-comp-roda, .ap-apresentar-comp { --ap-radar-nat: var(--ap-noite); --ap-radar-adap: var(--ap-acento); --ap-radar-fundo: var(--ap-superficie); --ap-radar-fio: var(--ap-fio); --ap-radar-texto: var(--ap-tinta); --ap-radar-apoio: var(--ap-apagado); }
.ap-radar { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; overflow: visible; font-family: var(--ap-display); }
.ap-radar-anel { fill: none; stroke: var(--ap-radar-fio); stroke-width: .8; }
.ap-radar-borda { stroke-width: 1.3; }
.ap-radar-eixo { stroke: var(--ap-radar-fio); stroke-width: .7; }
.ap-radar-escala { font-family: var(--ap-mono); font-size: 7px; fill: var(--ap-radar-apoio); }
.ap-radar-nome { font-weight: 600; font-size: 10px; fill: var(--ap-radar-texto); }
.ap-radar-fator { stroke-width: 3.2; stroke-linecap: round; }
.ap-radar-fator[data-fator="D"] { stroke: var(--ap-disc-d); }
.ap-radar-fator[data-fator="I"] { stroke: var(--ap-disc-i); }
.ap-radar-fator[data-fator="S"] { stroke: var(--ap-disc-s); }
.ap-radar-fator[data-fator="C"] { stroke: var(--ap-disc-c); }
.ap-radar-nat polygon { fill: var(--ap-radar-nat); fill-opacity: .13; stroke: var(--ap-radar-nat); stroke-width: 2.2; stroke-linejoin: round; }
.ap-radar-nat circle { fill: var(--ap-radar-nat); stroke: var(--ap-radar-fundo); stroke-width: 1.3; }
.ap-radar-adap polygon { fill: none; stroke: var(--ap-radar-adap); stroke-width: 1.7; stroke-dasharray: 5 4; stroke-linejoin: round; }
.ap-radar-adap circle { fill: var(--ap-radar-fundo); stroke: var(--ap-radar-adap); stroke-width: 1.5; }
.ap-legenda i.ap-radar-leg { width: 22px; height: 0; border-radius: 0; background: none; }
.ap-radar-leg-nat { border-top: 3px solid var(--ap-radar-nat); }
.ap-radar-leg-adap { border-top: 2px dashed var(--ap-radar-adap); }
.ap-comp-roda .ap-legenda { justify-content: center; margin-bottom: 4px; }

.ap-comp-titulo { display: block; margin-top: 14px; }
.ap-comp-fortes { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.ap-comp-fortes li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 34px; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--ap-papel); }
.ap-comp-fortes i { width: 10px; height: 10px; border-radius: 50%; background: var(--cor); }
.ap-comp-fortes span { font-weight: 700; font-size: 14px; color: var(--ap-tinta); }
.ap-comp-fortes small { font-family: var(--ap-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ap-apoio); }
.ap-comp-fortes b { font-weight: 900; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ap-forte); }

.ap-comp-todas { margin-top: 12px; }
.ap-comp-todas > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: var(--ap-link); }
.ap-comp-todas > summary::-webkit-details-marker { display: none; }
.ap-comp-todas > summary::before { content: '+'; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--ap-lilas-claro); font-size: 15px; line-height: 1; }
.ap-comp-todas[open] > summary::before { content: '−'; }
.ap-comp-grupo { margin-top: 18px; display: grid; gap: 14px; }
.ap-comp-grupo-nome { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 12.5px; color: var(--ap-forte); }
.ap-comp-grupo-nome b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--cor); color: var(--ap-noite); font-size: 11.5px; font-weight: 900; }
.ap-comp-faixas { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--ap-apoio); }

/* Na tela cheia (fundo noite) e com animação ao abrir */
.ap-apresentar-comp { --ap-radar-nat: var(--ap-branco); --ap-radar-adap: var(--ap-amarelo); --ap-radar-fundo: var(--ap-noite); --ap-radar-fio: rgba(255, 255, 255, .16); --ap-radar-texto: var(--ap-branco); --ap-radar-apoio: var(--ap-lavanda); }
.ap-apresentar-comp { width: 100%; max-width: 460px; margin: 6px auto 0; display: grid; gap: 10px; }
.ap-apresentar-comp > .ap-etiqueta { text-align: center; }
.ap-apresentar-comp .ap-legenda { justify-content: center; margin: 0; }
.ap-apresentar-comp .ap-comp-fortes li { background: rgba(255, 255, 255, .08); }
.ap-apresentar-comp .ap-comp-fortes span, .ap-apresentar-comp .ap-comp-fortes b { color: var(--ap-branco); }
.ap-apresentar-comp .ap-comp-fortes small { color: var(--ap-lavanda); }
.ap-apresentar-leitura { margin: 0 !important; font-size: 14px !important; line-height: 1.5; color: var(--ap-lavanda); text-align: center; }
.ap-apresentar .ap-legenda-clara { flex-wrap: wrap; gap: 8px 16px; }
.ap-apresentar .ap-radar-nat, .ap-apresentar .ap-radar-adap { transform-origin: 180px 150px; transform: scale(.15); opacity: 0; transition: transform 1s var(--ap-mola), opacity .5s ease; }
.ap-apresentar .ap-radar-adap { transition-delay: .5s; }
.ap-apresentar .ap-radar-nat { transition-delay: .2s; }
.ap-apresentar.ap-aberta .ap-radar-nat, .ap-apresentar.ap-aberta .ap-radar-adap { transform: none; opacity: 1; }

:root[data-tema="escuro"] .ap-comp-roda { --ap-radar-nat: var(--ap-dado-forte); --ap-radar-adap: var(--ap-amarelo); }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .ap-comp-roda { --ap-radar-nat: var(--ap-dado-forte); --ap-radar-adap: var(--ap-amarelo); }
}
@media (prefers-reduced-motion: reduce) {
  .ap-apresentar .ap-radar-nat, .ap-apresentar .ap-radar-adap { transition: none; transform: none; opacity: 1; }
}

/* Confirmar o uso de crédito de IA: as três contas juntas, num bloco só */
.ap-folha-contas { display: grid; gap: 1px; margin-bottom: 18px; border-radius: 16px; overflow: hidden; }
.ap-folha-contas .ap-folha-conta { margin: 0; border-radius: 0; }
.ap-folha-contas .ap-folha-conta:last-child b { color: var(--ap-forte); font-size: 16px; }
.ap-folha-ia .ap-alerta { margin-bottom: 16px; }
.ap-folha-ia [data-ia-usar] .ap-icone { width: 18px; height: 18px; }

/* Competências em barras, Natural × Adaptado (o modelo das barras do perfil) */
.ap-comp-potencial { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ap-apoio); text-align: center; }
.ap-comp-potencial b { color: var(--ap-forte); }
.ap-comp-legenda { margin: 12px 0 0; }
.ap-comp-barra-topo { display: flex; align-items: center; gap: 8px; }
.ap-comp-barra-topo strong { font-weight: 800; font-size: 14px; color: var(--ap-tinta); }
.ap-comp-barra-topo small { font-family: var(--ap-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ap-apoio); }
.ap-comp-barra-topo .ap-barra-dif { margin-left: auto; }
.ap-comp-desc { margin: 2px 0 7px; font-size: 12.5px; line-height: 1.4; color: var(--ap-apoio); }

.ap-apresentar-comp .ap-comp-potencial { margin: 0; color: var(--ap-lavanda); font-size: 13px; }
.ap-apresentar-comp .ap-comp-potencial b { color: var(--ap-branco); }
.ap-comp-subtitulo { margin-top: 18px; text-align: center; justify-content: center; }
.ap-apresentar-comp-barras .ap-comp-grupo { margin-top: 14px; gap: 16px; }
.ap-apresentar-comp-barras .ap-comp-grupo-nome { font-size: 14px; color: var(--ap-branco); }
.ap-apresentar-comp-barras .ap-comp-grupo-nome b { width: 28px; height: 28px; border-radius: 9px; font-size: 13px; }
.ap-apresentar-comp-barras .ap-comp-barra-topo strong { font-size: 15.5px; color: var(--ap-branco); }
.ap-apresentar-comp-barras .ap-comp-barra-topo small { color: var(--ap-lavanda); }
.ap-apresentar-comp-barras .ap-barra-dif { background: rgba(255, 255, 255, .1); color: var(--ap-lavanda); }
.ap-apresentar-comp-barras .ap-comp-desc { margin: 3px 0 8px; font-size: 13px !important; color: var(--ap-lavanda); }

/* ------------------------------------------------------------
   Administração (nível 44): admin*.php
   ------------------------------------------------------------ */
a.ap-numero { text-decoration: none; color: inherit; }
a.ap-numero:active { background: var(--ap-lilas-fundo); }

/* Saldo à direita na lista de empresas */
.ap-adm-saldo { display: flex; flex-direction: column; align-items: flex-end; flex: none; line-height: 1.1; }
.ap-adm-saldo b { font-weight: 800; font-size: 17px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ap-tinta); }
.ap-adm-saldo small { margin-top: 3px; font-family: var(--ap-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ap-apagado); }
.ap-adm-saldo-zero b { color: var(--ap-erro); }

/* Selos da empresa no herói escuro */
.ap-adm-selos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.ap-adm-selos span {
  padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08);
  font-family: var(--ap-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ap-branco);
}
.ap-adm-selos .ap-adm-selo-ok { background: var(--ap-amarelo); border-color: var(--ap-amarelo); color: var(--ap-noite); font-weight: 700; }
.ap-adm-selos .ap-adm-selo-erro { background: var(--ap-erro); border-color: var(--ap-erro); }

/* Carteira dentro do conteúdo (no início ela sobe sobre o herói) */
.ap-carteira.ap-adm-carteira { margin: 0; }
.ap-adm-carteira small { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--ap-link); }
.ap-adm-carteira small .ap-icone { width: 14px; height: 14px; }

/* Dados da empresa: rótulo à esquerda, valor à direita */
.ap-adm-dados { padding: 4px 18px; }
.ap-adm-dados > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; font-size: 14px; }
.ap-adm-dados > div + div { border-top: 1px solid var(--ap-fio); }
.ap-adm-dados span { flex: none; color: var(--ap-apoio); }
.ap-adm-dados b { min-width: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

/* Extrato: sinal, texto e valor */
.ap-adm-sinal {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 11px;
  background: var(--ap-erro-fundo); color: var(--ap-erro);
}
.ap-adm-sinal .ap-icone { width: 16px; height: 16px; }
.ap-adm-sinal.ap-adm-mais { background: var(--ap-ok-fundo); color: var(--ap-ok); }
.ap-adm-valor { display: flex; flex-direction: column; align-items: flex-end; flex: none; line-height: 1.15; }
.ap-adm-valor b { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--ap-erro); }
.ap-adm-valor.ap-adm-mais b { color: var(--ap-ok); }
.ap-adm-valor small { margin-top: 2px; font-family: var(--ap-mono); font-size: 10px; color: var(--ap-apagado); }

/* Escolha de duas opções com rádio (creditar/debitar, ativa/inativa) */
.ap-escolha {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  border-radius: 16px; background: var(--ap-segmento-fundo);
}
.ap-escolha label { position: relative; cursor: pointer; }
.ap-escolha input { position: absolute; opacity: 0; pointer-events: none; }
.ap-escolha span {
  display: flex; align-items: center; justify-content: center; gap: 7px; height: 46px;
  border-radius: 12px; font-weight: 700; font-size: 14.5px; color: var(--ap-apoio);
}
.ap-escolha span .ap-icone { width: 18px; height: 18px; }
.ap-escolha input:checked + span { background: var(--ap-superficie); color: var(--ap-forte); box-shadow: 0 2px 8px -3px rgba(23, 10, 51, .25); }
.ap-escolha input[value="D"]:checked + span,
.ap-escolha input[value="Inativa"]:checked + span,
.ap-escolha input[value="Não Assinante"]:checked + span { color: var(--ap-erro); }
.ap-escolha input:focus-visible + span { outline: 3px solid var(--ap-foco); outline-offset: 2px; }

/* Campos lado a lado e atalhos de quantidade que cabem em 360 px */
.ap-adm-campos-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ap-adm-campos-2 > .ap-campo { min-width: 0; }
.ap-adm-rapido button.ap-chip-botao { flex: 1; justify-content: center; padding: 0 4px; }

/* Nível de acesso (B1, B2, A1, A2) */
.ap-adm-nivel, .ap-adm-niveis b {
  display: grid; place-items: center; flex: none; min-width: 36px; height: 26px; padding: 0 8px; border-radius: 8px;
  font-family: var(--ap-mono); font-weight: 700; font-size: 11px; background: var(--ap-lilas-claro); color: var(--ap-forte);
}
.ap-adm-nivel[data-nivel="43"], .ap-adm-niveis b[data-nivel="43"] { background: var(--ap-amarelo); color: var(--ap-noite); }
.ap-adm-nivel[data-nivel="44"], .ap-adm-niveis b[data-nivel="44"] { background: var(--ap-noite); color: var(--ap-amarelo); }
.ap-adm-niveis { display: grid; gap: 8px; }
.ap-adm-niveis label { position: relative; cursor: pointer; }
.ap-adm-niveis input { position: absolute; opacity: 0; pointer-events: none; }
.ap-adm-niveis span {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: 14px; border: 1.5px solid var(--ap-fio-campo); font-weight: 600; font-size: 14px;
}
.ap-adm-niveis input:checked + span { border-color: var(--ap-forte); background: var(--ap-lilas-fundo); }
.ap-adm-niveis input:focus-visible + span { outline: 3px solid var(--ap-foco); outline-offset: 2px; }
button.ap-item[disabled] { cursor: default; opacity: .7; }
.ap-adm-atalho { background: var(--ap-roxo); color: var(--ap-branco); }
.ap-adm-atalho .ap-atalho-icone { background: rgba(255, 255, 255, .1); color: var(--ap-amarelo); }
.ap-adm-atalho small { color: var(--ap-lavanda); }
