/* Login e verificação em duas etapas (templates/login.html e 2fa.html).
   Painel de marca à esquerda: marinho com o selo vertical, uma frase e o J em marca d'água;
   formulário à direita, sobre papel. Cores e fontes vêm dos tokens de identidade.css. */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }
body { font-family: var(--judera-fonte-texto); color: var(--judera-tinta); background: #F7F8FB; }

.auth-shell { display: flex; min-height: 100vh; }

/* ── painel de marca ── */
.brand-panel { position: relative; flex: 1 1 54%; min-height: 100vh; display: flex; overflow: hidden; padding: 56px 64px; color: #fff; }
.brand-panel-bg { position: absolute; inset: 0; z-index: 0; background: linear-gradient(160deg, var(--judera-marinho-escuro), var(--judera-marinho) 55%, #122C52); }
.brand-marca-dagua {
    position: absolute; right: -40px; bottom: -210px; z-index: 0;
    font-family: var(--judera-fonte-marca); font-weight: 600; font-size: 620px; line-height: 1;
    color: var(--judera-ouro-claro); opacity: .07; pointer-events: none; user-select: none;
}
.brand-panel-content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; width: 100%; max-width: 560px; }
.po-logo-img { display: block; height: auto; max-width: 100%; }
.brand-panel .po-logo-img { width: 230px; }
.brand-frase {
    font-family: var(--judera-fonte-marca); font-style: italic; font-weight: 400;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.25; max-width: 17em;
    color: rgba(255, 255, 255, .92); text-wrap: balance;
}
.brand-frase b { font-style: normal; font-weight: 500; color: var(--judera-ouro-claro); }
.brand-fatos {
    list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px;
    font-size: .68rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: rgba(212, 185, 120, .78);
}

/* ── painel do formulário ── */
.form-panel { flex: 1 1 46%; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #F7F8FB; }
.form-panel-inner { width: 100%; max-width: 380px; animation: fadeIn .5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .form-panel-inner { animation: none; } }
.form-brand-mobile { display: none; margin-bottom: 32px; }
.po-logo--sm .po-logo-img { width: 190px; margin: 0 auto; }
.form-title { font-family: var(--judera-fonte-marca); font-weight: 500; font-size: 2rem; line-height: 1.1; color: var(--judera-tinta); margin-bottom: 6px; letter-spacing: -.005em; }
.form-subtitle { font-size: .92rem; color: var(--judera-cinza); margin-bottom: 28px; }

/* mensagens (?error / ?logout / ?codigoExpirado) */
.alert-message { display: none; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: .86rem; font-weight: 500; margin-bottom: 20px; }
.alert-message.is-visible { display: flex; }
.alert-message-error { background: #FBEDEC; border: 1px solid #F1C7C4; color: var(--judera-vencido); }
.alert-message-success { background: #E7F5EC; border: 1px solid #BFE3CC; color: var(--judera-em-dia); }

/* campos */
.form-label { display: block; color: #334155; font-size: .8rem; font-weight: 600; margin-bottom: 7px; }
.input-wrapper { position: relative; }
.input-icon { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: #94A3B8; z-index: 2; pointer-events: none; }
.form-control {
    display: block; width: 100%; height: 50px; border: 1px solid #D5DCE8; border-radius: 10px; background: #fff;
    color: var(--judera-tinta); font: inherit; font-size: .95rem; padding: 0 44px; transition: border-color .15s, box-shadow .15s;
}
.form-control::placeholder { color: #94A3B8; }
.form-control:focus { outline: none; border-color: var(--judera-azul); box-shadow: 0 0 0 3px rgba(44, 92, 153, .16); }
.toggle-password { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); border: none; background: none; color: #94A3B8; cursor: pointer; z-index: 2; padding: 6px; line-height: 1; border-radius: 6px; }
.toggle-password:hover { color: #475569; }
.toggle-password:focus-visible { outline: 2px solid var(--judera-azul); outline-offset: 2px; }

/* botão */
.btn-login {
    width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 10px;
    background: var(--judera-marinho); color: #fff; font: inherit; font-size: .95rem; font-weight: 500; letter-spacing: .01em; cursor: pointer;
    transition: background .15s, transform .15s, box-shadow .15s;
}
.btn-login:hover { background: var(--judera-marinho-claro); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(11, 31, 59, .22); }
.btn-login:focus-visible { outline: 2px solid var(--judera-azul); outline-offset: 3px; }
.btn-login:disabled { opacity: .8; cursor: not-allowed; transform: none; box-shadow: none; }

/* rodapé */
.forgot-password { text-align: center; margin-top: 20px; font-size: .86rem; color: var(--judera-cinza); }
.forgot-password a { color: var(--judera-azul); text-decoration: none; font-weight: 500; }
.forgot-password a:hover { text-decoration: underline; }
.copyright { text-align: center; margin-top: 26px; color: #94A3B8; font-size: .76rem; }

/* ── responsivo ── */
@media (max-width: 991px) {
    .brand-panel { display: none; }
    .form-panel { flex: 1 1 100%; }
    .form-brand-mobile { display: flex; justify-content: center; }
}
@media (max-width: 576px) { .form-title { font-size: 1.7rem; } }
