/* ==========================================================================
   Telas de conta (index.php = entrar / criar conta / esqueci a senha, redefinir.php = nova senha) — 2026-10-09.
   Moldura em src/AuthLayout.php, comportamento em assets/js/login/login.js. Usa as cores e fontes de base.css (:root).
   Sem animação em CSS (a regra global de "reduzir movimento" do movimento.css a cortaria): o pouco que se mexe é WAAPI.
   ========================================================================== */
.ap-body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
.ap-body::before { display: none; }   /* o fundo padrão do base.css (ui/fundo.webp) não é usado aqui */
/* a arte (ruínas da missão ao pôr do sol) vem ESPELHADA: a igreja e o céu em brasa ficam atrás do logo, à esquerda,
   e o lado escuro das lanças e bandeiras fica atrás do formulário, onde o texto precisa de contraste */
.ap-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #0c0a08; }
.ap-bg::before { content: ''; position: absolute; inset: 0; background: url('../../img/login/fundo.jpg') center 42% / cover no-repeat; transform: scaleX(-1); }
/* vídeo (fundo.mp4, 2284x1080) por cima da imagem, também espelhado. Ele tem um logo gravado no canto de baixo à
   direita (os ~11% da direita do quadro; espelhado, vai pra esquerda). Antes o corte escondia os 24% de BAIXO e,
   pra cobrir a tela, o vídeo ficava com zoom demais. Agora o quadro aparece na ALTURA INTEIRA e só a faixa lateral
   do logo fica de fora: o vídeo tem a proporção dele (sem cortar nada dentro do elemento), é largo o bastante pra
   que 88% dele cubra a tela (--vw) e fica deslocado 12% pra esquerda — essa faixa (o logo) cai fora da tela. Em
   tela mais larga que o vídeo sobra só um pouco em cima e embaixo (centralizado). */
.ap-video {
    --vw: max(113.7vw, 211.5vh);   /* 100vw / 0.88 ; 100vh * 2284/1080 */
    position: absolute; top: 50%; left: calc(var(--vw) * -.12); width: var(--vw); height: auto; aspect-ratio: 2284 / 1080;
    object-fit: fill; transform: translateY(-50%) scaleX(-1);
}
.ap-video + .ap-video { opacity: 0; }   /* o 2º vídeo só aparece na transição cruzada do laço (login.js) */
.ap-bg::after {
    content: ''; position: absolute; inset: 0; z-index: 3;   /* acima dos 2 vídeos do laço (z-index 1 e 2) */
    background:
        radial-gradient(ellipse 50% 55% at 24% 46%, rgba(255, 170, 70, .14), transparent 70%),
        linear-gradient(90deg, rgba(8, 6, 4, .28) 0%, rgba(8, 6, 4, .12) 30%, rgba(8, 6, 4, .55) 62%, rgba(8, 6, 4, .82) 100%),
        linear-gradient(180deg, rgba(8, 6, 4, .1) 0%, rgba(8, 6, 4, .35) 62%, rgba(8, 6, 4, .9) 100%);
}

.ap {
    flex: 1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 440px); gap: clamp(2rem, 4vw, 4rem); align-items: center;
    width: 100%; max-width: 1240px; margin: 0 auto; padding: 2.4rem 2rem 1rem;
}

/* ---- lado do jogo ---- */
.ap-hero { display: grid; justify-items: center; text-align: center; }
/* logo animado (2026-10-10, login.js): a LARGURA fica na caixa (.ap-logo-box) e o <img> ocupa 100% dela — assim o
   reflexo (.ap-logo-shine) fica exatamente sobre o desenho; a faixa (.ap-logo-wrap) ocupa a coluna toda e centraliza
   o logo no eixo do "1754 · Guerra Guaranítica". Movimento todo em WAAPI. */
