/* style.css - layout simples, leve, responsivo (720p a 4K) */
:root {
  --azul: #2563eb;
  --azul-escuro: #1d4ed8;
  --verde: #16a34a;
  --vermelho: #dc2626;
  --cinza-bg: #f4f5f7;
  --cinza-texto: #374151;
  --cinza-borda: #e5e7eb;
  --radius: 8px;
}

* { box-sizing: border-box; }

html { font-size: 16px; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--cinza-bg);
  color: var(--cinza-texto);
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

/* Cabeçalho / navegação */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--cinza-borda);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.topbar .logo { font-weight: 700; color: var(--azul-escuro); font-size: 1.1rem; text-decoration: none; }
.topbar nav a { color: var(--cinza-texto); text-decoration: none; margin-left: 16px; font-size: 0.95rem; }
.topbar nav a:hover { color: var(--azul); }

/* Cartões */
.card {
  background: #fff;
  border: 1px solid var(--cinza-borda);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card-box {
  max-width: 440px;
  margin: 60px auto;
}

/* Formulários */
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=file], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--cinza-borda);
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
}
textarea { resize: vertical; min-height: 80px; }

button, .btn {
  display: inline-block;
  background: var(--azul);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  margin-top: 14px;
}
button:hover, .btn:hover { background: var(--azul-escuro); }
.btn-secundario { background: #6b7280; }
.btn-secundario:hover { background: #4b5563; }
.btn-perigo { background: var(--vermelho); }
.btn-perigo:hover { background: #b91c1c; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; margin-top: 0; }

/* Alertas */
.alerta { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 0.95rem; }
.alerta-erro { background: #fee2e2; color: #991b1b; }
.alerta-sucesso { background: #dcfce7; color: #166534; }
.alerta-info { background: #dbeafe; color: #1e40af; }

/* Tabelas */
.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.9rem; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--cinza-borda); text-align: left; white-space: nowrap; }
th { background: #f9fafb; font-weight: 600; }

/* Badges */
.badge { padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-verde { background: #dcfce7; color: #166534; }
.badge-vermelho { background: #fee2e2; color: #991b1b; }
.badge-cinza { background: #f3f4f6; color: #4b5563; }

/* Grid simples */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Prova - opções de resposta */
.pergunta { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--cinza-borda); }
.pergunta h3 { font-size: 1.05rem; }
.opcao { display: block; padding: 12px 14px; border: 1px solid var(--cinza-borda); border-radius: 6px; margin-top: 8px; cursor: pointer; }
.opcao:hover { border-color: var(--azul); }
.opcao input { margin-right: 10px; }
.obrigatoria-tag { color: var(--vermelho); font-size: 0.8rem; font-weight: 600; margin-left: 6px; }

/* Timer da prova */
.timer { position: sticky; top: 0; background: #111827; color: #fff; padding: 10px 16px; border-radius: 6px; text-align: center; font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; z-index: 10; }

/* Conteúdo embed responsivo */
.embed-responsivo { position: relative; padding-top: 56.25%; margin-bottom: 16px; }
.embed-responsivo iframe { position: absolute; top:0; left:0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

/* Responsividade */
@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .topbar nav a { margin-left: 0; margin-right: 14px; }
  .card-box { margin: 24px 12px; padding: 16px; }
  th, td { font-size: 0.82rem; padding: 8px; }
}

@media (min-width: 1600px) {
  .container { max-width: 1440px; }
  html { font-size: 17px; }
}
