/* Tela de login (preview aprovado em previews/login.html) */
@font-face { font-family: Poppins; font-weight: 400; src: url('../fonts/poppins/Poppins-Regular.ttf'); font-display: swap; }
@font-face { font-family: Poppins; font-weight: 500; src: url('../fonts/poppins/Poppins-Medium.ttf'); font-display: swap; }
@font-face { font-family: Poppins; font-weight: 600; src: url('../fonts/poppins/Poppins-SemiBold.ttf'); font-display: swap; }

:root {
    --primaria: #005da6;
    --primaria-escura: #004a85;
    --marinho: #13254d;
    --tinta: #1b2533;
    --suave: #5b6676;
    --borda: #cfd7e1;
    --fundo-campo: #f7f9fb;
    --erro: #c62828;
    --erro-fundo: #fdecec;
    --aviso: #8a5a00;
    --aviso-fundo: #fff4dc;
    --foco: rgba(0, 93, 166, .28);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: Poppins, system-ui, sans-serif; color: var(--tinta); background: #fff; -webkit-font-smoothing: antialiased; }

.tela { display: grid; grid-template-columns: minmax(0, 1fr) 500px; min-height: 100dvh; }

/* foto da sede */
.foto { position: relative; overflow: hidden; background: var(--marinho); }
.foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,37,77,0) 45%, rgba(19,37,77,.55) 72%, rgba(19,37,77,.92) 100%); }
.foto-legenda { position: absolute; left: 56px; right: 56px; bottom: 52px; z-index: 1; color: #fff; }
.foto-legenda h2 { font-weight: 600; font-size: 30px; line-height: 1.2; max-width: 520px; }
.foto-legenda p { margin-top: 10px; font-size: 15px; opacity: .85; }
.foto-legenda ul { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; list-style: none; }
.foto-legenda li { font-size: 12px; padding: 5px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; backdrop-filter: blur(2px); }

/* painel do formulário */
.painel { display: flex; flex-direction: column; justify-content: center; padding: 38px 56px 28px; }
.painel-conteudo { width: 100%; max-width: 380px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.logo { width: 100px; height: auto; margin: 0 auto 26px auto; }
h1 { font-size: 26px; font-weight: 600; line-height: 1.25; }
.sub { color: var(--suave); font-size: 15px; margin: 6px 0 28px; }

.alerta { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.45; margin-bottom: 20px; animation: entrar .22s ease-out; }
.alerta svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.alerta.erro { background: var(--erro-fundo); color: var(--erro); }
.alerta.aviso { background: var(--aviso-fundo); color: var(--aviso); }
.alerta b { font-weight: 600; }
.alerta .relogio { font-variant-numeric: tabular-nums; font-weight: 600; }

.campo { margin-bottom: 18px; }
.campo label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.entrada { position: relative; }
.entrada input { width: 100%; height: 50px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--tinta); background: var(--fundo-campo); border: 1.5px solid var(--borda); border-radius: 10px; transition: border-color .18s, box-shadow .18s, background .18s; }
.entrada input:hover { border-color: #aebbca; }
.entrada input:focus { outline: none; background: #fff; border-color: var(--primaria); box-shadow: 0 0 0 4px var(--foco); }
.entrada input[aria-invalid="true"] { border-color: var(--erro); background: #fff; }
.entrada input:disabled { opacity: .55; cursor: not-allowed; }
.com-botao input { padding-right: 52px; }
.olho { position: absolute; right: 3px; top: 3px; width: 44px; height: 44px; border: 0; background: none; color: var(--suave); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.olho:hover { color: var(--primaria); }
.olho:focus-visible { outline: 2px solid var(--primaria); outline-offset: -2px; }
.olho svg { width: 22px; height: 22px; }
.ajuda { font-size: 13px; color: var(--suave); margin-top: 6px; min-height: 0; }
.ajuda.erro { color: var(--erro); }
.caps { display: none; color: var(--aviso); }
.caps.ativo { display: block; }

.desafio { display: grid; grid-template-columns: 1fr 110px; gap: 12px; align-items: end; }
.conta { height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 10px; background: #eef3f9; border: 1.5px dashed #b7c7da; font-size: 20px; font-weight: 600; color: var(--marinho); letter-spacing: .02em; user-select: none; }
.conta small { font-size: 13px; font-weight: 500; color: var(--suave); letter-spacing: 0; }
.desafio .entrada input { text-align: center; font-size: 18px; font-weight: 600; }

.isca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.botao { width: 100%; height: 52px; margin-top: 8px; border: 0; border-radius: 10px; background: var(--primaria); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .18s, transform .12s; touch-action: manipulation; }
.botao:hover { background: var(--primaria-escura); }
.botao:active { transform: scale(.985); }
.botao:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--foco); }
.botao:disabled { background: #9db5cc; cursor: not-allowed; transform: none; }
.giro { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: girar .7s linear infinite; }

.esqueci { margin-top: 18px; font-size: 13px; color: var(--suave); text-align: center; }
.rodape { margin-top: 32px; font-size: 12px; color: #8792a2; text-align: center; display: flex; justify-content: center; gap: 6px; align-items: center; }
.rodape svg { width: 14px; height: 14px; }

@keyframes entrar { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes tremer { 0%,100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.tremer { animation: tremer .28s ease-in-out; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 1024px) { .tela { grid-template-columns: minmax(0, 1fr) 440px; } .painel { padding: 40px 36px 24px; } .foto-legenda { left: 36px; right: 36px; } }
@media (max-width: 760px) {
    .tela { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .foto { height: 34dvh; min-height: 220px; }
    .foto img { object-position: 50% 30%; }
    .foto-legenda { left: 20px; right: 20px; bottom: 40px; }
    .foto-legenda h2 { font-size: 20px; }
    .foto-legenda p, .foto-legenda ul { display: none; }
    .painel { padding: 0 20px 20px; margin-top: -22px; position: relative; background: #fff; border-radius: 20px 20px 0 0; }
    .painel-conteudo { padding-top: 28px; justify-content: flex-start; }
    .logo { width: 120px; margin-bottom: 22px; }
    h1 { font-size: 22px; }
}
