/* Agenda pública da JMBA (/agenda). Cores da marca (manual de marca; mesmos tokens do site, em
   site/public/assets/css/base/variables.css). Claro e escuro pelo sistema.
   Layout das telas de agendamento no padrão da agenda NexTool (13/11/2026): card em duas colunas, contexto à
   esquerda e ação à direita; empilha no celular. Fundo: a rede de nós do hero do site (fundo.js). */
:root {
  --navy: #1a2f54;
  --azul: #1181f0;
  --azul-texto: #0d6ccc;
  --ciano: #00f9ff;
  --ciano-hover: #00d8dd;
  --card: #ffffff;
  --card-2: #f5f8fc;
  --texto: #46536a;
  --titulo: #1a2f54;
  --muted: #5d6b81;
  --borda: #dde5f0;
  --suave: #e8f1fd;
  --erro: #b42318;
  --erro-forte: #d92d20;
  --erro-fundo: #fef3f2;
  --alerta: #93370d;
  --alerta-fundo: #fffaeb;
  --ok: #067647;
  --ok-fundo: #e3f5ea;
  --sombra: 0 24px 60px rgba(4, 12, 28, .35);
  --hero-bg: linear-gradient(135deg, #101d35 0%, #1a2f54 55%, #23477c 100%);
  --on-dark: #ffffff;
  --on-dark-muted: #cfe0f5;
  --on-dark-border: rgba(255, 255, 255, .28);
  --on-dark-surface: rgba(255, 255, 255, .08);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --card: #101d35;
    --card-2: #142544;
    --texto: #c9d4e5;
    --titulo: #ffffff;
    --muted: #93a3bb;
    --borda: #24385c;
    --suave: #17304f;
    --azul-texto: #7cc0ff;
    --erro: #fda29b;
    --erro-forte: #f97066;
    --erro-fundo: #3a1512;
    --alerta: #fec84b;
    --alerta-fundo: #3a2c06;
    --ok: #75e0a7;
    --ok-fundo: #0f3323;
    --sombra: 0 24px 60px rgba(0, 0, 0, .45);
    --hero-bg: linear-gradient(135deg, #08111c 0%, #0f1e35 55%, #16304f 100%);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--hero-bg) fixed; color: var(--texto); min-height: 100vh;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
a { color: var(--azul-texto); }
h1, h2, h3 { color: var(--titulo); line-height: 1.25; margin: 0; text-wrap: balance; }
h1 { font-size: 1.5rem; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
[hidden] { display: none !important; }

/* casca: fundo, cabeçalho e rodapé */
.fundo-rede { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.wrap { position: relative; z-index: 1; max-width: 1040px; margin: 0 auto; padding: 16px 16px 32px; }
/* o canvas fica dentro do .wrap: o conteúdo precisa de camada própria para a rede passar POR TRÁS do card */
.topo, .card, .rodape { position: relative; z-index: 1; }
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 20px; }
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-dark); font-weight: 700; font-size: 1.05rem; }
.voltar-site {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  color: var(--on-dark); text-decoration: none; font-weight: 600; font-size: 14px;
  border: 1px solid var(--on-dark-border); background: var(--on-dark-surface); backdrop-filter: blur(6px);
  transition: background .2s ease, border-color .2s ease;
}
.voltar-site:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); }
.voltar-site svg { width: 16px; height: 16px; transition: transform .2s ease; }
.voltar-site:hover svg { transform: translateX(-3px); }
.rodape { text-align: center; font-size: 13px; color: var(--on-dark-muted); margin-top: 18px; }
.rodape a { color: var(--on-dark); }

