/* Painel de Inteligência Jurídica: complementa o ti.css (mesmo menu, tabelas, janelas e botões). */
/* Ações de edição somem para quem só tem leitura. */
body.jr-sem-w .jr-w { display: none !important; }
/* Este css so vale em /juridico/painel: um unico .hidden esconde o elemento mesmo quando ele tem display proprio (.form-group, toast, abas).
   O .hidden do ti.css perdia para esses displays e cada tela ganhava um remendo por id. */
.hidden { display: none !important; }

.jr-card {
  background: var(--surface);
  border-radius: 22px;
  margin-bottom: 1rem;
  min-width: 0;
  padding: 1.1rem 1.3rem;
}
.jr-card h2 { font-size: 13px; font-weight: 600; margin-bottom: .7rem; }
.jr-card h3 { color: var(--muted); font-size: 11.5px; font-weight: 600; margin: .6rem 0 .35rem; text-transform: uppercase; letter-spacing: .03em; }
.jr-card-topo { align-items: flex-start; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; margin-bottom: .5rem; }
.jr-card-topo h2 { margin-bottom: 0; }
.jr-card-acoes { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem; }
.jr-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.jr-grid-partes { gap: .5rem 1.5rem; }
.jr-nota { color: var(--muted); font-size: 12px; }
.jr-erro { background: var(--badge-red-bg); color: var(--badge-red-text); font-size: 13px; }
.jr-aviso { background: var(--badge-amber-bg); color: var(--badge-amber-text); font-size: 13px; }

