/**
 * Pague Azul Cliente - Sistema de design v2 (COMPONENTES)
 *
 * Tudo escopado por .pa-v2 (pagina sem a classe nao muda). Cores SO por token
 * (tokens.css): o tema escuro e a cor da cidade vem de graca.
 * Catalogo vivo: pages/_v2/componentes.html (nao linkado no app).
 * Documentacao: .claude/context/knowledge/modules/app_cliente_design_v2.md
 *
 * Indice
 *  1. Base (icone, foco, texto, links, sr-only, skeleton, entrada, reduced-motion)
 *  2. Estrutura de pagina (pa-pagina, pa-cabecalho, pa-titulo, pa-secao, pa-pilha)
 *  3. Marca (pa-marca) e botao de tema (pa-tema-btn)
 *  4. Botoes (pa-btn + variantes, tamanhos, carregando, desabilitado, pa-btn-icone)
 *  5. Formularios (pa-campo, pa-rotulo, pa-controle, pa-input/select/textarea, ajuda/erro)
 *  6. Checkbox / radio / interruptor (pa-check, pa-interruptor, pa-chave)
 *  7. Chips e segmentos (pa-chips/pa-chip, pa-segmento)
 *  8. Cartoes, listas e itens (pa-cartao, pa-lista, pa-item)
 *  9. Selos, avisos, vazio, divisores, valores, placa
 * 10. Barra inferior, menu lateral
 * 11. Modal (dialogo + folha inferior) e toast
 */

/* ==================== 1. BASE ==================== */

/* Icone de traco (assets/js/v2/icones.js) */
.pa-v2 .pa-ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pa-v2 .pa-ico.is-girando { animation: pa-girar 0.8s linear infinite; }
@keyframes pa-girar { to { transform: rotate(360deg); } }

/* Foco visivel so para teclado / leitor */
.pa-v2 :focus-visible {
  outline: 2px solid var(--v2-primaria);
  outline-offset: 2px;
}

/* Texto */
.pa-v2 .pa-texto-forte { color: var(--v2-texto-forte); }
.pa-v2 .pa-texto-suave { color: var(--v2-texto-suave); }
.pa-v2 .pa-texto-erro { color: var(--v2-erro-texto); }
.pa-v2 .pa-texto-centro { text-align: center; }
.pa-v2 .pa-texto-pequeno { font-size: var(--v2-t-sm); line-height: 1.5; }

/* Link de texto (acento como texto = -forte, contraste AA) */
.pa-v2 .pa-link {
  color: var(--v2-primaria-forte);
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
}
.pa-v2 .pa-link:active { opacity: 0.7; }
/* link "solto" com area de toque de 44px */
.pa-v2 .pa-link.is-alvo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Texto so para leitor de tela */
.pa-v2 .pa-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Skeleton (placeholder de carregamento). Tamanho por style ou pelos modificadores. */
.pa-v2 .pa-skeleton {
  display: inline-block;
  vertical-align: middle;
  border-radius: 6px;
  background: var(--v2-skeleton);
  background-image: linear-gradient(90deg, transparent 0, var(--v2-skeleton-brilho) 50%, transparent 100%);
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: pa-brilho 1.3s ease-in-out infinite;
}
.pa-v2 .pa-skeleton-claro {
  background-color: rgba(255, 255, 255, 0.1);
  background-image: linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.12) 50%, transparent 100%);
}
.pa-v2 .pa-skeleton.is-linha { display: block; height: 12px; width: 100%; margin: 6px 0; }
.pa-v2 .pa-skeleton.is-titulo { display: block; height: 18px; width: 55%; margin: 4px 0 10px; }
.pa-v2 .pa-skeleton.is-circulo { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.pa-v2 .pa-skeleton.is-bloco { display: block; width: 100%; height: 96px; border-radius: var(--v2-r-lg); }
@keyframes pa-brilho {
  from { background-position: 150% 0; }
  to { background-position: -50% 0; }
}

/* Entrada escalonada (discreta). style="--ordem: N" */
.pa-v2 .pa-entrada {
  animation: pa-entrar 0.36s var(--v2-ease) both;
  animation-delay: calc(var(--ordem, 0) * 50ms);
}
@keyframes pa-entrar {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pa-v2 *,
  .pa-v2 *::before,
  .pa-v2 *::after {
    animation: none !important;
    transition: none !important;
  }
  /* spinner continua girando (e informacao, nao enfeite), mais devagar */
  .pa-v2 .pa-ico.is-girando,
  .pa-v2 .pa-btn.is-carregando::after,
  .pa-v2 .pa-btn.loading::after,
  .pa-v2 .pa-spinner { animation: pa-girar 1.6s linear infinite !important; }
}

/* Spinner avulso (ex.: splash, area carregando) */
.pa-v2 .pa-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--v2-trilho);
  border-top-color: var(--v2-primaria);
  border-radius: 50%;
  animation: pa-girar 0.8s linear infinite;
}

/* ==================== 2. ESTRUTURA DE PAGINA ==================== */

/* Coluna central da pagina interna. Com barra inferior (padrao) ou .sem-barra. */
.pa-v2 .pa-pagina {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  /* espaco da barra inferior: barra (~70px) + circulo "Estacionar" elevado (~15px) + respiro; em rem
     para acompanhar a fonte do sistema (barra cresce com a fonte) */
  padding: 0 var(--v2-e5) calc(8.5rem + env(safe-area-inset-bottom, 0px));
}
.pa-v2 .pa-pagina.sem-barra { padding-bottom: calc(var(--v2-e8) + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 359px) {
  .pa-v2 .pa-pagina { padding-left: var(--v2-e4); padding-right: var(--v2-e4); }
}

/* Cabecalho de pagina: [voltar ou menu] Titulo [acao opcional]. Fica preso no topo. */
.pa-v2 .pa-cabecalho {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--v2-e1);
  min-height: 56px;
  margin: 0 calc(-1 * var(--v2-e5));
  padding: env(safe-area-inset-top, 0px) var(--v2-e2) 0;
  background: var(--v2-fundo);
}
@media (max-width: 359px) {
  .pa-v2 .pa-cabecalho { margin: 0 calc(-1 * var(--v2-e4)); }
}
.pa-v2 .pa-cabecalho-titulo {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0 var(--v2-e1);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--v2-texto-forte);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* sem titulo (so voltar + acao): empurra a acao para a direita */
.pa-v2 .pa-cabecalho-espaco { flex: 1; }
.pa-v2 .pa-cabecalho .pa-btn-icone .pa-ico { width: 22px; height: 22px; }

/* Titulo grande da pagina (abaixo do cabecalho) */
.pa-v2 .pa-titulo {
  margin: var(--v2-e2) 0 var(--v2-e1);
  font-size: var(--v2-t-xl);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--v2-texto-forte);
}
.pa-v2 .pa-subtitulo {
  margin: 0 0 var(--v2-e6);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--v2-texto-suave);
}

/* Secao com titulo e acao */
.pa-v2 .pa-secao { margin-top: var(--v2-e8); }
.pa-v2 .pa-secao:first-child { margin-top: var(--v2-e4); }
.pa-v2 .pa-secao-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v2-e3);
  min-height: 32px;
  margin-bottom: var(--v2-e3);
}
.pa-v2 .pa-secao-titulo {
  margin: 0;
  font-size: var(--v2-t-md);
  font-weight: 600;
  color: var(--v2-texto-forte);
}

