/* ===================================================================
   gov.br — tela inicial + splash "escrita à mão"
   Mobile-first; escala para desktop como "cartão" de app.
   =================================================================== */

:root {
  --azul: #1351b4;
  --azul-escuro: #0c326f;
  --amarelo: #ffcd07;
  --verde: #168821;
  --cinza-texto: #888888;
  --branco: #ffffff;
  /* cor exata da borda inferior de image.png — emenda o fundo sem linha de corte */
  --fundo: #f0eff3;
  --sombra: 0 2px 12px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body { height: 100%; }

body {
  font-family: "Rawline", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #d9dde2;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-height: 100dvh;
}

/* ===================================================================
   LOGO (adesivo) — usada no herói
   =================================================================== */
.logo {
  display: inline-flex;
  white-space: nowrap;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  -webkit-text-stroke: 0.045em var(--branco);
  paint-order: stroke fill;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.18));
}
.logo > span { display: inline-block; }
.logo__g, .logo__dot, .logo__b { color: var(--azul); }
.logo__o, .logo__r            { color: var(--amarelo); }
.logo__v                      { color: var(--verde); }

/* ===================================================================
   LOGO OFICIAL (imagem SVG govbr) — substitui o desenho por CSS.
   Uma só arte vetorial, nítida em qualquer tamanho.
   =================================================================== */
.brand {
  display: inline-block;
  height: 21px;
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.brand--sm     { height: 21px; }
.brand--config { height: 23px; }
.brand--hero   { height: clamp(44px, 14vw, 76px); filter: drop-shadow(0 4px 6px rgba(0,0,0,.18)); }
.brand--config { display: block; }
/* Alto contraste: clareia o logo para destacar sobre fundo escuro */
body.alto-contraste .brand { filter: brightness(1.25) saturate(1.15); }

/* ===================================================================
   ZOOM — bloqueado no site inteiro; liberado só no visualizador de doc.
   =================================================================== */
html { touch-action: manipulation; }  /* mata o duplo-toque que dá zoom */

/* ===================================================================
   CONTAINER DO APP (mobile-first)
   =================================================================== */
.phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  /* Continua a textura de tecido da imagem por toda a tela (sem corte).
     A camada de cor por cima suaviza a repetição, deixando a ruga discreta. */
  background-color: var(--fundo);
  background-image:
    linear-gradient(rgba(240, 239, 243, 0.55), rgba(240, 239, 243, 0.55)),
    url("../assets/fabric.png");
  background-size: auto, 100% auto;
  background-repeat: repeat, repeat;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* --- MODO FUNDO COMPLETO ---
   bg.jpg é a arte inteira (do topo ao rodapé): vira o fundo da tela toda
   e os botões ficam por cima. Ativado pelo JS ao achar o arquivo. */
.phone.has-bg {
  background-color: var(--fundo);
  background-image: url("../bg.jpg");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}
.phone.has-bg .hero {
  display: none;              /* a arte já está no fundo; não duplica */
}

@media (min-width: 480px) {
  body { padding: 24px 0; align-items: center; }
  .phone {
    min-height: min(900px, calc(100dvh - 48px));
    border-radius: 22px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  }
}

/* ===================================================================
   HERÓI — arte real (image.png) colada no topo, de ponta a ponta
   =================================================================== */
.hero {
  position: relative;
  flex: 0 0 auto;          /* altura natural da imagem (full-bleed no topo) */
  overflow: hidden;
  background: transparent;   /* deixa a textura do .phone aparecer */
  line-height: 0;
}

/* --- Modo padrão: arte pronta cobrindo o topo inteiro --- */
.hero.has-photo .hero__photo img {
  width: 100%;
  height: auto;
  display: block;
  filter: none;
}
.hero.has-photo .hero__stripe,
.hero.has-photo .hero__logo { display: none; }

/* --- Fallback: sem imagem, desenha faixa amarela + logo --- */
.hero:not(.has-photo) {
  flex: 1 1 auto;
  min-height: 58vh;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  line-height: normal;
  background:
    linear-gradient(115deg, rgba(0,0,0,0.03), transparent 30%, rgba(0,0,0,0.04) 65%, transparent),
    linear-gradient(#f7f8f9, #eef0f2);
}
.hero:not(.has-photo) .hero__photo { display: none; }
.hero:not(.has-photo) .hero__stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  max-width: 155px;
  background: var(--amarelo);
}
.hero:not(.has-photo) .hero__logo {
  position: relative;
  padding-bottom: 7%;
}
.hero .logo { font-size: clamp(52px, 19vw, 92px); }

/* ===================================================================
   AÇÕES
   =================================================================== */
.actions {
  flex: 0 0 auto;
  margin-top: auto;            /* empurra os botões p/ baixo (branco no meio) */
  padding: 28px 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: transparent;
}

.btn-govbr {
  width: 100%;
  max-width: 340px;
  border: none;
  border-radius: 999px;
  background: var(--azul);
  color: var(--branco);
  font-size: 17px;
  font-weight: 600;
  padding: 16px 20px;
  cursor: pointer;
  box-shadow: var(--sombra);
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn-govbr:hover { background: var(--azul-escuro); }
.btn-govbr:active { transform: scale(0.98); }
.btn-govbr:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }

.actions__hint {
  font-size: 14px;
  color: var(--cinza-texto);
  text-align: center;
  max-width: 300px;
}
.actions__hint strong { font-weight: 700; }

.btn-qr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--azul);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
}
.btn-qr:hover { text-decoration: underline; }
.btn-qr:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 6px; }

/* ===================================================================
   VERSÃO
   =================================================================== */
.version {
  flex: 0 0 auto;
  text-align: right;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: #b8bcc2;
}

/* ===================================================================
   ACESSIBILIDADE — só existe na tela de entrar (CPF)
   =================================================================== */

/* VLibras: escondido por padrão; aparece apenas na tela de entrar.
   Usamos visibility (não display:none) porque o plugin precisa medir o
   elemento ao iniciar — com display:none ele não renderiza o avatar.
   O !important é necessário: o plugin injeta o próprio CSS e sobrepõe o nosso. */
div[vw] {
  visibility: hidden !important;
  pointer-events: none !important;
}
body.entrar-aberto div[vw] {
  visibility: visible !important;
  pointer-events: auto !important;
}

.acess-group {
  margin-left: auto;          /* empurra o grupo p/ a direita do cabeçalho */
  display: inline-flex;
  align-items: center;
  gap: 4px;                   /* dois ícones limpos, lado a lado */
}

