:root {
  --bg: #faf7fb;
  --surface: #ffffff;
  --ink: #1f1730;
  --muted: #6b6380;
  --line: #ece6f0;
  --brand: #7b3fe4;
  --brand-soft: #efe6fd;
  --accent: #e0468a;
  --ok: #1c8c5a;
  --warn: #b06a00;
  --warn-bg: #fff5e3;
  --crise: #c12b3c;
  --crise-bg: #fdecee;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(60, 30, 90, .08);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }

.rainbow-bar { height: 5px; background: linear-gradient(90deg,#e40303,#ff8c00,#ffed00,#008026,#004dff,#750787); }

.demo-flag {
  background: #2a2140; color: #f0eafc; text-align: center;
  font-size: .82rem; padding: 6px 12px; letter-spacing: .02em;
}
.demo-flag b { color: #ffd86b; }

header.topo {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topo-inner { max-width: 920px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.logo { font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; }
.logo .plus { color: var(--accent); }
.slogan { color: var(--muted); font-size: .9rem; margin-left: 2px; }

nav.abas { max-width: 920px; margin: 0 auto; padding: 0 18px; display: flex; gap: 4px; }
nav.abas button {
  border: none; background: none; padding: 14px 16px; font-size: .98rem; font-weight: 600;
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent;
}
nav.abas button.ativa { color: var(--brand); border-bottom-color: var(--brand); }
nav.abas button:hover { color: var(--ink); }

main { max-width: 920px; margin: 0 auto; padding: 22px 18px 60px; }
.painel { display: none; }
.painel.ativo { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

h2.titulo { font-size: 1.35rem; margin: 4px 0 2px; }
p.sub { color: var(--muted); margin: 0 0 18px; }

/* ---- Chat ---- */
.chat-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; flex-direction: column; height: min(60vh, 520px);
}
.mensagens { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.bolha { max-width: 86%; padding: 12px 15px; border-radius: 14px; white-space: pre-wrap; }
.bolha.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.bolha.bot { align-self: flex-start; background: var(--brand-soft); color: var(--ink); border-bottom-left-radius: 4px; }
.bolha .tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--brand); background: #fff; border-radius: 20px; padding: 2px 9px; margin-bottom: 7px; }
.disclaimer { font-size: .82rem; color: var(--muted); margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); }

.encam { margin-top: 12px; }
.encam-titulo { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 8px; }
.prof-mini { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-weight: 800; display: grid; place-items: center; flex: none; }
.prof-mini .nome { font-weight: 700; font-size: .95rem; }
.prof-mini .det { font-size: .82rem; color: var(--muted); }
.badge-treino { display: inline-block; font-size: .7rem; font-weight: 700; color: var(--ok); background: #e7f6ee; border-radius: 20px; padding: 2px 8px; margin-top: 4px; }

.crise-card { background: var(--crise-bg); border: 1.5px solid #f3b5bc; border-radius: 14px; padding: 14px 16px; margin-top: 6px; }
.crise-card h4 { margin: 0 0 6px; color: var(--crise); }
.crise-card ul { margin: 10px 0 0; padding-left: 18px; }
.crise-card li { margin-bottom: 4px; }
.atencao-tag { color: var(--warn); background: var(--warn-bg); border-radius: 20px; padding: 2px 10px; font-size: .78rem; font-weight: 700; }

.barra-entrada { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px; align-items: flex-end; }
.barra-entrada textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px;
  font: inherit; max-height: 120px; outline: none; }
.barra-entrada textarea:focus { border-color: var(--brand); }
.btn { border: none; border-radius: 12px; padding: 11px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.btn-prim { background: var(--brand); color: #fff; }
.btn-prim:disabled { opacity: .5; cursor: default; }
.btn-mic { background: var(--brand-soft); color: var(--brand); font-size: 1.15rem; width: 46px; }
.btn-mic.gravando { background: var(--crise); color: #fff; animation: pulse 1.1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(193,43,60,.5);} 50% { box-shadow: 0 0 0 8px rgba(193,43,60,0);} }
.sugestoes { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.sugestoes button { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 8px 13px; font-size: .85rem; cursor: pointer; color: var(--ink); }
.sugestoes button:hover { border-color: var(--brand); color: var(--brand); }
.digitando { font-size: .85rem; color: var(--muted); font-style: italic; }

/* ---- Profissionais ---- */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filtros select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.prof-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.prof-card .topo-card { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.prof-card .nome { font-weight: 700; }
.prof-card .titulo-prof { font-size: .85rem; color: var(--muted); }
.prof-card .bio { font-size: .9rem; margin: 8px 0; }
.chip { display: inline-block; font-size: .78rem; background: var(--brand-soft); color: var(--brand); border-radius: 20px; padding: 3px 10px; margin: 2px 4px 2px 0; }

/* ---- Blog ---- */
.artigos { display: flex; flex-direction: column; gap: 12px; }
.artigo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); cursor: pointer; }
.artigo-card:hover { border-color: var(--brand); }
.artigo-card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.artigo-card .meta { font-size: .8rem; color: var(--muted); }
.artigo-corpo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); white-space: pre-wrap; }
.voltar { background: none; border: none; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; padding: 0; margin-bottom: 14px; }

footer.rodape { max-width: 920px; margin: 0 auto; padding: 22px 18px 40px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }
footer.rodape a { color: var(--muted); }

.lgpd { background: var(--brand-soft); border-radius: 12px; padding: 10px 14px; font-size: .83rem; color: #4a2c7a; margin-bottom: 16px; }
.vazio { color: var(--muted); padding: 30px; text-align: center; }
