.login-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    max-width: 100% !important;
    background-color: #0d1117;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 2rem 2rem 10%;
    z-index: 999;
    overflow-y: auto;
}

/* Estrutura do Slideshow de Background */
.login-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.login-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
    will-change: opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.login-bg-slide.active {
    opacity: 1;
    z-index: 2;
}

.login-content {
    width: 340px !important; /* Largura padrão fixa em todos os estados no desktop */
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin: auto 0; /* Garante que o scroll vertical funcione corretamente sem cortar no topo/base */
}

.login-card {
    width: 100%;
    background: #11191f !important; /* Fallback de fundo sólido para compatibilidade */
    border: 1px solid #262a30 !important;
    border-radius: 20px !important;
    padding: 0.7rem 0.5rem !important;
    box-shadow: none !important;
    color: #ffffff !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.login-card h1, 
.login-card h2, 
.login-card h3 {
    color: #ffffff !important;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: #cccccc !important;
    margin-bottom: 1rem;
}

.login-card input {
    border-radius: 12px;
    --pico-form-element-spacing-vertical: 0.2rem;
    --pico-form-element-spacing-horizontal: 0.6rem;
    padding: 0.25rem 0.6rem !important;
    height: 34px !important;
    font-size: 0.8rem !important;
    margin-bottom: 0.5rem;
    border: 1px solid #cccccc !important;
    background-color: #ffffff !important;
    color: #11191f !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.login-card input::placeholder {
    color: #555555 !important;
}

.social-divider {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0.4rem 0;
    color: #b3b3b3;
    font-size: 0.85rem;
}

.social-divider::before,
.social-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #30373d;
}

.btn-base-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.btn-base-login img,
.btn-base-login svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-google {
    width: 100% !important;
    margin: 0 auto !important;
    background-color: #1a4fb8 !important;
    color: white !important;
    border: none !important;
}

.btn-google:hover {
    background-color: #2060df !important;
}

.btn-secondary-glass {
    background-color: #242c34 !important;
    color: #ffffff !important;
    border: 1px solid #353c43 !important;
}

.btn-secondary-glass:hover {
    background-color: #323b45 !important;
    border-color: #51585f !important;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.btn-group button {
    flex: 1;
    margin: 0 !important;
    width: auto !important;
    height: 38px !important;
    padding: 0 0.5rem !important;
}

.email-login-section {
    border: 1px solid #2c353d;
    background-color: #161f26;
    border-radius: 12px;
    padding: 0.75rem;
    margin: 0.6rem auto;
    width: 100%;
}

.btn-link-minimal {
    display: inline-block !important;
    width: auto !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #4ade80 !important;
    font-weight: 500;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    text-decoration: none;
    line-height: inherit;
}

.btn-link-minimal:hover {
    text-decoration: underline;
}

.hidden {
    display: none !important;
}

#login-card-main,
#forgot-panel {
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.btn-forgot-small {
    font-size: 0.75rem !important;
    opacity: 0.9;
    margin-bottom: 0 !important;
    line-height: 1 !important;
}

.login-card input.input-error {
    border: 2px solid #ef4444 !important;
}

@media (max-width: 768px) {
    .login-bg-slide {
        background-position: 55% 65%;
    }
    .login-container {
        align-items: flex-end; /* Alinhado no rodapé */
        justify-content: center; /* Centralizado horizontalmente */
        padding: 1rem 1rem 3.5rem 1rem !important; /* Distância da borda física */
    }
    .login-content {
        width: 80% !important; /* Sempre exatamente 80% da largura da tela */
        max-width: 80% !important;
        margin: auto auto 0.5rem auto !important; /* Posiciona no rodapé */
    }
    .login-card {
        width: 100% !important;
        padding: 0.7rem 0.5rem !important;
        box-shadow: none !important;
    }
    #login-card-main,
    #form-login, #forgot-panel, #reset-panel, #invite-panel {
        width: 100% !important;
    }
    #form-login input, #form-forgot input, #form-reset input, #form-invite-password input {
        width: 100% !important;
        display: block !important;
    }
}
