/* CreatorHub — o Criador
   Design system quente e editorial (espírito Claude), executado como UI de produto.
   Neutros escolhidos (viés terracota) · serifa na saudação · dois temas · movimento contido. */

:root {
  color-scheme: light dark;
  /* HDI — creme + navy + bronze/dourado (paleta do hubdeinteligencia.com.br) */
  --canvas: #f4f1e8;
  --surface: #fffdf7;
  --surface-2: #ece5d6;
  --ink: #17223b;          /* navy HDI */
  --ink-soft: #545d74;
  --ink-faint: #969bab;
  --line: #e3dcc9;
  --line-strong: #d4cbb5;
  --accent: #8e6838;       /* bronze HDI (ações) */
  --accent-strong: #71512b;
  --accent-wash: #efe6d2;
  --accent-ink: #614624;
  --gold: #cfa05c;         /* dourado HDI (brilho) */
  --navy: #17223b;
  --ok: #3f7a55;
  --ok-wash: #e6efe8;
  --warn: #b0803a;
  --warn-wash: #f5edda;
  --danger: #a23e4c;       /* vinho HDI */
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(23,34,59,.05), 0 6px 20px rgba(23,34,59,.06);
  --shadow-lg: 0 4px 12px rgba(23,34,59,.07), 0 18px 48px rgba(23,34,59,.10);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #141d33; --surface: #1c2742; --surface-2: #24314e;
    --ink: #eae4d6; --ink-soft: #a7aec0; --ink-faint: #7b8398;
    --line: #32405f; --line-strong: #445271;
    --accent: #c69a52; --accent-strong: #d4a860; --accent-wash: #2b3350; --accent-ink: #e3c48a;
    --gold: #cfa05c; --navy: #0f1830;
    --ok: #6bbd8f; --ok-wash: #22342c; --warn: #d29a5a; --warn-wash: #34291b; --danger: #e07a86;
    --shadow: 0 1px 2px rgba(0,0,0,.28), 0 6px 20px rgba(0,0,0,.32);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.38), 0 18px 48px rgba(0,0,0,.48);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f4f1e8; --surface: #fffdf7; --surface-2: #ece5d6;
  --ink: #17223b; --ink-soft: #545d74; --ink-faint: #969bab; --line: #e3dcc9; --line-strong: #d4cbb5;
  --accent: #8e6838; --accent-strong: #71512b; --accent-wash: #efe6d2; --accent-ink: #614624;
  --gold: #cfa05c; --navy: #17223b;
  --ok: #3f7a55; --ok-wash: #e6efe8; --warn: #b0803a; --warn-wash: #f5edda; --danger: #a23e4c;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #141d33; --surface: #1c2742; --surface-2: #24314e;
  --ink: #eae4d6; --ink-soft: #a7aec0; --ink-faint: #7b8398; --line: #32405f; --line-strong: #445271;
  --accent: #c69a52; --accent-strong: #d4a860; --accent-wash: #2b3350; --accent-ink: #e3c48a;
  --gold: #cfa05c; --navy: #0f1830;
  --ok: #6bbd8f; --ok-wash: #22342c; --warn: #d29a5a; --warn-wash: #34291b; --danger: #e07a86;
}

* { box-sizing: border-box; }
/* o atributo hidden SEMPRE esconde — senão um display:flex de classe o sobrepõe
   (era por isso que a gaveta do dossiê, o preview-vazio etc. apareciam indevidamente) */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── Topbar ── */
