/* =========================================================
   Max Sistemas · camada de animações e acabamento visual
   ========================================================= */

h1, h2, h3, .marca, .stat-num, .numeros b, .dash-kpis b { font-family: "Plus Jakarta Sans", "Inter", Arial, sans-serif; }
h1 { letter-spacing: -.03em; }
.hero h1 { min-height: 3.6em; }

/* Barra de progresso de leitura */
.progresso {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, #F09000, #FFB347);
  transform-origin: 0 50%; transform: scaleX(0);
  box-shadow: 0 0 12px rgba(240, 144, 0, .6);
}

/* Botões com brilho */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn:hover::after { left: 140%; }

/* ---------------- HERO ---------------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding-bottom: 150px; }
.hero-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
  animation: deriva 18s ease-in-out infinite alternate;
}
.b1 { width: 460px; height: 460px; background: #F09000; top: -140px; right: -80px; opacity: .35; }
.b2 { width: 380px; height: 380px; background: #4B4BA8; bottom: -120px; left: -100px; animation-duration: 22s; opacity: .45; }
.b3 { width: 260px; height: 260px; background: #FFB347; top: 40%; left: 45%; animation-duration: 26s; opacity: .18; }
@keyframes deriva {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 30px) scale(.95); }
}
.grade {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
#particulas { position: absolute; inset: 0; width: 100%; height: 100%; }

.tag-brilho { display: inline-flex; align-items: center; gap: .55rem; border: 1px solid rgba(240, 144, 0, .35); }
.ponto-vivo { width: 8px; height: 8px; border-radius: 50%; background: #F09000; position: relative; }
.ponto-vivo::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #F09000; animation: pulsar 1.8s ease-out infinite; }
@keyframes pulsar { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

.digitando { position: relative; white-space: nowrap; }
.digitando::after {
  content: ""; display: inline-block; width: 3px; height: .9em; margin-left: 4px;
  background: #F09000; vertical-align: -0.08em; animation: piscar 1s steps(1) infinite;
}
@keyframes piscar { 50% { opacity: 0; } }

/* Entrada do hero */
.hero-texto > * { opacity: 0; transform: translateY(26px); animation: subir .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.hero-texto > :nth-child(1) { animation-delay: .1s; }
.hero-texto > :nth-child(2) { animation-delay: .25s; }
.hero-texto > :nth-child(3) { animation-delay: .4s; }
.hero-texto > :nth-child(4) { animation-delay: .55s; }
.hero-visual { opacity: 0; animation: surgir 1.1s .45s cubic-bezier(.2, .7, .2, 1) forwards; }
.hero-pronto .hero-texto > *, .hero-pronto .hero-visual { opacity: 1; transform: none; animation: none; }
@keyframes subir { to { opacity: 1; transform: none; } }
@keyframes surgir { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }

/* Painel ao vivo */
.painel {
  position: relative;
  background: linear-gradient(160deg, rgba(44, 44, 74, .92), rgba(32, 32, 56, .96));
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
  transition: transform .6s ease;
}
.hero-visual:hover .painel { transform: perspective(1200px) rotateY(0) rotateX(0); }
.painel::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(130deg, rgba(240, 144, 0, .8), transparent 35%, transparent 65%, rgba(240, 144, 0, .5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.painel-topo { position: relative; }
.ao-vivo {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #6ee7a8; background: rgba(110, 231, 168, .12); padding: 3px 10px; border-radius: 999px;
}
.ao-vivo b { width: 7px; height: 7px; border-radius: 50%; background: #6ee7a8; animation: piscar 1.2s infinite; }
.ao-vivo.claro { color: #1A9E55; background: rgba(37, 211, 102, .12); }
.ao-vivo.claro b { background: #25D366; }
.painel-corpo .painel-linha { transition: background .6s; }
.painel-linha.nova { animation: linha-nova 1.6s ease; }
@keyframes linha-nova {
  0% { opacity: 0; transform: translateY(-12px); background: rgba(240, 144, 0, .35); }
  30% { opacity: 1; transform: none; background: rgba(240, 144, 0, .25); }
  100% { background: transparent; }
}
.painel-linha.saindo { animation: linha-sai .4s ease forwards; }
@keyframes linha-sai { to { opacity: 0; transform: translateY(10px); } }
.painel-grafico { padding: 12px 18px 4px; border-top: 1px solid rgba(255, 255, 255, .06); }
.painel-grafico-cab { display: flex; justify-content: space-between; align-items: baseline; }
.painel-grafico-cab small { color: #A9A9C4; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.painel-grafico-cab b { color: #fff; font-size: 1.1rem; font-family: "Plus Jakarta Sans", Inter, sans-serif; }
.spark { width: 100%; height: 56px; display: block; margin-top: 4px; }
.spark-linha { fill: none; stroke: #F09000; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: desenhar 2.2s 1.2s ease forwards; vector-effect: non-scaling-stroke; }
.spark-area { opacity: 0; animation: aparecer 1.2s 2.4s ease forwards; }
@keyframes desenhar { to { stroke-dashoffset: 0; } }
@keyframes aparecer { to { opacity: 1; } }
#nfce-status.flash { animation: flash .9s ease; }
@keyframes flash { 0%, 100% { opacity: 1; } 40% { opacity: .35; } }

.chip-flutuante {
  position: absolute; display: flex; align-items: center; gap: .7rem; z-index: 3;
  background: rgba(255, 255, 255, .96); color: var(--marinho); border-radius: 14px; padding: 12px 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
  animation: flutuar 5s ease-in-out infinite;
}
.chip-flutuante strong { display: block; font-size: .88rem; }
.chip-flutuante small { color: #77778F; font-size: .76rem; }
.chip-flutuante.c1 { top: -26px; right: -18px; animation-delay: -1.5s; }
.chip-flutuante.c2 { bottom: -30px; left: -34px; }
.chip-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; }
.chip-ico .ico { width: 20px; height: 20px; }
.chip-ico.verde { background: #25D366; }
.chip-ico.laranja { background: #F09000; }

.rolar {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, .45); border-radius: 14px; z-index: 2;
}
.rolar span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #F09000; animation: rolar 1.8s ease-in-out infinite; }
@keyframes rolar { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
.onda { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; z-index: 1; }

/* ---------------- FAIXA ROLANTE ---------------- */
.faixa { overflow: hidden; background: #fff; padding: 18px 0 6px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.faixa-trilho { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.faixa:hover .faixa-trilho { animation-play-state: paused; }
.faixa-trilho span {
  display: inline-flex; align-items: center; gap: 1.2rem; padding: 0 1.2rem; white-space: nowrap;
  font-family: "Plus Jakarta Sans", Inter, sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--marinho);
}
.faixa-trilho span::after { content: "✦"; color: #F09000; font-size: .9rem; padding-left: 1.2rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------- TÍTULOS DE SEÇÃO ---------------- */
.secao-cab h2 { position: relative; padding-bottom: 18px; }
.secao-cab h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0; height: 4px; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, #F09000, #FFB347); transform: translateX(-50%); transition: width 1s .3s ease;
}
.secao-cab.visivel h2::after, .secao-cab:not(.revelar) h2::after { width: 72px; }
.revelar { filter: blur(6px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1), filter .8s ease; }
.revelar.visivel { filter: none; }

/* ---------------- CARDS ---------------- */
.card { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s, border-color .35s, opacity .8s ease, filter .8s ease; will-change: transform; }
.card.revelar:not(.visivel) { transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1), filter .8s ease; }
.card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(240, 144, 0, .14), transparent 45%);
}
.card:hover::after { opacity: 1; }
.card-icone { color: #F09000; transition: transform .4s cubic-bezier(.2, .7, .2, 1), background .3s, color .3s; }
.card-icone .ico { width: 26px; height: 26px; }
.card:hover .card-icone { transform: rotate(-8deg) scale(1.08); background: #F09000; color: #fff; }
.card-link { transition: letter-spacing .3s; }
.card:hover .card-link { letter-spacing: .03em; }

/* ---------------- DASHBOARD MAX POSTO ---------------- */
.dash-wrap { position: relative; display: block; padding: 0 0 40px 40px; }
.dash-foto { position: absolute; left: 0; bottom: 0; width: 62%; aspect-ratio: 4 / 3; opacity: .95; }
.dash {
  position: relative; z-index: 1; margin-left: auto; width: min(100%, 470px);
  background: rgba(255, 255, 255, .97); border: 1px solid var(--borda); border-radius: 20px;
  padding: 22px; box-shadow: 0 30px 60px rgba(32, 32, 56, .18);
}
.dash-topo { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.dash-topo strong { display: block; color: var(--marinho); font-size: 1.05rem; }
.dash-topo small { color: #8A8AA0; font-size: .8rem; }
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.dash-kpis > div { background: var(--cinza-2); border-radius: 12px; padding: 10px 12px; border-top: 3px solid #F09000; }
.dash-kpis > div:nth-child(2) { border-top-color: var(--marinho); }
.dash-kpis > div:nth-child(3) { border-top-color: #25D366; }
.dash-kpis small { display: block; font-size: .72rem; color: #8A8AA0; }
.dash-kpis b { font-size: 1.35rem; color: var(--marinho); }
.dash-graficos { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.dash-bloco > small { display: block; font-size: .74rem; font-weight: 700; color: #8A8AA0; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.barras { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 18px; border-bottom: 1px solid var(--borda); }
.barra { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.barra i {
  display: block; width: 100%; height: 0; border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #FFB347, #F09000);
  transition: height 1.2s cubic-bezier(.2, .8, .2, 1);
}
.barra:nth-child(even) i { background: linear-gradient(180deg, #4B4B78, #202038); }
.barra em { font-style: normal; font-size: .66rem; font-weight: 700; color: var(--marinho); opacity: 0; transition: opacity .4s; margin-bottom: 4px; }
.barra span { position: absolute; bottom: -20px; font-size: .7rem; color: #77778F; }
.dash.ativo .barra i { height: calc(var(--v) * 78%); }
.dash.ativo .barra em { opacity: 1; transition-delay: 1s; }
.dash.ativo .barra:nth-child(2) i { transition-delay: .1s; }
.dash.ativo .barra:nth-child(3) i { transition-delay: .2s; }
.dash.ativo .barra:nth-child(4) i { transition-delay: .3s; }
.dash.ativo .barra:nth-child(5) i { transition-delay: .4s; }
.barra:hover i { filter: brightness(1.12); }
.dash-bloco:first-child { padding-bottom: 22px; }
.rosca { position: relative; width: 130px; height: 130px; margin: 0 auto 8px; }
.rosca svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rosca circle { fill: none; stroke-width: 14; }
.rosca-fundo { stroke: #EEEEF3; }
.seg { stroke-dasharray: 0 100; stroke-dashoffset: calc(var(--o) * -1); transition: stroke-dasharray 1.4s cubic-bezier(.2, .8, .2, 1); }
.dash.ativo .seg { stroke-dasharray: var(--d) 100; }
.dash.ativo .seg:nth-of-type(3) { transition-delay: .25s; }
.dash.ativo .seg:nth-of-type(4) { transition-delay: .5s; }
.rosca-centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.rosca-centro b { font-size: 1.3rem; color: var(--marinho); font-family: "Plus Jakarta Sans", Inter, sans-serif; }
.rosca-centro small { font-size: .7rem; color: #8A8AA0; }
.legenda { list-style: none; font-size: .74rem; color: #55556E; display: grid; gap: 4px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------------- FLUXO DA AUTOMAÇÃO ---------------- */
.fluxo-passos { position: relative; display: grid; gap: 14px; }
.fluxo-linha { position: absolute; left: 41px; top: 30px; bottom: 30px; width: 2px; background: rgba(255, 255, 255, .12); }
.fluxo-pulso {
  position: absolute; left: -5px; top: 0; width: 12px; height: 12px; border-radius: 50%;
  background: #F09000; box-shadow: 0 0 0 6px rgba(240, 144, 0, .2), 0 0 24px #F09000;
  transition: top .7s cubic-bezier(.6, 0, .3, 1);
}
.fluxo-passo { position: relative; z-index: 1; transition: border-color .4s, background .4s, transform .4s, box-shadow .4s; }
.fluxo-passo span { transition: transform .4s, box-shadow .4s; }
.fluxo-passo.ativo { border-color: rgba(240, 144, 0, .7); background: #34345A; transform: translateX(8px); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.fluxo-passo.ativo span { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(240, 144, 0, .2); }
.fluxo-passo.feito span { background: #25D366; }

/* ---------------- CHAT ---------------- */
.chat { padding: 0 16px 20px; overflow: hidden; min-height: 380px; max-height: 440px; align-content: flex-start; }
.chat-cab { display: flex; align-items: center; gap: 10px; margin: 0 -16px 6px; padding: 12px 16px; background: #075E54; color: #fff; }
.chat-cab strong { display: block; font-size: .9rem; }
.chat-cab small { color: #CDE8E3; font-size: .72rem; }
.chat-avatar img { width: 34px; height: 34px; border-radius: 50%; }
.chat .msg { transition: opacity .35s, transform .35s; }
.chat.animando .msg { display: none; }
.chat.animando .msg.mostrar { display: block; animation: msg-entra .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes msg-entra { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.msg-digitando { display: none; align-self: flex-end; background: #DCF8C6; padding: 12px 14px; border-radius: 12px; gap: 4px; }
.msg-digitando.mostrar { display: inline-flex; }
.msg-digitando.recebendo { align-self: flex-start; background: #fff; }
.msg-digitando i { width: 7px; height: 7px; border-radius: 50%; background: #7A9A70; animation: pulo 1.2s infinite; }
.msg-digitando i:nth-child(2) { animation-delay: .15s; }
.msg-digitando i:nth-child(3) { animation-delay: .3s; }
@keyframes pulo { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ---------------- AGENDA ---------------- */
.agenda-visual .slot { opacity: 0; transform: translateX(16px); transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.agenda-visual.ativo .slot { opacity: 1; transform: none; }
.agenda-visual.ativo .slot:nth-child(3) { transition-delay: .12s; }
.agenda-visual.ativo .slot:nth-child(4) { transition-delay: .24s; }
.agenda-visual.ativo .slot:nth-child(5) { transition-delay: .36s; }
.agenda-visual.ativo .slot:nth-child(6) { transition-delay: .48s; }
#slot-novo { transition: background .5s, color .5s, border-color .5s; }
#slot-novo.agendado { border: 1px solid transparent; border-left: 4px solid #25D366; background: rgba(37, 211, 102, .12); color: var(--marinho); animation: pop .6s cubic-bezier(.2, .8, .2, 1.4); }
@keyframes pop { 0% { transform: scale(.9); } 60% { transform: scale(1.04); } 100% { transform: none; } }
#agenda .balao { opacity: 0; transform: translateY(10px) scale(.9); transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1.4); animation: none; }
#agenda .balao.mostrar { opacity: 1; transform: none; animation: flutuar 4s 1s ease-in-out infinite; }

/* ---------------- NÚMEROS ---------------- */
.numeros {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 56px;
  background: var(--borda); border: 1px solid var(--borda); border-radius: 20px; overflow: hidden;
}
.numeros > div { background: #fff; padding: 30px 24px; text-align: center; transition: background .3s; }
.numeros > div:hover { background: #FFF8EC; }
.numeros b {
  display: block; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.1;
  background: linear-gradient(135deg, #F09000, #FFB347); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.numeros span { font-size: .92rem; color: #66667E; }

/* ---------------- DIFERENCIAIS ---------------- */
.diferenciais > div { padding: 28px 20px; border-radius: 18px; transition: background .3s, transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, opacity .8s ease, filter .8s ease; }
.diferenciais > div:hover { background: #fff; transform: translateY(-6px); box-shadow: var(--sombra); }
.dif-ico {
  width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 18px; display: grid !important; place-items: center;
  background: linear-gradient(135deg, rgba(240, 144, 0, .16), rgba(240, 144, 0, .04)); color: #F09000;
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.dif-ico .ico { width: 30px; height: 30px; }
.diferenciais > div:hover .dif-ico { transform: translateY(-4px) rotate(6deg); }

.banner-equipe img { transform: scale(1.15); will-change: transform; }

/* ---------------- CONTATO ---------------- */
.contato { position: relative; overflow: hidden; isolation: isolate; }
.contato::before, .contato::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); z-index: -1;
  animation: deriva 20s ease-in-out infinite alternate;
}
.contato::before { width: 420px; height: 420px; background: rgba(240, 144, 0, .28); top: -160px; left: -120px; }
.contato::after { width: 360px; height: 360px; background: rgba(75, 75, 168, .45); bottom: -140px; right: -80px; animation-duration: 24s; }
.whats-flutuante::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366;
  animation: pulsar 2.2s ease-out infinite;
}

/* ---------------- RESPONSIVO ---------------- */
@media (max-width: 1000px) {
  .numeros { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .painel { transform: none; }
  .chip-flutuante.c1 { right: 6px; }
  .chip-flutuante.c2 { left: 6px; }
  .rolar { display: none; }
  .dash-wrap { padding: 0; }
  .dash-foto { display: none; }
  .dash { width: 100%; }
}
@media (max-width: 560px) {
  .dash-graficos { grid-template-columns: 1fr; }
  .dash-kpis b { font-size: 1.1rem; }
  .numeros { grid-template-columns: 1fr 1fr; }
  .numeros > div { padding: 22px 12px; }
  .chip-flutuante { padding: 9px 12px; }
  .chip-flutuante small { display: none; }
  .hero { padding-bottom: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-texto > *, .hero-visual { opacity: 1; transform: none; }
  .faixa-trilho { animation: none; }
  #particulas { display: none; }
}
