/* =====================================================================
   Visitas de Oração · no espírito do Karaoque
   Cores quentes, letras grandes, cantos redondos, tom de festa em família
   ===================================================================== */

:root {
  --fundo: #1d1842;
  --fundo-2: #272060;
  --fundo-3: #332a78;
  --borda: #473d93;
  --texto: #fff8ec;
  --mut: #cfc8ee;
  --amarelo: #ffd23f;
  --coral: #ff7a66;
  --azul: #6fd0f5;
  --verde: #3ddc84;
  --perigo: #ff9d8f;
  --em: var(--amarelo);
  --no-botao: #1d1842;
  --sombra: 0 8px 0 rgba(0, 0, 0, .28);
  --raio: 22px;
  --display: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --corpo: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --fundo: #fff6e5;
    --fundo-2: #ffffff;
    --fundo-3: #fff0cf;
    --borda: #e9d9b4;
    --texto: #1d1842;
    --mut: #4f4873;
    --amarelo: #ffd23f;
    --coral: #ff7a66;
    --azul: #1b7fb0;
    --verde: #1faa59;
    --perigo: #b42318;
    --em: #b43d1f;
    --sombra: 0 6px 0 rgba(29, 24, 66, .12);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 110% -10%, color-mix(in srgb, var(--coral) 22%, transparent), transparent 60%),
    radial-gradient(900px 500px at -20% 10%, color-mix(in srgb, var(--azul) 16%, transparent), transparent 60%),
    var(--fundo);
  background-attachment: fixed;
  color: var(--texto);
  font-family: var(--corpo);
  font-size: 1.125rem;
  line-height: 1.55;
}

main {
  width: min(680px, 100% - 32px);
  margin: 0 auto;
  padding-bottom: 32px;
}
main:focus { outline: none; }

a { color: var(--azul); text-underline-offset: 3px; }

em {
  font-style: normal;
  color: var(--em);
}

h1, h2 { font-family: var(--display); line-height: 1.1; margin: 0; }

:focus-visible {
  outline: 4px solid var(--amarelo);
  outline-offset: 3px;
  border-radius: 10px;
}

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.pular {
  position: absolute; left: 12px; top: -80px; z-index: 10;
  background: var(--amarelo); color: #1d1842; font-weight: 800;
  padding: 12px 18px; border-radius: 12px; text-decoration: none;
}
.pular:focus { top: 12px; }

code {
  background: var(--fundo-3); padding: 2px 6px; border-radius: 6px; font-size: .95em;
}

/* ------------------------------ Topo ------------------------------ */

.topo {
  width: min(680px, 100% - 32px);
  margin: 0 auto;
  padding: 20px 0 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.logo {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  text-decoration: none;
  color: var(--texto);
}
.logo-nome {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1.1;
}
.logo-balao {
  position: relative;
  margin-top: -10px;
  background: var(--amarelo);
  color: #1d1842;
  font-weight: 800;
  font-size: .78rem;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
  transform: rotate(-4deg);
}
.logo-balao::after {
  content: "";
  position: absolute;
  left: 10px; bottom: -6px;
  border: 7px solid transparent;
  border-top-color: var(--amarelo);
  border-bottom: 0;
}

.menu { display: flex; gap: 6px; flex-wrap: wrap; }
.menu a {
  color: var(--mut);
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  padding: 10px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}
.menu a:hover { color: var(--texto); background: var(--fundo-2); }
.menu a[aria-current] { color: var(--no-botao); background: var(--amarelo); }
@media (prefers-color-scheme: light) {
  .menu a[aria-current] { color: #1d1842; }
}

/* ------------------------------ Avisos ------------------------------ */

.avisos {
  width: min(680px, 100% - 32px);
  margin: 0 auto;
}
.aviso {
  margin: 12px 0;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 800;
  background: color-mix(in srgb, var(--verde) 20%, var(--fundo-2));
  border: 2px solid var(--verde);
}
.aviso-erro {
  background: color-mix(in srgb, var(--coral) 18%, var(--fundo-2));
  border-color: var(--coral);
}
.avisos .aviso { animation: entrar .35s ease-out; }

/* ------------------------------ Visita ------------------------------ */

.visita {
  margin-top: 16px;
  background: var(--fundo-2);
  border: 2px solid var(--borda);
  border-radius: var(--raio);
  padding: 24px 22px 26px;
  box-shadow: var(--sombra);
}
.visita-cancelada .visita-data,
.visita-cancelada .visita-casa { text-decoration: line-through; text-decoration-thickness: 3px; opacity: .75; }

.visita-topo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.selo {
  display: inline-block;
  background: var(--amarelo);
  color: #1d1842;
  font-weight: 800;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 5px 12px;
  border-radius: 999px;
}
.selo-coral { background: var(--coral); }
.selo-apagado { background: var(--fundo-3); color: var(--mut); }
.selo-mini { font-size: .7rem; padding: 3px 8px; }

.quando {
  font-weight: 800;
  color: var(--mut);
}

.visita-data {
  font-size: clamp(2rem, 8vw, 2.9rem);
  font-weight: 800;
}
.visita-data em { display: inline-block; }

.visita-casa {
  font-family: var(--display);
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  font-weight: 600;
  margin: 8px 0 18px;
  line-height: 1.2;
}

.detalhes {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.detalhes li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.detalhe-icone {
  flex: 0 0 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--fundo-3);
  border-radius: 12px;
  font-size: 1.1rem;
}
.detalhes li > span:last-child { padding-top: 4px; }

.recado {
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--fundo-3);
  border-left: 6px solid var(--amarelo);
  border-radius: 14px;
}
.recado-titulo {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--mut);
  margin-bottom: 4px;
}
.recado p { margin: 0; }