/* Empilhar / alinhar (espaco por modificador) */
.pa-v2 .pa-pilha { display: flex; flex-direction: column; gap: var(--v2-e3); }
.pa-v2 .pa-pilha.is-justa { gap: var(--v2-e2); }
.pa-v2 .pa-pilha.is-larga { gap: var(--v2-e5); }
.pa-v2 .pa-linha { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-e3); }
.pa-v2 .pa-linha > .pa-btn { flex: 1; }
/* Grade de 2 colunas que vira 1 quando falta largura (fonte grande / 320px) */
.pa-v2 .pa-grade-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  column-gap: var(--v2-e3);
}

/* ==================== 3. MARCA E TEMA ==================== */

/* Marca Pague Azul: quadrado na cor de acento com o P de traco + nome */
.pa-v2 .pa-marca {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--v2-e3);
}
/* Logo em destaque (2026-10-12, pedido do dono): selo maior na cor da marca da cidade, com
   ARO tonal (22% da cor da marca; --v2-primaria-tint onde nao ha color-mix) + sombra curta de apoio. Sem brilho/neon:
   o aro e cor solida e a sombra e escura e baixa. O P de traco cresce junto (mais legivel). */
.pa-v2 .pa-marca-logo {
  width: 84px;
  height: 84px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: var(--v2-primaria);
  color: var(--v2-sobre-primaria);
  flex: none;
  box-shadow: 0 0 0 7px var(--v2-primaria-tint), 0 14px 26px -16px rgba(15, 23, 42, 0.55); box-shadow: 0 0 0 7px color-mix(in srgb, var(--v2-primaria) 22%, transparent), 0 14px 26px -16px rgba(15, 23, 42, 0.55);
  margin: 7px;   /* o aro nao encosta no texto vizinho */
}
.pa-v2 .pa-marca-logo .pa-ico { width: 46px; height: 46px; stroke-width: 2.5; }
.pa-v2 .pa-marca-nome {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--v2-texto-forte);
}
.pa-v2 .pa-marca-slogan {
  margin: -6px 0 0;
  font-size: var(--v2-t-sm);
  color: var(--v2-texto-suave);
}
/* Marca em linha (cabecalhos) */
.pa-v2 .pa-marca.is-linha { flex-direction: row; gap: var(--v2-e2); text-align: left; }
.pa-v2 .pa-marca.is-linha .pa-marca-logo { width: 40px; height: 40px; border-radius: 13px; margin: 3px; box-shadow: 0 0 0 3px var(--v2-primaria-tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-primaria) 22%, transparent); }
.pa-v2 .pa-marca.is-linha .pa-marca-logo .pa-ico { width: 24px; height: 24px; }
.pa-v2 .pa-marca.is-linha .pa-marca-nome { font-size: 1.0625rem; font-weight: 600; } /* = .pa-cabecalho-titulo */

/* Botao sol/lua (paginas sem menu lateral). Marcacao:
   <button class="pa-btn-icone pa-tema-btn" data-tema-alternar onclick="TemaV2.alternar()" aria-label="Modo escuro" aria-pressed="false">
     <i data-ico="lua" class="pa-tema-lua"></i><i data-ico="sol" class="pa-tema-sol"></i></button> */
.pa-v2 .pa-tema-btn { color: var(--v2-texto-suave); }
.pa-v2 .pa-tema-btn .pa-tema-sol { display: none; }
html[data-tema="escuro"] .pa-v2 .pa-tema-btn .pa-tema-sol { display: inline-block; }
html[data-tema="escuro"] .pa-v2 .pa-tema-btn .pa-tema-lua { display: none; }

/* ==================== 4. BOTOES ==================== */
.pa-v2 .pa-btn {
  --pa-btn-tinta: var(--v2-texto);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--v2-e2);
  min-height: 48px;
  padding: 0 var(--v2-e5);
  border: 0;
  border-radius: var(--v2-r-sm);
  font: 600 0.9375rem/1 var(--v2-fonte);
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s var(--v2-ease), opacity 0.15s, background-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.pa-v2 .pa-btn:active { transform: scale(0.98); opacity: 0.85; }
.pa-v2 .pa-btn .pa-ico { width: 18px; height: 18px; stroke-width: 2; }

/* Acento (acao principal: 1 por tela) */
.pa-v2 .pa-btn-primario {
  --pa-btn-tinta: var(--v2-sobre-primaria);
  background: var(--v2-primaria);
  color: var(--v2-sobre-primaria);
}

/* Neutro (cinza sutil) */
.pa-v2 .pa-btn-secundario {
  background: var(--v2-neutro);
  color: var(--v2-texto);
}

/* Contorno hairline sobre a superficie */
.pa-v2 .pa-btn-contorno {
  background: var(--v2-superficie);
  color: var(--v2-texto);
  box-shadow: inset 0 0 0 1px var(--v2-borda-forte);
}

/* Fantasma: so texto */
.pa-v2 .pa-btn-fantasma {
  background: transparent;
  color: var(--v2-texto);
  padding: 0 var(--v2-e3);
}
.pa-v2 .pa-btn-fantasma .pa-ico { color: var(--v2-texto-suave); }

/* Perigo (excluir, cancelar compra) */
.pa-v2 .pa-btn-perigo {
  --pa-btn-tinta: var(--v2-sobre-estado);
  background: var(--v2-erro);
  color: var(--v2-sobre-estado);
}
/* Perigo discreto (texto vermelho, sem fundo) */
.pa-v2 .pa-btn-fantasma.is-perigo,
.pa-v2 .pa-btn-fantasma.is-perigo .pa-ico { color: var(--v2-erro-texto); }

/* Tamanhos */
.pa-v2 .pa-btn-sm { min-height: 40px; padding: 0 var(--v2-e4); font-size: var(--v2-t-sm); border-radius: 10px; }
.pa-v2 .pa-btn-lg { min-height: 56px; font-size: var(--v2-t-md); border-radius: 14px; }
.pa-v2 .pa-btn-bloco { display: flex; width: 100%; }

/* Desabilitado */
.pa-v2 .pa-btn:disabled,
.pa-v2 .pa-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Carregando: .is-carregando (ou .loading, usado pelo auth.js). Texto some, spinner no centro. */
.pa-v2 .pa-btn.is-carregando,
.pa-v2 .pa-btn.loading {
  color: transparent !important;
  pointer-events: none;
  opacity: 1;
}
.pa-v2 .pa-btn.is-carregando > *,
.pa-v2 .pa-btn.loading > * { visibility: hidden; }
.pa-v2 .pa-btn.is-carregando::after,
.pa-v2 .pa-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--pa-btn-tinta);
  border-right-color: transparent;
  border-radius: 50%;
  animation: pa-girar 0.7s linear infinite;
}

/* Botao so de icone (44x44 minimo). Use aria-label. */
.pa-v2 .pa-btn-icone {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--v2-texto-forte);
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.15s var(--v2-ease);
  -webkit-tap-highlight-color: transparent;
}
.pa-v2 .pa-btn-icone:active { background: var(--v2-toque); transform: scale(0.94); }
.pa-v2 .pa-btn-icone:disabled { opacity: 0.45; cursor: not-allowed; }
/* versao com fundo neutro e cantos (ao lado de um campo, ex.: GPS) */
.pa-v2 .pa-btn-icone.is-quadrado {
  width: 52px;
  height: 52px;
  border-radius: var(--v2-r-sm);
  background: var(--v2-campo);
  box-shadow: inset 0 0 0 1px var(--v2-campo-borda);
  color: var(--v2-texto);
}

