/* Agenda Aptto — visual neon. Servido como /static/app.<hash>.css (hash do conteúdo). */
:root {
  --fundo: #050A18;
  --ciano: #00E5FF;
  --azul: #3B82F6;
  --violeta: #7C5CFF;
  --texto: #E6F1FF;
  --texto-2: #A9BDE0;
  --texto-3: #93A6C9;
  --ouro: #FFC94D; /* só para a coroa (etapa futura) */
  --perigo: #FF8FA3;
  --vidro: rgba(10, 21, 48, .72);
  --borda: rgba(0, 229, 255, .22);
  --titulo: 'Orbitron', 'Space Grotesk', system-ui, sans-serif;
  --corpo: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html {
  background-color: var(--fundo);
  background-image:
    radial-gradient(60% 50% at 12% 0%, rgba(59, 130, 246, .24), transparent 70%),
    radial-gradient(50% 45% at 92% 8%, rgba(124, 92, 255, .22), transparent 70%),
    radial-gradient(70% 50% at 50% 110%, rgba(0, 229, 255, .10), transparent 70%);
  background-attachment: fixed;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--corpo);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--texto);
  overflow-x: hidden;
  overflow-wrap: break-word;
}

/* Grade fina ciano deslizando devagar */
body::before {
  content: '';
  position: fixed;
  inset: -48px;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 85%);
  animation: grade-desliza 28s linear infinite;
}
@keyframes grade-desliza { to { transform: translate3d(48px, 48px, 0); } }

h1, h2, h3 {
  font-family: var(--titulo);
  letter-spacing: .08em;
  line-height: 1.25;
  margin: 0 0 .6em;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(1.25rem, 4.5vw, 1.7rem); font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; color: var(--ciano); }
p { margin: 0 0 1em; }
a { color: var(--ciano); }
.sec { color: var(--texto-2); }
.sec-3 { color: var(--texto-3); font-size: .9rem; }
.num { font-family: var(--titulo); letter-spacing: .06em; }

:focus-visible { outline: 2px solid var(--ciano); outline-offset: 3px; }

/* Cabeçalho */
.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 5;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  background: rgba(5, 10, 24, .78);
  border-bottom: 1px solid var(--borda);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.topo-usuario { display: flex; align-items: center; gap: 12px; min-width: 0; margin-left: auto; }
.topo-usuario span { color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo form { margin: 0; }

/* Logomarca: imagem se existir public/logo.svg|png; senão hexágono + texto */
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texto); min-height: 44px; }
.marca svg { width: 36px; height: 36px; flex: none; filter: drop-shadow(0 0 8px rgba(0, 229, 255, .6)); }
.marca-texto { font-family: var(--titulo); font-weight: 700; font-size: .95rem; letter-spacing: .22em; }
.marca img { height: 40px; width: auto; max-width: 200px; display: block; }
.marca.grande { flex-direction: column; gap: 14px; }
.marca.grande svg { width: 64px; height: 64px; }
.marca.grande .marca-texto { font-size: 1.15rem; }
.marca.grande img { height: 72px; max-width: 240px; }

.conteudo { width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); flex: 1; }
.centro { display: grid; place-items: center; }
.centro > .cartao { width: 100%; max-width: 460px; }

/* Cartão de vidro escuro */
.cartao {
  background: var(--vidro);
  border: 1px solid var(--borda);
  border-radius: 22px;
  padding: 22px;
  margin-bottom: 20px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.cartao > :last-child { margin-bottom: 0; }

/* Cartão de login com anel de gradiente cônico girando */
.anel {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 2px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 0 44px rgba(0, 229, 255, .16), 0 0 90px rgba(124, 92, 255, .14);
}
.anel::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 200%;
  aspect-ratio: 1;
  margin: -100% 0 0 -100%;
  background: conic-gradient(from 0deg, transparent 0 20%, var(--ciano) 32%, var(--azul) 45%, var(--violeta) 58%, transparent 72% 100%);
  animation: anel-gira 6s linear infinite;
}
@keyframes anel-gira { to { transform: rotate(1turn); } }
.anel > .cartao {
  position: relative;
  margin: 0;
  border: 0;
  border-radius: 24px;
  background: rgba(8, 16, 38, .96);
  padding: 30px 24px;
}
.login-topo { text-align: center; margin-bottom: 22px; }

/* Formulários */
.campo { display: block; margin-bottom: 16px; }
.campo > span { display: block; margin-bottom: 6px; color: var(--texto-2); font-size: .9rem; letter-spacing: .04em; }
.campo small { display: block; margin-top: 6px; color: var(--texto-3); }
input[type=text], input[type=password], input[type=tel], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  font-size: max(16px, 1rem);
  color: var(--texto);
  background: rgba(5, 10, 24, .7);
  border: 1px solid rgba(0, 229, 255, .28);
  border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--texto-3); }
textarea { display: block; min-height: 96px; resize: vertical; line-height: 1.4; }
select { cursor: pointer; }
select option { color: var(--texto); background: #0A1530; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ciano); box-shadow: 0 0 0 3px rgba(0, 229, 255, .2), 0 0 18px rgba(0, 229, 255, .25); }
.linha { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* Botões: sobem 2px com brilho ciano; ao clicar, pressionam e soltam uma onda de luz */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  font-family: var(--corpo);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--texto);
  background: rgba(0, 229, 255, .08);
  border: 1px solid rgba(0, 229, 255, .45);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .55) 0%, rgba(0, 229, 255, .35) 35%, transparent 65%);
  transform: translate(-50%, -50%) scale(1.6);
  opacity: 0;
  pointer-events: none;
  transition: transform .6s ease-out, opacity .75s ease-out;
}
@media (hover: hover) { .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0, 229, 255, .35), 0 0 0 1px rgba(0, 229, 255, .5); } }
.btn:active { transform: translateY(0) scale(.96); transition-duration: .06s; }
.btn:active::after { transform: translate(-50%, -50%) scale(0); opacity: 1; transition: none; }
.btn.principal {
  width: 100%;
  min-height: 50px;
  border: 0;
  color: #04101F;
  font-family: var(--titulo);
  letter-spacing: .16em;
  text-transform: uppercase;
  background: linear-gradient(100deg, var(--ciano), var(--azul) 55%, var(--violeta));
  animation: pulso 2.6s ease-in-out infinite;
}
@keyframes pulso {
  0%, 100% { box-shadow: 0 0 14px rgba(0, 229, 255, .35), 0 0 0 0 rgba(124, 92, 255, .0); }
  50% { box-shadow: 0 0 30px rgba(0, 229, 255, .7), 0 0 54px rgba(124, 92, 255, .4); }
}
.btn.compacto { width: auto; }
.btn.perigo { border-color: rgba(255, 143, 163, .55); background: rgba(255, 143, 163, .08); }
.btn.fantasma { background: transparent; }

