/* Sucessão: estilos próprios. Prefixo suc- e fam- para nunca
   colidir com o CSS existente do app. */
.aghtml .suc-pergunta {
  font-size: 1rem;
  color: #52596B;
  margin: 0 0 14px;
}

/* Árvore genealógica. Diferente de .pes-tree (organograma de
   cargos, hierarquia de pai único): aqui o nó é um CASAL, e os
   filhos descem do casal, não de um dos dois.

   O conector é o desenho clássico de organograma em CSS puro: um
   traço vertical de cada `<li>` até uma barra horizontal que liga
   os IRMÃOS entre si (`::after`, cortada pela metade no primeiro e
   no último filho, pra barra não sobrar pra fora de quem não tem
   mais irmão daquele lado), mais um traço vertical do meio da barra
   até o `<ul>` do pai. Sem a barra horizontal, cada filho ficava com
   um traço solto no ar, sem se ligar ao traço do pai. As raízes
   (`.fam-tree` > `li` direto) não têm nada disso: elas não têm pai
   em comum, então não são "irmãs" de verdade. */
.aghtml .fam-tree, .aghtml .fam-tree ul { list-style: none; margin: 0; padding: 0; }
.aghtml .fam-tree > li { display: inline-block; vertical-align: top; padding: 0 18px; }
.aghtml .fam-tree ul { display: flex; justify-content: center; padding-top: 22px; }
.aghtml .fam-tree li { position: relative; text-align: center; }
.aghtml .fam-tree li ul li { padding: 22px 18px 0 18px; }
.aghtml .fam-tree li ul li::before {
  content: ''; position: absolute; top: 0; left: 50%; width: 1px; height: 22px; background: #c9cdbf;
}
.aghtml .fam-tree li ul li::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: #c9cdbf;
}
.aghtml .fam-tree li ul li:first-child::after { left: 50%; }
.aghtml .fam-tree li ul li:last-child::after { right: 50%; }
/* Filho único não tem irmão pra ligar: só o traço vertical até o
   pai, sem barra horizontal (que já é suprimida pela regra acima,
   já que first-child e last-child juntas cobrem o :only-child, mas
   left:50% + right:50% deixariam uma barra de largura zero visível
   como ponto; melhor esconder de vez). */