/* ==================== 5. FORMULARIOS ==================== */
/*
  <div class="pa-campo">
    <label class="pa-rotulo" for="x">Rotulo</label>
    <div class="pa-controle com-icone com-acao">            (modificadores opcionais)
      <i data-ico="email" class="pa-controle-icone"></i>
      <input class="pa-input" id="x">
      <button type="button" class="pa-controle-acao" aria-label="Mostrar senha">...</button>
    </div>
    <small class="pa-ajuda">Texto de ajuda</small>
    <span class="pa-erro-campo" id="xError"></span>        (vazio = escondido)
  </div>
*/
.pa-v2 .pa-campo { display: block; margin-bottom: var(--v2-e5); }
.pa-v2 .pa-rotulo {
  display: block;
  margin-bottom: var(--v2-e2);
  font-size: var(--v2-t-sm);
  font-weight: 500;
  line-height: 1.3;
  color: var(--v2-texto);
}
.pa-v2 .pa-controle { position: relative; display: flex; align-items: center; }
.pa-v2 .pa-controle > .pa-input,
.pa-v2 .pa-controle > .pa-select,
.pa-v2 .pa-controle > .pa-textarea { flex: 1; min-width: 0; }

.pa-v2 .pa-input,
.pa-v2 .pa-select,
.pa-v2 .pa-textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0 var(--v2-e4);
  border: 1px solid var(--v2-campo-borda);
  border-radius: var(--v2-r-sm);
  background: var(--v2-campo);
  color: var(--v2-texto-forte);
  font: 400 1rem/1.4 var(--v2-fonte);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pa-v2 .pa-textarea { min-height: 112px; padding: 14px var(--v2-e4); resize: vertical; }
.pa-v2 .pa-input::placeholder,
.pa-v2 .pa-textarea::placeholder { color: var(--v2-texto-suave); opacity: 1; }
.pa-v2 .pa-input:focus,
.pa-v2 .pa-select:focus,
.pa-v2 .pa-textarea:focus {
  outline: none;
  border-color: var(--v2-primaria);
  box-shadow: 0 0 0 3px var(--v2-primaria-tint);
}
.pa-v2 .pa-input:disabled,
.pa-v2 .pa-select:disabled,
.pa-v2 .pa-textarea:disabled { opacity: 0.55; cursor: not-allowed; }
/* Erro: no campo (.is-erro) ou no input (.error, usado pelo auth.js) */
.pa-v2 .pa-campo.is-erro .pa-input,
.pa-v2 .pa-campo.is-erro .pa-select,
.pa-v2 .pa-campo.is-erro .pa-textarea,
.pa-v2 .pa-input.error,
.pa-v2 .pa-select.error,
.pa-v2 .pa-textarea.error,
.pa-v2 .pa-input.is-erro { border-color: var(--v2-erro); }
/* Autopreenchimento do navegador sem fundo amarelo (inclusive no escuro) */
.pa-v2 .pa-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px var(--v2-campo) inset;
  -webkit-text-fill-color: var(--v2-texto-forte);
  caret-color: var(--v2-texto-forte);
}
.pa-v2 .pa-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px var(--v2-campo) inset, 0 0 0 3px var(--v2-primaria-tint);
}

/* Select: seta desenhada em CSS (cor do token) */
.pa-v2 .pa-select { padding-right: 44px; cursor: pointer; }
/* select obrigatorio ainda sem escolha (option value="") = cor de placeholder */
.pa-v2 .pa-select:invalid { color: var(--v2-texto-suave); }
.pa-v2 .pa-controle.is-select::after {
  content: '';
  position: absolute;
  right: 20px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -6px;
  border-right: 1.75px solid var(--v2-texto-suave);
  border-bottom: 1.75px solid var(--v2-texto-suave);
  transform: rotate(45deg);
  pointer-events: none;
}
/* select dentro de .pa-controle sem flex:1 tambem funciona */
.pa-v2 .pa-select option { color: initial; }

/* Icone a esquerda */
.pa-v2 .pa-controle-icone {
  position: absolute;
  left: 16px;
  color: var(--v2-texto-suave);
  pointer-events: none;
}
.pa-v2 .pa-controle.com-icone > .pa-input,
.pa-v2 .pa-controle.com-icone > .pa-select { padding-left: 48px; }

/* Acao a direita (mostrar senha, limpar) */
.pa-v2 .pa-controle-acao {
  position: absolute;
  right: 4px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--v2-texto-suave);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pa-v2 .pa-controle-acao:active { background: var(--v2-toque); }
.pa-v2 .pa-controle.com-acao > .pa-input { padding-right: 52px; }
/* Botao ao lado do campo (ex.: GPS): .pa-controle.com-botao > select + .pa-btn-icone.is-quadrado */
.pa-v2 .pa-controle.com-botao { gap: var(--v2-e2); }
.pa-v2 .pa-controle.com-botao > .pa-controle { flex: 1; min-width: 0; }

.pa-v2 .pa-ajuda {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--v2-texto-suave);
}
.pa-v2 .pa-ajuda .pa-ico { width: 14px; height: 14px; vertical-align: -2px; }
.pa-v2 .pa-erro-campo {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--v2-erro-texto);
}
.pa-v2 .pa-erro-campo:empty { display: none !important; }

/* ==================== 6. CHECKBOX / RADIO / INTERRUPTOR ==================== */
/*
  <label class="pa-check"><input type="checkbox"> <span>Texto</span></label>
  ou <div class="pa-check"><input type="checkbox" id="a"><label for="a">Texto</label></div>
  radio: igual, com type="radio". Erro: .pa-check.is-erro (ou .error)
*/
.pa-v2 .pa-check {
  display: flex;
  align-items: flex-start;
  gap: var(--v2-e3);
  min-height: 44px;
  padding: 10px 0;
  font-size: var(--v2-t-sm);
  line-height: 1.5;
  color: var(--v2-texto);
  cursor: pointer;
}
.pa-v2 .pa-check label { cursor: pointer; }
.pa-v2 .pa-check input[type="checkbox"],
.pa-v2 .pa-check input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--v2-controle);
  border-radius: 7px;
  background: var(--v2-campo);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.pa-v2 .pa-check input[type="radio"] { border-radius: 50%; }
.pa-v2 .pa-check input[type="checkbox"]::before {
  content: '';
  width: 12px;
  height: 10px;
  background: var(--v2-sobre-primaria);
  clip-path: polygon(13% 45%, 0 62%, 40% 100%, 100% 17%, 86% 2%, 39% 68%);
  transform: scale(0);
  transition: transform 0.15s var(--v2-ease);
}
.pa-v2 .pa-check input[type="radio"]::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--v2-sobre-primaria);
  transform: scale(0);
  transition: transform 0.15s var(--v2-ease);
}
.pa-v2 .pa-check input:checked { background: var(--v2-primaria); border-color: var(--v2-primaria); }
.pa-v2 .pa-check input:checked::before { transform: scale(1); }
.pa-v2 .pa-check input:disabled { opacity: 0.5; cursor: not-allowed; }
.pa-v2 .pa-check.is-erro input,
.pa-v2 .pa-check.error input { border-color: var(--v2-erro); }
.pa-v2 .pa-check.is-erro,
.pa-v2 .pa-check.error { color: var(--v2-erro-texto); }