/* Avisos */
.aviso { border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid; overflow-wrap: anywhere; }
.aviso.erro { color: #FFD3DA; background: rgba(255, 143, 163, .1); border-color: rgba(255, 143, 163, .5); }
.aviso.ok { color: #C9FBFF; background: rgba(0, 229, 255, .08); border-color: rgba(0, 229, 255, .45); }
.provisoria { border-color: var(--ciano); box-shadow: 0 0 30px rgba(0, 229, 255, .22); }
.provisoria code {
  display: block;
  margin: 10px 0;
  padding: 14px;
  font-family: var(--titulo);
  font-size: clamp(1rem, 4.6vw, 1.35rem);
  letter-spacing: .1em;
  color: var(--ciano);
  background: rgba(5, 10, 24, .8);
  border: 1px dashed rgba(0, 229, 255, .5);
  border-radius: 12px;
  text-align: center;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}

/* Lista de usuários (cartões, sem tabela: não gera rolagem lateral no celular) */
.usuarios { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.usuario {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(5, 10, 24, .55);
  border: 1px solid rgba(0, 229, 255, .16);
  border-radius: 18px;
}
.usuario.inativo { opacity: .78; border-style: dashed; }
.usuario-dados { min-width: 0; flex: 1 1 220px; }
.usuario-dados strong { display: block; overflow-wrap: anywhere; }
.usuario-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.usuario-acoes form { margin: 0; }
.selo {
  display: inline-block;
  padding: 2px 10px;
  margin-right: 6px;
  font-family: var(--titulo);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--texto-2);
}
.selo.admin { color: #B3A1FF; }
.selo.ativo { color: var(--ciano); }
.selo.inativo { color: var(--perigo); }

/* ---------- Painel do parceiro: calendário semanal ---------- */
.conteudo.largo { max-width: 1240px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.agenda { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.agenda > .cartao { margin-bottom: 0; min-width: 0; }
.agenda + .cartao { margin-top: 20px; }

.semana-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.semana-topo h2 { margin: 0; text-align: center; font-size: .95rem; }
.btn.seta { min-width: 44px; padding: 6px 12px; font-size: 1.4rem; line-height: 1; }
.btn.desligado { opacity: .3; pointer-events: none; }

/* A grade rola na horizontal dentro do próprio cartão; a coluna dos horários fica presa à esquerda. */
.grade-rolagem { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border-radius: 14px; margin-bottom: 14px; scrollbar-color: rgba(0, 229, 255, .4) transparent; }
.grade { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.grade th { font-weight: 500; color: var(--texto-2); }
.grade thead th { padding: 4px 0 6px; }
.grade th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 62px;
  font-family: var(--titulo);
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--ciano);
  background: #0A1530;
  border-radius: 10px;
  box-shadow: 6px 0 10px -4px rgba(5, 10, 24, .9);
}
.dia-nome { display: block; font-family: var(--titulo); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ciano); }
.dia-data { display: block; font-size: .82rem; }
abbr.dia-nome { text-decoration: none; cursor: default; }
/* Etapa 3B: coluna de hoje / de amanhã */
.dia-marca {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 8px;
  border-radius: 999px;
  font-family: var(--titulo);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: #04101F;
  background: var(--ciano);
  box-shadow: 0 0 12px rgba(0, 229, 255, .5);
  vertical-align: middle;
}
.grade thead th.dia-marcado { border-radius: 10px; background: rgba(0, 229, 255, .08); }
h2 .dia-marca { margin: 0 0 0 6px; font-size: .68rem; }
.grade td { padding: 0; }

.vaga {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 4px 6px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .03em;
  text-align: center;
  text-decoration: none;
  animation: vaga-entra .45s ease-out both;
}
@keyframes vaga-entra { from { opacity: 0; transform: translateY(6px); } }
.grade tr:nth-child(2) .vaga { animation-delay: .03s; }
.grade tr:nth-child(3) .vaga { animation-delay: .06s; }
.grade tr:nth-child(4) .vaga { animation-delay: .09s; }
.grade tr:nth-child(5) .vaga { animation-delay: .12s; }
.grade tr:nth-child(6) .vaga { animation-delay: .15s; }
.grade tr:nth-child(7) .vaga { animation-delay: .18s; }
.grade tr:nth-child(8) .vaga { animation-delay: .21s; }

/* Livre: borda ciano tracejada; sobe e brilha ao passar o mouse; ao clicar, pressiona e solta uma onda */
.vaga.livre {
  color: var(--ciano);
  border: 1px dashed rgba(0, 229, 255, .6);
  background: rgba(0, 229, 255, .04);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.vaga.livre::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 160%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .6) 0%, rgba(0, 229, 255, .4) 35%, transparent 65%);
  transform: translate(-50%, -50%) scale(1.6);
  opacity: 0;
  pointer-events: none;
  transition: transform .6s ease-out, opacity .75s ease-out;
}
.vaga.livre:focus-visible { transform: translateY(-3px); background: rgba(0, 229, 255, .14); box-shadow: 0 6px 20px rgba(0, 229, 255, .4), 0 0 0 1px rgba(0, 229, 255, .6); }
@media (hover: hover) { .vaga.livre:hover { transform: translateY(-3px); background: rgba(0, 229, 255, .14); box-shadow: 0 6px 20px rgba(0, 229, 255, .4), 0 0 0 1px rgba(0, 229, 255, .6); } }
.vaga.livre:active { transform: translateY(0) scale(.94); transition-duration: .06s; }
.vaga.livre:active::after { transform: translate(-50%, -50%) scale(0); opacity: 1; transition: none; }

/* Selecionado: preenchimento ciano neon pulsando */
.vaga.selecionado {
  color: #04101F;
  font-weight: 700;
  background: linear-gradient(135deg, #7DF3FF, var(--ciano));
  border-color: #B8F8FF;
  animation: vaga-entra .45s ease-out both, selecionado-brilha 1.8s ease-in-out infinite;
}
@keyframes selecionado-brilha {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 229, 255, .55); }
  50% { box-shadow: 0 0 26px rgba(0, 229, 255, .95), 0 0 46px rgba(0, 229, 255, .4); }
}

