/* 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;
  --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: 40px; min-height: 40px; 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; }
.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;
}
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 ==================== */
@media (min-width: 900px) and (pointer: fine) {
  #app { max-width: none; height: 100%; max-height: 100%; }
  .shell { display: grid; grid-template-columns: 268px 1fr; height: 100dvh; min-height: 0; }
  /* ----- sidebar ----- */
  .side { display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); min-height: 0; }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
  .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; }
  .side-brand .who b { font-size: 15px; font-weight: 600; display: block; }
  .side-brand .st { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--verdete); }
  .side-brand .st .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--verdete); }
  .side-brand .st.off { color: var(--faint); } .side-brand .st.off .dot { background: var(--faint); }
  .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; }
  .side-new:hover { filter: brightness(1.06); }
  .side-new svg { width: 18px; height: 18px; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; padding: 2px 8px 8px; }
  .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; }
  .side-navb svg { width: 19px; height: 19px; }
  .side-navb:hover { background: var(--surface-2); color: var(--text); }
  .side-navb.on { background: var(--surface-2); color: var(--cobre-claro); font-weight: 500; }
  .side-scroll { flex: 1; overflow-y: auto; padding: 8px; min-height: 0; border-top: 1px solid var(--border); }
  .side-scroll .draw-item:hover { background: var(--surface-2); }
  .side-foot { display: flex; align-items: center; gap: 6px; padding: 9px 10px; border-top: 1px solid var(--border); }
  .side-foot .drawer-theme { flex: 1; }
  .side-foot .drawer-theme:hover, .side-foot .iconbtn:hover { background: var(--surface-2); }
  /* ----- coluna principal ----- */
  .maincol { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
  .tophdr { display: flex; align-items: center; gap: 10px; padding: 12px 24px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
  .tophdr .th-title { flex: 1; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tophdr .th-actions { display: flex; gap: 4px; }
  .tophdr .iconbtn:hover { background: var(--surface-2); }
  .maincol > .view { flex: 1; overflow-y: auto; min-height: 0; }
  /* chat centralizado numa coluna de leitura */
  .maincol .chat { max-width: 768px; margin: 0 auto; padding: 26px 24px 14px; }
  .maincol .chat.empty { min-height: 100%; }
  .maincol #composerHost { width: 100%; }
  .maincol .composer { max-width: 768px; margin: 0 auto; padding: 8px 8px 18px; }
  /* Vida e detalhe da obra numa largura confortável */
  .maincol .dash { max-width: 1120px; margin: 0 auto; padding: 22px 26px 40px; }
  /* hovers premium no desktop */
  .empcard:hover { background: var(--surface-2); border-color: var(--border-strong); }
  .iconapp:hover .iconapp-img { transform: translateY(-2px); }
  .pendtitle:hover, .docrow:hover, .filerow:hover, .erptab:hover, .archtoggle:hover { background: var(--surface-2); }
  .pill:hover, .ctool:hover, .roundbtn.mic:hover { border-color: var(--border-strong); }
  /* ----- Empresas: master-detail ----- */
  .emp-split { height: 100%; display: grid; grid-template-columns: 352px 1fr; min-height: 0; }
  .emp-master { overflow-y: auto; border-right: 1px solid var(--border); padding: 18px 16px; min-height: 0; }
  .emp-master .dash { max-width: none; margin: 0; padding: 0; } /* a lista dentro do master não herda o padding largo da Vida */
  .emp-master .empcard { cursor: pointer; }
  .emp-master .empcard.sel { border-color: var(--cobre); background: var(--surface-2); }
  .emp-detail { overflow-y: auto; padding: 24px 30px 48px; min-height: 0; }
  .emp-detail .dash { max-width: 860px; margin: 0; padding: 0; }
  .emp-detail .detail-h #entBack, .emp-detail #filesBack { display: none; } /* sem botão voltar no desktop (a lista está à esquerda) */
  .emp-detail .detail-h { margin-bottom: 18px; }
  .emp-detail .detail-h b { font-size: 20px; }
  .emp-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--faint); font-size: 14px; }
  /* ----- command palette (Cmd/Ctrl+K) ----- */
  .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; }
  .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; }
  .cmdk-in { width: 100%; padding: 15px 18px; font-size: 16px; background: none; border: none; border-bottom: 1px solid var(--border); outline: none; }
  .cmdk-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
  .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; }
  .cmdk-item:hover { background: var(--surface); }
  .cmdk-item.sel { background: var(--surface); box-shadow: inset 3px 0 0 var(--cobre); }
  .cmdk-item .ci-ic { color: var(--cobre-claro); display: flex; flex-shrink: 0; }
  .cmdk-item .ci-ic svg { width: 17px; height: 17px; }
  .cmdk-item .ci-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cmdk-item .ci-sub { color: var(--faint); font-size: 11.5px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .3px; }
  .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) ----- */
  .maincol .view > .dash { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
  .maincol .view > .dash > .dcol-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .maincol .view > .dash > .dcol-side { min-width: 0; }
  .maincol .view > .dash > .dcol-main > * { order: 0; } /* dentro da coluna a ordem é a natural do HTML */
  /* login centralizado no desktop */
  .login { max-width: 380px; margin: 0 auto; }
  /* scrollbars finas e temáticas (só desktop) */
  .view, .side-scroll, .emp-master, .emp-detail, .cmdk-list, .ctxbody, .sheet-list { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
  .view::-webkit-scrollbar, .side-scroll::-webkit-scrollbar, .emp-master::-webkit-scrollbar, .emp-detail::-webkit-scrollbar, .cmdk-list::-webkit-scrollbar { width: 10px; }
  .view::-webkit-scrollbar-thumb, .side-scroll::-webkit-scrollbar-thumb, .emp-master::-webkit-scrollbar-thumb, .emp-detail::-webkit-scrollbar-thumb, .cmdk-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
  .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 */
  .toasthost { bottom: 20px; }
  .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); }
.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); }
.finacts { display: flex; gap: 8px; flex-wrap: wrap; }
.finact { flex: 1 1 auto; min-width: 96px; padding: 10px; border-radius: 11px; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 13px; }
.finact:active { background: var(--surface); }
.finact.on { background: var(--cobre-escuro); border-color: var(--cobre); color: #F7E6D5; }
.finform { display: flex; flex-direction: column; gap: 9px; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 13px; padding: 13px; margin-top: 2px; }
.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; }
.ffchk { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.ffchk input { width: auto; }
.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) {
  .fingrid { grid-template-columns: repeat(3, 1fr); }
}

/* 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); }

/* 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); }
.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-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; }
@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; } }

/* 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} }