/* Botões só de ícone (como na referência): Alto contraste + VLibras */
.acess__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--azul);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.acess__btn:hover { background: rgba(19, 81, 180, 0.10); }
.acess__btn:active { transform: scale(0.94); }
.acess__btn:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
/* Contraste ligado: o próprio botão fica destacado */
.acess__btn[aria-pressed="true"] { background: var(--azul); color: #fff; }

/* O rótulo existe só para leitores de tela — o visual é ícone puro */
.acess__txt {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Tooltip (hover/foco) explicando o que cada botão faz */
.acess__btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  background: #1c1c1c;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.acess__btn[data-tip]::before {
  content: "";
  position: absolute;
  top: calc(100% + 2px);
  right: 14px;
  z-index: 60;
  border: 6px solid transparent;
  border-bottom-color: #1c1c1c;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.acess__btn[data-tip]:hover::after,
.acess__btn[data-tip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.acess__btn[data-tip]:hover::before,
.acess__btn[data-tip]:focus-visible::before { opacity: 1; }

/* ===================================================================
   ALTO CONTRASTE — vale nas telas de login (CPF, senha, sucesso).
   A tela inicial continua com a arte original.
   =================================================================== */
body.alto-contraste .cpf-screen,
body.alto-contraste .ok-screen { background: #000; }

/* A logo perde o contorno branco e vira monocromática legível */
body.alto-contraste .cpf-screen .logo {
  -webkit-text-stroke: 0;
  filter: none;
}
body.alto-contraste .cpf-screen .logo > span { color: var(--amarelo); }

body.alto-contraste .cpf-title,
body.alto-contraste .cpf-label,
body.alto-contraste .cpf-desc,
body.alto-contraste .cpf-desc strong,
body.alto-contraste .outras__titulo,
body.alto-contraste .opcao__txt,
body.alto-contraste .conta-info__rot,
body.alto-contraste .conta-info__cpf,
body.alto-contraste .ok-titulo,
body.alto-contraste .ok-txt,
body.alto-contraste .ok-txt strong { color: #fff; }

body.alto-contraste .opcao,
body.alto-contraste .opcao__ic,
body.alto-contraste .ajuda__link,
body.alto-contraste .ajuda__termo,
body.alto-contraste .link-texto { color: var(--amarelo); }
body.alto-contraste .opcao { border-color: #555; }
body.alto-contraste .opcao__badge { background: var(--amarelo); color: #000; }

body.alto-contraste .cpf-screen .btn-govbr,
body.alto-contraste .ok-screen .btn-govbr {
  background: var(--amarelo);
  color: #000;
  border: 2px solid var(--amarelo);
  box-shadow: none;
}
/* Hover/foco NUNCA vira branco: mantém amarelo (um tom mais claro) com texto preto */
body.alto-contraste .cpf-screen .btn-govbr:hover,
body.alto-contraste .ok-screen .btn-govbr:hover,
body.alto-contraste .cpf-screen .btn-govbr:focus-visible,
body.alto-contraste .ok-screen .btn-govbr:focus-visible {
  background: #ffdd4a;
  color: #000;
  border-color: #ffdd4a;
}
body.alto-contraste .cpf-screen .btn-govbr:disabled {
  background: #000;
  color: #999;
  border-color: #999;
}

body.alto-contraste .cpf-header { border-bottom: 2px solid var(--amarelo); }
body.alto-contraste .cpf-back,
body.alto-contraste .olho {
  background: #000;
  border: 2px solid var(--amarelo);
  color: var(--amarelo);
}
body.alto-contraste .cpf-back:hover,
body.alto-contraste .olho:hover { background: #222; }

/* Botões de acessibilidade (ícone): contorno amarelo, hover/ativo legíveis */
body.alto-contraste .acess__btn {
  background: #000;
  border: 2px solid var(--amarelo);
  color: var(--amarelo);
}
/* Hover só escurece o fundo — o ícone CONTINUA amarelo, nunca branco */
body.alto-contraste .acess__btn:hover { background: #2a2a2a; color: var(--amarelo); }
body.alto-contraste .acess__btn:active { background: #2a2a2a; color: var(--amarelo); }
/* Ligado: amarelo sólido com ícone preto, e o hover mantém esse esquema */
body.alto-contraste .acess__btn[aria-pressed="true"] { background: var(--amarelo); color: #000; }
body.alto-contraste .acess__btn[aria-pressed="true"]:hover { background: #ffd733; color: #000; }
body.alto-contraste .acess__btn[data-tip]::after { background: var(--amarelo); color: #000; }
body.alto-contraste .acess__btn[data-tip]::before { border-bottom-color: var(--amarelo); }

body.alto-contraste .campo {
  background: #000;
  border: 2px solid var(--amarelo);
}
body.alto-contraste .campo__rotulo,
body.alto-contraste .campo__input { color: #fff; }
body.alto-contraste .campo__input::placeholder { color: #bbb; }

/* Campo "ativo" (digitando/focado): no modo normal fica amarelo com texto escuro.
   No alto contraste isso deixava o texto ESCURO no fundo preto (quase invisível).
   Aqui mantemos fundo preto e texto branco, com um leve brilho amarelo de foco. */
body.alto-contraste .campo.campo--ativo {
  background: #000;
  border-color: var(--amarelo);
  box-shadow: 0 0 0 2px rgba(255, 205, 7, 0.35);
}
body.alto-contraste .campo.campo--ativo .campo__input { color: #fff; }
body.alto-contraste .campo.campo--ativo .campo__input::placeholder { color: #bbb; }

body.alto-contraste .cpf-erro { color: #ff9d7a; }
body.alto-contraste .ok-check { background: var(--amarelo); color: #000; }

/* ---- Opções de identificação: hover/foco escurece (NUNCA branco) ---- */
body.alto-contraste .opcao { border-bottom-color: #555; }
body.alto-contraste .opcao:hover { background: #161616; }
body.alto-contraste .opcao:focus-visible { outline-color: var(--amarelo); }

/* ---- Botão secundário (Cancelar) ---- */
body.alto-contraste .btn-secundario {
  background: #000;
  color: var(--amarelo);
  border-color: var(--amarelo);
}
body.alto-contraste .btn-secundario:hover { background: #2a2a2a; color: var(--amarelo); }

/* ---- Olho da senha: hover mantém amarelo ---- */
body.alto-contraste .olho:hover { color: var(--amarelo); }

/* ---- Links de texto ---- */
body.alto-contraste .link-recuperar,
body.alto-contraste .duvidas { color: var(--amarelo); }
body.alto-contraste .link-recuperar:hover,
body.alto-contraste .duvidas:hover { color: #ffdd4a; }

/* ---- Cartão da tela de senha: fundo preto, borda amarela ---- */
body.alto-contraste .senha-cartao {
  background: #000;
  border-color: var(--amarelo);
  box-shadow: none;
}
body.alto-contraste .senha-titulo,
body.alto-contraste .senha-rotulo,
body.alto-contraste .senha-cpf,
body.alto-contraste .senha-label { color: #fff; }

/* ---- Tela de Termo de Uso ---- */
body.alto-contraste .cpf-header__titulo,
body.alto-contraste .termo-h1,
body.alto-contraste .termo-h2,
body.alto-contraste .termo-body p,
body.alto-contraste .termo-body p strong { color: #fff; }
body.alto-contraste .termo-meta { color: #cfcfcf; }
body.alto-contraste .termo-nota { background: #111; color: #ddd; }

/* ===================================================================
   ALTO CONTRASTE — MODAIS (manutenção, recuperar senha, ajuda)
   Antes ficavam com cartão branco; agora seguem o tema preto/amarelo.
   =================================================================== */
body.alto-contraste .modal { background: rgba(0, 0, 0, 0.7); }
body.alto-contraste .modal__card {
  background: #000;
  border: 2px solid var(--amarelo);
  box-shadow: none;
}
body.alto-contraste .modal__titulo,
body.alto-contraste .modal__txt,
body.alto-contraste .modal__txt strong,
body.alto-contraste .campo-label-ext { color: #fff; }

/* Ícones redondos dos modais: contorno amarelo */
body.alto-contraste .modal__ic {
  background: #000;
  border: 2px solid var(--amarelo);
  color: var(--amarelo);
}

/* Botão principal dos modais (fica FORA de .cpf-screen, então precisa de regra própria) */
body.alto-contraste .modal .btn-govbr {
  background: var(--amarelo);
  color: #000;
  border: 2px solid var(--amarelo);
  box-shadow: none;
}
body.alto-contraste .modal .btn-govbr:hover,
body.alto-contraste .modal .btn-govbr:focus-visible {
  background: #ffdd4a;
  color: #000;
  border-color: #ffdd4a;
}

/* Passo a passo (ajuda) */
body.alto-contraste .passo__n { background: var(--amarelo); color: #000; }
body.alto-contraste .passo__txt,
body.alto-contraste .passo__txt strong { color: #fff; }

/* Caixa de aviso (ajuda) */
body.alto-contraste .aviso-box {
  background: #1a1400;
  border-color: var(--amarelo);
  color: #ffe9a6;
}
body.alto-contraste .aviso-box strong { color: #fff; }
body.alto-contraste .aviso-box__ic { background: var(--amarelo); color: #000; }

/* Selo "?" da ajuda: amarelo com "?" preto (antes ficava azul) */
body.alto-contraste .ajuda__q { background: var(--amarelo); color: #000; }

/* A TELA DE QR (leitor de câmera) NÃO segue o alto contraste — é sempre a
   câmera real. Por isso não há regras body.alto-contraste para ela aqui. */

/* ===================================================================
   TELA DE CPF
   =================================================================== */
.cpf-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--branco);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s ease;
}
.cpf-screen.is-open {
  transform: translateX(0);
  visibility: visible;
}

.cpf-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  padding-top: calc(14px + env(safe-area-inset-top));
}
.cpf-back {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #eef1f5;
  color: var(--azul);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.cpf-back:hover { background: #e2e7ee; }
.cpf-back:active { transform: scale(0.94); }
.cpf-back:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

.logo--sm {
  font-size: 26px;
  filter: none;              /* sem sombra em fundo branco */
  -webkit-text-stroke: 0;    /* fundo branco: cores exatas, sem contorno */
}

.cpf-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;          /* rola quando o conteúdo passa da tela */
  display: flex;
  flex-direction: column;
  padding: 8px 24px 24px;
}
.cpf-title {
  font-size: 20px;
  font-weight: 600;
  color: #1c1c1c;
  margin-bottom: 26px;
}
.cpf-label {
  font-size: 17px;
  font-weight: 700;
  color: #1c1c1c;
}
.cpf-desc {
  font-size: 14px;
  color: #555;
  margin: 6px 0 20px;
}
.cpf-desc strong { font-weight: 700; }

/* Campo com rótulo flutuante, como no gov.br */
.campo {
  position: relative;
  border: 1px solid #909599;
  border-radius: 6px;
  padding: 18px 14px 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.campo:focus-within {
  border-color: var(--azul);
  box-shadow: 0 0 0 2px rgba(19, 81, 180, 0.18);
}
.campo--erro { border-color: #d04012; }
/* Campo sem rótulo flutuante: só a caixa + placeholder, padding equilibrado */
.campo--simples { padding: 13px 14px; }
.campo__rotulo {
  position: absolute;
  top: 5px;
  left: 14px;
  font-size: 12px;
  color: #555;
}
.campo__input {
  width: 100%;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  font-size: 17px;
  color: #1c1c1c;
  letter-spacing: 0.4px;
}
.campo__input::placeholder { color: #9aa0a6; letter-spacing: normal; }

/* Fundo amarelo quando o usuário digita/foca (CPF e senha) */
.campo.campo--ativo {
  background: #fdf3c4;
  border-color: #1c1c1c;
  box-shadow: none;
}
.campo.campo--ativo .campo__input { color: #1c1c1c; }
.campo.campo--ativo .campo__input::placeholder { color: #8a7a2e; }

.cpf-erro {
  min-height: 20px;
  margin-top: 8px;
  font-size: 13px;
  color: #d04012;
}

.cpf-continuar {
  margin-top: 22px;
  align-self: center;
}
.cpf-continuar:disabled {
  background: #c9ced4;
  box-shadow: none;
  cursor: not-allowed;
}

/* ---- Campo de senha (com botão de olho) ---- */
.campo--senha { display: flex; align-items: center; padding: 13px 14px; }
.campo--senha .campo__input { flex: 1 1 auto; }
.olho {
  flex: 0 0 auto;
  border: none;
  background: none;
  color: #666;
  cursor: pointer;
  /* Área de toque de 44x44 (mínimo da Apple HIG). Tinha 27x23 — o botão
     de mostrar a senha era o menor alvo da tela de login. Os margens
     negativos absorvem o crescimento: o ícone não muda de lugar. */
  min-width: 44px; min-height: 44px;
  margin: -11px -8px -11px 0;
  padding: 0 2px;
  display: inline-flex; align-items: center; justify-content: center;
}
.olho:hover { color: var(--azul); }
.olho:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 4px; }

/* Um ícone por vez: por padrão (senha oculta) mostra o olho FECHADO.
   Ao clicar (aria-pressed="true" = senha visível) mostra o olho ABERTO. */
.olho .olho-ic--aberto { display: none; }
.olho[aria-pressed="true"] .olho-ic--fechado { display: none; }
.olho[aria-pressed="true"] .olho-ic--aberto { display: inline-flex; }

/* CPF exibido na tela de senha */
.conta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 22px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #f0f3f7;
}
.conta-info__rot { font-size: 12px; color: #555; }
.conta-info__cpf { font-size: 16px; color: #1c1c1c; letter-spacing: 0.4px; }

/* Links de texto (esqueci a senha) */
.link-texto {
  align-self: flex-start;
  margin-top: 14px;
  border: none;
  background: none;
  color: var(--azul);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
}
.link-texto:hover { text-decoration: underline; }

/* ===================================================================
   OUTRAS OPÇÕES DE IDENTIFICAÇÃO
   =================================================================== */
.outras {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid #dfe3e8;
}
.outras__titulo {
  font-size: 16px;
  font-weight: 600;
  color: #1c1c1c;
  margin-bottom: 6px;
}
.outras__lista { list-style: none; }
.opcao {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  border: none;
  border-bottom: 1px solid #eceef1;
  background: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #1c1c1c;
  cursor: pointer;
  text-align: left;
}
.opcao:hover { background: #f6f8fa; }
.opcao:focus-visible { outline: 2px solid var(--azul); outline-offset: -2px; }
.opcao__ic { flex: 0 0 28px; display: inline-flex; justify-content: center; color: #333; }
.opcao__img { display: block; }
.opcao__txt { flex: 1 1 auto; }
.opcao--banco { color: #1f8b4c; }
.opcao--banco .opcao__ic { color: #1f8b4c; }
.opcao--qr .opcao__ic { color: var(--azul); }
.opcao--cert .opcao__ic { color: #16305e; }
.opcao--nuvem .opcao__ic { color: var(--azul); }
.opcao__badge {
  flex: 0 0 auto;
  background: #168821;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 4px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.ajuda {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.ajuda__link, .ajuda__termo {
  border: none;
  background: none;
  color: var(--azul);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
}
.ajuda__link { display: inline-flex; align-items: center; gap: 8px; }
.ajuda__link:hover, .ajuda__termo:hover { text-decoration: underline; }
.ajuda__q {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--azul);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* ===================================================================
   TELA DE SUCESSO (área logada)
   =================================================================== */
.ok-screen {
  position: absolute;
  inset: 0;
  z-index: 35;
  background: var(--branco);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s ease;
}
.ok-screen.is-open { transform: translateX(0); visibility: visible; }
.ok-card { text-align: center; max-width: 320px; }
.ok-check {
  width: 84px; height: 84px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: #168821;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ok-titulo { font-size: 24px; font-weight: 700; color: #1c1c1c; margin-bottom: 10px; }
.ok-txt { font-size: 16px; color: #444; }
.ok-cpf { font-size: 15px; color: #777; margin: 6px 0 28px; }
.ok-screen .btn-govbr { width: 100%; max-width: 320px; }

/* ===================================================================
   MODAIS (manutenção, recuperar senha, ajuda)
   =================================================================== */
.modal {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__card {
  width: 100%;
  max-width: 340px;
  max-height: 88%;
  overflow-y: auto;
  background: var(--branco);
  border-radius: 16px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}
.modal.is-open .modal__card { transform: translateY(0) scale(1); }
.modal__card--largo { max-width: 360px; text-align: left; }

.modal__ic {
  width: 62px; height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.modal__ic--manut { background: #fff4d6; color: #b8860b; }
.modal__ic--info  { background: #e7effb; color: var(--azul); }
.modal__ic--ok    { background: #e4f3e6; color: var(--verde); }

.modal__titulo { font-size: 20px; font-weight: 700; color: #1c1c1c; margin-bottom: 8px; }
.modal__titulo--esq { text-align: left; }
.modal__txt { font-size: 15px; color: #555; line-height: 1.5; margin-bottom: 22px; }
.modal__txt--esq { text-align: left; }
.modal__txt strong { color: #1c1c1c; font-weight: 700; }
.modal__ok { width: 100%; }

.campo--modal { text-align: left; margin-bottom: 4px; }
/* Rótulo fora da caixa (acima), como o padrão de senha */
.campo-label-ext { display: block; text-align: left; font-size: 14px; font-weight: 600; color: #333; margin-bottom: 6px; }

/* ---- Passo a passo (ajuda) ---- */
.passos { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.passo { display: flex; align-items: flex-start; gap: 12px; }
.passo__n {
  flex: 0 0 26px; width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--azul); color: #fff;
  font-size: 14px; font-weight: 700;
}
.passo__txt { font-size: 15px; color: #333; line-height: 1.45; }
.passo__txt strong { font-weight: 700; color: #1c1c1c; }

.aviso-box {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff8e1; border: 1px solid #f4d67a; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 20px;
  font-size: 14px; color: #5a4600; line-height: 1.45;
}
.aviso-box__ic {
  flex: 0 0 22px; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #f0b400; color: #fff;
  font-size: 14px; font-weight: 800;
}

/* ===================================================================
   "Ficou com dúvidas?" e "Esqueci minha senha"
   =================================================================== */
.rodape-duvidas { margin-top: auto; padding-top: 26px; text-align: center; }
.duvidas, .link-recuperar {
  border: none; background: none; color: var(--azul);
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; text-decoration: underline; padding: 6px 4px;
}
.duvidas:hover, .link-recuperar:hover { color: var(--azul-escuro); }
.duvidas:focus-visible, .link-recuperar:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 4px; }
.link-recuperar { display: block; margin: 16px auto 0; }

/* ===================================================================
   TELA DE SENHA — cartão equilibrado (imagem de referência)
   =================================================================== */
.senha-body { padding: 8px 24px 24px; }
.senha-cartao {
  background: var(--branco);
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  padding: 22px 20px 24px;
}
.senha-titulo { font-size: 21px; font-weight: 700; color: #1c1c1c; margin-bottom: 18px; }
.senha-rotulo { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 2px; }
.senha-cpf { font-size: 17px; font-weight: 700; color: #1c1c1c; letter-spacing: 0.3px; margin-bottom: 18px; }
.senha-label { display: block; font-size: 15px; font-weight: 600; color: #333; margin-bottom: 8px; }

/* Botões lado a lado: Cancelar (contorno) + Entrar (azul) */
.botoes-linha { display: flex; gap: 12px; margin-top: 20px; }
.botoes-linha .btn-govbr,
.botoes-linha .btn-secundario { flex: 1 1 0; margin: 0; max-width: none; }
.btn-secundario {
  border: 2px solid var(--azul);
  border-radius: 999px;
  background: var(--branco);
  color: var(--azul);
  font-family: inherit; font-size: 17px; font-weight: 600;
  padding: 14px 18px; cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn-secundario:hover { background: #eaf1fb; }
.btn-secundario:active { transform: scale(0.98); }
.btn-secundario:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }

/* ===================================================================
   AVISO: EM MANUTENÇÃO
   =================================================================== */
/* ===================================================================
   TELA: TERMO DE USO E AVISO DE PRIVACIDADE
   =================================================================== */
.termo-screen { z-index: 58; } /* acima da tela de info (50), senão abre atrás */
.cpf-header__titulo { font-size: 17px; font-weight: 700; color: #1c1c1c; }
.termo-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 6px 24px 28px;
}
.termo-h1 { font-size: 21px; font-weight: 700; color: #1c1c1c; margin-bottom: 4px; }
.termo-meta { font-size: 13px; color: #888; margin-bottom: 18px; }
.termo-body p { font-size: 14.5px; color: #444; line-height: 1.6; margin-bottom: 12px; }
.termo-h2 { font-size: 16px; font-weight: 700; color: #1c1c1c; margin: 18px 0 6px; }
.termo-nota {
  margin-top: 20px; padding: 12px 14px;
  background: #f4f6f9; border-radius: 8px;
  font-size: 13px; color: #666; font-style: italic;
}
.termo-ok { margin: 22px auto 0; }

/* ===================================================================
   TELA DE LEITURA DE QR CODE
   =================================================================== */
.qr-screen {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: #000;                  /* fundo preto (câmera cobre por cima) */
  transform: translateX(100%);       /* fora da tela (entra pela direita) */
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s ease;
}
.qr-screen.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* Barra azul do topo com o título "QR Code" */
.qr-header {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  background: var(--azul);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
  min-height: 56px;
}
.qr-title {
  color: var(--branco);
  font-size: 18px;
  font-weight: 600;
}

/* Botão voltar translúcido */
.qr-back {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.qr-back:hover { background: rgba(255, 255, 255, 0.28); }
.qr-back:active { transform: scale(0.94); }
.qr-back:focus-visible { outline: 2px solid var(--branco); outline-offset: 2px; }

/* Corpo = a câmera real; conteúdo centralizado por cima */
.qr-body {
  position: relative;
  flex: 1 1 auto;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 64px;
}

/* Vídeo da câmera cobrindo o corpo (fundo do leitor) */
.qr-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  z-index: 0;
}

/* Leitor: só a moldura + rótulo, por cima da câmera */
.qr-scan {
  position: relative;
  z-index: 1;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  width: auto;
  max-width: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Moldura RETA (sem curva): interior transparente mostrando a câmera */
.qr-viewport {
  position: relative;
  width: min(66vw, 250px);
  height: min(66vw, 250px);
  background: transparent;
  /* escurece a câmera fora da área de leitura */
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45);
}
.qr-viewport__canto {
  position: absolute;
  width: 42px; height: 42px;
  border: 4px solid #fff;
}
.qr-viewport__canto--tl { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.qr-viewport__canto--tr { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.qr-viewport__canto--bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.qr-viewport__canto--br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }

/* Linha de varredura sutil (sweep branco) */
.qr-viewport__linha {
  position: absolute;
  left: 4px; right: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.5);
  animation: qr-varredura 2.4s ease-in-out infinite;
}
@keyframes qr-varredura {
  0%   { top: 6px; }
  50%  { top: calc(100% - 8px); }
  100% { top: 6px; }
}

/* Rótulo abaixo da moldura */
.qr-scan__label {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* "Nenhum QR encontrado": cartão escuro CENTRALIZADO por cima da câmera */
.qr-expirado {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: min(86%, 320px);
  background: rgba(18, 18, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  padding: 28px 24px 24px;
  text-align: center;
}
.qr-expirado__ic {
  width: 60px; height: 60px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.qr-expirado__titulo { font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.qr-expirado__txt { font-size: 14px; color: #cfcfcf; line-height: 1.45; margin-bottom: 20px; }
.qr-expirado .btn-govbr { width: 100%; margin: 0; max-width: none; }

/* "QR Code lido": mesmo cartão escuro centralizado, com ✓ verde */
.qr-encontrado {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  width: min(86%, 320px);
  background: rgba(18, 18, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  padding: 28px 24px 24px;
  text-align: center;
}
.qr-encontrado__ic {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%;
  background: #168821; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.qr-encontrado__titulo { font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.qr-encontrado__txt {
  font-size: 13px; color: #cfcfcf; line-height: 1.45; margin-bottom: 20px;
  word-break: break-all;
}
.qr-encontrado .btn-govbr { width: 100%; margin: 0 0 10px; max-width: none; }
.qr-encontrado .btn-secundario {
  width: 100%; max-width: none; background: transparent; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.qr-encontrado .btn-secundario:hover { background: rgba(255, 255, 255, 0.1); }

/* ===================================================================
   TOAST (aviso rápido) — feedback de ações no app
   =================================================================== */
.toast-wrap {
  position: absolute; left: 0; right: 0;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 70;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0 16px; pointer-events: none;
}
.toast {
  max-width: 340px;
  background: #1f2a3a; color: #fff;
  font-size: 13.5px; font-weight: 600; line-height: 1.35;
  padding: 12px 16px; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex; align-items: center; gap: 9px;
  opacity: 0; transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.is-show { opacity: 1; transform: translateY(0); }
.toast--ok { background: #16794a; }
.toast--erro { background: #b23a2f; }
.toast__ic { flex: 0 0 auto; display: inline-flex; }

/* ===================================================================
   TELA DE SUCESSO — botões Acessar / Sair
   =================================================================== */
.ok-hora { font-size: 13px; color: #777; margin: 2px 0 0; }
.ok-screen .ok-btn { width: 100%; max-width: 320px; }
.ok-screen .btn-secundario.ok-btn { margin-top: 12px; }

/* ===================================================================
   APP — ÁREA LOGADA (Início, Dados, Carteira, Menu + barra inferior)
   =================================================================== */
.app-screen {
  position: absolute;
  inset: 0;
  z-index: 38;
  background: #eef0f4;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
}
.app-screen.is-open { transform: translateX(0); visibility: visible; }

.app-view {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
}
.app-view.is-active { display: flex; }

/* Topo branco (logo + perfil) */
.app-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  padding-top: calc(14px + env(safe-area-inset-top));
  background: #fff;
}
.app-perfil {
  position: relative;
  border: none; background: none;
  color: var(--azul); cursor: pointer;
  display: inline-flex; padding: 0;
  border-radius: 50%;
}
.app-perfil__avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eef2f8;
  border: 2px solid #d7e0ee;
  overflow: hidden;
  color: var(--azul);
}
.app-perfil__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-perfil__cam {
  position: absolute; right: -3px; bottom: -3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--azul); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  box-sizing: border-box;
}
.app-perfil__cam svg { display: block; width: 11px; height: 11px; }

/* --- Telas de conteúdo (Agenda, Caixa Postal, Privacidade, Segurança) --- */
.info-screen { z-index: 50; } /* acima do app (38) e da barra (12) */
/* Alto contraste: NÃO deixa as telas de conteúdo virarem preto (herança do
   .cpf-screen). Dupla classe vence a regra de fundo preto do login. */
body.alto-contraste .info-screen.info-screen { background: #eef1f5; }
body.alto-contraste .info-screen .cpf-header { background: #fff; border-bottom: 1px solid #e6e8ec; }
body.alto-contraste .info-screen .cpf-header__titulo,
body.alto-contraste .info-screen .cpf-back { color: #1351b4; }
body.alto-contraste .cpf-label__ic { color: #ffcd07; }
body.alto-contraste .cpf-minirotulo { color: #fff; }
.info-body { flex: 1 1 auto; overflow-y: auto; padding: 16px 16px 40px; }
.info-hero { text-align: center; padding: 8px 0 14px; }
.info-hero__ic {
  width: 66px; height: 66px; border-radius: 50%;
  background: #eef2f8; color: var(--azul);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.info-hero__ic svg { width: 32px; height: 32px; }
.info-hero__txt { color: #55637a; font-size: 13.5px; line-height: 1.45; max-width: 300px; margin: 0 auto; }
.info-vazio { text-align: center; color: #7a8494; font-size: 14px; padding: 26px 12px; border: 1px dashed #d3dcea; border-radius: 12px; }
.info-item { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid #eef1f5; }
.info-item:last-child { border-bottom: none; }
.info-item__txt { flex: 1; }
.info-item__tit { font-weight: 600; font-size: 14.5px; }
.info-item__sub { color: #7a8494; font-size: 12.5px; margin-top: 2px; }
.info-switch { width: 44px; height: 26px; border-radius: 20px; background: #cfd6df; position: relative; border: none; flex: 0 0 auto; transition: background .18s; }
.info-switch[aria-checked="true"] { background: var(--verde); }
.info-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .18s; }
.info-switch[aria-checked="true"]::after { transform: translateX(18px); }

/* ===================================================================
   NÍVEIS — o que cada conta enxerga.
   ouro  : tudo + Face ID + aparelhos ilimitados
   prata : tudo, sem Face ID, 1 aparelho
   bronze: só Dados + Carteira + Segurança, sem Face ID, 1 aparelho
   =================================================================== */
/* Bronze: esconde Agenda, Caixa Postal, Assinar e Privacidade. */
body.nivel-bronze [data-info="agenda"],
body.nivel-bronze [data-info="caixa"],
body.nivel-bronze [data-info="assinar"],
body.nivel-bronze [data-info="privacidade"] { display: none !important; }
/* Face ID no menu só para Ouro. */
body:not(.nivel-ouro) #cfgBiometria { display: none !important; }

/* --- Tela de CPF: ícone pequeno inline antes de "Número do CPF" --- */
.cpf-label__ic { color: var(--azul); margin-right: 6px; }
.cpf-label__ic svg { width: 17px; height: 17px; vertical-align: -3px; }
.cpf-minirotulo { display: block; font-size: 12px; font-weight: 700; color: #4a5563; margin: 4px 2px 6px; }

/* --- Botões em coluna (menu de ações do documento) --- */
.botoes-col { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

/* --- Tela de desbloqueio por Face ID: MESMO visual da tela inicial (arte
   bg.jpg com o gov.br), com o botão azul na área branca de baixo. --- */
.face-lock {
  position: absolute; inset: 0; z-index: 55;
  display: none; flex-direction: column; justify-content: flex-end;
  padding: 0 24px calc(26px + env(safe-area-inset-bottom));
  color: #1f2a3a;
  /* Mesma arte de fundo da home (bg.jpg): pessoas + logo gov.br. */
  background-color: var(--fundo);
  background-image: url("../bg.jpg");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.face-lock.is-open { display: flex; }
.face-lock__acoes {
  width: 100%; max-width: 340px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.face-lock__ola {
  font-size: 15px; font-weight: 600; color: #33405a;
  text-align: center; margin: 0 0 2px;
}
/* Herda o botão azul da home (.btn-govbr); só acrescenta o ícone de rosto. */
.face-lock__btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.face-lock__btn:disabled { opacity: .75; cursor: progress; }
.face-lock__btnic { width: 22px; height: 22px; flex: 0 0 auto; }
.face-lock__senha { color: var(--azul); }
.face-lock__erro { min-height: 16px; margin: 2px 0 0; font-size: 13.5px; color: #c0392b; font-weight: 600; text-align: center; }

/* Anti-flash: biometria ativa esconde TUDO e mostra só o cadeado já no
   primeiro paint. A tela normal nunca aparece antes (nem depois). */
html[data-bio="1"] .phone > *:not(#faceLock) { visibility: hidden !important; }
html[data-bio="1"] #faceLock { display: flex !important; visibility: visible !important; }

/* --- Foto do usuário na aba Dados pessoais --- */
.dados-foto { display: flex; justify-content: center; padding: 18px 0 4px; }
.dados-foto__wrap {
  width: 104px; height: 104px; border-radius: 50%;
  background: #eef2f8; border: 3px solid #d7e0ee;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: var(--azul);
}
.dados-foto__img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- Editor de avatar (arrastar para posicionar + zoom) --- */
.avatar-view {
  width: 240px; height: 240px; max-width: 72vw; max-height: 72vw;
  border-radius: 50%; overflow: hidden; position: relative;
  margin: 8px auto 16px; background: #eef2f8;
  touch-action: none; cursor: grab; box-shadow: inset 0 0 0 3px rgba(19,81,180,.12);
}
.avatar-view:active { cursor: grabbing; }
.avatar-view img {
  position: absolute; left: 50%; top: 50%;
  will-change: transform; user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.avatar-zoom { width: 100%; margin: 2px 0 18px; accent-color: var(--azul); }
.app-perfil:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }

/* Sub-cabeçalho azul (Carteira, Dados, Menu) */
.app-subheader {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--azul-escuro);
  color: #fff;
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  min-height: 54px;
}
.app-subheader__titulo { font-size: 16px; font-weight: 700; }
.app-subheader__back {
  position: absolute;
  left: 10px; bottom: 8px;
  width: 38px; height: 38px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.app-subheader__back:hover { background: rgba(255, 255, 255, 0.28); }

/* Área rolável de cada aba */
.app-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 14px 92px;
}
.app-scroll--carteira { display: flex; flex-direction: column; }

/* Menu = aba deslizante (bottom sheet) com as Configurações gov.br */
.menu-backdrop {
  position: absolute; inset: 0;
  z-index: 7;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0; visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.menu-backdrop.is-open { opacity: 1; visibility: visible; }

.menu-sheet {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  z-index: 8;
  width: 82%; max-width: 330px;
  background: #fff;
  border-radius: 0 20px 20px 0;
  box-shadow: 10px 0 34px rgba(0, 0, 0, 0.22);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex; flex-direction: column;
}
.menu-sheet.is-open { transform: translateX(0); }
.menu-sheet__grip { display: none; }
.menu-sheet__scroll {
  flex: 1 1 auto; overflow-y: auto;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.config-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 20px 16px;
  padding-top: calc(20px + env(safe-area-inset-top));
  border-bottom: 1px solid #e6e8ec;
}
.config-logo {
  display: block;
  font-family: "Rawline", "Raleway", Arial, sans-serif;
  font-weight: 800; font-size: 26px; letter-spacing: -0.5px;
  color: var(--azul-escuro); line-height: 1;
}
.config-top__ver { display: block; margin-top: 6px; font-size: 12.5px; color: #9098a3; }
.config-x {
  border: none; background: none; cursor: pointer;
  color: var(--azul-escuro); padding: 2px;
  /* Fechar do menu tinha 28x28. Cresce a área, não o ícone. */
  min-width: 44px; min-height: 44px;
  margin: 2px -10px 0 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.config-x:hover { opacity: 0.7; }

.config-lista { list-style: none; margin: 0; padding: 6px 0; }
.config-item {
  width: 100%;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border: none; background: none; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.3;
  color: var(--azul-escuro);
  text-align: left;
}
.config-item:hover { background: #f5f7fa; }
.config-item__ic { flex: 0 0 auto; display: inline-flex; color: var(--azul-escuro); }
.config-item__txt { flex: 1 1 auto; }

/* Interruptor (toggle) da biometria */
.switch {
  flex: 0 0 auto;
  width: 42px; height: 24px; border-radius: 999px;
  background: #c9ced6; position: relative;
  transition: background 0.2s ease;
}
.switch__dot {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.config-item[aria-checked="true"] .switch { background: #168821; }
.config-item[aria-checked="true"] .switch__dot { transform: translateX(18px); }

/* Banner "nível ouro" */
.hero-nivel {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  /* Foto (banner azul) à direita + degradê escuro à esquerda p/ o texto */
  background:
    linear-gradient(90deg, rgba(7, 26, 74, 0.42) 0%, rgba(7, 26, 74, 0.12) 42%, rgba(7, 26, 74, 0) 66%),
    url("../assets/banner.jpg") center / cover no-repeat,
    #0b2663;
  color: #fff;
  padding: 18px 16px 16px;
  margin-bottom: 16px;
  min-height: 124px;
}
.hero-nivel__ola { font-size: 20px; font-weight: 600; line-height: 1.12; }
.hero-nivel__ola strong { font-weight: 600; text-transform: uppercase; }
.hero-nivel__nivel { font-size: 13.5px; font-weight: 700; letter-spacing: 0.3px; margin-top: 5px; text-transform: uppercase; }
.hero-nivel__barra { display: flex; gap: 7px; margin: 16px -16px 0; transform: skewX(-20deg); }
.hero-nivel__barra i { flex: 1; height: 7px; background: var(--amarelo); }
.hero-nivel__foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.hero-nivel__ver {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--azul);
  border: none; border-radius: 999px;
  font-family: inherit; font-size: 12px; font-weight: 700;
  padding: 7px 14px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Busca */
.busca {
  position: relative;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}
.busca__input {
  width: 100%;
  border: none; outline: none; background: none;
  font-family: inherit; font-size: 14px; color: #333;
  padding: 14px 46px 14px 16px;
}
.busca__input::placeholder { color: #8a9099; font-style: italic; }
.busca__ic {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  color: #6b7280; display: inline-flex;
}

/* Cartões com listas (Serviços / Minha conta / Menu) */
.cartao-lista {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  padding: 4px 14px;
  margin-bottom: 16px;
}
.cartao-lista__titulo {
  font-size: 15px; font-weight: 700; color: #1c1c1c;
  padding: 13px 2px 6px;
}
.linha {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 2px;
  border: none; border-bottom: 1px solid #eef0f3;
  background: none; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 400; color: #1c1c1c;
  text-align: left;
}
.linha--sem-borda { border-bottom: 0; }
.linha:hover { background: #f7f9fb; }
.linha__ic { flex: 0 0 32px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: #0e3a73; }
.linha__txt { flex: 1 1 auto; }
.linha__seta { flex: 0 0 auto; color: var(--azul); display: inline-flex; }
.linha--azul { color: #0e3a73; }
.linha--azul .linha__ic { background: transparent; color: #0e3a73; }
.linha--sair { color: #c0392b; }
.linha--sair .linha__ic { background: transparent; color: #c0392b; }

.badge-nov {
  flex: 0 0 auto;
  background: #168821; color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
}
.badge-num {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #168821; color: #fff;
  font-size: 11px; font-weight: 800; border-radius: 50%;
}

/* Dados pessoais */
.dados-cartao { padding: 4px 16px 6px; }
.dados-cartao__titulo {
  font-size: 16px; font-weight: 600; color: #6b7280;
  padding: 14px 2px 8px;
}
.dado-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid #eef0f3;
}
.dado-row:last-child { border-bottom: 0; }
.dado-row__ic { flex: 0 0 24px; width: 24px; display: inline-flex; justify-content: center; color: #0e3a73; }
.dado-row__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dado-row__rot { font-size: 12.5px; color: var(--azul); }
.dado-row__val { font-size: 15px; font-weight: 700; color: #16213a; word-break: break-word; }
.tag-nivel {
  display: inline-block;
  font-size: 12px; font-weight: 800;
  padding: 2px 10px; border-radius: 999px;
}
.tag-nivel--ouro   { background: linear-gradient(120deg, #d4a017, #f0c040); color: #5a4600; }
.tag-nivel--prata  { background: linear-gradient(120deg, #9aa3ad, #c9d2da); color: #38414a; }
.tag-nivel--bronze { background: linear-gradient(120deg, #b06a34, #d99a63); color: #4a2a12; }

/* Carteira — cartão do documento */
.doc-lista {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.doc-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.09);
}
.doc-card__head {
  position: relative;
  display: flex; align-items: center; justify-content: flex-start;
  background: linear-gradient(180deg, #8adbd4 0%, #72cfc8 100%);
  padding: 26px 104px 26px 62px;
  min-height: 124px;
}
.doc-card__fold {
  position: absolute; top: 0; left: 0;
  width: 54px; height: 54px;
}
.doc-card__fold-tri {
  position: absolute; inset: 0;
  background: var(--amarelo);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.doc-card__fold-txt {
  position: absolute; top: 18px; left: 18px;
  transform: translate(-50%, -50%) rotate(-45deg);
  white-space: nowrap;
  font-size: 11px; font-weight: 800; color: #1c1c1c;
  letter-spacing: 0.5px;
}
.doc-card__nome {
  font-size: 15px; font-weight: 700; color: #16302d;
  text-align: left;
}
.doc-card__selo {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 100px; height: auto;
  opacity: 0.9;
  filter: brightness(0.32) contrast(1.15);
}
.doc-card__body { padding: 14px 16px 16px; }
.doc-card__rot { font-size: 12px; color: #7b828c; }
.doc-card__cpf { font-size: 17px; font-weight: 700; color: #1c1c1c; }
.doc-card { cursor: pointer; transition: transform 0.12s ease; }
.doc-card:active { transform: scale(0.99); }

/* ===================== VISUALIZADOR DE DOCUMENTO ===================== */
.doc-screen {
  position: absolute;
  inset: 0;
  z-index: 14; /* acima da barra inferior: visualizador em tela cheia */
  background: #eef1f5;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.doc-screen.is-open { opacity: 1; visibility: visible; }

.doc-screen__top {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  padding-top: calc(14px + env(safe-area-inset-top));
  background: #fff;
  border-bottom: 1px solid #e6e8ec;
}
.doc-screen__x {
  /* Fechar do visualizador tinha 34x34; o círculo do :active continua
     do mesmo tamanho visual porque só a caixa do botão cresceu. */
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; color: #444a52; cursor: pointer;
  border-radius: 50%;
}
.doc-screen__x:active { background: #eceff3; }

.doc-screen__badgewrap {
  flex: 0 0 auto;
  display: flex; justify-content: center;
  padding: 16px 16px 6px;
}
.doc-screen__badge {
  display: inline-block;
  max-width: 88%;
  background: #eac24a;
  color: #168821;
  font-size: 12px; font-weight: 600; letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.doc-carousel {
  flex: 1 1 auto;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x; /* deixa o swipe nativo do celular paginar (suave) */
  scrollbar-width: none;
}
.doc-carousel::-webkit-scrollbar { display: none; }
.doc-carousel.is-zoom {
  overflow: hidden;
  scroll-snap-type: none;
}

.docpage {
  position: relative;
  flex: 0 0 100%;
  min-width: 0; /* impede que uma face larga (imagem antes de girar) estique a página */
  scroll-snap-align: center;
  display: flex; align-items: center; justify-content: center;
  padding: 12px 18px;
  overflow: hidden;
}
.doc-face {
  width: 100%;
  max-width: 320px;
  transform-origin: center center;
  transition: transform 0.18s ease;
  touch-action: pan-x; /* toque na face não trava o swipe de página */
  will-change: transform;
}
.doc-face.is-zoom { cursor: grab; transition: transform 0.05s linear; touch-action: none; }
.doc-face.is-grab { cursor: grabbing; }

/* --- Face do documento (Carteira de Identidade Nacional) --- */
.cin {
  background: linear-gradient(160deg, #ffffff 0%, #eef4fb 100%);
  border: 1px solid #d3dcea;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(12, 50, 111, 0.18);
  font-size: 11px;
  color: #16213a;
}
.cin__top {
  background: linear-gradient(90deg, #0c326f 0%, #1351b4 100%);
  color: #fff;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
}
.cin__brasao {
  width: 26px; height: 26px; flex: 0 0 26px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.cin__top-txt { line-height: 1.25; }
.cin__pais { font-size: 8.5px; font-weight: 600; letter-spacing: 0.3px; opacity: 0.92; }
.cin__titulo { font-size: 10px; font-weight: 800; letter-spacing: 0.3px; }
.cin__faixa {
  height: 4px;
  background: linear-gradient(90deg, #168821 0%, #ffcd07 50%, #1351b4 100%);
}
.cin__body { padding: 12px; display: flex; gap: 12px; }
.cin__foto {
  flex: 0 0 74px; width: 74px; height: 94px;
  border-radius: 6px;
  background: linear-gradient(160deg, #c9d4e4, #aab9d0);
  display: flex; align-items: flex-end; justify-content: center;
  color: #6b7891; overflow: hidden;
}
.cin__foto svg { width: 66px; height: 66px; opacity: 0.75; }
.cin__campos { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.cin-campo__rot { font-size: 7.5px; font-weight: 700; color: #1351b4; letter-spacing: 0.4px; text-transform: uppercase; }
.cin-campo__val { font-size: 11px; font-weight: 700; color: #16213a; word-break: break-word; line-height: 1.2; }
.cin__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; padding: 0 12px 12px; }
.cin__body-verso { display: flex; align-items: flex-start; gap: 6px; padding-right: 10px; }
.cin__body-verso .cin__grid { flex: 1 1 auto; min-width: 0; }
.cin__qr {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding-top: 2px;
}
.cin__qr svg {
  width: 60px; height: 60px; display: block;
  background: #fff; border: 1px solid #e3e6ea; border-radius: 4px; padding: 3px;
}
.cin__qr-rot { font-size: 6.5px; font-weight: 700; color: #1351b4; letter-spacing: 0.3px; text-transform: uppercase; }
.cin__foot {
  border-top: 1px dashed #c3cee0;
  padding: 8px 12px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.cin__assinatura { font-family: "Segoe Script", "Comic Sans MS", cursive; font-size: 15px; color: #22303f; opacity: 0.85; }
.cin__mrz {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 9px; letter-spacing: 1px; color: #33465e;
  background: #f2f5fa; border-radius: 4px; padding: 4px 6px;
  word-break: break-all; line-height: 1.5;
}
.cin__verso-tag {
  text-align: center; font-size: 8px; font-weight: 700;
  color: #7b869a; letter-spacing: 1px; padding: 2px 0 8px;
}

.doc-screen__ctrls {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px 12px;
  background: #fff;
  border-top: 1px solid #e6e8ec;
}
.doc-ctrl {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: transparent; color: #0c326f; cursor: pointer;
}
.doc-ctrl:active { color: #1351b4; }
.doc-ctrl--opt {
  border: none;
  background: #168821; color: #fff;
  box-shadow: 0 3px 10px rgba(31, 157, 85, 0.35);
}
.doc-ctrl--opt:active { background: #12631a; }

.doc-dots {
  flex: 1 1 auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.doc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #c4cbd6; border: none; padding: 0; cursor: pointer;
  transition: background 0.18s ease, width 0.18s ease;
}
.doc-dot.is-active { background: #1351b4; width: 20px; border-radius: 999px; }

.btn-verde {
  width: 100%;
  border: none; border-radius: 999px;
  background: #168821; color: #fff;
  font-family: inherit; font-size: 16px; font-weight: 700;
  padding: 15px; cursor: pointer;
  box-shadow: 0 3px 12px rgba(31, 157, 85, 0.35);
  margin-top: 16px;
}
.btn-verde:hover { background: #12631a; }
.btn-verde:active { transform: scale(0.99); }

/* Barra inferior de navegação */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  /* acima da aba deslizante do Menu (z 8), para continuar clicável */
  z-index: 12;
  display: flex;
  background: #fff;
  border-top: 1px solid #e6e8ec;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar__item {
  flex: 1 1 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  border: none; background: none; cursor: pointer;
  padding: 9px 2px 8px;
  color: #7b828c; font-family: inherit; font-size: 11px; font-weight: 600;
}
.tabbar__item.is-active { color: var(--azul); }
.tabbar__item:active { transform: scale(0.96); }
.tabbar__item--qr { color: #7b828c; }
.tabbar__item--qr.is-active { color: #168821; }
.tabbar__qr {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #168821; color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-top: -2px; margin-bottom: 2px;
  border: none;
  box-shadow: 0 3px 9px rgba(31, 157, 85, 0.4);
}

/* --- Nome do usuário sem negrito (Olá, Fulano) --- */
.hero-nivel__ola strong,
#appNome { font-weight: 600; }

/* --- Anti-cópia: dificulta copiar dados/imagens do site (anti-fraude) --- */
body {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
/* Campos de entrada continuam selecionáveis para digitar normalmente. */
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
img { -webkit-user-drag: none; user-drag: none; }

/* --- Documento por imagem (frente/verso enviados pelo admin) --- */
.doc-imgwrap {
  width: 100%;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
/* Spinner que aparece atrás da imagem enquanto ela carrega. */
.doc-imgwrap::before {
  content: "";
  position: absolute; top: 50%; left: 50%; width: 36px; height: 36px;
  margin: -18px 0 0 -18px; border-radius: 50%;
  border: 3px solid #d3dcea; border-top-color: var(--azul);
  animation: docspin 0.8s linear infinite; z-index: 0;
}
/* Imagem resolvida (carregou ou falhou): o spinner some. Antes ele girava para
   sempre atrás do documento já carregado. */
.doc-imgwrap.is-pronta::before { content: none; display: none; animation: none; }
/* Aviso quando a imagem do documento não carrega — no lugar do spinner
   girando para sempre, que não dizia nada ao cidadão. */
.doc-falha {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 20px; text-align: center;
  background: #fff; border-radius: 12px;
}
.doc-falha__txt { font-size: 14px; color: #4b5563; margin: 0; max-width: 240px; }
.doc-falha__btn {
  border: 1px solid var(--azul); background: none; color: var(--azul);
  font: inherit; font-size: 15px; font-weight: 600;
  padding: 10px 22px; min-height: 44px; border-radius: 999px; cursor: pointer;
}
.doc-falha__btn:active { background: #eaf1fb; }
.doc-imgwrap .doc-img { position: relative; z-index: 1; }
@keyframes docspin { to { transform: rotate(360deg); } }
.doc-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(12, 50, 111, 0.18);
  display: block;
}
/* Face que contém imagem do documento: some com o limite de largura, pois a
   imagem é dimensionada por JS para caber girada (paisagem). */
.doc-face--img { width: auto; max-width: none; }

/* Página de imagem: o fundo claro passa a ter o tamanho exato da imagem, em vez de
   ocupar a página inteira. Documento cujo formato não bate com o da tela sobrava
   faixa branca ao redor; agora a sobra é a moldura neutra do visualizador e o claro
   termina onde a identidade termina. A imagem continua inteira — sem zoom, sem corte.

   A sobra usa o MESMO cinza claro do visualizador (#eef1f5). Antes era #12161c —
   quase preto — e a identidade aparecia dentro de uma moldura escura, que é
   exatamente o "fundo da identidade ficando preto" relatado. Nada de cor escura
   aqui: o documento tem que parecer um cartão sobre papel claro. */
.docpage--img { padding: 0; background: #eef1f5; }
/* Fundo branco que acompanha a imagem: mesma caixa da face, dimensionada por JS. */
.docpage--img .doc-imgwrap { background: #fff; border-radius: 12px; overflow: hidden; }
.docpage--img .doc-face { position: relative; z-index: 1; }

/* ===================================================================
   DOCUMENTO DIGITAL — 3ª página (QR de identificação, estilo gov.br)
   =================================================================== */
.docqr {
  width: 100%;
  background: transparent;
  padding: 6px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.docqr__badge {
  background: #eac24a;
  color: #168821;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 9px 18px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(242, 194, 0, 0.28);
}
.docqr__txt {
  color: #33475b;
  font-size: 11.5px;
  line-height: 1.45;
  margin: 16px 2px 18px;
}
.docqr__code {
  width: 86%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  margin: 22px 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.docqr__code svg,
.docqr__code img { width: 100%; height: 100%; object-fit: contain; display: block; }
.docqr__hint {
  color: #6a7787;
  font-size: 10.5px;
  line-height: 1.4;
  margin-top: 18px;
  max-width: 240px;
}

/* ===================================================================
   ACESSIBILIDADE — respeita "reduzir movimento"
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  .qr-screen, .app-screen { transition: none; }
  .qr-viewport__linha, .qr-scan__spin { animation: none; }
}
