/* public/assets/css/auth-evolucao.css
   Camada de evolução das telas de acesso (mesmo padrão do auth-ponto.css).
   Só acrescenta acabamento e movimento; a estrutura continua a mesma. */

/* 1. Fundo: luz que segue o mouse, pontinhos e bolhas vivas */
.ap-wrap { --mx: 50%; --my: 30%; }
.ap-wrap::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(640px circle at var(--mx) var(--my), rgba(255,255,255,.14), transparent 60%); }
.ap-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .45;
  background-image: radial-gradient(rgba(255,255,255,.22) 1px, transparent 1.2px); background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%); mask-image: linear-gradient(180deg, #000, transparent 75%); }
.ap-bolha { z-index: 0; animation: ap-deriva 16s ease-in-out infinite alternate; }
.ap-bolha-2 { animation-duration: 20s; animation-direction: alternate-reverse; }
.ap-bolha-3 { width: 160px; height: 160px; top: 38%; right: 12%; background: rgba(255,255,255,.05); animation-duration: 12s; }
@keyframes ap-deriva { to { transform: translate(34px, -26px) scale(1.06); } }

/* 2. Marca: saudação + hora com segundos */
.ap-logo { filter: drop-shadow(0 10px 24px rgba(4,30,60,.18)); }
.ap-saudacao { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); font-size: 13.5px; font-weight: 600; color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: ap-entra .6s .15s ease-out both; }
.ap-saudacao i { color: #FFC680; }
.ap-hora { margin-top: 14px; }
.ap-hora .ap-seg { font-size: .36em; opacity: .7; margin-left: 3px; vertical-align: top; position: relative; top: .25em; }

/* 3. Relógio-botão: ponteiro de segundos, marcas das horas, ondas */
.ap-relogio-botao { position: relative; animation: none; }
.ap-relogio-botao::before, .ap-relogio-botao::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(26,155,230,.5);
  animation: ap-onda 2.8s ease-out infinite; pointer-events: none; }
