/* Cortex Sapiens. Sistema visual: monocromático, Geist, cartões de 24px, controles em pílula de 18px.
   Cor só aparece como sinal de gravidade (ponto pequeno), nunca como decoração. */
:root {
  --canvas: #f5f5f5; --paper: #ffffff; --alt: #fafafa; --ink: #0a0a0a; --ink-soft: #171717;
  --mid: #737373; --hair: #e5e5e5; --ember: #e7000b;
  --st-vermelho: #e7000b; --st-amarelo: #d97706; --st-verde: #16a34a; --st-pendente: #a3a3a3;
  --r-card: 24px; --r-ctl: 18px; --r-nested: 10px; --r-sm: 6px;
  --shadow: 0 0 0 1px rgba(23, 23, 23, .05), 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
  --shadow-pop: 0 0 0 1px rgba(23, 23, 23, .06), 0 16px 48px -12px rgba(0, 0, 0, .22), 0 4px 12px -4px rgba(0, 0, 0, .08);
  --font: 'Geist', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink); font: 400 14px/1.43 var(--font);
  font-feature-settings: 'ss01' on, 'cv11' on; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 36px; line-height: 1.11; letter-spacing: -.9px; font-weight: 600; }
h2 { font-size: 24px; line-height: 1.33; letter-spacing: -.6px; font-weight: 600; }
h3 { font-size: 16px; line-height: 1.5; font-weight: 600; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
.num { font-variant-numeric: tabular-nums; }
.mid { color: var(--mid); }
.cap { font-size: 12px; line-height: 1.33; letter-spacing: .6px; text-transform: uppercase; color: var(--mid); font-weight: 500; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--ink); color: var(--alt); }

