/* Componentes comuns aos modelos de login (access*). As cores vem de variaveis definidas em cada modelo. */
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--texto); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.45; }

/* avisos */
.aviso { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; animation: aparecer .4s ease both; }
.aviso-erro { background: var(--erro-fundo); border: 1px solid var(--erro-borda); color: var(--erro-texto); }
.aviso-ok { background: var(--ok-fundo); border: 1px solid var(--ok-borda); color: var(--ok-texto); }

/* paineis (login / recuperar senha) */
.painel[hidden] { display: none; }
.painel-entrando { animation: deslizar .35s ease both; }
.painel-login > * { animation: aparecer .5s ease both; }
.painel-login > :nth-child(3) { animation-delay: .15s; }
.painel-login > :nth-child(4) { animation-delay: .22s; }
.painel-login > :nth-child(5) { animation-delay: .29s; }
.painel-login > :nth-child(6) { animation-delay: .36s; }
.painel-titulo { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.painel-ajuda { margin: 0 0 18px; color: var(--texto-suave); font-size: 14px; }
.sessao-ativa { text-align: center; }

/* campos com rotulo flutuante */
.campo { position: relative; margin-bottom: 16px; }
.campo input {
  width: 100%; color: var(--texto); font: inherit; font-size: 15px;
  background: var(--campo-fundo); border: 1px solid var(--borda); border-radius: var(--raio-campo, 12px);
  padding: 22px 14px 8px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.campo-senha input { padding-right: 46px; }
.campo input:focus { border-color: var(--acento); box-shadow: 0 0 0 4px var(--acento-sombra); background: var(--campo-fundo-foco); }
.campo label { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto-suave); font-size: 15px; pointer-events: none; transition: all .18s ease; }
.campo input:focus + label, .campo input:not(:placeholder-shown) + label, .campo input:-webkit-autofill + label {
  top: 9px; transform: none; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--rotulo);
}
.campo input:-webkit-autofill { -webkit-text-fill-color: var(--texto); box-shadow: 0 0 0 1000px var(--campo-autofill) inset; transition: background-color 9999s; }
.olho { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; padding: 0; background: none; border: 0; border-radius: 8px; color: var(--texto-suave); cursor: pointer; transition: color .2s, background .2s; }
.olho:hover, .olho:focus-visible { color: var(--texto); background: var(--campo-fundo-foco); outline: none; }
.olho svg { width: 20px; height: 20px; }
.olho .fechado { display: none; }
.olho.ativo .aberto { display: none; }
.olho.ativo .fechado { display: block; }

/* lembrar-me + link */
.linha { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 2px 0 20px; font-size: 14px; }
.chave { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--texto-suave); user-select: none; }
.chave:hover { color: var(--texto); }
.chave input { position: absolute; opacity: 0; width: 0; height: 0; }
.chave-trilho { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--trilho); transition: background .25s; flex: none; }
.chave-trilho::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.chave input:checked + .chave-trilho { background: var(--acento); }
.chave input:checked + .chave-trilho::after { transform: translateX(16px); }
.chave input:focus-visible + .chave-trilho { box-shadow: 0 0 0 3px var(--acento-sombra); }
.link { background: none; border: 0; padding: 0; color: var(--link); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.link:hover, .link:focus-visible { color: var(--link-hover); text-decoration-color: currentColor; outline: none; }
.link-voltar { display: block; margin: 16px auto 0; }

/* botao principal */
.botao {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px 18px; border: 0; border-radius: var(--raio-campo, 12px); color: var(--botao-texto); text-decoration: none;
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--botao-fundo); background-size: 200% 200%; box-shadow: var(--botao-sombra);
  transition: transform .15s, box-shadow .2s, background-position .5s;
}
.botao::after { content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transition: left .6s ease; }
.botao:hover { transform: translateY(-1px); box-shadow: var(--botao-sombra-hover); background-position: 100% 0; }
.botao:hover::after { left: 130%; }
.botao:active { transform: translateY(0); }
.botao:focus-visible { outline: 3px solid var(--acento-sombra); outline-offset: 2px; }
.botao:disabled { cursor: progress; opacity: .85; transform: none; }
.botao-carregando { display: none; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: currentColor; border-radius: 50%; animation: girar .8s linear infinite; }
.botao.carregando .botao-carregando { display: inline-block; }

/* rodape */
.rodape { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--borda); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; }
.link-secundario { color: var(--link); text-decoration: none; font-weight: 500; transition: color .2s; }
.link-secundario:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
.suporte { display: inline-flex; align-items: center; gap: 8px; color: var(--texto-suave); text-decoration: none; transition: color .2s; }
.suporte svg { width: 18px; height: 18px; }
.suporte:hover { color: #25d366; }

/* animacoes comuns */
.tremer { animation: tremer .55s .4s both; }
@keyframes aparecer { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes deslizar { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes tremer { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes flutuar { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(var(--dx, 6vw), var(--dy, -5vh), 0) scale(var(--escala, 1.12)); } }

@media (max-width: 480px) {
  .linha { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