/* Ocupado (de outro parceiro): listrado cinza-azulado, sem nenhum dado */
.vaga.ocupado {
  color: var(--texto-3);
  border-color: rgba(147, 166, 201, .25);
  background: repeating-linear-gradient(135deg, rgba(147, 166, 201, .16) 0 6px, rgba(147, 166, 201, .05) 6px 12px);
}

/* Meu: gradiente azul para violeta com o nome da loja */
.vaga.meu { color: #fff; font-weight: 700; background: linear-gradient(120deg, var(--azul), var(--violeta)); box-shadow: 0 0 14px rgba(124, 92, 255, .4); }
.vaga.meu > span { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; line-height: 1.2; }

/* Indisponível: hoje, dias passados e além do limite */
.vaga.indisponivel { color: var(--texto-3); background: rgba(147, 166, 201, .04); opacity: .4; }

.legenda { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 10px; padding: 0; font-size: .85rem; color: var(--texto-2); }
.legenda li { display: inline-flex; align-items: center; gap: 6px; }
.legenda .vaga { min-height: 0; width: 22px; height: 16px; padding: 0; border-radius: 5px; animation: none; box-shadow: none; pointer-events: none; }

/* Formulário "Novo agendamento" */
.novo { scroll-margin-top: 12px; }
.novo:target { border-color: var(--ciano); box-shadow: 0 0 34px rgba(0, 229, 255, .22), 0 10px 40px rgba(0, 0, 0, .35); }
.escolhido {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--ciano);
  background: rgba(0, 229, 255, .1);
  box-shadow: 0 0 18px rgba(0, 229, 255, .2);
}
.escolhido-dia { text-transform: capitalize; }
.escolhido-hora { font-size: 1.15rem; font-weight: 700; color: var(--ciano); }
.escolhido.vazio { border: 1px dashed rgba(0, 229, 255, .35); background: none; box-shadow: none; color: var(--texto-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; animation: none; transform: none; box-shadow: none; }

/* Meus agendamentos */
.agendamentos { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.agendamento {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 16px;
  background: rgba(5, 10, 24, .55);
  border: 1px solid rgba(124, 92, 255, .35);
  border-radius: 18px;
}
.agendamento-quando { flex: none; min-width: 132px; display: flex; flex-direction: column; }
/* Etapa 3B: horário combinado, responsável em destaque e observação */
.combinado { margin-top: 4px; font-size: .86rem; color: var(--ouro); }
.combinado .num { font-size: 1rem; font-weight: 700; color: var(--ouro); }
.responsavel { color: var(--texto-2); }
.responsavel strong { color: var(--ciano); font-size: 1.05rem; text-shadow: 0 0 12px rgba(0, 229, 255, .35); }
.obs { margin: 4px 0; padding: 8px 10px; border-left: 3px solid var(--violeta); border-radius: 0 10px 10px 0; background: rgba(124, 92, 255, .1); color: var(--texto-2); white-space: pre-line; }
.obs-rotulo { color: var(--texto-3); font-size: .86rem; }
.confirmacao strong { display: block; margin-bottom: 4px; }
.confirmacao span { display: block; }
.semana-topo.meses { flex-wrap: wrap; }
.semana-topo.meses .btn { font-size: .86rem; }
.agendamento-quando .num { font-size: 1.2rem; font-weight: 700; color: var(--ciano); }
.agendamento-dados { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.agendamento-acoes { flex: none; }
.agendamento-acoes form { margin: 8px 0 0; }
.confirmar > summary { list-style: none; }
.confirmar > summary::-webkit-details-marker { display: none; }
.confirmar[open] > summary { opacity: .6; }
.btn.cheio { background: rgba(255, 143, 163, .28); }

@media (min-width: 961px) {
  .agenda { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* ---------- Etapa 4: menu do admin, campeão, números, visitas, ranking e gráficos ---------- */
.menu { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; }
.menu-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  font-family: var(--titulo);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--texto-2);
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
@media (hover: hover) { .menu-link:hover { color: var(--ciano); background: rgba(0, 229, 255, .1); box-shadow: 0 0 18px rgba(0, 229, 255, .25); transform: translateY(-2px); } }
.menu-link:active { transform: scale(.96); }

/* Faixa do campeão: anel de gradiente cônico girando, coroa flutuando, iniciais brilhando, nome com brilho deslizante */
.campeao {
  position: relative;
  overflow: hidden;
  padding: 2px;
  margin-bottom: 20px;
  border-radius: 24px;
  box-shadow: 0 0 40px rgba(255, 201, 77, .16), 0 0 80px rgba(124, 92, 255, .14);
}
.campeao::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 200%;
  aspect-ratio: 1;
  margin: -100% 0 0 -100%;
  background: conic-gradient(from 0deg, transparent 0 12%, var(--ouro) 22%, var(--ciano) 36%, var(--azul) 50%, var(--violeta) 64%, transparent 76% 100%);
  animation: anel-gira 7s linear infinite;
}
.campeao-dentro {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 24px 20px;
  border-radius: 22px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 201, 77, .12), transparent 55%), rgba(8, 16, 38, .96);
}
.campeao-avatar { position: relative; flex: none; width: 76px; height: 76px; margin-top: 14px; }
.iniciais {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  font-family: var(--titulo);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: .04em;
  color: #04101F;
  background: linear-gradient(135deg, var(--ciano), var(--azul) 55%, var(--violeta));
  animation: iniciais-brilham 2.4s ease-in-out infinite;
}
@keyframes iniciais-brilham {
  0%, 100% { box-shadow: 0 0 14px rgba(0, 229, 255, .45), 0 0 0 3px rgba(255, 201, 77, .5); }
  50% { box-shadow: 0 0 34px rgba(0, 229, 255, .9), 0 0 56px rgba(124, 92, 255, .5), 0 0 0 3px rgba(255, 201, 77, .95); }
}
.coroa { fill: var(--ouro); filter: drop-shadow(0 0 8px rgba(255, 201, 77, .8)); }
.campeao-avatar .coroa { position: absolute; left: 50%; top: -30px; width: 46px; margin-left: -23px; animation: coroa-flutua 2.8s ease-in-out infinite; }
@keyframes coroa-flutua {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-7px) rotate(5deg); }
}
.campeao-texto { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.campeao-titulo { font-family: var(--titulo); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ouro); }
.campeao-nome {
  font-family: var(--titulo);
  font-size: clamp(1.15rem, 4.4vw, 1.7rem);
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  color: var(--texto);
  background: linear-gradient(100deg, var(--texto) 0 38%, #fff 46%, var(--ouro) 50%, #fff 54%, var(--texto) 62% 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brilho-desliza 3.6s linear infinite;
}
@keyframes brilho-desliza { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.campeao-numeros { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--texto-2); }
.campeao-numeros b { font-size: 1.2rem; color: var(--ciano); margin-right: 4px; }
.campeao.vazio { box-shadow: none; }
.campeao.vazio .iniciais { background: rgba(147, 166, 201, .18); color: var(--texto-3); animation: none; box-shadow: 0 0 0 2px rgba(147, 166, 201, .3); }
.campeao.vazio .campeao-nome { font-size: clamp(1rem, 3.8vw, 1.25rem); }

/* Cartões de número */
.numeros { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 136px), 1fr)); margin-bottom: 20px; }
.cartao .numeros { margin-bottom: 0; }
.numero {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--borda);
  background: var(--vidro);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: vaga-entra .5s ease-out both;
}
.numero:nth-child(2) { animation-delay: .08s; }
.numero:nth-child(3) { animation-delay: .16s; }
.numero:nth-child(4) { animation-delay: .24s; }
.cartao .numero { background: rgba(5, 10, 24, .55); }
.numero-valor { font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 700; line-height: 1.1; color: var(--ciano); text-shadow: 0 0 18px rgba(0, 229, 255, .45); }
.numero-rotulo { color: var(--texto-2); font-size: .9rem; }

