:root {
  --bg: #000; --sup: #0c0b12; --sup2: #14121c; --sup3: #1c1927; --linha: rgba(255,255,255,.08); --linha2: rgba(255,255,255,.16);
  --tx: #fff; --tx2: #b3b3b3; --tx3: #76737f; --laranja: #ff7a3d; --rosa: #ff2689; --roxo: #a855f7; --azul: #007aff; --verde: #2fe6a7; --amarelo: #facc15; --vermelho: #ff4d6d;
  --g: linear-gradient(90deg, #ff7a3d, #ff2689 52%, #a855f7);
  --g2: linear-gradient(180deg, #ff7a3d, #ff2689 52%, #a855f7);
  --r: 14px; --lat: 248px; --pn: 520px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--tx); font: 400 14px/1.45 'Space Grotesk', system-ui, sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; background:
  radial-gradient(700px 520px at 0% 8%, rgba(92,16,120,.34), transparent 70%),
  radial-gradient(760px 620px at 100% 96%, rgba(120,12,70,.3), transparent 70%),
  radial-gradient(560px 420px at 62% -8%, rgba(18,5,58,.75), transparent 70%); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: #ff8ac0; }
h1, h2, h3, p { margin: 0; }
svg { display: block; flex: none; }

* { scrollbar-width: thin; scrollbar-color: #ff2689 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--g2) padding-box; border: 3px solid transparent; border-radius: 10px; opacity: .8; }
:hover::-webkit-scrollbar-thumb { border-width: 2px; }
::-webkit-scrollbar-thumb:horizontal { background: var(--g) padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
::selection { background: rgba(255,38,137,.45); }
:focus-visible { outline: 2px solid var(--rosa); outline-offset: 2px; }

input, select, textarea { background: rgba(255,255,255,.05); border: 1px solid var(--linha); border-radius: 10px; padding: 9px 12px; outline: 0; width: 100%; transition: border-color .15s, background .15s; color-scheme: dark; }
input:hover, select:hover, textarea:hover { border-color: var(--linha2); }
input:focus, select:focus, textarea:focus { border-color: var(--rosa); background: rgba(255,38,137,.06); }
input::placeholder, textarea::placeholder { color: var(--tx3); }
textarea { resize: vertical; min-height: 84px; }
select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23b3b3b3' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
select option { background: #15131d; }
input[type=checkbox] { width: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 18px; border-radius: 999px; font-weight: 600; white-space: nowrap; transition: transform .12s, filter .15s, background .15s, box-shadow .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.prim { background: var(--g); color: #fff; box-shadow: 0 6px 26px rgba(255,38,137,.28); }
.btn.prim:hover { filter: brightness(1.1); box-shadow: 0 8px 34px rgba(255,38,137,.42); }
.btn.branco { background: #fff; color: #000; }
.btn.sec { position: relative; background: rgba(255,255,255,.04); }
.btn.sec::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--g); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.btn.sec:hover { background: rgba(255,255,255,.09); }
.btn.fant { color: var(--tx2); }
.btn.fant:hover { color: #fff; background: rgba(255,255,255,.07); }
.btn.perigo { color: var(--vermelho); }
.btn.perigo:hover { background: rgba(255,77,109,.12); }
.btn.peq { height: 31px; padding: 0 13px; font-size: 13px; }
.btn.largo { width: 100%; height: 46px; }
.ico-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--tx2); transition: .15s; flex: none; }
.ico-btn:hover { background: rgba(255,255,255,.09); color: #fff; }
.grad-txt { background: var(--g); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rotulo { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

/* Login */
#login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; z-index: 5; }
.login-caixa { width: 100%; max-width: 420px; display: grid; gap: 18px; }
.login-caixa h1 { font-size: 36px; font-weight: 300; line-height: 1.12; letter-spacing: -.02em; }
.login-caixa h1 b { font-weight: 700; }
.erro-txt { color: var(--vermelho); min-height: 18px; font-size: 13px; }
.campo { display: grid; gap: 6px; }
.campo > span { font-size: 12px; color: var(--tx2); font-weight: 500; }
.dica { font-size: 12px; color: var(--tx3); }

/* Estrutura */
#app { position: fixed; inset: 0; display: flex; }
#lateral { width: var(--lat); flex: none; display: flex; flex-direction: column; padding: 18px 12px 12px; border-right: 1px solid var(--linha); background: rgba(8,7,12,.72); backdrop-filter: blur(16px); z-index: 30; }
.marca { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; padding: 0 8px 18px; }
.marca.grande { font-size: 24px; padding: 0; }
.marca-ico { width: 26px; height: 26px; border-radius: 8px; background: var(--g); position: relative; }
.marca-ico::after { content: ''; position: absolute; left: 9px; top: 5px; width: 7px; height: 12px; border: solid #fff; border-width: 0 2.6px 2.6px 0; transform: rotate(42deg); }
.nav-item, .proj-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; color: var(--tx2); font-weight: 500; text-align: left; transition: background .15s, color .15s; position: relative; }
.nav-item:hover, .proj-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.ativo, .proj-item.ativo { background: rgba(255,255,255,.09); color: #fff; }
.nav-item.ativo::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--g2); }
.nav-num { margin-left: auto; font-size: 11px; font-weight: 600; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: var(--g); color: #fff; }
.lat-titulo { display: flex; align-items: center; justify-content: space-between; padding: 18px 10px 6px; color: var(--tx3); }
.lat-titulo span { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
#lista-projetos { flex: 1; min-height: 0; overflow-y: auto; margin-right: -6px; padding-right: 6px; }
.proj-item { padding-right: 6px; }
.proj-item.alvo { background: rgba(255,38,137,.18); box-shadow: inset 0 0 0 1px var(--rosa); color: #fff; }
.proj-ponto { width: 10px; height: 10px; border-radius: 4px; flex: none; }
.proj-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-qtd { font-size: 12px; color: var(--tx3); }
.proj-mais { display: none; }
.proj-item:hover .proj-mais { display: grid; }
.proj-item:hover .proj-qtd { display: none; }
#estado-agente { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--linha); font-size: 12px; color: var(--tx2); display: flex; align-items: center; gap: 9px; }
.luz { width: 8px; height: 8px; border-radius: 50%; background: var(--tx3); flex: none; }
.luz.on { background: var(--verde); box-shadow: 0 0 10px var(--verde); }
#principal { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
#topo { display: flex; align-items: center; gap: 14px; padding: 14px 22px; min-height: 68px; flex-wrap: wrap; }
#topo h1 { font-size: 25px; font-weight: 300; letter-spacing: -.02em; white-space: nowrap; }
#topo h1 b { font-weight: 700; }
.topo-direita { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.topo-direita select { width: auto; max-width: 140px; height: 38px; padding-top: 0; padding-bottom: 0; border-radius: 999px; font-size: 13px; }
.busca { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--linha); width: 210px; color: var(--tx3); transition: .15s; }
.busca:focus-within { border-color: var(--rosa); width: 260px; }
.busca input { background: none; border: 0; padding: 0; min-width: 0; color: #fff; }
.busca input:focus { background: none; }
kbd { font: 500 11px 'Space Grotesk'; color: var(--tx3); border: 1px solid var(--linha2); border-radius: 5px; padding: 0 5px; }
#vistas { flex: 1; min-height: 0; position: relative; }
.vista { position: absolute; inset: 0; display: none; }
.vista.ativa { display: block; }
.so-celular { display: none; }

/* Quadro */
#v-quadro.ativa { display: flex; gap: 12px; padding: 4px 22px 18px; overflow-x: auto; overflow-y: hidden; }
.coluna { width: 306px; flex: none; display: flex; flex-direction: column; min-height: 0; border-radius: 16px; background: rgba(255,255,255,.028); border: 1px solid var(--linha); transition: border-color .15s, background .15s; }
.coluna.alvo { border-color: rgba(255,38,137,.55); background: rgba(255,38,137,.05); }
.col-topo { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 14px; }
.col-ponto { width: 9px; height: 9px; border-radius: 50%; }
.col-nome { font-weight: 600; font-size: 13.5px; }
.col-qtd { color: var(--tx3); font-size: 12px; margin-right: auto; }
.col-lista { flex: 1; min-height: 40px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 8px; }
.col-add { padding: 0 8px 8px; }
.col-add input { background: rgba(255,255,255,.07); }
.cartao { position: relative; flex: none; padding: 11px 12px; border-radius: var(--r); background: var(--sup2); border: 1px solid var(--linha); cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y; transition: border-color .15s, box-shadow .15s, background .15s; }
.cartao:hover { border-color: var(--linha2); background: var(--sup3); }
.cartao.sel { border-color: var(--rosa); box-shadow: 0 0 0 1px var(--rosa), 0 8px 26px rgba(255,38,137,.2); }
.cartao.aberto { border-color: rgba(255,255,255,.5); }
.cartao.oculto { display: none; }
.cartao.novo { animation: surge .28s cubic-bezier(.2,.9,.3,1.2); }
@keyframes surge { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.cartao-capa { margin: -11px -12px 10px; height: 118px; border-radius: 13px 13px 0 0; overflow: hidden; background: #000; }
.cartao-capa img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cartao-sup { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; min-height: 18px; flex-wrap: wrap; }
.cartao-tit { font-weight: 500; line-height: 1.32; word-break: break-word; padding-right: 16px; }
.cartao.feito .cartao-tit { color: var(--tx2); }
.cartao-inf { display: flex; align-items: center; gap: 9px; margin-top: 9px; color: var(--tx3); font-size: 12px; min-height: 22px; }
.cartao-inf .fim { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.inf { display: inline-flex; align-items: center; gap: 3px; }
.inf.atrasada { color: var(--vermelho); font-weight: 600; }
.inf.hoje { color: var(--amarelo); font-weight: 600; }
.etq { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--tx2); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etq.proj { color: #000; }
.prio { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.prio.alta { background: rgba(255,122,61,.18); color: var(--laranja); }
.prio.urgente { background: var(--g); color: #fff; }
.prio.baixa { background: rgba(255,255,255,.06); color: var(--tx3); }
.marcador { position: absolute; top: 9px; right: 9px; width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--linha2); background: rgba(0,0,0,.45); display: grid; place-items: center; opacity: 0; transition: opacity .12s, background .12s; z-index: 2; color: #fff; }
.cartao:hover .marcador, .selecionando .marcador, .cartao.sel .marcador { opacity: 1; }
.cartao.sel .marcador { background: var(--g); border-color: transparent; }
.ava { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #000; flex: none; position: relative; }
.ava.g { width: 32px; height: 32px; font-size: 13px; }
.ava.minion { border-radius: 8px; }
.ava.vazio { background: transparent; border: 1px dashed var(--linha2); color: var(--tx3); }
.ia-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 3px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 500; background: rgba(168,85,247,.14); color: #d6b7ff; max-width: 100%; }
.ia-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ia-tag.rodando { background: linear-gradient(90deg, rgba(255,122,61,.2), rgba(255,38,137,.2), rgba(168,85,247,.2), rgba(255,122,61,.2)); background-size: 300% 100%; color: #fff; animation: corre 3s linear infinite; }
.ia-tag.revisao { background: rgba(47,230,167,.14); color: var(--verde); }
.ia-tag.erro, .ia-tag.ajuda { background: rgba(255,77,109,.14); color: #ff8fa3; }
@keyframes corre { to { background-position: -300% 0; } }
.subt-barra { height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); margin-top: 9px; overflow: hidden; }
.subt-barra i { display: block; height: 100%; background: var(--g); border-radius: 3px; transition: width .25s; }
.espera { margin-top: 7px; font-size: 12px; color: var(--tx2); padding-left: 8px; border-left: 2px solid var(--linha2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lugar { flex: none; border-radius: var(--r); border: 1.5px dashed rgba(255,38,137,.6); background: rgba(255,38,137,.07); }
.fantasma { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; margin: 0; cursor: grabbing; box-shadow: 0 22px 54px rgba(0,0,0,.7), 0 0 0 1px var(--rosa), 0 0 34px rgba(255,38,137,.3); will-change: transform; }
.fantasma-num { position: absolute; top: -9px; right: -9px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--g); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; }
body.arrastando, body.arrastando * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.vazio-col { color: var(--tx3); font-size: 12.5px; text-align: center; padding: 18px 8px; }

/* Lote */
#barra-lote { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 90px); z-index: 60; display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 16px; border-radius: 999px; background: rgba(20,18,28,.94); border: 1px solid var(--linha2); box-shadow: 0 20px 60px rgba(0,0,0,.65); backdrop-filter: blur(14px); transition: transform .24s cubic-bezier(.2,.9,.3,1.15), opacity .2s; opacity: 0; pointer-events: none; }
#barra-lote.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#barra-lote b { margin-right: 8px; white-space: nowrap; }
#barra-lote select, #barra-lote input { width: auto; max-width: 150px; height: 33px; padding-top: 0; padding-bottom: 0; border-radius: 999px; font-size: 13px; }

/* Painel */
#painel { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--pn), 100vw); z-index: 50; background: rgba(11,10,16,.97); border-left: 1px solid var(--linha2); box-shadow: -30px 0 80px rgba(0,0,0,.6); transform: translateX(105%); transition: transform .26s cubic-bezier(.2,.8,.25,1); display: flex; flex-direction: column; }
#painel.on { transform: none; }
.pn-topo { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; }
.pn-topo select { width: auto; height: 32px; padding-top: 0; padding-bottom: 0; font-size: 13px; border-radius: 999px; max-width: 170px; }
.pn-titulo { padding: 8px 18px 4px; }
.pn-titulo textarea { background: none; border: 0; border-radius: 6px; padding: 2px 0; font-size: 23px; line-height: 1.22; font-weight: 600; letter-spacing: -.015em; resize: none; min-height: 0; overflow: hidden; }
.pn-titulo textarea:focus { background: none; }
.pn-abas { display: flex; gap: 2px; padding: 4px 14px 0; border-bottom: 1px solid var(--linha); overflow-x: auto; scrollbar-width: none; flex: none; }
.pn-abas::-webkit-scrollbar { display: none; }
.pn-aba { position: relative; padding: 9px 11px; color: var(--tx2); font-weight: 500; white-space: nowrap; }
.pn-aba:hover { color: #fff; }
.pn-aba.ativa { color: #fff; }
.pn-aba.ativa::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--g); border-radius: 2px; }
.pn-aba small { color: var(--tx3); font-size: 11px; margin-left: 3px; }
.pn-corpo { flex: 1; min-height: 0; position: relative; }
.pn-sec { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 28px; display: none; }
.pn-sec.ativa { display: block; }
.pn-sec.chat.ativa { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.grade .todo { grid-column: 1 / -1; }
.bloco { margin-bottom: 18px; }
.bloco-tit { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--tx2); margin-bottom: 8px; }
.bloco-tit .fim { margin-left: auto; }
.subt { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.subt input[type=text] { background: none; border-color: transparent; padding: 4px 6px; }
.subt input[type=text]:hover { border-color: var(--linha); }
.subt.feita input[type=text] { color: var(--tx3); text-decoration: line-through; }
.chk { width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid var(--linha2); flex: none; display: grid; place-items: center; color: #fff; transition: .12s; }
.chk:hover { border-color: var(--rosa); }
.chk.on { background: var(--g); border-color: transparent; }
.chk.red { border-radius: 50%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.07); font-size: 12.5px; color: var(--tx2); transition: .12s; }
button.chip:hover { color: #fff; background: rgba(255,255,255,.13); }
.chip.on { background: var(--g); color: #fff; font-weight: 600; }
.rec { padding: 13px; border-radius: 13px; background: rgba(255,255,255,.03); border: 1px solid var(--linha); display: grid; gap: 11px; }
.rec-linha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-linha > input[type=number] { width: 68px; }
.rec-linha select { width: auto; flex: 1; min-width: 120px; }
.rec-resumo { font-size: 13px; color: #fff; font-weight: 500; }
.chat-lista { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 9px; max-width: 92%; animation: surge .2s; }
.msg.eu { align-self: flex-end; flex-direction: row-reverse; }
.bolha { padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--sup3); word-break: break-word; white-space: pre-wrap; }
.msg.eu .bolha { border-radius: 14px 14px 4px 14px; background: linear-gradient(120deg, rgba(255,38,137,.3), rgba(168,85,247,.3)); }
.msg-meta { font-size: 11px; color: var(--tx3); margin-bottom: 3px; }
.msg.eu .msg-meta { text-align: right; }
.msg-sis { align-self: center; font-size: 11.5px; color: var(--tx3); text-align: center; }
.chat-envio { padding: 10px 14px 14px; border-top: 1px solid var(--linha); }
.chat-caixa { display: flex; gap: 8px; align-items: flex-end; }
.chat-caixa textarea { min-height: 42px; max-height: 150px; resize: none; }
.midias-grade { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.midia { position: relative; border-radius: 12px; overflow: hidden; background: var(--sup2); border: 1px solid var(--linha); cursor: zoom-in; aspect-ratio: 4/3; }
.midia img, .midia video { width: 100%; height: 100%; object-fit: cover; display: block; }
.midia-arq { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 10px; color: var(--tx2); }
.midia-arq b { font-size: 11px; letter-spacing: .08em; color: #fff; }
.midia-rod { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 9px 6px; background: linear-gradient(transparent, rgba(0,0,0,.84)); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.midia-play { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; backdrop-filter: blur(4px); }
.solta { display: grid; justify-items: center; gap: 4px; padding: 20px; margin-bottom: 14px; border: 1.5px dashed var(--linha2); border-radius: 13px; color: var(--tx2); text-align: center; cursor: pointer; transition: .15s; }
.solta:hover, .solta.alvo { border-color: var(--rosa); background: rgba(255,38,137,.06); color: #fff; }
.envio { font-size: 12px; margin-bottom: 8px; }
.envio-barra { height: 4px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 3px; }
.envio-barra i { display: block; height: 100%; background: var(--g); }
.hist { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--linha); }
.hist-data { font-weight: 600; }
.hist-sub { font-size: 12px; color: var(--tx3); }
.hist .fim { margin-left: auto; }
.linha-t { display: flex; gap: 10px; padding-bottom: 12px; position: relative; font-size: 13px; color: var(--tx2); }
.linha-t::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--rosa); margin-top: 6px; flex: none; }
.linha-t small { display: block; color: var(--tx3); font-size: 11.5px; }
.ia-cartao { padding: 14px; border-radius: 14px; background: linear-gradient(140deg, rgba(255,38,137,.09), rgba(168,85,247,.09)); border: 1px solid rgba(255,38,137,.24); margin-bottom: 14px; display: grid; gap: 10px; }
.ia-cartao h3 { font-size: 14px; font-weight: 600; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.op { display: flex; align-items: center; gap: 9px; color: var(--tx2); cursor: pointer; }

/* Lightbox */
.luzbox { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.92); display: flex; flex-direction: column; animation: aparece .15s; }
.luzbox-topo { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.luzbox-topo span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.luzbox-corpo { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 16px 16px; }
.luzbox-corpo > * { max-width: 100%; max-height: 100%; border-radius: 10px; }
.luzbox-corpo iframe { width: 100%; height: 100%; border: 0; background: #fff; }
@keyframes aparece { from { opacity: 0; } }

/* Modo Eu */
#v-eu.ativa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 430px); gap: 18px; padding: 4px 22px 18px; }
.eu-esq { overflow-y: auto; min-height: 0; padding-right: 8px; }
.eu-heroi { display: flex; align-items: center; gap: 22px; padding: 22px 24px; border-radius: 20px; margin-bottom: 18px; border: 1px solid var(--linha); background: linear-gradient(120deg, rgba(255,122,61,.1), rgba(255,38,137,.08) 45%, rgba(168,85,247,.12)); }
.eu-heroi h2 { font-size: 33px; font-weight: 300; line-height: 1.1; letter-spacing: -.025em; }
.eu-heroi h2 b { font-weight: 700; }
.eu-heroi p { color: var(--tx2); margin-top: 6px; }
.anel { position: relative; width: 84px; height: 84px; flex: none; margin-left: auto; }
.anel svg { transform: rotate(-90deg); }
.anel circle { fill: none; stroke-width: 8; }
.anel b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; }
.eu-sec { margin-bottom: 18px; }
.eu-sec-tit { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--tx2); }
.eu-sec-tit b { color: #fff; font-size: 14px; font-weight: 600; }
.eu-sec-tit.alerta b { color: var(--vermelho); }
.linha-tarefa { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--linha); margin-bottom: 6px; cursor: pointer; transition: .13s; }
.linha-tarefa:hover { background: rgba(255,255,255,.07); border-color: var(--linha2); }
.linha-tarefa.saindo { opacity: 0; transform: translateX(14px); transition: .28s; }
.linha-tit { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.nota { display: flex; flex-direction: column; min-height: 0; border-radius: 18px; background: var(--sup); border: 1px solid var(--linha); overflow: hidden; }
.nota-abas { display: flex; gap: 4px; padding: 10px 10px 0; overflow-x: auto; flex: none; scrollbar-width: none; }
.nota-aba { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 9px; color: var(--tx2); white-space: nowrap; flex: none; font-weight: 500; }
.nota-aba.ativa { background: rgba(255,255,255,.1); color: #fff; }
.nota-tit { background: none; border: 0; font-size: 19px; font-weight: 600; padding: 10px 16px 2px; border-radius: 0; flex: none; }
.nota-tit:focus { background: none; }
.nota textarea.texto { flex: 1; min-height: 0; background: none; border: 0; border-radius: 0; resize: none; padding: 8px 16px 14px; line-height: 1.68; font-size: 14.5px; }
.nota textarea.texto:focus { background: none; }
.nota-rod { padding: 12px 14px; border-top: 1px solid var(--linha); display: flex; align-items: center; gap: 10px; flex: none; }
.nota-rod .dica { flex: 1; }

/* Lista */
#v-lista.ativa { overflow: auto; padding: 4px 22px 18px; }
.tabela { min-width: 860px; }
.tab-lin { display: grid; grid-template-columns: 34px minmax(240px, 1fr) 120px 150px 130px 110px 100px 90px; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--linha); }
.tab-cab { position: sticky; top: 0; background: rgba(0,0,0,.92); z-index: 3; color: var(--tx3); backdrop-filter: blur(6px); }
.tab-cab button { color: inherit; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.tab-cab button.on { color: #fff; }
.tab-corpo .tab-lin { cursor: pointer; transition: background .12s; }
.tab-corpo .tab-lin:hover { background: rgba(255,255,255,.05); }
.tab-corpo .tab-lin.sel { background: rgba(255,38,137,.1); }
.tab-corpo select { padding: 4px 26px 4px 8px; border-color: transparent; background-color: transparent; font-size: 13px; }
.tab-tit { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Calendário */
#v-calendario.ativa { display: flex; flex-direction: column; padding: 4px 22px 18px; overflow: auto; }
.cal-topo { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex: none; }
.cal-topo h2 { font-size: 19px; font-weight: 600; text-transform: capitalize; min-width: 200px; }
.cal-sem, .cal-grade { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 6px; }
.cal-sem { color: var(--tx3); margin-bottom: 6px; flex: none; }
.cal-sem span { padding-left: 8px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.cal-grade { flex: 1; grid-auto-rows: minmax(116px, 1fr); }
.cal-dia { padding: 6px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--linha); min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; transition: .12s; }
.cal-dia.fora { opacity: .4; }
.cal-dia.hoje { border-color: var(--rosa); }
.cal-dia.alvo { background: rgba(255,38,137,.12); border-color: var(--rosa); }
.cal-num { font-size: 12px; color: var(--tx2); font-weight: 600; padding: 0 3px; display: flex; justify-content: space-between; align-items: center; }
.cal-dia.hoje .cal-num { color: #fff; }
.cal-add { opacity: 0; color: var(--tx3); }
.cal-dia:hover .cal-add { opacity: 1; }
.cal-t { display: block; width: 100%; text-align: left; font-size: 12px; padding: 3px 7px; border-radius: 7px; background: var(--sup3); border-left: 3px solid; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: grab; flex: none; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.cal-t:hover { background: #2a2636; }
.cal-t.feita { opacity: .5; text-decoration: line-through; }
.cal-t.prev { background: none; border-left-style: dashed; color: var(--tx3); cursor: pointer; }

/* Minions */
#v-minions.ativa { overflow-y: auto; padding: 4px 22px 40px; }
.min-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; margin-bottom: 26px; }
.min-cartao { padding: 15px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--linha); display: grid; gap: 9px; cursor: pointer; transition: .15s; align-content: start; }
.min-cartao:hover { border-color: var(--linha2); background: rgba(255,255,255,.06); transform: translateY(-2px); }
.min-cab { display: flex; align-items: center; gap: 10px; }
.min-cab b { font-size: 15px; }
.min-desc { color: var(--tx2); font-size: 13px; }
.min-stat { display: flex; gap: 12px; font-size: 12px; color: var(--tx3); }
.sec-tit { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.sec-tit h2 { font-size: 19px; font-weight: 300; letter-spacing: -.01em; }
.sec-tit h2 b { font-weight: 700; }
.sec-tit .fim { margin-left: auto; }
.fila-item { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--linha); margin-bottom: 6px; cursor: pointer; }
.fila-item:hover { background: rgba(255,255,255,.07); }
.vazio-box { padding: 26px; border-radius: 14px; border: 1px dashed var(--linha2); color: var(--tx3); text-align: center; margin-bottom: 26px; }

/* Modal e toast */
.modal-fundo { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.66); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 16px; animation: aparece .14s; }
.modal { width: 100%; max-width: 520px; max-height: min(88vh, 900px); display: flex; flex-direction: column; border-radius: 20px; background: #100e17; border: 1px solid var(--linha2); box-shadow: 0 34px 100px rgba(0,0,0,.72); animation: surge .2s cubic-bezier(.2,.9,.3,1.12); }
.modal.largo { max-width: 680px; }
.modal-cab { display: flex; align-items: center; padding: 18px 20px 8px; gap: 10px; }
.modal-cab h2 { font-size: 21px; font-weight: 300; letter-spacing: -.015em; flex: 1; }
.modal-cab h2 b { font-weight: 700; }
.modal-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 20px 12px; display: grid; gap: 13px; align-content: start; }
.modal-rod { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 20px 18px; flex-wrap: wrap; }
.modal-rod .op { margin-right: auto; }
.imp-bloco { border-radius: 13px; border: 1px solid var(--linha); overflow: hidden; }
.imp-cab { display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: rgba(255,255,255,.04); }
.imp-cab select { width: auto; height: 31px; padding-top: 0; padding-bottom: 0; font-size: 13px; margin-left: auto; max-width: 200px; }
.imp-item { display: flex; align-items: center; gap: 9px; padding: 7px 12px; border-top: 1px solid var(--linha); cursor: pointer; }
.imp-item.off { opacity: .45; }
.imp-item span { flex: 1; min-width: 0; }
.imp-item small { color: var(--amarelo); font-size: 11.5px; white-space: nowrap; }
.cores { display: flex; gap: 8px; flex-wrap: wrap; }
.cor { width: 28px; height: 28px; border-radius: 9px; transition: .12s; }
.cor.on { box-shadow: 0 0 0 2px #000, 0 0 0 4px #fff; }
#toasts { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 130; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 999px; background: #fff; color: #000; font-weight: 500; box-shadow: 0 16px 44px rgba(0,0,0,.6); animation: surge .22s; }
.toast.erro { background: var(--vermelho); color: #fff; }
.toast button { font-weight: 700; color: #d6006a; }
#fundo-lateral { display: none; }

@media (max-width: 1100px) {
  .busca, .busca:focus-within { width: 160px; }
  #filtro-prio { display: none; }
  #v-eu.ativa { grid-template-columns: 1fr; overflow-y: auto; }
  .eu-esq { overflow: visible; padding: 0; }
  .nota { height: 520px; }
}
@media (max-width: 760px) {
  :root { --lat: 270px; }
  html, body { font-size: 15px; }
  #lateral { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-102%); transition: transform .22s; }
  body.menu #lateral { transform: none; }
  body.menu #fundo-lateral { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.6); }
  .so-celular { display: grid; }
  #topo { padding: 10px 12px; gap: 8px; }
  #topo h1 { font-size: 21px; }
  .topo-direita { width: 100%; margin: 0; order: 3; }
  .busca, .busca:focus-within { flex: 1; width: auto; }
  .busca kbd, #filtro-resp, #btn-ia span, #btn-nova span { display: none; }
  #btn-ia, #btn-nova { width: 38px; padding: 0; }
  #v-quadro.ativa { padding: 4px 12px 12px; scroll-snap-type: x proximity; }
  .coluna { width: calc(100vw - 36px); scroll-snap-align: center; }
  #v-eu.ativa, #v-lista.ativa, #v-calendario.ativa, #v-minions.ativa { padding: 4px 12px 16px; }
  .eu-heroi { padding: 16px; }
  .eu-heroi h2 { font-size: 25px; }
  .anel { display: none; }
  #barra-lote { left: 8px; right: 8px; transform: translateY(90px); overflow-x: auto; border-radius: 16px; }
  #barra-lote.on { transform: none; }
  .grade { grid-template-columns: 1fr; }
  .marcador { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.col-lista, .eu-esq, .chat-lista, .pn-sec { overflow-anchor: none; }
.imp-item input[type=text] { background: none; border-color: transparent; padding: 3px 6px; flex: 1; min-width: 0; }
.imp-item input[type=text]:hover, .imp-item input[type=text]:focus { border-color: var(--linha2); }
.cal-t { position: relative; }
.inf.maq { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff; }
.inf.maq.mac { background: rgba(56,189,248,.22); }
.inf.maq.acer { background: rgba(250,204,21,.2); }
.inf.maq.hetzner { background: rgba(244,63,94,.24); }
.linha-tarefa .ia-tag { margin-top: 0; }
#estado-agente { display: grid; gap: 5px; }
.cal-t.sel { outline: 1px solid var(--rosa); }
.nav-num:empty { display: none; }
#painel { background: #0b0a10; }

.proc-txt { width: 100%; min-height: 300px; resize: vertical; line-height: 1.6; margin-bottom: 8px; field-sizing: content; }
.colar-itens { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; }
.colar-itens .imp-cab { margin: 10px 0 6px; }
.colar-itens .imp-cab:first-child { margin-top: 0; }
.colar-itens ul { margin: 0; padding: 0 0 0 18px; color: var(--tx2); display: grid; gap: 5px; }

#ag-btn { position: fixed; right: 20px; bottom: 20px; z-index: 55; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--g); box-shadow: 0 12px 34px rgba(255,38,137,.38); transition: transform .14s, right .22s; }
#ag-btn:hover { transform: scale(1.07); }
#ag-jan { position: fixed; right: 20px; bottom: 20px; z-index: 55; width: 392px; height: min(600px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: #0d0c13; border: 1px solid var(--linha2); border-radius: 18px; box-shadow: 0 26px 70px rgba(0,0,0,.72); overflow: hidden; animation: aparece .15s; transition: right .22s; }
#ag-jan[hidden], #ag-btn[hidden] { display: none; }
#painel.on ~ #agente #ag-btn, #painel.on ~ #agente #ag-jan { right: calc(min(var(--pn), 100vw) + 16px); }
#ag-jan header { display: flex; align-items: center; gap: 10px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--linha); }
#ag-jan header div { flex: 1; min-width: 0; display: grid; }
#ag-jan header small { color: var(--tx3); font-size: 12px; }
.ag-ico { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--g); }
#ag-lista { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ag-msg { display: grid; gap: 6px; justify-items: start; max-width: 88%; }
.ag-msg.eu { align-self: flex-end; justify-items: end; }
.ag-bol { padding: 9px 13px; border-radius: 15px 15px 15px 5px; background: var(--sup3); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.ag-msg.eu .ag-bol { background: var(--g); border-radius: 15px 15px 5px 15px; }
.ag-feitos { display: grid; gap: 5px; justify-items: start; width: 100%; }
.ag-feito { display: flex; gap: 7px; width: 100%; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--linha2); text-align: left; font-size: 13px; overflow-wrap: anywhere; transition: .12s; }
.ag-feito:not(:disabled):hover { background: rgba(255,255,255,.07); }
.ag-feito span { color: var(--rosa); font-weight: 600; flex: none; }
.ag-desfaz { color: var(--tx3); font-size: 12px; padding: 2px; }
.ag-desfaz:not(:disabled):hover { color: #fff; }
.ag-pensa { display: flex; gap: 4px; padding: 13px; }
.ag-pensa i { width: 6px; height: 6px; border-radius: 50%; background: var(--tx2); animation: ag-pulo 1s infinite; }
.ag-pensa i:nth-child(2) { animation-delay: .15s; }
.ag-pensa i:nth-child(3) { animation-delay: .3s; }
@keyframes ag-pulo { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.ag-vazio { margin: auto 0; display: grid; gap: 8px; justify-items: start; }
.ag-vazio b { font-size: 21px; }
.ag-vazio p { margin: 0 0 6px; color: var(--tx2); }
@media (max-width: 760px) {
  #ag-jan { inset: 0; width: auto; height: auto; border: 0; border-radius: 0; }
  #painel.on ~ #agente #ag-jan { right: 0; }
  #painel.on ~ #agente #ag-btn { display: none; }
}