/* Interruptor com input: <label class="pa-interruptor"><span>Texto</span><input type="checkbox" role="switch"></label> */
.pa-v2 .pa-interruptor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v2-e3);
  min-height: 48px;
  font-size: 0.9375rem;
  color: var(--v2-texto);
  cursor: pointer;
}
.pa-v2 .pa-interruptor input {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: var(--v2-r-pill);
  background: var(--v2-controle);
  cursor: pointer;
  transition: background-color 0.2s;
}
.pa-v2 .pa-interruptor input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--v2-ease);
}
.pa-v2 .pa-interruptor input:checked { background: var(--v2-primaria); }
.pa-v2 .pa-interruptor input:checked::after { transform: translateX(18px); background: var(--v2-sobre-primaria); }
html[data-tema="escuro"] .pa-v2 .pa-interruptor input:checked::after { background: #F1F4F9; }

/* Chave decorativa dentro de um elemento role=switch aria-checked (item "Modo escuro" do menu) */
.pa-v2 .pa-chave {
  position: relative;
  flex: none;
  width: 40px;
  height: 24px;
  border-radius: var(--v2-r-pill);
  background: var(--v2-borda-forte);
  transition: background-color 0.2s;
}
.pa-v2 .pa-chave::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s var(--v2-ease);
}
.pa-v2 [aria-checked="true"] > .pa-chave { background: var(--v2-primaria); }
.pa-v2 [aria-checked="true"] > .pa-chave::after { transform: translateX(16px); background: var(--v2-sobre-primaria); }
html[data-tema="escuro"] .pa-v2 [aria-checked="true"] > .pa-chave::after { background: #F1F4F9; }

/* ==================== 7. CHIPS E SEGMENTOS ==================== */
/* Chips (filtros): <div class="pa-chips"><button class="pa-chip" aria-pressed="true">Todos</button>...</div> */
.pa-v2 .pa-chips {
  display: flex;
  gap: var(--v2-e2);
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--v2-e5));
  padding: 2px var(--v2-e5);
}
.pa-v2 .pa-chips::-webkit-scrollbar { display: none; }
@media (max-width: 359px) {
  .pa-v2 .pa-chips { margin: 0 calc(-1 * var(--v2-e4)); padding: 2px var(--v2-e4); }
}
.pa-v2 .pa-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--v2-borda-forte);
  border-radius: var(--v2-r-pill);
  background: var(--v2-superficie);
  color: var(--v2-texto);
  font: 500 var(--v2-t-sm)/1 var(--v2-fonte);
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.pa-v2 .pa-chip .pa-ico { width: 16px; height: 16px; }
.pa-v2 .pa-chip.is-ativo,
.pa-v2 .pa-chip[aria-pressed="true"],
.pa-v2 .pa-chip[aria-selected="true"] {
  background: var(--v2-primaria-tint);
  border-color: transparent;
  color: var(--v2-primaria-forte);
  font-weight: 600;
}

/* Segmento / abas: <div class="pa-segmento" role="tablist"><button role="tab" aria-selected="true">A</button>...</div> */
.pa-v2 .pa-segmento {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--v2-r-sm);
  background: var(--v2-neutro);
}
.pa-v2 .pa-segmento > * {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  padding: 0 var(--v2-e2);
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--v2-texto-suave);
  font: 500 var(--v2-t-sm)/1.2 var(--v2-fonte);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
}
.pa-v2 .pa-segmento > .is-ativo,
.pa-v2 .pa-segmento > [aria-selected="true"],
.pa-v2 .pa-segmento > [aria-pressed="true"] {
  background: var(--v2-segmento-ativo);
  color: var(--v2-texto-forte);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08), 0 0 0 1px var(--v2-borda);
}

/* ==================== 8. CARTOES, LISTAS, ITENS ==================== */
.pa-v2 .pa-cartao {
  background: var(--v2-superficie);
  border: 1px solid var(--v2-borda);
  border-radius: var(--v2-r-lg);
  box-shadow: var(--v2-sombra-1);
}
.pa-v2 .pa-cartao-corpo { padding: var(--v2-e5); }
.pa-v2 .pa-cartao-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--v2-e3);
  padding: var(--v2-e4) var(--v2-e5);
  border-bottom: 1px solid var(--v2-borda);
}
.pa-v2 .pa-cartao-titulo { margin: 0; font-size: var(--v2-t-md); font-weight: 600; color: var(--v2-texto-forte); }
/* cartao inteiro clicavel (a / button) */
.pa-v2 a.pa-cartao,
.pa-v2 button.pa-cartao {
  display: block;
  width: 100%;
  color: inherit;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s var(--v2-ease);
  -webkit-tap-highlight-color: transparent;
}
.pa-v2 a.pa-cartao:active,
.pa-v2 button.pa-cartao:active { transform: scale(0.99); }
/* cartao selecionavel (ex.: forma de pagamento) */
.pa-v2 .pa-cartao.is-selecionado { border-color: var(--v2-primaria); box-shadow: 0 0 0 1px var(--v2-primaria); }

/*
  <div class="pa-lista">
    <a class="pa-item" href="...">
      <span class="pa-item-icone"><i data-ico="carro"></i></span>
      <span class="pa-item-texto"><span class="pa-item-titulo">Titulo</span><span class="pa-item-detalhe">Detalhe</span></span>
      <span class="pa-item-valor">R$ 10,00</span>
      <i data-ico="seta" class="pa-item-seta"></i>
    </a>
  </div>
*/
.pa-v2 .pa-lista {
  background: var(--v2-superficie);
  border: 1px solid var(--v2-borda);
  border-radius: var(--v2-r-lg);
  overflow: hidden;
}
.pa-v2 .pa-lista.sem-cartao { background: none; border: 0; border-radius: 0; }
.pa-v2 .pa-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: var(--v2-e3) var(--v2-e4);
  border: 0;
  background: none;
  color: var(--v2-texto);
  font: inherit;
  text-align: left;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.pa-v2 .pa-item + .pa-item { border-top: 1px solid var(--v2-borda); }
.pa-v2 a.pa-item,
.pa-v2 button.pa-item { cursor: pointer; transition: background-color 0.15s; }
.pa-v2 a.pa-item:active,
.pa-v2 button.pa-item:active { background: var(--v2-toque); }
.pa-v2 .pa-item-icone {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--v2-r-sm);
  display: grid;
  place-items: center;
  background: var(--v2-neutro);
  color: var(--v2-texto);
}
.pa-v2 .pa-item-icone.is-primaria { background: var(--v2-primaria-tint); color: var(--v2-primaria-forte); }
.pa-v2 .pa-item-icone.is-sucesso { background: var(--v2-sucesso-tint); color: var(--v2-sucesso-texto); }
.pa-v2 .pa-item-icone.is-alerta { background: var(--v2-alerta-tint); color: var(--v2-alerta-texto); }
.pa-v2 .pa-item-icone.is-erro { background: var(--v2-erro-tint); color: var(--v2-erro-texto); }
.pa-v2 .pa-item-texto {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pa-v2 .pa-item-titulo {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--v2-texto-forte);
  overflow-wrap: anywhere;
}
.pa-v2 .pa-item-detalhe {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--v2-texto-suave);
  overflow-wrap: anywhere;
}
.pa-v2 .pa-item-valor {
  flex: none;
  text-align: right;
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--v2-texto-forte);
  white-space: nowrap;
}
.pa-v2 .pa-item-seta { color: var(--v2-texto-suave); width: 18px; height: 18px; flex: none; }

