/* Reset e layout */
* { box-sizing: border-box; }
body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f4f6f8;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  color: #333;
}

.subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 12px; /* reduzido */
  line-height: 1.4;
}
.form-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 30px 15px;
}

.form-container {
  width: 100%;
  max-width: 700px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 30px 40px;
}

/* Header */
.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-sair {
  font-size: 1.5rem;
  color: #888;
  text-decoration: none;
  font-weight: bold;
}
.btn-sair:hover {
  color: #333;
}

/* Barra de progresso */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e6eb;
  border-radius: 6px;
  overflow: hidden;
  margin: 12px 0; /* reduzido */
}
.progress {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #0077b6, #005f8a);
  transition: width 0.3s ease;
}

/* Etapas */
.step { display: none; }
.step.active { display: block; }

/* Pergunta */
.question {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Opções */
.options {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.option-btn {
  flex: 1;
  padding: 12px 0;
  border: 1px solid #cfd8dc;
  border-radius: 8px;
  font-size: 1rem;
  background: #f9f9f9;
  cursor: pointer;
}
.option-btn:hover {
  background: #e0e0e0;
}
.option-btn.selected {
  background: #0077b6;
  color: white;
  border-color: #0077b6;
}

/* Comentário */
textarea {
  width: 100%;
  min-height: 100px; /* aumentado */
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 6px;
  border: 1px solid #ccc;
  resize: vertical;
  font-size: 1rem;
}

h2 {
  margin: 0 0 4px 0; /* reduzido */
  text-align: center;
  font-size: 1.6rem;
  color: #003d66;
}

/* Botões navegação */
.buttons {
  display: flex;
  gap: 12px;
  margin-top: 12px; /* reduzido */
}
.next-btn, .submit-btn {
  background: #0077b6;
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
.prev-btn {
  background: #e6e6e6;
  color: #222;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
.next-btn:disabled, .submit-btn:disabled {
  background: #b7c4ce;
  cursor: not-allowed;
}

/* Mensagens */
#messages {
  display: none;
  margin: 15px auto;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
}
#messages.success {
  display: block;
  background: #e6f9f0;
  color: #0f5132;
  border: 1px solid #badbcc;
}
#messages.error {
  display: block;
  background: #fdecea;
  color: #842029;
  border: 1px solid #f5c2c7;
}

/* Loading */
.loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}
.spinner {
  width: 40px; height: 40px;
  border: 4px solid #ccc;
  border-top: 4px solid #0077b6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsividade */
@media (max-width: 600px) {
  .form-container { padding: 20px; }
  .options { flex-direction: column; }
  .option-btn { width: 100%; }
}
