/* Consultoria Online Sandro Lenzi — formulários e painel (cores da bio do Sandro) */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fontes/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fontes/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fontes/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(fontes/inter-latin-700-normal.woff2) format("woff2"); }

:root {
  --brand: #0B2F55; --brand-hover: #0A3D70; --accent: #1E6FD0; --ink: #0F1E2E; --muted: #55677A;
  --line: #DCE6F0; --card: #FFFFFF; --bg: #F4F8FC; --tint: #EAF2FB; --radius: 16px;
  --warn-bg: #FFF6E5; --warn-line: #F2C46D; --err: #B42318; --ok: #157F3B;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
.escondido, [hidden] { display: none !important; }
.isca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- formulário ---------- */
.topo { background: var(--brand); color: #fff; padding: 14px 18px; font-weight: 700; letter-spacing: .2px; }
.topo small { display: block; font-weight: 500; opacity: .8; font-size: 13px; }
.progresso { height: 6px; background: var(--line); }
.progresso div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
main.form { max-width: 640px; margin: 0 auto; padding: 18px 16px 120px; }
h1 { font-size: 24px; line-height: 1.25; margin: 8px 0 14px; color: var(--brand); }
h2 { font-size: 20px; margin: 4px 0 12px; color: var(--brand); }
.texto-tela { color: var(--muted); margin: 0 0 18px; white-space: pre-line; }
.pergunta { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.pergunta > label, .pergunta > .p { display: block; font-weight: 600; margin-bottom: 10px; }
.dica { color: var(--muted); font-size: 14px; margin: -4px 0 10px; }
.erro { color: var(--err); font-size: 14px; margin-top: 8px; font-weight: 500; }
.pergunta.com-erro { border-color: var(--err); }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], textarea, select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.opcoes { display: grid; gap: 8px; }
.opcao { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer; }
.opcao::before { content: ""; flex: none; width: 20px; height: 20px; border: 2px solid var(--line); border-radius: 50%; }
.caixas .opcao::before { border-radius: 6px; }
.opcao.marcada { border-color: var(--accent); background: var(--tint); font-weight: 600; }
.opcao.marcada::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px #fff; }
.opcao img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; margin-left: auto; }
.escala { display: flex; flex-wrap: wrap; gap: 6px; }
.escala .opcao { width: auto; min-width: 46px; justify-content: center; padding: 11px 0; }
.escala .opcao::before { display: none; }
.rotulos-escala { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 6px; gap: 12px; }
.mesano { display: flex; gap: 8px; }
.aviso { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 14px; }
.info { margin: 0 0 16px; }
.info p { white-space: pre-line; }
.info .rodape { color: var(--muted); font-size: 14px; }
.fotos-ref { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 12px; }
.fotos-ref figure { margin: 0; }
.fotos-ref img, .fotos-ref .sem-foto { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); }
.fotos-ref .sem-foto { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: 13px; padding: 8px; }
.fotos-ref figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 4px; }
.grupo { border: 1.5px solid var(--accent); border-radius: var(--radius); padding: 12px 12px 2px; margin: 0 0 14px; background: #fff; }
.grupo > h3 { margin: 0 0 10px; font-size: 17px; color: var(--brand); }
.grupo .pergunta { border: 0; padding: 6px 4px; margin-bottom: 10px; }
.upload { display: grid; gap: 10px; }
.upload img { max-width: 160px; border-radius: 12px; border: 1px solid var(--line); }
.upload .estado { font-size: 14px; color: var(--muted); }
.upload .estado.ok { color: var(--ok); font-weight: 600; }
.aceite { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.aceite input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.botoes { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(244,248,252,.96); border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.botoes div { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.btn { font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 14px 20px; cursor: pointer; background: var(--brand); color: #fff; text-decoration: none; display: inline-block; text-align: center; }
.btn:hover { background: var(--brand-hover); }
.btn.sec { background: #fff; color: var(--brand); border: 1.5px solid var(--line); }
.btn.grande { flex: 1; }
.btn[disabled] { opacity: .6; cursor: wait; }
.abertura p { white-space: pre-line; }
.msg { max-width: 560px; margin: 40px auto; padding: 0 16px; }
.privacidade { max-width: 680px; margin: 0 auto; padding: 18px 16px 60px; }

/* ---------- painel ---------- */
.painel { max-width: 1100px; margin: 0 auto; padding: 18px 16px 60px; }
.painel-topo { background: var(--brand); color: #fff; padding: 10px 18px; display: flex; align-items: center; gap: 16px; }
.painel-topo a { color: #fff; text-decoration: none; font-weight: 700; }
.painel-topo form { margin-left: auto; }
.painel-topo button { font: inherit; background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.cartao { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
.cartao h2 { font-size: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.etiqueta { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--tint); color: var(--brand); }
.etiqueta.ia { background: #F3E8FF; color: #6B21A8; }
.etiqueta.alerta { background: #FEE4E2; color: var(--err); }
.etiqueta.ok { background: #DCFCE7; color: var(--ok); }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filtros input, .filtros select { width: auto; flex: 1; min-width: 160px; }
.grade2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 16px; }
.grade2 label { font-size: 13px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
dl.respostas { display: grid; grid-template-columns: minmax(180px, 38%) 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
dl.respostas dt { color: var(--muted); }
dl.respostas dd { margin: 0; white-space: pre-line; }
dl.respostas dt.grupo-t { grid-column: 1 / -1; font-weight: 700; color: var(--brand); margin-top: 6px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--brand); margin: 6px 0; }
.galeria { display: flex; flex-wrap: wrap; gap: 10px; }
.galeria a img { width: 140px; height: 175px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.link-copiar { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.link-copiar input { font-size: 14px; padding: 8px 10px; flex: 1; max-width: 520px; }
.link-copiar button { font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
pre.bruto { white-space: pre-wrap; word-break: break-word; font-size: 13px; background: var(--bg); padding: 12px; border-radius: 12px; max-height: 70vh; overflow: auto; }
.qr svg { width: 220px; height: 220px; }
.codigos { font: 16px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); padding: 12px 16px; border-radius: 12px; }
.muted { color: var(--muted); }
.ok-msg { color: var(--ok); font-weight: 600; }

/* flags de prescrição (painel) */
.flag { border-left: 4px solid var(--borda, #D5DEE8); padding: .4rem .8rem; margin: .6rem 0; }
.flag p { margin: .2rem 0; }
.flag-alta { border-left-color: #C0392B; background: #FDF3F2; }
.flag-normal { border-left-color: #1E6FD0; }
.flag-baixa { border-left-color: #9AA8B6; }
