html,
body {
    width: 100%;
    min-height: 100%;
}

body.auth-body {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background: #faf9f6;
}

.auth-page {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: auto;
    padding: 24px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    background: #faf9f6;
    min-width: 0;
}

.auth-card {
    display: flex;
    width: 100%;
    max-width: 72rem;
    min-width: 0;
    box-sizing: border-box;
    flex: 0 1 100%;
    overflow: hidden;
    border: 1px solid #eeeeec;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

.auth-form-panel {
    display: flex;
    width: 66.666667%;
    padding: 32px clamp(48px, 7vw, 96px);
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    min-width: 0;
}

.auth-content {
    width: 100%;
    max-width: 28rem;
    min-width: 0;
    box-sizing: border-box;
}

.auth-content form,
.auth-content form > div,
.auth-content p {
    min-width: 0;
    max-width: 100%;
}

.auth-content p {
    overflow-wrap: anywhere;
}

.auth-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.auth-title {
    line-height: 1.18;
}

.auth-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 48px;
    box-sizing: border-box;
    font-size: 16px;
}

.auth-password-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    right: 4px;
    align-items: center;
    justify-content: center;
}

.auth-options {
    gap: 12px 20px;
}

.auth-submit {
    min-height: 48px;
    touch-action: manipulation;
}

.auth-visual-panel {
    display: block;
    width: 33.333333%;
    min-height: 610px;
    flex-shrink: 0;
    background-position: center;
    background-size: cover;
}

.login-face-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 50;
    overflow-x: hidden;
    overflow-y: auto;
}

.login-face-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
}

.login-face-modal-card {
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}

@media (max-width: 1023px) {
    .auth-card {
        max-width: 34rem;
    }

    .auth-form-panel {
        width: 100%;
        padding: 36px 42px;
    }

    .auth-visual-panel {
        display: none;
    }
}

@media (max-width: 600px) {
    .auth-page {
        align-items: flex-start;
        padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
        overflow-y: auto;
    }

    .auth-card {
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
    }

    .auth-form-panel {
        padding: 26px 20px 24px;
    }

    .auth-logo {
        width: 64px;
        height: 64px;
    }

    .auth-title {
        font-size: 1.65rem !important;
    }

    .auth-options {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .auth-options a {
        align-self: flex-start;
    }

    .auth-legal {
        margin-top: 20px !important;
        font-size: 0.75rem !important;
        line-height: 1.55;
    }

    .auth-copyright {
        margin-top: 8px !important;
    }

    .login-face-modal-shell {
        align-items: flex-start !important;
        padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) !important;
    }

    .login-face-modal-card {
        min-height: 0 !important;
        max-height: none;
        padding: 20px 18px !important;
        border-radius: 14px !important;
    }

    #login-face-stage {
        --fs-size: 160px !important;
        --fs-ring-gap: 12px !important;
        --fs-seg-len: 20px !important;
        --fs-seg-w: 3px !important;
    }

    .login-face-success-portrait {
        width: 132px !important;
        height: 132px !important;
    }

    .login-face-success-title {
        font-size: 28px !important;
    }
}

@media (max-width: 360px) {
    .auth-form-panel {
        padding-inline: 16px;
    }

    .auth-title {
        font-size: 1.5rem !important;
    }
}

@media (max-height: 680px) and (max-width: 600px) {
    .auth-form-panel {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-face-modal-card {
        padding-top: 16px !important;
        padding-bottom: 16px !important;
    }
}
