:root {
  --laranja: #F34814;
  --creme: #F5F1ED;
  --preto: #1C1C1C;
  --preto-suave: rgba(28,28,28,0.65);
  --borda: rgba(28,28,28,0.10);
  --fonte: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--creme);
  font-family: var(--fonte);
  color: var(--preto);
}

.app {
  max-width: 640px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--creme);
}

/* ---------- Header ---------- */

.topbar {
  padding: 20px 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
  background: var(--creme);
  border-bottom: 1px solid var(--borda);
}

.logo {
  height: 26px;
  width: auto;
  align-self: flex-start;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(28,28,28,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--laranja);
  border-radius: 999px;
  transition: width .45s ease;
}

.progress-label {
  align-self: flex-end;
  font-size: 12px;
  font-weight: 600;
  color: var(--preto-suave);
}

/* ---------- Chat area ---------- */

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.bubble-row {
  align-self: flex-start;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 88%;
  animation: rise .35s ease both;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--borda);
  background: var(--creme);
}

.bubble {
  max-width: 100%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 15.5px;
  line-height: 1.5;
}

.bubble.user {
  align-self: flex-end;
  max-width: 84%;
  background: var(--preto);
  color: var(--creme);
  border-bottom-right-radius: 4px;
  font-weight: 500;
  animation: rise .35s ease both;
}

.bubble.bot {
  background: #FFFFFF;
  color: var(--preto);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--borda);
}

.typing {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
  background: #FFFFFF;
  border: 1px solid var(--borda);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}

.typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--preto-suave);
  animation: blink 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
  0%, 80%, 100% { opacity: .25; }
  40% { opacity: 1; }
}

/* ---------- Composer (input area) ---------- */

.composer {
  flex-shrink: 0;
  padding: 14px 20px 22px;
  background: var(--creme);
  border-top: 1px solid var(--borda);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  font-family: var(--fonte);
  font-weight: 600;
  font-size: 15px;
  color: var(--preto);
  background: #FFFFFF;
  border: 1.5px solid var(--borda);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.option-btn:hover {
  border-color: var(--laranja);
  background: #FFFBF9;
}

.text-row {
  display: flex;
  gap: 10px;
}

.text-input {
  flex: 1;
  font-family: var(--fonte);
  font-size: 15.5px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--borda);
  background: #FFFFFF;
  color: var(--preto);
  outline: none;
}

.text-input:focus {
  border-color: var(--laranja);
}

.send-btn {
  font-family: var(--fonte);
  font-weight: 700;
  font-size: 15px;
  background: var(--laranja);
  color: var(--creme);
  border: none;
  border-radius: 12px;
  padding: 0 22px;
  cursor: pointer;
}

.send-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--preto-suave);
}

.checkbox-row a { color: var(--preto); text-decoration: underline; }

.checkbox-row input { margin-top: 3px; }

.error-text {
  color: var(--laranja);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Resultado: gauge ---------- */

.result-card {
  width: 100%;
  max-width: 420px;
  background: #FFFFFF;
  border: 1px solid var(--borda);
  border-radius: 20px;
  padding: 24px 22px 22px;
  text-align: left;
  animation: rise .5s ease both;
}

.gauge-label {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 12.5px;
  font-weight: 600;
  opacity: .65;
  margin-bottom: 18px;
  text-align: left;
}

.indicador-liberado {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  background: var(--creme);
  border-radius: 14px;
  padding: 16px;
}

.indicador-dot { font-size: 20px; line-height: 1; margin-top: 2px; }

.indicador-nome {
  font-weight: 800;
  font-size: 16px;
}

.indicador-classificacao {
  font-weight: 700;
  font-size: 14px;
  color: var(--laranja);
  margin: 4px 0 8px;
}

.indicador-texto {
  font-size: 14px;
  line-height: 1.55;
  color: var(--preto-suave);
  margin: 0;
}

.lista-indicadores {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.item-indicador {
  font-size: 14px;
  font-weight: 600;
  opacity: .55;
}

.item-indicador.liberado {
  opacity: 1;
  color: var(--preto);
}

/* ---------- Relatório bloqueado ---------- */

.locked-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  margin-top: 4px;
}

.locked-content {
  filter: blur(5px);
  pointer-events: none;
  user-select: none;
  background: #FFFFFF;
  border: 1px solid var(--borda);
  border-radius: 20px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.locked-content h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.locked-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--preto-suave);
}

.locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.lock-icon {
  width: 34px;
  height: 34px;
  color: var(--preto);
}

.locked-overlay p {
  font-weight: 700;
  font-size: 16px;
  max-width: 26ch;
  line-height: 1.4;
}

.unlock-btn {
  font-family: var(--fonte);
  font-weight: 700;
  font-size: 15px;
  background: var(--laranja);
  color: var(--creme);
  border: none;
  border-radius: 999px;
  padding: 16px 30px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(243,72,20,0.3);
}

/* ---------- Scrollbar discreto ---------- */

.chat::-webkit-scrollbar { width: 6px; }
.chat::-webkit-scrollbar-thumb { background: rgba(28,28,28,0.15); border-radius: 999px; }

@media (max-width: 480px) {
  .bubble { max-width: 90%; }
  .topbar { padding: 16px 16px 12px; }
  .chat { padding: 20px 14px 10px; }
  .composer { padding: 12px 14px 18px; }
}
