html, body {
    height: 100%;
}

app {
    display: block;
    height: 100%;
}

.header-logo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    width: auto;
    min-width: 0;
    height: 44px;
    background: none;
    -webkit-mask: none;
    mask: none;
}

#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 100001;
}

.header-logo::before {
    content: "";
    display: block;
    flex: 0 0 48px;
    width: 48px;
    height: 38px;
    background: url('../images/Logo.svg') center / contain no-repeat;
}

.header-logo::after {
    content: "新恒美印刷";
    color: #332730;
    font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
    font-size: clamp(.92rem, 1.5vw, 1.2rem);
    font-weight: 700;
    letter-spacing: .025em;
    white-space: nowrap;
}

/* Login-only styling; the regular XAF views keep their normal layout. */
#logon-template-component {
    min-height: 100vh;
    color: #332730;
    font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

#logon-template-component .logon-template-header {
    min-height: 72px;
    justify-content: flex-start !important;
    align-items: center;
    padding: 0 clamp(24px, 5vw, 78px);
    border: 0;
    background: #fffaf9;
    box-shadow: 0 1px 0 rgba(95, 44, 54, .12);
    z-index: 2;
}

#logon-template-component .logon-template-header .header-logo::after {
    content: "新恒美印刷管理信息系统";
    color: #332730;
}

#logon-template-component .logon-template-body {
    position: relative;
    min-height: calc(100vh - 72px);
    background: #312630 url('../images/login-background.svg') center / cover no-repeat;
    isolation: isolate;
}

#logon-template-component .logon-template-body::before {
    content: "从订单到交付，让每一步协同有序。";
    position: absolute;
    left: clamp(28px, 7vw, 112px);
    bottom: clamp(38px, 10vh, 120px);
    max-width: 26rem;
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.6rem);
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: .055em;
    text-shadow: 0 3px 15px rgba(29, 11, 21, .36);
    pointer-events: none;
}

#logon-template-component .logon-main-container {
    justify-content: flex-end !important;
    padding: 32px clamp(36px, 10vw, 170px) 32px 24px;
}

#logon-template-component .logon-main.card {
    width: min(100%, 438px);
    max-width: 438px;
    margin: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(255, 236, 236, .85);
    border-radius: 20px;
    background: rgba(255, 251, 250, .97);
    box-shadow: 0 28px 85px rgba(30, 12, 21, .35);
    backdrop-filter: blur(14px);
}

#logon-template-component .logon-main .card-header {
    padding: 30px 30px 10px;
    border: 0;
    background: transparent;
    color: #332730;
    font-size: 1.55rem;
    font-weight: 700;
    text-align: center !important;
}

#logon-template-component .logon-main .card-header::before {
    content: "";
    display: block;
    width: 160px;
    height: 160px;
    margin: 0 auto 8px;
    background: url('../images/BrandLogo.svg') center / contain no-repeat;
}

#logon-template-component .logon-main .card-body {
    padding: 14px 30px 30px;
}

#logon-template-component .logon-viewsite {
    color: #66545d;
}

#logon-template-component .logon-main input {
    min-height: 44px;
    border-radius: 9px;
    border-color: #ded0d2;
}

#logon-template-component .logon-main input:focus {
    border-color: #df1238;
    box-shadow: 0 0 0 3px rgba(223, 18, 56, .13);
}

#logon-template-component .logon-toolbar .dxbl-btn {
    min-height: 44px;
    border-radius: 9px;
    border-color: #df1238;
    background: #df1238;
    color: #fff;
    font-weight: 600;
}

#logon-template-component .logon-toolbar .dxbl-btn:hover {
    border-color: #b90f2d;
    background: #b90f2d;
}

@media (max-width: 900px) {
    #logon-template-component .logon-main-container {
        justify-content: center !important;
        padding: 36px 20px 130px;
    }

    #logon-template-component .logon-template-body::before {
        left: 24px;
        bottom: 24px;
        max-width: calc(100% - 48px);
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .header-logo {
        gap: 7px;
    }

    .header-logo::before {
        flex-basis: 36px;
        width: 36px;
        height: 30px;
    }

    .header-logo::after {
        font-size: .81rem;
    }

    #logon-template-component .logon-template-header {
        min-height: 64px;
        padding: 0 18px;
    }

    #logon-template-component .logon-template-body {
        min-height: calc(100vh - 64px);
    }

    #logon-template-component .logon-main .card-header {
        padding: 24px 22px 8px;
    }

    #logon-template-component .logon-main .card-header::before {
        width: 116px;
        height: 116px;
    }

    #logon-template-component .logon-main .card-body {
        padding: 12px 22px 24px;
    }
}
