/* Tela de login em duas metades, seguindo o padrão do UltraDoc.
 *
 * A metade da esquerda informa em vez de decorar: chamada, segurança e versão.
 * Todas as cores saem dos tokens do tema Velzon (--vz-*), então trocar a cor
 * primária do tema muda esta tela junto, sem literal de cor aqui.
 */

.lg-tela {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    background: var(--vz-secondary-bg, #fff);
    font-family: var(--vz-body-font-family);
}

/* Abaixo de 992px o painel sai de cena: no celular ele empurraria o
   formulário para fora da primeira tela, e quem abre o login quer digitar. */
@media (min-width: 992px) {
    .lg-tela { grid-template-columns: 1.15fr 1fr; }
}

/* ---------------------------------------------------------------- painel */

.lg-painel {
    position: relative;
    display: none;
    overflow: hidden;
    padding: 3rem;
    background: var(--vz-primary);
    background-size: cover;
    background-position: center;
    color: #fff;
    isolation: isolate;
}
@media (min-width: 992px) { .lg-painel { display: block; } }

/* Com imagem de fundo configurada, uma camada da cor primária por cima
   mantém o texto legível seja qual for a foto. */
.lg-painel.com-imagem::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(var(--vz-primary-rgb), .88);
    z-index: -1;
}

.lg-malha {
    position: absolute;
    inset: -10% -5% -5% -10%;
    width: 120%;
    height: 120%;
    color: #fff;
    opacity: .12;
    z-index: -1;
}

.lg-painel-conteudo {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    max-width: 34rem;
}

.lg-painel-logo { max-height: 40px; width: auto; }

.lg-painel-meio { padding-block: 2.5rem; }

.lg-chamada {
    margin: 0;
    font-family: var(--lg-fonte-display);
    font-size: clamp(1.9rem, 3vw, 2.9rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.025em;
    text-wrap: balance;
}
.lg-chamada-sub {
    margin: 1rem 0 0;
    max-width: 38ch;
    font-size: 1rem;
    line-height: 1.55;
    opacity: .82;
}

.lg-painel-base { display: flex; flex-direction: column; gap: 1.1rem; }

.lg-info { display: flex; flex-direction: column; gap: 0.15rem; }
.lg-info-k {
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    opacity: .7;
}
.lg-info-v { font-size: 0.95rem; font-weight: 500; }
.lg-selo { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 400; opacity: .9; }
.lg-selo svg { flex-shrink: 0; }
.lg-versao { font-size: 0.75rem; opacity: .6; }

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

.lg-forma {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}
@media (min-width: 576px) { .lg-forma { padding: 3rem 2rem; } }

.lg-caixa { width: 100%; max-width: 25rem; }

.lg-marca-mobile {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}
@media (min-width: 992px) { .lg-marca-mobile { display: none; } }
/* O logo é claro (feito para o painel), então no celular ganha um selo na
   cor primária em vez de cair sobre o fundo branco. */
.lg-marca-mobile img {
    max-height: 56px;
    width: auto;
    padding: 0.75rem 1.1rem;
    border-radius: 0.8rem;
    background: var(--vz-primary);
}

.lg-cabecalho { margin-bottom: 1.75rem; }
.lg-cabecalho-ic {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.9rem;
    border-radius: 0.7rem;
    background: rgba(var(--vz-primary-rgb), .12);
    color: var(--vz-primary);
    font-size: 1.15rem;
}
.lg-titulo {
    margin: 0 0 0.35rem;
    font-family: var(--lg-fonte-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--vz-heading-color, var(--vz-body-color));
}
.lg-sub { margin: 0; font-size: 0.9rem; color: var(--vz-secondary-color); }

/* Campos um pouco mais altos e com foco visível: é a tela onde mais se digita
   errado, e o anel de foco é o que orienta quem usa teclado. */
.lg-tela .form-control {
    min-height: 2.85rem;
    margin-bottom: 0 !important;
    border-radius: 0.6rem;
}
.lg-tela .form-control:focus {
    border-color: var(--vz-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--vz-primary-rgb), .16);
}
.lg-tela .form-label { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.35rem; }

.lg-senha { position: relative; }
.lg-senha .form-control { padding-right: 2.75rem; }
.lg-senha-olho {
    position: absolute;
    top: 0;
    right: 0;
    height: 2.85rem;
    width: 2.75rem;
    display: grid;
    place-items: center;
    border: 0;
    background: none;
    color: var(--vz-secondary-color);
    font-size: 1.05rem;
}
.lg-senha-olho:hover { color: var(--vz-body-color); }

.lg-tela .btn-primary {
    min-height: 2.85rem;
    border-radius: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Aviso de Caps Lock: aparece só com a tecla ligada e resolve parte real
   dos "não consigo entrar". */
.lg-capslock {
    display: none;
    align-items: center;
    gap: 0.35rem;
    margin: 0.4rem 0 0;
    font-size: 0.78rem;
    color: var(--vz-warning);
}
.lg-capslock.is-ativo { display: flex; }

.lg-erro { margin-top: 0.35rem; font-size: 0.8rem; color: var(--vz-danger); }

.lg-rodape {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--vz-border-color);
    font-size: 0.78rem;
    color: var(--vz-secondary-color);
    text-align: center;
}
.lg-rodape p { margin: 0; }
.lg-rodape p + p { margin-top: 0.3rem; }

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

/* Celular: "Esqueceu a senha?" com alvo de toque de 44px. */
@media (max-width: 575.98px) {
    .lg-esqueci { min-height: 44px; display: inline-flex; align-items: center; }
}