.aghtml .fam-tree li ul li:only-child::after { display: none; }
.aghtml .fam-casal { display: inline-flex; align-items: center; gap: 6px; }
.aghtml .fam-uniao {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.aghtml .fam-uniao::before, .aghtml .fam-uniao::after {
  content: ''; width: 10px; height: 1px; background: #c9cdbf; display: block;
}
.aghtml .fam-uniao span {
  font-size: 11px; color: #5c5f54; white-space: nowrap;
}
.aghtml .fam-box {
  border: 1px solid #c9cdbf; border-radius: 8px; padding: 8px 12px; background: #fff;
  min-width: 150px; cursor: pointer; text-align: left;
}
.aghtml .fam-box:hover { border-color: #2f6b34; }
.aghtml .fam-box .fam-nome { font-weight: 600; font-size: 0.95rem; color: #21301f; }
.aghtml .fam-box .fam-sub  { font-size: 0.78rem; color: #5c5f54; }
/* Papel operacional em verde, e nunca só pela cor: o rótulo de
   texto acompanha, regra do Gauntlet. */
.aghtml .fam-box.fam-opera { border-color: #2f6b34; background: #f2f7f2; }
.aghtml .fam-box.fam-falecido { background: #f4f4f2; border-style: dashed; }
.aghtml .suc-glos { border-top: 1px solid #e6e8e0; padding: 8px 0; }
.aghtml .suc-glos summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; color: #21301f; }
.aghtml .suc-glos p { margin: 6px 0 0; font-size: 0.9rem; color: #3f4438; }

/* Aba Bens: linha cuja titularidade não fecha 100%. */
.aghtml tr.linha-alerta td { background: #fdf6e6; }

/* ── Árvore da família, visual 2026 (11/09/2026) ─────────────
   Cartões com etiqueta de parentesco (cor por tipo, sempre com o
   texto junto), casal numa cápsula com o regime dentro, traços de
   2px e trilho de gerações à esquerda (posicionado por JS, que mede
   a altura real de cada nível). Contraste das etiquetas: reta
   #1f5a2a/#e7f4e3 7,1:1; colateral #2f4fa8/#eef1fb 6,6:1; afim
   #5b3fb8/#f3eefc 6,7:1; cônjuge #8a5a10/#fff3dc 5,4:1. */
.aghtml .fam-ferramentas { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.aghtml .fam-ref { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #52596B; }
.aghtml .fam-ref select { min-height: 44px; border: 1px solid #d3d8d1; border-radius: 8px; padding: 0 30px 0 10px; font-size: 16px; font-weight: 600; color: #0f1f14; background-color: #fff; }
.aghtml .fam-arvore { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px; }
.aghtml .fam-geracoes { position: relative; }
.aghtml .fam-ger { position: absolute; left: 0; right: 0; transform: translateY(-50%); text-align: right; padding-right: 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #52596B; border-right: 2px solid #e4e7e2; line-height: 1.3; }
.aghtml .fam-tree ul { padding-top: 26px; }
.aghtml .fam-tree li ul li { padding: 26px 8px 0 8px; }
.aghtml .fam-tree li ul li::before { width: 2px; height: 26px; background: #cdd3ca; margin-left: -1px; }
.aghtml .fam-tree li ul li::after { height: 2px; background: #cdd3ca; }
.aghtml .fam-tree > li { padding: 0 8px; }
/* Árvore centralizada; quando não cabe, posicionarGeracoes reduz o
   zoom até 72% antes de deixar rolar para o lado. */
.aghtml .fam-arvore .pes-tree-wrap { text-align: center; }
/* Traço do casal até a barra dos filhos: sobe do meio do <ul> dos
   filhos (que fica centrado sob o casal) pela folga de 26px. Pessoa
   sozinha com filhos: a caixa dela pode ser mais alta que o cartão
   (altura igualada por nível), então uma linha central atravessa a
   caixa inteira por trás do cartão, e o traço não fica interrompido. */
.aghtml .fam-tree li > ul { position: relative; }
.aghtml .fam-tree li > ul::before {
  content: ''; position: absolute; top: 0; left: var(--fam-tronco, 50%); width: 2px; height: 26px; margin-left: -1px; background: #cdd3ca;
}
.aghtml .fam-tree li:has(> ul) > .fam-casal.so {
  background: linear-gradient(#cdd3ca, #cdd3ca) center / 2px 100% no-repeat;
}
/* Modo compacto (ligado por posicionarGeracoes quando a árvore não
   cabe): casais dos níveis de baixo empilham, um cartão sobre o outro
   com a aliança no meio, o que corta a largura de cada casal pela
   metade. O casal do topo continua lado a lado. */
.aghtml .fam-arvore.compacto .fam-tree ul .fam-casal-linha { flex-direction: column; align-items: stretch; }
.aghtml .fam-arvore.compacto .fam-tree ul .fam-uniao { flex-direction: row; justify-content: center; padding: 4px 0; }
.aghtml .fam-casal { display: inline-flex; flex-direction: column; align-items: center; gap: 0;
  background: #f7f8f6; border: 1px solid #eceee9; border-radius: 16px; padding: 8px; }
.aghtml .fam-casal.so { background: transparent; border-color: transparent; padding: 0; }
.aghtml .fam-casal-linha { display: flex; align-items: center; }
.aghtml .fam-uniao { flex-direction: column; gap: 2px; padding: 0 6px; color: #52596B; }
.aghtml .fam-uniao::before, .aghtml .fam-uniao::after { display: none; }
.aghtml .fam-uniao svg { width: 22px; height: 14px; stroke: #b08a2e; fill: none; stroke-width: 1.8; }
.aghtml .fam-uniao span { font-size: 11px; color: #52596B; }
.aghtml .fam-regime { font-size: 12px; color: #52596B; margin-top: 6px; }
.aghtml .fam-regime.pend { color: #8a5a10; font-weight: 600; }
.aghtml .fam-box { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid #e4e7e2; border-radius: 12px;
  padding: 8px 11px; background: #fff; min-width: 140px; max-width: 190px; text-align: left; box-shadow: 0 1px 2px rgba(15,31,20,.05);
  transition: border-color .15s ease, box-shadow .15s ease; }
.aghtml button.fam-box:hover { border-color: #2f7a3b; box-shadow: 0 6px 16px -8px rgba(15,31,20,.25); }
.aghtml .fam-box .fam-nome { font-weight: 600; font-size: 14px; line-height: 1.25; color: #0f1f14; white-space: normal; }
.aghtml .fam-box .fam-sub { font-size: 12px; color: #52596B; }
.aghtml .fam-box.fam-opera { border-color: #b9d7b6; background: #f7fbf6; }
.aghtml .fam-box.fam-falecido { background: #f7f7f5; border-style: dashed; }
.aghtml .fam-box.fam-falecido .fam-nome { color: #52596B; }
.aghtml .fam-par { display: inline-block; margin-top: 5px; font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.aghtml .fam-par.ref { background: #0f1f14; color: #fff; }
.aghtml .fam-par.reta { background: #e7f4e3; color: #1f5a2a; }
.aghtml .fam-par.colateral { background: #eef1fb; color: #2f4fa8; }
.aghtml .fam-par.afim { background: #f3eefc; color: #5b3fb8; }
.aghtml .fam-par.conjuge { background: #fff3dc; color: #8a5a10; }
.aghtml .fam-par.nenhum { background: #f0f2ee; color: #4f584e; }
.aghtml .fam-soltos { margin-top: 22px; border-top: 1px dashed #d3d8d1; padding-top: 14px; }
.aghtml .fam-soltos-tit { font-size: 13px; font-weight: 600; color: #3d4539; }
.aghtml .fam-soltos-lista { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 640px) {
  .aghtml .fam-arvore { grid-template-columns: minmax(0, 1fr); }
  .aghtml .fam-geracoes { display: none; }
  .aghtml .fam-ref { margin-left: 0; width: 100%; }
}

/* ── Partilha visual (11/09/2026) ────────────────────────────
   Abas por falecimento, árvore da herança (reaproveita .fam-* da
   aba Família), quadro de bens ao passar o mouse, detalhe por
   pessoa, barras "com quem fica cada bem" e cartões por bem. Cor só
   com legenda: verde escuro #2f6b34 = já era dono (texto branco
   6,3:1), verde claro #cfe3cf = recebe na herança (texto #0f1f14
   13:1). Texto secundário #52596B sobre branco 7,0:1. */
.aghtml .par-abas { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.aghtml .par-aba { flex: 1; min-width: 220px; min-height: 44px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  text-align: left; border: 1px solid #e4e7e2; border-radius: 12px; padding: 10px 14px; background: #fff; cursor: pointer; }
.aghtml .par-aba .n { font-size: 11px; font-weight: 600; color: #52596B; }
.aghtml .par-aba .t { font-weight: 700; font-size: 14px; color: #0f1f14; }
.aghtml .par-aba .v { font-size: 12px; color: #3d4539; }
.aghtml .par-aba:hover { border-color: #9aa198; }
.aghtml .par-aba.on { border-color: #0f1f14; box-shadow: inset 0 0 0 1px #0f1f14; }

.aghtml .her-card { cursor: default; }
.aghtml .her-card[data-her] { cursor: help; }
.aghtml .her-card[data-her]:hover, .aghtml .her-card[data-her]:focus { border-color: #2f7a3b; box-shadow: 0 6px 16px -8px rgba(15,31,20,.25); outline: none; }
.aghtml .her-card[data-her]:focus-visible { outline: 2px solid #2f7a3b; outline-offset: 2px; }
.aghtml .her-falta { border: 2px solid #0f1f14; }
.aghtml .her-morto { border-style: dashed; background: #f7f7f5; }
.aghtml .her-fora { opacity: .55; }
.aghtml .her-v { display: block; margin-top: 5px; font-weight: 700; font-size: 14px; color: #0f1f14; font-variant-numeric: tabular-nums; white-space: nowrap; }
.par-tip .conta { color: #dfe8e0; font-size: 11px; margin: -2px 0 4px; }
.aghtml .her-p { margin-left: 6px; font-size: 12px; font-weight: 600; color: #1f5a2a; }

.par-tip { position: fixed; z-index: 80; width: 300px; background: #0f1f14; color: #fff; border-radius: 10px; padding: 11px 13px;
  font-size: 12px; line-height: 1.4; box-shadow: 0 14px 30px -12px rgba(0,0,0,.5); pointer-events: none; }
.par-tip b { display: block; font-size: 13px; margin-bottom: 4px; }
.par-tip .g { color: #b9c7bc; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-top: 8px; }
.par-tip .l { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.par-tip .l:last-child { border-bottom: 0; }
.par-tip .l span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }

.aghtml .par-an { border: 1px solid #e4e7e2; border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.aghtml .par-an summary { display: grid; grid-template-columns: minmax(0,1fr) 80px 150px 70px 14px; gap: 10px; align-items: center;
  padding: 10px 14px; min-height: 44px; cursor: pointer; list-style: none; }
.aghtml .par-an summary::-webkit-details-marker { display: none; }
.aghtml .par-an summary::after { content: '▸'; color: #52596B; }
.aghtml .par-an[open] summary::after { content: '▾'; }
.aghtml .par-an[open] summary { border-bottom: 1px solid #f0f2ee; background: #fbfcfa; }
.aghtml .par-an .nm { font-weight: 600; }
.aghtml .par-an .rl { color: #52596B; font-size: 12px; }
.aghtml .par-num { text-align: right; font-variant-numeric: tabular-nums; }
.aghtml .par-mut { color: #52596B; }

.aghtml .par-leg { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: #3d4539; margin: 0 0 8px; }
.aghtml .par-leg i { display: inline-block; width: 16px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.aghtml .par-grp { font-size: 11px; font-weight: 700; color: #52596B; text-transform: uppercase; letter-spacing: .06em; margin: 16px 0 4px; }
.aghtml .par-bem { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 14px; align-items: start; padding: 9px 0; border-top: 1px solid #f2f3f0; }
.aghtml .par-bem .bn { font-weight: 600; }
.aghtml .par-bem .bv { display: block; color: #52596B; font-size: 12px; font-weight: 400; }
.aghtml .par-seg { display: flex; height: 28px; border-radius: 6px; overflow: hidden; gap: 2px; }
.aghtml .par-seg > span { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; min-width: 3px; }
.aghtml .par-ja { background: #2f6b34; color: #fff; }
.aghtml .par-her { background: #cfe3cf; color: #0f1f14; }
.aghtml .par-bem .txt { font-size: 12px; color: #3d4539; margin-top: 6px; line-height: 1.5; }

.aghtml .par-bcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.aghtml .par-bc { border: 1px solid #e4e7e2; border-radius: 12px; overflow: hidden; background: #fff; }
.aghtml .par-bc-cab { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid #f0f2ee; }
.aghtml .par-ic { width: 36px; height: 36px; flex: none; padding: 8px; border-radius: 10px; background: #eef4ec;
  stroke: #1f5a2a; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.aghtml .par-bc-nome { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.aghtml .par-bc-val { font-size: 12px; color: #52596B; }
.aghtml .par-bc table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.aghtml .par-bc thead th { background: #f7f8f6 !important; color: #52596B !important; font-size: 11px; padding: 6px 14px; border-bottom: 1px solid #eceee9 !important; }
.aghtml .par-bc td { padding: 6px 14px; border-bottom: 1px solid #f4f5f2; white-space: normal; }
.aghtml .par-bc tbody tr:last-child td { border-bottom: 0; }
.aghtml .par-bc .ja-nota { display: block; font-size: 11px; color: #52596B; }

@media (max-width: 640px) {
  .aghtml .par-bem { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .aghtml .par-an summary { grid-template-columns: minmax(0,1fr) 110px 14px; }
  .aghtml .par-an summary .par-oc, .aghtml .par-an summary .par-num.par-mut { display: none; }
  .aghtml .par-aba { min-width: 0; }
}

/* Chave "Ver como" do master (15/10/2026) */
.aghtml .suc-ver-como { align-self: center; font-size: 12px; font-weight: 600; color: var(--texto-2, #5b6470); margin-right: 6px; }
.aghtml .suc-aviso-visao { margin: 4px 0 10px; }

/* Patrimônio de origem e documentos do caso (15/10/2026) */
.aghtml .ori-lista, .aghtml .ori-docs { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.aghtml .ori-item, .aghtml .ori-docs li { border: 1px solid var(--borda, #e4e7e2); border-radius: 10px; padding: 10px 12px; }
.aghtml .ori-docs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.aghtml .ori-pessoa { margin: 14px 0 0; font-size: 14px; font-weight: 700; }
.aghtml .ori-acoes { display: flex; gap: 8px; margin-top: 8px; }
.aghtml .ori-sem { color: #9a6200; font-weight: 600; }

/* Selo de revisão por especialidade (15/10/2026) */
.aghtml .suc-selo-esp { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.aghtml .suc-selo-esp span { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--borda, #e4e7e2); }
.aghtml .suc-selo-esp .ok { color: #1f6b3a; background: #eef7f0; }
.aghtml .suc-selo-esp .pend { color: #9a6200; background: #fdf6e7; }

/* "Ver como" e "Especialidade" com o rótulo fora da caixa (15/10/2026) */
.aghtml .suc-ver-como-wrap, .aghtml .suc-lentes { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aghtml .suc-lentes { display: flex; margin: 4px 0 6px; }
.aghtml .suc-lente-pergunta { margin: 0 0 10px; }
.aghtml .suc-consulta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 10px; font-size: 13px; }
.aghtml .suc-consulta span { color: var(--texto-2, #5b6470); font-weight: 600; }
.aghtml .suc-consulta { gap: 6px 8px; }
.aghtml .suc-consulta .suc-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--borda, #d3d8d1); color: var(--texto-2, #3d4539); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.aghtml .suc-consulta .suc-chip:hover { border-color: var(--verde-lavoura, #2f6b3a); color: var(--verde-lavoura, #2f6b3a); }
.aghtml .suc-consulta .suc-chip.ativo { background: var(--verde-lavoura, #2f6b3a); border-color: var(--verde-lavoura, #2f6b3a); color: #fff; }

/* Topo do Jurídico (15/10/2026): aviso numa linha e cartão único de situação */
.aghtml .suc-h1-sub { font-size: 14px; font-weight: 500; color: var(--texto-2, #5b6470); margin-left: 8px; letter-spacing: 0; }
.aghtml .suc-aviso-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 0 0 10px; font-size: 12.5px; color: var(--texto-2, #5b6470); }
.aghtml .suc-aviso-legal b { color: var(--texto, #23291f); font-weight: 600; }
.aghtml .suc-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; background: #fff; border: 1px solid var(--borda, #e4e7e2);
  border-left: 4px solid #d9a521; border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; }
.aghtml .suc-status.ok { border-left-color: #2f8a4a; }
.aghtml .suc-status.ruim { border-left-color: #c0392b; }
.aghtml .suc-status-ponto { display: none; }
.aghtml .suc-status-txt { flex: 1 1 280px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.aghtml .suc-status-txt strong { font-size: 15px; }
.aghtml .suc-status-txt span { color: var(--texto-2, #5b6470); }
.aghtml .suc-status .suc-selo-esp { margin: 0; align-items: center; }
.aghtml .suc-selo-rot { border: 0 !important; padding: 0 !important; background: none !important; color: var(--texto-2, #5b6470); font-weight: 600; }
.aghtml .suc-status-mud { flex-basis: 100%; font-size: 13.5px; }
.aghtml .suc-status-mud summary { cursor: pointer; color: var(--verde-lavoura, #2f6b3a); font-weight: 600; }
.aghtml .suc-status-mud ul { margin: 6px 0 0 18px; padding: 0; columns: 2 260px; color: var(--texto, #23291f); }

/* ── Jurídico: redesenho de 15/10/2026 ─────────────────────────────────
   Cabeçalho limpo, cartão "Situação do caso" e barra de navegação com o
   seletor de especialidade e abas sublinhadas. Prefixo jd-. */
.aghtml .jd-cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin: 4px 0 16px; }
.aghtml .jd-cab-txt h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: #0f1f14; }
.aghtml .jd-cab-txt p { margin: 2px 0 0; font-size: 14px; color: #6b7368; }
/* Ações sempre encostadas à direita, também quando descem para a linha
   de baixo do título (Ver como e Especialidade juntos ocupam mais). */
.aghtml .jd-cab-acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.aghtml .jd-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid #dfe3dc;
  background: #fff; color: #23291f; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.aghtml .jd-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aghtml .jd-btn:hover { border-color: #2f7a3b; color: #1f6b3a; }

/* Seletor segmentado (Ver como e Especialidade) */
.aghtml .jd-seg { display: inline-flex; align-items: center; gap: 2px; background: #eef0ec; padding: 3px; border-radius: 11px; flex-wrap: wrap; max-width: 100%; }
.aghtml .jd-seg button { border: 0; background: transparent; color: #4b5348; height: 32px; padding: 0 13px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.aghtml .jd-seg button:hover { color: #0f1f14; }
.aghtml .jd-seg button.ativo { background: #fff; color: #1f6b3a; box-shadow: 0 1px 2px rgba(15,31,20,.14); }
.aghtml .jd-visao-wrap { display: inline-flex; align-items: center; gap: 8px; }
.aghtml .jd-seg-rot { font-size: 12px; font-weight: 600; color: #7a8277; }

/* Cartão Situação do caso */
.aghtml .jd-caso { display: grid; grid-template-columns: 1.25fr 1fr 1fr; background: #fff; border: 1px solid #e4e7e2; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15,31,20,.04), 0 10px 28px -20px rgba(15,31,20,.25); margin: 0 0 18px; overflow: hidden; }
.aghtml .jd-caso-col { padding: 16px 18px; min-width: 0; }
.aghtml .jd-caso-col + .jd-caso-col { border-left: 1px solid #eef0ec; }
.aghtml .jd-rot { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a9287; margin-bottom: 8px; }
.aghtml .jd-vazio { margin: 0; font-size: 13.5px; color: #6b7368; }
.aghtml .jd-caso-pend { grid-column: 1 / -1; border-top: 1px solid #eef0ec; padding: 14px 18px; }
.aghtml .jd-caso-aviso { grid-column: 1 / -1; margin: 0; padding: 9px 18px; background: #fafbf9; border-top: 1px solid #eef0ec; font-size: 12px; color: #8a9287; }
/* Situação da versão dentro do cartão: sem moldura própria */
.aghtml .jd-caso .suc-status { border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; background: transparent; display: block; }
.aghtml .jd-caso .suc-status-txt { flex: none; gap: 3px; }
.aghtml .jd-caso .suc-status-txt strong { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #0f1f14; }
.aghtml .jd-caso .suc-status-txt strong::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #d9a521; flex: none; }
.aghtml .jd-caso .suc-status.ok .suc-status-txt strong::before { background: #2f8a4a; }
.aghtml .jd-caso .suc-status.ruim .suc-status-txt strong::before { background: #c0392b; }
.aghtml .jd-caso .suc-status-txt span { font-size: 13.5px; color: #6b7368; }
.aghtml .jd-caso .suc-selo-esp { margin: 10px 0 0; }
.aghtml .jd-caso .suc-status-mud { margin-top: 8px; }
.aghtml .jd-caso .suc-status-mud ul { columns: 1; }
/* Advogados em lista dentro do cartão */
.aghtml .jd-caso .adv-linha { flex-direction: column; align-items: stretch; gap: 8px; margin: 0; }
.aghtml .jd-caso .adv-linha-rot { display: none; }
.aghtml .jd-caso .adv-chip { border-radius: 10px; padding: 8px 10px; justify-content: flex-start; background: #fafbf9; border-color: #eef0ec; max-width: 100%; min-width: 0; box-sizing: border-box; }
.aghtml .jd-caso .adv-chip b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.aghtml .jd-caso .adv-linha { min-width: 0; max-width: 100%; }
.aghtml .jd-caso .adv-linha-convidar { align-self: flex-start; }
.aghtml .jd-caso .ctd-cartao { border: 0; padding: 0; margin: 0; background: transparent; box-shadow: none; }
.aghtml .jd-caso .ctd-cartao h4 { display: none; }
/* Sugestões dentro do cartão */
.aghtml .jd-caso .adv-sug { border: 0; padding: 0; margin: 0; background: transparent; box-shadow: none; }
.aghtml .jd-caso .adv-sug h4 { display: none; }
.aghtml .jd-caso .adv-sug-meta { font-size: 13.5px; color: #6b7368; margin: 0; }

/* Barra de navegação */
.aghtml .jd-nav { position: sticky; top: 0; z-index: 5; background: #f7f8f5; padding: 10px 0 0; margin: 0 0 14px; border-bottom: 1px solid #e4e7e2; }
.aghtml .jd-nav-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.aghtml .jd-nav-topo .jd-rot { margin: 0; }
.aghtml .jd-abas { display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.aghtml .jd-aba { flex: none; border: 0; background: transparent; padding: 10px 14px 11px; font: inherit; font-size: 14.5px; font-weight: 600; color: #4b5348;
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; transition: color .15s, border-color .15s; }
.aghtml .jd-aba:hover { color: #0f1f14; }
.aghtml .jd-aba.ativa { color: #1f6b3a; border-bottom-color: #1f6b3a; }
.aghtml .jd-aba.consulta { font-weight: 500; font-size: 13.5px; color: #7a8277; }
.aghtml .jd-aba.consulta.ativa { color: #1f6b3a; font-weight: 600; }
.aghtml .jd-abas-sep { flex: none; width: 1px; height: 20px; background: #dfe3dc; margin: 0 8px 12px; }
.aghtml .jd-abas-rot { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #a0a79d; padding: 0 4px 14px; }
.aghtml .jd-secao-cab { margin: 0 0 14px; }
.aghtml .jd-secao-cab h2 { margin: 0; font-size: 20px; font-weight: 700; color: #0f1f14; letter-spacing: -0.01em; }
.aghtml .jd-secao-cab p { margin: 2px 0 0; font-size: 14px; color: #6b7368; }

@media (max-width: 900px) {
  .aghtml .jd-caso { grid-template-columns: 1fr; }
  .aghtml .jd-caso-col + .jd-caso-col { border-left: 0; border-top: 1px solid #eef0ec; }
  .aghtml .jd-btn span { display: none; }
}

/* ── Abas Holding e Carga tributária (16/10/2026) ─────────
   Cartões brancos com borda suave, no padrão do topo jd-. */
.aghtml .jd-card { background: #fff; border: 1px solid #e4e7e2; border-radius: 16px; padding: 16px 18px; margin: 0 0 14px; }
.aghtml .jd-card-cab { margin: 0 0 12px; }
.aghtml .jd-card-cab h3 { margin: 0; font-size: 16px; font-weight: 700; color: #0f1f14; }
.aghtml .jd-card-cab p { margin: 3px 0 0; font-size: 13.5px; color: #6b7368; }
.aghtml .jd-card h4 { margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: #0f1f14; }
.aghtml .jd-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.aghtml .jd-kpi { background: #fff; border: 1px solid #e4e7e2; border-radius: 14px; padding: 12px 14px; min-width: 0; }
.aghtml .jd-kpi b { display: block; font-size: 15px; color: #0f1f14; overflow-wrap: anywhere; }
.aghtml .jd-kpi small { display: block; font-size: 12px; color: #8a9287; margin-top: 2px; }
.aghtml .jd-kpi.alerta b { color: #b03a2e; }
.aghtml .jd-barra { height: 6px; background: #eef0ec; border-radius: 6px; margin-top: 8px; overflow: hidden; }
.aghtml .jd-barra i { display: block; height: 100%; background: #2f8a4a; border-radius: 6px; }
.aghtml .jd-tab .inp { width: 100%; min-width: 0; }
.aghtml .jd-tab td, .aghtml .jd-tab th { vertical-align: middle; }
.aghtml .jd-etapa.ok td:nth-child(2) { color: #1f6b3a; }
.aghtml .jd-etapa.na td { color: #a0a79d; }
.aghtml .jd-etapa.atraso td:first-child { box-shadow: inset 3px 0 0 #c0392b; }
.aghtml .jd-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef0ec; color: #4b5348; vertical-align: middle; }
.aghtml .jd-chip.ruim { background: #fbe9e7; color: #a5322a; }
.aghtml .jd-chip.amb { background: #fdf4dc; color: #8a6510; }
.aghtml .jd-mudo { color: #b5bbb2; }
.aghtml .jd-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.aghtml .jd-sub h4 { margin: 4px 0 8px; font-size: 13px; font-weight: 700; color: #4b5348; }
.aghtml .jd-nota { margin: 0 0 8px; font-size: 12.5px; color: #8a9287; }
.aghtml .jd-aviso { margin: 8px 0; padding: 9px 12px; border-radius: 10px; background: #fdf8ea; border: 1px solid #f1e4bc; font-size: 13px; color: #6d5310; }
.aghtml .jd-don { padding: 8px 0; border-top: 1px solid #eef0ec; }
.aghtml .jd-don-lista { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 13.5px; }
.aghtml .jd-don-lista label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; }
.aghtml .jd-minuta { width: 100%; font-size: 13.5px; line-height: 1.45; resize: vertical; }
.aghtml .jd-acoes { display: flex; gap: 8px; margin: 8px 0 12px; }
.aghtml .jd-kit { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.aghtml .jd-kit li { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px; border: 1px solid #eef0ec; font-size: 13.5px; }
.aghtml .jd-kit li b { flex: none; min-width: 140px; }
.aghtml .jd-kit li.ok { background: #f2f8f3; } .aghtml .jd-kit li.ok span { color: #1f6b3a; }
.aghtml .jd-kit li.falta { background: #fdf1ef; } .aghtml .jd-kit li.falta span { color: #a5322a; }
.aghtml .jd-haveres, .aghtml .jd-veredito { margin: 8px 0; font-size: 14px; }
.aghtml .jd-haveres.ruim, .aghtml .jd-veredito.ruim { color: #a5322a; font-weight: 600; }
.aghtml .jd-haveres.ok, .aghtml .jd-veredito.ok { color: #1f6b3a; font-weight: 600; }
.aghtml .jd-haveres.amb, .aghtml .jd-veredito.amb { color: #8a6510; font-weight: 600; }
.aghtml .jd-sel { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: #4b5348; }
.aghtml .jd-campos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.aghtml .jd-campo { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: #4b5348; min-width: 0; }
.aghtml .jd-campo .inp { width: 100%; }
.aghtml .jd-campo-chk { flex-direction: row; align-items: center; gap: 8px; padding-top: 18px; }
.aghtml .jd-fonte { font-size: 12px; color: #6b7368; cursor: help; border-bottom: 1px dotted #c4cac1; }
.aghtml .jd-total td { font-weight: 700; background: #fafbf9; }
.aghtml .jd-graf { width: 100%; height: auto; display: block; margin: 6px 0 4px; }
.aghtml .jd-graf path { fill: none; stroke-width: 2.5; }
.aghtml .jd-graf path.pf { stroke: #b06a1f; } .aghtml .jd-graf path.hd { stroke: #1f6b3a; }
.aghtml .jd-graf .eixo { stroke: #dfe3dc; }
.aghtml .jd-graf text { font-size: 11px; fill: #8a9287; }
.aghtml .jd-legenda { display: flex; gap: 16px; font-size: 12.5px; color: #4b5348; margin-bottom: 10px; }
.aghtml .jd-legenda span::before { content: ''; display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.aghtml .jd-legenda .pf::before { background: #b06a1f; } .aghtml .jd-legenda .hd::before { background: #1f6b3a; }
@media (max-width: 900px) {
  .aghtml .jd-kpis, .aghtml .jd-campos { grid-template-columns: 1fr 1fr; }
  .aghtml .jd-duas { grid-template-columns: 1fr; }
  .aghtml .jd-kit li { flex-direction: column; gap: 2px; }
}

/* Resumo "Em poucas palavras" da Partilha: um bloco por falecimento
   simulado, com números em destaque e tabela de herdeiros. */
.aghtml .suc-res { display: grid; gap: 14px; }
.aghtml .suc-res-ev { border: 1px solid var(--borda); border-radius: 10px; padding: 14px 16px; background: #fbfcfa; }
.aghtml .suc-res-tit { font-weight: 700; font-size: 15px; color: var(--verde); margin-bottom: 10px; }
.aghtml .suc-res-nums { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.aghtml .suc-res-nums > div { flex: 1 1 180px; background: #fff; border: 1px solid var(--borda); border-radius: 8px; padding: 8px 12px; }
.aghtml .suc-res-nums span { display: block; font-size: 12px; color: var(--txt2); }
.aghtml .suc-res-nums b { font-size: 16px; font-variant-numeric: tabular-nums; }
.aghtml .suc-res-tab { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.aghtml .suc-res-tab th { text-align: left; font-size: 12px; font-weight: 600; color: var(--txt2); border-bottom: 1px solid var(--borda); padding: 6px 8px; }
.aghtml .suc-res-tab td { padding: 7px 8px; border-bottom: 1px solid var(--borda); }
.aghtml .suc-res-tab th:not(:first-child), .aghtml .suc-res-tab td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aghtml .suc-res-obs { display: block; font-size: 11.5px; color: var(--txt2); }
.aghtml .suc-res .alert { margin: 10px 0 0; }
/* No relatório exportado as tabelas da Sucessão usam o tamanho da tela,
   não o 10px pensado para as tabelas largas de dinheiro. */
.suc-relatorio table.suc-res-tab { font-size: 13px; }
.suc-relatorio .suc-res-tab td, .suc-relatorio .suc-res-tab th { white-space: normal; }
/* Árvore no relatório exportado: lá não roda o posicionarGeracoes da
   tela, então a coluna de gerações some, os casais de baixo empilham
   (mesmo modo compacto da tela) e o que ainda não couber rola dentro
   da própria caixa. Na impressão a árvore encolhe para caber na folha. */
.suc-relatorio .fam-arvore { grid-template-columns: minmax(0, 1fr); }
.suc-relatorio .fam-geracoes { display: none; }
.suc-relatorio .fam-arvore .pes-tree-wrap { overflow-x: auto; }
.suc-relatorio .fam-tree ul .fam-casal-linha { flex-direction: column; align-items: stretch; }
.suc-relatorio .fam-tree ul .fam-uniao { flex-direction: row; justify-content: center; padding: 4px 0; }
@media print { .suc-relatorio .fam-arvore .pes-tree-wrap { overflow: visible; zoom: .7; } }

/* Planejamento tributário (17/10/2026) */
.aghtml .jd-chip.ok { background: #e6f2e8; color: #1f6b3a; }
.aghtml .jd-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: #1f6b3a; cursor: pointer; text-align: left; }
.aghtml .jd-link:hover { text-decoration: underline; }
.aghtml tr.jd-linha-sel td { background: #f3f8f2; }
.aghtml .jd-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ── Relatórios para os sócios ──────────────────────────────
   Menu do cabeçalho e blocos dos três documentos (Sucessão,
   Holding, Tributário). Contraste conferido: texto #23291f sobre
   as faixas claras fecha mais de 11:1; #5b5f55 (secundário) sobre
   branco fecha 6,6:1 e sobre #f6f5f1 fecha 6,0:1, acima dos 4,5:1. */
.aghtml .rs-menu-wrap { position: relative; display: inline-block; }
.aghtml .rs-menu { position: absolute; right: 0; top: 42px; z-index: 20; min-width: 170px; background: #fff; border: 1px solid #dfe3dc; border-radius: 10px; padding: 6px; box-shadow: 0 6px 18px rgba(35, 41, 31, .14); }
.aghtml .rs-menu[hidden] { display: none; }
.aghtml .rs-menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 12px; font: inherit; font-weight: 600; color: #23291f; cursor: pointer; }
.aghtml .rs-menu-item:hover, .aghtml .rs-menu-item:focus-visible { background: #e6f2e8; color: #1f6b3a; outline: none; }
.rs-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 16px; }
.rs-kpi { background: #fff; border: 1px solid #dfe3dc; border-radius: 12px; padding: 14px 16px; break-inside: avoid; }
.rs-kpi b { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; color: #23291f; font-variant-numeric: tabular-nums; }
.rs-kpi span { display: block; margin-top: 4px; font-size: 12px; color: #5b5f55; }
.rs-situacao { border-left: 6px solid #2f6b34; background: #f3f8f2; color: #23291f; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; font-size: 15px; font-weight: 600; break-inside: avoid; }
.rs-situacao.pos { border-left-color: #2f6b34; background: #f3f8f2; }
.rs-situacao.alerta { border-left-color: #d9a521; background: #fbf5e4; }
.rs-situacao.ruim { border-left-color: #b3261e; background: #fbeceb; }
.rs-decidir { margin: 0 0 16px; padding-left: 22px; color: #23291f; }
.rs-decidir li { margin: 0 0 8px; line-height: 1.45; }
.rs-glossario { margin: 0; }
.rs-glossario dt { font-weight: 700; color: #23291f; margin-top: 10px; }
.rs-glossario dd { margin: 2px 0 0; color: #3d4238; line-height: 1.45; }
@media (max-width: 640px) { .rs-kpis { grid-template-columns: repeat(2, 1fr); } .rs-kpi b { font-size: 24px; } }
.rs-rolagem { overflow-x: auto; margin: 0 0 12px; }
.rs-tabela { width: 100%; border-collapse: collapse; font-size: 13px; color: #23291f; }
.rs-tabela th { text-align: left; background: #eef2ea; font-weight: 700; padding: 6px 8px; border-bottom: 2px solid #cfd6c8; }
.rs-tabela td { padding: 6px 8px; border-bottom: 1px solid #e3e7de; vertical-align: top; }
.rs-tabela tr.rs-atrasada td { background: #fbeceb; }
.rs-marca { display: inline-block; font-size: 11px; font-weight: 700; color: #23291f; background: #fbf5e4; border: 1px solid #d9a521; border-radius: 6px; padding: 0 6px; }
.rs-aviso { border-left: 4px solid #d9a521; background: #fbf5e4; color: #23291f; border-radius: 6px; padding: 8px 12px; margin: 8px 0; }
.rs-avisos { margin: 8px 0; padding-left: 20px; color: #23291f; }
.rs-kpi.rs-par b { font-size: 20px; line-height: 1.2; }
.rs-kpi.rs-par em { display: block; font-style: normal; font-size: 11px; color: #5b5f55; margin: 0 0 4px; }
.rs-kpi.rs-par em + b { margin-top: 0; }
.rs-tabela td.rs-fonte { font-size: 11px; color: #5b5f55; max-width: 220px; }
.aghtml .jd-lista { margin: 8px 0 12px 18px; list-style: disc; font-size: 13.5px; }
.aghtml .jd-campo-largo { flex: 1 1 320px; }

/* Relatório para os sócios: pessoas sem parentesco em uma linha discreta. */
.fam-soltos-linha{margin:4mm 0 0;font-size:10pt;color:#5b6272}
