* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 35%),
    linear-gradient(180deg, #062a5c 0%, #031c3d 100%);
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topo-logo {
  text-align: center;
  padding: 28px 0 12px;
}

.topo-logo img {
  width: 150px;
  max-width: 85%;
  display: inline-block;
  height: auto;
}

.container {
  flex: 1;
  max-width: 1200px;
  margin: 10px auto 30px;
  background: rgba(255, 255, 255, 0.97);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  width: calc(100% - 40px);
}

h1 {
  margin-top: 0;
  text-align: center;
  color: #123a63;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.campo {
  display: flex;
  flex-direction: column;
}

.campo label {
  font-weight: bold;
  margin-bottom: 6px;
}

.campo input[type="text"],
.campo select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #cfd6dd;
  border-radius: 10px;
  font-size: 15px;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #ffffff;
  color: #222;
  outline: none;
  box-shadow: none;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.campo input[type="text"]::placeholder {
  color: #7a8694;
  opacity: 1;
}

.campo input[type="text"]:focus,
.campo select:focus {
  border-color: #0b63c9;
  box-shadow: 0 0 0 2px rgba(11, 99, 201, 0.15);
}

.campo-estrutura {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fafcff;
}

.titulo-com-ajuda {
  display: flex;
  align-items: center;
  gap: 8px;
}

.titulo-com-ajuda label {
  margin-bottom: 0;
}

.bloco-escolha,
.subopcoes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.subopcoes {
  margin-left: 34px;
  margin-top: 14px;
  padding-left: 14px;
  border-left: 3px solid #d5e2f0;
}

.subtitulo-subopcao {
  font-size: 14px;
  color: #123a63;
  font-weight: bold;
}

.linha-opcao {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.linha-opcao span {
  font-weight: 600;
}

.linha-opcao input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #0b63c9;
  cursor: pointer;
}

.subopcao span {
  font-weight: 500;
}

.botoes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

button {
  border: none;
  background: linear-gradient(135deg, #d8b15a, #c79a33);
  color: #0d2d57;
  padding: 12px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

button:hover {
  background: linear-gradient(135deg, #e4c16e, #d4a743);
}

.status {
  margin: 10px 0;
  font-weight: bold;
  color: #444;
}

.resultado {
  margin: 16px 0;
  padding: 14px;
  background: #eef6ff;
  border-left: 5px solid #0b63c9;
  border-radius: 8px;
  font-size: 18px;
}

.qr-box {
  margin: 24px 0;
  padding: 16px;
  border: 1px solid #dde5ee;
  border-radius: 10px;
  background: #fafcff;
}

#qrcode {
  margin-top: 10px;
  min-height: 120px;
}

.tabela-box {
  overflow-x: auto;
  margin-top: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

thead {
  background: #123a63;
  color: white;
}

th,
td {
  padding: 10px 8px;
  border: 1px solid #d8dee6;
  text-align: center;
  font-size: 14px;
  vertical-align: middle;
}

th {
  font-weight: bold;
  white-space: nowrap;
}

tbody tr:nth-child(odd) {
  background: #f2f2f2;
}

tbody tr:nth-child(even) {
  background: #e7e7e7;
}

.oculto {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.modal-conteudo {
  width: 100%;
  max-width: 760px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.modal-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #123a63;
  color: #fff;
  padding: 14px 18px;
}

.modal-topo h2 {
  margin: 0;
  font-size: 20px;
}

.btn-fechar-modal {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  line-height: 1;
}

.btn-fechar-modal:hover {
  background: transparent;
  opacity: 0.8;
}

.modal-corpo {
  padding: 20px;
  max-height: 75vh;
  overflow-y: auto;
  line-height: 1.8;
}

.modal-corpo p {
  margin-bottom: 12px;
  white-space: pre-line;
}

.btn-ajuda-inline {
  width: 22px;
  height: 22px;
  min-width: 22px;
  padding: 0;
  margin-left: 4px;
  border-radius: 50%;
  border: 1px solid #aebed1;
  background: #f4f8fc;
  color: #123a63;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s;
}

.btn-ajuda-inline:hover {
  background: #e8f1fb;
}

.rodape {
  text-align: center;
  padding: 16px;
  font-size: 12.5px;
  color: #d8b15a;
  background: linear-gradient(180deg, #031c3d, #02142c);
  border-top: 1px solid rgba(255,255,255,0.08);
  letter-spacing: 0.5px;
  font-weight: 500;
  margin-top: auto;
}