/* DCL Assina — telas do signatário (docs/14-identidade-visual.md). Mobile primeiro, 360 px. */
@font-face { font-family: "Sora"; src: url("fonts/sora-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sora"; src: url("fonts/sora-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("fonts/great-vibes-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: block; }

:root {
  --ink: #0F0F0F; --paper: #FFFFFF; --mist: #EDEDED; --gold: #CFAC70; --gold-deep: #A6864E;
  --gold-text: #7A5F2E; --danger: #B3261E; --ok: #1E6B3A; --raio: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.55 "Sora", system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column;
}
.topo { background: var(--ink); padding: 14px 16px; display: flex; justify-content: center; }
.logo { height: 56px; width: auto; }

.progresso { padding: 14px 16px 0; max-width: 680px; width: 100%; margin: 0 auto; }
.progresso-rotulo { font-size: 15px; color: var(--gold-text); font-weight: 700; margin-bottom: 6px; }
.progresso-trilho { height: 8px; border-radius: 8px; background: var(--mist); overflow: hidden; }
.progresso-barra { height: 100%; width: 0; background: var(--gold); transition: width .3s; }

main { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 16px; outline: none; }
.cartao { background: var(--paper); border: 1px solid var(--mist); border-radius: var(--raio); padding: 20px 16px; margin-bottom: 16px; }
.centro { text-align: center; }
h1, h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: 30px; } h2 { font-size: 26px; }
p { margin: 0 0 12px; }
.destaque { font-weight: 700; }
.discreto { color: #444; font-size: 16px; }
.ouro { color: var(--gold-text); }

.botao {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px;
  border-radius: var(--raio); border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
  font: 700 18px/1.2 "Sora", system-ui, sans-serif; padding: 12px 16px; margin: 12px 0 0; cursor: pointer; text-decoration: none;
}
.botao:disabled { background: var(--mist); border-color: var(--mist); color: #6b6b6b; cursor: not-allowed; }
.botao.secundario { background: var(--paper); color: var(--ink); border-color: var(--gold-deep); }
.botao.perigo { background: var(--danger); border-color: var(--danger); }
.botao.whatsapp { background: #128C4B; border-color: #128C4B; }
.via-assinada .botao { display: inline-flex; width: auto; min-height: 40px; padding: 8px 18px; font-size: 15px; background: #128C4B; border-color: #128C4B; margin-top: 8px; }
.botao:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; }
.botoes { display: flex; gap: 12px; } .botoes .botao { flex: 1; }

.caixa { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--mist); }
.caixa input { width: 28px; height: 28px; flex: 0 0 28px; margin: 2px 0 0; accent-color: var(--ink); }
.texto-legal { font-size: 17px; }
.texto-legal ol, .texto-legal ul { padding-left: 22px; margin: 0 0 12px; }
.texto-legal table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 8px 0 12px; }
.texto-legal th, .texto-legal td { border: 1px solid var(--mist); padding: 6px; text-align: left; vertical-align: top; }
details { border: 1px solid var(--mist); border-radius: var(--raio); padding: 12px; margin: 8px 0 12px; }
summary { font-weight: 700; cursor: pointer; color: var(--gold-text); min-height: 32px; }
.selo-minuta { display: inline-block; background: #fff4d6; color: #6a4b00; border-radius: 8px; padding: 2px 8px; font-size: 14px; font-weight: 700; }

label { display: block; font-weight: 700; margin: 8px 0 6px; }
input[type=text], input[type=tel], textarea {
  width: 100%; font: 400 22px "Sora", sans-serif; padding: 12px; border: 2px solid var(--gold-deep); border-radius: var(--raio); background: var(--paper); color: var(--ink);
}
.cpf-mascara { font: 700 26px/1.4 "Sora", monospace; letter-spacing: 1px; text-align: center; margin: 8px 0 4px; }
.cpf-mascara .alvo { color: var(--gold-text); border-bottom: 3px solid var(--gold-deep); }
.cpf-entrada { font-size: 32px !important; letter-spacing: 12px; text-align: center; max-width: 220px; margin: 0 auto; display: block; }

.abas { display: flex; gap: 8px; margin-bottom: 12px; }
.aba { flex: 1; min-height: 48px; border-radius: var(--raio); border: 2px solid var(--gold-deep); background: var(--paper); font: 700 17px "Sora", sans-serif; color: var(--ink); }
.aba[aria-selected=true] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.leitor { border: 1px solid var(--mist); border-radius: var(--raio); max-height: 62vh; overflow-y: auto; background: #f6f6f6; padding: 8px; }
.leitor canvas { display: block; width: 100%; height: auto; margin: 0 auto 8px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.leitor .pagina-rotulo { text-align: center; font-size: 14px; color: #555; margin: -4px 0 10px; }
.status-leitura { font-size: 15px; color: var(--gold-text); margin-top: 8px; }

.camera { position: relative; border-radius: var(--raio); overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-width: 420px; margin: 0 auto; }
.camera video, .camera img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera video { transform: scaleX(-1); }
.camera .oval { position: absolute; inset: 3% 6% 8%; border: 4px solid var(--gold); border-radius: 50%; box-shadow: 0 0 0 9999px rgba(0,0,0,.35); pointer-events: none; }

.quadro-assinatura { border: 2px dashed var(--gold-deep); border-radius: var(--raio); background: #fff; touch-action: none; }
.quadro-assinatura canvas { width: 100%; height: 200px; display: block; }
.assinatura-digitada { font: 400 52px/1.2 "Great Vibes", cursive; text-align: center; padding: 24px 8px; border: 2px dashed var(--gold-deep); border-radius: var(--raio); min-height: 120px; overflow-wrap: anywhere; }

.resumo dt { font-size: 15px; color: var(--gold-text); font-weight: 700; margin-top: 10px; }
.resumo dd { margin: 0; overflow-wrap: anywhere; }
.miniaturas { display: flex; gap: 12px; margin-top: 12px; }
.miniaturas figure { flex: 1; margin: 0; border: 1px solid var(--mist); border-radius: var(--raio); padding: 6px; text-align: center; font-size: 14px; }
.miniaturas img { width: 100%; height: 140px; object-fit: contain; }

.passos-ajuda { padding-left: 22px; } .passos-ajuda li { margin-bottom: 6px; }
.logo-final { background: var(--ink); border-radius: var(--raio); padding: 12px; height: auto; }
.ok-grande { font-size: 56px; color: var(--ok); line-height: 1; }
.codigo { font: 700 22px "Sora", monospace; letter-spacing: 1px; background: var(--mist); border-radius: 8px; padding: 6px 10px; display: inline-block; }

.aviso-erro { position: sticky; bottom: 0; margin: 0 auto; max-width: 680px; width: calc(100% - 32px); background: var(--danger); color: #fff; padding: 12px 16px; border-radius: var(--raio); font-weight: 700; margin-bottom: 12px; }
.rodape { display: flex; justify-content: space-between; gap: 12px; max-width: 680px; width: 100%; margin: 0 auto; padding: 8px 16px 24px; }
[hidden] { display: none !important; } /* o display dos componentes não pode anular o atributo hidden */
.link-ajuda, .link-recusa { font: 700 16px "Sora", sans-serif; background: none; border: 0; padding: 12px 4px; min-height: 48px; cursor: pointer; }
.link-ajuda { color: var(--gold-text); }
.link-recusa { color: var(--danger); text-decoration: underline; }

dialog { border: 0; border-radius: var(--raio); padding: 20px 16px; width: min(560px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.55); }

.carregando { width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--mist); border-top-color: var(--gold-deep); margin: 8px auto 16px; animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .carregando { animation: none; } .progresso-barra { transition: none; } }