.topbar {
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.marca { display: flex; align-items: center; gap: 9px; }
.simbolo-badge { background: var(--navy); border-radius: 8px; padding: 4px; display: inline-grid; place-items: center; box-shadow: var(--shadow); }
.simbolo { width: 22px; height: 22px; display: block; }
.nome { font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.nome b { color: var(--accent); font-weight: 700; }
.marca .sep { color: var(--ink-faint); }
.marca .sub { color: var(--ink-soft); font-size: 14px; font-family: var(--serif); font-style: italic; }
.topbar-dir { display: flex; align-items: center; gap: 12px; }
.tenant { font-size: 12.5px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: var(--r-pill); }
.tenant b { color: var(--ink); }
.modo { font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: var(--r-pill); border: 1px solid transparent; }
.modo-claude { color: var(--ok); background: var(--ok-wash); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.modo-demo { color: var(--warn); background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.gasto { font-size: 11.5px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: var(--r-pill); font-variant-numeric: tabular-nums; cursor: default; }
.btn-ghost { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft);
  border-radius: var(--r-sm); padding: 6px 13px; font-size: 13px; cursor: pointer; transition: .15s; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Palco (split com divisória arrastável) — abre meio a meio ── */
.palco { display: grid; grid-template-columns: minmax(320px, 1fr) 7px var(--painel-w, 50vw); height: calc(100vh - 60px); }
.lado { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.painel-lado { background: var(--surface-2); }
.gutter { position: relative; cursor: col-resize; z-index: 6; background: transparent; }
.gutter::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 1px; background: var(--line); transition: width .15s, background .15s; border-radius: 2px; }
.gutter::after { content: ""; position: absolute; top: 0; bottom: 0; left: -5px; right: -5px; }  /* área de clique maior */
.gutter:hover::before, .gutter.arrastando::before { width: 3px; background: var(--accent); }
/* piscadinha inicial: "ei, dá pra arrastar" */
.gutter.dica::before { width: 4px; background: var(--accent); animation: piscaGutter 1.1s ease-in-out 3; }
@keyframes piscaGutter { 0%, 100% { width: 1px; background: var(--line); } 50% { width: 5px; background: var(--accent); } }

/* ── Conversa ── */
.conversa { flex: 1; overflow-y: auto; padding: 28px 24px 8px; display: flex; flex-direction: column; gap: 20px; }
.conversa-lado .entrada-barra, .conversa { scroll-behavior: smooth; }

.bolha { display: flex; gap: 12px; width: 100%; max-width: 680px; margin: 0 auto;
  animation: surge .32s cubic-bezier(.2,.7,.2,1); }
@keyframes surge { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bolha .txt { font-size: 15px; }
.bolha-criador { align-self: stretch; }
.bolha-criador .avatar { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--accent);
  color: #fff; display: grid; place-items: center; font-size: 15px; margin-top: 1px; box-shadow: var(--shadow); }
.bolha-criador .txt { color: var(--ink); padding-top: 4px; }
.bolha-cliente { justify-content: flex-end; }
.bolha-cliente .txt { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 11px 15px; border-radius: 16px 16px 4px 16px; max-width: 82%; }
.bolha-criador .txt strong { color: var(--accent-ink); font-weight: 650; }
.bolha-criador .txt em { color: var(--ink-soft); }
/* markdown no chat */
.bolha-criador .txt p { margin: 0 0 10px; } .bolha-criador .txt p:last-child { margin-bottom: 0; }
.bolha-criador .txt ul, .bolha-criador .txt ol { margin: 6px 0 10px; padding-left: 20px; }
.bolha-criador .txt li { margin: 3px 0; }
.bolha-criador .txt code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 5px; font-family: var(--mono); font-size: 12.5px; }
.bolha-criador .txt pre.md-code { background: #1c1a17; color: #d6cfc2; border-radius: 10px; padding: 12px 14px;
  overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; margin: 8px 0; }
.bolha-criador .txt pre.md-code code { background: none; border: none; padding: 0; color: inherit; }
.bolha-criador .txt h3, .bolha-criador .txt h4 { margin: 10px 0 6px; font-size: 15px; font-weight: 650; }
.bolha-criador .txt .pensando { display: inline-flex; align-items: center; }
.bolha-erro .txt { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
  color: var(--danger); padding: 11px 15px; border-radius: 12px; }
.pensando .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  margin: 0 2px; animation: pulso 1.2s infinite; }
.pensando .dot:nth-child(2){animation-delay:.2s;} .pensando .dot:nth-child(3){animation-delay:.4s;}
@keyframes pulso { 0%,60%,100%{opacity:.25;} 30%{opacity:1;} }

/* ── Boas-vindas (primeiro acesso) ── */
.boasvindas { margin: auto; max-width: 560px; text-align: center; padding: 20px 8px 40px; animation: surge .5s ease; }
.bv-marca { width: 40px; height: 40px; margin: 0 auto 18px; border-radius: 50%; background: var(--accent);
  display: grid; place-items: center; color: #fff; font-size: 20px; box-shadow: var(--shadow-lg); }
.bv-titulo { font-family: var(--serif); font-size: 30px; line-height: 1.15; letter-spacing: -.01em;
  margin: 0 0 12px; text-wrap: balance; }
.bv-titulo em { font-style: italic; color: var(--accent); }
.bv-sub { color: var(--ink-soft); font-size: 15.5px; max-width: 460px; margin: 0 auto 26px; line-height: 1.6; }
.bv-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.chip-ex { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 15px;
  cursor: pointer; transition: .16s; box-shadow: var(--shadow); }
.chip-ex:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.chip-ex .ce-t { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.chip-ex .ce-ico { color: var(--accent); font-size: 15px; }
.chip-ex .ce-h { color: var(--ink-faint); font-size: 12.5px; margin-top: 3px; }
.bv-nota { margin-top: 20px; font-size: 12.5px; color: var(--ink-faint); }
@media (max-width: 560px) { .bv-chips { grid-template-columns: 1fr; } }

/* ── Composer ── */
.entrada-barra { padding: 12px 24px 22px; background: linear-gradient(to top, var(--canvas) 60%, transparent); }
.composer { max-width: 680px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 8px 8px 8px 16px; display: flex; align-items: flex-end;
  gap: 8px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
#entrada { flex: 1; resize: none; border: none; background: none; padding: 9px 0; font-family: inherit;
  font-size: 15.5px; color: var(--ink); max-height: 160px; line-height: 1.5; }
#entrada:focus { outline: none; }
#entrada::placeholder { color: var(--ink-faint); }
.anexar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; border: none; background: none;
  color: var(--ink-faint); cursor: pointer; display: grid; place-items: center; transition: .15s; align-self: flex-end; margin-bottom: 2px; }
.anexar:hover { color: var(--accent); background: var(--accent-wash); }
.anexar svg { width: 18px; height: 18px; display: block; }
.btn-enviar { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--accent);
  color: #fff; cursor: pointer; display: grid; place-items: center; transition: .15s; }
.btn-enviar:hover { background: var(--accent-strong); }
.btn-enviar:disabled { background: var(--line-strong); cursor: default; }
.btn-enviar svg { width: 18px; height: 18px; display: block; }

/* botão primário genérico */
.btn { background: var(--accent); color: #fff; border: none; border-radius: var(--r-sm); padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .15s; }
.btn:hover { background: var(--accent-strong); }
.btn:disabled { opacity: .55; cursor: default; }

/* ── Painel direito: só o sistema ── */
.painel-cab { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); min-height: 58px; }
.painel-rot { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.sistema-acoes { display: flex; align-items: center; gap: 7px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

/* ── Botão discreto do dossiê (topbar) + gaveta ── */
.dossie-toggle { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); border-radius: var(--r-pill); padding: 5px 12px 5px 8px; font-size: 12.5px; cursor: pointer; transition: .15s; }
.dossie-toggle:hover { border-color: var(--accent); color: var(--accent); }
.dt-anel { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 14px;
  background: conic-gradient(var(--accent) var(--pct,0%), var(--line) 0); position: relative; }
.dt-anel::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--surface); }
.drawer-scrim { position: fixed; inset: 0; background: rgba(41,39,35,.28); z-index: 40; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92vw; background: var(--surface-2);
  border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 41; display: flex; flex-direction: column;
  animation: entra .28s cubic-bezier(.2,.7,.2,1); }
@keyframes entra { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-cab { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px 12px; }
.drawer-rot { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.drawer-sub { color: var(--ink-faint); font-size: 12.5px; margin-top: 2px; }
.drawer-x { border: none; background: none; color: var(--ink-faint); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.drawer-x:hover { color: var(--ink); }

/* welcome: eyebrow + esteira da visão */
.bv-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.bv-sub strong { color: var(--accent-ink); }
.bv-esteira { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 2px auto 24px; font-size: 12px; color: var(--ink-soft); max-width: 480px; }
.bve-passo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 12px; }
.bve-seta { color: var(--ink-faint); }

/* biblioteca (gaveta) + esteira do projeto */
.bib-lista { flex: 1; overflow-y: auto; padding: 8px 16px 40px; }
.bib-vazio { color: var(--ink-faint); font-size: 13.5px; padding: 24px 8px; line-height: 1.6; text-align: center; }
.bib-item { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 15px; margin-bottom: 10px; background: var(--surface); box-shadow: var(--shadow); }
.bi-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bi-topo b { font-family: var(--serif); font-size: 15px; }
.bi-status { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 3px 8px; border-radius: 5px; white-space: nowrap; background: var(--accent-wash); color: var(--accent-ink); }
.bi-status.s-enviado { background: var(--warn-wash); color: var(--warn); }
.bi-status.s-producao { background: var(--ok-wash); color: var(--ok); }
.bi-esteira { display: flex; align-items: center; gap: 5px; margin: 11px 0 2px; font-size: 10px; flex-wrap: wrap; }
.bi-passo { color: var(--ink-faint); background: var(--surface-2); border-radius: var(--r-pill); padding: 2px 8px; }
.bi-passo.feito { color: var(--accent-ink); background: var(--accent-wash); }
.bi-passo.atual { color: #fff; background: var(--accent); font-weight: 600; }
.bi-seta { color: var(--line-strong); }
.bi-owner { font-size: 11.5px; color: var(--ink-faint); margin-top: 6px; }
.bi-acoes { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.bib-btn { font-size: 12.5px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft); border-radius: var(--r-sm); padding: 7px 12px; cursor: pointer; text-decoration: none; display: inline-block; }
.bib-btn:hover { border-color: var(--accent); color: var(--accent); }
.bib-btn.primaria { background: var(--accent); color: #fff; border-color: var(--accent); }
.bib-btn.primaria:hover { background: var(--accent-strong); color: #fff; }

/* ── Dossiê ── */
.dossie-cab { padding: 18px 20px 14px; }
.dossie-rot { font-weight: 650; font-size: 15px; }
.dossie-hint { font-weight: 400; color: var(--ink-faint); font-size: 12.5px; font-family: var(--serif); font-style: italic; }
.completude { font-size: 12.5px; color: var(--ink-soft); margin: 10px 0 7px; font-variant-numeric: tabular-nums; }
.bar { height: 5px; background: var(--line); border-radius: var(--r-pill); overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: var(--r-pill); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.bar-fill.cheio { background: var(--ok); }

.dossie { flex: 1; overflow-y: auto; padding: 6px 16px 40px; }
.dossie-titulo { font-family: var(--serif); font-weight: 600; font-size: 17px; margin: 6px 4px 14px;
  display: flex; align-items: center; gap: 9px; }
.tag-estado { font-family: var(--sans); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 5px; background: var(--accent-wash); color: var(--accent-ink); }
.tag-estado.producao { background: var(--ok-wash); color: var(--ok); }

.campo { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 9px;
  background: var(--surface); transition: border-color .3s, box-shadow .3s; }
.campo-vazio { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.campo-parcial { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.campo-completo { box-shadow: var(--shadow); }
.campo.acende { animation: acender 1.1s ease; }
@keyframes acender { 0% { box-shadow: 0 0 0 0 var(--accent-wash); border-color: var(--accent); }
  100% { box-shadow: var(--shadow); } }
.campo-cab { font-weight: 600; font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.campo-vazio .campo-cab { color: var(--ink-faint); font-weight: 500; }
.ponto { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex: 0 0 7px; }
.ponto.parcial { background: var(--warn); } .ponto.completo { background: var(--accent); }
.campo-corpo { margin-top: 8px; font-size: 13.5px; color: var(--ink-soft); }
.campo-corpo .vazio { color: var(--ink-faint); font-style: italic; }
.campo-corpo .pedido { color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 14.5px; }
.campo-corpo ul { margin: 0; padding-left: 16px; } .campo-corpo li { margin: 3px 0; }
.campo-corpo b { color: var(--ink); font-weight: 600; }
.campo-corpo .mono { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }
.trava { color: var(--danger); font-size: 12px; white-space: nowrap; }
.mini { margin: 6px 0 0; padding: 7px 10px; border-radius: var(--r-sm); font-size: 12.5px; }
.mini span { font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: .04em; }
.mini ul { margin: 3px 0 0; }
.mini.reuso, .mini.hoje { background: var(--ok-wash); color: var(--ok); }
.mini.conflito { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.mini.oportunidade { background: var(--accent-wash); color: var(--accent-ink); }
.mini.falta { background: var(--warn-wash); color: var(--warn); }

/* ── Sistema: preview / gerar / publicar ── */
.btn-ar { background: var(--ok); }
.btn-ar:hover { background: color-mix(in srgb, var(--ok) 85%, #000); }
.preview-wrap { flex: 1; min-height: 0; position: relative; background: var(--canvas); display: flex; }
.preview-vazio { margin: auto; text-align: center; color: var(--ink-faint); font-size: 14px; padding: 28px; line-height: 1.6;
  max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.preview-vazio .pv-ico { width: 48px; height: 48px; border-radius: 50%; background: var(--accent-wash);
  color: var(--accent); display: grid; place-items: center; font-size: 21px; }
.preview-vazio .pv-txt b { color: var(--ink-soft); }
.preview-vazio .btn { margin-top: 2px; padding: 11px 22px; }
.gerando { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.prog-code { font-family: var(--mono); font-size: 12px; line-height: 1.7; background: var(--navy); color: #cfe0f5;
  border-radius: 12px; padding: 16px 18px; width: min(86%, 400px); min-height: 148px; margin: 0;
  white-space: pre-wrap; word-break: break-word; text-align: left; box-shadow: var(--shadow-lg); }
.prog-code .tok-key { color: #c69a52; } .prog-code .tok-str { color: #8fce9e; }
.prog-code::after { content: "▋"; color: var(--gold); animation: blinkCur 1s steps(1) infinite; }
@keyframes blinkCur { 50% { opacity: 0; } }
.prog-label { display: flex; align-items: center; gap: 9px; color: var(--accent); font-weight: 600; font-size: 13.5px; }
.spin { width: 16px; height: 16px; border: 2.5px solid var(--accent-wash); border-top-color: var(--accent);
  border-radius: 50%; animation: gira .8s linear infinite; flex: 0 0 16px; }
@keyframes gira { to { transform: rotate(360deg); } }
.preview-frame { width: 100%; height: 100%; border: none; background: #fff; }
.codigo { width: 100%; height: 100%; margin: 0; overflow: auto; background: #1c1a17; color: #d6cfc2;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.55; padding: 16px 18px; white-space: pre-wrap; word-break: break-word; }
.publicado { padding: 13px 16px; border-top: 1px solid var(--line); background: var(--ok-wash);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pub-ok { color: var(--ok); font-weight: 700; font-size: 12.5px; }
.pub-link { color: var(--accent); font-size: 13px; text-decoration: none; word-break: break-all; flex: 1; min-width: 160px; }
.pub-link:hover { text-decoration: underline; }
.pub-nota { flex-basis: 100%; color: var(--ink-soft); font-size: 12px; }
.pub-nota code { background: color-mix(in srgb, var(--ink) 8%, transparent); padding: 1px 6px; border-radius: 4px;
  font-family: var(--mono); font-size: 11.5px; }

/* ── Responsivo ── */
@media (max-width: 920px) {
  .palco { grid-template-columns: 1fr; height: auto; }
  .gutter { display: none; }
  .painel-lado { border-top: 1px solid var(--line); }
  .conversa { min-height: 46vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ── Conta: medidor de budget + identidade no topo ───────────────────────── */
.conta-budget { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600;
  color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: var(--r-pill); white-space: nowrap; }
.conta-budget .cb-bar { width: 46px; height: 5px; border-radius: 3px; background: var(--line);
  overflow: hidden; display: inline-block; }
.conta-budget .cb-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .5s ease; }
.conta-budget.morno { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 34%, transparent); }
.conta-budget.morno .cb-bar i { background: var(--warn); }
.conta-budget.quente { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.conta-budget.quente .cb-bar i { background: var(--danger); }
.conta-user { display: inline-flex; flex-direction: column; line-height: 1.15; text-align: right; margin-left: 2px; }
.conta-user b { font-size: 12.5px; color: var(--ink); font-weight: 700; }
.conta-user .cu-emp { font-size: 10.5px; color: var(--ink-faint); letter-spacing: .02em; }

/* ── Tela de login ───────────────────────────────────────────────────────── */
.login-scrim { position: fixed; inset: 0; z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 24px; background:
    radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 60%),
    var(--navy); }
.login-card { width: min(420px, 96vw); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 34px 32px 26px; animation: loginUp .4s cubic-bezier(.2,.8,.2,1); }
@keyframes loginUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.login-marca { display: flex; align-items: center; gap: 9px; margin-bottom: 22px; }
.login-marca .lm-badge { width: 30px; height: 30px; border-radius: 8px; background: var(--navy); color: var(--gold);
  display: grid; place-items: center; font-size: 16px; box-shadow: var(--shadow); }
.login-marca .lm-nome { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.login-marca .lm-nome b { font-weight: 800; color: var(--accent); }
.login-tit { font-family: var(--serif); font-size: 26px; color: var(--ink); margin: 0 0 6px; letter-spacing: -.01em; }
.login-sub { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 22px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.login-form input { width: 100%; box-sizing: border-box; background: var(--canvas); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 11px 13px; color: var(--ink); font-size: 14.5px; font-family: var(--sans); outline: none; transition: border-color .15s; }
.login-form input:focus { border-color: var(--accent); }
.login-erro { font-size: 12.5px; color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent); border-radius: var(--r-sm); padding: 8px 11px; }
.login-btn { margin-top: 4px; background: var(--accent); color: #fff; border: none; border-radius: var(--r-sm);
  padding: 12px; font-size: 14.5px; font-weight: 700; font-family: var(--sans); cursor: pointer; transition: background .15s; }
.login-btn:hover { background: var(--accent-strong); }
.login-btn:disabled { opacity: .6; cursor: default; }
.login-rodape { margin-top: 20px; font-size: 11.5px; color: var(--ink-faint); text-align: center; line-height: 1.5; }

/* ── Histórico de versões (git-like) ─────────────────────────────────────── */
.versoes-scrim { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: color-mix(in srgb, var(--navy) 55%, transparent); backdrop-filter: blur(3px); }
.versoes-scrim[hidden] { display: none !important; }
.vp-card { width: min(440px, 96vw); max-height: 80vh; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.vp-cab { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.vp-cab b { font-size: 15px; color: var(--ink); font-family: var(--serif); }
.vp-x { background: none; border: none; color: var(--ink-faint); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.vp-x:hover { color: var(--ink); }
.vp-lista { overflow-y: auto; padding: 8px; }
.vp-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px;
  border-radius: var(--r-sm); }
.vp-item:hover { background: var(--accent-wash); }
.vp-item + .vp-item { border-top: 1px solid var(--line); }
.vp-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vp-info b { font-size: 13px; color: var(--ink); font-weight: 600; }
.vp-info span { font-size: 11.5px; color: var(--ink-faint); }
.vp-acoes { display: flex; gap: 6px; flex-shrink: 0; }
.vp-vazio { padding: 24px; text-align: center; color: var(--ink-soft); font-size: 13px; }
.vp-nota { padding: 11px 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-faint); background: var(--canvas); }
.conta-budget .cb-inf { color: var(--ink-faint); font-weight: 500; }
.vp-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }
.vp-tag.ar { color: var(--ok); background: var(--ok-wash); }
.vp-tag.pub { color: var(--accent-ink); background: var(--accent-wash); }
.vp-tag.rasc { color: var(--ink-soft); background: var(--surface-2); }

/* ── Anexo estagiado no composer + indicador de fila ─────────────────────── */
.composer-chip { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; }
.composer-chip[hidden] { display: none !important; }
.composer-chip .cc-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  color: var(--accent-ink); background: var(--accent-wash); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 5px 11px; border-radius: var(--r-pill); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-chip .cc-x { background: none; border: none; color: var(--ink-faint); font-size: 17px; line-height: 1; cursor: pointer; padding: 0 2px; }
.composer-chip .cc-x:hover { color: var(--danger); }
.fila-info { font-size: 11.5px; color: var(--ink-faint); margin: 0 4px 6px; }
.fila-info[hidden] { display: none !important; }
.prog-tokens { font-family: var(--mono); font-size: 12px; color: var(--gold); margin-top: 10px; text-align: center; letter-spacing: .03em; }
.prog-tokens:empty { display: none; }

/* ── Login enterprise: tela dividida (missão à esquerda, login à direita) ─── */
.login-scrim { padding: 0 !important; align-items: stretch !important; }
.login-split { display: grid; grid-template-columns: 1.1fr 0.9fr; width: 100%; min-height: 100vh; }
.login-hero { position: relative; overflow: hidden; padding: 6vh 5vw; display: flex; flex-direction: column; justify-content: center; gap: 26px; color: #eef0fb;
  background:
    radial-gradient(900px 500px at 15% 0%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 60%),
    radial-gradient(700px 500px at 90% 100%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 55%),
    var(--navy); }
.lh-topo { display: flex; align-items: center; gap: 10px; }
.lh-topo .lm-badge { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.08); color: var(--gold); display: grid; place-items: center; font-size: 18px; }
.lh-topo .lm-nome { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.lh-topo .lm-nome b { font-weight: 800; color: var(--gold); }
.lh-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--gold) 80%, #fff); }
.lh-titulo { font-family: var(--serif); font-size: clamp(30px, 4vw, 52px); line-height: 1.05; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
.lh-sub { font-size: clamp(15px, 1.4vw, 18px); line-height: 1.55; color: #c4c9de; max-width: 30em; margin: 0; }
.lh-sub b { color: #eef0fb; font-weight: 600; }
.lh-pilares { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; max-width: 34em; }
.lh-pilares li { display: flex; gap: 13px; align-items: flex-start; }
.lh-pilares .lp-ico { font-size: 20px; line-height: 1.4; flex-shrink: 0; filter: saturate(1.1); }
.lh-pilares b { display: block; font-size: 14.5px; color: #fff; margin-bottom: 1px; }
.lh-pilares span { display: block; font-size: 13px; color: #aab0c9; line-height: 1.45; }

.login-painel { display: flex; align-items: center; justify-content: center; padding: 6vh 5vw; background: var(--canvas); }
.login-split .login-card { width: min(400px, 100%); background: transparent; border: none; box-shadow: none; padding: 0; animation: loginUp .4s cubic-bezier(.2,.8,.2,1); }
.login-marca-sm { display: none; align-items: center; gap: 8px; margin-bottom: 20px; }
.login-marca-sm .lm-badge { width: 28px; height: 28px; border-radius: 8px; background: var(--navy); color: var(--gold); display: grid; place-items: center; font-size: 15px; }
.login-marca-sm .lm-nome { font-size: 15px; color: var(--ink); font-weight: 600; }
.login-marca-sm .lm-nome b { font-weight: 800; color: var(--accent); }
.login-split .login-tit { font-family: var(--serif); font-size: 27px; color: var(--ink); margin: 0 0 5px; }
.login-split .login-sub { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 22px; }

@media (max-width: 860px) {
  /* uma coluna, mas MANTÉM o hero bonito (com o logo animado) em cima, compacto */
  .login-split { grid-template-columns: 1fr; min-height: 100dvh; }
  .login-hero { padding: 6vh 8vw 3vh; gap: 16px; min-height: auto; }
  .login-hero .lh-pilares, .login-hero .lh-respaldo { display: none; }   /* poupa altura no celular */
  .lh-titulo { font-size: clamp(26px, 7vw, 40px); }
  .login-marca-sm { display: none; }
  .login-painel { min-height: auto; padding: 5vh 8vw 8vh; }
}

/* ── Seletor de nível do Bob (Essencial/Avançado/Máximo) ─────────────────── */
.tier-sel { font-size: 12px; font-weight: 600; color: var(--ink-soft); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 5px 10px; cursor: pointer;
  font-family: var(--sans); outline: none; }
.tier-sel:hover { border-color: var(--accent); color: var(--accent); }

/* ── Respaldo HDI no login (a equipe sustenta os sistemas) ───────────────── */
.lh-respaldo { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; padding: 15px 17px;
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent); border-radius: var(--r);
  background: color-mix(in srgb, var(--gold) 9%, transparent); max-width: 34em; }
.lh-respaldo .lr-ico { font-size: 19px; flex-shrink: 0; line-height: 1.4; }
.lh-respaldo b { display: block; font-size: 14.5px; color: #fff; margin-bottom: 3px; }
.lh-respaldo span { display: block; font-size: 12.5px; color: #c0c6dd; line-height: 1.45; }

/* ── Logos HDIcreator (login) ── */
.lh-logo { height: clamp(74px, 11vh, 120px); width: auto; display: block; filter: drop-shadow(0 2px 8px rgba(0,0,0,.3)); }
.lms-logo { height: 40px; width: auto; display: block; }

/* logo ANIMADO do login (símbolo montando + passada de luz sobre o wordmark) */
.hlogo { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: clamp(14px, 2vw, 22px); }
.hlogo::after { content: ""; position: absolute; top: 0; bottom: 0; width: 55%; left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.4), transparent);
  animation: sweep 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes sweep { 0% { left: -60%; } 55%,100% { left: 130%; } }
.hlogo-sym { width: clamp(58px, 8vh, 92px); height: clamp(58px, 8vh, 92px); background: #F5F3EC; color: #08090B;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: clamp(18px, 2.4vh, 28px);
  letter-spacing: -.05em; clip-path: polygon(0 0,100% 0,100% 70%,70% 100%,0 100%);
  animation: spin-assemble 2.6s cubic-bezier(.6,0,.4,1) infinite; flex: 0 0 auto; }
.hlogo-word { font-weight: 700; font-size: clamp(34px, 5vh, 58px); letter-spacing: -.03em; line-height: .9; }
.hlogo-word .h { color: #F5F5F1; }
.hlogo-word .c { color: #B8894B; font-weight: 400; }
.hlogo-bar { display: block; height: 4px; width: clamp(58px, 8vh, 92px); background: #B8894B; margin-top: 12px;
  transform-origin: left; animation: hlbar 3.6s ease-in-out infinite; }
@keyframes hlbar { 0%,100% { transform: scaleX(.5); opacity: .6; } 50% { transform: scaleX(1); opacity: 1; } }

/* ── Loaders do kit (situações do estúdio) ── */
@keyframes spin-assemble { 0% { transform: rotate(0) scale(1); clip-path: polygon(0 0,100% 0,100% 70%,70% 100%,0 100%); }
  50% { transform: rotate(180deg) scale(.82); clip-path: polygon(0 0,100% 0,100% 100%,100% 100%,0 100%); }
  100% { transform: rotate(360deg) scale(1); clip-path: polygon(0 0,100% 0,100% 70%,70% 100%,0 100%); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes ring { to { transform: rotate(360deg); } }
@keyframes dots { 0%,20% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
@keyframes blkpulse { 0%,100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-7px); } }

/* anel girando com o símbolo (situação: gerando/carregando) */
.ld-ring { position: relative; width: 52px; height: 52px; display: grid; place-items: center; }
.ld-ring::before { content: ""; position: absolute; inset: 0; border: 3px solid rgba(184,137,75,.18); border-top-color: #B8894B; border-radius: 50%; animation: ring .9s linear infinite; }
.ld-ring i { width: 24px; height: 24px; background: #F5F3EC; color: #08090B; display: grid; place-items: center; font-weight: 700; font-size: 8px; font-style: normal; letter-spacing: -.05em; clip-path: polygon(0 0,100% 0,100% 70%,70% 100%,0 100%); }
.ld-dots span { animation: dots 1.4s infinite; }
.ld-dots span:nth-child(2) { animation-delay: .2s; } .ld-dots span:nth-child(3) { animation-delay: .4s; }
/* blocos montando (situação: micro-loader inline) */
.ld-blocos { display: inline-flex; align-items: flex-end; gap: 9px; height: 24px; }
.ld-blocos i { width: 20px; height: 20px; clip-path: polygon(0 0,100% 0,100% 70%,70% 100%,0 100%); animation: blkpulse 1.2s ease infinite; }
.ld-blocos i:nth-child(1) { background: #F5F3EC; } .ld-blocos i:nth-child(2) { background: #B8894B; animation-delay: .15s; } .ld-blocos i:nth-child(3) { background: #F5F3EC; animation-delay: .3s; }

/* ── Bob, o dev animado (situações: boas-vindas · codando) ── */
@keyframes bob-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes bob-blink { 0%,92%,100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes bob-antenna { 0%,100% { opacity: .4; transform: translateX(-50%) scale(.8); } 50% { opacity: 1; transform: translateX(-50%) scale(1.25); } }
@keyframes bob-shadow { 0%,100% { transform: scaleX(1); opacity: .35; } 50% { transform: scaleX(.82); opacity: .22; } }
@keyframes bob-type { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes bob-wave { 0%,100% { transform: rotate(16deg); } 50% { transform: rotate(42deg); } }
.bob-palco { background: #0A1428; border: 1px solid rgba(255,255,255,.10); border-radius: 14px; padding: 30px 24px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bob-palco .bp-rot { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #8D93A0; }
.bob { display: flex; flex-direction: column; align-items: center; }
.bob-boneco { position: relative; width: 128px; }
.bob--idle .bob-boneco, .bob--ola .bob-boneco { animation: bob-float 3s ease-in-out infinite; }
.bob--ola .bob-boneco { animation-duration: 2.4s; }
.bob-haste { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); width: 2px; height: 18px; background: #8D93A0; }
.bob-luz { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); width: 11px; height: 11px; border-radius: 50%; background: #B8894B; box-shadow: 0 0 12px #B8894B; animation: bob-antenna 1.6s ease-in-out infinite; }
.bob--codando .bob-luz { background: #6CCB94; box-shadow: 0 0 12px #6CCB94; animation-duration: .7s; }
.bob-cabeca { width: 128px; height: 128px; background: #F5F3EC; clip-path: polygon(0 0,100% 0,100% 74%,74% 100%,0 100%); display: flex; align-items: center; justify-content: center; position: relative; }
.bob-olhos { display: flex; gap: 22px; margin-top: -6px; }
.bob-olho { width: 20px; height: 26px; background: #0A1428; border-radius: 6px; animation: bob-blink 4s infinite; }
.bob--ola .bob-olho { width: 22px; height: 22px; border-radius: 50%; animation: none; }
.bob-code { display: flex; gap: 12px; margin-top: -6px; font-family: var(--mono); font-weight: 500; font-size: 30px; color: #0A1428; line-height: 1; }
.bob-boca { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 26px; height: 5px; background: #B8894B; border-radius: 3px; }
.bob--codando .bob-boca { width: 18px; }
.bob--ola .bob-boca { bottom: 22px; width: 30px; height: 15px; background: transparent; border-bottom: 5px solid #B8894B; border-radius: 0 0 20px 20px; }
.bob-pescoco { width: 12px; height: 13px; background: #2a3550; margin: 0 auto; }
.bob-corpo { width: 114px; height: 72px; background: #132038; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; margin: 0 auto; display: flex; align-items: center; justify-content: center; position: relative; }
.bob-badge { width: 38px; height: 38px; background: #F5F3EC; color: #08090B; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; letter-spacing: -.05em; clip-path: polygon(0 0,100% 0,100% 70%,70% 100%,0 100%); }
.bob-braco { position: absolute; top: 14px; width: 13px; height: 34px; background: #132038; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; }
.bob-braco.esq { left: -13px; } .bob-braco.dir { right: -13px; }
.bob--ola .bob-braco.dir { top: 2px; right: -15px; height: 38px; transform-origin: top; animation: bob-wave 1s ease-in-out infinite; }
.bob-sombra { width: 92px; height: 11px; background: #000; border-radius: 50%; margin-top: 20px; filter: blur(5px); animation: bob-shadow 3s ease-in-out infinite; }
.bob--codando .bob-sombra { animation: none; }

/* digitando (situação: Bob respondendo no chat) */
.bob-digita { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; }
.bob-digita b { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-soft); font-weight: 500; }
.bob-digita i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: bob-type .9s infinite; }
.bob-digita i:nth-child(2) { animation-delay: .15s; } .bob-digita i:nth-child(3) { animation-delay: .3s; }

/* ✓ sucesso (situação: publicado / gerado) */
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes check { to { stroke-dashoffset: 0; } }
.suc-ok { width: 30px; height: 30px; border-radius: 50%; background: rgba(63,122,85,.16); display: inline-grid; place-items: center; vertical-align: -8px; margin-right: 8px; animation: pop .5s cubic-bezier(.3,1.4,.5,1) both; }
.suc-ok svg path { stroke-dasharray: 34; stroke-dashoffset: 34; animation: check .5s ease .25s both; }

/* laptop carregando (situação: montando o preview) */
@keyframes lap-scan { 0% { top: 0; opacity: 0; } 20%,80% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
@keyframes lap-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }
.lap { width: 300px; max-width: 80%; }
.lap-tela { background: #0A1428; border: 6px solid #1c222e; border-bottom: none; border-radius: 12px 12px 0 0; overflow: hidden; }
.lap-barra { height: 20px; background: #151a25; display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.lap-barra i { width: 8px; height: 8px; border-radius: 50%; }
.lap-barra .r { background: #E85D5D; } .lap-barra .y { background: #E8B85D; } .lap-barra .g { background: #6CCB94; }
.lap-barra .u { margin-left: 8px; flex: 1; height: 10px; background: #0A1428; border-radius: 3px; }
.lap-corpo { height: 150px; background: #0A1428; position: relative; overflow: hidden; }
.lap-scan { position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg,transparent,#B8894B,transparent); animation: lap-scan 2.2s ease-in-out infinite; }
.lap-linhas { padding: 16px; }
.lap-linha { height: 12px; border-radius: 3px; background: #2a3550; margin-bottom: 9px; position: relative; overflow: hidden; }
.lap-linha::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg,transparent,rgba(255,255,255,.14),transparent); animation: lap-load 1.6s linear infinite; }
.lap-cards { display: flex; gap: 10px; padding: 0 16px; }
.lap-cards div { flex: 1; height: 44px; background: #132038; border: 1px solid rgba(255,255,255,.06); border-radius: 6px; }
.lap-base { height: 12px; background: linear-gradient(#20283a,#141a26); border-radius: 0 0 4px 4px; }
.lap-base2 { height: 7px; width: 116%; margin-left: -8%; background: #0c1019; border-radius: 0 0 14px 14px; }
.preview-carregando { position: absolute; inset: 0; background: color-mix(in srgb, var(--canvas) 88%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; z-index: 4; }
.preview-carregando .pc-rot { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) {
  .hlogo-sym, .hlogo-word::after, .hlogo-bar, .bob-boneco, .bob-luz, .bob-olho, .lap-scan, .lap-linha::after { animation: none !important; }
}

/* ── Abertura premium (boot sequence após login) ── */
.ab-screen { position: fixed; inset: 0; z-index: 9999; background: #060D1C; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px;
  font-family: 'IBM Plex Sans', var(--sans); cursor: pointer; animation: abIn .25s ease both; }
.ab-screen.ab-out { animation: abOut .46s cubic-bezier(.4,0,.2,1) both; pointer-events: none; }
@keyframes abIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes abOut { from { opacity: 1; } to { opacity: 0; transform: scale(1.02); } }
.ab-dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(184,137,75,.10) 1px, transparent 1px);
  background-size: 30px 30px; -webkit-mask-image: radial-gradient(ellipse at center, black 8%, transparent 74%);
  mask-image: radial-gradient(ellipse at center, black 8%, transparent 74%); }
.ab-glow { position: absolute; inset: 0; background: radial-gradient(680px 400px at 50% 42%, rgba(184,137,75,.16), transparent 62%); animation: abGlow 2.6s ease both; }
.ab-scan { position: absolute; left: 0; right: 0; top: 0; height: 26vh;
  background: linear-gradient(180deg, transparent, rgba(184,137,75,.06), transparent); animation: abScan 2.4s cubic-bezier(.4,0,.2,1) both; }
.ab-lockup { position: relative; display: inline-flex; align-items: center; gap: min(3.2vw,34px); }
.ab-sym { width: min(11vw,116px); height: min(11vw,116px); background: #F5F3EC; color: #08090B;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: min(3.4vw,36px);
  letter-spacing: -.05em; clip-path: polygon(0 0,100% 0,100% 70%,70% 100%,0 100%); animation: abBlock .9s cubic-bezier(.34,1.3,.4,1) .25s both; }
.ab-word { font-weight: 700; font-size: min(7.6vw,78px); letter-spacing: -.04em; line-height: .9; color: #F5F5F1; display: flex; }
.ab-word span { display: inline-block; animation: abLetter .5s cubic-bezier(.2,.8,.2,1) both; }
.ab-word .ab-c { font-weight: 400; color: #B8894B; }
.ab-bar { height: 4px; width: min(7.6vw,78px); background: #B8894B; margin-top: 14px; transform-origin: left; animation: abBar .55s cubic-bezier(.6,0,.3,1) 1.75s both; }
.ab-log { position: relative; font-family: 'IBM Plex Mono', var(--mono); font-size: min(1.6vw,15px);
  letter-spacing: .06em; color: #8D93A0; line-height: 2; min-width: min(64vw,440px); }
.ab-log div { opacity: 0; }
.ab-l1 { animation: abLog .4s ease 2.15s both; }
.ab-l2 { animation: abLog .4s ease 2.45s both; }
.ab-l3 { animation: abLog .4s ease 2.75s both; }
.ab-l4 { animation: abLog .4s ease 3.15s both; margin-top: 8px; color: #F5F5F1; }
.ab-arw { color: #B8894B; } .ab-dot { color: #5c6470; } .ab-ok { color: #6CCB94; }
.ab-caret { display: inline-block; width: 10px; height: 17px; background: #B8894B; margin-left: 7px; vertical-align: -2px; animation: abCaret 1s step-end 3.5s infinite; }
.ab-skip { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-family: 'IBM Plex Mono', var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: #7a8090; opacity: 0; animation: abLog .5s ease 3.6s forwards; }
@keyframes abGlow { 0%,70% { opacity: 0; } 100% { opacity: 1; } }
@keyframes abScan { 0% { transform: translateY(-100%); } 100% { transform: translateY(100vh); } }
@keyframes abBlock { 0% { opacity: 0; transform: scale(.4) rotate(-8deg); } 55% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes abLetter { 0% { opacity: 0; transform: translateY(.42em) scaleY(.72); filter: blur(4px); } 60% { opacity: 1; filter: blur(0); } 100% { opacity: 1; transform: translateY(0) scaleY(1); } }
@keyframes abBar { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
@keyframes abLog { 0% { opacity: 0; transform: translateX(-6px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes abCaret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ab-glow, .ab-scan, .ab-sym, .ab-word span, .ab-bar, .ab-log div, .ab-skip { animation-duration: .01ms !important; animation-delay: 0s !important; }
}

/* ═══════════ RESPONSIVO (tablet / celular) ═══════════ */
@media (max-width: 900px) {
  .marca .sub, .marca .sep { display: none; }               /* topbar: só o logo */
  .topbar { padding: 0 12px; gap: 8px; flex-wrap: wrap; height: auto; min-height: 56px; }
  .topbar-dir { gap: 8px; flex-wrap: wrap; }
  .tenant { display: none; }
  .marca-logo { height: 26px; }
}
@media (max-width: 860px) {
  /* palco: empilha conversa (com o campo) em cima, o sistema embaixo */
  .palco { display: flex; flex-direction: column; height: auto; min-height: calc(100vh - 56px); }
  .gutter { display: none; }
  .lado { height: auto; min-width: 0; }
  .conversa-lado { order: 1; }
  .painel-lado { order: 2; min-height: 66vh; border-top: 1px solid var(--line); }
  .conversa { max-height: 44vh; }
  .composer { max-width: 100%; }
  .preview-wrap { min-height: 66vh; }
}
@media (max-width: 480px) {
  .conversa { padding: 18px 14px 6px; }
  .painel-cab { flex-wrap: wrap; gap: 6px; }
  .sistema-acoes { flex-wrap: wrap; }
  .lap { width: 240px; }
  .bob-boneco { transform: scale(.82); }
}

/* ── Logo da topbar (dentro do sistema) — troca conforme o tema ── */
.marca-logo { height: 30px; width: auto; display: none; }
.marca-logo--escuro { display: block; }                       /* claro é o padrão → lockup escuro */
@media (prefers-color-scheme: dark) { .marca-logo--escuro { display: none; } .marca-logo--claro { display: block; } }
:root[data-theme="light"] .marca-logo--escuro { display: block; }
:root[data-theme="light"] .marca-logo--claro { display: none; }
:root[data-theme="dark"] .marca-logo--escuro { display: none; }
:root[data-theme="dark"] .marca-logo--claro { display: block; }

/* ── Logo ANIMADO (o que fica rodando) dentro do sistema — topbar, theme-aware e maior ── */
.hlogo--bar { gap: 11px; overflow: visible; }
.hlogo--bar::after { display: none; }                              /* sem sweep no topo */
.hlogo--bar .hlogo-sym { width: 40px; height: 40px; font-size: 13px; background: var(--ink); color: var(--canvas); animation-duration: 3.2s; }
.hlogo--bar .hlogo-word { font-size: 27px; letter-spacing: -.02em; line-height: 1; }
.hlogo--bar .hlogo-word .h { color: var(--ink); }
.hlogo--bar .hlogo-word .c { color: var(--accent); }
@media (max-width: 900px) {
  .hlogo--bar .hlogo-sym { width: 32px; height: 32px; font-size: 11px; }
  .hlogo--bar .hlogo-word { font-size: 22px; }
}

/* ═══════════ Banco de Dados Visual (o parque da MPD em tabelas) ═══════════ */
.bv-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(15,20,35,.55); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 2vh 2vw; animation: surge .2s ease; }
.bv-modal { width: 100%; height: 96vh; max-width: 1600px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.bv-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.bv-tit { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.bv-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.bv-x { border: none; background: none; font-size: 24px; line-height: 1; color: var(--ink-faint); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.bv-x:hover { background: var(--surface-2); color: var(--ink); }
.bv-corpo { flex: 1; min-height: 0; display: grid; grid-template-columns: 288px 1fr; }
.bv-lista { border-right: 1px solid var(--line); overflow-y: auto; padding: 10px; background: var(--canvas); }
.bv-dom { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint);
  padding: 12px 8px 5px; }
.bv-fonte { display: block; width: 100%; text-align: left; border: 1px solid transparent; background: none; cursor: pointer;
  border-radius: var(--r-sm); padding: 9px 10px; margin-bottom: 2px; transition: .12s; }
.bv-fonte:hover { background: var(--surface); border-color: var(--line); }
.bv-fonte.sel { background: var(--surface); border-color: var(--accent); }
.bv-fn { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.bv-fo { font-size: 11px; color: var(--ink-soft); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bv-sensib { font-size: 10.5px; padding: 1px 6px; border-radius: var(--r-pill); font-weight: 600; }
.bv-baixa { background: var(--ok-wash); color: var(--ok); }
.bv-media { background: var(--warn-wash); color: var(--warn); }
.bv-alta { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.bv-vivo { font-size: 10.5px; color: var(--ok); font-weight: 700; }
.bv-amostra { font-size: 11px; color: var(--warn); font-weight: 600; }
.bv-grade { overflow: auto; padding: 18px 20px; display: flex; flex-direction: column; min-width: 0; }
.bv-ghead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.bv-gtit { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.bv-gsub { font-size: 12px; color: var(--ink-soft); margin-top: 3px; display: flex; align-items: center; gap: 8px; }
.bv-quando { color: var(--ink-faint); }
.bv-usar { white-space: nowrap; }
.bv-endpoint { font-size: 12px; color: var(--ink-soft); background: var(--canvas); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 11px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bv-endpoint code { font-family: var(--mono); font-size: 11.5px; color: var(--accent-ink); }
.bv-chave { color: var(--ink-faint); font-family: var(--mono); font-size: 11px; }
.bv-restrito { font-size: 12px; color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); border-radius: var(--r-sm); padding: 8px 11px; margin-bottom: 10px; }
.bv-tab-wrap { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.bv-tab { border-collapse: collapse; width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.bv-tab th { position: sticky; top: 0; background: var(--surface-2); color: var(--ink-soft); text-align: left; font-weight: 600;
  padding: 8px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; font-family: var(--mono); font-size: 11px; }
.bv-tab td { padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bv-tab tbody tr:hover { background: var(--canvas); }
.bv-mask { font-family: var(--mono); color: var(--danger); letter-spacing: 1px; }
.bv-lock { font-size: 10px; }
.bv-vazio { color: var(--ink-faint); }
.bv-carregando, .bv-aviso { padding: 20px; color: var(--ink-soft); font-size: 13px; }
.bv-aviso { color: var(--warn); }
@media (max-width: 760px) {
  .bv-modal { height: 92vh; }
  .bv-corpo { grid-template-columns: 1fr; grid-template-rows: 40% 60%; }
  .bv-lista { border-right: none; border-bottom: 1px solid var(--line); }
}

/* Banco Visual — extras do espelho do lake (paginação, bloqueadas, índice) */
.bv-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: bvpulse 2s infinite; vertical-align: middle; margin-left: 4px; }
@keyframes bvpulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.bv-fonte code { font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); }
.bv-fonte.bloqueada { cursor: not-allowed; opacity: .6; padding: 9px 10px; }
.bv-fonte.bloqueada .bv-fn { color: var(--ink-soft); font-weight: 500; }
.bv-tab .bv-num { color: var(--ink-faint); font-size: 11px; text-align: right; width: 1%; white-space: nowrap; background: var(--canvas); position: sticky; left: 0; }
.bv-tab th.bv-num { background: var(--surface-2); }
.bv-pag { display: flex; align-items: center; gap: 10px; padding: 10px 2px 2px; }
.bv-pag-info { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.bv-pag .btn-ghost[disabled] { opacity: .4; cursor: default; }
.bv-pag .tier-sel { margin-left: auto; }

/* Banco Visual — barra "pergunte aos dados" + tela cheia */
.bv-ask { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--canvas); }
.bv-ask-ico { font-size: 15px; opacity: .8; }
.bv-ask input { flex: 1; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: var(--r-pill);
  padding: 10px 16px; font-family: inherit; font-size: 13.5px; outline: none; }
.bv-ask input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
.bv-ask .btn { white-space: nowrap; }

/* ═══════════ Histórico de commits (global) ═══════════ */
.hist-modal { max-width: 1000px; }
.hist-tabs { display: flex; gap: 4px; margin-left: auto; margin-right: 8px; background: var(--canvas); padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--line); }
.hist-tab { border: none; background: none; color: var(--ink-soft); font-size: 12.5px; padding: 6px 14px; border-radius: var(--r-pill); cursor: pointer; }
.hist-tab.sel { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.hist-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; }
.hist-sis { margin-bottom: 18px; }
.hist-sis-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 4px 2px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.hist-sis-tit { font-size: 14.5px; font-weight: 700; }
.hist-sis-info { font-size: 11.5px; color: var(--ink-faint); font-family: var(--mono); }
.hist-sis-info a, .hist-sis-cab a { color: var(--accent); text-decoration: none; }
.hist-lista { display: flex; flex-direction: column; }
.hc-item { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.hc-item:hover { background: var(--canvas); }
.hc-quando { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); white-space: nowrap; flex: 0 0 88px; }
.hc-meio { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.hc-tag { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; flex: 0 0 auto; }
.hc-tag.ar { background: var(--ok-wash); color: var(--ok); }
.hc-tag.pub { background: var(--accent-wash); color: var(--accent-ink); }
.hc-tag.rasc { background: var(--surface-2); color: var(--ink-soft); }
.hc-sis { font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; flex: 0 0 auto; }
.hc-msg { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-msg i { color: var(--ink-faint); }
.hc-acoes { display: flex; gap: 6px; flex: 0 0 auto; }
.hc-acoes .btn-ghost { padding: 4px 10px; font-size: 12px; text-decoration: none; }
@media (max-width: 640px) {
  .hist-tabs { order: 3; margin: 6px 0 0; width: 100%; }
  .hc-item { flex-wrap: wrap; }
  .hc-quando { flex-basis: auto; }
}

/* ═══════════ Compartilhar projeto (colaboração) ═══════════ */
.compart-card { width: min(480px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; animation: loginUp .3s cubic-bezier(.2,.8,.2,1); }
.compart-body { padding: 16px 20px 20px; }
.compart-add { display: flex; gap: 8px; margin-bottom: 6px; }
.compart-add input { flex: 1; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  border-radius: var(--r-sm); padding: 9px 12px; font-family: inherit; font-size: 13.5px; outline: none; }
.compart-add input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.compart-erro { color: var(--danger); font-size: 12.5px; margin: 6px 2px; }
.compart-lista { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.cl-dono, .cl-item { display: flex; align-items: center; gap: 8px; padding: 8px 4px; font-size: 13.5px; }
.cl-item { border-top: 1px solid var(--line); }
.cl-dono span:first-of-type, .cl-item span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cl-papel { font-size: 11px; color: var(--ink-soft); background: var(--surface-2); padding: 2px 9px; border-radius: var(--r-pill); flex: 0 0 auto; }
.cl-rm { border: none; background: none; color: var(--danger); font-size: 12px; cursor: pointer; padding: 2px 6px; border-radius: 5px; flex: 0 0 auto; }
.cl-rm:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.cl-vazio { color: var(--ink-faint); font-size: 12.5px; padding: 8px 4px; }
.bi-compart { font-size: 11.5px; color: var(--ink-soft); }
.bi-compart.edit { color: var(--accent); } .bi-compart.ver { color: var(--ink-soft); }

/* ═══════════ Marketplace de aplicativos ═══════════ */
.mkt-modal { max-width: 1100px; }
.mkt-corpo { flex: 1; min-height: 0; overflow-y: auto; padding: 22px; }
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.mkt-card { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; transition: .15s; }
.mkt-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.mkt-ico { font-size: 30px; margin-bottom: 8px; }
.mkt-nome { font-size: 16px; font-weight: 700; }
.mkt-cat { font-size: 11.5px; color: var(--ink-faint); font-family: var(--mono); margin: 2px 0 10px; }
.mkt-cat span { color: var(--ok); font-weight: 600; }
.mkt-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.5; flex: 1; }
.mkt-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0; }
.mkt-tags span { font-size: 10.5px; color: var(--ink-soft); background: var(--surface-2); padding: 2px 8px; border-radius: var(--r-pill); }
.mkt-usar { width: 100%; margin-top: auto; }

/* ═══════════ Menu ⋯ da topbar (junta os botões num dropdown) ═══════════ */
.menu-wrap { position: relative; }
.menu-trigger { font-size: 17px; line-height: 1; padding: 6px 13px; letter-spacing: 1px; }
.menu-trigger.aberto { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }
.menu-drop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; min-width: 220px; display: flex; flex-direction: column; gap: 1px; animation: menuDrop .14s ease; }
@keyframes menuDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.menu-rot { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); padding: 8px 12px 4px; }
.menu-drop .btn-ghost, .menu-drop .dossie-toggle { display: flex; align-items: center; gap: 8px; justify-content: flex-start; text-align: left; width: 100%;
  border: none; background: none; padding: 9px 12px; border-radius: var(--r-sm); font-size: 13.5px; color: var(--ink); }
.menu-drop .btn-ghost:hover, .menu-drop .dossie-toggle:hover { background: var(--surface-2); color: var(--ink); border: none; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-info { font-size: 11.5px; color: var(--ink-faint); padding: 6px 12px; }
.menu-info b { color: var(--ink-soft); }
.menu-info.tenant { background: none; border: none; border-radius: 0; }

/* ═══════════ Conversa em timeline (estilo Claude Code) ═══════════ */
.bolha.turno { display: block; }                       /* sobrepõe o flex do avatar */
.turno-passos { position: relative; padding-left: 26px; display: flex; flex-direction: column; gap: 12px; }
.turno-passos::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.passo { position: relative; font-size: 14px; color: var(--ink); line-height: 1.5; }
.passo::before { content: ""; position: absolute; left: -26px; top: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong); box-sizing: border-box; z-index: 1; }
.passo.ativo::before { border-color: var(--accent); background: var(--accent); animation: pulsoPasso 1.2s ease-in-out infinite; }
@keyframes pulsoPasso { 0%,100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 5px var(--accent-wash); } }
.passo.pensou { color: var(--ink-faint); font-size: 12.5px; font-family: var(--mono); letter-spacing: .01em; }
.passo.pensou.ativo { color: var(--accent); }
.passo.ferr { font-size: 13px; color: var(--ink-soft); }
.passo.ferr b { color: var(--accent); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; margin-right: 5px; }
.passo.codando { color: var(--accent); font-weight: 600; font-size: 13.5px; }
.passo.codando::before { border-color: var(--accent); }
.passo.texto .txt { font-size: 15px; color: var(--ink); }
.passo.erro-passo { color: var(--danger); font-size: 13.5px; }
.passo.erro-passo::before { border-color: var(--danger); background: var(--danger); }
.passo.narr { font-size: 14.5px; color: var(--ink); }
.passo.narr code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.passo.narr strong { color: var(--accent-ink); font-weight: 650; }

/* ═══════════ Terminal ao vivo — o código se formando enquanto o Bob monta ═══════════ */
.gerando { overflow-y: auto; max-height: 100%; padding: 18px; }
.prog-code.ao-vivo { width: min(96%, 620px); max-height: min(52vh, 420px); min-height: 200px; overflow-y: auto;
  background: #0a0e1a; color: #b8e6c8; font-size: 11.5px; line-height: 1.55; border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-lg), inset 0 0 40px rgba(0,0,0,.3); padding: 34px 16px 16px; position: relative; }
/* barrinha de "terminal" (3 pontos) */
.prog-code.ao-vivo::before { content: "● ● ●"; position: absolute; top: 0; left: 0; right: 0; height: 24px;
  background: #11162a; color: #4b5a7a; font-size: 9px; letter-spacing: 3px; line-height: 24px; padding-left: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06); border-radius: 12px 12px 0 0; }
.prog-code.ao-vivo::after { content: "▋"; color: #6CCB94; animation: blinkCur 1s steps(1) infinite; }

/* ═══════════ Arrastar-e-soltar arquivo na conversa ═══════════ */
.conversa-lado { position: relative; }
.drop-zona { position: absolute; inset: 10px; z-index: 30; border: 2px dashed var(--accent); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--accent-wash) 82%, transparent); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; pointer-events: none; animation: surge .15s ease; }
.dz-cartao { text-align: center; color: var(--accent-ink); font-weight: 700; font-size: 15.5px; }
.dz-cartao span { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 400; margin-top: 5px; }

/* ═══════════ Anexar imagem: logo ou recriar/referência (visão) ═══════════ */
.img-escolha { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-width: 420px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.ie-tit { font-size: 14px; color: var(--ink); }
.ie-preview { width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.ie-preview img { display: block; width: 100%; max-height: 220px; object-fit: contain; background: var(--canvas); }
.ie-botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.ie-botoes .btn, .ie-botoes .btn-ghost { font-size: 13px; padding: 8px 14px; }

/* ✨ botão refinar (destaque sutil no acento) */
.btn-refinar { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line-strong)); }
.btn-refinar:hover { background: var(--accent-wash); border-color: var(--accent); color: var(--accent-strong); }
