/* Página da demonstração (/teste) */
[hidden] { display: none !important; }
.demo-pagina { background: var(--gelo); min-height: 100vh; }

.demo-topo { background: linear-gradient(175deg, var(--petroleo) 0%, var(--petroleo-2) 100%); color: #fff; }
.demo-topo__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.demo-topo .brand { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.demo-topo .brand__mark { width: 26px; height: 26px; color: #fff; }
.demo-topo .brand__word { font-family: var(--f-titulo); font-size: 1.1rem; color: #fff; }
.demo-topo .brand__word b { color: var(--lavanda); }
.demo-selo {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px;
  background: rgba(185,180,245,.18); color: var(--lavanda-2); font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.demo-selo--claro { background: rgba(185,180,245,.22); color: var(--lavanda-2); }

.demo-main { padding: 36px 0 60px; }
.demo-nota { font-size: .86rem; color: var(--muted); }
.demo-nota a { color: var(--petroleo); font-weight: 700; }
.demo-erro { min-height: 1.2em; margin-top: 6px; color: #A2453B; font-size: .88rem; font-weight: 600; }

/* 1. Chave */
.demo-entrar {
  max-width: 560px; margin: 6vh auto 0; padding: 36px; border-radius: var(--r-lg);
  background: #fff; box-shadow: var(--sombra); display: grid; gap: 16px;
  animation: demo-entra .45s cubic-bezier(.2,.7,.2,1) both;
}
.demo-entrar h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.demo-entrar > p { color: var(--muted); }
.demo-chave label { font-weight: 700; font-size: .9rem; }
.demo-chave__linha { display: flex; gap: 10px; margin-top: 6px; }
.demo-chave input {
  flex: 1; min-width: 0; height: 52px; padding: 0 16px; border: 1.5px solid var(--linha); border-radius: 12px;
  font: 600 1.25rem/1 var(--f-titulo); letter-spacing: .12em; text-transform: uppercase; color: var(--texto);
}
.demo-chave input:focus { outline: 0; border-color: var(--petroleo); box-shadow: 0 0 0 4px rgba(185,180,245,.45); }

/* 2. Conversa */
.demo-conversa {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 28px; align-items: start;
  animation: demo-entra .45s cubic-bezier(.2,.7,.2,1) both;
}
.demo-lado { display: grid; gap: 14px; padding-top: 12px; }
.demo-lado__ramo { color: var(--petroleo); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.demo-lado h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 600; }
.demo-lado__texto { color: var(--muted); max-width: 52ch; }
.demo-contador { display: grid; gap: 6px; max-width: 360px; font-weight: 700; font-size: .9rem; color: var(--petroleo); }
.demo-contador__barra { height: 8px; border-radius: 999px; background: #dfe6e4; overflow: hidden; }
.demo-contador__barra span { display: block; height: 100%; width: 0; background: var(--petroleo-3); border-radius: inherit; transition: width .4s cubic-bezier(.2,.7,.2,1); }
.btn--ghost-escuro { justify-self: start; color: var(--petroleo); border-color: rgba(14,79,76,.35); background: transparent; }
.btn--ghost-escuro:hover { background: #fff; }

.demo-celular {
  display: flex; flex-direction: column; height: min(680px, calc(100vh - 140px)); min-height: 480px;
  border-radius: 28px; overflow: hidden; background: #efeae2; box-shadow: 0 24px 60px -24px rgba(10,61,59,.45);
  border: 8px solid var(--grafite);
}
.demo-celular__topo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #075e54; color: #fff; }
.demo-avatar {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--lavanda); color: var(--petroleo-2); font: 600 .85rem var(--f-titulo);
}
.demo-celular__nome { display: grid; line-height: 1.2; }
.demo-celular__nome small { opacity: .8; font-size: .76rem; }

.demo-mensagens { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.demo-msg {
  max-width: 82%; padding: 7px 10px 5px; border-radius: 10px; font-size: .93rem; line-height: 1.4;
  box-shadow: 0 1px 1px rgba(0,0,0,.08); animation: demo-balao .25s ease-out both; white-space: pre-wrap; overflow-wrap: anywhere;
}
.demo-msg small { display: block; text-align: right; font-size: .68rem; color: #667781; margin-top: 2px; }
.demo-msg--cliente { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 3px; }
.demo-msg--ia { align-self: flex-start; background: #fff; border-top-left-radius: 3px; }
.demo-msg--sistema {
  align-self: center; max-width: 92%; background: #fff7d6; color: #5b4a12; text-align: center; font-size: .86rem; border-radius: 10px;
}
.demo-digitando { display: flex; gap: 4px; padding: 12px 14px; }
.demo-digitando i { width: 7px; height: 7px; border-radius: 50%; background: #9aa5a3; animation: demo-pula 1s infinite ease-in-out; }
.demo-digitando i:nth-child(2) { animation-delay: .15s; }
.demo-digitando i:nth-child(3) { animation-delay: .3s; }

.demo-sugestoes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.demo-sugestao {
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(7,94,84,.3); background: #fff; color: #075e54;
  font: 600 .82rem var(--f-texto); cursor: pointer; transition: background .15s, transform .15s;
}
.demo-sugestao:hover { background: #e7f6f2; transform: translateY(-1px); }

.demo-envio { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; background: #f0f2f5; }
.demo-envio textarea {
  flex: 1; resize: none; max-height: 120px; padding: 10px 14px; border: 0; border-radius: 20px; background: #fff;
  font: 400 .95rem/1.35 var(--f-texto); color: var(--texto);
}
.demo-envio textarea:focus { outline: 2px solid var(--lavanda); }
.demo-enviar {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: #00a884; cursor: pointer; transition: transform .15s;
}
.demo-enviar:hover { transform: scale(1.06); }
.demo-enviar svg { width: 20px; height: 20px; fill: #fff; }
.demo-celular .demo-erro { margin: 0; padding: 0 12px 8px; background: #f0f2f5; }

/* 3. Fechamento */
.demo-fim { margin-top: 44px; display: grid; gap: 22px; animation: demo-entra .5s cubic-bezier(.2,.7,.2,1) both; }
.demo-fim__topo { display: grid; gap: 10px; max-width: 760px; }
.demo-fim__topo .demo-selo { justify-self: start; background: rgba(14,79,76,.1); color: var(--petroleo); }
.demo-fim__topo h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.demo-fim__topo p { color: var(--muted); }
.demo-fim__grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.demo-card { padding: 24px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--sombra); display: grid; gap: 12px; }
.demo-card h3 { font-size: 1.15rem; }
.demo-passos, .demo-exemplos, .demo-oferta { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: .94rem; }
.demo-card--oferta { background: linear-gradient(175deg, var(--petroleo) 0%, var(--petroleo-2) 100%); color: #fff; }
.demo-card--oferta h3 { font-size: 1.35rem; font-weight: 600; }
.demo-card--oferta .demo-nota { color: rgba(255,255,255,.7); }
.demo-card--oferta .demo-selo { justify-self: start; }
.demo-preco { display: flex; align-items: baseline; gap: 4px; }
.demo-preco strong { font: 600 2.4rem/1 var(--f-titulo); }
.demo-preco span { opacity: .75; }
.demo-pergunta { margin: 6px 0 0; font: 600 1.15rem var(--f-titulo); }
.demo-acoes { display: grid; gap: 10px; }
.demo-ok { padding: 12px 14px; border-radius: 12px; background: rgba(185,180,245,.2); color: #fff; font-weight: 600; }
.demo-rever { background: #fff; border-radius: var(--r); box-shadow: var(--sombra); }
.demo-rever summary { padding: 14px 18px; font-weight: 700; cursor: pointer; }
.demo-mensagens--rever { background: #efeae2; max-height: 420px; border-radius: 0 0 var(--r) var(--r); }

@keyframes demo-entra { from { opacity: 0; transform: translateY(12px); } }
@keyframes demo-balao { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes demo-pula { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-4px); opacity: 1; } }

@media (max-width: 960px) {
  .demo-conversa { grid-template-columns: 1fr; }
  .demo-lado { padding-top: 0; }
  .demo-fim__grade { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .demo-entrar { padding: 24px; }
  .demo-chave__linha { flex-direction: column; }
  .demo-celular { border-width: 0; border-radius: 18px; height: calc(100vh - 120px); }
}

/* Fechamento: escolha do nível e das conversas por mês */
.demo-escolha { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.08); }
.demo-opcao {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1px;
  min-height: 42px;
  padding: 7px 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: rgba(255,255,255,.82);
  font: 700 .86rem var(--f-texto);
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s;
}
.demo-opcao:not(.is-ativa):hover:not(:disabled) { background: rgba(255,255,255,.1); color: #fff; }
.demo-opcao.is-ativa { background: #fff; color: var(--petroleo); box-shadow: 0 6px 16px -8px rgba(0,0,0,.45); animation: demo-opcao-entrar .25s ease-out; }
.demo-opcao:disabled { cursor: default; }
.demo-opcao:disabled:not(.is-ativa) { opacity: .45; }
.demo-opcao small { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--lavanda); }
.demo-opcao.is-ativa small { color: var(--petroleo-3); }
@keyframes demo-opcao-entrar { from { transform: scale(.94); } }
.demo-nivel-desc { margin: -4px 0 0; min-height: 2.6em; color: rgba(255,255,255,.75); font-size: .86rem; line-height: 1.45; }
#fim-mensal.is-mudou { display: inline-block; animation: demo-preco-mudou .35s ease-out; }
@keyframes demo-preco-mudou { from { opacity: .3; transform: translateY(6px); } }
