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

body {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(47, 94, 184, 0.18), transparent 24%),
        linear-gradient(160deg, #eef3ff 0%, var(--ea-bg-page) 52%, #e8edf6 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 15, 29, 0.08) 0%, rgba(8, 15, 29, 0.14) 100%);
    pointer-events: none;
}

html[data-ea-theme="mist"] body {
    background:
        radial-gradient(circle at top right, rgba(25, 118, 210, 0.12), transparent 24%),
        linear-gradient(160deg, #f5f8fc 0%, var(--ea-bg-page) 52%, #eef2f7 100%);
}

html[data-ea-mode="dark"] body {
    background:
        radial-gradient(circle at top right, rgba(118, 160, 255, 0.12), transparent 24%),
        linear-gradient(160deg, #0c121b 0%, #0f1722 50%, #121b26 100%);
}

html[data-ea-mode="dark"] body::before {
    background: linear-gradient(180deg, rgba(2, 6, 12, 0.32) 0%, rgba(2, 6, 12, 0.42) 100%);
}

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.main-body {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(94vw, 980px);
    transform: translate(-50%, -50%);
}

.login-main {
    width: min(100%, 440px);
    margin-left: auto;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

.login-top {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 154px;
    padding: 28px 32px 24px;
    background: linear-gradient(135deg, var(--ea-color-primary) 0%, #1f4d9d 100%);
    color: #ffffff;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
}

html[data-ea-theme="mist"] .login-top {
    background: linear-gradient(135deg, var(--ea-color-primary) 0%, #155aa1 100%);
}

html[data-ea-mode="dark"] .login-top {
    background: linear-gradient(135deg, rgba(118, 160, 255, 0.88) 0%, rgba(38, 78, 147, 0.98) 100%);
}

html[data-ea-mode="dark"][data-ea-theme="mist"] .login-top {
    background: linear-gradient(135deg, rgba(92, 168, 255, 0.88) 0%, rgba(24, 84, 145, 0.98) 100%);
}

.login-top .bg1,
.login-top .bg2 {
    position: absolute;
    background: rgba(255, 255, 255, 0.14);
    pointer-events: none;
}

.login-top .bg1 {
    width: 110px;
    height: 110px;
    left: -22px;
    bottom: -44px;
    border-radius: 32px;
    transform: rotate(18deg);
}

.login-top .bg2 {
    width: 126px;
    height: 126px;
    top: -44px;
    right: -26px;
    border-radius: 50%;
}

.login-bottom {
    width: 100%;
    padding: 0 0 28px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
}

html[data-ea-mode="dark"] .login-bottom {
    background: rgba(20, 29, 40, 0.96);
}

.demo {
    padding-top: 18px;
    text-align: center;
    color: var(--ea-text-secondary) !important;
    font-size: 13px;
}

.login-bottom .center {
    width: min(100%, 320px);
    margin: 0 auto;
    padding-top: 32px;
    padding-bottom: 10px;
    position: relative;
}

.login-bottom .center .item {
    position: relative;
    width: 100%;
    height: 48px;
    margin-bottom: 18px;
    border: 1px solid var(--ea-border-default);
    border-radius: 14px;
    background: var(--ea-bg-surface);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-bottom .center .item:focus-within {
    border-color: var(--ea-color-primary);
    box-shadow: 0 0 0 4px var(--ea-color-primary-focus);
}

.login-bottom .center .item input {
    display: inline-block;
    width: calc(100% - 58px);
    height: 46px;
    padding: 0;
    position: absolute;
    top: 0;
    left: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ea-text-primary);
    font-size: 14px;
    letter-spacing: 0;
}

.login-bottom .center .item .icon {
    position: absolute;
    top: 12px;
    left: 14px;
    display: inline-block;
    width: 20px;
    height: 22px;
}

.login-bottom .center .item .icon-2 {
    background: url(../images/icon-login.png) no-repeat -58px 0;
}

.login-bottom .center .item .icon-3 {
    background: url(../images/icon-login.png) no-repeat -110px 0;
}

.login-bottom .center .item .icon-4 {
    background: url(../images/icon-login.png) no-repeat 0 -43px;
    position: absolute;
    top: 13px;
    left: auto;
    right: 14px;
    cursor: pointer;
}

.login-bottom .center .item .icon-5 {
    background: url(../images/icon-login.png) no-repeat -55px -43px;
}

.login-bottom .center .item .validateImg {
    position: absolute;
    top: 5px;
    right: 5px;
    height: 36px;
    border: 1px solid var(--ea-border-default);
    border-radius: 10px;
    cursor: pointer;
}

.login-bottom .tip {
    position: relative;
    width: min(100%, 320px);
    min-height: 18px;
    margin: 0 auto;
    color: var(--ea-text-secondary);
}

.login-bottom .tip .icon-nocheck {
    position: relative;
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border-radius: 4px;
    border: 1px solid var(--ea-border-default);
    background: var(--ea-bg-surface);
    vertical-align: -2px;
    cursor: pointer;
}

.login-bottom .tip .icon-check {
    border-color: var(--ea-color-primary);
    background: var(--ea-color-primary);
}

.login-bottom .tip .icon-check::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.login-bottom .tip .login-tip {
    font-size: 13px;
    color: var(--ea-text-secondary);
    cursor: pointer;
}

.login-bottom .tip .forget-password {
    position: absolute;
    top: 0;
    right: 0;
    color: var(--ea-color-primary);
    text-decoration: none;
}

.login-bottom .layui-form-item {
    width: min(100%, 320px) !important;
    margin: 20px auto 0 !important;
    text-align: center;
}

.login-btn {
    width: 100%;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--ea-color-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 24px rgba(47, 94, 184, 0.18);
}

.footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    z-index: 1;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
}

.footer a,
.footer span {
    color: inherit;
}

.padding-5 {
    padding: 0 8px !important;
}

input::-webkit-input-placeholder {
    color: var(--ea-text-tertiary);
}

input::-moz-placeholder {
    color: var(--ea-text-tertiary);
}

input:-moz-placeholder {
    color: var(--ea-text-tertiary);
}

input:-ms-input-placeholder {
    color: var(--ea-text-tertiary);
}

input:-webkit-autofill {
    -webkit-text-fill-color: var(--ea-text-primary);
    -webkit-box-shadow: 0 0 0 1000px var(--ea-bg-surface) inset !important;
}

@media screen and (max-width: 768px) {
    .main-body {
        width: min(92vw, 420px);
    }

    .login-main {
        margin: 0 auto;
    }

    .login-top {
        min-height: 138px;
        padding: 24px 24px 20px;
        font-size: 26px;
    }

    .footer {
        bottom: 12px;
        padding: 0 18px;
        line-height: 1.8;
    }
}

/* Keep long authentication forms usable on short screens. */
body { overflow: auto; }
.container { display: flex; flex-direction: column; }
.main-body {
    position: relative; top: auto; left: auto; transform: none; margin: auto;
    display: grid; grid-template-columns: 1fr 440px; gap: 56px; align-items: center;
    padding: 48px 0;
}
.login-intro { color: var(--ea-text-primary); }
.login-intro h1 { font-size: 34px; font-weight: 700; margin: 24px 0 16px; }
.login-intro p { color: var(--ea-text-secondary); font-size: 16px; line-height: 1.8; }
.login-main { width: 100%; }
.login-bottom .center .item input[type=password],
.login-bottom .center .item input[name=password] { width: calc(100% - 88px); }
.login-bottom .bind-password { padding: 0; border: 0; background-color: transparent; }
.login-bottom .bind-password:focus-visible { outline: 2px solid var(--ea-color-primary); outline-offset: 2px; }
.login-bottom .center .login-captcha input { left: 14px; width: calc(100% - 132px); }
.login-tip input { accent-color: var(--ea-color-primary); vertical-align: middle; }
.login-btn:disabled { opacity: .65; cursor: wait; }
.login-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.footer { position: relative; bottom: auto; padding: 12px 20px 24px; color: var(--ea-text-secondary); }
@media screen and (max-width: 900px) {
    .main-body { display: block; max-width: 440px; }
    .login-intro { display: none; }
}
