:root {
  --fundo: #0a0f1e; --painel: rgba(15, 21, 42, 0.92); --painel-solido: #0f152a; --painel2: #161e3a; --borda: #1e2848;
  --borda-forte: #2f3c68; --texto: #e8ecf8; --suave: #8d97b8; --apagado: #5a6488;
  --ambar: #7c5cff; --laranja: #7c5cff; --verde: #2dd4a0; --vermelho: #ff6b6b; --azul: #5aa9ff;
  --raio: 14px; --sombra: 0 10px 30px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fundo); color: var(--texto); overflow: hidden;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  display: grid; grid-template-rows: auto auto 1fr; -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
.num, .barra-info b { font-variant-numeric: tabular-nums; }

/* Topo */
.topo { display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: linear-gradient(180deg, #111936, #0b1022); border-bottom: 1px solid var(--borda); }
.marca { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: .2px; white-space: nowrap; }
.marca b { color: var(--ambar); }
.logo { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, #a78bfa, #7c5cff); display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 2px; padding: 6px 5px; }
.logo i { background: rgba(8, 12, 26, .85); border-radius: 1px; }
.logo i:nth-child(1) { height: 6px; } .logo i:nth-child(2) { height: 11px; } .logo i:nth-child(3) { height: 8px; }
.ocupacao { font-size: 12.5px; color: var(--suave); display: flex; gap: 8px; align-items: center; }
.ocupacao .pilula { padding: 3px 10px; border-radius: 99px; background: var(--painel2); border: 1px solid var(--borda); }
.ocupacao .pilula.on { color: var(--verde); border-color: rgba(62, 207, 142, .35); background: rgba(62, 207, 142, .08); }
.espaco { flex: 1; }
.aguardando { font: inherit; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 99px; background: rgba(124, 92, 255, .14); border: 1px solid rgba(124, 92, 255, .5); color: #c4b5fd; font-size: 13px; font-weight: 500; }
.aguardando b { font-size: 15px; color: var(--ambar); }
.aguardando .sino { width: 8px; height: 8px; border-radius: 50%; background: var(--ambar); box-shadow: 0 0 0 0 rgba(124, 92, 255, .7); animation: sino 1.6s infinite; }
.aguardando.zero { background: transparent; border-color: var(--borda); color: var(--apagado); }
.aguardando.zero b { color: var(--suave); }
.aguardando.zero .sino { background: var(--apagado); animation: none; }
@keyframes sino { 70% { box-shadow: 0 0 0 8px rgba(124, 92, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0); } }
.relogio { color: var(--suave); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.link { color: var(--suave); font-size: 12.5px; text-decoration: none; padding: 5px 10px; border: 1px solid var(--borda); border-radius: 8px; }
.link:hover { color: var(--texto); border-color: var(--borda-forte); }
.offline { display: none; background: var(--vermelho); color: #160808; text-align: center; font-size: 13px; padding: 4px; font-weight: 600; }
body.desconectado .offline { display: block; }

/* Grade principal */
.grade { display: grid; grid-template-columns: 300px minmax(0, 1fr) 250px; min-height: 0; }
.lateral { background: var(--painel-solido); overflow-y: auto; padding: 14px 12px 18px; min-height: 0; scrollbar-width: thin; scrollbar-color: #2a3560 transparent; }
.lateral.esq { border-right: 1px solid var(--borda); }
.lateral.dir { border-left: 1px solid var(--borda); }
.titulo-col { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 10px; }
.titulo-col h2 { font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--suave); margin: 0; font-weight: 600; }
.titulo-col span { font-size: 11.5px; color: var(--apagado); }
.nota { font-size: 11.5px; color: var(--apagado); margin: 12px 4px 0; line-height: 1.5; }

/* Cartões dos agentes */
.cartoes { display: flex; flex-direction: column; gap: 9px; }
.cartao { position: relative; width: 100%; text-align: left; background: linear-gradient(180deg, #131b38, #111833); border: 1px solid var(--borda); border-radius: var(--raio); padding: 11px 12px 10px; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.cartao:hover { border-color: var(--borda-forte); transform: translateY(-1px); }
.cartao.ativo { border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent), var(--sombra); }
.cartao.trabalhando::before { content: ""; position: absolute; inset: -1px; border-radius: var(--raio); padding: 1px; background: linear-gradient(120deg, transparent 30%, rgba(62, 207, 142, .8), transparent 70%) 0 0 / 220% 100%; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: varre 2.4s linear infinite; pointer-events: none; }
@keyframes varre { to { background-position: -220% 0; } }
.cab-cartao { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: #0b0e14; background: linear-gradient(140deg, var(--c), color-mix(in srgb, var(--c) 55%, #ffffff)); box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 30%, transparent); }
.quem { min-width: 0; flex: 1; }
.quem .nome { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quem .sub { font-size: 11.5px; color: var(--suave); }
.etiqueta { font-size: 10.5px; font-weight: 600; letter-spacing: .3px; padding: 2px 7px; border-radius: 6px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--suave); margin-bottom: 8px; }
.estado i { width: 7px; height: 7px; border-radius: 50%; background: var(--sc); }
.estado.trabalhando { color: var(--verde); }
.estado.trabalhando i { animation: piscar 1.1s infinite; }
.estado.na-fila { color: var(--ambar); }
@keyframes piscar { 50% { opacity: .25; } }
.naolidas { position: absolute; top: 9px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ambar); color: #111; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.barra-info { margin-top: 6px; }
.barra-info .linha { display: flex; justify-content: space-between; font-size: 11px; color: var(--suave); }
.barra-info .linha b { color: var(--texto); font-weight: 600; }
.barra-info .linha small { color: var(--apagado); font-size: 10.5px; margin-left: 6px; font-weight: 400; }
.barra { height: 5px; background: #0d1118; border-radius: 99px; overflow: hidden; margin-top: 3px; border: 1px solid #1c2330; }
.barra > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #2bb67a, var(--verde)); transition: width .5s ease; }
.barra.alerta > i { background: linear-gradient(90deg, #d99a22, var(--ambar)); }
.barra.perigo > i { background: linear-gradient(90deg, #e04848, var(--vermelho)); }
.barra-info.sem .linha b { color: var(--apagado); font-weight: 400; }

/* Centro: palco 3D + chat */
.centro { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 270px; min-height: 0; min-width: 0; }
.centro.chat-recolhido { grid-template-rows: minmax(0, 1fr) 54px; }
.palco { position: relative; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 38%, #16204a 0%, #0d1430 45%, #070b18 100%); }
.palco::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 60%, rgba(4, 7, 16, .55) 100%); }
.cena3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.sem3d { position: absolute; inset: 0; display: grid; place-items: center; color: var(--suave); padding: 30px; text-align: center; }
.rotulos { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.legenda { position: absolute; left: 14px; bottom: 12px; z-index: 3; display: flex; gap: 14px; font-size: 11.5px; color: var(--suave); background: rgba(8, 12, 26, .7); border: 1px solid var(--borda); padding: 6px 12px; border-radius: 99px; backdrop-filter: blur(6px); }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.legenda i { width: 7px; height: 7px; border-radius: 50%; }
.legenda .dica { color: var(--apagado); }
.aviso { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4; background: rgba(15, 21, 42, .95); border: 1px solid var(--borda-forte); border-radius: 12px; padding: 9px 16px; font-size: 13px; color: var(--texto); box-shadow: var(--sombra); max-width: 80%; text-align: center; }

/* Nome do setor em cima do poste */
.rotulo.setor-nome { z-index: 1; opacity: .92; pointer-events: none; cursor: default; font-size: 11px; font-weight: 700; letter-spacing: .3px; padding: 4px 11px 4px 9px; background: rgba(8, 12, 26, .9); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); color: #f1f4f9; box-shadow: 0 0 18px color-mix(in srgb, var(--c) 25%, transparent); }
.rotulo.setor-nome::after { display: none; }
.rotulo.setor-nome i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); box-shadow: 0 0 8px var(--c); }

/* Rótulos sobre os bonecos */
.rotulo { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; border: 0; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 3px 8px 3px 6px; border-radius: 99px; background: rgba(13, 17, 25, .88); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); font-size: 11px; transition: border-color .2s, background .2s; will-change: transform; }
.rotulo::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; background: inherit; border-right: inherit; border-bottom: inherit; transform: translateX(-50%) rotate(45deg); }
.rotulo.agente { z-index: 3; }
.rotulo .ini { display: none; text-decoration: none; font-weight: 700; font-size: 10px; letter-spacing: .3px; }
.rotulo.compacto { padding: 3px 7px 3px 5px; gap: 4px; }
.rotulo.compacto b, .rotulo.compacto em { display: none; }
.rotulo.compacto .ini { display: inline; }
.rotulo.compacto:hover { z-index: 6; }
.rotulo.compacto:hover b, .rotulo.compacto:hover em { display: inline; }
.rotulo.compacto:hover .ini { display: none; }
.rotulo.embaixo::after { bottom: auto; top: -5px; transform: translateX(-50%) rotate(225deg); }
.rotulo.agente.selecionado, .rotulo.agente:hover { z-index: 4; }
.rotulo b { font-weight: 600; }
.rotulo em { font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--c); padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--c) 15%, transparent); }
.rotulo .ponto { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.rotulo.trabalhando { border-color: rgba(62, 207, 142, .55); }
.rotulo.trabalhando .ponto { animation: piscar 1.1s infinite; }
.rotulo.na-fila { border-color: rgba(124, 92, 255, .5); }
.rotulo.sobre, .rotulo:hover { background: rgba(22, 30, 58, .95); border-color: rgba(255, 255, 255, .3); }
.rotulo.selecionado { background: #f1f4f9; color: #0b0e14; border-color: #fff; }
.rotulo.selecionado em { background: rgba(0, 0, 0, .08); color: #0b0e14; }
.rotulo.vaga { background: rgba(13, 17, 25, .55); border: 1px dashed rgba(255, 255, 255, .18); box-shadow: none; color: var(--apagado); font-size: 10.5px; padding: 3px 8px; gap: 5px; }
.rotulo.vaga::after { display: none; }
.rotulo.vaga b { color: var(--suave); letter-spacing: 1px; font-size: 9.5px; }
.rotulo.vaga span { display: none; }
.rotulo.vaga:hover span { display: inline; }
.rotulo.vaga:hover { z-index: 5; background: rgba(13, 17, 25, .95); }
.rotulo.vaga:hover { color: var(--texto); border-color: rgba(255, 255, 255, .35); }
.balao { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--ambar); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(124, 92, 255, .25), 0 6px 16px rgba(0, 0, 0, .4); animation: flutua 1.8s ease-in-out infinite; }
.balao::after { content: ""; position: absolute; bottom: -4px; left: 50%; width: 8px; height: 8px; background: var(--ambar); transform: translateX(-50%) rotate(45deg); }
.balao[hidden] { display: none; }
@keyframes flutua { 50% { transform: translate(-50%, -4px); } }

/* Chat */
.chat { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; background: var(--painel-solido); border-top: 1px solid var(--borda); }
.chat-recolhido .chat .mensagens, .chat-recolhido .chat .compor { display: none; }
.chat-cab { display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--borda); }
.chat-cab .avatar { width: 30px; height: 30px; border-radius: 10px; font-size: 11.5px; }
.chat-quem { min-width: 0; flex: 1; }
.chat-quem h1 { font-size: 14.5px; margin: 0; font-weight: 600; }
.chat-desc { font-size: 12px; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-acoes { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.mini-ctx { width: 130px; font-size: 11px; color: var(--suave); }
.mini-ctx .linha { display: flex; justify-content: space-between; }
.mini-ctx b { color: var(--texto); }
select, .botao { background: var(--painel2); color: var(--texto); border: 1px solid var(--borda); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; }
.botao:hover, select:hover { border-color: var(--borda-forte); }
.botao:disabled { opacity: .35; cursor: default; }
.botao { white-space: nowrap; }
.botao.parar { color: var(--vermelho); }
.botao.icone { width: 30px; padding: 5px 0; transition: transform .2s; }
.chat-recolhido .botao.icone { transform: rotate(180deg); }
.mensagens { overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; scrollbar-color: #2a3560 transparent; }
.vazio { margin: auto; text-align: center; color: var(--suave); max-width: 440px; font-size: 13px; }
.msg { max-width: min(760px, 82%); padding: 8px 12px; border-radius: 12px; overflow-wrap: anywhere; font-size: 13.5px; }
.msg.pedro { align-self: flex-end; background: #26365a; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.agente { align-self: flex-start; background: var(--painel2); border: 1px solid var(--borda); border-bottom-left-radius: 4px; }
.msg.passo { align-self: flex-start; padding: 0 4px; color: var(--suave); font-size: 12px; }
.msg.passo::before { content: "› "; color: var(--ambar); }
.msg.bloqueado { align-self: flex-start; background: #3a2f14; border: 1px solid var(--ambar); color: #ffe2a3; font-size: 13px; }
.msg.bloqueado b { color: var(--ambar); }
.msg.erro { align-self: flex-start; background: #3a1717; border: 1px solid var(--vermelho); color: #ffc9c9; font-size: 13px; }
.msg.aviso { align-self: center; color: var(--suave); font-size: 12px; }
.msg .hora { display: block; font-size: 10.5px; color: var(--suave); margin-top: 3px; opacity: .7; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg ul, .msg ol { margin: 4px 0 6px; padding-left: 20px; }
.msg code { background: #0b0d11; padding: 1px 5px; border-radius: 5px; font: 12.5px ui-monospace, Menlo, monospace; }
.msg pre { position: relative; background: #0b0d11; border: 1px solid var(--borda); padding: 10px 12px; border-radius: 8px; overflow-x: auto; margin: 6px 0; }
.msg pre code { background: none; padding: 0; white-space: pre; }
.msg pre .copiar { position: absolute; top: 6px; right: 6px; font-size: 11px; padding: 2px 8px; background: var(--painel2); border: 1px solid var(--borda); border-radius: 6px; cursor: pointer; }
.msg a { color: var(--azul); }
.msg h3 { font-size: 14px; margin: 6px 0 4px; }
.digitando { align-self: flex-start; color: var(--suave); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.digitando i { width: 5px; height: 5px; background: var(--verde); border-radius: 50%; animation: pulo 1s infinite; }
.digitando i:nth-child(2) { animation-delay: .15s; } .digitando i:nth-child(3) { animation-delay: .3s; }
@keyframes pulo { 50% { opacity: .2; transform: translateY(-3px); } }
.compor { display: flex; gap: 10px; padding: 10px 16px 12px; border-top: 1px solid var(--borda); }
.compor textarea { flex: 1; resize: none; min-height: 42px; max-height: 160px; background: var(--fundo); color: var(--texto); border: 1px solid var(--borda); border-radius: 10px; padding: 10px 12px; font: inherit; }
.compor textarea:focus { outline: none; border-color: var(--ambar); }
.enviar { background: var(--ambar); color: #15110a; border: 0; border-radius: 10px; padding: 0 20px; font-weight: 700; cursor: pointer; }
.enviar:hover { filter: brightness(1.08); }

/* Lista por setor */
.setores { display: flex; flex-direction: column; gap: 10px; }
.setor { border: 1px solid var(--borda); border-radius: 12px; background: #111833; overflow: hidden; }
.setor-cab { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid #1c2646; }
.setor-cab i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); box-shadow: 0 0 10px var(--c); }
.setor-cab small { margin-left: auto; color: var(--apagado); font-weight: 400; font-size: 11px; }
.setor ul { list-style: none; margin: 0; padding: 4px 0; }
.setor li { display: flex; align-items: center; gap: 8px; padding: 5px 10px; font-size: 12.5px; }
.setor li.agente { cursor: pointer; }
.setor li.agente:hover, .setor li.agente.ativo { background: var(--painel2); }
.setor li .ponto { width: 7px; height: 7px; border-radius: 50%; background: var(--sc); flex: none; }
.setor li.trabalhando .ponto { animation: piscar 1.1s infinite; }
.setor li .st { margin-left: auto; font-size: 11px; color: var(--suave); }
.setor li.trabalhando .st { color: var(--verde); }
.setor li.na-fila .st { color: var(--ambar); }
.setor li.vaga { color: var(--apagado); font-size: 12px; }
.setor li.vaga .ponto { background: transparent; border: 1px dashed #4a5263; }
.setor li.vaga .st { color: #485062; }

@media (max-width: 1180px) { .grade { grid-template-columns: 260px minmax(0, 1fr); } .lateral.dir { display: none; } }
@media (max-width: 820px) {
  body { overflow: auto; grid-template-rows: auto auto auto; }
  .grade { grid-template-columns: 1fr; }
  .lateral.esq { border-right: 0; max-height: 260px; }
  .centro { grid-template-rows: 380px 420px; }
  .ocupacao, .relogio { display: none; }
}

/* Etapa 3: recados, aprovações e mensagens novas */
.recados-btn { font: inherit; font-size: 13px; display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; background: transparent; border: 1px solid var(--borda); color: var(--suave); cursor: pointer; }
.recados-btn:hover { color: var(--texto); border-color: var(--borda-forte); }
.recados-btn b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #b48cff; color: #140d22; font-size: 11px; display: grid; place-items: center; }
.recados-btn b[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 7, 11, .6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.janela { width: min(640px, 100%); max-height: min(80vh, 760px); display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--painel-solido); border: 1px solid var(--borda-forte); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.janela-cab { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--borda); }
.janela-cab h2 { margin: 0; font-size: 16px; }
.janela-corpo { overflow-y: auto; padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.janela-corpo .vazio { padding: 30px 0; }
.pedido { border: 1px solid rgba(124, 92, 255, .45); background: linear-gradient(180deg, #24150f, #1a110d); border-radius: 14px; padding: 12px 14px; }
.pedido-cab { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.pedido-cab .avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.pedido-cab small { margin-left: auto; color: var(--suave); font-size: 11.5px; }
.tipo { font-size: 10.5px; font-weight: 700; letter-spacing: .3px; padding: 2px 8px; border-radius: 6px; background: rgba(124, 92, 255, .16); color: var(--ambar); }
.tipo.comando { background: rgba(255, 107, 107, .14); color: #ff9a9a; }
.pedido-resumo { font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.pedido pre { margin: 0 0 10px; background: #0b0d11; border: 1px solid var(--borda); border-radius: 8px; padding: 9px 11px; font: 12.5px/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 180px; overflow-y: auto; }
.pedido textarea { width: 100%; resize: vertical; min-height: 38px; background: var(--fundo); color: var(--texto); border: 1px solid var(--borda); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: 13px; }
.pedido textarea:focus { outline: none; border-color: var(--ambar); }
.pedido-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.pedido-acoes button { font: inherit; font-weight: 700; font-size: 13px; border-radius: 9px; padding: 7px 16px; cursor: pointer; border: 1px solid transparent; }
.pedido-acoes .recusar { background: transparent; border-color: rgba(255, 107, 107, .5); color: #ff9a9a; }
.pedido-acoes .aprovar { background: var(--verde); color: #06180f; }
.pedido-acoes button:disabled { opacity: .4; cursor: default; }
.recado-item { border-left: 3px solid #b48cff; background: #1c1828; border-radius: 10px; padding: 9px 12px; font-size: 13.5px; }
.recado-item small { display: block; color: var(--suave); font-size: 11.5px; margin-bottom: 3px; }
.balao { cursor: pointer; pointer-events: auto; }
.msg.tarefa, .msg.resposta, .msg.recado { align-self: flex-start; font-size: 13px; white-space: pre-wrap; border-radius: 10px; }
.msg.tarefa { background: #1a2740; border-left: 3px solid var(--azul); }
.msg.resposta { background: #16271f; border-left: 3px solid var(--verde); }
.msg.recado { background: #221b33; border-left: 3px solid #b48cff; }
.msg.aprovacao { align-self: flex-start; background: #3a2f14; border: 1px solid var(--ambar); color: #ffe2a3; font-size: 13px; cursor: pointer; }
.msg.decisao { align-self: center; color: var(--suave); font-size: 12px; }

/* Gasto (etapa 4) */
.gasto-hoje { margin-left: auto; color: var(--suave); font-size: 11px; font-weight: 500; }
.abas { display: flex; gap: 6px; }
.abas button { font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--borda); background: transparent; color: var(--suave); cursor: pointer; }
.abas button.on { background: var(--texto); color: var(--painel-solido); border-color: var(--texto); }
.gasto-total { font-size: 14px; color: var(--suave); display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.gasto-total b { color: var(--texto); font-size: 18px; }
.janela-corpo h3 { margin: 6px 0 -4px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); font-weight: 600; }
.gasto-linha { display: grid; grid-template-columns: auto minmax(0, 1fr) 150px; gap: 10px; align-items: center; }
.gasto-linha .avatar { width: 30px; height: 30px; font-size: 12px; }
.gasto-quem b { display: block; font-size: 13.5px; }
.gasto-quem small { color: var(--suave); font-size: 11.5px; }
.gasto-peso { display: grid; grid-template-columns: 1fr 38px; gap: 8px; align-items: center; }
.gasto-peso b { font-size: 12.5px; text-align: right; }
.janela-corpo .nota { margin: 4px 0 0; font-size: 12px; color: var(--suave); line-height: 1.5; }
.cartao .estado { display: flex; }

/* Balão de fala dos bonecos (conversa entre agentes) */
.fala { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; white-space: nowrap; padding: 5px 11px; border-radius: 12px; background: #fbf8f3; color: #16130f; font-size: 12px; font-weight: 600; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); border: 1.5px solid var(--laranja); animation: falaEntra .22s ease-out; }
.fala::after { content: ""; position: absolute; left: 15%; bottom: -6px; width: 9px; height: 9px; background: #fbf8f3; border-right: 1.5px solid var(--laranja); border-bottom: 1.5px solid var(--laranja); transform: translateX(-50%) rotate(45deg); }
.fala.visita::after { left: 85%; }
.fala[hidden] { display: none; }
@keyframes falaEntra { from { opacity: 0; margin-top: 6px; } to { opacity: 1; margin-top: 0; } }

/* anexos de imagem no chat */
.compor { flex-wrap: wrap; }
.compor .anexos { display: flex; gap: 8px; flex-basis: 100%; flex-wrap: wrap; }
.compor .anexos:empty { display: none; }
.anexo { position: relative; display: inline-block; }
.anexo img { height: 64px; width: auto; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); display: block; }
.anexo button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; cursor: pointer; background: #1c1c1c; color: #fff; font-size: 14px; line-height: 20px; padding: 0; }
.compor .anexar { background: transparent; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; cursor: pointer; padding: 0 10px; font-size: 16px; }

/* Conta e equipe */
.quem { font-size: 12.5px; color: var(--suave); white-space: nowrap; }
.sair { background: none; border: 0; cursor: pointer; }
.equipe-lista { display: grid; gap: 8px; }
.equipe-linha { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--borda); border-radius: 10px; background: var(--painel2); }
.equipe-linha small { display: block; color: var(--suave); }
.compor .loja-sel { font: inherit; font-size: 13px; color: var(--texto); background: transparent; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; padding: 0 8px; max-width: 140px; }
.loja-chaves { display: flex; gap: 6px; flex-wrap: wrap; }
.loja-chaves em { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--painel2); border: 1px solid var(--borda); }
.loja-chaves em.ok { border-color: #2f9e5b; color: #6fd39a; }
.equipe-form fieldset { border: 1px solid var(--borda); border-radius: 10px; padding: 8px 10px 10px; display: grid; gap: 8px; }
.equipe-form legend { color: var(--suave); font-size: 13px; padding: 0 4px; }
.equipe-form { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.equipe-form input, .equipe-form select { font: inherit; color: var(--texto); background: var(--painel2); border: 1px solid var(--borda); border-radius: 8px; padding: 8px 10px; }
.senha-nova { margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(62, 207, 142, .35); background: rgba(62, 207, 142, .08); line-height: 1.7; }
.senha-nova code { user-select: all; }

/* Etapa 3: imagem criada pelo Gemini no chat e prévia do e-mail no balão de aprovação */
a.criativo { display: block; margin: 8px 0; max-width: 340px; }
a.criativo img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--borda); }
.previas { display: flex; gap: 8px; margin: 0 0 10px; }
.previas a { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--borda); color: inherit; text-decoration: none; font-size: 13.5px; }
.previas a:hover { border-color: currentColor; }
