/* Intimações DJEN no site (sociodigital.app/intimacoes): painel de tela cheia.
   Usa os componentes de popup.css (os mesmos da extensão) e troca o layout. */

body.web { font-size: 15px; }
body.web .app { max-width: none; min-height: 100vh; }

/* ---------- Topo: marca, abas e ações numa barra só ---------- */
body.web .topo {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center;
  padding: 14px 32px; background: rgba(9, 9, 11, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
:root[data-tema="claro"] body.web .topo { background: rgba(247, 247, 245, .85); }
@media (prefers-color-scheme: light) { :root:not([data-tema="escuro"]) body.web .topo { background: rgba(247, 247, 245, .85); } }
body.web .marca img { height: 38px; }
body.web .marca-titulo { font-size: 15px; }
body.web .abas { position: static; margin: 0; box-shadow: none; background: var(--surface); }
body.web .abas button { flex: none; padding: 9px 16px; font-size: 14px; gap: 8px; }
body.web .abas button svg { width: 17px; height: 17px; }
body.web .topo-acoes { justify-self: end; align-items: center; gap: 8px; }
body.web .estado { font-size: 12.5px; color: var(--dim); margin-right: 6px; white-space: nowrap; }
body.web .estado.ok::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); margin-right: 7px; vertical-align: 1px; }
body.web .estado.erro { color: var(--red); }

body.web main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px 32px 40px; }
body.web .aba { gap: 18px; }

/* ---------- Cabeçalho de cada tela ---------- */
.painel-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.painel-cab h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.painel-cab p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
body.web .painel-cab .barra-acoes { gap: 20px; }

/* ---------- Resumo: cinco blocos que também filtram ---------- */
body.web .resumo { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 0; margin: 4px 0 6px; background: none; border: 0; }
body.web .resumo button {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; justify-items: start;
  padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left;
  transition: border-color .2s, transform .25s var(--ease), background .2s;
}
body.web .resumo button:hover { border-color: var(--line-2); transform: translateY(-2px); }
body.web .resumo strong {
  grid-row: 1 / span 2; min-width: 0; padding: 0; background: none; color: var(--text);
  font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums;
}
body.web .resumo span { font-size: 14px; font-weight: 700; color: var(--text); }
body.web .resumo small { font-size: 12.5px; color: var(--dim); font-weight: 500; }
body.web .resumo button:not(.zero):not([data-filtro="todas"]) strong { color: var(--lime-fg); }
body.web .resumo button[data-filtro="urgentes"]:not(.zero) strong { color: var(--red); }
body.web .resumo button.zero { color: inherit; }
body.web .resumo button.zero strong { display: block; color: var(--dim); }
body.web .resumo button.ativo { border-color: var(--lime-line); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--lime-line); }