/* ==================== 9. SELOS, AVISOS, VAZIO, DIVISORES, VALORES, PLACA ==================== */

/* Selo de status. Padrao = sucesso. */
.pa-v2 .pa-selo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px 0 8px;
  border-radius: var(--v2-r-pill);
  font-size: var(--v2-t-xs);
  font-weight: 600;
  white-space: nowrap;
  background: var(--v2-sucesso-tint);
  color: var(--v2-sucesso-texto);
}
.pa-v2 .pa-selo::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pa-v2 .pa-selo.sem-ponto { padding: 0 10px; }
.pa-v2 .pa-selo.sem-ponto::before { display: none; }
.pa-v2 .pa-selo.is-alerta { background: var(--v2-alerta-tint); color: var(--v2-alerta-texto); }
.pa-v2 .pa-selo.is-expirado,
.pa-v2 .pa-selo.is-erro { background: var(--v2-erro-tint); color: var(--v2-erro-texto); }
.pa-v2 .pa-selo.is-info { background: var(--v2-primaria-tint); color: var(--v2-primaria-forte); }
.pa-v2 .pa-selo.is-neutro { background: var(--v2-neutro); color: var(--v2-texto-suave); }

/* Aviso inline: <div class="pa-aviso is-alerta" role="status"><i data-ico="atencao"></i><div><strong class="pa-aviso-titulo">..</strong>Texto</div></div> */
.pa-v2 .pa-aviso {
  display: flex;
  align-items: flex-start;
  gap: var(--v2-e3);
  padding: 14px var(--v2-e4);
  border-radius: var(--v2-r-md);
  background: var(--v2-primaria-tint);
  color: var(--v2-texto);
  font-size: var(--v2-t-sm);
  line-height: 1.5;
}
.pa-v2 .pa-aviso > .pa-ico { color: var(--v2-primaria-forte); margin-top: 1px; }
.pa-v2 .pa-aviso-titulo { display: block; font-weight: 600; color: var(--v2-texto-forte); margin-bottom: 2px; }
.pa-v2 .pa-aviso.is-sucesso { background: var(--v2-sucesso-tint); }
.pa-v2 .pa-aviso.is-sucesso > .pa-ico { color: var(--v2-sucesso-texto); }
.pa-v2 .pa-aviso.is-alerta { background: var(--v2-alerta-tint); }
.pa-v2 .pa-aviso.is-alerta > .pa-ico { color: var(--v2-alerta-texto); }
.pa-v2 .pa-aviso.is-erro { background: var(--v2-erro-tint); }
.pa-v2 .pa-aviso.is-erro > .pa-ico { color: var(--v2-erro-texto); }
.pa-v2 .pa-aviso a { color: var(--v2-texto-forte); font-weight: 600; text-decoration: underline; }

/* Estado vazio */
.pa-v2 .pa-vazio {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--v2-e8) var(--v2-e6);
}
.pa-v2 .pa-vazio-icone {
  width: 56px;
  height: 56px;
  margin-bottom: var(--v2-e4);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--v2-neutro);
  color: var(--v2-texto-suave);
}
.pa-v2 .pa-vazio-icone .pa-ico { width: 26px; height: 26px; }
.pa-v2 .pa-vazio-titulo { margin: 0 0 4px; font-size: var(--v2-t-md); font-weight: 600; color: var(--v2-texto-forte); }
.pa-v2 .pa-vazio-texto { margin: 0; max-width: 300px; font-size: var(--v2-t-sm); line-height: 1.5; color: var(--v2-texto-suave); }
.pa-v2 .pa-vazio .pa-btn { margin-top: var(--v2-e5); }

/* Divisores */
.pa-v2 .pa-divisor { height: 1px; margin: var(--v2-e5) 0; border: 0; background: var(--v2-borda); }
.pa-v2 .pa-divisor-texto {
  display: flex;
  align-items: center;
  gap: var(--v2-e3);
  margin: var(--v2-e5) 0;
  font-size: 0.8125rem;
  color: var(--v2-texto-suave);
}
.pa-v2 .pa-divisor-texto::before,
.pa-v2 .pa-divisor-texto::after { content: ''; flex: 1; height: 1px; background: var(--v2-borda-forte); }

/* Valores monetarios (numeros tabulares) */
.pa-v2 .pa-valor {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--v2-texto-forte);
  white-space: nowrap;
}
.pa-v2 .pa-valor.is-positivo { color: var(--v2-sucesso-texto); }
.pa-v2 .pa-valor.is-negativo { color: var(--v2-erro-texto); }
.pa-v2 .pa-valor.is-grande { font-size: var(--v2-t-2xl); letter-spacing: -0.03em; line-height: 1.1; }
.pa-v2 .pa-moeda { margin-right: 4px; font-size: 0.6em; font-weight: 500; color: var(--v2-texto-suave); }
.pa-v2 .pa-tabular { font-variant-numeric: tabular-nums; }

