/* JGR Broker — sistema visual.
   Paleta: preto como cor de marca e de ação (a logo é preta); petróleo como destaque de informação e
   progresso; neutros sem tom (zinc) para o resto; vermelho só para alerta; as cores das etiquetas de status têm função (fase do processo) e ficam.
   Contrastes (WCAG): texto 19,8:1, secundário 7,7:1, terciário 4,8:1, preto/branco 21:1. */

:root {
  /* Marca e ação */
  --acento: #000000;
  --acento-forte: #27272a;
  --acento-suave: #f4f4f5;
  --acento-borda: #d4d4d8;
  --acento-claro: #ffffff; /* sobre fundo escuro */

  /* Destaque (informação e progresso: jornada, novidades, filtros). Ação continua preta. */
  --destaque: #0e5e6f;
  --destaque-forte: #0b4a58;
  --destaque-suave: #e8f2f4;
  --destaque-borda: #a9cfd6;

  /* Neutros */
  --texto: #09090b;
  --texto-2: #52525b;
  --texto-3: #71717a;
  --borda: #e4e4e7;
  --borda-forte: #d4d4d8;
  --fundo: #fafafa;
  --fundo-2: #f4f4f5;
  --superficie: #ffffff;
  --escuro: #000000;
  --escuro-2: #18181b;

  /* Estados */
  --perigo: #b91c1c;
  --perigo-suave: #fef2f2;
  --perigo-borda: #fecaca;
  --sucesso: #15803d;

  --raio: .75rem;
  --raio-sm: .5rem;
  --sombra: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 3px rgba(0, 0, 0, .06);

  --bs-primary: #000000;
  --bs-primary-rgb: 0, 0, 0;
  --bs-link-color: #000000;
  --bs-link-color-rgb: 0, 0, 0;
  --bs-link-hover-color: #3f3f46;
  --bs-link-hover-color-rgb: 63, 63, 70;
  --bs-body-font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-border-color: #e4e4e7;
}

/* ---------- Componentes base ---------- */
.btn-primary {
  --bs-btn-bg: var(--acento); --bs-btn-border-color: var(--acento);
  --bs-btn-hover-bg: var(--acento-forte); --bs-btn-hover-border-color: var(--acento-forte);
  --bs-btn-active-bg: var(--acento-forte); --bs-btn-active-border-color: var(--acento-forte);
  --bs-btn-disabled-bg: var(--acento); --bs-btn-disabled-border-color: var(--acento);
}
.btn-outline-primary {
  --bs-btn-color: var(--acento); --bs-btn-border-color: var(--acento-borda);
  --bs-btn-hover-bg: var(--acento); --bs-btn-hover-border-color: var(--acento); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--acento-forte); --bs-btn-active-border-color: var(--acento-forte);
}
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--borda-forte); --bs-btn-color: var(--texto);
  --bs-btn-hover-bg: var(--fundo-2); --bs-btn-hover-border-color: var(--borda-forte); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--acento); box-shadow: 0 0 0 .2rem rgba(0, 0, 0, .12);
}
.form-check-input:checked { background-color: var(--acento); border-color: var(--acento); }
.text-acento { color: var(--acento) !important; }

.marca { font-weight: 800; letter-spacing: .08em; }
.marca span { color: var(--acento-claro); font-weight: 400; }
.marca img { width: 30px; height: 30px; }

/* ---------- Site institucional (preto e branco, alto contraste) ----------
   Preto puro contra branco puro, quase sem cinzas. Cor só nas fotos e no verde do WhatsApp.
   Contrastes: branco/preto 21:1, #e4e4e7 sobre preto 16:1, #3f3f46 sobre branco 10:1. */
.site {
  --preto: #000;
  --grafite: #141414;
  --texto-apoio: #3f3f46;
  --texto-apoio-claro: #e4e4e7;
  --linha: #e4e4e7;
  background: #fff; color: var(--preto);
}
.site .text-secondary { color: var(--texto-apoio) !important; }

