/*
 * Sistema visual das telas de autenticação do Ashow Pay (login, cadastro,
 * recuperação de senha). Carregue SEMPRE depois do header do template: este
 * arquivo precisa vencer o soft-design-system-pro.css.
 *
 * Mexer nas variáveis do :root redimensiona ou reespaça todas as telas de uma
 * vez — é o lugar certo para ajuste fino.
 */

:root {
  --roxo: #b829f5;
  --roxo-claro: #d45cff;
  --borda: #9b2ee6;
  --campo: rgba(60, 20, 80, .55);
  --texto: #ffffff;
  --texto-2: #d8cfe0;
  --grad-btn: linear-gradient(90deg, #5b1ee0 0%, #8a2ef0 50%, #b42cf6 100%);

  /* Respiro lateral da tela e recuo interno comum aos blocos do formulário. */
  --margem: 28px;
  --recuo: 6px;

  /* Altura dos controles — mexer aqui redimensiona campos e botões juntos. */
  --h-campo: 48px;
  --h-btn: 50px;
  --h-btn-2: 42px;
}

/*
 * Reset com especificidade (0,1,0) de propósito: escrito como
 * "body.ashowpay-auth *" ele passa a (0,1,1) e vence .tela, .opcoes, .divisor
 * e companhia, zerando todo padding definido por classe.
 */
.ashowpay-auth * { box-sizing: border-box; margin: 0; padding: 0; }

html, body.ashowpay-auth { height: 100%; }

body.ashowpay-auth {
  font-family: 'Ubuntu', system-ui, -apple-system, sans-serif;
  color: var(--texto);
  background: #060108;
  display: flex;
  justify-content: center;
  min-height: 100dvh;
}

.tela {
  /* margin-inline garante o centro mesmo se algo derrubar o flex do body. */
  position: relative; width: 100%; max-width: 430px; min-height: 100dvh; overflow: hidden; margin-inline: auto;
  padding: calc(env(safe-area-inset-top) + 56px) var(--margem) calc(env(safe-area-inset-bottom) + 48px);
  display: flex; flex-direction: column;
  /*
   * A arte já traz os brilhos roxos e a moeda. A cor sólida atrás cobre o
   * instante antes de a imagem carregar e as bordas em telas fora da proporção.
   */
  background: #0a0110 url("../img/bg/ashowpay-auth-bg.jpg") center center / cover no-repeat;
}

/* Telas com logo no topo respiram mais que as com título em texto. */
.tela--logo { padding-top: calc(env(safe-area-inset-top) + 90px); }

/* Telas curtas (recuperação de senha) ficam melhor com o conteúdo no meio. */
.tela--centro { justify-content: center; }
.tela--centro .rodape { margin-top: 0; }

/* ---- cabeçalho ---- */

.tela .logo { display: block; width: 78%; max-width: 300px; margin: 0 auto; height: auto; }

.slogan {
  text-align: center; margin-top: 30px; font-size: 12px; letter-spacing: .55em; line-height: 1.7;
  color: #e9e2ef; font-weight: 400; padding-left: .55em;
}

.titulo {
  text-align: center; font-size: 34px; font-weight: 700; line-height: 1.15; color: #fff;
  position: relative; z-index: 1;
}

.subtitulo {
  text-align: center; margin-top: 8px; font-size: 14px; letter-spacing: .06em; color: #cfc3d8;
  position: relative; z-index: 1;
}

.instrucao {
  text-align: center; font-size: 16px; line-height: 1.5; color: #efe8f4;
  position: relative; z-index: 1;
}

/* ---- formulário ---- */

.tela form { margin-top: 34px; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }

.campo {
  display: flex; align-items: center; height: var(--h-campo); border: 1.5px solid var(--borda); border-radius: 12px;
  background: var(--campo); transition: border-color .2s, box-shadow .2s; margin: 0;
}

.campo:focus-within { border-color: var(--roxo-claro); box-shadow: 0 0 0 3px rgba(184, 41, 245, .25); }
.campo .ico { width: 48px; display: flex; justify-content: center; color: #e6dcef; flex-shrink: 0; }
.campo .sep { width: 1px; height: 24px; background: rgba(200, 160, 230, .35); }

/*
 * 16px no texto do input de propósito: abaixo disso o Safari do iOS dá zoom ao
 * focar o campo e desalinha a tela. Para diminuir o campo, use --h-campo.
 */
.campo input[type="email"],
.campo input[type="password"],
.campo input[type="tel"],
.campo input[type="number"],
.campo input[type="text"] {
  flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--texto);
  font: inherit; font-size: 16px; padding: 0 14px; box-shadow: none;
}

.campo input::placeholder { color: var(--texto-2); opacity: 1; }

/* tira as setinhas do input number (código de indicação) */
.campo input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.campo input[type="number"]::-webkit-outer-spin-button,
.campo input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.olho {
  background: none; border: 0; color: #e6dcef; padding: 0 16px; height: 100%; cursor: pointer;
  display: flex; align-items: center;
}

/* ---- botões ---- */

.btn-principal {
  position: relative; height: var(--h-btn); margin-top: 4px; border: 0; border-radius: 26px; cursor: pointer;
  background: var(--grad-btn); color: #fff; font: inherit; font-weight: 700; font-size: 17px; letter-spacing: .04em;
  box-shadow: 0 6px 22px rgba(150, 40, 240, .4); transition: transform .1s, filter .2s;
}

.btn-principal:active { transform: scale(.98); }
.btn-principal:hover { filter: brightness(1.08); }
.btn-principal:disabled { opacity: .7; cursor: default; }
.btn-principal svg { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 22px; height: 19px; }

.tela .btn-secundario {
  display: flex; align-items: center; justify-content: center; height: var(--h-btn-2); margin: 0 var(--recuo);
  border-radius: 22px; border: 1.5px solid var(--borda); color: var(--roxo-claro); font-weight: 500; font-size: 16px;
  text-decoration: none; background: transparent; transition: background .2s;
}

.tela .btn-secundario:hover { background: rgba(184, 41, 245, .1); }

/* ---- opções e divisor ---- */

.opcoes { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--recuo); margin-top: 10px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; color: #e6dcef; font-size: 14px; margin: 0; }
.check input { position: absolute; opacity: 0; }

.check .box {
  width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--borda);
  display: flex; align-items: center; justify-content: center; background: rgba(70, 20, 120, .6); flex-shrink: 0;
}

