/* Página do formulário de avaliação */
.back {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
  transition: color 0.2s;
}
.back:hover { color: #fff; }

.form-head { text-align: center; margin-bottom: 26px; }
.logo-sm { width: 64px; height: 64px; margin-bottom: 14px; }
.form-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.form-head h1 span { color: var(--red); }
.form-head p { color: var(--muted); font-size: 15px; margin-top: 10px; }

.progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 20%;
  background: var(--red);
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(255, 26, 26, 0.7);
  transition: width 0.45s cubic-bezier(.2,.8,.2,1);
}
.step-count { color: var(--muted); font-size: 12.5px; margin: 8px 0 14px; text-align: right; }

.form-card { padding: 24px 20px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

fieldset { border: 0; }
.step { display: none; }
.step.active { display: grid; gap: 20px; animation: stepIn 0.35s cubic-bezier(.2,.8,.2,1); }
@keyframes stepIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

legend {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 20px;
  padding: 0;
}

.field { display: grid; gap: 8px; }
.field > span { font-size: 14.5px; font-weight: 600; }
.row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; }

input[type="text"], input[type="tel"], input[type="number"], textarea {
  width: 100%;
  font: 400 16px/1.4 "Inter", Arial, sans-serif;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 84px; }
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, 0.3); }
input:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.18); }
.invalid { border-color: var(--red) !important; }

/* Opções (rádio estilizado) */
.options { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.options label, .chips label { position: relative; cursor: pointer; }
.options input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.options i, .chips i {
  display: block;
  font-style: normal;
  font-size: 15px;
  border: 1.5px solid var(--card-border);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.options i { padding: 13px 14px 13px 42px; position: relative; }
.options i::before {
  content: "";
  position: absolute;
  left: 14px; top: 50%;
  width: 16px; height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
}
.chips i { padding: 10px 18px; }
.options label:hover i, .chips label:hover i { border-color: rgba(255, 255, 255, 0.35); }
.options input:checked + i, .chips input:checked + i {
  border-color: var(--red);
  background: rgba(255, 26, 26, 0.12);
}
.options input:checked + i::before { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 3px #1a0505; }
.options input:focus-visible + i, .chips input:focus-visible + i { box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.3); }
.group-invalid i { border-color: rgba(255, 26, 26, 0.6); }

.reveal { margin-top: 2px; animation: revealIn 0.3s cubic-bezier(.2,.8,.2,1); }
.reveal[hidden] { display: none; }
.reveal textarea { min-height: 64px; }
@keyframes revealIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.hint { color: var(--muted); font-size: 14px; margin-top: -8px; }

.yn-list { display: grid; gap: 10px; }
.yn {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.yn p { font-size: 14px; line-height: 1.4; }
.yn .chips { flex-wrap: nowrap; }
.yn .chips i { padding: 8px 14px; font-size: 14px; }

/* Régua de prioridade */
.range-wrap { display: flex; align-items: center; gap: 16px; }
input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--red) var(--p, 70%), rgba(255, 255, 255, 0.12) var(--p, 70%));
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--red);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--red);
  cursor: pointer;
}
output {
  min-width: 48px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--red);
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
}
.consent input {
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--red);
  cursor: pointer;
}

.error { color: #ff6b6b; font-size: 14px; min-height: 20px; margin-top: 16px; }

.nav { display: flex; gap: 12px; margin-top: 6px; }
.nav .btn-ghost { flex: 0 0 34%; }
.nav .btn-red[disabled] { opacity: 0.6; cursor: wait; }

/* Sucesso */
.done { padding: 36px 22px; text-align: center; display: grid; gap: 14px; }
.done[hidden] { display: none; }
.done h2 { font-size: 24px; font-weight: 800; }
.done p { color: var(--muted); margin-bottom: 8px; }
.check { width: 72px; height: 72px; margin: 0 auto 4px; }
.check svg { width: 100%; height: 100%; fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 0.6s ease-out forwards; }
.check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 0.4s 0.5s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 420px) {
  .row { grid-template-columns: 1fr; }
  .yn { grid-template-columns: 1fr; }
  .form-head h1 { font-size: 26px; }
}
