/* Fase 4: Centro de Comando de trabalho (andamento, Cérebro, Assistente, equipe, conexões) e os bonequinhos do mapa. */

.vermelho { color: var(--red); }

/* ---------- texto em Markdown ---------- */
.md { font-size: 14px; line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { letter-spacing: -.01em; margin: 1.5em 0 .5em; line-height: 1.25; scroll-margin-top: 14px; }
.md h1 { font-size: 22px; font-weight: 800; }
.md h2 { font-size: 18px; font-weight: 700; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.md h3 { font-size: 15.5px; font-weight: 700; }
.md h4, .md h5, .md h6 { font-size: 14px; font-weight: 700; color: var(--text2); }
.md p { margin: .65em 0; }
.md ul, .md ol { margin: .5em 0 .5em 1.4em; }
.md li { margin: .22em 0; }
.md li > ul, .md li > ol { margin-top: .2em; }
.md strong { font-weight: 700; color: #fff; }
.md code { font-family: var(--mono); font-size: 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; color: #cfe3ff; }
.md .md-code { background: #070a10; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; overflow-x: auto; margin: .9em 0; }
.md .md-code code { background: none; border: none; padding: 0; font-size: 12px; line-height: 1.7; color: #b6c4d8; white-space: pre; }
.md blockquote { border-left: 3px solid var(--accent2); background: var(--accent-dim); margin: .9em 0; padding: 1px 16px; border-radius: 0 10px 10px 0; color: var(--text2); }
.md hr { border: none; border-top: 1px solid var(--border); margin: 1.6em 0; }
.md a { color: var(--accent); }
.md .md-tabela { overflow-x: auto; margin: .9em 0; border: 1px solid var(--border); border-radius: 10px; }
.md table { border-collapse: collapse; font-size: 13px; width: 100%; }
.md th { text-align: left; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); font-weight: 500; padding: 9px 12px; border-bottom: 1px solid var(--border); background: rgba(17,22,33,.6); white-space: nowrap; }
.md td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.md tr:last-child td { border-bottom: none; }

/* ---------- janela do projeto: andamento ---------- */
.andamento-estado { border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent); border-radius: 14px; padding: 14px 16px; margin: 4px 0 16px; }
.andamento-estado-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13.5px; flex-wrap: wrap; }
.andamento-estado-topo b { display: inline-flex; align-items: center; gap: 8px; }
.andamento-estado-topo .ic { color: var(--accent); }
.andamento-campos { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.andamento-campos textarea { min-height: 62px; }
.andamento-campos .bloqueio .field-label { color: var(--red); }
.andamento-item .andamento-topo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.andamento-item .andamento-topo .btn { margin-left: 2px; }
.nota-nova select.mini { margin-top: 2px; flex: none; }
.cartao-agora { font-size: 12px; color: var(--text2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cartao-trava { font-size: 11.5px; color: #fca5a5; line-height: 1.35; display: flex; gap: 6px; align-items: flex-start; }
.cartao-trava .ic { margin-top: 2px; color: var(--red); }
.tarefa > select.mini { max-width: 118px; }

/* ---------- Andamento ---------- */
.and-barra2 { display: flex; align-items: center; gap: 14px; margin: -4px 0 14px; flex-wrap: wrap; }
.and-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.and-lateral { position: sticky; top: 4px; max-height: calc(100vh - 240px); overflow: auto; }
.and-grupo header { display: flex; align-items: center; gap: 10px; padding: 4px 2px 8px; border-bottom: 1px solid var(--border); margin: 20px 0 12px; font-size: 13.5px; }
.and-grupo:first-child header { margin-top: 4px; }
.and-grupo header .mono { font-size: 11px; color: var(--text3); background: var(--bg3); border-radius: 6px; padding: 1px 8px; }
.and-proj { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 15px 11px; margin-bottom: 10px; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; outline: none; }
.and-proj:hover, .and-proj:focus-visible { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(0,0,0,.3); }
.and-proj.com-trava { border-left: 3px solid var(--red); }
.and-proj.pausado { opacity: .66; }
.and-proj-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.and-proj-topo h4 { font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.and-tags { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.and-linhas { display: grid; gap: 5px; margin-top: 10px; }
.and-l { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; font-size: 12.5px; line-height: 1.45; }
.and-l span { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); padding-top: 3px; display: inline-flex; align-items: flex-start; gap: 4px; }
.and-l p { color: var(--text); }
.and-l.trava span { color: var(--red); }
.and-l.trava p { color: #fca5a5; }
.and-rodape { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; font-size: 11px; }
.and-tarefas { display: inline-flex; gap: 5px; flex-wrap: wrap; min-width: 0; }
.and-tarefas .tag { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.mono.parado { color: var(--amber); }
.and-feed { display: flex; flex-direction: column; gap: 10px; }
.and-feed-item { padding: 9px 11px; border: 1px solid var(--border); border-radius: 11px; background: rgba(17,22,33,.55); font-size: 12.5px; }
.and-feed-item[data-act] { cursor: pointer; }
.and-feed-item[data-act]:hover { border-color: var(--border2); background: var(--card2); }
.and-feed-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.and-feed-topo .mono { font-size: 10px; color: var(--text3); white-space: nowrap; }
.and-feed-item b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.and-feed-item p { color: var(--text2); line-height: 1.45; }

/* ---------- Cérebro ---------- */
.painel-corpo:has(> .cer), .painel-corpo:has(> .asst) { overflow: hidden; }
.cer { display: grid; grid-template-columns: 290px minmax(0, 1fr); height: 100%; min-height: 460px; }
.cer-lado { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: rgba(9,12,19,.5); }
.cer-lado-topo { display: flex; gap: 6px; align-items: center; padding: 14px 12px 8px; }
.cer-lado-topo .busca-mini { flex: 1; min-width: 0; }
.cer-lista { overflow-y: auto; flex: 1; padding: 4px 8px 10px; }
.cer-grupo-nome { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--text3); padding: 14px 8px 6px; }
.cer-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; margin-bottom: 2px; }
.cer-item:hover { background: var(--bg3); }
.cer-item.sel { background: var(--accent-dim); border-color: rgba(74,222,128,.22); }
.cer-item b { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.cer-item b .ic { color: var(--amber); }
.cer-item small { display: block; color: var(--text3); font-size: 11px; margin-top: 3px; line-height: 1.4; }
.cer-item small.sec { color: var(--blue); font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; }
.cer-lado-rodape { padding: 10px 12px 14px; border-top: 1px solid var(--border); }
.cer-lado-rodape .btn { width: 100%; }
.cer-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.cer-vazio { margin: auto; max-width: 480px; }
.cer-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 24px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cer-titulo h2 { font-size: 19px; letter-spacing: -.02em; }
.cer-meta { display: flex; align-items: center; gap: 7px; margin-top: 7px; flex-wrap: wrap; font-size: 11.5px; }
.cer-acoes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cer-corpo { flex: 1; overflow-y: auto; padding: 18px 28px 40px; min-height: 0; }
.cer-leitura { max-width: 880px; }
.cer-editor { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 360px; }
.cer-editor textarea { flex: 1; min-height: 320px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; resize: none; tab-size: 2; }
.cer-editor-rodape { display: flex; gap: 8px; align-items: center; }
.cer-editor-rodape input { flex: 1; }
.cer-hist-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg3); margin-bottom: 8px; font-size: 13px; }
.cer-hist-item b { font-family: var(--mono); color: var(--accent); width: 34px; }
.cer-hist-item small { color: var(--text3); font-size: 11.5px; margin-top: 2px; }
.cer-achados .cer-item small { white-space: normal; }

/* ---------- Assistente ---------- */
.asst { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: 100%; min-height: 460px; }
.asst-lado { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: rgba(9,12,19,.5); }
.asst-lado-topo { display: flex; padding: 14px 12px 8px; }
.asst-lista { overflow-y: auto; flex: 1; padding: 4px 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.asst-conv { display: block; width: 100%; text-align: left; padding: 10px 11px; border-radius: 11px; border: 1px solid transparent; background: transparent; }
.asst-conv:hover { background: var(--bg3); }
.asst-conv.sel { background: var(--accent-dim); border-color: rgba(74,222,128,.22); }
.asst-conv-topo { display: flex; align-items: center; gap: 7px; }
.asst-conv-topo b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.asst-conv-topo .ic { color: var(--text3); flex: none; }
.asst-conv small { display: block; color: var(--text3); font-size: 11.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asst-conv small.rod { font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; }
.asst-icone { width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: none; background: linear-gradient(135deg, #c084fc, #60a5fa); color: #0a1020; }
.asst-icone.claude { background: linear-gradient(135deg, #fb923c, #f97316); }
.asst-icone.gpt { background: linear-gradient(135deg, #4ade80, #22d3ee); }
.asst-icone.p { width: 18px; height: 18px; border-radius: 6px; }
.asst-icone.p .ic { color: #0a1020; }
.asst-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: radial-gradient(ellipse at top right, rgba(192,132,252,.05), transparent 60%); }
.asst-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.asst-tit { display: flex; align-items: center; gap: 10px; min-width: 0; }
.asst-tit b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.asst-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asst-ctl select.mini { max-width: 170px; }
.asst-thread { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; min-height: 0; scroll-behavior: smooth; }
.asst-boas-vindas { margin: auto; text-align: center; max-width: 560px; padding: 20px 0; }
.asst-bv-icone { width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; color: var(--dev); background: var(--dev-dim); border: 1px solid rgba(192,132,252,.25); }
.asst-boas-vindas h3 { font-size: 21px; letter-spacing: -.02em; margin-bottom: 8px; }
.asst-boas-vindas p { color: var(--text2); line-height: 1.6; font-size: 13.5px; }
.asst-entradas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.asst-entrada { background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 9px 16px; font-size: 12.5px; font-weight: 600; transition: all .2s; }
.asst-entrada:hover { border-color: rgba(192,132,252,.5); color: #fff; background: var(--dev-dim); }
.asst-msg { max-width: min(860px, 100%); }
.asst-msg.user { align-self: flex-end; max-width: min(680px, 88%); }
.asst-autor { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12.5px; }
.asst-msg.user .asst-autor { justify-content: flex-end; }
.asst-autor b { font-weight: 700; }
.asst-autor time { font-family: var(--mono); font-size: 10px; color: var(--text3); }
.asst-autor .modelo { font-family: var(--mono); font-size: 9.5px; color: var(--text3); background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; }
.asst-autor .btn { margin-left: auto; opacity: 0; transition: opacity .15s; }
.asst-msg:hover .asst-autor .btn { opacity: 1; }
.asst-rosto { border-radius: 8px; background: rgba(17,22,33,.8); border: 1px solid var(--border2); }
.asst-texto { background: linear-gradient(135deg, rgba(34,197,94,.22), rgba(22,163,74,.12)); border: 1px solid rgba(74,222,128,.26); border-radius: 14px 4px 14px 14px; padding: 10px 14px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.asst-msg.ia > .md { background: var(--card); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; padding: 12px 16px; margin-bottom: 6px; }
.asst-uso { font-family: var(--mono); font-size: 9.5px; color: var(--text3); margin: 4px 2px 0; }
.asst-ferr { border: 1px solid var(--border); background: var(--bg3); border-radius: 10px; margin: 0 0 6px; font-size: 12px; overflow: hidden; }
.asst-ferr summary { cursor: pointer; padding: 7px 11px; display: flex; align-items: center; gap: 8px; color: var(--text2); list-style: none; }
.asst-ferr summary::-webkit-details-marker { display: none; }
.asst-ferr summary .ic { color: var(--text3); }
.asst-ferr.escrita { border-color: rgba(74,222,128,.28); background: var(--accent-dim); }
.asst-ferr.escrita summary { color: var(--accent); }
.asst-ferr.escrita summary .ic { color: var(--accent); }
.asst-ferr.erro { border-color: rgba(248,113,113,.3); background: var(--red-dim); }
.asst-ferr.erro summary, .asst-ferr.erro summary .ic { color: var(--red); }
.asst-ferr pre { margin: 0; padding: 8px 12px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 11px; color: #b6c4d8; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.asst-ferr pre.saida { color: var(--text3); }
.asst-ferr .spinner { width: 12px; height: 12px; }
.asst-erro { display: flex; gap: 9px; align-items: flex-start; color: #fca5a5; background: var(--red-dim); border: 1px solid rgba(248,113,113,.25); border-radius: 10px; padding: 10px 13px; font-size: 13px; line-height: 1.45; }
.asst-pensando { display: inline-flex; gap: 5px; padding: 8px 4px; }
.asst-pensando i { width: 7px; height: 7px; border-radius: 50%; background: var(--dev); animation: pulsa 1.2s ease-in-out infinite; }
.asst-pensando i:nth-child(2) { animation-delay: .2s; } .asst-pensando i:nth-child(3) { animation-delay: .4s; }
@keyframes pulsa { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.1); } }
.asst-composer { border-top: 1px solid var(--border); padding: 0 0 12px; }
.asst-compor { display: flex; gap: 10px; align-items: flex-end; padding: 12px 20px 0; }
.asst-compor textarea { min-height: 44px; max-height: 180px; resize: none; line-height: 1.45; }
.asst-aviso { padding: 6px 22px 0; font-size: 10.5px; color: var(--text3); }
.so-lista { display: none; }

/* ---------- Equipe ---------- */
.eq-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.eq-cartao { display: flex; gap: 16px; align-items: flex-start; }
.eq-cartao.offline { opacity: .82; }
.eq-boneco { flex: none; width: 104px; min-height: 120px; display: flex; align-items: center; justify-content: center; position: relative; background: radial-gradient(ellipse at 50% 85%, rgba(74,222,128,.10), transparent 70%), var(--bg3); border: 1px solid var(--border); border-radius: 14px; }
.eq-cartao.ia .eq-boneco { background: radial-gradient(ellipse at 50% 85%, rgba(34,211,238,.14), transparent 70%), var(--bg3); }
.eq-ponto { position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: #475569; }
.eq-ponto.online { background: var(--ok); box-shadow: 0 0 9px var(--ok); }
.eq-ponto.ia { background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.eq-info { min-width: 0; flex: 1; }
.eq-info h4 { font-size: 15.5px; letter-spacing: -.01em; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.eq-cargo { color: var(--text3); font-size: 12px; margin-top: 2px; }
.eq-estado { font-size: 12.5px; margin-top: 8px; color: var(--text2); }
.eq-ativ { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; margin-top: 4px; color: var(--cyan); line-height: 1.4; }
.eq-ativ .ic { margin-top: 2px; }
.eq-numeros { display: flex; gap: 14px; margin-top: 10px; font-size: 11.5px; color: var(--text3); }
.eq-numeros b { color: var(--text); font-size: 15px; margin-right: 3px; }
.eq-numeros .vermelho b { color: var(--red); }
.eq-botoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.mesa-lista { display: flex; flex-direction: column; gap: 6px; }
.mesa-tarefa { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg3); font-size: 13px; }
.mesa-tarefa.fazendo { border-left: 3px solid var(--accent); }
.mesa-tarefa b { font-weight: 600; }
.mesa-tarefa small { display: block; color: var(--text3); font-size: 11.5px; margin-top: 2px; }
.mesa-tarefa small a { color: var(--text3); text-decoration: none; }
.mesa-tarefa small a:hover { color: var(--text); }

/* ---------- Conectar IAs ---------- */
.con-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg3); }
.con-item small { display: block; color: var(--text3); font-size: 11.5px; margin-top: 2px; }
.con-receita ol, .con-passos { margin: 4px 0 12px 1.3em; color: var(--text2); font-size: 13px; line-height: 1.6; }
.con-receita li, .con-passos li { margin: 4px 0; }
.con-codigo { white-space: pre-wrap; word-break: break-all; }

/* ---------- Ajustes: chaves das IAs ---------- */
.ia-chaves { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.ia-chave { border: 1px solid var(--border); border-radius: 13px; padding: 14px 16px; background: var(--bg3); }
.ia-chave-topo { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ia-resultado { font-size: 12.5px; line-height: 1.5; border-radius: 10px; padding: 9px 12px; background: var(--bg); border: 1px solid var(--border); }
.ia-resultado.ok { color: var(--ok); border-color: rgba(74,222,128,.3); }
.ia-resultado.erro { color: #fca5a5; border-color: rgba(248,113,113,.3); }

/* ---------- Editor do bonequinho ---------- */
.bn-editor { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
.bn-palco { text-align: center; background: radial-gradient(ellipse at 50% 80%, rgba(74,222,128,.12), transparent 70%), var(--bg3); border: 1px solid var(--border); border-radius: 16px; padding: 18px 10px 14px; align-self: start; }
.bn-grande { display: flex; justify-content: center; }
.bn-opcoes .campo { margin-bottom: 14px; }
.bn-cores { display: flex; gap: 8px; flex-wrap: wrap; }
.bn-cor { width: 28px; height: 28px; border-radius: 50%; background: var(--c); border: 2px solid var(--border2); padding: 0; transition: transform .15s, border-color .15s; }
.bn-cor:hover { transform: scale(1.12); }
.bn-cor.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }

/* ---------- Animações dos bonequinhos (editor, cartões e mapa) ---------- */
.bn .bn-perna-e, .bn .bn-perna-d, .bn .bn-braco-e, .bn .bn-braco-d, .pessoa .bn-perna-e, .pessoa .bn-perna-d, .pessoa .bn-braco-e, .pessoa .bn-braco-d { transform-box: fill-box; transform-origin: 50% 8%; }
.bn-anda .bn-perna-e, .pessoa.bn-anda .bn-perna-e { animation: bnPasso .5s ease-in-out infinite alternate; }
.bn-anda .bn-perna-d, .pessoa.bn-anda .bn-perna-d { animation: bnPasso .5s ease-in-out infinite alternate-reverse; }
.bn-anda .bn-braco-e, .pessoa.bn-anda .bn-braco-e { animation: bnPasso .5s ease-in-out infinite alternate-reverse; }
.bn-anda .bn-braco-d, .pessoa.bn-anda .bn-braco-d { animation: bnPasso .5s ease-in-out infinite alternate; }
.bn-anda .bn-corpo, .pessoa.bn-anda .bn-corpo { animation: bnSalto .25s ease-in-out infinite alternate; }
@keyframes bnPasso { from { transform: rotate(-26deg); } to { transform: rotate(26deg); } }
@keyframes bnSalto { from { transform: translateY(0); } to { transform: translateY(-1.3px); } }
.bn-trab .bn-braco-e, .pessoa.bn-trab .bn-braco-e { transform: rotate(-38deg); animation: bnTecla .34s ease-in-out infinite alternate; }
.bn-trab .bn-braco-d, .pessoa.bn-trab .bn-braco-d { transform: rotate(38deg); animation: bnTecla .34s ease-in-out infinite alternate-reverse; }
@keyframes bnTecla { from { transform: rotate(-44deg); } to { transform: rotate(-30deg); } }
.bn-trab .bn-braco-d, .pessoa.bn-trab .bn-braco-d { animation-name: bnTecla2; }
@keyframes bnTecla2 { from { transform: rotate(44deg); } to { transform: rotate(30deg); } }
.bn-trab .bn-cabeca, .pessoa.bn-trab .bn-cabeca { animation: bnAcena 2.6s ease-in-out infinite; }
@keyframes bnAcena { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(.9px); } }
.bn-parado .bn-corpo, .pessoa.bn-parado .bn-corpo { animation: bnRespira 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes bnRespira { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.018); } }

/* ---------- Bonequinhos no mapa ---------- */
.pessoa { pointer-events: none; transition: opacity .5s; }
.pessoa .sombra { fill: rgba(0,0,0,.42); }
.pessoa.saindo { opacity: 0; }
.pessoa .holo rect { fill: rgba(5,9,16,.82); stroke: var(--ac, #4ade80); stroke-width: .9; vector-effect: non-scaling-stroke; }
.pessoa .holo line { stroke: var(--ac, #4ade80); stroke-width: 1; opacity: .85; stroke-linecap: round; }
.pessoa .holo { animation: holo 1.6s ease-in-out infinite; }
@keyframes holo { 0%, 100% { opacity: .9; } 50% { opacity: .55; } }
.gente-tag { cursor: pointer; transition: opacity .4s; }
.gente-tag.saindo { opacity: 0; }
.gt-fundo { fill: rgba(11,16,25,.93); stroke: var(--ac, #4ade80); stroke-width: 1; vector-effect: non-scaling-stroke; }
.gente-tag:hover .gt-fundo { fill: rgba(16,24,38,.98); }
.gt-nome { font: 700 11px 'Inter', sans-serif; fill: var(--text); }
.gt-sub { font: 500 7.6px var(--mono); fill: var(--text3); text-transform: uppercase; letter-spacing: .05em; }
.gt-ponto { fill: var(--ok); filter: drop-shadow(0 0 3px var(--ok)); }
.gt-ponto.ia { fill: var(--cyan); filter: drop-shadow(0 0 3px var(--cyan)); }
.gt-orbe { fill: var(--cyan); filter: drop-shadow(0 0 4px var(--cyan)); animation: orbita 2.4s ease-in-out infinite; }
@keyframes orbita { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.mundo.sem-gente .pessoa, .mundo.sem-gente .gente-tag { display: none; }

/* HUD: equipe agora */
.hud-equipe { display: flex; flex-direction: column; gap: 6px; }
.he-pessoa { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 9px; border: 1px solid transparent; background: transparent; text-align: left; width: 100%; }
.he-pessoa:hover { background: var(--bg3); border-color: var(--border); }
.he-pessoa .bn { flex: none; border-radius: 8px; background: rgba(17,22,33,.8); border: 1px solid var(--border2); }
.he-pessoa b { display: block; font-size: 12px; font-weight: 600; }
.he-pessoa small { display: block; color: var(--text3); font-size: 10.5px; line-height: 1.3; }
.he-pessoa.ia small { color: var(--cyan); }
.he-pessoa.offline { opacity: .5; }
.dica-pessoa { display: flex; gap: 12px; align-items: center; }
.dica-pessoa .bn { flex: none; border-radius: 10px; background: rgba(17,22,33,.8); border: 1px solid var(--border2); }
.dica-pessoa b { display: block; font-size: 14px; }
.dica-pessoa small { display: block; color: var(--text3); font-size: 11px; margin-top: 2px; }
.dica-pessoa p { color: var(--text2); font-size: 12px; margin-top: 5px; line-height: 1.4; }
.user-btn .bn { border-radius: 9px; background: rgba(17,22,33,.8); border: 1px solid var(--border2); }

@media (max-width: 900px) {
  .cer { grid-template-columns: minmax(0, 1fr); height: auto; }
  .cer-lado { max-height: 230px; border-right: none; border-bottom: 1px solid var(--border); }
  .cer-corpo { padding: 14px 14px 30px; }
  .cer-topo { padding: 12px 14px; }
  .asst { grid-template-columns: minmax(0, 1fr); height: auto; }
  .asst-lado { display: none; max-height: 340px; border-right: none; border-bottom: 1px solid var(--border); }
  .asst.ver-lista .asst-lado { display: flex; }
  .asst.ver-lista .asst-main { display: none; }
  .asst-main { min-height: calc(100dvh - 250px); }
  .so-lista { display: inline-flex; }
  .and-layout { grid-template-columns: minmax(0, 1fr); }
  .and-lateral { position: static; max-height: none; }
  .andamento-campos { grid-template-columns: 1fr; }
  .eq-grade { grid-template-columns: minmax(0, 1fr); }
  .bn-editor { grid-template-columns: minmax(0, 1fr); }
  .and-l { grid-template-columns: 52px minmax(0, 1fr); }
  .asst-thread { padding: 14px 12px; }
  .asst-compor { padding: 10px 12px 0; }
}

.avatar.bn-av { background: transparent; width: 32px; height: 32px; padding: 0; overflow: visible; }
.pessoa.entrando, .gente-tag.entrando { animation: aparece .6s ease backwards; }

/* O painel é mais estreito que a tela: o layout reage à largura do próprio painel. */
.painel-corpo { container-type: inline-size; container-name: painel; }
@container painel (max-width: 900px) {
  .and-layout { grid-template-columns: minmax(0, 1fr); }
  .and-lateral { position: static; max-height: none; }
  .andamento-campos { grid-template-columns: 1fr; }
  .eq-grade { grid-template-columns: minmax(0, 1fr); }
  .cer-corpo { padding: 14px 18px 30px; }
}
@media (min-width: 901px) {
  @container painel (max-width: 900px) {
    .cer { grid-template-columns: 230px minmax(0, 1fr); }
    .asst { grid-template-columns: 250px minmax(0, 1fr); }
  }
}

/* ---------- Cofre ---------- */
.cofre-trava { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg3); margin: 14px 0; font-size: 12.5px; color: var(--text2); }
.cofre-trava.aberto { border-color: rgba(74,222,128,.28); background: var(--accent-dim); }
.cofre-trava .grow { flex: 1; min-width: 0; }
.cofre-grupo { margin-top: 16px; }
.cofre-grupo > h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.cofre-lista { display: flex; flex-direction: column; gap: 6px; }
.cofre-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg3); }
.cofre-item .grow { min-width: 0; }
.cofre-item small { display: block; color: var(--text3); font-size: 11.5px; margin-top: 2px; overflow-wrap: anywhere; }
.cofre-item .chips { margin-top: 7px; }
.cofre-valor { display: flex; flex-direction: column; gap: 10px; }
.cofre-linha { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg3); }
.cofre-linha > span { width: 64px; flex: none; color: var(--text3); font-size: 11.5px; }
.cofre-linha code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; user-select: all; white-space: pre-wrap; max-height: 260px; overflow-y: auto; }
.campo-oculto { -webkit-text-security: disc; }
textarea.campo-oculto { font-family: var(--mono); font-size: 12px; }
.prompt-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg3); }
.prompt-item small { display: block; color: var(--text3); font-size: 11.5px; margin-top: 3px; line-height: 1.45; }
.prompt-item .acoes-linha { margin: 0; flex: none; }
.cofre-acoes { display: flex; align-items: center; gap: 2px; flex: none; }
@media (max-width: 760px) {
  .cofre-item { flex-wrap: wrap; }
  .cofre-item .grow { flex: 1 1 calc(100% - 56px); }
  .cofre-acoes { flex: 1 1 100%; justify-content: flex-end; }
  .prompt-item { flex-direction: column; align-items: stretch; }
}
