*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-image: linear-gradient(rgba(238,241,246,.93), rgba(238,241,246,.93)), url('images/2.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #1a1a2e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.oculto { display: none !important; }

/* ── Aviso de versão de teste ─────────────────────────────────────── */

.aviso-versao-teste {
  width: 100%;
  background: #fff3cd;
  color: #7a5b00;
  border-bottom: 1px solid #f0d98c;
  padding: 8px 16px;
  font-size: .85rem;
  text-align: center;
}

/* ── Topo provedor ─────────────────────────────────────────────── */

.topo-provedor {
  width: 100%;
  min-height: 90px;
  padding: 12px 20px;
  background-image: url('images/3.png'), linear-gradient(90deg, #bfe3f5, #f5b942);
  background-size: auto 100%, cover;
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.topo-marca {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(0,0,0,.75);
  padding: 6px 12px;
  border-radius: 8px;
  width: fit-content;
}

.topo-contatos a:not(.topo-whatsapp) {
  background: rgba(0,0,0,.55);
  padding: 6px 12px;
  border-radius: 8px;
}

.topo-nome {
  color: #fff;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .3px;
  text-shadow: 0 1px 4px rgba(0,0,0,.75);
}

.topo-nome:hover { text-decoration: underline; }

.topo-slogan {
  font-size: .78rem;
  color: #cfe0ff;
  letter-spacing: .3px;
  text-shadow: 0 1px 4px rgba(0,0,0,.75);
}

.topo-redes {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.rede-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
}

.rede-icone.rede-desativada {
  opacity: .35;
  cursor: not-allowed;
}

.topo-contatos {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topo-contatos a {
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,.75);
}

.topo-contatos a:not(.topo-whatsapp):hover { text-decoration: underline; }

.topo-whatsapp {
  background: #25D366;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  transition: background .15s;
}

.topo-whatsapp:hover { background: #1ebe57; }

/* ── Telas ─────────────────────────────────────────────────────── */

.tela {
  flex: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ── Card ──────────────────────────────────────────────────────── */

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  padding: 32px;
  width: 100%;
  max-width: 760px;
}

/* ── Tela Início ───────────────────────────────────────────────── */

.logo {
  text-align: center;
  margin-bottom: 28px;
}

.logo h1 {
  font-size: 1.6rem;
  color: #003DA5;
  font-weight: 700;
}

.logo p {
  font-size: .9rem;
  color: #666;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

#tela-inicio h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 16px;
}

.tipos {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.tipo-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px solid #e0e4ed;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.tipo-card:hover { border-color: #003DA5; background: #f0f4ff; }

.tipo-card input[type="radio"] { accent-color: #003DA5; width: 18px; height: 18px; }

.tipo-card input[type="radio"]:checked + .tipo-info { color: #003DA5; }

.tipo-card:has(input:checked) {
  border-color: #003DA5;
  background: #f0f4ff;
}

.tipo-info { display: flex; flex-direction: column; gap: 3px; }
.tipo-info strong { font-size: 1rem; }
.tipo-info span   { font-size: .82rem; color: #666; }

/* ── Botões principais ─────────────────────────────────────────── */

.btn-principal {
  width: 100%;
  padding: 14px;
  background: #003DA5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.btn-principal:hover { background: #002d7a; }

.btn-principal + .btn-secundario { margin-top: 12px; }

/* ── Barra de topo da prova ────────────────────────────────────── */

.barra {
  width: 100%;
  max-width: 760px;
  background: #003DA5;
  color: #fff;
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.barra-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: .88rem;
}

.barra-info strong { font-size: 1rem; }

#cronometro {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
}

#cronometro.alerta { color: #ffcc00; }

.btn-finalizar {
  background: #fff;
  color: #003DA5;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.btn-finalizar:hover { background: #e8eeff; }

/* ── Corpo da prova ────────────────────────────────────────────── */

.prova-corpo {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card.questao {
  position: relative;
  padding-top: 64px;
}

.btn-nav-card {
  position: absolute;
  top: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #e0e4ed;
  background: #fff;
  color: #003DA5;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s;
}

.btn-nav-card:hover { border-color: #003DA5; background: #f0f4ff; }
.btn-nav-card.ant { left: 16px; }
.btn-nav-card.prox { right: 16px; }

.navegacao-mapa { justify-content: center; }

.questao #enunciado {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #1a1a2e;
}

#imagem-questao {
  display: block;
  max-width: 200px;
  max-height: 200px;
  margin: 0 auto 20px;
  border-radius: 6px;
  border: 1px solid #e0e4ed;
}

.img-inline {
  width: 47px;
  height: 47px;
  vertical-align: middle;
  border: 1px solid #e0e4ed;
  border-radius: 4px;
  margin: 0 2px;
}

/* ── Alternativas ──────────────────────────────────────────────── */

#alternativas {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alternativa {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid #e0e4ed;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-size: .95rem;
  transition: border-color .15s, background .15s;
  width: 100%;
}

.alternativa:hover { border-color: #003DA5; background: #f0f4ff; }

.alternativa.selecionada {
  border-color: #003DA5;
  background: #003DA5;
  color: #fff;
}

.alternativa .letra {
  font-weight: 700;
  font-size: 1rem;
  min-width: 22px;
}

/* ── Navegação ─────────────────────────────────────────────────── */

.navegacao {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.btn-nav {
  background: #fff;
  border: 2px solid #e0e4ed;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  color: #003DA5;
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}

.btn-nav:hover { border-color: #003DA5; background: #f0f4ff; }

/* ── Mapa de questões ──────────────────────────────────────────── */

#mapa-questoes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  flex: 1;
}

.mapa-item {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid #e0e4ed;
  background: #fff;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  color: #555;
}

.mapa-item.respondida {
  background: #003DA5;
  border-color: #003DA5;
  color: #fff;
}

.mapa-item.atual {
  border-color: #f59e0b;
  outline: 2px solid #f59e0b;
}

/* ── Resultado ─────────────────────────────────────────────────── */

.resultado-card { text-align: center; }

.resultado-acoes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resultado-acoes .btn-principal,
.resultado-acoes .btn-secundario {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}

.resultado-acoes .btn-principal + .btn-secundario { margin-top: 0; }

.btn-secundario {
  background: #fff;
  color: #003DA5;
  border: 2px solid #003DA5;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-secundario:hover { background: #f0f4ff; }

#resultado-badge {
  background: #f0f4ff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  display: inline-block;
  width: 100%;
}

.badge-num {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: #003DA5;
  line-height: 1;
}

.badge-label { font-size: .9rem; color: #666; }

.badge-minimo {
  margin-top: 8px;
  font-size: .9rem;
  color: #444;
}

#titulo-resultado {
  font-size: 1.2rem;
  color: #003DA5;
  margin-bottom: 16px;
}

.obs {
  font-size: .82rem;
  color: #888;
  background: #f9f9f9;
  border-left: 3px solid #ccc;
  padding: 10px 14px;
  border-radius: 4px;
  text-align: left;
  margin-bottom: 20px;
}

/* ── Revisão ───────────────────────────────────────────────────── */

#revisao-container { max-width: 760px; }

#revisao-container h3 {
  margin-bottom: 20px;
  font-size: 1rem;
  color: #444;
}

.revisao-item {
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.revisao-item:last-child { border-bottom: none; }

.revisao-num {
  font-size: .78rem;
  font-weight: 700;
  color: #003DA5;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.revisao-enunciado {
  font-size: .93rem;
  color: #333;
  line-height: 1.5;
  margin-bottom: 8px;
}

.revisao-img {
  max-height: 80px;
  border-radius: 4px;
  margin-bottom: 8px;
  border: 1px solid #e0e4ed;
}

.revisao-resposta {
  font-size: .88rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
}

.revisao-resposta.respondida   { background: #e8f0fe; color: #003DA5; }
.revisao-resposta.sem-resposta { background: #fef3c7; color: #92400e; }
.revisao-resposta.correta      { background: #dcfce7; color: #15803d; margin-bottom: 4px; }
.revisao-resposta.errada       { background: #fee2e2; color: #b91c1c; margin-bottom: 4px; }

.revisao-just {
  margin-top: 10px;
  border: 1px solid #e0e4ed;
  border-radius: 6px;
  overflow: hidden;
}

.revisao-just summary {
  padding: 8px 12px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  color: #003DA5;
  background: #f0f4ff;
  user-select: none;
}

.just-corpo {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.just-linha {
  font-size: .82rem;
  line-height: 1.5;
  color: #333;
}

/* ── Revisão questão a questão ─────────────────────────────────── */

#rq-mapa {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  flex: 1;
}

#rq-status {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 14px;
}
#rq-status.acertou  { background: #dcfce7; color: #15803d; }
#rq-status.errou    { background: #fee2e2; color: #b91c1c; }
#rq-status.sem-resp { background: #fef3c7; color: #92400e; }

.rq-alt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid #e0e4ed;
  background: #fafafa;
  font-size: .95rem;
  line-height: 1.45;
  margin-bottom: 10px;
}
.rq-alt.rq-correta { border-color: #16a34a; background: #dcfce7; }
.rq-alt.rq-errada  { border-color: #dc2626; background: #fee2e2; }
.rq-alt .letra { font-weight: 700; min-width: 22px; color: #555; }
.rq-alt.rq-correta .letra { color: #16a34a; }
.rq-alt.rq-errada  .letra { color: #dc2626; }

.rq-gab-section { margin: 16px 0 12px; }

.secao-titulo-rq {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #888;
  margin-bottom: 8px;
}

.gabarito-badge-rq {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  border-radius: 6px;
  padding: 4px 16px;
  font-weight: 700;
  font-size: 1rem;
}

.rq-just-details {
  border: 1px solid #e0e4ed;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 4px;
}
.rq-just-details summary {
  padding: 8px 12px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  color: #003DA5;
  background: #f0f4ff;
  user-select: none;
}
.rq-just-corpo {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rq-just-item {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .88rem;
  line-height: 1.5;
  border-left: 4px solid #ddd;
  background: #f9f9f9;
}
.rq-just-item.correta-just { border-left-color: #16a34a; background: #dcfce7; }
.rq-just-item.errada-just  { border-left-color: #dc2626; background: #fee2e2; }

.mapa-item.rq-acertou  { background: #dcfce7; border-color: #16a34a; color: #15803d; }
.mapa-item.rq-errou    { background: #fee2e2; border-color: #dc2626; color: #b91c1c; }
.mapa-item.rq-sem-resp { background: #fef3c7; border-color: #d97706; color: #92400e; }

/* ── Rodapé provedor ───────────────────────────────────────────── */

.rodape-provedor {
  width: 100%;
  max-width: 760px;
  margin: 8px auto 24px;
  padding: 14px 20px;
  text-align: center;
  font-size: .78rem;
  color: #888;
}

.rodape-provedor strong { color: #003DA5; }

.rodape-contatos {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  font-size: .78rem;
}

.rodape-contatos a {
  color: #003DA5;
  text-decoration: none;
  font-weight: 600;
}

.rodape-contatos a:hover { text-decoration: underline; }

.rodape-contatos span { color: #ccc; }

/* ── Botão flutuante WhatsApp ─────────────────────────────────── */

.whatsapp-flutuante {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  z-index: 999;
  transition: transform .15s;
}

.whatsapp-flutuante:hover { transform: scale(1.08); }

/* ── Baixar Relatório: indisponível em celular, mantido no PC ────── */

@media (max-width: 768px) {
  #btn-baixar-relatorio { display: none !important; }
}