.ap-relogio-botao::after { animation-delay: 1.4s; }
@keyframes ap-onda { to { transform: scale(1.55); opacity: 0; } }
.ap-relogio-face { box-shadow: inset 0 -10px 24px rgba(10,95,151,.35), inset 0 6px 16px rgba(255,255,255,.18); }
.ap-traco:nth-child(3n+1)::before { height: 12px; width: 3px; margin-left: -.5px; background: #fff; }
.ap-ponteiro-seg { width: 2px; height: 40%; background: #FFC680; border-radius: 2px; }
.ap-ponteiro-seg::after { content: ""; position: absolute; left: 50%; bottom: -18%; width: 2px; height: 18%; margin-left: -1px; background: #FFC680; border-radius: 2px; }
.ap-ponteiro-seg { transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.ap-centro { z-index: 2; }
.ap-relogio-rotulo { text-shadow: 0 1px 6px rgba(4,30,60,.25); }
.ap-dica { display: inline-flex; align-items: center; gap: 8px; }
.ap-dica::before { content: "\F402"; font-family: "bootstrap-icons"; color: var(--ap-azul); animation: ap-toque 1.6s ease-in-out infinite; }
@keyframes ap-toque { 50% { transform: translateY(-4px); } }

/* 4. Folha: campos entram em sequência quando abre */
.ap-wrap.aberto .ap-folha-conteudo > * { animation: ap-campo-entra .5s cubic-bezier(.2,.7,.2,1) both; }
.ap-wrap.aberto .ap-folha-conteudo > *:nth-child(1) { animation-delay: .12s; }
.ap-wrap.aberto .ap-folha-conteudo > *:nth-child(2) { animation-delay: .17s; }
.ap-wrap.aberto .ap-folha-conteudo > *:nth-child(3),
.ap-wrap.aberto .ap-folha-conteudo > *:nth-child(4) { animation-delay: .22s; }
.ap-wrap.aberto .ap-folha-conteudo > *:nth-child(n+5) { animation-delay: .3s; }
.ap-wrap.aberto #login-form > * { animation: ap-campo-entra .5s cubic-bezier(.2,.7,.2,1) both; }
.ap-wrap.aberto #login-form > *:nth-child(2) { animation-delay: .24s; }
.ap-wrap.aberto #login-form > *:nth-child(3) { animation-delay: .3s; }
.ap-wrap.aberto #login-form > *:nth-child(4) { animation-delay: .36s; }
.ap-wrap.aberto #login-form > *:nth-child(5) { animation-delay: .42s; }
@keyframes ap-campo-entra { from { opacity: 0; transform: translateY(14px); } }
.ap-titulo { letter-spacing: -.02em; }

/* 5. Campos: ícone reage ao foco, rótulo fica azul, e-mail válido ganha check */
.ap-campo { position: relative; }
.ap-campo:hover:not(:focus-within) { background: #EEF3F9; }
.ap-campo-icone { transition: transform .35s cubic-bezier(.3,1.6,.5,1), box-shadow .3s; }
.ap-campo:focus-within .ap-campo-icone { transform: scale(1.08) rotate(-6deg); box-shadow: 0 8px 16px rgba(14,124,196,.25); }
.ap-campo:focus-within .ap-laranja { box-shadow: 0 8px 16px rgba(232,120,15,.28); }
.ap-campo-rotulo { transition: color .2s; }
.ap-campo:focus-within .ap-campo-rotulo { color: var(--ap-azul); }
.ap-ok { flex: 0 0 auto; color: #16A34A; font-size: 19px; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s cubic-bezier(.3,1.6,.5,1); }
.ap-campo.valido .ap-ok { opacity: 1; transform: none; }
.ap-olho i { display: inline-block; transition: transform .25s; }
.ap-olho:active i { transform: scale(.8); }
.ap-caps { display: flex; align-items: center; gap: 8px; margin: -6px 2px 12px; font-size: 13px; font-weight: 600; color: #B45309;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .25s, opacity .25s, margin .25s; }
.ap-caps.ver { max-height: 30px; opacity: 1; }

/* 6. Botão Entrar: brilho, seta, carregando */
.ap-botao { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(135deg, var(--ap-azul-claro), var(--ap-azul) 55%, var(--ap-azul-escuro)); }
.ap-botao::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-18deg); }
.ap-botao:hover { background: linear-gradient(135deg, var(--ap-azul), var(--ap-azul-escuro)); box-shadow: 0 14px 28px rgba(14,124,196,.38); }
.ap-botao:hover::after { animation: ap-brilho .8s ease; }
@keyframes ap-brilho { to { left: 130%; } }
.ap-botao i { transition: transform .25s; }
.ap-botao:hover i { transform: translateX(3px); }
.ap-botao:disabled::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: ae-gira .7s linear infinite; }

/* 7. Erro: alerta entra balançando */
.ap-alerta:not(.d-none) { animation: ap-balanca .5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes ap-balanca { 10%,90% { transform: translateX(-1px); } 20%,80% { transform: translateX(3px); } 30%,50%,70% { transform: translateX(-5px); } 40%,60% { transform: translateX(5px); } }

/* 8. Rodapé da folha: conexão segura */
.ap-rodape { display: inline-flex; align-items: center; gap: 10px; }
.ap-seguro { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: #E8F7EE; color: #15803D; font-weight: 600; }

/* 9. Desktop: folha flutuando como cartão com borda de luz */
@media (min-width: 992px) {
  .ap-wrap.aberto .ap-folha { box-shadow: 0 30px 70px rgba(4,30,60,.32), 0 0 0 1px rgba(255,255,255,.4); }
}
@media (hover: none) { .ap-wrap::before { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .ap-bolha, .ap-relogio-botao::before, .ap-relogio-botao::after, .ap-dica::before,
  .ap-wrap.aberto .ap-folha-conteudo > *, .ap-wrap.aberto #login-form > *, .ap-alerta:not(.d-none) { animation: none; }
}