/* ------------------------------ Botões ------------------------------ */

.botoes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.botoes-centro { justify-content: center; }

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 16px;
  border: 3px solid transparent;
  font-family: var(--corpo);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .25);
}
.botao:hover { transform: translateY(-2px); }
.botao:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }

.botao-amarelo { background: var(--amarelo); color: #1d1842; }
.botao-coral { background: var(--coral); color: #1d1842; }
.botao-whats { background: var(--verde); color: #0d2b18; }
.botao-contorno {
  background: transparent;
  color: var(--texto);
  border-color: var(--borda);
  box-shadow: none;
}
.botao-contorno:hover { border-color: var(--amarelo); }
.botao-perigo {
  background: transparent;
  color: var(--perigo);
  border-color: currentColor;
  box-shadow: none;
}
.botao-grande {
  width: 100%;
  min-height: 60px;
  font-size: 1.25rem;
  font-family: var(--display);
}

.botao-texto {
  background: none;
  border: 0;
  padding: 10px 8px;
  min-height: 44px;
  color: var(--azul);
  font: inherit;
  font-size: .95rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.form-mini { display: inline; margin: 0; }

/* ------------------------------ Blocos ------------------------------ */

.bloco {
  margin-top: 28px;
}
.bloco-titulo {
  font-size: clamp(1.6rem, 6vw, 2rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.bloco-sub { color: var(--mut); margin: -4px 0 16px; }

.bloco-destaque {
  background: var(--fundo-2);
  border: 3px dashed var(--coral);
  border-radius: var(--raio);
  padding: 22px;
}
.bloco-lider {
  border-top: 2px dashed var(--borda);
  padding-top: 20px;
}
.bloco-estreito { max-width: 520px; }

.titulo-pagina {
  font-size: clamp(2rem, 8vw, 2.6rem);
  font-weight: 800;
  margin: 20px 0 16px;
}
.titulo-com-acao {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.voltar { margin: 16px 0 0; }
.voltar a { font-weight: 800; text-decoration: none; }
.voltar a:hover { text-decoration: underline; }

.vazio { color: var(--mut); font-weight: 600; }

.vazio-grande {
  text-align: center;
  padding: 48px 12px;
}
.vazio-grande .bloco-sub { margin: 12px auto 24px; max-width: 420px; }
.vazio-emoji { font-size: 4rem; margin: 0 0 8px; animation: balanco 3s ease-in-out infinite; }

.link-visita {
  margin: 14px 0 0;
  font-size: .9rem;
  color: var(--mut);
  overflow-wrap: anywhere;
}
.link-visita span { font-weight: 800; color: var(--texto); }

.dica { color: var(--mut); margin-top: 28px; }

/* ------------------------------ Pessoas ------------------------------ */

.lista-pessoas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pessoa {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--fundo-2);
  border: 2px solid var(--borda);
  border-radius: 16px;
  padding: 8px 10px 8px 8px;
  animation: entrar .3s ease-out both;
}
.pessoa-eu { border-color: var(--amarelo); }
.pessoa-nome {
  flex: 1;
  font-weight: 800;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}
.pessoa-nome small { font-weight: 600; color: var(--mut); }
.pessoa-inst { display: block; }

.avatar {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  color: #1d1842;
}
.c1 { background: var(--amarelo); }
.c2 { background: var(--coral); }
.c3 { background: #9ee3ff; }
.c4 { background: #b9f5c9; }

/* ------------------------------ Formulários ------------------------------ */

.form { display: grid; gap: 16px; }
.campo { display: grid; gap: 6px; }
.campo label { font-weight: 800; }
.opcional { font-weight: 600; color: var(--mut); }
.ajuda { margin: 0; font-size: .92rem; color: var(--mut); }

.campo input[type="text"],
.campo input[type="password"],
.campo input[type="date"],
.campo input[type="time"],
.campo textarea {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 3px solid var(--borda);
  background: var(--fundo);
  color: var(--texto);
  font: inherit;
  font-size: 1.15rem;
}
.campo textarea { resize: vertical; min-height: 110px; }
.campo input::placeholder, .campo textarea::placeholder { color: var(--mut); opacity: .7; }
.campo input:focus, .campo textarea:focus {
  border-color: var(--amarelo);
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--amarelo) 35%, transparent);
}

.campos-lado { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.campo-check {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--fundo-3);
  border-radius: 14px;
  padding: 14px 16px;
}
.campo-check input { width: 26px; height: 26px; accent-color: var(--coral); margin: 0; }
.campo-check label { cursor: pointer; }

.isca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------ Lista de visitas ------------------------------ */

.lista-visitas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.cartao-visita {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 12px;
  background: var(--fundo-2);
  border: 2px solid var(--borda);
  border-radius: 18px;
  color: var(--texto);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.cartao-visita:hover { border-color: var(--amarelo); transform: translateY(-2px); }
.cartao-cancelado .cartao-casa { text-decoration: line-through; opacity: .7; }

.calendario {
  flex: 0 0 60px;
  height: 64px;
  border-radius: 14px;
  background: var(--amarelo);
  color: #1d1842;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1;
}
.calendario b { font-family: var(--display); font-size: 1.7rem; }
.calendario span { font-weight: 800; text-transform: uppercase; font-size: .8rem; letter-spacing: .06em; }

.cartao-texto { flex: 1; min-width: 0; display: grid; }
.cartao-casa { font-weight: 800; font-size: 1.1rem; overflow-wrap: anywhere; }
.cartao-info { color: var(--mut); font-size: .95rem; }

.cartao-contagem { text-align: center; line-height: 1.1; }
.cartao-contagem b { display: block; font-family: var(--display); font-size: 1.5rem; color: var(--em); }
.cartao-contagem small { color: var(--mut); font-weight: 700; }

/* ------------------------------ Histórico ------------------------------ */

.filtro { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filtro a {
  padding: 8px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 2px solid var(--borda);
  color: var(--texto);
  font-weight: 800;
  text-decoration: none;
}
.filtro a[aria-current] { background: var(--amarelo); border-color: var(--amarelo); color: #1d1842; }

.numeros {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 22px;
}
.numeros div {
  background: var(--fundo-2);
  border: 2px solid var(--borda);
  border-radius: 18px;
  padding: 14px 8px;
  text-align: center;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
}
.numeros dd { margin: 0; font-family: var(--display); font-weight: 800; font-size: 2.1rem; line-height: 1; color: var(--em); }
.numeros dt { color: var(--mut); font-weight: 700; font-size: .9rem; margin-top: 4px; }

/* ------------------------------ Rodapé ------------------------------ */

.rodape {
  width: min(680px, 100% - 32px);
  margin: 24px auto 0;
  padding: 24px 0 40px;
  border-top: 2px dashed var(--borda);
  text-align: center;
  color: var(--mut);
  font-size: .95rem;
}
.rodape span { display: block; font-weight: 800; margin-top: 4px; }

/* ------------------------------ Animações ------------------------------ */

@keyframes entrar {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes balanco {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

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

@media (max-width: 420px) {
  .visita { padding: 20px 16px 22px; }
  .bloco-destaque { padding: 18px 16px; }
  .botoes .botao { flex: 1 1 100%; }
  .logo-nome { font-size: 1.35rem; }
  .numeros dd { font-size: 1.7rem; }
}

@media print {
  body { background: #fff; color: #000; }
  .menu, .botoes, .bloco-destaque, .bloco-lider, .form-mini, .pular { display: none !important; }
}
