:root {
  --fundo: #0d0f1a;
  --fundo2: #151827;
  --fundo3: #1e2236;
  --linha: #242a42;
  --texto: #e8eaf6;
  --fraco: #8b92b8;
  --amarelo: #f5c451;
  --verde: #3ddc84;
  --vermelho: #ff5a5f;
  font-family: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05060b; color: var(--texto); }
body { display: flex; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

#palco { position: relative; flex: 1; min-width: 0; }
#mundo { position: absolute; inset: 0 0 64px 0; width: 100%; height: calc(100% - 64px); display: block; image-rendering: pixelated; }

.topo-esq { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; pointer-events: none; }
.marca, .pilula, .resumo { background: rgba(13, 15, 26, .92); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.marca { font-weight: 700; }
.resumo { display: flex; gap: 10px; }
.resumo:empty { display: none; }
.resumo span { display: flex; align-items: center; gap: 5px; }
.resumo i, .maq i, .ponto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.maquinas { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; }
.maq { background: rgba(13, 15, 26, .92); border-radius: 10px; padding: 7px 10px; font-size: 12px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.maq.on i { background: var(--verde); box-shadow: 0 0 6px var(--verde); }
.maq.off i { background: var(--vermelho); }
.maq.\? i { background: var(--amarelo); }

.aviso { position: absolute; top: 64px; left: 50%; transform: translate(-50%, -10px); opacity: 0; transition: .35s; background: rgba(13, 15, 26, .95); padding: 10px 18px; border-radius: 12px; font-size: 15px; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.aviso.on { opacity: 1; transform: translate(-50%, 0); }

.barra { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: var(--fundo); border-top: 1px solid var(--linha); display: flex; align-items: center; justify-content: space-between; padding: 0 14px; gap: 12px; }
.eu { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.eu small { display: block; color: var(--fraco); font-size: 11px; }
.av-eu { width: 36px; height: 36px; border-radius: 50%; background: var(--fundo3); display: grid; place-items: center; font-size: 20px; position: relative; }
.av-eu::after { content: ''; position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--verde); border: 2px solid var(--fundo); }
.botoes { display: flex; gap: 8px; }
.botoes button, .painel-bt { background: var(--fundo3); border: 0; border-radius: 10px; height: 38px; min-width: 38px; padding: 0 12px; font-size: 16px; }
.botoes button:hover, .painel-bt:hover { background: #2a3050; }
.dir { display: flex; gap: 10px; align-items: center; }
.painel-bt { font-size: 14px; font-weight: 600; }
.conexao { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fraco); }
.conexao i { width: 8px; height: 8px; border-radius: 50%; background: var(--amarelo); }
.conexao.on i { background: var(--verde); box-shadow: 0 0 6px var(--verde); }
.conexao.off i { background: var(--vermelho); }

.painel { width: 330px; flex: none; background: var(--fundo); border-left: 1px solid var(--linha); display: flex; flex-direction: column; }
body.sem-painel .painel { display: none; }
.abas { display: flex; padding: 10px 10px 0; gap: 4px; }
.aba { flex: 1; background: none; border: 0; padding: 10px; border-radius: 8px 8px 0 0; color: var(--fraco); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; }
.aba.on { color: var(--texto); border-bottom-color: var(--amarelo); }
.busca { padding: 10px 12px 4px; }
.busca input, .porta input { width: 100%; background: var(--fundo2); border: 1px solid var(--linha); color: var(--texto); border-radius: 8px; padding: 9px 11px; font: inherit; font-size: 13px; outline: none; }
.busca input:focus, .porta input:focus { border-color: var(--amarelo); }
.busca small, .porta small { display: block; color: var(--fraco); font-size: 11px; margin-top: 5px; }
.lista, .feed { flex: 1; overflow-y: auto; padding: 6px 8px 16px; }
.grupo-tit { display: flex; align-items: center; gap: 7px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fraco); padding: 12px 8px 6px; font-weight: 700; }
.grupo-tit b { color: var(--texto); }
.pessoa { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 7px 8px; border-radius: 10px; text-align: left; }
.pessoa:hover, .pessoa.ativa { background: var(--fundo2); }
.pessoa.ativa { outline: 1px solid var(--amarelo); }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--fundo3) center/cover no-repeat; image-rendering: pixelated; position: relative; flex: none; }
.av i { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--fundo); }
.av.g { width: 48px; height: 48px; }
.txt { flex: 1; min-width: 0; }
.nm { font-weight: 600; font-size: 13px; display: block; }
.sub { display: block; font-size: 11px; color: var(--fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.host { font-size: 10px; color: var(--fraco); background: var(--fundo2); border-radius: 6px; padding: 2px 6px; }
.vazio { color: var(--fraco); font-size: 12px; padding: 12px; }

.ev { display: flex; gap: 9px; padding: 9px 8px; border-bottom: 1px solid rgba(59,66,112,.5); font-size: 12.5px; }
.ev .ponto { margin-top: 5px; }
.ev em { font-style: normal; font-weight: 600; }
.evmsg { color: var(--fraco); margin-top: 3px; word-break: break-word; }
.evh { color: var(--fraco); font-size: 11px; margin-top: 3px; }

.cartao { position: absolute; left: 14px; bottom: 78px; width: 400px; max-height: calc(100% - 150px); overflow-y: auto; background: rgba(13, 15, 26, .97); border: 1px solid var(--linha); border-radius: 14px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.45); font-size: 13px; }
.cartao .fechar { position: absolute; top: 10px; right: 10px; background: var(--fundo3); border: 0; border-radius: 8px; width: 28px; height: 28px; }
.cartao .topo { display: flex; gap: 12px; align-items: center; padding-right: 30px; }
.cartao .nm { font-size: 15px; }
.cartao .est { font-weight: 600; margin-top: 3px; }
.cartao .est small { color: var(--fraco); font-weight: 400; }
.cartao .faz { color: var(--fraco); margin: 12px 0 8px; line-height: 1.45; }
.cartao .msg { background: var(--fundo2); border-radius: 8px; padding: 8px 10px; margin: 8px 0; line-height: 1.4; word-break: break-word; }
.cartao .msg.ruim { background: rgba(255, 90, 95, .14); color: #ffb3b5; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.campo { background: var(--fundo2); border-radius: 8px; padding: 6px 9px; }
.campo span { display: block; font-size: 10px; color: var(--fraco); text-transform: uppercase; letter-spacing: .05em; }
.campo b { font-weight: 600; font-size: 12px; word-break: break-word; }
.cartao .ir { margin-top: 2px; width: 100%; background: var(--fundo3); color: var(--texto); border: 0; border-radius: 10px; padding: 10px; font-weight: 700; }
.cartao .resolvido { margin: 2px 0 6px; width: 100%; background: #ff9f43; color: #1a1000; border: 0; border-radius: 10px; padding: 10px; font-weight: 800; cursor: pointer; }

.porta { position: fixed; inset: 0; background: rgba(3, 4, 9, .8); display: grid; place-items: center; z-index: 10; }
.porta form { background: var(--fundo); border: 1px solid var(--linha); border-radius: 16px; padding: 28px; width: 340px; display: flex; flex-direction: column; gap: 8px; }
.porta h1 { font-size: 18px; margin: 0 0 10px; }
.porta label { font-size: 12px; color: var(--fraco); font-weight: 600; }
.porta button { margin-top: 10px; background: var(--amarelo); color: #202540; border: 0; border-radius: 10px; padding: 11px; font-weight: 700; }
.erro { color: var(--vermelho); font-size: 12px; margin: 4px 0 0; }

@media (max-width: 800px) {
  .painel { position: fixed; right: 0; top: 0; bottom: 64px; z-index: 5; width: 86vw; }
  .cartao { width: calc(100% - 28px); }
  .eu small { display: none; }
}
.grupo-tit .mini { margin-left: auto; display: flex; gap: 3px; }
.grupo-tit .mini i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.chat { border-top: 1px solid var(--linha); margin-top: 14px; padding-top: 12px; }
.chat-tit { display: flex; justify-content: space-between; align-items: center; font-weight: 700; margin-bottom: 8px; }
.chat-tit .nova { background: none; border: 1px solid var(--linha); color: var(--fraco); border-radius: 8px; padding: 4px 8px; font-size: 11px; }
.msgs { display: flex; flex-direction: column; gap: 6px; max-height: 300px; min-height: 60px; overflow-y: auto; padding: 2px; }
.bal { max-width: 85%; padding: 8px 10px; border-radius: 12px; line-height: 1.45; word-break: break-word; }
.bal small { display: block; font-size: 10px; color: var(--fraco); margin-top: 3px; text-align: right; }
.bal.voce { align-self: flex-end; background: #2b3570; border-bottom-right-radius: 4px; }
.bal.agente { align-self: flex-start; background: var(--fundo2); border-bottom-left-radius: 4px; }
.bal.ruim { background: rgba(255, 90, 95, .14); color: #ffb3b5; }
.bal code { background: #05060b; border-radius: 4px; padding: 0 4px; font-size: 12px; }
.bal.pensando { color: var(--fraco); display: flex; align-items: center; gap: 8px; }
.pontinhos { display: inline-flex; gap: 3px; }
.pontinhos i { width: 5px; height: 5px; border-radius: 50%; background: var(--fraco); animation: pulo 1s infinite; }
.pontinhos i:nth-child(2) { animation-delay: .15s; } .pontinhos i:nth-child(3) { animation-delay: .3s; }
@keyframes pulo { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
.aviso-chat { color: var(--fraco); font-size: 12px; line-height: 1.45; margin: 4px 0; }
.chat-form { display: flex; gap: 6px; margin-top: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; background: var(--fundo2); border: 1px solid var(--linha); color: var(--texto); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; outline: none; }
.chat-form textarea:focus { border-color: var(--amarelo); }
.chat-form button { background: var(--amarelo); color: #202540; border: 0; border-radius: 8px; padding: 9px 12px; font-weight: 700; }
.chat-form.travado button { opacity: .45; }
.chat .dica { display: block; color: var(--fraco); font-size: 11px; margin-top: 5px; }

/* ---- casas, botões do topo ---- */
.topo-esq { pointer-events: auto; }
.casas, .topo-bts { display: flex; gap: 6px; flex-wrap: wrap; }
.casa, .topo-bts button { background: rgba(13, 15, 26, .92); border: 1px solid var(--linha); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.casa:hover, .topo-bts button:hover { border-color: #3a4166; }
.casa.on { background: var(--amarelo); color: #12141f; border-color: var(--amarelo); }
.casa.mais, .topo-bts button { color: var(--fraco); font-weight: 600; }
.casa .alerta { font-style: normal; background: var(--vermelho); color: #fff; border-radius: 9px; padding: 0 6px; margin-left: 4px; font-size: 11px; }
.maq { border: 1px solid var(--linha); }
.maq i { background: var(--c); }
.maq.on i { background: var(--c); box-shadow: 0 0 8px var(--c); }
.maq.off { opacity: .45; }
.maq.off i, .maq.talvez i { background: var(--c); opacity: .5; box-shadow: none; }
.maq small { color: var(--fraco); font-weight: 400; }
.host { color: var(--c, var(--fraco)); border: 1px solid color-mix(in srgb, var(--c, #888) 45%, transparent); background: color-mix(in srgb, var(--c, #888) 12%, transparent); font-weight: 700; }
.av-eu { background: var(--fundo3) center/cover no-repeat; image-rendering: pixelated; }
.casa-tit { font-size: 12px; font-weight: 800; color: var(--amarelo); padding: 14px 8px 2px; }
.pessoa.inativo { opacity: .5; }
.av.orca { display: grid; place-items: center; font-size: 18px; }
.busca { flex: none; }
#orca { padding-top: 0; }

/* ---- aba Salas ---- */
.sala-it { background: var(--fundo2); border: 1px solid var(--linha); border-radius: 10px; padding: 10px; margin: 6px 0; }
.sala-nm { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.sala-nm small { margin-left: auto; color: var(--fraco); }
.sala-ctl { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.sala-ctl .cadeiras { font-size: 12px; color: var(--fraco); margin-right: auto; }
.sala-ctl button, .bt-largo, .ed-bts button { background: var(--fundo3); border: 1px solid var(--linha); border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 600; }
.sala-ctl button:hover, .bt-largo:hover, .ed-bts button:hover { border-color: #3a4166; }
.bt-largo { width: 100%; margin-top: 10px; padding: 10px; background: var(--amarelo); color: #12141f; border: 0; font-weight: 700; }
.bt-largo.fraco { background: var(--fundo3); color: var(--texto); border: 1px solid var(--linha); margin-top: 6px; }

/* ---- edição do minion e janelinha ---- */
.edicao { margin-top: 12px; border: 1px solid var(--linha); border-radius: 10px; padding: 8px 10px; background: var(--fundo2); }
.edicao summary { cursor: pointer; font-weight: 700; }
.ed, .janela { display: flex; flex-direction: column; gap: 4px; }
.ed { margin-top: 8px; }
.ed label, .janela label { font-size: 12px; color: var(--fraco); font-weight: 600; margin-top: 6px; }
.ed input, .ed textarea, .ed select, .janela input, .janela textarea, .janela select { width: 100%; background: var(--fundo); border: 1px solid var(--linha); color: var(--texto); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; outline: none; resize: vertical; }
.ed input:focus, .ed textarea:focus, .ed select:focus, .janela input:focus, .janela textarea:focus, .janela select:focus { border-color: var(--amarelo); }
.ed small, .janela small { color: var(--fraco); font-size: 11px; line-height: 1.4; }
.ed-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ed-bts { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.ed-bts .salvar, .janela .ed-bts button[type=submit] { background: var(--amarelo); color: #12141f; border: 0; font-weight: 700; }
.ed-bts .apagar, .perigo { background: rgba(255, 90, 95, .14) !important; color: #ffb3b5; border: 1px solid rgba(255, 90, 95, .35) !important; border-radius: 8px; padding: 6px 10px; font-size: 12px; margin-top: 10px; }
.janela { background: var(--fundo); border: 1px solid var(--linha); border-radius: 16px; padding: 24px; width: 380px; max-height: 90vh; overflow-y: auto; }
.janela h2 { margin: 0 0 6px; font-size: 17px; }
.aba { padding: 10px 4px; font-size: 12.5px; white-space: nowrap; }
.cartao .renomear { background: none; border: 0; padding: 0 2px; cursor: pointer; font-size: 13px; opacity: .6; }
.cartao .renomear:hover { opacity: 1; }
.cartao .novo-nome { width: 100%; font: inherit; font-size: 15px; padding: 6px 8px; border-radius: 8px; border: 1px solid #f5c451; background: #0d0f1c; color: #fff; }
.cartao .nm .dica { display: block; font-weight: 400; font-size: 11px; color: #9aa1c7; margin-top: 3px; }

/* sem filtro de casas e sem painel do lado: a casa ocupa a tela toda */
#casas, .painel, #painel-bt { display: none !important; }
/* barra de baixo escondida por enquanto (pedido 23/10) */
.barra { display: none !important; }
#mundo { inset: 0; height: 100%; }
.cartao { bottom: 14px; max-height: calc(100% - 90px); }

/* máquinas por forma: Mac bolinha, Acer triângulo, Hetzner quadrado */
.maq.f-acer i { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 10px; }
.maq.f-hetzner i { border-radius: 1px; }

/* ---- lousa: quadro de tarefas da sala ---- */
.quadro-fundo { position: fixed; inset: 0; background: rgba(3, 4, 9, .72); z-index: 20; display: grid; place-items: center; padding: 18px; }
.quadro-fundo[hidden] { display: none; }
.quadro { position: relative; width: min(1180px, 100%); max-height: 100%; display: flex; flex-direction: column; background: #0d0f1a; border: 1px solid var(--linha); border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.6); overflow: hidden; font-size: 13px; }
.q-topo { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px; }
.q-topo h2 { margin: 0; font-size: 17px; }
.q-fechar { background: var(--fundo3); border: 0; border-radius: 8px; width: 30px; height: 30px; }
.q-abas { display: flex; gap: 6px; padding: 6px 16px 10px; flex-wrap: wrap; border-bottom: 1px solid var(--linha); }
.q-abas .aba { background: var(--fundo2); border: 1px solid var(--linha); color: var(--texto); border-radius: 9px; padding: 7px 11px; font-weight: 700; }
.q-abas .aba.on { background: var(--amarelo); color: #202540; border-color: var(--amarelo); }
.q-nova { margin-left: auto; background: #3ddc84; color: #06200f; border: 0; border-radius: 9px; padding: 7px 12px; font-weight: 800; }
.q-corpo { overflow: auto; padding: 14px 16px 18px; flex: 1; }
.semana { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; }
.dia, .col { background: var(--fundo2); border: 1px solid var(--linha); border-radius: 12px; padding: 8px; min-height: 120px; display: flex; flex-direction: column; gap: 6px; }
.dia.hoje { border-color: var(--amarelo); box-shadow: inset 0 0 0 1px var(--amarelo); }
.dia h4, .col h4 { margin: 0 0 2px; font-size: 12px; letter-spacing: .04em; color: #c9cff0; }
.col h4 small { color: var(--fraco); font-weight: 600; }
.dia > small, .col > small { color: var(--fraco); }
h4.sub { margin: 16px 0 8px; font-size: 13px; }
.pontuais { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.kanban { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 8px; }
.tf { text-align: left; background: #171a2b; border: 1px solid var(--linha); border-left: 4px solid #6b7090; border-radius: 9px; padding: 7px 8px; color: var(--texto); display: flex; flex-direction: column; gap: 4px; cursor: pointer; font: inherit; }
.tf:hover { border-color: var(--amarelo); }
.tf-topo { display: flex; gap: 6px; align-items: center; }
.tf-topo b { font-size: 12px; line-height: 1.3; }
.tf-topo b { flex: 1; }
.tf-lixo { margin-left: auto; padding: 2px 4px; border-radius: 6px; font-size: 12px; opacity: .45; cursor: pointer; flex: none; }
.tf-lixo:hover { opacity: 1; background: rgba(255,90,95,.25); }
.tf-info { font-size: 11px; color: var(--fraco); }
.tf.atrasada { box-shadow: inset 0 0 0 1px #ff5a5f; }
.tf.atrasada .tf-info { color: #ff9a9d; }
.st-fazer { border-left-color: #8a90b0 !important; } .st-fazendo { border-left-color: #5fb3ff !important; } .st-feito { border-left-color: #3ddc84 !important; }
.st-aprovar { border-left-color: #f5c451 !important; } .st-dependencia { border-left-color: #ff9f43 !important; } .st-aprovado { border-left-color: #2fbf71 !important; } .st-encerrado { border-left-color: #3a3f55 !important; opacity: .7; }
.tf-barra { height: 5px; background: #2b2e3d; border-radius: 3px; overflow: hidden; }
.tf-barra i { display: block; height: 100%; background: #3ddc84; }
.av-mini { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: #2b2e3d center/cover; display: inline-grid; place-items: center; font-style: normal; font-size: 11px; vertical-align: middle; border: 1px solid #3a3f55; }
.entregas { display: flex; flex-direction: column; gap: 8px; }
.ent { display: flex; gap: 10px; align-items: flex-start; background: var(--fundo2); border: 1px solid var(--linha); border-radius: 12px; padding: 10px; }
.ent > div { flex: 1; min-width: 0; }
.ent small { display: block; color: var(--fraco); }
.ent p { margin: 6px 0 0; word-break: break-word; line-height: 1.45; }
.ent a { color: #8fd3ff; }
.ent button { background: var(--fundo3); border: 0; color: var(--texto); border-radius: 8px; padding: 6px 10px; }
.geral { overflow-x: auto; }
.geral table { border-collapse: collapse; width: 100%; min-width: 640px; }
.geral th, .geral td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--linha); white-space: nowrap; }
.geral th { color: var(--fraco); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.geral td small { display: block; color: var(--fraco); margin-left: 28px; }
.geral td.ruim { color: #ff7b7f; font-weight: 800; }
.q-form { position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100%); background: #0d0f1a; border-left: 1px solid var(--linha); padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; box-shadow: -10px 0 30px rgba(0,0,0,.5); }
.q-form h3 { margin: 0 0 6px; }
.q-form label { font-size: 12px; color: var(--fraco); font-weight: 600; margin-top: 6px; }
.q-form input, .q-form select, .q-form textarea { background: var(--fundo2); border: 1px solid var(--linha); color: var(--texto); border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; box-sizing: border-box; }
.q-form small { color: var(--fraco); font-size: 11px; }
.q-dias { display: flex; gap: 4px; flex-wrap: wrap; }
.q-horas { display: flex; align-items: center; gap: 6px; } .q-horas input { width: 110px; flex: none; }
.q-dias label { margin: 0; }
.q-dias input { display: none; }
.q-dias span { display: inline-block; padding: 6px 8px; border-radius: 8px; background: var(--fundo2); border: 1px solid var(--linha); color: var(--texto); font-weight: 700; font-size: 11px; cursor: pointer; }
.q-dias input:checked + span { background: var(--amarelo); color: #202540; border-color: var(--amarelo); }
.q-form .ed-bts { display: flex; gap: 6px; margin-top: 12px; }
.q-form .ed-bts button { flex: 1; border: 0; border-radius: 9px; padding: 10px; font-weight: 800; background: var(--fundo3); color: var(--texto); }
.q-form .ed-bts button[type=submit] { background: var(--amarelo); color: #202540; }
.q-form .perigo { background: rgba(255,90,95,.18) !important; color: #ff9a9d !important; }

/* rotina no cartão do minion */
.rotina { border-top: 1px solid var(--linha); margin-top: 10px; padding-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.rotina-tit { font-weight: 700; }
.rotina-tit small { background: var(--fundo3); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.tf-mini { text-align: left; background: var(--fundo2); border: 1px solid var(--linha); border-radius: 8px; padding: 6px 8px; color: var(--texto); display: flex; flex-direction: column; font: inherit; cursor: pointer; }
.tf-mini span { font-size: 11px; color: var(--fraco); }
.dar-rotina { background: none; border: 1px dashed var(--linha); color: #c9cff0; border-radius: 8px; padding: 7px; font-weight: 700; cursor: pointer; }

/* celular */
#mundo { touch-action: none; }
@media (max-width: 800px) {
  .quadro-fundo { padding: 0; }
  .quadro { border-radius: 0; height: 100%; }
  .semana, .kanban { grid-template-columns: repeat(7, 78vw); scroll-snap-type: x mandatory; }
  .dia, .col { scroll-snap-align: start; }
  .cartao { left: 0; right: 0; bottom: 0; width: auto; max-height: 72vh; border-radius: 16px 16px 0 0; }
  .q-form { width: 100%; }
}

/* criar tarefa estilo ClickUp */
.q-form.cu { position: fixed; inset: 0; margin: auto; width: min(620px, 94vw); height: fit-content; max-height: 90vh; border: 1px solid var(--linha); border-radius: 16px; padding: 18px 22px; gap: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); z-index: 60; }
.q-form.cu > * { flex-shrink: 0; }
.cu-topo { display: flex; align-items: center; justify-content: space-between; }
.cu-onde { font-size: 12px; color: var(--fraco); font-weight: 700; background: var(--fundo2); padding: 4px 10px; border-radius: 6px; }
.q-form .cu-x { background: none; border: 0; color: var(--fraco); font-size: 16px; cursor: pointer; padding: 4px 8px; width: auto; }
.q-form .cu-titulo { font-size: 22px; font-weight: 800; background: none; border: 0; border-bottom: 1px solid var(--linha); border-radius: 0; padding: 10px 0 8px; }
.q-form .cu-titulo:focus { outline: none; border-color: var(--amarelo); }
.cu-tipo { display: flex; gap: 8px; margin: 10px 0 4px; }
.cu-tipo label { flex: 1; margin: 0; cursor: pointer; }
.cu-tipo input { display: none; }
.cu-tipo span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--linha); background: var(--fundo2); color: var(--texto); font-weight: 800; font-size: 14px; }
.cu-tipo span small { font-weight: 500; font-size: 11px; color: var(--fraco); }
.cu-tipo input:checked + span { border-color: var(--amarelo); background: rgba(245,196,81,.12); }
.cu-props { display: flex; flex-direction: column; border: 1px solid var(--linha); border-radius: 10px; margin: 6px 0 8px; }
.cu-linha { display: flex; align-items: flex-start; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--linha); }
.cu-props > :last-child, .cu-props > :last-child .cu-linha { border-bottom: 0; }
.cu-nm { width: 120px; flex-shrink: 0; font-size: 13px; color: var(--fraco); font-weight: 600; padding-top: 8px; }
.cu-campo { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.q-form .cu-campo select, .q-form .cu-campo input[type=date] { background: transparent; border-color: transparent; }
.q-form .cu-campo select:hover, .q-form .cu-campo input[type=date]:hover { border-color: var(--linha); }
.cu-campo .q-dias { padding-top: 4px; }
.q-form .cu-rot { font-size: 13px; color: var(--texto); font-weight: 700; margin-top: 8px; }
.q-form.cu textarea { min-height: 64px; resize: vertical; line-height: 1.4; }
.cu-criada { margin-top: 4px; }
.q-form.cu .ed-bts { justify-content: flex-end; }
.q-form.cu .ed-bts button { flex: 0 0 auto; padding: 10px 18px; }
@media (max-width: 800px) {
  .q-form.cu { width: 100vw; max-height: 100%; height: 100%; border-radius: 0; }
  .cu-nm { width: 104px; white-space: nowrap; font-size: 12px; }
}

/* chat sempre à direita, grande, de cima a baixo */
.cartao { left: auto; right: 14px; top: 14px; bottom: 14px; width: min(44vw, 680px); max-height: none; display: flex; flex-direction: column; overflow-y: auto; border-radius: 18px; padding: 18px 18px 0; font-size: 14px; }
/* uma rolagem só: nada aqui dentro rola sozinho */
.cartao > .info, .cartao > .edicao { flex-shrink: 0; max-height: none; overflow: visible; }
.cartao > .apagar-orca { flex-shrink: 0; margin-top: 8px; }
.cartao .apagar.perigo { background: rgba(255, 90, 95, .14); color: #ff9a9d; border: 1px solid rgba(255, 90, 95, .35); border-radius: 10px; padding: 9px 12px; font-weight: 700; cursor: pointer; }
.cartao .chat { flex: 1 0 auto; display: flex; flex-direction: column; }
/* 2 rolagens: o cartão todo + a conversa */
.cartao .msgs { flex: none; height: 60vh; max-height: none; min-height: 200px; overflow-y: auto; }
.cartao .chat-form { padding: 8px 0 18px; }
.cartao .chat-form textarea { font-size: 14px; }
@media (max-width: 800px) {
  .cartao { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 88vh; max-height: 88vh; border-radius: 18px 18px 0 0; }
}
.cartao .chat { min-height: 170px; }
.cartao .ed-bts { align-items: stretch; }
.cartao .ed-bts button { padding: 9px 14px; }

/* ---------- barra de baixo: botões, avisos de quem precisa de você, máquinas (v58) ---------- */
.rodape { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 10px;
  background: rgba(13, 15, 26, .94); border: 1px solid var(--linha); border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.45); z-index: 3; }
.rodape .topo-bts { flex: none; flex-wrap: nowrap; }
.rodape .topo-bts button { box-shadow: none; background: var(--fundo3); }
.rodape .maquinas { position: static; flex: none; }
.rodape .maq { background: var(--fundo2); }
.avisos { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.avisos::-webkit-scrollbar { display: none; }
.av-ok { color: var(--fraco); font-size: 12.5px; white-space: nowrap; }
.av-chip { flex: none; max-width: 260px; display: flex; gap: 6px; align-items: center; border-radius: 999px; padding: 7px 12px; font-size: 12.5px; cursor: pointer;
  background: rgba(255, 159, 67, .16); border: 1px solid rgba(255, 159, 67, .55); color: #ffd3a8; white-space: nowrap; overflow: hidden; animation: chamar 1.6s ease-in-out infinite; }
.av-chip span { overflow: hidden; text-overflow: ellipsis; color: #f3d9bf; }
.av-chip.erro { background: rgba(255, 90, 95, .14); border-color: rgba(255, 90, 95, .5); color: #ffb3b5; animation: none; }
.av-chip.lento { background: rgba(245, 196, 81, .12); border-color: rgba(245, 196, 81, .45); color: #f5dc9a; animation: none; }
.av-chip.dep { background: rgba(199, 146, 234, .14); border-color: rgba(199, 146, 234, .5); color: #e2c9f7; animation: none; }
.av-chip.feito { background: rgba(61, 220, 132, .14); border-color: rgba(61, 220, 132, .5); color: #a8f0c6; animation: none; }
@keyframes chamar { 50% { box-shadow: 0 0 0 4px rgba(255, 159, 67, .18); } }
.cartao { bottom: 80px; }
.aviso { top: 18px; }

/* chat igual ao Orca: passos em cinza, status com tempo e Parar */
.bal.passo { align-self: flex-start; background: none; border: 0; padding: 1px 4px; margin: 0; color: var(--fraco); font-size: 12.5px; display: flex; gap: 7px; max-width: 100%; }
.bal.passo .p-ic { flex: none; width: 16px; text-align: center; opacity: .85; }
.bal.passo .p-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bal.passo em { font-style: normal; color: #5f6690; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; }
.bal.ajuda { border: 1px solid rgba(255, 159, 67, .6); background: rgba(255, 159, 67, .1); }
.status-chat { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; padding: 7px 8px 7px 12px; border-radius: 10px; background: var(--fundo2); font-size: 12.5px; color: var(--fraco); }
.status-chat[hidden] { display: none; }
.status-chat .st-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-chat.lento { color: #f5dc9a; background: rgba(245, 196, 81, .1); }
.status-chat .parar { flex: none; background: rgba(255, 90, 95, .14); color: #ff9a9d; border: 1px solid rgba(255, 90, 95, .35); border-radius: 8px; padding: 5px 10px; font-weight: 700; cursor: pointer; }

@media (max-width: 800px) {
  .rodape { left: 8px; right: 8px; bottom: 8px; height: auto; min-height: 48px; flex-wrap: wrap; padding: 6px 8px; gap: 6px; }
  .avisos { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .avisos:has(.av-ok) { display: none; }
  .rodape .maquinas { margin-left: auto; }
  .rodape .maq small { display: none; }
  .cartao { bottom: 0; z-index: 4; }
}

/* tarefa longa + sugestão de minion */
.q-form.cu textarea.cu-longo { min-height: 170px; font-size: 14px; }
.cu-quem { border: 1px solid var(--linha); border-radius: 10px; padding: 10px 12px; margin: 6px 0 4px; background: rgba(255,255,255,.02); }
.cu-sug-tit { font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.cu-sug-tit small { font-weight: 500; color: var(--fraco); margin-left: 6px; }
.cu-sug { display: flex; flex-wrap: wrap; gap: 8px; }
.q-form .cu-sug-b { width: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--linha); background: var(--fundo2); color: var(--texto); font-weight: 700; font-size: 13px; cursor: pointer; text-align: left; }
.q-form .cu-sug-b small { font-weight: 500; font-size: 11px; color: var(--fraco); }
.q-form .cu-sug-b.on { border-color: var(--amarelo); background: rgba(245,196,81,.12); }
.q-form .cu-sug-b:not(.cu-criar) { flex-direction: row; align-items: center; gap: 9px; padding: 6px 12px 6px 6px; }
.q-form .cu-sug-b span { display: flex; flex-direction: column; gap: 2px; }
.q-form .cu-foto { width: 34px; height: 34px; border-radius: 50%; background: var(--fundo3); flex: none; }
.q-form .cu-sug-b.cu-criar { border-style: dashed; border-color: var(--amarelo); color: var(--amarelo); }
.cu-novo { display: flex; flex-direction: column; gap: 4px; }
.cu-novo-bts { display: flex; gap: 8px; margin-top: 6px; }
.q-form .cu-novo-bts button { width: auto; padding: 8px 14px; }

/* mudar a frequência de verdade */
.campo .mudar-freq { float: right; border: 0; background: none; color: var(--fraco); font-size: 10px; cursor: pointer; padding: 0; }
.campo .mudar-freq:hover { color: inherit; }
.campo.freq.aberto { grid-column: 1 / -1; }
.freq-ed { display: grid; gap: 6px; margin-top: 4px; }
.freq-ed .modos, .freq-ed .dias, .freq-ed .bts { display: flex; gap: 4px; flex-wrap: wrap; }
.freq-ed button { border: 1px solid #ffffff22; background: var(--fundo); color: inherit; border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.freq-ed button.on, .freq-ed .freq-salvar { background: #f5d33a; color: #222; border-color: #f5d33a; }
.freq-ed .dias button { width: 28px; padding: 4px 0; }
.freq-ed input, .freq-ed select { background: var(--fundo); color: inherit; border: 1px solid #ffffff22; border-radius: 6px; padding: 5px 7px; font-size: 12px; }
.freq-ed .f-n { width: 80px; }
.freq-ed .f-h { width: 100%; box-sizing: border-box; }
.freq-ed .dica { display: block; font-size: 10px; color: var(--fraco); }
.freq-ed[data-modo="intervalo"] .so-horarios, .freq-ed[data-modo="horarios"] .so-intervalo { display: none; }

/* ---------- Conversas (tipo WhatsApp Web) ---------- */
.caixa-bt { position: relative; font-size: 14px; font-weight: 600; }
.caixa-bt b { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--verde); color: #08240f; font-size: 11px; display: grid; place-items: center; }
.zap { position: fixed; top: 0; bottom: 0; left: 0; width: min(920px, calc(100vw - 44px)); z-index: 50; display: flex; background: var(--fundo); border-right: 1px solid var(--linha); box-shadow: 8px 0 40px rgba(0,0,0,.55); }
.zap-aba { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 51; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; background: var(--fundo2); border: 1px solid var(--linha); border-left: 0; border-radius: 0 12px 12px 0; color: inherit; box-shadow: 4px 0 18px rgba(0,0,0,.4); }
.zap-aba span { font-size: 18px; }
.zap-aba em { font-style: normal; font-size: 13px; font-weight: 600; writing-mode: vertical-rl; transform: rotate(180deg); }
.zap-aba b { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--verde); color: #08240f; font-size: 11px; display: grid; place-items: center; }
.zap-aba:hover { background: var(--fundo3); }
body.zap-on .zap-aba { left: min(920px, calc(100vw - 44px)); }
.zap-lista { width: 380px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--linha); background: var(--fundo); }
.zl-topo { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; font-size: 17px; }
.zap-fechar { background: var(--fundo3); border: 0; border-radius: 8px; width: 32px; height: 32px; }
.zap .busca { padding: 6px 14px 4px; }
.zap .busca small { display: block; color: var(--fraco); font-size: 11px; margin-top: 4px; }
.zl-filtros { display: flex; gap: 6px; padding: 6px 14px 10px; }
.zl-filtros button { background: var(--fundo2); border: 1px solid var(--linha); border-radius: 16px; padding: 5px 12px; font-size: 13px; color: var(--fraco); }
.zl-filtros button.on { background: rgba(61, 220, 132, .14); border-color: rgba(61, 220, 132, .5); color: var(--verde); font-weight: 600; }
.zl-itens { flex: 1; overflow-y: auto; }
.zi { display: flex; gap: 12px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--linha); padding: 11px 16px; align-items: center; }
.zi:hover, .zi.on { background: var(--fundo2); }
.zi .av, .zc-topo .av { width: 46px; height: 46px; font-size: 24px; display: grid; place-items: center; }
.zi-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zi-l1, .zi-l2 { display: flex; align-items: center; gap: 8px; }
.zi-l1 b { flex: 1; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zi-l1 small { font-size: 11px; color: var(--fraco); flex: none; }
.zi.nl .zi-l1 small { color: var(--verde); font-weight: 700; }
.zi-p { flex: 1; font-size: 13px; color: var(--fraco); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zi.nl .zi-p { color: var(--texto); }
.zi-sala { font-size: 10.5px; color: #5f6690; }
.bolinha { width: 10px; height: 10px; border-radius: 50%; background: var(--verde); flex: none; }
.digitando { color: var(--verde) !important; font-style: normal; }
.zap-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #0a0c16; }
.zc-topo { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--fundo2); border-bottom: 1px solid var(--linha); min-height: 66px; }
.zc-topo .zi-t b { font-size: 15px; }
.zc-topo small { font-size: 12px; color: var(--fraco); }
.zc-vazio-t { color: var(--fraco); }
.zc-volta { display: none; background: none; border: 0; font-size: 20px; }
.zc-ajuda { display: flex; gap: 6px; margin-left: auto; }
.zc-ajuda button { background: var(--fundo3); border: 0; border-radius: 8px; padding: 7px 11px; font-size: 12.5px; cursor: pointer; }
.zc-ajuda .zi-ok, .zi-acoes .zi-ok { background: #2fb36a; color: #fff; font-weight: 700; }
.zi.zi-pede { position: relative; }
.zi-acoes { position: absolute; top: 6px; right: 8px; display: flex; gap: 6px; z-index: 1; }
.zi-acoes span { background: var(--fundo3); border-radius: 8px; padding: 3px 9px; font-size: 12px; cursor: pointer; line-height: 1.4; }
.zi-acoes span:hover { filter: brightness(1.25); }
.zi-acoes .zi-ok { padding: 3px 10px; font-size: 13px; }
.zc-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 18px 8%; }
.zc-msgs .bal { max-width: 75%; font-size: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.zc-msgs .bal.voce { background: #1f5f45; }
.zc-msgs .bal.agente { background: var(--fundo3); }
.zc-vazio { margin: auto; text-align: center; color: var(--fraco); font-size: 15px; line-height: 1.8; }
.zc-form { display: flex; gap: 8px; align-items: flex-start; padding: 10px 16px; background: var(--fundo2); border-top: 1px solid var(--linha); }
.zc-campo { flex: 1; }
.zc-campo textarea { width: 100%; resize: none; max-height: 160px; background: var(--fundo); border: 1px solid var(--linha); color: var(--texto); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; outline: none; field-sizing: content; }
.zc-campo textarea:focus { border-color: var(--verde); }
.zc-campo small { display: block; color: var(--fraco); font-size: 11px; margin-top: 4px; }
.zc-form button { background: var(--verde); color: #08240f; border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; }
@media (max-width: 760px) {
  .zap-lista { width: 100%; }
  .zap-chat { display: none; }
  .zap.com-chat .zap-lista { display: none; }
  .zap.com-chat .zap-chat { display: flex; }
  .zc-volta { display: block; }
  .zc-msgs { padding: 14px 10px; }
}
.zc-msgs .bal pre { background: #05060b; border-radius: 6px; padding: 8px 10px; overflow-x: auto; font-size: 12px; white-space: pre; margin: 6px 0; }

.q-filtro { display: flex; align-items: center; gap: 8px; margin: 0 auto 0 18px; font-size: 13px; color: var(--fraco); }
.q-filtro select { background: var(--fundo2); color: var(--texto); border: 1px solid var(--linha); border-radius: 8px; padding: 6px 10px; font-size: 13px; }

/* 📊 Dash da sala */
.dash { display: flex; flex-direction: column; gap: 14px; }
.d-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.d-card { background: var(--fundo2); border: 1px solid var(--linha); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.d-card small { color: var(--fraco); font-size: 12px; }
.d-card b { font-size: 26px; }
.d-card span { color: var(--fraco); font-size: 12px; }
.d-card.ruim { border-color: rgba(255, 90, 95, .5); } .d-card.ruim b { color: var(--vermelho); }
.d-card.bom b { color: var(--verde); }
.d-barra { display: block; height: 6px; border-radius: 3px; background: var(--fundo3); overflow: hidden; }
.d-barra i { display: block; height: 100%; background: var(--amarelo); }
.d-bloco { background: var(--fundo2); border: 1px solid var(--linha); border-radius: 12px; padding: 12px 14px; }
.d-bloco h4 { margin: 0 0 8px; }
.d-bloco p { margin: 0; color: var(--fraco); }
.d-tab { overflow-x: auto; max-height: 340px; overflow-y: auto; }
.d-tab table { border-collapse: collapse; width: 100%; font-size: 13px; }
.d-tab th, .d-tab td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--linha); vertical-align: top; }
.d-tab th { color: var(--fraco); font-weight: 600; position: sticky; top: 0; background: var(--fundo2); }
.d-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.d-lista li { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.d-lista a { color: var(--amarelo); text-decoration: none; } .d-lista a:hover { text-decoration: underline; }
.d-lista small { color: var(--fraco); width: 100%; font-size: 12px; }
.d-tira { background: none; border: 0; color: var(--fraco); cursor: pointer; padding: 0 2px; }
.d-novo { display: grid; grid-template-columns: 1fr 2fr auto; gap: 4px 8px; margin-top: 10px; align-items: start; }
.d-novo input { grid-row: 1; } .d-novo small { grid-row: 2; color: var(--fraco); font-size: 11px; } .d-novo button { grid-row: 1; }
.d-pe { display: block; color: var(--fraco); font-size: 12px; margin-top: 8px; }
.d-pe button { background: none; border: 0; color: var(--amarelo); cursor: pointer; }
.d-novo input { background: var(--fundo3); border: 1px solid var(--linha); color: var(--texto); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 13px; }
.d-novo button { background: var(--fundo3); border: 1px solid var(--linha); color: var(--texto); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
.zi-lixo{flex:none;padding:2px 5px;border-radius:6px;font-size:12px;opacity:0;cursor:pointer}
.zi:hover .zi-lixo{opacity:.55}
.zi-lixo:hover{opacity:1!important;background:rgba(255,90,95,.25)}
.zc-lixo{background:none;border:0;font-size:16px;cursor:pointer;opacity:.6;padding:4px 6px;border-radius:8px}
.zc-lixo:hover{opacity:1;background:rgba(255,90,95,.25)}
.manual .man-txt{width:100%;box-sizing:border-box;margin-top:8px;font:13px/1.45 inherit;font-family:inherit;padding:8px;border-radius:8px;border:1px solid var(--linha);background:var(--fundo);color:inherit;resize:vertical}
.manual small{display:block;opacity:.7;margin:4px 0 8px}

.zf-sel{margin-left:auto}
.zl-sel{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 10px}
.zl-sel[hidden]{display:none}
.zl-sel button{background:var(--fundo2);border:1px solid var(--linha);border-radius:16px;padding:5px 12px;font-size:13px}
.zl-sel button.perigo{border-color:rgba(255,90,95,.5);color:#ff8a8d}
.zl-sel small{width:100%;color:var(--fraco);font-size:11px}
.zi-marca{flex:none;width:20px;height:20px;border-radius:6px;border:2px solid var(--fraco);display:grid;place-items:center;font-size:13px;font-weight:800}
.zi.marcada .zi-marca{background:var(--verde);border-color:var(--verde);color:#062}

/* imagens no chat */
.clipe { background: none !important; color: var(--texto) !important; border: 1px solid var(--linha) !important; border-radius: 8px; padding: 7px 9px !important; font-size: 16px; line-height: 1; cursor: pointer; }
.clipe:hover { border-color: var(--amarelo) !important; }
.anexos { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 16px 0; }
.cartao .anexos { padding: 8px 0 0; }
.anexos span { position: relative; }
.anexos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--linha); display: block; }
.anexos button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #e5484d; color: #fff; font-size: 11px; line-height: 20px; padding: 0; cursor: pointer; }
.soltar { outline: 2px dashed var(--amarelo); outline-offset: 2px; }
.bal .fotos { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.bal .fotos img { max-width: 220px; max-height: 220px; border-radius: 8px; display: block; object-fit: cover; }
.clipe.mic.gravando { border-color: #e5484d !important; background: rgba(229,72,77,.15) !important; animation: pulsoMic 1s ease-in-out infinite; }
@keyframes pulsoMic { 50% { box-shadow: 0 0 0 4px rgba(229,72,77,.25); } }

/* ---------- celular simples (v91) ---------- */
@media (max-width: 800px) {
  html, body { overscroll-behavior: none; }
  /* campos com 16px: o iPhone não dá zoom sozinho ao tocar */
  input, textarea, select, .cartao .chat-form textarea, .zc-campo textarea { font-size: 16px !important; }
  button { min-height: 40px; }
  /* barra de baixo: só o essencial, colada no rodapé com folga do iPhone */
  .rodape { left: 6px; right: 6px; bottom: calc(6px + env(safe-area-inset-bottom)); border-radius: 14px; }
  .rodape .topo-bts button { padding: 0 12px; font-size: 14px; }
  .rodape .maq { padding: 4px 6px; }
  /* aba das conversas: botão redondo no canto, sem texto */
  .zap-aba { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); left: 10px; transform: none; flex-direction: row; padding: 12px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
  .zap-aba em { display: none; }
  .zap-aba span { font-size: 22px; }
  /* tudo que abre ocupa a tela inteira */
  .zap { width: 100vw; border-right: 0; padding-bottom: env(safe-area-inset-bottom); }
  .zap-lista { width: 100%; border-right: 0; }
  .cartao { left: 0 !important; right: 0 !important; top: 0 !important; bottom: 0 !important; width: 100% !important; height: 100% !important; max-height: none !important;
    border-radius: 0; padding: 14px 14px 0; padding-top: calc(14px + env(safe-area-inset-top)); z-index: 30; }
  .cartao .msgs { height: auto; min-height: 45vh; flex: 1 0 45vh; }
  .cartao .chat-form { padding-bottom: calc(12px + env(safe-area-inset-bottom)); position: sticky; bottom: 0; background: var(--fundo); }
  .porta { place-items: stretch; }
  .porta form, .janela { width: 100%; max-width: none; max-height: 100%; height: 100%; border-radius: 0; border: 0; padding: 18px 16px; padding-top: calc(18px + env(safe-area-inset-top)); overflow-y: auto; }
  #porta form { height: auto; margin: auto 0; }
  .ed-bts { flex-wrap: wrap; }
  .ed-bts button { flex: 1 1 auto; min-height: 44px; }
  /* tabelas e quadros rolam pro lado sem quebrar a tela */
  .d-cards { grid-template-columns: 1fr 1fr; }
  .d-novo { grid-template-columns: 1fr; }
  .d-novo input, .d-novo button, .d-novo small { grid-row: auto; }
  .aviso { max-width: 92vw; font-size: 14px; text-align: center; }
  .zi-lixo { opacity: .55; }
}
@media (max-width: 800px) {
  .cartao .fechar { position: sticky; top: 0; float: right; width: 40px; height: 40px; font-size: 18px; z-index: 2; }
}

/* 📁 Pastas nas conversas (igual à barra do Orca) */
.zl-pasta { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; background: none; cursor: pointer; padding: 12px 14px 6px; font: inherit; font-size: 12px; font-weight: 700; color: #8a94a6; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
.zl-pasta:hover { color: #c9d1dc; }
.zl-pasta small { font-weight: 600; text-transform: none; display: flex; align-items: center; gap: 4px; }
/* botões da janela que não são o amarelo: texto claro (antes herdava o escuro do .porta) */
.porta .janela button:not([type=submit]) { color: var(--texto); }
.porta .janela button.perigo { color: #ffb3b5 !important; }
/* ações do minion: ícones no topo do cartão */
.cartao > .acoes { flex-shrink: 0; display: flex; gap: 8px; margin-top: 12px; }
.cartao .acoes .ic { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; border-radius: 12px;
  background: var(--fundo2); border: 1px solid var(--linha); color: var(--texto); font-size: 11px; font-weight: 700; cursor: pointer; }
.cartao .acoes .ic span { font-size: 20px; line-height: 1; }
.cartao .acoes .ic:hover { border-color: #3a4166; }
.cartao .acoes .ic.on { border-color: var(--amarelo); background: rgba(240, 196, 81, .12); }
.cartao .acoes .ic.perigo { background: rgba(255, 90, 95, .1) !important; color: #ff9a9d !important; border-color: rgba(255, 90, 95, .35) !important; margin: 0; padding: 9px 4px; border-radius: 12px; font-size: 11px; }
.cartao > .edicao[hidden] { display: none; }
.edicao .pn-tit { display: block; margin-bottom: 4px; }

/* avisos de resposta final: canto de cima à direita */
.notas { position: fixed; top: 14px; right: 14px; z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.notas .nota { pointer-events: auto; position: relative; display: flex; align-items: flex-start; gap: 10px; width: 340px; max-width: calc(100vw - 28px); text-align: left; background: rgba(40, 42, 54, .78); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); color: #fff; border: 1px solid rgba(255,255,255,.12); padding: 11px 14px 11px 11px; border-radius: 16px; font: inherit; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: notaEntra .35s cubic-bezier(.2,.9,.3,1.2); transition: opacity .3s, transform .3s; }
.notas .nota img { width: 34px; height: 34px; border-radius: 8px; flex: none; margin-top: 2px; }
.notas .nota-t { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.notas .nota-t small { font-size: 10.5px; letter-spacing: .03em; opacity: .6; display: flex; justify-content: space-between; gap: 8px; }
.notas .nota-t small i { font-style: normal; }
.notas .nota-t b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notas .nota-t em { font-style: normal; font-size: 13px; opacity: .85; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notas .nota-x { position: absolute; top: -7px; left: -7px; width: 20px; height: 20px; border-radius: 50%; background: rgba(70,72,84,.95); border: 1px solid rgba(255,255,255,.2); font-size: 13px; line-height: 17px; text-align: center; opacity: 0; transition: opacity .2s; }
.notas .nota:hover .nota-x { opacity: 1; }
.notas .nota.sai { opacity: 0; transform: translateX(30px); }
@keyframes notaEntra { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.notas .nota.pede { border-color: rgba(255, 200, 60, .55); }
@media (pointer: coarse) { .notas { left: 8px; right: 8px; top: 8px; align-items: stretch; } .notas .nota { width: auto; max-width: none; } .notas .nota-x { opacity: 1; } .notas .nota.sai { transform: translateY(-30px); } @keyframes notaEntra { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } } }

/* Orca: linhas compactas, só rosto e título */
.zi.zi-mini { gap: 8px; padding: 4px 14px 4px 22px; border-bottom: 0; }
.zi.zi-mini .av { width: 22px; height: 22px; font-size: 13px; flex: none; }
.zi.zi-mini b { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zi.zi-mini.nl b { font-weight: 700; }
.zi.zi-mini .digitando { font-size: 11px; flex: none; }
.zi.zi-mini .bolinha { flex: none; }
/* fábrica: janelinha da ferramenta */
.ferr-janela { height: min(860px, 100%); }
.ferr-janela .q-topo { gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--linha); }
.ferr-janela .q-topo h2 { flex: 1; }
.ferr-dica { font-weight: 500; font-size: 12px; opacity: .65; margin-left: 6px; }
.ferr-aba { background: var(--fundo3); color: inherit; text-decoration: none; padding: 7px 12px; border-radius: 8px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.ferr-tela { flex: 1; width: 100%; border: 0; background: #fff; min-height: 60vh; }
.ferr-nota { margin: 0; padding: 6px 16px; font-size: 11px; opacity: .6; }
.ferr-breve { padding: 60px 20px; text-align: center; font-size: 16px; line-height: 1.6; }
.notas-m { margin: 10px 0; padding: 8px 10px; border-radius: 8px; background: rgba(127,127,127,.1); font-size: 13px; line-height: 1.5; }
.notas-m > b { display: block; margin-bottom: 4px; }
.notas-m span { opacity: .7; }
.notas-m .links { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.notas-m .links a { padding: 3px 8px; border-radius: 6px; background: rgba(90,120,255,.18); color: inherit; text-decoration: none; }
.notas-m .links a:hover { background: rgba(90,120,255,.32); }
.notas-m p { margin: 4px 0 0; opacity: .85; }

/* ---------- Barra de jogo (fazendinha) no topo direito ---------- */
.hud { position: absolute; top: 10px; right: 12px; z-index: 40; display: flex; align-items: stretch; gap: 5px; padding: 5px;
  background: linear-gradient(#8a5a32, #6b4223); border: 3px solid #4a2c14; border-radius: 16px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.18), inset 0 -3px 0 rgba(0,0,0,.25), 0 6px 18px rgba(0,0,0,.45); }
.hud::before { content: ''; position: absolute; inset: 0; border-radius: 13px; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(0,0,0,.08) 46px 48px); }
.hud .maquinas { position: static; display: flex; gap: 3px; padding: 3px 6px; background: #3b2412; border-radius: 10px; align-items: center; }
.hud .maq { background: none; border: 0; padding: 2px 3px; font-size: 9px; flex-direction: column; gap: 2px; color: #f3e2c4; font-weight: 800; }
.hud .maq small { display: none; }
.hud .maq i { width: 11px; height: 11px; }
.hud .maq.f-acer i { width: 12px; }
.hud-chips { display: flex; gap: 5px; flex-wrap: nowrap; position: relative; }
.hud-c { display: flex; align-items: center; gap: 5px; padding: 3px 8px 3px 3px; border-radius: 11px; cursor: default; font: inherit; color: #3b2412;
  background: linear-gradient(#fff3d6, #f1d9a6); border: 2px solid #4a2c14; box-shadow: inset 0 -2px 0 rgba(120,70,20,.25); transition: transform .12s; }
.hud-c[data-hud] { cursor: pointer; }
.hud-c:hover { transform: translateY(-2px); }
.hud-c i { font-style: normal; font-size: 15px; width: 24px; height: 24px; display: grid; place-items: center; background: #fff; border-radius: 50%; border: 2px solid #c79a5b; flex: none; }
.hud-c span { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.hud-c b { font-size: 13px; font-weight: 800; white-space: nowrap; }
.hud-c small { font-size: 8px; font-weight: 700; opacity: .7; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.hud-c.ouro b { color: #a86a00; }
.hud-c.fogo b { color: #c2410c; }
.hud-c.bom b { color: #15803d; }
.hud-c.ruim b { color: #b91c1c; }
.hud-c.gema b { color: #7c3aed; }
.hud-c.alerta { background: linear-gradient(#ffe1d6, #ffb79c); animation: hud-pisca 1.6s ease-in-out infinite; }
@keyframes hud-pisca { 50% { box-shadow: 0 0 0 3px rgba(255,120,60,.45), inset 0 -2px 0 rgba(120,70,20,.25); } }
.hud-nivel { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 3px 9px; background: #3b2412; border-radius: 10px; color: #ffd76a; font-size: 12px; min-width: 64px; }
.hud-nivel .xp { height: 7px; background: #1f130a; border-radius: 4px; overflow: hidden; border: 1px solid #000; }
.hud-nivel .xp i { display: block; height: 100%; background: linear-gradient(90deg, #7ee25a, #3fbf3f); }
.hud-pop { position: absolute; top: calc(100% + 8px); right: 0; width: 250px; display: flex; flex-direction: column; gap: 6px; padding: 12px; z-index: 5;
  background: #fff3d6; color: #3b2412; border: 3px solid #4a2c14; border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.hud-pop[hidden] { display: none; }
.hud-pop label { font-weight: 800; font-size: 13px; }
.hud-pop input { padding: 8px; border-radius: 8px; border: 2px solid #c79a5b; font: inherit; }
.hud-pop small { font-size: 11px; opacity: .75; }
.hud-pop button { padding: 7px; border-radius: 8px; border: 2px solid #4a2c14; background: #7ee25a; font-weight: 800; cursor: pointer; }
@media (max-width: 1350px) { .hud-c small { display: none; } .hud-c b { font-size: 12px; } .hud-c i { width: 22px; height: 22px; font-size: 14px; } }
@media (max-width: 800px) { .hud { top: 58px; left: 8px; right: 8px; max-width: none; padding: 4px; } .hud-chips { flex-wrap: nowrap; overflow-x: auto; } .hud-nivel { display: none; } }
#palco:has(#cartao:not([hidden])) .hud { opacity: 0; pointer-events: none; }
.hud { transition: opacity .2s; }
.zi-pede .zi-l1 { padding-right: 118px; }

/* ===== upgrade 140: avisos empilhados, chefes na lista, Sala inteira, Base, celular estilo WhatsApp ===== */
/* avisos: pilha no topo, um embaixo do outro, nunca em cima da caixa de texto */
.aviso { position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); opacity: 1; background: none; padding: 0; box-shadow: none; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; max-width: 92vw; }
.aviso-i { background: rgba(13, 15, 26, .96); padding: 10px 18px; border-radius: 12px; font-size: 15px; box-shadow: 0 6px 20px rgba(0,0,0,.35); opacity: 0; transform: translateY(-8px); transition: .35s; text-align: center; }
.aviso-i.on { opacity: 1; transform: none; }
/* bolinha de status na foto: verde pulsando = trabalhando, cinza = dormindo */
.av-w { position: relative; display: inline-flex; flex: none; }
.st-pt { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #6b7080; border: 2px solid var(--fundo); }
.st-pt.on { background: var(--verde); animation: pulsar 1.6s ease-in-out infinite; }
@keyframes pulsar { 0%, 100% { box-shadow: 0 0 0 0 rgba(80, 220, 130, .6); } 50% { box-shadow: 0 0 0 5px rgba(80, 220, 130, 0); } }
/* Dr. Nefário e gerentes no topo da lista */
.zi.zi-chefe { border-left: 4px solid var(--cor, #7b5cff); }
.zi.zi-nef { background: rgba(123, 92, 255, .1); }
.zi-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 8px; background: var(--fundo3); color: var(--fraco); margin-left: 6px; vertical-align: middle; }
.zi-tag.nef { background: #7b5cff; color: #fff; }
.zl-todos { width: 100%; text-align: left; background: var(--fundo2); border: 0; border-top: 1px solid var(--linha); color: var(--texto); padding: 12px 16px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 44px; }
/* "ver mais" nas mensagens compridas */
.dobra { max-height: 17.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.ver-mais { display: block; margin-top: 4px; background: none; border: 0; color: var(--verde); font-weight: 700; font-size: 13px; padding: 6px 0; min-height: 32px; cursor: pointer; }
/* botões do chat do gerente */
.zc-modos { display: flex; gap: 6px; margin-left: auto; }
.zc-modos button, .zc-mapa { background: var(--fundo3); border: 0; border-radius: 8px; padding: 7px 11px; font-size: 12.5px; cursor: pointer; color: inherit; white-space: nowrap; }
.zc-modos button.on { background: var(--verde); color: #08240f; font-weight: 700; }
.zc-topo .zc-mapa, .zl-mapa { display: none; }
/* feed "Sala inteira" */
.feed-tit { text-align: center; color: var(--fraco); font-size: 12px; margin: 0 0 8px; }
.feed-l { display: flex; gap: 8px; align-items: flex-end; max-width: 85%; }
.feed-l.voce { align-self: flex-end; flex-direction: row-reverse; }
.feed-l .av { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--fundo3) center / cover no-repeat; image-rendering: pixelated; }
.feed-l .bal { max-width: 100%; }
.feed-n { display: block; font-size: 12px; color: var(--verde); margin-bottom: 2px; }
.feed-l.voce .feed-n { color: #9fd8c0; }
.zc-responder { align-self: center; margin: 12px 0 4px; background: var(--verde); color: #08240f; border: 0; border-radius: 22px; padding: 12px 20px; font-weight: 700; font-size: 14px; min-height: 44px; cursor: pointer; }
/* aba Base */
.base { display: flex; flex-direction: column; gap: 14px; }
.base-b { display: flex; flex-direction: column; gap: 6px; background: var(--fundo2); border: 1px solid var(--linha); border-radius: 12px; padding: 12px; }
.base-b textarea { width: 100%; resize: vertical; background: var(--fundo); border: 1px solid var(--linha); color: var(--texto); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; }
.base-b textarea:focus { border-color: var(--verde); outline: none; }
.base-b small { color: var(--fraco); font-size: 11.5px; }
.base-b button { align-self: flex-end; background: var(--verde); color: #08240f; border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 700; min-height: 44px; cursor: pointer; }
/* botão flutuante "Ocupados agora" */
.ocupados-bt { position: fixed; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 49; display: flex; align-items: center; gap: 8px; background: var(--fundo2); border: 1px solid var(--linha); color: var(--texto); border-radius: 999px; padding: 10px 16px; min-height: 44px; font-size: 13.5px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.45); cursor: pointer; }
.ocupados-bt[hidden] { display: none; }
.ocupados-bt i { width: 10px; height: 10px; border-radius: 50%; background: var(--verde); animation: pulsar 1.6s ease-in-out infinite; }
.ocupados-bt b { color: var(--verde); }
body.zap-on .ocupados-bt { display: none; }

/* ===== celular (toque): conversas em tela cheia, igual WhatsApp ===== */
body.toque .zap { top: var(--vv-topo, 0); bottom: auto; height: var(--vv-alto, 100dvh); width: 100vw; border-right: 0; padding-bottom: 0; }
body.toque .zap-lista { width: 100%; border-right: 0; padding-top: env(safe-area-inset-top); }
body.toque .zap-chat { display: none; }
body.toque .zap.com-chat .zap-lista { display: none; }
body.toque .zap.com-chat .zap-chat { display: flex; }
body.toque .zc-volta { display: grid; place-items: center; min-width: 44px; min-height: 44px; font-size: 24px; color: inherit; }
body.toque .zc-topo { position: sticky; top: 0; z-index: 2; gap: 6px; padding: calc(6px + env(safe-area-inset-top)) 8px 6px 2px; min-height: 60px; flex-wrap: nowrap; }
body.toque .zc-topo .zi-t { min-width: 0; flex: 1; }
body.toque .zc-topo .zi-t b, body.toque .zc-topo small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.toque .zc-modos { margin-left: 0; }
body.toque .zc-modos button, body.toque .zc-mapa, body.toque .zc-ajuda button, body.toque .zap-fechar { min-height: 44px; min-width: 44px; padding: 8px 10px; }
body.toque .zc-topo .zc-mapa, body.toque .zl-mapa { display: inline-block; }
body.toque .zl-mapa { margin-left: auto; margin-right: 6px; }
body.toque .zc-msgs { padding: 12px 10px; gap: 4px; background: #0b141a; }
body.toque .zc-msgs .bal { max-width: 86%; border-radius: 10px; font-size: 15px; padding: 7px 10px 6px; }
body.toque .zc-msgs .bal.voce { background: #005c4b; border-top-right-radius: 0; border-bottom-right-radius: 10px; }
body.toque .zc-msgs .bal.agente { background: #202c33; border-top-left-radius: 0; border-bottom-left-radius: 10px; }
body.toque .zc-msgs .bal small { font-size: 10.5px; opacity: .65; }
body.toque .feed-l { max-width: 94%; }
body.toque .zc-form { position: sticky; bottom: 0; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); align-items: flex-end; }
body.toque .zc-form button { min-height: 44px; min-width: 44px; border-radius: 22px; }
body.toque .zc-campo textarea { border-radius: 22px; padding: 11px 14px; }
body.toque .zi { min-height: 64px; }
body.toque .zi-lixo { opacity: .7; }
body.toque .ocupados-bt { bottom: calc(80px + env(safe-area-inset-bottom)); right: 10px; }

/* v131: barra de baixo sem botões; some quando não há aviso */
.rodape:has(> #avisos[hidden]) { display: none; }