.card { background: var(--card); border: 1px solid var(--borda); border-radius: 16px; padding: 28px; box-shadow: var(--sombra); container: card / inline-size; }
.demo { background: #fef7c3; color: #713b12; border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-bottom: 16px; }
@media (prefers-color-scheme: dark) { .demo { background: #3d2f05; color: #fde272; } }

.cab { margin-bottom: 20px; }
.cab-centro { text-align: center; }
.sub { margin: 6px 0 0; color: var(--muted); }

/* tela 1: tipos (efeito dos cards da home NexTool: luz que segue o mouse, linha no topo, ícone em marca d'água) */
.opcoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.opcao {
  --c: var(--azul);
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 150px; padding: 26px 22px; text-align: center;
  background: var(--card); border: 1px solid var(--borda); border-radius: 18px;
  transition: transform .35s var(--ease), box-shadow .35s ease, border-color .35s ease;
}
.opcao[data-cor="comercial"] { --c: #0fa3b8; }
.opcao[data-cor="financeiro"] { --c: #d4a00c; }
.opcao[data-cor="novo_cliente"] { --c: #10b981; }
.opcao::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c), transparent 82%), transparent 62%);
}
.opcao::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease); background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c), #fff 45%));
}
.opcao:hover, .opcao:focus-visible {
  transform: translateY(-6px); border-color: color-mix(in srgb, var(--c), transparent 50%);
  box-shadow: 0 22px 48px color-mix(in srgb, var(--c), transparent 80%);
}
.opcao:hover::before, .opcao:focus-visible::before { opacity: 1; }
.opcao:hover::after, .opcao:focus-visible::after { transform: scaleX(1); }
.opcao > span { position: relative; }
.opcao-nome { color: var(--titulo); font-weight: 700; font-size: 1.15rem; }
.opcao-desc { color: var(--muted); font-size: 14px; max-width: 34ch; }
.opcao > .opcao-bg {
  position: absolute; right: -14px; bottom: -22px; width: 116px; height: 116px; color: var(--c); opacity: .09;
  transform: rotate(-12deg); transition: transform .6s var(--ease), opacity .4s ease; pointer-events: none;
}
.opcao-bg svg { width: 100%; height: 100%; }
.opcao:hover .opcao-bg, .opcao:focus-visible .opcao-bg { transform: rotate(-4deg) scale(1.08); opacity: .18; }