/* Topo */
.topo-site { background: #fff; border-bottom: 1px solid var(--preto); position: sticky; top: 0; z-index: 1030; }
.topo-site .navbar { padding: .85rem 0; }
.topo-site .marca { color: var(--preto); font-size: 1.15rem; }
.topo-site .marca span { color: var(--preto); font-weight: 400; }
.topo-site .marca img { width: 38px; height: 38px; }
.topo-site .nav-pilula {
  display: inline-block; padding: .5rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: .85rem;
  color: var(--preto); text-decoration: none; text-transform: uppercase; letter-spacing: .05em;
  border: 1.5px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.topo-site .nav-pilula:hover { border-color: var(--preto); }
.topo-site .nav-pilula.destaque { background: var(--preto); color: #fff; border-color: var(--preto); }
.topo-site .nav-pilula.destaque:hover { background: #fff; color: var(--preto); }
.topo-site .nav-pilula.whats { border-color: #1fa855; color: #0f6b34; }
.topo-site .nav-pilula.whats:hover { background: #25d366; border-color: #25d366; color: #0b3d22; }

/* Hero com corte em ângulo */
.hero-site {
  position: relative; color: #fff; text-align: center; padding: 7.5rem 0 9.5rem; background: #000; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%);
}
.hero-site::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 48% 62% at 50% 46%, rgba(0,0,0,.62), rgba(0,0,0,.28) 60%, rgba(0,0,0,0) 100%); }
.hero-site .sobre, .hero-site .lead, .hero-site .reducao-risco, .hero-site p { text-shadow: 0 1px 3px rgba(0,0,0,.75), 0 0 18px rgba(0,0,0,.45); }
.hero-site h1 { text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.hero-site h1 .realce { text-shadow: none; }
@media (max-width: 767.98px) { .hero-site::after { background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.6) 45%, rgba(0,0,0,.45)); } }
.hero-site > .container { position: relative; z-index: 1; }
.hero-site .sobre { text-transform: uppercase; letter-spacing: .24em; font-size: .78rem; font-weight: 700; color: #fff; }
.hero-site h1 { font-weight: 900; text-transform: uppercase; line-height: 1.12; letter-spacing: -.01em;
  font-size: clamp(2rem, 5.2vw, 4.1rem); margin: 1.1rem auto 1.4rem; max-width: 1000px; color: #fff; }
.hero-site h1 .realce { background: #fff; color: #000; padding: 0 .22em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero-site .lead { color: var(--texto-apoio-claro); max-width: 680px; margin: 0 auto 2.4rem; }
.btn-pilula { border-radius: 999px; padding: .8rem 1.9rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .88rem; }
.btn-claro { background: #fff; color: #000; border: 2px solid #fff; }
.btn-claro:hover { background: transparent; color: #fff; }
.btn-contorno-claro { border: 2px solid #fff; color: #fff; }
.btn-contorno-claro:hover { background: #fff; color: #000; }
.btn-escuro { background: #000; color: #fff; border: 2px solid #000; }
.btn-escuro:hover { background: #fff; color: #000; }
.btn-contorno-escuro { border: 2px solid #000; color: #000; background: transparent; }
.btn-contorno-escuro:hover { background: #000; color: #fff; }

/* Títulos de seção com barra */
.secao-site { padding: 5.5rem 0; }
.titulo-site { font-weight: 900; text-transform: uppercase; color: #000; font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -.005em; margin: 0; }
.titulo-site::after { content: ""; display: block; width: 72px; height: 6px; background: #000; margin-top: .9rem; }
.text-center .titulo-site::after { margin-left: auto; margin-right: auto; }
.intro-secao { color: var(--texto-apoio); max-width: 720px; margin-top: 1.1rem; font-size: 1.08rem; }

/* Blocos de serviço */
.bloco-servico {
  background: #000; color: #fff; border-radius: 1rem; padding: 2.2rem 1.6rem; height: 100%; border: 2px solid #000;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; transition: background .2s, color .2s, transform .2s;
}
.bloco-servico:hover { background: #fff; color: #000; transform: translateY(-4px); }
.bloco-servico .bi { font-size: 2.4rem; color: inherit; }
.bloco-servico h3 { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: inherit; margin: .4rem 0 0; }
.bloco-servico p { color: var(--texto-apoio-claro); font-size: .93rem; margin: 0; transition: color .2s; }
.bloco-servico:hover p { color: var(--texto-apoio); }

/* Sobre: metade preta, metade foto */
.sobre-site { display: grid; grid-template-columns: 1fr 1fr; min-height: 480px; background: #000; }
.sobre-site .texto { background: #000; color: #fff; padding: 4.5rem clamp(1.5rem, 6vw, 6rem); display: flex; flex-direction: column; justify-content: center; }
.sobre-site .texto .titulo-site { color: #fff; }
.sobre-site .texto .titulo-site::after { background: #fff; }
.sobre-site .texto p { font-size: 1.05rem; margin-top: 1.2rem; color: var(--texto-apoio-claro); }
.sobre-site .foto { position: relative; overflow: hidden; }
.sobre-site .foto::before { content: ""; position: absolute; inset: 0; background: url("../img/patio-one.a056876cbd57.jpg") 40% 45%/cover no-repeat;
}
.sobre-site .foto .selo-jgr {
  position: absolute; right: 2rem; bottom: 2rem; background: #fff; color: #000; border-radius: .8rem;
  padding: 1rem 1.25rem; font-weight: 800; display: flex; align-items: center; gap: .75rem; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.sobre-site .foto .selo-jgr .bi { font-size: 1.6rem; }

/* Diferenciais */
.diferencial { text-align: center; padding: 0 .5rem; }
.diferencial .icone { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1rem;
  background: #000; color: #fff; font-size: 1.6rem; }
.diferencial h3 { font-size: 1.02rem; font-weight: 800; color: #000; text-transform: uppercase; letter-spacing: .03em; }
.diferencial p { color: var(--texto-apoio); font-size: .93rem; margin: 0; }

/* Faixa INFO-BROKER */
.faixa-infobroker {
  color: #fff; padding: 5.5rem 0; position: relative; overflow: hidden;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, transparent 2px 26px), #000;
}
.faixa-infobroker .titulo-site { color: #fff; }
.faixa-infobroker .titulo-site::after { background: #fff; }
.faixa-infobroker .sobretitulo-ib { font-family: "Playfair Display", Georgia, serif; color: #fff; letter-spacing: .14em; font-weight: 700; }
.faixa-infobroker p { color: var(--texto-apoio-claro); }
.recurso-ib { display: flex; gap: .9rem; align-items: flex-start; background: #000; border: 1px solid rgba(255,255,255,.35); border-radius: .9rem; padding: 1.1rem 1.15rem; height: 100%; }
.recurso-ib .bi { color: #fff; font-size: 1.35rem; }
.recurso-ib strong { display: block; color: #fff; }
.recurso-ib span { color: var(--texto-apoio-claro); font-size: .9rem; }

/* Faixa de contato (branca, entre duas seções pretas) */
.faixa-contato { background: #fff; color: #000; padding: 5rem 0; text-align: center; }
.faixa-contato h2 { font-weight: 900; text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.faixa-contato p { max-width: 620px; margin: .75rem auto 1.9rem; font-size: 1.05rem; color: var(--texto-apoio); }

/* Rodapé */
.rodape-site { background: #000; color: var(--texto-apoio-claro); padding: 4rem 0 1.5rem; font-size: .95rem; }
.rodape-site h3 { color: #fff; font-size: .9rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.rodape-site h3::after { content: ""; display: block; width: 36px; height: 3px; background: #fff; margin-top: .55rem; }
.rodape-site a { color: #fff; text-decoration: none; }
.rodape-site a:hover { text-decoration: underline; }
.rodape-site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.rodape-site .marca { color: #fff; }
.rodape-site .marca span { color: #fff; font-weight: 400; }
.rodape-site .linha-final { border-top: 1px solid rgba(255,255,255,.3); margin-top: 3rem; padding-top: 1.25rem; font-size: .8rem; }
.btn-whats { background: #25d366; color: #0b3d22 !important; font-weight: 800; border-radius: 999px; padding: .45rem 1rem; display: inline-flex; align-items: center; gap: .45rem; }
.btn-whats:hover { background: #3be07b; text-decoration: none !important; }

.whatsapp-flutuante {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1030; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center; font-size: 1.7rem; box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.whatsapp-flutuante:hover { color: #fff; filter: brightness(1.05); }

@media (max-width: 991.98px) {
  .topo-site .navbar-nav { gap: .5rem; padding-top: 1rem; }
  .hero-site { padding: 5rem 0 7rem; clip-path: polygon(0 0, 100% 0, 100% 92%, 50% 100%, 0 92%); }
  .sobre-site { grid-template-columns: 1fr; }
  .sobre-site .foto { min-height: 300px; }
}

/* ---------- Site: estrutura de conversão (método Supertape) ----------
   Uma ação principal (falar com especialista no WhatsApp) é a ÚNICA coisa verde da página.
   Títulos em Anton (condensada) para dar personalidade ao preto e branco. */
.site .titulo-site, .site .hero-site h1, .site .faixa-contato h2, .site .bloco-servico h3 {
  font-family: Anton, "Arial Narrow", Impact, sans-serif; font-weight: 400; letter-spacing: .01em;
}
.site .titulo-site { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; }
.site .hero-site h1 { font-size: clamp(2.6rem, 6.6vw, 5.4rem); line-height: 1.1; margin-bottom: 1.8rem; }
.site .hero-site h1 .realce { display: inline-block; line-height: 1.12; padding: .04em .2em; margin-top: .12em; }
.site .bloco-servico h3 { font-size: 1.25rem; letter-spacing: .02em; }

/* Ação principal */
.btn-acao {
  display: inline-flex; align-items: center; gap: .55rem; background: #25d366; color: #052e16; border: 2px solid #052e16;
  border-radius: 999px; padding: .9rem 1.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: .92rem;
  box-shadow: 4px 4px 0 #052e16; transition: transform .12s, box-shadow .12s; text-decoration: none;
}
.btn-acao:hover { color: #052e16; transform: translate(2px, 2px); box-shadow: 2px 2px 0 #052e16; }
.btn-acao .bi-arrow-right { transition: transform .15s; }
.btn-acao:hover .bi-arrow-right { transform: translateX(3px); }
.hero-site .btn-acao { border-color: #fff; box-shadow: 4px 4px 0 #fff; }
.hero-site .btn-acao:hover { box-shadow: 2px 2px 0 #fff; }
.reducao-risco { font-size: .85rem; margin-top: .85rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: center; }
.reducao-risco .bi { margin-right: .3rem; }
.hero-site .reducao-risco { color: #fff; }
.link-cliente { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link-cliente:hover { color: #fff; text-decoration-thickness: 2px; }

/* Topo: Área do Cliente vira secundária; a ação principal ganha destaque */
.topo-site .nav-pilula.destaque { background: #fff; color: #000; border-color: #000; }
.topo-site .nav-pilula.destaque:hover { background: #000; color: #fff; }
.topo-site .nav-pilula.acao { background: #25d366; color: #052e16; border-color: #052e16; }
.topo-site .nav-pilula.acao:hover { background: #3be07b; }

/* Faixa de confiança logo abaixo do hero */
.faixa-confianca { border-bottom: 1px solid #000; }
.faixa-confianca .item { display: flex; align-items: center; gap: .75rem; padding: 1.4rem .5rem; font-weight: 700; font-size: .95rem; }
.faixa-confianca .item .bi { font-size: 1.5rem; }
.faixa-confianca .item small { display: block; font-weight: 500; color: var(--texto-apoio); font-size: .82rem; }

/* Problema */
.secao-problema { background: #000; color: #fff; padding: 5.5rem 0; }
.secao-problema .titulo-site { color: #fff; }
.secao-problema .titulo-site::after { background: #fff; }
.secao-problema .intro-secao { color: var(--texto-apoio-claro); }
.dor { border: 1px solid rgba(255,255,255,.35); border-radius: 1rem; padding: 1.4rem 1.4rem 1.3rem; height: 100%; }
.dor .bi { font-size: 1.6rem; }
.dor h3 { font-size: 1.05rem; font-weight: 800; margin: .7rem 0 .35rem; }
.dor p { color: var(--texto-apoio-claro); font-size: .92rem; margin: 0; }
.consequencia { margin-top: 2.5rem; font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 700; max-width: 820px; }
.consequencia mark { background: #fff; color: #000; padding: 0 .2em; }

/* Como trabalhamos */
.passos-site { counter-reset: passo; }
.passo-site { position: relative; padding: 1.6rem 1.4rem 1.4rem; border: 2px solid #000; border-radius: 1rem; height: 100%; background: #fff; }
.passo-site::before {
  counter-increment: passo; content: counter(passo, decimal-leading-zero);
  font-family: Anton, Impact, sans-serif; font-size: 2.6rem; line-height: 1; display: block; margin-bottom: .6rem;
}
.passo-site h3 { font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.passo-site p { color: var(--texto-apoio); font-size: .93rem; margin: 0; }

/* Demonstração do INFO-BROKER */
.demo-ib { background: #fff; color: #000; border-radius: 1rem; padding: 1.4rem; box-shadow: 8px 8px 0 rgba(255,255,255,.18); }
.demo-ib .topo-demo { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.demo-ib .ref { font-weight: 800; font-size: 1.15rem; }
.demo-ib .sub { color: var(--texto-apoio); font-size: .85rem; }
.demo-ib .pilula { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; border-radius: 999px; padding: .2em .75em; font-weight: 700; font-size: .78rem; white-space: nowrap; }
.demo-ib .trilha { display: flex; margin: 1.3rem 0 1rem; }
.demo-ib .trilha span { flex: 1; text-align: center; font-size: .68rem; color: #71717a; position: relative; padding-top: 1.4rem; }
.demo-ib .trilha span::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d4d4d8; background: #fff; z-index: 1; }
.demo-ib .trilha span::after { content: ""; position: absolute; top: 6px; left: -50%; right: 50%; height: 2px; background: #d4d4d8; }
.demo-ib .trilha span:first-child::after { display: none; }
.demo-ib .trilha span.feito::before { background: #000; border-color: #000; }
.demo-ib .trilha span.feito::after, .demo-ib .trilha span.atual::after { background: #000; }
.demo-ib .trilha span.atual { color: #000; font-weight: 800; }
.demo-ib .trilha span.atual::before { border-color: #000; box-shadow: 0 0 0 4px #e4e4e7; }
.demo-ib .prazo { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid #e4e4e7; padding-top: .9rem; font-size: .85rem; }
.demo-ib .prazo strong { display: block; font-size: 1.05rem; }
.demo-ib .prazo .alerta strong { color: #b91c1c; }
.demo-ib .legenda { font-size: .72rem; color: #71717a; margin-top: .75rem; }

/* Perguntas frequentes */
.faq-site .accordion-item { border: 0; border-bottom: 1px solid #000; }
.faq-site .accordion-button { font-weight: 800; font-size: 1.05rem; padding: 1.25rem 0; color: #000; background: transparent; box-shadow: none; }
.faq-site .accordion-button:not(.collapsed) { color: #000; }
.faq-site .accordion-button:focus-visible { outline: 3px solid #000; outline-offset: 2px; }
.faq-site .accordion-body { padding: 0 0 1.4rem; color: var(--texto-apoio); }

/* Chamada final */
.faixa-contato .reducao-risco { color: var(--texto-apoio); }

@media (max-width: 767.98px) {
  .faixa-confianca .item { padding: 1rem .25rem; font-size: .88rem; }
  .demo-ib .trilha span { font-size: 0; }
  .demo-ib .trilha span.atual { font-size: .68rem; }
}

/* ---------- Abertura dividida: texto sobre preto à esquerda, foto da ONE à direita ---------- */
.hero-site { text-align: left; padding: 7rem 0 8.5rem; }
.hero-site::before, .hero-site::after { display: none; }
.hero-foto { position: absolute; top: 0; right: 0; bottom: 0; width: 52%; background: url("../img/hero-one.69d497d06091.jpg") 42% 78%/cover no-repeat; }
.hero-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #000 0%, rgba(0,0,0,.55) 18%, rgba(0,0,0,0) 45%); }
.hero-texto { position: relative; z-index: 1; max-width: 690px; }
.site .hero-site h1 { font-size: clamp(2.3rem, 4.1vw, 3.9rem); margin-left: 0; }
.hero-site .lead { margin-left: 0; }
.hero-site .reducao-risco { justify-content: flex-start; }
@media (max-width: 991.98px) {
  .hero-site { padding: 0 0 6.5rem; }
  .hero-foto { position: relative; width: 100%; height: 300px; background-position: 50% center; }
  .hero-foto::after { background: linear-gradient(180deg, rgba(0,0,0,0) 55%, #000 100%); }
  .hero-texto { padding-top: 1.75rem; max-width: none; }
}

/* ---------- Login ---------- */
.tela-login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.08), transparent 50%), var(--escuro);
}
.cartao-login { width: 100%; max-width: 420px; border: 0; border-radius: 1rem; }
.cartao-login .marca { color: var(--texto); }
.cartao-login .marca span { color: var(--acento); }

/* ---------- Sistema (área logada, claro) ---------- */
.sistema {
  background: var(--fundo); color: var(--texto);
  --bs-body-color: #0f172a; --bs-secondary-color: #475569;
}
.sistema .text-secondary { color: var(--texto-2) !important; }
.sistema .form-label, .sistema label { color: var(--texto); }
.sistema .form-control, .sistema .form-select { border-color: var(--borda-forte); color: var(--texto); }
.sistema .form-control::placeholder { color: var(--texto-3); }
.sistema .navbar { background: var(--escuro); }
.sistema .navbar .nav-link { color: #cbd5e1; }
.sistema .navbar .nav-link.active, .sistema .navbar .nav-link:hover { color: #fff; }
.sistema .navbar .nav-link.active { box-shadow: inset 0 -2px 0 var(--acento-claro); }
.sistema .navbar .text-secondary { color: #94a3b8 !important; }
.sistema a:focus-visible, .sistema button:focus-visible, .sistema [tabindex]:focus-visible {
  outline: 3px solid var(--acento); outline-offset: 2px;
}
.container-sistema { max-width: 1800px; }
.sistema main a:not(.btn):not(.nav-link):not(.dropdown-item):not(.item-processo):not(.etapa-resumo):not(.metrica):not(.chip-status):not(.filtro-ativo):not(.ref):not([class*='badge']) { text-underline-offset: 2px; }
.cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); }
.vazio { color: var(--texto-3); }
.vencendo { color: var(--perigo); font-weight: 600; }

/* Cabeçalho das páginas da área logada (portal e painel) */
.cabecalho-pagina { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; margin-bottom: 1.25rem; }
.cabecalho-pagina .sobretitulo { font-family: "Playfair Display", Georgia, serif; font-weight: 700; letter-spacing: .08em;
  color: var(--destaque); font-size: .95rem; }
.cabecalho-pagina h1 { font-size: 1.6rem; font-weight: 700; margin: .1rem 0 .15rem; letter-spacing: -.01em; }
.cabecalho-pagina .meta { color: var(--texto-2); font-size: .88rem; }

/* Métricas compactas (substituem os cartões grandes) */
.metricas { display: flex; flex-wrap: wrap; gap: .5rem; }
.metrica {
  display: inline-flex; align-items: baseline; gap: .45rem; padding: .55rem .9rem; border-radius: var(--raio-sm);
  background: var(--superficie); border: 1px solid var(--borda); color: var(--texto-2); font-size: .85rem;
  text-decoration: none; box-shadow: var(--sombra); white-space: nowrap;
}
.metrica .numero { font-size: 1.25rem; font-weight: 700; color: var(--texto); font-variant-numeric: tabular-nums; }
a.metrica:hover { border-color: var(--destaque-borda); color: var(--texto); }
.metrica.alerta { background: var(--perigo-suave); border-color: var(--perigo-borda); color: var(--perigo); }
.metrica.alerta .numero { color: var(--perigo); }
.metrica.novidade { background: var(--destaque-suave); border-color: var(--destaque-borda); color: var(--destaque); }
.metrica.novidade .numero { color: var(--destaque); }
.metrica.ativa { outline: 2px solid var(--destaque); outline-offset: 1px; }

/* ---------- Pílulas de status: tom suave, texto escuro, sem ponto ---------- */
.badge-status {
  display: inline-block; font-weight: 600; font-size: .8rem; line-height: 1.3; padding: .3em .75em;
  border-radius: 999px; border: 1px solid transparent; white-space: nowrap; max-width: 100%;
}
.badge-status[title]:not([title=""]) { cursor: help; }
.status-detalhe { color: var(--texto-2); font-size: .82rem; margin-top: .3rem; line-height: 1.35; white-space: normal; }
.fase-inicio { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.fase-documentos { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.fase-transito { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.fase-porto { background: #ecfeff; color: #155e75; border-color: #a5f3fc; }
.fase-aduaneiro { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.fase-armazem { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.fase-entrega { background: #f0fdfa; color: #115e59; border-color: #99f6e4; }
.fase-entregue { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.fase-canal-verde { background: #dcfce7; color: #14532d; border-color: #86efac; }
.fase-canal-amarelo { background: #fef9c3; color: #713f12; border-color: #fde047; }
.fase-canal-vermelho { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

.tipo { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 500; color: var(--texto-2); }
.dias { font-weight: 600; font-variant-numeric: tabular-nums; }
.dias-alerta { color: var(--perigo); background: var(--perigo-suave); border: 1px solid var(--perigo-borda); border-radius: .35rem; padding: .05em .4em; }

/* ---------- Grade de processos ---------- */
.grade { overflow: hidden; }
.grade-topo { padding: 1rem 1.25rem .75rem; border-bottom: 1px solid var(--borda); display: grid; gap: .75rem; }
.grade-topo .linha { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.grade-topo h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.grade-topo .contagem { color: var(--texto-2); font-size: .85rem; }
.grade-busca { width: min(360px, 100%); margin-left: auto; }
.grade-busca .form-control { padding-left: 2.1rem; }
.grade-busca { position: relative; }
.grade-busca .bi-search { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--texto-3); font-size: .85rem; }

/* Controle segmentado (Ativos / Arquivados / Todos) */
.segmentado { display: inline-flex; background: var(--fundo-2); border-radius: var(--raio-sm); padding: 3px; }
.segmentado a { padding: .3rem .8rem; border-radius: .4rem; font-size: .85rem; color: var(--texto-2); text-decoration: none; font-weight: 500; }
.segmentado a:hover { color: var(--texto); }
.segmentado a.ativo { background: var(--superficie); color: var(--texto); font-weight: 600; box-shadow: var(--sombra); }

/* Filtro rápido por status */
.chips-status { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-status { text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.chip-status .total { font-variant-numeric: tabular-nums; opacity: .8; font-weight: 500; }
.chip-status:hover { filter: brightness(.97); }
.chip-status.ativo { outline: 2px solid currentColor; outline-offset: 1px; }
.chips-status.com-filtro .chip-status:not(.ativo) { opacity: .5; }

/* Filtros ativos */
.filtros-ativos { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .82rem; color: var(--texto-2); }
.filtro-ativo { display: inline-flex; align-items: center; gap: .35rem; background: var(--destaque-suave); color: var(--destaque);
  border: 1px solid var(--destaque-borda); border-radius: 999px; padding: .15rem .3rem .15rem .65rem; text-decoration: none; font-weight: 500; }
.filtro-ativo:hover { background: var(--borda); color: var(--destaque-forte); }
.filtro-ativo .bi-x { font-size: 1rem; line-height: 1; }

/* Tabela */
.grade-rolagem { overflow: auto; max-height: calc(100vh - 150px); }
.grade-processos { --bs-table-bg: transparent; font-size: .875rem; margin: 0; border-collapse: separate; border-spacing: 0; width: 100%; }
.grade-processos th, .grade-processos td { white-space: nowrap; padding: .65rem .8rem; vertical-align: middle; border-bottom: 1px solid var(--borda); color: var(--texto); background: var(--superficie); }
.grade-processos thead { position: sticky; top: 0; z-index: 3; }
.grade-processos thead th { background: var(--fundo); font-size: .78rem; font-weight: 600; color: var(--texto-2); }
.grade-processos thead tr:first-child th { padding-top: .7rem; padding-bottom: .45rem; border-bottom: 0; }
.grade-processos thead tr:only-child th, .grade-processos thead .linha-filtros th { border-bottom: 1px solid var(--borda-forte); }
.grade-processos thead .linha-filtros th { padding-top: 0; padding-bottom: .6rem; }
.grade-processos thead .linha-filtros .form-control, .grade-processos thead .linha-filtros .form-select {
  min-width: 110px; font-size: .8rem; border-color: var(--borda); background-color: var(--superficie); }
.grade-processos thead th a.ordenar { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.grade-processos thead th a.ordenar:hover { color: var(--texto); }
.grade-processos thead th a.ordenar .bi-chevron-expand { color: var(--borda-forte); font-size: .7rem; }
.grade-processos thead th.ordenada { color: var(--destaque); }
.grade-processos thead th.text-end a.ordenar { justify-content: flex-end; }
.grade-processos tbody tr { cursor: pointer; }
.grade-processos tbody tr:hover td { background: var(--fundo-2); }
.grade-processos tbody tr:last-child td { border-bottom: 0; }
.grade-processos .col-fixa { position: sticky; left: 0; z-index: 2; box-shadow: inset -1px 0 0 var(--borda); }
.grade-processos thead .col-fixa { z-index: 4; }
.grade-processos tr.recente td.col-fixa { box-shadow: inset 3px 0 0 var(--destaque), inset -1px 0 0 var(--borda); }
.grade-processos .ref { color: var(--texto); font-weight: 600; text-decoration: none; }
.grade-processos .ref:hover { color: var(--destaque); text-decoration: underline; }
.grade-processos .sino { color: var(--destaque); font-size: .8rem; }
.grade-processos .bi-archive { color: var(--texto-3); }
.grade-processos .col-status { white-space: normal; min-width: 220px; }
.grade-processos .col-status .status-detalhe { max-width: 300px; }
.grade-processos td.text-end, .grade-processos th.text-end { text-align: right; }
.grade-processos .col-oculta { display: none; }
.grade-rodape { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .7rem 1.25rem; border-top: 1px solid var(--borda); background: var(--fundo); font-size: .85rem; color: var(--texto-2); }
.grade-rodape .btn { --bs-btn-padding-y: .2rem; --bs-btn-padding-x: .5rem; }

/* Seletor de colunas */
.menu-colunas { max-height: 60vh; overflow: auto; min-width: 240px; }
.menu-colunas .form-check { padding: .3rem .75rem .3rem 2.25rem; margin: 0; }
.menu-colunas .form-check:hover { background: var(--fundo-2); }

/* Lista em cartões (celular) */
.lista-cartoes { display: grid; gap: 0; }
.cartao-processo { display: block; padding: .9rem 1rem; border-bottom: 1px solid var(--borda); color: var(--texto); text-decoration: none; }
.cartao-processo:last-child { border-bottom: 0; }
.cartao-processo:active { background: var(--fundo-2); }
.cartao-processo .topo { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.cartao-processo .ref { font-weight: 600; }
.cartao-processo .produto { color: var(--texto-2); font-size: .85rem; margin-top: .35rem; }
.cartao-processo .dados { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .45rem; font-size: .82rem; color: var(--texto-2); }
.cartao-processo .dados strong { color: var(--texto); font-weight: 600; }

/* ---------- Portal: jornada (onde estão os processos) ---------- */
.jornada-resumo { padding: 1rem 1.25rem; display: grid; gap: 1rem; }
.jornada-tipo { font-size: .75rem; font-weight: 600; color: var(--texto-2); margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .06em; }
.jornada-etapas { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: .4rem; overflow-x: auto; }
.etapa-resumo {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .55rem; align-items: center;
  padding: .6rem .75rem; border-radius: var(--raio-sm); border: 1px solid var(--borda); background: var(--superficie);
  color: var(--texto); text-decoration: none; height: 100%; position: relative;
}
.etapa-resumo .bi { grid-row: 1 / 3; font-size: 1.15rem; color: var(--destaque); }
.etapa-resumo .numero { font-size: 1.25rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.etapa-resumo .nome { font-size: .78rem; color: var(--texto-2); white-space: nowrap; }
a.etapa-resumo:hover { border-color: var(--destaque-borda); background: var(--destaque-suave); }
.etapa-resumo.ativa { border-color: var(--destaque); background: var(--destaque-suave); box-shadow: inset 0 0 0 1px var(--destaque); }
.etapa-resumo.vazia { background: var(--fundo); border-style: dashed; }
.etapa-resumo.vazia .bi, .etapa-resumo.vazia .numero, .etapa-resumo.vazia .nome { color: var(--texto-3); }
.etapa-resumo.vazia .numero { font-weight: 500; }

/* ---------- Portal: lista de processos ---------- */
.lista-topo { padding: 1rem 1.25rem .75rem; border-bottom: 1px solid var(--borda); display: grid; gap: .7rem; }
.lista-topo .linha { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.lista-topo h2 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.lista-topo h2 .contagem { color: var(--texto-2); font-weight: 500; font-size: .9rem; margin-left: .25rem; }
.ordenar-por { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--texto-2); margin: 0; }
.ordenar-por .form-select { width: auto; }
.lista-processos { list-style: none; margin: 0; padding: 0; }
.lista-processos > li + li { border-top: 1px solid var(--borda); }
.item-processo {
  display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(220px, 1.5fr) minmax(150px, .8fr) auto; gap: 1rem 1.5rem;
  align-items: center; padding: .95rem 1.25rem; color: var(--texto); text-decoration: none; position: relative;
}
.item-processo:hover { background: var(--fundo); color: var(--texto); }
.item-processo:hover .ip-seta { color: var(--destaque); transform: translateX(2px); }
.item-processo.recente::before { content: ""; position: absolute; left: 0; top: .75rem; bottom: .75rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--destaque); }
.ip-ref { font-weight: 600; font-size: .98rem; }
.ip-ref .novo { font-size: .7rem; font-weight: 600; color: var(--destaque); background: var(--destaque-suave); border-radius: 999px; padding: .05rem .45rem; margin-left: .3rem; vertical-align: 1px; }
.ip-sub { color: var(--texto-2); font-size: .84rem; margin-top: .15rem; }
.ip-detalhe { color: var(--texto-2); font-size: .82rem; }
.barra-jornada { height: 4px; background: var(--fundo-2); border-radius: 4px; margin-top: .55rem; overflow: hidden; max-width: 260px; }
.barra-jornada span { display: block; height: 100%; background: var(--destaque); border-radius: 4px; }
.ip-etapa { font-size: .75rem; color: var(--texto-3); margin-top: .25rem; }
.ip-marco .rotulo { font-size: .75rem; color: var(--texto-2); }
.ip-marco .valor { font-weight: 600; font-variant-numeric: tabular-nums; }
.ip-marco .relativo { font-size: .78rem; color: var(--texto-3); }
.ip-marco.alerta .rotulo, .ip-marco.alerta .valor, .ip-marco.alerta .relativo { color: var(--perigo); }
.ip-seta { color: var(--borda-forte); transition: transform .15s, color .15s; }
.lista-vazia { padding: 3rem 1rem; text-align: center; color: var(--texto-2); }
.lista-vazia .bi { font-size: 2rem; color: var(--borda-forte); }
@media (max-width: 767.98px) {
  .item-processo { grid-template-columns: 1fr auto; gap: .5rem 1rem; padding: .9rem 1rem; }
  .ip-situacao { grid-column: 1 / -1; grid-row: 2; }
  .ip-marco { grid-column: 1 / -1; grid-row: 3; display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; }
  .ip-seta { grid-row: 1; grid-column: 2; }
}

/* ---------- Portal: distribuição (celular: atenção, lista, atualizações) ---------- */
.layout-portal { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); grid-template-areas: "atencao" "lista" "feed"; align-items: start; }
.area-lista { grid-area: lista; min-width: 0; }
.area-atencao { grid-area: atencao; }
.area-feed { grid-area: feed; }
@media (min-width: 1200px) {
  .layout-portal { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); grid-template-areas: "lista atencao" "lista feed"; grid-template-rows: auto 1fr; }
  .area-feed { align-self: start; }
  .layout-portal.sem-atencao { grid-template-areas: "lista feed"; grid-template-rows: auto; }
}

/* ---------- Portal: painéis laterais ---------- */
.painel-lateral { padding: 1.1rem 1.25rem; }
.painel-lateral h2 { font-size: .98rem; font-weight: 700; margin: 0 0 .35rem; display: flex; align-items: center; gap: .45rem; }
.painel-lateral h2 .bi { color: var(--destaque); }
.painel-lateral .explicacao { font-size: .82rem; color: var(--texto-2); margin-bottom: .75rem; }
.painel-lateral.atencao { border-color: var(--perigo-borda); }
.painel-lateral.atencao h2, .painel-lateral.atencao h2 .bi { color: var(--perigo); }
.lista-atencao { list-style: none; margin: 0; padding: 0; }
.lista-atencao li + li { border-top: 1px solid var(--borda); }
.lista-atencao a { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: baseline; padding: .55rem 0; color: var(--texto); text-decoration: none; }
.lista-atencao a:hover .ref { color: var(--destaque); text-decoration: underline; }
.lista-atencao .ref { font-weight: 600; font-size: .9rem; }
.lista-atencao .quando { font-size: .82rem; color: var(--texto-2); }
.lista-atencao .data { font-weight: 600; color: var(--perigo); font-variant-numeric: tabular-nums; font-size: .9rem; }
.ver-todos { display: inline-block; margin-top: .5rem; font-size: .85rem; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li + li { border-top: 1px solid var(--borda); }
.feed a { display: block; padding: .6rem 0; color: var(--texto); text-decoration: none; }
.feed a:hover .ref { color: var(--destaque); text-decoration: underline; }
.feed-topo { display: flex; justify-content: space-between; gap: .5rem; }
.feed .ref { font-weight: 600; font-size: .85rem; }
.feed .quando { font-size: .78rem; color: var(--texto-3); }
.feed-texto { font-size: .85rem; color: var(--texto-2); margin-top: .1rem; }

/* ---------- Detalhe do processo ---------- */
.cabecalho-processo { padding: 1.25rem 1.5rem; }
.cabecalho-processo h1 { font-size: 1.65rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.cabecalho-processo .produto { color: var(--texto-2); margin-top: .15rem; }
.passos { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; overflow-x: auto; }
.passo { flex: 1 1 0; min-width: 96px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; position: relative; }
.passo::before { content: ""; position: absolute; top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 2px; background: var(--borda); }
.passo:first-child::before { display: none; }
.passo.feito::before, .passo.atual::before { background: var(--destaque); }
.passo .marcador { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem;
  background: var(--superficie); border: 2px solid var(--borda); color: var(--texto-3); position: relative; z-index: 1; }
.passo.feito .marcador { background: var(--destaque); border-color: var(--destaque); color: #fff; }
.passo.atual .marcador { border-color: var(--destaque); color: var(--destaque); box-shadow: 0 0 0 4px var(--destaque-suave); }
.passo .nome { font-size: .78rem; color: var(--texto-3); line-height: 1.2; }
.passo.feito .nome { color: var(--texto-2); }
.passo.atual .nome { color: var(--texto); font-weight: 700; }
.resumo-processo { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem 1.5rem;
  margin: 1.5rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--borda); }
.resumo-processo dt { font-size: .75rem; font-weight: 500; color: var(--texto-2); margin-bottom: .15rem; }
.resumo-processo dd { margin: 0; font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.resumo-processo .relativo { font-weight: 400; font-size: .8rem; color: var(--texto-3); margin-left: .2rem; }
.resumo-processo .alerta dt, .resumo-processo .alerta dd, .resumo-processo .alerta .relativo { color: var(--perigo); }
.titulo-cartao { font-size: 1rem; font-weight: 700; margin: 0; }
.novo-evento { background: var(--fundo); border: 1px solid var(--borda); border-radius: var(--raio-sm); padding: .9rem 1rem; }
.linha-tempo { list-style: none; padding: 0; margin: 0; }
.linha-tempo li { position: relative; padding: 0 0 1.15rem 1.6rem; border-left: 2px solid var(--borda); margin-left: .45rem; }
.linha-tempo li:last-child { border-left-color: transparent; padding-bottom: 0; }
.linha-tempo li::before { content: ""; position: absolute; left: -7px; top: .25rem; width: 12px; height: 12px; border-radius: 50%;
  background: var(--superficie); border: 2px solid var(--borda-forte); }
.linha-tempo li.mais-recente::before { background: var(--destaque); border-color: var(--destaque); box-shadow: 0 0 0 4px var(--destaque-suave); }
.linha-tempo .quando { display: flex; gap: .4rem; align-items: center; font-size: .8rem; color: var(--texto-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.linha-tempo .relativo { font-weight: 400; color: var(--destaque); }
.linha-tempo .autor { font-weight: 400; color: var(--texto-3); }
.linha-tempo .texto { margin-top: .15rem; white-space: pre-line; font-size: .93rem; }
.linha-tempo li.mais-recente .texto { font-weight: 500; }
.armazenagem-numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.armazenagem-numeros .rotulo { font-size: .75rem; color: var(--texto-2); }
.armazenagem-numeros .valor { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.armazenagem-numeros .valor.text-danger { color: var(--perigo) !important; }
.nota { font-size: .78rem; color: var(--texto-2); }
.grupo-dados { padding-top: .9rem; margin-top: .9rem; border-top: 1px solid var(--borda); }
.grupo-dados:first-of-type { border-top: 0; margin-top: .4rem; padding-top: 0; }
.grupo-dados h3 { font-size: .78rem; font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6rem; }
.grupo-dados dl { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem 1.25rem; margin: 0; }
.grupo-dados dl .largo { grid-column: 1 / -1; }
.grupo-dados dt { font-size: .75rem; font-weight: 500; color: var(--texto-3); }
.grupo-dados dd { margin: 0; font-size: .92rem; white-space: pre-line; word-break: break-word; }
.secao-interna { background: #fffbeb; border-radius: var(--raio-sm); padding: .9rem 1rem !important; border-top: 0 !important; }

/* Listas de dados (detalhe do cliente) */
.campos dt { font-size: .75rem; color: var(--texto-2); font-weight: 500; }
.campos dd { margin-bottom: .9rem; white-space: pre-line; color: var(--texto); font-size: .97rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.lista-topo .grade-busca { flex: 1 1 220px; width: auto; margin-left: 0; }