/* Placa Mercosul estilizada */
.pa-v2 .pa-placa {
  display: inline-flex;
  flex-direction: column;
  min-width: 112px;
  border: 1.5px solid var(--v2-placa-borda);
  border-radius: 7px;
  background: var(--v2-placa-fundo);
  overflow: hidden;
  line-height: 1;
}
.pa-v2 .pa-placa-faixa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 13px;
  padding: 0 6px;
  background: #1E40AF;
  color: #FFFFFF;
  font: 600 7.5px/1 var(--v2-fonte);
  letter-spacing: 0.2em;
}
.pa-v2 .pa-placa-faixa::before,
.pa-v2 .pa-placa-faixa::after {
  content: '';
  width: 9px;
  height: 6px;
  border-radius: 1px;
}
/* bandeirinha do Brasil (esq.) e retangulo do Mercosul (dir.) em cores chapadas */
.pa-v2 .pa-placa-faixa::before { background: linear-gradient(135deg, #16A34A 0 50%, #FACC15 50%); }
.pa-v2 .pa-placa-faixa::after { background: rgba(255, 255, 255, 0.35); }
.pa-v2 .pa-placa-num {
  display: block;
  padding: 5px 8px 6px;
  text-align: center;
  color: var(--v2-placa-texto);
  font-family: var(--v2-fonte);
  font-size: 1.1875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
html[data-tema="escuro"] .pa-v2 .pa-placa-faixa { background: #1D3C9E; }
/* placa pequena (listas) */
.pa-v2 .pa-placa.is-pequena { min-width: 84px; }
.pa-v2 .pa-placa.is-pequena .pa-placa-faixa { height: 10px; font-size: 6px; }
.pa-v2 .pa-placa.is-pequena .pa-placa-num { padding: 3px 6px 4px; font-size: 0.9375rem; }

/* ==================== 10. BARRA INFERIOR E MENU LATERAL ==================== */

/* Barra inferior (footer-nav.js renderiza a marcacao v2 quando o body tem .pa-v2) */
.pa-v2 .footer-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 8px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--v2-barra);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--v2-borda);
  box-shadow: none;
}
.pa-v2 .footer-nav .nav-item {
  flex: 1 1 0;
  min-width: 0;
  max-width: 88px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  border-radius: 0;
  background: none;
  color: var(--v2-texto-suave);
  text-decoration: none;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.pa-v2 .footer-nav .nav-item:hover { background: none; }
.pa-v2 .footer-nav .nav-item:active { opacity: 0.6; }
.pa-v2 .footer-nav .nav-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 32px;
}
.pa-v2 .footer-nav .nav-ico .pa-ico { width: 22px; height: 22px; }
.pa-v2 .footer-nav .nav-item span.nav-rotulo {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.pa-v2 .footer-nav .nav-item.active { color: var(--v2-texto-forte); }
.pa-v2 .footer-nav .nav-item.active span.nav-rotulo { font-weight: 600; }
.pa-v2 .footer-nav .nav-item.active .nav-ico .pa-ico { stroke-width: 2.1; }

/* "Estacionar" central: circulo na cor de acento, ELEVADO acima da barra, com anel da cor
   da barra em volta (respiro) e sombra curta. Ocupa no fluxo a mesma altura (32px) dos
   outros icones, entao o rotulo fica alinhado com os demais. */
.pa-v2 .footer-nav .nav-item.nav-central { overflow: visible; }
.pa-v2 .footer-nav .nav-item.nav-central .nav-ico {
  width: 52px;
  height: 52px;
  margin-top: -20px;
  border-radius: 50%;
  background: var(--v2-primaria);
  color: var(--v2-sobre-primaria);
  box-shadow: 0 0 0 5px var(--v2-anel-central), var(--v2-sombra-central);
  transform: translateY(-6px); /* sobe sem mexer no fluxo: o rotulo continua alinhado */
  transition: transform 0.15s var(--v2-ease);
}
.pa-v2 .footer-nav .nav-item.nav-central .nav-ico .pa-ico { width: 24px; height: 24px; stroke-width: 2.25; }
.pa-v2 .footer-nav .nav-item.nav-central:active { opacity: 1; }
.pa-v2 .footer-nav .nav-item.nav-central:active .nav-ico { transform: translateY(-6px) scale(0.94); }

/* Menu lateral (menu.js, estilos inline) - neutro, cor so no acento */
.pa-v2 #menu-sidebar {
  font-family: var(--v2-fonte);
  background: var(--v2-superficie) !important;
  border-right: 1px solid var(--v2-borda);
  box-shadow: var(--v2-sombra-3) !important;
}
.pa-v2 #menu-sidebar > div:first-child {
  background: transparent !important;
  color: var(--v2-texto) !important;
  padding: 20px 16px 12px !important;
  border-bottom: 1px solid var(--v2-borda);
}
.pa-v2 #menu-sidebar > div:first-child > div:first-child { margin-bottom: 16px !important; }
.pa-v2 #menu-sidebar [data-pa-logo] {
  width: 52px !important;
  height: 52px !important;
  margin: 4px;
  border-radius: 16px !important;
  background: var(--v2-primaria) !important;
  color: var(--v2-sobre-primaria) !important;
  box-shadow: 0 0 0 4px var(--v2-primaria-tint), 0 10px 20px -12px rgba(15, 23, 42, 0.5) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--v2-primaria) 22%, transparent), 0 10px 20px -12px rgba(15, 23, 42, 0.5) !important;
  font: 700 22px/1 var(--v2-fonte) !important;
}
/* logo em destaque (2026-10-12): P de traco maior no selo do menu */
.pa-v2 #menu-sidebar [data-pa-logo] .pa-ico { width: 30px !important; height: 30px !important; }
.pa-v2 #menu-sidebar [data-pa-logo].tem-imagem { box-shadow: inset 0 0 0 1px var(--v2-borda) !important; }
.pa-v2 #menu-sidebar > div:first-child button {
  width: 44px !important;
  height: 44px !important;
  margin-right: -8px;
  border-radius: 50% !important;
  background: transparent !important;
  color: var(--v2-texto-suave) !important;
}
.pa-v2 #menu-sidebar > div:first-child > div:last-child {
  background: var(--v2-superficie-2) !important;
  border-radius: var(--v2-r-sm) !important;
}
.pa-v2 #menu-sidebar [data-menu-inicial] {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: var(--v2-superficie) !important;
  border: 1px solid var(--v2-borda);
  color: var(--v2-texto-forte);
  font-size: 16px !important;
}
.pa-v2 #menu-sidebar [data-menu-email] { color: var(--v2-texto-suave); opacity: 1 !important; }
.pa-v2 #menu-sidebar .menu-item {
  min-height: 48px;
  margin: 0 8px;
  padding: 12px;
  gap: 14px;
  border-radius: var(--v2-r-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--v2-texto);
}
.pa-v2 #menu-sidebar .menu-item:hover { background: var(--v2-superficie-2); }
.pa-v2 #menu-sidebar .menu-item .pa-ico { color: var(--v2-texto-suave); }
.pa-v2 #menu-sidebar .menu-item[onclick] { color: var(--v2-erro-texto) !important; }
.pa-v2 #menu-sidebar .menu-item[onclick] .pa-ico { color: currentColor; }
.pa-v2 #menu-overlay { background: var(--v2-overlay) !important; }

/* Item "Modo escuro" do menu (chave liga/desliga, injetado pelo menu.js) */
.pa-v2 #menu-sidebar .pa-menu-tema {
  width: calc(100% - 16px);
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
}
.pa-v2 .pa-menu-tema > span:first-of-type { flex: 1; }

/* Escolha do visual opcional "Classico | Atlas" (Perfil > Aparencia e menu; visual.js trata os cliques).
   Segmento compacto a direita do item, mesmo desenho do .pa-segmento. */
.pa-v2 .pa-visual-escolha { flex: 0 0 auto; width: 176px; }
.pa-v2 .pa-visual-escolha > * { min-height: 40px; }
.pa-v2 .pa-visual-item { cursor: default; }
.pa-v2 #menu-sidebar .pa-menu-visual { width: calc(100% - 16px); cursor: default; }
.pa-v2 #menu-sidebar .pa-menu-visual:hover { background: none; }
.pa-v2 .pa-menu-visual > span:first-of-type { flex: 1; }
.pa-v2 #menu-sidebar .pa-menu-visual .pa-visual-escolha { width: 148px; margin-right: -4px; }
.pa-v2 #menu-sidebar .pa-menu-visual .pa-visual-escolha > * { padding: 0 4px; font-size: 0.8125rem; }
.pa-v2 .pa-visual-escolha > * { padding: 0 6px; text-overflow: clip; }

/* Bolinha de aviso no botao do menu: borda na cor do fundo */
.pa-v2 .btn-hamburger.tem-aviso::after { border-color: var(--v2-fundo); background: var(--v2-erro); }