/* telas 2 a 4: card em duas colunas */
.card.livro { padding: 0; }
.card.livro > .demo { margin: 16px 16px 0; }
.livro-grade { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); }
.lateral { padding: 28px; border-right: 1px solid var(--borda); display: flex; flex-direction: column; gap: 14px; }
.principal { padding: 28px; min-width: 0; }
.voltar { all: unset; cursor: pointer; align-self: flex-start; color: var(--azul-texto); font-weight: 600; font-size: 14px; }
.voltar:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; border-radius: 4px; }
.quem { display: flex; align-items: center; gap: 12px; }
.quem small { display: block; color: var(--muted); font-size: 12px; }
.quem strong { color: var(--titulo); font-size: 15px; }
.quem strong a, .resumo dd a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--azul), transparent 50%); text-underline-offset: 3px; }
.quem strong a:hover, .resumo dd a:hover { color: var(--azul-texto); text-decoration-color: currentColor; }
.avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--azul)); color: #ffffff; font-weight: 700; font-size: 16px; letter-spacing: .02em;
}
.avatar.foto { background: #ffffff; overflow: hidden; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--borda); }
.avatar.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lateral .quem .avatar { width: 56px; height: 56px; }
.lateral h2 { font-size: 22px; }
.fatos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 14px; }
.fatos li { display: flex; align-items: center; gap: 8px; }
.fatos svg, .fuso svg { flex: none; display: block; }
.duracao { display: inline-flex; align-self: flex-start; background: var(--card-2); border: 1px solid var(--borda); border-radius: 999px; padding: 3px; }
.duracao button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); }
.duracao button.on { background: var(--navy); color: #ffffff; }
.escolhido { background: var(--suave); color: var(--azul-texto); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: 14px; }
.escolhido::first-letter { text-transform: uppercase; }
.nota { margin: 0; font-size: 13px; color: var(--muted); border-top: 1px solid var(--borda); padding-top: 12px; }
.principal h3 { font-size: 18px; margin-bottom: 16px; }
.principal h3 + .sub { margin: -10px 0 16px; }

/* analistas */
.pessoas { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pessoa {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left;
  background: var(--card); border: 1px solid var(--borda); border-radius: 12px; font-weight: 600; color: var(--titulo);
  transition: border-color .15s, transform .15s;
}
.pessoa:hover { border-color: var(--azul); transform: translateY(-1px); }
.pessoa .avatar { width: 40px; height: 40px; font-size: 14px; }

/* passo do chamado (Suporte técnico) */
.chamado-form { max-width: 420px; }
.chamado-linha { display: flex; gap: 8px; }
.chamado-linha input { flex: 1; font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.chamado-linha .btn { align-self: stretch; padding: 10px 22px; }
.guia { margin-top: 22px; background: var(--card-2); border: 1px solid var(--borda); border-radius: 12px; padding: 14px 18px; font-size: 14px; max-width: 560px; }
.guia strong { color: var(--titulo); }
.guia ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--texto); }
.campo input[readonly] { background: var(--card-2); color: var(--muted); }

/* calendário */
.cal-grade { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; }
.cal-topo { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 10px; color: var(--titulo); }
.cal-topo strong { min-width: 150px; text-align: center; font-weight: 600; }
.nav { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--azul-texto); font-size: 22px; }
.nav:hover { background: var(--suave); }
.nav[disabled] { color: var(--borda); cursor: default; background: none; }
.grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.dow { font-size: 12px; color: var(--muted); padding: 4px 0; }
.dia {
  all: unset; box-sizing: border-box; position: relative; aspect-ratio: 1; width: 100%; max-width: 48px; margin: auto;
  border-radius: 50%; display: grid; place-items: center; color: var(--muted); font-variant-numeric: tabular-nums;
}
.dia.livre { background: var(--suave); color: var(--azul-texto); font-weight: 700; cursor: pointer; }
.dia.livre:hover { background: var(--azul); color: #ffffff; }
.dia.sel { background: var(--navy); color: #ffffff; }
.dia.hoje::after { content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.dia:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.fuso { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.slots { display: flex; flex-direction: column; gap: 8px; }
.dia-escolhido { font-weight: 700; font-size: 14px; color: var(--titulo); margin-bottom: 4px; }
.turno { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.slot {
  all: unset; box-sizing: border-box; cursor: pointer; text-align: center; padding: 11px; border: 1px solid var(--azul);
  border-radius: 8px; color: var(--azul-texto); font-weight: 700; font-variant-numeric: tabular-nums;
}
.slot:hover { background: var(--navy); border-color: var(--navy); color: #ffffff; }
.slot:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.vazio, .carregando { color: var(--muted); font-size: 14px; margin: 0; }

/* formulário */
form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.legenda-obrig { margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
.campo { display: flex; flex-direction: column; gap: 5px; }
.campo label { font-weight: 600; color: var(--titulo); font-size: 14px; }
.campo label em { font-style: normal; font-weight: 400; color: var(--muted); }
.obrig { color: var(--erro-forte); font-weight: 700; }
.campo input, .campo textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 8px; background: var(--card); color: var(--titulo); font: inherit;
}
.campo textarea { resize: vertical; min-height: 88px; }
.campo input:focus, .campo textarea:focus { border-color: var(--azul); outline: none; box-shadow: 0 0 0 3px rgba(17, 129, 240, .2); }
.campo.bad input, .campo.bad textarea { border-color: var(--erro-forte); }
.dica { color: var(--muted); font-size: 13px; }
.err { color: var(--erro-forte); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--borda); background: var(--card); border-radius: 999px; padding: 7px 14px; font-size: 14px; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #ffffff; }
.convidados { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.conv { display: flex; gap: 6px; width: 100%; }
.conv .x { border: 1px solid var(--borda); background: none; border-radius: 8px; width: 40px; font-size: 18px; }
.add-conv { align-self: flex-start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.link { background: none; border: 0; padding: 0; color: var(--azul-texto); text-decoration: underline; font-size: 14px; }
.btn {
  display: inline-block; align-self: flex-start; border: 0; border-radius: 999px; padding: 12px 26px; background: var(--ciano); color: var(--navy);
  font-weight: 700; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--ciano-hover); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.perigo { background: var(--erro-forte); color: #ffffff; }

.aviso { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 0 0 16px; background: var(--alerta-fundo); color: var(--alerta); }
.aviso.erro { background: var(--erro-fundo); color: var(--erro); }

/* confirmação */
.card.feito { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 40px 28px; }
.check { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-fundo); color: var(--ok); }
.feito h2 { font-size: 24px; }
.feito > p { margin: 0; max-width: 60ch; color: var(--muted); }
.feito .voltar { align-self: center; }
.resumo {
  text-align: left; border: 1px solid var(--borda); border-radius: 12px; padding: 18px 20px; margin: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; width: 100%; max-width: 600px; font-size: 14px;
}
.resumo dt { color: var(--muted); }
.resumo dd { margin: 0; font-weight: 600; color: var(--titulo); overflow-wrap: anywhere; white-space: pre-line; }
.add-agenda { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.add-agenda span { width: 100%; font-size: 13px; color: var(--muted); }
.add-agenda a { border: 1px solid var(--borda); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--titulo); background: var(--card); }
.add-agenda a:hover { border-color: var(--azul); }

/* balão do WhatsApp (o mesmo do site; o verde é a cor da marca do WhatsApp, de propósito) */
.whatsapp-float { position: fixed; right: 1.15rem; bottom: 1.15rem; z-index: 20; display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.whatsapp-float[hidden] { display: none; }
.whatsapp-float__link {
  position: relative; display: inline-flex; align-items: center; gap: .55rem; padding: .7rem 1.1rem .7rem .8rem; border-radius: 999px;
  background: #25d366; color: #ffffff; font-weight: 700; font-size: .92rem; text-decoration: none;
  box-shadow: 0 8px 22px rgba(37, 211, 102, .35); transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  animation: whatsapp-pulso 2.8s ease-out infinite;
}
.whatsapp-float__link:hover { background: #1fb955; color: #ffffff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 211, 102, .45); animation: none; }
.whatsapp-float__icone { width: 1.55rem; height: 1.55rem; flex-shrink: 0; }
@keyframes whatsapp-pulso {
  0% { box-shadow: 0 8px 22px rgba(37, 211, 102, .35), 0 0 0 0 rgba(37, 211, 102, .45); }
  65% { box-shadow: 0 8px 22px rgba(37, 211, 102, .35), 0 0 0 .85rem transparent; }
  100% { box-shadow: 0 8px 22px rgba(37, 211, 102, .35), 0 0 0 0 transparent; }
}
/* X acima do balão (fundo escuro da agenda: X claro). Área de toque de 40 px. */
.whatsapp-float__fechar {
  order: -1; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; margin: 0 -.35rem -.15rem 0; padding: 0;
  border: 0; background: none; color: #e6edf7; cursor: pointer; transition: color .2s ease, transform .2s ease;
}
.whatsapp-float__fechar:hover { color: #ffffff; transform: scale(1.15); }
.whatsapp-float__fechar svg { width: .9rem; height: .9rem; }

/* páginas dos links do e-mail (cancelar, convidados) */
.centro { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.centro .lead { font-size: 1.05rem; color: var(--titulo); margin: 0; }
.centro p { margin: 0; max-width: 520px; }
.centro form { align-items: center; max-width: none; }
.centro .btn { align-self: center; }
.nota-centro, .centro .nota { border: 0; padding: 0; font-size: 14px; }
.chips-lista { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chips-lista li { background: var(--suave); border-radius: 999px; padding: 4px 12px; font-size: 14px; }

@container card (max-width: 760px) {
  .livro-grade { grid-template-columns: 1fr; }
  .lateral { border-right: 0; border-bottom: 1px solid var(--borda); padding: 20px; }
  .principal { padding: 20px; }
  .cal-grade { grid-template-columns: 1fr; }
}
@container card (max-width: 520px) {
  /* horários em grade no celular: a lista de 12 botões, um por linha, obrigava a rolar muito */
  .slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .slots .dia-escolhido, .slots .turno, .slots .vazio { grid-column: 1 / -1; }
  .slot { padding: 11px 4px; }
  form .btn#enviar { align-self: stretch; }
}
@media (max-width: 680px) {
  .wrap { padding-bottom: 96px; } /* espaço para o balão do WhatsApp não cobrir o fim do formulário */
  .card { padding: 20px 16px; border-radius: 14px; }
  .opcao { min-height: 0; padding: 22px 18px; }
  /* 16 px: abaixo disso o Safari do iPhone dá zoom sozinho ao tocar no campo */
  .campo input, .campo textarea, .chamado-linha input { font-size: 16px; }
  .whatsapp-float { right: .85rem; bottom: .85rem; }
  .whatsapp-float__texto { display: none; }
  .whatsapp-float__link { padding: .8rem; border-radius: 50%; }
  .opcoes { grid-template-columns: 1fr; }
  .marca span { display: none; }
  h1 { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .whatsapp-float__link { animation: none; }
  .opcao:hover, .opcao:focus-visible { transform: none; }
}