/* ---------- estrutura ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.lado {
  background: var(--alt); border-right: 1px solid var(--hair); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.marca { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.marca-selo { width: 28px; height: 28px; border-radius: 9px; background: var(--ink); color: var(--alt); display: grid; place-items: center; }
.marca b { font-weight: 600; letter-spacing: -.3px; font-size: 15px; }
.marca span { display: block; font-size: 12px; color: var(--mid); line-height: 1.2; }
/* a busca mora no centro do topo da Visão geral: um botão com cara de campo, que abre a busca rápida no mesmo lugar */
.topo-centro { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 440px)); }
.topo-centro:empty { display: none; }
.busca-gatilho {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 8px 0 14px; border: 0; border-radius: var(--r-ctl);
  background: var(--paper); color: var(--mid); box-shadow: var(--shadow); text-align: left; transition: color .15s, box-shadow .15s;
}
.busca-gatilho:hover { color: var(--ink); box-shadow: var(--shadow), 0 4px 14px -6px rgba(0, 0, 0, .18); }
.busca-gatilho span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.busca-gatilho kbd { font: 500 11px var(--font); background: var(--canvas); border: 1px solid var(--hair); border-radius: 6px; padding: 1px 6px; color: var(--mid); }
.nav a {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 12px; color: var(--mid); font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--canvas); color: var(--ink); }
.nav a.ativo { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.nav a .cont { margin-left: auto; }
.lado-fim { margin-top: auto; display: grid; gap: 8px; }
.eu { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; border: 0; background: none; width: 100%; text-align: left; transition: background .15s; }
.eu:hover { background: var(--canvas); }
.eu b { display: block; font-weight: 500; line-height: 1.2; }
.eu span { font-size: 12px; color: var(--mid); }
.palco { min-width: 0; }
.topo {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 32px;
  background: rgba(245, 245, 245, .82); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topo.rolou { border-bottom-color: var(--hair); }
.trilha { display: flex; align-items: center; gap: 6px; color: var(--mid); min-width: 0; }
.trilha a:hover { color: var(--ink); }
.trilha .aqui { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topo .acoes { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.conteudo { max-width: 1280px; margin: 0 auto; padding: 24px 32px 80px; }
.cabeca { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.cabeca p { color: var(--mid); margin-top: 6px; font-size: 16px; line-height: 1.5; }

/* ---------- movimento ---------- */
@keyframes sobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes surge { from { opacity: 0; } to { opacity: 1; } }
@keyframes brilho { to { background-position: -200% 0; } }
@keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 35%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
.entra { animation: sobe .42s var(--ease) both; }
.cascata > * { animation: sobe .46s var(--ease) both; }
.cascata > *:nth-child(2) { animation-delay: .04s; } .cascata > *:nth-child(3) { animation-delay: .08s; }
.cascata > *:nth-child(4) { animation-delay: .12s; } .cascata > *:nth-child(5) { animation-delay: .16s; }
.cascata > *:nth-child(6) { animation-delay: .2s; } .cascata > *:nth-child(n+7) { animation-delay: .24s; }
.esqueleto { border-radius: 12px; background: linear-gradient(90deg, #ececec 25%, #f6f6f6 37%, #ececec 63%) 0 0 / 200% 100%; animation: brilho 1.2s linear infinite; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- componentes ---------- */
.cartao { background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px; }
.cartao.sem { padding: 0; overflow: hidden; }
.cartao-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--hair); }
.cartao-topo h3 { display: flex; align-items: center; gap: 8px; }
.vazio { padding: 40px 20px; text-align: center; color: var(--mid); display: grid; gap: 12px; justify-items: center; }
.vazio .selo { width: 44px; height: 44px; border-radius: 14px; background: var(--canvas); display: grid; place-items: center; color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-ctl);
  border: 1px solid transparent; background: var(--canvas); color: var(--ink); font-weight: 500; white-space: nowrap;
  transition: background .15s, transform .12s var(--ease), border-color .15s, opacity .15s;
}
.btn:hover { background: #ebebeb; }
.btn:active { transform: scale(.97); }
.btn.cheio { background: var(--ink); color: var(--alt); }
.btn.cheio:hover { background: #262626; }
.btn.contorno { background: transparent; border-color: var(--hair); }
.btn.contorno:hover { background: var(--canvas); }
.btn.perigo { color: var(--ember); }
.btn.pq { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.icone { width: 36px; padding: 0; }
.btn.pq.icone { width: 30px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.campo { display: grid; gap: 6px; }
.campo > span { font-weight: 500; font-size: 13px; }
.campo small { color: var(--mid); font-size: 12px; }
.entrada, .campo input, .campo select, .campo textarea {
  width: 100%; min-height: 36px; padding: 8px 12px; border-radius: var(--r-ctl); border: 1px solid transparent; background: var(--canvas); outline: none;
  transition: background .15s, border-color .15s;
}
.campo textarea { border-radius: 16px; resize: vertical; min-height: 84px; line-height: 1.5; }
.entrada:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { background: var(--paper); border-color: var(--hair); box-shadow: 0 0 0 3px rgba(10, 10, 10, .06); }
.entrada::placeholder, .campo input::placeholder, .campo textarea::placeholder { color: var(--mid); }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: inline-flex; background: var(--canvas); border-radius: var(--r-ctl); padding: 3px; gap: 2px; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 15px; background: none; color: var(--mid); font-weight: 500; font-size: 13px; transition: background .18s, color .18s, box-shadow .18s; }
.seg button.ativo { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
/* seletor que ocupa a largura do cartão: os botões dividem o espaço e, se não couberem, quebram de linha dentro dele */
.seg.cheia { display: flex; flex-wrap: wrap; width: 100%; }
.seg.cheia button { flex: 1 1 0; min-width: 40px; padding: 0 4px; }

.etq { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-ctl); font-size: 12px; font-weight: 500; background: var(--canvas); color: var(--ink-soft); white-space: nowrap; }
.etq.cheia { background: var(--ink-soft); color: var(--alt); }
.etq.contorno { background: transparent; box-shadow: inset 0 0 0 1px var(--hair); }
.ponto { width: 7px; height: 7px; border-radius: 50%; background: var(--st-pendente); flex: none; }
.ponto.vermelho { background: var(--st-vermelho); color: var(--st-vermelho); } .ponto.amarelo { background: var(--st-amarelo); color: var(--st-amarelo); }
.ponto.verde { background: var(--st-verde); color: var(--st-verde); } .ponto.vivo { animation: pulso 2s ease-in-out infinite; }
.cont { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: var(--alt); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink-soft); color: var(--alt); display: inline-grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; box-shadow: 0 0 0 2px var(--paper); }
.avatar.claro { background: var(--canvas); color: var(--ink); }
.avatar.g { width: 36px; height: 36px; font-size: 13px; }
.pilha { display: inline-flex; } .pilha .avatar + .avatar { margin-left: -8px; }

/* barra de gravidade: proporção de vermelho, amarelo e verde */
.barra { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--canvas); gap: 2px; min-width: 90px; }
.barra i { display: block; height: 100%; border-radius: 3px; width: 0; transition: width .9s var(--ease); }
.barra .vermelho { background: var(--st-vermelho); } .barra .amarelo { background: var(--st-amarelo); } .barra .verde { background: var(--ink); } .barra .pendente { background: #d4d4d4; }

/* ---------- painel ---------- */
.stats { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); }
a.stat { transition: background .15s; } a.stat:hover { background: var(--alt); }
.stat b { display: flex; align-items: center; gap: 10px; } .stat b .ponto { width: 9px; height: 9px; }
.stat { padding: 20px 24px; border-left: 1px solid var(--hair); display: grid; gap: 6px; }
.stat:first-child { border-left: 0; }
.stat b { font-size: 36px; line-height: 1.11; letter-spacing: -.9px; font-weight: 600; }
.stat small { color: var(--mid); display: flex; align-items: center; gap: 6px; }
/* número zerado continua no lugar, mas apagado: o olho vai para o que pede atenção */
.grade-painel { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.linha {
  display: grid; grid-template-columns: minmax(0, 1fr) 190px 120px 20px; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--hair);
  transition: background .15s;
}
.linha:last-child { border-bottom: 0; }
a.linha:hover { background: var(--alt); }
a.linha:hover .seta { transform: translateX(3px); color: var(--ink); }
.seta { color: #c4c4c4; transition: transform .2s var(--ease), color .2s; }
.linha .nome b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a segunda linha do nome; a letra da empresa sem logo e as iniciais da pessoa também são span e não entram aqui */
.linha .nome span:where(:not(.logo, .avatar)) { font-size: 12px; color: var(--mid); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed { display: grid; }
.feed li { list-style: none; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 20px; position: relative; }
.feed li::before { content: ''; position: absolute; left: 33px; top: 38px; bottom: -10px; width: 1px; background: var(--hair); }
.feed li:last-child::before { display: none; }
.feed ul { margin: 0; padding: 6px 0; }
.feed .quem { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--canvas); font-size: 11px; font-weight: 600; z-index: 1; }
.feed .quem.maq { background: var(--ink); color: var(--alt); }
.feed p { line-height: 1.4; } .feed small { color: var(--mid); font-size: 12px; }

/* ---------- mandatos ---------- */
.ferramentas { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.ferramentas .entrada { max-width: 300px; background: var(--paper); border-color: var(--hair); }
.grade-mandatos { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.mandato { display: grid; gap: 14px; transition: transform .25s var(--ease), box-shadow .25s; position: relative; }
a.mandato:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.mandato .topo-m { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.mandato h3 { font-size: 18px; letter-spacing: -.4px; }
.mandato .pe { display: flex; justify-content: space-between; align-items: center; color: var(--mid); font-size: 12px; }
.mandato.restrito { background: var(--alt); box-shadow: none; }
.prontidao { display: flex; align-items: baseline; gap: 6px; }
.prontidao b { font-size: 30px; letter-spacing: -.75px; line-height: 1.2; font-weight: 600; }

/* ---------- mandato ---------- */
.trilho { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0 24px; }
.trilho div { display: grid; gap: 8px; color: var(--mid); font-size: 13px; font-weight: 500; }
.trilho i { display: block; height: 4px; border-radius: 2px; background: var(--hair); position: relative; overflow: hidden; }
.trilho i::after { content: ''; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.trilho .feito i::after, .trilho .agora i::after { transform: scaleX(1); }
.trilho .agora { color: var(--ink); } .trilho .feito { color: var(--ink-soft); }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--hair); margin-bottom: 20px; position: relative; }
.abas a { padding: 10px 12px; color: var(--mid); font-weight: 500; position: relative; transition: color .15s; }
.abas a:hover { color: var(--ink); }
.abas a.ativo { color: var(--ink); }
.abas a.ativo::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; animation: surge .25s; }
.faixa { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--paper); border: 1px solid var(--hair); margin-bottom: 16px; }
.faixa .txt { flex: 1; min-width: 0; } .faixa .txt p { color: var(--mid); margin-top: 2px; }

.rel { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.anel { position: relative; width: 168px; height: 168px; margin: 4px auto 12px; }
.anel svg { transform: rotate(-90deg); }
.anel circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.anel .fundo { stroke: var(--canvas); }
.anel .valor { stroke: var(--ink); transition: stroke-dashoffset 1.1s var(--ease); }
.anel .meio { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.anel .meio b { font-size: 44px; letter-spacing: -2px; font-weight: 600; line-height: 1; }
.anel .meio span { color: var(--mid); font-size: 12px; margin-top: 4px; }
.filtros { display: grid; gap: 4px; margin-top: 8px; }
.filtros button { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; background: none; border-radius: 12px; text-align: left; transition: background .15s; }
.filtros button:hover { background: var(--canvas); }
.filtros button.ativo { background: var(--canvas); font-weight: 500; }
.filtros button b { margin-left: auto; font-weight: 500; }
.filtros button.zero { color: #b4b4b4; }
.filtros button.zero .ponto { opacity: .35; }
.achados { display: grid; gap: 10px; }
.achado { background: var(--paper); border: 1px solid var(--hair); border-radius: 20px; overflow: hidden; transition: box-shadow .25s, border-color .2s; }
.achado.aberto { box-shadow: var(--shadow-pop); }
.achado > button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left; }
.achado > button:hover { background: var(--alt); }
.achado .tit { flex: 1; min-width: 0; font-weight: 500; }
.achado.resolvido .tit { color: var(--mid); text-decoration: line-through; text-decoration-color: #c4c4c4; }
.achado .chev { color: var(--mid); transition: transform .25s var(--ease); }
.achado.aberto .chev { transform: rotate(90deg); }
.dobra { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--ease); }
.achado.aberto .dobra { grid-template-rows: 1fr; }
.dobra > div { overflow: hidden; }
.miolo { padding: 4px 16px 16px 35px; display: grid; gap: 14px; }
.miolo .tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.miolo p { color: var(--ink-soft); line-height: 1.5; }
.fichas { display: flex; flex-wrap: wrap; gap: 8px; }
.ficha { background: var(--canvas); border-radius: 12px; padding: 8px 12px; display: grid; gap: 2px; }
.ficha small { color: var(--mid); font-size: 12px; } .ficha b { font-weight: 600; }
.nota { background: var(--alt); border: 1px solid var(--hair); border-radius: 14px; padding: 12px 14px; display: grid; gap: 4px; }
.grupo-tit { display: flex; align-items: center; gap: 8px; margin: 14px 2px 2px; }
.grupo-tit:first-child { margin-top: 0; }

/* ---------- análise ---------- */
.inds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.ind { display: grid; gap: 4px; padding: 16px 18px; }
.ind b { font-size: 24px; letter-spacing: -.6px; font-weight: 600; line-height: 1.33; }
.ind .var { font-size: 12px; color: var(--mid); display: flex; gap: 6px; align-items: center; }
.ind svg { margin-top: 6px; overflow: visible; }
.ind svg path { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 300; stroke-dashoffset: 300; animation: traco 1.1s var(--ease) .15s forwards; }
@keyframes traco { to { stroke-dashoffset: 0; } }
.colunas { display: flex; align-items: flex-end; gap: 28px; height: 190px; padding: 8px 4px 0; }
.colunas .grupo { flex: 1; display: grid; gap: 8px; justify-items: center; height: 100%; grid-template-rows: 1fr auto; }
.colunas .hastes { display: flex; align-items: flex-end; gap: 6px; height: 100%; width: 100%; justify-content: center; }
.haste { width: 26px; border-radius: 8px 8px 3px 3px; background: var(--ink); height: 0; transition: height .9s var(--ease); position: relative; }
.haste.b { background: #a3a3a3; } .haste.c { background: #d4d4d4; } .haste.neg { background: var(--st-vermelho); }
.haste:hover::after { content: attr(data-dica); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--alt); padding: 4px 8px; border-radius: 8px; font-size: 12px; white-space: nowrap; z-index: 2; animation: surge .15s; }
.legenda { display: flex; gap: 14px; color: var(--mid); font-size: 12px; } .legenda i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.tab { width: 100%; border-collapse: collapse; }
.tab th { text-align: right; font-size: 12px; font-weight: 500; color: var(--mid); padding: 10px 14px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.tab th:first-child, .tab td:first-child { text-align: left; padding-left: 20px; }
.tab td { padding: 9px 14px; text-align: right; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.tab tr:last-child td { border-bottom: 0; }
.tab tr.tot td { font-weight: 600; background: var(--alt); }
.tab tr.sub td:first-child { padding-left: 34px; color: var(--ink-soft); }
.tab tbody tr:hover td { background: var(--alt); }
.tab small { color: var(--mid); font-size: 12px; margin-left: 8px; display: inline-block; min-width: 46px; }
.sobe { color: var(--st-verde); } .desce { color: var(--st-vermelho); }
.rolagem { overflow-x: auto; }

/* ---------- importação ---------- */
.passos { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; color: var(--mid); font-weight: 500; }
.passos span { display: flex; align-items: center; gap: 8px; } .passos .ativo { color: var(--ink); }
.passos em { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--hair); display: grid; place-items: center; font-size: 12px; }
.passos .ativo em, .passos .feito em { background: var(--ink); color: var(--alt); }
.passos i { flex: 0 0 32px; height: 1px; background: var(--hair); }
.origens { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.solte {
  border: 1.5px dashed #d4d4d4; border-radius: 20px; padding: 32px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; color: var(--mid);
  transition: border-color .2s, background .2s, transform .2s var(--ease); cursor: pointer;
}
.solte:hover, .solte.sobre { border-color: var(--ink); background: var(--alt); color: var(--ink); }
.solte.sobre { transform: scale(1.01); }
.classif { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.classif .lateral { position: sticky; top: 76px; display: grid; gap: 16px; }
.tab-c td, .tab-c th { padding: 6px 10px; }
.tab-c td:first-child { white-space: normal; min-width: 200px; max-width: 320px; }
.tab-c select { height: 30px; min-height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid transparent; background: var(--canvas); max-width: 300px; outline: none; }
.tab-c select:focus { border-color: var(--hair); background: var(--paper); }
.tab-c tr.ign td { color: #a3a3a3; } .tab-c tr.ign select { color: var(--mid); }
.tab-c tr.rev td:first-child { box-shadow: inset 3px 0 0 var(--st-amarelo); }
.tab-c input.per { width: 90px; text-align: right; height: 28px; min-height: 28px; border-radius: 14px; border: 1px solid transparent; background: var(--canvas); padding: 0 10px; font-weight: 500; outline: none; }
.conf { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.conf:last-child { border-bottom: 0; padding-bottom: 0; } .conf:first-child { padding-top: 0; }
.conf .lin { display: flex; justify-content: space-between; gap: 8px; } .conf .lin span { color: var(--mid); }
.conf .ok { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* ---------- sobreposições ---------- */
.veu { position: fixed; inset: 0; background: rgba(10, 10, 10, .28); backdrop-filter: blur(2px); z-index: 40; animation: surge .2s; }
.gaveta {
  position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(460px, calc(100vw - 24px)); background: var(--paper); border-radius: var(--r-card); z-index: 41;
  box-shadow: var(--shadow-pop); display: flex; flex-direction: column; animation: desliza .36s var(--ease);
}
@keyframes desliza { from { transform: translateX(24px); opacity: 0; } }
.gaveta header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--hair); }
.gaveta .corpo { padding: 20px; overflow: auto; display: grid; gap: 16px; align-content: start; flex: 1; }
.gaveta footer { padding: 14px 20px; border-top: 1px solid var(--hair); display: flex; justify-content: flex-end; gap: 8px; }
/* confirmação do próprio sistema (confirmar() em nucleo.js): fica por cima da gaveta */
.veu.acima { z-index: 55; }
.dialogo { position: fixed; left: 50%; top: 28vh; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); background: var(--paper); border-radius: 22px; box-shadow: var(--shadow-pop); z-index: 56; padding: 24px; display: grid; gap: 14px; animation: cresce .22s var(--ease); }
.dialogo h3 { font-size: 18px; letter-spacing: -.3px; } .dialogo .fim { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.paleta { position: fixed; left: 50%; top: 16vh; width: min(580px, calc(100vw - 32px)); transform: translateX(-50%); background: var(--paper); border-radius: 22px; box-shadow: var(--shadow-pop); z-index: 51; overflow: hidden; animation: cresce .22s var(--ease); }
@keyframes cresce { from { opacity: 0; transform: translateX(-50%) scale(.97) translateY(-6px); } }
.paleta input { width: 100%; height: 52px; border: 0; outline: none; padding: 0 18px 0 46px; font-size: 16px; background: none; }
.paleta .lupa { position: absolute; left: 18px; top: 17px; color: var(--mid); }
.paleta ul { margin: 0; padding: 6px; max-height: 340px; overflow: auto; border-top: 1px solid var(--hair); }
.paleta li { list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; color: var(--ink-soft); cursor: pointer; }
.paleta li.sel { background: var(--canvas); color: var(--ink); }
.paleta li small { margin-left: auto; color: var(--mid); }
.avisos { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 8px; justify-items: end; }
.aviso { background: var(--ink); color: var(--alt); padding: 10px 14px; border-radius: 16px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow-pop); animation: sobe .3s var(--ease); max-width: 420px; }
.aviso .ponto { background: #4ade80; } .aviso.erro .ponto { background: var(--ember); } .aviso.nota .ponto { background: #fbbf24; }
.aviso.sai { opacity: 0; transform: translateY(6px); transition: all .25s; }

/* ---------- entrada ---------- */
.porta { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.porta .manifesto {
  padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background-image: radial-gradient(#dcdcdc 1px, transparent 1px); background-size: 22px 22px; background-position: -1px -1px;
}
/* na entrada a marca aparece maior: é a primeira coisa que a pessoa vê */
.porta .manifesto .marca { gap: 12px; padding-left: 0; }
.porta .manifesto .marca-selo { width: 40px; height: 40px; border-radius: 12px; }
.porta .manifesto .marca b { font-size: 17px; }
.porta .manifesto h1 { font-size: 48px; line-height: 1.1; letter-spacing: -2.4px; max-width: 11em; }
.porta .manifesto p { color: var(--mid); font-size: 18px; line-height: 1.56; max-width: 30em; margin-top: 16px; }
.porta ul { margin: 0; padding: 0; display: grid; gap: 10px; }
.porta li { list-style: none; display: flex; gap: 10px; align-items: center; color: var(--ink-soft); }
.porta .lado-b { background: var(--paper); border-left: 1px solid var(--hair); display: grid; place-items: center; padding: 32px; }
.porta .caixa { width: min(380px, 100%); display: grid; gap: 18px; }
.pessoas { display: grid; gap: 6px; }
.pessoa { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--hair); background: var(--paper); text-align: left; transition: background .15s, transform .2s var(--ease), border-color .15s; }
.pessoa:hover { background: var(--alt); border-color: #d4d4d4; transform: translateX(3px); }
.pessoa b { display: block; font-weight: 500; } .pessoa span { color: var(--mid); font-size: 12px; }
.pessoa .seta { margin-left: auto; }
.erro-txt { color: var(--ember); font-size: 13px; }
/* permitir a conexão do assistente (web/autorizar.html) */
.aut-quem { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--hair); }
.aut-quem b { display: block; font-weight: 500; } .aut-quem span { color: var(--mid); font-size: 12px; }
.aut-fim { display: flex; justify-content: flex-end; gap: 8px; }
/* Claude da equipe: endereço, chave e conexões (na conta da pessoa e na Administração) */
.cla-codigo {
  flex: 1 1 220px; min-width: 0; font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace; font-size: 12px; line-height: 1.5; color: var(--ink-soft);
  background: var(--alt); border: 1px solid var(--hair); border-radius: 8px; padding: 6px 8px; overflow-wrap: anywhere; user-select: all;
}
.cla-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.cla-item:last-child { border-bottom: 0; }
.cla-item .nome { display: grid; flex: 1; min-width: 0; }
.cla-item .nome b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cla-item .nome span { font-size: 12px; color: var(--mid); line-height: 1.45; overflow-wrap: anywhere; }
#conta-claude .btn .ponto { margin-right: 2px; }

/* telas médias: a barra lateral vira um trilho de ícones */
@media (max-width: 1100px) {
  .app { grid-template-columns: 64px minmax(0, 1fr); }
  .lado { padding: 16px 10px; align-items: center; }
  .lado .rot { display: none; }
  .marca { padding: 6px 0 14px; }
  .nav a, .lado-fim .btn { width: 44px; padding: 0; justify-content: center; }
  .nav { display: grid; gap: 4px; } .nav a { position: relative; }
  .nav a .cont { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  .eu { padding: 4px; justify-content: center; }
  .conteudo { padding: 20px 20px 60px; } .topo { padding: 0 20px; }
  .grade-painel, .classif { grid-template-columns: 1fr; }
  .classif .lateral { position: static; order: -1; }
  .rel { grid-template-columns: 240px minmax(0, 1fr); }
  .inds { grid-template-columns: 1fr 1fr; }
  .miolo .tres { grid-template-columns: 1fr; gap: 12px; }
  .linha { grid-template-columns: minmax(0, 1fr) 170px 20px; } .linha > div:nth-child(3) { display: none; }
  .porta .manifesto { padding: 32px; } .porta .manifesto h1 { font-size: 36px; letter-spacing: -.9px; }
  .stat { padding: 16px; } .stat b { font-size: 30px; }
}
@media (max-width: 720px) {
  .rel, .porta, .origens, .duas { grid-template-columns: 1fr; }
  .rel > aside { position: static !important; }
  .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--hair); }
  .linha { grid-template-columns: minmax(0, 1fr) 20px; } .linha .some { display: none; }
  .porta .lado-b { border-left: 0; border-top: 1px solid var(--hair); }
  h1 { font-size: 30px; letter-spacing: -.75px; }
  /* tela estreita: a busca do topo vira um botão só com a lupa, no meio do caminho entre a trilha e as ações */
  .topo-centro { position: static; transform: none; width: auto; margin-left: auto; }
  .busca-gatilho { width: 38px; padding: 0; justify-content: center; }
  .busca-gatilho span, .busca-gatilho kbd { display: none; }
}
@media print {
  .lado, .topo, .abas, .trilho, .btn, .filtros, .avisos, .nao-imprime { display: none !important; }
  body { background: #fff; } .app { display: block; } .conteudo { padding: 0; max-width: none; }
  .cartao, .achado { box-shadow: none; break-inside: avoid; } .rel { grid-template-columns: 1fr; }
  .dobra { grid-template-rows: 1fr !important; } .achado.interno { display: none; }
}

/* o atributo hidden vence qualquer display definido acima */
[hidden] { display: none !important; }

/* ---------- coleta de documentos ---------- */
.arqs { display: grid; gap: 6px; }
.arq { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--canvas); flex-wrap: wrap; }
.arq > a:first-child, .arq > span:first-child { display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; flex: 1 1 200px; }
.arq > a:first-child:hover { text-decoration: underline; }
.arq > a:first-child span, .arq > span:first-child span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arq small { font-size: 12px; }
.feed .quem.cli { background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair); }
.codigo-grande { font-size: 30px; letter-spacing: 6px; font-weight: 600; }
.miolo .solte { padding: 18px 16px; gap: 4px; border-radius: 16px; }
.miolo .solte b { display: flex; align-items: center; gap: 8px; }
.miolo .solte span { font-size: 12px; }

/* ---------- portal do cliente ---------- */
.cli-corpo { background-image: radial-gradient(#dcdcdc 1px, transparent 1px); background-size: 22px 22px; background-attachment: fixed; }
.cli-centro { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px 16px; }
.cli-caixa { width: min(400px, calc(100vw - 32px)); display: grid; gap: 20px; padding: 28px; }
.cli-caixa .marca { padding: 0; }
.cli-pe { font-size: 12px; display: flex; gap: 6px; align-items: center; justify-content: center; text-align: center; margin-top: 24px; }
.cli-centro .cli-pe { margin-top: 0; }
.codigo-in { text-align: center; font-size: 28px !important; letter-spacing: 10px; font-weight: 600; height: 60px; padding-left: 22px !important; }
.codigo-in::placeholder { color: #d4d4d4 !important; }
.cli-topo { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; background: rgba(245, 245, 245, .86); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--hair); }
.cli-topo .marca { padding: 0; }
.cli-pagina { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
.cli-progresso { margin-top: 20px; display: grid; gap: 12px; }
.cli-progresso .legenda { flex-wrap: wrap; }
.cli-valuation { margin-top: 20px; display: grid; gap: 6px; }
.cli-valuation summary { cursor: pointer; color: var(--mid); font-size: 13px; width: fit-content; margin-top: 6px; }
.cli-valuation ul { margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.cli-valuation li { list-style: none; display: flex; justify-content: space-between; gap: 12px; color: var(--mid); font-size: 13px; }
.cli-valuation li b { color: var(--ink); font-weight: 500; }

/* ---------- cruzamento ---------- */
.selo-p { width: 36px; height: 36px; border-radius: 12px; background: var(--canvas); display: grid; place-items: center; color: var(--ink); }
.colunas.finas { gap: 10px; height: 200px; }
.colunas.finas .hastes { gap: 3px; }
.colunas.finas .haste { width: 100%; max-width: 14px; border-radius: 5px 5px 2px 2px; }
.haste.vazia { height: 3px !important; background: repeating-linear-gradient(90deg, #d4d4d4 0 3px, transparent 3px 6px); border-radius: 2px; }
.cli-correcao { margin-top: 20px; display: grid; gap: 14px; }
.cli-correcao .miolo { padding-left: 35px; }
@media (max-width: 720px) { .colunas.finas { gap: 4px; } .cli-correcao .miolo { padding-left: 16px; } }

/* ---------- foto de pessoa e logo de empresa ---------- */
img.avatar, img.quem { object-fit: cover; background: var(--canvas); }
.avatar.xg { width: 64px; height: 64px; font-size: 20px; box-shadow: 0 0 0 1px var(--hair); }
.logo { width: 40px; height: 40px; border-radius: 12px; flex: none; object-fit: cover; background: var(--paper); box-shadow: 0 0 0 1px var(--hair); display: inline-grid; place-items: center; overflow: hidden; }
.logo.mono { background: var(--canvas); color: var(--ink-soft); font-weight: 600; font-size: 16px; letter-spacing: 0; }
.logo.g { width: 60px; height: 60px; border-radius: 18px; font-size: 24px; }
.logo.p { width: 28px; height: 28px; border-radius: 9px; font-size: 12px; }
.cl { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cl > div { min-width: 0; }
.cabeca .cl { gap: 16px; align-items: flex-start; }
.logo-troca { position: relative; cursor: pointer; display: inline-flex; border-radius: 18px; }
.logo-troca i { position: absolute; right: -5px; bottom: -5px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--alt); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--canvas); opacity: 0; transform: scale(.8); transition: opacity .15s, transform .18s var(--ease); }
.logo-troca:hover i, .logo-troca:focus-within i { opacity: 1; transform: none; }
.logo-troca:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.consultor { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.consultor b { display: block; font-weight: 500; } .consultor span { color: var(--mid); font-size: 13px; }

/* ---------- navegação por grupos ---------- */
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 2px 6px; scrollbar-width: thin; scrollbar-color: #dcdcdc transparent; }
.nav a { height: 34px; }
/* navegação mais alta que a tela: o pé esmaece enquanto houver item abaixo (e a tela aberta nunca para debaixo do esmaecido) */
.nav { scroll-padding-block: 8px 48px; }
.nav.tem-mais { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); }
.nav-grupo { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; padding: 12px 10px 4px; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: #8f8f8f; font-weight: 500; text-align: left; }
.nav-grupo:hover { color: var(--ink); }
.nav-grupo svg { transform: rotate(90deg); transition: transform .2s var(--ease); opacity: .7; }
.nav-grupo[aria-expanded="false"] svg { transform: none; }
/* grupo recolhido que guarda a tela aberta: o nome escurece e ganha um ponto, para a pessoa saber onde está */
.nav-grupo.tem-ativo { color: var(--ink); }
.nav-grupo.tem-ativo[aria-expanded="false"] .rot::after { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); margin-left: 8px; vertical-align: middle; }
.nav-itens { display: grid; gap: 2px; }
.nav-itens.fechado { display: none; }
.lado-fim { padding-top: 8px; }
.abas { overflow-x: auto; scrollbar-width: none; } .abas::-webkit-scrollbar { display: none; } .abas a { white-space: nowrap; }
/* em tela estreita a fileira de abas rola de lado: a borda direita esmaece para avisar que há mais abas, e a folga no
   fim deixa a última aba inteira à vista quando a fileira chega ao fim */
@media (max-width: 900px) {
  .abas { padding-right: 36px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
}
@media (max-width: 1100px) {
  .nav { margin: 0; padding: 2px 0; scrollbar-width: none; align-content: start; justify-items: center; } .nav::-webkit-scrollbar { display: none; }
  .nav-grupo { padding: 0; height: 1px; min-height: 1px; background: var(--hair); margin: 6px 8px; width: auto; pointer-events: none; justify-self: stretch; }
  .nav-grupo svg { display: none; }
  .nav-itens, .nav-itens.fechado { display: grid; gap: 4px; justify-items: center; }
}

/* ---------- fila de aprovação geral ---------- */
.pedido { display: grid; gap: 12px; }
.pedido-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pedido-topo .quem { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--canvas); font-size: 12px; font-weight: 600; flex: none; }
.pedido-etqs { display: flex; gap: 6px; flex-wrap: wrap; }
.pedido p { color: var(--ink-soft); line-height: 1.5; }
.pedido summary { cursor: pointer; color: var(--mid); font-size: 13px; width: fit-content; }
.pedido summary:hover { color: var(--ink); }
.pedido-detalhe { white-space: pre-wrap; word-break: break-word; font: inherit; line-height: 1.5; background: var(--alt); border: 1px solid var(--hair); border-radius: 14px; padding: 12px 14px; margin: 8px 0 0; max-height: 320px; overflow: auto; }
.pedido-pe { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pedido-acoes { display: flex; gap: 8px; }
/* trecho do pedido que só quem aprova lê (por exemplo, possível conflito de interesse) */
/* o título do pedido é o caminho para conferir o item: a seta só aparece com o cursor em cima */
.pedido-elo { display: inline-flex; align-items: center; gap: 6px; }
.pedido-elo svg { color: #c4c4c4; transition: transform .2s var(--ease), color .2s; flex: none; }
.pedido-elo:hover svg { transform: translateX(3px); color: var(--ink); }
.pedido-reservado { white-space: pre-wrap; word-break: break-word; font: inherit; line-height: 1.5; margin: 0; color: var(--ink); }
/* passos para começar (sistema novo, na Visão geral): feito ou quanto falta */
.linha.passo { grid-template-columns: 24px minmax(0, 1fr) auto 20px; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--hair); font: inherit; color: inherit; cursor: pointer; }
.passo-selo { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--hair); display: grid; place-items: center; }
.passo.feito .passo-selo { background: var(--ink); color: var(--paper); box-shadow: none; }
.passo.feito .nome b { color: var(--mid); font-weight: 400; }
button.passo:hover { background: var(--alt); } button.passo:hover .seta { transform: translateX(3px); color: var(--ink); }
/* item da fila que leva a outra tela (pré-auditoria): uma linha só, com o sinal e a ação à direita */
a.pedido-linha { grid-template-columns: minmax(0, 1fr) auto; align-items: center; transition: transform .25s var(--ease), box-shadow .25s; }
a.pedido-linha:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
@media (max-width: 720px) { a.pedido-linha { grid-template-columns: 1fr; } }

/* ---------- peças comuns dos módulos ----------
   Tudo que um módulo novo precisa para ficar igual ao resto do sistema. Antes de criar uma classe, procure aqui. */
/* grades */
.g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.duplo { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
/* a coluna única não cresce com o conteúdo: quadro e tabela largos rolam dentro do cartão, nunca a página */
.pilha-v { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.fila-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fila-h.entre { justify-content: space-between; }
/* cartão clicável e cartão de item */
a.cartao, button.cartao { transition: transform .25s var(--ease), box-shadow .25s; text-align: left; display: grid; gap: 10px; }
a.cartao:hover, button.cartao:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.cartao h4 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.1px; }
.cartao.liso { box-shadow: none; background: var(--alt); }
.sub { color: var(--mid); font-size: 13px; line-height: 1.45; }
.corta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.corta-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.corta-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* número em destaque dentro de um cartão */
.kpi { display: grid; gap: 4px; }
.kpi b { font-size: 30px; line-height: 1.15; letter-spacing: -.75px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--mid); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* lista de pares rótulo e valor */
.dl { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.dl dt { color: var(--mid); } .dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
/* tabela de leitura (texto à esquerda). Números continuam à direita com class="num" */
.tab.esq th, .tab.esq td { text-align: left; white-space: normal; }
.tab.esq th.num, .tab.esq td.num { text-align: right; white-space: nowrap; }
.tab.esq tr[data-id], .tab.esq tr[data-ir] { cursor: pointer; }
.tab.esq td b { font-weight: 500; }
/* etiquetas que filtram (várias podem estar ligadas) */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--hair); background: var(--paper); color: var(--ink-soft); font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, border-color .15s, color .15s; }
.chip:hover { border-color: #c4c4c4; }
.chip.ativo { background: var(--ink); border-color: var(--ink); color: var(--alt); }
.chip b { font-weight: 600; opacity: .6; }
/* quadro em colunas (funil, esteira, road show) */
.quadro { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.coluna { background: var(--alt); border: 1px solid var(--hair); border-radius: 20px; padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 120px; }
.coluna > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 2px; font-weight: 500; }
.coluna > header span { color: var(--mid); font-size: 12px; }
.tile { background: var(--paper); border: 1px solid var(--hair); border-radius: 14px; padding: 10px 12px; display: grid; gap: 6px; text-align: left; width: 100%; transition: box-shadow .2s, transform .2s var(--ease); }
a.tile:hover, button.tile:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.tile b { font-weight: 500; }
/* barra horizontal de proporção, com rótulo e valor */
.medidas { display: grid; gap: 10px; }
.medida { display: grid; grid-template-columns: minmax(90px, 180px) minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.medida .trilha-m { height: 8px; border-radius: 4px; background: var(--canvas); overflow: hidden; }
.medida .trilha-m i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--ink); transition: width .9s var(--ease); }
.medida .trilha-m i.b { background: #a3a3a3; } .medida .trilha-m i.c { background: #d4d4d4; }
.medida b { font-weight: 600; font-variant-numeric: tabular-nums; }
/* aviso dentro da página: informação, atenção ou bloqueio. A cor fica só no ponto */
.alerta { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--paper); border: 1px solid var(--hair); }
.alerta .ponto { margin-top: 7px; }
.alerta p { color: var(--mid); margin-top: 2px; } .alerta b { font-weight: 500; }
/* linha do tempo de versões ou eventos */
.tempo { display: grid; gap: 0; margin: 0; padding: 0; }
.tempo li { list-style: none; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; position: relative; }
.tempo li::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); margin-top: 5px; z-index: 1; justify-self: center; }
.tempo li::after { content: ''; position: absolute; left: 7.500px; top: 16px; bottom: 0; width: 1px; background: var(--hair); }
.tempo li:last-child { padding-bottom: 0; } .tempo li:last-child::after { display: none; }
.tempo li.atual::before { background: var(--ink); }
/* interruptor */
.liga { position: relative; width: 36px; height: 20px; border-radius: 10px; background: #d4d4d4; border: 0; padding: 0; transition: background .2s; flex: none; }
.liga::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.liga[aria-checked="true"] { background: var(--ink); } .liga[aria-checked="true"]::after { transform: translateX(16px); }
.liga:disabled { opacity: .45; cursor: not-allowed; }
/* bloco de texto pré-formatado (prompt, mensagem, documento gerado) */
.bloco { white-space: pre-wrap; word-break: break-word; font: inherit; line-height: 1.55; background: var(--alt); border: 1px solid var(--hair); border-radius: 16px; padding: 14px 16px; margin: 0; max-height: 420px; overflow: auto; }
.mono-txt { font-family: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace; font-size: 12.500px; }
/* gaveta larga para leitura de documento ou ficha */
.gaveta.larga { width: min(680px, calc(100vw - 24px)); }
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duplo { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; } .dl dd { margin-bottom: 8px; }
  .medida { grid-template-columns: minmax(0, 1fr) auto; } .medida .trilha-m { grid-column: 1 / -1; order: 3; }
  .app { grid-template-columns: 56px minmax(0, 1fr); } .lado { padding: 12px 6px; }
  .conteudo { padding: 16px 14px 56px; } .topo { padding: 0 14px; height: 54px; }
  .topo .acoes .btn:not(.icone) { padding: 0 10px; }
  /* botão secundário do topo fica só com o ícone (e o número, se tiver): o caminho da tela não some atrás dele */
  .topo .acoes .so-largo { display: none; }
}
/* o caminho da tela nunca passa por baixo dos botões do topo: o que não cabe é cortado com reticências */
.trilha { overflow: hidden; flex: 0 1 auto; }
.trilha > * { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* quando falta espaço, encolhe primeiro o nível de cima; a tela aberta só é cortada por último */
.trilha > a { flex-shrink: 1000; }
.trilha > svg { flex: none; overflow: visible; }
.topo .acoes { flex: none; }
/* no celular o caminho mostra só a tela aberta: o nível de cima já está no título e na barra lateral */
@media (max-width: 560px) { .trilha > a, .trilha > svg { display: none; } }
@media print { .quadro { grid-auto-flow: row; } .nav-grupo { display: none; } }