/* ==================== 11. MODAL E TOAST ==================== */
/*
  Modal.alert / Modal.confirm (modal.js) = DIALOGO centralizado.
  Modais de ACAO da tela (formulario, pagamento, termos): Modal.show com
    <div class="modal-box pa-folha"> header/body/footer </div>
  -> em telas estreitas (< 600px) vira FOLHA INFERIOR (bottom sheet); larga = dialogo.
  Mantem tudo do modal.js: altura maxima = area visivel (100dvh), so o .modal-body rola,
  rodape sempre visivel, toque no fundo = cancelar, Modal.fundoBloqueado, 400 ms.
  Botoes: .btn.btn-primary / .btn-secondary / .btn-danger (estilo v2 aqui) ou .pa-btn.
  Campos: .form-group/.form-label/.form-control/.form-error (estilo v2 aqui) ou .pa-campo.
*/
.pa-v2 #modal-overlay {
  background: var(--v2-overlay);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.pa-v2 .modal-box {
  max-width: 400px;
  background: var(--v2-superficie);
  color: var(--v2-texto);
  border: 1px solid var(--v2-borda);
  border-radius: var(--v2-r-xl);
  box-shadow: var(--v2-sombra-3);
  font-family: var(--v2-fonte);
}
.pa-v2 .modal-box.pa-modal-largo { max-width: 560px; }
.pa-v2 .modal-header {
  display: flex;
  align-items: center;
  gap: var(--v2-e2);
  padding: var(--v2-e6) var(--v2-e6) var(--v2-e2);
  border-bottom: 0;
}
.pa-v2 .modal-header h3 {
  flex: 1;
  min-width: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--v2-texto-forte);
}
/* botao fechar opcional no cabecalho: <button class="pa-btn-icone pa-modal-fechar" aria-label="Fechar"> */
.pa-v2 .modal-header .pa-modal-fechar { margin: -10px -12px -10px 0; color: var(--v2-texto-suave); }
.pa-v2 .modal-body { padding: var(--v2-e2) var(--v2-e6) var(--v2-e5); }
.pa-v2 .modal-body p { color: var(--v2-texto-suave); font-size: 0.9375rem; line-height: 1.55; }
.pa-v2 .modal-body a { color: var(--v2-primaria-forte); font-weight: 500; }
.pa-v2 .modal-footer {
  padding: var(--v2-e2) var(--v2-e6) var(--v2-e6);
  padding-bottom: calc(var(--v2-e6) + env(safe-area-inset-bottom, 0px));
  border-top: 0;
  gap: 10px;
}
/* corpo rolavel: hairline no rodape so quando ha rolagem nao e detectavel em CSS; usamos sempre uma linha sutil
   nas folhas (conteudo longo) e nenhuma nos dialogos curtos */
.pa-v2 .pa-folha > .modal-footer { border-top: 1px solid var(--v2-borda); padding-top: var(--v2-e4); }
.pa-v2 .pa-folha > .modal-header { padding-bottom: var(--v2-e3); }

/* Botoes do modal (classes .btn do main.css, visual v2) */
.pa-v2 .modal-box .btn {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 0 var(--v2-e5);
  border-radius: var(--v2-r-sm);
  font: 600 0.9375rem/1 var(--v2-fonte);
  letter-spacing: -0.01em;
  border: 0;
}
.pa-v2 .modal-box .btn:active { transform: scale(0.98); }
.pa-v2 .modal-box .btn-primary,
.pa-v2 .modal-box .btn-primary:hover:not(:disabled) { background: var(--v2-primaria); color: var(--v2-sobre-primaria); }
.pa-v2 .modal-box .btn-secondary,
.pa-v2 .modal-box .btn-secondary:hover:not(:disabled) { background: var(--v2-neutro); color: var(--v2-texto); }
.pa-v2 .modal-box .btn-danger { background: var(--v2-erro); color: var(--v2-sobre-estado); }
.pa-v2 .modal-box .btn-outline { background: transparent; color: var(--v2-texto); box-shadow: inset 0 0 0 1px var(--v2-borda-forte); }
.pa-v2 .modal-box .btn:disabled { opacity: 0.45; }

/* Campos do modal (classes do main.css, visual v2 = .pa-input) */
.pa-v2 .modal-box .form-group { margin-bottom: var(--v2-e4); }
.pa-v2 .modal-box .form-label {
  margin-bottom: var(--v2-e2);
  font-size: var(--v2-t-sm);
  font-weight: 500;
  color: var(--v2-texto);
}
.pa-v2 .modal-box .form-control {
  min-height: 52px;
  padding: 0 var(--v2-e4);
  border: 1px solid var(--v2-campo-borda);
  border-radius: var(--v2-r-sm);
  background: var(--v2-campo);
  color: var(--v2-texto-forte);
  font: 400 1rem/1.4 var(--v2-fonte);
}
.pa-v2 .modal-box .form-control:focus {
  outline: none;
  border-color: var(--v2-primaria);
  box-shadow: 0 0 0 3px var(--v2-primaria-tint);
}
.pa-v2 .modal-box .form-error { font-size: 0.8125rem; font-weight: 500; color: var(--v2-erro-texto); }

/* Folha inferior (bottom sheet) em telas estreitas */
@media (max-width: 599px) {
  .pa-v2 #modal-overlay.tem-folha {
    align-items: flex-end;
    padding: calc(var(--v2-e6) + env(safe-area-inset-top, 0px)) 0 0;
  }
  .pa-v2 #modal-overlay.tem-folha > .pa-folha {
    max-width: none;
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
    border-radius: var(--v2-r-xl) var(--v2-r-xl) 0 0;
    transform: translateY(100%);
    transition: transform 0.3s var(--v2-ease);
  }
  .pa-v2 #modal-overlay.tem-folha.show > .pa-folha { transform: none; }
  /* alca decorativa no topo da folha */
  .pa-v2 .pa-folha::before {
    content: '';
    display: block;
    flex: none;
    width: 36px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 2px;
    background: var(--v2-borda-forte);
  }
  .pa-v2 .pa-folha > .modal-header { padding-top: var(--v2-e3); }
}

/* Conteudo legal (termos/privacidade dentro de modal ou pagina) */
.pa-v2 .pa-legal h3 { margin: var(--v2-e5) 0 var(--v2-e2); font-size: 0.9375rem; font-weight: 600; color: var(--v2-texto-forte); }
.pa-v2 .pa-legal h3:first-child { margin-top: 0; }
.pa-v2 .pa-legal p,
.pa-v2 .pa-legal li { margin-bottom: var(--v2-e2); font-size: var(--v2-t-sm); line-height: 1.7; color: var(--v2-texto-suave); }
.pa-v2 .pa-legal ul,
.pa-v2 .pa-legal ol { list-style: disc; padding-left: var(--v2-e5); margin-bottom: var(--v2-e3); }
.pa-v2 .pa-legal li { margin-bottom: 4px; }
.pa-v2 .pa-legal strong { color: var(--v2-texto); font-weight: 600; }

/* Toasts (toast.js): superficie + hairline, icone colorido, sem faixa lateral grossa */
.pa-v2 #toast-container { top: calc(12px + env(safe-area-inset-top, 0px)); }
.pa-v2 .toast {
  gap: var(--v2-e3);
  padding: 12px 12px 12px 14px;
  background: var(--v2-superficie);
  border: 1px solid var(--v2-borda-forte);
  border-left-width: 1px;
  border-radius: var(--v2-r-md);
  box-shadow: var(--v2-sombra-3);
  font-family: var(--v2-fonte);
}
html[data-tema="escuro"] .pa-v2 .toast { background: var(--v2-superficie-2); }
.pa-v2 .toast-success,
.pa-v2 .toast-error,
.pa-v2 .toast-warning,
.pa-v2 .toast-info { border-left-color: var(--v2-borda-forte); }
.pa-v2 .toast-icon { width: 24px; height: 24px; font-size: 13px; }
.pa-v2 .toast-success .toast-icon { background: var(--v2-sucesso); color: var(--v2-sobre-estado); }
.pa-v2 .toast-error .toast-icon { background: var(--v2-erro); color: var(--v2-sobre-estado); }
.pa-v2 .toast-warning .toast-icon { background: var(--v2-alerta); color: var(--v2-sobre-estado); }
.pa-v2 .toast-info .toast-icon { background: var(--v2-primaria); color: var(--v2-sobre-primaria); }
.pa-v2 .toast-message { color: var(--v2-texto-forte); font-weight: 500; }
.pa-v2 .toast-close {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 20px;
  color: var(--v2-texto-suave);
  opacity: 1;
}