.ap-logo-wrap { display: flex; justify-content: center; width: 100%; }
.ap-logo-box { position: relative; display: block; width: min(330px, 72%, 40vh); }
.ap-logo-box picture { display: block; }
.ap-logo { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .75)) drop-shadow(0 0 42px rgba(212, 169, 55, .14)); }
/* faixa de luz que atravessa o metal de tempos em tempos — recortada no formato do logo pela máscara */
.ap-logo-shine {
    position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: .9;
    background: linear-gradient(105deg, transparent 42%, rgba(255, 226, 150, .55) 50%, rgba(255, 246, 210, .75) 51%, transparent 58%) -120% 0 / 260% 100% no-repeat;
    -webkit-mask: url('../../img/login/logo.webp') center / 100% 100% no-repeat; mask: url('../../img/login/logo.webp') center / 100% 100% no-repeat;
}
.ap-kicker { display: flex; align-items: center; gap: .8rem; margin-top: .5rem; font: 700 .72rem/1 var(--font-body); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); text-shadow: 0 1px 4px #000; }
.ap-kicker span { width: 46px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ap-kicker span:last-child { transform: scaleX(-1); }
.ap-title { margin-top: .7rem; font-size: clamp(1.55rem, 2.6vw, 2.35rem); line-height: 1.15; color: var(--gold-hi); text-shadow: 0 2px 14px rgba(0, 0, 0, .85); }
.ap-pitch { max-width: 54ch; margin-top: .7rem; font-size: .98rem; line-height: 1.6; color: #e3d6bb; text-shadow: 0 1px 6px rgba(0, 0, 0, .95); }

/* ---- painel do formulário ---- */
.ap-panel { position: relative; padding-top: 28px; }
.ap-card {
    position: relative; padding: 2.6rem 2.2rem 1.8rem; border-radius: 20px;
    background: linear-gradient(180deg, rgba(38, 28, 18, .97), rgba(17, 12, 8, .97));
    border: 1px solid #6b5230;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 0 6px rgba(0, 0, 0, .2), inset 0 0 0 7px rgba(212, 169, 55, .15),
        0 30px 70px rgba(0, 0, 0, .7), 0 0 70px rgba(212, 169, 55, .08);
}
.ap-card::before { content: ''; position: absolute; top: -1px; left: 14%; right: 14%; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-hi), transparent); }
.ap-crest {
    position: absolute; top: -28px; left: 50%; display: grid; place-items: center; width: 56px; height: 56px; transform: translateX(-50%);
    border-radius: 50%; background: radial-gradient(circle at 50% 35%, #3d2c18, #140e09 75%); border: 1px solid var(--gold);
    box-shadow: 0 0 0 4px rgba(12, 9, 6, .92), 0 0 24px rgba(212, 169, 55, .35);
}
.ap-crest svg { width: 28px; height: 28px; fill: none; stroke: var(--gold-hi); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ap-head { margin-bottom: 1.25rem; text-align: center; }
.ap-h { font-size: 1.55rem; line-height: 1.2; color: var(--gold-hi); }
.ap-sub { margin-top: .4rem; font-size: .88rem; line-height: 1.5; color: var(--muted); }
.ap-sub:empty { display: none; }
.ap-sub b { color: var(--text); }

.ap-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 1.3rem; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); }
.ap-tab { display: grid; place-items: center; padding: .62rem; border-radius: 9px; font: 700 .9rem var(--font-title); letter-spacing: .05em; text-decoration: none; color: var(--muted); transition: background .15s, color .15s; }
.ap-tab:hover { color: var(--text); }
.ap-tab.on { color: #1a1208; background: linear-gradient(160deg, var(--gold-hi), var(--gold)); box-shadow: 0 4px 14px rgba(212, 169, 55, .3); }

.ap-form { display: grid; gap: 1rem; }
.ap-field { display: grid; gap: .38rem; }
.ap-label { font: 600 .74rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: #c9b58d; }
.ap-input { position: relative; display: flex; align-items: center; }
.ap-ico { position: absolute; left: .85rem; width: 18px; height: 18px; fill: none; stroke: #8f7d5d; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke .15s; }
.ap-input input {
    width: 100%; height: 48px; padding: 0 2.9rem 0 2.7rem; font: 500 .98rem var(--font-body); color: var(--text);
    background: rgba(0, 0, 0, .42); border: 1px solid #4a3a25; border-radius: 10px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.ap-input input:focus { outline: none; border-color: var(--gold); background: rgba(0, 0, 0, .55); box-shadow: 0 0 0 3px rgba(212, 169, 55, .18); }
.ap-input:focus-within .ap-ico { stroke: var(--gold-hi); }
.ap-input input.bad { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(226, 86, 75, .15); }
.ap-input input.good { border-color: rgba(109, 191, 109, .75); }
.ap-input input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 40px #1c150d inset; caret-color: var(--text); }
.ap-eye { position: absolute; right: .4rem; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; color: #8f7d5d; background: none; }
.ap-eye:hover { color: var(--gold-hi); background: rgba(212, 169, 55, .08); }
.ap-eye.on { color: var(--gold-hi); }
.ap-eye svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ap-hint { font-size: .72rem; line-height: 1.4; color: #8f826b; }
.ap-meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: center; gap: 4px; }
.ap-meter i { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); transition: background .2s; }
.ap-meter span { margin-left: .5rem; font-size: .72rem; white-space: nowrap; color: #8f826b; }
.ap-meter[data-level="1"] i:nth-child(-n+1) { background: var(--bad); }
.ap-meter[data-level="2"] i:nth-child(-n+2) { background: #e0913c; }
.ap-meter[data-level="3"] i:nth-child(-n+3) { background: #d6c13d; }
.ap-meter[data-level="4"] i:nth-child(-n+4) { background: var(--good); }
.ap-meter[data-level="1"] span { color: #ff9d94; }
.ap-meter[data-level="4"] span { color: #9fe09f; }

.ap-row { display: flex; justify-content: flex-end; margin-top: -.45rem; }
.ap-link { font-size: .84rem; font-weight: 600; text-decoration: none; color: var(--gold-hi); }
.ap-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ap-btn {
    display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; height: 52px; margin-top: .25rem;
    font: 700 .98rem var(--font-title); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: #1a1208;
    border: 0; border-radius: 11px; cursor: pointer;
    background: linear-gradient(180deg, #f6d77d, #d4a937 55%, #b98d22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .2), 0 8px 22px rgba(212, 169, 55, .28);
    transition: transform .12s, box-shadow .12s, filter .12s;
}
.ap-btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 0 rgba(0, 0, 0, .2), 0 12px 28px rgba(212, 169, 55, .4); }
.ap-btn:active { transform: translateY(1px); }
.ap-btn[disabled] { cursor: progress; filter: saturate(.6) brightness(.85); transform: none; }
.ap-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(26, 18, 8, .25); border-top-color: #1a1208; }
.ap-alt { margin-top: .15rem; font-size: .86rem; text-align: center; color: var(--muted); }

.ap-alert { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: 1rem; padding: .75rem .9rem; border-radius: 10px; font-size: .86rem; line-height: 1.45; text-align: left; }
.ap-alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ap-alert.erro { color: #ffc2bb; background: rgba(226, 86, 75, .12); border: 1px solid rgba(226, 86, 75, .5); }
.ap-alert.ok { color: #c9f0c9; background: rgba(109, 191, 109, .1); border: 1px solid rgba(109, 191, 109, .45); }
.ap-alert.info { color: #e8dcc0; background: rgba(212, 169, 55, .08); border: 1px solid rgba(212, 169, 55, .35); }

.ap-sent { display: grid; gap: .9rem; text-align: center; }
.ap-sent-ico { justify-self: center; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: radial-gradient(circle, rgba(212, 169, 55, .24), rgba(0, 0, 0, .3)); border: 1px solid var(--gold); box-shadow: 0 0 26px rgba(212, 169, 55, .2); }
.ap-sent-ico svg { width: 34px; height: 34px; fill: none; stroke: var(--gold-hi); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ap-sent p { font-size: .92rem; line-height: 1.6; color: var(--text); }
.ap-sent b { color: var(--gold-hi); }
.ap-sent .ap-mail { overflow-wrap: anywhere; }   /* e-mail comprido quebra onde der; o resto do texto, só entre palavras */
.ap-sent .ap-muted { font-size: .82rem; color: var(--muted); }
.ap-sent .ap-alert { margin: 0; }

.ap-foot { padding: 1rem 1rem 1.2rem; font-size: .72rem; text-align: center; color: #7d705a; text-shadow: 0 1px 2px #000; }

/* ---- tablet e celular: uma coluna só (logo em cima, formulário embaixo) ---- */
@media (max-width: 980px) {
    .ap { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; max-width: 560px; padding: 1.4rem 1rem .5rem; }
    .ap-bg::before { background-position: 22% 30%; }
    .ap-foot { padding-bottom: 4.6rem; }      /* não fica embaixo do controle da música */
    .ap-bg::after { background: linear-gradient(180deg, rgba(8, 6, 4, .15) 0%, rgba(8, 6, 4, .55) 40%, rgba(8, 6, 4, .92) 75%); }
    .ap-logo-box { width: min(210px, 52vw); }
    .ap-title { font-size: 1.4rem; }
    .ap-pitch { display: none; }
}
@media (max-width: 480px) {
    .ap { padding-top: 1rem; }
    .ap-card { padding: 2.3rem 1.15rem 1.4rem; border-radius: 16px; }
    .ap-logo-box { width: min(170px, 46vw); }
    .ap-kicker { gap: .5rem; font-size: .62rem; letter-spacing: .2em; }
    .ap-kicker span { width: 26px; }
    .ap-title { font-size: 1.2rem; }
    .ap-h { font-size: 1.35rem; }
}