.check .box svg { opacity: 0; }
.check input:checked + .box { background: linear-gradient(135deg, #5b1ee0, #8a2ef0); }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { outline: 2px solid var(--roxo-claro); outline-offset: 2px; }

.tela .esqueceu { color: var(--roxo-claro); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

.volta { text-align: center; margin-top: 22px; position: relative; z-index: 1; }

.divisor { display: flex; align-items: center; gap: 10px; margin: 34px var(--recuo) 14px; color: #e6dcef; font-size: 14px; }
.divisor::before, .divisor::after { content: ""; flex: 1; height: 1px; background: rgba(200, 170, 220, .35); }

/* ---- rodapé ---- */

.rodape {
  margin-top: auto; padding-top: 48px; text-align: center; font-size: 10px; letter-spacing: .35em;
  color: #d9d0e2; position: relative; z-index: 1;
}

.rodape b { font-weight: 700; margin: 0 .6em; }

.copyright {
  text-align: center; font-size: 10px; letter-spacing: .12em; color: #8d7f99;
  margin-top: 14px; position: relative; z-index: 1;
}

/* ---- mensagem de erro ---- */

.erro {
  display: none; align-items: flex-start; gap: 10px; margin-bottom: 4px; padding: 12px 16px;
  border: 1.5px solid #ff5c7a; border-radius: 14px; background: rgba(120, 15, 40, .55);
  color: #ffe3e9; font-size: 14px; line-height: 1.45; position: relative; z-index: 1;
}

.erro.visivel { display: flex; }
.erro svg { flex-shrink: 0; margin-top: 1px; }

.sucesso {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; padding: 12px 16px;
  border: 1.5px solid #6ee7a8; border-radius: 14px; background: rgba(16, 80, 50, .55);
  color: #ddffed; font-size: 14px; line-height: 1.45; position: relative; z-index: 1;
}

.sucesso svg { flex-shrink: 0; margin-top: 1px; }

/* O ion_auth devolve as mensagens embrulhadas em <p>, que herdariam o reset. */
.erro p, .sucesso p { margin: 0; }

/*
 * O footer do template (redes sociais e copyright) vem junto dos scripts. Com o
 * body em flex ele viraria uma faixa ao lado da tela, então some aqui — cada
 * tela repõe o copyright dentro do próprio layout.
 */
body.ashowpay-auth > footer.footer { display: none !important; }

.tela a:focus-visible,
.tela button:focus-visible { outline: 2px solid var(--roxo-claro); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { .tela * { transition: none !important; } }
