/* Assinatura guiada New Life Net — público leigo: letra grande, um passo por tela, botões grandes. */
:root {
  --azul: #0b5cab; --azul-esc: #084684; --azul-claro: #e8f1fb; --verde: #12893a; --verde-claro: #e7f6ec;
  --vermelho: #c62828; --amarelo: #f5b400; --fundo: #f2f5f9; --cartao: #ffffff; --texto: #142233; --suave: #5a6775;
  --borda: #d9e1e8; --sombra: 0 1px 2px rgba(16, 42, 67, .06), 0 8px 24px rgba(16, 42, 67, .08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fundo); color: var(--texto); font: 18px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; background: linear-gradient(180deg, #e9f1fa 0, var(--fundo) 260px) no-repeat, var(--fundo); }

/* topo fixo com marca e progresso */
.topo { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 16px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); color: var(--azul-esc); font-size: 17px;
  border-bottom: 1px solid var(--borda); }
.topo > span { color: var(--suave); font-size: 14px; text-align: right; }
.topo .marca { display: flex; align-items: center; gap: 10px; color: var(--azul-esc); font-size: 18px; text-align: left; }
.topo .marca img { height: 34px; width: auto; display: block; }
.seguro { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.seguro svg { width: 15px; height: 15px; fill: var(--verde); }
.progresso { max-width: 520px; margin: 0 auto; padding: 14px 16px 0; }
.progresso:empty { display: none; }
.progresso ol { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0; padding: 0; }
.progresso li { font-size: 12px; color: var(--suave); text-align: center; }
.progresso li::before { content: ""; display: block; height: 6px; border-radius: 99px; background: #d5dfe9; margin-bottom: 6px; transition: background .3s; }
.progresso li.feito::before { background: var(--verde); }
.progresso li.atual { color: var(--azul-esc); font-weight: 700; }
.progresso li.atual::before { background: var(--azul); }

main { max-width: 520px; margin: 0 auto; padding: 14px 16px 16px; }
.cartao { background: var(--cartao); border-radius: 20px; padding: 24px 20px; box-shadow: var(--sombra); animation: entrar .28s ease-out; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } }
.centro { text-align: center; }
.compacto { padding-top: 20px; }
.compacto h1 { margin-bottom: 2px; }
.compacto label:first-of-type { margin-top: 10px; }
@media (max-height: 700px) { .icone-tela { display: none; } .progresso { padding-top: 8px; } }
.ico { width: 1em; height: 1em; flex: 0 0 auto; }
.icone-tela { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; margin: 0 auto 14px; background: var(--azul-claro); color: var(--azul); }
.icone-tela.verde { background: var(--verde-claro); color: var(--verde); }
.icone-tela.alerta { background: #fff4d6; color: #a05a00; }
.botao .ico { font-size: 22px; }
h1 { font-size: 25px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
p { margin: 0 0 14px; }
.suave { color: var(--suave); font-size: 16px; }
.chip { display: inline-block; background: var(--azul-claro); color: var(--azul-esc); font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 10px; margin: 0 0 8px; }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=tel], textarea {
  width: 100%; font-size: 22px; padding: 14px; border: 2px solid var(--borda); border-radius: 14px; background: #fff; color: var(--texto); transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 4px rgba(11, 92, 171, .15); }
input.ok { border-color: var(--verde); }
input.codigo { text-align: center; letter-spacing: 12px; font-size: 34px; font-weight: 700; padding: 14px 4px 14px 16px; }
.botao { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 58px; margin-top: 18px; padding: 15px; font-size: 20px; font-weight: 700;
  border: 0; border-radius: 16px; background: var(--azul); color: #fff; cursor: pointer; text-align: center; text-decoration: none;
  box-shadow: 0 4px 12px rgba(11, 92, 171, .25); transition: transform .08s, background .15s, opacity .15s; font-family: inherit; }
.botao:active { background: var(--azul-esc); transform: scale(.98); }
.botao:disabled { opacity: .45; box-shadow: none; }
.botao:focus-visible, .link:focus-visible, .opcao:focus-visible { outline: 3px solid rgba(11, 92, 171, .45); outline-offset: 2px; }
.botao.secundario { background: #e6edf4; color: var(--azul-esc); box-shadow: none; }
.botao.verde { background: var(--verde); box-shadow: 0 4px 12px rgba(18, 137, 58, .25); }
.link { display: block; margin-top: 16px; background: none; border: 0; color: var(--azul); font-size: 17px; font-weight: 600; text-decoration: none; width: 100%; cursor: pointer; padding: 8px; font-family: inherit; }
.link:disabled { color: var(--suave); font-weight: 400; }
.erro { background: #fdecea; color: var(--vermelho); border-radius: 12px; padding: 12px; margin-top: 14px; font-weight: 600; }
.erro:empty { display: none; }
.aviso { background: #fff7e0; border-radius: 12px; padding: 12px; margin: 12px 0; }
.ok-msg { background: var(--verde-claro); color: #0b5d28; border-radius: 12px; padding: 12px; margin: 12px 0; font-weight: 600; }

/* lista de etapas da tela inicial */
.etapas { list-style: none; padding: 0; margin: 6px 0 10px; text-align: left; }
.etapas li { display: flex; gap: 14px; align-items: center; padding: 7px 0; font-weight: 600; font-size: 17px; line-height: 1.3; }
.etapas .n { flex: 0 0 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--azul-claro); color: var(--azul); }
.etapas small { display: block; color: var(--suave); font-size: 14px; font-weight: 400; }

/* escolha do documento */
.opcoes { display: grid; gap: 10px; margin-top: 14px; }
.opcao { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border: 2px solid var(--borda); border-radius: 16px; background: #fff;
  color: var(--texto); text-align: left; cursor: pointer; font: inherit; transition: border-color .15s, background .15s, transform .08s; }
.opcao:active { border-color: var(--azul); background: var(--azul-claro); transform: scale(.99); }
.opcao .ic { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--azul-claro); color: var(--azul); }
.opcao strong { display: block; font-size: 18px; }
.opcao small { display: block; color: var(--suave); font-size: 15px; line-height: 1.3; }
.opcao .seta-dir { margin-left: auto; color: #9aa8b6; font-size: 24px; }

.dicas { list-style: none; padding: 0; margin: 10px 0 4px; text-align: left; }
.dicas li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #eef2f5; }
.dicas li:last-child { border: 0; }
.dicas .ic { flex: 0 0 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: #e6edf4; }
.dicas .ic.nao { background: #fdecea; } .dicas .ic.sim { background: var(--verde-claro); }
.giro { width: 42px; height: 42px; margin: 10px auto 16px; border-radius: 50%; border: 5px solid #d6e2ee; border-top-color: var(--azul); animation: giro 1s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }
.grande-ok { width: 88px; height: 88px; border-radius: 50%; background: var(--verde); color: #fff; font-size: 50px; display: grid; place-items: center; margin: 6px auto 16px;
  box-shadow: 0 0 0 10px var(--verde-claro); animation: aparecer .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes aparecer { from { transform: scale(.4); opacity: 0; } }
.selo-metodo { display: inline-block; background: var(--verde); color: #fff; font-weight: 700; font-size: 16px; padding: 8px 14px; border-radius: 99px; }
.codigo-caixa { display: flex; align-items: center; gap: 8px; background: #eef3f8; border-radius: 14px; padding: 8px 8px 8px 14px; margin: 0 0 6px; }
.codigo-val { flex: 1; font-family: ui-monospace, monospace; font-size: 19px; font-weight: 700; letter-spacing: 1px; word-break: break-all; text-align: left; }
.copiar { flex: 0 0 auto; border: 0; border-radius: 10px; background: #fff; color: var(--azul-esc); font: 600 15px system-ui, sans-serif; padding: 10px 12px; cursor: pointer; }
.contrato.paginas { white-space: normal; padding: 6px; }
.contrato.paginas img { display: block; width: 100%; height: auto; background: #fff; border-radius: 6px; margin-bottom: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.contrato { max-height: 52vh; overflow-y: auto; white-space: pre-wrap; font-size: 16px; line-height: 1.55; background: #f8fafc; border: 1px solid var(--borda); border-radius: 14px; padding: 16px; margin: 12px 0 0; }
.acao-fixa { position: sticky; bottom: 0; background: #fff; margin: 0 -20px -24px; padding: 6px 20px calc(18px + env(safe-area-inset-bottom)); border-radius: 0 0 20px 20px;
  box-shadow: 0 -8px 16px -10px rgba(16, 42, 67, .18); }
.aceite { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; font-weight: 600; cursor: pointer; }
.aceite input { width: 28px; height: 28px; flex: 0 0 28px; margin-top: 2px; accent-color: var(--verde); }
.previa { width: 100%; border-radius: 14px; margin: 10px 0; background: #000; }
.empresa { font-size: 14px; color: var(--suave); margin: 10px 0; line-height: 1.4; }
.pedir-ajuda { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--suave); font: 15px system-ui, sans-serif; text-decoration: underline; cursor: pointer; padding: 8px; }
.rodape-empresa { max-width: 520px; margin: 0 auto; padding: 8px 16px 28px; text-align: center; font-size: 12px; color: var(--suave); line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .cartao, .grande-ok { animation: none; } }

/* câmera em tela cheia */
.camera { position: fixed; inset: 0; background: #000; z-index: 10; overflow: hidden; }
.camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera video.espelho { transform: scaleX(-1); }
.camera svg.mascara { position: absolute; inset: 0; width: 100%; height: 100%; }
.camera .moldura { fill: none; stroke: #fff; stroke-width: 4; transition: stroke .2s; }
.camera .moldura.boa { stroke: #2ecc71; stroke-width: 6; }
.camera .barra { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 12px 12px; }
.camera .barra button { background: rgba(0,0,0,.55); color: #fff; border: 0; border-radius: 22px; padding: 10px 16px; font-size: 16px; }
.camera .titulo { position: absolute; left: 12px; right: 12px; top: 62px; text-align: center; color: #fff; font-size: 22px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.camera .msg { position: absolute; left: 12px; right: 12px; bottom: calc(110px + env(safe-area-inset-bottom)); text-align: center; }
.camera .msg span { display: inline-block; background: rgba(0,0,0,.72); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 20px; font-weight: 600; }
.camera .msg span.boa { background: var(--verde); }
.camera .msg span.ruim { background: var(--vermelho); }
.camera .rodape { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; gap: 10px; justify-content: center; align-items: center; }
.camera .disparo { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.35); display: none; }
.camera .disparo.ver { display: block; }
.camera .ajuda { background: var(--amarelo); color: #000; border: 0; border-radius: 14px; padding: 14px 18px; font-size: 17px; font-weight: 700; display: none; }
.camera .ajuda.ver { display: block; }
.camera .seta { position: absolute; top: 42%; font-size: 90px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.7); display: none; animation: pulso 1s ease-in-out infinite; }
.camera .seta.esq { left: 8px; } .camera .seta.dir { right: 8px; }
.camera .seta.ver { display: block; }
@keyframes pulso { 50% { transform: translateX(var(--d, -12px)); } }
.camera .seta.dir { --d: 12px; }
.camera .pontos { position: absolute; left: 0; right: 0; bottom: calc(80px + env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 10px; }
.camera .pontos i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,.4); }
.camera .pontos i.feito { background: #2ecc71; }
.camera .debug { position: absolute; left: 8px; bottom: 8px; color: #0f0; font: 12px monospace; background: rgba(0,0,0,.6); padding: 4px; white-space: pre; }
.camera .flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .25s; }
.camera .flash.on { opacity: .8; transition: none; }
