/* Tela de login — carregada depois de auth.css e escopada em body.page-login
   para não afetar a tela de registro, que compartilha o auth.css. */

.page-login {
    --lg-accent: #7a1642;
    --lg-accent-dark: #5f1034;
    --lg-ring: rgba(122, 22, 66, 0.16);
    --lg-text: #111827;
    --lg-muted: #6b7280;
    --lg-line: #e5e7eb;
    --lg-soft: #f4f5f7;

    background: #eceaec;
    padding: 24px;
}

.page-login::before {
    display: none;
}

/* ===================== */
/* CARD                  */
/* ===================== */
.page-login .lg-card {
    width: 100%;
    max-width: 1040px;
    min-height: 640px;
    display: grid;
    grid-template-columns: 38% 1fr;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(60, 20, 40, 0.25), 0 8px 20px -8px rgba(0, 0, 0, 0.08);
    animation: slideUp 0.5s ease-out;
}

.page-login .lg-visual {
    background: #76133b url("../img/login/banner-tall.webp") 50% 50% / cover no-repeat;
}

.page-login .lg-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: #fff;
}

.page-login .lg-panel__inner {
    width: 100%;
    max-width: 340px;
}

/* ===================== */
/* CABEÇALHO             */
/* ===================== */
.page-login .lg-head {
    text-align: center;
    margin-bottom: 28px;
}

.page-login .lg-head h1 {
    font-size: 1.65rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--lg-text);
    margin-bottom: 8px;
}

.page-login .lg-head p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--lg-muted);
}

/* ===================== */
/* FORMULÁRIO            */
/* ===================== */
.page-login .lg-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.page-login .lg-field {
    position: relative;
    display: block;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.page-login .lg-field__label {
    position: absolute;
    top: 9px;
    left: 15px;
    z-index: 1;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 500;
    color: var(--lg-muted);
    pointer-events: none;
    transition: color 0.2s;
}

.page-login .lg-field input {
    display: block;
    width: 100%;
    height: 58px;
    padding: 26px 15px 8px;
    font-size: 0.95rem !important;
    font-weight: 500;
    border: 1.5px solid var(--lg-line);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.page-login .lg-field input::placeholder {
    font-size: 0.9rem;
    font-weight: 400;
    color: #9ca3af;
    opacity: 1;
}

.page-login .lg-field input:hover {
    border-color: #cfd3d9;
}

.page-login .lg-field input:focus {
    border-color: var(--lg-accent);
    box-shadow: 0 0 0 4px var(--lg-ring);
}

.page-login .lg-field:focus-within .lg-field__label {
    color: var(--lg-accent);
}

.page-login .lg-field--password input {
    padding-right: 54px;
}

/* Botão ver/ocultar senha (sobrescreve o estilo genérico de <button> do auth.css) */
.page-login .lg-eye {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: var(--lg-muted) !important;
    font-size: 1rem;
    text-transform: none;
}

.page-login .lg-eye::before {
    display: none;
}

.page-login .lg-eye:hover {
    background: var(--lg-soft);
    transform: translateY(-50%);
    color: var(--lg-accent) !important;
}

.page-login .lg-eye i {
    pointer-events: none;
}

/* Botão principal */
.page-login .lg-submit {
    width: 100%;
    height: 48px;
    margin: 6px 0 0;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--lg-accent);
    box-shadow: 0 8px 18px -8px rgba(122, 22, 66, 0.55);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.page-login .lg-submit::before {
    display: none;
}

.page-login .lg-submit:hover {
    background: var(--lg-accent-dark);
    box-shadow: 0 10px 22px -8px rgba(122, 22, 66, 0.65);
    transform: translateY(-1px);
}

.page-login .lg-submit:active {
    transform: translateY(0);
}

.page-login .lg-submit:disabled {
    box-shadow: none;
}

/* Link "Esqueci minha senha" */
.page-login .lg-forgot {
    align-self: flex-end;
    margin: -4px 2px 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--lg-accent);
    text-decoration: none;
}

.page-login .lg-forgot:hover,
.page-login .lg-forgot:focus-visible {
    color: var(--lg-accent-dark);
    text-decoration: underline;
}

/* ===================== */
/* MENSAGENS             */
/* ===================== */
.page-login .lg-form .alert {
    margin: 0;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: left;
}

.page-login .lg-form .alert-warning {
    background: #fff8e1;
    border-color: #ffe08a;
    color: #7a5b00;
}

/* ===================== */
/* REGISTRO              */
/* ===================== */
.page-login .lg-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 26px 0 16px;
    font-size: 0.75rem;
    color: var(--lg-muted);
}

.page-login .lg-divider::before,
.page-login .lg-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--lg-line);
}

.page-login .lg-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 999px;
    background: var(--lg-soft);
    color: var(--lg-text);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.page-login .lg-secondary:hover,
.page-login .lg-secondary:focus-visible {
    background: var(--lg-accent);
    color: #fff;
}

/* ===================== */
/* RESPONSIVO            */
/* ===================== */

/* Tablet: banner largo no topo, formulário logo abaixo */
@media (max-width: 900px) {
    .page-login {
        padding: 0;
        align-items: stretch;
        background: #fff;
    }

    .page-login .lg-card {
        max-width: 100%;
        min-height: 100vh;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        border-radius: 0;
        box-shadow: none;
        animation: none;
        background: transparent;
    }

    .page-login .lg-visual {
        aspect-ratio: 16 / 9;
        max-height: 440px;
        background-image: url("../img/login/banner-wide.webp");
    }

    .page-login .lg-panel {
        position: relative;
        align-items: flex-start;
        margin-top: -28px;
        padding: 40px 24px 48px;
        border-radius: 28px 28px 0 0;
    }
}

/* Celular: banner quase quadrado, recorte próprio (a imagem vertical do desktop cortaria demais aqui) */
@media (max-width: 600px) {
    .page-login .lg-visual {
        aspect-ratio: auto;
        height: 46vh;
        min-height: 300px;
        max-height: 400px;
        background-image: url("../img/login/banner-square.webp");
        background-position: 50% 0%;
    }

    .page-login .lg-panel {
        padding: 32px 20px 40px;
    }

    .page-login .lg-head h1 {
        font-size: 1.45rem;
    }
}