/* ---------- Caixa: lista + coluna lateral ---------- */
.painel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.col-lista { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
body.web .busca-local { height: 46px; border-radius: 14px; }
body.web .lista { gap: 12px; }
body.web .item { padding: 18px 20px; border-radius: 18px; }
body.web .processo { font-size: 17px; }
body.web .grupo-data { margin-top: 10px; font-size: 13px; }

.col-lateral { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 14px; }
body.web .lateral { padding: 18px; }
body.web .lateral h3 { margin-bottom: 10px; font-size: 15px; }
.agenda-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.agenda-lista li { border-top: 1px solid var(--line); }
.agenda-lista li:first-child { border-top: 0; }
.agenda-lista button {
  width: 100%; display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 10px 4px; border: 0; background: none;
  color: inherit; text-align: left; cursor: pointer; border-radius: 10px; transition: background .2s;
}
.agenda-lista button:hover { background: var(--fill); }
.agenda-lista .dia { display: grid; place-items: center; height: 50px; border-radius: 12px; background: var(--lime-a); color: var(--lime-fg); line-height: 1.05; }
.agenda-lista .dia b { font-size: 19px; font-weight: 800; }
.agenda-lista .dia small { font-size: 11.5px; font-weight: 700; }
.agenda-lista .dia.critico { background: var(--red-a); color: var(--red); }
.agenda-lista .dia.aud { background: var(--violet-a); color: var(--violet-2); }
.agenda-lista .txt { min-width: 0; }
.agenda-lista .txt b { display: block; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-lista .txt span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-lista .vazio-lateral { padding: 6px 0 2px; color: var(--dim); font-size: 13px; }
body.web .col-lateral .ebook { margin: 0; max-width: none; }

/* ---------- Primeira visita ---------- */
.boas-vindas { position: relative; max-width: 1180px; margin: 24px auto 0; }
.bv-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 470px); gap: 64px; align-items: center; }
.bv-texto { text-align: left; }
.boas-vindas .selo { display: inline-block; font-weight: 700; font-size: 13.5px; color: var(--ink); background: var(--lime); padding: 7px 14px; border-radius: 999px; }
.boas-vindas h1 { margin: 22px 0 0; font-size: clamp(34px, 4.2vw, 56px); font-weight: 800; letter-spacing: -.045em; line-height: 1.04; }
.bv-texto > p { margin: 18px 0 0; max-width: 540px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.boas-vindas .linha-form.grande { justify-content: flex-start; margin-top: 30px; gap: 8px; }
.boas-vindas .linha-form.grande input, .boas-vindas .linha-form.grande select, .boas-vindas .linha-form.grande .primario { height: 54px; font-size: 16px; border-radius: 14px; }
.boas-vindas .linha-form.grande input[name="numero"] { width: 200px; }
.boas-vindas .linha-form.grande select { width: 86px; }
.boas-vindas .linha-form.grande .primario { padding: 0 26px; position: relative; overflow: hidden; }
/* Reflexo passando no botão */
.boas-vindas .linha-form.grande .primario::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg);
  animation: reflexo 4.5s var(--ease) 1.4s infinite;
}
@keyframes reflexo { 0% { left: -60%; } 30%, 100% { left: 130%; } }
.boas-vindas .miudo { margin-top: 14px; display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--dim); }
.boas-vindas .miudo svg { width: 15px; height: 15px; color: var(--lime-fg); flex: none; }

/* Palavra que gira no título */
/* Linha própria e altura fixa: trocar a frase não empurra o resto da tela */
.giro { display: grid; height: 1.12em; overflow: hidden; }
.giro em { grid-area: 1 / 1; font-style: normal; color: var(--lime-fg); white-space: nowrap; transition: transform .6s var(--ease), opacity .6s var(--ease); }
.giro em.entra { transform: translateY(100%); opacity: 0; }
.giro em.sai { transform: translateY(-100%); opacity: 0; }

/* Estrelas da marca flutuando ao fundo */
.brilhos { position: absolute; inset: -40px -20px; pointer-events: none; z-index: 0; }
.brilhos i {
  position: absolute; width: 22px; height: 22px; background: var(--violet); opacity: .5;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: flutua 9s ease-in-out infinite;
}
.brilhos i:nth-child(1) { left: 2%; top: 4%; }
.brilhos i:nth-child(2) { left: 46%; top: 0; width: 14px; height: 14px; background: var(--lime); opacity: .45; animation-delay: -3s; animation-duration: 11s; }
.brilhos i:nth-child(3) { right: 2%; top: 58%; width: 30px; height: 30px; opacity: .35; animation-delay: -6s; animation-duration: 13s; }
.brilhos i:nth-child(4) { left: 38%; bottom: 0; width: 12px; height: 12px; animation-delay: -1.5s; }
@keyframes flutua { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(45deg); } }
.bv-grid, .trio { position: relative; z-index: 1; }

/* Demonstração da caixa */
.demo { position: relative; padding-top: 30px; }
.demo-pop {
  position: relative; padding: 16px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .85); display: grid; gap: 10px;
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg); transition: transform .8s var(--ease);
}
.demo:hover .demo-pop { transform: none; }
.demo-topo { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 4px; }
.demo-topo b { font-size: 15px; }
.demo-badge {
  min-width: 28px; height: 28px; padding: 0 9px; border-radius: 999px; display: grid; place-items: center;
  background: var(--lime); color: var(--ink); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums;
}
.demo-badge.pula { animation: pula .5s var(--ease); }
@keyframes pula { 40% { transform: scale(1.35); } }
.demo-cartao {
  position: relative; padding: 13px 15px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line);
  opacity: 0; transform: translateY(18px) scale(.97); transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.demo-cartao.on { opacity: 1; transform: none; }