/* Formulário de busca */
.jr-abas { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.jr-aba {
  background: var(--surface-soft);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  padding: .35rem .9rem;
}
.jr-aba.active { background: var(--brand-ink); border-color: var(--brand-ink); color: #fff; }
.jr-campos { align-items: flex-end; display: flex; flex-wrap: wrap; gap: .75rem; }
.jr-campos .form-group { margin-bottom: 0; }
.jr-q { flex: 1 1 280px; }
.jr-btn-buscar { width: auto; }
.jr-busca .jr-nota { margin-top: .6rem; }

.jr-fonte { border-radius: 999px; font-size: 11px; padding: .15rem .6rem; }
.jr-fonte.ok { background: var(--badge-green-bg); color: var(--badge-green-text); }
.jr-fonte.off { background: var(--badge-slate-bg); color: var(--badge-slate-text); text-decoration: line-through; }

/* Situação e etiquetas */
.jr-sit, .jr-chip {
  background: var(--badge-slate-bg);
  border-radius: 999px;
  color: var(--badge-slate-text);
  display: inline-block;
  font-size: 11px;
  margin: 0 0 .2rem .3rem;
  padding: .12rem .6rem;
  white-space: nowrap;
}
.jr-sit.ok { background: var(--badge-green-bg); color: var(--badge-green-text); }
.jr-sit.off { background: var(--badge-amber-bg); color: var(--badge-amber-text); }
.jr-sit.erro { background: var(--badge-red-bg); color: var(--badge-red-text); cursor: help; }
.jr-chip { background: var(--badge-blue-bg); color: var(--badge-blue-text); }
.jr-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.jr-mais { color: var(--muted); font-size: 11px; }

/* Empresa */
.jr-empresa-topo { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
.jr-empresa h2 { font-size: 16px; margin-bottom: .1rem; }
.jr-dl { display: grid; gap: .6rem 1.2rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin: .6rem 0; }
.jr-dl dt { color: var(--muted); font-size: 11px; }
.jr-dl dd { font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.jr-dl .jr-dl-largo { grid-column: 1 / -1; }   /* endereços, contatos, familiares: linha inteira, nada cortado */
.jr-outros { margin-top: .6rem; border-top: 1px solid var(--border, #e5e5e0); padding-top: .5rem; }
.jr-outros summary { cursor: pointer; font-size: 12px; color: var(--muted); }

/* Barras do painel */
.jr-barras { display: flex; flex-direction: column; gap: .4rem; }
.jr-barra-linha { align-items: center; display: grid; font-size: 12px; gap: .6rem; grid-template-columns: minmax(0, 38%) 1fr auto; }
.jr-barra-rotulo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-barra { background: var(--surface-soft); border-radius: 999px; height: 8px; overflow: hidden; }
.jr-barra span { background: var(--brand-blue); border-radius: 999px; display: block; height: 100%; }
.jr-barra-valor { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.jr-barra-valor small { color: var(--muted); }

/* Tabela de resultados */
#mon-lista, #res-tabela { overflow-x: auto; }
#mon-lista .ti-table, #res-tabela .ti-table { min-width: 720px; }
.jr-tabela td { vertical-align: top; }
.jr-clicavel { cursor: pointer; }
.jr-clicavel:hover td { background: var(--surface-soft); }
.jr-acoes-linha { white-space: nowrap; }
.jr-acoes-linha .btn { margin: .1rem; }

/* Detalhe do processo */
.jr-modal-proc { max-height: 90vh; max-width: 960px; overflow-y: auto; width: 96vw; }
.jr-modal-proc .jr-card { background: var(--surface-soft); }
.jr-modal-topo { align-items: flex-start; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; margin-bottom: 1rem; }
.jr-modal-acoes { display: flex; flex-wrap: wrap; gap: .4rem; }
.jr-lista { list-style: none; margin: 0; padding: 0; }
.jr-lista li { border-bottom: 1px solid var(--line); font-size: 13px; padding: .3rem 0; }
.jr-lista li:last-child { border-bottom: 0; }
.jr-movs summary, .jr-pub summary { cursor: pointer; font-size: 12.5px; padding: .35rem 0; }
.jr-timeline { list-style: none; margin: .4rem 0 0; max-height: 360px; overflow-y: auto; padding: 0; }
.jr-timeline li { border-left: 2px solid var(--line-strong); display: flex; font-size: 12.5px; gap: .75rem; padding: .25rem 0 .25rem .75rem; }
.jr-tl-data { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.jr-pub { border-bottom: 1px solid var(--line); }
.jr-pub:last-child { border-bottom: 0; }
.jr-texto {
  background: var(--surface);
  border-radius: 12px;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  margin: .3rem 0 .6rem;
  max-height: 420px;
  overflow: auto;
  padding: .8rem 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Alertas */
.jr-alerta { border-left: 4px solid var(--brand-red); }
.jr-alerta.lido { border-left-color: var(--line-strong); opacity: .8; }
.jr-alerta p { font-size: 13px; margin: .2rem 0; }

.jr-form { display: grid; gap: .25rem 1rem; }

/* Resumo da IA local */
.jr-btn-ia { margin: .3rem 0 .5rem; }
.jr-ia { background: var(--surface-soft); border-left: 3px solid var(--brand-blue); border-radius: 12px; margin: .4rem 0 .6rem; padding: .7rem 1rem; }
.jr-modal-proc .jr-ia { background: var(--surface); }
.jr-ia-topo { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem; font-size: 13px; }
.jr-ia-topo .jr-sit { margin: 0; }
.jr-ia-topo .btn-ghost { margin-left: auto; padding: .1rem .5rem; }
.jr-ia p { font-size: 13px; margin: .35rem 0; }
.jr-ia .jr-dl { margin: .3rem 0; }
.jr-ia .jr-nota { font-size: 11px; }

/* Jurimetria */
.jm-cabecalho { align-items: flex-start; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; }
.jm-cabecalho h2 { font-size: 15px; margin-bottom: .2rem; }
.jm-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.jm-chip-btn {
  background: var(--badge-blue-bg);
  border: 0;
  border-radius: 999px;
  color: var(--badge-blue-text);
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  padding: .25rem .7rem;
}
.jm-progresso { background: var(--surface-soft); border-radius: 999px; height: 8px; margin: .5rem auto .3rem; max-width: 320px; overflow: hidden; }
.jm-progresso span { background: var(--brand-red); display: block; height: 100%; transition: width .4s; }

.jm-pilha { border-radius: 999px; display: flex; height: 18px; overflow: hidden; }
.jm-pilha span { height: 100%; min-width: 2px; }
.jm-legenda { display: flex; flex-wrap: wrap; font-size: 12.5px; gap: .4rem 1.2rem; margin: .7rem 0 .3rem; }
.jm-legenda i { border-radius: 3px; display: inline-block; height: 10px; margin-right: .35rem; width: 10px; }
.jm-legenda small { color: var(--muted); }
.jm-verde { background: var(--success, #2e7d4f); }
.jm-azul { background: var(--info, #2f6fb0); }
.jm-vermelho { background: var(--danger, #b3261e); }
.jm-amarelo { background: var(--warning, #c98a12); }

.jm-colunas { display: block; height: 180px; width: 100%; }
.jm-colunas rect { fill: var(--brand-blue); }
.jm-colunas rect:hover { fill: var(--brand-red); }
.jm-eixo { color: var(--muted); display: flex; font-size: 10.5px; margin-top: .3rem; }
.jm-eixo span { overflow: visible; text-align: left; white-space: nowrap; }

.jm-ordena { cursor: pointer; user-select: none; white-space: nowrap; }
.jm-ordena.ativo { color: var(--text); }
.jm-delta { border-radius: 999px; font-size: 11px; padding: .1rem .5rem; white-space: nowrap; }
.jm-delta.pos { background: var(--badge-green-bg); color: var(--badge-green-text); }
.jm-delta.neg { background: var(--badge-red-bg); color: var(--badge-red-text); }
.jm-delta.neutro { background: var(--badge-slate-bg); color: var(--badge-slate-text); }
.jm-exito { border-radius: 999px; font-size: 11px; padding: .12rem .6rem; white-space: nowrap; }
.jm-exito.vitoria { background: var(--badge-green-bg); color: var(--badge-green-text); }
.jm-exito.derrota { background: var(--badge-red-bg); color: var(--badge-red-text); }
.jm-exito.parcial { background: var(--badge-blue-bg); color: var(--badge-blue-text); }
.jm-exito.acordo { background: var(--badge-amber-bg); color: var(--badge-amber-text); }
#jm-orgaos, .jm-rolagem { overflow-x: auto; }
#jm-orgaos .ti-table, .jm-rolagem .ti-table { min-width: 860px; }
#jm-orgaos td:first-child, .jm-rolagem td:first-child { min-width: 240px; }

/* BI da carteira */
.bi-kpis { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.bi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bi-colunas { align-items: flex-end; display: flex; height: 170px; }
.bi-coluna { align-items: center; display: flex; flex-direction: column; height: 100%; justify-content: flex-end; padding: 0 2px; }
.bi-coluna span { background: var(--info); border-radius: 4px 4px 0 0; display: block; min-height: 1px; width: 70%; }
.bi-coluna:hover span { background: var(--brand-red); }
.bi-coluna small { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.bi-rosca { align-items: center; display: flex; flex-wrap: wrap; gap: 1rem; }
.bi-rosca svg { flex: 0 0 140px; height: 140px; transform: none; width: 140px; }
.bi-rosca circle { transition: stroke-width .15s; }
.bi-rosca circle:hover { stroke-width: 7.5; }
.bi-rosca-total { fill: var(--text); font-size: 7px; font-weight: 600; }
.bi-legenda { flex-direction: column; flex: 1 1 140px; gap: .3rem; margin: 0; }
.bi-barras .jr-barra-linha { grid-template-columns: minmax(0, 50%) 1fr auto; }
.bi-clicavel { border-radius: 8px; cursor: pointer; }
.bi-clicavel:hover { background: var(--surface-soft); }
.bi-pilha { background: transparent !important; display: flex !important; flex-direction: column-reverse; overflow: hidden; }
.bi-pilha i { display: block; min-height: 1px; width: 100%; }
.bi-prazo.vencido td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.bi-prazo.proximo td:first-child { box-shadow: inset 3px 0 0 var(--warning); }

/* Estratégia do caso */
.es-metricas { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin: .4rem 0 .8rem; }
.es-opcoes { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: .6rem 0; }
.es-opcao { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: .7rem .9rem; }
.es-opcao.recomendada { border-color: var(--success); box-shadow: 0 0 0 2px var(--badge-green-bg); }
.es-opcao p { margin: .3rem 0; }
.es-card > p { font-size: 13px; margin: .4rem 0; }

/* Prazos */
.pz-data, .pz-resp { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font: inherit; font-size: 12px; padding: .2rem .4rem; }
.pz-resp { max-width: 190px; }

/* Jurisprudência */
.jp-julgado { border-left: 3px solid var(--line-strong); scroll-margin-top: 1rem; }
.jp-julgado:target { border-left-color: var(--brand-red); }
.jp-julgado p { font-size: 13px; margin: .35rem 0; }
.jp-ementa { background: var(--surface-soft); border-radius: 10px; font-size: 12.5px !important; font-style: italic; padding: .6rem .8rem; }
.jp-lista { font-size: 13px; margin: .2rem 0 .5rem 1.1rem; padding: 0; }
.jp-lista li { margin: .15rem 0; }
.jp-sintese p { font-size: 13.5px; line-height: 1.55; }
.jp-cita { font-weight: 600; text-decoration: none; }
.jp-conferir { border-top: 2px solid var(--brand-red); }
.jp-checagem { background: var(--surface-soft); border-radius: 10px; margin-top: .75rem; padding: .75rem 1rem; }
.jp-checagem.tem { border-left: 3px solid var(--brand-blue); }
.jp-checagem.vazio { border-left: 3px solid var(--line-strong); }
.jp-checagem .jr-lista { margin-top: .5rem; }
.jp-checagem details { margin-top: .35rem; }
.jr-texto mark { background: var(--badge-amber-bg); color: inherit; padding: 0 .1rem; }

.jr-toast {
  background: var(--brand-ink);
  border-radius: 14px;
  bottom: 1.5rem;
  box-shadow: var(--shadow-float);
  color: #fff;
  font-size: 13px;
  max-width: min(420px, calc(100vw - 2rem));
  padding: .7rem 1rem;
  position: fixed;
  right: 1.5rem;
  z-index: 2000;
}
.jr-toast.erro { background: var(--danger); }

@media (max-width: 900px) {
  .jr-grid, .bi-grid-3 { grid-template-columns: 1fr; }
  .jr-barra-linha { grid-template-columns: minmax(0, 45%) 1fr auto; }
}
@media (max-width: 600px) {
  #jr-fontes { display: none; }
}

/* Carteiras personalizadas */
.ct-grade { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ct-cartao { margin-bottom: 0; }
.ct-cartao h2 { font-size: 16px; }
.ct-criterios { color: var(--muted); font-size: 12.5px; margin: .35rem 0 .75rem; }
.ct-numeros { display: grid; gap: .5rem; grid-template-columns: repeat(3, 1fr); }
.ct-numeros b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.ct-numeros small { color: var(--muted); font-size: 11px; }
.ct-privada { background: var(--surface-soft); color: var(--muted); }
.ct-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .35rem; }
.ct-chips:empty { display: none; }
.ct-chip { align-items: center; background: var(--badge-blue-bg); border-radius: 999px; color: var(--badge-blue-text); display: inline-flex; font-size: 12px; gap: .25rem; padding: .15rem .25rem .15rem .6rem; }
.ct-chip button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 .3rem; }
.ct-check { align-items: center; display: inline-flex; font-size: 13px; gap: .35rem; margin-right: 1rem; }
.ct-check input { width: auto; }
.ct-rotulo { display: block; font-size: 12px; font-weight: 600; margin-bottom: .3rem; }
.ct-manuais textarea { font-family: inherit; font-size: 12.5px; width: 100%; }
.jr-tabela-rolagem { overflow-x: auto; }

/* Claude (MCP) */
.mcp-copiar { align-items: flex-start; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; display: flex; gap: .5rem; margin: .4rem 0 .75rem; padding: .5rem .6rem; }
.mcp-copiar code, .mcp-copiar pre { flex: 1; font-size: 12px; margin: 0; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.mcp-token-novo { background: var(--badge-amber-bg); border-radius: 12px; margin: .75rem 0; padding: .75rem 1rem; }
.mcp-token-novo p { margin: .25rem 0; }

.jp-fora > summary { cursor: pointer; }
.jp-fora[open] > summary { margin-bottom: .75rem; }
.jp-fora .jp-julgado { box-shadow: none; opacity: .85; }

/* Assistente e ferramentas de IA */
.ia-abas { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.ia-aba { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; color: var(--text); cursor: pointer; font: inherit; font-size: 13px; padding: .4rem .9rem; }
.ia-aba.active { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.ia-conversa { display: flex; flex-direction: column; gap: .6rem; max-height: 56vh; min-height: 220px; overflow-y: auto; padding: .5rem 0; }
.ia-msg { display: flex; flex-direction: column; max-width: 86%; }
.ia-user { align-self: flex-end; align-items: flex-end; }
.ia-balao { border-radius: 14px; font-size: 13.5px; line-height: 1.5; padding: .6rem .85rem; }
.ia-user .ia-balao { background: var(--brand-blue); color: #fff; }
.ia-assistant .ia-balao { background: var(--surface-soft); border: 1px solid var(--line); }
.ia-vazio { color: var(--muted); padding: 1rem 0; }
.ia-sugestoes { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.ia-entrada { display: flex; gap: .5rem; margin-top: .5rem; }
.ia-entrada input { flex: 1; }
.ia-documento { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px; line-height: 1.6; margin-top: .75rem; padding: 1rem 1.25rem; }
.ia-documento:focus { outline: 2px solid var(--brand-red); }
.ia-documento mark { background: var(--badge-amber-bg); }
#ia-texto { font-family: inherit; font-size: 12.5px; width: 100%; }

/* Fila de publicacoes */
.fl-item p { font-size: 13px; margin: .35rem 0; }
.fl-feita { opacity: .7; }
.fl-rodape { align-items: center; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; font-size: 12.5px; gap: .5rem; justify-content: space-between; margin-top: .5rem; padding-top: .5rem; }
#fl-resumo { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }

/* Linha do tempo e gestao do caso */
.lt-lista { border-left: 2px solid var(--line); list-style: none; margin: 0; padding: 0 0 0 .9rem; }
.lt-lista li { font-size: 13px; margin: .35rem 0; position: relative; }
.lt-lista li::before { background: var(--line-strong); border-radius: 50%; content: ''; height: 8px; left: -1.2rem; position: absolute; top: .4rem; width: 8px; }
.lt-lista li.lt-forte::before { background: var(--brand-red); }
.cs-gestao { border-top: 1px solid var(--line); margin: .75rem 0; padding-top: .5rem; }
.cs-gestao summary { cursor: pointer; font-size: 13px; }
#cs-equipe { min-width: 260px; }

/* Ampliar acervo */
#jp-acervo.hidden + #jp-ampliar { display: none; }
.jp-oabs { display: flex; flex-direction: column; gap: .25rem; margin: .5rem 0; max-height: 220px; overflow-y: auto; }

/* ── Assistente de IA: visual novo ── */
.ia-conversa { background: linear-gradient(180deg, var(--surface-soft), transparent 220px); border-radius: 16px; gap: .9rem; padding: 1rem .75rem; }
.ia-msg { align-items: flex-start; flex-direction: row; gap: .55rem; max-width: 92%; }
.ia-user { flex-direction: row-reverse; }
.ia-corpo { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.ia-avatar-msg, .iaf-avatar { align-items: center; background: var(--brand-red); border-radius: 50%; box-shadow: 0 3px 8px rgba(172, 44, 35, .28); color: #fff; display: flex; flex: 0 0 auto; font-size: 11px; font-weight: 700; height: 30px; justify-content: center; width: 30px; }
.ia-balao { border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.ia-balao p { margin: 0 0 .45rem; }
.ia-balao p:last-child { margin-bottom: 0; }
.ia-balao ul, .ia-balao ol { margin: .2rem 0 .5rem 1.1rem; padding: 0; }
.ia-balao li { margin: .15rem 0; }
.ia-titulo { font-weight: 700; margin-top: .4rem !important; }
.ia-user .ia-balao { background: var(--brand-blue); border-bottom-right-radius: 4px; color: #fff; }
body.dark-theme .ia-user .ia-balao { background: #34444a; }
.ia-assistant .ia-balao { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; }
.ia-proc { background: var(--badge-blue-bg); border-radius: 6px; color: var(--badge-blue-text); font-variant-numeric: tabular-nums; padding: 0 .25rem; text-decoration: none; }
.ia-rodape { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; padding-left: .25rem; }
.ia-fontes { color: var(--muted); font-size: 11.5px; }
.ia-copiar { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 11.5px; padding: 0; }
.ia-copiar:hover { color: var(--brand-blue); text-decoration: underline; }
.ia-digitando { align-items: center; display: flex; gap: .25rem; }
.ia-digitando span { animation: ia-pulo 1.2s infinite ease-in-out; background: var(--brand-red); border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
.ia-digitando span:nth-child(2) { animation-delay: .15s; }
.ia-digitando span:nth-child(3) { animation-delay: .3s; }
.ia-digitando small { color: var(--muted); margin-left: .35rem; }
@keyframes ia-pulo { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-5px); } }
.ia-boasvindas { padding: 1.25rem .5rem; text-align: center; }
.ia-boasvindas-icone { color: var(--brand-red); font-size: 40px; line-height: 1; }
.ia-boasvindas h3 { font-size: 18px; margin: .4rem 0 .25rem; }
.ia-boasvindas > p { color: var(--muted); font-size: 13px; margin: 0 auto 1rem; max-width: 520px; }
.ia-cartoes { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); text-align: left; }
.ia-cartao { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--text); cursor: pointer; display: flex; flex-direction: column; font: inherit; gap: .15rem; padding: .75rem .85rem; transition: transform .15s, box-shadow .15s, border-color .15s; }
.ia-cartao:hover { border-color: var(--brand-red); box-shadow: 0 8px 22px rgba(20, 26, 31, .1); transform: translateY(-2px); }
.ia-cartao span { font-size: 20px; }
.ia-cartao b { font-size: 13px; }
.ia-cartao small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.ia-entrada { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 2px 10px rgba(0, 0, 0, .05); padding: .3rem .3rem .3rem .9rem; }
.ia-entrada input { background: transparent; border: 0; box-shadow: none; outline: none; }
.ia-entrada .btn { border-radius: 999px; }
.ia-aba.active { background: var(--brand-red); border-color: var(--brand-red); }

/* Botao e painel flutuantes */
.iaf-botao { align-items: center; animation: iaf-brilho 3s infinite; background: var(--brand-red); border: 0; border-radius: 50%; bottom: 1.4rem; box-shadow: 0 8px 22px rgba(172, 44, 35, .35); color: #fff; cursor: pointer; display: flex; height: 58px; justify-content: center; position: fixed; right: 1.4rem; transition: transform .2s; width: 58px; z-index: 1900; }
.iaf-botao:hover { transform: scale(1.07) rotate(-6deg); }
.iaf-botao.aberto { animation: none; transform: rotate(90deg); }
@keyframes iaf-brilho { 0%, 100% { box-shadow: 0 8px 22px rgba(172, 44, 35, .35); } 50% { box-shadow: 0 8px 28px rgba(172, 44, 35, .6); } }
.iaf-botao:hover { background: var(--brand-red-dark); }
.iaf-painel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; bottom: 5.6rem; box-shadow: 0 24px 60px rgba(15, 23, 42, .28); display: flex; flex-direction: column; height: min(620px, calc(100vh - 7.5rem)); overflow: hidden; position: fixed; right: 1.4rem; width: min(420px, calc(100vw - 2rem)); z-index: 1900; }
.iaf-painel.hidden { display: none; }
.iaf-topo { align-items: center; background: var(--brand-blue); border-bottom: 3px solid var(--brand-red); color: #fff; display: flex; gap: .6rem; padding: .8rem 1rem; }
.iaf-topo > div:nth-child(2) { display: flex; flex: 1; flex-direction: column; line-height: 1.2; }
.iaf-topo small { opacity: .8; font-size: 11px; }
.iaf-topo .iaf-avatar { background: rgba(255, 255, 255, .2); box-shadow: none; }
.iaf-fechar { background: rgba(255, 255, 255, .15); border: 0; border-radius: 8px; color: #fff; cursor: pointer; font-size: 17px; height: 30px; width: 30px; }
.iaf-conversa { border-radius: 0; flex: 1; max-height: none; min-height: 0; }
.iaf-conversa .ia-cartoes { grid-template-columns: 1fr 1fr; }
.iaf-entrada { margin: .6rem; }
@media (max-width: 600px) { .iaf-painel { bottom: 5rem; right: .5rem; } .iaf-botao { bottom: 1rem; right: 1rem; } }

/* Gestao, juizes, previsao, parecidas, riscos */
.gs-riscos { list-style: none; margin: 0; padding: 0; }
.gs-riscos li { border-bottom: 1px solid var(--line); font-size: 13px; padding: .45rem 0; }
.gs-riscos li div { margin-top: .25rem; }
.gs-alerta { background: var(--badge-red-bg, #fde8e8); border-radius: 10px; font-size: 13px; margin-bottom: .75rem; padding: .55rem .75rem; }
.jg-tabela td { vertical-align: middle; }
.jg-barra { background: var(--surface-soft); border-radius: 999px; display: inline-block; height: 7px; margin-right: .35rem; vertical-align: middle; width: 70px; }
.jg-barra span { background: var(--brand-blue); border-radius: 999px; display: block; height: 100%; }
.jg-barra.acordo span { background: var(--warning); }
.jg-barra.cliente span { background: var(--success); }
/* Previsao de tempo no modal do processo: colunas conforme a largura e numeros que quebram em vez de estourar o cartao. */
.pv-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: .25rem 0 .5rem; }
.pv-grid .metric-card { min-width: 0; padding: 1rem; }
.pv-grid .metric-card-value { font-size: clamp(1.15rem, 2.4vw, 1.6rem); line-height: 1.15; overflow-wrap: anywhere; }
.jr-parecidas { margin: .5rem 0; }
.jp-parecidas { background: var(--surface-soft); border-radius: 10px; font-size: 13px; margin-top: .5rem; padding: .6rem .8rem; }
.fl-riscos { margin: .3rem 0; }

/* Busca unica, clientes, teses */
.bu-card { border-top: 3px solid var(--brand-red); }
.bu-linha { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; display: flex; gap: .5rem; padding: .3rem .3rem .3rem .9rem; }
.bu-linha input { background: transparent; border: 0; box-shadow: none; flex: 1; font-size: 14px; outline: none; }
.bu-linha .btn { border-radius: 999px; }
.bu-icone { color: var(--brand-red); font-size: 20px; }
.bu-grade { display: grid; gap: .75rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: .75rem; }
.bu-grupo h3 { font-size: 13px; margin: .25rem 0; }
.cl-grade { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.cl-cartao { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text); cursor: pointer; display: flex; flex-direction: column; font: inherit; gap: .15rem; padding: .65rem .8rem; text-align: left; }
.cl-cartao:hover { border-color: var(--brand-red); box-shadow: 0 6px 18px rgba(20, 26, 31, .1); }
.cl-cartao b { font-size: 13px; }
.cl-cartao span, .cl-cartao small { color: var(--muted); font-size: 12px; }

/* Mapa do RS */
.mp-area { align-items: start; display: grid; gap: 1rem; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .mp-area { grid-template-columns: 1fr; } }
.mp-mapa-card { position: relative; }
.mp-mapa { display: block; height: auto; width: 100%; }
.mp-zona { cursor: pointer; stroke: #fff; stroke-width: 1.5; transition: opacity .15s; }
.mp-zona:hover { opacity: .85; }
.mp-zona.sel { stroke: var(--brand-red); stroke-width: 3; }
.mp-municipio { fill: none; pointer-events: none; stroke: rgba(15, 23, 42, .12); stroke-width: .5; }
.mp-comarca { cursor: pointer; fill: rgba(172, 44, 35, .6); stroke: #fff; stroke-width: 1; }
.mp-comarca:hover { fill: var(--brand-red); }
.mp-comarca.apagada { opacity: .2; }
.mp-rotulo { fill: var(--brand-ink); font-size: 12px; font-weight: 700; paint-order: stroke; stroke: rgba(255, 255, 255, .85); stroke-width: 3px; text-anchor: middle; }
.mp-valor { font-size: 11px; font-weight: 600; }
.mp-legenda { font-size: 12px; margin-top: .5rem; }
.mp-faixas { display: flex; height: 10px; margin: .3rem 0 .15rem; }
.mp-faixas span { flex: 1; }
.mp-faixas-txt { color: var(--muted); display: flex; justify-content: space-between; }
.mp-sel td { background: rgba(172, 44, 35, .07); }
.mp-rolagem { max-height: 520px; overflow-y: auto; }
.mp-carregando { padding: 4rem 0; }
body.dark-theme .mp-rotulo { fill: #e6ebed; stroke: rgba(19, 26, 29, .85); }

/* Teses, assistente, qualidade, ajuda */
.ts-filtro { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0 .75rem; }
.ia-atalhos { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .35rem; }
.ia-atalhos:empty { display: none; }
.iaf-atalhos { margin: .5rem .6rem 0; }
.ia-atalho { align-items: center; background: var(--badge-amber-bg); border-radius: 999px; display: inline-flex; font-size: 12px; }
.ia-atalho button { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; padding: .2rem .55rem; }
.ia-atalho .ia-atalho-x { padding-left: 0; }
.ia-salvar { align-self: flex-end; }
.ia-mic { background: none; border: 0; cursor: pointer; display: none; font-size: 17px; }
body.com-voz .ia-mic { display: inline-block; }
.qd-grade { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.qd-item { border: 1px solid var(--line); border-left: 4px solid var(--success); border-radius: 10px; font-size: 13px; padding: .5rem .7rem; }
.qd-item.tem { border-left-color: var(--warning); }
.qd-item summary { cursor: pointer; }
.aj-item { border-bottom: 1px solid var(--line); padding: .55rem 0; }
.aj-item summary { cursor: pointer; font-weight: 600; }
.aj-item p { font-size: 13.5px; margin: .4rem 0 0; }

/* Atualizacao automatica (aba Monitores) */
.rt-andamento { align-items: center; display: flex; font-size: 13px; gap: .5rem; margin: .5rem 0; }
.rt-spinner { flex: 0 0 auto; height: 16px; margin: 0; width: 16px; }
#rt-card { margin-bottom: 1rem; }
#rt-card .ti-table { margin-top: .5rem; }

/* Materia do processo (assunto), de cara nas listas e no modal */
.jr-materia { background: var(--brand-blue); border-radius: 999px; color: #fff; display: inline-block; font-size: 11.5px; font-weight: 600; line-height: 1.5; margin: .15rem 0; max-width: 100%; padding: 0 .6rem; vertical-align: middle; }
.jr-materia:empty { display: none; }
body.dark-theme .jr-materia { background: #34444a; }
#pr-materia { margin-top: .3rem; }

/* Turmas Recursais */
.tr-filtro { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: inherit; font: inherit; font-size: 12.5px; max-width: 220px; padding: .3rem .5rem; }
.tr-meus { align-items: center; display: inline-flex; font-size: 12.5px; gap: .3rem; }
.jr-materia.est { background: transparent; border: 1px dashed var(--brand-blue); color: var(--brand-blue); font-weight: 500; }
body.dark-theme .jr-materia.est { background: transparent; border-color: #8fa3ab; color: #cdd8dc; }
.jr-materia.seg { background: var(--brand-red); }
.jr-materia[data-sigilo]::after { content: ' · segredo de justiça'; font-weight: 500; }
/* Resumo do processo */
.rs-ia { font-size: 14px; margin: 0 0 .6rem; }
.rs-rotulo { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; margin: 0 0 .15rem; text-transform: uppercase; }
.rs-objeto { font-size: 15px; font-weight: 600; line-height: 1.45; margin: 0 0 .6rem; }
.rs-anexo { color: var(--brand-red); cursor: pointer; font-weight: 600; text-decoration: underline; }
/* Meus processos (interesse) */
.btn-interesse.ativo { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.in-nota { cursor: pointer; max-width: 220px; }

/* Consulta em massa */
.ms-linha { display: flex; gap: .4rem; }
.ms-linha input { flex: 1 1 auto; min-width: 0; }
.ms-linha .ms-op { flex: 0 0 auto; max-width: 11rem; font-size: 12.5px; }
.ms-lista { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin-top: .25rem; }
.ms-lista:empty { display: none; }
.ms-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.jr-alerta-obito { border-left: 4px solid #b3261e; background: #fdf3f2; }
.jr-alerta-obito h2 { color: #8c1d18; }
.ms-dupla { flex-wrap: wrap; gap: .5rem; align-items: center; }
.ms-dupla select { width: auto; max-width: 18rem; }
.ms-check { display: flex; align-items: center; gap: .45rem; font-weight: 600; cursor: pointer; }
.ms-check input { width: auto; margin: 0; }
.ms-lista .btn-link { background: none; border: 0; padding: 0; color: var(--accent, #b3261e); font-size: 12.5px; cursor: pointer; text-decoration: underline; }
.ms-lista-itens { flex-basis: 100%; max-height: 8rem; overflow: auto; font-size: 12.5px; padding: .4rem .5rem; border: 1px solid var(--border, #ddd); border-radius: 6px; }
.ms-linha input[readonly] { background: var(--bg-soft, #f4f2ee); }
.ms-linha .ms-csv { flex: 0 0 auto; width: auto; padding: .3rem .6rem; font-size: 12.5px; }
.jr-campos .form-group { min-width: 9rem; }
.jr-campos > .jr-nota { flex: 1 1 100%; margin: 0; }
.ms-selecao { align-items: center; background: var(--surface-soft); border-radius: 8px; display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; padding: .5rem .75rem; }
.ms-selecao b { margin-right: .25rem; }
.jr-tabela td, .jr-tabela th { padding: .5rem .6rem; }
.jr-tabela td:first-child, .jr-tabela th:first-child { width: 2rem; }
.jr-tabela td.jr-num { white-space: nowrap; }
.jr-card-topo > div:first-child { flex: 1 1 18rem; min-width: 0; }
.ts-filtro { margin-top: .75rem; }
.jr-campos .jr-q { flex: 1 1 26rem; }
.ms-linha input { flex: 1 1 12rem; width: auto; }
.ms-linha .ms-op { flex: 0 0 12rem; width: 12rem; max-width: 12rem; }
.jr-campos .form-group select, .jr-campos .form-group input { box-sizing: border-box; }
@media (max-width: 700px) { .ms-linha { flex-wrap: wrap; } .ms-linha .ms-op { flex: 1 1 100%; width: 100%; max-width: none; } }

.ms-tabela { table-layout: fixed; width: 100%; }
.ms-tabela td, .ms-tabela th { overflow-wrap: anywhere; }
.ms-c-sel { width: 2.25rem; }
.ms-c-num { width: 13rem; }
.ms-c-ass { width: 11rem; }
.ms-c-data { width: 6.5rem; }
.ms-c-sit { width: 8.5rem; }
.ms-tabela td:nth-child(2) { overflow-wrap: normal; white-space: nowrap; }
.ms-tabela .jr-sit, .ms-tabela .jr-chip { display: inline-block; margin: 0 0 .25rem 0; }
.ms-selecao .btn { width: auto; }

/* Jurisprudencia: busca direta, facetas e leitura */
.jp-facetas { display: grid; gap: 1rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: .5rem; }
.jp-faceta h3 { font-size: 13px; margin: 0 0 .35rem; }
.jp-fc { background: none; border: 0; cursor: pointer; display: grid; font: inherit; font-size: 12.5px; gap: .15rem .5rem; grid-template-columns: 1fr auto; padding: .25rem .3rem; text-align: left; width: 100%; border-radius: 6px; color: inherit; }
.jp-fc:hover { background: var(--surface-soft); }
.jp-fc-rot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jp-fc-n { color: var(--muted); }
.jp-fc-barra { background: var(--surface-soft); border-radius: 4px; grid-column: 1 / -1; height: 6px; overflow: hidden; }
.jp-fc-barra span { background: var(--brand-blue); display: block; height: 100%; }
.jp-texto-integral { background: var(--surface-soft); border-radius: 8px; line-height: 1.55; margin: .75rem 0; max-height: 50vh; overflow: auto; padding: .9rem 1rem; white-space: pre-wrap; word-break: break-word; }
.jp-texto-integral mark, .jr-texto mark { background: #ffe58a; color: inherit; padding: 0 1px; }

/* Prospeccao de mercado: graficos (SVG e CSS) */
:root { --pq-livre: #1f9d6b; --pq-conflito: #d1493f; --pq-cliente: #8a94a6; --pq-azul: #3b6fb6; }
.pq-presets { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.pq-duplo { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); margin-bottom: 1rem; }
.pq-duplo > .jr-card { margin-bottom: 0; }
.pq-barras { display: flex; flex-direction: column; gap: .15rem; margin-top: .5rem; }
.pq-barra { align-items: center; background: none; border: 0; border-radius: 6px; color: inherit; cursor: pointer; display: grid; font: inherit; font-size: 12.5px; gap: .5rem; grid-template-columns: minmax(120px, 36%) 1fr auto; padding: .3rem .35rem; text-align: left; width: 100%; }
.pq-barra:hover { background: var(--surface-soft); }
.pq-barra-rot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-barra-trilho { background: var(--surface-soft); border-radius: 4px; display: block; height: 10px; overflow: hidden; }
.pq-barra-trilho > span { border-radius: 4px; display: block; height: 100%; }
.pq-barra-val { text-align: right; white-space: nowrap; }
.pq-barra-val small, .pq-dv-val small { color: var(--muted); }
.pq-livre { background: var(--pq-livre); fill: var(--pq-livre); }
.pq-conflito { background: var(--pq-conflito); fill: var(--pq-conflito); }
.pq-cliente { background: var(--pq-cliente); fill: var(--pq-cliente); }
.pq-azul { background: var(--pq-azul); }
.pq-legenda { color: var(--muted); display: flex; flex-wrap: wrap; font-size: 12px; gap: .4rem 1rem; margin-top: .6rem; }
.pq-pt { border-radius: 50%; display: inline-block; height: 9px; margin-right: .35rem; width: 9px; }
.pq-svg { height: auto; max-width: 100%; width: 100%; }
.pq-grade { stroke: var(--line, #e5e7eb); stroke-width: 1; }
.pq-eixo { fill: var(--muted); font-size: 10px; }
.pq-eixo-t { fill: var(--muted); font-size: 11px; }
.pq-quad { fill: var(--pq-livre); font-size: 10.5px; font-weight: 600; }
.pq-bolha { cursor: pointer; fill-opacity: .55; stroke: #fff; stroke-width: 1.2; transition: fill-opacity .15s; }
.pq-bolha:hover { fill-opacity: .95; stroke: #222; }
.pq-mini h3 { font-size: 13px; margin: 0 0 .4rem; }
.pq-mini-l { align-items: center; display: grid; font-size: 12.5px; gap: .5rem; grid-template-columns: minmax(110px, 40%) 1fr auto; margin: .25rem 0; }
.pq-mini-rot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-pilha { background: var(--surface-soft); border-radius: 6px; display: flex; height: 14px; overflow: hidden; }
.pq-pilha > span { display: block; height: 100%; }
.pq-diverge { display: flex; flex-direction: column; gap: .1rem; margin-top: .5rem; }
.pq-dv { align-items: center; background: none; border: 0; border-radius: 6px; color: inherit; cursor: pointer; display: grid; font: inherit; font-size: 12.5px; gap: .5rem; grid-template-columns: minmax(130px, 34%) 1fr 130px; padding: .3rem .35rem; text-align: left; width: 100%; }
.pq-dv:hover { background: var(--surface-soft); }
.pq-dv-rot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-dv-trilho { background: var(--surface-soft); border-radius: 4px; height: 10px; position: relative; }
.pq-dv-trilho > span:not(.pq-dv-eixo) { border-radius: 4px; height: 100%; position: absolute; top: 0; }
.pq-dv-eixo { background: var(--line, #cbd5e1); height: 100%; left: 50%; position: absolute; top: 0; width: 1px; z-index: 1; }
.pq-dv-val { text-align: right; white-space: nowrap; }
@media (max-width: 700px) { .pq-barra, .pq-dv { grid-template-columns: 1fr auto; } .pq-barra-trilho, .pq-dv-trilho { grid-column: 1 / -1; order: 3; } }

.jp-sugestoes { margin-top: .75rem; display: grid; gap: .4rem; }
.jp-sug-grupo { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.jp-sug-grupo > .jr-nota { min-width: 10rem; }
.jp-sug { cursor: pointer; border: 1px solid var(--line); background: transparent; max-width: 100%; text-align: left; }
.jp-sug:hover { border-color: #b3262b; }
.jp-sug small { opacity: .7; margin-left: .25rem; }

.ia-digitando { position: relative; overflow: hidden; padding-bottom: .7rem; }
.ia-digitando small { font-weight: 600; }
.ia-pensando-barra { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, transparent, var(--brand-red), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: ia-varre 1.4s infinite linear; }
@keyframes ia-varre { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ── Abas personalizáveis (Inteligência e Prospecção) ── */
.pn-abas { margin-bottom: 1rem; }
.pn-mais { font-weight: 700; padding-inline: .9rem; }
.pn-barra { margin-bottom: 1rem; }
.pn-grade { position: relative; width: 100%; }
.pn-w { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-sizing: border-box; display: flex; flex-direction: column; margin-left: 6px; min-width: 0; overflow: hidden; padding: .7rem .9rem .9rem; position: absolute; transition: box-shadow .15s; }
.pn-w.pn-arrastando { box-shadow: 0 12px 30px rgba(0, 0, 0, .22); opacity: .92; z-index: 5; }
.pn-w-corpo { flex: 1; min-height: 0; overflow: auto; }
.pn-resize { bottom: 2px; cursor: nwse-resize; height: 18px; position: absolute; right: 2px; touch-action: none; width: 18px; }
.pn-resize::after { border-bottom: 3px solid var(--muted); border-right: 3px solid var(--muted); bottom: 4px; content: ""; height: 8px; opacity: .6; position: absolute; right: 4px; width: 8px; }
.pn-w-topo { touch-action: none; user-select: none; align-items: center; cursor: grab; display: flex; gap: .5rem; justify-content: space-between; margin-bottom: .6rem; }
.pn-w-topo h3 { font-size: 14px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-w-acoes { display: flex; flex: none; gap: .15rem; }
.pn-ico { background: transparent; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 14px; height: 26px; width: 26px; }
.pn-ico:hover { background: var(--surface-soft); color: var(--text); }
.pn-kpi { display: grid; gap: .15rem; padding: .5rem 0; }
.pn-kpi b { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; }
.pn-bh { display: grid; gap: .35rem; }
.pn-bh-linha { align-items: center; display: grid; gap: .5rem; grid-template-columns: minmax(6rem, 38%) 1fr auto; font-size: 12.5px; }
.pn-bh-rot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-bh-barra { background: var(--surface-soft); border-radius: 6px; display: block; height: 14px; overflow: hidden; }
.pn-bh-barra span { border-radius: 6px; display: block; height: 100%; }
.pn-bv { align-items: flex-end; display: flex; gap: .4rem; height: 190px; }
.pn-bv-col { align-items: center; display: flex; flex: 1; flex-direction: column; font-size: 11px; height: 100%; justify-content: flex-end; min-width: 0; }
.pn-bv-barra { align-items: flex-end; display: flex; flex: 1; justify-content: center; width: 100%; }
.pn-bv-barra span { border-radius: 5px 5px 0 0; display: block; width: 70%; }
.pn-bv-col em { font-style: normal; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-linha { color: var(--text); height: auto; width: 100%; }
.pn-rosca { align-items: center; display: grid; gap: 1rem; grid-template-columns: minmax(110px, 160px) 1fr; }
.pn-rosca svg { color: var(--text); width: 100%; }
.pn-legenda { display: grid; font-size: 12.5px; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.pn-legenda li { align-items: center; display: grid; gap: .45rem; grid-template-columns: 10px 1fr auto; }
.pn-legenda i { border-radius: 50%; display: block; height: 10px; width: 10px; }
.pn-legenda span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-previa { background: var(--surface-soft); border-radius: 12px; min-height: 80px; padding: 1rem; }
@media (max-width: 700px) { .pn-grade { height: auto !important; } .pn-w { height: auto !important; left: auto !important; margin: 0 0 12px; position: static; width: auto !important; } .pn-w-topo { cursor: default; } .pn-resize { display: none; } .pn-rosca { grid-template-columns: 1fr; } }

.pn-aba-wrap { display: inline-flex; align-items: center; gap: 0; }
.pn-aba-wrap .ia-aba { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pn-aba-x { background: var(--surface-soft); border: 1px solid var(--line); border-left: 0; border-radius: 0 999px 999px 0; color: var(--muted); cursor: pointer; font-size: 15px; height: 100%; line-height: 1; padding: 0 .55rem; }
.pn-aba-x:hover { background: var(--danger, #b3262b); color: #fff; }

.btn.btn-danger { background: #b3262b; border-color: #b3262b; color: #fff; }

.pn-w { container-type: inline-size; }
@container (max-width: 380px) { .pn-rosca { grid-template-columns: 1fr; justify-items: center; } .pn-rosca svg { max-width: 150px; } .pn-legenda { width: 100%; } }


/* ── Assistente com várias conversas: mesma linguagem visual dos chamados (cartões, avatares e grafismo da marca) ── */
#view-ia .ia-chat-conteudo { display: flex; flex-direction: column; padding: 0; }
#view-ia .ia-chat-conteudo > #ia-indisponivel { margin: 1rem 1.5rem 0; }
.ia-chat { display: grid; flex: 1; grid-template-columns: 300px minmax(0, 1fr); min-height: 0; }

/* Lateral */
.ia-lateral { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; min-height: 0; padding: 1rem .75rem .75rem; }
.ia-lateral-topo { display: grid; gap: .6rem; }
.ia-nova { align-items: center; background: linear-gradient(135deg, #c23a30, var(--brand-red) 55%, #8f211a); border: 0; border-radius: 12px; box-shadow: 0 6px 16px rgba(172, 44, 35, .28); color: #fff; cursor: pointer; display: inline-flex; font: inherit; font-size: 13.5px; font-weight: 700; gap: .5rem; justify-content: center; overflow: hidden; padding: .7rem 1rem; position: relative; transition: transform .18s, box-shadow .18s; }
.ia-nova::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45), transparent 70%); content: ""; inset: 0; position: absolute; transform: translateX(-120%); transition: transform .6s; }
.ia-nova:hover { box-shadow: 0 10px 22px rgba(172, 44, 35, .38); transform: translateY(-2px); }
.ia-nova:hover::after { transform: translateX(120%); }
.ia-nova:active { transform: translateY(0) scale(.98); }
.ia-busca-wrap { align-items: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); display: flex; gap: .45rem; padding: 0 .7rem; transition: border-color .15s, box-shadow .15s; }
.ia-busca-wrap:focus-within { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(172, 44, 35, .14); }
.ia-busca { background: transparent; border: 0; box-shadow: none; color: var(--text); flex: 1; font: inherit; font-size: 13px; min-width: 0; outline: none; padding: .55rem 0; }
.ia-lista { flex: 1; margin-inline: -.25rem; min-height: 0; overflow-y: auto; padding-inline: .25rem; }
.ia-lista-vazia { padding: .75rem .5rem; }
.ia-grupo { color: var(--muted); font-size: 10.5px; font-weight: 800; letter-spacing: .07em; margin: 1rem .5rem .3rem; text-transform: uppercase; }
.ia-conv { align-items: center; animation: ia-entra .35s both; border-radius: 10px; cursor: pointer; display: flex; gap: .3rem; justify-content: space-between; margin-bottom: 2px; padding: .55rem .65rem; position: relative; transition: background .15s, transform .15s; }
.ia-conv:hover { background: var(--surface-soft); transform: translateX(3px); }
.ia-conv.ativa { background: linear-gradient(90deg, rgba(172, 44, 35, .12), transparent); font-weight: 600; }
.ia-conv.ativa::before { background: var(--brand-red); border-radius: 3px; bottom: 8px; content: ""; left: 0; position: absolute; top: 8px; width: 3px; }
.ia-conv-titulo { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ia-conv-acoes { display: none; flex: none; gap: .1rem; }
.ia-conv:hover .ia-conv-acoes, .ia-conv.ativa .ia-conv-acoes { display: inline-flex; }
.ia-conv-acoes button { background: transparent; border: 0; border-radius: 6px; cursor: pointer; font-size: 12px; height: 26px; transition: background .12s, transform .12s; width: 26px; }
.ia-conv-acoes button:hover { background: var(--line); transform: scale(1.12); }
.ia-conv-input { background: var(--surface); border: 1px solid var(--brand-red); border-radius: 6px; box-shadow: 0 0 0 3px rgba(172, 44, 35, .14); font: inherit; font-size: 13px; padding: .3rem .45rem; width: 100%; }
.ia-conv-excluir { cursor: default; flex-wrap: wrap; font-size: 12.5px; gap: .4rem; }
.ia-conv-excluir:hover { background: transparent; transform: none; }
.ia-lateral-rodape { color: var(--muted); font-size: 11px; margin: 0; text-align: center; }

/* Conversa: grafismo da marca ao fundo, coluna central e rolagem própria */
.ia-principal { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.ia-chat .ia-conversa { background: url('/assets/brand/grafismo-chamado.png') right -60px center / min(1500px, 150%) auto no-repeat; background-attachment: local; display: block; flex: 1; gap: 0; max-height: none; min-height: 0; overflow-y: auto; padding: 0; scroll-behavior: smooth; }
body.dark-theme .ia-chat .ia-conversa { background-image: url('/assets/brand/grafismo-chamado-escuro.png'); }
.ia-fio { margin: 0 auto; max-width: 880px; padding: 0 2rem; width: 100%; }
.ia-chat .ia-conversa .ia-titulo-conversa { animation: ia-entra .4s both; border-left: 4px solid var(--brand-red); font-size: 22px; font-weight: 700; line-height: 1.3; margin: 1.5rem auto .5rem; max-width: 816px; padding-left: .75rem; text-wrap: balance; width: calc(100% - 4rem); }

/* Mensagens: avatar + cartão, como nos chamados */
.ia-m { animation: ia-entra .45s cubic-bezier(.2, .8, .2, 1) both; display: grid; gap: .85rem; grid-template-columns: 38px minmax(0, 1fr); margin: 0 auto; max-width: 880px; padding: .55rem 2rem; }
.ia-m-avatar { align-items: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 50%; color: var(--muted); display: flex; font-size: 12px; font-weight: 800; height: 38px; justify-content: center; width: 38px; }
.ia-m-avatar.ia { background: linear-gradient(135deg, #c23a30, #8f211a); border-color: transparent; box-shadow: 0 4px 12px rgba(172, 44, 35, .35); color: #fff; }
.ia-m-avatar.pensando { animation: ia-brilho 1.6s ease-in-out infinite; }
.ia-m-corpo { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 22, 26, .05); min-width: 0; padding: .8rem 1rem; transition: box-shadow .2s, transform .2s; }
.ia-m-corpo:hover { box-shadow: 0 8px 24px rgba(16, 22, 26, .09); }
.ia-m-user .ia-m-corpo { border-left: 3px solid #222d31; }
body.dark-theme .ia-m-user .ia-m-corpo { border-left-color: #e6ebed; }
.ia-m-assistant .ia-m-corpo { border-left: 3px solid var(--brand-red); }
.ia-m-topo { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: .45rem; }
.ia-m-topo strong { font-size: 13.5px; }
.ia-m-topo time { color: var(--muted); font-size: 12px; }
.ia-m-tag { background: var(--surface-soft); border-radius: 999px; color: var(--muted); font-size: 10.5px; font-weight: 700; padding: .12rem .5rem; }
.ia-m-assistant .ia-m-tag { background: rgba(172, 44, 35, .12); color: var(--brand-red); }
.ia-m-texto { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ia-m-texto p { margin: 0 0 .55rem; }
.ia-m-texto p:last-child { margin-bottom: 0; }
.ia-m-texto ul, .ia-m-texto ol { margin: .25rem 0 .6rem 1.2rem; padding: 0; }
.ia-m-texto li { margin: .2rem 0; }
.ia-m-texto .ia-titulo { font-weight: 700; margin-top: .4rem; }
.ia-m-texto b { font-weight: 700; }
.ia-m-texto .ia-proc { background: rgba(47, 111, 176, .1); border-radius: 6px; padding: .05rem .3rem; text-decoration: none; transition: background .15s; }
.ia-m-texto .ia-proc:hover { background: rgba(47, 111, 176, .22); }
.ia-m-rodape { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; margin-top: .7rem; }
.ia-fontes { display: flex; flex-wrap: wrap; gap: .3rem; }
.ia-fonte { background: var(--surface-soft); border-radius: 999px; color: var(--muted); font-size: 11.5px; padding: .15rem .6rem; }
.ia-m-acoes { display: inline-flex; gap: .2rem; margin-left: auto; opacity: .55; transition: opacity .15s; }
.ia-m:hover .ia-m-acoes { opacity: 1; }
.ia-m-acoes button { align-items: center; background: transparent; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; display: inline-flex; font: inherit; font-size: 12px; gap: .3rem; padding: .25rem .5rem; transition: background .15s, color .15s; }
.ia-m-acoes button:hover { background: var(--surface-soft); color: var(--text); }

/* Revelação da resposta, bloco a bloco */
.ia-m-novo.ia-m-assistant .ia-m-texto > * { animation: ia-revela .55s cubic-bezier(.2, .8, .2, 1) both; }
.ia-m-novo .ia-m-texto > *:nth-child(2) { animation-delay: .12s; } .ia-m-novo .ia-m-texto > *:nth-child(3) { animation-delay: .24s; }
.ia-m-novo .ia-m-texto > *:nth-child(4) { animation-delay: .36s; } .ia-m-novo .ia-m-texto > *:nth-child(5) { animation-delay: .48s; }
.ia-m-novo .ia-m-texto > *:nth-child(6) { animation-delay: .6s; } .ia-m-novo .ia-m-texto > *:nth-child(n+7) { animation-delay: .72s; }

/* Pensando: esqueleto brilhante e contador */
.ia-pensando-corpo { overflow: hidden; position: relative; }
.ia-pensando-corpo::before { animation: ia-borda 2.4s linear infinite; background: linear-gradient(90deg, transparent, var(--brand-red), transparent) 0 0 / 40% 100% no-repeat; content: ""; height: 3px; left: 0; position: absolute; right: 0; top: 0; }
.ia-esqueleto { display: grid; gap: .45rem; margin-top: .6rem; }
.ia-esqueleto i { animation: ia-shimmer 1.4s linear infinite; background: linear-gradient(90deg, var(--surface-soft) 25%, var(--line) 50%, var(--surface-soft) 75%) 0 0 / 300% 100%; border-radius: 6px; display: block; height: 11px; }
.ia-esqueleto i:nth-child(1) { width: 92%; } .ia-esqueleto i:nth-child(2) { animation-delay: .15s; width: 78%; } .ia-esqueleto i:nth-child(3) { animation-delay: .3s; width: 56%; }
.ia-pensando-linha { align-items: center; color: var(--muted); display: flex; font-size: 13px; gap: .5rem; }
.ia-pontos span { animation: ia-pulo 1.2s infinite ease-in-out; background: var(--brand-red); border-radius: 50%; display: inline-block; height: 7px; margin-right: 3px; width: 7px; }
.ia-pontos span:nth-child(2) { animation-delay: .15s; } .ia-pontos span:nth-child(3) { animation-delay: .3s; }

/* Boas-vindas */
.ia-hero { animation: ia-entra .6s both; margin: 0 auto; max-width: 880px; padding: 3.2rem 2rem 1rem; text-align: center; }
.ia-hero-marca { align-items: center; animation: ia-flutua 4s ease-in-out infinite; background: radial-gradient(circle at 30% 25%, #e0554a, var(--brand-red) 60%, #7e1c16); border-radius: 26px; box-shadow: 0 14px 34px rgba(172, 44, 35, .4); color: #fff; display: inline-flex; font-size: 34px; height: 76px; justify-content: center; position: relative; width: 76px; }
.ia-hero-marca::after { animation: ia-onda 2.8s ease-out infinite; border: 2px solid var(--brand-red); border-radius: 30px; content: ""; inset: -6px; opacity: 0; position: absolute; }
.ia-hero h2 { background: linear-gradient(90deg, var(--text), var(--brand-red)); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 26px; margin: 1rem 0 .3rem; }
.ia-hero > p { color: var(--muted); font-size: 14px; margin: 0 auto 1.6rem; max-width: 560px; }
.ia-cartoes-grade { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); text-align: left; }
.ia-sugestao { animation: ia-entra .5s both; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--text); cursor: pointer; display: grid; font: inherit; gap: .2rem; padding: 1rem; position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; }
.ia-sugestao:nth-child(1) { animation-delay: .08s; } .ia-sugestao:nth-child(2) { animation-delay: .16s; } .ia-sugestao:nth-child(3) { animation-delay: .24s; } .ia-sugestao:nth-child(4) { animation-delay: .32s; }
.ia-sugestao:hover { border-color: var(--brand-red); box-shadow: 0 14px 30px rgba(172, 44, 35, .16); transform: translateY(-4px); }
.ia-sugestao .ico { font-size: 22px; transition: transform .25s; }
.ia-sugestao:hover .ico { transform: scale(1.25) rotate(-6deg); }
.ia-sugestao b { font-size: 14px; }
.ia-sugestao small { color: var(--muted); font-size: 12px; line-height: 1.4; }

/* Caixa de resposta fixa no pé, como nos chamados */
.ia-resposta { background: var(--bg); border-top: 1px solid var(--line); padding: .85rem 0 .9rem; }
.ia-form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 8px rgba(16, 22, 26, .06); padding: .65rem .8rem; transition: border-color .2s, box-shadow .2s; }
.ia-form:focus-within { border-color: var(--brand-red); box-shadow: 0 0 0 4px rgba(172, 44, 35, .13), 0 8px 24px rgba(16, 22, 26, .08); }
.ia-form textarea { background: transparent; border: 0; box-shadow: none; color: var(--text); display: block; font: inherit; font-size: 14.5px; line-height: 1.5; max-height: 180px; min-height: 48px; outline: none; padding: .2rem .25rem; resize: none; width: 100%; }
.ia-form-acoes { align-items: center; display: flex; gap: .6rem; margin-top: .4rem; }
.ia-form .ia-mic { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; color: var(--text); cursor: pointer; font: inherit; font-size: 12.5px; padding: .3rem .75rem; transition: background .15s, transform .15s; }
.ia-form .ia-mic:hover { background: var(--line); transform: translateY(-1px); }
.ia-dica { color: var(--muted); font-size: 11.5px; }
.ia-enviar { align-items: center; background: linear-gradient(135deg, #c23a30, var(--brand-red) 60%, #8f211a); border: 0; border-radius: 999px; box-shadow: 0 4px 12px rgba(172, 44, 35, .3); color: #fff; cursor: pointer; display: inline-flex; font: inherit; font-size: 13px; font-weight: 700; gap: .4rem; margin-left: auto; padding: .5rem 1.1rem; transition: transform .15s, box-shadow .15s, opacity .15s; }
.ia-enviar:hover:not(:disabled) { box-shadow: 0 8px 18px rgba(172, 44, 35, .4); transform: translateY(-2px); }
.ia-enviar:hover:not(:disabled) svg { transform: translateX(3px); }
.ia-enviar svg { transition: transform .15s; }
.ia-enviar:disabled { cursor: progress; opacity: .6; }
.ia-aviso { color: var(--muted); font-size: 11.5px; margin: .45rem 0 0; text-align: center; }
.ia-menu-btn { display: none; }

@keyframes ia-entra { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ia-revela { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes ia-shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
@keyframes ia-borda { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@keyframes ia-brilho { 0%, 100% { box-shadow: 0 0 0 0 rgba(172, 44, 35, .5); } 50% { box-shadow: 0 0 0 9px rgba(172, 44, 35, 0); } }
@keyframes ia-flutua { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ia-onda { 0% { opacity: .55; transform: scale(.95); } 100% { opacity: 0; transform: scale(1.35); } }

@media (max-width: 900px) {
  .ia-chat { grid-template-columns: 1fr; }
  .ia-menu-btn { display: inline-flex; }
  .ia-lateral { bottom: 0; left: 0; position: fixed; top: 0; transform: translateX(-105%); transition: transform .25s; width: min(310px, 88vw); z-index: 40; }
  .ia-lateral.aberta { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .4); transform: none; }
  .ia-fio, .ia-m { padding-inline: 1rem; }
  .ia-form-acoes .ia-dica { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ia-m, .ia-m *, .ia-hero, .ia-hero *, .ia-sugestao, .ia-conv, .ia-nova, .ia-pontos span { animation: none !important; transition: none !important; } .ia-chat .ia-conversa { scroll-behavior: auto; } }

/* ── Configurações ── */
.cfg-abas { margin-bottom: 1rem; }
.cfg-aviso { animation: ia-entra .35s both; background: rgba(194, 138, 0, .12); border: 1px solid rgba(194, 138, 0, .4); border-left: 4px solid #c28a00; border-radius: 10px; font-size: 13px; margin-bottom: 1rem; padding: .7rem 1rem; }
.cfg-aviso-perigo { background: rgba(172, 44, 35, .1); border-color: rgba(172, 44, 35, .4); border-left-color: var(--brand-red); }
.cfg-card { animation: ia-entra .45s cubic-bezier(.2, .8, .2, 1) both; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 3px rgba(16, 22, 26, .05); margin-bottom: 1rem; padding: 1.1rem 1.25rem; transition: box-shadow .2s; }
.cfg-card:hover { box-shadow: 0 10px 28px rgba(16, 22, 26, .08); }
.cfg-destaque { background: linear-gradient(135deg, rgba(172, 44, 35, .07), transparent 60%), var(--surface); border-left: 4px solid var(--brand-red); }
.cfg-card-topo { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
.cfg-card-topo h2 { font-size: 16px; margin: 0 0 .2rem; }
.cfg-card-topo p { color: var(--muted); font-size: 12.5px; line-height: 1.5; margin: 0; max-width: 760px; }
.cfg-grade { display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 1rem; }
.cfg-campo { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.cfg-campo > label { align-items: center; display: flex; font-size: 12.5px; font-weight: 700; gap: .5rem; justify-content: space-between; }
.cfg-campo input[type="text"], .cfg-campo input[type="number"], .cfg-campo input[type="time"], .cfg-campo input[type="password"] { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; font-size: 13.5px; padding: .55rem .75rem; transition: border-color .15s, box-shadow .15s, background .15s; width: 100%; }
.cfg-campo input:focus { background: var(--surface); border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(172, 44, 35, .14); outline: none; }
.cfg-campo small { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.cfg-padrao { opacity: .8; }
.cfg-chips { align-items: center; display: inline-flex; flex: none; gap: .3rem; }
.cfg-chip { border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .02em; padding: .1rem .5rem; white-space: nowrap; }
.cfg-tela { background: rgba(172, 44, 35, .12); color: var(--brand-red); }
.cfg-env { background: rgba(47, 111, 176, .14); color: #2f6fb0; }
.cfg-padrao-chip, .cfg-padrao.cfg-chip { background: var(--surface-soft); color: var(--muted); }
.cfg-reinicio { background: rgba(194, 138, 0, .2); color: #8a6100; }
.cfg-reinicio-fraco { background: var(--surface-soft); color: var(--muted); }
.cfg-volta { background: transparent; border: 0; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 14px; height: 22px; line-height: 1; transition: background .15s, transform .25s; width: 22px; }
.cfg-volta:hover { background: var(--surface-soft); color: var(--brand-red); transform: rotate(-180deg); }
.cfg-segredo { align-items: center; background: var(--surface-soft); border: 1px dashed var(--line); border-radius: 10px; display: flex; gap: .6rem; justify-content: space-between; padding: .45rem .6rem .45rem .8rem; }
.cfg-segredo-estado { color: var(--muted); font-size: 13px; }
.cfg-segredo-estado.ok { color: #2e7d4f; font-weight: 600; }
.cfg-segredo-estado code { background: var(--surface); border-radius: 5px; padding: .05rem .35rem; }
.cfg-segredo-input { flex: 1; }
.cfg-toggle { align-items: center; cursor: pointer; display: inline-flex; gap: .6rem; }
.cfg-toggle input { height: 0; opacity: 0; position: absolute; width: 0; }
.cfg-trilho { background: var(--line); border-radius: 999px; height: 24px; position: relative; transition: background .2s; width: 44px; }
.cfg-trilho::after { background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); content: ""; height: 18px; left: 3px; position: absolute; top: 3px; transition: transform .22s cubic-bezier(.3, 1.4, .5, 1); width: 18px; }
.cfg-toggle input:checked + .cfg-trilho { background: var(--brand-red); }
.cfg-toggle input:checked + .cfg-trilho::after { transform: translateX(20px); }
.cfg-toggle input:focus-visible + .cfg-trilho { box-shadow: 0 0 0 3px rgba(172, 44, 35, .25); }
.cfg-toggle-txt { font-size: 13px; }
.cfg-card-rodape { border-top: 1px solid var(--line); display: flex; justify-content: flex-end; margin-top: 1.1rem; padding-top: .85rem; }
.cfg-salvar { transition: transform .15s, box-shadow .15s; }
.cfg-salvar:hover:not(:disabled) { box-shadow: 0 8px 18px rgba(172, 44, 35, .3); transform: translateY(-2px); }
.cfg-teste:empty { display: none; }
.cfg-teste { margin-top: .75rem; }
.cfg-resultado { animation: ia-entra .3s both; border-radius: 10px; font-size: 13px; padding: .55rem .8rem; }
.cfg-resultado.ok { background: rgba(46, 125, 79, .12); border: 1px solid rgba(46, 125, 79, .35); color: #25683f; }
.cfg-resultado.erro { background: rgba(172, 44, 35, .1); border: 1px solid rgba(172, 44, 35, .35); color: #8f211a; }
.cfg-resultado small { opacity: .7; }
.cfg-testando { color: var(--muted); font-size: 13px; }
.cfg-andamento { align-items: center; color: var(--muted); display: flex; font-size: 13px; gap: .5rem; margin: .75rem 0 0; }
.cfg-rodape { text-align: center; }
.cfg-rodape code, .cfg-aviso code { background: var(--surface-soft); border-radius: 5px; padding: .05rem .35rem; }
@media (max-width: 700px) { .cfg-card-topo { flex-direction: column; } .cfg-grade { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .cfg-card, .cfg-aviso, .cfg-resultado, .cfg-trilho::after, .cfg-volta { animation: none !important; transition: none !important; } }

/* ── Menu de pedidos do assistente (digitar \) ── */
.ia-form { position: relative; }
.ia-menu-barra { animation: ia-entra .18s both; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; bottom: calc(100% + 8px); box-shadow: 0 18px 44px rgba(16, 22, 26, .18); left: 0; max-height: 340px; overflow-y: auto; padding: .35rem; position: absolute; right: 0; z-index: 30; }
.ia-menu-grupo { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; padding: .45rem .6rem .2rem; text-transform: uppercase; }
.ia-menu-item { align-items: center; background: transparent; border: 0; border-radius: 10px; color: var(--text); cursor: pointer; display: flex; font: inherit; gap: .65rem; padding: .45rem .6rem; text-align: left; transition: background .12s, transform .12s; width: 100%; }
.ia-menu-item .ico { align-items: center; background: var(--surface-soft); border-radius: 9px; display: inline-flex; flex: none; font-size: 16px; height: 30px; justify-content: center; width: 30px; }
.ia-menu-item b { display: block; font-size: 13.5px; }
.ia-menu-item small { color: var(--muted); display: block; font-size: 11.5px; max-width: 640px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ia-menu-item:hover, .ia-menu-item.ativo { background: rgba(172, 44, 35, .09); }
.ia-menu-item.ativo { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) { .ia-menu-barra, .ia-menu-item { animation: none !important; transition: none !important; } }

/* Consulta em massa: filtros da lista e tela de download em lote na Judit */
.ms-filtros { align-items: flex-start; display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.ms-filtros > input, .ms-filtros > select { max-width: 280px; min-width: 160px; }
.ms-filtros details { position: relative; }
.ms-filtros summary { background: var(--surface-soft); border-radius: 8px; cursor: pointer; font-size: 13px; padding: .45rem .75rem; user-select: none; }
.ms-f-painel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); display: grid; gap: .5rem; left: 0; max-width: 92vw; padding: .75rem; position: absolute; top: calc(100% + 4px); width: 420px; z-index: 20; }
.ms-f-modo { display: grid; font-size: 13px; gap: .2rem; }
.ms-f-classes { display: grid; gap: .15rem; max-height: 260px; overflow-y: auto; }
.ms-f-classes label { align-items: flex-start; display: flex; font-size: 13px; gap: .4rem; }
.ms-bx-modal { max-height: 92vh; max-width: 980px; overflow-y: auto; width: 96vw; }
.ms-bx-pasta { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.ms-bx-prog { margin: .4rem 0; }
.ms-bx-fim { border-radius: 10px; font-size: 14px; margin: .5rem 0; padding: .75rem 1rem; }
.ms-bx-fim.ok { background: var(--badge-green-bg); color: var(--badge-green-text); }
.ms-bx-fim.atencao { background: var(--badge-amber-bg); color: var(--badge-amber-text); }
.ms-bx-lista { max-height: 280px; overflow-y: auto; }
.ms-bx-log { background: #14181f; border-radius: 8px; color: #d6dde8; font: 12px/1.5 ui-monospace, Consolas, monospace; max-height: 190px; overflow-y: auto; padding: .6rem .75rem; }
.ms-bx-log span { color: #7f8b9c; }
.ms-bx-log .erro { color: #ff9b9b; }

/* Filtros da lista (versao simples: campos com rotulo, sem painel flutuante) */
.ms-filtros { align-items: flex-end; }
.ms-f-campo { display: grid; gap: .2rem; min-width: 150px; }
.ms-f-campo > label { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.ms-f-campo input, .ms-f-campo select { max-width: none; }
.ms-f-larga { flex: 1 1 280px; }
.ms-f-chips { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: .3rem; min-height: 36px; padding: .2rem .4rem; }
.ms-f-chips input { background: transparent; border: 0; flex: 1 1 140px; min-width: 120px; outline: none; padding: .25rem; }
.ms-f-chip { background: var(--badge-blue-bg); border-radius: 999px; color: var(--badge-blue-text); font-size: 12px; padding: .15rem .3rem .15rem .6rem; }
.ms-f-chip.neg { background: var(--badge-red-bg); color: var(--badge-red-text); }
.ms-f-chip button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 .25rem; }

.ms-filtros { align-items: flex-start; }

/* Filtros da lista: grade que se adapta a largura e campos todos iguais (sobrepoe o estilo global de input) */
.ms-filtros { display: grid; gap: .6rem .75rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: .6rem 0; align-items: start; }
.ms-f-campo { display: grid; gap: .25rem; min-width: 0; }
.ms-f-larga { flex: none; }
.ms-f-campo > input, .ms-f-campo > select {
  background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: 8px !important; box-shadow: none !important; box-sizing: border-box;
  font: inherit; font-size: 13px; min-height: 36px; outline: none !important; padding: .4rem .6rem !important; width: 100% !important; max-width: none !important;
}
.ms-f-chips { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-sizing: border-box; min-height: 36px; width: 100%; }
.ms-f-chips input { background: transparent !important; border: 0 !important; box-shadow: none !important; font: inherit; font-size: 13px; outline: none !important; padding: .25rem !important; flex: 1 1 120px; min-width: 100px; width: auto !important; max-width: none !important; }
.ms-f-campo > input:focus, .ms-f-campo > select:focus, .ms-f-chips:focus-within { border-color: var(--brand-blue) !important; }
.ms-f-chip { max-width: 100%; overflow-wrap: anywhere; }

.ms-f-botoes > div { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem; min-height: 36px; }

.ms-ord { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; font-weight: 600; padding: 0; text-align: left; text-transform: inherit; white-space: nowrap; }
.ms-ord:hover { color: var(--brand-blue); }
.ms-datas { white-space: nowrap; }

.ms-bx-faixa { align-items: center; display: flex; flex-wrap: wrap; gap: .6rem; }

/* Download em lote: tela minimizada, barra ao vivo no rodape e faixa com progresso */
.ms-bx-min { display: none !important; }
.ms-bx-barra { background: var(--surface-soft); border-radius: 999px; height: 10px; margin: .4rem 0; overflow: hidden; width: 100%; }
.ms-bx-barra span { background: var(--brand-blue); border-radius: 999px; display: block; height: 100%; transition: width .6s ease; }
.ms-bx-barra.ok span { background: var(--success); }
.ms-bx-barra.atencao span { background: var(--warning); }
.ms-bx-faixa-txt { flex: 1 1 320px; min-width: 0; }
.ms-bx-faixa-txt .ms-bx-barra { max-width: 520px; }
.ms-bx-dock { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; bottom: 1.4rem; box-shadow: 0 18px 44px rgba(15, 23, 42, .25); left: 1rem; margin: 0 auto; max-width: 680px; padding: .8rem 1rem; position: fixed; right: 5.8rem; z-index: 1950; }
.ms-bx-dock-topo { align-items: baseline; display: flex; gap: .6rem; justify-content: space-between; }
.ms-bx-dock-pct { font-size: 1.15rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.ms-bx-dock-info, .ms-bx-dock-vez { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.ms-bx-dock-info .erro { color: var(--danger, #ac2c23); font-weight: 600; }
.ms-bx-dock-vez { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-bx-dock-acoes { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .55rem; }
@media (max-width: 640px) { .ms-bx-dock { bottom: 5.6rem; right: 1rem; } }

/* Abas dos menus agrupados (Publicacoes, Acompanhar, Carteiras, Inteligencia, Acervo, Configuracoes) */
/* Subabas do grupo: continuam o cabecalho da tela (mesmo fundo, uma linha so embaixo), sem faixa cinza nem botao cortado. */
.ti-topbar:has(+ .jr-subabas) { border-bottom: 0; box-shadow: none; padding-bottom: .5rem; }
.jr-subabas { align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.25rem; padding: .25rem 1.5rem .85rem; }
.jr-subabas .ia-aba { line-height: 1.2; margin: 0; white-space: nowrap; }
@media (max-width: 640px) { .jr-subabas { flex-wrap: nowrap; overflow-x: auto; padding: .25rem 1rem .85rem; scrollbar-width: thin; } }

/* Tela do processo: botoes no canto superior direito, na linha do numero (a etiqueta de materia longa empurrava os botoes
   para baixo do titulo). No celular voltam para baixo do titulo. */
.jr-modal-proc .jr-modal-topo, .ms-bx-modal .jr-modal-topo { flex-wrap: nowrap; }
.jr-modal-proc .jr-modal-topo > div:first-child, .ms-bx-modal .jr-modal-topo > div:first-child { flex: 1 1 auto; min-width: 0; }
.jr-modal-proc .jr-modal-acoes, .ms-bx-modal .jr-modal-acoes { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; max-width: 55%; }
@media (max-width: 760px) {
  .jr-modal-proc .jr-modal-topo, .ms-bx-modal .jr-modal-topo { flex-wrap: wrap; }
  .jr-modal-proc .jr-modal-acoes, .ms-bx-modal .jr-modal-acoes { justify-content: flex-start; max-width: none; }
}

/* ── Busca única: modos (IA, banco, CNJ, parte, CNPJ, OAB) numa barra só ── */
.bu-modos { margin-bottom: .75rem; }
.bu-aba-ia { border-color: var(--brand-red); color: var(--brand-red); font-weight: 600; }
.bu-aba-ia.active { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.bu-modo-ia .bu-linha { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(172, 44, 35, .08); }
.bu-filtros { margin-top: .75rem; }
.bu-filtros:not(:has(> .form-group:not(.hidden))) { display: none; }
.bu-card .jr-nota#jr-dica { margin: .6rem .2rem 0; }
.bu-entendi { align-items: center; background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; display: flex; flex-wrap: wrap; gap: .4rem .6rem; margin-top: .75rem; padding: .5rem .75rem; font-size: 13px; }
.bu-entendi-rot { color: var(--brand-red); font-weight: 600; }
.bu-entendi .btn { margin-left: auto; width: auto; }
.bu-entendi-aviso { flex: 1 1 100%; margin: 0; }
@media (max-width: 640px) { .bu-linha input { font-size: 13px; } .bu-entendi .btn { margin-left: 0; } }

/* ── Análise de mercado na busca ── */
.mc-card h3 { font-size: 14px; margin: 1.1rem 0 .5rem; }
.mc-topo { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
.mc-metricas { margin: .75rem 0; }
.mc-duas { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.mc-orgaos { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mc-orgao { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; padding: .6rem .75rem; }
.mc-orgao ol { margin: .35rem 0 0 1.1rem; padding: 0; }
.mc-sobe { color: #1f7a3f; font-weight: 600; }
.mc-desce { color: var(--brand-red); font-weight: 600; }

/* ── Busca única: exemplos clicáveis ── */
.bu-exemplos { align-items: center; display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem .2rem 0; }
.bu-exemplos:empty { display: none; }
.bu-exemplo { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: inherit; cursor: pointer; font: inherit; font-size: 12px; padding: .2rem .65rem; }
.bu-exemplo:hover { border-color: var(--brand-red); color: var(--brand-red); }

/* ── Cadastro de dados do cliente ── */
.cd-form { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin: .75rem 0; padding: .75rem; }
.cd-form .ct-check { display: block; margin-top: .5rem; }
.cd-acoes { white-space: nowrap; }
.cd-valor { overflow-wrap: anywhere; }
.cd-novotipo { border-top: 1px dashed var(--line); margin-top: .75rem; padding-top: .75rem; }
.cd-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; display: inline-block; font-size: 12px; padding: .1rem .2rem .1rem .6rem; }
.cd-chip button { background: none; border: 0; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 .35rem; }
.cd-chip button:hover { color: var(--brand-red); }

.pq-acomp-form { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 .25rem; }
.pq-acomp-form input { flex: 1 1 260px; }
.pq-acomp-lista { display: grid; gap: .75rem; }
.pq-acomp { border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; }
.pq-acomp-motivo { margin: .25rem 0 0; }
.pq-serie { align-items: flex-end; display: flex; gap: 4px; height: 76px; margin: .6rem 0 .25rem; }
.pq-serie-col { align-items: center; display: flex; flex: 1; flex-direction: column; height: 100%; justify-content: flex-end; min-width: 0; }
.pq-serie-col i { background: var(--brand-blue, #1d4ed8); border-radius: 3px 3px 0 0; display: block; min-height: 2px; width: 100%; }
.pq-serie-col small { color: var(--muted); font-size: 10px; line-height: 1.6; }

.sv-pag { justify-content: center; margin-top: .6rem; }


/* ── Pente fino (botoes, campos e espacos) ──
   O tema (ti.css) faz .btn-primary ocupar a linha toda (width: 100%). Dentro de linhas de acao, topo de cartao, barra e campos o botao
   tem a largura do texto; do contrario ele estica, empurra os vizinhos para baixo e fica colado neles. */
.ti-view :is(.jr-card-acoes, .jr-card-topo, .ti-topbar-actions, .jr-campos, .ms-linha, .ms-selecao, .ms-dupla, .ts-filtro) .btn-primary { width: auto; padding: .55rem 1.1rem; }
.ti-view :is(.jr-card-acoes, .jr-card-topo, .ti-topbar-actions, .ms-selecao) .btn-sm.btn-primary { padding: .4rem .85rem; }
.jr-card-acoes { gap: .5rem; }
.jr-card-topo > .jr-card-acoes { justify-content: flex-end; }
/* respiro entre blocos: campos -> botoes, abas -> campos, notas dentro do cartao */
.jr-campos + .jr-card-acoes, .jr-campos + .ms-dupla { margin-top: 1rem; }
.ts-filtro { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 1rem; }
.jr-card > .jr-nota, .pq-acomp > .jr-nota { margin: .45rem 0 .65rem; line-height: 1.5; }
.ms-dupla { align-items: center; gap: .5rem .6rem; margin: .75rem 0; }
.ms-dupla select { min-height: 2.25rem; }
/* formulario da consulta em massa e da consulta cadastral: rotulos alinhados em cima (antes alinhava pela base e desencontrava os rotulos) */
#ms-form .jr-campos, #cd-resultado .jr-campos { align-items: flex-start; gap: .9rem 1rem; }
#ms-form .jr-campos .form-group, #cd-resultado .jr-campos .form-group { margin-bottom: 0; }
.ms-linha { align-items: stretch; gap: .5rem; }
.ms-linha input, .ms-linha select, .ms-linha .btn { box-sizing: border-box; min-height: 2.5rem; }
.ms-linha .ms-csv { padding: 0 .85rem; }
.ms-check { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--text, #222); line-height: 1.35; }
.form-group > .jr-nota { margin-top: .15rem; line-height: 1.45; }
.ms-ajuda { margin: .5rem 0 0; }
.ms-ajuda summary { cursor: pointer; font-weight: 600; }
.ms-ajuda ul { margin: .4rem 0 0; padding-left: 1.2rem; display: grid; gap: .25rem; }
/* listas guardadas (CSV) e etiquetas */
.ms-lista { margin-top: .4rem; gap: .25rem .75rem; }
.ms-tags { gap: .35rem; margin: .35rem 0 .25rem; }
/* tabelas: botoes e etiquetas nao encostam uns nos outros */
.jr-tabela td .btn-sm { margin-top: .4rem; }
.jr-tabela td .jr-sit { margin: 0 .3rem .3rem 0; }
.jr-tabela td .jr-card-acoes { flex-wrap: wrap; gap: .35rem; }
.tr-filtro { min-width: 16rem; }
.jr-card + .jr-card { margin-top: 1rem; }
@media (max-width: 720px) {
  .jr-card-topo > .jr-card-acoes { justify-content: flex-start; }
  .ms-linha { flex-wrap: wrap; }
  .ms-linha input { flex: 1 1 100%; }
  .ms-linha .ms-op { flex: 1 1 8rem; width: auto; max-width: none; }
  #ms-form .jr-campos .form-group, #cd-resultado .jr-campos .form-group { flex: 1 1 100%; min-width: 0; }
  .ti-view :is(.jr-card-acoes, .ts-filtro) .btn { flex: 1 1 auto; }
}
.sv-acoes { margin-top: .5rem; }

/* ── Nova consulta (Consulta em massa): secoes numa grade de 12 colunas ── */
#ms-form .ms-form-corpo { display: flex; flex-direction: column; gap: 1rem; margin-top: .25rem; }
#ms-form .ms-sec { border: 1px solid var(--line, #e6e1d8); border-radius: 12px; margin: 0; min-width: 0; padding: .9rem 1.1rem 1.1rem; background: var(--surface, #fff); }
#ms-form .ms-sec legend { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; padding: 0 .45rem; text-transform: uppercase; color: var(--brand-red, #b3261e); }
#ms-form .ms-sec-dica { color: var(--muted, #6b6b6b); font-size: 12.5px; margin: 0 0 .75rem; }
#ms-form .ms-grade { display: grid; gap: .9rem 1rem; grid-template-columns: repeat(12, minmax(0, 1fr)); }
#ms-form .ms-campo { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
#ms-form .ms-campo.c3 { grid-column: span 3; } #ms-form .ms-campo.c4 { grid-column: span 4; } #ms-form .ms-campo.c6 { grid-column: span 6; }
#ms-form .ms-campo.c8 { grid-column: span 8; } #ms-form .ms-campo.c12 { grid-column: span 12; }
#ms-form .ms-campo > label { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #6b6b6b); }
#ms-form .ms-campo input, #ms-form .ms-campo select { box-sizing: border-box; min-height: 2.5rem; width: 100%; }
#ms-form .ms-campo .jr-nota { margin: 0; font-size: 12px; }
#ms-form .ms-linha { align-items: stretch; display: flex; gap: .5rem; }
#ms-form .ms-linha input { flex: 1 1 auto; min-width: 0; width: auto; }
#ms-form .ms-linha .ms-op { flex: 0 0 11rem; max-width: 11rem; width: 11rem; }
#ms-form .ms-linha .ms-csv { flex: 0 0 auto; width: auto; padding: 0 .9rem; }
#ms-form .ms-opcoes { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#ms-form .ms-opcao { align-items: flex-start; background: var(--surface-soft, #f7f5f1); border: 1px solid var(--line, #e6e1d8); border-radius: 12px; cursor: pointer; display: flex; gap: .65rem; padding: .8rem 1rem; }
#ms-form .ms-opcao:has(input:checked) { border-color: var(--brand-red, #b3261e); background: #fff5f4; }
#ms-form .ms-opcao input { flex: 0 0 auto; margin-top: .2rem; width: auto; }
#ms-form .ms-opcao b { display: block; font-size: 13px; }
#ms-form .ms-opcao small { color: var(--muted, #6b6b6b); display: block; font-size: 12px; line-height: 1.4; margin-top: .15rem; }
#ms-form .ms-importar { align-items: center; background: var(--surface-soft, #f7f5f1); border: 1px dashed var(--line, #d8d2c6); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; padding: 1rem 1.2rem; }
#ms-form .ms-importar > div { flex: 1 1 28rem; } #ms-form .ms-importar p { color: var(--muted, #6b6b6b); font-size: 12.5px; margin: .3rem 0 0; }
#ms-form .ms-rodape { align-items: center; border-top: 1px solid var(--line, #e6e1d8); display: flex; flex-wrap: wrap; gap: .75rem 1rem; justify-content: space-between; margin-top: 1.1rem; padding-top: 1rem; }
#ms-form .ms-rodape-acoes { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
@media (max-width: 900px) { #ms-form .ms-campo.c3, #ms-form .ms-campo.c4, #ms-form .ms-campo.c6, #ms-form .ms-campo.c8 { grid-column: span 12; } #ms-form .ms-opcoes { grid-template-columns: 1fr; } }
@media (max-width: 600px) { #ms-form .ms-linha { flex-wrap: wrap; } #ms-form .ms-linha .ms-op { flex: 1 1 100%; max-width: none; width: 100%; } }
#ms-form .ms-campo.form-group { margin: 0; }
#ms-form .ms-sec, #ms-form .ms-form-corpo, #ms-form .ms-grade { box-sizing: border-box; max-width: 100%; min-width: 0; }

.ms-filtros .ms-f-rodape { border-top: 1px solid var(--line, #e6e1d8); display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; padding-top: .75rem; }
