.login-wrapper {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    inline-size: 42rem !important;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.login-wrapper .main-header {
    width: 100%;
    margin-bottom: 1rem;
    text-align: center;
}

.login-container {
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
}

.login-wrapper > div {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.login-container {
    display: flex;
    flex-direction: row;
    min-height: 420px;
    background: var(--page-login-form-bg, #ffffff);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.login-wrapper .content {
    padding: 0.1rem !important;
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-width: 0;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-container {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    max-width: 44rem !important;
    min-width: 0;
}

.form-container form {
    width: 100%;
}

.two-factor-login,
.two-factor-login form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
}

.two-factor-login .form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0;
    margin: 0;
}

.two-factor-login .form-text {
    margin: 0;
}

/* Enpass (and similar extensions) change the focused field's line box.
   EasyAdmin sets line-height equal to the input height, so the password
   field grows and the centered card jumps when focus moves. */
.login-wrapper .form-widget {
    position: relative;
    block-size: 38px;
    min-block-size: 38px;
    max-block-size: 38px;
}

.login-wrapper .form-widget input {
    box-sizing: border-box;
    inline-size: 100%;
    max-inline-size: 100%;
    block-size: 38px !important;
    min-block-size: 38px !important;
    max-block-size: 38px !important;
    line-height: normal !important;
    padding-block: 0;
}

@media (max-width: 992px) {
    .login-wrapper {
        inline-size: 92% !important;
        width: 100%;
        left: 50%;
        transform: translateX(-50%);
        top: 2rem;
    }

    .login-container {
        flex-direction: column;
        max-width: 420px;
        min-height: auto;
        margin: 0 auto;
    }

    .image-container {
        display: none;
    }

    .form-container {
        padding: 1.5rem;
    }
}

@media (max-height: 600px) {
    .login-wrapper {
        top: 50%;
    }
}

div.logo-long {
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
}