.demo-cartao.nova { border-color: var(--lime-line); }
.demo-cartao.urg::before { content: ""; position: absolute; left: -1px; top: 13px; bottom: 13px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.demo-cartao .dt { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--dim); }
.demo-cartao .dt b { color: var(--violet-2); }
.demo-cartao .dt i { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.demo-cartao .dp { margin-top: 3px; font-weight: 800; font-size: 15px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.demo-cartao .do { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 9px; }
.demo-cartao .da {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 11px; font-size: 12.5px;
  background: var(--lime-a); border: 1px solid var(--lime-line); color: var(--lime-fg);
}
.demo-cartao .da svg { width: 17px; height: 17px; flex: none; }
.demo-cartao .da span { display: flex; flex-direction: column; line-height: 1.3; }
.demo-cartao .da small { font-size: 11.5px; font-weight: 600; opacity: .85; }
.demo-cartao .da.aud { background: var(--violet-a); border-color: var(--violet-line); color: var(--violet-2); }
.demo-cartao .da.ini { justify-content: space-between; }
.demo-cartao .da.ini span { display: block; }
.demo-notif {
  position: absolute; z-index: 3; top: 0; right: -16px; width: 310px; display: flex; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 16px; background: var(--surface-3); border: 1px solid var(--line-2);
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .85);
  opacity: 0; transform: translateY(-14px) scale(.96); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.demo-notif.on { opacity: 1; transform: none; }
.demo-sino { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--lime); color: var(--ink); }
.demo-sino svg { width: 20px; height: 20px; }
.demo-notif.on .demo-sino svg { animation: sino 1s var(--ease) .2s; }
@keyframes sino { 20%, 60% { transform: rotate(14deg); } 40%, 80% { transform: rotate(-14deg); } }
.demo-notif b { display: block; font-size: 13.5px; }
.demo-notif small { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.demo-legenda { margin-top: 14px; text-align: center; font-size: 12px; color: var(--dim); }

.trio { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: left; }
.trio div { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, transform .3s var(--ease); }
.trio div:hover { border-color: var(--lime-line); transform: translateY(-3px); }
.trio svg { width: 22px; height: 22px; color: var(--lime-fg); }
.trio b { display: block; margin-top: 12px; font-size: 15px; }
.trio span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }

/* ---------- Buscar: tudo numa faixa ---------- */
.busca-linha { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.busca-linha .segmento { align-self: flex-start; min-width: 280px; }
.campos-linha { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.campos-linha .campo { flex: 1 1 150px; }
.campos-linha .campo.nome { flex: 3 1 300px; }
.campos-linha .campo.oab { flex: 1.2 1 140px; }
.campos-linha .campo.uf { flex: 0 0 96px; }
.campos-linha .campo i { font-style: normal; color: var(--dim); font-weight: 500; }
.campos-linha .primario { flex: 1 1 200px; height: 42px; }
body.web .lista.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); align-items: start; }
body.web .lista.grade .grupo-data { grid-column: 1 / -1; }
body.web .item .por-nome { margin-left: 6px; color: var(--amber); }

/* ---------- Prazos e ajustes em colunas ---------- */
.prazos-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.prazos-grid .nota { margin-top: 12px; }
body.web .resultado-prazo { padding: 22px; }
body.web .resultado-prazo:empty { display: block; min-height: 120px; }
body.web .resultado-prazo .venc strong { font-size: 36px; }
.ajustes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
body.web .instalar p { margin: 0 0 14px; color: var(--muted); }
body.web .instalar .baixar { display: flex; align-items: center; justify-content: center; text-decoration: none; }
body.web .instalar ol { margin: 16px 0 12px; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
body.web .instalar b { color: var(--text); }
body.web .instalar:target { border-color: var(--lime-line); }

body.web .rodape { max-width: 1280px; width: 100%; margin: 0 auto; padding: 18px 32px 28px; border: 0; }

/* ---------- Movimento ---------- */
body.web main > .aba:not([hidden]) { animation: sobe .6s var(--ease) both; }
body.web .resumo button { animation: sobe .6s var(--ease) both; }
body.web .resumo button:nth-child(2) { animation-delay: .05s; }
body.web .resumo button:nth-child(3) { animation-delay: .1s; }
body.web .resumo button:nth-child(4) { animation-delay: .15s; }
body.web .resumo button:nth-child(5) { animation-delay: .2s; }
body.web .lista > * { animation: sobe .55s var(--ease) both; }
body.web .lista > :nth-child(2) { animation-delay: .04s; }
body.web .lista > :nth-child(3) { animation-delay: .08s; }
body.web .lista > :nth-child(4) { animation-delay: .12s; }
body.web .lista > :nth-child(5) { animation-delay: .16s; }
body.web .lista > :nth-child(n+6) { animation-delay: .2s; }
body.web .item { transition: border-color .2s, transform .25s var(--ease); }
body.web .item:hover { transform: translateY(-2px); }
.bv-texto > *, .demo, .trio > div { animation: sobe .7s var(--ease) both; }
.bv-texto > :nth-child(2) { animation-delay: .07s; }
.bv-texto > :nth-child(3) { animation-delay: .14s; }
.bv-texto > :nth-child(4) { animation-delay: .21s; }
.bv-texto > :nth-child(5) { animation-delay: .28s; }
.demo { animation-delay: .25s; animation-duration: .9s; }
.trio > div:nth-child(1) { animation-delay: .4s; }
.trio > div:nth-child(2) { animation-delay: .48s; }
.trio > div:nth-child(3) { animation-delay: .56s; }
@keyframes sobe { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Telas menores ---------- */
@media (max-width: 1100px) {
  .bv-grid { grid-template-columns: 1fr; gap: 40px; }
  .demo { max-width: 470px; width: 100%; margin: 0 auto; }
  .demo-pop { transform: none; }
  .demo-notif { right: 0; }
  body.web .resumo button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; }
  body.web .resumo strong { font-size: 28px; }
  body.web .topo { grid-template-columns: auto 1fr; }
  body.web .topo .abas { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  body.web .abas button { flex: 1; }
  body.web .estado { display: none; }
  .col-lateral { position: static; }
  .painel-grid { grid-template-columns: 1fr; }
  .col-lateral { display: grid; grid-template-columns: 1fr 1fr; }
  .col-lateral .ebook { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body.web .topo { padding: 12px 16px; gap: 12px; }
  body.web .marca-titulo { display: none; }
  body.web .abas button { padding: 8px 6px; font-size: 13px; gap: 5px; }
  body.web .abas button svg { display: none; }
  body.web main { padding: 22px 16px 32px; }
  .painel-cab h1 { font-size: 24px; }
  body.web .resumo { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  body.web .resumo button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; }
  body.web .resumo strong { font-size: 26px; }
  body.web .resumo small { display: none; }
  .col-lateral, .prazos-grid, .ajustes-grid, .trio { grid-template-columns: 1fr; }
  body.web .lista.grade { grid-template-columns: 1fr; }
  .boas-vindas { margin-top: 8px; }
  .boas-vindas .linha-form.grande { flex-wrap: wrap; }
  .demo-notif { width: auto; left: 8px; right: 8px; }
  .giro { height: 2.2em; align-items: start; }
  .giro em { white-space: normal; }
  .boas-vindas .linha-form.grande input[name="numero"] { flex: 1; width: auto; }
  .boas-vindas .linha-form.grande .primario { flex: 1 1 100%; }
  .trio { margin-top: 36px; }
  body.web .rodape { padding: 14px 16px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  body.web *, body.web *::before, body.web *::after { animation: none !important; transition: none !important; }
  .demo-cartao { opacity: 1; transform: none; }
}