/* fase2-B: cartao de saldo (.pa-saldo) - MOVIDO de home.css sem alteracao para servir home e carteira.
   Marcacao: section.pa-saldo > .pa-saldo-topo (.pa-saldo-rotulo + button.pa-btn-icone.pa-saldo-olho)
   + .pa-saldo-valor (.pa-saldo-moeda + .pa-saldo-numero[.is-oculto] | .pa-saldo-indisponivel + .pa-saldo-tentar)
   + .pa-saldo-acoes (.pa-btn-primario + .pa-btn-fantasma). Escuro nos 2 temas (tokens --v2-saldo-*). */
.pa-v2 .pa-saldo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: var(--v2-e2);
  padding: var(--v2-e4) var(--v2-e5) var(--v2-e5);
  border-radius: var(--v2-r-xl);
  border: 1px solid var(--v2-saldo-borda);
  color: var(--v2-saldo-texto);
  background: linear-gradient(160deg, var(--v2-saldo-de) 0%, var(--v2-saldo-ate) 100%);
}
.pa-v2 .pa-saldo::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(85% 75% at 100% 0%, var(--v2-primaria) 0%, transparent 70%);
  opacity: var(--v2-saldo-brilho);
  pointer-events: none;
}
.pa-v2 .pa-saldo :focus-visible { outline-color: var(--v2-saldo-texto); }

.pa-v2 .pa-saldo-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-right: -12px;
}
.pa-v2 .pa-saldo-rotulo {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--v2-saldo-suave);
}
.pa-v2 .pa-saldo-olho { color: var(--v2-saldo-suave); }
.pa-v2 .pa-saldo-olho .pa-ico { width: 18px; height: 18px; }
.pa-v2 .pa-saldo-olho:active { background: var(--v2-saldo-fantasma); }
.pa-v2 .pa-saldo-olho[hidden] { display: none; }

.pa-v2 .pa-saldo-valor {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 52px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}
.pa-v2 .pa-saldo-moeda {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--v2-saldo-suave);
}
.pa-v2 .pa-saldo-numero {
  font-size: clamp(2rem, 10.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pa-v2 .pa-saldo-numero.is-oculto { letter-spacing: 0.06em; }
.pa-v2 .pa-saldo-indisponivel {
  font-size: var(--v2-t-sm);
  font-weight: 500;
  color: var(--v2-saldo-suave);
  align-self: center;
  white-space: normal;
}
.pa-v2 .pa-saldo-tentar {
  margin-left: auto;
  align-self: center;
  min-height: 44px;
  padding: 0 14px;
  font-size: var(--v2-t-sm);
  background: var(--v2-saldo-fantasma);
  color: var(--v2-saldo-texto);
}

.pa-v2 .pa-saldo-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--v2-e2);
  margin-top: var(--v2-e4);
}
.pa-v2 .pa-saldo-acoes .pa-btn { flex: 1 1 120px; min-height: 44px; }
.pa-v2 .pa-saldo-acoes .pa-btn-fantasma {
  background: var(--v2-saldo-fantasma);
  color: var(--v2-saldo-texto);
}
.pa-v2 .pa-saldo-acoes .pa-btn-fantasma .pa-ico { color: var(--v2-saldo-suave); }
@media (max-width: 340px) {
  .pa-v2 .pa-saldo { padding-left: var(--v2-e4); padding-right: var(--v2-e4); }
  .pa-v2 .pa-saldo-acoes .pa-btn { padding: 0 12px; }
  .pa-v2 .pa-saldo-acoes .pa-btn .pa-ico { display: none; }
}

/* fase2-A: anel de tempo do ticket (.pa-anel) - MOVIDO de home.css (mesmas regras) para servir home e tickets.
   Marcacao: div.pa-anel > svg[viewBox="0 0 120 120"] (circle.pa-anel-trilho + circle.pa-anel-barra r=52,
   stroke-dasharray/offset = 2*PI*52) + .pa-anel-centro > .pa-anel-valor + .pa-anel-rotulo.
   Cor da barra = --anel-cor herdada (ex.: .pa-ticket.is-alerta da home) ou os modificadores do proprio anel:
   .is-alerta / .is-expirado. Tamanho menor: .is-pequeno. */
.pa-v2 .pa-anel {
  position: relative;
  flex: none;
  width: 7.5rem;   /* 120px; cresce junto com a fonte do sistema */
  height: 7.5rem;
}
.pa-v2 .pa-anel svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.pa-v2 .pa-anel-trilho { fill: none; stroke: var(--v2-trilho); stroke-width: 5; }
.pa-v2 .pa-anel-barra {
  fill: none;
  stroke: var(--anel-cor, var(--v2-sucesso));
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}
.pa-v2 .pa-anel-centro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}
.pa-v2 .pa-anel-valor {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--v2-texto-forte);
  font-variant-numeric: tabular-nums;
}
.pa-v2 .pa-anel-rotulo:empty { display: none; }
.pa-v2 .pa-anel-rotulo {
  margin-top: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--v2-texto-suave);
}
.pa-v2 .pa-anel.is-alerta { --anel-cor: var(--v2-alerta); }
.pa-v2 .pa-anel.is-alerta .pa-anel-valor { color: var(--v2-alerta-texto); }
.pa-v2 .pa-anel.is-expirado { --anel-cor: var(--v2-erro); }
.pa-v2 .pa-anel.is-expirado .pa-anel-trilho { stroke: var(--v2-erro-tint); }
.pa-v2 .pa-anel.is-expirado .pa-anel-valor { font-size: 0.9375rem; color: var(--v2-erro-texto); letter-spacing: 0; }
.pa-v2 .pa-anel.is-pequeno { width: 5.5rem; height: 5.5rem; }
.pa-v2 .pa-anel.is-pequeno .pa-anel-valor { font-size: 1.125rem; }
.pa-v2 .pa-anel.is-pequeno .pa-anel-rotulo { margin-top: 2px; font-size: 0.625rem; }

/* ==================== marca por cidade (branding.js: [data-marca="logo"]) ==================== */
/* Marca sem logo: inicial do nome no quadrado de acento */
.pa-v2 .pa-marca-logo.tem-inicial { font-size: 2.25rem; font-weight: 700; line-height: 1; }
.pa-v2 .pa-marca.is-linha .pa-marca-logo.tem-inicial { font-size: 1.25rem; }
/* Marca com logo em imagem: fundo branco + hairline, imagem inteira dentro do quadrado */
.pa-v2 [data-marca="logo"].tem-imagem {
  background: var(--v2-logo-fundo) !important;
  box-shadow: inset 0 0 0 1px var(--v2-borda) !important;
  overflow: hidden;
  padding: 3px;
}
.pa-v2 [data-marca="logo"] .pa-marca-img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
