/* Max — app do agente pessoal (engGenai, direcao V3 "patina protagonista") */
:root {
  --bg: #15110D;
  --surface: #1E1913;
  --surface-2: #241E18;
  --border: rgba(241, 231, 221, 0.08);
  --border-strong: rgba(241, 231, 221, 0.16);
  --text: #F1E7DD;
  --muted: #B5A897;
  --faint: #8C8073;
  --verdete: #5AA593;
  --verdete-deep: #3E8275;
  --cobre: #C17A41;
  --cobre-claro: #E3A368;
  --cobre-escuro: #7C4A26;
  --danger: #E07A5F;
  /* cérebro dos agentes (QG): cor por empresa, massa, fibras */
  --cb-enggenai: #C17A41; --cb-mex: #7FB4D9; --cb-pessoal: #5AA593; --cb-ro: #E3A368; --cb-ro-txt: #1B130B;
  --cb-massa: #2A231C; --cb-contorno: rgba(241, 231, 221, 0.20); --cb-fibra: rgba(241, 231, 221, 0.45); --cb-ponto: #FFF6EC; --cb-selo-txt: #FFFFFF; --cb-link: var(--verdete);
  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}
/* height:100% (nao 100dvh): no Chrome do Android o 100dvh resolveu 56px MAIOR que a
   tela no APK e empurrou a barra de abas pra baixo da dobra — medido no aparelho em
   05/08/2026. html e body ja' sao height:100%, entao a cadeia de % da' a altura certa. */
#app { height: 100%; max-height: 100%; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; color: var(--text); }

/* ---------- header ---------- */
.hdr {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.hdr .mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--cobre); color: #2A1607;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; flex-shrink: 0;
}
.hdr .who { flex: 1; min-width: 0; }
.hdr .who b { display: inline; font-size: 16px; font-weight: 600; }
/* versão do app ao lado do nome — pra nunca mais testar conserto em versão velha sem saber (09/08) */
.appver { font-size: 10.5px; color: var(--faint); margin-left: 6px; font-variant-numeric: tabular-nums; }
.side-brand .who b { display: inline; }
.hdr .st { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--verdete); }
.hdr .st .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--verdete); }
.hdr .st.off { color: var(--faint); } .hdr .st.off .dot { background: var(--faint); }
.iconbtn { padding: 8px; border-radius: 10px; color: var(--muted); display: flex; }
.iconbtn:active { background: var(--surface); }
.iconbtn svg { width: 20px; height: 20px; }
/* botao Início — destaque quente (cobre), presente fora da home */
.homebtn { background: rgba(193,122,65,.15); color: var(--cobre-claro); }
.homebtn:active { background: rgba(193,122,65,.30); }

/* ---------- abas ---------- */
.tabs {
  display: flex; border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom); background: var(--bg);
  /* NUNCA encolher: #app e' flex column de altura fixa (100dvh) e a .view tem flex:1.
     Sem isto, header+composer altos esmagam a barra de abas ate' 0px e ela some da
     tela continuando no DOM — foi o bug do celular (05/08/2026). */
  flex-shrink: 0;
}
#composerHost { flex-shrink: 0; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 0 7px; color: var(--faint); font-size: 10.5px;
}
.tab svg { width: 21px; height: 21px; }
.tab.on { color: var(--cobre-claro); }

/* ---------- área central ---------- */
.view { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 8px; }
/* text-align explicito: a bolha nunca deve herdar centralizacao de um ancestral
   (o container do chat vazio centraliza a saudacao) */
.msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; text-align: start; }
.msg.me { align-self: flex-end; background: var(--cobre-escuro); color: #F7E6D5; border-bottom-right-radius: 5px; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.ai b { color: var(--cobre-claro); font-weight: 600; }
.msg.ai code { background: rgba(0,0,0,.3); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.msg.err { align-self: center; background: none; border: 1px solid var(--danger); color: var(--danger); font-size: 13px; }
.msg.err .linkbtn { color: var(--cobre-claro); text-decoration: underline; font-weight: 600; margin-left: 4px; }
.msg.voice { display: inline-flex; align-items: center; gap: 7px; font-style: italic; opacity: .92; }
.msg.voice svg { width: 16px; height: 16px; flex-shrink: 0; }
.msg .cursor { display: inline-block; width: 7px; height: 15px; background: var(--verdete); vertical-align: -2px; animation: blink 1s step-end infinite; border-radius: 2px; }
@keyframes blink { 50% { opacity: 0; } }
/* imagens que o Max gera e mostra no chat */
.msg-media { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.msg-media img.genimg { max-width: 100%; width: auto; border-radius: 12px; border: 1px solid var(--border); cursor: zoom-in; background: rgba(255,255,255,.04); display: block; }
.msg-media-err { margin-top: 8px; font-size: 13px; opacity: .7; }
.thinking { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; align-items: center; }
/* relogio ao lado dos pontinhos (12/08/2026): enquanto o numero sobe, ele sabe que estou vivo.
   `span` de propriedade dos pontinhos, o relogio e' <em> pra nao entrar na animacao do nth-child. */
.thinking .th-clock { font-size: 12px; font-style: normal; opacity: .55; margin-left: 6px; white-space: nowrap; }
.thinking span { width: 7px; height: 7px; border-radius: 50%; background: var(--verdete); animation: pulse 1.2s ease-in-out infinite; }
.thinking span:nth-child(2) { animation-delay: .2s; } .thinking span:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 14px 10px; }
.chip {
  font-size: 12.5px; color: var(--verdete); border: 1px solid rgba(90,165,147,.4);
  border-radius: 20px; padding: 7px 13px;
}
.chip:active { background: rgba(90,165,147,.12); }
.hello { text-align: center; padding: 46px 30px 10px; color: var(--muted); }
.hello .mark-big {
  width: 62px; height: 62px; border-radius: 50%; background: var(--cobre); color: #2A1607;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 28px; margin: 0 auto 14px;
}
.hello h2 { color: var(--text); font-size: 19px; font-weight: 600; margin-bottom: 5px; }
/* chat vazio: centraliza a saudação verticalmente (sem "espaço sobrando" no iPhone/desktop) */
.chat.empty { min-height: 100%; justify-content: center; padding-top: 0; padding-bottom: 46px; }
.chat.empty .hello { padding-top: 12px; }
/* projeto ativo no header */
.hdr .st.proj { color: var(--cobre-claro); font-weight: 500; }
.hdr .st.proj .dot { background: var(--cobre-claro); }

/* "pensando…" no CABECALHO (12/08/2026) — o sinal que nao rola pra fora da tela nem some num
   redesenho. Os dois estados ficam sempre no DOM; quem escolhe e' a classe `pensando` no <body>,
   ligada pelo syncBusy(). O ponto pulsa: parado seria indistinguivel de app morto. */
.st.pensa { display: none !important; }
body.pensando .st.pensa { display: flex !important; color: var(--verdete); font-weight: 500; }
body.pensando .st.proj, body.pensando .hdr .st:not(.pensa), body.pensando .side-brand .st:not(.pensa) { display: none !important; }
.st.pensa .dot { background: var(--verdete); animation: pulse 1.2s ease-in-out infinite; }

/* ---------- composer ---------- */
.composer {
  display: flex; align-items: flex-end; gap: 9px;
  padding: 9px 12px calc(9px + 2px); border-top: 1px solid var(--border); background: var(--bg);
}
.composer textarea {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 20px; padding: 10px 15px; resize: none; outline: none;
  max-height: 120px; min-height: 42px;
}
.composer textarea:focus { border-color: var(--border-strong); }
.roundbtn {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.roundbtn svg { width: 20px; height: 20px; }
.roundbtn.send { background: var(--cobre); color: #2A1607; }
.roundbtn.send:disabled { opacity: .35; }
/* botao de PARAR: ocupa o lugar do enviar/mic enquanto o Max responde */
.roundbtn.parar { background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--danger); }
.roundbtn.parar:hover { border-color: var(--danger); background: rgba(224,122,95,.12); }
.roundbtn.parar svg { width: 15px; height: 15px; }
.msg-parado { align-self: center; font-size: 11.5px; color: var(--faint); padding: 4px 0 2px; font-style: italic; }
.msg-cortado { display: inline-block; margin-left: 6px; font-size: 10.5px; font-style: italic; color: var(--faint); border-left: 2px solid var(--border-strong); padding-left: 6px; vertical-align: 1px; }
/* OUVIR a resposta (TTS, 09/08/2026): ícone pequeno e discreto no rodapé da bolha do Rô */
.msg-tts { display: inline-block; margin: 8px 8px -2px 0; padding: 0; border: 0; background: none; font-size: 13px; line-height: 1; opacity: .38; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.msg-tts:active { opacity: .7; }
/* velocidade da voz (1x / 1,5x / 2x) — só aparece na mensagem que está tocando, igual WhatsApp */
.msg-ttsrate { margin: 8px 8px -2px 0; padding: 1px 7px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.5; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.msg-ttsrate:active { opacity: .7; }
.msg-tts.on { opacity: .85; }
.roundbtn.mic { background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.roundbtn.mic.rec { background: var(--danger); color: #fff; border: none; animation: recpulse 1.4s ease-in-out infinite; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 8px rgba(224,122,95,.18); } }

/* ---------- dashboard (vida/empresas) ---------- */
.dash { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
/* no mobile as duas colunas se dissolvem: os cards viram filhos diretos do .dash flex,
   mantendo a ordem briefing → foco → agenda → pendências → newsletter → meta */
.dcol-main, .dcol-side { display: contents; }
.dcol-main > .card.briefing { order: 1; }
.dcol-main > .card.foco { order: 2; }
.dcol-side > .card.agenda { order: 3; }
.dcol-main > .card:not(.briefing):not(.foco) { order: 4; }
.dcol-main > .meta { order: 5; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 15px; }
.card .k {
  display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--verdete);
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 10px; font-weight: 600;
}
.card .k svg { width: 15px; height: 15px; }
.foco { border-left: 3px solid var(--cobre); border-radius: 0 var(--radius) var(--radius) 0; }
.foco p { font-size: 15.5px; line-height: 1.45; }
.row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.row:last-child { border-bottom: none; padding-bottom: 0; }
.row:first-of-type { padding-top: 0; }
.row .h { color: var(--cobre-claro); font-weight: 600; font-size: 13.5px; min-width: 44px; }
.row .t { flex: 1; font-size: 14px; }
.row .ctx { font-size: 10.5px; color: var(--faint); text-transform: uppercase; }
.pend { display: flex; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--border); align-items: flex-start; font-size: 14px; }
.pend:last-child { border-bottom: none; }
.pend .pri { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.pri.alta { background: var(--danger); } .pri.media { background: var(--cobre-claro); } .pri.baixa { background: var(--verdete); }
.pend .area { font-size: 10.5px; color: var(--faint); text-transform: uppercase; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; }
.kv .key { color: var(--muted); flex-shrink: 0; }
.kv .val { text-align: right; }
.obra { padding: 8px 0; border-bottom: 1px solid var(--border); }
.obra:last-child { border-bottom: none; }
.obra .top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; gap: 8px; }
.obra .top .pct { color: var(--cobre-claro); font-weight: 600; }
.obra .st { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.bar { height: 5px; background: #2E2720; border-radius: 3px; overflow: hidden; }
.bar > div { height: 100%; background: var(--cobre); border-radius: 3px; transition: width .4s; }
.cli { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; align-items: baseline; }
.cli:last-child { border-bottom: none; }
.cli .nm { font-weight: 500; flex-shrink: 0; }
.cli .stt { color: var(--muted); font-size: 12.5px; text-align: right; }
.meta { text-align: center; color: var(--faint); font-size: 11.5px; padding: 2px 0 8px; }
.meta button { color: var(--verdete); }
.empty { text-align: center; color: var(--muted); padding: 50px 30px; }
/* Botao de acao dos estados vazios/erro ("tentar de novo").
   :not(.chat) e' essencial: a home do chat tambem e' <div class="chat empty">, e sem
   isso a regra pintava uma pilula verde em volta de CADA icone de projeto da grade. */
.empty:not(.chat) button {
  margin-top: 14px; color: var(--verdete); border: 1px solid rgba(90,165,147,.4);
  border-radius: 20px; padding: 8px 18px;
}
.empty .err-detail { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--faint); }

/* ---------- foco de amanhã ---------- */
.card .k .editbtn { margin-left: auto; color: var(--faint); padding: 2px; display: flex; }
.card .k .editbtn svg { width: 15px; height: 15px; }
.card .k .editbtn:active { color: var(--cobre-claro); }
.foco .tag {
  display: inline-block; margin-top: 9px; font-size: 10.5px; letter-spacing: .3px;
  text-transform: uppercase; padding: 3px 9px; border-radius: 20px;
}
.foco .tag.ia { color: var(--verdete); border: 1px solid rgba(90,165,147,.4); }
.foco .tag.voce { color: var(--cobre-claro); border: 1px solid rgba(227,163,104,.4); }
.foco .muted { color: var(--faint); }
.foco .linkbtn { color: var(--verdete); text-decoration: underline; }
.foco.editing textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 11px 13px; resize: none; outline: none; margin-bottom: 10px;
  min-height: 60px; line-height: 1.45;
}
.foco-actions { display: flex; gap: 9px; justify-content: flex-end; }
.foco-actions .ghost { color: var(--muted); padding: 8px 14px; }
.foco-actions .solid { background: var(--cobre); color: #2A1607; font-weight: 600; border-radius: 20px; padding: 8px 18px; }

/* ---------- agenda (timeline 3 dias) ---------- */
.agenda .k .livedot { margin-left: auto; font-size: 11px; color: var(--verdete); text-transform: none; letter-spacing: 0; font-weight: 500; }
.agenda .k .livedot::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--verdete); margin-right: 5px; vertical-align: 1px; animation: pulse 1.2s ease-in-out infinite; }
.agenda .legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.agenda .leg { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); text-transform: capitalize; }
.agenda .leg i { width: 9px; height: 9px; border-radius: 3px; }
.agday { margin-bottom: 12px; }
.agday:last-child { margin-bottom: 0; }
.agday-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.agday-h b { font-size: 13.5px; color: var(--text); }
.agday-h span { font-size: 11.5px; color: var(--faint); }
.ev { display: flex; align-items: center; gap: 10px; padding: 7px 0 7px 0; }
.ev .evbar { width: 4px; align-self: stretch; min-height: 26px; border-radius: 3px; flex-shrink: 0; }
.ev .evtime { font-size: 12.5px; color: var(--cobre-claro); font-weight: 600; min-width: 52px; }
.ev .evtitle { flex: 1; font-size: 14px; line-height: 1.35; }
.ev.past { opacity: .45; }
.ev.past .evtitle, .ev.past .evtime { text-decoration: line-through; text-decoration-color: var(--faint); }
.ev.past .evbar { opacity: .5; }
/* itens da Vida clicáveis (abrem chat de contexto) */
.ev, .pend { width: 100%; text-align: left; }
.ev:active, .pend:active { background: var(--surface-2); border-radius: 8px; }
.pend .pend-t { flex: 1; }
.vitem { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; padding: 3px 0 1px; color: var(--text); font-size: 15px; }
.vitem .vitem-t { flex: 1; line-height: 1.4; }
.vitem svg { width: 16px; height: 16px; color: var(--cobre-claro); flex-shrink: 0; opacity: .8; }
.vitem:active { opacity: .65; }
.hello .mark-big svg { width: 30px; height: 30px; }

/* ---------- empresas: lista ---------- */
.empcard {
  width: 100%; display: flex; align-items: center; gap: 13px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px; margin-bottom: 11px;
}
.empcard:active { background: var(--surface-2); }
.empcard .empico {
  width: 40px; height: 40px; border-radius: 11px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--cobre-claro);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.empcard .empico svg { width: 20px; height: 20px; }
.empbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.empbody b { font-size: 15.5px; font-weight: 600; }
.empbody .empsub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empmeta { display: flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--faint); flex-shrink: 0; }
.empmeta svg { width: 18px; height: 18px; color: var(--faint); }

/* ---------- empresas: detalhe + sub-abas ---------- */
.detail-h { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.detail-h b { font-size: 17px; font-weight: 600; }
.detail-h .empico.sm {
  width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--cobre-claro);
  display: flex; align-items: center; justify-content: center;
}
.detail-h .empico.sm svg { width: 17px; height: 17px; }
.segmented {
  display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px; margin-bottom: 14px;
}
.segmented .seg {
  flex: 1; text-align: center; font-size: 13px; color: var(--muted);
  padding: 8px 6px; border-radius: 9px; font-weight: 500;
}
.segmented .seg.on { background: var(--cobre); color: #2A1607; font-weight: 600; }
.detail-body { display: flex; flex-direction: column; }
.lrow { padding: 11px 0; border-bottom: 1px solid var(--border); }
.lrow:last-child { border-bottom: none; }
.lrow-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.lrow-t { font-size: 14.5px; font-weight: 500; flex: 1; }
.lrow-r { font-size: 13.5px; color: var(--cobre-claro); font-weight: 600; white-space: nowrap; }
.lrow-s { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.pill {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--verdete);
  border: 1px solid rgba(90,165,147,.4); border-radius: 20px; padding: 3px 9px; white-space: nowrap;
}

/* ---------- Empresas v2 (entidades) ---------- */
.fasechip { font-size: 10px; text-transform: uppercase; letter-spacing: .3px; padding: 3px 8px; border-radius: 20px; white-space: nowrap; border: 1px solid var(--border-strong); color: var(--muted); flex-shrink: 0; }
.fasechip.execucao, .fasechip.fechado, .fasechip.entrega { color: var(--verdete); border-color: rgba(90,165,147,.5); }
.fasechip.orcamento, .fasechip.proposta, .fasechip.oraculo { color: var(--cobre-claro); border-color: rgba(227,163,104,.5); }
.fasechip.prospect, .fasechip.encerrada { color: var(--faint); }

.empcard.col { flex-direction: column; align-items: stretch; gap: 8px; }
.ec-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.ec-top b { font-size: 15.5px; font-weight: 600; }
.ec-resumo { font-size: 12.5px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ec-meta { font-size: 11px; color: var(--faint); }

.kv.col { flex-direction: column; align-items: flex-start; gap: 2px; }
.kv.col .val { text-align: left; }
.k.sub { font-size: 11px; color: var(--cobre-claro); margin: 12px 0 4px; letter-spacing: .3px; }
.k .cnt { margin-left: 8px; color: var(--faint); font-weight: 400; text-transform: none; letter-spacing: 0; }

.docs .docrow { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 0; border-bottom: 1px solid var(--border); }
.docs .docrow:last-child { border-bottom: none; }
.docrow:active { background: var(--surface-2); }
.doctag { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; padding: 3px 6px; border-radius: 6px; flex-shrink: 0; min-width: 36px; text-align: center; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.doctag.pdf { color: #E07A5F; } .doctag.planilha { color: #5AA593; } .doctag.doc { color: #6C8EBF; } .doctag.imagem { color: #B07BD1; } .doctag.apresentacao { color: #E3A368; }
.docnome { flex: 1; font-size: 13.5px; line-height: 1.35; word-break: break-word; }
.docmeta { font-size: 11px; color: var(--faint); flex-shrink: 0; }

/* ---------- chat v2 (composer com pills + drawer) ---------- */
.composer { flex-direction: column; align-items: stretch; gap: 8px; position: relative; }
.composer-tools { display: flex; align-items: center; gap: 8px; }
.composer-tools .ctool { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.composer-tools .ctool svg { width: 17px; height: 17px; }
.pill { font-size: 12.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 5px 11px; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.pill:active { border-color: var(--border-strong); }
.projtag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--cobre-claro); background: rgba(193,122,65,.12); border: 1px solid rgba(227,163,104,.4); border-radius: 16px; padding: 4px 10px; margin-left: auto; max-width: 48%; overflow: hidden; }
.projtag svg { width: 13px; height: 13px; flex-shrink: 0; }
.projtag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-input { display: flex; align-items: flex-end; gap: 9px; }
.attachrow { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0; }
.attachchip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 5px 8px 5px 10px; font-size: 12px; color: var(--muted); max-width: 210px; }
.attachchip svg { width: 14px; height: 14px; color: var(--cobre-claro); flex-shrink: 0; }
.attachchip .ac-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachchip.busy { color: var(--faint); font-style: italic; }
.attachchip .attachx { color: var(--faint); font-size: 13px; line-height: 1; padding: 0 2px; flex-shrink: 0; }
.attachchip .attachedit { font-size: 12px; line-height: 1; padding: 0 3px; flex-shrink: 0; opacity: .85; } /* lápis: cortar/desenhar antes de mandar */
.pillmenu { position: absolute; bottom: 100%; left: 40px; margin-bottom: 6px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px; padding: 5px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 8px 24px rgba(0,0,0,.45); z-index: 5; }
.pillmenu.r { left: auto; right: 12px; } /* menu do Esforço abre pela direita, sob o pill */
.pillmenu .pm { text-align: left; font-size: 13.5px; color: var(--text); padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
.pillmenu .pm.on { color: var(--cobre-claro); }
.pillmenu .pm:active { background: var(--surface); }

.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 20; }
.drawer-backdrop.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 82%; max-width: 340px; background: var(--surface); border-right: 1px solid var(--border-strong); transform: translateX(-102%); transition: transform .22s ease; z-index: 21; display: flex; flex-direction: column; padding-top: var(--safe-top); }
.drawer.open { transform: translateX(0); }
.drawer-top { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--border); }
.drawer-top .mark { width: 30px; height: 30px; border-radius: 50%; background: var(--cobre); color: #2A1607; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.drawer-top b { flex: 1; font-size: 16px; }
.drawer-new { display: flex; align-items: center; gap: 9px; margin: 12px; padding: 11px 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 14.5px; font-weight: 500; }
.drawer-new svg { width: 18px; height: 18px; color: var(--cobre-claro); }
.drawer-scroll { flex: 1; overflow-y: auto; padding: 0 8px calc(16px + var(--safe-bottom)); }
.draw-sec { font-size: 10.5px; letter-spacing: .5px; color: var(--faint); text-transform: uppercase; padding: 14px 8px 6px; }
.draw-item { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px; border-radius: 10px; color: var(--text); }
.draw-item:active, .draw-item.on { background: var(--surface-2); }
.draw-item .di-ico { color: var(--cobre-claro); display: flex; flex-shrink: 0; }
.draw-item .di-ico svg { width: 16px; height: 16px; }
.draw-item .di-t { flex: 1; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draw-item .di-time { font-size: 11px; color: var(--faint); flex-shrink: 0; }
.draw-item .di-del { color: var(--faint); padding: 6px; display: flex; opacity: .55; min-width: 30px; min-height: 30px; align-items: center; justify-content: center; }
.draw-item .di-del svg { width: 15px; height: 15px; }
.di-empty { font-size: 12.5px; color: var(--faint); padding: 6px 10px; }
.drawer-foot { border-top: 1px solid var(--border); padding: 10px 12px calc(10px + var(--safe-bottom)); }
.drawer-theme { width: 100%; display: flex; align-items: center; gap: 9px; text-align: left; font-size: 13.5px; color: var(--muted); padding: 9px 10px; border-radius: 10px; }
.drawer-theme:active { background: var(--surface-2); }
.drawer-theme svg { width: 17px; height: 17px; }
.draw-sec { display: flex; align-items: center; }
.draw-reimport { margin-left: auto; color: var(--faint); padding: 3px; display: flex; }
.draw-reimport svg { width: 14px; height: 14px; }
.draw-sec-t { flex: 1; display: flex; align-items: center; gap: 6px; background: transparent; color: var(--faint); font: inherit; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; text-align: left; padding: 0; }
.draw-sec-t:active { color: var(--muted); }
.draw-chev { display: flex; transition: transform .15s ease; color: var(--faint); }
.draw-chev svg { width: 12px; height: 12px; }
.draw-chev.open { transform: rotate(90deg); }
.draw-more { width: 100%; text-align: center; padding: 9px; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--cobre-claro); background: transparent; border-radius: 8px; }
.draw-more:active { background: var(--surface); }
.ctxbody { font-size: 13px; line-height: 1.55; color: var(--muted); }
.ctxbody .mdh { display: block; color: var(--text); margin: 10px 0 3px; font-size: 13px; font-weight: 600; }
.ctxbody code { background: rgba(0,0,0,.3); border-radius: 4px; padding: 1px 5px; font-size: 12px; }

/* ---------- ícones de pastas (estilo iPhone) + navegador de arquivos ---------- */
.sep { display: flex; align-items: center; gap: 9px; margin: 20px 2px 12px; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); }
/* arquivar / desarquivar obra */
.archbtn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 13px; border-radius: 12px; border: 1px solid var(--border-strong); color: var(--muted); font-size: 14px; font-weight: 500; }
.archbtn svg { width: 18px; height: 18px; }
.archbtn:active { background: var(--surface-2); }
.archbtn.un { color: var(--verdete); border-color: rgba(90,165,147,.45); }
.archtoggle { width: 100%; display: flex; align-items: center; gap: 8px; margin: 16px 0 4px; padding: 9px 2px; color: var(--faint); font-size: 12.5px; }
.archtoggle svg { width: 15px; height: 15px; }
.archtoggle .cnt { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 1px 8px; font-size: 11px; }
.archtoggle .chev { margin-left: auto; display: inline-flex; transition: transform .2s; }
.archtoggle .chev.open { transform: rotate(90deg); }
.archlist { opacity: .68; }
/* detalhe da obra v2: hero (resumo ERP) + pendências + abas ERP */
.herocard { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 15px 16px; }
.hero-bar { margin-bottom: 12px; }
.hero-resumo { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.hero-resumo.faint { color: var(--faint); font-style: italic; }
.hstats { display: flex; gap: 10px; margin-top: 14px; }
.hstat { flex: 1; background: var(--surface-2); border-radius: 10px; padding: 10px 8px; text-align: center; }
.hstat .hs-v { display: block; font-size: 19px; font-weight: 600; color: var(--cobre-claro); }
.hstat .hs-l { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .3px; }
.sep-hint { text-transform: none; letter-spacing: 0; color: var(--faint); font-weight: 400; }
.iconhint { color: var(--faint); font-size: 12px; padding: 4px 2px; }
.pendlist { display: flex; flex-direction: column; gap: 8px; }
.pendrow { display: flex; align-items: stretch; gap: 9px; }
.pendcheck { width: 28px; flex-shrink: 0; border: 1.6px solid var(--border-strong); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: transparent; }
.pendcheck svg { width: 15px; height: 15px; }
.pendcheck.on { background: var(--verdete); border-color: var(--verdete); color: #10251f; }
.pendtitle { flex: 1; display: flex; align-items: center; gap: 9px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; color: var(--text); font-size: 13.5px; min-width: 0; }
.pendtitle:active { background: var(--surface-2); }
.pendtitle .pt-t { flex: 1; }
.pendtitle .pt-ch { color: var(--faint); display: inline-flex; flex-shrink: 0; }
.pendtitle .pt-ch svg { width: 16px; height: 16px; }
.pendrow.done .pendtitle .pt-t { text-decoration: line-through; color: var(--faint); }
.erptabs { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 3px; }
.erptab { flex-shrink: 0; padding: 9px 15px; border-radius: 20px; border: 1px solid var(--border-strong); color: var(--muted); font-size: 13px; white-space: nowrap; }
.erptab:active { background: var(--surface-2); border-color: var(--cobre); color: var(--text); }
/* toast (feedback não-bloqueante) */
.toasthost { position: fixed; left: 0; right: 0; bottom: calc(80px + var(--safe-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 60; pointer-events: none; padding: 0 16px; }
.toast { max-width: 460px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); border-radius: 12px; padding: 11px 16px; font-size: 13.5px; line-height: 1.4; box-shadow: 0 8px 26px rgba(0,0,0,.45); opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease; text-align: center; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: var(--danger); color: #F0B4A5; }
.toast.success { border-color: var(--verdete); }
/* alvos de toque ≥ 44px (HIG) + feedback de toque nas abas */
.iconbtn { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.tab { transition: color .12s; } .tab:active { opacity: .55; }
.hdr .st.proj { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sep::before, .sep::after { content: ''; height: 1px; background: var(--border); flex: 1; }
.iconhint { font-size: 12.5px; color: var(--faint); padding: 4px 2px 8px; }
.icongrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 4px; padding: 2px 0 6px; }
@media (max-width: 360px) { .icongrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.iconapp { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 2px; min-width: 0; }
/* sem borda: a definicao vem da sombra suave (o contorno duro poluia a grade) */
.iconapp-img { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: none; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.iconapp-img svg { width: 27px; height: 27px; color: var(--cobre-claro); }
.iconapp:active .iconapp-img { transform: scale(.93); }
.iconapp-lbl { font-size: 10.5px; line-height: 1.2; color: var(--muted); text-align: center; max-width: 74px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; padding: 2px 2px 12px; font-size: 12.5px; }
.crumbs .crumb { color: var(--cobre-claro); padding: 2px 2px; }
.crumbs .crumb:last-child { color: var(--muted); }
.crumbs .cr-sep { color: var(--faint); display: inline-flex; }
.crumbs .cr-sep svg { width: 13px; height: 13px; }
.filelist { display: flex; flex-direction: column; }
.filerow { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.filerow:active { background: var(--surface-2); }
.filerow .fr-ic { color: var(--cobre-claro); display: flex; flex-shrink: 0; }
.filerow .fr-ic svg { width: 22px; height: 22px; }
.filerow .fr-nome { flex: 1; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.filerow .fr-meta { font-size: 11.5px; color: var(--faint); flex-shrink: 0; }
.filerow .fr-ch { color: var(--faint); display: flex; flex-shrink: 0; }
.filerow .fr-ch svg { width: 16px; height: 16px; }
.files-title { flex: 1; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chathere { display: flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 7px 12px; border-radius: 18px;
  background: var(--cobre); color: #2A1607; font-size: 12.5px; font-weight: 600; }
.chathere svg { width: 15px; height: 15px; }
.chathere:active { opacity: .85; }

/* ícones de PROJETO na home (badge com inicial, estilo app do iPhone) */
.icongrid.home { padding: 6px 8px 2px; }

/* FAVORITOS + MODO EDITAR DA HOME (porte do Max, 10/09/2026) */
.iconapp { position: relative; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.iconapp-img.favfolder svg { width: 30px; height: 30px; }
.tile-x { position: absolute; top: -4px; left: calc(50% - 37px); z-index: 2; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); box-shadow: 0 2px 6px rgba(0,0,0,.25); cursor: pointer; }
.tile-x:active, .tile-x:hover { color: var(--danger); }
@keyframes tilejiggle { 0% { transform: rotate(-1.7deg); } 50% { transform: rotate(1.7deg); } 100% { transform: rotate(-1.7deg); } }
.icongrid.editing .iconapp { animation: tilejiggle .32s ease-in-out infinite; }
.icongrid.editing .iconapp:nth-child(2n) { animation-delay: -.16s; }
.icongrid.editing .iconapp:active .iconapp-img { transform: none; }
.icongrid.editing .iconapp:hover .iconapp-img { transform: none; }
.icongrid.editing .iconapp.off { opacity: .45; animation: none; } /* oculto: esmaecido, toque devolve */
.icongrid.editing .iconapp[data-homecat] { animation: none; } /* areas nao se ocultam: ficam paradas */
.tile-x.add { color: var(--verdete); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .icongrid.editing .iconapp { animation: none; } }
.homedone { display: flex; justify-content: center; padding: 14px 0 4px; }
/* estrela de favoritar no cabecalho do navegador de pastas */
.favstar { color: var(--faint); flex-shrink: 0; }
.favstar.on { color: var(--cobre-claro); }
.favstar svg { width: 19px; height: 19px; }
.iconapp-img.badge { border: none; font-weight: 700; font-size: 25px; }
.iconapp-img.badge.mex { background: linear-gradient(160deg, var(--cobre-claro), var(--cobre-escuro)); color: #2A1607; }
.iconapp-img.badge.enggenai { background: linear-gradient(160deg, #6C8EBF, #3E5A82); color: #EAF1FA; }
/* tiles com o simbolo real da marca (fundo branco, logo centralizado) */
.iconapp-img.brand { background: #FFFFFF; padding: 2px; overflow: hidden; }
.iconapp-img.brand img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* icone com fundo proprio (avatar engGenai escuro): preenche o tile, sem branco/padding */
.iconapp-img.brand.bleed { background: transparent; padding: 0; overflow: hidden; }
.iconapp-img.brand.bleed img { object-fit: cover; }
/* tile "+ Novo projeto" (verde tracejado) */
.iconapp-img.addtile { background: transparent; border: 1.5px dashed var(--verdete); box-shadow: none; }
.iconapp-img.addtile svg { width: 26px; height: 26px; color: var(--verdete); }
.sheet-mark.brand { background: #FFFFFF; padding: 3px; }
.sheet-mark.brand img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sheet-mark.brand.bleed { background: transparent; padding: 0; overflow: hidden; }
.sheet-mark.brand.bleed img { object-fit: cover; }
.np-seg-b img.bleed { background: transparent; padding: 0; object-fit: cover; }

/* folha do projeto (bottom-sheet, espelha "Projects" do Claude) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; }
.sheet-backdrop.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; background: var(--surface);
  border-top-left-radius: 20px; border-top-right-radius: 20px; border-top: 1px solid var(--border-strong);
  max-width: 640px; margin: 0 auto; padding: 8px 16px calc(18px + var(--safe-bottom));
  transform: translateY(102%); transition: transform .24s ease; max-height: 76%; display: flex; flex-direction: column; }
.sheet.on { transform: translateY(0); }
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; }
.sheet-head b { flex: 1; font-size: 16px; }
.sheet-mark { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #2A1607; flex-shrink: 0; }
.sheet-mark.mex { background: var(--cobre); } .sheet-mark.enggenai { background: #6C8EBF; color: #EAF1FA; }
.sheet-new { display: flex; align-items: center; gap: 9px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 14.5px; font-weight: 500; margin-bottom: 6px; }
.sheet-new svg { width: 18px; height: 18px; color: var(--cobre-claro); }
.sheet-sec { font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); padding: 12px 4px 4px; }
.sheet-list { overflow-y: auto; }
.sheet-chat { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 6px; border-bottom: 1px solid var(--border); }
.sheet-chat:active { background: var(--surface-2); }
.sheet-chat .sc-t { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-chat .sc-d { font-size: 11.5px; color: var(--faint); flex-shrink: 0; }
.sheet-empty { font-size: 13px; color: var(--faint); padding: 14px 6px; }
/* tela de novo projeto */
.np-body { overflow-y: auto; display: flex; flex-direction: column; }
.np-lbl { font-size: 12px; color: var(--muted); margin: 12px 2px 6px; font-weight: 500; }
.np-lbl .np-opt { color: var(--faint); font-weight: 400; }
.np-in { width: 100%; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; font-size: 15px; outline: none; }
.np-in:focus { border-color: var(--cobre); }
.np-ta { resize: none; line-height: 1.45; }
.np-seg { display: flex; gap: 8px; }
.np-seg-b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border: 1.5px solid var(--border-strong); border-radius: 12px; color: var(--muted); font-size: 12.5px; }
.np-seg-b img { width: 26px; height: 26px; object-fit: contain; background: #fff; border-radius: 7px; padding: 3px; }
.np-seg-b.on { border-color: var(--cobre); color: var(--text); background: var(--surface-2); }
.np-create { margin-top: 18px; width: 100%; background: var(--cobre); color: #2A1607; font-weight: 600; font-size: 15px; padding: 14px; border-radius: 14px; }
.np-create:disabled { opacity: .55; }
.np-err { color: var(--danger); font-size: 13px; text-align: center; min-height: 18px; margin-top: 8px; }

/* ---------- tema claro (opção "clean") ---------- */
html.light {
  --bg: #F6F1EA; --surface: #FFFFFF; --surface-2: #EFE9E1;
  --border: rgba(40,28,16,0.10); --border-strong: rgba(40,28,16,0.20);
  --text: #241C13; --muted: #6A5D4E; --faint: #9A8C7B;
  --verdete: #3E8275; --verdete-deep: #2F6A5F;
  --cobre: #B4692F; --cobre-claro: #9E5522; --cobre-escuro: #B4692F;
  --danger: #C6553B;
  --cb-enggenai: #B4692F; --cb-mex: #3F7CA8; --cb-pessoal: #3E8275; --cb-ro: #9E5522; --cb-ro-txt: #FFF6EC;
  --cb-massa: #E9E1D6; --cb-contorno: rgba(40,28,16,0.22); --cb-fibra: rgba(40,28,16,0.55); --cb-ponto: #FFFFFF; --cb-selo-txt: #FFFFFF; --cb-link: var(--verdete-deep);
}
html.light body { background: var(--bg); }
html.light .bar { background: #E3DACE; }
html.light .msg.me { color: #FFF3E8; }
html.light .msg.ai code { background: rgba(0,0,0,.06); }
html.light .doctag { background: #F0EAE2; }

/* ---------- login ---------- */
.login { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 34px; gap: 14px; text-align: center; }
.login .mark-big { width: 72px; height: 72px; border-radius: 22px; background: var(--cobre); color: #2A1607; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 32px; margin: 0 auto 6px; }
.login h1 { font-size: 22px; font-weight: 600; }
.login p { color: var(--muted); font-size: 14px; }
.login input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 16px; outline: none; text-align: center; width: 100%;
}
.login .go { background: var(--cobre); color: #2A1607; font-weight: 600; border-radius: 12px; padding: 13px; }
.login .err { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ==================== DESKTOP (>= 900px + mouse): sidebar + coluna principal ==================== */
/* 21/10/2026 (c410, A7): desde a v207 o notebook com mouse usa a TELA DE CELULAR (isDesktop() só com localStorage.layout=desk).
   Toda regra dos 4 blocos "(min-width: 900px) and (pointer: fine)" vale só com html.desk (que o render põe): sem isso o #app
   perdia o limite de 640px e o aviso caía em cima da barra de abas. :where() = a especificidade não muda. */
@media (min-width: 900px) and (pointer: fine) {
  :where(html.desk) #app { max-width: none; height: 100%; max-height: 100%; }
  :where(html.desk) .shell { display: grid; grid-template-columns: 268px 1fr; height: 100dvh; min-height: 0; }
  /* ----- sidebar ----- */
  :where(html.desk) .side { display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); min-height: 0; }
  :where(html.desk) .side-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
  :where(html.desk) .side-brand .mark { width: 34px; height: 34px; border-radius: 50%; background: var(--cobre); color: #2A1607; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
  :where(html.desk) .side-brand .who b { font-size: 15px; font-weight: 600; display: block; }
  :where(html.desk) .side-brand .st { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--verdete); }
  :where(html.desk) .side-brand .st .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--verdete); }
  :where(html.desk) .side-brand .st.off { color: var(--faint); } :where(html.desk) .side-brand .st.off .dot { background: var(--faint); }
  :where(html.desk) .side-new { display: flex; align-items: center; gap: 9px; margin: 2px 12px 8px; padding: 10px 14px; background: var(--cobre); color: #2A1607; border-radius: 11px; font-size: 14px; font-weight: 600; transition: filter .15s; }
  :where(html.desk) .side-new:hover { filter: brightness(1.06); }
  :where(html.desk) .side-new svg { width: 18px; height: 18px; }
  :where(html.desk) .side-nav { display: flex; flex-direction: column; gap: 2px; padding: 2px 8px 8px; }
  :where(html.desk) .side-navb { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; transition: background .12s, color .12s; }
  :where(html.desk) .side-navb svg { width: 19px; height: 19px; }
  :where(html.desk) .side-navb:hover { background: var(--surface-2); color: var(--text); }
  :where(html.desk) .side-navb.on { background: var(--surface-2); color: var(--cobre-claro); font-weight: 500; }
  :where(html.desk) .side-scroll { flex: 1; overflow-y: auto; padding: 8px; min-height: 0; border-top: 1px solid var(--border); }
  :where(html.desk) .side-scroll .draw-item:hover { background: var(--surface-2); }
  :where(html.desk) .side-foot { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-top: 1px solid var(--border); }
  /* 25/11: só o ícone do tema no rodapé da barra (o texto "Tema claro" quebrava em 2 linhas e empurrava o Sair para fora da barra) */
  :where(html.desk) .side-foot .drawer-theme { flex: 1; justify-content: center; }
  :where(html.desk) .side-foot .drawer-theme span { display: none; }
  /* 19/11/2026 (frentes, padrão do OS do Max): barra lateral recolhe para só os ícones */
  :where(html.desk.menu-recolhido) .shell { grid-template-columns: 64px 1fr; }
  :where(html.desk.menu-recolhido) .side .who, :where(html.desk.menu-recolhido) .side-scroll, :where(html.desk.menu-recolhido) .side-brand .side-refresh,
  :where(html.desk.menu-recolhido) .side-new span, :where(html.desk.menu-recolhido) .side-navb span, :where(html.desk.menu-recolhido) .side-foot .drawer-theme,
  :where(html.desk.menu-recolhido) .side-foot #layoutToggle, :where(html.desk.menu-recolhido) .side-foot #logout, :where(html.desk.menu-recolhido) .uso-panel { display: none; }
  :where(html.desk.menu-recolhido) .side-brand { justify-content: center; padding: 16px 0 12px; }
  :where(html.desk.menu-recolhido) .side-new { justify-content: center; margin: 2px 10px 8px; padding: 10px 0; }
  :where(html.desk.menu-recolhido) .side-navb { justify-content: center; padding: 9px 0; }
  :where(html.desk.menu-recolhido) .side-foot { justify-content: center; }
  :where(html.desk) .side .who[role="button"] { cursor: pointer; }
  :where(html.desk) .side-foot .drawer-theme:hover, :where(html.desk) .side-foot .iconbtn:hover { background: var(--surface-2); }
  /* ----- coluna principal ----- */
  :where(html.desk) .maincol { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
  :where(html.desk) .tophdr { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
  :where(html.desk) .tophdr .th-title { flex: 1; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :where(html.desk) .tophdr .th-actions { display: flex; gap: 4px; }
  :where(html.desk) .tophdr .iconbtn:hover { background: var(--surface-2); }
  :where(html.desk) .maincol > .view { flex: 1; overflow-y: auto; min-height: 0; }
  /* chat centralizado numa coluna de leitura */
  :where(html.desk) .maincol .chat { max-width: 768px; margin: 0 auto; padding: 26px 24px 14px; }
  :where(html.desk) .maincol .chat.empty { min-height: 100%; }
  :where(html.desk) .maincol #composerHost { width: 100%; }
  :where(html.desk) .maincol .composer { max-width: 768px; margin: 0 auto; padding: 8px 8px 18px; }
  /* Vida e detalhe da obra numa largura confortável */
  :where(html.desk) .maincol .dash { max-width: 1120px; margin: 0 auto; padding: 22px 26px 40px; }
  /* hovers premium no desktop */
  :where(html.desk) .empcard:hover { background: var(--surface-2); border-color: var(--border-strong); }
  :where(html.desk) .iconapp:hover .iconapp-img { transform: translateY(-2px); }
  :where(html.desk) .pendtitle:hover, :where(html.desk) .docrow:hover, :where(html.desk) .filerow:hover, :where(html.desk) .erptab:hover, :where(html.desk) .archtoggle:hover { background: var(--surface-2); }
  :where(html.desk) .pill:hover, :where(html.desk) .ctool:hover, :where(html.desk) .roundbtn.mic:hover { border-color: var(--border-strong); }
  /* ----- Empresas: master-detail ----- */
  :where(html.desk) .emp-split { height: 100%; display: grid; grid-template-columns: 352px 1fr; min-height: 0; }
  :where(html.desk) .emp-master { overflow-y: auto; border-right: 1px solid var(--border); padding: 18px 16px; min-height: 0; }
  :where(html.desk) .emp-master .dash { max-width: none; margin: 0; padding: 0; } /* a lista dentro do master não herda o padding largo da Vida */
  :where(html.desk) .emp-master .empcard { cursor: pointer; }
  :where(html.desk) .emp-master .empcard.sel { border-color: var(--cobre); background: var(--surface-2); }
  :where(html.desk) .emp-detail { overflow-y: auto; padding: 24px 30px 48px; min-height: 0; }
  :where(html.desk) .emp-detail .dash { max-width: 860px; margin: 0; padding: 0; }
  :where(html.desk) .emp-detail .detail-h #entBack, :where(html.desk) .emp-detail #filesBack { display: none; } /* sem botão voltar no desktop (a lista está à esquerda) */
  :where(html.desk) .emp-detail .detail-h { margin-bottom: 18px; }
  :where(html.desk) .emp-detail .detail-h b { font-size: 20px; }
  :where(html.desk) .emp-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--faint); font-size: 14px; }
  /* ----- command palette (Cmd/Ctrl+K) ----- */
  :where(html.desk) .cmdk-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
  :where(html.desk) .cmdk { width: 580px; max-width: 92vw; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.55); overflow: hidden; display: flex; flex-direction: column; }
  :where(html.desk) .cmdk-in { width: 100%; padding: 15px 18px; font-size: 16px; background: none; border: none; border-bottom: 1px solid var(--border); outline: none; }
  :where(html.desk) .cmdk-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
  :where(html.desk) .cmdk-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; cursor: pointer; font-size: 14px; width: 100%; text-align: left; }
  :where(html.desk) .cmdk-item:hover { background: var(--surface); }
  :where(html.desk) .cmdk-item.sel { background: var(--surface); box-shadow: inset 3px 0 0 var(--cobre); }
  :where(html.desk) .cmdk-item .ci-ic { color: var(--cobre-claro); display: flex; flex-shrink: 0; }
  :where(html.desk) .cmdk-item .ci-ic svg { width: 17px; height: 17px; }
  :where(html.desk) .cmdk-item .ci-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :where(html.desk) .cmdk-item .ci-sub { color: var(--faint); font-size: 11.5px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .3px; }
  :where(html.desk) .cmdk-empty { padding: 22px; text-align: center; color: var(--faint); font-size: 13.5px; }
  /* ----- Vida como dashboard: agenda (direita, altura toda) | briefing + foco + pendências (esquerda) ----- */
  :where(html.desk) .maincol .view > .dash { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
  :where(html.desk) .maincol .view > .dash > .dcol-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  :where(html.desk) .maincol .view > .dash > .dcol-side { min-width: 0; }
  :where(html.desk) .maincol .view > .dash > .dcol-main > * { order: 0; } /* dentro da coluna a ordem é a natural do HTML */
  /* login centralizado no desktop */
  :where(html.desk) .login { max-width: 380px; margin: 0 auto; }
  /* scrollbars finas e temáticas (só desktop) */
  :where(html.desk) .view, :where(html.desk) .side-scroll, :where(html.desk) .emp-master, :where(html.desk) .emp-detail, :where(html.desk) .cmdk-list, :where(html.desk) .ctxbody, :where(html.desk) .sheet-list { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
  :where(html.desk) .view::-webkit-scrollbar, :where(html.desk) .side-scroll::-webkit-scrollbar, :where(html.desk) .emp-master::-webkit-scrollbar, :where(html.desk) .emp-detail::-webkit-scrollbar, :where(html.desk) .cmdk-list::-webkit-scrollbar { width: 10px; }
  :where(html.desk) .view::-webkit-scrollbar-thumb, :where(html.desk) .side-scroll::-webkit-scrollbar-thumb, :where(html.desk) .emp-master::-webkit-scrollbar-thumb, :where(html.desk) .emp-detail::-webkit-scrollbar-thumb, :where(html.desk) .cmdk-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
  :where(html.desk) .view::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: padding-box; }
  /* toast e banner de atualização: no desktop não tem barra de abas, não precisa subir 80px */
  /* 25/11: no computador o aviso sobe para o canto de cima à direita (embaixo ele cobria o campo de texto da conversa) */
  :where(html.desk) .toasthost { bottom: auto; top: 80px; left: auto; right: 20px; align-items: flex-end; }
  :where(html.desk) .updbar { bottom: 20px; }
}

/* ---------- Financeiro engGenai ---------- */
.fincard { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: linear-gradient(180deg, rgba(193,122,65,.14), rgba(193,122,65,.06));
  border: 1px solid rgba(193,122,65,.28); border-radius: 14px; padding: 13px 14px; margin-bottom: 12px; color: var(--text); }
.fincard:active { background: rgba(193,122,65,.2); }
a.fincard { text-decoration: none; }
.fin-ic { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; background: var(--cobre); color: #2A1607;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.fin-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.fin-body b { font-size: 15px; }
.fin-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-ch { color: var(--muted); flex: 0 0 auto; }
.dash.fin { gap: 12px; }
.fingrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.finstat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px;
  display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fs-t { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-v { font-size: 18px; font-weight: 700; color: var(--cobre-claro); }
.fs-s { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finalert { background: rgba(224,163,104,.1); border: 1px solid rgba(224,163,104,.3); border-radius: 12px;
  padding: 11px 13px; font-size: 13px; line-height: 1.45; color: var(--text); }
.finalert b { color: var(--cobre-claro); }
.finform { display: flex; flex-direction: column; gap: 9px; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 13px; padding: 13px; margin-top: 10px; }
.finform b { font-size: 14px; color: var(--cobre-claro); }
.finform input, .finform select { width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 12px; color: var(--text); font-size: 15px; }
.finform input:focus, .finform select:focus { border-color: var(--border-strong); outline: none; }
.ffbtns { display: flex; gap: 8px; margin-top: 2px; }
.ffcancel { flex: 0 0 auto; padding: 11px 16px; border-radius: 10px; background: transparent; border: 1px solid var(--border); color: var(--muted); font-weight: 600; }
.ffsave { flex: 1; padding: 11px; border-radius: 10px; background: var(--cobre); color: #2A1607; font-weight: 700; }
.ffsave:disabled { opacity: .6; }
@media (min-width: 900px) and (pointer: fine) {
  :where(html.desk) .fingrid { grid-template-columns: repeat(4, 1fr); }
}

/* carteira de contratos (12/09/2026) — fonte local, nao depende do site */
.finstat.crit .fs-v { color: #E06C6C; }
.finalert.crit { border-color: rgba(224,108,108,.45); background: rgba(224,108,108,.09); }
.finbar { height: 5px; border-radius: 3px; background: var(--surface-2); margin: 9px 0 2px; overflow: hidden; }
.finbar i { display: block; height: 100%; background: var(--verdete); border-radius: 3px; }
.finparc { padding-top: 4px; padding-bottom: 4px; }
.finsit { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-right: 4px; }
.finsit.ok { color: var(--verdete); }
.finsit.meio { color: var(--cobre-claro); }
.finsit.neutro { color: var(--muted); }
.finsit.crit { color: #E06C6C; }
.finfonte { font-size: 11.5px; color: var(--faint); margin-top: 4px; line-height: 1.4; }
.finfoot { font-size: 11.5px; color: var(--faint); text-align: center; margin-top: 14px; line-height: 1.5; }
.fin .kv.col { flex-direction: column; align-items: flex-start; gap: 2px; }
.fin .kv.col .val { text-align: left; line-height: 1.4; }

/* v2 (12/09/2026, agente Financeiro): painel do mês, tabela de situação, seções, documentos clicáveis */
.finpainel { padding: 12px 13px; border-color: rgba(193,122,65,.32); background: linear-gradient(180deg, rgba(193,122,65,.11), rgba(193,122,65,.03)); }
.fp-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.fp-h b { font-size: 15px; }
.fp-h span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.fintbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.fintbl td, .fintbl th { padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
.fintbl tbody tr:last-child td { border-bottom: none; }
.fintbl th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); font-weight: 600; }
.fintbl td small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.35; font-weight: 400; }
.fintbl td.r { text-align: right; white-space: nowrap; font-weight: 600; color: var(--cobre-claro); }
.fintbl td.r.muted { color: var(--muted); font-weight: 500; }
.fintbl td.r small { white-space: normal; max-width: 150px; margin-left: auto; }   /* v3: legenda do saldo não empurra a coluna */
.fintbl td:first-child { width: 58%; }
.fintbl td.r.ok { color: var(--verdete); }
.fintbl td.r.crit, .fintbl .crit { color: #E06C6C; }
.fintbl .muted { color: var(--muted); }
.fintbl tr.fp-sep td { border-top: 1px dashed var(--border-strong); padding-top: 11px; }
.fintbl tr.fp-total td { border-top: 1px solid var(--border-strong); padding-top: 10px; }
.fintbl tr.fp-total td:first-child span { font-weight: 700; font-size: 14px; }
.fintbl td.r.big { font-size: 21px; font-weight: 800; }
.fp-foot { text-align: right; margin-top: 2px; }
.finlink { color: var(--cobre-claro); font-weight: 600; font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 2px 0; }
.fintblwrap { padding: 2px 8px; overflow-x: auto; }
/* situação dos clientes: grade (cartão no celular, 4 colunas no desktop) */
.fsit { padding: 4px 13px; }
.fshead { display: none; }
.fsrow { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "c s" "p a"; gap: 6px 12px; padding: 11px 0; border-bottom: 1px solid var(--border); cursor: pointer; align-items: start; }
.fsrow:last-child { border-bottom: none; }
.fsrow:active { background: rgba(193,122,65,.06); }
.fs-c { grid-area: c; min-width: 0; }
.fs-s { grid-area: s; justify-self: end; }
.fs-p { grid-area: p; }
.fs-a { grid-area: a; justify-self: end; text-align: right; }
.fsrow b { font-size: 14px; display: block; }
.fs-c b { font-size: 15px; }
.fsrow small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; line-height: 1.35; }
.fsrow i { display: block; font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 2px; }
.fsrow .crit { color: #E06C6C; }
.fsrow .muted { color: var(--muted); font-weight: 500; }
@media (min-width: 900px) and (pointer: fine) {
  :where(html.desk) .fshead { display: grid; grid-template-columns: 1.3fr 1.1fr 1fr 1fr; gap: 12px; padding: 9px 0 7px; border-bottom: 1px solid var(--border); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); font-weight: 600; }
  :where(html.desk) .fshead span:last-child, :where(html.desk) .fsrow .fs-a { text-align: right; }
  :where(html.desk) .fsrow { grid-template-columns: 1.3fr 1.1fr 1fr 1fr; grid-template-areas: "c s p a"; align-items: center; }
  :where(html.desk) .fs-s { justify-self: start; }
  :where(html.desk) .fsrow i { display: none; }
}
.fpill { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 3px 7px; border-radius: 999px; border: 1px solid; line-height: 1.25; }
.fpill.ok { color: var(--verdete); border-color: rgba(90,165,147,.45); background: rgba(90,165,147,.1); }
.fpill.crit { color: #E06C6C; border-color: rgba(224,108,108,.5); background: rgba(224,108,108,.1); }
.fpill.meio { color: var(--cobre-claro); border-color: rgba(227,163,104,.45); background: rgba(227,163,104,.1); }
.fpill.neutro { color: var(--muted); border-color: var(--border-strong); background: var(--surface-2); }
.finsec-h { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; margin-top: 12px; padding: 11px 13px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14px; }
.finsec-h .finsec-b { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.finsec-h > span:first-child:last-of-type { margin-right: auto; }
.finsec-h .chev { color: var(--muted); display: flex; transition: transform .15s; }
.finsec-h .chev.open { transform: rotate(90deg); }
.finsec-h .chev svg { width: 18px; height: 18px; }
.finsec-h.on { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: -1px; }
.finsec-h.on + .card { border-top-left-radius: 0; border-top-right-radius: 0; }
.finpend { cursor: pointer; }
.finpend:active { background: rgba(193,122,65,.06); }
.fintag { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); margin-right: 6px; vertical-align: 1px; }
.fintag.financeira { color: #E06C6C; border-color: rgba(224,108,108,.4); }
.fintag.assinatura { color: var(--cobre-claro); border-color: rgba(227,163,104,.4); }
.fintag.emissao { color: var(--verdete); border-color: rgba(90,165,147,.4); }
.findocs { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.findoc { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.findoc svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--cobre-claro); }
.findoc:active { background: var(--surface); }
.findoc.contrato { border-color: rgba(193,122,65,.4); }
.findoc.nota svg { color: var(--verdete); }
.fincli-ficha { padding: 12px 13px; }
.fcf-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.fcf-c { font-size: 12px; color: var(--muted); }
.fcf-obj { font-size: 13.5px; margin-bottom: 10px; line-height: 1.4; }
.fincli-ficha .fingrid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 380px) { .fintbl td.r.big { font-size: 19px; } }


/* v3 (15/09/2026, agente Financeiro): indicadores, gráfico semanal, tabela dos clientes, caixa/repasses, PDF */
.fin { --fin-c1: #C98240; --fin-c2: #2FA487; --fin-grid: var(--border-strong); --fin-txt: var(--text); --fin-txt2: var(--muted); --fin-surf: var(--surface); }
html.light .fin { --fin-c1: #B4692F; --fin-c2: #1F8A70; }
.finhero .finstat.c1 .fs-v { color: var(--fin-c1); }
.finhero .finstat.ok .fs-v { color: var(--verdete); }
.finhero .finstat .fs-s { white-space: normal; line-height: 1.3; }
.finhero .finstat .fs-t { white-space: normal; line-height: 1.25; }
.fingrafcard { padding: 12px 13px 10px; }
.fg-delta { font-size: 12.5px; margin: 2px 0 6px; font-weight: 600; }
.fg-delta .ok { color: var(--verdete); }
.fg-delta .crit { color: #E06C6C; }
.fg-delta .muted { color: var(--muted); font-weight: 500; }
.fingraf-wrap { position: relative; }
.fingraf { display: block; width: 100%; height: auto; }
.fg-tip { display: none; position: absolute; top: 6px; left: 0; z-index: 3; pointer-events: none; min-width: 150px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; line-height: 1.4;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.fg-tip b { display: block; font-size: 12px; margin-bottom: 2px; }
.fg-tip span { display: block; color: var(--text); }
.fg-tip span b { display: inline; }
.fg-tip span.c1::before, .fg-tip span.c2::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--fin-c1); }
.fg-tip span.c2::before { background: var(--fin-c2); }
.fg-tip small { color: var(--muted); display: block; margin-top: 2px; }
.fg-legenda { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); }
.fg-legenda .lg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.fg-legenda .lg.c1 i { background: var(--fin-c1); }
.fg-legenda .lg.c2 i { background: var(--fin-c2); }
.fg-legenda .finlink { margin-left: auto; }
.fgtab { margin-top: 8px; }
.fgtab td small { display: inline; margin-left: 4px; }
/* tabela dos clientes: cartão no celular, 5 colunas no desktop */
.fct { padding: 4px 13px; }
.fcthead { display: none; }
.fctrow { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.fctrow:last-child { border-bottom: none; }
.fctrow:active { background: rgba(193,122,65,.06); }
.fctrow > div { min-width: 0; }
.fctrow i { display: block; font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin-bottom: 3px; }
.fctrow b { font-size: 14px; }
.fctrow small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.fctrow .muted { color: var(--muted); font-weight: 500; }
.fct-e { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.fct-e b { font-size: 16px; }
.fct-e small { margin-top: 0; }
.fct-e .fpill { margin-left: auto; }
.fchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.fchip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); line-height: 1.3; }
.fchip.ok { color: var(--verdete); border-color: rgba(90,165,147,.45); background: rgba(90,165,147,.1); }
.fchip.crit { color: #E06C6C; border-color: rgba(224,108,108,.5); background: rgba(224,108,108,.1); }
.fchip.next { color: var(--cobre-claro); border-color: rgba(227,163,104,.45); background: rgba(227,163,104,.1); }
.fsig { display: block; font-size: 12.5px; font-weight: 600; }
.fsig.ok { color: var(--verdete); }
.fsig.meio { color: var(--cobre-claro); }
.fsig.crit { color: #E06C6C; }
.fpendc { margin-top: 3px; }
.finbar.prazo { margin: 7px 0 3px; }
.finbar.prazo i { background: var(--cobre); }
.fctbtn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid rgba(193,122,65,.4); color: var(--text); font-size: 13px; font-weight: 600; }
.fctbtn svg { width: 16px; height: 16px; color: var(--cobre-claro); }
.fctbtn:active { background: var(--surface); }
.fctbtn.off { opacity: .5; border-color: var(--border); }
.fct-b { display: flex; }
.fct-r b { color: var(--verdete); }
.ftot { cursor: default; border-top: 1px solid var(--border-strong); }
.ftot .fct-r b { font-size: 16px; }
@media (min-width: 900px) and (pointer: fine) {
  :where(html.desk) .fcthead { display: grid; grid-template-columns: 1.1fr 1.5fr 1.3fr 1fr 1.7fr 122px; gap: 14px; padding: 9px 0 7px; border-bottom: 1px solid var(--border); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); font-weight: 600; }
  :where(html.desk) .fctrow { grid-template-columns: 1.1fr 1.5fr 1.3fr 1fr 1.7fr 122px; gap: 14px; align-items: start; }
  :where(html.desk) .fctrow i { display: none; }
  :where(html.desk) .fct-e { flex-direction: column; align-items: flex-start; gap: 3px; }
  :where(html.desk) .fct-e .fpill { margin-left: 0; margin-top: 4px; }
  :where(html.desk) .fct-b { justify-content: flex-end; }
  :where(html.desk) .ftot .fct-r { grid-column: 4; }
  :where(html.desk) .finhero { grid-template-columns: repeat(4, 1fr); }
}
/* caixa/repasses e previsão */
.fprev { padding: 9px 0; border-bottom: 1px solid var(--border); }
.fprev:last-of-type { border-bottom: none; }
.fprev-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; }
.fprev-top span { font-weight: 700; color: var(--cobre-claro); }
.fprev-top span.muted { color: var(--muted); font-weight: 500; }
.fprev .finbar { margin: 6px 0 4px; }
.fprev small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.fprev small span[role=button] { text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.fcf-prazo { font-size: 12.5px; margin-top: 8px; line-height: 1.4; }
.fcf-prazo small { display: block; color: var(--muted); font-size: 11.5px; }
/* PDF para o sócio */
.finshare { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: 100%; text-align: left; margin-top: 12px; padding: 13px 14px; border-radius: 13px;
  background: linear-gradient(180deg, rgba(90,165,147,.14), rgba(90,165,147,.05)); border: 1px solid rgba(90,165,147,.35); color: var(--text); font-weight: 700; font-size: 14px; }
.finshare svg { width: 18px; height: 18px; color: var(--verdete); }
.finshare small { flex-basis: 100%; font-size: 11.5px; color: var(--muted); font-weight: 500; padding-left: 28px; }
.finshare:active { background: rgba(90,165,147,.2); }
.finpdf { padding: 12px 13px; border-color: rgba(90,165,147,.4); }
.finpdf.crit { border-color: rgba(224,108,108,.45); }
.finpdf b { display: block; font-size: 14px; }
.finpdf small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; overflow-wrap: anywhere; }
.finpdf .ffbtns { margin-top: 10px; }
.finpdf .ffsave.center { text-align: center; text-decoration: none; display: block; }
/* arquivar projeto (folha do projeto) */
.sheet-arch { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 11px; border-radius: 11px; background: transparent; border: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 600; }
.sheet-arch:active { background: var(--surface); }
.sheet-arch svg { width: 16px; height: 16px; flex: none; }

/* Newsletter de IA (Vida) */
.card.nl .k { display: flex; align-items: center; }
.card.nl .nl-date { margin-left: auto; font-size: 11px; color: var(--faint); font-weight: 500; }
.nl-item { padding: 12px 0; border-top: 1px solid var(--border); }
.nl-item:first-of-type { border-top: none; padding-top: 4px; }
.nl-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.nl-num { font-size: 11px; font-weight: 700; color: #2A1607; background: var(--cobre); border-radius: 5px; padding: 1px 6px; }
.nl-src { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.nl-title { font-size: 14.5px; font-weight: 600; line-height: 1.32; margin-bottom: 5px; }
.nl-comment { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0 0 7px; }
.nl-link { font-size: 12.5px; color: var(--cobre-claro); font-weight: 600; }
.nl-more { width: 100%; text-align: center; padding: 9px; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--cobre-claro); background: transparent; border: 1px solid var(--border); border-radius: 9px; }
.nl-more:active { background: var(--surface); }

/* Briefing de hoje (topo da Vida) */
.card.briefing { background: linear-gradient(180deg, rgba(193,122,65,.1), transparent); border-color: rgba(193,122,65,.22); }
.card.briefing .bf-l { font-size: 13.5px; line-height: 1.55; margin: 5px 0 0; color: var(--text); }
.card.briefing .bf-l:first-of-type { margin-top: 2px; }

/* ============ noite 14/07: Telegram-grade chat ============ */

/* banner "nova versão" (SW cache-first avisou que baixou código novo) */
.updbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(76px + var(--safe-bottom)); z-index: 60;
  background: var(--cobre); color: #2A1607; font-size: 13px;
  border-radius: 20px; padding: 9px 16px; box-shadow: 0 6px 24px rgba(0,0,0,.45);
  animation: updpop .35s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes updpop { from { transform: translateX(-50%) translateY(20px); opacity: 0; } }

/* timestamps + separador de dia (estilo Telegram) */
.msg { position: relative; }
.msg .msg-time { display: inline-block; float: right; margin: 8px 0 -2px 9px; font-size: 10.5px; color: var(--faint); user-select: none; }
.msg.me .msg-time { color: rgba(247,230,213,.55); }

/* SELECIONAR E COPIAR O TEXTO DAS BOLHAS (porte do Max, 10/09/2026)
   O index.html declara apple-mobile-web-app-capable=yes; com o app na tela de inicio o WebKit
   roda em standalone e DESLIGA a selecao de texto do documento inteiro por padrao. Reativo a
   selecao SO' nas bolhas: o resto do app segue sem lupa atrapalhando arrasto e hold. */
.msg { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* o horario e o botao ficam FORA da selecao: senao iam junto no colar */
.msg .msg-time, .msg .msg-copy { -webkit-user-select: none; user-select: none; }
.msg-copy {
  float: right; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px; margin: 5px 0 -2px 4px; padding: 0;
  border: 0; border-radius: 6px; background: transparent; color: inherit;
  cursor: pointer; opacity: .45; -webkit-touch-callout: none;
  transition: opacity .15s, background .15s;
}
.msg-copy svg { width: 13px; height: 13px; }
.msg-copy:hover, .msg-copy:focus-visible { opacity: 1; background: rgba(127,127,127,.18); outline: none; }
.msg-copy.ok { opacity: 1; color: #4FB286; background: transparent; }
/* no toque nao existe hover: fica sempre visivel no celular, so' que discreto */
@media (hover: none) { .msg-copy { opacity: .6; } }
.msg.queued { opacity: .72; }
.msg.queued .msg-time { font-style: italic; }
.daysep { align-self: center; margin: 6px 0 2px; }
.daysep span { font-size: 11px; color: var(--faint); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 3px 11px; }

/* markdown rico nas respostas (estilo Code) */
.msg.ai .li { display: block; padding-left: 4px; }
.msg.ai .linum { color: var(--cobre-claro); }
.msg.ai a { color: var(--verdete); text-decoration: underline; text-underline-offset: 2px; }
.msg.ai .codeblock {
  display: block; background: rgba(0,0,0,.35); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; margin: 6px 0; overflow-x: auto;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre;
}
html.light .msg.ai .codeblock { background: rgba(0,0,0,.06); }
html.light .msg.ai code { background: rgba(0,0,0,.08); }

/* botão COPIAR do bloco de código (12/08/2026, pedido dele). Sempre visível: no celular não existe
   hover, e esconder atrás de toque longo é o mesmo que não existir. Sobreposto no canto direito, e
   o <pre> ganha respiro à direita pro texto não correr por baixo dele. */
.msg.ai .codewrap { position: relative; }
/* o conteúdo QUEBRA em vez de sumir cortado: o que costuma vir aqui é endereço/telefone/comando,
   e endereço cortado pela metade não serve pra nada. Antes era white-space:pre + scroll lateral —
   num celular isso esconde o fim do texto e ele nem sabe que tem mais. */
.msg.ai .codewrap .codeblock {
  white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible;
  padding-top: 32px;   /* faixa livre pro botão: nada passa por baixo dele */
}
.msg.ai .copybtn {
  position: absolute; top: 13px; right: 9px; z-index: 1;
  padding: 4px 10px; border-radius: 7px; cursor: pointer;
  /* fundo OPACO de propósito: com rgba o texto do bloco aparecia ATRAVÉS do botão */
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--muted);
  font: 600 11px/1.2 system-ui, -apple-system, sans-serif; letter-spacing: .2px;
}
.msg.ai .copybtn:active { transform: scale(.94); }
.msg.ai .copybtn.ok { color: var(--verdete); border-color: var(--verdete); }
html.light .msg.ai .copybtn { background: #efe9e2; color: #5a5148; border-color: rgba(0,0,0,.15); }

/* chips de anexo com thumbnail */
.attachchip.pic { padding-left: 5px; }
.attachchip .ac-thumb { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.composer.dropping { outline: 2px dashed var(--cobre); outline-offset: -6px; border-radius: 14px; }

/* barra de gravação (voz estilo Telegram) */
.recbar {
  position: absolute; left: 12px; right: 12px; bottom: 9px; height: 42px; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 21px; padding: 0 8px 0 14px;
  animation: recin .18s ease-out;
}
@keyframes recin { from { transform: translateY(8px); opacity: 0; } }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1.1s ease-in-out infinite; flex-shrink: 0; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; min-width: 38px; }
.rec-hint { flex: 1; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-lock { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.rec-lock svg { width: 17px; height: 17px; }
.rec-del, .rec-send { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rec-del { color: var(--danger); }
.rec-del svg { width: 18px; height: 18px; }
.rec-send { background: var(--cobre); color: #2A1607; }
.rec-send svg { width: 18px; height: 18px; }

/* linha de arquivo: botão ⋯ (compartilhar) */
.fr-more { width: 34px; height: 34px; margin-right: -6px; display: flex; align-items: center; justify-content: center; color: var(--faint); border-radius: 50%; flex-shrink: 0; }
.fr-more svg { width: 17px; height: 17px; }
.fr-more:active { background: var(--surface-2); color: var(--cobre-claro); }

/* folha compartilhar / seletor WhatsApp */
.sharesheet .sh-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.sh-acts { display: flex; flex-direction: column; padding: 4px 6px 12px; }
.sh-acts .sheet-chat { display: flex; align-items: center; gap: 12px; }
.sh-acts .sheet-chat svg { width: 19px; height: 19px; color: var(--cobre-claro); flex-shrink: 0; }
.washeet .wa-file { font-size: 12.5px; color: var(--muted); padding: 0 18px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.washeet .wa-search { margin: 0 14px 8px; }
.washeet .sheet-list { max-height: 46dvh; overflow-y: auto; }
.washeet .sheet-head svg { width: 20px; height: 20px; color: #25D366; }

/* anotador de imagem */
.anno-ov { position: fixed; inset: 0; z-index: 120; background: rgba(10,8,6,.96); display: flex; flex-direction: column; }
.anno-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + var(--safe-top)) 14px 10px; color: var(--text); }
.anno-top b { font-size: 15px; }
.anno-top .iconbtn { font-size: 17px; color: var(--text); }
.anno-wrap { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 6px; }
.anno-wrap canvas { max-width: 100%; max-height: 100%; border-radius: 10px; touch-action: none; }
.anno-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px calc(14px + var(--safe-bottom)); }
/* editor de imagem: alternar Desenhar/Cortar + barra do corte (09/08) */
/* "Mudanças do app" no resumo do dia: título, o que significa, e o passo a passo (09/08) */
.pn-mud .mud-item { padding: 10px 0; border-top: 1px solid var(--border); }
.pn-mud .mud-item:first-of-type { border-top: 0; padding-top: 4px; }
.mud-t { font-weight: 600; font-size: 14.5px; color: var(--text); }
.mud-quem { margin-left: 7px; padding: 1px 7px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border-strong); font-size: 10.5px; font-weight: 500; color: var(--muted); vertical-align: middle; }
.mud-novo { margin-left: 7px; padding: 1px 7px; border-radius: 9px; background: var(--verdete); color: var(--bg); font-size: 10.5px; font-weight: 600; vertical-align: middle; }
.mud-o { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.mud-como { margin-top: 8px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--cobre); }
.mud-passos { margin: 4px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.5; }
.mud-passos li { margin: 2px 0; }

.anno-modos { display: flex; gap: 6px; }
.anno-m { height: 32px; padding: 0 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); font-size: 13px; }
.anno-m.on { background: var(--cobre); color: #2A1607; border-color: transparent; font-weight: 600; }
.anno-crop { display: none; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 14px 6px; }
.anno-ov.cropping .anno-crop { display: flex; }
.anno-ov.cropping .anno-colors { display: none; }   /* no corte, escolher cor não serve pra nada */
.anno-dica { margin-right: auto; font-size: 12px; color: var(--muted); }
.anno-colors { display: flex; gap: 9px; }
.anno-c { width: 27px; height: 27px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.anno-c.on { border-color: #fff; transform: scale(1.14); }
.anno-actions { display: flex; gap: 8px; }
.anno-act { height: 40px; min-width: 40px; padding: 0 12px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); display: flex; align-items: center; gap: 7px; font-size: 13px; }
.anno-act svg { width: 18px; height: 18px; }
.anno-act.primary { background: var(--cobre); color: #2A1607; border: none; font-weight: 600; }
.anno-act.primary svg { transform: rotate(90deg); }


/* ================= customizacoes do Ro (fork engGenai) ================= */
.mark-img{width:100%;height:100%;object-fit:contain;border-radius:inherit;display:block}
.mark,.mark-big{overflow:hidden;padding:0}
.hero-pose{width:120px;height:120px;margin:0 auto 6px;display:flex;align-items:center;justify-content:center}
.hero-pose img{width:100%;height:100%;object-fit:contain;display:block}
.home-head{display:flex;align-items:center;gap:10px;padding:2px 6px 12px;max-width:640px;margin:0 auto;width:100%}
.home-back{display:inline-flex;align-items:center;gap:5px;background:var(--surface-2);border:1px solid var(--border);color:var(--text);border-radius:20px;padding:7px 13px;font-size:14px;font-weight:500;cursor:pointer}
.home-back svg{width:16px;height:16px}
.home-cat{font-size:15px;font-weight:600;color:var(--muted)}
.draw-group{width:100%;display:flex;align-items:center;gap:9px;text-align:left;padding:9px 10px;border-radius:8px;color:var(--text);font-size:14px;font-weight:600;cursor:pointer}
.draw-group:hover{background:var(--surface-2)}
.dg-tog{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border:1px solid var(--border);border-radius:4px;font-size:15px;line-height:1;color:var(--muted);flex-shrink:0}
.dg-t{flex:1}
.dg-n{font-size:12px;color:var(--faint);font-weight:400}
.draw-item.sub{padding-left:30px}
.draw-item.sub .di-t{font-weight:400}
.mark-logo{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.mark-logo img{width:90%;height:90%;object-fit:contain}
.mark-logo.bleed img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.ctx-back{display:inline-flex;align-items:center;gap:5px;background:var(--surface-2);border:1px solid var(--border);color:var(--text);border-radius:20px;padding:7px 13px;font-size:14px;font-weight:500;cursor:pointer;margin:0 auto 16px}
.ctx-back svg{width:16px;height:16px}
.side-brand{display:flex;align-items:center}
.side-refresh{margin-left:auto;flex-shrink:0}

/* ---- Rotinas (crontab do VPS) ---- */
.rotwrap{max-width:720px;margin:0 auto;padding:6px 16px 40px}
.rot-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:14px 2px 18px}
.rot-head h2{font-size:19px;font-weight:700;color:var(--text);margin:0}
.rot-n{font-size:14px;color:var(--faint);font-weight:400;margin-left:2px}
.rot-toggle{display:inline-flex;background:var(--surface-2);border:1px solid var(--border);border-radius:20px;padding:3px}
.rot-toggle button{border:none;background:none;color:var(--muted);padding:6px 14px;border-radius:16px;font-size:13.5px;cursor:pointer;font-weight:500}
.rot-toggle button.on{background:var(--cobre);color:#241206;font-weight:600}
.rot-grp{display:flex;align-items:center;gap:7px;font-size:11.5px;letter-spacing:.5px;text-transform:uppercase;color:var(--faint);font-weight:600;padding:18px 4px 8px}
.rot-grp span{background:var(--surface-2);border:1px solid var(--border);color:var(--cobre-claro);border-radius:9px;padding:1px 7px;font-size:11px}
.rot-row{display:flex;align-items:center;gap:12px;padding:11px 13px;border:1px solid var(--border);background:var(--surface);border-radius:12px;margin-bottom:8px}
.rot-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0}
.rot-when{font-variant-numeric:tabular-nums;font-weight:600;font-size:13px;color:var(--text);min-width:104px;flex-shrink:0}
.rot-name{flex:1;font-size:14px;color:var(--text);line-height:1.3}
.rot-proj{font-size:11.5px;color:var(--muted);background:var(--surface-2);border:1px solid var(--border);padding:3px 9px;border-radius:11px;flex-shrink:0;white-space:nowrap}
@media(max-width:560px){.rot-when{min-width:84px;font-size:12.5px}.rot-name{font-size:13px}}

/* ---- Marca engGenai centralizada no topo (desktop) ---- */
.tophdr { position: relative; }
.th-brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; pointer-events: none; }
.th-brand .lg { height: 42px; width: auto; display: block; }
.th-brand .lg-light { display: none; }
html.light .th-brand .lg-dark { display: none; }
html.light .th-brand .lg-light { display: block; }

/* ===== M3: painel de uso do Claude (side-brand) ===== */
.side-brand .side-refresh.on { color: var(--cobre); background: var(--surface-2); }
.uso-panel { margin: 2px 10px 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.uso-h { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--faint); margin-bottom: 9px; }
.uso-row { margin-bottom: 11px; }
.uso-row:last-child { margin-bottom: 2px; }
.uso-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.uso-top b { color: var(--text); font-variant-numeric: tabular-nums; }
.uso-bar { height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.uso-fill { height: 100%; background: var(--cobre); border-radius: 4px; transition: width .3s; }
.uso-fill.warn { background: #E3A368; }
.uso-fill.danger { background: var(--danger); }
.uso-panel .uso-sub { font-size: 11px; color: var(--faint); margin-top: 4px; }
.uso-empty { font-size: 12.5px; color: var(--faint); padding: 4px 0; }

/* ===== M5: aba Acessos (estilo Tailscale) ===== */
.acessos-wrap { max-width: 720px; margin: 0 auto; padding: 8px 16px 40px; }
.acc-novo { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; margin: 6px 0 16px; border: 1.5px dashed var(--border-strong); background: transparent; color: var(--cobre-claro); border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.acc-novo:hover { background: var(--surface); }
.acc-novo svg { width: 18px; height: 18px; }
.acc-list { display: flex; flex-direction: column; gap: 8px; }
.acc-card { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; }
.acc-card.desligado { opacity: .62; }
.acc-ic { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 14px; letter-spacing: -.3px; }
.acc-mid { flex: 1; min-width: 0; }
.acc-nome { display: flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: var(--text); }
.acc-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.acc-dot.on { background: #34C759; box-shadow: 0 0 0 3px rgba(52,199,89,.18); }
.acc-dot.off { background: var(--danger); box-shadow: 0 0 0 3px rgba(255,90,80,.15); }
.acc-contas { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.acc-conta { font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 10px; }
.acc-btn { flex-shrink: 0; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 9px; cursor: pointer; border: 1px solid var(--border-strong); background: var(--surface-2); }
.acc-btn.desc { color: var(--danger); }
.acc-btn.desc:hover { background: rgba(255,90,80,.1); }
.acc-btn.rec { color: var(--verdete); }
.acc-btn.rec:hover { background: rgba(90,165,147,.12); }

/* ---- banner "nova versão" (SW avisa por ETag) ---- */
#roUpdate { position: fixed; left: 50%; bottom: calc(20px + var(--safe-bottom)); transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 12px; background: var(--cobre); color: #2A1607; padding: 9px 11px 9px 16px; border-radius: 24px; box-shadow: 0 8px 30px rgba(0,0,0,.5); font-size: 14px; font-weight: 600; animation: roUpIn .3s ease; }
#roUpdate button { background: #2A1607; color: #F1E7DD; border-radius: 16px; padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
#roUpdate #roUpdX { background: transparent; color: #2A1607; padding: 6px 8px; font-size: 15px; font-weight: 700; opacity: .7; }
#roUpdate #roUpdX:hover { opacity: 1; }
@keyframes roUpIn { from { opacity: 0; transform: translateX(-50%) translateY(12px); } }

/* ---- markdown rico + horário + fila + drag no chat ---- */
.msg .codeblock { display: block; background: rgba(0,0,0,.35); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; margin: 6px 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
.msg .li { display: block; margin: 2px 0; }
.msg .li .linum { color: var(--cobre-claro); margin-right: 4px; }
.msg .mdh { display: block; color: var(--cobre-claro); font-weight: 700; margin: 7px 0 2px; }
.msg i { font-style: italic; }
.msg a { color: var(--cobre-claro); text-decoration: underline; }
/* horario/fila da bolha: a versao do Mateus (.msg .msg-time, .msg.queued, .daysep — bloco "Telegram-grade chat" acima) e mais nova e mais especifica; as nossas 3 regras equivalentes sairam daqui para nao brigarem com ela. */
.composer.dropping { outline: 2px dashed var(--cobre-claro); outline-offset: -4px; border-radius: 18px; background: rgba(193,122,65,.06); }

/* ---- Cartão de visitas (overlay embutido) ---- */
.card-tap{cursor:pointer}
body.cartao-open{overflow:hidden}
.cartao-overlay{position:fixed;inset:0;z-index:10000;background:#15110D;display:flex;flex-direction:column}
.cartao-overlay[hidden]{display:none}
.cartao-bar{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;background:#15110D;color:#F7F7F7;border-bottom:1px solid rgba(255,255,255,.08)}
.cartao-bar b{font-size:15px;letter-spacing:.2px}
#cartaoFrame{flex:1 1 auto;width:100%;border:0;background:#fff}
/* ---- aba WhatsApp: resumos horários dos grupos ---- */
.wa-tab { padding-top: 6px; }
.wapanel { margin: 6px 0 4px; }
.wapanel .wp-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 2px 10px; }
.wapanel .wp-h svg { width: 15px; height: 15px; opacity: .8; }
.wapanel .wp-cta { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--cobre-claro); background: none; border: 0; cursor: pointer; padding: 2px 4px; }
.wapanel .wp-cta svg { width: 13px; height: 13px; }
.wa-item { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.wa-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.wa-item-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.wa-item-h b { font-size: 14px; color: var(--text); }
.wa-item-h .wa-hora { margin-left: auto; font-size: 11px; color: var(--faint); }
.wa-resumo { font-size: 13px; line-height: 1.4; color: var(--muted); margin: 0; }
.wa-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.wa-flag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.wa-flag.urg { background: rgba(224,122,95,.15); color: var(--danger); }
.wa-flag.men { background: rgba(90,165,147,.15); color: var(--verdete); }
.wa-urg { margin: 7px 0 0; padding-left: 16px; }
.wa-urg li { font-size: 12.5px; line-height: 1.4; color: var(--text); }
.wp-empty { font-size: 13px; color: var(--faint); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 12px; padding: 18px; text-align: center; line-height: 1.5; }
/* ---- uso do plano Claude (painel na barra lateral) ---- */
.side-brand .usobtn { margin-left: auto; color: var(--faint); flex-shrink: 0; }
.side-brand .usobtn:hover, .side-brand .usobtn.on { color: var(--cobre-claro); }
.side-brand .usobtn svg { width: 17px; height: 17px; }
.uso-painel { margin: 2px 14px 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; }
.uso-linha + .uso-linha { margin-top: 11px; }
.uso-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.uso-topo span { font-size: 11px; color: var(--muted); }
.uso-topo b { font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.uso-trilho { height: 5px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.uso-cheio { height: 100%; background: var(--verdete); border-radius: 999px; transition: width .35s ease; }
.uso-cheio.atencao { background: var(--cobre-claro); }
.uso-cheio.perigo { background: var(--danger); }
.uso-sub { font-size: 10.5px; color: var(--faint); margin-top: 4px; }
.uso-vazio { font-size: 11.5px; color: var(--faint); text-align: center; padding: 4px 0; }
.uso-att { display: block; width: 100%; margin-top: 11px; font-size: 10.5px; color: var(--muted); background: none; border: 0; border-top: 1px solid var(--border); padding: 7px 0 0; cursor: pointer; }
.uso-att:hover { color: var(--text); }
/* ---- agenda: visão de MÊS (estilo Google Calendar) ---- */
.calbtn { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; text-transform: none; letter-spacing: 0; margin-left: auto; border: 1px solid var(--border); border-radius: 7px; padding: 2px 7px !important; }
.calbtn svg { width: 12px; height: 12px; }
.card .k .calbtn + .editbtn, .card .k .calbtn + .livedot { margin-left: 6px; }
.cal-ov { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 18px; backdrop-filter: blur(2px); }
.cal-box { background: var(--bg); border: 1px solid var(--border-strong); border-radius: 16px; width: 100%; max-width: 1020px; max-height: 92vh; overflow-y: auto; padding: 14px 16px 18px; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.cal-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cal-nav { width: 28px; height: 28px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; }
.cal-nav:hover { border-color: var(--border-strong); color: var(--text); }
.cal-titulo { font-size: 16px; color: var(--text); text-transform: capitalize; min-width: 150px; }
.cal-titulo span { color: var(--faint); font-weight: 400; }
.cal-hoje { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); cursor: pointer; }
.cal-hoje:hover { border-color: var(--border-strong); color: var(--text); }
.cal-h .editbtn, .cal-h .livedot { margin-left: auto; }
.cal-h .cal-x { margin-left: 6px; }
/* detalhe do evento: abre por cima do calendário (z acima do .cal-ov) */
.ev-ov { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.ev-box { position: relative; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 15px; width: 100%; max-width: 380px; padding: 16px 18px 18px; box-shadow: 0 16px 44px rgba(0,0,0,.5); }
.ev-x { position: absolute; top: 10px; right: 10px; color: var(--faint); }
.ev-cal { display: flex; align-items: center; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 7px; padding-right: 28px; }
.ev-cal i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ev-tit { font-size: 17px; line-height: 1.3; color: var(--text); margin: 0 0 14px; padding-right: 20px; font-weight: 600; }
.ev-linha { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.ev-linha svg { width: 16px; height: 16px; color: var(--faint); flex-shrink: 0; margin-top: 1px; }
.ev-linha b { display: block; font-size: 13.5px; color: var(--text); font-weight: 500; text-transform: capitalize; }
.ev-linha span { display: block; font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.cobr-valor { font-size: 22px; font-weight: 700; color: var(--text); margin: -6px 0 14px; font-variant-numeric: tabular-nums; }
.ev-acoes { margin-top: 16px; }
.ev-chat { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px 14px; border: 0; border-radius: 11px; background: var(--cobre); color: #2A1607; font-size: 14px; font-weight: 600; cursor: pointer; }
.ev-chat:hover { filter: brightness(1.06); }
.ev-chat svg { width: 17px; height: 17px; }
.ev-dica { font-size: 11px; color: var(--faint); text-align: center; margin-top: 9px; line-height: 1.4; }
@media (max-width: 720px) { .ev-box { max-width: none; } }
/* seletor de agendas (igual a lateral do Google Calendar) */
.cal-ag.on { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.cal-sel { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 11px; padding: 10px 12px; margin-bottom: 12px; }
.cal-sel-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-sel-h b { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-right: auto; }
.cal-sel-tudo { font-size: 11px; color: var(--cobre-claro); background: none; border: 0; cursor: pointer; padding: 2px 4px; }
.cal-sel-tudo:hover { text-decoration: underline; }
.cal-sel-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; }
.cal-sel-item { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; border-radius: 6px; min-width: 0; }
.cal-sel-item:hover { background: var(--surface-2); }
.cal-sel-item input { position: absolute; opacity: 0; pointer-events: none; }
.cal-sel-item i { width: 13px; height: 13px; border-radius: 4px; border: 2px solid; flex-shrink: 0; transition: background .15s; }
.cal-sel-item span { font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-sel-item input:not(:checked) ~ span { color: var(--faint); }
.cal-sel-vazio { font-size: 12px; color: var(--faint); text-align: center; padding: 6px 0; }
.cal-sem { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; margin-bottom: 4px; }
.cal-sem span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); text-align: center; padding: 2px 0; }
.cal-grade { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; }
.cal-cel { min-height: 92px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 4px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; overflow: hidden; }
.cal-pontos { display: flex; flex-direction: column; gap: 2px; min-width: 0; width: 100%; }
.cal-cel:hover { border-color: var(--border-strong); }
.cal-cel.fora { opacity: .38; }
.cal-cel.hoje { border-color: var(--cobre); }
.cal-cel.hoje .cal-num { background: var(--cobre); color: #2A1607; font-weight: 700; }
.cal-cel.sel { background: var(--surface-2); border-color: var(--border-strong); }
.cal-num { font-size: 11.5px; color: var(--muted); width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; }
.cal-ev { display: flex; align-items: center; gap: 4px; width: 100%; text-align: left; background: none; border: 0; padding: 1px 2px; border-radius: 4px; cursor: pointer; min-width: 0; }
.cal-ev:hover { background: var(--surface-2); }
.cal-ev i { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.cal-ev span { font-size: 10.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mais { font-size: 10px; color: var(--faint); background: none; border: 0; padding: 0 2px; text-align: left; cursor: pointer; }
.cal-mais:hover { color: var(--text); }
.cal-carregando { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }
.cal-carregando span { display: block; margin-top: 6px; font-size: 12px; color: var(--faint); }
.cal-dia { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.cal-dia-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.cal-dia-h b { font-size: 14px; color: var(--text); }
.cal-dia-h span { font-size: 12px; color: var(--faint); }
.cal-dia-h .iconbtn { margin-left: auto; }
.cal-dia-ev { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer; }
.cal-dia-ev:hover { border-color: var(--border-strong); background: var(--surface-2); }
.cal-dia-ev i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cal-dia-ev b { font-size: 12px; color: var(--muted); min-width: 52px; font-weight: 600; }
.cal-dia-ev span { font-size: 13px; color: var(--text); }
@media (max-width: 720px) {
  .cal-ov { padding: 0; }
  .cal-box { max-width: none; max-height: 100vh; height: 100vh; border-radius: 0; border: 0; }
  .cal-cel { min-height: 58px; padding: 3px 2px; align-items: center; gap: 3px; }
  .cal-titulo { font-size: 14px; min-width: 0; }
  /* célula com ~46px não comporta texto: vira ponto colorido, como o Google Calendar no celular.
     O texto continua acessível tocando no dia (abre o detalhe embaixo). */
  .cal-cel { flex-direction: column; }
  .cal-pontos { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; align-content: flex-start; }
  /* o ponto tem 6px — alvo pequeno demais pro dedo. No celular ele NAO e' clicavel:
     o toque cai na celula e abre a lista do dia, onde cada evento tem linha inteira
     (mesmo comportamento do Google Calendar no mobile). */
  .cal-ev { width: auto; padding: 0; pointer-events: none; }
  .cal-ev span { display: none; }
  .cal-ev i { width: 6px; height: 6px; }
  .cal-mais { font-size: 9px; text-align: center; width: 100%; padding: 0; }
}
/* ---- card de cobranças do e-mail (aba Vida) ---- */
.cobr-item { display: block; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: 10px; padding: 9px 11px; margin-top: 8px; cursor: pointer; transition: border-color .15s; }
.cobr-item:hover { border-color: var(--border-strong); }
.cobr-item.alta { border-left-color: var(--danger); }
.cobr-item.info { opacity: .72; border-left-color: var(--border); }
.cobr-rep { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.cobr-sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 14px 0 2px; }
.cobr-top { display: flex; align-items: baseline; gap: 8px; }
.cobr-top b { font-size: 13.5px; color: var(--text); }
.cobr-val { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.cobr-sub { font-size: 12.5px; line-height: 1.4; color: var(--muted); margin-top: 3px; }
.cobr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cobr-tipo { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.cobr-venc { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.cobr-venc.perto { background: rgba(212,163,115,.18); color: var(--dourado, var(--text)); }
.cobr-venc.venc { background: rgba(224,122,95,.16); color: var(--danger); }
/* ---- aba WhatsApp: busca no acervo, navegador de dias, resumo sob demanda ---- */
/* o card e o botao de resumir sao irmaos (botao dentro de botao e' HTML invalido) */
.wa-item-wrap { position: relative; }
.wa-item-wrap .wa-item { padding-right: 40px; }
.wa-item-re { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; color: var(--faint); cursor: pointer; font-size: 12px; transition: color .15s, border-color .15s; }
.wa-item-re:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.wa-item-re svg { width: 13px; height: 13px; }
.wa-item-re.busy { opacity: .6; cursor: default; }
.wa-sd { font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 5px; border-radius: 5px; background: rgba(90,165,147,.16); color: var(--verdete); }
.wa-dias { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; scrollbar-width: none; }
.wa-dias::-webkit-scrollbar { display: none; }
.wa-diachip { flex-shrink: 0; font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); cursor: pointer; transition: all .15s; }
.wa-diachip:hover { border-color: var(--border-strong); color: var(--text); }
.wa-diachip.on { background: var(--accent-soft, var(--surface-2)); border-color: var(--border-strong); color: var(--text); font-weight: 600; }
.wa-gchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wa-gchip { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.wa-gchip b { color: var(--text); font-weight: 700; }
.wa-hit { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 7px; cursor: pointer; transition: border-color .15s, background .15s; }
.wa-hit:hover { border-color: var(--border-strong); background: var(--surface-2); }
.wa-hit-h { display: flex; align-items: baseline; gap: 7px; }
.wa-hit-h b { font-size: 13px; color: var(--text); }
.wa-hit-h .wa-hora { margin-left: auto; font-size: 11px; color: var(--faint); flex-shrink: 0; }
.wa-hit-feed { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; padding: 1px 5px; border-radius: 4px; background: var(--surface-2); color: var(--faint); }
.wa-hit-a { font-size: 11.5px; color: var(--muted); margin: 1px 0 4px; }
.wa-hit-t { font-size: 12.5px; line-height: 1.45; color: var(--muted); margin: 0; white-space: pre-wrap; word-break: break-word; }
.wa-hit-t mark { background: rgba(212,163,115,.28); color: var(--text); border-radius: 3px; padding: 0 1px; }
.wa-hit-more { font-size: 11.5px; color: var(--faint); text-align: center; padding: 6px 0 2px; }
/* ---- aba WhatsApp: busca + precisa de você + gerenciador de grupos ---- */
.wa-top { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; }
.wa-search { flex: 1; display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 0 11px; }
.wa-search svg { width: 15px; height: 15px; color: var(--faint); flex-shrink: 0; }
.wa-search input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font-size: 14px; padding: 10px 0; }
.wa-mgr-btn { display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 9px 12px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wa-mgr-btn svg { width: 15px; height: 15px; }
.wa-mgr-btn:hover { border-color: var(--border-strong); color: var(--text); }
.wa-needs { background: rgba(229,83,61,.07); border: 1px solid rgba(229,83,61,.2); border-radius: 13px; padding: 11px 12px; margin-bottom: 14px; }
.wa-needs-h { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--danger); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.wa-needs-n { background: var(--danger); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 17px; }
.wa-need { display: block; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid rgba(229,83,61,.12); padding: 8px 2px; cursor: pointer; }
.wa-need:first-of-type { border-top: 0; }
.wa-need-g { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.wa-need-h { font-weight: 400; color: var(--faint); font-size: 11px; }
.wa-need-items { display: flex; flex-direction: column; gap: 3px; }
.wa-need-items span { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.wa-need-items .urg { color: var(--text); }
/* gerenciador de grupos (bottom sheet) */
.wa-mgr-ov { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.wa-mgr-sheet { background: var(--bg); border: 1px solid var(--border-strong); border-radius: 18px 18px 0 0; width: 100%; max-width: 620px; max-height: 82vh; display: flex; flex-direction: column; padding-bottom: var(--safe-bottom); }
.wa-mgr-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.wa-mgr-h b { font-size: 16px; }
.wa-mgr-hint { padding: 0 16px 10px; font-size: 12.5px; color: var(--faint); }
.wa-mgr-list { overflow-y: auto; padding: 0 8px 12px; }
.wa-mgr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 10px; border-radius: 10px; cursor: pointer; }
.wa-mgr-row:hover { background: var(--surface); }
.wa-mgr-nome { font-size: 14px; color: var(--text); }
.wa-mgr-size { color: var(--faint); font-size: 12px; }
.wa-mgr-tog { width: 42px; height: 25px; appearance: none; -webkit-appearance: none; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 999px; position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.wa-mgr-tog::after { content: ''; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--faint); transition: transform .15s, background .15s; }
.wa-mgr-tog:checked { background: var(--cobre); border-color: var(--cobre); }
.wa-mgr-tog:checked::after { transform: translateX(17px); background: #fff; }
@media (min-width: 900px) { .wa-mgr-ov { align-items: center; } .wa-mgr-sheet { border-radius: 18px; max-height: 78vh; } }
/* sensor de conexão + folha do QR (porte do Max, 03/11/2026) */
.wa-conn { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 9px 11px; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; font-family: inherit; }
.wa-conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.wa-conn-on .wa-conn-dot { background: #3fb950; }
.wa-conn-mid .wa-conn-dot { background: #d29922; }
.wa-conn-off { color: var(--text); border-color: var(--border-strong); }
.wa-conn-off .wa-conn-dot { background: #f85149; }
.wa-conn-carregando { cursor: default; }
.wa-conn-btn { margin-left: 2px; font-size: 11px; color: var(--cobre-claro); }
.wa-qr-sheet { max-width: 380px; }
.wa-qr-body { padding: 4px 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.wa-qr-img { width: 100%; max-width: 260px; border-radius: 12px; border: 1px solid var(--border); background: #fff; padding: 8px; }
.wa-qr-code { font-size: 14px; color: var(--text); }
.wa-qr-code b { letter-spacing: .12em; }
.wa-qr-acts { display: flex; justify-content: center; padding: 4px 16px 16px; }
@media (max-width: 420px) { .wa-conn { padding: 9px 8px; } }

/* esqueleto (shimmer) — usado por hsSkel na aba WhatsApp */
.skel {
  display: inline-block; border-radius: 8px; min-height: 12px;
  background: linear-gradient(90deg, rgba(150,120,130,.14) 25%, rgba(150,120,130,.30) 50%, rgba(150,120,130,.14) 75%);
  background-size: 200% 100%; animation: skel 1.1s linear infinite;
}
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skelrows { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.skel.row { height: 40px; width: 100%; }
.skel.row.short { width: 62%; }

/* ===== Nova Vida: fila viva "Precisa de você" ===== */
.vida { padding-bottom: 24px; }
.vstatus { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 2px 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.vs-day { font-size: 13px; color: var(--muted); text-transform: capitalize; }
.vs-c { font-size: 12px; color: var(--cobre-claro); }
.vs-c b { color: var(--cobre); font-weight: 700; }
.vs-fatal { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #E0725A; max-width: 320px; }
.vs-fatal span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-fatal svg { width: 14px; height: 14px; flex-shrink: 0; }
.vs-rfr { margin-left: auto; background: none; border: none; color: var(--muted); cursor: pointer; display: flex; padding: 4px; }
.vs-rfr svg { width: 17px; height: 17px; }
.vgrid { display: grid; grid-template-columns: 1fr; gap: 16px; }
/* MOBILE: dissolve os contêineres de coluna pra poder reordenar os cards entre eles.
   Ordem pedida: briefing -> agenda -> notícias -> e-mail (e-mail por último). */
html:not(.desk) .vcol, html:not(.desk) .vrail { display: contents; }
/* descendente, NAO filho: com display:contents os cards viram itens de grade no
   layout, mas no DOM seguem dentro de .vcol/.vrail — ".vgrid > [...]" nao casaria */
html:not(.desk) .vgrid [data-vcard="agenda"] { order: 1; }  /* 08/08: agenda primeiro (pedido do Rodrigo) */
html:not(.desk) .vgrid [data-vcard="brief"]  { order: 2; }
html:not(.desk) .vgrid [data-vcard="news"]   { order: 3; }
html:not(.desk) .vgrid [data-vcard="mail"]   { order: 4; }
html:not(.desk) .vgrid [data-vcard="rotd"]   { order: 5; }  /* 09/08: rotinas logo depois do resumo de e-mail */
/* minimizar: esconde tudo do card menos o cabeçalho */
/* joga o chevron pra direita; se ja' houver um elemento alinhado a direita
   (botao de atualizar ou "atualizando…"), so encosta nele */
.card .k .vmin { margin-left: auto; }
.card .k .editbtn + .vmin, .card .k .livedot + .vmin { margin-left: 4px; }
.vmin { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--faint); cursor: pointer; border-radius: 6px; flex-shrink: 0; transition: color .15s, transform .18s; }
.vmin:hover { color: var(--text); background: var(--surface-2); }
.vmin svg { width: 15px; height: 15px; }
.card.min > *:not(.k) { display: none; }
.card.min .vmin svg { transform: rotate(-90deg); }
.card.min { padding-bottom: 10px; }
.card.min .k { margin-bottom: 0; }
/* o botão de atualizar do card não some quando minimizado, mas o "atualizando…" sim */
.card.min .livedot { display: none; }
.desk .vgrid { grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); align-items: start; }
.desk .vrail { position: sticky; top: 8px; }
.vqueue { display: flex; flex-direction: column; gap: 10px; }
.vq-anchor { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin: 8px 0 2px; }
.vq-anchor:first-child { margin-top: 0; }
.vcard { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: 11px; padding: 11px 13px; }
.vcard.live { border-left-color: #4E9A6B; }
.vcard.infer { border-left-color: #D9A227; }
.vc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.vc-seal { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 2px 8px; border-radius: 6px; }
.vc-seal svg { width: 13px; height: 13px; }
.vc-seal.live { background: #14261c; color: #8FD3AC; }
.vc-seal.infer { background: #322810; color: #EDC766; }
.vc-area { margin-left: auto; font-size: 10.5px; padding: 2px 7px; border-radius: 5px; background: var(--surface-2); color: var(--muted); text-transform: capitalize; }
.vc-area.a-mex { color: var(--verdete); }
.vc-area.a-enggenai { color: var(--cobre-claro); }
.vc-body { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text); font-size: 14px; line-height: 1.35; cursor: pointer; padding: 0; }
.vc-ctx { font-size: 12px; color: var(--muted); margin-top: 4px; }
.vc-acts { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.vc-act { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: none; color: var(--muted); cursor: pointer; }
.vc-act svg { width: 13px; height: 13px; }
.vc-act.ok { background: #2f6b4f; border-color: #2f6b4f; color: #d6f0e2; }
.vc-act.dim { color: var(--faint); }
.vc-act:active { transform: scale(.97); }
.vq-more, .vq-week { align-self: flex-start; background: none; border: none; color: var(--cobre-claro); font-size: 12.5px; cursor: pointer; padding: 6px 2px; }
.vq-week { margin-top: 4px; }
.vzero { text-align: center; padding: 40px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vzero svg { width: 34px; height: 34px; color: var(--verdete); }
.vzero b { color: var(--text); font-size: 16px; }
.vzero span { font-size: 13px; }
.vc-sk { height: 74px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); opacity: .5; animation: vcsk 1.3s ease-in-out infinite; }
.vc-sk:nth-child(2) { animation-delay: .15s; } .vc-sk:nth-child(3) { animation-delay: .3s; }
@keyframes vcsk { 0%,100% { opacity: .35; } 50% { opacity: .6; } }

/* Vida simples: coluna do briefing/newsletter + frescura */
.vcol { display: flex; flex-direction: column; gap: 12px; }
.bf-fresh { font-size: 11px; color: var(--faint); margin-top: 9px; }
.card.briefing .livedot { font-size: 10.5px; color: var(--cobre-claro); margin-left: auto; font-weight: 500; text-transform: none; letter-spacing: 0; }
.card.briefing .editbtn { margin-left: auto; }

/* WhatsApp desktop: busca full-width em cima, resumos à esquerda, "Precisa de você" à direita — sem buraco */
.maincol .view > .dash.wa-tab > .wa-top { grid-column: 1 / -1; }
.maincol .view > .dash.wa-tab > .wapanel { grid-column: 1; grid-row: 2; min-width: 0; }
.maincol .view > .dash.wa-tab > .wa-needs { grid-column: 2; grid-row: 2; align-self: start; }

/* A aba WhatsApp e nossa: no desktop ela e coluna unica centrada. Esta regra tem especificidade maior que o grid da Vida (.maincol .view > .dash) e tambem neutraliza as 3 regras de grid-column do Mateus logo acima — que ficam guardadas caso um dia se queira voltar ao layout de 2 colunas. */
/* desktop: a regra de grid da Vida (.maincol .view > .dash) capturava a aba WhatsApp e jogava o painel
   na coluna lateral de 400px — a aba wa é coluna única, centrada */
@media (min-width: 900px) {
  .maincol .view > .dash.wa-tab { display: block; max-width: 760px; margin: 0 auto; }
}

/* botao PARAR (aparece no lugar do enviar enquanto o Ro responde) */
.roundbtn.stop { background: var(--danger, #E07A5F); color: #fff; border: none; }
.roundbtn.stop svg { width: 14px; height: 14px; }
.roundbtn.stop:hover { filter: brightness(1.08); }

/* ---- Resumo de e-mail (3 contas) — card da aba Vida ---- */
.mailr-quando { font-size: 11px; color: var(--faint); margin-left: 6px; font-weight: 400; }
.mailr-falha { font-size: 11.5px; line-height: 1.35; color: var(--danger); background: rgba(224,122,95,.10); border: 1px solid rgba(224,122,95,.28); border-radius: 8px; padding: 6px 9px; margin-top: 8px; }
.mailr-item { display: block; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: 10px; padding: 9px 11px; margin-top: 8px; cursor: pointer; transition: border-color .15s; }
.mailr-item:hover { border-color: var(--border-strong); }
.mailr-item.alta { border-left-color: var(--danger); }
.mailr-item.baixa { opacity: .78; }
.mailr-top { display: flex; align-items: baseline; gap: 8px; }
.mailr-top b { font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailr-conta { margin-left: auto; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; background: var(--surface); color: var(--faint); white-space: nowrap; }
.mailr-sub { font-size: 12.5px; line-height: 1.4; color: var(--muted); margin-top: 3px; }
.mailr-acao { font-size: 12px; line-height: 1.35; color: var(--text); margin-top: 5px; }
.mailr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mailr-cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.mailr-urg { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(224,122,95,.16); color: var(--danger); }
.mailr-rodape { font-size: 11.5px; color: var(--faint); margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.mailr-rodape span { color: var(--faint); opacity: .8; }

/* piso de altura da barra de abas — tela baixa nao pode engolir a navegacao */
.tabs { min-height: 52px; }

/* GRAFICO SEMANAL DA MARCA (aba LinkedIn) — pedido do Rodrigo 05/08/2026 */
.lkchart-wrap { margin-top: 2px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.lkchart { width: 100%; height: auto; display: block; }
.lkchart-ph { padding: 22px 12px; text-align: center; color: var(--faint); font-size: 13px; }
.lkchart-cap { margin-top: 8px; font-size: 11.5px; color: var(--faint); line-height: 1.35; }

/* ---- Vida > Resumo do dia: quadros por projeto ---- */
.pn { padding: 0 14px 18px; }
.pn-tira { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.pn-tira::-webkit-scrollbar { display: none; }
.pn-dia { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 52px; padding: 7px 8px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); line-height: 1.1; }
.pn-dia b { font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.pn-dia .pn-sem, .pn-dia .pn-mes { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.pn-dia.on { background: var(--cobre-escuro); border-color: var(--cobre); }
.pn-dia.on b, .pn-dia.on .pn-sem, .pn-dia.on .pn-mes { color: #F7E6D5; }
.pn-corpo { display: flex; flex-direction: column; gap: 10px; }
.pn-card .k { margin-bottom: 8px; }

.pn-tab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pn-tab th { text-align: right; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--faint); font-weight: 600; padding: 0 0 6px; }
.pn-tab th:first-child { text-align: left; }
.pn-tab td { padding: 5px 0; border-top: 1px solid var(--border); color: var(--text);
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pn-tab td:first-child { text-align: left; color: var(--muted); white-space: normal; padding-right: 10px; }
.pn-tab tr.pn-sec td { text-align: left; border-top: none; padding: 10px 0 2px; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.pn-vazio { color: var(--faint); opacity: .55; }
.pn-sim { color: var(--verdete); font-weight: 600; }
.pn-nao { color: var(--faint); }
.pn-delta { font-size: 10.5px; margin-left: 5px; }
.pn-delta.up { color: var(--verdete); }
.pn-delta.down { color: var(--danger); }

.pn-estado { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.pn-estado.ok { background: rgba(90,165,147,.16); color: var(--verdete); }
.pn-estado.ruim { background: rgba(224,122,95,.16); color: var(--danger); }
.pn-estado.neutro { background: var(--surface); color: var(--muted); }
.pn-lista { list-style: none; margin: 8px 0 0; padding: 0; }
.pn-lista li { font-size: 12.5px; line-height: 1.45; color: var(--muted); padding: 4px 0 4px 12px;
  position: relative; border-top: 1px solid var(--border); }
.pn-lista li:first-child { border-top: none; }
.pn-lista li::before { content: '•'; position: absolute; left: 0; color: var(--faint); }
.pn-lista b { color: var(--text); }
.pn-sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-top: 12px; }
.pn-cobrar { margin-top: 8px; font-size: 11.5px; font-weight: 600; color: var(--danger); }
.pn-big { font-size: 30px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.pn-big span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.pn-atencao { border-left: 3px solid var(--danger); }

/* o seletor da Vida agora tem 3 botoes — no celular o texto nao pode estourar */
.segmented .seg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- agenda da SEMANA (08/08): cabecalho do dia e' botao; dia fechado mostra resumo ---- */
.agday-h { width: 100%; background: none; border: 0; cursor: pointer; color: inherit; font: inherit; text-align: left; padding: 7px 0; align-items: center; }
.agday-h .agsum { margin-left: auto; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.agday-h .agsum.livre { opacity: .5; }
.agday-h .agchev { font-size: 11px; color: var(--faint); margin-left: 7px; flex-shrink: 0; }
.agday { margin-bottom: 2px; border-bottom: 1px solid rgba(128,128,128,.12); }
.agday:last-child { border-bottom: 0; }
.agday.open { margin-bottom: 8px; }
.agday.vazio .agday-h b, .agday.vazio .agday-h span:not(.agsum) { opacity: .55; }
.ag-livre { font-size: 12px; color: var(--faint); padding: 0 0 8px 2px; }

/* ---------- aba QG / Escritório (24/08/2026) ---------- */
.qg-wrap { padding: 12px; max-width: 980px; margin: 0 auto; }
.qg-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.qg-head .qg-sub { font-size: 12px; color: var(--faint); }
.qg-canvas-wrap { border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.18); }
.qg-canvas-wrap canvas { width: 100%; display: block; }
.qg-legenda { display: flex; gap: 14px; font-size: 11px; color: var(--faint); margin: 8px 2px 12px; }
.qg-legenda i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.qg-lista { display: flex; flex-direction: column; gap: 8px; }
.qg-linha { background: rgba(255,255,255,.035); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.qg-linha .qg-hora { color: var(--faint); font-size: 11px; }
.qg-det { font-size: 12px; color: var(--faint); margin-top: 2px; }
.qg-dica { font-size: 12px; color: var(--faint); padding: 8px 2px; }

/* QG: sub-telas, cérebro e memórias (24/08/2026) */
.qg-seg { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.qg-segb { background: rgba(255,255,255,.05); border: 1px solid rgba(128,128,128,.2); color: inherit; border-radius: 9px; padding: 6px 13px; font-size: 12px; cursor: pointer; }
.qg-segb.on { background: rgba(193,122,65,.25); border-color: rgba(193,122,65,.6); }
.qg-b { background: rgba(255,255,255,.06); border: 1px solid rgba(128,128,128,.25); color: inherit; border-radius: 8px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.qg-b.on { background: rgba(90,165,147,.3); border-color: rgba(90,165,147,.6); }
.qg-busca { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.05); border: 1px solid rgba(128,128,128,.25); color: inherit; border-radius: 10px; padding: 9px 12px; font-size: 14px; margin-bottom: 8px; }
.qg-grafo { border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.18); min-height: 420px; }
.qg-res { display: block; width: 100%; text-align: left; background: rgba(255,255,255,.035); border: 0; color: inherit; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; font: inherit; }
.qg-res:active { background: rgba(255,255,255,.08); }
.qg-l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.qg-nome { font-weight: 600; font-size: 13px; }
.qg-emp { font-size: 11px; color: var(--faint); white-space: nowrap; }
.qg-trecho { font-size: 12px; color: var(--faint); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.qg-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 14px; }
.qg-nota { background: var(--bg, #1d1712); border: 1px solid rgba(128,128,128,.25); border-radius: 14px; max-width: 760px; width: 100%; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.qg-nota-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid rgba(128,128,128,.18); }
.qg-nota-h span { display: flex; gap: 6px; }
.qg-nota-md { padding: 13px 16px; overflow: auto; font-size: 13.5px; line-height: 1.55; }
.qg-nota-md h2, .qg-nota-md h3, .qg-nota-md h4 { margin: 10px 0 4px; }
.qg-nota-md a { color: #7FB4D9; }
.qg-nota-md code { background: rgba(255,255,255,.08); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.qg-fm { color: var(--faint); font-size: 11px; margin-bottom: 8px; }
.qg-fm pre { white-space: pre-wrap; }
.qg-ed-ta { width: 100%; box-sizing: border-box; min-height: 52vh; background: rgba(0,0,0,.25); color: inherit; border: 1px solid rgba(128,128,128,.25); border-radius: 10px; padding: 10px; font: 12.5px/1.5 ui-monospace, monospace; }
.qg-ed-bar { display: flex; gap: 8px; align-items: center; margin-top: 8px; }

/* relógio de Vancouver no cabeçalho (24/08/2026) */
.hdr-clock { font-size: 11px; color: var(--faint); margin-left: 7px; font-variant-numeric: tabular-nums; }

/* ---- cadastro da pessoa: primeira abertura do app (02/09/2026, perfil.js) ---- */
#cadastro{position:fixed;inset:0;z-index:9000;overflow-y:auto;padding:26px 16px calc(30px + env(safe-area-inset-bottom));
  background:radial-gradient(760px 460px at 50% 4%, rgba(45,212,191,.12), transparent 62%), #0a0d0a}
.cad-cartao{width:100%;max-width:430px;margin:0 auto;text-align:center;background:#141a16;
  border:1px solid #26302a;border-radius:22px;padding:24px 20px;box-shadow:0 10px 30px rgba(0,0,0,.4)}
.cad-mascote{width:120px;height:120px;object-fit:contain;display:block;margin:-4px auto 4px}
.cad-cartao h1{font-size:21px;font-weight:750;margin:0 0 6px;color:#e9eef4}
.cad-cartao h1 b{color:#2dd4bf}
.cad-sub{color:#8e9cad;font-size:13.5px;line-height:1.55;margin:0 0 18px}
.cad-campo{display:block;text-align:left;font-size:12px;font-weight:650;color:#8e9cad;margin-top:12px}
.cad-campo input,.cad-campo select{width:100%;margin-top:6px;background:#0c1117;border:1px solid #26302a;
  color:#e9eef4;border-radius:11px;padding:11px 12px;font:inherit;font-size:16px}
.cad-campo input:focus,.cad-campo select:focus{outline:2px solid #2dd4bf;outline-offset:-1px}
.cad-dupla{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.cad-dica{color:#6b7a8a;font-size:11.5px;line-height:1.5;text-align:left;margin:8px 0 0}
.cad-dica b{color:#8e9cad}
.cad-erro{color:#f87171;min-height:20px;font-size:13px;margin:10px 0 0}
.cad-salvar{width:100%;margin-top:14px;padding:15px;border:0;border-radius:14px;font-size:15.5px;font-weight:700;
  background:linear-gradient(180deg,#3ee2cd,#2dd4bf);color:#032c26;cursor:pointer}
.cad-salvar:disabled{opacity:.6}
@media (max-width:360px){ .cad-dupla{grid-template-columns:1fr} }


/* CONTEXTO PESADO + CONSUMO POR AGENTE (10/09/2026) */
.ctx-aviso { align-self: stretch; margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: rgba(193,122,65,.12); border: 1px solid rgba(193,122,65,.45); font-size: 13px; line-height: 1.5; }
.ctx-aviso .chip { margin-top: 6px; }
/* 22/09/2026: ele dispensou o aviso ("agora não") — o texto encolhe, mas o BOTÃO continua na tela */
.ctx-aviso.mini { padding: 6px 10px; font-size: 12px; opacity: .8; }
.ctx-aviso.mini .chip { margin-top: 0; }
.chip.ghost { background: transparent; opacity: .7; }
.di-ctx { font-size: 10px; margin-left: 6px; padding: 0 5px; border-radius: 8px; background: rgba(127,127,127,.18); color: var(--faint); }
.di-ctx.hot { background: rgba(193,122,65,.25); color: var(--cobre-claro); }
.uso-ag { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.uso-ag-t, .uso-ag-obs { font-size: 11.5px; color: var(--faint); margin-bottom: 6px; }
.uso-ag-l { display: grid; grid-template-columns: 1fr 90px 74px; gap: 8px; align-items: center; font-size: 12px; margin: 3px 0; }
.uso-ag-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uso-ag-b { height: 6px; background: rgba(127,127,127,.15); border-radius: 3px; overflow: hidden; }
.uso-ag-b i { display: block; height: 100%; background: var(--cobre); }
.uso-ag-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Reunião / Aula (10/09/2026) — reuniao.js */
.reu-novo { background: rgba(255,255,255,.035); border-radius: 12px; padding: 12px; }
.reu-tipos { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.reu-tipos .chip.on { background: rgba(90,165,147,.18); border-color: #5AA593; color: #5AA593; }
.reu-titulo { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(128,128,128,.3); background: rgba(0,0,0,.18); color: inherit; font: inherit; font-size: 15px; margin-bottom: 10px; }
.reu-rec { display: block; width: 100%; padding: 16px; border: 0; border-radius: 14px; font: inherit; font-size: 17px; font-weight: 700; color: #fff; background: linear-gradient(180deg, #e0574f, #c0392b); box-shadow: 0 8px 22px rgba(192,57,43,.3); cursor: pointer; margin: 4px 0 8px; }
.reu-rec.parar { background: linear-gradient(180deg, #3b4753, #26303a); box-shadow: none; }
.reu-ao-vivo { text-align: center; padding: 22px 12px 16px; border-radius: 14px; margin-bottom: 12px; background: rgba(224,87,79,.08); border: 1px solid rgba(224,87,79,.35); }
.reu-ao-vivo.parando { background: rgba(255,255,255,.035); border-color: rgba(128,128,128,.25); }
.reu-relogio { font-size: 46px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums; line-height: 1; }
.reu-ao-vivo:not(.parando) .reu-relogio::before { content: '●'; color: #e0574f; font-size: 18px; vertical-align: middle; margin-right: 10px; animation: reu-pisca 1.2s infinite; }
@keyframes reu-pisca { 50% { opacity: .15; } }
.reu-sub { margin-top: 8px; font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.reu-ultimo { margin-top: 10px; font-size: 12.5px; color: var(--faint); font-style: italic; text-align: left; }
.reu-erro { margin: 8px 0; padding: 8px 10px; border-radius: 10px; font-size: 12.5px; background: rgba(227,163,104,.12); border: 1px solid rgba(227,163,104,.4); }
.reu-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.reu-acoes a.chip { text-decoration: none; }
.reu-ata h4 { margin: 14px 0 6px; font-size: 14px; }
.reu-ata p, .reu-ata li { font-size: 14px; line-height: 1.5; }
.reu-ata ul { padding-left: 18px; margin: 4px 0; }
.reu-tab { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 10px; }
.reu-tab th, .reu-tab td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(128,128,128,.25); vertical-align: top; }
.reu-tab th { color: var(--faint); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.reu-trans { margin-top: 14px; font-size: 13px; color: var(--faint); line-height: 1.5; }

/* ---------- QG > Gastos (10/09/2026) ---------- */
/* 1 serie, cor cobre (validada nos dois temas), barras finas com topo arredondado e gap de 2px */
.gs-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.gs-tile { background: rgba(255,255,255,.035); border: 1px solid var(--border); border-radius: 12px; padding: 10px 11px; }
html.light .gs-tile { background: var(--surface); }
.gs-rot { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-val { font-size: 19px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; margin: 3px 0 1px; letter-spacing: -.3px; }
.gs-tile .gs-sub { font-size: 11px; color: var(--faint); }
.gs-card { background: rgba(255,255,255,.035); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; margin-bottom: 10px; }
html.light .gs-card { background: var(--surface); }
.gs-chead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.gs-ctit { font-size: 12px; font-weight: 600; color: var(--text); }
.gs-cdia { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.gs-plot { position: relative; height: 92px; }
.gs-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.gs-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; background: none; border: 0; padding: 0; cursor: pointer; min-width: 0; }
.gs-bar i { display: block; width: 100%; background: var(--cobre); border-radius: 4px 4px 0 0; opacity: .78; transition: opacity .15s; }
.gs-bar:hover i, .gs-bar.on i { opacity: 1; }
.gs-bar.on i { outline: 2px solid var(--cobre-claro); outline-offset: 1px; border-radius: 4px 4px 0 0; }
.gs-bar.pico i { background: var(--cobre-claro); }
.gs-media { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(128,128,128,.45); pointer-events: none; }
.gs-media span { position: absolute; right: 0; top: -13px; font-size: 10px; color: var(--faint); background: var(--surface); padding: 0 3px; }
.gs-eixo { display: flex; justify-content: space-between; gap: 6px; font-size: 10.5px; color: var(--faint); margin-top: 6px; font-variant-numeric: tabular-nums; }
.gs-l { display: grid; grid-template-columns: 1fr 78px 84px; gap: 8px; align-items: center; margin: 7px 0; }
.gs-n { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-n em { display: block; font-style: normal; font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; }
.gs-b { height: 7px; background: rgba(128,128,128,.16); border-radius: 4px; overflow: hidden; }
.gs-b i { display: block; height: 100%; background: var(--cobre); border-radius: 4px; }
.gs-v { text-align: right; font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.gs-v em { display: block; font-style: normal; font-size: 10.5px; color: var(--faint); }
@media (max-width: 380px) { .gs-tiles { grid-template-columns: 1fr 1fr; } .gs-tiles .gs-tile:last-child { grid-column: 1 / -1; } }
.gs-eixo-m { text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-outros .gs-n { color: var(--muted); }

/* cabecalho do menu = atalho para os Gastos (10/09/2026) */
.dt-eu { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit; padding: 4px 6px 4px 0; margin: -4px 0; border-radius: 10px; text-align: left; font: inherit; cursor: pointer; }
.dt-eu:active { background: var(--surface-2); }
.dt-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dt-txt b { flex: none; font-size: 16px; line-height: 1.15; }
.dt-gasto { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* custo relativo no menu de modelos (12/09/2026): ele escolhe sabendo o que custa */
.pm-custo{font-size:11px;color:var(--faint);margin-left:6px;font-variant-numeric:tabular-nums}
.pm.on .pm-custo{color:inherit;opacity:.7}

/* QG > Gastos — medidores do PLANO no topo da tela (13/09/2026).
   Mesma familia visual das barras .uso-* do painel lateral, so' que maiores: e' a primeira
   coisa que ele ve' na tela. A cor e' status (verdete -> cobre -> vermelho) e o % esta'
   sempre escrito ao lado, para nao depender de enxergar a cor. */
.gs-plano { border-color: rgba(200,138,86,.35); }
.gs-mrow + .gs-mrow { margin-top: 13px; }
.gs-mtop { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gs-mrot { font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-mpct { font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.gs-mpct.atencao { color: var(--cobre-claro); }
.gs-mpct.perigo { color: var(--danger); }
.gs-mtrilho { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.gs-mcheio { display: block; height: 100%; background: var(--verdete); border-radius: 999px; transition: width .35s ease; }
.gs-mcheio.atencao { background: var(--cobre-claro); }
.gs-mcheio.perigo { background: var(--danger); }
.gs-msub { font-size: 11px; color: var(--faint); margin-top: 5px; }
/* QG > Gastos — SEMÁFORO "para onde o token foi" (21/09/2026, pedido dele).
   Sinal de trânsito: vermelho = releitura (gasto à toa), amarelo = preparo do contexto,
   verde = construção (saída). O % é sempre escrito, para não depender de enxergar a cor. */
.gs-semcard .gs-tiles { margin-bottom: 0; }
.gs-sem { border-width: 1px; }
.gs-semval { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.4px; margin: 4px 0 0; }
.gs-sem .gs-semtk { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 2px; letter-spacing: 0; }
.gs-sem .gs-sub { line-height: 1.3; }
.gs-sem.ruim { border-color: rgba(224,122,95,.42); }
.gs-sem.ruim .gs-semval, .gs-sem.ruim .gs-rot { color: var(--danger); }
.gs-sem.medio { border-color: rgba(227,163,104,.42); }
.gs-sem.medio .gs-semval, .gs-sem.medio .gs-rot { color: var(--cobre-claro); }
.gs-sem.bom { border-color: rgba(90,165,147,.45); }
.gs-sem.bom .gs-semval, .gs-sem.bom .gs-rot { color: var(--verdete); }
.gs-onde { font-size: 11px; color: var(--faint); border-top: 1px solid var(--border); margin-top: 12px; padding-top: 8px; }
.gs-onde b { color: var(--muted); font-variant-numeric: tabular-nums; }
.gs-toggle { font-size: 10.5px; color: var(--muted); background: none; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; cursor: pointer; white-space: nowrap; }
.gs-toggle:hover { color: var(--text); border-color: var(--cobre); }
/* 14/09/2026: botoes de resposta rapida no fim da ultima resposta */
.msg-opcoes { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; }
.msg-opcoes .chip { min-height: 38px; }
/* QG > Gastos — por APLICATIVO e aviso de GASTO IRREGULAR (18/09/2026).
   Aviso usa a mesma cor de "atenção" dos medidores (cobre claro) na borda: é alerta, não erro. */
.gs-irreg { border-left: 3px solid var(--cobre-claro); }
.gs-irr { font-size: 12.5px; color: var(--text); line-height: 1.45; margin: 8px 0; overflow-wrap: anywhere; }
.gs-irr-j { display: inline-block; font-size: 10px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; margin-right: 6px; vertical-align: 1px; white-space: nowrap; }
.gs-sem .gs-n { color: var(--danger); }
.gs-apps .gs-n { white-space: normal; overflow-wrap: break-word; } /* nome do app quebra linha no celular em vez de virar reticências */
/* 18/09 (revisão): o <em> herdava o white-space: normal e "outros 30 aplicativos" virava ~40 linhas — o sub é UMA linha com reticências */
.gs-apps .gs-n em { white-space: nowrap; }
.gs-apps .gs-aux .gs-n em { white-space: normal; } /* função auxiliar: os até 3 projetos de onde veio o gasto cabem em 2-3 linhas (no celular não há title) */
.gs-onde b.gs-sem-tot { color: var(--danger); }   /* total "sem atribuição" no rodapé: vermelho como a linha */
.gs-cdia.gs-velho { color: var(--cobre-claro); }  /* medição velha se destaca no cabeçalho */
.gs-card .linkbtn { color: var(--cobre-claro); text-decoration: underline; }
.gs-card .linkbtn:disabled { color: var(--faint); text-decoration: none; cursor: default; }
/* aviso de gasto irregular em 2 linhas + sugestão (a frase inteira fica no title) */
.gs-irr-t { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.gs-irr-t b { font-weight: 600; min-width: 0; }
.gs-irr-t .gs-irr-j { margin-right: 0; flex: none; }
.gs-irr-n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gs-irr-s { font-size: 11.5px; color: var(--cobre-claro); margin-top: 2px; }

/* 18/09/2026 (2ª rodada): QG › Gastos — "Meus agentes" (notebook + app + servidor) e "Meus apps" (ícone — nome — consumo).
   As 3 origens têm cor fixa E vêm escritas na sub-linha: quem não distingue a cor lê o mesmo número. */
.gs-o-notebook { background: var(--verdete) !important; }
.gs-o-app { background: var(--cobre) !important; }
.gs-o-servidor { background: var(--muted) !important; }
.gs-leg { font-size: 10.5px; font-weight: 400; color: var(--faint); margin-left: 4px; white-space: nowrap; }
.gs-leg i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin: 0 3px 0 8px; vertical-align: -0.5px; }
.gs-leg-l { display: block; margin: -3px 0 8px; white-space: normal; }
.gs-leg-l i:first-child { margin-left: 0; }
.gs-bar2 > span { display: flex; flex-direction: column; width: 100%; border-radius: 4px 4px 0 0; overflow: hidden; opacity: .8; transition: opacity .15s; }
.gs-bar2 > span i { border-radius: 0; opacity: 1; flex: none; outline: 0 !important; }
.gs-bar2:hover > span, .gs-bar2.on > span { opacity: 1; }
.gs-bar2.on > span { outline: 2px solid var(--cobre-claro); outline-offset: 1px; }
button.gs-ag { width: 100%; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.gs-ag .gs-v { text-align: right; }
.gs-ag.on .gs-n { color: var(--cobre-claro); }
.gs-ag.gs-sem.on .gs-n { color: var(--danger); }
.gs-agentes .gs-n { white-space: normal; overflow-wrap: break-word; }
.gs-agentes .gs-n em { white-space: normal; }
.gs-b3 > span { display: flex; height: 100%; border-radius: 4px; overflow: hidden; gap: 1px; }
.gs-b3 > span i { border-radius: 0; min-width: 1px; }
.gs-det { margin: -2px 0 10px; padding: 7px 9px; border-left: 2px solid var(--border-strong); background: rgba(128,128,128,.07); border-radius: 0 8px 8px 0; }
.gs-det-l { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted); margin: 3px 0; }
.gs-det-l span { min-width: 0; overflow-wrap: anywhere; }
.gs-det-l i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; }
.gs-det-l b { font-weight: 500; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gs-det-m { font-size: 10.5px; color: var(--faint); margin-top: 5px; }
.gs-p { display: grid; grid-template-columns: 40px 1fr auto; column-gap: 10px; row-gap: 4px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.gs-chead + .gs-p { border-top: 0; padding-top: 2px; }
.gs-ico { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--surface-2); display: block; border: 1px solid var(--border-strong); } /* contorno: ícone de fundo branco sumia no tema claro, e o de fundo escuro no tema escuro */
.gs-p .gs-n { font-size: 13.5px; font-weight: 600; white-space: normal; }
.gs-p .gs-n em { font-weight: 400; white-space: normal; }
.gs-puso { grid-column: 2 / -1; font-size: 11.5px; color: var(--muted); }
.gs-puso b { color: var(--text); font-variant-numeric: tabular-nums; }
.gs-pdesde { color: var(--faint); font-size: 10.5px; white-space: nowrap; }
.gs-puso b.gs-atraso { color: var(--danger); font-weight: 600; white-space: nowrap; } /* app medido em outra máquina parou de mandar: o "hoje" desta linha é velho */
.gs-v em.gs-fora { white-space: nowrap; }                                            /* "fora do total": gasto medido na máquina do app, não soma aqui */
.gs-spark { grid-column: 2 / -1; display: flex; align-items: flex-end; gap: 2px; height: 22px; }
.gs-spark i { flex: 1; background: var(--verdete); border-radius: 2px 2px 0 0; opacity: .85; }
.gs-spark i.z { background: rgba(128,128,128,.25); }
.gs-puso b.gs-falhou { color: var(--danger); font-weight: 600; } /* a busca no outro servidor falhou e nunca chegou dado: não é "ainda não ligado" */

/* ---------- QG / Cérebro dos agentes (19/09/2026) — tudo .cb-*; cor só por variável (tema claro/escuro sem JS) ---------- */
.cb-frase { font-size: 15px; font-weight: 650; margin: 2px 2px 1px; }
.cb-subfrase { font-size: 12px; color: var(--muted); margin: 0 2px 8px; }
.cb-subfrase + .cb-subfrase { margin-top: -6px; }
.cb-velho { font-size: 12px; color: var(--danger); border: 1px solid var(--danger); border-radius: 10px; padding: 7px 10px; margin: 0 0 8px; }
.cb-svg { width: 100%; max-width: 520px; height: auto; display: block; margin: 0 auto; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.cb-svg text { pointer-events: none; }
.cb-massa { fill: var(--cb-massa); stroke: var(--cb-contorno); stroke-width: 1.2; stroke-linejoin: round; }
.cb-sulco { fill: none; stroke: var(--cb-contorno); stroke-width: 1.2; stroke-linecap: round; }
.cb-apagado { opacity: .55; }
.cb-area { font-size: 10px; letter-spacing: .14em; font-weight: 700; fill: var(--muted); text-anchor: middle; }
.cb-ag { cursor: pointer; outline: none; }
.cb-ag:focus-visible circle:not(.cb-halo):not(.cb-selo):not(.cb-sono) { stroke: var(--text); stroke-width: 2; }
.cb-rot { cursor: pointer; }
.cb-rot rect { fill: var(--cb-massa); opacity: .9; }
.cb-lbl { font-size: 10.5px; text-anchor: middle; fill: var(--muted); }
.cb-lbl.h { fill: var(--text); font-weight: 650; }
.cb-lbl.m { fill: var(--text); }
.cb-num { font-size: 12px; font-weight: 700; text-anchor: middle; dominant-baseline: central; fill: var(--muted); }
.cb-num.s { fill: var(--text); }
.cb-tronco-t { font-size: 16px; font-weight: 800; text-anchor: middle; dominant-baseline: central; fill: var(--cb-ro-txt); }
.cb-selo { fill: var(--danger); stroke: var(--cb-massa); stroke-width: 2; }
.cb-selo-t { font-size: 10px; font-weight: 800; text-anchor: middle; dominant-baseline: central; fill: var(--cb-selo-txt); }
.cb-sono { fill: var(--faint); opacity: .55; }
.cb-fibra { fill: none; stroke: var(--cb-fibra); stroke-linecap: round; stroke-linejoin: round; }
.cb-fibra.on { stroke: var(--cb-ro); }
.cb-fibra-viva { fill: none; stroke: var(--cb-ponto); stroke-linecap: round; stroke-dasharray: .1 26; animation: cbCorre 1.6s linear infinite; }
.cb-arco { fill: none; stroke: var(--cb-ro); stroke-width: 2; stroke-dasharray: 2.5 4.5; stroke-linecap: round; }
.cb-halo { transform-box: fill-box; transform-origin: center; }
.cb-vivo .cb-halo { animation: cbPulsa 1.6s ease-in-out infinite; }
@keyframes cbPulsa { 0%, 100% { opacity: .22; transform: scale(1); } 50% { opacity: .5; transform: scale(1.2); } }
@keyframes cbCorre { to { stroke-dashoffset: -52.2; } }
.cb-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; line-height: 1.45; color: var(--muted); margin: 8px 2px 0; }
.cb-leg.cb-leg-topo { margin: 0 2px 6px; }
.cb-leg + .cb-leg { margin-top: 5px; }
.cb-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; box-sizing: border-box; }
.cb-leg i.h { background: var(--muted); }
.cb-leg i.s { background: var(--muted); opacity: .45; }
.cb-leg i.p { border: 1.5px solid var(--muted); }
.cb-leg i.r { background: var(--danger); }
.cb-leg i.v { box-shadow: 0 0 0 3px var(--border-strong); }
.cb-am { width: 24px; height: 8px; margin-right: 5px; vertical-align: 0; overflow: visible; }
.cb-am .cb-fibra-viva { animation: none; }
.cb-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px 4px; margin-top: 14px; }
.cb-card > b { font-size: 13px; }
.cb-li { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; font-size: 13.5px; padding: 9px 0; border-top: 1px solid var(--border); }
.cb-card > b + .cb-li, .cb-t + .cb-li, .cb-folha-topo + .cb-li { border-top: 0; }
.cb-li > div { min-width: 0; }
.cb-li > span { color: var(--muted); font-size: 12.5px; text-align: right; flex-shrink: 0; max-width: 74%; }
.cb-li small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.cb-li.toca { min-height: 44px; cursor: pointer; }
.cb-li.toca:active, .cb-as.toca:active { opacity: .6; }
.cb-pe { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; font-size: 11.5px; color: var(--muted); margin: 14px 2px 18px; }
.cb-tec, .cb-volta { color: var(--cb-link); font-size: 12px; text-decoration: underline; min-height: 44px; padding: 0; text-align: left; }
.cb-volta { align-self: flex-start; margin-top: -8px; }
.cb-vazio { padding: 8px 30px 24px; }
.cb-folha-bg { position: fixed; inset: 0; z-index: 59; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
.cb-folha { background: var(--surface); width: 100%; max-width: 620px; max-height: 82vh; overflow-y: auto; overscroll-behavior: contain; border-radius: 18px 18px 0 0; border-top: 1px solid var(--border-strong); padding: 0 16px calc(20px + var(--safe-bottom)); animation: cbSobe .18s ease-out; }
@keyframes cbSobe { from { transform: translateY(28px); opacity: 0; } }
.cb-folha-topo { position: sticky; top: 0; z-index: 1; background: var(--surface); display: flex; align-items: center; gap: 10px; padding: 12px 0 8px; }
.cb-pt { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.cb-pt.p { display: inline-block; width: 9px; height: 9px; margin-right: 8px; opacity: .8; }
.cb-quem { flex: 1; min-width: 0; }
.cb-nome { font-size: 18px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.cb-area-t { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.cb-fechar { flex: none; min-height: 44px; min-width: 72px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 14px; }
.cb-quando { font-size: 14px; margin: 4px 0 2px; }
.cb-agora { font-size: 12.5px; color: var(--verdete); margin-top: 2px; }
.cb-agora i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--verdete); margin-right: 6px; }
.cb-t { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin: 16px 0 2px; }
.cb-nada { font-size: 12.5px; color: var(--muted); padding: 5px 0; }
.cb-deve { font-size: 13px; color: var(--danger); padding: 6px 0 0; }
.cb-as { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; font-size: 13.5px; padding: 6px 0; }
.cb-as small { flex: none; min-width: 36px; color: var(--muted); font-size: 11.5px; }
.cb-as span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cb-as.toca { min-height: 44px; align-items: center; cursor: pointer; }
.cb-as.toca b { flex: none; color: var(--verdete); font-size: 18px; font-weight: 400; padding: 0 4px; }
@media (prefers-reduced-motion: reduce) { .cb-vivo .cb-halo, .cb-fibra-viva, .cb-folha { animation: none; } }

/* relógio de tarefas (08/10/2026) */
.relogio{margin:0 0 8px;padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.05);font-size:13px;line-height:1.35}
.rel-l{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.rel-r{flex:1;min-width:0}
.rel-b{border:0;border-radius:8px;padding:3px 9px;background:rgba(255,255,255,.1);color:inherit;font:inherit;font-size:12px;cursor:pointer}
.rel-et{margin-top:4px;padding-left:4px;opacity:.85}
.rel-et.ok{opacity:.55}.rel-et.rod{font-weight:600;opacity:1}.rel-pe{opacity:.5;font-size:12px}
.rel-outra{cursor:pointer}.rel-outra:hover{opacity:1}
.rel-sub{opacity:.6;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* TAREFAS (03/11/2026, porte do Max: max-agent/public/style.css) */
.tarefas .tar-nova { display: flex; flex-direction: column; gap: 8px; }
.tar-nova input, .tar-nova select { width: 100%; min-width: 0; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; }
.tar-nova-l { display: flex; gap: 8px; flex-wrap: wrap; }
.tar-nova-l input { flex: 1 1 130px; } .tar-nova-l select { flex: 1 1 120px; }
.tar-add { display: inline-flex; align-items: center; gap: 6px; background: var(--cobre-claro); color: #fff; border: 0; border-radius: 10px; padding: 9px 14px; font-weight: 700; cursor: pointer; }
.tar-add svg { width: 15px; height: 15px; }
.tar-abas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.tar-abas button { flex-shrink: 0; background: var(--surface); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tar-abas button.on { background: var(--cobre-claro); border-color: var(--cobre-claro); color: #fff; }
.tar-abas i { font-style: normal; opacity: .75; margin-left: 2px; } .tar-abas i.verm { color: var(--danger); opacity: 1; } .tar-abas button.on i.verm { color: #fff; }
.tar-lista { padding: 4px 6px; }
.tar-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.tar-row:last-child { border-bottom: 0; }
.tar-ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); background: transparent; color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.tar-ck svg { width: 13px; height: 13px; }
.tar-row.feita .tar-ck { background: var(--cobre-claro); border-color: var(--cobre-claro); }
.tar-row.atras .tar-ck { border-color: var(--danger); }
.tar-t { text-align: left; background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tar-t b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.tar-t span { font-size: 12px; color: var(--muted); }
.tar-row.feita .tar-t b { text-decoration: line-through; color: var(--faint); }
.tar-q { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tar-row.atras .tar-q { color: var(--danger); font-weight: 600; }
.tar-mais { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.tar-mais p { margin: 0; font-size: 13px; color: var(--muted); }
.tar-bts { display: flex; gap: 6px; flex-wrap: wrap; }
.tar-bts button { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; }
.tar-bts button svg { width: 13px; height: 13px; }
.tar-bts button.perigo { color: var(--danger); }
.tar-vazio { padding: 14px 8px; margin: 0; } .tar-nota { font-size: 12px; margin: 0 4px; }
/* tarefas: sempre uma coluna (o .dash do desktop vira grade de cartoes) */
.dash.tarefas { display: flex !important; flex-direction: column; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto; grid-template-columns: none !important; }
.dash.tarefas > * { grid-column: auto !important; width: 100%; }

/* QG > Cérebro = Cérebro 3D verdete (13/11/2026): iframe /cerebro3d.html?embutido=1 */
.qg-cerebro3d { display: block; width: 100%; height: calc(100vh - 230px); min-height: 460px; border: 0; border-radius: 12px; background: #15140F; }
.qg-c3d .qg-head span { line-height: 1.9; }
@media (max-width: 760px) { .qg-cerebro3d { height: 68vh; min-height: 380px; } }
/* Próxima ação (18/11/2026) */
/* Tela Hoje (18/11/2026) */
.hj-saud { font-size: 1.25rem; font-weight: 650; }
.hj-nums { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .9rem; }
.hj-lista { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.hj-item { border-top: 1px solid var(--line, rgba(127,127,127,.2)); padding-top: 8px; }
.hj-tit { font-weight: 600; }
.hj-urg { display: inline-block; font-size: .72rem; padding: 1px 6px; border-radius: 6px; margin-right: 6px; background: rgba(220,60,40,.15); color: #d0402b; }
.hj-sol { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(127,127,127,.1); white-space: pre-wrap; }
.hj-acoes { display: flex; gap: 8px; margin-top: 6px; }
.hj-acoes a { text-decoration: none; }
.tarefas .prox { display: flex; flex-direction: column; gap: 6px; }
.prox-rot { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #888); }
.prox-rot2 { margin-top: 6px; }
.prox-ev { font-size: 15px; } .prox-obs { font-size: 13px; color: var(--muted, #888); }
.prox-nada { font-size: 14px; color: var(--muted, #888); }
.prox-bt { display: inline-block; padding: 6px 14px; border-radius: 10px; background: var(--accent, #3b82f6); color: #fff; text-decoration: none; font-size: 14px; }
.prox-lem { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.prox-lem li { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13.5px; }
.prox-feito { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.ical-form { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ical-form input { flex: 1 1 140px; min-width: 0; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; }
.ical-form button { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.ical > summary { cursor: pointer; }

/* ==================== RADAR DE ASSUNTOS do WhatsApp (18/11/2026, trazido do app do Max: public/style.css 2325-2456, 2696-2698) ==================== */
/* prefixos: .as-* (radar), .as-tr-* (ver mensagem), .wa2-* (layout da aba). */
/* ==================== WHATSAPP v2 (23/09/2026): radar de assuntos ==================== */
.wa2-grid { display: flex; flex-direction: column; gap: 16px; }
.wa2-side .wapanel { margin-top: 0; }
.as-radar { display: flex; flex-direction: column; gap: 12px; }
.as-status { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.as-st-t { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.as-novas { color: var(--cobre-claro); font-weight: 600; }
.as-analisar { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 9px; background: var(--cobre); color: var(--brand-on-action, #fff); }
.as-analisar svg { width: 15px; height: 15px; }
.as-rodando { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--verdete); }
.as-rodando i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--verdete); border-top-color: transparent; animation: asgira .8s linear infinite; }
@keyframes asgira { to { transform: rotate(360deg); } }
/* funil: 6 etapas, as quatro primeiras são o "caminho" (cor mais forte) */
.as-funil { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.as-etapa { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 11px; border-radius: 11px; background: var(--surface); border: 1px solid var(--border); text-align: left; min-width: 0; }
.as-etapa .as-n { font-size: 20px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.as-etapa .as-en { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.as-etapa.on { border-color: var(--cobre); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--cobre); }
.as-etapa.e-urgente .as-n { color: var(--danger); }
.as-etapa.e-comigo .as-n { color: var(--cobre-claro); }
.as-etapa.e-aguardando .as-n { color: #6C8EBF; }
.as-etapa.e-resolvidos .as-n { color: var(--verdete); }
.as-etapa.e-acompanhando .as-n, .as-etapa.e-adiados .as-n { color: var(--muted); }
.as-filtros { display: flex; gap: 8px; flex-wrap: wrap; }
.as-seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 2px; overflow-x: auto; max-width: 100%; }
.as-seg button { font-size: 12px; padding: 5px 10px; border-radius: 7px; color: var(--muted); white-space: nowrap; }
.as-seg button.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.as-lista-h { display: flex; align-items: baseline; gap: 8px; margin: 4px 2px -2px; }
.as-lista-h b { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.as-lista-h span { font-size: 12px; color: var(--faint); }
.as-lista { display: flex; flex-direction: column; gap: 10px; }
/* card do assunto */
.as-card { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: 12px; padding: 11px 13px 10px; display: flex; flex-direction: column; gap: 7px; }
.as-card.u-alta { border-left-color: var(--danger); }
.as-card.u-media { border-left-color: var(--cobre); }
.as-card.u-baixa { border-left-color: var(--verdete); }
.as-card.done { border-left-color: var(--verdete); opacity: .88; }
.as-card.fix { box-shadow: 0 0 0 1px var(--cobre) inset; }
.as-h { display: flex; align-items: flex-start; gap: 8px; }
.as-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--border-strong); }
.u-alta .as-dot { background: var(--danger); } .u-media .as-dot { background: var(--cobre); } .u-baixa .as-dot { background: var(--verdete); }
.as-t { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.35; }
.as-when { font-size: 11px; color: var(--faint); flex-shrink: 0; margin-top: 3px; }
.as-more { width: 26px; height: 26px; margin: -3px -4px 0 0; display: flex; align-items: center; justify-content: center; border-radius: 7px; color: var(--faint); }
.as-more svg { width: 15px; height: 15px; }
.as-more:hover { background: var(--surface-2); color: var(--text); }
.as-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.as-meta:empty { display: none; }
.as-dep, .as-prazo, .as-tag { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.as-dep.eu { background: rgba(var(--brand-rgb, 200,120,80),.16); color: var(--cobre-claro); font-weight: 600; }
.as-prazo.q { background: rgba(224,122,95,.15); color: var(--danger); font-weight: 600; }
.as-tag.frio { color: var(--faint); font-style: italic; }
.as-convs { display: flex; flex-wrap: wrap; gap: 5px; }
.as-convs:empty { display: none; }
.as-chip { font-size: 11.5px; padding: 2px 8px; border-radius: 7px; border: 1px solid var(--border); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-chip.dm { border-style: dashed; }
.as-res { font-size: 13.5px; line-height: 1.5; color: var(--text); }
.as-prox { font-size: 13px; line-height: 1.45; color: var(--text); background: var(--surface-2); border-radius: 8px; padding: 6px 9px; }
.as-prox b { color: var(--cobre-claro); font-weight: 600; }
.as-ok { font-size: 13px; color: var(--verdete); line-height: 1.45; }
.as-ok span { color: var(--faint); }
.as-provas-t { align-self: flex-start; font-size: 12px; color: var(--faint); padding: 2px 0; }
.as-provas-t:hover { color: var(--muted); }
.as-provas { display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--border-strong); padding: 2px 0 2px 10px; }
.as-p { display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; }
.as-p-h { color: var(--faint); font-size: 11.5px; }
.as-p-h b { color: var(--muted); font-weight: 600; }
.as-p-t { color: var(--text); line-height: 1.4; }
.as-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.as-b { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--border-strong); color: var(--muted); }
.as-b svg { width: 13px; height: 13px; }
.as-b:hover { color: var(--text); background: var(--surface-2); }
.as-b.ok { border-color: rgba(90,165,147,.5); color: var(--verdete); }
.as-b.ok:hover { background: rgba(90,165,147,.12); }
.as-b.max { margin-left: auto; border-color: transparent; color: var(--cobre-claro); }
.as-wrap { position: relative; display: inline-flex; }
.as-pop { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; min-width: 190px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.35); padding: 4px; display: flex; flex-direction: column; }
.as-pop.r { left: auto; right: 0; }
.as-pop button { text-align: left; font-size: 13px; padding: 7px 10px; border-radius: 7px; color: var(--text); }
.as-pop button:hover { background: var(--surface); }
.as-pop button.danger { color: var(--danger); }
@media (max-width: 420px) { .as-b.max span { display: none; } }
/* desktop: radar ocupa a coluna principal, o movimento dos grupos vira trilho à direita */
@media (min-width: 900px) and (pointer: fine) {
  :where(html.desk) .maincol .view > .dash.wa2 { display: block; max-width: 1280px; }
  :where(html.desk) .wa2-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; margin-top: 12px; }
  :where(html.desk) .wa2-side { position: sticky; top: 0; max-height: calc(100vh - 150px); overflow-y: auto; scrollbar-width: thin; }
  :where(html.desk) .as-funil { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  :where(html.desk) .as-etapa:hover:not(.on) { background: var(--surface-2); }
  :where(html.desk) .as-card:hover { border-color: var(--border-strong); }
}
@media (min-width: 900px) and (max-width: 1250px) and (pointer: fine) {
  :where(html.desk) .wa2-grid { grid-template-columns: minmax(0, 1fr); }
  :where(html.desk) .wa2-side { position: static; max-height: none; }
}
/* celular: a busca ganha linha própria (antes o botão Conversas saía da tela) */
html:not(.desk) .wa2 .wa-top { flex-wrap: wrap; }
html:not(.desk) .wa2 .wa-search { order: 3; flex: 1 1 100%; }
html:not(.desk) .wa2 .wa-mgr-btn { margin-left: auto; }
/* origem do assunto (24/09): de qual conversa saiu, sempre visível, clicável */
.as-origem { display: flex; flex-direction: column; gap: 6px; }
.as-or { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); }
.as-or:hover { border-color: var(--border-strong); }
.as-or-ic { font-size: 16px; flex-shrink: 0; }
.as-or-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.as-or-t b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-or-t span { font-size: 11.5px; color: var(--muted); }
.as-or-go { font-size: 12px; font-weight: 600; color: var(--cobre-claro); flex-shrink: 0; white-space: nowrap; }
.as-or-l { font-size: 11px; color: var(--faint); align-self: center; margin-right: 2px; }
.as-p { text-align: left; width: 100%; border-radius: 6px; padding: 3px 4px; margin: -3px -4px; }
.as-p:hover { background: var(--surface-2); }
a.as-b { text-decoration: none; }
/* visualizador do trecho da conversa */
.as-tr-sheet { display: flex; flex-direction: column; }
.as-tr-sheet .sheet-head .as-tr-ic { font-size: 20px; }
.as-tr-acts { display: flex; gap: 8px; margin: 2px 0 8px; }
.as-tr-nota { font-size: 12px; color: var(--faint); line-height: 1.45; margin-bottom: 8px; }
.as-tr-lista { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 8px; }
.as-tr-m { align-self: flex-start; max-width: 88%; background: var(--surface-2); border-radius: 10px; padding: 6px 10px; }
.as-tr-m.eu { align-self: flex-end; background: rgba(var(--brand-rgb, 200,120,80),.16); }
.as-tr-m.alvo { box-shadow: 0 0 0 2px var(--cobre); }
.as-tr-h { display: flex; gap: 8px; align-items: baseline; font-size: 11.5px; color: var(--muted); }
.as-tr-h b { color: var(--text); font-weight: 600; }
.as-tr-t { font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
@media (min-width: 900px) and (pointer: fine) { :where(html.desk) .sheet.as-tr-sheet { width: 560px; height: min(78vh, 720px); max-height: none; } }
/* responder dali mesmo (24/09) */
.as-tr-comp { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.as-tr-comp textarea { flex: 1; resize: none; min-height: 40px; max-height: 140px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; line-height: 1.4; outline: none; }
.as-tr-comp textarea:focus { border-color: var(--cobre); }
.as-tr-env { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--cobre); color: var(--brand-on-action, #fff); display: flex; align-items: center; justify-content: center; }
.as-tr-env svg { width: 18px; height: 18px; }
.as-tr-m.enviada { opacity: .92; }

/* filtro do radar visivel (13/10/2026) */
.as-filtro-on { margin-left: auto; border: 1px solid var(--cobre-claro); color: var(--cobre-claro); background: transparent; border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.as-ver-todas { margin-top: 10px; border: 0; background: var(--cobre-claro); color: #fff; border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
/* 18/11/2026: matriz de Eisenhower na aba Tarefas */
.mat-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .mat-grade { grid-template-columns: 1fr; } }
.mat-q { padding: 12px; min-width: 0; }
.mat-q h4 { margin: 0; font-size: 15px; } .mat-q h4 i { font-style: normal; color: var(--muted); font-weight: 600; margin-left: 4px; }
.mat-q > small { display: block; color: var(--muted); margin: 2px 0 8px; font-size: 12px; }
.mat-fazer { border-left: 3px solid var(--danger); } .mat-agendar { border-left: 3px solid var(--cobre-claro); }
.mat-delegar { border-left: 3px solid var(--muted); } .mat-eliminar { border-left: 3px solid var(--border); }
.mat-item { padding: 8px 0; border-top: 1px solid var(--border); min-width: 0; }
.mat-item b { display: block; font-size: 14px; overflow-wrap: anywhere; } .mat-item span { display: block; font-size: 12px; color: var(--muted); }
.mat-item.atras b { color: var(--danger); }
.mat-bts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mat-bts button { background: var(--surface); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; font-size: 11px; cursor: pointer; }

/* ==================== CELULAR (24/11/2026, porte do Celular v2 do Max — 0c993b9) ====================
   Barra de baixo: 5 abas do dia a dia + "Mais" (folha com o resto). Uma versão só do código:
   a .tabs só existe no celular; no computador (html.desk) a barra lateral lista todas as abas. */
.tab { position: relative; min-width: 0; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; font-style: normal; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.mais-sheet { padding-bottom: calc(14px + var(--safe-bottom)); max-height: 82vh; overflow-y: auto; }
.mais-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 6px 0 12px; }
.mais-it { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); text-align: left; min-width: 0; }
.mais-it.on { border-color: var(--cobre); }
.mais-ic { color: var(--cobre-claro); display: flex; margin-bottom: 4px; }
.mais-ic svg { width: 22px; height: 22px; }
.mais-it b { font-size: 14.5px; }
.mais-it span:last-child { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.mais-prefs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.mais-pref { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px; border-radius: 11px; border: 1px solid var(--border-strong); font-size: 13px; color: var(--muted); }
.mais-pref svg { width: 17px; height: 17px; flex-shrink: 0; }

/* cabeçalho mais baixo no celular (era 65px): avatar menor, menos respiro */
html:not(.desk) .hdr { padding: calc(6px + var(--safe-top)) 10px 6px; gap: 6px; }
html:not(.desk) .hdr .mark { width: 32px; height: 32px; }
html:not(.desk) .hdr .iconbtn { padding: 7px; }

/* fileira de ferramentas do composer: cabe em ~360px; se ainda faltar (fonte grande do sistema,
   projeto aberto) ela rola de lado em vez de estourar a tela pela direita */
.composer-tools { min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.composer-tools::-webkit-scrollbar { display: none; }
.composer-tools .pill, .composer-tools .ctool { flex-shrink: 0; }
.projtag { min-width: 0; flex-shrink: 1; }
@media (max-width: 480px) {
  .composer-tools { gap: 6px; }
  .composer-tools .ctool { width: 30px; height: 30px; }
  .composer-tools .pill { padding: 5px 9px; font-size: 12px; }
  .composer { padding-left: 10px; padding-right: 10px; }
}
/* aviso (toast) no Chat do celular: nasce ACIMA do composer — antes cobria a fileira de ferramentas
   e o campo de texto até alguém fechar */
html:not(.desk) body:has(#composerHost .composer) .toasthost { bottom: calc(150px + var(--safe-bottom)); }
/* teclado aberto (classe do medirTeclado no app.js): o #app encolhe da sobra do teclado e as abas somem */
html.kbopen:not(.desk) #app { height: calc(100% - var(--kb, 0px)); }
html.kbopen:not(.desk) .tabs { display: none; }