/* Filtros por link */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.chips-rotulo { font-family: var(--titulo); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--texto-3); min-width: 74px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, .3);
  color: var(--texto-2);
  font-size: .88rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
@media (hover: hover) { .chip:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 229, 255, .3); background: rgba(0, 229, 255, .1); } }
.chip:active { transform: scale(.95); }
.chip.ativo { color: #04101F; font-weight: 700; background: var(--ciano); border-color: var(--ciano); box-shadow: 0 0 16px rgba(0, 229, 255, .5); }

/* Visitas do dia (admin) */
.visita {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  padding: 14px 16px;
  background: rgba(5, 10, 24, .55);
  border: 1px solid rgba(0, 229, 255, .2);
  border-radius: 18px;
}
.visita.s-cancelado { opacity: .6; border-style: dashed; }
.visita-acoes { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.visita-acoes .confirmar:last-child { margin-left: auto; } /* Cancelar fica longe dos botões de resultado */
.visita-acoes form { margin: 8px 0 0; }
.btn.cheio:not(.perigo) { background: rgba(0, 229, 255, .28); }
.selo.s-agendado { color: var(--ciano); }
.selo.s-fechou { color: #7DFFB2; }
.selo.s-nao_fechou { color: var(--texto-2); }
.selo.s-loja_faltou { color: var(--ouro); }
.selo.s-cancelado { color: var(--perigo); }

/* Mini barras "próximos dias" */
.grafico.mini { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); height: auto; gap: 8px; padding: 0; align-items: stretch; }
.mini-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 2px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--texto);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
@media (hover: hover) { .mini-col:hover { transform: translateY(-2px); background: rgba(0, 229, 255, .08); box-shadow: 0 6px 18px rgba(0, 229, 255, .25); } }
.mini-col:active { transform: scale(.96); }
.mini-col.ativo { border-color: rgba(0, 229, 255, .5); background: rgba(0, 229, 255, .06); }
.mini-n { font-weight: 700; color: var(--ciano); }
.mini-trilho { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 64px; border-bottom: 1px solid rgba(0, 229, 255, .25); }
.mini-trilho .barra { flex: 0 1 26px; }
.mini-col:nth-child(2) .barra { animation-delay: .08s; }
.mini-col:nth-child(3) .barra { animation-delay: .16s; }
.mini-col:nth-child(4) .barra { animation-delay: .24s; }
.mini-col:nth-child(5) .barra { animation-delay: .32s; }
.mini-col:nth-child(6) .barra { animation-delay: .4s; }
.dupla-dia { font-size: .72rem; color: var(--texto-3); text-align: center; white-space: nowrap; }

/* Barras duplas dos últimos 14 dias: agendadas (ciano) e fechadas (violeta) */
.grafico.duplo { height: auto; gap: 4px; padding: 8px 0 0; margin-bottom: 12px; align-items: stretch; }
.dupla-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dupla { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; height: 150px; border-bottom: 1px solid rgba(0, 229, 255, .25); }
.dupla .barra { flex: 0 1 12px; min-width: 4px; }
.barra.ciano { background: linear-gradient(180deg, #7DF3FF, var(--ciano)); box-shadow: 0 0 12px rgba(0, 229, 255, .45); }
.barra.violeta { background: linear-gradient(180deg, #B3A1FF, var(--violeta)); box-shadow: 0 0 12px rgba(124, 92, 255, .5); }
.dupla-col:nth-child(1) .barra.ciano { animation-delay: 0.00s; }
.dupla-col:nth-child(1) .barra.violeta { animation-delay: 0.03s; }
.dupla-col:nth-child(2) .barra.ciano { animation-delay: 0.06s; }
.dupla-col:nth-child(2) .barra.violeta { animation-delay: 0.09s; }
.dupla-col:nth-child(3) .barra.ciano { animation-delay: 0.12s; }
.dupla-col:nth-child(3) .barra.violeta { animation-delay: 0.15s; }
.dupla-col:nth-child(4) .barra.ciano { animation-delay: 0.18s; }
.dupla-col:nth-child(4) .barra.violeta { animation-delay: 0.21s; }
.dupla-col:nth-child(5) .barra.ciano { animation-delay: 0.24s; }
.dupla-col:nth-child(5) .barra.violeta { animation-delay: 0.27s; }
.dupla-col:nth-child(6) .barra.ciano { animation-delay: 0.30s; }
.dupla-col:nth-child(6) .barra.violeta { animation-delay: 0.33s; }
.dupla-col:nth-child(7) .barra.ciano { animation-delay: 0.36s; }
.dupla-col:nth-child(7) .barra.violeta { animation-delay: 0.39s; }
.dupla-col:nth-child(8) .barra.ciano { animation-delay: 0.42s; }
.dupla-col:nth-child(8) .barra.violeta { animation-delay: 0.45s; }
.dupla-col:nth-child(9) .barra.ciano { animation-delay: 0.48s; }
.dupla-col:nth-child(9) .barra.violeta { animation-delay: 0.51s; }
.dupla-col:nth-child(10) .barra.ciano { animation-delay: 0.54s; }
.dupla-col:nth-child(10) .barra.violeta { animation-delay: 0.57s; }
.dupla-col:nth-child(11) .barra.ciano { animation-delay: 0.60s; }
.dupla-col:nth-child(11) .barra.violeta { animation-delay: 0.63s; }
.dupla-col:nth-child(12) .barra.ciano { animation-delay: 0.66s; }
.dupla-col:nth-child(12) .barra.violeta { animation-delay: 0.69s; }
.dupla-col:nth-child(13) .barra.ciano { animation-delay: 0.72s; }
.dupla-col:nth-child(13) .barra.violeta { animation-delay: 0.75s; }
.dupla-col:nth-child(14) .barra.ciano { animation-delay: 0.78s; }
.dupla-col:nth-child(14) .barra.violeta { animation-delay: 0.81s; }
.amostra { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.amostra.ciano { background: var(--ciano); }
.amostra.violeta { background: var(--violeta); }

/* Ranking (só admin): barras horizontais que crescem da esquerda para a direita */
.ranking { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; }
.rank { display: flex; gap: 14px; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(0, 229, 255, .16); background: rgba(5, 10, 24, .55); }
.rank.primeiro { border-color: rgba(255, 201, 77, .6); box-shadow: 0 0 26px rgba(255, 201, 77, .14); }
.rank-pos { flex: none; width: 34px; font-weight: 700; color: var(--texto-3); padding-top: 2px; }
.rank.primeiro .rank-pos { color: var(--ouro); }
.rank-corpo { flex: 1; min-width: 0; }
.rank-nome { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; overflow-wrap: anywhere; }
.rank-link { color: var(--texto); text-decoration: none; display: inline-flex; align-items: center; }
@media (hover: hover) { .rank-link:hover { color: var(--ciano); } }
.rank-nome .coroa { flex: none; width: 26px; animation: coroa-flutua 2.8s ease-in-out infinite; }
.rank-trilho { display: flex; align-items: center; gap: 10px; height: 20px; margin: 2px 0 10px; padding-right: 3.4em; white-space: nowrap; }
.rank-barra {
  flex: none;
  height: 14px;
  min-width: 3px;
  border-radius: 3px 8px 8px 3px;
  background: linear-gradient(90deg, var(--violeta), var(--azul) 45%, var(--ciano));
  box-shadow: 0 0 14px rgba(0, 229, 255, .4);
  transform-origin: left;
  animation: barra-cresce .8s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes barra-cresce { from { transform: scaleX(0); opacity: .2; } }
.rank:nth-child(2) .rank-barra { animation-delay: 0.08s; }
.rank:nth-child(3) .rank-barra { animation-delay: 0.16s; }
.rank:nth-child(4) .rank-barra { animation-delay: 0.24s; }
.rank:nth-child(5) .rank-barra { animation-delay: 0.32s; }
.rank:nth-child(6) .rank-barra { animation-delay: 0.40s; }
.rank:nth-child(7) .rank-barra { animation-delay: 0.48s; }
.rank:nth-child(8) .rank-barra { animation-delay: 0.56s; }
.rank:nth-child(9) .rank-barra { animation-delay: 0.64s; }
.rank:nth-child(10) .rank-barra { animation-delay: 0.72s; }
.rank:nth-child(11) .rank-barra { animation-delay: 0.80s; }
.rank:nth-child(12) .rank-barra { animation-delay: 0.88s; }
.rank:nth-child(n+13) .rank-barra { animation-delay: .96s; }
.rank-valor { font-weight: 700; color: var(--ciano); }
.rank-apoio { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: .85rem; }
.rank-apoio div { display: flex; gap: 6px; }
.rank-apoio dt { color: var(--texto-3); }
.rank-apoio dd { margin: 0; font-weight: 700; }
.w-0 { width: 0%; } .w-5 { width: 5%; } .w-10 { width: 10%; } .w-15 { width: 15%; } .w-20 { width: 20%; } .w-25 { width: 25%; } .w-30 { width: 30%; } .w-35 { width: 35%; } .w-40 { width: 40%; } .w-45 { width: 45%; } .w-50 { width: 50%; } .w-55 { width: 55%; } .w-60 { width: 60%; } .w-65 { width: 65%; } .w-70 { width: 70%; } .w-75 { width: 75%; } .w-80 { width: 80%; } .w-85 { width: 85%; } .w-90 { width: 90%; } .w-95 { width: 95%; } .w-100 { width: 100%; }

@media (max-width: 520px) {
  .semana-topo.meses h2 { order: -1; flex-basis: 100%; }
  .chips-rotulo { flex-basis: 100%; min-width: 0; }
  .dupla { height: 120px; }
  .dupla-dia { font-size: .62rem; }
  .mini-col .dupla-dia { white-space: normal; }
}

/* Barras de gráfico: sobem de baixo para cima, uma depois da outra. A altura vem das classes h-N. */
.grafico { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 8px; }
.barra {
  flex: 1 1 0;
  min-width: 6px;
  height: 50%;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, var(--ciano), var(--azul) 60%, var(--violeta));
  box-shadow: 0 0 14px rgba(0, 229, 255, .35);
  transform-origin: bottom;
  animation: barra-sobe .7s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes barra-sobe { from { transform: scaleY(0); opacity: .2; } }
.barra:nth-child(2) { animation-delay: .07s; }
.barra:nth-child(3) { animation-delay: .14s; }
.barra:nth-child(4) { animation-delay: .21s; }
.barra:nth-child(5) { animation-delay: .28s; }
.barra:nth-child(6) { animation-delay: .35s; }
.barra:nth-child(7) { animation-delay: .42s; }
.barra:nth-child(8) { animation-delay: .49s; }
.barra:nth-child(9) { animation-delay: .56s; }
.barra:nth-child(10) { animation-delay: .63s; }
.barra:nth-child(11) { animation-delay: .7s; }
.barra:nth-child(12) { animation-delay: .77s; }
.barra:nth-child(n+13) { animation-delay: .84s; }
.h-0 { height: 0; } .h-5 { height: 5%; } .h-10 { height: 10%; } .h-15 { height: 15%; }
.h-20 { height: 20%; } .h-25 { height: 25%; } .h-30 { height: 30%; } .h-35 { height: 35%; }
.h-40 { height: 40%; } .h-45 { height: 45%; } .h-50 { height: 50%; } .h-55 { height: 55%; }
.h-60 { height: 60%; } .h-65 { height: 65%; } .h-70 { height: 70%; } .h-75 { height: 75%; }
.h-80 { height: 80%; } .h-85 { height: 85%; } .h-90 { height: 90%; } .h-95 { height: 95%; }
.h-100 { height: 100%; }

/* ---------- Etapa 5: foto, regra do campeão e fechamento do mês ---------- */
/* Miniatura redonda: foto ou iniciais */
.avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ciano), var(--azul) 55%, var(--violeta));
  box-shadow: 0 0 0 2px rgba(0, 229, 255, .45), 0 0 14px rgba(0, 229, 255, .3);
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar b { font-family: var(--titulo); font-size: .8rem; font-weight: 900; letter-spacing: .02em; color: #04101F; }
.avatar.media { width: 52px; height: 52px; }
.avatar.media b { font-size: 1.05rem; }
.minha-foto { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 50%; transition: transform .18s ease; }
@media (hover: hover) { .minha-foto:hover { transform: translateY(-2px); } }
@media (hover: hover) { .minha-foto:hover .avatar { box-shadow: 0 0 0 2px var(--ciano), 0 0 22px rgba(0, 229, 255, .6); } }

/* Tela /foto: círculo com anel de gradiente girando */
.foto-previa {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 176px;
  height: 176px;
  margin: 6px auto 22px;
  border-radius: 50%;
  box-shadow: 0 0 44px rgba(0, 229, 255, .22), 0 0 90px rgba(124, 92, 255, .18);
}
.foto-previa::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent 0 12%, var(--ciano) 28%, var(--azul) 44%, var(--violeta) 60%, transparent 76% 100%);
  animation: anel-gira 6s linear infinite;
}
.foto-previa .avatar { position: relative; width: 166px; height: 166px; box-shadow: 0 0 0 3px #081026; }
.foto-previa .avatar b { font-size: 3rem; }
.foto-voltar { margin-top: 16px; }
input[type=file] {
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  font: inherit;
  font-size: max(16px, 1rem);
  color: var(--texto-2);
  background: rgba(5, 10, 24, .7);
  border: 1px dashed rgba(0, 229, 255, .45);
  border-radius: 14px;
}
input[type=file]::file-selector-button {
  min-height: 34px;
  margin-right: 12px;
  padding: 6px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--texto);
  background: rgba(0, 229, 255, .12);
  border: 1px solid rgba(0, 229, 255, .45);
  border-radius: 10px;
  cursor: pointer;
}
.marcar { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; color: var(--texto-2); cursor: pointer; }
.marcar input { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--ciano); cursor: pointer; }
.linha > .marcar { align-self: center; }

/* Faixa do campeão: foto por cima das iniciais; botão discreto da regra */
.campeao-foto {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  animation: iniciais-brilham 2.4s ease-in-out infinite;
}
.campeao-avatar .coroa { z-index: 1; }
.campeao-regra {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 0 14px;
  font-size: .82rem;
  letter-spacing: .03em;
  color: var(--texto-2);
  text-decoration: none;
  border: 1px solid rgba(255, 201, 77, .35);
  border-radius: 999px;
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
@media (hover: hover) { .campeao-regra:hover { color: var(--ouro); border-color: var(--ouro); box-shadow: 0 0 16px rgba(255, 201, 77, .3); } }

/* Página /regras */
.regras { margin: 0 0 20px; padding: 0; list-style: none; counter-reset: regra; display: grid; gap: 12px; }
.regras li {
  counter-increment: regra;
  position: relative;
  padding: 14px 16px 14px 62px;
  background: rgba(5, 10, 24, .55);
  border: 1px solid rgba(0, 229, 255, .16);
  border-radius: 18px;
  color: var(--texto-2);
}
.regras li::before {
  content: counter(regra);
  position: absolute;
  left: 16px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: var(--titulo);
  font-weight: 900;
  color: #04101F;
  background: linear-gradient(135deg, var(--ouro), var(--ciano));
}
.regras strong { color: var(--texto); }

/* Usuários: miniatura ao lado dos dados */
.usuario-acoes .confirmar form { margin-top: 8px; }

/* Fechamento do mês e histórico de campeões (admin) */
.fechado { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.fechado > div { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.fechado-nome { overflow-wrap: anywhere; }
.bonificacao { margin-bottom: 14px; padding: 16px; border: 1px solid rgba(0, 229, 255, .16); border-radius: 18px; background: rgba(5, 10, 24, .55); }
#fechamento .confirmar form { margin: 10px 0 0; }
#fechamento .confirmar p { margin-bottom: 10px; }
.historico { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hist { display: flex; gap: 14px; padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(255, 201, 77, .28); background: rgba(5, 10, 24, .55); }
.hist-dados { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.hist-mes { display: inline-flex; align-items: center; align-self: flex-start; font-family: var(--titulo); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ouro); text-decoration: none; }
@media (hover: hover) { .hist-mes:hover { text-decoration: underline; } }

.rodape { padding: 14px 16px max(20px, env(safe-area-inset-bottom)); text-align: center; color: var(--texto-3); font-size: .8rem; letter-spacing: .08em; }

/* ---------- Etapa 6: responsivo, de 320 px a 1920 px ---------- */
:root { --solido: #091229; }
img, svg { max-width: 100%; }

/* Alvos de toque: tudo o que se clica tem pelo menos 44 x 44 px. */
.btn, .chip, .menu-link, .campeao-regra, .rank-link, .hist-mes, .toque, .marca, .minha-foto, .dia-botao, .horario, .mini-col, .vaga.livre { min-width: 44px; min-height: 44px; }
.marcar { min-height: 44px; }
.chip { max-width: 100%; }
.toque { display: inline-flex; align-items: center; }
.estreito { max-width: 760px; margin-left: auto; margin-right: auto; }
.topo-nome { max-width: 22ch; }
.calendario, .novo { scroll-margin-top: 12px; }

/* No toque não há "passar o mouse": fica o efeito de pressionar. */
.campeao-regra:active, .minha-foto:active, .toque:active, .hist-mes:active, .rank-link:active { opacity: .7; }

/* Menu recolhível do admin (details/summary). Em tela larga vale a barra de links. */
.menu-cel { display: none; }
.menu-cel > summary { list-style: none; }
.menu-cel > summary::-webkit-details-marker { display: none; }
.menu-botao::before {
  content: '';
  flex: none;
  width: 18px;
  height: 2px;
  margin-right: 10px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}
.menu-cel[open] > .menu-botao { color: #04101F; background: var(--ciano); }
.menu-lista {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: grid;
  gap: 8px;
  padding: 12px max(12px, env(safe-area-inset-right)) 16px max(12px, env(safe-area-inset-left));
  background: rgba(5, 10, 24, .98);
  border-bottom: 1px solid var(--borda);
  box-shadow: 0 18px 30px rgba(0, 0, 0, .55);
}
.menu-lista .menu-link { min-height: 52px; padding: 0 16px; font-size: .86rem; border: 1px solid rgba(0, 229, 255, .2); }

/* Visão de um dia do calendário (celular). Em tela larga vale a grade da semana. */
.dia-vista { display: none; }
.dia-faixa { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.dia-botao {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 68px;
  padding: 6px 2px;
  border-radius: 14px;
  border: 1px solid rgba(0, 229, 255, .28);
  color: var(--texto);
  background: rgba(5, 10, 24, .55);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, background-color .18s ease;
}
.dia-botao:active { transform: scale(.94); background: rgba(0, 229, 255, .18); }
.dia-botao-nome { font-family: var(--titulo); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ciano); }
.dia-botao-num { font-size: 1.2rem; font-weight: 700; line-height: 1.15; }
.dia-botao-marca { font-family: var(--titulo); font-size: .56rem; font-weight: 700; letter-spacing: .04em; color: var(--ouro); }
.dia-botao.ativo { color: #04101F; background: linear-gradient(135deg, #7DF3FF, var(--ciano)); border-color: #B8F8FF; box-shadow: 0 0 16px rgba(0, 229, 255, .5); }
.dia-botao.ativo .dia-botao-nome, .dia-botao.ativo .dia-botao-marca { color: #04101F; }
.dia-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dia-titulo { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; text-align: center; font-size: 1rem; letter-spacing: .06em; }
.dia-titulo-nome { text-transform: uppercase; color: var(--ciano); }
.dia-titulo .dia-marca { margin-top: 4px; }
.horarios { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.horario {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  color: var(--texto);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  animation: vaga-entra .45s ease-out both;
}
.horarios li:nth-child(2) .horario { animation-delay: .03s; }
.horarios li:nth-child(3) .horario { animation-delay: .06s; }
.horarios li:nth-child(4) .horario { animation-delay: .09s; }
.horarios li:nth-child(5) .horario { animation-delay: .12s; }
.horarios li:nth-child(6) .horario { animation-delay: .15s; }
.horarios li:nth-child(7) .horario { animation-delay: .18s; }
.horarios li:nth-child(8) .horario { animation-delay: .21s; }
.horario-hora { flex: none; display: flex; align-items: baseline; gap: 8px; }
.horario-hora b { font-size: 1.2rem; }
.horario-fim { font-size: .86rem; opacity: .8; }
.horario-estado { min-width: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-weight: 700; letter-spacing: .04em; overflow-wrap: anywhere; }
.horario-loja { font-size: .86rem; font-weight: 500; line-height: 1.25; }
.horario.livre { color: var(--ciano); border: 1px dashed rgba(0, 229, 255, .6); background: rgba(0, 229, 255, .05); transition: transform .18s ease, background-color .18s ease; }
.horario.livre:active { transform: scale(.97); background: rgba(0, 229, 255, .2); transition-duration: .06s; }
.horario.selecionado { color: #04101F; background: linear-gradient(135deg, #7DF3FF, var(--ciano)); border-color: #B8F8FF; animation: vaga-entra .45s ease-out both, selecionado-brilha 1.8s ease-in-out infinite; }
.horario.ocupado { color: var(--texto-3); border-color: rgba(147, 166, 201, .25); background: repeating-linear-gradient(135deg, rgba(147, 166, 201, .16) 0 6px, rgba(147, 166, 201, .05) 6px 12px); }
.horario.meu { color: #fff; background: linear-gradient(120deg, var(--azul), var(--violeta)); box-shadow: 0 0 14px rgba(124, 92, 255, .4); }
.horario.indisponivel { color: var(--texto-3); background: rgba(147, 166, 201, .05); opacity: .7; }

/* Gráfico de 14 dias: se não couber, rola só dentro do cartão. */
.rola { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; margin-bottom: 12px; scrollbar-width: thin; scrollbar-color: rgba(0, 229, 255, .4) transparent; }
.rola > .grafico.duplo { min-width: 238px; margin-bottom: 0; }

/* Tablet e celular deitado */
@media (max-width: 900px) {
  .topo-nome { display: none; }
}

/* Celular (e janela estreita ou zoom alto): até 700 px */
@media (max-width: 700px) {
  /* desempenho: sem vidro desfocado, sem fundo fixo e sem a grade deslizando; brilhos com raio menor */
  html { background-attachment: scroll; }
  body::before { animation: none; }
  .topo, .cartao, .numero { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topo { background: rgba(5, 10, 24, .97); }
  .cartao, .numero { background: var(--solido); }
  .coroa { filter: none; }
  @keyframes pulso {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 229, 255, .35); }
    50% { box-shadow: 0 0 16px rgba(0, 229, 255, .7); }
  }
  @keyframes iniciais-brilham {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 229, 255, .45), 0 0 0 3px rgba(255, 201, 77, .5); }
    50% { box-shadow: 0 0 16px rgba(0, 229, 255, .85), 0 0 0 3px rgba(255, 201, 77, .95); }
  }
  @keyframes selecionado-brilha {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 229, 255, .55); }
    50% { box-shadow: 0 0 16px rgba(0, 229, 255, .95); }
  }

  .menu { display: none; }
  .menu-cel { display: block; }

  /* calendário: um dia por vez */
  .grade-rolagem, .calendario .legenda { display: none; }
  .dia-vista { display: block; }

  /* cartões empilhados: meus agendamentos e visitas do dia */
  .agendamento, .visita { flex-direction: column; align-items: stretch; }
  .agendamento-quando { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
  .agendamento-quando .combinado { flex-basis: 100%; }
  .agendamento-dados { flex: none; gap: 4px; }
  .agendamento-acoes, .agendamento-acoes form, .agendamento-acoes .btn, .agendamento-acoes .confirmar { width: 100%; }
  .agendamento-acoes .btn { min-height: 52px; }
  .visita .agendamento-quando .num { font-size: 1.5rem; }
  .visita .responsavel { order: -1; } /* responsável logo depois do horário */
  .visita .responsavel strong { font-size: 1.2rem; }
  .visita .agendamento-dados > strong { font-size: 1.05rem; }
  .visita-acoes { flex: none; flex-direction: column; align-items: stretch; gap: 14px; margin-top: 4px; padding-top: 14px; border-top: 1px solid rgba(0, 229, 255, .16); }
  .visita-acoes .confirmar, .visita-acoes .btn, .visita-acoes form { width: 100%; }
  .visita-acoes .btn { min-height: 52px; }
  .visita-acoes form { margin-top: 12px; }
  .visita-acoes .confirmar:last-child { margin: 10px 0 0; }

  /* usuários */
  .usuario { align-items: flex-start; }
  .usuario-dados { flex-basis: 150px; }
  .usuario-acoes, .usuario-acoes form, .usuario-acoes .btn, .usuario-acoes .confirmar { width: 100%; }
  .usuario-acoes .btn { min-height: 48px; }

  /* indicador discreto de rolagem do gráfico: sombra ciano na borda enquanto houver mais para o lado */
  .rola {
    background:
      linear-gradient(90deg, var(--solido) 40%, transparent) left / 28px 100% no-repeat local,
      linear-gradient(270deg, var(--solido) 40%, transparent) right / 28px 100% no-repeat local,
      linear-gradient(90deg, rgba(0, 229, 255, .4), transparent) left / 12px 100% no-repeat scroll,
      linear-gradient(270deg, rgba(0, 229, 255, .4), transparent) right / 12px 100% no-repeat scroll;
  }
}

@media (max-width: 520px) {
  .topo { gap: 10px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .topo-usuario { gap: 8px; }
  .marca-texto { font-size: .78rem; letter-spacing: .12em; }
  .marca img { max-width: 132px; }
  .conteudo { padding: 16px max(12px, env(safe-area-inset-right)) 40px max(12px, env(safe-area-inset-left)); }
  .cartao { padding: 16px 14px; border-radius: 18px; }
  .confirmar { width: 100%; }
  .confirmar > .btn { width: 100%; }

  /* /entrar, /trocar-senha, /foto: o cartão ocupa a largura toda e a página rola normalmente */
  .centro { place-items: start center; }
  .anel { max-width: none; }
  .anel > .cartao { padding: 24px 16px; }
  .marca.grande .marca-texto { font-size: 1rem; letter-spacing: .16em; }

  /* faixa do campeão empilhada: círculo em cima, texto e botão da regra embaixo */
  .campeao-dentro { flex-direction: column; gap: 12px; padding: 30px 16px 20px; text-align: center; }
  .campeao-avatar { width: 84px; height: 84px; margin-top: 18px; }
  .campeao-texto { align-items: center; }
  .campeao-numeros { justify-content: center; }
  .campeao-regra { align-self: center; margin-top: 8px; }

  /* ranking e histórico: cada linha é um cartão com os rótulos à esquerda e os valores à direita */
  .rank, .hist { gap: 10px; padding: 14px 12px; }
  .rank-pos { width: 30px; }
  .rank-apoio { display: grid; gap: 0; }
  .rank-apoio div { justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid rgba(0, 229, 255, .12); }
  .fechado { align-items: flex-start; }
  .bonificacao { padding: 14px 12px; }
  .semana-topo.meses .btn { flex: 1 1 0; }

  /* gráfico de 14 dias: barras mais finas e rótulos menores */
  .grafico.duplo { gap: 2px; }
  .dupla { gap: 1px; }
  .dupla .barra { flex-basis: 7px; min-width: 3px; }
  .regras li { padding: 14px 14px 14px 56px; }
  .regras li::before { left: 12px; }
}

/* Celular estreito: os 6 dias em duas fileiras de 3, para os botões não ficarem menores que o dedo */
@media (max-width: 419px) {
  .dia-faixa, .grafico.mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dia-faixa { gap: 6px; }
  .dia-botao { flex-direction: row; flex-wrap: wrap; align-content: center; gap: 0 6px; min-height: 56px; }
  .dia-botao-marca { flex-basis: 100%; text-align: center; font-size: .62rem; }
  .marca:not(.grande) .marca-texto { display: none; }
  .horario { padding: 10px 12px; }
}

/* Monitor grande: conteúdo centralizado, com fonte e espaçamentos um pouco maiores */
@media (min-width: 1600px) {
  html { font-size: 112.5%; }
  .topo { padding: 14px 32px; }
  .conteudo { max-width: 1180px; padding: 32px 24px 56px; }
  .conteudo.largo { max-width: 1440px; }
  .centro > .cartao { max-width: 520px; }
  .anel { max-width: 480px; }
  .estreito { max-width: 860px; }
  .cartao { padding: 28px; margin-bottom: 24px; }
  .agenda { gap: 24px; grid-template-columns: minmax(0, 1fr) 400px; }
  .agenda > .cartao { margin-bottom: 0; }
  .agenda + .cartao { margin-top: 24px; }
  .campeao, .numeros { margin-bottom: 24px; }
  .cartao .numeros { margin-bottom: 0; }
  .numeros { gap: 16px; }
  .numero { padding: 20px; }
  .vaga { min-height: 54px; }
  .agendamentos, .usuarios, .ranking, .historico { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:active, .horario.livre:active, .dia-botao:active { transform: none; }
  @media (hover: hover) { .btn:hover { transform: none; } }
}
